@ai-sdk/workflow 2.0.58 → 2.0.59

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,26 @@
1
1
  # @ai-sdk/workflow
2
2
 
3
+ ## 2.0.59
4
+
5
+ ### Patch Changes
6
+
7
+ - a471b4c: Document and validate WorkflowAgent generation deadlines, retry boundaries, hook cancellation, and selected result serialization across workflow resumption.
8
+ - 0ca1ab9: Add durable non-streaming `WorkflowAgent.generate()` with a shared tool loop, a 20-step default, typed output, and core generation result semantics. Reuse core result and content construction through internal exports while preserving existing Workflow streaming behavior. Transport-independent approval creation remains separate follow-up work.
9
+ - 69ea843: fix(workflow): preserve length-limited assistant responses in conversation messages
10
+ - 6accb1c: Refactor WorkflowAgent call preparation, model-call results, and execution finalization to prepare for non-streaming generation while preserving stream behavior.
11
+ - 57dadb5: Create tool approval requests independently of streaming so WorkflowAgent.generate and stream without a writable can resume approved calls. Preserve provider approval requests and forward approval responses without locally executing provider tools.
12
+ - c89c76c: fix(workflow): preserve provider metadata on assistant text messages
13
+ - Updated dependencies [0fe8c67]
14
+ - Updated dependencies [2959d35]
15
+ - Updated dependencies [0ca1ab9]
16
+ - Updated dependencies [d6b42fd]
17
+ - Updated dependencies [ed6e72d]
18
+ - Updated dependencies [59116e6]
19
+ - Updated dependencies [2136151]
20
+ - ai@7.0.128
21
+ - @ai-sdk/provider@4.0.22
22
+ - @ai-sdk/provider-utils@5.0.54
23
+
3
24
  ## 2.0.58
4
25
 
5
26
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { i as WorkflowChatTransportOptions, n as SendMessagesOptions, r as WorkflowChatTransport, t as ReconnectToStreamOptions } from "./workflow-chat-transport-DwOgX7dK.js";
2
2
  import { Context, HasRequiredKey, InferToolContext, InferToolInput, InferToolOutput, InferToolSetContext } from "@ai-sdk/provider-utils";
3
- import { ActiveTools, Experimental_LanguageModelStreamPart, Experimental_SandboxSession, FinishReason, GenerateTextOnStepEndCallback, InferUITools, Instructions, LanguageModel, LanguageModelResponseMetadata, LanguageModelUsage, ModelMessage, Output, StepResult, StopCondition, TelemetryOptions as TelemetryOptions$1, ToolCallRepairFunction, ToolCallRepairFunction as ToolCallRepairFunction$1, ToolChoice, ToolSet, UIMessage, UIMessageChunk } from "ai";
3
+ import { ActiveTools, Experimental_LanguageModelStreamPart, Experimental_SandboxSession, FinishReason, GenerateTextOnStepEndCallback, GenerateTextResult, InferUITools, Instructions, LanguageModel, LanguageModelResponseMetadata, LanguageModelUsage, ModelMessage, Output, StepResult, StopCondition, TelemetryOptions as TelemetryOptions$1, ToolCallRepairFunction, ToolCallRepairFunction as ToolCallRepairFunction$1, ToolChoice, ToolSet, UIMessage, UIMessageChunk } from "ai";
4
4
  import { LanguageModelV4, LanguageModelV4CallOptions, LanguageModelV4Prompt, LanguageModelV4StreamPart, SharedV4ProviderOptions } from "@ai-sdk/provider";
