@unisphere/genie-types 1.40.0 → 1.42.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
@@ -1863,6 +1863,10 @@ const floaterVisualSettingsSchema = {
1863
1863
  mode: modeSchema,
1864
1864
  context: chatContextSchema,
1865
1865
  customization: chatCustomizationSchema,
1866
+ onThreadIdChanged: {
1867
+ type: 'function',
1868
+ optional: true
1869
+ },
1866
1870
  dynamicVariables: dynamicVariablesSchema,
1867
1871
  header: headerSchema,
1868
1872
  openingPosition: {
@@ -1887,6 +1891,10 @@ const floaterCTAVisualSettingsSchema = {
1887
1891
  optional: true
1888
1892
  },
1889
1893
  mode: modeSchema,
1894
+ onThreadIdChanged: {
1895
+ type: 'function',
1896
+ optional: true
1897
+ },
1890
1898
  openByDefault: {
1891
1899
  type: 'primitive',
1892
1900
  value: 'boolean',
@@ -1997,6 +2005,10 @@ const pageVisualSettingsSchema = {
1997
2005
  properties: Object.assign(Object.assign({}, chatCustomizationSchemaProperties), {
1998
2006
  schemaVersion: schemaVersionSchema,
1999
2007
  scroll: scrollSchema,
2008
+ onThreadIdChanged: {
2009
+ type: 'function',
2010
+ optional: true
2011
+ },
2000
2012
  customization: chatCustomizationSchema,
2001
2013
  context: pageContextSchema,
2002
2014
  initialQuestion: initialQuestionSchema,
@@ -2058,7 +2070,11 @@ const popupVisualSettingsSchema = {
2058
2070
  scroll: scrollSchema,
2059
2071
  customization: chatCustomizationSchema,
2060
2072
  initialQuestion: initialQuestionSchema,
2061
- dynamicVariables: dynamicVariablesSchema
2073
+ dynamicVariables: dynamicVariablesSchema,
2074
+ onThreadIdChanged: {
2075
+ type: 'function',
2076
+ optional: true
2077
+ }
2062
2078
  })
2063
2079
  };
2064
2080
 
@@ -2340,6 +2356,11 @@ const featuresSchema = {
2340
2356
  type: 'primitive',
2341
2357
  value: 'boolean',
2342
2358
  optional: true
2359
+ },
2360
+ persistentContent: {
2361
+ type: 'primitive',
2362
+ value: 'boolean',
2363
+ optional: true
2343
2364
  }
2344
2365
  }
2345
2366
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unisphere/genie-types",
3
- "version": "1.40.0",
3
+ "version": "1.42.0",
4
4
  "author": "kaltura",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
@@ -183,6 +183,13 @@ export type AvatarRuntimeSettings = {
183
183
  * "I'm done watching" to continue. Defaults to true, except for specific partners/environments.
184
184
  */
185
185
  inlineClipPlayback?: boolean;
186
+ /**
187
+ * Experimental. Stage content persists across agent turns instead of being replaced per turn:
188
+ * a turn without a tool block keeps the current content, the same tool re-emitted updates the
189
+ * mounted visual in place, and a ```stage action: clear``` block clears it. The current stage is
190
+ * pushed to the agent as the `avatar_stage` request variable. Defaults to false.
191
+ */
192
+ persistentContent?: boolean;
186
193
  };
187
194
  /** Full URL to POST client-tool-call responses to (e.g. `https://genie.example.com/assistant/tool_response`). Required for client tool calls to receive a response. Applies to both `manual` and `studio` modes. */
188
195
  clientToolResponseUrl?: string;
@@ -85,6 +85,18 @@ export type AgentScreenShareInfo = {
85
85
  stream: MediaStream | null;
86
86
  analysisReady: boolean;
87
87
  };
88
+ /**
89
+ * Step progress indicator driven by the agent's ```ui-progress-bar``` fence.
90
+ * Rendered above the stage, independent of stage content and layout.
91
+ */
92
+ export type AgentProgressBar = {
93
+ visible: boolean;
94
+ totalSteps: number;
95
+ /** 1-based index of the step in progress */
96
+ currentStep: number;
97
+ type: 'dots';
98
+ variant?: string;
99
+ };
88
100
  /**
89
101
  * Tap-to-talk mode state
90
102
  */
@@ -136,6 +148,8 @@ export type AvatarContentData<TSettings = any> = ({
136
148
  settings: TSettings;
137
149
  /** Optional thread ID */
138
150
  threadId?: string;
151
+ /** Bumped on in-place settings updates of the same content (persistent stage) */
152
+ revision?: number;
139
153
  } | {
140
154
  /** Content status: error occurred */
141
155
  status: 'error';
@@ -360,6 +374,8 @@ export interface AvatarClientManagerType {
360
374
  readonly content: TinyDataStoreConsumer<AvatarContentData | null>;
361
375
  /** Observable chat log entries */
362
376
  readonly chatLog: TinyDataStoreConsumer<ChatEntry[]>;
377
+ /** Observable agent-driven progress bar state — null until the agent emits one */
378
+ readonly progressBar: TinyDataStoreConsumer<AgentProgressBar | null>;
363
379
  /** Send text message to avatar */
364
380
  askViaText(text: string): void;
365
381
  /** Request the backend reprocess a turn that produced no avatar response */
@@ -421,6 +437,7 @@ export interface AvatarClientManagerType {
421
437
  captions?: boolean | CaptionConfig;
422
438
  kickOffPhrase?: string;
423
439
  dynamicVariables?: Record<string, unknown>;
440
+ persistentContent?: boolean;
424
441
  } | undefined>;
425
442
  /** Observable preview loading video URL */
426
443
  readonly agentPreviewUrl: TinyDataStoreConsumer<string | null>;
@@ -49,6 +49,7 @@ type InitialQuestion = {
49
49
  export type PageVisualSettings = ScrollableVisualSettings & ChatCustomization & {
50
50
  /** Context for the chat session — host-provided, not user-controllable */
51
51
  context?: Pick<ChatContext, 'type' | 'id'>;
52
+ onThreadIdChanged?: (threadId: string) => void;
52
53
  };
53
54
  /**
54
55
  * Visual settings for banner/hero-style chat landing pages.
@@ -108,6 +109,7 @@ export type BannerVisualSettings = BaseVisualSettings & ChatCustomization & {
108
109
  export type PopupVisualSettings = ScrollableVisualSettings & ChatCustomization & {
109
110
  /** Optional question to ask automatically when popup opens */
110
111
  initialQuestion?: InitialQuestion;
112
+ onThreadIdChanged?: (threadId: string) => void;
111
113
  };
112
114
  export type ChatHeaderSettings = {
113
115
  /** Replaces the default header title */
@@ -139,12 +141,14 @@ export type FloaterCTAVisualSettings = ModeContextVisualSettings & ChatCustomiza
139
141
  openByDefault?: boolean;
140
142
  type?: 'button';
141
143
  text?: string;
144
+ onThreadIdChanged?: (threadId: string) => void;
142
145
  showIcon?: boolean;
143
146
  header?: ChatHeaderSettings;
144
147
  };
145
148
  export type FloaterVisualSettings = ModeContextVisualSettings & ChatCustomization & {
146
149
  openingPosition?: 'left' | 'right';
147
150
  header?: ChatHeaderSettings;
151
+ onThreadIdChanged?: (threadId: string) => void;
148
152
  };
149
153
  export declare const floaterVisualSettingsSchema: ValidatorSchema;
150
154
  export declare const floaterCTAVisualSettingsSchema: ValidatorSchema;
@@ -87,6 +87,8 @@ export type UnisphereToolBlock = {
87
87
  status: 'loading' | 'ready';
88
88
  settings: any;
89
89
  threadId?: string;
90
+ /** Bumped on in-place settings updates of the same content (persistent avatar stage) */
91
+ revision?: number;
90
92
  } | {
91
93
  status: 'error';
92
94
  });