Skip to content

chore(spec): watch the shared event feed and the client-hosted MCP sources - #916

Merged
Blind-Striker merged 1 commit into
masterfrom
chore/901-source-watch
Nov 16, 2026
Merged

Blind-Striker merged 1 commit into
masterfrom
chore/901-source-watch

Conversation

@Blind-Striker

Copy link
Copy Markdown
Collaborator

What

The source watch (spec/source-watch.json) now pins the upstream files at the pin (v2.3.0, a6b15d33) that the shared event feed and the client-hosted MCP door mirror, so a refresh that changes them is reviewed before the pin moves.

Closes #901

Upstream file Behaviours watched
packages/client/src/shared-events.ts the shared-feed model EventsClient ports (ADR-0041): lazy single source, local type filter with server.connected, marker-only replay, 4,096-event per-subscription bound, prefix before an ending, last leave stops the source
packages/client/test/shared-events.test.ts behavioural oracle: upstream's own checks that the SDK's Events tests re-prove, with the EOF, failure, abort and activity checks routed to ADR-0041's divergences
packages/client/src/mcp.ts the first-party responder, the reconnect schedule and close, the endpoint builder
packages/server/src/handlers/mcp.ts the token route's header, origin check and ticket scope; the attach handler's 403s and 1011 close
packages/core/src/mcp/index.ts attach, stacking with the 5-second fallback re-list, shadowing and call routing
packages/core/src/mcp/socket-client.ts the server side of the socket transport
packages/core/src/tool/runtime.ts model-facing tool naming (<client name>_<tool name>)

packages/core/src/pty/ticket.ts and packages/protocol/src/groups/pty.ts were already watched. The ticket row gains a second behaviour for the per-target and per-location scope that the client MCP ticket uses; the PTY group's note now names the client MCP token route beside the PTY ticket routes. No path row is duplicated.

Every anchor occurs once in its file at the pin, and every hash is the file's SHA-256 at the pin. The client-hosted MCP door itself is not in the SDK yet (Refs #529); its rows carry the opencode-sdk-dotnet owner and describe upstream's behaviour only.

Provenance route

spec/receipt.json and spec/SNAPSHOT.md were written by the synchronizer, not by hand (spec/SNAPSHOT.md, Refresh procedure): refresh-spec --ref v2.3.0 prepared a receipt from the accepted state, and refresh-spec --apply installed it. Against the committed receipt, only watchedSources changed (95 to 102 entries, plus the ticket's new anchor, every anchor matched); openapi.json is byte-identical, the operation delta is +0 -0, and SNAPSHOT.md moves only its Date: line, which apply renders.

docs/architecture/client-runtime.md gains a one-line relay in the shared-feed section that links the source watch's canonical home.

Verification

Local check on Windows (UNDERDARK, .NET SDK 11.0.100, Bun 1.4.4): slopwatch, the Release build, both format passes, verify-clones, opencode-tool --help, generate --verify, refresh-spec --verify, and OpenCode.Sdk.Tools.Tests without NativeAot (2,826 passed, 0 failed). No file under src/ or tests/ changes, so no product test project is in scope.

…urces

The shared event feed ports packages/client/src/shared-events.ts at
v2.3.0, and the client-hosted MCP door mirrors upstream's responder,
attach handler, attachment stack, socket transport and tool naming.
The source watch now pins those files, with the shared feed's upstream
test as a behavioral oracle, and the connect ticket gains its
client-MCP scope.

The receipt is re-prepared at v2.3.0 and applied, so it records the
new watched sources; the document and operations are unchanged.
@Blind-Striker Blind-Striker added this to the Next milestone Nov 16, 2026
@Blind-Striker
Blind-Striker added this pull request to the merge queue Nov 16, 2026
Merged via the queue into master with commit 823b175 Nov 16, 2026
17 checks passed
@Blind-Striker
Blind-Striker deleted the chore/901-source-watch branch November 16, 2026 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source watch: record shared-events.ts for the shared event feed

1 participant