@octavus/core 2.2.0 → 2.3.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/dist/index.d.ts +673 -4
- package/dist/index.js +114 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -265,33 +265,45 @@ interface TextStartEvent {
|
|
|
265
265
|
* Client SDK should parse as object, not display as text.
|
|
266
266
|
*/
|
|
267
267
|
responseType?: string;
|
|
268
|
+
/** Worker ID if this event originated from a worker execution */
|
|
269
|
+
workerId?: string;
|
|
268
270
|
}
|
|
269
271
|
/** Incremental text content */
|
|
270
272
|
interface TextDeltaEvent {
|
|
271
273
|
type: 'text-delta';
|
|
272
274
|
id: string;
|
|
273
275
|
delta: string;
|
|
276
|
+
/** Worker ID if this event originated from a worker execution */
|
|
277
|
+
workerId?: string;
|
|
274
278
|
}
|
|
275
279
|
/** End of text generation for a specific text part */
|
|
276
280
|
interface TextEndEvent {
|
|
277
281
|
type: 'text-end';
|
|
278
282
|
id: string;
|
|
283
|
+
/** Worker ID if this event originated from a worker execution */
|
|
284
|
+
workerId?: string;
|
|
279
285
|
}
|
|
280
286
|
/** Start of reasoning/thinking generation */
|
|
281
287
|
interface ReasoningStartEvent {
|
|
282
288
|
type: 'reasoning-start';
|
|
283
289
|
id: string;
|
|
290
|
+
/** Worker ID if this event originated from a worker execution */
|
|
291
|
+
workerId?: string;
|
|
284
292
|
}
|
|
285
293
|
/** Incremental reasoning content */
|
|
286
294
|
interface ReasoningDeltaEvent {
|
|
287
295
|
type: 'reasoning-delta';
|
|
288
296
|
id: string;
|
|
289
297
|
delta: string;
|
|
298
|
+
/** Worker ID if this event originated from a worker execution */
|
|
299
|
+
workerId?: string;
|
|
290
300
|
}
|
|
291
301
|
/** End of reasoning generation */
|
|
292
302
|
interface ReasoningEndEvent {
|
|
293
303
|
type: 'reasoning-end';
|
|
294
304
|
id: string;
|
|
305
|
+
/** Worker ID if this event originated from a worker execution */
|
|
306
|
+
workerId?: string;
|
|
295
307
|
}
|
|
296
308
|
/** Tool call initiated - input streaming will follow */
|
|
297
309
|
interface ToolInputStartEvent {
|
|
@@ -300,17 +312,23 @@ interface ToolInputStartEvent {
|
|
|
300
312
|
toolName: string;
|
|
301
313
|
/** Human-readable title/description for the tool call */
|
|
302
314
|
title?: string;
|
|
315
|
+
/** Worker ID if this event originated from a worker execution */
|
|
316
|
+
workerId?: string;
|
|
303
317
|
}
|
|
304
318
|
/** Incremental tool input/arguments */
|
|
305
319
|
interface ToolInputDeltaEvent {
|
|
306
320
|
type: 'tool-input-delta';
|
|
307
321
|
toolCallId: string;
|
|
308
322
|
inputTextDelta: string;
|
|
323
|
+
/** Worker ID if this event originated from a worker execution */
|
|
324
|
+
workerId?: string;
|
|
309
325
|
}
|
|
310
326
|
/** Tool input streaming has ended */
|
|
311
327
|
interface ToolInputEndEvent {
|
|
312
328
|
type: 'tool-input-end';
|
|
313
329
|
toolCallId: string;
|
|
330
|
+
/** Worker ID if this event originated from a worker execution */
|
|
331
|
+
workerId?: string;
|
|
314
332
|
}
|
|
315
333
|
/** Tool input is complete and available */
|
|
316
334
|
interface ToolInputAvailableEvent {
|
|
@@ -318,24 +336,32 @@ interface ToolInputAvailableEvent {
|
|
|
318
336
|
toolCallId: string;
|
|
319
337
|
toolName: string;
|
|
320
338
|
input: unknown;
|
|
339
|
+
/** Worker ID if this event originated from a worker execution */
|
|
340
|
+
workerId?: string;
|
|
321
341
|
}
|
|
322
342
|
/** Tool output/result is available */
|
|
323
343
|
interface ToolOutputAvailableEvent {
|
|
324
344
|
type: 'tool-output-available';
|
|
325
345
|
toolCallId: string;
|
|
326
346
|
output: unknown;
|
|
347
|
+
/** Worker ID if this event originated from a worker execution */
|
|
348
|
+
workerId?: string;
|
|
327
349
|
}
|
|
328
350
|
/** Tool execution resulted in error */
|
|
329
351
|
interface ToolOutputErrorEvent {
|
|
330
352
|
type: 'tool-output-error';
|
|
331
353
|
toolCallId: string;
|
|
332
354
|
error: string;
|
|
355
|
+
/** Worker ID if this event originated from a worker execution */
|
|
356
|
+
workerId?: string;
|
|
333
357
|
}
|
|
334
358
|
/** Base source event fields */
|
|
335
359
|
interface BaseSourceEvent {
|
|
336
360
|
type: 'source';
|
|
337
361
|
/** Unique source ID */
|
|
338
362
|
id: string;
|
|
363
|
+
/** Worker ID if this event originated from a worker execution */
|
|
364
|
+
workerId?: string;
|
|
339
365
|
}
|
|
340
366
|
/** URL source from web search or similar tools */
|
|
341
367
|
interface SourceUrlEvent extends BaseSourceEvent {
|
|
@@ -369,12 +395,16 @@ interface BlockStartEvent {
|
|
|
369
395
|
outputToChat?: boolean;
|
|
370
396
|
/** Thread name (undefined or 'main' for main thread) */
|
|
371
397
|
thread?: string;
|
|
398
|
+
/** Worker ID if this event originated from a worker execution */
|
|
399
|
+
workerId?: string;
|
|
372
400
|
}
|
|
373
401
|
/** Protocol block execution completed */
|
|
374
402
|
interface BlockEndEvent {
|
|
375
403
|
type: 'block-end';
|
|
376
404
|
blockId: string;
|
|
377
405
|
summary?: string;
|
|
406
|
+
/** Worker ID if this event originated from a worker execution */
|
|
407
|
+
workerId?: string;
|
|
378
408
|
}
|
|
379
409
|
/** Resource value updated */
|
|
380
410
|
interface ResourceUpdateEvent {
|
|
@@ -393,6 +423,10 @@ interface PendingToolCall {
|
|
|
393
423
|
outputVariable?: string;
|
|
394
424
|
/** For block-based tools: block index to resume from after execution */
|
|
395
425
|
blockIndex?: number;
|
|
426
|
+
/** Thread name where this tool call originated (for workers with threads) */
|
|
427
|
+
thread?: string;
|
|
428
|
+
/** Worker ID if this tool call originated from a worker execution */
|
|
429
|
+
workerId?: string;
|
|
396
430
|
}
|
|
397
431
|
/**
|
|
398
432
|
* When this event is received, the stream will close.
|
|
@@ -401,6 +435,8 @@ interface PendingToolCall {
|
|
|
401
435
|
interface ToolRequestEvent {
|
|
402
436
|
type: 'tool-request';
|
|
403
437
|
toolCalls: PendingToolCall[];
|
|
438
|
+
/** Worker ID if this tool request originated from a worker execution */
|
|
439
|
+
workerId?: string;
|
|
404
440
|
}
|
|
405
441
|
/**
|
|
406
442
|
* Request for client-side tool execution.
|
|
@@ -430,6 +466,10 @@ interface ToolResult {
|
|
|
430
466
|
error?: string;
|
|
431
467
|
outputVariable?: string;
|
|
432
468
|
blockIndex?: number;
|
|
469
|
+
/** Thread name where this tool call originated (for workers with threads) */
|
|
470
|
+
thread?: string;
|
|
471
|
+
/** Worker ID if this tool result is for a worker execution */
|
|
472
|
+
workerId?: string;
|
|
433
473
|
}
|
|
434
474
|
/**
|
|
435
475
|
* A file generated during execution.
|
|
@@ -465,12 +505,40 @@ interface FileAvailableEvent {
|
|
|
465
505
|
size?: number;
|
|
466
506
|
/** Tool call that generated this file */
|
|
467
507
|
toolCallId?: string;
|
|
508
|
+
/** Worker ID if this event originated from a worker execution */
|
|
509
|
+
workerId?: string;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Worker execution has started.
|
|
513
|
+
* Emitted when a worker begins execution (standalone or delegated from another agent).
|
|
514
|
+
*/
|
|
515
|
+
interface WorkerStartEvent {
|
|
516
|
+
type: 'worker-start';
|
|
517
|
+
/** Unique ID for this worker invocation (correlates with worker-result, also used as session ID) */
|
|
518
|
+
workerId: string;
|
|
519
|
+
/** The worker's slug (agent identifier) */
|
|
520
|
+
workerSlug: string;
|
|
521
|
+
/** Display description for the worker execution */
|
|
522
|
+
description?: string;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Worker execution completed with output value.
|
|
526
|
+
* Emitted by worker agents before the finish event when output is defined.
|
|
527
|
+
*/
|
|
528
|
+
interface WorkerResultEvent {
|
|
529
|
+
type: 'worker-result';
|
|
530
|
+
/** Unique ID for this worker invocation (correlates with worker-start) */
|
|
531
|
+
workerId: string;
|
|
532
|
+
/** The worker's output value (undefined if no output variable defined) */
|
|
533
|
+
output?: unknown;
|
|
534
|
+
/** Error message if the worker failed */
|
|
535
|
+
error?: string;
|
|
468
536
|
}
|
|
469
|
-
type StreamEvent = StartEvent | FinishEvent | ErrorEvent | TextStartEvent | TextDeltaEvent | TextEndEvent | ReasoningStartEvent | ReasoningDeltaEvent | ReasoningEndEvent | ToolInputStartEvent | ToolInputDeltaEvent | ToolInputEndEvent | ToolInputAvailableEvent | ToolOutputAvailableEvent | ToolOutputErrorEvent | SourceEvent | BlockStartEvent | BlockEndEvent | ResourceUpdateEvent | ToolRequestEvent | ClientToolRequestEvent | FileAvailableEvent;
|
|
537
|
+
type StreamEvent = StartEvent | FinishEvent | ErrorEvent | TextStartEvent | TextDeltaEvent | TextEndEvent | ReasoningStartEvent | ReasoningDeltaEvent | ReasoningEndEvent | ToolInputStartEvent | ToolInputDeltaEvent | ToolInputEndEvent | ToolInputAvailableEvent | ToolOutputAvailableEvent | ToolOutputErrorEvent | SourceEvent | BlockStartEvent | BlockEndEvent | ResourceUpdateEvent | ToolRequestEvent | ClientToolRequestEvent | FileAvailableEvent | WorkerStartEvent | WorkerResultEvent;
|
|
470
538
|
/**
|
|
471
539
|
* Type of content in a message part (internal)
|
|
472
540
|
*/
|
|
473
|
-
type MessagePartType = 'text' | 'reasoning' | 'tool-call' | 'source' | 'file' | 'object';
|
|
541
|
+
type MessagePartType = 'text' | 'reasoning' | 'tool-call' | 'operation' | 'source' | 'file' | 'object' | 'worker';
|
|
474
542
|
/**
|
|
475
543
|
* Source info for URL sources (from web search, etc.)
|
|
476
544
|
*/
|
|
@@ -515,6 +583,37 @@ interface ObjectInfo {
|
|
|
515
583
|
/** The structured object value */
|
|
516
584
|
value: unknown;
|
|
517
585
|
}
|
|
586
|
+
/**
|
|
587
|
+
* Operation info for block operations (internal storage).
|
|
588
|
+
* Used for operations like set-resource, serialize-thread, etc.
|
|
589
|
+
*/
|
|
590
|
+
interface OperationInfo {
|
|
591
|
+
/** Operation ID (same as block ID) */
|
|
592
|
+
id: string;
|
|
593
|
+
/** Human-readable name (from block name/description) */
|
|
594
|
+
name: string;
|
|
595
|
+
/** Type of operation (e.g., 'set-resource', 'serialize-thread') */
|
|
596
|
+
operationType: string;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Worker part info for worker execution (internal storage).
|
|
600
|
+
* Stores nested parts generated by a worker, enabling parallel workers
|
|
601
|
+
* and persistence across page refresh.
|
|
602
|
+
*/
|
|
603
|
+
interface WorkerPartInfo {
|
|
604
|
+
/** Unique ID for this worker invocation (also used as session ID for debug) */
|
|
605
|
+
workerId: string;
|
|
606
|
+
/** The worker's slug (agent identifier) */
|
|
607
|
+
workerSlug: string;
|
|
608
|
+
/** Display description for the worker */
|
|
609
|
+
description?: string;
|
|
610
|
+
/** Nested parts generated by the worker (text, reasoning, tool calls, etc.) */
|
|
611
|
+
nestedParts: MessagePart[];
|
|
612
|
+
/** Worker output value (when completed) */
|
|
613
|
+
output?: unknown;
|
|
614
|
+
/** Error message if worker failed */
|
|
615
|
+
error?: string;
|
|
616
|
+
}
|
|
518
617
|
/**
|
|
519
618
|
* A single part of a message, stored in order for proper display (internal)
|
|
520
619
|
*/
|
|
@@ -526,15 +625,28 @@ interface MessagePart {
|
|
|
526
625
|
content?: string;
|
|
527
626
|
/** Tool call info for tool-call parts */
|
|
528
627
|
toolCall?: ToolCallInfo;
|
|
628
|
+
/** Operation info for operation parts (block operations) */
|
|
629
|
+
operation?: OperationInfo;
|
|
529
630
|
/** Source info for source parts (from web search, etc.) */
|
|
530
631
|
source?: SourceInfo;
|
|
531
632
|
/** File info for file parts (from skill execution, etc.) */
|
|
532
633
|
file?: FileInfo;
|
|
533
634
|
/** Object info for object parts (structured output) */
|
|
534
635
|
object?: ObjectInfo;
|
|
636
|
+
/** Worker info for worker parts (worker execution container) */
|
|
637
|
+
worker?: WorkerPartInfo;
|
|
535
638
|
/** Thread name for non-main-thread content (e.g., "summary") */
|
|
536
639
|
thread?: string;
|
|
537
640
|
}
|
|
641
|
+
/**
|
|
642
|
+
* Tool result entry for tool continuation messages.
|
|
643
|
+
* Used internally when injecting tool results back into conversation history.
|
|
644
|
+
*/
|
|
645
|
+
interface ToolResultEntry {
|
|
646
|
+
toolCallId: string;
|
|
647
|
+
toolName?: string;
|
|
648
|
+
result: unknown;
|
|
649
|
+
}
|
|
538
650
|
/**
|
|
539
651
|
* Internal chat message - stored in session state, used by LLM
|
|
540
652
|
*/
|
|
@@ -555,6 +667,12 @@ interface ChatMessage {
|
|
|
555
667
|
reasoning?: string;
|
|
556
668
|
/** Required by Anthropic to verify reasoning blocks */
|
|
557
669
|
reasoningSignature?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Tool results for continuation messages.
|
|
672
|
+
* When present, this message represents tool results being injected back
|
|
673
|
+
* into the conversation (converted to role: 'tool' for the AI SDK).
|
|
674
|
+
*/
|
|
675
|
+
toolResults?: ToolResultEntry[];
|
|
558
676
|
}
|
|
559
677
|
/**
|
|
560
678
|
* Status of a UI message
|
|
@@ -699,10 +817,36 @@ interface UIObjectPart {
|
|
|
699
817
|
/** Thread name (undefined or 'main' for main thread) */
|
|
700
818
|
thread?: string;
|
|
701
819
|
}
|
|
820
|
+
/**
|
|
821
|
+
* Status of a UI worker part
|
|
822
|
+
*/
|
|
823
|
+
type UIWorkerStatus = 'running' | 'done' | 'error';
|
|
824
|
+
/**
|
|
825
|
+
* Worker execution in a UI message.
|
|
826
|
+
* Represents a nested worker agent execution with its own parts.
|
|
827
|
+
* Used to display worker content in a dedicated container.
|
|
828
|
+
*/
|
|
829
|
+
interface UIWorkerPart {
|
|
830
|
+
type: 'worker';
|
|
831
|
+
/** Unique ID for this worker invocation (correlates events, also used as session ID for debug) */
|
|
832
|
+
workerId: string;
|
|
833
|
+
/** The worker's slug (agent identifier) */
|
|
834
|
+
workerSlug: string;
|
|
835
|
+
/** Display description for the worker */
|
|
836
|
+
description?: string;
|
|
837
|
+
/** Nested parts generated by the worker */
|
|
838
|
+
parts: UIMessagePart[];
|
|
839
|
+
/** Worker output value (when done) */
|
|
840
|
+
output?: unknown;
|
|
841
|
+
/** Error message if worker failed */
|
|
842
|
+
error?: string;
|
|
843
|
+
/** Current status */
|
|
844
|
+
status: UIWorkerStatus;
|
|
845
|
+
}
|
|
702
846
|
/**
|
|
703
847
|
* Union of all UI message part types
|
|
704
848
|
*/
|
|
705
|
-
type UIMessagePart = UITextPart | UIReasoningPart | UIToolCallPart | UIOperationPart | UISourcePart | UIFilePart | UIObjectPart;
|
|
849
|
+
type UIMessagePart = UITextPart | UIReasoningPart | UIToolCallPart | UIOperationPart | UISourcePart | UIFilePart | UIObjectPart | UIWorkerPart;
|
|
706
850
|
/**
|
|
707
851
|
* UI Message - the client-facing message format
|
|
708
852
|
* All complexity is handled by the SDK, this is what consumers render
|
|
@@ -809,6 +953,8 @@ declare const toolResultSchema: z.ZodObject<{
|
|
|
809
953
|
error: z.ZodOptional<z.ZodString>;
|
|
810
954
|
outputVariable: z.ZodOptional<z.ZodString>;
|
|
811
955
|
blockIndex: z.ZodOptional<z.ZodNumber>;
|
|
956
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
957
|
+
workerId: z.ZodOptional<z.ZodString>;
|
|
812
958
|
}, z.core.$strip>;
|
|
813
959
|
/**
|
|
814
960
|
* Schema for file references used in trigger input and user messages.
|
|
@@ -834,7 +980,9 @@ declare const chatMessageSchema: z.ZodObject<{
|
|
|
834
980
|
text: "text";
|
|
835
981
|
reasoning: "reasoning";
|
|
836
982
|
"tool-call": "tool-call";
|
|
983
|
+
operation: "operation";
|
|
837
984
|
file: "file";
|
|
985
|
+
worker: "worker";
|
|
838
986
|
}>;
|
|
839
987
|
visible: z.ZodBoolean;
|
|
840
988
|
content: z.ZodOptional<z.ZodString>;
|
|
@@ -852,6 +1000,11 @@ declare const chatMessageSchema: z.ZodObject<{
|
|
|
852
1000
|
result: z.ZodOptional<z.ZodUnknown>;
|
|
853
1001
|
error: z.ZodOptional<z.ZodString>;
|
|
854
1002
|
}, z.core.$strip>>;
|
|
1003
|
+
operation: z.ZodOptional<z.ZodObject<{
|
|
1004
|
+
id: z.ZodString;
|
|
1005
|
+
name: z.ZodString;
|
|
1006
|
+
operationType: z.ZodString;
|
|
1007
|
+
}, z.core.$strip>>;
|
|
855
1008
|
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
856
1009
|
sourceType: z.ZodLiteral<"url">;
|
|
857
1010
|
id: z.ZodString;
|
|
@@ -877,6 +1030,71 @@ declare const chatMessageSchema: z.ZodObject<{
|
|
|
877
1030
|
typeName: z.ZodString;
|
|
878
1031
|
value: z.ZodUnknown;
|
|
879
1032
|
}, z.core.$strip>>;
|
|
1033
|
+
worker: z.ZodOptional<z.ZodObject<{
|
|
1034
|
+
workerId: z.ZodString;
|
|
1035
|
+
workerSlug: z.ZodString;
|
|
1036
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1037
|
+
nestedParts: z.ZodArray<z.ZodObject<{
|
|
1038
|
+
type: z.ZodEnum<{
|
|
1039
|
+
object: "object";
|
|
1040
|
+
source: "source";
|
|
1041
|
+
text: "text";
|
|
1042
|
+
reasoning: "reasoning";
|
|
1043
|
+
"tool-call": "tool-call";
|
|
1044
|
+
operation: "operation";
|
|
1045
|
+
file: "file";
|
|
1046
|
+
}>;
|
|
1047
|
+
visible: z.ZodBoolean;
|
|
1048
|
+
content: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
toolCall: z.ZodOptional<z.ZodObject<{
|
|
1050
|
+
id: z.ZodString;
|
|
1051
|
+
name: z.ZodString;
|
|
1052
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1053
|
+
arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1054
|
+
status: z.ZodEnum<{
|
|
1055
|
+
pending: "pending";
|
|
1056
|
+
streaming: "streaming";
|
|
1057
|
+
available: "available";
|
|
1058
|
+
error: "error";
|
|
1059
|
+
}>;
|
|
1060
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1061
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1062
|
+
}, z.core.$strip>>;
|
|
1063
|
+
operation: z.ZodOptional<z.ZodObject<{
|
|
1064
|
+
id: z.ZodString;
|
|
1065
|
+
name: z.ZodString;
|
|
1066
|
+
operationType: z.ZodString;
|
|
1067
|
+
}, z.core.$strip>>;
|
|
1068
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1069
|
+
sourceType: z.ZodLiteral<"url">;
|
|
1070
|
+
id: z.ZodString;
|
|
1071
|
+
url: z.ZodString;
|
|
1072
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1073
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1074
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1075
|
+
id: z.ZodString;
|
|
1076
|
+
mediaType: z.ZodString;
|
|
1077
|
+
title: z.ZodString;
|
|
1078
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1079
|
+
}, z.core.$strip>], "sourceType">>;
|
|
1080
|
+
file: z.ZodOptional<z.ZodObject<{
|
|
1081
|
+
id: z.ZodString;
|
|
1082
|
+
mediaType: z.ZodString;
|
|
1083
|
+
url: z.ZodString;
|
|
1084
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1086
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1087
|
+
}, z.core.$strip>>;
|
|
1088
|
+
object: z.ZodOptional<z.ZodObject<{
|
|
1089
|
+
id: z.ZodString;
|
|
1090
|
+
typeName: z.ZodString;
|
|
1091
|
+
value: z.ZodUnknown;
|
|
1092
|
+
}, z.core.$strip>>;
|
|
1093
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
}, z.core.$strip>>;
|
|
1095
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1096
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1097
|
+
}, z.core.$strip>>;
|
|
880
1098
|
thread: z.ZodOptional<z.ZodString>;
|
|
881
1099
|
}, z.core.$strip>>;
|
|
882
1100
|
createdAt: z.ZodString;
|
|
@@ -899,6 +1117,103 @@ declare const chatMessageSchema: z.ZodObject<{
|
|
|
899
1117
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
900
1118
|
reasoningSignature: z.ZodOptional<z.ZodString>;
|
|
901
1119
|
}, z.core.$strip>;
|
|
1120
|
+
declare const uiWorkerStatusSchema: z.ZodEnum<{
|
|
1121
|
+
error: "error";
|
|
1122
|
+
done: "done";
|
|
1123
|
+
running: "running";
|
|
1124
|
+
}>;
|
|
1125
|
+
declare const uiWorkerPartSchema: z.ZodObject<{
|
|
1126
|
+
type: z.ZodLiteral<"worker">;
|
|
1127
|
+
workerId: z.ZodString;
|
|
1128
|
+
workerSlug: z.ZodString;
|
|
1129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1131
|
+
type: z.ZodLiteral<"text">;
|
|
1132
|
+
text: z.ZodString;
|
|
1133
|
+
status: z.ZodEnum<{
|
|
1134
|
+
streaming: "streaming";
|
|
1135
|
+
done: "done";
|
|
1136
|
+
}>;
|
|
1137
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1139
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1140
|
+
text: z.ZodString;
|
|
1141
|
+
status: z.ZodEnum<{
|
|
1142
|
+
streaming: "streaming";
|
|
1143
|
+
done: "done";
|
|
1144
|
+
}>;
|
|
1145
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1146
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1147
|
+
type: z.ZodLiteral<"tool-call">;
|
|
1148
|
+
toolCallId: z.ZodString;
|
|
1149
|
+
toolName: z.ZodString;
|
|
1150
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1151
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1152
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1153
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1154
|
+
status: z.ZodEnum<{
|
|
1155
|
+
pending: "pending";
|
|
1156
|
+
error: "error";
|
|
1157
|
+
done: "done";
|
|
1158
|
+
running: "running";
|
|
1159
|
+
}>;
|
|
1160
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1162
|
+
type: z.ZodLiteral<"operation">;
|
|
1163
|
+
operationId: z.ZodString;
|
|
1164
|
+
name: z.ZodString;
|
|
1165
|
+
operationType: z.ZodString;
|
|
1166
|
+
status: z.ZodEnum<{
|
|
1167
|
+
done: "done";
|
|
1168
|
+
running: "running";
|
|
1169
|
+
}>;
|
|
1170
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1172
|
+
type: z.ZodLiteral<"source">;
|
|
1173
|
+
sourceType: z.ZodLiteral<"url">;
|
|
1174
|
+
id: z.ZodString;
|
|
1175
|
+
url: z.ZodString;
|
|
1176
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1177
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1179
|
+
type: z.ZodLiteral<"source">;
|
|
1180
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1181
|
+
id: z.ZodString;
|
|
1182
|
+
mediaType: z.ZodString;
|
|
1183
|
+
title: z.ZodString;
|
|
1184
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1185
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1186
|
+
}, z.core.$strip>], "sourceType">, z.ZodObject<{
|
|
1187
|
+
type: z.ZodLiteral<"file">;
|
|
1188
|
+
id: z.ZodString;
|
|
1189
|
+
mediaType: z.ZodString;
|
|
1190
|
+
url: z.ZodString;
|
|
1191
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1192
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1193
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1194
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1196
|
+
type: z.ZodLiteral<"object">;
|
|
1197
|
+
id: z.ZodString;
|
|
1198
|
+
typeName: z.ZodString;
|
|
1199
|
+
partial: z.ZodOptional<z.ZodUnknown>;
|
|
1200
|
+
object: z.ZodOptional<z.ZodUnknown>;
|
|
1201
|
+
status: z.ZodEnum<{
|
|
1202
|
+
streaming: "streaming";
|
|
1203
|
+
error: "error";
|
|
1204
|
+
done: "done";
|
|
1205
|
+
}>;
|
|
1206
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1207
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1208
|
+
}, z.core.$strip>]>>;
|
|
1209
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1210
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1211
|
+
status: z.ZodEnum<{
|
|
1212
|
+
error: "error";
|
|
1213
|
+
done: "done";
|
|
1214
|
+
running: "running";
|
|
1215
|
+
}>;
|
|
1216
|
+
}, z.core.$strip>;
|
|
902
1217
|
declare const uiMessagePartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
903
1218
|
type: z.ZodLiteral<"text">;
|
|
904
1219
|
text: z.ZodString;
|
|
@@ -977,6 +1292,97 @@ declare const uiMessagePartSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
977
1292
|
}>;
|
|
978
1293
|
error: z.ZodOptional<z.ZodString>;
|
|
979
1294
|
thread: z.ZodOptional<z.ZodString>;
|
|
1295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1296
|
+
type: z.ZodLiteral<"worker">;
|
|
1297
|
+
workerId: z.ZodString;
|
|
1298
|
+
workerSlug: z.ZodString;
|
|
1299
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1300
|
+
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1301
|
+
type: z.ZodLiteral<"text">;
|
|
1302
|
+
text: z.ZodString;
|
|
1303
|
+
status: z.ZodEnum<{
|
|
1304
|
+
streaming: "streaming";
|
|
1305
|
+
done: "done";
|
|
1306
|
+
}>;
|
|
1307
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1308
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1309
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1310
|
+
text: z.ZodString;
|
|
1311
|
+
status: z.ZodEnum<{
|
|
1312
|
+
streaming: "streaming";
|
|
1313
|
+
done: "done";
|
|
1314
|
+
}>;
|
|
1315
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1316
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1317
|
+
type: z.ZodLiteral<"tool-call">;
|
|
1318
|
+
toolCallId: z.ZodString;
|
|
1319
|
+
toolName: z.ZodString;
|
|
1320
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1321
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1322
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1323
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1324
|
+
status: z.ZodEnum<{
|
|
1325
|
+
pending: "pending";
|
|
1326
|
+
error: "error";
|
|
1327
|
+
done: "done";
|
|
1328
|
+
running: "running";
|
|
1329
|
+
}>;
|
|
1330
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1331
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1332
|
+
type: z.ZodLiteral<"operation">;
|
|
1333
|
+
operationId: z.ZodString;
|
|
1334
|
+
name: z.ZodString;
|
|
1335
|
+
operationType: z.ZodString;
|
|
1336
|
+
status: z.ZodEnum<{
|
|
1337
|
+
done: "done";
|
|
1338
|
+
running: "running";
|
|
1339
|
+
}>;
|
|
1340
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1341
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1342
|
+
type: z.ZodLiteral<"source">;
|
|
1343
|
+
sourceType: z.ZodLiteral<"url">;
|
|
1344
|
+
id: z.ZodString;
|
|
1345
|
+
url: z.ZodString;
|
|
1346
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1348
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1349
|
+
type: z.ZodLiteral<"source">;
|
|
1350
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1351
|
+
id: z.ZodString;
|
|
1352
|
+
mediaType: z.ZodString;
|
|
1353
|
+
title: z.ZodString;
|
|
1354
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1355
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1356
|
+
}, z.core.$strip>], "sourceType">, z.ZodObject<{
|
|
1357
|
+
type: z.ZodLiteral<"file">;
|
|
1358
|
+
id: z.ZodString;
|
|
1359
|
+
mediaType: z.ZodString;
|
|
1360
|
+
url: z.ZodString;
|
|
1361
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1362
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1363
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1364
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1365
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1366
|
+
type: z.ZodLiteral<"object">;
|
|
1367
|
+
id: z.ZodString;
|
|
1368
|
+
typeName: z.ZodString;
|
|
1369
|
+
partial: z.ZodOptional<z.ZodUnknown>;
|
|
1370
|
+
object: z.ZodOptional<z.ZodUnknown>;
|
|
1371
|
+
status: z.ZodEnum<{
|
|
1372
|
+
streaming: "streaming";
|
|
1373
|
+
error: "error";
|
|
1374
|
+
done: "done";
|
|
1375
|
+
}>;
|
|
1376
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1377
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1378
|
+
}, z.core.$strip>]>>;
|
|
1379
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1380
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1381
|
+
status: z.ZodEnum<{
|
|
1382
|
+
error: "error";
|
|
1383
|
+
done: "done";
|
|
1384
|
+
running: "running";
|
|
1385
|
+
}>;
|
|
980
1386
|
}, z.core.$strip>]>;
|
|
981
1387
|
declare const uiMessageSchema: z.ZodObject<{
|
|
982
1388
|
id: z.ZodString;
|
|
@@ -1062,6 +1468,97 @@ declare const uiMessageSchema: z.ZodObject<{
|
|
|
1062
1468
|
}>;
|
|
1063
1469
|
error: z.ZodOptional<z.ZodString>;
|
|
1064
1470
|
thread: z.ZodOptional<z.ZodString>;
|
|
1471
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1472
|
+
type: z.ZodLiteral<"worker">;
|
|
1473
|
+
workerId: z.ZodString;
|
|
1474
|
+
workerSlug: z.ZodString;
|
|
1475
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1476
|
+
parts: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1477
|
+
type: z.ZodLiteral<"text">;
|
|
1478
|
+
text: z.ZodString;
|
|
1479
|
+
status: z.ZodEnum<{
|
|
1480
|
+
streaming: "streaming";
|
|
1481
|
+
done: "done";
|
|
1482
|
+
}>;
|
|
1483
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1484
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1485
|
+
type: z.ZodLiteral<"reasoning">;
|
|
1486
|
+
text: z.ZodString;
|
|
1487
|
+
status: z.ZodEnum<{
|
|
1488
|
+
streaming: "streaming";
|
|
1489
|
+
done: "done";
|
|
1490
|
+
}>;
|
|
1491
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1492
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1493
|
+
type: z.ZodLiteral<"tool-call">;
|
|
1494
|
+
toolCallId: z.ZodString;
|
|
1495
|
+
toolName: z.ZodString;
|
|
1496
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1497
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1498
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
1499
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1500
|
+
status: z.ZodEnum<{
|
|
1501
|
+
pending: "pending";
|
|
1502
|
+
error: "error";
|
|
1503
|
+
done: "done";
|
|
1504
|
+
running: "running";
|
|
1505
|
+
}>;
|
|
1506
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1508
|
+
type: z.ZodLiteral<"operation">;
|
|
1509
|
+
operationId: z.ZodString;
|
|
1510
|
+
name: z.ZodString;
|
|
1511
|
+
operationType: z.ZodString;
|
|
1512
|
+
status: z.ZodEnum<{
|
|
1513
|
+
done: "done";
|
|
1514
|
+
running: "running";
|
|
1515
|
+
}>;
|
|
1516
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1518
|
+
type: z.ZodLiteral<"source">;
|
|
1519
|
+
sourceType: z.ZodLiteral<"url">;
|
|
1520
|
+
id: z.ZodString;
|
|
1521
|
+
url: z.ZodString;
|
|
1522
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1523
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1524
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1525
|
+
type: z.ZodLiteral<"source">;
|
|
1526
|
+
sourceType: z.ZodLiteral<"document">;
|
|
1527
|
+
id: z.ZodString;
|
|
1528
|
+
mediaType: z.ZodString;
|
|
1529
|
+
title: z.ZodString;
|
|
1530
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1531
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1532
|
+
}, z.core.$strip>], "sourceType">, z.ZodObject<{
|
|
1533
|
+
type: z.ZodLiteral<"file">;
|
|
1534
|
+
id: z.ZodString;
|
|
1535
|
+
mediaType: z.ZodString;
|
|
1536
|
+
url: z.ZodString;
|
|
1537
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
1538
|
+
size: z.ZodOptional<z.ZodNumber>;
|
|
1539
|
+
toolCallId: z.ZodOptional<z.ZodString>;
|
|
1540
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1542
|
+
type: z.ZodLiteral<"object">;
|
|
1543
|
+
id: z.ZodString;
|
|
1544
|
+
typeName: z.ZodString;
|
|
1545
|
+
partial: z.ZodOptional<z.ZodUnknown>;
|
|
1546
|
+
object: z.ZodOptional<z.ZodUnknown>;
|
|
1547
|
+
status: z.ZodEnum<{
|
|
1548
|
+
streaming: "streaming";
|
|
1549
|
+
error: "error";
|
|
1550
|
+
done: "done";
|
|
1551
|
+
}>;
|
|
1552
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1553
|
+
thread: z.ZodOptional<z.ZodString>;
|
|
1554
|
+
}, z.core.$strip>]>>;
|
|
1555
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1556
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1557
|
+
status: z.ZodEnum<{
|
|
1558
|
+
error: "error";
|
|
1559
|
+
done: "done";
|
|
1560
|
+
running: "running";
|
|
1561
|
+
}>;
|
|
1065
1562
|
}, z.core.$strip>]>>;
|
|
1066
1563
|
status: z.ZodEnum<{
|
|
1067
1564
|
streaming: "streaming";
|
|
@@ -1075,6 +1572,7 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1075
1572
|
id: string;
|
|
1076
1573
|
url: string;
|
|
1077
1574
|
title?: string | undefined;
|
|
1575
|
+
workerId?: string | undefined;
|
|
1078
1576
|
} | {
|
|
1079
1577
|
type: "source";
|
|
1080
1578
|
sourceType: "document";
|
|
@@ -1082,6 +1580,7 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1082
1580
|
mediaType: string;
|
|
1083
1581
|
title: string;
|
|
1084
1582
|
filename?: string | undefined;
|
|
1583
|
+
workerId?: string | undefined;
|
|
1085
1584
|
} | {
|
|
1086
1585
|
type: "start";
|
|
1087
1586
|
messageId?: string | undefined;
|
|
@@ -1113,48 +1612,60 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1113
1612
|
type: "text-start";
|
|
1114
1613
|
id: string;
|
|
1115
1614
|
responseType?: string | undefined;
|
|
1615
|
+
workerId?: string | undefined;
|
|
1116
1616
|
} | {
|
|
1117
1617
|
type: "text-delta";
|
|
1118
1618
|
id: string;
|
|
1119
1619
|
delta: string;
|
|
1620
|
+
workerId?: string | undefined;
|
|
1120
1621
|
} | {
|
|
1121
1622
|
type: "text-end";
|
|
1122
1623
|
id: string;
|
|
1624
|
+
workerId?: string | undefined;
|
|
1123
1625
|
} | {
|
|
1124
1626
|
type: "reasoning-start";
|
|
1125
1627
|
id: string;
|
|
1628
|
+
workerId?: string | undefined;
|
|
1126
1629
|
} | {
|
|
1127
1630
|
type: "reasoning-delta";
|
|
1128
1631
|
id: string;
|
|
1129
1632
|
delta: string;
|
|
1633
|
+
workerId?: string | undefined;
|
|
1130
1634
|
} | {
|
|
1131
1635
|
type: "reasoning-end";
|
|
1132
1636
|
id: string;
|
|
1637
|
+
workerId?: string | undefined;
|
|
1133
1638
|
} | {
|
|
1134
1639
|
type: "tool-input-start";
|
|
1135
1640
|
toolCallId: string;
|
|
1136
1641
|
toolName: string;
|
|
1137
1642
|
title?: string | undefined;
|
|
1643
|
+
workerId?: string | undefined;
|
|
1138
1644
|
} | {
|
|
1139
1645
|
type: "tool-input-delta";
|
|
1140
1646
|
toolCallId: string;
|
|
1141
1647
|
inputTextDelta: string;
|
|
1648
|
+
workerId?: string | undefined;
|
|
1142
1649
|
} | {
|
|
1143
1650
|
type: "tool-input-end";
|
|
1144
1651
|
toolCallId: string;
|
|
1652
|
+
workerId?: string | undefined;
|
|
1145
1653
|
} | {
|
|
1146
1654
|
type: "tool-input-available";
|
|
1147
1655
|
toolCallId: string;
|
|
1148
1656
|
toolName: string;
|
|
1149
1657
|
input: unknown;
|
|
1658
|
+
workerId?: string | undefined;
|
|
1150
1659
|
} | {
|
|
1151
1660
|
type: "tool-output-available";
|
|
1152
1661
|
toolCallId: string;
|
|
1153
1662
|
output: unknown;
|
|
1663
|
+
workerId?: string | undefined;
|
|
1154
1664
|
} | {
|
|
1155
1665
|
type: "tool-output-error";
|
|
1156
1666
|
toolCallId: string;
|
|
1157
1667
|
error: string;
|
|
1668
|
+
workerId?: string | undefined;
|
|
1158
1669
|
} | {
|
|
1159
1670
|
type: "block-start";
|
|
1160
1671
|
blockId: string;
|
|
@@ -1164,10 +1675,12 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1164
1675
|
description?: string | undefined;
|
|
1165
1676
|
outputToChat?: boolean | undefined;
|
|
1166
1677
|
thread?: string | undefined;
|
|
1678
|
+
workerId?: string | undefined;
|
|
1167
1679
|
} | {
|
|
1168
1680
|
type: "block-end";
|
|
1169
1681
|
blockId: string;
|
|
1170
1682
|
summary?: string | undefined;
|
|
1683
|
+
workerId?: string | undefined;
|
|
1171
1684
|
} | {
|
|
1172
1685
|
type: "resource-update";
|
|
1173
1686
|
name: string;
|
|
@@ -1181,7 +1694,10 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1181
1694
|
source?: "llm" | "block" | undefined;
|
|
1182
1695
|
outputVariable?: string | undefined;
|
|
1183
1696
|
blockIndex?: number | undefined;
|
|
1697
|
+
thread?: string | undefined;
|
|
1698
|
+
workerId?: string | undefined;
|
|
1184
1699
|
}[];
|
|
1700
|
+
workerId?: string | undefined;
|
|
1185
1701
|
} | {
|
|
1186
1702
|
type: "client-tool-request";
|
|
1187
1703
|
executionId: string;
|
|
@@ -1192,6 +1708,8 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1192
1708
|
source?: "llm" | "block" | undefined;
|
|
1193
1709
|
outputVariable?: string | undefined;
|
|
1194
1710
|
blockIndex?: number | undefined;
|
|
1711
|
+
thread?: string | undefined;
|
|
1712
|
+
workerId?: string | undefined;
|
|
1195
1713
|
}[];
|
|
1196
1714
|
serverToolResults?: {
|
|
1197
1715
|
toolCallId: string;
|
|
@@ -1200,6 +1718,8 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1200
1718
|
error?: string | undefined;
|
|
1201
1719
|
outputVariable?: string | undefined;
|
|
1202
1720
|
blockIndex?: number | undefined;
|
|
1721
|
+
thread?: string | undefined;
|
|
1722
|
+
workerId?: string | undefined;
|
|
1203
1723
|
}[] | undefined;
|
|
1204
1724
|
} | {
|
|
1205
1725
|
type: "file-available";
|
|
@@ -1209,6 +1729,17 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
|
|
|
1209
1729
|
filename?: string | undefined;
|
|
1210
1730
|
size?: number | undefined;
|
|
1211
1731
|
toolCallId?: string | undefined;
|
|
1732
|
+
workerId?: string | undefined;
|
|
1733
|
+
} | {
|
|
1734
|
+
type: "worker-start";
|
|
1735
|
+
workerId: string;
|
|
1736
|
+
workerSlug: string;
|
|
1737
|
+
description?: string | undefined;
|
|
1738
|
+
} | {
|
|
1739
|
+
type: "worker-result";
|
|
1740
|
+
workerId: string;
|
|
1741
|
+
output?: unknown;
|
|
1742
|
+
error?: string | undefined;
|
|
1212
1743
|
}>;
|
|
1213
1744
|
declare function safeParseUIMessage(data: unknown): z.ZodSafeParseResult<{
|
|
1214
1745
|
id: string;
|
|
@@ -1273,6 +1804,75 @@ declare function safeParseUIMessage(data: unknown): z.ZodSafeParseResult<{
|
|
|
1273
1804
|
object?: unknown;
|
|
1274
1805
|
error?: string | undefined;
|
|
1275
1806
|
thread?: string | undefined;
|
|
1807
|
+
} | {
|
|
1808
|
+
type: "worker";
|
|
1809
|
+
workerId: string;
|
|
1810
|
+
workerSlug: string;
|
|
1811
|
+
parts: ({
|
|
1812
|
+
type: "source";
|
|
1813
|
+
sourceType: "url";
|
|
1814
|
+
id: string;
|
|
1815
|
+
url: string;
|
|
1816
|
+
title?: string | undefined;
|
|
1817
|
+
thread?: string | undefined;
|
|
1818
|
+
} | {
|
|
1819
|
+
type: "source";
|
|
1820
|
+
sourceType: "document";
|
|
1821
|
+
id: string;
|
|
1822
|
+
mediaType: string;
|
|
1823
|
+
title: string;
|
|
1824
|
+
filename?: string | undefined;
|
|
1825
|
+
thread?: string | undefined;
|
|
1826
|
+
} | {
|
|
1827
|
+
type: "text";
|
|
1828
|
+
text: string;
|
|
1829
|
+
status: "streaming" | "done";
|
|
1830
|
+
thread?: string | undefined;
|
|
1831
|
+
} | {
|
|
1832
|
+
type: "reasoning";
|
|
1833
|
+
text: string;
|
|
1834
|
+
status: "streaming" | "done";
|
|
1835
|
+
thread?: string | undefined;
|
|
1836
|
+
} | {
|
|
1837
|
+
type: "tool-call";
|
|
1838
|
+
toolCallId: string;
|
|
1839
|
+
toolName: string;
|
|
1840
|
+
args: Record<string, unknown>;
|
|
1841
|
+
status: "pending" | "error" | "done" | "running";
|
|
1842
|
+
displayName?: string | undefined;
|
|
1843
|
+
result?: unknown;
|
|
1844
|
+
error?: string | undefined;
|
|
1845
|
+
thread?: string | undefined;
|
|
1846
|
+
} | {
|
|
1847
|
+
type: "operation";
|
|
1848
|
+
operationId: string;
|
|
1849
|
+
name: string;
|
|
1850
|
+
operationType: string;
|
|
1851
|
+
status: "done" | "running";
|
|
1852
|
+
thread?: string | undefined;
|
|
1853
|
+
} | {
|
|
1854
|
+
type: "file";
|
|
1855
|
+
id: string;
|
|
1856
|
+
mediaType: string;
|
|
1857
|
+
url: string;
|
|
1858
|
+
filename?: string | undefined;
|
|
1859
|
+
size?: number | undefined;
|
|
1860
|
+
toolCallId?: string | undefined;
|
|
1861
|
+
thread?: string | undefined;
|
|
1862
|
+
} | {
|
|
1863
|
+
type: "object";
|
|
1864
|
+
id: string;
|
|
1865
|
+
typeName: string;
|
|
1866
|
+
status: "streaming" | "error" | "done";
|
|
1867
|
+
partial?: unknown;
|
|
1868
|
+
object?: unknown;
|
|
1869
|
+
error?: string | undefined;
|
|
1870
|
+
thread?: string | undefined;
|
|
1871
|
+
})[];
|
|
1872
|
+
status: "error" | "done" | "running";
|
|
1873
|
+
description?: string | undefined;
|
|
1874
|
+
output?: unknown;
|
|
1875
|
+
error?: string | undefined;
|
|
1276
1876
|
})[];
|
|
1277
1877
|
status: "streaming" | "done";
|
|
1278
1878
|
createdAt: Date;
|
|
@@ -1340,6 +1940,75 @@ declare function safeParseUIMessages(data: unknown): z.ZodSafeParseResult<{
|
|
|
1340
1940
|
object?: unknown;
|
|
1341
1941
|
error?: string | undefined;
|
|
1342
1942
|
thread?: string | undefined;
|
|
1943
|
+
} | {
|
|
1944
|
+
type: "worker";
|
|
1945
|
+
workerId: string;
|
|
1946
|
+
workerSlug: string;
|
|
1947
|
+
parts: ({
|
|
1948
|
+
type: "source";
|
|
1949
|
+
sourceType: "url";
|
|
1950
|
+
id: string;
|
|
1951
|
+
url: string;
|
|
1952
|
+
title?: string | undefined;
|
|
1953
|
+
thread?: string | undefined;
|
|
1954
|
+
} | {
|
|
1955
|
+
type: "source";
|
|
1956
|
+
sourceType: "document";
|
|
1957
|
+
id: string;
|
|
1958
|
+
mediaType: string;
|
|
1959
|
+
title: string;
|
|
1960
|
+
filename?: string | undefined;
|
|
1961
|
+
thread?: string | undefined;
|
|
1962
|
+
} | {
|
|
1963
|
+
type: "text";
|
|
1964
|
+
text: string;
|
|
1965
|
+
status: "streaming" | "done";
|
|
1966
|
+
thread?: string | undefined;
|
|
1967
|
+
} | {
|
|
1968
|
+
type: "reasoning";
|
|
1969
|
+
text: string;
|
|
1970
|
+
status: "streaming" | "done";
|
|
1971
|
+
thread?: string | undefined;
|
|
1972
|
+
} | {
|
|
1973
|
+
type: "tool-call";
|
|
1974
|
+
toolCallId: string;
|
|
1975
|
+
toolName: string;
|
|
1976
|
+
args: Record<string, unknown>;
|
|
1977
|
+
status: "pending" | "error" | "done" | "running";
|
|
1978
|
+
displayName?: string | undefined;
|
|
1979
|
+
result?: unknown;
|
|
1980
|
+
error?: string | undefined;
|
|
1981
|
+
thread?: string | undefined;
|
|
1982
|
+
} | {
|
|
1983
|
+
type: "operation";
|
|
1984
|
+
operationId: string;
|
|
1985
|
+
name: string;
|
|
1986
|
+
operationType: string;
|
|
1987
|
+
status: "done" | "running";
|
|
1988
|
+
thread?: string | undefined;
|
|
1989
|
+
} | {
|
|
1990
|
+
type: "file";
|
|
1991
|
+
id: string;
|
|
1992
|
+
mediaType: string;
|
|
1993
|
+
url: string;
|
|
1994
|
+
filename?: string | undefined;
|
|
1995
|
+
size?: number | undefined;
|
|
1996
|
+
toolCallId?: string | undefined;
|
|
1997
|
+
thread?: string | undefined;
|
|
1998
|
+
} | {
|
|
1999
|
+
type: "object";
|
|
2000
|
+
id: string;
|
|
2001
|
+
typeName: string;
|
|
2002
|
+
status: "streaming" | "error" | "done";
|
|
2003
|
+
partial?: unknown;
|
|
2004
|
+
object?: unknown;
|
|
2005
|
+
error?: string | undefined;
|
|
2006
|
+
thread?: string | undefined;
|
|
2007
|
+
})[];
|
|
2008
|
+
status: "error" | "done" | "running";
|
|
2009
|
+
description?: string | undefined;
|
|
2010
|
+
output?: unknown;
|
|
2011
|
+
error?: string | undefined;
|
|
1343
2012
|
})[];
|
|
1344
2013
|
status: "streaming" | "done";
|
|
1345
2014
|
createdAt: Date;
|
|
@@ -1398,4 +2067,4 @@ declare function isOctavusSkillTool(toolName: string): toolName is OctavusSkillT
|
|
|
1398
2067
|
*/
|
|
1399
2068
|
declare function getSkillSlugFromToolCall(toolName: string, args: Record<string, unknown> | undefined): string | undefined;
|
|
1400
2069
|
|
|
1401
|
-
export { AppError, type BlockEndEvent, type BlockStartEvent, type ChatMessage, type ClientToolRequestEvent, ConflictError, type CreateErrorEventOptions, type DisplayMode, type ErrorEvent, type ErrorSource, type ErrorType, type FileAvailableEvent, type FileInfo, type FileReference, type FinishEvent, type FinishReason, ForbiddenError, type GeneratedFile, MAIN_THREAD, type MessagePart, type MessagePartType, type MessageRole, NotFoundError, OCTAVUS_SKILL_TOOLS, type ObjectInfo, OctavusError, type OctavusErrorOptions, type OctavusSkillToolName, type PendingToolCall, type ProviderErrorInfo, type ReasoningDeltaEvent, type ReasoningEndEvent, type ReasoningStartEvent, type ResourceUpdateEvent, type ResourceUpdateHandler, type SourceDocumentEvent, type SourceDocumentInfo, type SourceEvent, type SourceInfo, type SourceUrlEvent, type SourceUrlInfo, type StartEvent, type StreamEvent, type TextDeltaEvent, type TextEndEvent, type TextStartEvent, type ToolCallInfo, type ToolCallStatus, type ToolErrorInfo, type ToolHandler, type ToolHandlers, type ToolInputAvailableEvent, type ToolInputDeltaEvent, type ToolInputEndEvent, type ToolInputStartEvent, type ToolOutputAvailableEvent, type ToolOutputErrorEvent, type ToolRequestEvent, type ToolResult, type UIFilePart, type UIMessage, type UIMessagePart, type UIMessageStatus, type UIObjectPart, type UIObjectStatus, type UIOperationPart, type UIOperationStatus, type UIPartStatus, type UIReasoningPart, type UISourceDocumentPart, type UISourcePart, type UISourceUrlPart, type UITextPart, type UIToolCallPart, type UIToolCallStatus, ValidationError, chatMessageSchema, createApiErrorEvent, createErrorEvent, createInternalErrorEvent, errorToStreamEvent, fileReferenceSchema, generateId, getSkillSlugFromToolCall, isAbortError, isAuthenticationError, isFileReference, isFileReferenceArray, isMainThread, isOctavusSkillTool, isOtherThread, isProviderError, isRateLimitError, isRetryableError, isToolError, isValidationError, resolveThread, safeParseStreamEvent, safeParseUIMessage, safeParseUIMessages, threadForPart, toolResultSchema, uiMessagePartSchema, uiMessageSchema };
|
|
2070
|
+
export { AppError, type BlockEndEvent, type BlockStartEvent, type ChatMessage, type ClientToolRequestEvent, ConflictError, type CreateErrorEventOptions, type DisplayMode, type ErrorEvent, type ErrorSource, type ErrorType, type FileAvailableEvent, type FileInfo, type FileReference, type FinishEvent, type FinishReason, ForbiddenError, type GeneratedFile, MAIN_THREAD, type MessagePart, type MessagePartType, type MessageRole, NotFoundError, OCTAVUS_SKILL_TOOLS, type ObjectInfo, OctavusError, type OctavusErrorOptions, type OctavusSkillToolName, type OperationInfo, type PendingToolCall, type ProviderErrorInfo, type ReasoningDeltaEvent, type ReasoningEndEvent, type ReasoningStartEvent, type ResourceUpdateEvent, type ResourceUpdateHandler, type SourceDocumentEvent, type SourceDocumentInfo, type SourceEvent, type SourceInfo, type SourceUrlEvent, type SourceUrlInfo, type StartEvent, type StreamEvent, type TextDeltaEvent, type TextEndEvent, type TextStartEvent, type ToolCallInfo, type ToolCallStatus, type ToolErrorInfo, type ToolHandler, type ToolHandlers, type ToolInputAvailableEvent, type ToolInputDeltaEvent, type ToolInputEndEvent, type ToolInputStartEvent, type ToolOutputAvailableEvent, type ToolOutputErrorEvent, type ToolRequestEvent, type ToolResult, type ToolResultEntry, type UIFilePart, type UIMessage, type UIMessagePart, type UIMessageStatus, type UIObjectPart, type UIObjectStatus, type UIOperationPart, type UIOperationStatus, type UIPartStatus, type UIReasoningPart, type UISourceDocumentPart, type UISourcePart, type UISourceUrlPart, type UITextPart, type UIToolCallPart, type UIToolCallStatus, type UIWorkerPart, type UIWorkerStatus, ValidationError, type WorkerPartInfo, type WorkerResultEvent, type WorkerStartEvent, chatMessageSchema, createApiErrorEvent, createErrorEvent, createInternalErrorEvent, errorToStreamEvent, fileReferenceSchema, generateId, getSkillSlugFromToolCall, isAbortError, isAuthenticationError, isFileReference, isFileReferenceArray, isMainThread, isOctavusSkillTool, isOtherThread, isProviderError, isRateLimitError, isRetryableError, isToolError, isValidationError, resolveThread, safeParseStreamEvent, safeParseUIMessage, safeParseUIMessages, threadForPart, toolResultSchema, uiMessagePartSchema, uiMessageSchema, uiWorkerPartSchema, uiWorkerStatusSchema };
|