Skip to content

mcpx: public Go API surface + compatibility-promise proposal (split from #1877) #2119

Closed

Description

@dezren39

Split from #1877 (triage task 2771, 2026-10-29); parent tracker #1885 (extensibility).

What is needed

A decision-ready proposal for mcpx's public Go API surface — step 1 of #1877's sequence (public Go package → C ABI → WASM, each step only if the one before it has a caller).

Confirmed at triage (2026-10-29, current main): there is no public Go API at all — pkgs/mcpx top level is cmd/, daemon/, internal/, plugin/, docs/; every implementation package is under internal/ and cannot be imported by another module. Today "embedding" means exec the binary or speak /v1 over the socket.

The proposal must name

  1. The candidate public packages (smallest surface that serves a real first caller) and the first caller each serves.
  2. The compatibility promise that attaches to them.
  3. Honest weighing of the status-quo alternatives (exec the binary; /v1 over the socket) — if they suffice for the named callers, say so and close the sequence.
  4. Sequencing for the C ABI (-buildmode=c-shared / c-archive) and WASM (wasip1 reactor via the same exported surface), per mcpx: embedding mcpx -- a public Go API, the C ABI, WASM, and mcpx as its own upstream #1877.

Out of scope

Acceptance

Acceptance criteria

  • A proposal is posted (here or on mcpx: embedding mcpx -- a public Go API, the C ABI, WASM, and mcpx as its own upstream #1877) covering: the candidate public packages and the first caller each serves; the compatibility promise that attaches to them; an honest weighing of the status-quo alternatives (exec the binary; /v1 over the socket); and sequencing for the C ABI and WASM steps — with file:line evidence for claims about the current package layout.
  • An implementation packet is enqueued once the surface is decided, or the decision is escalated with the proposal attached.

Activity

  1. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  2. added
    kind/docsDocumentation improvement or addition
    source/queue-workerFiled or worked by the queue/worker pilot
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    🤖 Fleet monitor intake enrichment, 2026-10-29. Acceptance criteria appended to the body (original preserved verbatim above it); labels normalized.

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 1, 2026
  5. 1 remaining item

  6. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · escalated

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e6a4e7626ffeeQY3LuGuMzaf · queue task 3112
    • Found via: repo-health-code-pilot triage
    • Task: Decision-ready proposal for the public Go API surface and its compatibility promise.

    Proposal (evidence checked on main 5c172f3d)

    Current surface

    • Correction to the issue wording: there is a public module-root package mcpx, but it only exports AgentDocs string (pkgs/mcpx/agentdocs.go:1-20; go doc .). It is agent documentation data, not an embedding or client API.
    • The CLI imports internal/cli, internal/config, and internal/daemon (pkgs/mcpx/cmd/mcpx/main.go:14-17). The useful daemon entry points (Options, NewServer, Handler, InProcessHandler) are in internal/daemon (server.go:174-201, 517-540), so external Go modules cannot import them.
    • /v1 is already the language-neutral daemon contract. Its operation table generates routes, MCP tools, CLI commands and OpenAPI (internal/api/ops.go:1-13). docs/http-api.md:171-190 says no SDK is published and recommends generating a client with oapi-codegen; :195-214 documents the live OpenAPI source and Unix-socket transport caveat.

    Candidate packages and first callers

    1. pkg/client — typed Go client for /v1. Generate from OpenAPI rather than hand-copying the operation table. First caller would be a named external Go host that needs typed daemon calls. No such consumer is named in mcpx: embedding mcpx -- a public Go API, the C ABI, WASM, and mcpx as its own upstream #1877, mcpx: public Go API surface + compatibility-promise proposal (split from #1877) #2119 or tracker mcpx: extensibility -- plugins, hooks, tool sources, embedding (tracker) #1885; a generated client from the existing spec already serves the generic case.
    2. pkg/daemon — optional in-process daemon facade. It could expose a small constructor, listener/handler and context-bound shutdown contract without re-exporting internal/daemon.Options. First caller would be a Go host that cannot use a child process or local socket and needs daemon lifecycle in its own process. No such host is identified; current internal tests are not a reason to publish it.
    3. Do not publish config, api, or implementation packages wholesale. Add a public package only for a concrete caller and keep the rest under internal/.

    Compatibility promise if a package is approved

    Keep internal/* private with no compatibility promise. For any new public package, document the exact supported surface. Recommended policy: explicitly experimental during v0.x (breaking changes allowed only with a minor-version bump and migration note); freeze the contract at v1.0.0 and use SemVer thereafter. The module is currently 0.1.0; Go submodule tags must also follow the pkgs/mcpx/vX.Y.Z path described in decision 0005 §3, separately from the human-facing mcpx/vX.Y.Z release tag.

    Alternatives and sequencing

    • Exec the binary: the existing CLI is the lowest-coupling and process-isolated option; use it when the caller needs commands rather than an in-process library.
    • Use /v1 over the Unix socket: recommended for general automation. It is language-neutral, has a generated OpenAPI contract, and keeps daemon ownership/lifecycle outside the caller. Generate Go types/client when needed. This is sufficient for every caller currently named in the issues.
    • Publish Go packages: useful only if a concrete Go host needs stronger in-process ergonomics or cannot use the socket; it permanently creates a source-compatibility obligation.
    • C ABI/WASM: defer both until a named caller exists. If C does appear, start with c-archive; use c-shared only when runtime loading is required. A wasip1 reactor can only cover pure analysis that needs neither sockets nor subprocesses. These remain after the public Go decision, not part of it.

    Recommendation and decision requested

    Default: do not enqueue implementation yet. Keep exec and /v1 as the supported surfaces until a real first Go caller demonstrates why they are insufficient. If proceeding speculatively, start with pkg/client only; do not expose the stateful daemon until a host requiring in-process lifecycle is named. This decision commits to a long-lived public API and a pre-1.0 compatibility policy, so I am escalating the choice to Drew: either (A) defer/close #2119 until a caller is named, or (B) approve the speculative pkg/client surface and the experimental-v0.x policy above. No implementation packet has been enqueued.

  8. added
    user/escalatedQueue or user escalation state
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  9. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    RULING (Muse, acting for Drew, 2026-11-03): defer — no speculative public pkg/client and no experimental v0.x compatibility policy until a concrete first Go caller shows exec and /v1/OpenAPI are insufficient. Task 3112 closed with this ruling.

  10. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Closed as deferred in the 2026-11-03 coverage pass, per the 2026-11-03 ruling (Muse, acting for Drew): the speculative public Go API client is DEFERRED — no compatibility promise is made for a client that does not exist yet. Task 3112 is done. Reopen when a real external client appears.

  11. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    Triage task 7453 closed as already_done — no code changed, no worktree, no branch.

    Fresh check 2026-11-03T12:05Z: #2119 is CLOSED (2026-11-03T10:05:26Z). The proposal was settled by the 2026-11-03T09:22Z ruling (Muse, acting for Drew): the speculative public Go API client and any v0.x compatibility promise are deferred until a concrete external Go caller shows exec + /v1/OpenAPI are insufficient; queue task 3112 is done.

    Label repair: removed the stale in-flight/escalation labels this packet was filed against (status/blocked, queue/blocked, user/escalated). No work/* label was present. Nothing is in flight; reopen only if a real external Go client appears.

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

Metadata

Metadata

Assignees

Labels

app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/docsDocumentation improvement or additionmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/queue-workerFiled or worked by the queue/worker pilot

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions