From a75defbaa0dc2c90ca0896dd99467e33f9e95fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=BE=D0=B1=D0=BE=D1=82?= Date: Wed, 18 Nov 2026 20:34:33 +0100 Subject: [PATCH] feat: old tool names stay callable behind two doors; the Mcp-Name trap (0.33.2) Co-Authored-By: Claude Opus 5.5 (1M context) --- .claude-plugin/marketplace.json | 2 +- CHANGELOG.md | 12 ++++++++++++ SKILL-CARD.md | 2 +- docs/HANDOFF.md | 7 +++++++ docs/evidence/verification.md | 9 +++++++++ package.json | 2 +- plugins/agent-stack/.claude-plugin/plugin.json | 2 +- .../agent-stack/skills/agent-interop/SKILL.md | 2 +- .../agent-interop/references/mcp-two-doors.md | 17 +++++++++++++---- test/audit_regressions/mcp-two-doors.py | 4 ++-- 10 files changed, 48 insertions(+), 11 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 2e5bb86..24866fd 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -12,7 +12,7 @@ "displayName": "Agent Stack", "source": "./plugins/agent-stack", "description": "Four skills: agent-orchestrator — tool-calling loops, pipelines with checkpoints, provider routing with fallback, memory architecture, plus the wallet side of reselling LLM access; agent-evals — run/trace/thread evals, LLM judges, and fixtures grown from production; agent-interop — MCP servers and clients, A2A agent cards, the MCP Registry, and gateways; agent-harness — system prompts, tool shaping, workflow-vs-agent, and auditing an agent system.", - "version": "0.33.1", + "version": "0.33.2", "author": { "name": "ssheleg", "url": "https://x.com/sshlg93" diff --git a/CHANGELOG.md b/CHANGELOG.md index d71a265..1b56fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## v0.33.2: old tool names stay callable; the `Mcp-Name` trap + +- **agent-interop `mcp-two-doors.md`**, "Moving an existing server": an old tool name leaves + `tools/list` in the same release, recorded `retired` with its date, and stays callable through + `tools/call` as a deprecated alias; it is no longer removed after one release. The agents + database decided this under its R28 (shipped names are only added), board thread 1c1524e4, + 2026-11-18. Rule one in SKILL.md and the conformance checklist follow. +- **A new trap**: `execute` forwarding its own `Mcp-Name: execute` header to the operation's + handler is refused 400 by an MCP `2026-07-28` transport check; test the doors over HTTP with + real headers (seo-content-agent TRAP-587). +- `docs/evidence/verification.md` heads with v0.33.2 in the same release, so the hub can pin it. + ## v0.33.1: the verification ledger names the shipped version - `docs/evidence/verification.md` gains the v0.33.1 candidate, which carries v0.33.0's two-door diff --git a/SKILL-CARD.md b/SKILL-CARD.md index 370824b..4328474 100644 --- a/SKILL-CARD.md +++ b/SKILL-CARD.md @@ -5,7 +5,7 @@ | Field | Value | |---|---| | Pack | `agent-stack` | -| Version | `0.33.1` | +| Version | `0.33.2` | | Skills | `agent-orchestrator`, `agent-evals`, `agent-interop`, `agent-harness` | | License | MIT | | Source | https://github.com/ssheleg/agent-stack | diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 2a01841..8cf690b 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -1,3 +1,10 @@ +## v0.33.2: old tool names stay callable (2026-11-18) + +- **Done.** `mcp-two-doors.md` step 3 and the checklist follow the agents database's R28 + decision (board thread 1c1524e4); the `Mcp-Name` header trap; SKILL.md Rule one; regression + test; the ledger row in the same release. +- **Next task.** After release: the sshlg-skills pin to 0.33.2. + ## v0.33.1: ledger records the shipped version (2026-11-18) - **Done.** The v0.33.1 row in `docs/evidence/verification.md`; versions 0.33.1. The hub's pin of diff --git a/docs/evidence/verification.md b/docs/evidence/verification.md index d6e26d4..83e03b0 100644 --- a/docs/evidence/verification.md +++ b/docs/evidence/verification.md @@ -10,6 +10,15 @@ This file exists because its absence read as zero exposure. `sshlg-skills` board --- +## Release candidate: v0.33.2 (2026-11-18) + +The two-door doctrine follows the agents database's decision on R28 (shipped names are only +added): an old tool name leaves `tools/list` as `retired` and stays callable as an alias, not +removed after one release; and a new trap, `execute` forwarding its own `Mcp-Name` header +(seo-content-agent TRAP-587). Evidence: the repository gate exits 0 on the candidate tree, +`test/audit_regressions/mcp-two-doors.py` included; the PR CI run and the tag release run are +named in docs/HANDOFF.md. + ## Release candidate: v0.33.1 (2026-11-18) Records the shipped version in this ledger, which the sshlg-skills validator's member-ledger diff --git a/package.json b/package.json index a5ce5c2..f464cdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ssheleg/agent-stack", - "version": "0.33.1", + "version": "0.33.2", "scripts": { "test": "python3 test/validate.py && python3 test/family_gate.py && python3 test/family_gate.py --self-test && python3 test/plant_guard_test.py && python3 test/member_owner_gates_test.py && python3 test/reap_own_test.py && node test/installer_test.js && npm run test:audit", "test:audit": "for t in test/audit_regressions/*.py; do python3 \"$t\" || exit 1; done" diff --git a/plugins/agent-stack/.claude-plugin/plugin.json b/plugins/agent-stack/.claude-plugin/plugin.json index 125f151..294df97 100644 --- a/plugins/agent-stack/.claude-plugin/plugin.json +++ b/plugins/agent-stack/.claude-plugin/plugin.json @@ -3,7 +3,7 @@ "name": "agent-stack", "displayName": "Agent Stack", "description": "Four skills: agent-orchestrator — tool-calling loops, pipelines with checkpoints, provider routing with fallback, memory architecture, plus the wallet side of reselling LLM access; agent-evals — run/trace/thread evals, LLM judges, and fixtures grown from production; agent-interop — MCP servers and clients, A2A agent cards, the MCP Registry, and gateways; agent-harness — system prompts, tool shaping, workflow-vs-agent, and auditing an agent system.", - "version": "0.33.1", + "version": "0.33.2", "author": { "name": "ssheleg", "url": "https://x.com/sshlg93" diff --git a/plugins/agent-stack/skills/agent-interop/SKILL.md b/plugins/agent-stack/skills/agent-interop/SKILL.md index 9ad0ef4..85cecfa 100644 --- a/plugins/agent-stack/skills/agent-interop/SKILL.md +++ b/plugins/agent-stack/skills/agent-interop/SKILL.md @@ -60,7 +60,7 @@ then check whether a newer one exists. Every entry in the link map below is fetc words, each with its schema, effect and gate) and `execute` (run one by name through the same gate, idempotency and audit as the interface). Nothing else, unless a measured case needs a call to skip `search`: at most three such tools, each recorded with its measurement. Old tool -names keep working for one release while callers move. Data rooms first. Contract, migration +names leave `tools/list` as `retired` and stay callable as aliases. Data rooms first. Contract, migration and tests: `references/mcp-two-doors.md`. --- diff --git a/plugins/agent-stack/skills/agent-interop/references/mcp-two-doors.md b/plugins/agent-stack/skills/agent-interop/references/mcp-two-doors.md index d153eaf..69c5526 100644 --- a/plugins/agent-stack/skills/agent-interop/references/mcp-two-doors.md +++ b/plugins/agent-stack/skills/agent-interop/references/mcp-two-doors.md @@ -125,9 +125,12 @@ with that contract recorded as the reason, until the contract lets them fold int inventory is the catalogue. Add the interface's actions missing from it (AN-3). 2. **Serve both doors** from that catalogue; `tools/list` answers only `search`, `execute` and recorded exceptions. -3. **One release of aliases.** A `tools/call` by an old tool name still runs its operation - through `execute`'s path and marks the result deprecated (`_meta` and a `deprecated` - field naming `execute` and the sunset date). The next release removes the aliases. +3. **Old names leave the list, never the wire.** In the same release an old tool name leaves + `tools/list` and is recorded as `retired` with its date (shipped names are only added, + agents database R28); a `tools/call` by it still runs its operation through `execute`'s + path and marks the result deprecated (`_meta` and a `deprecated` field naming `execute` + and the sunset date). The alias costs no context and breaks no caller, so it stays; the + sunset date only tells callers to move. 4. **Move the callers.** Grep skills, prompts, docs, evals and other agents' code for the old tool names; change them in the same release or file a row with each owner. 5. **Snapshot and tests** below; the change is `breaking` for `tools/list` and `none` for the @@ -152,7 +155,8 @@ In the server's own suite, against a real client over the shipped transport: - [ ] `search` pages (`limit`, `nextCursor`) and hides operations outside the caller's scope. - [ ] `execute` answers `unknown-operation`, `invalid-arguments` and `idempotency-required` typed; a gated operation refuses with the same gate the interface shows. -- [ ] In the migration release, every old tool name still runs and is marked deprecated. +- [ ] Every old tool name is absent from `tools/list`, still runs through `tools/call` and is + marked deprecated and `retired` with its date. ## Traps @@ -164,5 +168,10 @@ In the server's own suite, against a real client over the shipped transport: bypass, not parity. - **Renaming while migrating.** Keep names and schemas; change the shape of the surface and the vocabulary in two different releases. +- **`execute` forwarding its own transport headers.** An `execute` that calls the operation's + handler with its own request headers sends `Mcp-Name: execute`, and a transport check under + MCP `2026-07-28` refuses the operation with 400. The internal call carries the operation's + name. Tests without headers do not see it; test the doors over HTTP with real headers + (seo-content-agent TRAP-587, 2026-11-18). - **Exceptions that grow.** A fourth "just this one" direct tool, or one without its measurement, is the drift the rule exists to stop. diff --git a/test/audit_regressions/mcp-two-doors.py b/test/audit_regressions/mcp-two-doors.py index 5ce05a5..36576e8 100644 --- a/test/audit_regressions/mcp-two-doors.py +++ b/test/audit_regressions/mcp-two-doors.py @@ -3,7 +3,7 @@ `agent-interop/references/mcp-two-doors.md` owns the rule: `tools/list` of a server the estate builds or runs answers `search` and `execute`, at most three measured exceptions, -old tool names alias for one release. What this file holds the pack to: +old tool names leave tools/list and stay callable (R28). What this file holds the pack to: * the reference exists, carries its load line and pin, and states the contract parts (the two tool names, the catalogue fields, the typed refusals, the exception cap, the @@ -55,7 +55,7 @@ def t_reference_states_the_contract(): assert re.search(r"^\*\*Spec pinned:\*\*.+· read \d{4}-\d{2}-\d{2}\s*$", text, re.M), "no pin" for part in ("`search`", "`execute`", '"inputSchema"', '"gate"', '"effect"', '"example"', "`unknown-operation`", "`invalid-arguments`", "`idempotency-required`", - "at most three", "One release of aliases", "## The contract snapshot", + "at most three", "Old names leave the list, never the wire", "`retired`", "Mcp-Name: execute", "## The contract snapshot", "## Conformance tests", "fabric.job.get"): assert part in text, f"missing {part}"