@emseepea/create-progress-streaming-server 0.0.7 → 0.0.9

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.
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "private": true,
26
26
  "dependencies": {
27
- "@emseepea/server": "0.3.0",
27
+ "@emseepea/server": "0.3.3",
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"];
@@ -21,6 +24,6 @@ export default (() => defineStreamingTool({
21
24
  await delay(150, undefined, { signal });
22
25
  }
23
26
  const data = { tray, status: "complete" as const, germinatedSeeds: 8 as const, totalSeeds: 10 as const, stages };
24
- return { text: `${tray} completed with 8 of 10 pea seeds germinated`, data };
27
+ return { data };
25
28
  },
26
29
  })) satisfies CapabilityModuleFactory;
@@ -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" } },
@@ -20,4 +27,5 @@ test("reports bounded progress before returning the final germination result", a
20
27
  totalSeeds: 10,
21
28
  stages: ["soak", "sow", "sprout"],
22
29
  });
30
+ assert.equal(result.content[0].text, JSON.stringify(result.structuredContent));
23
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-progress-streaming-server",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
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.3",
22
22
  "zod": "4.4.3",
23
23
  "@emseepea/testing": "0.3.0",
24
24
  "@types/node": "24.13.3",