skills: add SEP-2640 protocol support - #1238
Conversation
adc1ddf to
ca89d93
Compare
|
Woooot great to see this @sambhav. I ran the SEP-2640 conformance scenarios against this branch (conformance PR 330, the traceability extraction and server scenarios Il share soon for the skills extension). 41 checks, 0 failures.
Repro, pointing a minimal Got three tiny notes (none blocking): 1. 2. Two untestable 3. Possible doc gap dueto needing flags against this branch. The runner defaults to the draft stateless wire. here it asserts |
60744e4 to
36000a2
Compare
|
Thanks for running the SEP scenarios. The PR is now split so this one contains only the generic protocol layer. I addressed note 1 in the latest revision: skills/list now omits ttlMs and cacheScope before protocol version 2026-07-28, with regression coverage. Notes 2 and 3 make sense and do not require changes in this generic layer; the filesystem metadata behavior and usage notes will remain explicit in the follow-up helper PR. |
36000a2 to
db8cd34
Compare
|
I reran conformance PR 330 locally against the split filesystem helper. It caught a nested YAML mapping normalization bug ( |
|
@guglielmo-san 🙏 this is ready. There is another PR stacked on top which provides a neater abstraction and utility for skills with filesystems (#1240). Would appreciate it if we can land this one first and the other one as a quick follow. |
Summary
Add generic Go SDK support for accepted SEP-2640, allowing applications to serve and consume skills through typed APIs.
This includes:
skills/list,skills/get, and optionalresources/directory/readclients and handlers."dynamic"marker.Review order
This is PR 1 of 2 and can be reviewed and merged independently.
The optional filesystem provider is split into draft #1240. Its helper-only diff is available at sambhav/go-sdk#1. After this PR merges, #1240 can be rebased onto
mainand marked ready.Filesystem discovery, hashing, caching, and refresh policy belong to that follow-up.
Server usage
Handlers run when requests arrive, so applications can serve changing catalogs. Resource content is registered separately through
Server.AddResourceorServer.AddResourceTemplate.DynamicResources()means a complete manifest with stable digests is unavailable. A catalog that changes over time can still return complete static manifests.Client usage
ReadDirectoryandDirectoryEntriesexpose the optional directory capability. Content remains readable throughClientSession.ReadResource.Compatibility and dependencies
The core addition is
(*Server).AddExtension, which lets extension packages advertise capability settings after construction without mutating caller-owned capabilities.Existing resource API signatures remain unchanged. This PR uses existing resource registration and template dispatch; #1240 supplies live filesystem enumeration through existing middleware.
skills/listemits SEP-2549 cache fields only for protocol2026-07-28and later. Older connections omitttlMsandcacheScope, with regression coverage for serialization.Adds
gopkg.in/yaml.v3for parsing and comparing YAML frontmatter. No dependency type appears in the public API.Conformance and validation
Validated on 2026-09-06 using conformance #330 at
fa8aaec3611e387249da6adc826b02dd77372a3e.The following results cover the combined #1238 + #1240 stack at
a33c199eead5817160581ac834fb0e11e7e0a390. The fixture includes multiple and nested skills, supporting directories, an ordinary registered resource, and page size 1.Totals include each scenario’s
wire-schema-validcheck. Both resource metadata SHOULD checks are exercised through #1240’s live resource listing.The sole legacy warning is a conformance-harness false positive:
sep-2640-skills-list-cache-attributeswarns about omitted cache fields without checking the effective protocol version. Omission is correct on2025-11-25. The harness should report this requirement asSKIPPEDon older versions and enforce it on2026-07-28and later.All upstream workflows passed on the tested helper commit: Test, Docs Check, Conformance Tests, and CodeQL. Local skills race tests, vet, and build also passed.
For legacy conformance runs, use
--spec-version 2025-11-25 --force. The modern fixture usesStreamableHTTPOptions{Stateless: true}.