@skippr/live-agent-sdk 0.43.0 → 0.45.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.
@@ -7,5 +7,6 @@ interface AccessibilityTreeResult {
7
7
  refCount: number;
8
8
  truncated: boolean;
9
9
  }
10
+ export declare function isActionBlocked(element: Element): boolean;
10
11
  export declare function buildAccessibilityTree(): AccessibilityTreeResult;
11
12
  export {};
@@ -0,0 +1,4 @@
1
+ /** Run the agent's synchronous DOM dispatch with the suppression flag raised. */
2
+ export declare function runAgentAction(dispatch: () => void): void;
3
+ /** True while the agent's synthetic DOM event is dispatching. */
4
+ export declare function isAgentActionInProgress(): boolean;
@@ -0,0 +1,2 @@
1
+ export declare function findElementByRef(ref: string): HTMLElement | null;
2
+ export declare function getRectInTopViewport(el: HTMLElement): DOMRect;
@@ -0,0 +1,8 @@
1
+ import type { AdoptionGoalMatch } from '../context/LiveAgentContext';
2
+ interface AdoptionBubbleProps {
3
+ goal: AdoptionGoalMatch;
4
+ onAttend: (goal: AdoptionGoalMatch) => void;
5
+ onDismiss: (goalId: string) => void;
6
+ }
7
+ export declare function AdoptionBubble({ goal, onAttend, onDismiss }: AdoptionBubbleProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface ActivityTarget {
2
+ element: HTMLElement;
3
+ label: string;
4
+ }
5
+ export declare function AgentActivityIndicator({ target }: {
6
+ target: ActivityTarget | null;
7
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function PageActionHandler(): import("react/jsx-runtime").JSX.Element;
@@ -5,6 +5,7 @@ export type SidebarTab = 'chat' | 'agenda';
5
5
  export type CaptureMode = 'screenshare' | 'auto';
6
6
  export interface AgentControls {
7
7
  highlight?: boolean;
8
+ actions?: boolean;
8
9
  }
9
10
  export type { AgentMode, SessionStatus };
10
11
  export interface ModuleCurrentSession {
@@ -25,6 +26,16 @@ export interface ResumableSession {
25
26
  id: string;
26
27
  agentId: string;
27
28
  }
29
+ export declare enum AdoptionGoalStatus {
30
+ Attended = "attended",
31
+ Dismissed = "dismissed"
32
+ }
33
+ export interface AdoptionGoalMatch {
34
+ goalId: string;
35
+ agentId: string;
36
+ displayMessage: string;
37
+ priority: number;
38
+ }
28
39
  export interface LiveAgentPublicValue {
29
40
  isConnected: boolean;
30
41
  isStarting: boolean;
@@ -86,5 +97,8 @@ export interface LiveAgentContextValue extends LiveAgentPublicValue {
86
97
  historyMessages: Message[];
87
98
  phasesSnapshot: unknown[];
88
99
  setPhasesSnapshot: (phases: unknown[]) => void;
100
+ adoptionGoals: AdoptionGoalMatch[];
101
+ dismissAdoptionGoal: (goalId: string) => void;
102
+ startAdoptionSession: (goal: AdoptionGoalMatch) => void;
89
103
  }
90
104
  export declare const LiveAgentContext: import("react").Context<LiveAgentContextValue | null>;
@@ -0,0 +1,14 @@
1
+ import { type AdoptionGoalMatch } from '../context/LiveAgentContext';
2
+ import type { AuthedFetch } from './useSession';
3
+ interface UseAdoptionGoalsParams {
4
+ enabled: boolean;
5
+ bearerToken: string | null;
6
+ authedFetch: AuthedFetch;
7
+ }
8
+ interface UseAdoptionGoalsResult {
9
+ goals: AdoptionGoalMatch[];
10
+ dismissGoal: (goalId: string) => void;
11
+ attendGoal: (goalId: string) => void;
12
+ }
13
+ export declare function useAdoptionGoals({ enabled, bearerToken, authedFetch, }: UseAdoptionGoalsParams): UseAdoptionGoalsResult;
14
+ export {};
@@ -19,6 +19,7 @@ export interface StartSessionOptions {
19
19
  agentId: string;
20
20
  agentControls?: AgentControls | undefined;
21
21
  existingSessionId?: string | undefined;
22
+ adoptionGoalId?: string | undefined;
22
23
  }
23
24
  export declare function useSession({ captureMode, authToken, appKey, getUserToken, userToken, onStart, onStartError, onDisconnect, }: UseSessionParams): {
24
25
  connection: LiveKitConnection | null;
@@ -27,7 +28,7 @@ export declare function useSession({ captureMode, authToken, appKey, getUserToke
27
28
  isDisconnecting: boolean;
28
29
  error: string;
29
30
  errorCode: number | null;
30
- startSession: ({ agentId, agentControls, existingSessionId }: StartSessionOptions) => Promise<void>;
31
+ startSession: ({ agentId, agentControls, existingSessionId, adoptionGoalId }: StartSessionOptions) => Promise<void>;
31
32
  pauseSession: () => Promise<void>;
32
33
  disconnect: () => Promise<void>;
33
34
  isPaused: boolean;
@@ -5,4 +5,5 @@ export declare const PRIVATE_ATTR = "data-skippr-private";
5
5
  export declare const DOM_SNAPSHOT_TOPIC = "skippr.dom-snapshot";
6
6
  export declare const DOM_EVENTS_TOPIC = "skippr.dom-events";
7
7
  export declare const HIGHLIGHT_TOPIC = "skippr.highlight";
8
+ export declare const PAGE_ACTIONS_TOPIC = "skippr.page-actions";
8
9
  export declare const NAME_MAX_CHARS = 80;
@@ -0,0 +1,3 @@
1
+ type LocationListener = () => void;
2
+ export declare function subscribeToLocationChange(listener: LocationListener): () => void;
3
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skippr/live-agent-sdk",
3
- "version": "0.43.0",
3
+ "version": "0.45.0",
4
4
  "type": "module",
5
5
  "main": "dist/esm/lib-exports.js",
6
6
  "module": "dist/esm/lib-exports.js",