Skip to content

fix(mcp): initialize points at the served SKILL.md; run_action names the no_confirmation_service next step - #37355

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-35778-mcp-skill-pointer-refusal-hint
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-35778-mcp-skill-pointer-refusal-hint

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #35778

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:连接开放 MCP 入口的 AI 客户端,初始化时会被告知使用指南在哪里下载;执行需人工确认的业务动作被拒时,工具说明会告诉它由人在应用里完成。
  • 为什么做:上一轮把教学文字从工具说明挪进了使用指南,不读指南的客户端失去了指引,这里补回两句提示(属于"让自带 AI 的客户端在开放入口拿到受治理答案"这条主线)。
  • 出错会怎样:只是给 AI 读的提示文字,说错了 AI 可能找错地址或多问一句,不会改数据;可直接撤回。
  • 要你做什么:无。

What changes

Items 1 and 2 of #35778. Item 3 (optional slimming of list_datasets / query_dataset, the spec QueryDatasetInputSchema and the validate_expression variable descriptions) is not taken: the card marks it optional and measure-first, and it stays open on the card.

  1. packages/mcp/src/mcp-server-runtime.ts: the open door's default initialize text (DEFAULT_HTTP_INSTRUCTIONS) gains one sentence:
    Usage guide (SKILL.md): GET this endpoint's path plus /skill (by default /api/v1/mcp/skill).
    • Where it is true: the runtime dispatcher mounts GET PREFIX/mcp/skill beside PREFIX/mcp from the same domain list (packages/runtime/src/domains/mcp.ts createMcpDomains, mounted in dispatcher-plugin.ts with the same prefix, default /api/v1), behind the same isMcpServerEnabled() switch, answered by the same mcp service (renderSkill), and anonymous, so it holds for every grant. handleHttpRequest's only caller in this repo is that domain. The sentence is relative to the endpoint because the prefix is configurable.
    • Where it is not added: a host's per-request texts and a configured instructions stay whole (existing pins), and the stdio default names no URL, since a stdio server has no HTTP endpoint.
  2. packages/mcp/src/mcp-http-tools.ts: run_action's description gains one clause after the ACTION_CONFIRMATION_REQUIRED sentence:
    On details.reason "no_confirmation_service" a person performs it in the app: do not make the same change with another tool.

Byte deltas:

  • tools/list on the API-key surface (tools-list-weight-34689.test.ts): 36,613 to 36,739 bytes (+126); run_action description 1,228 to 1,352 (+124). The ceiling of 38,000 is unchanged and still holds.
  • Default initialize text: +93 bytes (a bare bridge answers 533 characters). The 4,096-character bound pin on the longest default text still passes.

Tests

  • New top-level describes in the existing harness files:
    • initialize-selection-rule-34686.test.ts: the pointer is in the first paragraph for five grants (no scope, data:read, data:write, metadata:write with an authoring injection, data:read with one).
    • mcp-action-confirmation-handoff-33690.test.ts: run_action's tools/list description carries the clause.
  • Ablations, one-off, via scripts/ablation-replace.mjs (anchor hit 1 to 0, restored blob equal to HEAD, git diff HEAD empty). The tests import the source, so no dist rebuild sits in the path:
    • pointer removed: the new initialize pin fails (1 failed, 14 passed);
    • clause removed: the new run_action pin fails (1 failed, 28 passed).

Acceptance notes

  • Not verified: a cloud host that calls handleHttpRequest from its own code and mounts the MCP endpoint without the runtime dispatcher. Such a host gets this default only when it injects no instructions of its own. If it serves no sibling /skill path, the sentence would not hold there; nothing in this repo is such a caller.

Verification

Two-minute check: pnpm --filter @objectstack/mcp exec vitest run src/initialize-selection-rule-34686.test.ts src/mcp-action-confirmation-handoff-33690.test.ts src/tools-list-weight-34689.test.ts. Expect 3 files passing, and a tools/list table line | run_action | 1352 | 884 | 2236 |.

Readings at e3c3ac4:

mcp build, typecheck, vitest (under os-verify-lock)
  • @objectstack/mcp... build: VERDICT command-exit 0.
  • pnpm --filter @objectstack/mcp typecheck, then the full vitest run --maxWorkers=2: VERDICT command-exit 0. Test Files 85 passed (85), Tests 1509 passed (1509). check:test-typecheck OK.
