@upstash/workflow 0.2.22 → 0.3.0-rc

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.
@@ -1,8 +1,5 @@
1
- import { QstashError, PublishRequest, FlowControl, Client, Receiver, HTTPMethods as HTTPMethods$1 } from '@upstash/qstash';
2
- import { ZodType, z } from 'zod';
3
- import * as ai from 'ai';
4
- import { CoreTool, generateText } from 'ai';
5
- import { createOpenAI } from '@ai-sdk/openai';
1
+ import { QstashError, PublishRequest, FlowControl, HTTPMethods as HTTPMethods$1, Client, Receiver } from '@upstash/qstash';
2
+ import { z } from 'zod';
6
3
 
7
4
  /**
8
5
  * Error raised during Workflow execution
@@ -461,304 +458,6 @@ declare class WorkflowApi extends BaseWorkflowApi {
461
458
  get anthropic(): AnthropicAPI;
462
459
  }
463
460
 
464
- /**
465
- * An Agent which utilizes the model and tools available to it
466
- * to achieve a given task
467
- *
468
- * @param name Name of the agent
469
- * @param background Background of the agent
470
- * @param model LLM model to use
471
- * @param tools tools available to the agent
472
- * @param maxSteps number of times the agent can call the LLM at most. If
473
- * the agent abruptly stops execution after calling tools, you may need
474
- * to increase maxSteps
475
- * @param temparature temparature used when calling the LLM
476
- */
477
- declare class Agent {
478
- readonly name: AgentParameters["name"];
479
- readonly tools: AgentParameters["tools"];
480
- readonly maxSteps: AgentParameters["maxSteps"];
481
- readonly background: AgentParameters["background"];
482
- readonly model: AgentParameters["model"];
483
- readonly temparature: AgentParameters["temparature"];
484
- private readonly context;
485
- constructor({ tools, maxSteps, background, name, model, temparature }: AgentParameters, context: WorkflowContext);
486
- /**
487
- * Trigger the agent by passing a prompt
488
- *
489
- * @param prompt task to assign to the agent
490
- * @returns Response as `{ text: string }`
491
- */
492
- call({ prompt }: {
493
- prompt: string;
494
- }): Promise<{
495
- text: string;
496
- }>;
497
- /**
498
- * Convert the agent to a tool which can be used by other agents.
499
- *
500
- * @returns the agent as a tool
501
- */
502
- asTool(): AISDKTool;
503
- }
504
-
505
- declare class WorkflowTool<TSchema extends ZodType = ZodType> implements LangchainTool {
506
- /**
507
- * description of the tool
508
- */
509
- readonly description: string;
510
- /**
511
- * schema of the tool
512
- */
513
- readonly schema: TSchema;
514
- /**
515
- * function to invoke the tool
516
- */
517
- readonly invoke: (params: z.infer<TSchema>) => any;
518
- /**
519
- * whether the invoke method of the tool is to be wrapped with `context.run`
520
- */
521
- readonly executeAsStep: boolean;
522
- /**
523
- *
524
- * @param description description of the tool
525
- * @param schema schema of the tool
526
- * @param invoke function to invoke the tool
527
- * @param executeAsStep whether the invoke method of the tool is to be wrapped with `context.run`
528
- */
529
- constructor(params: {
530
- /**
531
- * description of the tool
532
- */
533
- description: string;
534
- /**
535
- * schema of the tool
536
- */
537
- schema: TSchema;
538
- /**
539
- * invoke function to invoke the tool
540
- */
541
- invoke: (params: z.infer<TSchema>) => any;
542
- /**
543
- * whether the invoke method is to be wrapped with `context.run`.
544
- *
545
- * When you pass a LangChain, AI SDK tool or a WorkflowTool to your agent,
546
- * the execute/invoke method of the tool is wrapped with `context.run` by default.
547
- *
548
- * This option allows you to disable this behavior.
549
- *
550
- * You may want to disable wrapping with context.run if you want to run context.run,
551
- * context.call or any other workflow step yourself in the execute/invoke method
552
- * of the tool.
553
- *
554
- * @default true
555
- */
556
- executeAsStep?: boolean;
557
- });
558
- }
559
-
560
- type AISDKTool = CoreTool;
561
- type LangchainTool = {
562
- description: string;
563
- schema: AISDKTool["parameters"];
564
- invoke: (...params: any[]) => any;
565
- };
566
- type GenerateTextParams = Parameters<typeof generateText>[0];
567
- type Model = GenerateTextParams["model"];
568
- type AgentParameters<TTool extends AISDKTool | LangchainTool | WorkflowTool = AISDKTool> = {
569
- /**
570
- * number of times the agent can call the LLM at most. If
571
- * the agent abruptly stops execution after calling tools, you may need
572
- * to increase maxSteps
573
- */
574
- maxSteps: number;
575
- /**
576
- * Background of the agent
577
- */
578
- background: string;
579
- /**
580
- * tools available to the agent
581
- */
582
- tools: Record<string, TTool>;
583
- /**
584
- * Name of the agent
585
- */
586
- name: string;
587
- /**
588
- * LLM model to use
589
- */
590
- model: Model;
591
- /**
592
- * temparature used when calling the LLM
593
- *
594
- * @default 0.1
595
- */
596
- temparature?: number;
597
- };
598
- type TaskParams = {
599
- /**
600
- * task assigned to the agent
601
- */
602
- prompt: string;
603
- };
604
- type SingleAgentTaskParams = TaskParams & {
605
- /**
606
- * agent to perform the task
607
- */
608
- agent: Agent;
609
- };
610
- type MultiAgentTaskParams = TaskParams & {
611
- /**
612
- * Agents which will collaborate to achieve the task
613
- */
614
- agents: Agent[];
615
- /**
616
- * number of times the manager agent can call the LLM at most.
617
- * If the agent abruptly stops execution after calling other agents, you may
618
- * need to increase maxSteps
619
- */
620
- maxSteps: number;
621
- /**
622
- * LLM model to use
623
- */
624
- model: Model;
625
- /**
626
- * Background of the agent. If not passed, default will be used.
627
- */
628
- background?: string;
629
- };
630
- type ModelParams = Parameters<ReturnType<typeof createOpenAI>>;
631
- type AgentCallParams = Pick<CallSettings, "flowControl" | "retries" | "timeout" | "retryDelay">;
632
- type CustomModelSettings = ModelParams["1"] & {
633
- baseURL?: string;
634
- apiKey?: string;
635
- } & {
636
- callSettings: AgentCallParams;
637
- };
638
- type CustomModelParams = [ModelParams[0], CustomModelSettings?];
639
- type ProviderFunction = (params: {
640
- fetch: typeof fetch;
641
- }) => any;
642
-
643
- /**
644
- * An Agent Task
645
- *
646
- * Can be run to make the agent(s) complete it using the tools available to them
647
- *
648
- * Can consist of a single agent or multiple agents.
649
- *
650
- * Single agent:
651
- *
652
- * ```ts
653
- * const task = context.agents.task({
654
- * agent: researcherAgent,
655
- * prompt: "Tell me about 5 topics in advanced physics.",
656
- * });
657
- * const { text } = await task.run();
658
- * ```
659
- *
660
- * Multi Agent:
661
- *
662
- * ```ts
663
- * const task = context.agents.task({
664
- * model,
665
- * maxSteps: 3,
666
- * agents: [researcherAgent, mathAgent],
667
- * prompt: "Tell me about 3 cities in Japan and calculate the sum of their populations",
668
- * });
669
- * const { text } = await task.run();
670
- * ```
671
- */
672
- declare class Task {
673
- private readonly context;
674
- private readonly taskParameters;
675
- constructor({ context, taskParameters, }: {
676
- context: WorkflowContext;
677
- taskParameters: SingleAgentTaskParams | MultiAgentTaskParams;
678
- });
679
- /**
680
- * Run the agents to complete the task
681
- *
682
- * @returns Result of the task as { text: string }
683
- */
684
- run(): Promise<{
685
- text: string;
686
- }>;
687
- }
688
-
689
- /**
690
- * Workflow Agents API
691
- *
692
- * https://upstash.com/docs/workflow/agents/overview
693
- *
694
- * Allows defining agents which can complete a given task
695
- * using tools available to them.
696
- */
697
- declare class WorkflowAgents {
698
- private context;
699
- constructor({ context }: {
700
- context: WorkflowContext;
701
- });
702
- /**
703
- * Defines an agent
704
- *
705
- * ```ts
706
- * const researcherAgent = context.agents.agent({
707
- * model,
708
- * name: 'academic',
709
- * maxSteps: 2,
710
- * tools: {
711
- * wikiTool: new WikipediaQueryRun({
712
- * topKResults: 1,
713
- * maxDocContentLength: 500,
714
- * })
715
- * },
716
- * background:
717
- * 'You are researcher agent with access to Wikipedia. ' +
718
- * 'Utilize Wikipedia as much as possible for correct information',
719
- * });
720
- * ```
721
- *
722
- * @param params agent parameters
723
- * @returns
724
- */
725
- agent(params: AgentParameters<AISDKTool | LangchainTool>): Agent;
726
- /**
727
- * Defines a task to be executed by a single agent
728
- *
729
- * ```ts
730
- * const task = context.agents.task({
731
- * agent: researcherAgent,
732
- * prompt: "Tell me about 5 topics in advanced physics.",
733
- * });
734
- * ```
735
- */
736
- task(taskParameters: SingleAgentTaskParams): Task;
737
- /**
738
- * Defines a task to be executed by multiple collaborating agents
739
- *
740
- * ```ts
741
- * const task = context.agents.task({
742
- * model,
743
- * maxSteps: 3,
744
- * agents: [researcherAgent, mathAgent],
745
- * prompt: "Tell me about 3 cities in Japan and calculate the sum of their populations",
746
- * });
747
- * ```
748
- */
749
- task(taskParameters: MultiAgentTaskParams): Task;
750
- /**
751
- * creates an openai model for agents
752
- */
753
- openai(...params: CustomModelParams): ai.LanguageModelV1;
754
- AISDKModel: <TProvider extends ProviderFunction>({ context, provider, providerParams, agentCallParams, }: {
755
- context: WorkflowContext;
756
- provider: TProvider;
757
- providerParams?: Omit<Required<Parameters<TProvider>>[0], "fetch">;
758
- agentCallParams?: AgentCallParams;
759
- }) => ReturnType<TProvider>;
760
- }
761
-
762
461
  /**
763
462
  * Upstash Workflow context
764
463
  *
@@ -1117,7 +816,6 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1117
816
  */
