@emseepea/create-react-ui-server 0.0.7 → 0.0.8
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.
|
@@ -2,12 +2,12 @@ import { defineElicitationView, defineTool, type ElicitationView } from "@emseep
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
|
|
4
4
|
const peaTypeSchema = z.enum(["all", "shelling", "snap"]);
|
|
5
|
-
const
|
|
5
|
+
const inputSchema = z.strictObject({
|
|
6
6
|
title: z.string().trim().min(1).max(80),
|
|
7
7
|
peaType: peaTypeSchema,
|
|
8
8
|
includeTips: z.boolean(),
|
|
9
9
|
});
|
|
10
|
-
const
|
|
10
|
+
const outputSchema = z.strictObject({
|
|
11
11
|
status: z.literal("preview-only"),
|
|
12
12
|
effectPerformed: z.literal(false),
|
|
13
13
|
title: z.string(),
|
|
@@ -27,7 +27,7 @@ const varieties = [
|
|
|
27
27
|
{ name: "Meadow Sweet", growthHabit: "bush" as const, peaType: "snap" as const, tips: ["suits containers", "keep soil moist"] },
|
|
28
28
|
];
|
|
29
29
|
|
|
30
|
-
export function previewPlantingPlan(input: z.output<typeof
|
|
30
|
+
export function previewPlantingPlan(input: z.output<typeof inputSchema>) {
|
|
31
31
|
const matching = varieties.filter((variety) => input.peaType === "all" || variety.peaType === input.peaType);
|
|
32
32
|
return {
|
|
33
33
|
status: "preview-only" as const,
|
|
@@ -45,8 +45,8 @@ export function createPreviewPlantingPlanTool() {
|
|
|
45
45
|
access: "public",
|
|
46
46
|
title: "Preview a Pea Planting Plan",
|
|
47
47
|
description: "Preview a sample pea planting plan without sending, storing, or changing anything.",
|
|
48
|
-
inputSchema
|
|
49
|
-
outputSchema
|
|
48
|
+
inputSchema,
|
|
49
|
+
outputSchema,
|
|
50
50
|
handler(input) {
|
|
51
51
|
const data = previewPlantingPlan(input);
|
|
52
52
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emseepea/create-react-ui-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Create an Em See Pea server with an accessible React form.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"prepack": "npm run build:initializer"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@emseepea/react": "0.0.
|
|
22
|
-
"@emseepea/server": "0.3.
|
|
21
|
+
"@emseepea/react": "0.0.7",
|
|
22
|
+
"@emseepea/server": "0.3.1",
|
|
23
23
|
"@emseepea/tailwind": "0.0.2",
|
|
24
24
|
"react": "19.2.8",
|
|
25
25
|
"react-dom": "19.2.8",
|