@unisphere/genie-types 1.14.0 → 1.16.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 +97 -6
- package/package.json +2 -2
- package/src/lib/avatar-runtime/avatar-service-types.d.ts +1 -0
- package/src/lib/avatar-runtime/lobby-visual-types.d.ts +2 -0
- package/src/lib/avatar-runtime/runtime-types.d.ts +2 -0
- package/src/lib/chat-runtime/runtime-flavors/runtime-player-plugin-types.d.ts +1 -1
- package/src/lib/chat-runtime/runtime-flavors/runtime-types.d.ts +3 -1
- package/src/lib/content-gallery-tool-runtime/avatar-visual-types.d.ts +2 -2
- package/src/lib/gen-ui-components-tool-runtime/index.d.ts +2 -0
- package/src/lib/gen-ui-components-tool-runtime/login-visual-types.d.ts +9 -0
- package/src/lib/gen-ui-components-tool-runtime/questions-presets-visual-types.d.ts +9 -0
- package/src/lib/gen-ui-composer-tool-runtime/avatar-visual-types.d.ts +1 -0
- package/src/lib/shared/chat-customizations-types.d.ts +6 -0
- package/src/lib/types.d.ts +1 -1
package/index.esm.js
CHANGED
|
@@ -62,7 +62,14 @@ const chatRuntimeSettingsSchema = {
|
|
|
62
62
|
genieServerUrl: {
|
|
63
63
|
type: 'primitive',
|
|
64
64
|
value: 'string',
|
|
65
|
-
optional: true
|
|
65
|
+
optional: true,
|
|
66
|
+
preferDefault: true
|
|
67
|
+
},
|
|
68
|
+
agenticServerUrl: {
|
|
69
|
+
type: 'primitive',
|
|
70
|
+
value: 'string',
|
|
71
|
+
optional: true,
|
|
72
|
+
preferDefault: true
|
|
66
73
|
},
|
|
67
74
|
partnerId: {
|
|
68
75
|
type: 'primitive',
|
|
@@ -71,7 +78,8 @@ const chatRuntimeSettingsSchema = {
|
|
|
71
78
|
},
|
|
72
79
|
ks: {
|
|
73
80
|
type: 'primitive',
|
|
74
|
-
value: 'string'
|
|
81
|
+
value: 'string',
|
|
82
|
+
optional: true
|
|
75
83
|
},
|
|
76
84
|
kalturaServerURI: {
|
|
77
85
|
type: 'primitive',
|
|
@@ -180,7 +188,8 @@ const chatRuntimePlayerPluginSettingsSchema = {
|
|
|
180
188
|
properties: {
|
|
181
189
|
ks: {
|
|
182
190
|
type: 'primitive',
|
|
183
|
-
value: 'string'
|
|
191
|
+
value: 'string',
|
|
192
|
+
optional: true
|
|
184
193
|
},
|
|
185
194
|
schemaVersion: {
|
|
186
195
|
type: 'literal',
|
|
@@ -304,6 +313,23 @@ const chatCustomizationSchema = {
|
|
|
304
313
|
values: ['body', 'container', 'modal'],
|
|
305
314
|
optional: true
|
|
306
315
|
},
|
|
316
|
+
layouts: {
|
|
317
|
+
type: 'object',
|
|
318
|
+
optional: true,
|
|
319
|
+
allowUnknownProperties: true,
|
|
320
|
+
properties: {
|
|
321
|
+
avatar: {
|
|
322
|
+
type: 'primitive',
|
|
323
|
+
value: 'boolean',
|
|
324
|
+
optional: true
|
|
325
|
+
},
|
|
326
|
+
chat: {
|
|
327
|
+
type: 'primitive',
|
|
328
|
+
value: 'boolean',
|
|
329
|
+
optional: true
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
307
333
|
initialPage: {
|
|
308
334
|
type: 'object',
|
|
309
335
|
optional: true,
|
|
@@ -570,6 +596,9 @@ const genieAnswerVisualSettingsSchema = {
|
|
|
570
596
|
}, {
|
|
571
597
|
type: 'literal',
|
|
572
598
|
value: 'DOCUMENT'
|
|
599
|
+
}, {
|
|
600
|
+
type: 'literal',
|
|
601
|
+
value: 'EXTERNAL'
|
|
573
602
|
}],
|
|
574
603
|
optional: true
|
|
575
604
|
},
|
|
@@ -996,6 +1025,12 @@ const avatarRuntimeLobbyVisualSettingsSchema = {
|
|
|
996
1025
|
value: 'string',
|
|
997
1026
|
optional: true
|
|
998
1027
|
},
|
|
1028
|
+
style: {
|
|
1029
|
+
type: 'object',
|
|
1030
|
+
properties: {},
|
|
1031
|
+
allowUnknownProperties: true,
|
|
1032
|
+
optional: true
|
|
1033
|
+
},
|
|
999
1034
|
hideStartButton: {
|
|
1000
1035
|
type: 'primitive',
|
|
1001
1036
|
value: 'boolean',
|
|
@@ -1304,6 +1339,11 @@ const genUiComposerToolRuntimeAvatarVisualSettingsSchema = {
|
|
|
1304
1339
|
value: '1',
|
|
1305
1340
|
optional: true
|
|
1306
1341
|
},
|
|
1342
|
+
layoutHint: {
|
|
1343
|
+
type: 'primitive',
|
|
1344
|
+
value: 'string',
|
|
1345
|
+
optional: true
|
|
1346
|
+
},
|
|
1307
1347
|
layout: {
|
|
1308
1348
|
type: 'object',
|
|
1309
1349
|
optional: true,
|
|
@@ -1667,6 +1707,55 @@ const genUiComponentsToolRuntimePlayerVisualSettingsSchema = {
|
|
|
1667
1707
|
}
|
|
1668
1708
|
};
|
|
1669
1709
|
|
|
1710
|
+
const genUiComponentsToolRuntimeLoginVisualSettingsSchema = {
|
|
1711
|
+
type: 'object',
|
|
1712
|
+
properties: {
|
|
1713
|
+
schemaVersion: {
|
|
1714
|
+
type: 'literal',
|
|
1715
|
+
value: '1',
|
|
1716
|
+
optional: true
|
|
1717
|
+
},
|
|
1718
|
+
title: {
|
|
1719
|
+
type: 'primitive',
|
|
1720
|
+
value: 'string',
|
|
1721
|
+
optional: true
|
|
1722
|
+
},
|
|
1723
|
+
subtitle: {
|
|
1724
|
+
type: 'primitive',
|
|
1725
|
+
value: 'string',
|
|
1726
|
+
optional: true
|
|
1727
|
+
}
|
|
1728
|
+
}
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
const genUiComponentsToolRuntimeQuestionsPresetsVisualSettingsSchema = {
|
|
1732
|
+
type: 'object',
|
|
1733
|
+
properties: {
|
|
1734
|
+
schemaVersion: {
|
|
1735
|
+
type: 'literal',
|
|
1736
|
+
value: '1',
|
|
1737
|
+
optional: true
|
|
1738
|
+
},
|
|
1739
|
+
questions: {
|
|
1740
|
+
type: 'array',
|
|
1741
|
+
optional: true,
|
|
1742
|
+
items: {
|
|
1743
|
+
type: 'primitive',
|
|
1744
|
+
value: 'string'
|
|
1745
|
+
}
|
|
1746
|
+
},
|
|
1747
|
+
isTranslucent: {
|
|
1748
|
+
type: 'primitive',
|
|
1749
|
+
value: 'boolean',
|
|
1750
|
+
optional: true
|
|
1751
|
+
},
|
|
1752
|
+
onSelect: {
|
|
1753
|
+
type: 'function',
|
|
1754
|
+
optional: true
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
|
|
1670
1759
|
const ContentGalleryToolRuntimeName = 'content-gallery-tool';
|
|
1671
1760
|
const contentGalleryToolRuntimeSettingsSchema = {
|
|
1672
1761
|
type: 'object',
|
|
@@ -1708,7 +1797,8 @@ const clipSchema = {
|
|
|
1708
1797
|
},
|
|
1709
1798
|
entry_id: {
|
|
1710
1799
|
type: 'primitive',
|
|
1711
|
-
value: 'string'
|
|
1800
|
+
value: 'string',
|
|
1801
|
+
optional: true
|
|
1712
1802
|
},
|
|
1713
1803
|
start_time: {
|
|
1714
1804
|
type: 'primitive',
|
|
@@ -1720,7 +1810,8 @@ const clipSchema = {
|
|
|
1720
1810
|
},
|
|
1721
1811
|
type: {
|
|
1722
1812
|
type: 'primitive',
|
|
1723
|
-
value: 'string'
|
|
1813
|
+
value: 'string',
|
|
1814
|
+
optional: 'nullable'
|
|
1724
1815
|
},
|
|
1725
1816
|
thumbnail: {
|
|
1726
1817
|
type: 'primitive',
|
|
@@ -1808,4 +1899,4 @@ const contentGalleryToolRuntimeAvatarVisualSettingsSchema = {
|
|
|
1808
1899
|
}
|
|
1809
1900
|
};
|
|
1810
1901
|
|
|
1811
|
-
export { AdminDemoRuntimeName, AdminRuntimeName, AgentUnavailabilityReasons, AnswerModelEnum, AnswerTypeEnum, ApplicationRuntimeName, AvatarConnectionStatus, AvatarRuntimeName, AvatarStatus, ChatRuntimeName, ContentGalleryToolRuntimeName, DeviceType, DisconnectReasons, FlashcardsToolRuntimeName, FollowupsToolRuntimeName, GenUiComponentsToolRuntimeName, GenUiComposerToolRuntimeName, GtcAgendaListToolRuntimeName, GtcAgendaToolRuntimeName, KalturaVideoPlayerToolRuntimeName, Nvidia2026EventToolRuntimeName, SourcesToolRuntimeName, SummaryToolRuntimeName, adminDemoRuntimeSettingsSchema, adminRuntimeSettingsSchema, applicationRuntimeSettingsSchema, avatarRuntimeAgentVisualSettingsSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeLobbyVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, contentGalleryToolRuntimeAvatarVisualSettingsSchema, contentGalleryToolRuntimeSettingsSchema, flashcardsToolRuntimeSettingsSchema, followupsToolRuntimeAvatarVisualSettingsSchema, followupsToolRuntimeGenieAnswerVisualSettingsSchema, followupsToolRuntimeSettingsSchema, genUiComponentsToolRuntimeCardVisualSettingsSchema, genUiComponentsToolRuntimeMarkdownVisualSettingsSchema, genUiComponentsToolRuntimePlayerVisualSettingsSchema, genUiComponentsToolRuntimeSettingsSchema, genUiComposerToolRuntimeAvatarVisualSettingsSchema, genUiComposerToolRuntimeSettingsSchema, genieAnswerVisualSettingsSchema, getSourceUrlSchema, gtcAgendaListToolRuntimeAvatarVisualSettingsSchema, gtcAgendaListToolRuntimeSettingsSchema, gtcAgendaToolRuntimeAvatarVisualSettingsSchema, gtcAgendaToolRuntimeSettingsSchema, integrationsSchema, isAvatarConnectionProxyInternalType, kalturaVideoPlayerToolRuntimeAvatarVisualSettingsSchema, kalturaVideoPlayerToolRuntimeSettingsSchema, nvidia2026EventToolRuntimeSettingsSchema, pageVisualSettingsSchema, popupVisualSettingsSchema, shareUrlSchema, sourcesToolRuntimeGenieAnswerVisualSettingsSchema, sourcesToolRuntimeSettingsSchema, summaryToolRuntimeGenieAnswerVisualSettingsSchema, summaryToolRuntimeSettingsSchema, widgetName };
|
|
1902
|
+
export { AdminDemoRuntimeName, AdminRuntimeName, AgentUnavailabilityReasons, AnswerModelEnum, AnswerTypeEnum, ApplicationRuntimeName, AvatarConnectionStatus, AvatarRuntimeName, AvatarStatus, ChatRuntimeName, ContentGalleryToolRuntimeName, DeviceType, DisconnectReasons, FlashcardsToolRuntimeName, FollowupsToolRuntimeName, GenUiComponentsToolRuntimeName, GenUiComposerToolRuntimeName, GtcAgendaListToolRuntimeName, GtcAgendaToolRuntimeName, KalturaVideoPlayerToolRuntimeName, Nvidia2026EventToolRuntimeName, SourcesToolRuntimeName, SummaryToolRuntimeName, adminDemoRuntimeSettingsSchema, adminRuntimeSettingsSchema, applicationRuntimeSettingsSchema, avatarRuntimeAgentVisualSettingsSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeLobbyVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, contentGalleryToolRuntimeAvatarVisualSettingsSchema, contentGalleryToolRuntimeSettingsSchema, flashcardsToolRuntimeSettingsSchema, followupsToolRuntimeAvatarVisualSettingsSchema, followupsToolRuntimeGenieAnswerVisualSettingsSchema, followupsToolRuntimeSettingsSchema, genUiComponentsToolRuntimeCardVisualSettingsSchema, genUiComponentsToolRuntimeLoginVisualSettingsSchema, genUiComponentsToolRuntimeMarkdownVisualSettingsSchema, genUiComponentsToolRuntimePlayerVisualSettingsSchema, genUiComponentsToolRuntimeQuestionsPresetsVisualSettingsSchema, genUiComponentsToolRuntimeSettingsSchema, genUiComposerToolRuntimeAvatarVisualSettingsSchema, genUiComposerToolRuntimeSettingsSchema, genieAnswerVisualSettingsSchema, getSourceUrlSchema, gtcAgendaListToolRuntimeAvatarVisualSettingsSchema, gtcAgendaListToolRuntimeSettingsSchema, gtcAgendaToolRuntimeAvatarVisualSettingsSchema, gtcAgendaToolRuntimeSettingsSchema, integrationsSchema, isAvatarConnectionProxyInternalType, kalturaVideoPlayerToolRuntimeAvatarVisualSettingsSchema, kalturaVideoPlayerToolRuntimeSettingsSchema, nvidia2026EventToolRuntimeSettingsSchema, pageVisualSettingsSchema, popupVisualSettingsSchema, shareUrlSchema, sourcesToolRuntimeGenieAnswerVisualSettingsSchema, sourcesToolRuntimeSettingsSchema, summaryToolRuntimeGenieAnswerVisualSettingsSchema, summaryToolRuntimeSettingsSchema, widgetName };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unisphere/genie-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"author": "kaltura",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"types": "./src/index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@kaltura-sdk/rtc-core": "^1.25.2",
|
|
13
|
-
"@unisphere/core": "^1.
|
|
13
|
+
"@unisphere/core": "^1.95.0",
|
|
14
14
|
"@unisphere/runtime": "^1.91.0"
|
|
15
15
|
},
|
|
16
16
|
"module": "./index.esm.js",
|
|
@@ -223,6 +223,7 @@ export interface AvatarServiceType extends UnisphereService {
|
|
|
223
223
|
} | null>;
|
|
224
224
|
threadId: TinyDataStoreConsumer<string | null>;
|
|
225
225
|
setThreadId(id: string | null): void;
|
|
226
|
+
isPreviewMode: TinyDataStoreConsumer<boolean>;
|
|
226
227
|
connect(options?: {
|
|
227
228
|
threadId?: string;
|
|
228
229
|
messageId?: string;
|
|
@@ -37,6 +37,8 @@ export interface AvatarRuntimeLobbyVisualSettings {
|
|
|
37
37
|
agentButtonLabel?: string;
|
|
38
38
|
/** Agent variant only: size (width and height) of the card, e.g. '15rem' */
|
|
39
39
|
agentSize?: string;
|
|
40
|
+
/** Inline styles applied to the root container of any variant */
|
|
41
|
+
style?: Record<string, string | number>;
|
|
40
42
|
/** Hide the start conversation button (e.g. when interaction limit is exceeded) */
|
|
41
43
|
hideStartButton?: boolean;
|
|
42
44
|
}
|
|
@@ -22,6 +22,8 @@ export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
|
|
|
22
22
|
threadId: TinyDataStoreConsumer<string | null>;
|
|
23
23
|
/** Set the active conversation thread ID */
|
|
24
24
|
setThreadId(id: string | null): void;
|
|
25
|
+
/** Sync preview mode flag from the chat customization settings */
|
|
26
|
+
setIsPreviewMode(value: boolean): void;
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
27
29
|
* Configuration settings for the avatar runtime.
|
|
@@ -46,7 +46,7 @@ export interface ChatRuntimePlayerPluginSettings {
|
|
|
46
46
|
/** Media entry ID for the video being played */
|
|
47
47
|
entryId: string;
|
|
48
48
|
/** Kaltura session token for authentication */
|
|
49
|
-
ks
|
|
49
|
+
ks?: string;
|
|
50
50
|
/** Kaltura partner ID */
|
|
51
51
|
partnerId?: string;
|
|
52
52
|
/** Settings schema version */
|
|
@@ -52,13 +52,15 @@ export interface ChatRuntime extends UnisphereRuntimeBaseType<ChatRuntimeSetting
|
|
|
52
52
|
*/
|
|
53
53
|
export interface ChatRuntimeSettings {
|
|
54
54
|
/** Kaltura session token for authentication */
|
|
55
|
-
ks
|
|
55
|
+
ks?: string;
|
|
56
56
|
/** Optional initial question to display when chat starts */
|
|
57
57
|
initialQuestion?: string;
|
|
58
58
|
/** Settings schema version, defaults to '1' */
|
|
59
59
|
schemaVersion?: '1';
|
|
60
60
|
/** Genie server URL for API requests */
|
|
61
61
|
genieServerUrl?: string;
|
|
62
|
+
/** Agentic server URL for appInit */
|
|
63
|
+
agenticServerUrl?: string;
|
|
62
64
|
/** Kaltura partner ID */
|
|
63
65
|
partnerId?: string;
|
|
64
66
|
/** Media entry ID for context-aware chat */
|
|
@@ -2,10 +2,10 @@ import { ValidatorSchema } from '@unisphere/core';
|
|
|
2
2
|
export interface VideoClip {
|
|
3
3
|
start_index: number;
|
|
4
4
|
last_index: number;
|
|
5
|
-
entry_id: string;
|
|
5
|
+
entry_id: string | null;
|
|
6
6
|
start_time: number;
|
|
7
7
|
end_time: number;
|
|
8
|
-
type: string;
|
|
8
|
+
type: string | null;
|
|
9
9
|
thumbnail: string | null;
|
|
10
10
|
video_link: string | null;
|
|
11
11
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidatorSchema } from '@unisphere/core';
|
|
2
|
+
export interface GenUiComponentsToolRuntimeLoginVisualSettings {
|
|
3
|
+
schemaVersion?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
isTranslucent?: boolean;
|
|
7
|
+
onLogin?: (username: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const genUiComponentsToolRuntimeLoginVisualSettingsSchema: ValidatorSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValidatorSchema } from '@unisphere/core';
|
|
2
|
+
export interface GenUiComponentsToolRuntimeQuestionsPresetsVisualSettings {
|
|
3
|
+
schemaVersion?: string;
|
|
4
|
+
questions?: string[];
|
|
5
|
+
isTranslucent?: boolean;
|
|
6
|
+
/** Injected at render time by the runtime — not provided by the LLM. */
|
|
7
|
+
onSelect?: (question: string) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const genUiComponentsToolRuntimeQuestionsPresetsVisualSettingsSchema: ValidatorSchema;
|
|
@@ -44,6 +44,7 @@ export interface UnisphereRuntimeConfig {
|
|
|
44
44
|
}
|
|
45
45
|
export interface GenUiComposerToolRuntimeAvatarVisualSettings {
|
|
46
46
|
schemaVersion?: string;
|
|
47
|
+
layoutHint?: string;
|
|
47
48
|
layout?: GridLayout;
|
|
48
49
|
}
|
|
49
50
|
export declare const genUiComposerToolRuntimeAvatarVisualSettingsSchema: ValidatorSchema;
|
|
@@ -81,6 +81,11 @@ export interface ChatCustomization {
|
|
|
81
81
|
/** Background image configuration */
|
|
82
82
|
background?: Background;
|
|
83
83
|
};
|
|
84
|
+
/** Layout options for the chat interface */
|
|
85
|
+
layouts?: {
|
|
86
|
+
avatar?: boolean;
|
|
87
|
+
chat?: boolean;
|
|
88
|
+
};
|
|
84
89
|
}
|
|
85
90
|
/**
|
|
86
91
|
* Suggested question for initial chat page.
|
|
@@ -116,4 +121,5 @@ export type Background = {
|
|
|
116
121
|
/** Image URL */
|
|
117
122
|
url: string;
|
|
118
123
|
};
|
|
124
|
+
export type ConfiguredCustomizationValues = Pick<ChatCustomization, 'layouts' | 'initialPage'>;
|
|
119
125
|
export declare const chatCustomizationSchema: ValidatorSchema;
|
package/src/lib/types.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type CardsVideoDataType = {
|
|
|
57
57
|
/** Kaltura entry ID */
|
|
58
58
|
entry_id?: string;
|
|
59
59
|
/** Source type */
|
|
60
|
-
type?: 'CAPTION' | 'OCR' | 'DOCUMENT';
|
|
60
|
+
type?: 'CAPTION' | 'OCR' | 'DOCUMENT' | 'EXTERNAL';
|
|
61
61
|
/** Last index */
|
|
62
62
|
last_index?: number;
|
|
63
63
|
/** Start index */
|