@alxxsck/ai-assistant 1.4.0 → 1.5.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.
@@ -4,7 +4,7 @@ type AckSender = (ack: CommandAck) => Promise<unknown>;
4
4
  type InternalHandlers = {
5
5
  setAssistantVisible?: (visible: boolean) => void;
6
6
  setChatOpen?: (open: boolean) => void;
7
- playAnimation?: (animation: string) => void;
7
+ playAnimation?: (animation: string, expiresAt?: string | null) => void | Promise<void>;
8
8
  showCta?: (context: CtaCommandContext) => void;
9
9
  speakText?: (context: SpeakTextCommandContext) => void | Promise<void>;
10
10
  startVoiceConversation?: (context: StartVoiceConversationCommandContext) => void | Promise<void>;
@@ -1,5 +1,5 @@
1
1
  export declare class CommandExecutionError extends Error {
2
2
  readonly code: string;
3
- readonly status: "failed" | "unsupported";
4
- constructor(code: string, status?: "failed" | "unsupported", options?: ErrorOptions);
3
+ readonly status: "failed" | "expired" | "unsupported";
4
+ constructor(code: string, status?: "failed" | "expired" | "unsupported", options?: ErrorOptions);
5
5
  }
package/dist/index.d.ts CHANGED
@@ -13,6 +13,10 @@ export declare class ChatWidgetInstance extends EventTarget {
13
13
  private pendingOpenState;
14
14
  private sendServiceMessageImpl;
15
15
  private playAnimationImpl;
16
+ private avatarLoadError;
17
+ private avatarLoadGeneration;
18
+ private readonly pendingAvatarAnimations;
19
+ private destroyed;
16
20
  private executeReactionImpl;
17
21
  private resolveAssetPath;
18
22
  private setLocaleImpl;
@@ -23,6 +27,9 @@ export declare class ChatWidgetInstance extends EventTarget {
23
27
  private init;
24
28
  private fetchAndMergeRemoteConfig;
25
29
  private onAvatarReady;
30
+ private onAvatarLoadStarted;
31
+ private onAvatarLoadFailed;
32
+ private playAvatarAnimation;
26
33
  private onSessionExpired;
27
34
  private onCommandStatus;
28
35
  private injectStyles;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alxxsck/ai-assistant",
3
3
  "private": false,
4
- "version": "1.4.0",
4
+ "version": "1.5.0",
5
5
  "description": "Embeddable chat widget for communication with Bridge AI agent",
6
6
  "type": "module",
7
7
  "main": "dist/bridge-ai-chat-widget.es.js",