@emseepea/create-resources-and-prompts-server 0.0.4 → 0.0.6

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,25 +1,30 @@
1
- import assert from "node:assert/strict";
2
- import { semanticTest } from "@emseepea/testing/semantic";
1
+ import test from "node:test";
2
+ import {
3
+ assertNoToolCalls,
4
+ assertResponseContains,
5
+ assertResponseMeaning,
6
+ createConversation,
7
+ } from "@emseepea/testing/semantic";
3
8
 
4
- semanticTest("Sowing depth and plant spacing remain separate concepts", {
5
- server: new URL("../dist/server.js", import.meta.url),
6
- question:
9
+ test("keeps sowing depth and plant spacing separate", async (t) => {
10
+ const chat = await createConversation(t, {
11
+ server: new URL("../dist/server.js", import.meta.url),
12
+ });
13
+ await chat.prepare(async ({ readResource, getPrompt }) => {
14
+ await readResource({ uri: "guide://peas/getting-started" });
15
+ await getPrompt({ name: "growing-guide", arguments: { topic: "sowing-depth" } });
16
+ });
17
+
18
+ const response = await chat.send(
7
19
  "If I sow pea seeds deeper, should I also space the plants farther apart? " +
8
20
  "Explain the distinction for a home gardener.",
9
- criticalFacts: [
10
- "sowing depth",
11
- "plant spacing"
12
- ],
13
- criteria:
14
- "The answer says sowing peas deeper does not mean spacing the plants farther " +
15
- "apart. It explains that sowing depth is how deep a seed goes while plant " +
16
- "spacing is the gap between plants, and it does not treat the measurements as " +
17
- "interchangeable.",
18
- requiredPaths: ["resources/read:guide://peas/getting-started","prompts/get:growing-guide"],
19
- async exercise(client) {
20
- const result1 = await client.readResource({"uri":"guide://peas/getting-started"});
21
- assert.ok(result1);
22
- const result2 = await client.getPrompt({"name":"growing-guide","arguments":{"topic":"sowing-depth"}});
23
- assert.ok(result2);
24
- },
21
+ );
22
+
23
+ assertNoToolCalls(response);
24
+ assertResponseContains(response, ["Sowing depth", "plant spacing"]);
25
+ await assertResponseMeaning(response, {
26
+ expected:
27
+ "Sowing peas deeper does not mean spacing plants farther apart. Sowing depth " +
28
+ "is how deep a seed goes, while plant spacing is the gap between plants.",
29
+ });
25
30
  });
@@ -14,7 +14,7 @@
14
14
  "lint": "oxlint src test eval"
15
15
  },
16
16
  "devDependencies": {
17
- "@emseepea/testing": "0.2.2",
17
+ "@emseepea/testing": "0.3.0",
18
18
  "@types/node": "24.13.3",
19
19
  "typescript": "6.0.3",
20
20
  "oxlint": "1.80.0"
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "private": true,
26
26
  "dependencies": {
27
- "@emseepea/server": "0.2.2",
27
+ "@emseepea/server": "0.3.0",
28
28
  "zod": "4.4.3"
29
29
  }
30
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-resources-and-prompts-server",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Create an Em See Pea server with resources and prompts.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "prepack": "npm run build:initializer"
19
19
  },
20
20
  "devDependencies": {
21
- "@emseepea/server": "0.2.2",
21
+ "@emseepea/server": "0.3.0",
22
22
  "zod": "4.4.3",
23
- "@emseepea/testing": "0.2.2",
23
+ "@emseepea/testing": "0.3.0",
24
24
  "@types/node": "24.13.3",
25
25
  "typescript": "6.0.3",
26
26
  "oxlint": "1.80.0"