@emseepea/create-progress-streaming-server 0.0.7 → 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.
|
@@ -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({
|
|
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.
|
|
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.
|
|
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",
|