derived gate families
  • dispatch-gates --commands --repo objectstack-ai/objectstack: 68 families.
  • Results: 67 exit 0. check:dual-build-cjs-loads exit 3 (PREREQUISITE NOT MET: no whole-repo dist), so it is NOT MEASURED locally and left to CI.
  • --ran with exit codes: 68 derived, 67 run, 1 NOT-MEASURED, 0 UNRUN.
  • overlap-check: clean against origin/main.

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr

…the no_confirmation_service next step

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/mcp, touching 4 documentable anchor(s).

2 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/agents.mdx (via /api/v1/mcp/skill (route, a path literal in DEFAULT_HTTP_INSTRUCTIONS))
  • content/docs/ai/connect-mcp.mdx (via no_confirmation_service (literal, a string literal in registerActionTools), /api/v1/mcp/skill (route, a path literal in DEFAULT_HTTP_INSTRUCTIONS))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v18/18-6.mdx (via no_confirmation_service (literal, a string literal in registerActionTools))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 134b71dbb0409e1ae2561fb77effcb20f97b0d10 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 662aaefdeb623e36e5ae1e2f1feeb48cc73059b3 — the merge of head e3c3ac47a03a6b0c76ba9fa5228318e8634e031c into base 134b71dbb0409e1ae2561fb77effcb20f97b0d10, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 662aaefdeb623e36e5ae1e2f1feeb48cc73059b3 && git checkout 662aaefdeb623e36e5ae1e2f1feeb48cc73059b3
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 134b71dbb0409e1ae2561fb77effcb20f97b0d10 e3c3ac47a03a6b0c76ba9fa5228318e8634e031c && git checkout -B drift-repro 134b71dbb0409e1ae2561fb77effcb20f97b0d10 && git merge --no-ff e3c3ac47a03a6b0c76ba9fa5228318e8634e031c

node scripts/docs-audit/affected-docs.mjs --json 134b71dbb0409e1ae2561fb77effcb20f97b0d10

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 134b71dbb0409e1ae2561fb77effcb20f97b0d10 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr

席位核对 — ACCEPT · L1 · head e3c3ac47a03a6b0c76ba9fa5228318e8634e031c · 2026-11-25T22:14Z

Zone a4-A, card #35778 (items 1–2; item 3, optional slimming, not taken). Read from the PR's diff and check-runs, not from the dev report.

  1. Shape. 5 files, +62 / −1: mcp-server-runtime.ts (DEFAULT_HTTP_INSTRUCTIONS gains "Usage guide (SKILL.md): GET this endpoint's path plus /skill (by default /api/v1/mcp/skill)." — relative to the endpoint because the prefix is configurable; host-supplied and configured instructions untouched; stdio names no URL), mcp-http-tools.ts (run_action gains the door-neutral no_confirmation_service next step: a person performs it in the app, not the same change through another tool), two pins, a @objectstack/mcp patch changeset (Clause-②: no, Metadata-protocol: none).
  2. Against the card. Item 1: the pointer names the route the runtime dispatcher mounts beside /mcp (same domain list, same switch, anonymous). Item 2: restores the pre-fix(mcp): slim the open door's tools/list; the served SKILL.md carries the teaching and names validate_expression's variables #35682 hint and does not pre-empt MCP action doors: the no-confirmation-service refusal should tell an elicitation-less stdio client to use a client that supports confirmation #34325's stdio-only sentence. tools/list +126 B (36,739 under the 38,000 ceiling).
  3. Gates. Every check-run on this head completed success or an expected skip; none failed.
  4. Noted, not owed here. A host that mounts /mcp through its own code without /skill and injects no instructions would read a wrong pointer; recorded in the PR's Acceptance notes.
  5. Landing. Not governed (check-governed-merges), 63 changed lines ⇒ the zone lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr

Landing · head e3c3ac47a03a6b0c76ba9fa5228318e8634e031c · 2026-11-25T22:15Z

Probe Reading
check-governed-merges --pr 37355 NOT governed
landing-k --pr 37355 OK (K = 0)

