Skip to content

mcpx: surfaces -- reaching the daemon over ssh and the browser, and keeping what you reached (tracker) #1887

Open

Description

@dezren39

Relocated from dezren39/darwin-nix#174 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

Everything about reaching a running daemon, and keeping what you reached alive long enough to use. Four issues sit under this theme because they are all consequences of one fact: the daemon is already a network service with 60 declared operations, SSE and MCP, and almost nothing exists to reach it except a local CLI. #88 is the foundation — a caller today cannot reliably name the socket of a daemon it did not start, which is a live bug in the CLI. It was the mechanism behind #52; #182 closed #52 by making the test harness resolve through the info files (stop --all), which is #88's approach applied to one command, and left the CLI itself unchanged. #85 and #86 are the two missing front doors, one for a terminal on another machine and one for a browser. #87 is what makes either of them worth opening: every expiring resource in mcpx is absolute-from-creation and un-renewable, so a browser tab or a remote TUI watching a 120-second elicitation loses it. Done looks like: any process that knows the state directory can find the daemon, mcpx tui --daemon-endpoint ssh://host works, /ui/ serves a dashboard from the binary with no npm anywhere, and a resource stays alive while something is watching it.

Two of these issues have an explicitly rejected Approach A that is also the obvious phrasing of the ask — a built-in SSH server, and a vendored React SPA. Both are the expensive path. The theme's job is partly to stop those being rebuilt from the title alone.

Children

Proposed order

Phase 1 — fix discovery before adding two more things that have to name a socket.

  1. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fd4ce63 #88. Paths.Resolve() reads <state>/daemon-<key>.json and returns info.Socket, falling back to the computed path only when no record exists (the daemon's /v1/resolve already does this, routes_resolve.go:110-121; extract it); NewClient and EnsureDaemon use it; shutdown already unlinks the record (server.go:387) and should do so only when the record is still its own; MCPX_SOCKET applies to the process's own daemon and never to answers about other keys; log the relocation once at daemon start. Ease S for that core. It makes mcpx stop behave the way mcpx stop --all already does — Phase 5: tag event bodies must travel with the event #182 switched the e2e cleanup to stop --all for exactly this reason (internal/e2e/e2e_test.go:72-83) — aligns the Go CLI with the plugin ladder that docs/plugin-discovery.md:61-64 already documents as correct, and gives chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85's ssh -L recipe a path a human can actually read.

Phase 2 — cheap slices, in parallel.

  1. chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85 slice 1 (documentation only, Ease S, zero code). ssh host mcpx tui is already an SSH TUI. command: ssh, args: [host, mcpx, serve, --transport, stdio] is already MCP-over-ssh for any MCP host, and belongs in docs/protocol.md because it is free and nobody will guess it. ssh -N -L 7777:<socket> host plus daemon.endpoint=http://127.0.0.1:7777 already works — and needs phase 1 to be usable, since you must know the remote socket path.
  2. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 slice 1 (Ease S). Add daemon.ui (bool, daemon scope, default off) and daemon.uiDir (string, default empty, serves a directory instead of embedded assets). daemon.uiDir must ship in this slice, not later: it is the escape hatch that makes "do not vendor a SPA" a real position rather than a refusal, and it is the dev loop for slice 2.
  3. chore(deps): bump actions/setup-go from 4 to 5 #87. Touch-on-read as the default expiry, an <x>.maxAge absolute ceiling paired with each idle <x>.ttl, an explicit ttl parameter on create only, and one vocabulary (expiresAt + ttlRemainingMs) echoed on every expiring resource — plus the daemon's own lifetime rule, which chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85 and chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 apply. Step zero: elicit.ttl is a compiled-in default with no setting (internal/defaults/defaults.json:63), so it must be declared before it can be re-meant. Independent of the other three and can start any time; placed here because chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 slice 2 is not worth building without it and chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85/chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 need its lifetime answer.

