@emseepea/create-react-ui-server 0.0.5 → 0.0.7

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,39 @@
1
- import { toolSelectionTest } from "@emseepea/testing/semantic";
1
+ import test from "node:test";
2
+ import {
3
+ assertNoToolCalls,
4
+ assertResponseContains,
5
+ assertResponseMeaning,
6
+ assertToolCalls,
7
+ createConversation,
8
+ } from "@emseepea/testing/semantic";
2
9
 
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"],
10
+ test("understands an all-varieties React UI preview", async (t) => {
11
+ const chat = await createConversation(t, {
12
+ server: new URL("../dist/server.js", import.meta.url),
13
+ });
14
+
15
+ // This variant covers all-variety filtering and omitted tips. One exact
16
+ // follow-up checks memory while keeping the suite to one costly judge.
17
+ const response = await chat.send(
18
+ "Preview a plan titled All pea plan for all pea types, without growing tips. " +
19
+ "Summarize the matches and say whether anything was sent, stored, or changed.",
20
+ );
21
+
22
+ assertToolCalls(response, [{
23
+ name: "preview-planting-plan",
24
+ arguments: { title: "All pea plan", peaType: "all", includeTips: false },
25
+ }]);
26
+ assertResponseContains(response, "Harbour Gem");
27
+ await assertResponseMeaning(response, {
28
+ expected:
29
+ "The preview contains Harbour Gem, Highland Snap, and Meadow Sweet without " +
30
+ "growing tips. It is preview-only, sent and stored no report, and changed no " +
31
+ "external data.",
32
+ });
33
+
34
+ const followUp = await chat.send(
35
+ "How many varieties were in that preview? Reply with the numeral only.",
36
+ );
37
+ assertNoToolCalls(followUp);
38
+ assertResponseContains(followUp, "3");
20
39
  });
@@ -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.7",
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",