1118
817
  protected addStep<TResult = unknown>(step: BaseLazyStep<TResult>): Promise<TResult>;
1119
818
  get api(): WorkflowApi;
1120
- get agents(): WorkflowAgents;
1121
819
  }
1122
820
 
1123
821
  /**
@@ -1293,7 +991,7 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1293
991
  * @returns void
1294
992
  */
1295
993
  failureFunction?: (failureData: {
1296
- context: Omit<WorkflowContext<TInitialPayload>, "run" | "sleepUntil" | "sleep" | "call" | "waitForEvent" | "notify" | "cancel" | "api" | "invoke" | "agents">;
994
+ context: Omit<WorkflowContext<TInitialPayload>, "run" | "sleepUntil" | "sleep" | "call" | "waitForEvent" | "notify" | "cancel" | "api" | "invoke">;
1297
995
  failStatus: number;
1298
996
  failResponse: string;
1299
997
  failHeaders: Record<string, string[]>;
@@ -1639,4 +1337,4 @@ type InvokableWorkflow<TInitialPayload, TResult> = {
1639
1337
  workflowId?: string;
1640
1338
  };
1641
1339
 
1642
- export { type AsyncStepFunction as A, type LogLevel as B, type CallResponse as C, type DetailedFinishCondition as D, type ExclusiveValidationOptions as E, type FinishCondition as F, type WorkflowLoggerOptions as G, type HeaderParams as H, type InvokeWorkflowRequest as I, WorkflowLogger as J, type LazyInvokeStepParams as L, type NotifyResponse as N, type ParallelCallState as P, type RouteFunction as R, type StepType as S, type Telemetry as T, type WorkflowServeOptions as W, type RawStep as a, type Waiter as b, WorkflowError as c, WorkflowAbort as d, WorkflowNonRetryableError as e, WorkflowRetryAfterError as f, WorkflowTool as g, WorkflowContext as h, type WorkflowClient as i, type WorkflowReceiver as j, StepTypes as k, type Step as l, type SyncStepFunction as m, type StepFunction as n, type PublicServeOptions as o, type FailureFunctionPayload as p, type RequiredExceptFields as q, type WaitRequest as r, type WaitStepResponse as s, type NotifyStepResponse as t, type Duration as u, type WaitEventOptions as v, type StringifyBody as w, type CallSettings as x, type InvokeStepResponse as y, type InvokableWorkflow as z };
1340
+ export { type AsyncStepFunction as A, type WorkflowLoggerOptions as B, type CallResponse as C, type DetailedFinishCondition as D, type ExclusiveValidationOptions as E, type FinishCondition as F, WorkflowLogger as G, type HeaderParams as H, type InvokeWorkflowRequest as I, type LazyInvokeStepParams as L, type NotifyResponse as N, type ParallelCallState as P, type RouteFunction as R, type StepType as S, type Telemetry as T, type WorkflowServeOptions as W, type RawStep as a, type Waiter as b, WorkflowError as c, WorkflowAbort as d, WorkflowNonRetryableError as e, WorkflowRetryAfterError as f, WorkflowContext as g, type WorkflowClient as h, type WorkflowReceiver as i, StepTypes as j, type Step as k, type SyncStepFunction as l, type StepFunction as m, type PublicServeOptions as n, type FailureFunctionPayload as o, type RequiredExceptFields as p, type WaitRequest as q, type WaitStepResponse as r, type NotifyStepResponse as s, type Duration as t, type WaitEventOptions as u, type StringifyBody as v, type CallSettings as w, type InvokeStepResponse as x, type InvokableWorkflow as y, type LogLevel as z };
@@ -1,8 +1,5 @@
1
- import { QstashError, PublishRequest, FlowControl, Client, Receiver, HTTPMethods as HTTPMethods$1 } from '@upstash/qstash';
2
- import { ZodType, z } from 'zod';
3
- import * as ai from 'ai';
4
- import { CoreTool, generateText } from 'ai';
5
- import { createOpenAI } from '@ai-sdk/openai';
1
+ import { QstashError, PublishRequest, FlowControl, HTTPMethods as HTTPMethods$1, Client, Receiver } from '@upstash/qstash';
2
+ import { z } from 'zod';
6
3
 
7
4
  /**
8
5
  * Error raised during Workflow execution
@@ -461,304 +458,6 @@ declare class WorkflowApi extends BaseWorkflowApi {
461
458
  get anthropic(): AnthropicAPI;
462
459
  }
463
460
 
464
- /**
465
- * An Agent which utilizes the model and tools available to it
466
- * to achieve a given task
467
- *
468
- * @param name Name of the agent
469
- * @param background Background of the agent
470
- * @param model LLM model to use
471
- * @param tools tools available to the agent
472
- * @param maxSteps number of times the agent can call the LLM at most. If
473
- * the agent abruptly stops execution after calling tools, you may need
474
- * to increase maxSteps
475
- * @param temparature temparature used when calling the LLM
476
- */
477
- declare class Agent {
478
- readonly name: AgentParameters["name"];
479
- readonly tools: AgentParameters["tools"];
480
- readonly maxSteps: AgentParameters["maxSteps"];
481
- readonly background: AgentParameters["background"];
482
- readonly model: AgentParameters["model"];
483
- readonly temparature: AgentParameters["temparature"];
484
- private readonly context;
485
- constructor({ tools, maxSteps, background, name, model, temparature }: AgentParameters, context: WorkflowContext);
486
- /**
487
- * Trigger the agent by passing a prompt
488
- *
489
- * @param prompt task to assign to the agent
490
- * @returns Response as `{ text: string }`
491
- */
492
- call({ prompt }: {
493
- prompt: string;
494
- }): Promise<{
495
- text: string;
496
- }>;
497
- /**
498
- * Convert the agent to a tool which can be used by other agents.
499
- *
500
- * @returns the agent as a tool
501
- */
502
- asTool(): AISDKTool;
503
- }
504
-
505
- declare class WorkflowTool<TSchema extends ZodType = ZodType> implements LangchainTool {
506
- /**
507
- * description of the tool
508
- */
509
- readonly description: string;
510
- /**
511
- * schema of the tool
512
- */
513
- readonly schema: TSchema;
514
- /**
515
- * function to invoke the tool
516
- */
517
- readonly invoke: (params: z.infer<TSchema>) => any;
518
- /**
519
- * whether the invoke method of the tool is to be wrapped with `context.run`
520
- */
521
- readonly executeAsStep: boolean;
522
- /**
523
- *
524
- * @param description description of the tool
525
- * @param schema schema of the tool
526
- * @param invoke function to invoke the tool
527
- * @param executeAsStep whether the invoke method of the tool is to be wrapped with `context.run`
528
- */
529
- constructor(params: {
530
- /**
531
- * description of the tool
532
- */
533
- description: string;
534
- /**
535
- * schema of the tool
536
- */
537
- schema: TSchema;
538
- /**
539
- * invoke function to invoke the tool
540
- */
541
- invoke: (params: z.infer<TSchema>) => any;
542
- /**
543
- * whether the invoke method is to be wrapped with `context.run`.
544
- *
545
- * When you pass a LangChain, AI SDK tool or a WorkflowTool to your agent,
546
- * the execute/invoke method of the tool is wrapped with `context.run` by default.
547
- *
548
- * This option allows you to disable this behavior.
549
- *
550
- * You may want to disable wrapping with context.run if you want to run context.run,
551
- * context.call or any other workflow step yourself in the execute/invoke method
552
- * of the tool.
553
- *
554
- * @default true
555
- */
556
- executeAsStep?: boolean;
557
- });
558
- }
559
-
560
- type AISDKTool = CoreTool;
561
- type LangchainTool = {
562
- description: string;
563
- schema: AISDKTool["parameters"];
564
- invoke: (...params: any[]) => any;
565
- };
566
- type GenerateTextParams = Parameters<typeof generateText>[0];
567
- type Model = GenerateTextParams["model"];
568
- type AgentParameters<TTool extends AISDKTool | LangchainTool | WorkflowTool = AISDKTool> = {
569
- /**
570
- * number of times the agent can call the LLM at most. If
571
- * the agent abruptly stops execution after calling tools, you may need
572
- * to increase maxSteps
573
- */
574
- maxSteps: number;
575
- /**
576
- * Background of the agent
577
- */
578
- background: string;
579
- /**
580
- * tools available to the agent
581
- */
582
- tools: Record<string, TTool>;
583
- /**
584
- * Name of the agent
585
- */
586
- name: string;
587
- /**
588
- * LLM model to use
589
- */
590
- model: Model;
591
- /**
592
- * temparature used when calling the LLM
593
- *
594
- * @default 0.1
595
- */
596
- temparature?: number;
597
- };
598
- type TaskParams = {
599
- /**
600
- * task assigned to the agent
601
- */
602
- prompt: string;
603
- };
604
- type SingleAgentTaskParams = TaskParams & {
605
- /**
606
- * agent to perform the task
607
- */
608
- agent: Agent;
609
- };
610
- type MultiAgentTaskParams = TaskParams & {
611
- /**
612
- * Agents which will collaborate to achieve the task
613
- */
614
- agents: Agent[];
615
- /**
616
- * number of times the manager agent can call the LLM at most.
617
- * If the agent abruptly stops execution after calling other agents, you may
618
- * need to increase maxSteps
619
- */
620
- maxSteps: number;
621
- /**
622
- * LLM model to use
623
- */
624
- model: Model;
625
- /**
626
- * Background of the agent. If not passed, default will be used.
627
- */
628
- background?: string;
629
- };
630
- type ModelParams = Parameters<ReturnType<typeof createOpenAI>>;
631
- type AgentCallParams = Pick<CallSettings, "flowControl" | "retries" | "timeout" | "retryDelay">;
632
- type CustomModelSettings = ModelParams["1"] & {
633
- baseURL?: string;
634
- apiKey?: string;
635
- } & {
636
- callSettings: AgentCallParams;
637
- };
638
- type CustomModelParams = [ModelParams[0], CustomModelSettings?];
639
- type ProviderFunction = (params: {
640
- fetch: typeof fetch;
641
- }) => any;
642
-
643
- /**
644
- * An Agent Task
645
- *
646
- * Can be run to make the agent(s) complete it using the tools available to them
647
- *
648
- * Can consist of a single agent or multiple agents.
649
- *
650
- * Single agent:
651
- *
652
- * ```ts
653
- * const task = context.agents.task({
654
- * agent: researcherAgent,
655
- * prompt: "Tell me about 5 topics in advanced physics.",
656
- * });
657
- * const { text } = await task.run();
658
- * ```
659
- *
660
- * Multi Agent:
661
- *
662
- * ```ts
663
- * const task = context.agents.task({
664
- * model,
665
- * maxSteps: 3,
666
- * agents: [researcherAgent, mathAgent],
667
- * prompt: "Tell me about 3 cities in Japan and calculate the sum of their populations",
668
- * });
669
- * const { text } = await task.run();
670
- * ```
671
- */
672
- declare class Task {
673
- private readonly context;
674
- private readonly taskParameters;
675
- constructor({ context, taskParameters, }: {
676
- context: WorkflowContext;
677
- taskParameters: SingleAgentTaskParams | MultiAgentTaskParams;
678
- });
679
- /**
680
- * Run the agents to complete the task
681
- *
682
- * @returns Result of the task as { text: string }
683
- */
684
- run(): Promise<{
685
- text: string;
686
- }>;
687
- }
688
-
689
- /**
690
- * Workflow Agents API
691
- *
692
- * https://upstash.com/docs/workflow/agents/overview
693
- *
694
- * Allows defining agents which can complete a given task
695
- * using tools available to them.
696
- */
697
- declare class WorkflowAgents {
698
- private context;
699
- constructor({ context }: {
700
- context: WorkflowContext;
701
- });
702
- /**
703
- * Defines an agent
704
- *
705
- * ```ts
706
- * const researcherAgent = context.agents.agent({
707
- * model,
708
- * name: 'academic',
709
- * maxSteps: 2,
710
- * tools: {
711
- * wikiTool: new WikipediaQueryRun({
712
- * topKResults: 1,
713
- * maxDocContentLength: 500,
714
- * })
715
- * },
716
- * background:
717
- * 'You are researcher agent with access to Wikipedia. ' +
718
- * 'Utilize Wikipedia as much as possible for correct information',
719
- * });
720
- * ```
721
- *
722
- * @param params agent parameters
723
- * @returns
724
- */
725
- agent(params: AgentParameters<AISDKTool | LangchainTool>): Agent;
726
- /**
727
- * Defines a task to be executed by a single agent
728
- *
729
- * ```ts
730
- * const task = context.agents.task({
731
- * agent: researcherAgent,
732
- * prompt: "Tell me about 5 topics in advanced physics.",
733
- * });
734
- * ```
735
- */
736
- task(taskParameters: SingleAgentTaskParams): Task;
737
- /**
738
- * Defines a task to be executed by multiple collaborating agents
739
- *
740
- * ```ts
741
- * const task = context.agents.task({
742
- * model,
743
- * maxSteps: 3,
744
- * agents: [researcherAgent, mathAgent],
745
- * prompt: "Tell me about 3 cities in Japan and calculate the sum of their populations",
746
- * });
747
- * ```
748
- */
749
- task(taskParameters: MultiAgentTaskParams): Task;
750
- /**
751
- * creates an openai model for agents
752
- */
753
- openai(...params: CustomModelParams): ai.LanguageModelV1;
754
- AISDKModel: <TProvider extends ProviderFunction>({ context, provider, providerParams, agentCallParams, }: {
755
- context: WorkflowContext;
756
- provider: TProvider;
757
- providerParams?: Omit<Required<Parameters<TProvider>>[0], "fetch">;
758
- agentCallParams?: AgentCallParams;
759
- }) => ReturnType<TProvider>;
760
- }
761
-
762
461
  /**
763
462
  * Upstash Workflow context
764
463
  *
@@ -1117,7 +816,6 @@ declare class WorkflowContext<TInitialPayload = unknown> {
1117
816
  */
1118
817
  protected addStep<TResult = unknown>(step: BaseLazyStep<TResult>): Promise<TResult>;
1119
818
  get api(): WorkflowApi;
1120
- get agents(): WorkflowAgents;
1121
819
  }
1122
820
 
1123
821
  /**
@@ -1293,7 +991,7 @@ type WorkflowServeOptions<TResponse extends Response = Response, TInitialPayload
1293
991
  * @returns void
1294
992
  */
1295
993
  failureFunction?: (failureData: {
1296
- context: Omit<WorkflowContext<TInitialPayload>, "run" | "sleepUntil" | "sleep" | "call" | "waitForEvent" | "notify" | "cancel" | "api" | "invoke" | "agents">;
994
+ context: Omit<WorkflowContext<TInitialPayload>, "run" | "sleepUntil" | "sleep" | "call" | "waitForEvent" | "notify" | "cancel" | "api" | "invoke">;
1297
995
  failStatus: number;
1298
996
  failResponse: string;
1299
997
  failHeaders: Record<string, string[]>;
@@ -1639,4 +1337,4 @@ type InvokableWorkflow<TInitialPayload, TResult> = {
1639
1337
  workflowId?: string;
1640
1338
  };
1641
1339
 
1642
- export { type AsyncStepFunction as A, type LogLevel as B, type CallResponse as C, type DetailedFinishCondition as D, type ExclusiveValidationOptions as E, type FinishCondition as F, type WorkflowLoggerOptions as G, type HeaderParams as H, type InvokeWorkflowRequest as I, WorkflowLogger as J, type LazyInvokeStepParams as L, type NotifyResponse as N, type ParallelCallState as P, type RouteFunction as R, type StepType as S, type Telemetry as T, type WorkflowServeOptions as W, type RawStep as a, type Waiter as b, WorkflowError as c, WorkflowAbort as d, WorkflowNonRetryableError as e, WorkflowRetryAfterError as f, WorkflowTool as g, WorkflowContext as h, type WorkflowClient as i, type WorkflowReceiver as j, StepTypes as k, type Step as l, type SyncStepFunction as m, type StepFunction as n, type PublicServeOptions as o, type FailureFunctionPayload as p, type RequiredExceptFields as q, type WaitRequest as r, type WaitStepResponse as s, type NotifyStepResponse as t, type Duration as u, type WaitEventOptions as v, type StringifyBody as w, type CallSettings as x, type InvokeStepResponse as y, type InvokableWorkflow as z };
1340
+ export { type AsyncStepFunction as A, type WorkflowLoggerOptions as B, type CallResponse as C, type DetailedFinishCondition as D, type ExclusiveValidationOptions as E, type FinishCondition as F, WorkflowLogger as G, type HeaderParams as H, type InvokeWorkflowRequest as I, type LazyInvokeStepParams as L, type NotifyResponse as N, type ParallelCallState as P, type RouteFunction as R, type StepType as S, type Telemetry as T, type WorkflowServeOptions as W, type RawStep as a, type Waiter as b, WorkflowError as c, WorkflowAbort as d, WorkflowNonRetryableError as e, WorkflowRetryAfterError as f, WorkflowContext as g, type WorkflowClient as h, type WorkflowReceiver as i, StepTypes as j, type Step as k, type SyncStepFunction as l, type StepFunction as m, type PublicServeOptions as n, type FailureFunctionPayload as o, type RequiredExceptFields as p, type WaitRequest as q, type WaitStepResponse as r, type NotifyStepResponse as s, type Duration as t, type WaitEventOptions as u, type StringifyBody as v, type CallSettings as w, type InvokeStepResponse as x, type InvokableWorkflow as y, type LogLevel as z };