5
- //#region src/do-stream-step.d.ts
5
+ //#region src/model-call.d.ts
6
6
  type ModelCallStreamPart<TTools extends ToolSet = ToolSet> = Experimental_LanguageModelStreamPart<TTools> | {
7
7
  type: 'tool-approval-request';
8
8
  approvalId: string;
@@ -665,7 +665,7 @@ type WorkflowAgentOnToolExecutionEndCallback<TTools extends ToolSet = ToolSet> =
665
665
  /**
666
666
  * Options for the {@link WorkflowAgent.stream} method.
667
667
  */
668
- type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContext extends Context = Context, OUTPUT = never, PARTIAL_OUTPUT = never> = Partial<GenerationSettings> & ({
668
+ type WorkflowAgentCallOptions<TTools extends ToolSet = ToolSet, TRuntimeContext extends Context = Context, OUTPUT = never, PARTIAL_OUTPUT = never> = Partial<GenerationSettings> & ({
669
669
  /**
670
670
  * A prompt. It can be either a text prompt or a list of messages.
671
671
  *
@@ -693,7 +693,7 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
693
693
  prompt?: never;
694
694
  }) & {
695
695
  /**
696
- * Instructions override for this stream call.
696
+ * Instructions override for this call.
697
697
  */
698
698
  instructions?: Instructions;
699
699
  /**
@@ -702,29 +702,6 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
702
702
  * @deprecated Use `instructions` instead.
703
703
  */
704
704
  system?: string;
705
- /**
706
- * A WritableStream that receives raw LanguageModelV4StreamPart chunks in real-time
707
- * as the model generates them. This enables streaming to the client without
708
- * coupling WorkflowAgent to UIMessageChunk format.
709
- *
710
- * Convert to UIMessageChunks at the response boundary using
711
- * `createUIMessageChunkTransform()` from `@ai-sdk/workflow`.
712
- *
713
- * @example
714
- * ```typescript
715
- * // In the workflow:
716
- * await agent.stream({
717
- * messages,
718
- * writable: getWritable<ModelCallStreamPart>(),
719
- * });
720
- *
721
- * // In the route handler:
722
- * return createUIMessageStreamResponse({
723
- * stream: run.readable.pipeThrough(createModelCallToUIChunkTransform()),
724
- * });
725
- * ```
726
- */
727
- writable?: WritableStream<ModelCallStreamPart<ToolSet>>;
728
705
  /**
729
706
  * Condition for stopping the generation when there are tool results in the last step.
730
707
  * When the condition is an array, any of the conditions can be met to stop the generation.
@@ -791,13 +768,6 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
791
768
  * ```
792
769
  */
793
770
  output?: OutputSpecification<OUTPUT, PARTIAL_OUTPUT>;
794
- /**
795
- * Whether to include raw chunks from the provider in the stream.
796
- * When enabled, you will receive raw chunks with type 'raw' that contain the unprocessed data from the provider.
797
- * This allows access to cutting-edge provider features not yet wrapped by the AI SDK.
798
- * Defaults to false.
799
- */
800
- includeRawChunks?: boolean;
801
771
  /**
802
772
  * A function that attempts to repair a tool call that failed to parse.
803
773
  */
@@ -808,12 +778,6 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
808
778
  * @deprecated Use `repairToolCall` instead.
809
779
  */
810
780
  experimental_repairToolCall?: ToolCallRepairFunction$1<TTools>;
811
- /**
812
- * Optional stream transformations.
813
- * They are applied in the order they are provided.
814
- * The stream transformations must maintain the stream structure for streamText to work correctly.
815
- */
816
- experimental_transform?: StreamTextTransform<TTools> | Array<StreamTextTransform<TTools>>;
817
781
  /**
818
782
  * Custom download function to use for URLs.
819
783
  * By default, files are downloaded if the model does not support the URL for the given media type.
@@ -914,11 +878,50 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
914
878
  */
915
879
  prepareStep?: PrepareStepCallback<TTools, TRuntimeContext>;
916
880
  /**
917
- * Timeout in milliseconds for the stream operation.
881
+ * Timeout in milliseconds for model calls in this operation.
918
882
  * When specified, creates an AbortSignal that will abort the operation after the given time.
919
883
  * If both `timeout` and `abortSignal` are provided, whichever triggers first will abort.
920
884
  */
921
885
  timeout?: number;
886
+ };
887
+ /** Streaming options add transport controls to the shared call options. */
888
+ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContext extends Context = Context, OUTPUT = never, PARTIAL_OUTPUT = never> = WorkflowAgentCallOptions<TTools, TRuntimeContext, OUTPUT, PARTIAL_OUTPUT> & {
889
+ /**
890
+ * A WritableStream that receives raw LanguageModelV4StreamPart chunks in real-time
891
+ * as the model generates them. This enables streaming to the client without
892
+ * coupling WorkflowAgent to UIMessageChunk format.
893
+ *
894
+ * Convert to UIMessageChunks at the response boundary using
895
+ * `createUIMessageChunkTransform()` from `@ai-sdk/workflow`.
896
+ *
897
+ * @example
898
+ * ```typescript
899
+ * // In the workflow:
900
+ * await agent.stream({
901
+ * messages,
902
+ * writable: getWritable<ModelCallStreamPart>(),
903
+ * });
904
+ *
905
+ * // In the route handler:
906
+ * return createUIMessageStreamResponse({
907
+ * stream: run.readable.pipeThrough(createModelCallToUIChunkTransform()),
908
+ * });
909
+ * ```
910
+ */
911
+ writable?: WritableStream<ModelCallStreamPart<ToolSet>>;
912
+ /**
913
+ * Whether to include raw chunks from the provider in the stream.
914
+ * When enabled, you will receive raw chunks with type 'raw' that contain the unprocessed data from the provider.
915
+ * This allows access to cutting-edge provider features not yet wrapped by the AI SDK.
916
+ * Defaults to false.
917
+ */
918
+ includeRawChunks?: boolean;
919
+ /**
920
+ * Optional stream transformations.
921
+ * They are applied in the order they are provided.
922
+ * The stream transformations must maintain the stream structure for streamText to work correctly.
923
+ */
924
+ experimental_transform?: StreamTextTransform<TTools> | Array<StreamTextTransform<TTools>>;
922
925
  /**
923
926
  * Whether to send a 'finish' chunk to the writable stream when streaming completes.
924
927
  * @default true
@@ -930,6 +933,19 @@ type WorkflowAgentStreamOptions<TTools extends ToolSet = ToolSet, TRuntimeContex
930
933
  */
931
934
  preventClose?: boolean;
932
935
  };
936
+ type WorkflowAgentGenerateOptions<TTools extends ToolSet = ToolSet, TRuntimeContext extends Context = Context, OUTPUT = string, PARTIAL_OUTPUT = never> = WorkflowAgentCallOptions<TTools, TRuntimeContext, OUTPUT, PARTIAL_OUTPUT> & {
937
+ /** Request/response bodies and request messages are omitted by default. */
938
+ include?: {
939
+ requestBody?: boolean;
940
+ responseBody?: boolean;
941
+ requestMessages?: boolean;
942
+ };
943
+ };
944
+ /** Core result semantics, available inside the workflow that runs generation. */
945
+ type WorkflowAgentGenerateResult<TTools extends ToolSet = ToolSet, TRuntimeContext extends Context = Context, OUTPUT = string> = Omit<GenerateTextResult<TTools, TRuntimeContext, Output.Output>, 'output'> & {
946
+ readonly output: OUTPUT;
947
+ };
948
+ type DefaultGenerateOutput<OUTPUT> = [DefaultWorkflowAgentOutput<OUTPUT>] extends [never] ? string : OUTPUT;
933
949
  /**
934
950
  * A tool call made by the model. Matches the AI SDK's tool call shape.
935
951
  */
@@ -1077,8 +1093,10 @@ export declare class WorkflowAgent<TBaseTools extends ToolSet = ToolSet, TRuntim
1077
1093
  private constructorOnToolExecutionEnd?;
1078
1094
  private prepareCall?;
1079
1095
  constructor(options: WorkflowAgentOptions<TBaseTools, TRuntimeContext, OUTPUT, PARTIAL_OUTPUT>);
1080
- generate(): void;
1096
+ generate<TTools extends TBaseTools = TBaseTools, TOutput = DefaultGenerateOutput<OUTPUT>, TPartialOutput = DefaultWorkflowAgentOutput<PARTIAL_OUTPUT>>(options: WorkflowAgentGenerateOptions<TTools, TRuntimeContext, TOutput, TPartialOutput>): Promise<WorkflowAgentGenerateResult<TTools, TRuntimeContext, TOutput>>;
1081
1097
  stream<TTools extends TBaseTools = TBaseTools, TOutput = DefaultWorkflowAgentOutput<OUTPUT>, TPartialOutput = DefaultWorkflowAgentOutput<PARTIAL_OUTPUT>>(options: WorkflowAgentStreamOptions<TTools, TRuntimeContext, TOutput, TPartialOutput>): Promise<WorkflowAgentStreamResult<TTools, TOutput>>;
1098
+ private prepareInvocation;
1099
+ private execute;
1082
1100
  }
1083
1101
  //#endregion
1084
1102
  //#region src/to-ui-message-chunk.d.ts
@@ -1158,5 +1176,5 @@ export declare function createModelCallToUIChunkTransform({ uiStartIndex }?: {
1158
1176
  */
1159
1177
  export declare function normalizeUIMessageStreamParts(source: AsyncIterable<UIMessageChunk>): AsyncGenerator<UIMessageChunk>;
1160
1178
  //#endregion
1161
- export { type CompatibleLanguageModel, type DownloadFunction, type GenerationSettings, type InferWorkflowAgentTools, type InferWorkflowAgentUIMessage, type ModelCallStreamPart, Output, type OutputSpecification, type PrepareCallCallback, type PrepareCallOptions, type PrepareCallResult, type PrepareStepCallback, type PrepareStepInfo, type PrepareStepResult, type ProviderOptions, type ReconnectToStreamOptions, type SendMessagesOptions, type StreamTextTransform, type TelemetryOptions, type ToolCallRepairFunction, type WorkflowAgentOnAbortCallback, type WorkflowAgentOnEndCallback, type WorkflowAgentOnErrorCallback, type WorkflowAgentOnFinishCallback, type WorkflowAgentOnStartCallback, type WorkflowAgentOnStepEndCallback, type WorkflowAgentOnStepFinishCallback, type WorkflowAgentOnStepStartCallback, type WorkflowAgentOnToolExecutionEndCallback, type WorkflowAgentOnToolExecutionStartCallback, type WorkflowAgentOptions, type WorkflowAgentStreamOptions, type WorkflowAgentStreamResult, type WorkflowAgentToolExecutionEndEvent, type WorkflowAgentToolExecutionStartEvent, WorkflowChatTransport, type WorkflowChatTransportOptions, type WorkflowToolApprovalSecret };
1179
+ export { type CompatibleLanguageModel, type DownloadFunction, type GenerationSettings, type InferWorkflowAgentTools, type InferWorkflowAgentUIMessage, type ModelCallStreamPart, Output, type OutputSpecification, type PrepareCallCallback, type PrepareCallOptions, type PrepareCallResult, type PrepareStepCallback, type PrepareStepInfo, type PrepareStepResult, type ProviderOptions, type ReconnectToStreamOptions, type SendMessagesOptions, type StreamTextTransform, type TelemetryOptions, type ToolCallRepairFunction, type WorkflowAgentCallOptions, type WorkflowAgentGenerateOptions, type WorkflowAgentGenerateResult, type WorkflowAgentOnAbortCallback, type WorkflowAgentOnEndCallback, type WorkflowAgentOnErrorCallback, type WorkflowAgentOnFinishCallback, type WorkflowAgentOnStartCallback, type WorkflowAgentOnStepEndCallback, type WorkflowAgentOnStepFinishCallback, type WorkflowAgentOnStepStartCallback, type WorkflowAgentOnToolExecutionEndCallback, type WorkflowAgentOnToolExecutionStartCallback, type WorkflowAgentOptions, type WorkflowAgentStreamOptions, type WorkflowAgentStreamResult, type WorkflowAgentToolExecutionEndEvent, type WorkflowAgentToolExecutionStartEvent, WorkflowChatTransport, type WorkflowChatTransportOptions, type WorkflowToolApprovalSecret };
1162
1180
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":["CoreTelemetryOptions","SandboxSession","ToolCallRepairFunction"],"sources":["../src/do-stream-step.ts","../src/types.ts","../src/workflow-agent.ts","../src/to-ui-message-chunk.ts","../src/normalize-ui-message-stream.ts"],"mappings":";;;;;KA8BY,oBAAoB,eAAe,UAAU,WACrD,qCAAqC;EAEnC;EACA;EACA;EACA;;EAEA;;;;;;;;;KC5BM,0BAA0B;;;;;;;;KC6D1B,+BACV,eAAe,UAAU,SACzB,wBAAwB,UAAU,WAChC,8BAA8B,QAAQ;;;;;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M,OACJ,eAAe,aAAa,YAC5B,UAAU,2BAA2B,SACrC,iBAAiB,2BAA2B,iBAE5C,SAAS,2BACP,QACA,iBACA,SACA,kBAED,QAAQ,0BAA0B,QAAQ;;;;;;;;wBC7hD/B,iBACd,MAAM,oBAAoB,WACzB;;;;;;;;;;;wBAwNa,oCACd;;;;;EAMA;IACO,gBAAgB,oBAAoB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBC3HhC,8BACrB,QAAQ,cAAc,kBACrB,eAAe"}
1
+ {"version":3,"file":"index.d.ts","names":["CoreTelemetryOptions","SandboxSession","ToolCallRepairFunction"],"sources":["../src/model-call.ts","../src/types.ts","../src/workflow-agent.ts","../src/to-ui-message-chunk.ts","../src/normalize-ui-message-stream.ts"],"mappings":";;;;;KAkBY,oBAAoB,eAAe,UAAU,WACrD,qCAAqC;EAEnC;EACA;EACA;EACA;;EAEA;;;;;;;;;KChBM,0BAA0B;;;;;;;;KC0E1B,+BACV,eAAe,UAAU,SACzB,wBAAwB,UAAU,WAChC,8BAA8B,QAAQ;;;;;;;KAQ9B,kCACV,eAAe,UAAU,SACzB,wBAAwB,UAAU,WAChC,+BAA+B,QAAQ;;;;KAK/B,wBAAwB,kBAClC,uBAAuB,oBAAoB,wBACvC;;;;KAMM,4BACV,gBACA,8BACE,UACF,yBAEA,aAAa,wBAAwB;;;;;UAatB,oBAAoB,QAAQ;WAClC;EACT,gBAAgB,YAAY;EAC5B,mBAAmB;IACjB;MACE;IAAU,SAAS;;EACvB,oBACE;IAAW;KACX;IACE,UAAU;IACV,OAAO;IACP,cAAc;MAEf,QAAQ;;KAGR,2BAA2B,wBAAwB,iBAAiB;;;;KAK7D,kBAAkB;;;;;KAMlB;;;;EAIV;;KAGG,mCAAmC,eAAe,WACrD,eAAe,oBAAoB;EAC7B,cAAc,oBAAoB;;EAClC;;KACI,iBACV,wBAAwB,UAAU,SAClC,eAAe,UAAU,WACvBA,mBAAqB,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