@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
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import {
|
|
3
|
+
assertResponseContains,
|
|
4
|
+
assertResponseMeaning,
|
|
5
|
+
assertToolCalls,
|
|
6
|
+
createConversation,
|
|
7
|
+
} from "@emseepea/testing/semantic";
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/create-tool-server",
|
|
3
|
-
"version": "0.0.
|
|
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.
|
|
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"
|