@ai-sdk/workflow 1.0.0-beta.3 → 1.0.0-beta.31

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/CHANGELOG.md CHANGED
@@ -1,5 +1,266 @@
1
1
  # @ai-sdk/workflow
2
2
 
3
+ ## 1.0.0-beta.31
4
+
5
+ ### Patch Changes
6
+
7
+ - ai@7.0.0-beta.116
8
+
9
+ ## 1.0.0-beta.30
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [08d2129]
14
+ - Updated dependencies [202f107]
15
+ - @ai-sdk/provider-utils@5.0.0-beta.30
16
+ - ai@7.0.0-beta.115
17
+
18
+ ## 1.0.0-beta.29
19
+
20
+ ### Patch Changes
21
+
22
+ - 258c093: chore: ensure consistent import handling and avoid import duplicates or cycles
23
+ - Updated dependencies [43a6750]
24
+ - Updated dependencies [81caa5d]
25
+ - Updated dependencies [1f7db50]
26
+ - Updated dependencies [9bd6512]
27
+ - Updated dependencies [258c093]
28
+ - Updated dependencies [b6783da]
29
+ - Updated dependencies [6147cdf]
30
+ - ai@7.0.0-beta.114
31
+ - @ai-sdk/provider-utils@5.0.0-beta.29
32
+ - @ai-sdk/provider@4.0.0-beta.14
33
+
34
+ ## 1.0.0-beta.28
35
+
36
+ ### Patch Changes
37
+
38
+ - 9f0e36c: trigger release for all packages after provenance setup
39
+ - Updated dependencies [9f0e36c]
40
+ - ai@7.0.0-beta.113
41
+ - @ai-sdk/provider@4.0.0-beta.13
42
+ - @ai-sdk/provider-utils@5.0.0-beta.28
43
+
44
+ ## 1.0.0-beta.27
45
+
46
+ ### Patch Changes
47
+
48
+ - 29d8cf4: feat(ai): rename the core-event types
49
+ - a0ca584: fix (workflow): preserve invalid tool calls as errors instead of emitting synthetic success results
50
+ - Updated dependencies [785fe16]
51
+ - Updated dependencies [5f3749c]
52
+ - Updated dependencies [0a51f7d]
53
+ - Updated dependencies [71d3022]
54
+ - Updated dependencies [67df0a0]
55
+ - Updated dependencies [4181cfe]
56
+ - Updated dependencies [51ce232]
57
+ - Updated dependencies [cf93359]
58
+ - Updated dependencies [befb78c]
59
+ - Updated dependencies [29d8cf4]
60
+ - Updated dependencies [0458559]
61
+ - Updated dependencies [58a2ad7]
62
+ - Updated dependencies [5852c0a]
63
+ - Updated dependencies [37d69b2]
64
+ - Updated dependencies [1043274]
65
+ - Updated dependencies [7f59f04]
66
+ - Updated dependencies [7677c1e]
67
+ - Updated dependencies [116c89f]
68
+ - Updated dependencies [f58f9bc]
69
+ - Updated dependencies [e1bfb9c]
70
+ - Updated dependencies [e87d71b]
71
+ - Updated dependencies [9d486aa]
72
+ - Updated dependencies [9b0bc8a]
73
+ - Updated dependencies [fc92055]
74
+ - Updated dependencies [4e095b0]
75
+ - @ai-sdk/provider-utils@5.0.0-beta.27
76
+ - ai@7.0.0-beta.112
77
+
78
+ ## 1.0.0-beta.26
79
+
80
+ ### Major Changes
81
+
82
+ - 1949571: feat(ai): make experimental_telemetry stable
83
+
84
+ ### Patch Changes
85
+
86
+ - f32c750: refactoring(ai): simplify mergeAbortSignals
87
+ - Updated dependencies [f319fde]
88
+ - Updated dependencies [1949571]
89
+ - Updated dependencies [511902c]
90
+ - Updated dependencies [6542d93]
91
+ - Updated dependencies [2e98477]
92
+ - Updated dependencies [876fd3e]
93
+ - Updated dependencies [f32c750]
94
+ - ai@7.0.0-beta.111
95
+ - @ai-sdk/provider-utils@5.0.0-beta.26
96
+
97
+ ## 1.0.0-beta.25
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [72cb801]
102
+ - ai@7.0.0-beta.110
103
+
104
+ ## 1.0.0-beta.24
105
+
106
+ ### Patch Changes
107
+
108
+ - eea8d98: refactoring: rename tool execution events
109
+ - Updated dependencies [ec98264]
110
+ - Updated dependencies [eea8d98]
111
+ - Updated dependencies [75ef93e]
112
+ - ai@7.0.0-beta.109
113
+ - @ai-sdk/provider-utils@5.0.0-beta.25
114
+
115
+ ## 1.0.0-beta.23
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies [f807e45]
120
+ - @ai-sdk/provider-utils@5.0.0-beta.24
121
+ - ai@7.0.0-beta.108
122
+
123
+ ## 1.0.0-beta.22
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [350ea38]
128
+ - @ai-sdk/provider-utils@5.0.0-beta.23
129
+ - ai@7.0.0-beta.107
130
+
131
+ ## 1.0.0-beta.21
132
+
133
+ ### Patch Changes
134
+
135
+ - fbea042: refactor: replace duplicate `filterTools`/`filterToolSet` with shared `experimental_filterActiveTools` from `ai`
136
+
137
+ ## 1.0.0-beta.20
138
+
139
+ ### Patch Changes
140
+
141
+ - ai@7.0.0-beta.106
142
+
143
+ ## 1.0.0-beta.19
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies [33d099c]
148
+ - ai@7.0.0-beta.105
149
+
150
+ ## 1.0.0-beta.18
151
+
152
+ ### Patch Changes
153
+
154
+ - eba685c: Remove `maxSteps` option from `WorkflowAgent`. Use `stopWhen` with stop conditions like `isStepCount()` instead.
155
+ - Updated dependencies [2a74d43]
156
+ - ai@7.0.0-beta.104
157
+
158
+ ## 1.0.0-beta.17
159
+
160
+ ### Patch Changes
161
+
162
+ - 382d53b: refactoring: rename context to runtimeContext
163
+ - c3d4019: chore(ai): rename 'TelemetrySettings' to 'TelemetryOptions'
164
+ - 083947b: feat(ai): separate toolsContext from context
165
+ - Updated dependencies [382d53b]
166
+ - Updated dependencies [7bf7d7f]
167
+ - Updated dependencies [c3d4019]
168
+ - Updated dependencies [083947b]
169
+ - ai@7.0.0-beta.103
170
+ - @ai-sdk/provider-utils@5.0.0-beta.22
171
+
172
+ ## 1.0.0-beta.16
173
+
174
+ ### Patch Changes
175
+
176
+ - ai@7.0.0-beta.102
177
+
178
+ ## 1.0.0-beta.15
179
+
180
+ ### Patch Changes
181
+
182
+ - Updated dependencies [4873966]
183
+ - ai@7.0.0-beta.101
184
+
185
+ ## 1.0.0-beta.14
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies [add1126]
190
+ - @ai-sdk/provider-utils@5.0.0-beta.21
191
+ - ai@7.0.0-beta.100
192
+
193
+ ## 1.0.0-beta.13
194
+
195
+ ### Patch Changes
196
+
197
+ - Updated dependencies [2a9c144]
198
+ - ai@7.0.0-beta.99
199
+
200
+ ## 1.0.0-beta.12
201
+
202
+ ### Patch Changes
203
+
204
+ - ai@7.0.0-beta.98
205
+
206
+ ## 1.0.0-beta.11
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies [208d045]
211
+ - ai@7.0.0-beta.97
212
+
213
+ ## 1.0.0-beta.10
214
+
215
+ ### Patch Changes
216
+
217
+ - ai@7.0.0-beta.96
218
+
219
+ ## 1.0.0-beta.9
220
+
221
+ ### Patch Changes
222
+
223
+ - Updated dependencies [c4f4b5f]
224
+ - ai@7.0.0-beta.95
225
+
226
+ ## 1.0.0-beta.8
227
+
228
+ ### Patch Changes
229
+
230
+ - 0455f24: Enrich WorkflowAgent callback event shapes to align with ToolLoopAgent:
231
+ - Add `stepNumber` to `onToolCallStart` and `onToolCallFinish`
232
+ - Add `steps` (previous step results) to `onStepStart`
233
+ - Adopt discriminated union pattern (`success: true/false`) for `onToolCallFinish`
234
+ - Add `durationMs` to `onToolCallFinish`
235
+
236
+ ## 1.0.0-beta.7
237
+
238
+ ### Patch Changes
239
+
240
+ - Updated dependencies [1582efa]
241
+ - ai@7.0.0-beta.94
242
+
243
+ ## 1.0.0-beta.6
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies [bc47739]
248
+ - ai@7.0.0-beta.93
249
+
250
+ ## 1.0.0-beta.5
251
+
252
+ ### Patch Changes
253
+
254
+ - bf6c17b: Add `id` property to WorkflowAgent for telemetry identification, matching ToolLoopAgent's API surface.
255
+ - 3ca592a: Add `prompt` as an alternative to `messages` in `WorkflowAgent.stream()`, matching the `AgentCallParameters` pattern from ToolLoopAgent.
256
+ - eb49d29: Add constructor-level defaults for `stopWhen`, `activeTools`, `output`, `experimental_repairToolCall`, and `experimental_download` to WorkflowAgent, matching ToolLoopAgent's pattern. Stream-level values override constructor defaults.
257
+
258
+ ## 1.0.0-beta.4
259
+
260
+ ### Patch Changes
261
+
262
+ - ai@7.0.0-beta.92
263
+
3
264
  ## 1.0.0-beta.3
