obi-sdk 0.19.53-beta.1 → 0.19.53-beta.11

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.
@@ -17,6 +17,10 @@ type StartSessionDialogProps = {
17
17
  * When true, shows a loading spinner on the start button and disables it.
18
18
  */
19
19
  isStarting?: boolean;
20
+ /**
21
+ * Optional override for the greeting video asset shown in AgentStill.
22
+ */
23
+ greetingVideoSrc?: string;
20
24
  };
21
25
  export declare function StartSessionDialog(props: StartSessionDialogProps): import("react/jsx-runtime").JSX.Element;
22
26
  export type { StartSessionDialogProps };
@@ -1 +1,2 @@
1
+ export declare function shouldUseWidgetV2(): boolean;
1
2
  export declare function mountWidget(sdk?: any): void;
package/dist/src/sdk.d.ts CHANGED
@@ -4,6 +4,7 @@ import type { Identity } from "@obi/obi-client";
4
4
  import { Command, CommandType, Config } from "./types";
5
5
  export declare const PLAN_URL_PARAM = "49206C6F7665204F6269_session";
6
6
  export declare const STORAGE_KEY = "obi-url-params";
7
+ export declare const HEARTBEAT_STORAGE_KEY = "obi-client-heartbeat";
7
8
  export type ObiSDKEvents = {
8
9
  initialised: () => void;
9
10
  error: (err: Error) => void;
@@ -30,6 +31,7 @@ export declare class ObiSDK extends EventEmitter<ObiSDKEvents> {
30
31
  private commandQueue;
31
32
  /** HACK: Need to prevent initialisation from being called if resumed. */
32
33
  private _resumed;
34
+ private heartbeatInterval;
33
35
  /**
34
36
  * Creates a client that should persist for the lifetime of the SDK.
35
37
  * Resumes an ongoing session if one exists.
@@ -108,4 +110,14 @@ export declare class ObiSDK extends EventEmitter<ObiSDKEvents> {
108
110
  captureScreen(): Promise<string>;
109
111
  save(): void;
110
112
  load(): string | null;
113
+ private parsePersistedSessionMetadata;
114
+ private isPersistedSessionStale;
115
+ private parseTimestampMs;
116
+ private readHeartbeat;
117
+ private trackStaleSessionDiscard;
118
+ private startHeartbeat;
119
+ private stopHeartbeat;
120
+ private writeHeartbeat;
121
+ private clearHeartbeat;
122
+ private clearCachedClient;
111
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obi-sdk",
3
- "version": "0.19.53-beta.1",
3
+ "version": "0.19.53-beta.11",
4
4
  "description": "JavaScript SDK for Obi",
5
5
  "type": "module",
6
6
  "main": "dist/obi-sdk.umd.js",