@alxxsck/ai-assistant 2.18.0 → 2.21.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.
Files changed (32) hide show
  1. package/README.md +34 -7
  2. package/dist/App.d.ts +2 -0
  3. package/dist/{Avatar-DNRiUnuW.js → Avatar-CI9_caGl.js} +1 -1
  4. package/dist/{ChatWidgetContent-CWarBHsS.js → ChatWidgetContent-CBWyqiVF.js} +1873 -1700
  5. package/dist/api/messages.api.d.ts +11 -5
  6. package/dist/api/messages.api.types.d.ts +4 -0
  7. package/dist/bridge-ai-chat-widget.es.js +1 -1
  8. package/dist/context/ChatWidgetContext.d.ts +3 -0
  9. package/dist/domain/command/CommandRuntime.d.ts +26 -3
  10. package/dist/domain/command/command.types.d.ts +6 -0
  11. package/dist/domain/message/cable/CableContext.d.ts +2 -0
  12. package/dist/domain/message/cable/widget-frame.d.ts +1 -1
  13. package/dist/domain/message/chat-experience.d.ts +0 -9
  14. package/dist/domain/message/message.store.d.ts +18 -9
  15. package/dist/domain/message/typing/end-user-typing.client.d.ts +38 -0
  16. package/dist/domain/scenario-interaction/ScenarioInteractionCollector.d.ts +91 -0
  17. package/dist/domain/scenario-interaction/ScenarioInteractionRuntime.d.ts +28 -0
  18. package/dist/domain/scenario-interaction/SurfaceController.d.ts +13 -0
  19. package/dist/domain/scenario-interaction/presentation-observer.d.ts +12 -0
  20. package/dist/domain/scenario-interaction/scenario-interaction.context.d.ts +7 -0
  21. package/dist/domain/scenario-interaction/scenario-interaction.types.d.ts +84 -0
  22. package/dist/domain/scenario-interaction/useScenarioPresentation.d.ts +4 -0
  23. package/dist/domain/support-presentation/PresentationAvatarResolver.d.ts +2 -0
  24. package/dist/domain/support-presentation/support-presentation.reconciliation.d.ts +13 -0
  25. package/dist/domain/support-presentation/support-presentation.types.d.ts +15 -6
  26. package/dist/i18n/messages.d.ts +0 -1
  27. package/dist/{index-raaheNwM.js → index-o7DbTuwa.js} +7734 -5026
  28. package/dist/index.d.ts +1 -0
  29. package/dist/ui/components/ChatResponderIdentity.d.ts +2 -2
  30. package/dist/ui/components/PresentationAvatar.d.ts +4 -5
  31. package/dist/ui/hooks/usePresentedResponderPresentation.d.ts +10 -0
  32. package/package.json +1 -1
@@ -3,18 +3,24 @@ export type PresentationAvatarAsset = Readonly<{
3
3
  version: number;
4
4
  }>;
5
5
  export type MessageAuthorPresentation = Readonly<{
6
+ /** Internal provenance marker; never serialized back to the backend. */
7
+ contractState: "VERSIONED" | "LEGACY";
6
8
  displayName: string;
7
9
  avatarAsset: PresentationAvatarAsset | null;
8
10
  presentationVersion: number | null;
9
11
  legacyAvatarUrl: string | null;
10
12
  }>;
11
- export declare const RESPONDER_MODES: readonly ["LOLA", "SUPPORT_REQUESTED", "SUPPORT_LIVE", "SUPPORT_AWAY", "LOLA_SUSPENDED"];
12
- export type ResponderMode = (typeof RESPONDER_MODES)[number];
13
+ export declare const RESPONDER_HUMAN_SUPPORT_STATES: readonly ["NONE", "ROUTING", "ASSIGNED"];
14
+ export declare const RESPONDER_AI_STATES: readonly ["ACTIVE", "SUSPENDED"];
15
+ export type ResponderHumanSupportState = (typeof RESPONDER_HUMAN_SUPPORT_STATES)[number];
16
+ export type ResponderAIState = (typeof RESPONDER_AI_STATES)[number];
13
17
  export type ResponderIdentity = "LOLA" | "SUPPORT";
14
18
  export type ResponderSourceRevisions = Readonly<{
15
19
  conversationUpdatedAt: string;
16
20
  escalationVersionSum: string;
17
21
  escalationUpdatedAt: string | null;
22
+ assignmentVersionSum: string;
23
+ assignmentUpdatedAt: string | null;
18
24
  aiSuspensionVersion: string | null;
19
25
  aiSuspensionUpdatedAt: string | null;
20
26
  lolaPresentationVersion: number | null;
@@ -22,8 +28,9 @@ export type ResponderSourceRevisions = Readonly<{
22
28
  avatarAssetUpdatedAt: string | null;
23
29
  }>;
24
30
  export type ResponderPresentation = Readonly<{
25
- schemaVersion: 1;
26
- mode: ResponderMode;
31
+ schemaVersion: 2;
32
+ humanSupport: ResponderHumanSupportState;
33
+ ai: ResponderAIState;
27
34
  identity: ResponderIdentity;
28
35
  displayName: string;
29
36
  avatarAsset: PresentationAvatarAsset | null;
@@ -35,8 +42,9 @@ export type ResponderPresentation = Readonly<{
35
42
  }>;
36
43
  export type SafeResponderPresentation = Readonly<{
37
44
  contractState: "CURRENT" | "LEGACY" | "INCOMPATIBLE";
38
- schemaVersion: 0 | 1;
39
- mode: ResponderMode | "UNKNOWN";
45
+ schemaVersion: 0 | 2;
46
+ humanSupport: ResponderHumanSupportState | "UNKNOWN";
47
+ ai: ResponderAIState | "UNKNOWN";
40
48
  identity: ResponderIdentity;
41
49
  displayName: string | null;
42
50
  avatarAsset: PresentationAvatarAsset | null;
@@ -48,6 +56,7 @@ export type SafeResponderPresentation = Readonly<{
48
56
  }>;
49
57
  export declare const LEGACY_RESPONDER_PRESENTATION: SafeResponderPresentation;
50
58
  export declare const INCOMPATIBLE_RESPONDER_PRESENTATION: SafeResponderPresentation;
59
+ export declare const isCanonicalResponderRevision: (value: unknown) => value is string;
51
60
  export declare function parseMessageAuthorPresentation(value: unknown): MessageAuthorPresentation | null;
52
61
  export declare function parseResponderPresentation(value: unknown): ResponderPresentation | null;
53
62
  export declare function normalizeResponderPresentation(value: unknown): SafeResponderPresentation;
@@ -27,7 +27,6 @@ declare const en: {
27
27
  readonly system: "System";
28
28
  readonly aiAssistant: "AI assistant";
29
29
  readonly waiting: "Waiting for a specialist";
30
- readonly live: "Specialist is here";
31
30
  readonly away: "We’ll reply here";
32
31
  readonly paused: "AI is paused";
33
32
  readonly unavailable: "Support status unavailable";