@syntrologie/adapt-chatbot 2.8.0-canary.250 → 2.8.0-canary.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ChatAssistantLit.d.ts","sourceRoot":"","sources":["../src/ChatAssistantLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,aAAa,EAAmB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAqGD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkDpE;AAiGD,eAAO,MAAM,yBAAyB;qBACnB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CA6JpE,CAAC"}
1
+ {"version":3,"file":"ChatAssistantLit.d.ts","sourceRoot":"","sources":["../src/ChatAssistantLit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,OAAO,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,aAAa,EAAmB,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvF,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,aAAa,CAAC;IACtB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAqGD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkDpE;AAiGD,eAAO,MAAM,yBAAyB;qBACnB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CA2LpE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChatAssistantLitMountable,
3
3
  acquireTurnstileToken
4
- } from "./chunk-MHK4WRSD.js";
4
+ } from "./chunk-O7RWNUVU.js";
5
5
  import "./chunk-UVKRO5ER.js";
6
6
  export {
7
7
  ChatAssistantLitMountable,
@@ -10549,6 +10549,7 @@ var AnchorIdZ = z4.object({
10549
10549
  route: z4.union([z4.string(), z4.array(z4.string())])
10550
10550
  }).strict();
10551
10551
  var AuthoringFieldsZ = {
10552
+ id: z4.string().optional().describe('Stable action identifier (e.g. "act_3db6a14d2ab0").'),
10552
10553
  title: z4.string().max(200).optional().describe("Authoring-only: short label shown on the action plan dashboard. Stripped before serving to the runtime SDK."),
10553
10554
  description: z4.string().max(1e3).optional().describe("Authoring-only: one-sentence explanation of what this action does and why. Stripped before serving to the runtime SDK."),
10554
10555
  validation: z4.array(z4.string().max(500)).max(10).optional().describe("Authoring-only: ordered steps a reviewer can follow to trigger this action and visually confirm it works. Each entry is one step. Stripped before serving to the runtime SDK.")
@@ -10891,14 +10892,18 @@ var ChatAssistantLitMountable = {
10891
10892
  errorDebounceTimer = null;
10892
10893
  }
10893
10894
  };
10895
+ let hadTurnstileToken = null;
10894
10896
  const swapToFallback = (reason) => {
10895
10897
  if (isUnmounted || hasSucceeded || fallbackRendered) return;
10896
10898
  fallbackRendered = true;
10897
10899
  clearTimers();
10898
- runtime.events.publish("chatbot.fallback_rendered", {
10900
+ const payload = {
10899
10901
  tileId: resolvedTileId,
10900
- reason
10901
- });
10902
+ reason,
10903
+ hadTurnstileToken
10904
+ };
10905
+ runtime.events.publish("chatbot.fallback_rendered", payload);
10906
+ console.warn("[adaptive-chatbot] fallback rendered", payload);
10902
10907
  transport?.disconnect();
10903
10908
  el.remove();
10904
10909
  container.innerHTML = renderFallbackHtml(chatbotConfig.fallback);
@@ -10942,7 +10947,15 @@ var ChatAssistantLitMountable = {
10942
10947
  container.appendChild(el);
10943
10948
  };
10944
10949
  if (TURNSTILE_SITEKEY) {
10945
- void acquireTurnstileToken().then(setupTransport);
10950
+ void acquireTurnstileToken().then((cft) => {
10951
+ hadTurnstileToken = cft !== null;
10952
+ if (!hadTurnstileToken) {
10953
+ console.warn(
10954
+ "[adaptive-chatbot] turnstile token acquisition failed \u2014 connecting without a bot-check token; backend may 403"
10955
+ );
10956
+ }
10957
+ setupTransport(cft);
10958
+ });
10946
10959
  } else {
10947
10960
  setupTransport(null);
10948
10961
  }
@@ -10984,4 +10997,4 @@ fast-json-patch/module/duplex.mjs:
10984
10997
  * MIT license
10985
10998
  *)
10986
10999
  */
10987
- //# sourceMappingURL=chunk-MHK4WRSD.js.map
11000
+ //# sourceMappingURL=chunk-O7RWNUVU.js.map