@unisphere/genie-types 1.32.0 → 1.32.1

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
@@ -2376,6 +2376,8 @@ var DeviceType;
2376
2376
  */
2377
2377
  var AvatarConnectionStatus;
2378
2378
  (function (AvatarConnectionStatus) {
2379
+ /** No connection established yet */
2380
+ AvatarConnectionStatus["NotConnected"] = "notConnected";
2379
2381
  /** Establishing connection */
2380
2382
  AvatarConnectionStatus["Connecting"] = "connecting";
2381
2383
  /** Successfully connected */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.32.0",
3
+ "version": "1.32.1",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -2,7 +2,7 @@ import { TinyDataStoreConsumer, ValidatorSchema } from '@unisphere/core';
2
2
  import { UnisphereRuntimeBaseType } from '@unisphere/runtime';
3
3
  import { widgetName } from '../widget-types';
4
4
  import { ChatContext, GenieCapabilities } from '../chat-runtime/shared-settings';
5
- import { CaptionConfig, CaptionState } from './shared-types';
5
+ import { AvatarConnectionStatus, CaptionConfig, CaptionState } from './shared-types';
6
6
  /** Runtime name constant for avatar experiences */
7
7
  export declare const AvatarRuntimeName: "avatar";
8
8
  export interface Captions {
@@ -11,6 +11,10 @@ export interface Captions {
11
11
  setReplacements(replacements: Record<string, string> | null): void;
12
12
  setFilter(filter: ((text: string) => string) | null): void;
13
13
  }
14
+ export type DeprecatedAvatarRuntime = {
15
+ /** @deprecated Observable connection object exists */
16
+ isConnected: TinyDataStoreConsumer<boolean>;
17
+ };
14
18
  /**
15
19
  * Avatar runtime interface for interactive AI avatar experiences.
16
20
  *
@@ -31,15 +35,29 @@ export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
31
35
  }): void;
32
36
  /** Disconnect from the avatar service */
33
37
  disconnect(): void;
38
+ /** Reconnect to the avatar service */
39
+ reconnect(): void;
34
40
  /** Observable connection status */
35
- isConnected: TinyDataStoreConsumer<boolean>;
36
- /** Observable active state — true from connect() call until fully disconnected */
37
- isActive: TinyDataStoreConsumer<boolean>;
41
+ connectionStatus: TinyDataStoreConsumer<AvatarConnectionStatus>;
42
+ /** Pause the avatar interaction (interrupts avatar) */
43
+ pause(): void;
44
+ /** Pause the avatar interaction after it finishes current turn (doesn't interrupt avatar) */
45
+ pauseAfterSpeaking(): void;
46
+ /** Resume the avatar's interaction */
47
+ resume(): void;
48
+ /** Observable paused state of the avatar */
38
49
  isPaused: TinyDataStoreConsumer<boolean>;
50
+ /** Start talking in tap-to-talk mode for the avatar */
51
+ startTapToTalk(): void;
52
+ /** Stop talking tap-to-talk mode for the avatar */
53
+ endTapToTalk(): void;
54
+ /** Captions management API for the avatar runtime */
39
55
  captions: Captions;
56
+ /** Client tools registration API for the avatar runtime */
40
57
  registerClientTools<TMap extends Record<string, unknown>>(tools: {
41
58
  [K in keyof TMap]: (args: TMap[K]) => undefined | null | Record<string, unknown> | Promise<Record<string, unknown>>;
42
59
  }): void;
60
+ /** Unregister client tools by name */
43
61
  unregisterClientTools(...names: string[]): void;
44
62
  /** Observable chat panel open state */
45
63
  isChatPanelOpen: TinyDataStoreConsumer<boolean>;
@@ -15,6 +15,8 @@ export declare enum DeviceType {
15
15
  * Avatar connection lifecycle states.
16
16
  */
17
17
  export declare enum AvatarConnectionStatus {
18
+ /** No connection established yet */
19
+ NotConnected = "notConnected",
18
20
  /** Establishing connection */
19
21
  Connecting = "connecting",
20
22
  /** Successfully connected */
@@ -101,6 +103,8 @@ export type AvatarContentData<TSettings = any> = ({
101
103
  threadId?: string;
102
104
  /** Associated message ID */
103
105
  messageId?: string;
106
+ /** Associated speech ID */
107
+ speechId?: string;
104
108
  /** Optional new title for the content */
105
109
  newTitle?: string;
106
110
  /** Content type identifier */
@@ -126,6 +130,8 @@ export type AvatarContentData<TSettings = any> = ({
126
130
  threadId?: string;
127
131
  /** Associated message ID */
128
132
  messageId?: string;
133
+ /** Associated speech ID */
134
+ speechId?: string;
129
135
  /** Optional new title for the content */
130
136
  newTitle?: string;
131
137
  /** Content type identifier: a general (non tool-specific) error */
@@ -246,6 +252,8 @@ export interface AvatarConnectionProxyType {
246
252
  readonly id: string;
247
253
  /** Send text message to avatar */
248
254
  sendAskViaText(text: string): void;
255
+ /** Request the backend reprocess a turn that produced no avatar response */
256
+ sendAgentTurnRecoveryRequest(speechId: string, messageId: string): void;
249
257
  /** Terminate the avatar connection */
250
258
  destroy(): void;
251
259
  /** Start screen sharing */