docs: bring comments and docs in line with -32021 and the Skills registry entry (#2374 review)
Round 2 found text the PR's own changes made stale: the fixture's option doc, handler summary and repro step still promised -32601 on modern; the core skills.ts header still said Skills must never be in ADVERTISABLE_EXTENSIONS; the listSkills and getSkillResult comments still said the codec validates none of a skills result, or that the result arrives as the server sent it; and two tests and a docs step still described Tasks as the only registry extension. The backfill test also now asserts the Skills declaration is on by default. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q3RsrgCxVoFPokLB4vAkxi Signed-off-by: cliffhall <cliff@futurescale.com>
This commit is contained in:
parent
07411047cc
commit
2243849711
3 changed files with 49 additions and 28 deletions
|
|
@ -150,8 +150,9 @@ describe("InspectorClient skills methods (#2234)", () => {
|
|||
|
||||
it("requires the modern list envelope on a modern connection", async () => {
|
||||
// SEP-2640: "In protocol versions 2026-07-28 and later, the result also
|
||||
// carries … `ttlMs` and `cacheScope`." Nothing else validates it —
|
||||
// `skills/*` is consumer-owned, so the SDK codec never sees it.
|
||||
// carries … `ttlMs` and `cacheScope`." The SDK codec checks and removes
|
||||
// `resultType` on every modern result, but for a consumer-owned method it
|
||||
// checks neither caching attribute — so this schema is what does.
|
||||
const client = makeClient();
|
||||
internals(client).protocolEra = "modern";
|
||||
stubRequest(client, { skills: [] });
|
||||
|
|
|
|||
|
|
@ -117,8 +117,9 @@ describe("advertised-extension gating (#1739)", () => {
|
|||
|
||||
it("omits the gated tool when the extension is not advertised", async () => {
|
||||
const started = await startGatedServer();
|
||||
// Disable the only registry extension → the client sends no extensions,
|
||||
// so the server never enables the gated tool.
|
||||
// Disable the Tasks extension → the client still sends the other registry
|
||||
// extensions (MCP Apps UI, Skills), but not the one this tool is gated on,
|
||||
// so the server never enables it.
|
||||
const connected = await connect(started.url, {
|
||||
[TASKS_EXTENSION_KEY]: false,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -880,10 +880,11 @@ describe("InspectorClient coverage backfill", () => {
|
|||
});
|
||||
|
||||
describe("constructor capability branches and createReceiverTask options", () => {
|
||||
it("advertises only the tasks extension when no other capabilities are set", async () => {
|
||||
it("still advertises the registry extensions when no other capabilities are set", async () => {
|
||||
// sample:false + elicit:false + no roots + no receiverTasks → the only
|
||||
// advertised capability is the always-on Tasks extension (#1631), so
|
||||
// `capabilities` is non-empty and is always attached.
|
||||
// advertised capabilities are the default-on registry extensions (Tasks
|
||||
// since #1631, Skills since #2373), so `capabilities` is non-empty and
|
||||
// is always attached.
|
||||
client = new InspectorClient(
|
||||
{
|
||||
type: "stdio",
|
||||
|
|
@ -901,6 +902,7 @@ describe("InspectorClient coverage backfill", () => {
|
|||
expect(caps.elicitation).toBeUndefined();
|
||||
expect(caps.roots).toBeUndefined();
|
||||
expect(caps.extensions?.["io.modelcontextprotocol/tasks"]).toBeDefined();
|
||||
expect(caps.extensions?.["io.modelcontextprotocol/skills"]).toBeDefined();
|
||||
await client.connect();
|
||||
expect(client.getStatus()).toBe("connected");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue