@unisphere/genie-types 1.31.2 → 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 +25 -2
- package/package.json +1 -1
- package/src/lib/avatar-runtime/index.d.ts +1 -0
- package/src/lib/avatar-runtime/runtime-types.d.ts +22 -4
- package/src/lib/avatar-runtime/runtime-visuals/headless-visual-types.d.ts +5 -0
- package/src/lib/avatar-runtime/shared-types.d.ts +8 -0
- package/src/lib/chat-runtime/visuals-types.d.ts +4 -1
package/index.esm.js
CHANGED
|
@@ -1717,7 +1717,12 @@ const floaterVisualSettingsSchema = {
|
|
|
1717
1717
|
mode: modeSchema,
|
|
1718
1718
|
context: chatContextSchema,
|
|
1719
1719
|
customization: chatCustomizationSchema,
|
|
1720
|
-
dynamicVariables: dynamicVariablesSchema
|
|
1720
|
+
dynamicVariables: dynamicVariablesSchema,
|
|
1721
|
+
openingPosition: {
|
|
1722
|
+
type: 'enum',
|
|
1723
|
+
values: ['left', 'right'],
|
|
1724
|
+
optional: true
|
|
1725
|
+
}
|
|
1721
1726
|
}
|
|
1722
1727
|
};
|
|
1723
1728
|
const floaterCTAVisualSettingsSchema = {
|
|
@@ -1729,6 +1734,11 @@ const floaterCTAVisualSettingsSchema = {
|
|
|
1729
1734
|
values: ['bottom-right', 'bottom-center', 'bottom-left'],
|
|
1730
1735
|
optional: true
|
|
1731
1736
|
},
|
|
1737
|
+
openingPosition: {
|
|
1738
|
+
type: 'enum',
|
|
1739
|
+
values: ['left', 'right'],
|
|
1740
|
+
optional: true
|
|
1741
|
+
},
|
|
1732
1742
|
mode: modeSchema,
|
|
1733
1743
|
openByDefault: {
|
|
1734
1744
|
type: 'primitive',
|
|
@@ -2366,6 +2376,8 @@ var DeviceType;
|
|
|
2366
2376
|
*/
|
|
2367
2377
|
var AvatarConnectionStatus;
|
|
2368
2378
|
(function (AvatarConnectionStatus) {
|
|
2379
|
+
/** No connection established yet */
|
|
2380
|
+
AvatarConnectionStatus["NotConnected"] = "notConnected";
|
|
2369
2381
|
/** Establishing connection */
|
|
2370
2382
|
AvatarConnectionStatus["Connecting"] = "connecting";
|
|
2371
2383
|
/** Successfully connected */
|
|
@@ -3337,6 +3349,17 @@ const avatarRuntimeHeadFloaterVisualSettingsSchema = {
|
|
|
3337
3349
|
}
|
|
3338
3350
|
};
|
|
3339
3351
|
|
|
3352
|
+
const avatarRuntimeHeadlessVisualSettingsSchema = {
|
|
3353
|
+
type: 'object',
|
|
3354
|
+
properties: {
|
|
3355
|
+
schemaVersion: {
|
|
3356
|
+
type: 'literal',
|
|
3357
|
+
value: '1',
|
|
3358
|
+
optional: true
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
};
|
|
3362
|
+
|
|
3340
3363
|
const blockVisualContextSchema = {
|
|
3341
3364
|
type: 'object',
|
|
3342
3365
|
optional: true,
|
|
@@ -3393,4 +3416,4 @@ const chatThreadRuntimeContainedVisualSettingsSchema = {
|
|
|
3393
3416
|
}
|
|
3394
3417
|
};
|
|
3395
3418
|
|
|
3396
|
-
export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, ChatThreadRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeHeadFloaterVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, chatThreadRuntimeContainedVisualSettingsSchema, chatThreadRuntimeSettingsSchema, containedVisualSettingsSchema, dynamicVariablesSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, resolveActiveContextType, schemaVersionSchema, shareUrlSchema, widgetName };
|
|
3419
|
+
export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, ChatThreadRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeHeadFloaterVisualSettingsSchema, avatarRuntimeHeadlessVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, chatThreadRuntimeContainedVisualSettingsSchema, chatThreadRuntimeSettingsSchema, containedVisualSettingsSchema, dynamicVariablesSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, resolveActiveContextType, schemaVersionSchema, shareUrlSchema, widgetName };
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
36
|
-
/**
|
|
37
|
-
|
|
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 */
|
|
@@ -123,12 +123,15 @@ export interface ContainedVisualSettings extends ScrollableVisualSettings, ModeC
|
|
|
123
123
|
}
|
|
124
124
|
export interface FloaterCTAVisualSettings extends ModeContextVisualSettings {
|
|
125
125
|
position?: 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
126
|
+
openingPosition?: 'left' | 'right';
|
|
126
127
|
openByDefault?: boolean;
|
|
127
128
|
type?: 'button';
|
|
128
129
|
text?: string;
|
|
129
130
|
showIcon?: boolean;
|
|
130
131
|
}
|
|
131
|
-
export
|
|
132
|
+
export interface FloaterVisualSettings extends ModeContextVisualSettings {
|
|
133
|
+
openingPosition?: 'left' | 'right';
|
|
134
|
+
}
|
|
132
135
|
export declare const floaterVisualSettingsSchema: ValidatorSchema;
|
|
133
136
|
export declare const floaterCTAVisualSettingsSchema: ValidatorSchema;
|
|
134
137
|
export declare const containedVisualSettingsSchema: ValidatorSchema;
|