@unisphere/genie-types 1.47.4 → 1.48.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.
package/index.esm.js CHANGED
@@ -2628,9 +2628,11 @@ const avatarRuntimeSettingsSchema = {
2628
2628
  value: 'manual',
2629
2629
  optional: true
2630
2630
  },
2631
+ // Legacy fallback host, used only when conversation-manager sends no TURN credentials (SECF-30947).
2631
2632
  turnServerUrl: {
2632
2633
  type: 'primitive',
2633
- value: 'string'
2634
+ value: 'string',
2635
+ optional: true
2634
2636
  },
2635
2637
  srsBaseUrl: {
2636
2638
  type: 'primitive',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.47.4",
3
+ "version": "1.48.0",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "types": "./src/index.d.ts",
11
11
  "dependencies": {
12
- "@kaltura-sdk/rtc-core": "^1.26.2",
13
- "@unisphere/core": "^1.101.2",
12
+ "@kaltura-sdk/rtc-core": "^1.27.0",
13
+ "@unisphere/core": "^1.103.0",
14
14
  "@unisphere/runtime": "^1.98.0",
15
15
  "@unisphere/runtime-js": "^1.98.0"
16
16
  },
@@ -120,8 +120,12 @@ export interface AvatarToolCallEvent {
120
120
  args: Record<string, unknown>;
121
121
  }
122
122
  export type AvatarServerConfig = {
123
- /** TURN server URL for WebRTC connectivity */
124
- turnServerUrl: string;
123
+ /**
124
+ * TURN host (no scheme or port) for the legacy static-credentials fallback. Used only when
125
+ * conversation-manager sends no TURN credentials; otherwise its credentials replace it.
126
+ * @deprecated Temporary (SECF-30947); remove once every conversation-manager sends TURN credentials.
127
+ */
128
+ turnServerUrl?: string;
125
129
  /** Avatar service server URL */
126
130
  serverUrl: string;
127
131
  /** SRS (Simple Realtime Server) base URL for media streaming */
@@ -102,6 +102,25 @@ export type AgentProgressBar = {
102
102
  subSteps?: number;
103
103
  /** 1-based part the user is on now; only set together with subSteps */
104
104
  currentSubStep?: number;
105
+ /** Every screen of the lesson, in order; switches the bar to one segment per screen with navigation */
106
+ screens?: AgentProgressBarScreen[];
107
+ /** 1-based screen where the student stopped; set together with screens */
108
+ currentScreen?: number;
109
+ /** 1-based screen shown now, at most currentScreen; lower while reviewing a previous screen */
110
+ viewingScreen?: number;
111
+ };
112
+ /**
113
+ * One lesson screen of the progress bar
114
+ */
115
+ export type AgentProgressBarScreen = {
116
+ /** 1-based step (milestone) the screen belongs to */
117
+ step: number;
118
+ /** Activity type shown in the hover card, e.g. "Quiz" */
119
+ kind?: string;
120
+ /** Question or title shown in the hover card */
121
+ title?: string;
122
+ /** The student answered this screen's question */
123
+ answered?: boolean;
105
124
  };
106
125
  /**
107
126
  * Tap-to-talk mode state
@@ -263,8 +282,6 @@ export interface AvatarConnectionProxyType {
263
282
  readonly sessionId: TinyDataStoreConsumer<string | null>;
264
283
  /** Observable cast mode from server */
265
284
  readonly castMode: TinyDataStoreConsumer<string | null>;
266
- /** Observable TURN server URL */
267
- readonly turnServerURL: TinyDataStoreConsumer<string | null>;
268
285
  /** Observable content data */
269
286
  readonly content: TinyDataStoreConsumer<AvatarContentData | null>;
270
287
  /** Observable agent state and analytics */
@@ -366,8 +383,6 @@ export interface AvatarClientManagerType {
366
383
  readonly sessionId: TinyDataStoreConsumer<string | null>;
367
384
  /** Observable cast mode from server */
368
385
  readonly castMode: TinyDataStoreConsumer<string | null>;
369
- /** Observable TURN server URL */
370
- readonly turnServerURL: TinyDataStoreConsumer<string | null>;
371
386
  /** Observable disconnect information */
372
387
  readonly disconnectData: TinyDataStoreConsumer<{
373
388
  reason: DisconnectReasons;
@@ -443,6 +458,8 @@ export interface AvatarClientManagerType {
443
458
  toggleKalturaContext(active: boolean): void;
444
459
  /** Update dynamic variables sent to the agent */
445
460
  updateDynamicVariables(data: Record<string, unknown>): void;
461
+ /** Replace the variables visuals send to the agent (see AvatarVisualBridgeType.setRequestVariable) */
462
+ updateVisualVariables(data: Record<string, string>): void;
446
463
  /** Register client-side tool handlers */
447
464
  registerClientTools(config: Record<string, unknown>): void;
448
465
  /** Unregister client-side tool handlers by name */
@@ -498,6 +515,12 @@ export interface AvatarClientManagerType {
498
515
  readonly devicesList: TinyDataStoreConsumer<UserDevicesList | null>;
499
516
  joinSTV(videoContainerId: string, sessionId: string, stvUrl: string, onConnected: () => void): Promise<void>;
500
517
  leaveSTV(): void;
518
+ /** Latest server-issued TURN credentials; read at connection time, never cache or log them. */
519
+ getTurnCredentials(): {
520
+ url: string;
521
+ username: string;
522
+ credential: string;
523
+ } | null;
501
524
  changeDevice(deviceType: DeviceType, deviceId: string): Promise<boolean>;
502
525
  toggleMuteAudio(muted: boolean): Promise<void>;
503
526
  onPlayerReady(): void;
@@ -68,4 +68,6 @@ export interface AvatarVisualBridgeType extends UnisphereVisualBridgeType<Visual
68
68
  readonly agentBehavior: TinyDataStoreConsumer<AgentBehavior | null>;
69
69
  setAgentBehavior(patch: AgentBehavior): void;
70
70
  clearAgentBehavior(): void;
71
+ setRequestVariable(name: string, value: string | null): void;
72
+ getRequestVariable(name: string): string | null;
71
73
  }
@@ -49,7 +49,6 @@ export interface ChatBranding {
49
49
  * ```typescript
50
50
  * const integration: AvatarIntegration = {
51
51
  * type: 'config',
52
- * turnServerUrl: 'https://turn.example.com',
53
52
  * serverUrl: 'https://avatar.example.com',
54
53
  * srsBaseUrl: 'https://srs.example.com',
55
54
  * clientId: 'client-123',
@@ -70,8 +69,12 @@ export interface ChatBranding {
70
69
  export type AvatarIntegration = {
71
70
  /** Configuration type: 'config' for manual setup */
72
71
  type: 'config';
73
- /** TURN server URL for WebRTC */
74
- turnServerUrl: string;
72
+ /**
73
+ * TURN host for the legacy static-credentials fallback, used only when conversation-manager
74
+ * sends no TURN credentials.
75
+ * @deprecated Temporary (SECF-30947); remove once every conversation-manager sends TURN credentials.
76
+ */
77
+ turnServerUrl?: string;
75
78
  /** Avatar service server URL */
76
79
  serverUrl: string;
77
80
  /** SRS (Simple Realtime Server) base URL */