@unisphere/genie-types 1.37.0 → 1.38.3
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 +46 -1
- package/package.json +1 -1
- package/src/lib/avatar-runtime/runtime-types.d.ts +5 -0
- package/src/lib/avatar-runtime/runtime-visuals/head-floater-visual-types.d.ts +11 -0
- package/src/lib/avatar-runtime/shared-types.d.ts +5 -0
- package/src/lib/chat-customizations-types.d.ts +13 -0
- package/src/lib/chat-runtime/shared-settings.d.ts +4 -1
- package/src/lib/shared/chat-thread-service-types.d.ts +4 -1
- package/src/lib/shared/genie-chat-service-types.d.ts +4 -1
package/index.esm.js
CHANGED
|
@@ -1515,6 +1515,11 @@ const chatCustomizationSchema = {
|
|
|
1515
1515
|
type: 'primitive',
|
|
1516
1516
|
value: 'boolean',
|
|
1517
1517
|
optional: true
|
|
1518
|
+
},
|
|
1519
|
+
linkTarget: {
|
|
1520
|
+
type: 'primitive',
|
|
1521
|
+
value: 'string',
|
|
1522
|
+
optional: true
|
|
1518
1523
|
}
|
|
1519
1524
|
}
|
|
1520
1525
|
},
|
|
@@ -1637,6 +1642,33 @@ const chatCustomizationSchema = {
|
|
|
1637
1642
|
}
|
|
1638
1643
|
}
|
|
1639
1644
|
},
|
|
1645
|
+
uiControls: {
|
|
1646
|
+
type: 'object',
|
|
1647
|
+
optional: true,
|
|
1648
|
+
allowUnknownProperties: true,
|
|
1649
|
+
properties: {
|
|
1650
|
+
modalSelector: {
|
|
1651
|
+
type: 'object',
|
|
1652
|
+
optional: true,
|
|
1653
|
+
properties: {
|
|
1654
|
+
visible: {
|
|
1655
|
+
type: 'primitive',
|
|
1656
|
+
value: 'boolean'
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
contextSelector: {
|
|
1661
|
+
type: 'object',
|
|
1662
|
+
optional: true,
|
|
1663
|
+
properties: {
|
|
1664
|
+
visible: {
|
|
1665
|
+
type: 'primitive',
|
|
1666
|
+
value: 'boolean'
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1640
1672
|
thread: {
|
|
1641
1673
|
type: 'object',
|
|
1642
1674
|
optional: true,
|
|
@@ -3372,7 +3404,20 @@ const avatarRuntimeHeadFloaterVisualSettingsSchema = {
|
|
|
3372
3404
|
type: 'literal',
|
|
3373
3405
|
value: '1',
|
|
3374
3406
|
optional: true
|
|
3375
|
-
}
|
|
3407
|
+
},
|
|
3408
|
+
controls: {
|
|
3409
|
+
type: 'object',
|
|
3410
|
+
optional: true,
|
|
3411
|
+
properties: {
|
|
3412
|
+
onMount: {
|
|
3413
|
+
type: 'function'
|
|
3414
|
+
},
|
|
3415
|
+
onUnMount: {
|
|
3416
|
+
type: 'function'
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
},
|
|
3420
|
+
connect: avatarRuntimeConnectSettingsSchema
|
|
3376
3421
|
}
|
|
3377
3422
|
};
|
|
3378
3423
|
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { UnisphereRuntimeBaseType } from '@unisphere/runtime';
|
|
|
3
3
|
import { widgetName } from '../widget-types';
|
|
4
4
|
import { ChatContext, GenieCapabilities } from '../chat-runtime/shared-settings';
|
|
5
5
|
import { AgentScreenShareInfo, AgentTapToTalkInfo, AvatarConnectionStatus, CaptionConfig, CaptionState } from './shared-types';
|
|
6
|
+
import { ChatEntry } from './chat-types';
|
|
6
7
|
/** Runtime name constant for avatar experiences */
|
|
7
8
|
export declare const AvatarRuntimeName: "avatar";
|
|
8
9
|
export interface Captions {
|
|
@@ -78,6 +79,8 @@ export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
|
|
|
78
79
|
setThreadId(id: string | null): void;
|
|
79
80
|
/** Sync preview mode flag from the chat customization settings */
|
|
80
81
|
setIsPreviewMode(value: boolean): void;
|
|
82
|
+
/** Sync context selector visibility from the chat customization settings */
|
|
83
|
+
setContextSelectorVisible(value: boolean): void;
|
|
81
84
|
/** Observable mute state */
|
|
82
85
|
isMuted: TinyDataStoreConsumer<boolean>;
|
|
83
86
|
/** Mute the avatar audio */
|
|
@@ -88,6 +91,8 @@ export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
|
|
|
88
91
|
askViaText(question: string): void;
|
|
89
92
|
/** Update dynamic variables */
|
|
90
93
|
updateDynamicVariables(variables: Record<string, unknown>): void;
|
|
94
|
+
/** Observable chat log entries */
|
|
95
|
+
chatLog: TinyDataStoreConsumer<ChatEntry[]>;
|
|
91
96
|
};
|
|
92
97
|
/** Event emitted when the avatar brain invokes a tool call */
|
|
93
98
|
export interface AvatarToolCallEvent {
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { ValidatorSchema } from '@unisphere/core';
|
|
2
|
+
import { AvatarRuntimeConnectSettings } from '../shared-types';
|
|
2
3
|
export interface AvatarRuntimeHeadFloaterVisualSettings {
|
|
3
4
|
schemaVersion?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Host-attached UI controls (e.g. mute, closed captions, end call)
|
|
7
|
+
* rendered around the floater circle and dragged along with it.
|
|
8
|
+
* Host renders into the given container id, notified via `onMount`/`onUnMount`.
|
|
9
|
+
*/
|
|
10
|
+
controls?: {
|
|
11
|
+
onMount: (containerId: string) => void;
|
|
12
|
+
onUnMount: (containerId: string) => void;
|
|
13
|
+
} | null;
|
|
14
|
+
connect?: AvatarRuntimeConnectSettings;
|
|
4
15
|
}
|
|
5
16
|
export declare const avatarRuntimeHeadFloaterVisualSettingsSchema: ValidatorSchema;
|
|
@@ -340,6 +340,8 @@ export interface AvatarClientManagerType {
|
|
|
340
340
|
};
|
|
341
341
|
onThreadIdChange?: (threadId: string) => void;
|
|
342
342
|
dynamicVariables?: Record<string, unknown>;
|
|
343
|
+
/** Overrides runtime-settings `features.kickOffPhrase` for this connection only */
|
|
344
|
+
kickOffPhrase?: string;
|
|
343
345
|
}): void;
|
|
344
346
|
/** Tear down the current connection */
|
|
345
347
|
disconnect(): void;
|
|
@@ -408,6 +410,9 @@ export interface AvatarClientManagerType {
|
|
|
408
410
|
/** Observable preview mode flag */
|
|
409
411
|
readonly isPreviewMode: TinyDataStoreConsumer<boolean>;
|
|
410
412
|
setIsPreviewMode(value: boolean): void;
|
|
413
|
+
/** Observable context selector visibility */
|
|
414
|
+
readonly contextSelectorVisible: TinyDataStoreConsumer<boolean>;
|
|
415
|
+
setContextSelectorVisible(value: boolean): void;
|
|
411
416
|
/** Observable feature flags from runtime settings */
|
|
412
417
|
readonly features: TinyDataStoreConsumer<{
|
|
413
418
|
screenShare?: boolean;
|
|
@@ -46,6 +46,8 @@ export interface ChatCustomization {
|
|
|
46
46
|
useExternalPlayer?: boolean;
|
|
47
47
|
/** Indicates genie is embedded inside Kaltura Studio (preview mode) */
|
|
48
48
|
isPreviewMode?: boolean;
|
|
49
|
+
/** Target attribute for links rendered in markdown content (defaults to '_blank') */
|
|
50
|
+
linkTarget?: string;
|
|
49
51
|
};
|
|
50
52
|
/** New conversation thread settings
|
|
51
53
|
* @deprecated
|
|
@@ -83,6 +85,17 @@ export interface ChatCustomization {
|
|
|
83
85
|
} | {
|
|
84
86
|
stage: 'fullscreen';
|
|
85
87
|
};
|
|
88
|
+
/** UI controls visibility */
|
|
89
|
+
uiControls?: {
|
|
90
|
+
/** Show/hide the AI model selector (Fast/Smart). Default: true */
|
|
91
|
+
modalSelector?: {
|
|
92
|
+
visible: boolean;
|
|
93
|
+
};
|
|
94
|
+
/** Show/hide the context selector chip and add-context button. Default: true */
|
|
95
|
+
contextSelector?: {
|
|
96
|
+
visible: boolean;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
86
99
|
/** thread configuration */
|
|
87
100
|
thread?: {
|
|
88
101
|
/** enabled by default */
|
|
@@ -151,7 +151,10 @@ export interface GlobalChatSettings {
|
|
|
151
151
|
type?: 'entry';
|
|
152
152
|
entryId: string;
|
|
153
153
|
startTime?: number;
|
|
154
|
-
}) => string
|
|
154
|
+
}) => string | {
|
|
155
|
+
url: string;
|
|
156
|
+
target: string;
|
|
157
|
+
};
|
|
155
158
|
/** Configuration for conversation sharing */
|
|
156
159
|
shareUrl?: {
|
|
157
160
|
/** Query parameter name for message ID in shared URLs */
|
|
@@ -38,7 +38,10 @@ export interface GenieChatServiceType extends UnisphereService {
|
|
|
38
38
|
/** Generate poster/thumbnail URL for video clip */
|
|
39
39
|
getClipPlayerPosterUrl: (source: ClassGenieGetClipPlayerPosterUrlData) => string;
|
|
40
40
|
/** Generate source URL for media entry with optional start time */
|
|
41
|
-
getEntrySourceUrl: (entryId: string, startTime?: number) => string
|
|
41
|
+
getEntrySourceUrl: (entryId: string, startTime?: number) => string | {
|
|
42
|
+
url: string;
|
|
43
|
+
target: string;
|
|
44
|
+
};
|
|
42
45
|
/** Observable for submitting questions and getting AI answers */
|
|
43
46
|
getAnswer: TinyPubSub<{
|
|
44
47
|
/** Question text to ask */
|