@runtypelabs/persona 1.41.0 → 1.43.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/README.md +55 -1
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +307 -1
- package/dist/index.d.ts +307 -1
- package/dist/index.global.js +71 -71
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/widget.css +185 -0
- package/package.json +2 -1
- package/src/client.test.ts +645 -0
- package/src/client.ts +373 -0
- package/src/components/event-stream-view.test.ts +1233 -0
- package/src/components/event-stream-view.ts +1179 -0
- package/src/index.ts +19 -1
- package/src/plugins/types.ts +34 -1
- package/src/runtime/init.ts +5 -0
- package/src/session.ts +104 -1
- package/src/styles/widget.css +185 -0
- package/src/types.ts +252 -0
- package/src/ui.ts +281 -4
- package/src/utils/event-stream-buffer.test.ts +268 -0
- package/src/utils/event-stream-buffer.ts +112 -0
- package/src/utils/event-stream-capture.test.ts +539 -0
- package/src/utils/event-stream-controller.test.ts +445 -0
- package/src/utils/event-stream-store.test.ts +181 -0
- package/src/utils/event-stream-store.ts +182 -0
- package/src/utils/virtual-scroller.test.ts +449 -0
- package/src/utils/virtual-scroller.ts +151 -0
package/dist/index.d.ts
CHANGED
|
@@ -100,6 +100,26 @@ interface AgentWidgetPlugin {
|
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
102
|
renderIdleIndicator?: (context: IdleIndicatorRenderContext) => HTMLElement | null;
|
|
103
|
+
/**
|
|
104
|
+
* Custom renderer for the entire event stream view.
|
|
105
|
+
* Return null to use default renderer.
|
|
106
|
+
*/
|
|
107
|
+
renderEventStreamView?: (context: EventStreamViewRenderContext) => HTMLElement | null;
|
|
108
|
+
/**
|
|
109
|
+
* Custom renderer for individual event stream rows.
|
|
110
|
+
* Return null to use default renderer.
|
|
111
|
+
*/
|
|
112
|
+
renderEventStreamRow?: (context: EventStreamRowRenderContext) => HTMLElement | null;
|
|
113
|
+
/**
|
|
114
|
+
* Custom renderer for the event stream toolbar/header bar.
|
|
115
|
+
* Return null to use default renderer.
|
|
116
|
+
*/
|
|
117
|
+
renderEventStreamToolbar?: (context: EventStreamToolbarRenderContext) => HTMLElement | null;
|
|
118
|
+
/**
|
|
119
|
+
* Custom renderer for the expanded event payload display.
|
|
120
|
+
* Return null to use default renderer.
|
|
121
|
+
*/
|
|
122
|
+
renderEventStreamPayload?: (context: EventStreamPayloadRenderContext) => HTMLElement | null;
|
|
103
123
|
/**
|
|
104
124
|
* Called when plugin is registered
|
|
105
125
|
*/
|
|
@@ -161,6 +181,81 @@ type AgentWidgetRequestPayload = {
|
|
|
161
181
|
context?: Record<string, unknown>;
|
|
162
182
|
metadata?: Record<string, unknown>;
|
|
163
183
|
};
|
|
184
|
+
/**
|
|
185
|
+
* Configuration for agent loop behavior.
|
|
186
|
+
*/
|
|
187
|
+
type AgentLoopConfig = {
|
|
188
|
+
/** Maximum number of reasoning iterations */
|
|
189
|
+
maxIterations: number;
|
|
190
|
+
/** Stop condition: 'auto' for automatic detection, or a custom JS expression */
|
|
191
|
+
stopCondition?: 'auto' | string;
|
|
192
|
+
/** Enable periodic reflection during execution */
|
|
193
|
+
enableReflection?: boolean;
|
|
194
|
+
/** Number of iterations between reflections */
|
|
195
|
+
reflectionInterval?: number;
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Agent configuration for agent execution mode.
|
|
199
|
+
* When provided in the widget config, enables agent loop execution instead of flow dispatch.
|
|
200
|
+
*/
|
|
201
|
+
type AgentConfig = {
|
|
202
|
+
/** Agent display name */
|
|
203
|
+
name: string;
|
|
204
|
+
/** Model identifier (e.g., 'openai:gpt-4o-mini') */
|
|
205
|
+
model: string;
|
|
206
|
+
/** System prompt for the agent */
|
|
207
|
+
systemPrompt: string;
|
|
208
|
+
/** Temperature for model responses */
|
|
209
|
+
temperature?: number;
|
|
210
|
+
/** Loop configuration for multi-iteration execution */
|
|
211
|
+
loopConfig?: AgentLoopConfig;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Options for agent execution requests.
|
|
215
|
+
*/
|
|
216
|
+
type AgentRequestOptions = {
|
|
217
|
+
/** Whether to stream the response (should be true for widget usage) */
|
|
218
|
+
streamResponse?: boolean;
|
|
219
|
+
/** Record mode: 'virtual' for no persistence, 'existing'/'create' for database records */
|
|
220
|
+
recordMode?: 'virtual' | 'existing' | 'create';
|
|
221
|
+
/** Whether to store results server-side */
|
|
222
|
+
storeResults?: boolean;
|
|
223
|
+
/** Enable debug mode for additional event data */
|
|
224
|
+
debugMode?: boolean;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Request payload for agent execution mode.
|
|
228
|
+
*/
|
|
229
|
+
type AgentWidgetAgentRequestPayload = {
|
|
230
|
+
agent: AgentConfig;
|
|
231
|
+
messages: AgentWidgetRequestPayloadMessage[];
|
|
232
|
+
options: AgentRequestOptions;
|
|
233
|
+
context?: Record<string, unknown>;
|
|
234
|
+
metadata?: Record<string, unknown>;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Agent execution state tracking.
|
|
238
|
+
*/
|
|
239
|
+
type AgentExecutionState = {
|
|
240
|
+
executionId: string;
|
|
241
|
+
agentId: string;
|
|
242
|
+
agentName: string;
|
|
243
|
+
status: 'running' | 'complete' | 'error';
|
|
244
|
+
currentIteration: number;
|
|
245
|
+
maxIterations: number;
|
|
246
|
+
startedAt?: number;
|
|
247
|
+
completedAt?: number;
|
|
248
|
+
stopReason?: 'max_iterations' | 'complete' | 'error' | 'manual';
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Metadata attached to messages created during agent execution.
|
|
252
|
+
*/
|
|
253
|
+
type AgentMessageMetadata = {
|
|
254
|
+
executionId?: string;
|
|
255
|
+
iteration?: number;
|
|
256
|
+
turnId?: string;
|
|
257
|
+
agentName?: string;
|
|
258
|
+
};
|
|
164
259
|
type AgentWidgetRequestMiddlewareContext = {
|
|
165
260
|
payload: AgentWidgetRequestPayload;
|
|
166
261
|
config: AgentWidgetConfig;
|
|
@@ -330,10 +425,130 @@ type AgentWidgetControllerEventMap = {
|
|
|
330
425
|
"widget:state": AgentWidgetStateSnapshot;
|
|
331
426
|
"message:feedback": AgentWidgetMessageFeedback;
|
|
332
427
|
"message:copy": AgentWidgetMessage;
|
|
428
|
+
"eventStream:opened": {
|
|
429
|
+
timestamp: number;
|
|
430
|
+
};
|
|
431
|
+
"eventStream:closed": {
|
|
432
|
+
timestamp: number;
|
|
433
|
+
};
|
|
333
434
|
};
|
|
334
435
|
type AgentWidgetFeatureFlags = {
|
|
335
436
|
showReasoning?: boolean;
|
|
336
437
|
showToolCalls?: boolean;
|
|
438
|
+
showEventStreamToggle?: boolean;
|
|
439
|
+
/** Configuration for the Event Stream inspector view */
|
|
440
|
+
eventStream?: EventStreamConfig;
|
|
441
|
+
};
|
|
442
|
+
type SSEEventRecord = {
|
|
443
|
+
id: string;
|
|
444
|
+
type: string;
|
|
445
|
+
timestamp: number;
|
|
446
|
+
payload: string;
|
|
447
|
+
};
|
|
448
|
+
/**
|
|
449
|
+
* Badge color configuration for event stream event types.
|
|
450
|
+
*/
|
|
451
|
+
type EventStreamBadgeColor = {
|
|
452
|
+
/** Background color (CSS value) */
|
|
453
|
+
bg: string;
|
|
454
|
+
/** Text color (CSS value) */
|
|
455
|
+
text: string;
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* Configuration for the Event Stream inspector view.
|
|
459
|
+
*/
|
|
460
|
+
type EventStreamConfig = {
|
|
461
|
+
/**
|
|
462
|
+
* Custom badge color mappings by event type prefix or exact type.
|
|
463
|
+
* Keys are matched as exact match first, then prefix match (keys ending with "_").
|
|
464
|
+
* @example { "flow_": { bg: "#dcfce7", text: "#166534" }, "error": { bg: "#fecaca", text: "#991b1b" } }
|
|
465
|
+
*/
|
|
466
|
+
badgeColors?: Record<string, EventStreamBadgeColor>;
|
|
467
|
+
/**
|
|
468
|
+
* Timestamp display format.
|
|
469
|
+
* - "relative": Shows time offset from first event (+0.000s, +0.361s)
|
|
470
|
+
* - "absolute": Shows wall-clock time (HH:MM:SS.mmm)
|
|
471
|
+
* @default "relative"
|
|
472
|
+
*/
|
|
473
|
+
timestampFormat?: "absolute" | "relative";
|
|
474
|
+
/**
|
|
475
|
+
* Whether to show sequential event numbers (1, 2, 3...).
|
|
476
|
+
* @default true
|
|
477
|
+
*/
|
|
478
|
+
showSequenceNumbers?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Maximum events to keep in the ring buffer.
|
|
481
|
+
* @default 500
|
|
482
|
+
*/
|
|
483
|
+
maxEvents?: number;
|
|
484
|
+
/**
|
|
485
|
+
* Fields to extract from event payloads for description text.
|
|
486
|
+
* The first matching field value is displayed after the badge.
|
|
487
|
+
* @default ["flowName", "stepName", "name", "tool", "toolName"]
|
|
488
|
+
*/
|
|
489
|
+
descriptionFields?: string[];
|
|
490
|
+
/**
|
|
491
|
+
* Custom CSS class names to append to event stream UI elements.
|
|
492
|
+
* Each value is a space-separated class string appended to the element's default classes.
|
|
493
|
+
*/
|
|
494
|
+
classNames?: {
|
|
495
|
+
/** The toggle button in the widget header (activity icon). */
|
|
496
|
+
toggleButton?: string;
|
|
497
|
+
/** Additional classes applied to the toggle button when the event stream is open. */
|
|
498
|
+
toggleButtonActive?: string;
|
|
499
|
+
/** The outer event stream panel/container. */
|
|
500
|
+
panel?: string;
|
|
501
|
+
/** The toolbar header bar (title, filter, copy all). */
|
|
502
|
+
headerBar?: string;
|
|
503
|
+
/** The search bar wrapper. */
|
|
504
|
+
searchBar?: string;
|
|
505
|
+
/** The search text input. */
|
|
506
|
+
searchInput?: string;
|
|
507
|
+
/** Each event row wrapper. */
|
|
508
|
+
eventRow?: string;
|
|
509
|
+
/** The "new events" scroll indicator pill. */
|
|
510
|
+
scrollIndicator?: string;
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Context for the renderEventStreamView plugin hook.
|
|
515
|
+
*/
|
|
516
|
+
type EventStreamViewRenderContext = {
|
|
517
|
+
config: AgentWidgetConfig;
|
|
518
|
+
events: SSEEventRecord[];
|
|
519
|
+
defaultRenderer: () => HTMLElement;
|
|
520
|
+
onClose?: () => void;
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* Context for the renderEventStreamRow plugin hook.
|
|
524
|
+
*/
|
|
525
|
+
type EventStreamRowRenderContext = {
|
|
526
|
+
event: SSEEventRecord;
|
|
527
|
+
index: number;
|
|
528
|
+
config: AgentWidgetConfig;
|
|
529
|
+
defaultRenderer: () => HTMLElement;
|
|
530
|
+
isExpanded: boolean;
|
|
531
|
+
onToggleExpand: () => void;
|
|
532
|
+
};
|
|
533
|
+
/**
|
|
534
|
+
* Context for the renderEventStreamToolbar plugin hook.
|
|
535
|
+
*/
|
|
536
|
+
type EventStreamToolbarRenderContext = {
|
|
537
|
+
config: AgentWidgetConfig;
|
|
538
|
+
defaultRenderer: () => HTMLElement;
|
|
539
|
+
eventCount: number;
|
|
540
|
+
filteredCount: number;
|
|
541
|
+
onFilterChange: (type: string) => void;
|
|
542
|
+
onSearchChange: (term: string) => void;
|
|
543
|
+
};
|
|
544
|
+
/**
|
|
545
|
+
* Context for the renderEventStreamPayload plugin hook.
|
|
546
|
+
*/
|
|
547
|
+
type EventStreamPayloadRenderContext = {
|
|
548
|
+
event: SSEEventRecord;
|
|
549
|
+
config: AgentWidgetConfig;
|
|
550
|
+
defaultRenderer: () => HTMLElement;
|
|
551
|
+
parsedPayload: unknown;
|
|
337
552
|
};
|
|
338
553
|
type AgentWidgetTheme = {
|
|
339
554
|
primary?: string;
|
|
@@ -1386,6 +1601,41 @@ type AgentWidgetLoadingIndicatorConfig = {
|
|
|
1386
1601
|
type AgentWidgetConfig = {
|
|
1387
1602
|
apiUrl?: string;
|
|
1388
1603
|
flowId?: string;
|
|
1604
|
+
/**
|
|
1605
|
+
* Agent configuration for agent execution mode.
|
|
1606
|
+
* When provided, the widget uses agent loop execution instead of flow dispatch.
|
|
1607
|
+
* Mutually exclusive with `flowId`.
|
|
1608
|
+
*
|
|
1609
|
+
* @example
|
|
1610
|
+
* ```typescript
|
|
1611
|
+
* config: {
|
|
1612
|
+
* agent: {
|
|
1613
|
+
* name: 'Assistant',
|
|
1614
|
+
* model: 'openai:gpt-4o-mini',
|
|
1615
|
+
* systemPrompt: 'You are a helpful assistant.',
|
|
1616
|
+
* loopConfig: { maxIterations: 3, stopCondition: 'auto' }
|
|
1617
|
+
* }
|
|
1618
|
+
* }
|
|
1619
|
+
* ```
|
|
1620
|
+
*/
|
|
1621
|
+
agent?: AgentConfig;
|
|
1622
|
+
/**
|
|
1623
|
+
* Options for agent execution requests.
|
|
1624
|
+
* Only used when `agent` is configured.
|
|
1625
|
+
*
|
|
1626
|
+
* @default { streamResponse: true, recordMode: 'virtual' }
|
|
1627
|
+
*/
|
|
1628
|
+
agentOptions?: AgentRequestOptions;
|
|
1629
|
+
/**
|
|
1630
|
+
* Controls how multiple agent iterations are displayed in the chat UI.
|
|
1631
|
+
* Only used when `agent` is configured.
|
|
1632
|
+
*
|
|
1633
|
+
* - `'separate'`: Each iteration creates a new assistant message bubble
|
|
1634
|
+
* - `'merged'`: All iterations stream into a single assistant message
|
|
1635
|
+
*
|
|
1636
|
+
* @default 'separate'
|
|
1637
|
+
*/
|
|
1638
|
+
iterationDisplay?: 'separate' | 'merged';
|
|
1389
1639
|
/**
|
|
1390
1640
|
* Client token for direct browser-to-API communication.
|
|
1391
1641
|
* When set, the widget uses /v1/client/* endpoints instead of /v1/dispatch.
|
|
@@ -1921,6 +2171,11 @@ type AgentWidgetMessage = {
|
|
|
1921
2171
|
* }
|
|
1922
2172
|
*/
|
|
1923
2173
|
llmContent?: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* Metadata for messages created during agent loop execution.
|
|
2176
|
+
* Contains execution context like iteration number and turn ID.
|
|
2177
|
+
*/
|
|
2178
|
+
agentMetadata?: AgentMessageMetadata;
|
|
1924
2179
|
};
|
|
1925
2180
|
/**
|
|
1926
2181
|
* Options for injecting a message into the conversation.
|
|
@@ -2026,6 +2281,7 @@ type DispatchOptions = {
|
|
|
2026
2281
|
assistantMessageId?: string;
|
|
2027
2282
|
};
|
|
2028
2283
|
type SSEHandler = (event: AgentWidgetEvent) => void;
|
|
2284
|
+
type SSEEventCallback = (eventType: string, payload: unknown) => void;
|
|
2029
2285
|
declare class AgentWidgetClient {
|
|
2030
2286
|
private config;
|
|
2031
2287
|
private readonly apiUrl;
|
|
@@ -2037,13 +2293,22 @@ declare class AgentWidgetClient {
|
|
|
2037
2293
|
private readonly customFetch?;
|
|
2038
2294
|
private readonly parseSSEEvent?;
|
|
2039
2295
|
private readonly getHeaders?;
|
|
2296
|
+
private onSSEEvent?;
|
|
2040
2297
|
private clientSession;
|
|
2041
2298
|
private sessionInitPromise;
|
|
2042
2299
|
constructor(config?: AgentWidgetConfig);
|
|
2300
|
+
/**
|
|
2301
|
+
* Set callback for capturing raw SSE events
|
|
2302
|
+
*/
|
|
2303
|
+
setSSEEventCallback(callback: SSEEventCallback): void;
|
|
2043
2304
|
/**
|
|
2044
2305
|
* Check if running in client token mode
|
|
2045
2306
|
*/
|
|
2046
2307
|
isClientTokenMode(): boolean;
|
|
2308
|
+
/**
|
|
2309
|
+
* Check if operating in agent execution mode
|
|
2310
|
+
*/
|
|
2311
|
+
isAgentMode(): boolean;
|
|
2047
2312
|
/**
|
|
2048
2313
|
* Get the appropriate API URL based on mode
|
|
2049
2314
|
*/
|
|
@@ -2136,6 +2401,11 @@ declare class AgentWidgetClient {
|
|
|
2136
2401
|
* Proxy mode dispatch (original implementation)
|
|
2137
2402
|
*/
|
|
2138
2403
|
private dispatchProxy;
|
|
2404
|
+
/**
|
|
2405
|
+
* Agent mode dispatch
|
|
2406
|
+
*/
|
|
2407
|
+
private dispatchAgent;
|
|
2408
|
+
private buildAgentPayload;
|
|
2139
2409
|
private buildPayload;
|
|
2140
2410
|
/**
|
|
2141
2411
|
* Handle custom SSE event parsing via parseSSEEvent callback
|
|
@@ -2162,11 +2432,28 @@ declare class AgentWidgetSession {
|
|
|
2162
2432
|
private abortController;
|
|
2163
2433
|
private sequenceCounter;
|
|
2164
2434
|
private clientSession;
|
|
2435
|
+
private agentExecution;
|
|
2165
2436
|
constructor(config: AgentWidgetConfig | undefined, callbacks: SessionCallbacks);
|
|
2437
|
+
/**
|
|
2438
|
+
* Set callback for capturing raw SSE events (forwards to client)
|
|
2439
|
+
*/
|
|
2440
|
+
setSSEEventCallback(callback: SSEEventCallback): void;
|
|
2166
2441
|
/**
|
|
2167
2442
|
* Check if running in client token mode
|
|
2168
2443
|
*/
|
|
2169
2444
|
isClientTokenMode(): boolean;
|
|
2445
|
+
/**
|
|
2446
|
+
* Check if running in agent execution mode
|
|
2447
|
+
*/
|
|
2448
|
+
isAgentMode(): boolean;
|
|
2449
|
+
/**
|
|
2450
|
+
* Get current agent execution state (if in agent mode)
|
|
2451
|
+
*/
|
|
2452
|
+
getAgentExecution(): AgentExecutionState | null;
|
|
2453
|
+
/**
|
|
2454
|
+
* Check if an agent execution is currently running
|
|
2455
|
+
*/
|
|
2456
|
+
isAgentExecuting(): boolean;
|
|
2170
2457
|
/**
|
|
2171
2458
|
* Initialize the client session (for client token mode).
|
|
2172
2459
|
* This is called automatically on first message, but can be called
|
|
@@ -2291,6 +2578,10 @@ declare class AgentWidgetSession {
|
|
|
2291
2578
|
* });
|
|
2292
2579
|
*/
|
|
2293
2580
|
injectSystemMessage(options: InjectSystemMessageOptions): AgentWidgetMessage;
|
|
2581
|
+
/**
|
|
2582
|
+
* Inject multiple messages in a single batch with one sort and one render pass.
|
|
2583
|
+
*/
|
|
2584
|
+
injectMessageBatch(optionsList: InjectMessageOptions[]): AgentWidgetMessage[];
|
|
2294
2585
|
sendMessage(rawInput: string, options?: {
|
|
2295
2586
|
viaVoice?: boolean;
|
|
2296
2587
|
/** Multi-modal content parts (e.g., images) to include with the message */
|
|
@@ -2406,6 +2697,10 @@ type Controller = {
|
|
|
2406
2697
|
* Convenience method for injecting system messages.
|
|
2407
2698
|
*/
|
|
2408
2699
|
injectSystemMessage: (options: InjectSystemMessageOptions) => AgentWidgetMessage;
|
|
2700
|
+
/**
|
|
2701
|
+
* Inject multiple messages in a single batch with one sort and one render pass.
|
|
2702
|
+
*/
|
|
2703
|
+
injectMessageBatch: (optionsList: InjectMessageOptions[]) => AgentWidgetMessage[];
|
|
2409
2704
|
/**
|
|
2410
2705
|
* @deprecated Use injectMessage() instead.
|
|
2411
2706
|
*/
|
|
@@ -2423,6 +2718,17 @@ type Controller = {
|
|
|
2423
2718
|
showNPSFeedback: (options?: Partial<NPSFeedbackOptions>) => void;
|
|
2424
2719
|
submitCSATFeedback: (rating: number, comment?: string) => Promise<void>;
|
|
2425
2720
|
submitNPSFeedback: (rating: number, comment?: string) => Promise<void>;
|
|
2721
|
+
/** Push a raw event into the event stream buffer (for testing/debugging) */
|
|
2722
|
+
__pushEventStreamEvent: (event: {
|
|
2723
|
+
type: string;
|
|
2724
|
+
payload: unknown;
|
|
2725
|
+
}) => void;
|
|
2726
|
+
/** Opens the event stream panel */
|
|
2727
|
+
showEventStream: () => void;
|
|
2728
|
+
/** Closes the event stream panel */
|
|
2729
|
+
hideEventStream: () => void;
|
|
2730
|
+
/** Returns current visibility state of the event stream panel */
|
|
2731
|
+
isEventStreamVisible: () => boolean;
|
|
2426
2732
|
};
|
|
2427
2733
|
declare const createAgentExperience: (mount: HTMLElement, initialConfig?: AgentWidgetConfig, runtimeOptions?: {
|
|
2428
2734
|
debugTools?: boolean;
|
|
@@ -3179,4 +3485,4 @@ declare const getHeaderLayout: (layoutName: string) => HeaderLayoutRenderer;
|
|
|
3179
3485
|
*/
|
|
3180
3486
|
declare const buildHeaderWithLayout: (config: AgentWidgetConfig, layoutConfig?: AgentWidgetHeaderLayoutConfig, context?: Partial<HeaderLayoutContext>) => HeaderElements;
|
|
3181
3487
|
|
|
3182
|
-
export { type AgentWidgetAttachmentsConfig, type AgentWidgetAvatarConfig, AgentWidgetClient, type AgentWidgetConfig, type AgentWidgetController, type AgentWidgetCustomFetch, type AgentWidgetEvent, type AgentWidgetFeatureFlags, type AgentWidgetHeaderLayoutConfig, type AgentWidgetHeadersFunction, type AgentWidgetInitHandle, type AgentWidgetInitOptions, type AgentWidgetLauncherConfig, type AgentWidgetLayoutConfig, type AgentWidgetLoadingIndicatorConfig, type AgentWidgetMarkdownConfig, type AgentWidgetMarkdownOptions, type AgentWidgetMarkdownRendererOverrides, type AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetPlugin, type AgentWidgetRequestPayload, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetTheme, type AgentWidgetTimestampConfig, AttachmentManager, type AttachmentManagerConfig, type CSATFeedbackOptions, type ClientChatRequest, type ClientFeedbackRequest, type ClientFeedbackType, type ClientInitResponse, type ClientSession, type CodeFormat, type CodeGeneratorHooks, type CodeGeneratorOptions, type ComponentContext, type ComponentDirective, type ComponentRenderer, type ComposerBuildContext, type ComposerElements, type ContentPart, type CreateStandardBubbleOptions, DEFAULT_DARK_THEME, DEFAULT_LIGHT_THEME, DEFAULT_WIDGET_CONFIG, type HeaderBuildContext, type HeaderElements, type HeaderLayoutContext, type HeaderLayoutRenderer, type HeaderRenderContext, type IdleIndicatorRenderContext, type ImageContentPart, type InjectAssistantMessageOptions, type InjectMessageOptions, type InjectSystemMessageOptions, type InjectUserMessageOptions, type LoadingIndicatorRenderContext, type LoadingIndicatorRenderer, type MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, type PendingAttachment, type SlotRenderContext, type SlotRenderer, type TextContentPart, VERSION, type WidgetLayoutSlot, attachHeaderToContainer, buildComposer, buildDefaultHeader, buildExpandedHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, componentRegistry, createActionManager, createAgentExperience, createBubbleWithLayout, createCSATFeedback, createComponentMiddleware, createComponentStreamParser, createDirectivePostprocessor, createFlexibleJsonStreamParser, createImagePart, createJsonStreamParser, createLocalStorageAdapter, createMarkdownProcessor, createMarkdownProcessorFromConfig, createMessageActions, createNPSFeedback, createPlainTextParser, createRegexJsonParser, createStandardBubble, createTextPart, createTypingIndicator, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, directivePostprocessor, escapeHtml, extractComponentDirectiveFromMessage, fileToImagePart, generateAssistantMessageId, generateCodeSnippet, generateMessageId, generateUserMessageId, getDisplayText, getHeaderLayout, getImageParts, hasComponentDirective, hasImages, headerLayouts, initAgentWidget, isComponentDirectiveType, markdownPostprocessor, mergeWithDefaults, normalizeContent, pluginRegistry, renderComponentDirective, renderLoadingIndicatorWithFallback, validateImageFile };
|
|
3488
|
+
export { type AgentConfig, type AgentExecutionState, type AgentLoopConfig, type AgentMessageMetadata, type AgentRequestOptions, type AgentWidgetAgentRequestPayload, type AgentWidgetAttachmentsConfig, type AgentWidgetAvatarConfig, AgentWidgetClient, type AgentWidgetConfig, type AgentWidgetController, type AgentWidgetControllerEventMap, type AgentWidgetCustomFetch, type AgentWidgetEvent, type AgentWidgetFeatureFlags, type AgentWidgetHeaderLayoutConfig, type AgentWidgetHeadersFunction, type AgentWidgetInitHandle, type AgentWidgetInitOptions, type AgentWidgetLauncherConfig, type AgentWidgetLayoutConfig, type AgentWidgetLoadingIndicatorConfig, type AgentWidgetMarkdownConfig, type AgentWidgetMarkdownOptions, type AgentWidgetMarkdownRendererOverrides, type AgentWidgetMessage, type AgentWidgetMessageActionsConfig, type AgentWidgetMessageFeedback, type AgentWidgetMessageLayoutConfig, type AgentWidgetPlugin, type AgentWidgetRequestPayload, type AgentWidgetSSEEventParser, type AgentWidgetSSEEventResult, AgentWidgetSession, type AgentWidgetSessionStatus, type AgentWidgetStreamParser, type AgentWidgetStreamParserResult, type AgentWidgetTheme, type AgentWidgetTimestampConfig, AttachmentManager, type AttachmentManagerConfig, type CSATFeedbackOptions, type ClientChatRequest, type ClientFeedbackRequest, type ClientFeedbackType, type ClientInitResponse, type ClientSession, type CodeFormat, type CodeGeneratorHooks, type CodeGeneratorOptions, type ComponentContext, type ComponentDirective, type ComponentRenderer, type ComposerBuildContext, type ComposerElements, type ContentPart, type CreateStandardBubbleOptions, DEFAULT_DARK_THEME, DEFAULT_LIGHT_THEME, DEFAULT_WIDGET_CONFIG, type EventStreamBadgeColor, type EventStreamConfig, type EventStreamPayloadRenderContext, type EventStreamRowRenderContext, type EventStreamToolbarRenderContext, type EventStreamViewRenderContext, type HeaderBuildContext, type HeaderElements, type HeaderLayoutContext, type HeaderLayoutRenderer, type HeaderRenderContext, type IdleIndicatorRenderContext, type ImageContentPart, type InjectAssistantMessageOptions, type InjectMessageOptions, type InjectSystemMessageOptions, type InjectUserMessageOptions, type LoadingIndicatorRenderContext, type LoadingIndicatorRenderer, type MarkdownProcessorOptions, type MessageActionCallbacks, type MessageContent, type MessageRenderContext, type MessageTransform, type NPSFeedbackOptions, type PendingAttachment, type SSEEventCallback, type SSEEventRecord, type SlotRenderContext, type SlotRenderer, type TextContentPart, VERSION, type WidgetLayoutSlot, attachHeaderToContainer, buildComposer, buildDefaultHeader, buildExpandedHeader, buildHeader, buildHeaderWithLayout, buildMinimalHeader, componentRegistry, createActionManager, createAgentExperience, createBubbleWithLayout, createCSATFeedback, createComponentMiddleware, createComponentStreamParser, createDirectivePostprocessor, createFlexibleJsonStreamParser, createImagePart, createJsonStreamParser, createLocalStorageAdapter, createMarkdownProcessor, createMarkdownProcessorFromConfig, createMessageActions, createNPSFeedback, createPlainTextParser, createRegexJsonParser, createStandardBubble, createTextPart, createTypingIndicator, createXmlParser, initAgentWidget as default, defaultActionHandlers, defaultJsonActionParser, directivePostprocessor, escapeHtml, extractComponentDirectiveFromMessage, fileToImagePart, generateAssistantMessageId, generateCodeSnippet, generateMessageId, generateUserMessageId, getDisplayText, getHeaderLayout, getImageParts, hasComponentDirective, hasImages, headerLayouts, initAgentWidget, isComponentDirectiveType, markdownPostprocessor, mergeWithDefaults, normalizeContent, pluginRegistry, renderComponentDirective, renderLoadingIndicatorWithFallback, validateImageFile };
|