@agentick/shared 0.0.1

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.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +322 -0
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/.tsbuildinfo.build +1 -0
  5. package/dist/block-types.d.ts +85 -0
  6. package/dist/block-types.d.ts.map +1 -0
  7. package/dist/block-types.js +98 -0
  8. package/dist/block-types.js.map +1 -0
  9. package/dist/blocks.d.ts +396 -0
  10. package/dist/blocks.d.ts.map +1 -0
  11. package/dist/blocks.js +209 -0
  12. package/dist/blocks.js.map +1 -0
  13. package/dist/devtools.d.ts +672 -0
  14. package/dist/devtools.d.ts.map +1 -0
  15. package/dist/devtools.js +445 -0
  16. package/dist/devtools.js.map +1 -0
  17. package/dist/errors.d.ts +335 -0
  18. package/dist/errors.d.ts.map +1 -0
  19. package/dist/errors.js +529 -0
  20. package/dist/errors.js.map +1 -0
  21. package/dist/identity.d.ts +99 -0
  22. package/dist/identity.d.ts.map +1 -0
  23. package/dist/identity.js +116 -0
  24. package/dist/identity.js.map +1 -0
  25. package/dist/index.d.ts +56 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +56 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/input.d.ts +55 -0
  30. package/dist/input.d.ts.map +1 -0
  31. package/dist/input.js +83 -0
  32. package/dist/input.js.map +1 -0
  33. package/dist/messages.d.ts +98 -0
  34. package/dist/messages.d.ts.map +1 -0
  35. package/dist/messages.js +81 -0
  36. package/dist/messages.js.map +1 -0
  37. package/dist/model-catalog.d.ts +144 -0
  38. package/dist/model-catalog.d.ts.map +1 -0
  39. package/dist/model-catalog.js +861 -0
  40. package/dist/model-catalog.js.map +1 -0
  41. package/dist/models.d.ts +173 -0
  42. package/dist/models.d.ts.map +1 -0
  43. package/dist/models.js +10 -0
  44. package/dist/models.js.map +1 -0
  45. package/dist/protocol.d.ts +257 -0
  46. package/dist/protocol.d.ts.map +1 -0
  47. package/dist/protocol.js +41 -0
  48. package/dist/protocol.js.map +1 -0
  49. package/dist/streaming.d.ts +635 -0
  50. package/dist/streaming.d.ts.map +1 -0
  51. package/dist/streaming.js +134 -0
  52. package/dist/streaming.js.map +1 -0
  53. package/dist/testing/fixtures.d.ts +250 -0
  54. package/dist/testing/fixtures.d.ts.map +1 -0
  55. package/dist/testing/fixtures.js +827 -0
  56. package/dist/testing/fixtures.js.map +1 -0
  57. package/dist/testing/helpers.d.ts +95 -0
  58. package/dist/testing/helpers.d.ts.map +1 -0
  59. package/dist/testing/helpers.js +271 -0
  60. package/dist/testing/helpers.js.map +1 -0
  61. package/dist/testing/index.d.ts +42 -0
  62. package/dist/testing/index.d.ts.map +1 -0
  63. package/dist/testing/index.js +70 -0
  64. package/dist/testing/index.js.map +1 -0
  65. package/dist/timeline.d.ts +59 -0
  66. package/dist/timeline.d.ts.map +1 -0
  67. package/dist/timeline.js +11 -0
  68. package/dist/timeline.js.map +1 -0
  69. package/dist/tools.d.ts +220 -0
  70. package/dist/tools.d.ts.map +1 -0
  71. package/dist/tools.js +63 -0
  72. package/dist/tools.js.map +1 -0
  73. package/dist/utils/entity-ids.d.ts +26 -0
  74. package/dist/utils/entity-ids.d.ts.map +1 -0
  75. package/dist/utils/entity-ids.js +44 -0
  76. package/dist/utils/entity-ids.js.map +1 -0
  77. package/dist/utils/index.d.ts +3 -0
  78. package/dist/utils/index.d.ts.map +1 -0
  79. package/dist/utils/index.js +3 -0
  80. package/dist/utils/index.js.map +1 -0
  81. package/dist/utils/merge-deep.d.ts +10 -0
  82. package/dist/utils/merge-deep.d.ts.map +1 -0
  83. package/dist/utils/merge-deep.js +33 -0
  84. package/dist/utils/merge-deep.js.map +1 -0
  85. package/package.json +84 -0
