Skip to content

Commit b614ecc

Browse files
cliffhallclaude
andcommitted
fix: address Copilot round 1 on #5063
Drop the stale taskStore references from the testing skill, fix a stray asterisk in tasks.test.ts's header, and rename memory's DRAFT_07 schema constant to JSON_SCHEMA_2020_12 now that it holds the 2020-12 URI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent ccab68c commit b614ecc

3 files changed

Lines changed: 24 additions & 19 deletions

File tree

‎.claude/skills/testing/SKILL.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ per-session setup and teardown the server needs.
7272

7373
| Server | Factory | Harness | `connect(…)` takes |
7474
| --- | --- | --- | --- |
75-
| `everything` | `createServer()` in `server/index.ts`, returns `{ server, cleanup }` | `__tests__/harness.ts` | `{ capabilities, taskStore, setup, sessionId }`, all optional |
75+
| `everything` | `createServer()` in `server/index.ts`, returns `{ server, cleanup }` | `__tests__/harness.ts` | `{ capabilities, setup, sessionId }`, all optional |
7676
| `filesystem` | `createServer(allowedDirectories)` in `server.ts` | `__tests__/helpers.ts` | the allowed directories, then `{ capabilities, listRoots }` |
7777
| `memory` | `createServer(memoryFilePath)` in `index.ts` | `__tests__/helpers.ts` | the graph file's path (`makeTempGraph()` makes one) |
7878
| `sequentialthinking` | `createServer()` in `index.ts` | `__tests__/helpers.ts` | `{ disableThoughtLogging }`, defaulting to `"true"` |
@@ -123,12 +123,12 @@ What `everything`'s harness does that a hand-rolled connection would miss:
123123
next test. `connect()` sets a fresh `sessionId` on the server transport
124124
(`sessionId: null` keeps it undefined, as stdio does), and `close()` runs the
125125
server's `cleanup(sessionId)`, which also stops the timers `createServer()`
126-
starts (the roots sync, the task store).
126+
starts (the roots sync).
127127
- **Capabilities.** A tool `everything` registers in `registerConditionalTools`
128128
appears only when the client declares the matching capability: pass
129129
`capabilities` (`ALL_CAPABILITIES` declares every one), with `setup` to
130130
install the client's handlers for the requests the server sends back
131-
(sampling, elicitation, roots) and `taskStore` for the task-augmented ones.
131+
(sampling, elicitation, roots).
132132
- **Notifications.** `session.notifications` collects every notification no
133133
specific handler consumed; `ofMethod(notifications, method)` filters it.
134134

‎src/everything/__tests__/tasks.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
* capabilities and keeps its tasks in an `InMemoryTaskStore`.
1212
*
1313
* Every wait in these tools is a `setTimeout` (one-second stages and polls),
14-
* so the tests fake `setTimeout` and advance the clock. *
14+
* so the tests fake `setTimeout` and advance the clock.
15+
*
1516
* SDK v2 removed the experimental tasks layer these tools and tests were
1617
* built on (SEP-2663), so the three tools are gone and every test here is
1718
* skipped until Part 5 (#4852) re-implements them on the

‎src/memory/__tests__/tools.test.ts‎

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Client } from "@modelcontextprotocol/client";
88
import { call, connect, makeTempGraph, textOf } from "./helpers.js";
99
import type { Connection } from "./helpers.js";
1010

11-
const DRAFT_07 = "https://json-schema.org/draft/2020-12/schema";
11+
const JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
1212

1313
// JSON Schema fragments as the SDK emits them. Output schemas close every
1414
// object with additionalProperties: false; input schemas leave them open.
@@ -56,15 +56,15 @@ const graphOutputSchema = {
5656
relations: { type: "array", items: relationItem(true) },
5757
},
5858
required: ["entities", "relations"],
59-
$schema: DRAFT_07,
59+
$schema: JSON_SCHEMA_2020_12,
6060
additionalProperties: false,
6161
};
6262

6363
const statusOutputSchema = {
6464
type: "object",
6565
properties: { success: { type: "boolean" }, message: { type: "string" } },
6666
required: ["success", "message"],
67-
$schema: DRAFT_07,
67+
$schema: JSON_SCHEMA_2020_12,
6868
additionalProperties: false,
6969
};
7070

