@emseepea/create-tool-server 0.0.5 → 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,20 +1,28 @@
1
- import { toolSelectionTest } from "@emseepea/testing/semantic";
1
+ import test from "node:test";
2
+ import {
3
+ assertResponseContains,
4
+ assertResponseMeaning,
5
+ assertToolCalls,
6
+ createConversation,
7
+ } from "@emseepea/testing/semantic";
2
8
 
3
- toolSelectionTest("Pea variety details keep each concept distinct", {
4
- server: new URL("../dist/server.js", import.meta.url),
5
- question:
6
- "For Highland Snap, give me its pea type, growth habit, days to maturity, and " +
7
- "traits. Keep those concepts distinct.",
8
- criticalFacts: [
9
- "snap",
10
- "climbing",
11
- "70",
12
- "edible pods",
13
- "needs support"
14
- ],
15
- criteria:
16
- "The answer says Highland Snap is a snap pea with a climbing growth habit, " +
17
- "matures in 70 days, has edible pods, and needs support. It does not confuse " +
18
- "pea type, growth habit, maturity time, or traits.",
19
- expectedTools: ["get-pea-variety"],
9
+ test("keeps pea variety details distinct", async (t) => {
10
+ const chat = await createConversation(t, {
11
+ server: new URL("../dist/server.js", import.meta.url),
12
+ });
13
+ const response = await chat.send(
14
+ "Describe the pea type, growth habit, maturity time, and traits of Highland Snap.",
15
+ );
16
+
17
+ assertToolCalls(response, [{
18
+ name: "get-pea-variety",
19
+ arguments: { name: "Highland Snap" },
20
+ }]);
21
+ assertResponseContains(response, "Highland Snap");
22
+ await assertResponseMeaning(response, {
23
+ expected:
24
+ "Highland Snap is a climbing snap pea that matures in 70 days, has edible " +
25
+ "pods, and needs support. Pea type, growth habit, maturity time, and traits " +
26
+ "remain distinct.",
27
+ });
20
28
  });
@@ -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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-tool-server",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Create an Em See Pea server with one public tool.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,7 +20,7 @@
20
20
  "devDependencies": {
21
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"