feat(providers): link command mentions to backing files where no native channel exists - #1765
Merged
Merged
Conversation
…ve channel exists Command mentions now carry an optional path through contracts, composer, and persistence (display stays /name). Providers that lack a native invocation channel rewrite the mention to a [name](path) link so the agent can locate the file itself: Codex when the capability identity no longer resolves in the catalog, and Cursor for all command/skill mentions. Codex structured skill parts, custom prompt expansion, and plugin:// mentions keep their native channels, as do Devin, Claude, and Copilot.
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.
What
Command mentions now carry an optional
pathend to end: contract schema, composer insert sites, persistence, and provider mappers. Composer display and stored transcript text stay/name/@nameunchanged.Per provider, native channels stay native; the
[/name](path)link is emitted only where the provider would otherwise get inert text:{"type":"skill", name, path}input parts, client-sideprompts:expansion, andplugin://mention parts are unchanged. When a command mention'scapabilityIdentityno longer resolves in the catalog (skill removed or renamed between pick and send), the text becomes[/name](path) argsso the agent can locate the file itself.[/name](path)viarewriteCursorCommandMentionsAsLinks, using original mention ranges (multi-mention safe); pathless or stale mentions pass through unchanged. The injected catalog now carries backing paths.Verified: web slash-command tests (60), Codex provider first-turn tests (50), mention schema and Cursor prompt suites. Live on fixture-repo: a
/adhdcomposer pick reached Codex as a native skill part plus$adhdtext and the skill ran; a crafted stale-identity mention arrived as[/e2e-link-probe](C:\...\SKILL.md) argstext and the agent read the linked file itself.Why
Slash-command delivery depended on each provider noticing a bare
/namein prompt text. On ACP-backed flows (Devin, Codex) that silently misses, leaving the agent with an unexplained token and no file to act on. A Markdown link to the backing SKILL.md makes the invocation self-describing exactly where no native channel exists, without downgrading the providers that already resolve commands natively.UI Changes
No visual change: the composer still renders
/namechips and persists/nametext. Screenshots show the live verification run: the/adhdmention in the composer and the sent message with the skill chip while the Codex turn executes.Config Changes
None.
Review Notes
cursor-agentCLI not installed); the rewrite is unit-tested including multi-mention offsets and stale-range passthrough.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.