State: L1 ACCEPT on this head (7176128903); every check-run green or expected skip. Ready and auto-merge in this stroke. On MERGED, #35778 closes by Fixes.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 22:16
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 80da086 Nov 25, 2026
54 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35778-mcp-skill-pointer-refusal-hint branch November 25, 2026 22:40
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
… that works on the door that asked (objectstack-ai#37367)

Fixes objectstack-ai#34325

Clause-②: yes (widening)
Metadata-protocol: none

## 维护者速读
- 用户能看到什么变化:AI
客户端调用需要人工确认的业务动作、而服务器没有挂起审批服务时,拒绝提示会按入口说清楚该怎么办:本地(stdio)连接且客户端不支持弹框确认时,提示换用支持确认的客户端;所有入口都提示由人在应用里完成,并且不要改用别的工具做同样的修改。
- 为什么做:属于「MCP 写数」主线;此前有 AI 读到「去应用里做」后改用直接改记录的工具绕过了确认,维护者已同意在提示里明确禁止。
- 出错会怎样:只改拒绝提示的文字,错误码、状态和返回字段都不变,不会改数据;对外接口只新增可选项,已有接入方不受影响;可直接撤回。
- 要你做什么:无。

## What changes

The `no_confirmation_service` refusal (`428
ACTION_CONFIRMATION_REQUIRED`) that the MCP `run_action` and
`resume_run` doors answer when a declared-gated action meets a host with
no pending-confirmation service now names the route that works on the
door that asked. The code, the status, `details` (including `reason`)
and the hand-off handed to a host's service are unchanged. No spec file
is touched.

Messages, measured through the real runtime bridge (`buildMcpBridge`) at
this head, for `archive_lead` on `crm_lead`:

- Before, every door (main 80da086): `Action 'archive_lead' on
'crm_lead' declares ai.requiresConfirmation: true, so a person confirms
it — nothing was run. This server has no pending-confirmation service to
ask them through, and a confirmation sent on the request does not count.
Perform the action in the app instead.`
- After, stdio door, client without `elicitation`: `... does not count.
A client that supports confirmation (MCP elicitation) is asked in place
on this server: use one to confirm it here. Otherwise a person performs
it in the app: do not make the same change with another tool.`
- After, Streamable HTTP door (and any caller that passes no door): `...
does not count. A person performs it in the app: do not make the same
change with another tool.`

The first sentence is the step-3 sentence of
`AI_ACTION_CONFIRMATION_CAPABILITY`. It is left out on Streamable HTTP,
which asks no client until objectstack-ai#34321, as ruling 6909391261 on objectstack-ai#33712 says.
The in-app clause on every door is the wording of comment 6966146204 on
this card. It matches the `run_action` description clause that objectstack-ai#37355
added.

How the refusal site knows the door: the MCP tools already decide per
call whether the client can be elicited
(`actionConfirmationElicitorFor`, from objectstack-ai#34318). A new
`actionCallDoorFor` in
`packages/mcp/src/action-confirmation-elicitation.ts` returns one of
three things:
- `door`, main's `McpActionCallDoor` (the elicitor), when the client can
be asked. The bridge is called with three arguments, as on main;
- `facts`, `{ elicitsCapableClients: true }`, when this server read the
client's `initialize` and can carry a request to it, but the client did
not advertise form-mode `elicitation` (the long-lived stdio server
today). The bridge is called as `(name, request, undefined, facts)`;
- nothing, when the server never read `initialize` (the per-request
Streamable HTTP server). The bridge is then called with two arguments,
as before.

The check is made on what the server can do, not on a transport name. If
the HTTP door starts to read `initialize` (objectstack-ai#34321), it gets the sentence
at the same time as the elicitation that makes it true.

The runtime bridge (`packages/runtime/src/domains/mcp.ts`) forwards the
flag through `invokeBusinessAction` / `confirmAdmittedAction`
(`action-dispatch.ts`) and `resumeActionRun` to
`handOffActionConfirmation(..., door)` (`action-execution.ts`). It
arrives as a separate argument, not on `ActionConfirmationHandOff`, so
the host's service never sees it.

Public surface of `@objectstack/mcp`, additive only (hence `Clause-②:
yes (widening)`):
- `McpActionCallDoor` is unchanged, and it is still passed only when the
client can be elicited;
- there is a new exported type `McpActionCallDoorFacts` (`{
elicitsCapableClients?: true }`);
- `McpActionBridge.runAction` and `resumeRun` gain an optional fourth
parameter `facts`.

A bridge written against main compiles unchanged. It ignores the fourth
argument and hands the call off as before, so only the refusal wording
differs on such a bridge.

## Tests

- `packages/runtime/src/action-confirmation-handoff-33690.test.ts`, new
describe `[objectstack-ai#34325]` (7 cases), run through the real bridge for both
tools. With the stdio door, the message carries the client sentence
followed by the in-app clause. With no door (HTTP), it carries the
in-app clause and never the client sentence. `details` are equal on both
doors. The flag never reaches the service's hand-off.
- `packages/mcp/src/mcp-action-confirmation-handoff-33690.test.ts`, new
describe `[objectstack-ai#34325]` (6 cases), for both tools:
- stdio with a client without `elicitation`: the bridge gets no door and
exactly `{ elicitsCapableClients: true }` as the fourth argument;
- stdio with a client that has the capability: main's door (the elicitor
alone), three arguments, no facts;
- Streamable HTTP after an `initialize` that advertised `elicitation`:
no door, two arguments.
- One existing objectstack-ai#33712 pin, "a client WITHOUT the capability", pinned
`door: undefined, argCount: 2` on stdio. The door is still `undefined`;
the pin now also reads `facts: { elicitsCapableClients: true }` and
`argCount: 4`. The intent is the same: the client is never asked and the
call is handed off. The Streamable HTTP pin is unchanged.
- Ablations, one-off, via `scripts/ablation-replace.mjs`: each anchor
went from 1 hit to 0, and each restore left the blob equal to HEAD with
an empty `git diff HEAD`. The tests import source through relative
paths, so no dist rebuild is on the path. All 7 went red:
  - A1, the client sentence switched off: runtime stdio x2 red.
- A2, the in-app clause reverted to today's wording: runtime stdio x2
and HTTP x2 red.
- A3, the bridge's forwarding of the flag deleted: runtime stdio x2 red.
- A4, `confirmAdmittedAction` stops passing it: runtime stdio
`run_action` red.
- A5, the resume path stops passing it: runtime stdio `resume_run` red.
- A6, `actionCallDoorFor` never returns the facts: mcp stdio x3 red (one
existing pin and two new ones).
- A7, the facts are set without a read `initialize`: mcp HTTP x3 red
(the existing objectstack-ai#33712 HTTP pin and two new ones).
- All seven re-run on head fa794d0 after the rework: same red sets,
every restore equal to HEAD.

## Acceptance notes

- An out-of-repo bridge built against main keeps compiling and behaving
as today. On a stdio client without `elicitation` its refusal keeps the
old wording until it reads `facts`. carrier: cloud (if cloud implements
that bridge).
- The spec's step-3 prose (`packages/spec/src/contracts/ai-service.ts`)
still describes one message with both routes. The HTTP door's omission
of the client route follows ruling 6909391261. The prose is left as it
is.

## Verification

Two-minute check: `pnpm --filter @objectstack/runtime exec vitest run
src/action-confirmation-handoff-33690.test.ts -t 34325`. Expect 7
passing, including `stdio, a client without elicitation (run_action)`
and `Streamable HTTP, no door (run_action)`.

Readings at fa794d0:

<details><summary>build, typecheck, vitest (under
os-verify-lock)</summary>

- `pnpm --filter '@objectstack/runtime^...' --filter
'@objectstack/mcp^...' build && mcp typecheck && runtime typecheck &&
both pin files`: VERDICT command-exit 0 (pins 53/53 and 34/34).
- `pnpm --filter @objectstack/mcp test`: MCP_EXIT=0, Test Files 85
passed (85), Tests 1515 passed (1515).
- `pnpm --filter @objectstack/runtime test`: RUNTIME_EXIT=0, Test Files
649 passed (649), Tests 12034 passed, 25 skipped (12059).
</details>

<details><summary>derived gate families</summary>

- `dispatch-gates --commands --repo objectstack-ai/objectstack`: 69
families.
- 68 exit 0, including `check-adr-0087-registration` and
`check-changeset-no-major` on the `yes (widening)` changeset.
`check:dual-build-cjs-loads` exit 3 (PREREQUISITE NOT MET: no whole-repo
dist), so it is NOT MEASURED locally and left to CI.
- `--ran` with exit codes: 69 derived, 68 run, 1 NOT-MEASURED, 0 UNRUN
(exit 0).
- `overlap-check`: clean against origin/main 98bda0a. No merge of
main was needed: main's 4 new commits do not touch `packages/mcp` or
`packages/runtime`.
</details>
---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QSeKYo86w1wqy2z2fMrryr

<!-- signed: repo:objectstack#4 · os-justin ·
session_01QSeKYo86w1wqy2z2fMrryr -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

review follow-ups of PR #35682: initialize points at /mcp/skill, run_action no_confirmation_service hint, remaining tools/list weight

2 participants