Repository navigation
p1 · unblocks cloud#4905 — feat(mcp): export the app-docs answer-order rule and its served-check from the barrel - #35759
Conversation
… from the barrel A host that writes its own initialize text (instructions / dataOnlyInstructions) can now carry the same answer-order sentence the open server appends: packageDocAnswerRule, packageDocToolsServed, definitionReaderOf and DEFINITION_READER_TOOL_NAMES are exported from @objectstack/mcp. The open server keeps calling the same functions, so there is one copy of the text; a barrel test pins it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
📓 Docs Drift CheckThis PR changes 1 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
What this run could not see
Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a24c845d07c900931e28eb7a30ed1a94514cbf2a && git checkout a24c845d07c900931e28eb7a30ed1a94514cbf2a
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin cceb5c626d3c68a457e1dcf20de1fea0e0194366 beadd87426a43360203ba7910228d2c121ba55ef && git checkout -B drift-repro cceb5c626d3c68a457e1dcf20de1fea0e0194366 && git merge --no-ff beadd87426a43360203ba7910228d2c121ba55ef
node scripts/docs-audit/affected-docs.mjs --json cceb5c626d3c68a457e1dcf20de1fea0e0194366
|
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF Contract review — PASS at 01e6d0fHead-sha: Face: the ① Derived judgmentsCard #35633 "Done when", item by item:
Host composition (cloud build door). Every input is a plain value the host already holds when it calls Byte-identical default text. This holds by construction. In Public surface. The
No internal type leaks. ② Semver level
Declaration lines: ③ Boundary flags
FindingsS1 (should-fix): the declaration line miscounts the widening. The PR body and the changeset both say N1 (nit): the README does not name the new exports. N2 (nit): host guidance for N3 (nit): No must-fix. Implemented-by: Independence: the diff was implemented on the branch above by dev session VERDICT: PASS Landing still needs S1 closed and CI green on the landing head. |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1k1GRsQbF3vCPKxhz
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz Final green head: |
|
repo:objectstack#4 · os-elon-musk · session_016WV4czsTwiYB5WxgWqEVcu L1 verdict (L1-a): ACCEPT at head Gates on this head: 38 success, 18 expected skip, 0 unexpected skip, 0 pending. What I checked (holds):
Note (no action owed): Landing: not governed (no Generated by Claude Code |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1PJ4isQ3eD7Fk1fnF Served-tier: TIER_DEFAULT Contract review — PASS at beadd87 (delta)Seat delta read (2026-11-20T06:39Z): |
|
repo:objectstack#4 · os-elon-musk · session_016WV4d1k1GRsQbF3vCPKxhz Landing: ready + auto-merge at
|
Requested by Elon · project thread
Fixes #35633
Clause-②: yes — widening: four new exported symbols on the published
@objectstack/mcpbarrel (packageDocAnswerRule,packageDocToolsServed,definitionReaderOf,DEFINITION_READER_TOOL_NAMES); nothing removed or refused. Seat runs a contract read before ready.Metadata-protocol: none
维护者速读
What changes
packages/mcp/src/mcp-server-runtime.ts:packageDocAnswerRule(definitionReader?)is now exported (its parameter became optional; same text). The reader pick moves into an exported pure helperdefinitionReaderOf(toolNames: Iterable<string>)over the now-exportedDEFINITION_READER_TOOL_NAMES; the module-localdefinitionReaderServedcalls it, so the open server's pick is unchanged.packages/mcp/src/index.ts: the barrel re-exportspackageDocAnswerRule,definitionReaderOf,DEFINITION_READER_TOOL_NAMES(from the runtime module) andpackageDocToolsServed(frommcp-http-tools.ts, which this diff does not edit, so it stays apart from fix(mcp): slim the open door's tools/list; the served SKILL.md carries the teaching and names validate_expression's variables #35682's round on that file).packageDocToolsServed(bridge, { grantedScopes })is true and namesdefinitionReaderOf(<tool names its connection lists>); no access to the open server's internals is needed.packages/mcp/src/package-doc-answer-rule-barrel-35633.test.tsimports from./index.js: the four exports exist, and for each reader a connection lists (none,get_metadata_item,describe_metadata) the open server's defaultinitializetext holdspackageDocAnswerRule(reader)as one whole paragraph..changeset/35633-mcp-doc-answer-rule-export.md:'@objectstack/mcp': patch(Metadata-protocolnonegradespatchunder ruling A incheck-changeset-no-major.mjs).No existing pin is flipped.
Verification
Two-minute check:
pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/package-doc-answer-rule-barrel-35633.test.tsshould printTests 2 passed (2).Read first (by risk):
packages/mcp/src/mcp-server-runtime.ts(thedefinitionReaderServedhunk: same pick, now viadefinitionReaderOf), thenpackages/mcp/src/index.ts.Local runs at a32f3e2 (code) and 01e6d0f (head; changeset line only)
pnpm --filter '@objectstack/mcp^...' buildunder the verify lock:VERDICT command-exit 0.pnpm --filter @objectstack/mcp test:Test Files 80 passed (80),Tests 1441 passed (1441);typecheck(tsc +check:test-typecheck): OK;build: exit 0,dist/index.d.tsnames the new exports.node scripts/pm/dispatch-gates.mjs --commandsderived list (64 commands) run locally: 67 derived, 65 exit 0, 2 NOT MEASURED (exit 3, prerequisite refused:check-plugin-teardown-shape --self-testneeds an unshallowed clone;check:dual-build-cjs-loadsneeds every package built), 0 unrun;dispatch-gates --ranreconciliation67 derived famil(ies) accounted for. Both NOT MEASURED families run in CI.Clause-②:line copied verbatim from the claim) the changeset-reading families re-run, each exit 0:check-adr-0087-registration,check-changeset-no-major,check-empty-changeset,check:nul-bytes,check-issue-citations,check-closing-keyword-parity.node scripts/pm/overlap-check.mjs --branch=claude/area-a4C-35633:VERDICT clean exit 0.Acceptance notes
definitionReaderServed";definitionReaderServedtakes the open server's authoring injection, so the export is the pure name-list formdefinitionReaderOfinstead, whichdefinitionReaderServednow calls (one pick).DEFINITION_READER_TOOL_NAMESlives inmcp-server-runtime.ts(in the claim's surface).🤖 Generated with Claude Code