@syntrologie/adapt-chatbot 2.52.0 → 2.54.0

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 CHANGED
@@ -199,21 +199,47 @@ export declare const chatBarPropsSchema: z.ZodObject<{
199
199
  vendor: z.ZodString;
200
200
  suppressNative: z.ZodOptional<z.ZodBoolean>;
201
201
  widgetId: z.ZodOptional<z.ZodString>;
202
+ inbox: z.ZodOptional<z.ZodObject<{
203
+ title: z.ZodString;
204
+ toastTitle: z.ZodString;
205
+ }, "strict", z.ZodTypeAny, {
206
+ title: string;
207
+ toastTitle: string;
208
+ }, {
209
+ title: string;
210
+ toastTitle: string;
211
+ }>>;
202
212
  }, "strict", z.ZodTypeAny, {
203
213
  vendor: string;
204
214
  widgetId?: string | undefined;
215
+ inbox?: {
216
+ title: string;
217
+ toastTitle: string;
218
+ } | undefined;
205
219
  suppressNative?: boolean | undefined;
206
220
  }, {
207
221
  vendor: string;
208
222
  widgetId?: string | undefined;
223
+ inbox?: {
224
+ title: string;
225
+ toastTitle: string;
226
+ } | undefined;
209
227
  suppressNative?: boolean | undefined;
210
228
  }>, {
211
229
  vendor: string;
212
230
  widgetId?: string | undefined;
231
+ inbox?: {
232
+ title: string;
233
+ toastTitle: string;
234
+ } | undefined;
213
235
  suppressNative?: boolean | undefined;
214
236
  }, {
215
237
  vendor: string;
216
238
  widgetId?: string | undefined;
239
+ inbox?: {
240
+ title: string;
241
+ toastTitle: string;
242
+ } | undefined;
217
243
  suppressNative?: boolean | undefined;
218
244
  }>>;
219
245
  }, "strict", z.ZodTypeAny, {
@@ -250,11 +276,15 @@ export declare const chatBarPropsSchema: z.ZodObject<{
250
276
  message: z.ZodOptional<z.ZodString>;
251
277
  ctaLabel: z.ZodOptional<z.ZodString>;
252
278
  }, z.ZodTypeAny, "passthrough"> | undefined;
253
- elementsEnabled?: boolean | undefined;
254
279
  uiTemplates?: Record<string, unknown> | undefined;
280
+ elementsEnabled?: boolean | undefined;
255
281
  supportChat?: {
256
282
  vendor: string;
257
283
  widgetId?: string | undefined;
284
+ inbox?: {
285
+ title: string;
286
+ toastTitle: string;
287
+ } | undefined;
258
288
  suppressNative?: boolean | undefined;
259
289
  } | undefined;
260
290
  }, {
@@ -291,11 +321,15 @@ export declare const chatBarPropsSchema: z.ZodObject<{
291
321
  message: z.ZodOptional<z.ZodString>;
292
322
  ctaLabel: z.ZodOptional<z.ZodString>;
293
323
  }, z.ZodTypeAny, "passthrough"> | undefined;
294
- elementsEnabled?: boolean | undefined;
295
324
  uiTemplates?: Record<string, unknown> | undefined;
325
+ elementsEnabled?: boolean | undefined;
296
326
  supportChat?: {
297
327
  vendor: string;
298
328
  widgetId?: string | undefined;
329
+ inbox?: {
330
+ title: string;
331
+ toastTitle: string;
332
+ } | undefined;
299
333
  suppressNative?: boolean | undefined;
300
334
  } | undefined;
301
335
  }>;
