Repository navigation
Commit d3a829c
agent: MCP Skills extension (SEP-2640) client support
Client side of `io.modelcontextprotocol/skills`: a declaring server's
`skills/list` entries become `<server>:<name>` skills in a separate
`<available_skills origin="mcp">` block, loaded (size, digest and
frontmatter verified, never prefetched) through
`mcp__<server>__skill__read`, invocable as `/skill:<server>:<name>`, listed
by `get_commands`, re-listed on `ttlMs` expiry or list-changed, and cached
in the manifest. Activation of a model-chosen skill and code execution
while one is active need the user's approval (`run` denies unless
`--approve-mcp-skills`); state is per session and restored only from
host-authored transcript records.
Rebased onto MCP Events (#133): `tools/mcp_stdio.rs` is the one stdio
transport, and its `rescue`/`unwrap_rescued` is the one workaround for
rmcp's untagged-result bug (rust-sdk#1197), for events and skills results
alike. `tools/mcp_wire.rs` keeps only the streamable-HTTP client, which
applies the same `rescue` to `skills/*` JSON bodies and SSE events.
Rebased onto MCP Tasks (#130) too: every skills request (skills/list,
skills/get, resources/read) goes through `mcp::request_tracked`
(`track_call` under the calling session's host), so a nested request is
attributed or refused, never sent to a shared connection's own host. A
steered `/skill:` expands as its session (its command loop can answer);
a re-list or expansion between runs runs under a client-less host, so a
nested request is declined at once instead of stalling the prompt.
Round-3 fixes: a steer waiting behind a `/skill:` when its run is
cancelled is acked as not queued (the cancellation already dropped the
run's lanes), and an expansion that finished but was never queued
activates nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JimHGjsfk2Ktm5GxyZJKKk1 parent 43bebb6 commit d3a829c
23 files changed
Lines changed: 7250 additions & 193 deletions
File tree
- crates/agent
- src
- bin
- tools
- tests
- common
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
195 | 199 | | |
196 | 200 | | |
197 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
| |||
377 | 381 | | |
378 | 382 | | |
379 | 383 | | |
| 384 | + | |
380 | 385 | | |
381 | 386 | | |
382 | 387 | | |
| |||
0 commit comments