@syntrologie/adapt-chatbot 2.8.0-canary.301 → 2.8.0-canary.302
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.
- package/dist/schema.d.ts +76 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +19 -1
- package/dist/schema.js.map +2 -2
- package/package.json +1 -1
package/dist/schema.d.ts
CHANGED
|
@@ -118,22 +118,60 @@ export declare const chatBarPropsSchema: z.ZodObject<{
|
|
|
118
118
|
id: string | number;
|
|
119
119
|
}>, "many">>;
|
|
120
120
|
inFlight: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
forceExpanded: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
backendUrl: z.ZodOptional<z.ZodString>;
|
|
123
|
+
greeting: z.ZodOptional<z.ZodString>;
|
|
124
|
+
fallback: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
title: z.ZodOptional<z.ZodString>;
|
|
126
|
+
message: z.ZodOptional<z.ZodString>;
|
|
127
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
129
|
+
title: z.ZodOptional<z.ZodString>;
|
|
130
|
+
message: z.ZodOptional<z.ZodString>;
|
|
131
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
133
|
+
title: z.ZodOptional<z.ZodString>;
|
|
134
|
+
message: z.ZodOptional<z.ZodString>;
|
|
135
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
136
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
137
|
+
elementsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
uiTemplates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
121
139
|
}, "strict", z.ZodTypeAny, {
|
|
122
140
|
messages?: {
|
|
123
141
|
role: "user" | "assistant";
|
|
124
142
|
text: string;
|
|
125
143
|
id: string | number;
|
|
126
144
|
}[] | undefined;
|
|
145
|
+
greeting?: string | undefined;
|
|
146
|
+
forceExpanded?: boolean | undefined;
|
|
127
147
|
placeholder?: string | undefined;
|
|
128
148
|
inFlight?: boolean | undefined;
|
|
149
|
+
backendUrl?: string | undefined;
|
|
150
|
+
fallback?: z.objectOutputType<{
|
|
151
|
+
title: z.ZodOptional<z.ZodString>;
|
|
152
|
+
message: z.ZodOptional<z.ZodString>;
|
|
153
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
154
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
155
|
+
elementsEnabled?: boolean | undefined;
|
|
156
|
+
uiTemplates?: Record<string, unknown> | undefined;
|
|
129
157
|
}, {
|
|
130
158
|
messages?: {
|
|
131
159
|
role: "user" | "assistant";
|
|
132
160
|
text: string;
|
|
133
161
|
id: string | number;
|
|
134
162
|
}[] | undefined;
|
|
163
|
+
greeting?: string | undefined;
|
|
164
|
+
forceExpanded?: boolean | undefined;
|
|
135
165
|
placeholder?: string | undefined;
|
|
136
166
|
inFlight?: boolean | undefined;
|
|
167
|
+
backendUrl?: string | undefined;
|
|
168
|
+
fallback?: z.objectInputType<{
|
|
169
|
+
title: z.ZodOptional<z.ZodString>;
|
|
170
|
+
message: z.ZodOptional<z.ZodString>;
|
|
171
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
173
|
+
elementsEnabled?: boolean | undefined;
|
|
174
|
+
uiTemplates?: Record<string, unknown> | undefined;
|
|
137
175
|
}>;
|
|
138
176
|
export type ChatBarProps = z.infer<typeof chatBarPropsSchema>;
|
|
139
177
|
/**
|
|
@@ -1370,22 +1408,60 @@ export declare const tileWidgets: ({
|
|
|
1370
1408
|
id: string | number;
|
|
1371
1409
|
}>, "many">>;
|
|
1372
1410
|
inFlight: z.ZodOptional<z.ZodBoolean>;
|
|
1411
|
+
forceExpanded: z.ZodOptional<z.ZodBoolean>;
|
|
1412
|
+
backendUrl: z.ZodOptional<z.ZodString>;
|
|
1413
|
+
greeting: z.ZodOptional<z.ZodString>;
|
|
1414
|
+
fallback: z.ZodOptional<z.ZodObject<{
|
|
1415
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1416
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1417
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
1418
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1419
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1420
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1421
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
1422
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1423
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1424
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1425
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
1427
|
+
elementsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
1428
|
+
uiTemplates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1373
1429
|
}, "strict", z.ZodTypeAny, {
|
|
1374
1430
|
messages?: {
|
|
1375
1431
|
role: "user" | "assistant";
|
|
1376
1432
|
text: string;
|
|
1377
1433
|
id: string | number;
|
|
1378
1434
|
}[] | undefined;
|
|
1435
|
+
greeting?: string | undefined;
|
|
1436
|
+
forceExpanded?: boolean | undefined;
|
|
1379
1437
|
placeholder?: string | undefined;
|
|
1380
1438
|
inFlight?: boolean | undefined;
|
|
1439
|
+
backendUrl?: string | undefined;
|
|
1440
|
+
fallback?: z.objectOutputType<{
|
|
1441
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1442
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1443
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
1444
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1445
|
+
elementsEnabled?: boolean | undefined;
|
|
1446
|
+
uiTemplates?: Record<string, unknown> | undefined;
|
|
1381
1447
|
}, {
|
|
1382
1448
|
messages?: {
|
|
1383
1449
|
role: "user" | "assistant";
|
|
1384
1450
|
text: string;
|
|
1385
1451
|
id: string | number;
|
|
1386
1452
|
}[] | undefined;
|
|
1453
|
+
greeting?: string | undefined;
|
|
1454
|
+
forceExpanded?: boolean | undefined;
|
|
1387
1455
|
placeholder?: string | undefined;
|
|
1388
1456
|
inFlight?: boolean | undefined;
|
|
1457
|
+
backendUrl?: string | undefined;
|
|
1458
|
+
fallback?: z.objectInputType<{
|
|
1459
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1460
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1461
|
+
ctaLabel: z.ZodOptional<z.ZodString>;
|
|
1462
|
+
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1463
|
+
elementsEnabled?: boolean | undefined;
|
|
1464
|
+
uiTemplates?: Record<string, unknown> | undefined;
|
|
1389
1465
|
}>;
|
|
1390
1466
|
} | {
|
|
1391
1467
|
widget: string;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwExB,eAAO,MAAM,YAAY;IACvB,gGAAgG;;IAEhG,4CAA4C;;IAE5C,iDAAiD;;IAEjD,6DAA6D;;IAE7D,uDAAuD;;IAEvD;;;;;OAKG;;QA3BD,mFAAmF;;QAEnF,kEAAkE;;QAElE,iFAAiF;;QAEjF,+EAA+E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBjF,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAA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,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAA5oH,CAAC;;;;yBAAgH,CAAC;;;4BAA2E,CAAC;4BAA0C,CAAC;6BAA2C,CAAC;6BAA2C,CAAC;;;;;;;;;4BAA4T,CAAC;;;;4BAAuH,CAAC;;;;;4BAAkJ,CAAC;;;;;;4BAAwM,CAAC;2BAAyC,CAAC;;6BAAiQ,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAA8c,CAAC;;;;yBAAgH,CAAC;;;4BAA2E,CAAC;4BAA0C,CAAC;6BAA2C,CAAC;6BAA2C,CAAC;;;;;;;;;4BAA4T,CAAC;;;;4BAAuH,CAAC;;;;;4BAAkJ,CAAC;;;;;;4BAAwM,CAAC;2BAAyC,CAAC;;6BAAiQ,CAAC;kCAA6C,CAAC;oCAAqE,CAAC;;;;qBAA4G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAD9psE,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -73,7 +73,25 @@ var chatBarPropsSchema = z.object({
|
|
|
73
73
|
text: z.string()
|
|
74
74
|
})
|
|
75
75
|
).optional(),
|
|
76
|
-
inFlight: z.boolean().optional()
|
|
76
|
+
inFlight: z.boolean().optional(),
|
|
77
|
+
forceExpanded: z.boolean().optional().describe(
|
|
78
|
+
"Render the trail + input expanded immediately on mount instead of waiting for the first message. Used on canvases where the chat IS the surface (velvet, dedicated drawer)."
|
|
79
|
+
),
|
|
80
|
+
backendUrl: z.string().optional().describe(
|
|
81
|
+
"Backend chat endpoint. Empty string + non-undefined enables relative-URL fetches (the host page proxies /api/* to the backend)."
|
|
82
|
+
),
|
|
83
|
+
greeting: z.string().optional().describe("Greeting line shown above the input on first mount."),
|
|
84
|
+
fallback: z.object({
|
|
85
|
+
title: z.string().optional(),
|
|
86
|
+
message: z.string().optional(),
|
|
87
|
+
ctaLabel: z.string().optional()
|
|
88
|
+
}).passthrough().optional().describe('Per-customer "chat unavailable" card shown when the transport gives up.'),
|
|
89
|
+
elementsEnabled: z.boolean().optional().describe(
|
|
90
|
+
"Opt the chat into the LLM-authored UI element pipeline. When true AND uiTemplates is set, the backend exposes mount_element / patch_element / unmount_element tools scoped to the declared templates."
|
|
91
|
+
),
|
|
92
|
+
uiTemplates: z.record(z.unknown()).optional().describe(
|
|
93
|
+
"Template declarations the LLM can mount via the elements pipeline. Shape mirrors syntrologie_common.sdk.templates.UiTemplatesBlock. Passed verbatim as forwardedProps.uiTemplates to the AG-UI transport."
|
|
94
|
+
)
|
|
77
95
|
}).strict();
|
|
78
96
|
var chipsStripPropsSchema = z.object({
|
|
79
97
|
chips: z.array(SuggestionChipSchema).default([]).describe(
|
package/dist/schema.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/schema.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Adaptive Chatbot - Config Schema\n *\n * Zod schema for validating chatbot widget configuration.\n */\n\nimport { z } from 'zod';\n\nimport { SuggestionChipSchema } from './AdaptiveChipsStrip';\n\n// The widget composes `${backendUrl}/api/adaptive/session` and\n// `${backendUrl}/api/adaptive/action`. backendUrl must be either:\n// - \"\" (empty string) \u2014 same-origin opt-in; resolves to /api/adaptive/*\n// - an absolute http:// or https:// URL \u2014 the chat backend's origin\n// A relative path like \"/api/chat\" produces \"/api/chat/api/adaptive/session\"\n// which 404s on the host SPA and surfaces as a generic SSE error.\n//\n// Split into a `.url()` branch + literal \"\" branch so zod-to-json-schema\n// produces an `anyOf` that AJV (used by `make sdk-validate`) enforces.\n// Refinements alone do not survive the JSON-schema translation.\nconst backendUrlSchema = z.union(\n [\n z\n .string()\n .url('backendUrl must be an absolute URL')\n .regex(/^https?:\\/\\//, 'backendUrl must use http or https'),\n z.literal(''),\n ],\n {\n errorMap: () => ({\n message:\n 'backendUrl must be either \"\" (same-origin) or an absolute http(s):// URL \u2014 relative paths are not allowed',\n }),\n }\n);\n\n// Per-customer fallback card. Rendered in place of the chat input when the\n// chat backend is unreachable for any reason (most commonly: Cloudflare\n// Turnstile bot-check failure for an end-user on a hardened browser / locked\n// network). The customer fills these in; we never show Cloudflare branding\n// to the end-user.\n//\n// `ctaHref` follows the same absolute-URL guard as `backendUrl` so a typo\n// like \"/support\" can't 404 on the host SPA \u2014 must be empty (same-origin)\n// or an absolute http(s):// URL pointing to the customer's existing support\n// path.\nconst fallbackHrefSchema = z.union(\n [\n z\n .string()\n .url('fallback.ctaHref must be an absolute URL')\n .regex(/^https?:\\/\\//, 'fallback.ctaHref must use http or https'),\n z.literal(''),\n ],\n {\n errorMap: () => ({\n message: 'fallback.ctaHref must be either \"\" (same-origin) or an absolute http(s):// URL',\n }),\n }\n);\n\n// `.strict()` so unknown keys are rejected at validation time (matches the\n// emitted JSON Schema's `additionalProperties: false`). Future fields land\n// here intentionally rather than silently slipping through and behaving\n// like feature stubs.\nconst fallbackSchema = z\n .object({\n /** Header shown on the fallback card. Defaults to a generic \"unavailable\" copy. */\n title: z.string().optional(),\n /** Body copy explaining the situation in the customer's voice. */\n message: z.string().optional(),\n /** Label for the call-to-action link. If `ctaHref` is set this should be too. */\n ctaLabel: z.string().optional(),\n /** Target of the CTA link \u2014 typically the customer's existing support path. */\n ctaHref: fallbackHrefSchema.optional(),\n })\n .strict();\n\nexport const configSchema = z.object({\n /** Backend URL for the chat API endpoint. \"\" for same-origin, or an absolute http(s):// URL. */\n backendUrl: backendUrlSchema,\n /** MLflow run ID for experiment tracking */\n mlflowRunId: z.string().optional(),\n /** Greeting message shown when the chat opens */\n greeting: z.string().default('Hi! How can I help?'),\n /** Maximum number of history messages sent to the backend */\n maxHistory: z.number().int().min(1).max(100).default(20),\n /** Quick-reply suggestions shown in the empty state */\n suggestions: z.array(z.string()).optional(),\n /**\n * Per-customer fallback card rendered when chat can't open (Turnstile\n * failure, network error, etc.). The end-user is redirected to the\n * customer's normal support path \u2014 no Cloudflare-branded challenge is\n * ever shown.\n */\n fallback: fallbackSchema.optional(),\n});\n\nexport type ChatbotConfigSchema = z.infer<typeof configSchema>;\n\nexport function validateChatbotConfig(data: unknown) {\n return configSchema.safeParse(data);\n}\n\n// ============================================================================\n// Chat Bar Props (adaptive-chatbot:chat-bar widget)\n// ============================================================================\n\n/**\n * Props schema for the `adaptive-chatbot:chat-bar` widget. This is the\n * headless chat-input shell \u2014 no transport, no message persistence.\n * Customers wire `chat-message-sent` / `chat-interrupt` / `canvas-close`\n * to their own pipeline.\n *\n * All fields are optional: the bar renders an empty trail + send-only\n * placeholder if nothing is passed. Authors who want a stateful chat\n * use `adaptive-chatbot:assistant` instead.\n */\nexport const chatBarPropsSchema = z\n .object({\n placeholder: z\n .string()\n .optional()\n .describe('Input placeholder copy. Defaults to \"Ask, find, or navigate\u2026\".'),\n // `messages` and `inFlight` are runtime state \u2014 included here so\n // authors who pre-seed a conversation (e.g. a demo or guided\n // walkthrough) can declare it. Most production deployments will\n // leave these blank and update them via the mountable's API.\n messages: z\n .array(\n z.object({\n id: z.union([z.number(), z.string()]),\n role: z.enum(['user', 'assistant']),\n text: z.string(),\n })\n )\n .optional(),\n inFlight: z.boolean().optional(),\n })\n .strict();\n\nexport type ChatBarProps = z.infer<typeof chatBarPropsSchema>;\n\n// ============================================================================\n// Chips Strip Props (adaptive-chatbot:chips-strip widget)\n// ============================================================================\n\n/**\n * Props schema for the `adaptive-chatbot:chips-strip` widget. Chips\n * follow the compositional-action shape (see SuggestionChipSchema in\n * AdaptiveChipsStrip.ts) \u2014 same pattern as faq:question.\n */\nexport const chipsStripPropsSchema = z\n .object({\n chips: z\n .array(SuggestionChipSchema)\n .default([])\n .describe(\n 'Suggestion chips authored as suggestions:chip compositional actions. Each chip declares an id, a title, and a payload that mounts in the drawer when clicked. Conditional visibility via per-chip triggerWhen.'\n ),\n })\n .strict();\n\nexport type ChipsStripProps = z.infer<typeof chipsStripPropsSchema>;\n\n// ============================================================================\n// Tile Widget Props Export\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nexport const tileWidgets = [\n {\n widget: 'adaptive-chatbot:assistant',\n defName: 'chatbotAssistantProps',\n propsSchema: configSchema,\n },\n {\n widget: 'adaptive-chatbot:chat-bar',\n defName: 'chatBarProps',\n propsSchema: chatBarPropsSchema,\n },\n {\n widget: 'adaptive-chatbot:chips-strip',\n defName: 'chipsStripProps',\n propsSchema: chipsStripPropsSchema,\n },\n];\n\n/**\n * Action step schemas \u2014 registered into the unified canvas-config\n * JSON Schema's action-step union so authors (and the tactician LLM)\n * can emit `suggestions:chip` items inside a chips-strip tile's\n * `props.chips` array with full validation.\n *\n * `.innerType()` strips the `.refine()` wrapper (cross-field\n * refinements don't translate to JSON Schema); runtime Zod still\n * enforces them.\n */\nexport const actionStepSchemas = [\n { defName: 'suggestionChip', schema: SuggestionChipSchema.innerType() },\n];\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAMA,SAAS,SAAS;AAclB,IAAM,mBAAmB,EAAE;AAAA,EACzB;AAAA,IACE,EACG,OAAO,EACP,IAAI,oCAAoC,EACxC,MAAM,gBAAgB,mCAAmC;AAAA,IAC5D,EAAE,QAAQ,EAAE;AAAA,EACd;AAAA,EACA;AAAA,IACE,UAAU,OAAO;AAAA,MACf,SACE;AAAA,IACJ;AAAA,EACF;AACF;AAYA,IAAM,qBAAqB,EAAE;AAAA,EAC3B;AAAA,IACE,EACG,OAAO,EACP,IAAI,0CAA0C,EAC9C,MAAM,gBAAgB,yCAAyC;AAAA,IAClE,EAAE,QAAQ,EAAE;AAAA,EACd;AAAA,EACA;AAAA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- Config Schema\n *\n * Zod schema for validating chatbot widget configuration.\n */\n\nimport { z } from 'zod';\n\nimport { SuggestionChipSchema } from './AdaptiveChipsStrip';\n\n// The widget composes `${backendUrl}/api/adaptive/session` and\n// `${backendUrl}/api/adaptive/action`. backendUrl must be either:\n// - \"\" (empty string) \u2014 same-origin opt-in; resolves to /api/adaptive/*\n// - an absolute http:// or https:// URL \u2014 the chat backend's origin\n// A relative path like \"/api/chat\" produces \"/api/chat/api/adaptive/session\"\n// which 404s on the host SPA and surfaces as a generic SSE error.\n//\n// Split into a `.url()` branch + literal \"\" branch so zod-to-json-schema\n// produces an `anyOf` that AJV (used by `make sdk-validate`) enforces.\n// Refinements alone do not survive the JSON-schema translation.\nconst backendUrlSchema = z.union(\n [\n z\n .string()\n .url('backendUrl must be an absolute URL')\n .regex(/^https?:\\/\\//, 'backendUrl must use http or https'),\n z.literal(''),\n ],\n {\n errorMap: () => ({\n message:\n 'backendUrl must be either \"\" (same-origin) or an absolute http(s):// URL \u2014 relative paths are not allowed',\n }),\n }\n);\n\n// Per-customer fallback card. Rendered in place of the chat input when the\n// chat backend is unreachable for any reason (most commonly: Cloudflare\n// Turnstile bot-check failure for an end-user on a hardened browser / locked\n// network). The customer fills these in; we never show Cloudflare branding\n// to the end-user.\n//\n// `ctaHref` follows the same absolute-URL guard as `backendUrl` so a typo\n// like \"/support\" can't 404 on the host SPA \u2014 must be empty (same-origin)\n// or an absolute http(s):// URL pointing to the customer's existing support\n// path.\nconst fallbackHrefSchema = z.union(\n [\n z\n .string()\n .url('fallback.ctaHref must be an absolute URL')\n .regex(/^https?:\\/\\//, 'fallback.ctaHref must use http or https'),\n z.literal(''),\n ],\n {\n errorMap: () => ({\n message: 'fallback.ctaHref must be either \"\" (same-origin) or an absolute http(s):// URL',\n }),\n }\n);\n\n// `.strict()` so unknown keys are rejected at validation time (matches the\n// emitted JSON Schema's `additionalProperties: false`). Future fields land\n// here intentionally rather than silently slipping through and behaving\n// like feature stubs.\nconst fallbackSchema = z\n .object({\n /** Header shown on the fallback card. Defaults to a generic \"unavailable\" copy. */\n title: z.string().optional(),\n /** Body copy explaining the situation in the customer's voice. */\n message: z.string().optional(),\n /** Label for the call-to-action link. If `ctaHref` is set this should be too. */\n ctaLabel: z.string().optional(),\n /** Target of the CTA link \u2014 typically the customer's existing support path. */\n ctaHref: fallbackHrefSchema.optional(),\n })\n .strict();\n\nexport const configSchema = z.object({\n /** Backend URL for the chat API endpoint. \"\" for same-origin, or an absolute http(s):// URL. */\n backendUrl: backendUrlSchema,\n /** MLflow run ID for experiment tracking */\n mlflowRunId: z.string().optional(),\n /** Greeting message shown when the chat opens */\n greeting: z.string().default('Hi! How can I help?'),\n /** Maximum number of history messages sent to the backend */\n maxHistory: z.number().int().min(1).max(100).default(20),\n /** Quick-reply suggestions shown in the empty state */\n suggestions: z.array(z.string()).optional(),\n /**\n * Per-customer fallback card rendered when chat can't open (Turnstile\n * failure, network error, etc.). The end-user is redirected to the\n * customer's normal support path \u2014 no Cloudflare-branded challenge is\n * ever shown.\n */\n fallback: fallbackSchema.optional(),\n});\n\nexport type ChatbotConfigSchema = z.infer<typeof configSchema>;\n\nexport function validateChatbotConfig(data: unknown) {\n return configSchema.safeParse(data);\n}\n\n// ============================================================================\n// Chat Bar Props (adaptive-chatbot:chat-bar widget)\n// ============================================================================\n\n/**\n * Props schema for the `adaptive-chatbot:chat-bar` widget. This is the\n * headless chat-input shell \u2014 no transport, no message persistence.\n * Customers wire `chat-message-sent` / `chat-interrupt` / `canvas-close`\n * to their own pipeline.\n *\n * All fields are optional: the bar renders an empty trail + send-only\n * placeholder if nothing is passed. Authors who want a stateful chat\n * use `adaptive-chatbot:assistant` instead.\n */\nexport const chatBarPropsSchema = z\n .object({\n placeholder: z\n .string()\n .optional()\n .describe('Input placeholder copy. Defaults to \"Ask, find, or navigate\u2026\".'),\n // `messages` and `inFlight` are runtime state \u2014 included here so\n // authors who pre-seed a conversation (e.g. a demo or guided\n // walkthrough) can declare it. Most production deployments will\n // leave these blank and update them via the mountable's API.\n messages: z\n .array(\n z.object({\n id: z.union([z.number(), z.string()]),\n role: z.enum(['user', 'assistant']),\n text: z.string(),\n })\n )\n .optional(),\n inFlight: z.boolean().optional(),\n forceExpanded: z\n .boolean()\n .optional()\n .describe(\n 'Render the trail + input expanded immediately on mount instead of waiting for the first message. Used on canvases where the chat IS the surface (velvet, dedicated drawer).'\n ),\n backendUrl: z\n .string()\n .optional()\n .describe(\n 'Backend chat endpoint. Empty string + non-undefined enables relative-URL fetches (the host page proxies /api/* to the backend).'\n ),\n greeting: z.string().optional().describe('Greeting line shown above the input on first mount.'),\n fallback: z\n .object({\n title: z.string().optional(),\n message: z.string().optional(),\n ctaLabel: z.string().optional(),\n })\n .passthrough()\n .optional()\n .describe('Per-customer \"chat unavailable\" card shown when the transport gives up.'),\n elementsEnabled: z\n .boolean()\n .optional()\n .describe(\n 'Opt the chat into the LLM-authored UI element pipeline. When true AND uiTemplates is set, the backend exposes mount_element / patch_element / unmount_element tools scoped to the declared templates.'\n ),\n uiTemplates: z\n .record(z.unknown())\n .optional()\n .describe(\n 'Template declarations the LLM can mount via the elements pipeline. Shape mirrors syntrologie_common.sdk.templates.UiTemplatesBlock. Passed verbatim as forwardedProps.uiTemplates to the AG-UI transport.'\n ),\n })\n .strict();\n\nexport type ChatBarProps = z.infer<typeof chatBarPropsSchema>;\n\n// ============================================================================\n// Chips Strip Props (adaptive-chatbot:chips-strip widget)\n// ============================================================================\n\n/**\n * Props schema for the `adaptive-chatbot:chips-strip` widget. Chips\n * follow the compositional-action shape (see SuggestionChipSchema in\n * AdaptiveChipsStrip.ts) \u2014 same pattern as faq:question.\n */\nexport const chipsStripPropsSchema = z\n .object({\n chips: z\n .array(SuggestionChipSchema)\n .default([])\n .describe(\n 'Suggestion chips authored as suggestions:chip compositional actions. Each chip declares an id, a title, and a payload that mounts in the drawer when clicked. Conditional visibility via per-chip triggerWhen.'\n ),\n })\n .strict();\n\nexport type ChipsStripProps = z.infer<typeof chipsStripPropsSchema>;\n\n// ============================================================================\n// Tile Widget Props Export\n// ============================================================================\n\n/**\n * Tile widget definitions for unified JSON Schema generation.\n * Maps widget IDs to their props validation schema so the build script\n * can inject if/then constraints on tile.props.\n */\nexport const tileWidgets = [\n {\n widget: 'adaptive-chatbot:assistant',\n defName: 'chatbotAssistantProps',\n propsSchema: configSchema,\n },\n {\n widget: 'adaptive-chatbot:chat-bar',\n defName: 'chatBarProps',\n propsSchema: chatBarPropsSchema,\n },\n {\n widget: 'adaptive-chatbot:chips-strip',\n defName: 'chipsStripProps',\n propsSchema: chipsStripPropsSchema,\n },\n];\n\n/**\n * Action step schemas \u2014 registered into the unified canvas-config\n * JSON Schema's action-step union so authors (and the tactician LLM)\n * can emit `suggestions:chip` items inside a chips-strip tile's\n * `props.chips` array with full validation.\n *\n * `.innerType()` strips the `.refine()` wrapper (cross-field\n * refinements don't translate to JSON Schema); runtime Zod still\n * enforces them.\n */\nexport const actionStepSchemas = [\n { defName: 'suggestionChip', schema: SuggestionChipSchema.innerType() },\n];\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAMA,SAAS,SAAS;AAclB,IAAM,mBAAmB,EAAE;AAAA,EACzB;AAAA,IACE,EACG,OAAO,EACP,IAAI,oCAAoC,EACxC,MAAM,gBAAgB,mCAAmC;AAAA,IAC5D,EAAE,QAAQ,EAAE;AAAA,EACd;AAAA,EACA;AAAA,IACE,UAAU,OAAO;AAAA,MACf,SACE;AAAA,IACJ;AAAA,EACF;AACF;AAYA,IAAM,qBAAqB,EAAE;AAAA,EAC3B;AAAA,IACE,EACG,OAAO,EACP,IAAI,0CAA0C,EAC9C,MAAM,gBAAgB,yCAAyC;AAAA,IAClE,EAAE,QAAQ,EAAE;AAAA,EACd;AAAA,EACA;AAAA,IACE,UAAU,OAAO;AAAA,MACf,SAAS;AAAA,IACX;AAAA,EACF;AACF;AAMA,IAAM,iBAAiB,EACpB,OAAO;AAAA;AAAA,EAEN,OAAO,EAAE,OAAO,EAAE,S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