Phase 3 — the two real surfaces.

  1. chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85 slice 2: the ssh:// endpoint scheme. daemon.endpoint = ssh://user@host installs a DialContext that spawns the system ssh running a stdio-proxy subcommand on the far side. Everything downstream is unchanged because it is all HTTP over a byte stream. Prototype SSE over the ssh pipe before committing — it is the one genuinely unknown behaviour in the design, and /v1/events is what a remote TUI lives on.
  2. chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 slice 2: the embedded no-build frontend. Plain HTML/CSS/ES modules, go:embed, served at /ui/ by the existing listener. Scope fixed at the TUI's six views read-only, plus elicitation forms — which is the one thing a browser does better than a terminal, and the thing chore(deps): bump actions/setup-go from 4 to 5 #87 makes viable.

Declined, and recorded as declined.

  1. chore(deps): bump openssl from 0.10.54 to 0.10.60 in /sources/pavex/examples/realworld #85 Approach A (a charmbracelet/wish SSH server) and chore(deps): bump build/buck/preludes/buck2-prelude from d956689 to fdddce8 #86 Approach A (a vendored React SPA bundled at build time). Both are documented in their issues with the reasoning. Neither should be built; if either is, it goes behind a build tag or a separate flake package with its own CI (build(deps): bump build/buck/preludes/buck2-prelude from d956689 to 3cfc766 #49), never linked into the default mcpx.

Parallelism: phase 2's three items are disjoint. Phase 3's two are disjoint from each other but both want phase 1 and #85 slice 2 makes #86's remote story work (ssh -L plus /ui/ is a remote dashboard with nothing installed locally).

Ease / impact

Issue Ease Impact Note
#88 S for the resolve step and the relocation log; M once Paths.Socket's call sites are audited med Lowered from high in the 2026-09-30 pass: #182 removed the test-suite leak (#52). Still silently produces false negatives from mcpx stop, mcpx status and every client command past a 100-byte state path, can start a second daemon for one key, and gets worse as more surfaces need to name a socket.
#87 M med Mechanically small per store, but touches five subsystems and changes the meaning of documented settings. High for anything with a human in the loop, where elicit.ttl = 120s is the ceiling on how long a person may take.
#85 S for the documentation and the ssh host mcpx serve recipe; M for the ssh:// endpoint scheme and stdio proxy; L for a wish-based SSH server (A), mostly in policy rather than code med High for anyone with a remote or containerised daemon, nil for a single-laptop user.
#86 S to serve a directory and add the settings; M for the embedded read-only frontend covering the TUI's six views; L if a bundled SPA (A) is chosen med High for demos, remote machines and anyone who will not open a terminal; low for the existing CLI-first user.

As in the sibling tracker, these Ease values are per-slice. The S rows are the phase-1/phase-2 slices only.

Warnings

Related

Related: #52 (closed, fixed in #182 — stop --all through the info files plus a 60s autostart idle exit in the test env; no TestMain sweep was needed) · #78 (two digests under one name in the same info file; its MCPX_SOCKET item moved to #88) · #183 (in flight: the ForConfig comment in paths.go) · #76 and #113 (CLI parity for /v1-only operations; every new surface makes the gaps more visible, and #87's new parameters must reach the CLI and the plugin, not just /v1) · #77 (protocol follow-ups — task status, cancellation and inline answers are exactly what a live dashboard and a touch-renewed task want) · #79 (client fast-path budget; #88 spends from it) · #49 (.lootbox/ui has no build check; any new build stage, build tag or flake package needs CI) · #6 (event store — expiry events from #87 belong there, and /v1/events is what both new surfaces live on; #6 owns the gap contract, collision 13, which is what a remote TUI or a browser EventSource is told when it falls behind — today a replay past 256 events is silently truncated) · #172 (MCPX_SOCKET is one of 44 undeclared MCPX_* variables) · #159 (docs that say what the code does not — #85's and #86's documentation slices are partly repayment on that) · #5 (daemon.endpoint, daemon.address and the new UI settings all resolve through the config chain).