4
265
 
5
266
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { LanguageModelV4, SharedV4ProviderOptions, LanguageModelV4Prompt, LanguageModelV4CallOptions, LanguageModelV4StreamPart } from '@ai-sdk/provider';
2
- import { ToolSet, LanguageModel, SystemModelMessage, ToolChoice, StepResult, StreamTextOnStepFinishCallback, ModelMessage, FinishReason, LanguageModelUsage, Experimental_LanguageModelStreamPart, StopCondition, LanguageModelResponseMetadata, ToolCallRepairFunction, UIMessage, UIMessageChunk, ChatTransport, PrepareSendMessagesRequest, PrepareReconnectToStreamRequest, ChatRequestOptions } from 'ai';
1
+ import { LanguageModelV4, SharedV4ProviderOptions, LanguageModelV4CallOptions, LanguageModelV4Prompt, LanguageModelV4StreamPart } from '@ai-sdk/provider';
2
+ import { ToolSet, LanguageModel, SystemModelMessage, ToolChoice, StopCondition, ActiveTools, LanguageModelResponseMetadata, LanguageModelUsage, FinishReason, ToolCallRepairFunction, StepResult, GenerateTextOnStepFinishCallback, ModelMessage, Experimental_LanguageModelStreamPart, UIMessage, UIMessageChunk, ChatTransport, PrepareSendMessagesRequest, PrepareReconnectToStreamRequest, ChatRequestOptions } from 'ai';
3
3
  export { Experimental_LanguageModelStreamPart as ModelCallStreamPart, Output, ToolCallRepairFunction } from 'ai';
