@emseepea/create-progress-streaming-server 0.0.6 → 0.0.8

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.
@@ -1,5 +1,6 @@
1
1
  import test from "node:test";
2
2
  import {
3
+ assertNoToolCalls,
3
4
  assertResponseContains,
4
5
  assertResponseMeaning,
5
6
  assertToolCalls,
@@ -10,6 +11,9 @@ test("keeps progress stages distinct from the completed result", async (t) => {
10
11
  const chat = await createConversation(t, {
11
12
  server: new URL("../dist/server.js", import.meta.url),
12
13
  });
14
+
15
+ // The judge checks the important progress-versus-result distinction once.
16
+ // A literal follow-up checks stage memory without rerunning the slow tool.
13
17
  const response = await chat.send(
14
18
  "Run the sample-tray pea germination trial. List its progress stages and final result.",
15
19
  );
@@ -24,4 +28,10 @@ test("keeps progress stages distinct from the completed result", async (t) => {
24
28
  "Soak, sow, and sprout are progress stages. The separate completed result " +
25
29
  "is 8 of 10 germinated seeds for sample-tray.",
26
30
  });
31
+
32
+ const followUp = await chat.send(
33
+ "Which progress stage came immediately after soak? Reply with the lowercase stage name only.",
34
+ );
35
+ assertNoToolCalls(followUp);
36
+ assertResponseContains(followUp, "sow");
27
37
  });
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "private": true,
26
26
  "dependencies": {
27
- "@emseepea/server": "0.3.0",
27
+ "@emseepea/server": "0.3.2",
28
28
  "zod": "4.4.3"
29
29
  }
30
30
  }
@@ -6,13 +6,16 @@ export default (() => defineStreamingTool({
6
6
  name: "run-germination-trial",
7
7
  access: "public",
8
8
  description: "Run a sample pea germination trial with bounded progress.",
9
- inputSchema: z.object({ tray: z.literal("sample-tray") }),
9
+ inputSchema: z.object({
10
+ tray: z.literal("sample-tray").describe("Sample germination tray to test."),
11
+ }),
10
12
  outputSchema: z.object({
11
- tray: z.literal("sample-tray"),
12
- status: z.literal("complete"),
13
- germinatedSeeds: z.literal(8),
14
- totalSeeds: z.literal(10),
15
- stages: z.tuple([z.literal("soak"), z.literal("sow"), z.literal("sprout")]),
13
+ tray: z.literal("sample-tray").describe("Germination tray that was tested."),
14
+ status: z.literal("complete").describe("Final state of the germination trial."),
15
+ germinatedSeeds: z.literal(8).describe("Number of seeds that germinated."),
16
+ totalSeeds: z.literal(10).describe("Total number of seeds in the trial."),
17
+ stages: z.tuple([z.literal("soak"), z.literal("sow"), z.literal("sprout")])
18
+ .describe("Trial stages completed in order."),
16
19
  }),
17
20
  async handler({ tray }, { reportProgress, signal }) {
18
21
  const stages: ["soak", "sow", "sprout"] = ["soak", "sow", "sprout"];
@@ -6,6 +6,13 @@ import { startMcpServer } from "@emseepea/testing";
6
6
  test("reports bounded progress before returning the final germination result", async (t) => {
7
7
  const running = await startMcpServer(t, new URL("../dist/server.js", import.meta.url));
8
8
  const client = await running.connect();
9
+ const tool = (await client.listTools()).tools[0];
10
+ assert.equal(tool.inputSchema.properties.tray.description, "Sample germination tray to test.");
11
+ assert.equal(tool.outputSchema.properties.tray.description, "Germination tray that was tested.");
12
+ assert.equal(tool.outputSchema.properties.status.description, "Final state of the germination trial.");
13
+ assert.equal(tool.outputSchema.properties.germinatedSeeds.description, "Number of seeds that germinated.");
14
+ assert.equal(tool.outputSchema.properties.totalSeeds.description, "Total number of seeds in the trial.");
15
+ assert.equal(tool.outputSchema.properties.stages.description, "Trial stages completed in order.");
9
16
  const progress = [];
10
17
  const result = await client.callTool(
11
18
  { name: "run-germination-trial", arguments: { tray: "sample-tray" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-progress-streaming-server",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Create an Em See Pea server that streams tool progress.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "prepack": "npm run build:initializer"
19
19
  },
20
20
  "devDependencies": {
21
- "@emseepea/server": "0.3.0",
21
+ "@emseepea/server": "0.3.2",
22
22
  "zod": "4.4.3",
23
23
  "@emseepea/testing": "0.3.0",
24
24
  "@types/node": "24.13.3",