@@ -1619,21 +1653,47 @@ export declare const tileWidgets: ({
1619
1653
  vendor: z.ZodString;
1620
1654
  suppressNative: z.ZodOptional<z.ZodBoolean>;
1621
1655
  widgetId: z.ZodOptional<z.ZodString>;
1656
+ inbox: z.ZodOptional<z.ZodObject<{
1657
+ title: z.ZodString;
1658
+ toastTitle: z.ZodString;
1659
+ }, "strict", z.ZodTypeAny, {
1660
+ title: string;
1661
+ toastTitle: string;
1662
+ }, {
1663
+ title: string;
1664
+ toastTitle: string;
1665
+ }>>;
1622
1666
  }, "strict", z.ZodTypeAny, {
1623
1667
  vendor: string;
1624
1668
  widgetId?: string | undefined;
1669
+ inbox?: {
1670
+ title: string;
1671
+ toastTitle: string;
1672
+ } | undefined;
1625
1673
  suppressNative?: boolean | undefined;
1626
1674
  }, {
1627
1675
  vendor: string;
1628
1676
  widgetId?: string | undefined;
1677
+ inbox?: {
1678
+ title: string;
1679
+ toastTitle: string;
1680
+ } | undefined;
1629
1681
  suppressNative?: boolean | undefined;
1630
1682
  }>, {
1631
1683
  vendor: string;
1632
1684
  widgetId?: string | undefined;
1685
+ inbox?: {
1686
+ title: string;
1687
+ toastTitle: string;
1688
+ } | undefined;
1633
1689
  suppressNative?: boolean | undefined;
1634
1690
  }, {
1635
1691
  vendor: string;
1636
1692
  widgetId?: string | undefined;
1693
+ inbox?: {
1694
+ title: string;
1695
+ toastTitle: string;
1696
+ } | undefined;
1637
1697
  suppressNative?: boolean | undefined;
1638
1698
  }>>;
1639
1699
  }, "strict", z.ZodTypeAny, {
@@ -1670,11 +1730,15 @@ export declare const tileWidgets: ({
1670
1730
  message: z.ZodOptional<z.ZodString>;
1671
1731
  ctaLabel: z.ZodOptional<z.ZodString>;
1672
1732
  }, z.ZodTypeAny, "passthrough"> | undefined;
1673
- elementsEnabled?: boolean | undefined;
1674
1733
  uiTemplates?: Record<string, unknown> | undefined;
1734
+ elementsEnabled?: boolean | undefined;
1675
1735
  supportChat?: {
1676
1736
  vendor: string;
1677
1737
  widgetId?: string | undefined;
1738
+ inbox?: {
1739
+ title: string;
1740
+ toastTitle: string;
1741
+ } | undefined;
1678
1742
  suppressNative?: boolean | undefined;
1679
1743
  } | undefined;
1680
1744
  }, {
@@ -1711,11 +1775,15 @@ export declare const tileWidgets: ({
1711
1775
  message: z.ZodOptional<z.ZodString>;
1712
1776
  ctaLabel: z.ZodOptional<z.ZodString>;
1713
1777
  }, z.ZodTypeAny, "passthrough"> | undefined;
1714
- elementsEnabled?: boolean | undefined;
1715
1778
  uiTemplates?: Record<string, unknown> | undefined;
1779
+ elementsEnabled?: boolean | undefined;
1716
1780
  supportChat?: {
1717
1781
  vendor: string;
1718
1782
  widgetId?: string | undefined;
1783
+ inbox?: {
1784
+ title: string;
1785
+ toastTitle: string;
1786
+ } | undefined;
1719
1787
  suppressNative?: boolean | undefined;
1720
1788
  } | undefined;
1721
1789
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,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: z.string().min(1).optional().describe(
392
392
  "LeadConnector / GoHighLevel only: the chat widget id from the site's embed script (`data-widget-id`). The bridge fetches the location id from the vendor's public widget config \u2014 never hand-type it."
393
+ ),
394
+ inbox: z.object({
395
+ title: z.string().min(1).describe(
396
+ "Heading of the thread card the SDK opens when the visitor taps the announcement of a team message that arrived with no handoff card on the page."
397
+ ),
398
+ toastTitle: z.string().min(1).describe(
399
+ "Title of that announcement. Its body is the message itself. Name the team in the workspace voice."
400
+ )
401
+ }).strict().optional().describe(
402
+ "Where a team message lands when NO adaptive-chatbot:leave-a-message card is on the page \u2014 the vendor's own proactive triggers, or a reply after navigation tore the card down. The SDK writes it into the same thread the card hydrates from, announces it through the canvas, and on tap mounts the workspace's leave-a-message template opened on the thread. Required whenever suppressNative is true: with the vendor's UI hidden, an un-announced message is a message the visitor never sees."
393
403
  )
394
404
  }).strict().superRefine((supportChat, ctx) => {
405
+ if (supportChat.suppressNative && !supportChat.inbox) {
406
+ ctx.addIssue({
407
+ code: z.ZodIssueCode.custom,
408
+ path: ["inbox"],
409
+ message: "supportChat.inbox is required when suppressNative is true: the vendor UI is hidden, so a team message that arrives with no handoff card mounted has nowhere to show without it"
410
+ });
411
+ }
395
412
  if (supportChat.vendor !== "leadconnector") return;
396
413
  if (supportChat.widgetId) return;
397
414
  ctx.addIssue({
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/schema.ts", "../src/generated/widget-props-field-index.json"],
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';\nimport widgetPropsFieldIndex from './generated/widget-props-field-index.json';\n\n// Key `generate-widget-props-field-index.mjs` writes the merged tile-chrome /\n// hydration-handle exemption list under \u2014 see the `uiTemplates` superRefine\n// below (dangling widget-props field references) for the read side.\nconst ALWAYS_ALLOWED_FIELDS_KEY = '$alwaysAllowedFields';\n\n// The widget composes `${backendUrl}/api/adaptive/stream` (AG-UI chat turns)\n// and `${backendUrl}/api/adaptive/session` (server-push SSE: nudges, typing,\n// snapshots). 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 voiceInput: z\n .boolean()\n .optional()\n .describe(\n 'Show a mic button that dictates into the input via the browser Web Speech API where supported (vendor-cloud recognition; degrades to hidden when unsupported). Absent/false = no button.'\n ),\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 assistantName: z\n .string()\n .optional()\n .describe(\n 'Name shown in the (forceExpanded) chat header. Defaults to \"Assistant\". Per-workspace override, e.g. \"Vela Concierge\".'\n ),\n personas: z\n .array(\n z.object({\n id: z.string().min(1),\n name: z.string().min(1).max(24),\n role_title: z.string().max(48).optional(),\n pronouns: z.string().max(16).optional(),\n avatar: z\n .object({\n sm: z.string().url().optional(),\n md: z.string().url().optional(),\n lg: z.string().url().optional(),\n })\n .optional(),\n intro_line: z.string().max(160).optional(),\n })\n )\n .optional()\n .describe(\n 'Persona roster (FEAT-1784917430): human-presenting concierge identities. One is 50:50 sticky-assigned per visitor; its name/avatar render in the header, trail, and typing line, and the name enters the LLM voice. The header always carries an \"AI concierge\" disclosure.'\n ),\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 introSuggestion: z\n .object({\n label: z.string().min(1),\n prompt: z.string().min(1),\n })\n .optional()\n .describe(\n 'Pre-conversation tap-target shown alongside the greeting when no messages exist. `label` is the button copy the visitor sees; `prompt` is the text submitted on tap, exactly as if they had typed it.'\n ),\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 .superRefine((block, ctx) => {\n // ---------------------------------------------------------------------------\n // Type-homogeneity gate \u2014 mirrors Python UiTemplatesBlock._types_are_homogeneous\n //\n // All templates of the same type must share an authorable field shape.\n // Per-type mount tools assume that every template of a given widget/kind\n // exposes the same set of field names, the same required flags, the same\n // admin_pinned_fields, and the same EnumField value sets. A divergent\n // template would produce a value that is schema-valid but server-rejected.\n //\n // Groups: tiles by `widget`; items+actions by `kind`.\n // 4-dimension signature per group member:\n // 1. frozenset of field keys\n // 2. frozenset of field keys where required === true\n // 3. frozenset of admin_pinned_fields\n // 4. sorted enum values per enum field (order-independent comparison)\n //\n // The data is untyped (z.unknown()), so we read defensively: treat missing\n // arrays as [], missing fields as {}.\n // ---------------------------------------------------------------------------\n\n type TemplateRaw = {\n id?: unknown;\n widget?: unknown;\n kind?: unknown;\n fields?: unknown;\n admin_pinned_fields?: unknown;\n default_slot?: unknown;\n allowed_slots?: unknown;\n default_parent?: unknown;\n allowed_parents?: unknown;\n placement_type?: unknown;\n allowed_targets?: unknown;\n };\n\n function asStringArray(v: unknown): string[] {\n if (!Array.isArray(v)) return [];\n return v.filter((x): x is string => typeof x === 'string');\n }\n\n function asFieldsRecord(v: unknown): Record<string, unknown> {\n if (v !== null && typeof v === 'object' && !Array.isArray(v)) {\n return v as Record<string, unknown>;\n }\n return {};\n }\n\n function templateSignature(\n t: TemplateRaw\n ): readonly [Set<string>, Set<string>, Set<string>, Array<[string, string[]]>] {\n const fields = asFieldsRecord(t.fields);\n const fieldKeys = new Set(Object.keys(fields));\n\n const requiredKeys = new Set<string>();\n for (const [k, spec] of Object.entries(fields)) {\n const s = spec as Record<string, unknown> | null | undefined;\n if (s && typeof s === 'object' && s.required === true) {\n requiredKeys.add(k);\n }\n }\n\n const pinned = new Set(asStringArray(t.admin_pinned_fields));\n\n const enumValues: Array<[string, string[]]> = [];\n for (const [k, spec] of Object.entries(fields)) {\n const s = spec as Record<string, unknown> | null | undefined;\n if (s && typeof s === 'object' && s.type === 'enum') {\n const vals = asStringArray(s.values).slice().sort();\n enumValues.push([k, vals]);\n }\n }\n enumValues.sort(([a], [b]) => a.localeCompare(b));\n\n return [fieldKeys, requiredKeys, pinned, enumValues] as const;\n }\n\n function signaturesEqual(\n a: ReturnType<typeof templateSignature>,\n b: ReturnType<typeof templateSignature>\n ): boolean {\n // 1. field keys\n if (a[0].size !== b[0].size) return false;\n for (const k of a[0]) if (!b[0].has(k)) return false;\n\n // 2. required keys\n if (a[1].size !== b[1].size) return false;\n for (const k of a[1]) if (!b[1].has(k)) return false;\n\n // 3. pinned keys\n if (a[2].size !== b[2].size) return false;\n for (const k of a[2]) if (!b[2].has(k)) return false;\n\n // 4. enum values (sorted arrays of [field, sorted-values] pairs)\n if (a[3].length !== b[3].length) return false;\n for (let i = 0; i < a[3].length; i++) {\n const [ak, av] = a[3][i];\n const [bk, bv] = b[3][i];\n if (ak !== bk) return false;\n if (av.length !== bv.length) return false;\n for (let j = 0; j < av.length; j++) {\n if (av[j] !== bv[j]) return false;\n }\n }\n\n return true;\n }\n\n const groups = new Map<string, TemplateRaw[]>();\n\n const tiles = Array.isArray(block.tiles) ? (block.tiles as TemplateRaw[]) : [];\n for (const t of tiles) {\n if (typeof t.widget === 'string') {\n const key = `widget:${t.widget}`;\n const group = groups.get(key) ?? [];\n group.push(t);\n groups.set(key, group);\n }\n }\n\n const items = Array.isArray(block.items) ? (block.items as TemplateRaw[]) : [];\n const actions = Array.isArray(block.actions) ? (block.actions as TemplateRaw[]) : [];\n for (const t of [...items, ...actions]) {\n if (typeof t.kind === 'string') {\n const key = `kind:${t.kind}`;\n const group = groups.get(key) ?? [];\n group.push(t);\n groups.set(key, group);\n }\n }\n\n // ---------------------------------------------------------------------------\n // Per-template cross-field gates \u2014 mirror ALL five Python model validators\n // (TileTemplate/ItemTemplate/ActionTemplate in\n // syntrologie_common/sdk/templates.py). Each spans TWO fields at once, so\n // JSON Schema cannot express it and zod refinements do not survive\n // zod-to-json-schema \u2014 this refinement is the authoring-time home.\n //\n // The runtime rejects a bad block ALL-OR-NOTHING and only logs it, so every\n // mount_* tool silently vanishes for the turn (BUG-1786640934: a contact-card\n // pinned `heading`/`channels`, neither a declared field, and the whole\n // workspace lost its elements capability).\n // ---------------------------------------------------------------------------\n\n // ---------------------------------------------------------------------------\n // 5. Dangling widget-props field references.\n //\n // `widgetPropsFieldIndex` is generated (never hand-typed) by\n // packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs\n // from the SAME canvas-config.schema.json that Python's\n // `syntrologie_common.sdk.schema.widget_schema_field_exists` reads \u2014\n // one data source, two per-language walkers (see that script's\n // module docstring for why the walking code itself can't be\n // shared across a browser-bundled TS file and a server-side Python\n // module). Scoped to the SAME small widget allowlist as the\n // runtime's own `_DANGLING_CHECK_WIDGETS`\n // (adaptive_tools_gen.py) \u2014 a widget not in the generated index is\n // silently exempt, matching the runtime's own scoping (several\n // widgets don't map fields 1:1 onto their props root; see that\n // script's docstring).\n //\n // This is the authoring-time half of the SAME condition the\n // runtime already detects and fail-open-drops (adaptive_tools_gen.\n // dangling_field_dropped) \u2014 that log-only drop stays, unchanged,\n // for configs published before this rule existed; this rule stops\n // a NEW dangling reference from being authored in the first place.\n // The generated file also carries a `$comment` header string and an\n // `$alwaysAllowedFields` string array (see below) alongside the\n // per-widget path arrays \u2014 cast through `unknown` since `$comment`\n // intentionally breaks a direct `Record<string, string[]>` shape;\n // `checkDanglingFieldReferences` only ever reads a widget key that\n // came from `t.widget` (a real widget const), so `$comment` is\n // never looked up as a widget.\n const widgetFieldIndex = widgetPropsFieldIndex as unknown as Record<string, string[]>;\n\n // Fields that are structurally part of a TileTemplate's authoring\n // surface but are NEVER real widget-props properties, so this check\n // must not flag them as dangling: tile chrome (title/icon/subtitle,\n // rendered by the tile shell) and search-hydration handles\n // (product_handle/product_handles, popped by the mount executor\n // BEFORE the widget ever sees its props). Read from the SAME\n // generated `widgetPropsFieldIndex` above \u2014 never hand-retyped here\n // \u2014 so this list can only ever match what `syntrologie_common.sdk.\n // schema.TILE_CHROME_FIELDS`/`HANDLE_FIELD`/`HANDLES_FIELD` load\n // from `platform/common/syntrologie_common/sdk/widget-props-always-\n // allowed-fields.json`, the single source both languages derive\n // from (see `generate-widget-props-field-index.mjs`'s module\n // docstring). A prior version of this rule hand-retyped this exact\n // list and silently drifted from Python (BUG-1786833318) \u2014 flagging\n // `title`/`icon`/`product_handle`(s) as dangling on every real\n // production config (main-peptides-demo-publish.json,\n // iglowmedspa-demo-publish.json, nei-native-demo-publish.json all\n // author them on adaptive-product:card/:comparison templates).\n // BUG-1786834379 moved the list into the generated artifact so\n // that class of drift is structurally impossible: the freshness\n // check (`make app-check-widget-props-field-index-fresh`) fails if\n // this array is ever stale relative to its JSON source.\n const alwaysAllowedRaw = widgetFieldIndex[ALWAYS_ALLOWED_FIELDS_KEY];\n if (!Array.isArray(alwaysAllowedRaw)) {\n throw new Error(\n `widget-props-field-index.json is missing \"${ALWAYS_ALLOWED_FIELDS_KEY}\" \u2014 regenerate via ` +\n 'node packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs'\n );\n }\n const NEVER_DANGLING_FIELDS = new Set(alwaysAllowedRaw);\n\n function checkDanglingFieldReferences(t: TemplateRaw, where: string): void {\n if (typeof t.widget !== 'string') return; // items/actions carry `kind`, not `widget` \u2014 not in scope\n const validPaths = widgetFieldIndex[t.widget];\n if (!validPaths) return; // widget outside the checked allowlist \u2014 genuinely unchecked, not a false negative\n const validSet = new Set(validPaths);\n const fields = asFieldsRecord(t.fields);\n for (const key of Object.keys(fields)) {\n if (validSet.has(key) || NEVER_DANGLING_FIELDS.has(key)) continue;\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field ${JSON.stringify(key)} does not exist in the ${JSON.stringify(t.widget)} ` +\n `widget's props schema \u2014 it was removed, renamed, or never existed. Remove it from ` +\n `\\`fields\\`, or point it at the widget's current path.`,\n });\n }\n }\n\n /** Dunder / prototype-pollution names \u2014 mirrors RESERVED_FIELD_SEGMENTS. */\n const RESERVED_SEGMENTS = new Set([\n '__class__',\n '__init__',\n '__proto__',\n '__dict__',\n '__getattribute__',\n '__setattr__',\n 'constructor',\n 'prototype',\n ]);\n\n function checkTemplate(t: TemplateRaw, where: string): void {\n const fields = asFieldsRecord(t.fields);\n const fieldKeys = Object.keys(fields);\n\n // 1. admin_pinned_fields must be a subset of the declared fields.\n // Props the LLM cannot author are already un-authorable by NOT being\n // fields; pinning a non-field is a no-op the runtime treats as fatal.\n const unknownPins = asStringArray(t.admin_pinned_fields).filter(\n (name) => !(name in fields)\n );\n if (unknownPins.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: admin_pinned_fields references unknown fields: ` +\n `${JSON.stringify(unknownPins)} \u2014 every pinned name must be a key of ` +\n `\\`fields\\` (declared: ${JSON.stringify(fieldKeys)})`,\n });\n }\n\n // 2. default_slot must be one of allowed_slots (tiles only).\n if (typeof t.default_slot === 'string') {\n const slots = Array.isArray(t.allowed_slots)\n ? (t.allowed_slots as Array<Record<string, unknown>>)\n .map((s) => (s && typeof s === 'object' ? s.slot : undefined))\n .filter((s): s is string => typeof s === 'string')\n : [];\n if (!slots.includes(t.default_slot)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: default_slot ${JSON.stringify(t.default_slot)} is not in ` +\n `allowed_slots ${JSON.stringify(slots)}`,\n });\n }\n }\n\n // 2b. ItemTemplate: default_parent must be one of allowed_parents[].tile_id.\n // Same failure class as default_slot, for items (adversarial-review find:\n // the first cut mirrored only the tile rule and left this one unchecked).\n if (typeof t.default_parent === 'string') {\n const parents = Array.isArray(t.allowed_parents)\n ? (t.allowed_parents as Array<Record<string, unknown>>)\n .map((p) => (p && typeof p === 'object' ? p.tile_id : undefined))\n .filter((p): p is string => typeof p === 'string')\n : [];\n if (!parents.includes(t.default_parent)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: default_parent ${JSON.stringify(t.default_parent)} is not in ` +\n `allowed_parents ${JSON.stringify(parents)}`,\n });\n }\n }\n\n // 2c. ActionTemplate: placement_type and allowed_targets must agree \u2014\n // 'selector' needs targets to place against, 'none' must carry none.\n if (typeof t.placement_type === 'string') {\n const targets = Array.isArray(t.allowed_targets) ? t.allowed_targets : [];\n if (t.placement_type === 'selector' && targets.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `${where}: placement_type 'selector' requires a non-empty allowed_targets list`,\n });\n }\n if (t.placement_type === 'none' && targets.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `${where}: placement_type 'none' must have empty allowed_targets`,\n });\n }\n }\n\n // 3. Field-key paths: no empty segments, no reserved segments.\n for (const key of fieldKeys) {\n const segments = key.split('.');\n if (segments.some((seg) => seg.length === 0)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field key ${JSON.stringify(key)} contains empty segment(s) ` +\n `(leading dot, trailing dot, or '..' are not allowed)`,\n });\n continue;\n }\n for (const seg of segments) {\n if (RESERVED_SEGMENTS.has(seg)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field key ${JSON.stringify(key)} uses reserved segment ` +\n `${JSON.stringify(seg)} \u2014 dunder / prototype-pollution names are blocked`,\n });\n }\n }\n }\n\n // 4. Dot-prefix overlap: declaring both `product` and `product.tagline` is\n // ambiguous \u2014 a patch on the parent would obliterate the child.\n const sortedKeys = [...fieldKeys].sort();\n for (let i = 0; i < sortedKeys.length - 1; i++) {\n const a = sortedKeys[i];\n const b = sortedKeys[i + 1];\n if (b.startsWith(`${a}.`)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field keys ${JSON.stringify(a)} and ${JSON.stringify(b)} claim the ` +\n `same prefix namespace \u2014 declaring both is ambiguous (a patch on the parent ` +\n `would overwrite the child)`,\n });\n }\n }\n }\n\n for (const t of tiles) {\n checkTemplate(t, `tile ${JSON.stringify(String(t.id))}`);\n checkDanglingFieldReferences(t, `tile ${JSON.stringify(String(t.id))}`);\n }\n for (const t of items) checkTemplate(t, `item ${JSON.stringify(String(t.id))}`);\n for (const t of actions) checkTemplate(t, `action ${JSON.stringify(String(t.id))}`);\n\n for (const [typeKey, members] of groups) {\n if (members.length < 2) continue;\n\n const headSig = templateSignature(members[0]);\n for (let i = 1; i < members.length; i++) {\n const other = members[i];\n if (!signaturesEqual(headSig, templateSignature(other))) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `templates of type ${JSON.stringify(typeKey)} must share an authorable field ` +\n `shape, but ${JSON.stringify(String(members[0].id))} and ` +\n `${JSON.stringify(String(other.id))} differ ` +\n `(field names / required / admin_pinned / enum values)`,\n });\n }\n }\n }\n })\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 voiceInput: z\n .boolean()\n .optional()\n .describe(\n 'Show a mic button that dictates into the input via the browser Web Speech API where supported (vendor-cloud recognition; degrades to hidden when unsupported). Absent/false = no button.'\n ),\n supportChat: z\n .object({\n vendor: z.string().min(1),\n suppressNative: z.boolean().optional(),\n widgetId: z\n .string()\n .min(1)\n .optional()\n .describe(\n \"LeadConnector / GoHighLevel only: the chat widget id from the site's embed script (`data-widget-id`). The bridge fetches the location id from the vendor's public widget config \u2014 never hand-type it.\"\n ),\n })\n .strict()\n .superRefine((supportChat, ctx) => {\n // Cross-field requirement JSON Schema cannot express on this object:\n // 'leadconnector' is the one vendor whose bridge needs per-site\n // config (every other vendor's SDK self-identifies on the page).\n // Without this, a config naming that vendor and omitting widgetId is\n // schema-VALID and fails only at runtime \u2014 bootSupportChat warns and\n // disables handoff, so the customer discovers it when a visitor\n // tries to reach a human. Caught here at authoring time instead:\n // `make sdk-validate` runs this via validate-config.mjs's per-tile\n // props pass (see runtime-sdk/scripts/lib/zod-authoring-checks.mjs).\n if (supportChat.vendor !== 'leadconnector') return;\n if (supportChat.widgetId) return;\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['widgetId'],\n message:\n 'supportChat.widgetId is required when vendor is \"leadconnector\" (the chat widget id from the site\\'s embed, data-widget-id)',\n });\n })\n .optional()\n .describe(\n 'Names the site\\'s own support-chat product (\"crisp\" or \"leadconnector\") for async human handoff via the adaptive-chatbot:leave-a-message widget. Resolved at chat-bar boot regardless of whether that widget ever mounts, so suppressNative (hide the vendor\\'s native launcher bubble) always applies. Absent vendor SDK fails soft \u2014 a console warning, never a thrown error.'\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// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-chatbot',\n plannerSummary:\n 'Conversational assistant, always-visible chat input, and suggestion-chip surfaces. Reach for this when a strategy needs dialog, chat-triggered UI, or prompt chips that reveal richer payloads.',\n description:\n 'Chat and conversational UI adaptive. Provides a full assistant, a headless chat bar, suggestion chips, and chip payload widgets for text answers and navigation links.',\n whenToUse: [\n {\n goal: 'Mount a full AI assistant with backend streaming',\n action:\n 'Add a tile with widget: \"adaptive-chatbot:assistant\" and configure backendUrl, greeting, maxHistory, suggestions, and fallback props.',\n },\n {\n goal: 'Replace a launcher or slot lid with a chat input row',\n action:\n 'Use widget: \"adaptive-chatbot:chat-bar\" from a tile, slots.drawer.lid, or another slot lid when the host owns the transport.',\n },\n {\n goal: 'Offer suggested prompts or choices that reveal payload content',\n action:\n 'Add widget: \"adaptive-chatbot:chips-strip\" with suggestions:chip entries; each chip payload should reference a supported widget such as adaptive-chatbot:text-answer, adaptive-chatbot:nav-link, or another tile widget.',\n },\n {\n goal: 'Escalate to a human when the assistant cannot help',\n action:\n 'Mount widget: \"adaptive-chatbot:leave-a-message\" (with the chat-bar\\'s supportChat.vendor already configured) when the visitor explicitly asks for a human, when you cannot resolve after a genuine attempt, or on clear frustration \u2014 never as a first response.',\n },\n ],\n conventions: [\n {\n name: 'backendUrl is explicit',\n description:\n 'assistant backendUrl must be either \"\" for same-origin /api/adaptive/* routing or an absolute http(s) URL. Relative paths are rejected because they compose to invalid /api/adaptive/session URLs.',\n },\n {\n name: 'Chat bar is headless',\n description:\n 'adaptive-chatbot:chat-bar renders the input and trail but does not own a transport by default. Hosts should listen for chat-message-sent, chat-interrupt, and canvas-close or provide backendUrl explicitly.',\n },\n {\n name: 'Suggestion chips are compositional',\n description:\n 'suggestions:chip entries are config data rendered by adaptive-chatbot:chips-strip. Use triggerWhen for conditional visibility and use payload.widget for the content mounted after a click.',\n },\n {\n name: 'LLM-authored UI is opt-in',\n description:\n 'Set elementsEnabled and uiTemplates only when the backend is allowed to mount, patch, and unmount declared UI templates during chat turns.',\n },\n {\n name: 'Reply-toast copy is opt-in workspace configuration',\n description:\n \"adaptive-chatbot:leave-a-message announces an operator's reply with a toast ONLY when the workspace authors the words in default_widget_props.replyToast ({title, body}). No authored copy means no toast \u2014 absence is the opt-out, and the tile's own mail face remains the announcement. The bundle never supplies stand-in copy: it would be in the wrong voice and, on a non-English storefront, the wrong language.\",\n },\n {\n name: 'Leave-a-message copy is 100% workspace-authored',\n description:\n 'adaptive-chatbot:leave-a-message ships NO hardcoded visitor-facing strings across its five states (compose \u2192 email \u2192 sent \u2192 mail \u2192 flipped). Every label, framing line, prompt, and button comes from default_widget_props.copy ({framing, messageLabel, sendLabel, emailPrompt, emailLabel, emailPlaceholder, emailSubmitLabel, emailSkipLabel, sentBody, mailLabel, replyLabel, replyPlaceholder, replySendLabel}). The compose/email/reply steps use icon-only send controls whose aria-label IS the authored copy \u2014 an icon button with no accessible name is a real defect, so an unauthored sendLabel/emailSubmitLabel/replySendLabel removes the control entirely rather than shipping it mute. Every other field follows the same absence-is-the-opt-out rule as replyToast.',\n },\n {\n name: 'Human handoff is escalation-only',\n description:\n \"adaptive-chatbot:leave-a-message delivers through the site's own support-chat vendor named in the chat-bar's supportChat.vendor prop \u2014 never mount it as a first response; reach for it only after a genuine resolution attempt, an explicit request for a person, or clear frustration.\",\n },\n ],\n // Structured {name, when, props} entries \u2014 the CAPABILITIES_DOCUMENTATION\n // contract every consumer renders (`_render_capabilities_markdown` in\n // tech-core, `format_capabilities_for_prompt` in syntrologie_common).\n // Plain strings here crashed both renderers (BUG-1784941121).\n events: [\n {\n name: 'chat-message-sent',\n when: 'Visitor sends a chat message (typed, or via a suggested-reply chip)',\n props: '{ text }',\n },\n {\n name: 'chat-interrupt',\n when: 'Visitor interrupts the streaming assistant reply',\n props: '{}',\n },\n {\n name: 'canvas-close',\n when: 'Chat surface requests the host canvas to close',\n props: '{}',\n },\n {\n name: 'trail-suggested-reply',\n when: 'Visitor taps a suggest_replies chip in the chat trail',\n props: '{ text }',\n },\n {\n name: 'supportchat:reply_received',\n when: \"A human operator replies through the site's support-chat vendor while the adaptive-chatbot:leave-a-message tile is un-flipped (not yet read) \u2014 published on the runtime EventBus, not as a DOM CustomEvent, so tile notifications rules can badge it\",\n props: '{ text }',\n },\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", "{\n \"$comment\": \"DO NOT EDIT BY HAND \u2014 generated from packages/runtime-sdk/schema/canvas-config.schema.json and platform/common/syntrologie_common/sdk/widget-props-always-allowed-fields.json. Re-run: node packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs. Consumed by packages/adaptives/adaptive-chatbot/src/schema.ts (uiTemplates dangling-field-reference rule). Mirrors platform/common/syntrologie_common/sdk/schema.py:widget_schema_field_exists \u2014 same resolution semantics, same widget allowlist (_DANGLING_CHECK_WIDGETS in adaptive_tools_gen.py) \u2014 keep both in sync. The $alwaysAllowedFields key is the merged tileChromeFields/handleField/handlesField from the always-allowed-fields JSON above \u2014 fields that are NEVER real widget-props properties for ANY widget.\",\n \"$alwaysAllowedFields\": [\n \"icon\",\n \"product_handle\",\n \"product_handles\",\n \"subtitle\",\n \"title\"\n ],\n \"adaptive-product:card\": [\n \"density\",\n \"product\",\n \"product.attributes\",\n \"product.availability\",\n \"product.badge\",\n \"product.badge.label\",\n \"product.badge.tone\",\n \"product.brand\",\n \"product.ctas\",\n \"product.framing\",\n \"product.id\",\n \"product.identifiers\",\n \"product.identifiers.gtin\",\n \"product.identifiers.mpn\",\n \"product.identifiers.shopifyHandle\",\n \"product.identifiers.sku\",\n \"product.identifiers.wooSlug\",\n \"product.image\",\n \"product.image.alt\",\n \"product.image.bind\",\n \"product.image.src\",\n \"product.labels\",\n \"product.name\",\n \"product.price\",\n \"product.price.amount\",\n \"product.price.bind\",\n \"product.price.cadence\",\n \"product.rating\",\n \"product.rating.count\",\n \"product.rating.max\",\n \"product.rating.value\",\n \"product.salePrice\",\n \"product.salePrice.amount\",\n \"product.salePrice.bind\",\n \"product.salePrice.cadence\",\n \"product.salePrice.validUntil\",\n \"product.specs\",\n \"product.tagline\",\n \"product.variants\",\n \"product.variants.attributes\",\n \"product.variants.variants\",\n \"visibleFacts\"\n ],\n \"adaptive-product:comparison\": [\n \"heading\",\n \"products\",\n \"rows\"\n ]\n}\n"],
5
- "mappings": ";;;;;;;AAMA,SAAS,SAAS;;;ACNlB;AAAA,EACE,UAAY;AAAA,EACZ,sBAAwB;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,+BAA+B;AAAA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AM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAYO,IAAM,oBAAoB;AAAA,EAC/B,EAAE,SAAS,kBAAkB,QAAQ,qBAAqB,UAAU,EAAE;AACxE;",
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';\nimport widgetPropsFieldIndex from './generated/widget-props-field-index.json';\n\n// Key `generate-widget-props-field-index.mjs` writes the merged tile-chrome /\n// hydration-handle exemption list under \u2014 see the `uiTemplates` superRefine\n// below (dangling widget-props field references) for the read side.\nconst ALWAYS_ALLOWED_FIELDS_KEY = '$alwaysAllowedFields';\n\n// The widget composes `${backendUrl}/api/adaptive/stream` (AG-UI chat turns)\n// and `${backendUrl}/api/adaptive/session` (server-push SSE: nudges, typing,\n// snapshots). 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 voiceInput: z\n .boolean()\n .optional()\n .describe(\n 'Show a mic button that dictates into the input via the browser Web Speech API where supported (vendor-cloud recognition; degrades to hidden when unsupported). Absent/false = no button.'\n ),\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 assistantName: z\n .string()\n .optional()\n .describe(\n 'Name shown in the (forceExpanded) chat header. Defaults to \"Assistant\". Per-workspace override, e.g. \"Vela Concierge\".'\n ),\n personas: z\n .array(\n z.object({\n id: z.string().min(1),\n name: z.string().min(1).max(24),\n role_title: z.string().max(48).optional(),\n pronouns: z.string().max(16).optional(),\n avatar: z\n .object({\n sm: z.string().url().optional(),\n md: z.string().url().optional(),\n lg: z.string().url().optional(),\n })\n .optional(),\n intro_line: z.string().max(160).optional(),\n })\n )\n .optional()\n .describe(\n 'Persona roster (FEAT-1784917430): human-presenting concierge identities. One is 50:50 sticky-assigned per visitor; its name/avatar render in the header, trail, and typing line, and the name enters the LLM voice. The header always carries an \"AI concierge\" disclosure.'\n ),\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 introSuggestion: z\n .object({\n label: z.string().min(1),\n prompt: z.string().min(1),\n })\n .optional()\n .describe(\n 'Pre-conversation tap-target shown alongside the greeting when no messages exist. `label` is the button copy the visitor sees; `prompt` is the text submitted on tap, exactly as if they had typed it.'\n ),\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 .superRefine((block, ctx) => {\n // ---------------------------------------------------------------------------\n // Type-homogeneity gate \u2014 mirrors Python UiTemplatesBlock._types_are_homogeneous\n //\n // All templates of the same type must share an authorable field shape.\n // Per-type mount tools assume that every template of a given widget/kind\n // exposes the same set of field names, the same required flags, the same\n // admin_pinned_fields, and the same EnumField value sets. A divergent\n // template would produce a value that is schema-valid but server-rejected.\n //\n // Groups: tiles by `widget`; items+actions by `kind`.\n // 4-dimension signature per group member:\n // 1. frozenset of field keys\n // 2. frozenset of field keys where required === true\n // 3. frozenset of admin_pinned_fields\n // 4. sorted enum values per enum field (order-independent comparison)\n //\n // The data is untyped (z.unknown()), so we read defensively: treat missing\n // arrays as [], missing fields as {}.\n // ---------------------------------------------------------------------------\n\n type TemplateRaw = {\n id?: unknown;\n widget?: unknown;\n kind?: unknown;\n fields?: unknown;\n admin_pinned_fields?: unknown;\n default_slot?: unknown;\n allowed_slots?: unknown;\n default_parent?: unknown;\n allowed_parents?: unknown;\n placement_type?: unknown;\n allowed_targets?: unknown;\n };\n\n function asStringArray(v: unknown): string[] {\n if (!Array.isArray(v)) return [];\n return v.filter((x): x is string => typeof x === 'string');\n }\n\n function asFieldsRecord(v: unknown): Record<string, unknown> {\n if (v !== null && typeof v === 'object' && !Array.isArray(v)) {\n return v as Record<string, unknown>;\n }\n return {};\n }\n\n function templateSignature(\n t: TemplateRaw\n ): readonly [Set<string>, Set<string>, Set<string>, Array<[string, string[]]>] {\n const fields = asFieldsRecord(t.fields);\n const fieldKeys = new Set(Object.keys(fields));\n\n const requiredKeys = new Set<string>();\n for (const [k, spec] of Object.entries(fields)) {\n const s = spec as Record<string, unknown> | null | undefined;\n if (s && typeof s === 'object' && s.required === true) {\n requiredKeys.add(k);\n }\n }\n\n const pinned = new Set(asStringArray(t.admin_pinned_fields));\n\n const enumValues: Array<[string, string[]]> = [];\n for (const [k, spec] of Object.entries(fields)) {\n const s = spec as Record<string, unknown> | null | undefined;\n if (s && typeof s === 'object' && s.type === 'enum') {\n const vals = asStringArray(s.values).slice().sort();\n enumValues.push([k, vals]);\n }\n }\n enumValues.sort(([a], [b]) => a.localeCompare(b));\n\n return [fieldKeys, requiredKeys, pinned, enumValues] as const;\n }\n\n function signaturesEqual(\n a: ReturnType<typeof templateSignature>,\n b: ReturnType<typeof templateSignature>\n ): boolean {\n // 1. field keys\n if (a[0].size !== b[0].size) return false;\n for (const k of a[0]) if (!b[0].has(k)) return false;\n\n // 2. required keys\n if (a[1].size !== b[1].size) return false;\n for (const k of a[1]) if (!b[1].has(k)) return false;\n\n // 3. pinned keys\n if (a[2].size !== b[2].size) return false;\n for (const k of a[2]) if (!b[2].has(k)) return false;\n\n // 4. enum values (sorted arrays of [field, sorted-values] pairs)\n if (a[3].length !== b[3].length) return false;\n for (let i = 0; i < a[3].length; i++) {\n const [ak, av] = a[3][i];\n const [bk, bv] = b[3][i];\n if (ak !== bk) return false;\n if (av.length !== bv.length) return false;\n for (let j = 0; j < av.length; j++) {\n if (av[j] !== bv[j]) return false;\n }\n }\n\n return true;\n }\n\n const groups = new Map<string, TemplateRaw[]>();\n\n const tiles = Array.isArray(block.tiles) ? (block.tiles as TemplateRaw[]) : [];\n for (const t of tiles) {\n if (typeof t.widget === 'string') {\n const key = `widget:${t.widget}`;\n const group = groups.get(key) ?? [];\n group.push(t);\n groups.set(key, group);\n }\n }\n\n const items = Array.isArray(block.items) ? (block.items as TemplateRaw[]) : [];\n const actions = Array.isArray(block.actions) ? (block.actions as TemplateRaw[]) : [];\n for (const t of [...items, ...actions]) {\n if (typeof t.kind === 'string') {\n const key = `kind:${t.kind}`;\n const group = groups.get(key) ?? [];\n group.push(t);\n groups.set(key, group);\n }\n }\n\n // ---------------------------------------------------------------------------\n // Per-template cross-field gates \u2014 mirror ALL five Python model validators\n // (TileTemplate/ItemTemplate/ActionTemplate in\n // syntrologie_common/sdk/templates.py). Each spans TWO fields at once, so\n // JSON Schema cannot express it and zod refinements do not survive\n // zod-to-json-schema \u2014 this refinement is the authoring-time home.\n //\n // The runtime rejects a bad block ALL-OR-NOTHING and only logs it, so every\n // mount_* tool silently vanishes for the turn (BUG-1786640934: a contact-card\n // pinned `heading`/`channels`, neither a declared field, and the whole\n // workspace lost its elements capability).\n // ---------------------------------------------------------------------------\n\n // ---------------------------------------------------------------------------\n // 5. Dangling widget-props field references.\n //\n // `widgetPropsFieldIndex` is generated (never hand-typed) by\n // packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs\n // from the SAME canvas-config.schema.json that Python's\n // `syntrologie_common.sdk.schema.widget_schema_field_exists` reads \u2014\n // one data source, two per-language walkers (see that script's\n // module docstring for why the walking code itself can't be\n // shared across a browser-bundled TS file and a server-side Python\n // module). Scoped to the SAME small widget allowlist as the\n // runtime's own `_DANGLING_CHECK_WIDGETS`\n // (adaptive_tools_gen.py) \u2014 a widget not in the generated index is\n // silently exempt, matching the runtime's own scoping (several\n // widgets don't map fields 1:1 onto their props root; see that\n // script's docstring).\n //\n // This is the authoring-time half of the SAME condition the\n // runtime already detects and fail-open-drops (adaptive_tools_gen.\n // dangling_field_dropped) \u2014 that log-only drop stays, unchanged,\n // for configs published before this rule existed; this rule stops\n // a NEW dangling reference from being authored in the first place.\n // The generated file also carries a `$comment` header string and an\n // `$alwaysAllowedFields` string array (see below) alongside the\n // per-widget path arrays \u2014 cast through `unknown` since `$comment`\n // intentionally breaks a direct `Record<string, string[]>` shape;\n // `checkDanglingFieldReferences` only ever reads a widget key that\n // came from `t.widget` (a real widget const), so `$comment` is\n // never looked up as a widget.\n const widgetFieldIndex = widgetPropsFieldIndex as unknown as Record<string, string[]>;\n\n // Fields that are structurally part of a TileTemplate's authoring\n // surface but are NEVER real widget-props properties, so this check\n // must not flag them as dangling: tile chrome (title/icon/subtitle,\n // rendered by the tile shell) and search-hydration handles\n // (product_handle/product_handles, popped by the mount executor\n // BEFORE the widget ever sees its props). Read from the SAME\n // generated `widgetPropsFieldIndex` above \u2014 never hand-retyped here\n // \u2014 so this list can only ever match what `syntrologie_common.sdk.\n // schema.TILE_CHROME_FIELDS`/`HANDLE_FIELD`/`HANDLES_FIELD` load\n // from `platform/common/syntrologie_common/sdk/widget-props-always-\n // allowed-fields.json`, the single source both languages derive\n // from (see `generate-widget-props-field-index.mjs`'s module\n // docstring). A prior version of this rule hand-retyped this exact\n // list and silently drifted from Python (BUG-1786833318) \u2014 flagging\n // `title`/`icon`/`product_handle`(s) as dangling on every real\n // production config (main-peptides-demo-publish.json,\n // iglowmedspa-demo-publish.json, nei-native-demo-publish.json all\n // author them on adaptive-product:card/:comparison templates).\n // BUG-1786834379 moved the list into the generated artifact so\n // that class of drift is structurally impossible: the freshness\n // check (`make app-check-widget-props-field-index-fresh`) fails if\n // this array is ever stale relative to its JSON source.\n const alwaysAllowedRaw = widgetFieldIndex[ALWAYS_ALLOWED_FIELDS_KEY];\n if (!Array.isArray(alwaysAllowedRaw)) {\n throw new Error(\n `widget-props-field-index.json is missing \"${ALWAYS_ALLOWED_FIELDS_KEY}\" \u2014 regenerate via ` +\n 'node packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs'\n );\n }\n const NEVER_DANGLING_FIELDS = new Set(alwaysAllowedRaw);\n\n function checkDanglingFieldReferences(t: TemplateRaw, where: string): void {\n if (typeof t.widget !== 'string') return; // items/actions carry `kind`, not `widget` \u2014 not in scope\n const validPaths = widgetFieldIndex[t.widget];\n if (!validPaths) return; // widget outside the checked allowlist \u2014 genuinely unchecked, not a false negative\n const validSet = new Set(validPaths);\n const fields = asFieldsRecord(t.fields);\n for (const key of Object.keys(fields)) {\n if (validSet.has(key) || NEVER_DANGLING_FIELDS.has(key)) continue;\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field ${JSON.stringify(key)} does not exist in the ${JSON.stringify(t.widget)} ` +\n `widget's props schema \u2014 it was removed, renamed, or never existed. Remove it from ` +\n `\\`fields\\`, or point it at the widget's current path.`,\n });\n }\n }\n\n /** Dunder / prototype-pollution names \u2014 mirrors RESERVED_FIELD_SEGMENTS. */\n const RESERVED_SEGMENTS = new Set([\n '__class__',\n '__init__',\n '__proto__',\n '__dict__',\n '__getattribute__',\n '__setattr__',\n 'constructor',\n 'prototype',\n ]);\n\n function checkTemplate(t: TemplateRaw, where: string): void {\n const fields = asFieldsRecord(t.fields);\n const fieldKeys = Object.keys(fields);\n\n // 1. admin_pinned_fields must be a subset of the declared fields.\n // Props the LLM cannot author are already un-authorable by NOT being\n // fields; pinning a non-field is a no-op the runtime treats as fatal.\n const unknownPins = asStringArray(t.admin_pinned_fields).filter(\n (name) => !(name in fields)\n );\n if (unknownPins.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: admin_pinned_fields references unknown fields: ` +\n `${JSON.stringify(unknownPins)} \u2014 every pinned name must be a key of ` +\n `\\`fields\\` (declared: ${JSON.stringify(fieldKeys)})`,\n });\n }\n\n // 2. default_slot must be one of allowed_slots (tiles only).\n if (typeof t.default_slot === 'string') {\n const slots = Array.isArray(t.allowed_slots)\n ? (t.allowed_slots as Array<Record<string, unknown>>)\n .map((s) => (s && typeof s === 'object' ? s.slot : undefined))\n .filter((s): s is string => typeof s === 'string')\n : [];\n if (!slots.includes(t.default_slot)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: default_slot ${JSON.stringify(t.default_slot)} is not in ` +\n `allowed_slots ${JSON.stringify(slots)}`,\n });\n }\n }\n\n // 2b. ItemTemplate: default_parent must be one of allowed_parents[].tile_id.\n // Same failure class as default_slot, for items (adversarial-review find:\n // the first cut mirrored only the tile rule and left this one unchecked).\n if (typeof t.default_parent === 'string') {\n const parents = Array.isArray(t.allowed_parents)\n ? (t.allowed_parents as Array<Record<string, unknown>>)\n .map((p) => (p && typeof p === 'object' ? p.tile_id : undefined))\n .filter((p): p is string => typeof p === 'string')\n : [];\n if (!parents.includes(t.default_parent)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: default_parent ${JSON.stringify(t.default_parent)} is not in ` +\n `allowed_parents ${JSON.stringify(parents)}`,\n });\n }\n }\n\n // 2c. ActionTemplate: placement_type and allowed_targets must agree \u2014\n // 'selector' needs targets to place against, 'none' must carry none.\n if (typeof t.placement_type === 'string') {\n const targets = Array.isArray(t.allowed_targets) ? t.allowed_targets : [];\n if (t.placement_type === 'selector' && targets.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `${where}: placement_type 'selector' requires a non-empty allowed_targets list`,\n });\n }\n if (t.placement_type === 'none' && targets.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: `${where}: placement_type 'none' must have empty allowed_targets`,\n });\n }\n }\n\n // 3. Field-key paths: no empty segments, no reserved segments.\n for (const key of fieldKeys) {\n const segments = key.split('.');\n if (segments.some((seg) => seg.length === 0)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field key ${JSON.stringify(key)} contains empty segment(s) ` +\n `(leading dot, trailing dot, or '..' are not allowed)`,\n });\n continue;\n }\n for (const seg of segments) {\n if (RESERVED_SEGMENTS.has(seg)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field key ${JSON.stringify(key)} uses reserved segment ` +\n `${JSON.stringify(seg)} \u2014 dunder / prototype-pollution names are blocked`,\n });\n }\n }\n }\n\n // 4. Dot-prefix overlap: declaring both `product` and `product.tagline` is\n // ambiguous \u2014 a patch on the parent would obliterate the child.\n const sortedKeys = [...fieldKeys].sort();\n for (let i = 0; i < sortedKeys.length - 1; i++) {\n const a = sortedKeys[i];\n const b = sortedKeys[i + 1];\n if (b.startsWith(`${a}.`)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `${where}: field keys ${JSON.stringify(a)} and ${JSON.stringify(b)} claim the ` +\n `same prefix namespace \u2014 declaring both is ambiguous (a patch on the parent ` +\n `would overwrite the child)`,\n });\n }\n }\n }\n\n for (const t of tiles) {\n checkTemplate(t, `tile ${JSON.stringify(String(t.id))}`);\n checkDanglingFieldReferences(t, `tile ${JSON.stringify(String(t.id))}`);\n }\n for (const t of items) checkTemplate(t, `item ${JSON.stringify(String(t.id))}`);\n for (const t of actions) checkTemplate(t, `action ${JSON.stringify(String(t.id))}`);\n\n for (const [typeKey, members] of groups) {\n if (members.length < 2) continue;\n\n const headSig = templateSignature(members[0]);\n for (let i = 1; i < members.length; i++) {\n const other = members[i];\n if (!signaturesEqual(headSig, templateSignature(other))) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message:\n `templates of type ${JSON.stringify(typeKey)} must share an authorable field ` +\n `shape, but ${JSON.stringify(String(members[0].id))} and ` +\n `${JSON.stringify(String(other.id))} differ ` +\n `(field names / required / admin_pinned / enum values)`,\n });\n }\n }\n }\n })\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 voiceInput: z\n .boolean()\n .optional()\n .describe(\n 'Show a mic button that dictates into the input via the browser Web Speech API where supported (vendor-cloud recognition; degrades to hidden when unsupported). Absent/false = no button.'\n ),\n supportChat: z\n .object({\n vendor: z.string().min(1),\n suppressNative: z.boolean().optional(),\n widgetId: z\n .string()\n .min(1)\n .optional()\n .describe(\n \"LeadConnector / GoHighLevel only: the chat widget id from the site's embed script (`data-widget-id`). The bridge fetches the location id from the vendor's public widget config \u2014 never hand-type it.\"\n ),\n inbox: z\n .object({\n title: z\n .string()\n .min(1)\n .describe(\n 'Heading of the thread card the SDK opens when the visitor taps the announcement of a team message that arrived with no handoff card on the page.'\n ),\n toastTitle: z\n .string()\n .min(1)\n .describe(\n 'Title of that announcement. Its body is the message itself. Name the team in the workspace voice.'\n ),\n })\n .strict()\n .optional()\n .describe(\n \"Where a team message lands when NO adaptive-chatbot:leave-a-message card is on the page \u2014 the vendor's own proactive triggers, or a reply after navigation tore the card down. The SDK writes it into the same thread the card hydrates from, announces it through the canvas, and on tap mounts the workspace's leave-a-message template opened on the thread. Required whenever suppressNative is true: with the vendor's UI hidden, an un-announced message is a message the visitor never sees.\"\n ),\n })\n .strict()\n .superRefine((supportChat, ctx) => {\n if (supportChat.suppressNative && !supportChat.inbox) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['inbox'],\n message:\n 'supportChat.inbox is required when suppressNative is true: the vendor UI is hidden, so a team message that arrives with no handoff card mounted has nowhere to show without it',\n });\n }\n // Cross-field requirement JSON Schema cannot express on this object:\n // 'leadconnector' is the one vendor whose bridge needs per-site\n // config (every other vendor's SDK self-identifies on the page).\n // Without this, a config naming that vendor and omitting widgetId is\n // schema-VALID and fails only at runtime \u2014 bootSupportChat warns and\n // disables handoff, so the customer discovers it when a visitor\n // tries to reach a human. Caught here at authoring time instead:\n // `make sdk-validate` runs this via validate-config.mjs's per-tile\n // props pass (see runtime-sdk/scripts/lib/zod-authoring-checks.mjs).\n if (supportChat.vendor !== 'leadconnector') return;\n if (supportChat.widgetId) return;\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['widgetId'],\n message:\n 'supportChat.widgetId is required when vendor is \"leadconnector\" (the chat widget id from the site\\'s embed, data-widget-id)',\n });\n })\n .optional()\n .describe(\n 'Names the site\\'s own support-chat product (\"crisp\" or \"leadconnector\") for async human handoff via the adaptive-chatbot:leave-a-message widget. Resolved at chat-bar boot regardless of whether that widget ever mounts, so suppressNative (hide the vendor\\'s native launcher bubble) always applies. Absent vendor SDK fails soft \u2014 a console warning, never a thrown error.'\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// Capabilities Documentation (injected into JSON Schema for LLM prompts)\n// ============================================================================\n\nexport const CAPABILITIES_DOCUMENTATION = {\n packageId: 'adaptive-chatbot',\n plannerSummary:\n 'Conversational assistant, always-visible chat input, and suggestion-chip surfaces. Reach for this when a strategy needs dialog, chat-triggered UI, or prompt chips that reveal richer payloads.',\n description:\n 'Chat and conversational UI adaptive. Provides a full assistant, a headless chat bar, suggestion chips, and chip payload widgets for text answers and navigation links.',\n whenToUse: [\n {\n goal: 'Mount a full AI assistant with backend streaming',\n action:\n 'Add a tile with widget: \"adaptive-chatbot:assistant\" and configure backendUrl, greeting, maxHistory, suggestions, and fallback props.',\n },\n {\n goal: 'Replace a launcher or slot lid with a chat input row',\n action:\n 'Use widget: \"adaptive-chatbot:chat-bar\" from a tile, slots.drawer.lid, or another slot lid when the host owns the transport.',\n },\n {\n goal: 'Offer suggested prompts or choices that reveal payload content',\n action:\n 'Add widget: \"adaptive-chatbot:chips-strip\" with suggestions:chip entries; each chip payload should reference a supported widget such as adaptive-chatbot:text-answer, adaptive-chatbot:nav-link, or another tile widget.',\n },\n {\n goal: 'Escalate to a human when the assistant cannot help',\n action:\n 'Mount widget: \"adaptive-chatbot:leave-a-message\" (with the chat-bar\\'s supportChat.vendor already configured) when the visitor explicitly asks for a human, when you cannot resolve after a genuine attempt, or on clear frustration \u2014 never as a first response.',\n },\n ],\n conventions: [\n {\n name: 'backendUrl is explicit',\n description:\n 'assistant backendUrl must be either \"\" for same-origin /api/adaptive/* routing or an absolute http(s) URL. Relative paths are rejected because they compose to invalid /api/adaptive/session URLs.',\n },\n {\n name: 'Chat bar is headless',\n description:\n 'adaptive-chatbot:chat-bar renders the input and trail but does not own a transport by default. Hosts should listen for chat-message-sent, chat-interrupt, and canvas-close or provide backendUrl explicitly.',\n },\n {\n name: 'Suggestion chips are compositional',\n description:\n 'suggestions:chip entries are config data rendered by adaptive-chatbot:chips-strip. Use triggerWhen for conditional visibility and use payload.widget for the content mounted after a click.',\n },\n {\n name: 'LLM-authored UI is opt-in',\n description:\n 'Set elementsEnabled and uiTemplates only when the backend is allowed to mount, patch, and unmount declared UI templates during chat turns.',\n },\n {\n name: 'Reply-toast copy is opt-in workspace configuration',\n description:\n \"adaptive-chatbot:leave-a-message announces an operator's reply with a toast ONLY when the workspace authors the words in default_widget_props.replyToast ({title, body}). No authored copy means no toast \u2014 absence is the opt-out, and the tile's own mail face remains the announcement. The bundle never supplies stand-in copy: it would be in the wrong voice and, on a non-English storefront, the wrong language.\",\n },\n {\n name: 'Leave-a-message copy is 100% workspace-authored',\n description:\n 'adaptive-chatbot:leave-a-message ships NO hardcoded visitor-facing strings across its five states (compose \u2192 email \u2192 sent \u2192 mail \u2192 flipped). Every label, framing line, prompt, and button comes from default_widget_props.copy ({framing, messageLabel, sendLabel, emailPrompt, emailLabel, emailPlaceholder, emailSubmitLabel, emailSkipLabel, sentBody, mailLabel, replyLabel, replyPlaceholder, replySendLabel}). The compose/email/reply steps use icon-only send controls whose aria-label IS the authored copy \u2014 an icon button with no accessible name is a real defect, so an unauthored sendLabel/emailSubmitLabel/replySendLabel removes the control entirely rather than shipping it mute. Every other field follows the same absence-is-the-opt-out rule as replyToast.',\n },\n {\n name: 'Human handoff is escalation-only',\n description:\n \"adaptive-chatbot:leave-a-message delivers through the site's own support-chat vendor named in the chat-bar's supportChat.vendor prop \u2014 never mount it as a first response; reach for it only after a genuine resolution attempt, an explicit request for a person, or clear frustration.\",\n },\n ],\n // Structured {name, when, props} entries \u2014 the CAPABILITIES_DOCUMENTATION\n // contract every consumer renders (`_render_capabilities_markdown` in\n // tech-core, `format_capabilities_for_prompt` in syntrologie_common).\n // Plain strings here crashed both renderers (BUG-1784941121).\n events: [\n {\n name: 'chat-message-sent',\n when: 'Visitor sends a chat message (typed, or via a suggested-reply chip)',\n props: '{ text }',\n },\n {\n name: 'chat-interrupt',\n when: 'Visitor interrupts the streaming assistant reply',\n props: '{}',\n },\n {\n name: 'canvas-close',\n when: 'Chat surface requests the host canvas to close',\n props: '{}',\n },\n {\n name: 'trail-suggested-reply',\n when: 'Visitor taps a suggest_replies chip in the chat trail',\n props: '{ text }',\n },\n {\n name: 'supportchat:reply_received',\n when: \"A human operator replies through the site's support-chat vendor while the adaptive-chatbot:leave-a-message tile is un-flipped (not yet read) \u2014 published on the runtime EventBus, not as a DOM CustomEvent, so tile notifications rules can badge it\",\n props: '{ text }',\n },\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", "{\n \"$comment\": \"DO NOT EDIT BY HAND \u2014 generated from packages/runtime-sdk/schema/canvas-config.schema.json and platform/common/syntrologie_common/sdk/widget-props-always-allowed-fields.json. Re-run: node packages/runtime-sdk/scripts/generate-widget-props-field-index.mjs. Consumed by packages/adaptives/adaptive-chatbot/src/schema.ts (uiTemplates dangling-field-reference rule). Mirrors platform/common/syntrologie_common/sdk/schema.py:widget_schema_field_exists \u2014 same resolution semantics, same widget allowlist (_DANGLING_CHECK_WIDGETS in adaptive_tools_gen.py) \u2014 keep both in sync. The $alwaysAllowedFields key is the merged tileChromeFields/handleField/handlesField from the always-allowed-fields JSON above \u2014 fields that are NEVER real widget-props properties for ANY widget.\",\n \"$alwaysAllowedFields\": [\n \"icon\",\n \"product_handle\",\n \"product_handles\",\n \"subtitle\",\n \"title\"\n ],\n \"adaptive-product:card\": [\n \"density\",\n \"product\",\n \"product.attributes\",\n \"product.availability\",\n \"product.badge\",\n \"product.badge.label\",\n \"product.badge.tone\",\n \"product.brand\",\n \"product.ctas\",\n \"product.framing\",\n \"product.id\",\n \"product.identifiers\",\n \"product.identifiers.gtin\",\n \"product.identifiers.mpn\",\n \"product.identifiers.shopifyHandle\",\n \"product.identifiers.sku\",\n \"product.identifiers.wooSlug\",\n \"product.image\",\n \"product.image.alt\",\n \"product.image.bind\",\n \"product.image.src\",\n \"product.labels\",\n \"product.name\",\n \"product.price\",\n \"product.price.amount\",\n \"product.price.bind\",\n \"product.price.cadence\",\n \"product.rating\",\n \"product.rating.count\",\n \"product.rating.max\",\n \"product.rating.value\",\n \"product.salePrice\",\n \"product.salePrice.amount\",\n \"product.salePrice.bind\",\n \"product.salePrice.cadence\",\n \"product.salePrice.validUntil\",\n \"product.specs\",\n \"product.tagline\",\n \"product.variants\",\n \"product.variants.attributes\",\n \"product.variants.variants\",\n \"visibleFacts\"\n ],\n \"adaptive-product:comparison\": [\n \"heading\",\n \"products\",\n \"rows\"\n ]\n}\n"],
5
+ "mappings": ";;;;;;;AAMA,SAAS,SAAS;;;ACNlB;AAAA,EACE,UAAY;AAAA,EACZ,sBAAwB;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAA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,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,aACE;AAAA,IACJ;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,QAAQ;AAAA,IACN;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,EACF;AACF;AAYO,IAAM,oBAAoB;AAAA,EAC/B,EAAE,SAAS,kBAAkB,QAAQ,qBAAqB,UAAU,EAAE;AACxE;",
6
6
  "names": []
7
7
  }
@@ -22,6 +22,31 @@ export type Call = {
22
22
  */
23
23
  export declare const calls: Call[];
24
24
  export declare function jsonResponse(status: number, body: unknown): Response;
25
- /** Mocked network: public config, first send (mints identity), search. */
25
+ export interface LcFakeMessage {
26
+ id: string;
27
+ body: string;
28
+ direction: 'inbound' | 'outbound';
29
+ dateAdded: string;
30
+ messageType: number;
31
+ }
32
+ /**
33
+ * The fake conversation store behind the default `send` and `search`
34
+ * handlers. Chronological, oldest first — `search` derives the wire order
35
+ * (newest-first) from it, the way the real endpoint does. NOT reset by
36
+ * `stubFetch` (tests re-stub mid-flow without losing the thread); reset it
37
+ * in your `beforeEach`.
38
+ */
39
+ export declare const lcServer: {
40
+ messages: LcFakeMessage[];
41
+ reset(): void;
42
+ /** A message the visitor sent (what the default send handler appends). */
43
+ addVisitor(body: string): LcFakeMessage;
44
+ /** A staff reply landing on the conversation from the GHL inbox side. */
45
+ addStaff(body: string): LcFakeMessage;
46
+ /** The live-verified search contract (see module doc). */
47
+ search(url: string): Response;
48
+ };
49
+ /** Mocked network: public config, send (appends to `lcServer` and mints the
50
+ * identity), search (the behavioral fake above). */
26
51
  export declare function stubFetch(overrides?: Partial<Record<'config' | 'send' | 'search', () => Response>>): void;
27
52
  //# sourceMappingURL=lc-fetch-stub.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lc-fetch-stub.d.ts","sourceRoot":"","sources":["../../../src/support-chat/__tests__/lc-fetch-stub.ts"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,MAAM,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,IAAI,EAAO,CAAC;AAEhC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,CAKpE;AAED,0EAA0E;AAC1E,wBAAgB,SAAS,CACvB,SAAS,GAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,QAAQ,EAAE,MAAM,QAAQ,CAAC,CAAM,GAC5E,IAAI,CAkCN"}
1
+ {"version":3,"file":"lc-fetch-stub.d.ts","sourceRoot":"","sources":["../../../src/support-chat/__tests__/lc-fetch-stub.ts"],"names":[],"mappings":"AA6BA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,MAAM,MAAM,IAAI,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,WAAW,CAAA;CAAE,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,IAAI,EAAO,CAAC;AAEhC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,QAAQ,CAKpE;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;cACH,aAAa,EAAE;aACtB,IAAI;IAIb,0EAA0E;qBACzD,MAAM,GAAG,aAAa;IAWvC,yEAAyE;mBAC1D,MAAM,GAAG,aAAa;IAWrC,0DAA0D;gBAC9C,MAAM,GAAG,QAAQ;CAiB9B,CAAC;AAEF;qDACqD;AACrD,wBAAgB,SAAS,CACvB,SAAS,GAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,QAAQ,EAAE,MAAM,QAAQ,CAAC,CAAM,GAC5E,IAAI,CAmCN"}
@@ -5,11 +5,43 @@ export interface SupportChatConfig {
5
5
  /** LeadConnector / GoHighLevel: the chat widget id from the site's embed
6
6
  * (`data-widget-id`). Required for vendor 'leadconnector'. */
7
7
  widgetId?: string;
8
+ /**
9
+ * Where a team message lands when NO handoff card is on the page yet
10
+ * (the vendor's own proactive triggers, or a reply after the card was
11
+ * torn down by navigation). Config-authored words, same rule as every
12
+ * other visitor-facing string: absence is the opt-out.
13
+ */
14
+ inbox?: SupportChatInboxConfig;
8
15
  }
16
+ export interface SupportChatInboxConfig {
17
+ /** Heading of the thread card we open for the message. */
18
+ title: string;
19
+ /** Title of the announcement; its body is the message itself. */
20
+ toastTitle: string;
21
+ }
22
+ /** How often the watch re-checks for a vendor SDK that was absent at boot. */
23
+ export declare const SUPPORT_CHAT_WATCH_TICK_MS = 500;
24
+ /** How long the watch keeps checking before it gives up on the vendor. */
25
+ export declare const SUPPORT_CHAT_WATCH_MAX_MS: number;
9
26
  /**
10
- * Resolve the config-named vendor bridge at chat boot. Fail-soft: an absent
11
- * vendor SDK logs (supportChat.bridge: prefix) and returns undefined — the
12
- * concierge never blocks on a third-party chat.
27
+ * Resolve the config-named vendor bridge at chat boot. An unknown vendor
28
+ * (or a misconfigured one) logs (supportChat.bridge: prefix) and returns
29
+ * undefined — the concierge never blocks on a third-party chat.
30
+ *
31
+ * A KNOWN vendor whose SDK is not on the page yet still returns its bridge
32
+ * (BUG-1789078665): hosts running WP Rocket's "delay JavaScript" hold Crisp
33
+ * back until the visitor's first click or scroll, seconds after we booted.
34
+ * The bridge keeps answering `detect() === false` until the vendor lands;
35
+ * a watch applies `hideNative` at that moment and wakes anyone waiting via
36
+ * `onSupportChatReady`.
13
37
  */
14
38
  export declare function bootSupportChat(cfg?: SupportChatConfig): SupportChatBridge | undefined;
39
+ /**
40
+ * Run `cb` once the bridge's vendor SDK is on the page: synchronously when
41
+ * it already is, otherwise when the boot watch sees it land. Returns an
42
+ * unsubscribe for callers that go away first (a card unmounting).
43
+ */
44
+ export declare function onSupportChatReady(bridge: SupportChatBridge, cb: () => void): () => void;
45
+ /** Test seam: clear every pending vendor watch. */
46
+ export declare function _resetSupportChatWatchForTests(): void;
15
47
  //# sourceMappingURL=boot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/support-chat/boot.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;mEAC+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,SAAS,CAsBtF"}
1
+ {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/support-chat/boot.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;mEAC+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,sBAAsB,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,8EAA8E;AAC9E,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,QAAiB,CAAC;AA0DxD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,GAAG,CAAC,EAAE,iBAAiB,GAAG,iBAAiB,GAAG,SAAS,CAwBtF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,EAAE,EAAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAUxF;AAED,mDAAmD;AACnD,wBAAgB,8BAA8B,IAAI,IAAI,CAKrD"}