Repository navigation
Conversation
The kit names each tool {id}_{name}. The schemas, toolsAreOwn, the app
host program and the widget bridge accept {id}_ and the old {id}__.
Kit 0.23.0, apphost 0.5.0, widget 0.5.0.
Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212
The cli bundles the released kit, so its check names tools in the old form. On a kit change the template job now runs the candidate's check. The widget README note moves below its code block. Claude-Session: https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The kit names each MCP tool
{id}__{name}, with two underscores. The name must become{id}_{name}. Every rule that reads a tool name knows only the old form, so one extension on the new kit would show as down on a host with an older reader.Change
prefixed()inpackages/extension/src/mcp/tools.tsgives{id}_{name}. The served list, the record, the discovery document and the generated{id}.mcpc.jsonfollow it.PrefixedToolNameSchema(manifest/primitives.schema.ts), used by the record and discovery schemas.extension-discovery,extension-record,host-document.toolsAreOwn(discovery/discovery.schema.ts), through the newownsTool(id, name). It guards the discovery document, the record and each entry of the host document.combineHostandhostDocumentOf), so it has no rule of its own. It ships as@agentage/apphost0.5.0 on kit~0.23.0.packages/widget/src/host/bridge.ts): the same rule, copied, because the widget does not depend on the kit.tools/callmatches only the name that the kit serves. A part on this kit answers{id}_{name}and refuses a call of{id}__{name}. No alias exists.extensionandwidget, and the names intemplate/.@agentage/extension0.23.0,@agentage/apphost0.5.0,@agentage/widget0.5.0. CI refuses a version-only PR, so the bumps are here. This PR makes no tag and no release.Template verify and checkjob ranagentage extension checkfrom the cli, which bundles the released kit. On a kit change it now runs the check of the candidate kit (scripts/check-candidate.mjs), as theupstep already does.The rule that keeps one underscore unambiguous
An id is
[a-z][a-z0-9-]*: it holds no underscore. A tool's own name starts with a letter. So the id of a served name is the text before the first underscore, and only one split exists.ownsTool(id, name)is true only whennamestarts withidand the rest is one or two underscores, then a letter. Thusadoes not owna-b_x(the rest starts with-), andprobedoes not ownprobex_echo. The old form cannot collide with the new one:a__xread in the new form would be the tool_x, which the registry refuses.packages/extension/src/manifest/tool-name.test.tspins the rule: both forms, a longer id, a hyphen id, three underscores, an id with an underscore, a tool name that starts with an underscore.How verified
npm run verifyat the root is green.combineHostruns one answer of each form, the app host document lists both forms and puts a foreign tool down, and the bridge calls both forms and refuses the others.examplesbranch of the same name (probe_echo).Known red check
Probe local gate on this kitruns a gate suite that still expectsprobe__echo. It stays red until that suite accepts both forms. This PR stays in draft until then.What the reviewer must check
git grep -n "__" -- packages templatehas tool name hits only in the both-form rules and their tests. The other hits are cookie prefixes and test hooks.tools/calldecision: no alias for the old name on a new kit.template/has the new names but still pins the released kit and widget. Until those pins move, a new extension made from the template serves{id}__echo, so itsextension checkand its widget call fail. A PR that touches onlytemplate/meets the same case in CI.https://claude.ai/code/session_01XQkodgygL4W8UcLQDwC212