@emseepea/create-react-ui-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("React UI preview is not mistaken for a completed effect", {
4
- server: new URL("../dist/server.js", import.meta.url),
5
- question:
6
- "Summarize the snap-pea planting-plan preview. Was a report sent or stored, and did this " +
7
- "operation change anything?",
8
- criticalFacts: [
9
- "Highland Snap",
10
- "Meadow Sweet",
11
- "preview-only",
12
- "false",
13
- "No report was sent or stored"
14
- ],
15
- criteria:
16
- "The answer identifies Highland Snap and Meadow Sweet as the two snap-pea " +
17
- "matches. It says the result is preview-only, effectPerformed is false, no report " +
18
- "was sent or stored, and no external action or data change occurred.",
19
- expectedTools: ["preview-planting-plan"],
9
+ test("does not mistake a React UI preview for a completed effect", 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
+ "Preview a plan titled Snap pea plan for snap peas, including growing tips. " +
15
+ "Summarize the matches and say whether anything was sent, stored, or changed.",
16
+ );
17
+
18
+ assertToolCalls(response, [{
19
+ name: "preview-planting-plan",
20
+ arguments: { title: "Snap pea plan", peaType: "snap", includeTips: true },
21
+ }]);
22
+ assertResponseContains(response, "Highland Snap");
23
+ await assertResponseMeaning(response, {
24
+ expected:
25
+ "The preview contains Highland Snap and Meadow Sweet. It is preview-only, " +
26
+ "performed no effect, sent and stored no report, and changed no external data.",
27
+ });
20
28
  });
@@ -16,7 +16,7 @@
16
16
  "devDependencies": {
17
17
  "playwright": "1.62.1",
18
18
  "axe-core": "4.13.0",
19
- "@emseepea/testing": "0.2.2",
19
+ "@emseepea/testing": "0.3.0",
20
20
  "@types/node": "24.13.3",
21
21
  "@types/react": "19.2.18",
22
22
  "@types/react-dom": "19.2.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emseepea/create-react-ui-server",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Create an Em See Pea server with an accessible React form.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "@emseepea/example-ui-shared": "0.0.0",
27
27
  "playwright": "1.62.1",
28
28
  "axe-core": "4.13.0",
29
- "@emseepea/testing": "0.2.2",
29
+ "@emseepea/testing": "0.3.0",
30
30
  "@types/node": "24.13.3",
31
31
  "@types/react": "19.2.18",
32
32
  "@types/react-dom": "19.2.5",