@unisphere/genie-types 1.27.0-head.0 → 1.27.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 CHANGED
@@ -2038,7 +2038,7 @@ addToUnscopables$1('includes');
2038
2038
  them forever.
2039
2039
  new tools will automatically use their relevant widget names
2040
2040
  */
2041
- const GENIE_RUNTIMES = ['followups-tool', 'sources-tool', 'flashcards-tool', 'content-gallery-tool', 'user-properties-form-tool'];
2041
+ const GENIE_RUNTIMES = ['followups-tool', 'sources-tool', 'flashcards-tool', 'content-gallery-tool', 'user-properties-form-tool', 'data-visualization-tool'];
2042
2042
  const GEN_UI_RUNTIMES = ['gen-ui-composer-tool', 'gen-ui-components-tool'];
2043
2043
  /* End of closed list */
2044
2044
  const getResolvedWidgetName = params => {
@@ -2070,178 +2070,133 @@ const getResolvedRuntimeName = runtimeName => {
2070
2070
 
2071
2071
  /** Runtime name constant for avatar experiences */
2072
2072
  const AvatarRuntimeName = 'avatar';
2073
- const kalturaSchema = {
2073
+ const avatarRuntimeSettingsSchema = {
2074
2074
  type: 'object',
2075
2075
  properties: {
2076
- ks: {
2076
+ schemaVersion: {
2077
+ type: 'literal',
2078
+ value: '1',
2079
+ optional: true
2080
+ },
2081
+ turnServerUrl: {
2077
2082
  type: 'primitive',
2078
2083
  value: 'string'
2079
2084
  },
2080
- context: chatContextSchema,
2081
- everywhere: {
2085
+ srsBaseUrl: {
2082
2086
  type: 'primitive',
2083
- value: 'boolean',
2087
+ value: 'string'
2088
+ },
2089
+ serverUrl: {
2090
+ type: 'primitive',
2091
+ value: 'string',
2084
2092
  optional: true
2085
2093
  },
2086
- capabilities: {
2087
- type: 'object',
2088
- optional: true,
2089
- allowUnknownProperties: true,
2090
- properties: {}
2094
+ genieServerUrl: {
2095
+ type: 'primitive',
2096
+ value: 'string',
2097
+ optional: true
2091
2098
  },
2092
- // @deprecated - kept for backward compatibility
2093
- entryId: {
2099
+ clientId: {
2094
2100
  type: 'primitive',
2095
2101
  value: 'string',
2096
- optional: true,
2097
- deprecationMessage: 'Use context instead: { type: "entry", id: "your-entry-id" }'
2102
+ optional: true
2098
2103
  },
2099
- kalturaServerURI: {
2104
+ roomId: {
2100
2105
  type: 'primitive',
2101
2106
  value: 'string',
2102
2107
  optional: true
2103
2108
  },
2104
- partnerId: {
2109
+ flowId: {
2105
2110
  type: 'primitive',
2106
2111
  value: 'string',
2107
2112
  optional: true
2108
2113
  },
2109
- uiConfId: {
2114
+ loadingVideoURL: {
2110
2115
  type: 'primitive',
2111
2116
  value: 'string',
2112
2117
  optional: true
2113
- }
2114
- }
2115
- };
2116
- const featuresSchema = {
2117
- type: 'object',
2118
- optional: true,
2119
- properties: {
2120
- screenShare: {
2118
+ },
2119
+ avatarId: {
2121
2120
  type: 'primitive',
2122
- value: 'boolean',
2121
+ value: 'string',
2123
2122
  optional: true
2124
2123
  },
2125
- chat: {
2124
+ previewImageUrl: {
2126
2125
  type: 'primitive',
2127
- value: 'boolean',
2126
+ value: 'string',
2128
2127
  optional: true
2129
2128
  },
2130
- captions: {
2131
- type: 'or',
2132
- optional: true,
2133
- properties: [{
2134
- type: 'primitive',
2135
- value: 'boolean'
2136
- }, {
2137
- type: 'object',
2138
- allowUnknownProperties: true,
2139
- properties: {}
2140
- }]
2129
+ agentMode: {
2130
+ type: 'primitive',
2131
+ value: 'boolean',
2132
+ optional: true
2141
2133
  },
2142
- kickOffPhrase: {
2134
+ noiseReductionEnabled: {
2143
2135
  type: 'primitive',
2144
- value: 'string',
2136
+ value: 'boolean',
2145
2137
  optional: true
2138
+ },
2139
+ kaltura: {
2140
+ type: 'object',
2141
+ properties: {
2142
+ ks: {
2143
+ type: 'primitive',
2144
+ value: 'string'
2145
+ },
2146
+ context: chatContextSchema,
2147
+ everywhere: {
2148
+ type: 'primitive',
2149
+ value: 'boolean',
2150
+ optional: true
2151
+ },
2152
+ capabilities: {
2153
+ type: 'object',
2154
+ optional: true,
2155
+ allowUnknownProperties: true,
2156
+ properties: {}
2157
+ },
2158
+ // @deprecated - kept for backward compatibility
2159
+ entryId: {
2160
+ type: 'primitive',
2161
+ value: 'string',
2162
+ optional: true,
2163
+ deprecationMessage: 'Use context instead: { type: "entry", id: "your-entry-id" }'
2164
+ },
2165
+ kalturaServerURI: {
2166
+ type: 'primitive',
2167
+ value: 'string',
2168
+ optional: true
2169
+ },
2170
+ partnerId: {
2171
+ type: 'primitive',
2172
+ value: 'string',
2173
+ optional: true
2174
+ },
2175
+ uiConfId: {
2176
+ type: 'primitive',
2177
+ value: 'string',
2178
+ optional: true
2179
+ }
2180
+ }
2181
+ },
2182
+ features: {
2183
+ type: 'object',
2184
+ optional: true,
2185
+ properties: {
2186
+ screenShare: {
2187
+ type: 'primitive',
2188
+ value: 'boolean',
2189
+ optional: true
2190
+ },
2191
+ chat: {
2192
+ type: 'primitive',
2193
+ value: 'boolean',
2194
+ optional: true
2195
+ }
2196
+ }
2146
2197
  }
2147
2198
  }
2148
2199
  };
2149
- const avatarRuntimeSettingsSchema = {
2150
- type: 'or',
2151
- properties: [
2152
- // serverConfig: 'manual' (or absent)
2153
- {
2154
- type: 'object',
2155
- properties: {
2156
- schemaVersion: {
2157
- type: 'literal',
2158
- value: '1',
2159
- optional: true
2160
- },
2161
- serverConfig: {
2162
- type: 'literal',
2163
- value: 'manual',
2164
- optional: true
2165
- },
2166
- turnServerUrl: {
2167
- type: 'primitive',
2168
- value: 'string'
2169
- },
2170
- srsBaseUrl: {
2171
- type: 'primitive',
2172
- value: 'string'
2173
- },
2174
- serverUrl: {
2175
- type: 'primitive',
2176
- value: 'string'
2177
- },
2178
- genieServerUrl: {
2179
- type: 'primitive',
2180
- value: 'string',
2181
- optional: true
2182
- },
2183
- clientId: {
2184
- type: 'primitive',
2185
- value: 'string',
2186
- optional: true
2187
- },
2188
- roomId: {
2189
- type: 'primitive',
2190
- value: 'string',
2191
- optional: true
2192
- },
2193
- flowId: {
2194
- type: 'primitive',
2195
- value: 'string',
2196
- optional: true
2197
- },
2198
- loadingVideoURL: {
2199
- type: 'primitive',
2200
- value: 'string',
2201
- optional: true
2202
- },
2203
- avatarId: {
2204
- type: 'primitive',
2205
- value: 'string',
2206
- optional: true
2207
- },
2208
- previewImageUrl: {
2209
- type: 'primitive',
2210
- value: 'string',
2211
- optional: true
2212
- },
2213
- agentMode: {
2214
- type: 'primitive',
2215
- value: 'boolean',
2216
- optional: true
2217
- },
2218
- noiseReductionEnabled: {
2219
- type: 'primitive',
2220
- value: 'boolean',
2221
- optional: true
2222
- },
2223
- kaltura: kalturaSchema,
2224
- features: featuresSchema
2225
- }
2226
- },
2227
- // serverConfig: 'studio'
2228
- {
2229
- type: 'object',
2230
- properties: {
2231
- schemaVersion: {
2232
- type: 'literal',
2233
- value: '1',
2234
- optional: true
2235
- },
2236
- serverConfig: {
2237
- type: 'literal',
2238
- value: 'studio'
2239
- },
2240
- kaltura: kalturaSchema,
2241
- features: featuresSchema
2242
- }
2243
- }]
2244
- };
2245
2200
 
2246
2201
  const avatarRuntimeChatVisualSettingsSchema = {
2247
2202
  type: 'object',
@@ -3256,17 +3211,6 @@ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3256
3211
 
3257
3212
  const SUPPORTED_LAYOUT_TYPES = new Set(['cinema', 'focusContent', 'balanced', 'floatingCorner', 'fullscreenContent']);
3258
3213
 
3259
- const avatarRuntimeHeadFloaterVisualSettingsSchema = {
3260
- type: 'object',
3261
- properties: {
3262
- schemaVersion: {
3263
- type: 'literal',
3264
- value: '1',
3265
- optional: true
3266
- }
3267
- }
3268
- };
3269
-
3270
3214
  const blockVisualContextSchema = {
3271
3215
  type: 'object',
3272
3216
  optional: true,
@@ -3295,6 +3239,34 @@ const blockVisualContextSchema = {
3295
3239
  }
3296
3240
  };
3297
3241
 
3242
+ const ChatThreadRuntimeName = 'chat-thread';
3243
+ const chatThreadRuntimeSettingsSchema = {
3244
+ type: 'object',
3245
+ properties: {
3246
+ schemaVersion: {
3247
+ type: 'literal',
3248
+ value: '1',
3249
+ optional: true
3250
+ },
3251
+ threadId: {
3252
+ type: 'primitive',
3253
+ value: 'string'
3254
+ },
3255
+ getSourceUrl: getSourceUrlSchema
3256
+ }
3257
+ };
3258
+
3259
+ const chatThreadRuntimeContainedVisualSettingsSchema = {
3260
+ type: 'object',
3261
+ properties: {
3262
+ schemaVersion: {
3263
+ type: 'literal',
3264
+ value: '1',
3265
+ optional: true
3266
+ }
3267
+ }
3268
+ };
3269
+
3298
3270
  var en = {
3299
3271
 
3300
3272
  };
@@ -3307,4 +3279,4 @@ const useTranslation = createUseTranslation({
3307
3279
  supportedLanguages
3308
3280
  });
3309
3281
 
3310
- export { AVATAR_DEFAULT_CAPABILITIES, AnswerModelEnum, AnswerTypeEnum, AvatarConnectionStatus, AvatarRuntimeName, CHAT_CONTEXT_TYPE, CHAT_CONTEXT_TYPE_GLOBAL, CHAT_DEFAULT_CAPABILITIES, ChatRuntimeName, DeviceType, DisconnectReasons, SUPPORTED_LAYOUT_TYPES, agentModeSchema, avatarContainerModeSchema, avatarRuntimeChatVisualSettingsSchema, avatarRuntimeContainedVisualSettingsSchema, avatarRuntimeFloaterVisualSettingsSchema, avatarRuntimeHeadFloaterVisualSettingsSchema, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, containedVisualSettingsSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, schemaVersionSchema, shareUrlSchema, useTranslation, widgetName };
3282
+ 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, avatarRuntimeSettingsSchema, bannerVisualSettingsSchema, blockVisualContextSchema, chatContextSchema, chatCustomizationSchema, chatRuntimePlayerPluginSettingsSchema, chatRuntimeSettingsSchema, chatThreadRuntimeContainedVisualSettingsSchema, chatThreadRuntimeSettingsSchema, containedVisualSettingsSchema, floaterCTAVisualSettingsSchema, floaterVisualSettingsSchema, getAvatarDefaultCapabilities, getChatDefaultCapabilities, getResolvedRuntimeName, getResolvedWidgetName, getSourceUrlSchema, integrationsSchema, isAvatarConnectionProxyInternalType, pageVisualSettingsSchema, popupVisualSettingsSchema, schemaVersionSchema, shareUrlSchema, useTranslation, widgetName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.27.0-head.0",
3
+ "version": "1.27.0",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
package/src/index.d.ts CHANGED
@@ -5,4 +5,5 @@ export * from './lib/types';
5
5
  export * from './lib/avatar-runtime';
6
6
  export * from './lib/chat-customizations-types';
7
7
  export * from './lib/general-visual-types';
8
+ export * from './lib/chat-thread-runtime';
8
9
  export { useTranslation } from './lib/use-translation';
@@ -1,11 +1,7 @@
1
1
  import { UnisphereService } from '@unisphere/runtime';
2
2
  import { AvatarVisualBridgeType } from './visual-bridge-types';
3
- import { TinyDataStoreConsumer, TinyPubSub } from '@unisphere/core';
3
+ import { TinyDataStoreConsumer } from '@unisphere/core';
4
4
  import { AvatarConnectionProxyType } from './shared-types';
5
- export type AvatarWebsocketEvent = {
6
- name: string;
7
- payload: any;
8
- };
9
5
  export interface AvatarServiceType extends UnisphereService {
10
6
  id: 'unisphere.widget.genie.avatar';
11
7
  readonly visualBridge: AvatarVisualBridgeType;
@@ -23,8 +19,4 @@ export interface AvatarServiceType extends UnisphereService {
23
19
  getEntrySourceUrl(entryId: string, startTime?: number): string;
24
20
  clearContent(): void;
25
21
  askViaText(question: string): void;
26
- onWebsocketEvents: {
27
- system: TinyPubSub<AvatarWebsocketEvent>['consumer'];
28
- app: TinyPubSub<AvatarWebsocketEvent>['consumer'];
29
- };
30
22
  }
@@ -6,4 +6,3 @@ export * from './contained-visual-types';
6
6
  export * from './floater-visual-types';
7
7
  export * from './shared-types';
8
8
  export * from './visual-bridge-types';
9
- export * from './runtime-visuals/head-floater-visual-types';
@@ -1,8 +1,7 @@
1
- import { TinyDataStoreConsumer, TinyPubSub, ValidatorSchema } from '@unisphere/core';
1
+ 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 } from './shared-types';
6
5
  /** Runtime name constant for avatar experiences */
7
6
  export declare const AvatarRuntimeName: "avatar";
8
7
  /**
@@ -33,32 +32,47 @@ export type AvatarRuntime = UnisphereRuntimeBaseType<AvatarRuntimeSettings> & {
33
32
  setThreadId(id: string | null): void;
34
33
  /** Sync preview mode flag from the chat customization settings */
35
34
  setIsPreviewMode(value: boolean): void;
36
- /** Observable mute state */
37
- isMuted: TinyDataStoreConsumer<boolean>;
38
- /** Mute the avatar audio */
39
- mute(): void;
40
- /** Unmute the avatar audio */
41
- unmute(): void;
42
- /** Send a text question to the avatar */
43
- askViaText(question: string): void;
44
- /** Send setDynamicPrompt event to the CM */
45
- setDynamicPrompt(data: unknown): void;
46
- /**
47
- * Subscribe to tool-call events from the avatar's WebSocket.
48
- * Emits for every tool call (e.g. navigate_to_slide) without interfering
49
- * with internal GenUI rendering. The host app can register handlers to
50
- * react to specific tool names.
51
- */
52
- readonly onToolCall: TinyPubSub<AvatarToolCallEvent>['consumer'];
53
35
  };
54
- /** Event emitted when the avatar brain invokes a tool call */
55
- export interface AvatarToolCallEvent {
56
- /** Tool name (e.g. 'navigate_to_slide', 'create_slide') */
57
- name: string;
58
- /** Tool arguments parsed from the YAML/JSON content */
59
- args: Record<string, unknown>;
60
- }
61
- export type AvatarServerConfig = {
36
+ /**
37
+ * Configuration settings for the avatar runtime.
38
+ *
39
+ * @example
40
+ * Basic avatar setup (required settings only):
41
+ * ```typescript
42
+ * const settings: AvatarRuntimeSettings = {
43
+ * turnServerUrl: 'https://turn.example.com',
44
+ * serverUrl: 'https://avatar.example.com',
45
+ * srsBaseUrl: 'https://srs.example.com',
46
+ * kaltura: {
47
+ * ks: 'your-kaltura-session-token'
48
+ * }
49
+ * };
50
+ * ```
51
+ *
52
+ * @example
53
+ * Advanced avatar with custom configuration:
54
+ * ```typescript
55
+ * const settings: AvatarRuntimeSettings = {
56
+ * turnServerUrl: 'https://turn.example.com',
57
+ * serverUrl: 'https://avatar.example.com',
58
+ * srsBaseUrl: 'https://srs.example.com',
59
+ * clientId: 'client-123',
60
+ * roomId: 'room-456',
61
+ * avatarId: 'avatar-789',
62
+ * agentMode: true,
63
+ * noiseReductionEnabled: true,
64
+ * kaltura: {
65
+ * ks: 'your-kaltura-session-token',
66
+ * partnerId: '12345',
67
+ * context: { type: 'entry', id: 'entry_xyz' },
68
+ * capabilities: { use_knowledge_base: 'on' }
69
+ * }
70
+ * };
71
+ * ```
72
+ */
73
+ export interface AvatarRuntimeSettings {
74
+ /** Settings schema version */
75
+ schemaVersion?: string;
62
76
  /** TURN server URL for WebRTC connectivity */
63
77
  turnServerUrl: string;
64
78
  /** Avatar service server URL */
@@ -83,12 +97,6 @@ export type AvatarServerConfig = {
83
97
  noiseReductionEnabled?: boolean;
84
98
  /** Genie service server URL */
85
99
  genieServerUrl?: string;
86
- /** Kaltura sesssion */
87
- ks: string;
88
- };
89
- export type AvatarRuntimeSettings = {
90
- /** Settings schema version */
91
- schemaVersion?: string;
92
100
  /** Kaltura service integration settings */
93
101
  kaltura: {
94
102
  /** Kaltura session token for authentication */
@@ -112,14 +120,6 @@ export type AvatarRuntimeSettings = {
112
120
  screenShare?: boolean;
113
121
  /** Enable chat */
114
122
  chat?: boolean;
115
- /** Enable captions; pass CaptionConfig object for fine-grained control */
116
- captions?: boolean | CaptionConfig;
117
- /** Phrase sent automatically when avatar signals a blank kickoff turn */
118
- kickOffPhrase?: string;
119
123
  };
120
- } & (({
121
- serverConfig?: 'manual';
122
- } & AvatarServerConfig) | {
123
- serverConfig: 'studio';
124
- });
124
+ }
125
125
  export declare const avatarRuntimeSettingsSchema: ValidatorSchema;
@@ -98,32 +98,6 @@ export type AvatarContentData<TSettings = any> = {
98
98
  /** Content status: error occurred */
99
99
  status: 'error';
100
100
  });
101
- /**
102
- * Current caption display state exposed to consumers.
103
- */
104
- export interface CaptionState {
105
- /** Current visible text segment; empty string when cleared */
106
- text: string;
107
- /** True when captions should be hidden (hold period elapsed) */
108
- clear: boolean;
109
- /** Whether the caption engine is actively processing speech */
110
- active: boolean;
111
- }
112
- /**
113
- * Static caption configuration provided at connection time.
114
- */
115
- export interface CaptionConfig {
116
- /** Word replacements applied to caption text (longest-first, word-boundary) */
117
- replacements?: Record<string, string>;
118
- /** Custom text filter applied after replacements */
119
- filter?: (text: string) => string;
120
- /** Milliseconds to hold the last caption segment before clearing (default 2000) */
121
- holdAfterEndMs?: number;
122
- /** Maximum characters per display line (default 47) */
123
- maxCharsPerLine?: number;
124
- /** Maximum number of lines (default 2) */
125
- maxLines?: number;
126
- }
127
101
  /**
128
102
  * Internal avatar connection proxy interface for advanced operations.
129
103
  *
@@ -201,8 +175,6 @@ export interface AvatarConnectionProxyType {
201
175
  readonly screenShareInfo: TinyDataStoreConsumer<AgentScreenShareInfo | null>;
202
176
  /** Observable form paused state */
203
177
  readonly isAvatarPaused: TinyDataStoreConsumer<boolean>;
204
- /** Observable caption display state — null when feature is disabled */
205
- readonly captions: TinyDataStoreConsumer<CaptionState | null>;
206
178
  /** Unique connection identifier */
207
179
  readonly id: string;
208
180
  /** Send text message to avatar */
@@ -223,11 +195,5 @@ export interface AvatarConnectionProxyType {
223
195
  pauseAvatarAfterSpeaking(): void;
224
196
  /** Clear current visual content */
225
197
  clearContent(): void;
226
- /** Toggle caption visibility on/off (no effect when feature is disabled) */
227
- toggleCaptions(): void;
228
- /** Update word replacements for the caption filter at runtime */
229
- setCaptionReplacements(replacements: Record<string, string> | null): void;
230
- /** Set or clear a custom post-processing filter for captions */
231
- setCaptionFilter(filter: ((text: string) => string) | null): void;
232
198
  }
233
199
  export declare const isAvatarConnectionProxyInternalType: (x: any) => x is AvatarConnectionProxInternalType;
@@ -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 {
@@ -38,5 +43,5 @@ export interface ActionContext {
38
43
  content: AvatarContentData | null;
39
44
  }
40
45
  export interface AvatarVisualBridgeType extends UnisphereVisualBridgeType<VisualTypeConfig, ResolvedCapabilities> {
41
- getActionContext(): ActionContext | null;
46
+ getActionContext(): ActionContext;
42
47
  }
@@ -0,0 +1,2 @@
1
+ export * from './runtime-types';
2
+ export * from './runtime-visuals/contained-visual-types';
@@ -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,5 @@
1
+ import { ValidatorSchema } from '@unisphere/core';
2
+ export interface ChatThreadRuntimeContainedVisualSettings {
3
+ schemaVersion?: string;
4
+ }
5
+ export declare const chatThreadRuntimeContainedVisualSettingsSchema: 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 */
@@ -1,3 +1,4 @@
1
1
  export * from './genie-chat-service-types';
2
2
  export * from './genie-widget-name-resolver';
3
3
  export * from './genie-runtime-name-resolver';
4
+ export * from './chat-thread-service-types';
@@ -1,5 +0,0 @@
1
- import { ValidatorSchema } from '@unisphere/core';
2
- export interface AvatarRuntimeFloaterVisualSettings {
3
- schemaVersion?: string;
4
- }
5
- export declare const avatarRuntimeFloaterVisualSettingsSchema: ValidatorSchema;
@@ -1,5 +0,0 @@
1
- import { ValidatorSchema } from '@unisphere/core';
2
- export interface AvatarRuntimeHeadFloaterVisualSettings {
3
- schemaVersion?: string;
4
- }
5
- export declare const avatarRuntimeHeadFloaterVisualSettingsSchema: ValidatorSchema;