@unisphere/genie-types 1.27.0-head.2 → 1.28.0-head.4
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 +30 -2
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/avatar-runtime/visual-bridge-types.d.ts +5 -0
- package/src/lib/chat-thread-runtime/index.d.ts +2 -0
- package/src/lib/chat-thread-runtime/runtime-types.d.ts +15 -0
- package/src/lib/chat-thread-runtime/runtime-visuals/contained-visual-types.d.ts +5 -0
- package/src/lib/shared/chat-thread-service-types.d.ts +20 -0
- package/src/lib/shared/genie-chat-service-types.d.ts +2 -0
- package/src/lib/shared/index.d.ts +1 -0
package/index.esm.js
CHANGED
|
@@ -2044,7 +2044,7 @@ addToUnscopables$1('includes');
|
|
|
2044
2044
|
them forever.
|
|
2045
2045
|
new tools will automatically use their relevant widget names
|
|
2046
2046
|
*/
|
|
2047
|
-
const GENIE_RUNTIMES = ['followups-tool', 'sources-tool', 'flashcards-tool', 'content-gallery-tool', 'user-properties-form-tool'];
|
|
2047
|
+
const GENIE_RUNTIMES = ['followups-tool', 'sources-tool', 'flashcards-tool', 'content-gallery-tool', 'user-properties-form-tool', 'data-visualization-tool'];
|
|
2048
2048
|
const GEN_UI_RUNTIMES = ['gen-ui-composer-tool', 'gen-ui-components-tool'];
|
|
2049
2049
|
/* End of closed list */
|
|
2050
2050
|
const getResolvedWidgetName = params => {
|
|
@@ -3307,4 +3307,32 @@ const blockVisualContextSchema = {
|
|
|
3307
3307
|
}
|
|
3308
3308
|
};
|
|
3309
3309
|
|
|
3310
|
-
|
|
3310
|
+
const ChatThreadRuntimeName = 'chat-thread';
|
|
3311
|
+
const chatThreadRuntimeSettingsSchema = {
|
|
3312
|
+
type: 'object',
|
|
3313
|
+
properties: {
|
|
3314
|
+
schemaVersion: {
|
|
3315
|
+
type: 'literal',
|
|
3316
|
+
value: '1',
|
|
3317
|
+
optional: true
|
|
3318
|
+
},
|
|
3319
|
+
threadId: {
|
|
3320
|
+
type: 'primitive',
|
|
3321
|
+
value: 'string'
|
|
3322
|
+
},
|
|
3323
|
+
getSourceUrl: getSourceUrlSchema
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
const chatThreadRuntimeContainedVisualSettingsSchema = {
|
|
3328
|
+
type: 'object',
|
|
3329
|
+
properties: {
|
|
3330
|
+
schemaVersion: {
|
|
3331
|
+
type: 'literal',
|
|
3332
|
+
value: '1',
|
|
3333
|
+
optional: true
|
|
3334
|
+
}
|
|
3335
|
+
}
|
|
3336
|
+
};
|
|
3337
|
+
|
|
3338
|
+
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, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, resolveActiveContextType, schemaVersionSchema, shareUrlSchema, widgetName };
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export interface LayoutConfig {
|
|
|
18
18
|
type: LayoutType;
|
|
19
19
|
background?: string;
|
|
20
20
|
}
|
|
21
|
+
export interface ChatConfig {
|
|
22
|
+
disableInput?: boolean;
|
|
23
|
+
}
|
|
21
24
|
export interface VisualBehavior {
|
|
22
25
|
pauseAfterSpeaking?: boolean;
|
|
23
26
|
pauseImmediately?: boolean;
|
|
@@ -25,10 +28,12 @@ export interface VisualBehavior {
|
|
|
25
28
|
export interface VisualTypeConfig {
|
|
26
29
|
behavior?: VisualBehavior;
|
|
27
30
|
layout?: LayoutConfig;
|
|
31
|
+
chat?: ChatConfig;
|
|
28
32
|
slots?: Partial<Record<SlotType, SlotConfig>>;
|
|
29
33
|
}
|
|
30
34
|
export interface ResolvedCapabilities {
|
|
31
35
|
layout?: LayoutConfig;
|
|
36
|
+
chat?: ChatConfig;
|
|
32
37
|
slots: Partial<Record<SlotType, SlotEntry[]>>;
|
|
33
38
|
}
|
|
34
39
|
export interface ActionContext {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ValidatorSchema } from '@unisphere/core';
|
|
2
|
+
import { UnisphereRuntimeBaseType } from '@unisphere/runtime';
|
|
3
|
+
import { widgetName } from '../widget-types';
|
|
4
|
+
import { GlobalChatSettings } from '../chat-runtime/shared-settings';
|
|
5
|
+
export declare const ChatThreadRuntimeName: "chat-thread";
|
|
6
|
+
export type ChatThreadRuntime = UnisphereRuntimeBaseType<ChatThreadRuntimeSettings> & {
|
|
7
|
+
readonly widgetName: typeof widgetName;
|
|
8
|
+
readonly runtimeName: typeof ChatThreadRuntimeName;
|
|
9
|
+
};
|
|
10
|
+
export interface ChatThreadRuntimeSettings {
|
|
11
|
+
schemaVersion?: string;
|
|
12
|
+
threadId: string;
|
|
13
|
+
getSourceUrl?: GlobalChatSettings['getSourceUrl'];
|
|
14
|
+
}
|
|
15
|
+
export declare const chatThreadRuntimeSettingsSchema: ValidatorSchema;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UnisphereService } from '@unisphere/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* Genie chat service interface providing chat functionality and media integration.
|
|
4
|
+
*
|
|
5
|
+
* This service enables AI chat interactions, manages conversation state,
|
|
6
|
+
* and integrates with Kaltura media players.
|
|
7
|
+
*/
|
|
8
|
+
export interface ChatThreadServiceType extends UnisphereService {
|
|
9
|
+
/** Service identifier */
|
|
10
|
+
id: 'unisphere.widget.genie.thread';
|
|
11
|
+
/** Generate a URL for a media entry source */
|
|
12
|
+
getSourceUrl?: (params: {
|
|
13
|
+
type: 'category';
|
|
14
|
+
categoryId: string;
|
|
15
|
+
} | {
|
|
16
|
+
type?: 'entry';
|
|
17
|
+
entryId: string;
|
|
18
|
+
startTime?: number;
|
|
19
|
+
}) => string;
|
|
20
|
+
}
|
|
@@ -52,6 +52,8 @@ export interface GenieChatServiceType extends UnisphereService {
|
|
|
52
52
|
/** Block ID for retry operations */
|
|
53
53
|
retryBlockId?: string;
|
|
54
54
|
}>;
|
|
55
|
+
activeThreadId: TinyDataStoreConsumer<string | null>;
|
|
56
|
+
setActiveThreadId: (id: string | null) => void;
|
|
55
57
|
/** Observable for fetching thread messages */
|
|
56
58
|
getThreadMessages: TinyPubSub<{
|
|
57
59
|
/** Optional thread ID to fetch messages from */
|