Skip to content

mcpx: extensibility -- plugins, hooks, tool sources, embedding (tracker) #1885

Open

Description

@dezren39

Relocated from dezren39/darwin-nix#173 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).

Parent: #181

Purpose

Make mcpx extensible by other people, without loading their code into the daemon. Five issues sit under this theme because they answer one question from five angles: what is the contract an extension implements (#80), how does a user attach behaviour to something the daemon noticed (#81), what may an extension do to the daemon once attached (#82), what counts as a thing that can provide tools at all (#83), and what does it mean to put mcpx inside somebody else's program (#84). They belong together because they share three decisions — MCP is the extension contract, /v1 is the capability surface, and the process boundary is the isolation boundary — and every one of them gets worse if those decisions are made separately. Done looks like: a plugin is a servers entry with a manifest, a hook is a config entry over the existing event bus, an adapter/recipe/plugin/upstream-server are indistinguishable once loaded, and nothing anywhere calls plugin.Open.

The unifying rule, stated once so it is not relitigated in each child: there is no private surface; there is a surface and a backlog. An extension may call every declared /v1 operation, and anything it wants that is not declared is a missing row in internal/api/ops*.go — where the CLI and MCP get it too, and the parity test keeps it honest.

Children

Proposed order

Phase 1 — cheap, independent, all three in parallel.

  1. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 36464cf #83 slice 1: recipes as MCP tools. The highest value-per-line item in the theme. A recipe already declares typed parameters in a header comment (internal/recipes/recipes.go); publishing each as a tool is a JSON Schema and plumbing. Nothing blocks it.
  2. chore(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5 #81 slice 1: the observer-only hook table. One bus subscriber with a bounded worker pool, reusing events.Filter verbatim, with the three executors (command / JS-TS module / Python module). The daemon's event path does not change, so this cannot regress anything. Settle the delivery contract here — JSON on stdin, flat fields in the environment — because that is the decision that cannot be changed later. Two inputs it does not decide itself: the hook vocabulary (the SURFACES decision record, collision 2) and what a hook is told when it falls behind (Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 4371899 #6's gap contract, collision 13 — small, and it fixes a live replay-truncation defect on /v1/events). Neither needs Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 4371899 #6's event store; the bus chore(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5 #81 subscribes to already exists (internal/events/events.go:113).
  3. chore(deps): bump prettier-plugin-toml from 1.0.0 to 2.0.1 #84 slice 1: unix:// MCP transport, daemon identity in initialize, ancestry loop guard. Small, and chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 2901d28 #80 (remote-socket plugin), chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 5f79ad1 #82 (a detached plugin becomes a unix:// server) and chore(deps): bump prettier-plugin-toml from 1.0.0 to 2.0.1 #84's own self-composition all want it. Doing it once, early, is the point.

Phase 2 — the keystone, sequential.

  1. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 36464cf #83 slice 2: the tool-source interface; adapters and OpenAPI move off mcpserver.Extra. This has to precede chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 2901d28 #80. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 2901d28 #80's own body says why: plugins are about to be the fourth producer, and adding a fourth Extra list is how this ends with four half-integrated surfaces. This is also where the mcpx ls / codegen / "callable from a script" win lands, which delivers the capability Bump build/buck/preludes/buck2-prelude from d956689 to f12c8d1 #102 reports (Bump build/buck/preludes/buck2-prelude from d956689 to f12c8d1 #102 is in flight and may close sooner on a doc fix plus a guard test).
  2. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 2901d28 #80: manifest, paths.plugins search path, zero-manifest executables, pool routing, the thin SDKs. Lands on the interface from step 4, so a plugin is a namespace from day one.

Phase 3 — sequential, and only now.

  1. chore(deps): bump stefanzweifel/git-auto-commit-action from 4 to 5 #81 slice 2: phases and the enumerated hook-point table, plus the plugin-tool executor. before/after at three declared points (call, exec, server.start), fail-open default, mandatory timeout, mcpx doctor reporting slow and failing hooks.
  2. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to 5f79ad1 #82: the plugin session — identity, ownership, atomic teardown, runtime hook registration, the namespaced variable store, the named-command registry, re-address on detachment.

Phase 4 — independent, value-gated, may never happen.

  1. chore(deps): bump prettier-plugin-toml from 1.0.0 to 2.0.1 #84 rest. Public Go /v1 client + embeddable daemon package (has callers today). c-archive before c-shared, and only if a C caller names itself. WASM as the sandboxed analysis subset. The stopping rule is in the issue and should be honoured: answering "here is what the C ABI costs, and no" may be the entire deliverable.

Parallelism: phase 1's three items touch disjoint code. Phase 4 is disjoint from everything and can run alongside phases 2–3 if someone wants it. Phases 2 and 3 are genuinely sequential.

Ease / impact

Issue Ease Impact Note
#83 M for recipes-as-tools and a declaration runtime; L for the tool-source interface and generalised live add; XL for all of it including generated declarations high The feature mcpx is for; the Extra gap currently caps it.
#81 M for the observer table and the three executors; L with phases and the hook-point table high Extend mcpx without writing a server; the bus that makes it cheap already exists.
#84 M for the public Go client and embeddable daemon; M for the unix:// transport plus identity and loop guard; L for the C ABI; L for a useful WASM subset med High for the Go package API and self-composition, low for the C ABI until a caller names itself.
#80 M for the manifest + search path + pool routing; L including SDKs and the shebang/runtime resolution high The shape every other item in this theme hangs off.
#82 L med-high High if plugins land, near zero without them; the verbs are small, session/ownership/teardown are the work.

Note the Ease values are per-slice, not per-issue. Reading this table as whole-issue estimates understates every row: #83 taken whole is XL, #81 taken whole is L, #84 taken whole is two L's on top of two M's.

Warnings

Related

Related: #5 (config chain governs paths.plugins and what a project config may declare) · #6 (event store — #81 depends on it heavily: same event vocabulary, a hook is a live trigger where the store is the history, and the seq watermark should be designed so "replay hooks over history" stays open; #6 owns gap semantics, collision 13) · #7 (placeholders and script.* splicing — the precedent for declaration-plus-search-path, and the existing hook-shaped settings) · #47 and #48 (the opencode plugin and the harness-free core — the consumer side; the same /v1 client is what an extension uses as a back-channel, and #84's Go client is its twin) · #49 (CI for every flake package — a public Go surface and any new SDK package needs one) · #76 and #113 (operations reachable from /v1 but not the CLI — the parity argument #82 runs in reverse) · #77 · #79 (latency budget) · #102 (in flight: an adapted binary is not callable from a script though the docs say it is — #83 slice 2 is the capability) · #112 (a fourth hook list on the exec point; adopts #81's vocabulary, collision 2) · #114 (tool views; builds on #83's namespace rules, collision 4) · #100/#105/#106/#107/#108 (runtime selection, Python as a first-class script language, shebang resolution, flake refs — #80's plugin-runtime resolution and #83's declaration runtime are the same problem and must not be jammed into script.runtime) · #159 and #172 (docs that contradict the code; undeclared MCPX_* variables) · closed: #44 (no-binary plugin, fixed in #53 — the plugin reaches the daemon over the socket and spawns the binary only as the last fallback).

Sibling tracker: #174 (surfaces).

Security/auth deferred; see tracker.

Activity

  1. developing-today commented on Oct 28, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor

    History carried over from dezren39/darwin-nix#173 (verbatim, oldest first):


    @dezren39 · 2026-09-30T12:12:21Z

    Issues pass (2026-09-30, at 05c78b2).

  3. added
    enhancement
    queue/queued
    status/needs-triage
    on Oct 28, 2026
  4. added
    work/assigned
    queue/claimed
    status/in-progress
    and removed
    status/needs-triage
    queue/queued
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  6. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

    Triage verdict — #1885 is a valid umbrella tracker, not a duplicate

    Dedupe (explicit): No other open code issue is an extensibility tracker for mcpx. Its five children are distinct relocated issues, all open, none duplicating the tracker or each other:

    Scope confirmed against current main: pkgs/mcpx exists on main with the subsystems the tracker references — internal/{api,events,recipes,adapter,mcpserver,pool,settings,cli} all present (GitHub API, 2026-10-29). The Phase 1→3 ordering in the body (tool-source interface #1875 slice 2 before plugin contract #1870; hook vocabulary owned by #1872; gap contract in #1914) stands as written.

    Follow-up: No new packet for the tracker itself — implementation belongs to the children, which are already split/queued as above. The tracker stays open as the umbrella until its children close.

    Verification for follow-ups: pkgs/mcpx: go test ./... via CI, per child.

  7. removed
    status/in-progress
    queue/claimed
    on Oct 29, 2026
  8. 33 remaining items

  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task: 19614
    at: 2026-11-17

    Fresh repeat-triage verification: #1885 remains OPEN as the extensibility umbrella. Child state currently matches task 18155’s fresh review (#1885 (comment)): #1873 and #1875 are CLOSED; #1877 remains OPEN and is the only remaining child. Its embedding work is separately tracked, including the current follow-on recorded under task 18152. No umbrella-level packet is appropriate; retain the tracker until #1877 closes.

  10. removed their assignment
    on Nov 20, 2026
  11. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Second-pass check (oc-code-08): #1885 is still open. Its only open child is #1877, last updated 2026-11-24. No code changes from this lane. Leaving the tracker open until #1877 closes. Parking for 2h to recheck.

  12. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Second-pass verdict — task 21765 (lane item-work-24, worker oc-code-06, 2026-11-24)

    Fresh verification this pass (GitHub state + laptop ~/git/code main):

    Routing done in this pass:

    Verdict: tracker stays OPEN until #1877 closes; no umbrella-level code packet is appropriate. The remaining actionable work is now routed via #14281 / task 22968; the C ABI / WASM rungs stay parked on #1877's stopping rule (a named non-Go caller appearing).

  13. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · done — triage verdict: VALID UMBRELLA, remainder value-gated (1837-O)

    • Agent: queue worker (archer), lane 1837-O
    • Session / ID: queue task 25391
    • Found via: queue claim

    Fresh verification 2026-11-26 (GitHub state checked this lane):

    Disposition: tracker stays OPEN until #1877 closes or is scoped down by its owner. No umbrella-level small fix exists. Queue task 25391 triage complete with this evidence; tracker will re-enter coverage reconciliation while #1877 remains open.

  14. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Related: #1900 (mcpx backlog super-tracker). The category tracker remains open and owns its scoped extensibility work.

  15. dezren39 commented on Nov 28, 2026

    @dezren39
    MemberAuthor

    Lane 1222-J (delta PRESS, 2026-11-28) — queue task 25391 gate re-verified firsthand, parking unchanged.

  16. added
    priority/low
    on Nov 29, 2026
  17. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    Census 2026-11-29 (lane CEN-C02) — rechecked firsthand.

    State: OPEN category tracker for mcpx extensibility. Four of five children are CLOSED (#1870, #1872, #1873, #1875). The sole open child is #1877 (embedding: public Go API / C ABI / WASM), whose landed rungs (public Go client, PR #8277; self-composition, PR #14600) are done and whose remaining rungs (C ABI, WASM) are value-gated on a named caller — an owner call, recorded on #1877 itself.

    This tracker closes when #1877 closes or is scoped down by that decision. No tracker-level slice exists until then. Census action: added priority/low — the tracker previously carried no priority label. kind/enhancement confirmed.

  18. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix): full re-read (body, labels, all comments, edges) in the CODE-6 recovery pass. STRENGTHS: tracker with current triage. PRIORITY VALIDATION: single band, correct. FIXES I APPLIED: none needed. REMAINS: its children; no Drewry decision needed.

  19. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Wave-2 census pass (group code-01409-03205): rechecked live state, body, labels and recent comments firsthand via fleet gh immediately before editing.
    A 2026-11-29 census note from another lane (CEN-*/Felix) already exists on this issue — skimmed, not duplicated; this note records only the residual verdict and any residual fixes.

    Strengths: detailed body (14207 chars) with context a picker-up can start from; Children + Proposed order sections serve as the deliverables list for this tracker (in-substance equivalent of acceptance criteria); single taxonomy priority band (priority/low) — verified against live labels; kind label present (kind/enhancement).

    Gaps found: bare non-taxonomy enhancement label duplicating kind/*.

    Actions taken this pass: labels: +[] -['enhancement'].

    Priority: priority/low — checked against content, unchanged (no reprioritization). No closing keywords used; issue left open.

  20. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    🤖 Agent note · done — triage task 25391 (lane oc-code-07, 2026-11-29)

    Freshly rechecked #1885 and sole open child #1877 via Fleet GitHub. #1885 remains a valid umbrella; #1877 remains open and is still value-gated on a named caller for its remaining C ABI/WASM rungs. The transport/self-composition work is already landed (#14281 / PR #14600). No umbrella-level implementation or duplicate packet is appropriate; keep #1885 open until #1877 closes or is scoped down. Current census notes and labels already record the verdict and priority/low. Completing this reconciliation triage as ; no code changes.

  21. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Correction to the lane oc-code-07 completion note immediately above: the omitted text was unix:// transport and disposition triaged (shell interpreted inline backticks). The verdict is unchanged: #1885 remains a valid umbrella until #1877 closes or is scoped down; the transport/self-composition work is landed, and the remaining C ABI/WASM rungs remain value-gated on a named caller. No duplicate packet or implementation is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    epic/mcpx-platformkind/enhancementpriority/lowsource/creatorstatus/triagedtask/triage

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions