agent-trellis 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +29 -4
- package/dist/commands/mcp.d.ts +60 -0
- package/dist/commands/mcp.js +105 -1
- package/dist/commands/skill.d.ts +45 -1
- package/dist/commands/skill.js +83 -2
- package/dist/lib/mcpRuntime.d.ts +6 -0
- package/dist/lib/mcpRuntime.js +52 -1
- package/dist/lib/scopeSelection.d.ts +36 -0
- package/dist/lib/scopeSelection.js +65 -0
- package/dist/lib/skillManifest.d.ts +65 -0
- package/dist/lib/skillManifest.js +203 -0
- package/dist/lib/skillProvider.d.ts +20 -0
- package/dist/lib/skillProvider.js +61 -1
- package/dist/pi-bridge/bundle.js +632 -632
- package/docs/skills-over-mcp.md +79 -0
- package/package.json +2 -2
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Skills over MCP — what Trellis serves, and what it does not claim
|
|
2
|
+
|
|
3
|
+
The MCP Skills extension (`io.modelcontextprotocol/skills`, SEP-2640, Final)
|
|
4
|
+
defines how a server publishes Agent Skills through the Resources primitive.
|
|
5
|
+
Trellis's runtime serves its canonical skills in that shape. This page records
|
|
6
|
+
the exact behavior, including what is deliberately *not* done.
|
|
7
|
+
|
|
8
|
+
## What is served
|
|
9
|
+
|
|
10
|
+
For each canonical skill in the requesting agent's scope:
|
|
11
|
+
|
|
12
|
+
- `skill://<name>/SKILL.md` and every supporting file at
|
|
13
|
+
`skill://<name>/<relative-path>`, through `resources/list` and
|
|
14
|
+
`resources/read`.
|
|
15
|
+
- `skills/list` and `skills/get`, returning the specified entry: the skill's
|
|
16
|
+
`uri`, its frontmatter verbatim, and a complete manifest of
|
|
17
|
+
`{ uri, digest, size }` per file, with `resultType`, `ttlMs` and `cacheScope`.
|
|
18
|
+
`cacheScope` is `private` because the catalog differs per agent.
|
|
19
|
+
|
|
20
|
+
The existing surface is unchanged: `trellis.skills.search|read|read_file` and
|
|
21
|
+
`trellis://skills/<name>/SKILL.md` keep working exactly as before. The
|
|
22
|
+
`skill://` view is a second, additive view of the same data.
|
|
23
|
+
|
|
24
|
+
## The manifest is computed from the bytes served
|
|
25
|
+
|
|
26
|
+
`digest` is `sha256:` plus 64 lowercase hex characters of the raw bytes;
|
|
27
|
+
`size` is their length. The same reader produces the manifest and the
|
|
28
|
+
`resources/read` response, so they cannot disagree. Invalid UTF-8 is returned as
|
|
29
|
+
a base64 `blob` rather than lossy `text`, so the bytes a host verifies are the
|
|
30
|
+
bytes that were hashed.
|
|
31
|
+
|
|
32
|
+
A file the reader refuses — secret-shaped path, hidden file or directory,
|
|
33
|
+
`node_modules`, anything resolving outside the skill root, oversized — is absent
|
|
34
|
+
from the manifest and unreadable, both. A skill with more than 512 files or
|
|
35
|
+
16 MiB is omitted whole and reported on stderr, never published with a partial
|
|
36
|
+
manifest.
|
|
37
|
+
|
|
38
|
+
A skill is served under `skill://` only when its directory name equals its
|
|
39
|
+
frontmatter `name`, that name is a valid Agent Skills name (lowercase letters,
|
|
40
|
+
digits, single hyphens), and it has a non-empty `description`. Otherwise it is
|
|
41
|
+
omitted and the reason is reported once. It stays reachable through the existing
|
|
42
|
+
tools.
|
|
43
|
+
|
|
44
|
+
## A digest is consistency, not trust
|
|
45
|
+
|
|
46
|
+
The extension is explicit that digests are unsigned and that an intermediary can
|
|
47
|
+
rewrite entry and content together. A matching digest tells a host the bytes
|
|
48
|
+
match the manifest; it says nothing about whether the content is safe. Nothing in
|
|
49
|
+
Trellis treats a match as an authorization.
|
|
50
|
+
|
|
51
|
+
## The extension is not declared yet
|
|
52
|
+
|
|
53
|
+
The extension is declared through `server/discover`, introduced with protocol
|
|
54
|
+
revision 2026-07-28. The MCP SDK Trellis uses speaks at most 2025-11-25 and has
|
|
55
|
+
neither `server/discover` nor `skills/*`, and the specification defines no
|
|
56
|
+
declaration for the `initialize` handshake. Declaring it in another field would
|
|
57
|
+
invent a protocol, and a conforming client only issues `skills/list` after
|
|
58
|
+
observing a declaration anyway.
|
|
59
|
+
|
|
60
|
+
So on today's SDK the runtime declares nothing, answers `skills/list` and
|
|
61
|
+
`skills/get` through the SDK's fallback for unregistered methods, and serves
|
|
62
|
+
`skill://` as ordinary resources — which the specification expressly allows. Once
|
|
63
|
+
the SDK exposes `server/discover`, the declaration is a one-place change. Any other
|
|
64
|
+
unknown method still gets JSON-RPC `-32601`.
|
|
65
|
+
|
|
66
|
+
## Relaying skills from upstream servers is not implemented
|
|
67
|
+
|
|
68
|
+
Today an upstream server's skills are not relayed — the gateway backend
|
|
69
|
+
aggregates tools only. When a change adds that, it must:
|
|
70
|
+
|
|
71
|
+
- identify a skill by (upstream label, URI) together, never by URI alone, with a
|
|
72
|
+
namespace per upstream;
|
|
73
|
+
- never let an upstream skill shadow a canonical skill or another upstream's;
|
|
74
|
+
- bind reads to the originating upstream, with no cross-upstream reads;
|
|
75
|
+
- pass the upstream manifest through unchanged or re-derive it from the relayed
|
|
76
|
+
bytes — never pair an upstream digest with different bytes;
|
|
77
|
+
- not write an upstream skill into `~/.trellis/skills` automatically. The
|
|
78
|
+
specification requires per-skill user approval before such content is used, and
|
|
79
|
+
materializing it would bypass that.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-trellis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "A unified Code Agent Runtime for Skills, MCP, Memory, and shared instructions across Claude Code, Codex, Kiro, pi, Kimi Code, and ZCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Paul Leo",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"pretest": "node scripts/build-pi-bridge.mjs",
|
|
35
35
|
"test": "tsx --test \"test/unit/**/*.test.ts\"",
|
|
36
36
|
"verify-pack": "node scripts/verify-pack.mjs",
|
|
37
|
-
"prepublishOnly": "npm run typecheck && npm run build && npm test
|
|
37
|
+
"prepublishOnly": "npm run typecheck && npm run build && npm test"
|
|
38
38
|
},
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=20"
|