diff --git a/agents-api/agents_api/autogen/Tasks.py b/agents-api/agents_api/autogen/Tasks.py index c7067ea0c..77dcfefd6 100644 --- a/agents-api/agents_api/autogen/Tasks.py +++ b/agents-api/agents_api/autogen/Tasks.py @@ -191,7 +191,8 @@ class ForeachDo(BaseModel): VALIDATION: Should NOT return more than 1000 elements. """ do: ( - EvaluateStep + WaitForInputStep + | EvaluateStep | ToolCallStep | PromptStep | GetStep @@ -214,7 +215,8 @@ class ForeachDoUpdateItem(BaseModel): VALIDATION: Should NOT return more than 1000 elements. """ do: ( - EvaluateStep + WaitForInputStep + | EvaluateStep | ToolCallStep | PromptStepUpdateItem | GetStep diff --git a/typespec/tasks/steps.tsp b/typespec/tasks/steps.tsp index 1d8c19209..4b14ef6ae 100644 --- a/typespec/tasks/steps.tsp +++ b/typespec/tasks/steps.tsp @@ -41,6 +41,10 @@ model BaseWorkflowStep { kind_: T; } +alias SequentialWorkflowStep = + | WaitForInputStep + | MappableWorkflowStep; + alias MappableWorkflowStep = | EvaluateStep | ToolCallStep @@ -208,7 +212,7 @@ model ForeachDo { in: TypedExpression>; /** The steps to run for each iteration */ - do: MappableWorkflowStep; + do: SequentialWorkflowStep; } model ForeachStep extends BaseWorkflowStep<"foreach"> { diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml index d00a5b9d2..61d89edaa 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-0.4.0.yaml @@ -4167,6 +4167,7 @@ components: VALIDATION: Should NOT return more than 1000 elements. do: anyOf: + - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.EvaluateStep' - $ref: '#/components/schemas/Tasks.ToolCallStep' - $ref: '#/components/schemas/Tasks.PromptStep' @@ -4189,6 +4190,7 @@ components: VALIDATION: Should NOT return more than 1000 elements. do: anyOf: + - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.EvaluateStep' - $ref: '#/components/schemas/Tasks.ToolCallStep' - $ref: '#/components/schemas/Tasks.PromptStepUpdateItem' diff --git a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml index b3f3919a9..36fbc0147 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml @@ -4167,6 +4167,7 @@ components: VALIDATION: Should NOT return more than 1000 elements. do: anyOf: + - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.EvaluateStep' - $ref: '#/components/schemas/Tasks.ToolCallStep' - $ref: '#/components/schemas/Tasks.PromptStep' @@ -4189,6 +4190,7 @@ components: VALIDATION: Should NOT return more than 1000 elements. do: anyOf: + - $ref: '#/components/schemas/Tasks.WaitForInputStep' - $ref: '#/components/schemas/Tasks.EvaluateStep' - $ref: '#/components/schemas/Tasks.ToolCallStep' - $ref: '#/components/schemas/Tasks.PromptStepUpdateItem'