4
4
 
5
5
  /**
@@ -15,10 +15,10 @@ type CompatibleLanguageModel = LanguageModelV4;
15
15
 
16
16
  /**
17
17
  * Callback function to be called after each step completes.
18
- * Alias for the AI SDK's StreamTextOnStepFinishCallback, using
18
+ * Alias for the AI SDK's GenerateTextOnStepFinishCallback, using
19
19
  * WorkflowAgent-consistent naming.
20
20
  */
21
- type WorkflowAgentOnStepFinishCallback<TTools extends ToolSet = ToolSet> = StreamTextOnStepFinishCallback<TTools, any>;
21
+ type WorkflowAgentOnStepFinishCallback<TTools extends ToolSet = ToolSet> = GenerateTextOnStepFinishCallback<TTools, any>;
22
22
  /**
23
23
  * Infer the type of the tools of a workflow agent.
24
24
  */
@@ -55,7 +55,7 @@ type ProviderOptions = SharedV4ProviderOptions;
55
55
  /**
56
56
  * Telemetry settings for observability.
57
57
  */
58
- interface TelemetrySettings {
58
+ interface TelemetryOptions {
59
59
  /**
60
60
  * Enable or disable telemetry. Defaults to true.
61
61
  */
@@ -252,7 +252,11 @@ interface PrepareCallOptions<TTools extends ToolSet = ToolSet> extends Partial<G
252
252
  tools: TTools;
253
253
  instructions?: string | SystemModelMessage | Array<SystemModelMessage>;
254
254
  toolChoice?: ToolChoice<TTools>;
255
- experimental_telemetry?: TelemetrySettings;
255
+ telemetry?: TelemetryOptions;
256
+ /**
257
+ * @deprecated Use `telemetry` instead. This alias will be removed in a future major release.
258
+ */
259
+ experimental_telemetry?: TelemetryOptions;
256
260
  experimental_context?: unknown;
257
261
  messages: ModelMessage[];
258
262
  }
@@ -271,6 +275,10 @@ type PrepareCallCallback<TTools extends ToolSet = ToolSet> = (options: PrepareCa
271
275
  * Configuration options for creating a {@link WorkflowAgent} instance.
272
276
  */
273
277
  interface WorkflowAgentOptions<TTools extends ToolSet = ToolSet> extends GenerationSettings {
278
+ /**
279
+ * The id of the agent.
280
+ */
281
+ id?: string;
274
282
  /**
275
283
  * The model provider to use for the agent.
276
284
  *
@@ -299,9 +307,15 @@ interface WorkflowAgentOptions<TTools extends ToolSet = ToolSet> extends Generat
299
307
  */
300
308
  toolChoice?: ToolChoice<TTools>;
301
309
  /**
302
- * Optional telemetry configuration (experimental).
310
+ * Optional telemetry configuration.
311
+ */
312
+ telemetry?: TelemetryOptions;
313
+ /**
314
+ * Optional telemetry configuration.
315
+ *
316
+ * @deprecated Use `telemetry` instead. This alias will be removed in a future major release.
303
317
  */
304
- experimental_telemetry?: TelemetrySettings;
318
+ experimental_telemetry?: TelemetryOptions;
305
319
  /**
306
320
  * Default context that is passed into tool execution for every stream call on this agent.
307
321
  *
@@ -310,6 +324,39 @@ interface WorkflowAgentOptions<TTools extends ToolSet = ToolSet> extends Generat
310
324
  * @default undefined
311
325
  */
312
326
  experimental_context?: unknown;
327
+ /**
328
+ * Default stop condition for the agent loop. When the condition is an array,
329
+ * any of the conditions can be met to stop the generation.
330
+ *
331
+ * Per-stream `stopWhen` values passed to `stream()` override this default.
332
+ */
333
+ stopWhen?: StopCondition<NoInfer<ToolSet>, any> | Array<StopCondition<NoInfer<ToolSet>, any>>;
334
+ /**
335
+ * Default set of active tools that limits which tools the model can call,
336
+ * without changing the tool call and result types in the result.
337
+ *
338
+ * Per-stream `activeTools` values passed to `stream()` override this default.
339
+ */
340
+ activeTools?: ActiveTools<NoInfer<TTools>>;
341
+ /**
342
+ * Default output specification for structured outputs.
343
+ * Use `Output.object({ schema })` for structured output or `Output.text()` for text output.
344
+ *
345
+ * Per-stream `output` values passed to `stream()` override this default.
346
+ */
347
+ output?: OutputSpecification<any, any>;
348
+ /**
349
+ * Default function that attempts to repair a tool call that failed to parse.
350
+ *
351
+ * Per-stream `experimental_repairToolCall` values passed to `stream()` override this default.
352
+ */
353
+ experimental_repairToolCall?: ToolCallRepairFunction<TTools>;
354
+ /**
355
+ * Default custom download function to use for URLs.
356
+ *
357
+ * Per-stream `experimental_download` values passed to `stream()` override this default.
358
+ */
359
+ experimental_download?: DownloadFunction;
313
360
  /**
314
361
  * Default callback function called before each step in the agent loop.
315
362
  * Use this to modify settings, manage context, or inject messages dynamically
@@ -337,11 +384,11 @@ interface WorkflowAgentOptions<TTools extends ToolSet = ToolSet> extends Generat
337
384
  /**
338
385
  * Callback called before a tool's execute function runs.
339
386
  */
340
- experimental_onToolCallStart?: WorkflowAgentOnToolCallStartCallback;
387
+ experimental_onToolExecutionStart?: WorkflowAgentOnToolExecutionStartCallback;
341
388
  /**
342
389
  * Callback called after a tool execution completes.
343
390
  */
344
- experimental_onToolCallFinish?: WorkflowAgentOnToolCallFinishCallback;
391
+ experimental_onToolExecutionEnd?: WorkflowAgentOnToolExecutionEndCallback;
345
392
  /**
346
393
  * Prepare the parameters for the stream call.
347
394
  * Called once before the agent loop starts. Use this to transform
@@ -410,40 +457,85 @@ type WorkflowAgentOnStartCallback = (event: {
410
457
  /**
411
458
  * Callback that is called before each step (LLM call) begins.
412
459
  */
413
- type WorkflowAgentOnStepStartCallback = (event: {
460
+ type WorkflowAgentOnStepStartCallback<TTools extends ToolSet = ToolSet> = (event: {
414
461
  /** The current step number (0-based) */
415
462
  readonly stepNumber: number;
416
463
  /** The model being used for this step */
417
464
  readonly model: LanguageModel;
418
465
  /** The messages being sent for this step */
419
466
  readonly messages: ModelMessage[];
467
+ /** Results from all previously finished steps */
468
+ readonly steps: ReadonlyArray<StepResult<TTools, any>>;
420
469
  }) => PromiseLike<void> | void;
421
470
  /**
422
471
  * Callback that is called before a tool's execute function runs.
423
472
  */
424
- type WorkflowAgentOnToolCallStartCallback = (event: {
473
+ type WorkflowAgentOnToolExecutionStartCallback = (event: {
425
474
  /** The tool call being executed */
426
475
  readonly toolCall: ToolCall;
476
+ /** The current step number (0-based) */
477
+ readonly stepNumber: number;
427
478
  }) => PromiseLike<void> | void;
428
479
  /**
429
480
  * Callback that is called after a tool execution completes.
481
+ * Uses a discriminated union pattern: check `success` to determine
482
+ * whether `output` or `error` is available.
430
483
  */
431
- type WorkflowAgentOnToolCallFinishCallback = (event: {
484
+ type WorkflowAgentOnToolExecutionEndCallback = (event: {
432
485
  /** The tool call that was executed */
433
486
  readonly toolCall: ToolCall;
434
- /** The tool result (undefined if execution failed) */
435
- readonly result?: unknown;
436
- /** The error if execution failed */
437
- readonly error?: unknown;
487
+ /** The current step number (0-based) */
488
+ readonly stepNumber: number;
489
+ /** Execution time in milliseconds */
490
+ readonly durationMs: number;
491
+ /** Whether the tool call succeeded */
492
+ readonly success: true;
493
+ /** The tool result */
494
+ readonly output: unknown;
495
+ readonly error?: never;
496
+ } | {
497
+ /** The tool call that was executed */
498
+ readonly toolCall: ToolCall;
499
+ /** The current step number (0-based) */
500
+ readonly stepNumber: number;
501
+ /** Execution time in milliseconds */
502
+ readonly durationMs: number;
503
+ /** Whether the tool call succeeded */
504
+ readonly success: false;
505
+ /** The error that occurred */
506
+ readonly error: unknown;
507
+ readonly output?: never;
438
508
  }) => PromiseLike<void> | void;
439
509
  /**
440
510
  * Options for the {@link WorkflowAgent.stream} method.
441
511
  */
442
- interface WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never> extends Partial<GenerationSettings> {
512
+ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never> = Partial<GenerationSettings> & ({
513
+ /**
514
+ * A prompt. It can be either a text prompt or a list of messages.
515
+ *
516
+ * You can either use `prompt` or `messages` but not both.
517
+ */
518
+ prompt: string | Array<ModelMessage>;
519
+ /**
520
+ * A list of messages.
521
+ *
522
+ * You can either use `prompt` or `messages` but not both.
523
+ */
524
+ messages?: never;
525
+ } | {
443
526
  /**
444
527
  * The conversation messages to process. Should follow the AI SDK's ModelMessage format.
528
+ *
529
+ * You can either use `prompt` or `messages` but not both.
445
530
  */
446
- messages: ModelMessage[];
531
+ messages: Array<ModelMessage>;
532
+ /**
533
+ * A prompt. It can be either a text prompt or a list of messages.
534
+ *
535
+ * You can either use `prompt` or `messages` but not both.
536
+ */
537
+ prompt?: never;
538
+ }) & {
447
539
  /**
448
540
  * Optional system prompt override. If provided, overrides the system prompt from the constructor.
449
541
  */
@@ -476,12 +568,6 @@ interface WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT =
476
568
  * When the condition is an array, any of the conditions can be met to stop the generation.
477
569
  */
478
570
  stopWhen?: StopCondition<NoInfer<ToolSet>, any> | Array<StopCondition<NoInfer<ToolSet>, any>>;
479
- /**
480
- * Maximum number of sequential LLM calls (steps), e.g. when you use tool calls.
481
- * A maximum number can be set to prevent infinite loops in the case of misconfigured tools.
482
- * By default, it's unlimited (the agent loops until completion).
483
- */
484
- maxSteps?: number;
485
571
  /**
486
572
  * The tool choice strategy. Default: 'auto'.
487
573
  * Overrides the toolChoice from the constructor if provided.
@@ -491,11 +577,17 @@ interface WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT =
491
577
  * Limits the tools that are available for the model to call without
492
578
  * changing the tool call and result types in the result.
493
579
  */
494
- activeTools?: Array<keyof NoInfer<TTools>>;
580
+ activeTools?: ActiveTools<NoInfer<TTools>>;
495
581
  /**
496
- * Optional telemetry configuration (experimental).
582
+ * Optional telemetry configuration.
497
583
  */
498
- experimental_telemetry?: TelemetrySettings;
584
+ telemetry?: TelemetryOptions;
585
+ /**
586
+ * Optional telemetry configuration.
587
+ *
588
+ * @deprecated Use `telemetry` instead. This alias will be removed in a future major release.
589
+ */
590
+ experimental_telemetry?: TelemetryOptions;
499
591
  /**
500
592
  * Context that is passed into tool execution.
501
593
  * Experimental (can break in patch releases).
@@ -577,11 +669,11 @@ interface WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT =
577
669
  /**
578
670
  * Callback called before a tool's execute function runs.
579
671
  */
580
- experimental_onToolCallStart?: WorkflowAgentOnToolCallStartCallback;
672
+ experimental_onToolExecutionStart?: WorkflowAgentOnToolExecutionStartCallback;
581
673
  /**
582
674
  * Callback called after a tool execution completes.
583
675
  */
584
- experimental_onToolCallFinish?: WorkflowAgentOnToolCallFinishCallback;
676
+ experimental_onToolExecutionEnd?: WorkflowAgentOnToolExecutionEndCallback;
585
677
  /**
586
678
  * Callback function called before each step in the agent loop.
587
679
  * Use this to modify settings, manage context, or inject messages dynamically.
@@ -617,7 +709,7 @@ interface WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, OUTPUT =
617
709
  * @default false
618
710
  */
619
711
  preventClose?: boolean;
620
- }
712
+ };
621
713
  /**
622
714
  * A tool call made by the model. Matches the AI SDK's tool call shape.
623
715
  */
@@ -717,6 +809,10 @@ interface WorkflowAgentStreamResult<TTools extends ToolSet = ToolSet, OUTPUT = n
717
809
  * ```
718
810
  */
719
811
  declare class WorkflowAgent<TBaseTools extends ToolSet = ToolSet> {
812
+ /**
813
+ * The id of the agent.
814
+ */
815
+ readonly id: string | undefined;
720
816
  private model;
721
817
  /**
722
818
  * The tool set configured for this agent.
@@ -727,13 +823,18 @@ declare class WorkflowAgent<TBaseTools extends ToolSet = ToolSet> {
727
823
  private toolChoice?;
728
824
  private telemetry?;
729
825
  private experimentalContext;
826
+ private stopWhen?;
827
+ private activeTools?;
828
+ private output?;
829
+ private experimentalRepairToolCall?;
830
+ private experimentalDownload?;
730
831
  private prepareStep?;
731
832
  private constructorOnStepFinish?;
732
833
  private constructorOnFinish?;
733
834
  private constructorOnStart?;
734
835
  private constructorOnStepStart?;
735
- private constructorOnToolCallStart?;
736
- private constructorOnToolCallFinish?;
836
+ private constructorOnToolExecutionStart?;
837
+ private constructorOnToolExecutionEnd?;
737
838
  private prepareCall?;
738
839
  constructor(options: WorkflowAgentOptions<TBaseTools>);
739
840
  generate(): void;
@@ -906,4 +1007,4 @@ declare class WorkflowChatTransport<UI_MESSAGE extends UIMessage> implements Cha
906
1007
  private onFinish;
907
1008
  }
908
1009
 
909
- export { type CompatibleLanguageModel, type DownloadFunction, type GenerationSettings, type InferWorkflowAgentTools, type InferWorkflowAgentUIMessage, type OutputSpecification, type PrepareCallCallback, type PrepareCallOptions, type PrepareCallResult, type PrepareStepCallback, type PrepareStepInfo, type PrepareStepResult, type ProviderOptions, type ReconnectToStreamOptions, type SendMessagesOptions, type StreamTextTransform, type TelemetrySettings, WorkflowAgent, type WorkflowAgentOnAbortCallback, type WorkflowAgentOnErrorCallback, type WorkflowAgentOnFinishCallback, type WorkflowAgentOnStartCallback, type WorkflowAgentOnStepFinishCallback, type WorkflowAgentOnStepStartCallback, type WorkflowAgentOnToolCallFinishCallback, type WorkflowAgentOnToolCallStartCallback, type WorkflowAgentOptions, type WorkflowAgentStreamOptions, type WorkflowAgentStreamResult, WorkflowChatTransport, type WorkflowChatTransportOptions, createModelCallToUIChunkTransform, toUIMessageChunk };
1010
+ export { type CompatibleLanguageModel, type DownloadFunction, type GenerationSettings, type InferWorkflowAgentTools, type InferWorkflowAgentUIMessage, type OutputSpecification, type PrepareCallCallback, type PrepareCallOptions, type PrepareCallResult, type PrepareStepCallback, type PrepareStepInfo, type PrepareStepResult, type ProviderOptions, type ReconnectToStreamOptions, type SendMessagesOptions, type StreamTextTransform, type TelemetryOptions, WorkflowAgent, type WorkflowAgentOnAbortCallback, type WorkflowAgentOnErrorCallback, type WorkflowAgentOnFinishCallback, type WorkflowAgentOnStartCallback, type WorkflowAgentOnStepFinishCallback, type WorkflowAgentOnStepStartCallback, type WorkflowAgentOnToolExecutionEndCallback, type WorkflowAgentOnToolExecutionStartCallback, type WorkflowAgentOptions, type WorkflowAgentStreamOptions, type WorkflowAgentStreamResult, WorkflowChatTransport, type WorkflowChatTransportOptions, createModelCallToUIChunkTransform, toUIMessageChunk };