@@ -0,0 +1,635 @@
1
+ /**
2
+ * Streaming Types
3
+ *
4
+ * Platform-independent types for streaming model responses and engine events.
5
+ * Used by both backend (@agentick/core) and frontend (@agentick/client).
6
+ *
7
+ * ## Event Architecture
8
+ *
9
+ * - **ModelStreamEvent**: Model output events (content, reasoning, messages, tool calls)
10
+ * - **OrchestrationStreamEvent**: Orchestration events (execution lifecycle, ticks, tool results)
11
+ * - **ResultStreamEvent**: Final execution result
12
+ * - **StreamEvent**: Combined union of all streamable events
13
+ *
14
+ * ## Event Pattern
15
+ *
16
+ * For streamable content, events follow the pattern:
17
+ * ```
18
+ * [thing]_start → [thing]_delta (0..n) → [thing]_end → [thing] (fully formed)
19
+ * ```
20
+ *
21
+ * This allows consumers to choose granularity:
22
+ * - Streaming UI: Listen for `*_delta` events
23
+ * - Simple consumption: Listen for `content`, `reasoning`, `message`, `tool_call`
24
+ */
25
+ import type { ContentBlock } from "./blocks";
26
+ import type { BlockType } from "./block-types";
27
+ import type { Message } from "./messages";
28
+ import type { UsageStats } from "./models";
29
+ import type { ToolExecutor } from "./tools";
30
+ import type { SessionResultPayload } from "./protocol";
31
+ /**
32
+ * Citation - normalized reference to source material.
33
+ *
34
+ * Adapters map provider-specific citation formats to this normalized structure.
35
+ * - Anthropic: citations with source info
36
+ * - Google: grounding sources/chunks
37
+ * - OpenAI: annotations with file citations
38
+ */
39
+ export interface ContentCitation {
40
+ /** Citation text shown in the response */
41
+ text: string;
42
+ /** Source URL if available */
43
+ url?: string;
44
+ /** Source title/name */
45
+ title?: string;
46
+ /** Start index in the content this citation applies to */
47
+ startIndex?: number;
48
+ /** End index in the content this citation applies to */
49
+ endIndex?: number;
50
+ }
51
+ /**
52
+ * Annotation - model-provided note about the content.
53
+ *
54
+ * Adapters map provider-specific annotation formats to this normalized structure.
55
+ */
56
+ export interface ContentAnnotation {
57
+ /** Annotation type (e.g., "file_citation", "note", "highlight") */
58
+ type: string;
59
+ /** Annotation content/text */
60
+ text: string;
61
+ /** Start index in the content */
62
+ startIndex?: number;
63
+ /** End index in the content */
64
+ endIndex?: number;
65
+ /** Additional annotation-specific data */
66
+ data?: Record<string, unknown>;
67
+ }
68
+ /**
69
+ * Normalized content metadata.
70
+ *
71
+ * Adapters populate these fields when provider data maps to them.
72
+ * Provider-specific data that doesn't fit these fields goes in `extensions`.
73
+ *
74
+ * Note: Artifacts are NOT part of content metadata. Artifacts are created
75
+ * via tool calls and managed as session state parallel to the timeline.
76
+ * See plans/agentic/artifacts.md for the artifact pattern.
77
+ */
78
+ export interface ContentMetadata {
79
+ /** Citations/sources referenced by the model */
80
+ citations?: ContentCitation[];
81
+ /** Model-provided annotations on the content */
82
+ annotations?: ContentAnnotation[];
83
+ /** Programming language (for code blocks) */
84
+ language?: string;
85
+ /** MIME type hint */
86
+ mimeType?: string;
87
+ /** Provider-specific extensions (not normalized) */
88
+ extensions?: Record<string, unknown>;
89
+ }
90
+ /**
91
+ * Stop reason enumeration.
92
+ * Defines why model generation stopped.
93
+ *
94
+ * Key distinction:
95
+ * - NATURAL_COMPLETION: Model decided to stop (maps to provider's end_turn, stop, etc.)
96
+ * - EXPLICIT_COMPLETION: Engine/runtime requested the stop (max ticks, abort, etc.)
97
+ *
98
+ * Usage by layer:
99
+ * - ModelStreamEvent (message_end): Model's stop reason (TOOL_USE, MAX_TOKENS, NATURAL_COMPLETION)
100
+ * - OrchestrationStreamEvent (execution): May be EXPLICIT_COMPLETION if engine stopped early
101
+ */
102
+ export declare enum StopReason {
103
+ MAX_TOKENS = "max_tokens",
104
+ STOP_SEQUENCE = "stop_sequence",
105
+ CONTENT_FILTER = "content_filter",
106
+ TOOL_USE = "tool_use",
107
+ FUNCTION_CALL = "function_call",
108
+ UNSPECIFIED = "unspecified",
109
+ OTHER = "other",
110
+ STOP = "stop",
111
+ PAUSED = "paused",
112
+ FORMAT_ERROR = "format_error",
113
+ EMPTY_RESPONSE = "empty_response",
114
+ NO_CONTENT = "no_content",
115
+ EXPLICIT_COMPLETION = "explicit_completion",
116
+ NATURAL_COMPLETION = "natural_completion",
117
+ ERROR = "error"
118
+ }
119
+ /**
120
+ * Base fields shared by all stream events.
121
+ */
122
+ export interface StreamEventBase {
123
+ /** Normalized event ID (generated by entity-ids if provider doesn't provide one) */
124
+ id: string;
125
+ /**
126
+ * Monotonically increasing sequence number within the session.
127
+ *
128
+ * Enables:
129
+ * - Durable streams (reconnection, replay)
130
+ * - Gap detection (missing events)
131
+ * - Ordering guarantees
132
+ * - Deduplication
133
+ *
134
+ * Assigned by the session when emitting events. Starts at 1.
135
+ */
136
+ sequence: number;
137
+ /** Tick number (default 1 for direct model calls without engine) */
138
+ tick: number;
139
+ /** ISO 8601 timestamp when event was created/emitted */
140
+ timestamp: string;
141
+ /** Original provider event/chunk for pass-through (debugging, provider-specific features) */
142
+ raw?: unknown;
143
+ /** Session ID (if available) */
144
+ /** Available on all events emitted from within a session */
145
+ sessionId?: string;
146
+ }
147
+ /**
148
+ * Content block events (text, images, etc.)
149
+ *
150
+ * Metadata is available on content_start, content_end, and content events.
151
+ * It is NOT included on content_delta events to avoid noise during streaming.
152
+ */
153
+ export type ContentStartEvent = {
154
+ type: "content_start";
155
+ blockType: BlockType;
156
+ blockIndex: number;
157
+ /** Content metadata (citations, annotations, language hints) */
158
+ metadata?: ContentMetadata;
159
+ } & StreamEventBase;
160
+ export type ContentDeltaEvent = {
161
+ type: "content_delta";
162
+ blockType: BlockType;
163
+ blockIndex: number;
164
+ delta: string;
165
+ } & StreamEventBase;
166
+ export type ContentEndEvent = {
167
+ type: "content_end";
168
+ blockType: BlockType;
169
+ blockIndex: number;
170
+ /** Content metadata (citations, annotations, language hints) */
171
+ metadata?: ContentMetadata;
172
+ } & StreamEventBase;
173
+ export type ContentEvent = {
174
+ type: "content";
175
+ blockIndex: number;
176
+ content: ContentBlock;
177
+ /** Content metadata (citations, annotations, language hints) */
178
+ metadata?: ContentMetadata;
179
+ startedAt: string;
180
+ completedAt: string;
181
+ } & StreamEventBase;
182
+ /**
183
+ * Reasoning/thinking events (separate for easy filtering)
184
+ *
185
+ * Metadata is available on reasoning_start, reasoning_end, and reasoning events.
186
+ * Reasoning can have citations when the model references sources during thinking.
187
+ */
188
+ export type ReasoningStartEvent = {
189
+ type: "reasoning_start";
190
+ blockIndex: number;
191
+ /** Reasoning metadata (citations, annotations) */
192
+ metadata?: ContentMetadata;
193
+ } & StreamEventBase;
194
+ export type ReasoningDeltaEvent = {
195
+ type: "reasoning_delta";
196
+ blockIndex: number;
197
+ delta: string;
198
+ } & StreamEventBase;
199
+ export type ReasoningEndEvent = {
200
+ type: "reasoning_end";
201
+ blockIndex: number;
202
+ /** Reasoning metadata (citations, annotations) */
203
+ metadata?: ContentMetadata;
204
+ } & StreamEventBase;
205
+ export type ReasoningEvent = {
206
+ type: "reasoning";
207
+ blockIndex: number;
208
+ reasoning: string;
209
+ /** Reasoning metadata (citations, annotations) */
210
+ metadata?: ContentMetadata;
211
+ startedAt: string;
212
+ completedAt: string;
213
+ } & StreamEventBase;
214
+ /**
215
+ * Message lifecycle events
216
+ */
217
+ export type MessageStartEvent = {
218
+ type: "message_start";
219
+ role: "assistant";
220
+ model?: string;
221
+ } & StreamEventBase;
222
+ export type MessageEndEvent = {
223
+ type: "message_end";
224
+ stopReason: StopReason;
225
+ usage?: UsageStats;
226
+ } & StreamEventBase;
227
+ export type MessageEvent = {
228
+ type: "message";
229
+ message: Message;
230
+ stopReason: StopReason;
231
+ usage?: UsageStats;
232
+ model?: string;
233
+ /** Raw provider response (e.g., AI SDK generateText result, OpenAI ChatCompletion) */
234
+ raw?: unknown;
235
+ startedAt: string;
236
+ completedAt: string;
237
+ } & StreamEventBase;
238
+ /**
239
+ * Tool call events (model requesting tool execution)
240
+ */
241
+ export type ToolCallStartEvent = {
242
+ type: "tool_call_start";
243
+ callId: string;
244
+ name: string;
245
+ blockIndex: number;
246
+ } & StreamEventBase;
247
+ export type ToolCallDeltaEvent = {
248
+ type: "tool_call_delta";
249
+ callId: string;
250
+ blockIndex: number;
251
+ delta: string;
252
+ } & StreamEventBase;
253
+ export type ToolCallEndEvent = {
254
+ type: "tool_call_end";
255
+ callId: string;
256
+ blockIndex: number;
257
+ } & StreamEventBase;
258
+ export type ToolCallEvent = {
259
+ type: "tool_call";
260
+ callId: string;
261
+ blockIndex: number;
262
+ name: string;
263
+ input: Record<string, unknown>;
264
+ startedAt: string;
265
+ completedAt: string;
266
+ } & StreamEventBase;
267
+ /**
268
+ * Error event
269
+ */
270
+ export type StreamErrorEvent = {
271
+ type: "error";
272
+ error: {
273
+ message: string;
274
+ code?: string;
275
+ };
276
+ } & StreamEventBase;
277
+ /**
278
+ * Usage event - standalone usage update.
279
+ *
280
+ * Some providers (e.g., OpenAI with stream_options.include_usage) send usage
281
+ * data in a separate chunk after the finish_reason chunk. This event captures
282
+ * that usage without triggering another message_end.
283
+ */
284
+ export type UsageEvent = {
285
+ type: "usage";
286
+ usage: {
287
+ inputTokens: number;
288
+ outputTokens: number;
289
+ totalTokens: number;
290
+ };
291
+ } & StreamEventBase;
292
+ /**
293
+ * ModelStreamEvent - All model output events.
294
+ *
295
+ * Discriminated union of all events that come from model streaming.
296
+ */
297
+ export type ModelStreamEvent = ContentStartEvent | ContentDeltaEvent | ContentEndEvent | ContentEvent | ReasoningStartEvent | ReasoningDeltaEvent | ReasoningEndEvent | ReasoningEvent | MessageStartEvent | MessageEndEvent | MessageEvent | ToolCallStartEvent | ToolCallDeltaEvent | ToolCallEndEvent | ToolCallEvent | UsageEvent | StreamErrorEvent;
298
+ /**
299
+ * Execution lifecycle events
300
+ *
301
+ * Note: threadId and other app-specific identifiers are in metadata.
302
+ * sessionId is kept top-level as it's universal for client connections.
303
+ */
304
+ export type ExecutionStartEvent = {
305
+ type: "execution_start";
306
+ executionId: string;
307
+ sessionId?: string;
308
+ parentExecutionId?: string;
309
+ rootExecutionId?: string;
310
+ componentName?: string;
311
+ /** User-provided metadata (includes threadId, userId, etc.) */
312
+ metadata?: Record<string, unknown>;
313
+ } & StreamEventBase;
314
+ export type ExecutionEndEvent = {
315
+ type: "execution_end";
316
+ executionId: string;
317
+ sessionId?: string;
318
+ parentExecutionId?: string;
319
+ rootExecutionId?: string;
320
+ /** Why the execution stopped */
321
+ stopReason?: StopReason | string;
322
+ /** Whether execution was aborted */
323
+ aborted?: boolean;
324
+ output: unknown;
325
+ /** User-provided metadata (includes threadId, userId, etc.) */
326
+ metadata?: Record<string, unknown>;
327
+ } & StreamEventBase;
328
+ export type ExecutionEvent = {
329
+ type: "execution";
330
+ executionId: string;
331
+ sessionId?: string;
332
+ parentExecutionId?: string;
333
+ rootExecutionId?: string;
334
+ output: unknown;
335
+ usage: UsageStats;
336
+ stopReason: StopReason;
337
+ /** User-provided metadata (includes threadId, userId, etc.) */
338
+ metadata?: Record<string, unknown>;
339
+ ticks: number;
340
+ startedAt: string;
341
+ completedAt: string;
342
+ } & StreamEventBase;
343
+ /**
344
+ * Tick lifecycle events
345
+ */
346
+ export type TickStartEvent = {
347
+ type: "tick_start";
348
+ tick: number;
349
+ executionId?: string;
350
+ } & StreamEventBase;
351
+ export type TickEndEvent = {
352
+ type: "tick_end";
353
+ tick: number;
354
+ executionId?: string;
355
+ /** Whether execution should continue */
356
+ shouldContinue?: boolean;
357
+ usage?: UsageStats;
358
+ /** New timeline entries added during this tick (for persistence) */
359
+ response?: {
360
+ newTimelineEntries?: unknown[];
361
+ };
362
+ /** Why the model stopped */
363
+ stopReason?: StopReason | string;
364
+ /** Model ID used for this tick */
365
+ model?: string;
366
+ } & StreamEventBase;
367
+ export type TickEvent = {
368
+ type: "tick";
369
+ tick: number;
370
+ usage: UsageStats;
371
+ stopReason: StopReason;
372
+ startedAt: string;
373
+ completedAt: string;
374
+ } & StreamEventBase;
375
+ /**
376
+ * Tool result event (unified - executedBy indicates source)
377
+ */
378
+ export type ToolResultEvent = {
379
+ type: "tool_result";
380
+ callId: string;
381
+ name: string;
382
+ result: unknown;
383
+ isError?: boolean;
384
+ executedBy: ToolExecutor;
385
+ startedAt: string;
386
+ completedAt: string;
387
+ } & StreamEventBase;
388
+ /**
389
+ * Tool confirmation events (for requiresConfirmation tools)
390
+ */
391
+ export type ToolConfirmationRequiredEvent = {
392
+ type: "tool_confirmation_required";
393
+ callId: string;
394
+ name: string;
395
+ input: Record<string, unknown>;
396
+ message: string;
397
+ } & StreamEventBase;
398
+ export type ToolConfirmationResultEvent = {
399
+ type: "tool_confirmation_result";
400
+ callId: string;
401
+ confirmed: boolean;
402
+ always?: boolean;
403
+ } & StreamEventBase;
404
+ /**
405
+ * DevTools event: Compiled context (after JSX compilation, before model call)
406
+ */
407
+ export type CompiledEvent = {
408
+ type: "compiled";
409
+ executionId?: string;
410
+ /** System prompt / instructions */
411
+ system?: string;
412
+ /** Messages in the conversation */
413
+ messages?: unknown[];
414
+ /** Available tools */
415
+ tools?: Array<{
416
+ name?: string;
417
+ description?: string;
418
+ }>;
419
+ } & StreamEventBase;
420
+ /**
421
+ * DevTools event: Model request (Agentick format input)
422
+ */
423
+ export type ModelRequestEvent = {
424
+ type: "model_request";
425
+ executionId?: string;
426
+ /** Model identifier */
427
+ modelId?: string;
428
+ /** The input sent to the model (Agentick format) */
429
+ input: unknown;
430
+ } & StreamEventBase;
431
+ /**
432
+ * DevTools event: Provider request (SDK-specific format)
433
+ */
434
+ export type ProviderRequestEvent = {
435
+ type: "provider_request";
436
+ executionId?: string;
437
+ /** Model identifier */
438
+ modelId?: string;
439
+ /** Provider name (e.g., "openai", "anthropic", "google") */
440
+ provider?: string;
441
+ /** The input sent to the provider SDK (provider-specific format) */
442
+ providerInput: unknown;
443
+ } & StreamEventBase;
444
+ /**
445
+ * DevTools event: Model response (pipeline visibility)
446
+ */
447
+ export type ModelResponseEvent = {
448
+ type: "model_response";
449
+ executionId?: string;
450
+ /** Provider output (raw SDK response, may be reconstructed for streaming) */
451
+ providerOutput?: unknown;
452
+ /** ModelOutput (normalized Agentick format) */
453
+ modelOutput?: {
454
+ model?: string;
455
+ message?: unknown;
456
+ usage?: UsageStats;
457
+ stopReason?: string;
458
+ toolCalls?: Array<{
459
+ id: string;
460
+ name: string;
461
+ input: unknown;
462
+ }>;
463
+ };
464
+ /** Engine state (how response is ingested into timeline) */
465
+ engineState?: {
466
+ newTimelineEntries?: unknown[];
467
+ toolCalls?: unknown[];
468
+ shouldStop?: boolean;
469
+ stopReason?: unknown;
470
+ };
471
+ } & StreamEventBase;
472
+ /**
473
+ * Engine error event
474
+ */
475
+ export type EngineErrorEvent = {
476
+ type: "engine_error";
477
+ error: {
478
+ message: string;
479
+ code?: string;
480
+ };
481
+ } & StreamEventBase;
482
+ /**
483
+ * Context update event - provides real-time context utilization info.
484
+ *
485
+ * Emitted after each tick with context window usage, model capabilities,
486
+ * and cumulative token usage. Enables React UIs to show context utilization bars.
487
+ */
488
+ export type ContextUpdateEvent = {
489
+ type: "context_update";
490
+ /** Model ID (e.g., "gpt-4o", "claude-3-5-sonnet-20241022") */
491
+ modelId: string;
492
+ /** Human-readable model name */
493
+ modelName?: string;
494
+ /** Provider name */
495
+ provider?: string;
496
+ /** Context window size in tokens */
497
+ contextWindow?: number;
498
+ /** Input tokens used this tick */
499
+ inputTokens: number;
500
+ /** Output tokens generated this tick */
501
+ outputTokens: number;
502
+ /** Total tokens this tick */
503
+ totalTokens: number;
504
+ /** Context utilization percentage (0-100) */
505
+ utilization?: number;
506
+ /** Max output tokens */
507
+ maxOutputTokens?: number;
508
+ /** Model capabilities */
509
+ supportsVision?: boolean;
510
+ supportsToolUse?: boolean;
511
+ isReasoningModel?: boolean;
512
+ /** Cumulative usage across all ticks in this execution */
513
+ cumulativeUsage?: {
514
+ inputTokens: number;
515
+ outputTokens: number;
516
+ totalTokens: number;
517
+ ticks: number;
518
+ };
519
+ } & StreamEventBase;
520
+ /**
521
+ * Fork lifecycle events
522
+ *
523
+ * Fork creates parallel execution branches that race or vote.
524
+ * Each branch runs as a separate execution - subscribe to those
525
+ * executions directly if you need branch-level observability.
526
+ */
527
+ export type ForkStartEvent = {
528
+ type: "fork_start";
529
+ /** Unique identifier for this fork operation */
530
+ forkId: string;
531
+ /** Parent execution that initiated the fork */
532
+ parentExecutionId: string;
533
+ /** Strategy for handling branch results */
534
+ strategy: "race" | "vote" | "all";
535
+ /** Identifiers for each branch (variant names or indices) */
536
+ branches: string[];
537
+ /** Number of parallel branches */
538
+ branchCount: number;
539
+ /** Input passed to the fork (shared across branches or per-branch) */
540
+ input?: unknown;
541
+ } & StreamEventBase;
542
+ export type ForkEndEvent = {
543
+ type: "fork_end";
544
+ /** Unique identifier for this fork operation */
545
+ forkId: string;
546
+ /** Parent execution that initiated the fork */
547
+ parentExecutionId: string;
548
+ /** The winning/selected branch (for race/vote strategies) */
549
+ selectedBranch?: string;
550
+ /** Aggregated results from all branches */
551
+ results: Record<string, unknown>;
552
+ /** Token usage aggregated across all branches */
553
+ usage?: UsageStats;
554
+ } & StreamEventBase;
555
+ /**
556
+ * Spawn lifecycle events
557
+ *
558
+ * Spawn creates a child execution that runs independently.
559
+ * Unlike Fork, Spawn doesn't race - it's for delegation.
560
+ */
561
+ export type SpawnStartEvent = {
562
+ type: "spawn_start";
563
+ /** Unique identifier for this spawn operation */
564
+ spawnId: string;
565
+ /** Parent execution that initiated the spawn */
566
+ parentExecutionId: string;
567
+ /** Child execution ID */
568
+ childExecutionId: string;
569
+ /** Name of the spawned component/agent */
570
+ componentName?: string;
571
+ /** Optional label for this spawn */
572
+ label?: string;
573
+ /** Input passed to the spawned execution */
574
+ input?: unknown;
575
+ } & StreamEventBase;
576
+ export type SpawnEndEvent = {
577
+ type: "spawn_end";
578
+ /** Unique identifier for this spawn operation */
579
+ spawnId: string;
580
+ /** Parent execution that initiated the spawn */
581
+ parentExecutionId: string;
582
+ /** Child execution ID */
583
+ childExecutionId: string;
584
+ /** Output from the spawned execution */
585
+ output: unknown;
586
+ /** Whether the spawn errored */
587
+ isError?: boolean;
588
+ /** Token usage from the spawned execution */
589
+ usage?: UsageStats;
590
+ } & StreamEventBase;
591
+ /**
592
+ * OrchestrationStreamEvent - All orchestration events.
593
+ *
594
+ * Discriminated union of all events from engine orchestration.
595
+ */
596
+ export type OrchestrationStreamEvent = ExecutionStartEvent | ExecutionEndEvent | ExecutionEvent | TickStartEvent | TickEndEvent | TickEvent | ToolResultEvent | ToolConfirmationRequiredEvent | ToolConfirmationResultEvent | CompiledEvent | ModelRequestEvent | ProviderRequestEvent | ModelResponseEvent | ContextUpdateEvent | ForkStartEvent | ForkEndEvent | SpawnStartEvent | SpawnEndEvent | EngineErrorEvent;
597
+ /**
598
+ * Final execution result.
599
+ */
600
+ export type ResultStreamEvent = {
601
+ type: "result";
602
+ executionId?: string;
603
+ result: SessionResultPayload;
604
+ } & StreamEventBase;
605
+ /**
606
+ * StreamEvent - Combined union of model, orchestration, and result events.
607
+ *
608
+ * This is what engine.stream() yields.
609
+ */
610
+ export type StreamEvent = ModelStreamEvent | OrchestrationStreamEvent | ResultStreamEvent;
611
+ /**
612
+ * Check if event is a ModelStreamEvent (model output)
613
+ */
614
+ export declare function isModelStreamEvent(event: StreamEvent): event is ModelStreamEvent;
615
+ /**
616
+ * Check if event is an OrchestrationStreamEvent (orchestration)
617
+ */
618
+ export declare function isOrchestrationStreamEvent(event: StreamEvent): event is OrchestrationStreamEvent;
619
+ /**
620
+ * Check if event is a Fork event
621
+ */
622
+ export declare function isForkEvent(event: StreamEvent): event is ForkStartEvent | ForkEndEvent;
623
+ /**
624
+ * Check if event is a Spawn event
625
+ */
626
+ export declare function isSpawnEvent(event: StreamEvent): event is SpawnStartEvent | SpawnEndEvent;
627
+ /**
628
+ * Check if event is a delta event (for streaming UI)
629
+ */
630
+ export declare function isDeltaEvent(event: StreamEvent): event is ContentDeltaEvent | ReasoningDeltaEvent | ToolCallDeltaEvent;
631
+ /**
632
+ * Check if event is a final/complete event
633
+ */
634
+ export declare function isFinalEvent(event: StreamEvent): event is ContentEvent | ReasoningEvent | MessageEvent | ToolCallEvent | TickEvent | ExecutionEvent | ResultStreamEvent;
635
+ //# sourceMappingURL=streaming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../src/streaming.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;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