Sibling tracker: #173 (extensibility / plugins).

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#174 (verbatim, oldest first):


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

    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 — #1887 is a valid umbrella tracker, not a duplicate; all children already triaged

    Dedupe (explicit): No other open code issue is a surfaces tracker for mcpx. Its four children (original nix numbering in the body) are distinct relocated issues, all open, and every one was already triaged on 2026-10-29 with an implementation follow-up enqueued:

    Scope confirmed against current main: pkgs/mcpx exists on main with the daemon/dashboard subsystems this tracker references (internal/{daemon,dashboard,api,events} present, GitHub API 2026-10-29). The Phase 1 ordering in the body (socket discovery #1886 before the two new surfaces) stands, and #1882's rescope is already recorded on that issue.

    Follow-up: No new packet for the tracker itself — implementation belongs to the children, whose follow-ups (3113, 3115, 3120, 3126) are already queued. 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. 64 remaining items

  9. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: picked-up
    queue: repo-health-code-pilot
    task: 18156 (triage, worker repo-worker-code, lane code-f)
    by: openchamber-scheduled-lane
    at: 2026-11-17T02:05:30Z

    Claimed to revalidate umbrella tracker #1887 and its four code-repo children. Prior verdict says only child #1884 remains; I will verify all child states and that its own route remains live before closing this triage.

  10. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (triaged)

    Verdict — #1887 remains a valid open umbrella tracker; no live child work remains to route

    The three surface prerequisites are closed: #1880 (SSH access), #1882 (daemon web frontend), and #1886 (socket/info-file discovery). The remaining child tracker #1884 is still OPEN, but its scope is fully dispositioned and it remains open as an umbrella pointer, not as actionable work: the elicit family landed in PR #2544; the tasks family landed in PR #5754 (#2546 closed); the artifacts family landed in PR #3019 (#2548 closed); ask (#2547) was superseded by the tasks-store implementation; proto state is documented as an exception in decision 0006. The latest child-level completion evidence is #1884's task 14519 note, which was re-confirmed by the later bookkeeping triage task 18154.

    No new follow-on packet is warranted: all implementation families are already completed or explicitly dispositioned, and #1887 should stay open as the set tracker. This task is complete as triaged; no implementation was done.

  11. removed
    status/in-progress
    queue/claimed
    work/assigned
    on Nov 17, 2026
  12. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: triaged
    task: 19630 (repo-health-code-pilot, lane code-d)
    issue: #1887 — mcpx: surfaces — reaching the daemon over ssh and the browser (tracker)

    Triage of record stands (multiple prior verdicts on this issue): #1887 is a valid open umbrella tracker; its remainder is exactly one child — #1884 (one convention for renewing TTLs, touch-on-read) — already open and already routed; no fix packet is created from tracker triage.

    Fresh verification this shift (2026-11-17): #1887 OPEN, no hard-stop labels (kind/enhancement, task/triage, epic/mcpx-platform); child #1884 still OPEN with its own routing intact. Nothing about the remainder has changed since the last verdict.

    Disposition: task 19630 completes as triaged, naming the triage of record. Tracker stays OPEN until #1884 closes.

  13. removed their assignment
    on Nov 20, 2026
  14. added
    priority/normal
    on Nov 29, 2026
  15. added
    priority/low
    on Nov 29, 2026
  16. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

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

    State: OPEN umbrella tracker for mcpx surfaces; every implementation family under it is completed or explicitly dispositioned. The three surface prerequisites are CLOSED (#1880 SSH access, #1882 daemon web frontend, #1886 socket/info-file discovery). The remaining child, #1884 (TTL touch-on-read convention), is itself substantively complete — convention adopted as decision 0006, families landed or dispositioned — and stays open only as the convention's tracking home.

    So this tracker remains open purely as the set pointer until #1884 closes. No implementation packet belongs on #1887. Census action: added priority/low — the tracker previously carried no priority label. kind/enhancement confirmed.

  17. removed
    priority/normal
    on Nov 29, 2026
  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. FIXES I APPLIED: this issue carried TWO priority bands (priority/normal + priority/low) after today's bulk prioritization sweep labelled over the original triage band. Resolved on the evidence: the original per-issue triage band (low) stands — it was set deliberately at filing for this mcpx design-series item, and the same rule the sweep lane itself applied to its collisions (defer to the per-issue judgment) applies here. Removed priority/normal; exactly one band (priority/low) remains. REMAINS: its children; no Drewry decision needed.

  19. added
    status/triaged
    and removed
    enhancement
    on Nov 29, 2026
  20. 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 (13823 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: +['status/triaged'] -['enhancement'].

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

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