@@ -101,7 +101,7 @@ const expectedTools = [
101101
type: "object",
102102
properties: { entities: { type: "array", items: entityItem(false) } },
103103
required: ["entities"],
104-
$schema: DRAFT_07,
104+
$schema: JSON_SCHEMA_2020_12,
105105
},
106106
outputSchema: {
107107
type: "object",
@@ -110,7 +110,7 @@ const expectedTools = [
110110
skipped: { type: "array", items: { type: "string" } },
111111
},
112112
required: ["entities"],
113-
$schema: DRAFT_07,
113+
$schema: JSON_SCHEMA_2020_12,
114114
additionalProperties: false,
115115
},
116116
annotations: writeAnnotations,
@@ -125,13 +125,13 @@ const expectedTools = [
125125
type: "object",
126126
properties: { relations: { type: "array", items: relationItem(false) } },
127127
required: ["relations"],
128-
$schema: DRAFT_07,
128+
$schema: JSON_SCHEMA_2020_12,
129129
},
130130
outputSchema: {
131131
type: "object",
132132
properties: { relations: { type: "array", items: relationItem(true) } },
133133
required: ["relations"],
134-
$schema: DRAFT_07,
134+
$schema: JSON_SCHEMA_2020_12,
135135
additionalProperties: false,
136136
},
137137
annotations: writeAnnotations,
@@ -166,7 +166,7 @@ const expectedTools = [
166166
},
167167
},
168168
required: ["observations"],
169-
$schema: DRAFT_07,
169+
$schema: JSON_SCHEMA_2020_12,
170170
},
171171
outputSchema: {
172172
type: "object",
@@ -185,7 +185,7 @@ const expectedTools = [
185185
},
186186
},
187187
required: ["results"],
188-
$schema: DRAFT_07,
188+
$schema: JSON_SCHEMA_2020_12,
189189
additionalProperties: false,
190190
},
191191
annotations: writeAnnotations,
@@ -206,7 +206,7 @@ const expectedTools = [
206206
},
207207
},
208208
required: ["entityNames"],
209-
$schema: DRAFT_07,
209+
$schema: JSON_SCHEMA_2020_12,
210210
},
211211
outputSchema: statusOutputSchema,
212212
annotations: deleteAnnotations,
@@ -241,7 +241,7 @@ const expectedTools = [
241241
},
242242
},
243243
required: ["deletions"],
244-
$schema: DRAFT_07,
244+
$schema: JSON_SCHEMA_2020_12,
245245
},
246246
outputSchema: statusOutputSchema,
247247
annotations: deleteAnnotations,
@@ -261,7 +261,7 @@ const expectedTools = [
261261
},
262262
},
263263
required: ["relations"],
264-
$schema: DRAFT_07,
264+
$schema: JSON_SCHEMA_2020_12,
265265
},
266266
outputSchema: statusOutputSchema,
267267
annotations: deleteAnnotations,
@@ -271,7 +271,11 @@ const expectedTools = [
271271
name: "read_graph",
272272
title: "Read Graph",
273273
description: "Read the entire knowledge graph",
274-
inputSchema: { type: "object", properties: {}, $schema: DRAFT_07 },
274+
inputSchema: {
275+
type: "object",
276+
properties: {},
277+
$schema: JSON_SCHEMA_2020_12,
278+
},
275279
outputSchema: graphOutputSchema,
276280
annotations: readAnnotations,
277281
execution,
@@ -291,7 +295,7 @@ const expectedTools = [
291295
},
292296
},
293297
required: ["query"],
294-
$schema: DRAFT_07,
298+
$schema: JSON_SCHEMA_2020_12,
295299
},
296300
outputSchema: graphOutputSchema,
297301
annotations: readAnnotations,
@@ -311,7 +315,7 @@ const expectedTools = [
311315
},
312316
},
313317
required: ["names"],
314-
$schema: DRAFT_07,
318+
$schema: JSON_SCHEMA_2020_12,
315319
},
316320
outputSchema: graphOutputSchema,
317321
annotations: readAnnotations,

0 commit comments

Comments
 (0)