@aikaara/chat-sdk 1.5.30 → 1.5.32

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/headless.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BVgARrQ4.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BaxS3wMQ.cjs");class s extends e.EventEmitter{registration=null;pendingEdits=[];constructor(t){super(),this.setupListeners(t)}registerForm(t){this.registration=t;const i=this.pendingEdits.filter(r=>r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId));if(i.length>0){for(const r of i)t.onFieldUpdate(r.fields),this.emit("edit:applied",{entityType:r.entity_type,entityId:r.entity_id,fields:r.fields});this.pendingEdits=this.pendingEdits.filter(r=>!(r.entity_type===t.entityType&&String(r.entity_id)===String(t.entityId)))}}unregisterForm(t,i){this.registration?.entityType===t&&String(this.registration?.entityId)===String(i)&&(this.registration=null)}get currentForm(){return this.registration}pushFieldUpdates(t,i,r){this.registration&&this.registration.entityType===t&&String(this.registration.entityId)===String(i)?(this.registration.onFieldUpdate(r),this.emit("edit:applied",{entityType:t,entityId:i,fields:r})):(this.pendingEdits.push({action:"edit_entity",entity_type:t,entity_id:i,fields:r}),this.emit("edit:pending",{entityType:t,entityId:i,fields:r}))}async requestSave(){if(!this.registration)return{success:!1,error:"No form registered"};try{return await this.registration.onSave(),this.emit("save:success",{entityType:this.registration.entityType,entityId:this.registration.entityId}),{success:!0}}catch(t){const i=t instanceof Error?t.message:"Save failed";return this.emit("save:error",{entityType:this.registration.entityType,entityId:this.registration.entityId,error:i}),{success:!1,error:i}}}async requestTest(t){if(!this.registration?.onTest)return{success:!1,error:"Current form does not support testing"};try{return await this.registration.onTest(t),{success:!0}}catch(i){return{success:!1,error:i instanceof Error?i.message:"Test failed"}}}setupListeners(t){t.on("action:edit_entity",i=>{this.pushFieldUpdates(i.entity_type,i.entity_id,i.fields)}),t.on("action:save_entity",i=>{this.requestSave()}),t.on("action:test_tool",i=>{this.emit("test:triggered",{toolId:i.tool_id,parameters:i.parameters}),this.requestTest(i.parameters)})}}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatClient=e.AikaaraChatClient;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s;
@@ -334,6 +334,16 @@ export declare interface ChatClientConfig extends ConnectionConfig {
334
334
  conversationId?: string;
335
335
  systemPromptId?: number;
336
336
  channel?: 'widget' | 'api' | 'sidekick';
337
+ /**
338
+ * Persist the conversation under a user/context-specific local-storage key
339
+ * instead of the legacy origin-wide `aikaara_conversation_id`. Hosts that
340
+ * can host more than one identity or thread on the same origin (e.g. one
341
+ * thread per PAN) must supply this so a cached conversation can never be
342
+ * replayed for a different user/scope.
343
+ */
344
+ conversationScope?: string;
345
+ /** Persist the conversation id in local storage. Defaults to `true`. */
346
+ persistConversation?: boolean;
337
347
  /**
338
348
  * Transport selection.
339
349
  * - `aikaara` (default): ActionCable to Aikaara Rails (AI streaming).
@@ -374,6 +384,16 @@ declare interface ChatClientConfig_2 extends ConnectionConfig_2 {
374
384
  conversationId?: string;
375
385
  systemPromptId?: number;
376
386
  channel?: 'widget' | 'api' | 'sidekick';
387
+ /**
388
+ * Persist the conversation under a user/context-specific local-storage key
389
+ * instead of the legacy origin-wide `aikaara_conversation_id`. Hosts that
390
+ * can host more than one identity or thread on the same origin (e.g. one
391
+ * thread per PAN) must supply this so a cached conversation can never be
392
+ * replayed for a different user/scope.
393
+ */
394
+ conversationScope?: string;
395
+ /** Persist the conversation id in local storage. Defaults to `true`. */
396
+ persistConversation?: boolean;
377
397
  /**
378
398
  * Transport selection.
379
399
  * - `aikaara` (default): ActionCable to Aikaara Rails (AI streaming).
@@ -559,10 +579,20 @@ declare interface ConversationHistoryAdapter_2 {
559
579
  }): Promise<TiledeskMessage_2[]>;
560
580
  }
561
581
 
582
+ /**
583
+ * Per-user conversation persistence.
584
+ *
585
+ * The legacy default key (`aikaara_conversation_id`) is global to the origin,
586
+ * which is fine only when a page ever hosts a single chat for a single user.
587
+ * Hosts that embed several identities, or that resume a conversation for a
588
+ * scoped context (e.g. one thread per PAN), must pass a namespaced
589
+ * `storageKey` so a cached conversation can never leak across users/scopes.
590
+ */
562
591
  export declare class ConversationManager {
563
592
  private _conversationId;
564
593
  private persist;
565
- constructor(conversationId?: string, persist?: boolean);
594
+ private storageKey;
595
+ constructor(conversationId?: string, persist?: boolean, storageKey?: string);
566
596
  get conversationId(): string | null;
567
597
  set conversationId(id: string | null);
568
598
  clear(): void;
package/dist/headless.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { E as s } from "./MountTenant-BAwzMvJH.mjs";
2
- import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b, G as w } from "./MountTenant-BAwzMvJH.mjs";
1
+ import { E as s } from "./MountTenant-87j806vN.mjs";
2
+ import { A as p, b as l, k as g, C as c, l as h, m as y, M as u, S as m, n as f, T, o as S, p as _, q as v, s as E, t as C, u as F, v as k, w as A, x as I, y as x, z as U, B as q, D as M, F as b, G as w } from "./MountTenant-87j806vN.mjs";
3
3
  class a extends s {
4
4
  registration = null;
5
5
  pendingEdits = [];
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BVgARrQ4.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MountTenant-BaxS3wMQ.cjs"),s=require("./headless.cjs");function l(a){e.registerComponents();const t=document.createElement("aikaara-chat-widget"),i={baseUrl:"base-url",userToken:"user-token",apiKey:"api-key",title:"title",subtitle:"subtitle",theme:"theme",primaryColor:"primary-color",position:"position",width:"width",height:"height",placeholder:"placeholder",welcomeMessage:"welcome-message",avatarUrl:"avatar-url"};for(const[o,n]of Object.entries(i)){const r=a[o];r!=null&&t.setAttribute(n,String(r))}return t.configure(a),document.body.appendChild(t),t}function d(){const a=document.querySelector("aikaara-chat-widget");a&&a.remove()}exports.ActionCableClient=e.ActionCableClient;exports.AikaaraChatBubble=e.AikaaraChatBubble;exports.AikaaraChatClient=e.AikaaraChatClient;exports.AikaaraChatHeader=e.AikaaraChatHeader;exports.AikaaraChatInput=e.AikaaraChatInput;exports.AikaaraChatWidget=e.AikaaraChatWidget;exports.AikaaraErrorBanner=e.AikaaraErrorBanner;exports.AikaaraMessageBubble=e.AikaaraMessageBubble;exports.AikaaraMessageList=e.AikaaraMessageList;exports.AikaaraStreamingMessage=e.AikaaraStreamingMessage;exports.AikaaraTypingIndicator=e.AikaaraTypingIndicator;exports.ApiClient=e.ApiClient;exports.ChannelSubscription=e.ChannelSubscription;exports.ConnectionManager=e.ConnectionManager;exports.ConversationManager=e.ConversationManager;exports.EventEmitter=e.EventEmitter;exports.MessageStore=e.MessageStore;exports.SessionAuthAdapter=e.SessionAuthAdapter;exports.SsoExchangeAdapter=e.SsoExchangeAdapter;exports.TiledeskTransport=e.TiledeskTransport;exports.TokenDiscoveryError=e.TokenDiscoveryError;exports.TokenDiscoveryReader=e.TokenDiscoveryReader;exports.clearPersistedConversationId=e.clearPersistedConversationId;exports.collectSsoCredentials=e.collectSsoCredentials;exports.createFetchUploadAdapter=e.createFetchUploadAdapter;exports.createPresigned3StepUploadAdapter=e.createPresigned3StepUploadAdapter;exports.createTiledeskHistoryAdapter=e.createTiledeskHistoryAdapter;exports.discoverToken=e.discoverToken;exports.extractTiledeskFileEnvelope=e.extractTiledeskFileEnvelope;exports.inferTiledeskRole=e.inferTiledeskRole;exports.isTiledeskSelfEcho=e.isTiledeskSelfEcho;exports.mountFromSlug=e.mountFromSlug;exports.mountTenantWidget=e.mount;exports.parseTiledeskTemplate=e.parseTiledeskTemplate;exports.registerComponents=e.registerComponents;exports.runMethodSelectPreflight=e.runMethodSelectPreflight;exports.FormBridge=s.FormBridge;exports.mount=l;exports.unmount=d;
package/dist/index.d.ts CHANGED
@@ -406,6 +406,16 @@ export declare interface ChatClientConfig extends ConnectionConfig {
406
406
  conversationId?: string;
407
407
  systemPromptId?: number;
408
408
  channel?: 'widget' | 'api' | 'sidekick';
409
+ /**
410
+ * Persist the conversation under a user/context-specific local-storage key
411
+ * instead of the legacy origin-wide `aikaara_conversation_id`. Hosts that
412
+ * can host more than one identity or thread on the same origin (e.g. one
413
+ * thread per PAN) must supply this so a cached conversation can never be
414
+ * replayed for a different user/scope.
415
+ */
416
+ conversationScope?: string;
417
+ /** Persist the conversation id in local storage. Defaults to `true`. */
418
+ persistConversation?: boolean;
409
419
  /**
410
420
  * Transport selection.
411
421
  * - `aikaara` (default): ActionCable to Aikaara Rails (AI streaming).
@@ -527,10 +537,20 @@ export declare interface ConversationHistoryAdapter {
527
537
  }): Promise<TiledeskMessage[]>;
528
538
  }
529
539
 
540
+ /**
541
+ * Per-user conversation persistence.
542
+ *
543
+ * The legacy default key (`aikaara_conversation_id`) is global to the origin,
544
+ * which is fine only when a page ever hosts a single chat for a single user.
545
+ * Hosts that embed several identities, or that resume a conversation for a
546
+ * scoped context (e.g. one thread per PAN), must pass a namespaced
547
+ * `storageKey` so a cached conversation can never leak across users/scopes.
548
+ */
530
549
  export declare class ConversationManager {
531
550
  private _conversationId;
532
551
  private persist;
533
- constructor(conversationId?: string, persist?: boolean);
552
+ private storageKey;
553
+ constructor(conversationId?: string, persist?: boolean, storageKey?: string);
534
554
  get conversationId(): string | null;
535
555
  set conversationId(id: string | null);
536
556
  clear(): void;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { r as o } from "./MountTenant-BAwzMvJH.mjs";
2
- import { A as u, a as m, b as g, c as h, d as k, e as A, f as C, g as T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-BAwzMvJH.mjs";
1
+ import { r as o } from "./MountTenant-87j806vN.mjs";
2
+ import { A as u, a as m, b as g, c as h, d as k, e as A, f as C, g as T, h as b, i as f, j as v, k as S, C as y, l as M, m as w, E, M as x, S as B, n as F, T as U, o as D, p as I, q as P, s as j, t as q, u as H, v as R, w as W, x as z, y as G, z as K, B as L, D as O, F as J, G as N } from "./MountTenant-87j806vN.mjs";
3
3
  import { FormBridge as V } from "./headless.mjs";
4
4
  function l(e) {
5
5
  o();
package/dist/ui.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-BVgARrQ4.cjs");exports.AikaaraCallConfirmation=a.AikaaraCallConfirmation;exports.AikaaraCallUpload=a.AikaaraCallUpload;exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraPriceBreakdown=a.AikaaraPriceBreakdown;exports.AikaaraSchemaForm=a.AikaaraSchemaForm;exports.AikaaraServiceDetails=a.AikaaraServiceDetails;exports.AikaaraServicePicker=a.AikaaraServicePicker;exports.AikaaraSlotPicker=a.AikaaraSlotPicker;exports.AikaaraSmartEditModal=a.AikaaraSmartEditModal;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTextInput=a.AikaaraTextInput;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./MountTenant-BaxS3wMQ.cjs");exports.AikaaraCallConfirmation=a.AikaaraCallConfirmation;exports.AikaaraCallUpload=a.AikaaraCallUpload;exports.AikaaraChat=a.AikaaraChat;exports.AikaaraChatBubble=a.AikaaraChatBubble;exports.AikaaraChatHeader=a.AikaaraChatHeader;exports.AikaaraChatInput=a.AikaaraChatInput;exports.AikaaraChatWidget=a.AikaaraChatWidget;exports.AikaaraComparePlans=a.AikaaraComparePlans;exports.AikaaraErrorBanner=a.AikaaraErrorBanner;exports.AikaaraLinkModal=a.AikaaraLinkModal;exports.AikaaraMessageBubble=a.AikaaraMessageBubble;exports.AikaaraMessageList=a.AikaaraMessageList;exports.AikaaraModalAction=a.AikaaraModalAction;exports.AikaaraOptionList=a.AikaaraOptionList;exports.AikaaraPriceBreakdown=a.AikaaraPriceBreakdown;exports.AikaaraSchemaForm=a.AikaaraSchemaForm;exports.AikaaraServiceDetails=a.AikaaraServiceDetails;exports.AikaaraServicePicker=a.AikaaraServicePicker;exports.AikaaraSlotPicker=a.AikaaraSlotPicker;exports.AikaaraSmartEditModal=a.AikaaraSmartEditModal;exports.AikaaraStreamingMessage=a.AikaaraStreamingMessage;exports.AikaaraSubmitAction=a.AikaaraSubmitAction;exports.AikaaraSystemPill=a.AikaaraSystemPill;exports.AikaaraTemplateRenderer=a.AikaaraTemplateRenderer;exports.AikaaraTextInput=a.AikaaraTextInput;exports.AikaaraTypingIndicator=a.AikaaraTypingIndicator;exports.registerComponents=a.registerComponents;
package/dist/ui.d.ts CHANGED
@@ -822,6 +822,16 @@ declare interface ChatClientConfig extends ConnectionConfig {
822
822
  conversationId?: string;
823
823
  systemPromptId?: number;
824
824
  channel?: 'widget' | 'api' | 'sidekick';
825
+ /**
826
+ * Persist the conversation under a user/context-specific local-storage key
827
+ * instead of the legacy origin-wide `aikaara_conversation_id`. Hosts that
828
+ * can host more than one identity or thread on the same origin (e.g. one
829
+ * thread per PAN) must supply this so a cached conversation can never be
830
+ * replayed for a different user/scope.
831
+ */
832
+ conversationScope?: string;
833
+ /** Persist the conversation id in local storage. Defaults to `true`. */
834
+ persistConversation?: boolean;
825
835
  /**
826
836
  * Transport selection.
827
837
  * - `aikaara` (default): ActionCable to Aikaara Rails (AI streaming).
@@ -862,6 +872,16 @@ declare interface ChatClientConfig_2 extends ConnectionConfig_2 {
862
872
  conversationId?: string;
863
873
  systemPromptId?: number;
864
874
  channel?: 'widget' | 'api' | 'sidekick';
875
+ /**
876
+ * Persist the conversation under a user/context-specific local-storage key
877
+ * instead of the legacy origin-wide `aikaara_conversation_id`. Hosts that
878
+ * can host more than one identity or thread on the same origin (e.g. one
879
+ * thread per PAN) must supply this so a cached conversation can never be
880
+ * replayed for a different user/scope.
881
+ */
882
+ conversationScope?: string;
883
+ /** Persist the conversation id in local storage. Defaults to `true`. */
884
+ persistConversation?: boolean;
865
885
  /**
866
886
  * Transport selection.
867
887
  * - `aikaara` (default): ActionCable to Aikaara Rails (AI streaming).
package/dist/ui.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { I as i, J as s, K as e, a as k, c as A, d as t, e as o, L as n, f as l, N as d, g as m, h as c, O as C, P as p, Q as g, R as S, U as h, V as M, W as P, X as b, i as u, Y as B, Z as I, _ as L, $ as f, j as T, r as v } from "./MountTenant-BAwzMvJH.mjs";
1
+ import { I as i, J as s, K as e, a as k, c as A, d as t, e as o, L as n, f as l, N as d, g as m, h as c, O as C, P as p, Q as g, R as S, U as h, V as M, W as P, X as b, i as u, Y as B, Z as I, _ as L, $ as f, j as T, r as v } from "./MountTenant-87j806vN.mjs";
2
2
  export {
3
3
  i as AikaaraCallConfirmation,
4
4
  s as AikaaraCallUpload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aikaara/chat-sdk",
3
- "version": "1.5.30",
3
+ "version": "1.5.32",
4
4
  "type": "module",
5
5
  "description": "Aikaara Chat SDK — embeddable chat widget and headless client",
6
6
  "license": "MIT",