diff --git a/agents-api/agents_api/autogen/Tasks.py b/agents-api/agents_api/autogen/Tasks.py index b9212d8cb..faf045edf 100644 --- a/agents-api/agents_api/autogen/Tasks.py +++ b/agents-api/agents_api/autogen/Tasks.py @@ -236,7 +236,7 @@ class EvaluateStep(BaseModel): """ The label of this step for referencing it from other steps """ - evaluate: dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] + evaluate: dict[str, Any] """ The expression to evaluate """ @@ -837,10 +837,7 @@ class ReturnStep(BaseModel): """ The label of this step for referencing it from other steps """ - return_: Annotated[ - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str], - Field(alias="return"), - ] + return_: Annotated[dict[str, Any], Field(alias="return")] """ The value to return """ @@ -860,7 +857,7 @@ class SetStep(BaseModel): """ The label of this step for referencing it from other steps """ - set: dict[str, str] + set: dict[str, Any] """ The value to set """ @@ -1046,25 +1043,7 @@ class ToolCallStep(BaseModel): """ The tool to run """ - arguments: ( - dict[ - str, - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | list[dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str]] - | str, - ] - | list[ - dict[ - str, - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | list[ - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - ] - | str, - ] - ] - | Literal["_"] - ) = "_" + arguments: dict[str, Any] | Literal["_"] = "_" """ The input parameters for the tool (defaults to last step output) """ @@ -1168,7 +1147,7 @@ class WaitForInputInfo(BaseModel): model_config = ConfigDict( populate_by_name=True, ) - info: dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] + info: dict[str, Any] """ Any additional info or data """ @@ -1213,10 +1192,7 @@ class YieldStep(BaseModel): The subworkflow to run. VALIDATION: Should resolve to a defined subworkflow. """ - arguments: ( - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | Literal["_"] - ) = "_" + arguments: dict[str, Any] | Literal["_"] = "_" """ The input parameters for the subworkflow (defaults to last step output) """ diff --git a/integrations-service/integrations/autogen/Tasks.py b/integrations-service/integrations/autogen/Tasks.py index 8e98caaab..fceded307 100644 --- a/integrations-service/integrations/autogen/Tasks.py +++ b/integrations-service/integrations/autogen/Tasks.py @@ -237,7 +237,7 @@ class EvaluateStep(BaseModel): """ The label of this step for referencing it from other steps """ - evaluate: dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] + evaluate: dict[str, Any] """ The expression to evaluate """ @@ -838,10 +838,7 @@ class ReturnStep(BaseModel): """ The label of this step for referencing it from other steps """ - return_: Annotated[ - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str], - Field(alias="return"), - ] + return_: Annotated[dict[str, Any], Field(alias="return")] """ The value to return """ @@ -861,7 +858,7 @@ class SetStep(BaseModel): """ The label of this step for referencing it from other steps """ - set: dict[str, str] + set: dict[str, Any] """ The value to set """ @@ -1047,25 +1044,7 @@ class ToolCallStep(BaseModel): """ The tool to run """ - arguments: ( - dict[ - str, - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | list[dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str]] - | str, - ] - | list[ - dict[ - str, - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | list[ - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - ] - | str, - ] - ] - | Literal["_"] - ) = "_" + arguments: dict[str, Any] | Literal["_"] = "_" """ The input parameters for the tool (defaults to last step output) """ @@ -1169,7 +1148,7 @@ class WaitForInputInfo(BaseModel): model_config = ConfigDict( populate_by_name=True, ) - info: dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] + info: dict[str, Any] """ Any additional info or data """ @@ -1214,10 +1193,7 @@ class YieldStep(BaseModel): The subworkflow to run. VALIDATION: Should resolve to a defined subworkflow. """ - arguments: ( - dict[str, list[str] | dict[str, str] | list[dict[str, str]] | str] - | Literal["_"] - ) = "_" + arguments: dict[str, Any] | Literal["_"] = "_" """ The input parameters for the subworkflow (defaults to last step output) """ diff --git a/typespec/tasks/steps.tsp b/typespec/tasks/steps.tsp index a7c877401..a251638fb 100644 --- a/typespec/tasks/steps.tsp +++ b/typespec/tasks/steps.tsp @@ -28,14 +28,6 @@ alias TypedExpression = PyExpression; /** A python expression that takes an accumulator `results` and an input item `_` and reduces them. */ alias ReduceExpression> = TypedExpression; -/** A string->string object where the values are python expressions that get evaluated to give a final object. */ -alias ExpressionObject = Record | TypedExpression[] | Record> | Record>[]>; - -alias NestedExpression = Record | ExpressionObject | ExpressionObject[]>; - -/** Nested expression object. */ -alias NestedExpressionObject = NestedExpression | NestedExpression[]; - @discriminator("kind_") model BaseWorkflowStep { /** The kind of step */ @@ -88,7 +80,7 @@ model ToolCallStepDef { tool: validPythonIdentifier; /** The input parameters for the tool (defaults to last step output) */ - arguments: NestedExpressionObject | "_" = "_"; + arguments: Record | "_" = "_"; } model PromptStep extends BaseWorkflowStep<"prompt"> { @@ -134,7 +126,7 @@ model EvaluateStep extends BaseWorkflowStep<"evaluate"> { model EvaluateStepDef { /** The expression to evaluate */ - evaluate: ExpressionObject; + evaluate: Record; } model WaitForInputStep extends BaseWorkflowStep<"wait_for_input"> { @@ -146,7 +138,7 @@ model WaitForInputStep extends BaseWorkflowStep<"wait_for_input"> { model WaitForInputInfo { /** Any additional info or data */ - info: ExpressionObject; + info: Record; } model WaitForInputStepDef { @@ -191,7 +183,7 @@ model SetStep extends BaseWorkflowStep<"set"> { model SetStepDef { /** The value to set */ - set: Record>; + set: Record; } /////////////////////// @@ -317,7 +309,7 @@ model YieldStepDef { workflow: string; /** The input parameters for the subworkflow (defaults to last step output) */ - arguments: ExpressionObject | "_" = "_"; + arguments: Record | "_" = "_"; } model ErrorWorkflowStep extends BaseWorkflowStep<"error"> { @@ -375,5 +367,5 @@ model ReturnStep extends BaseWorkflowStep<"return"> { model ReturnStepDef { /** The value to return */ - `return`: ExpressionObject; + `return`: Record; } 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 5c9a57c4c..0b7971de4 100644 --- a/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml +++ b/typespec/tsp-output/@typespec/openapi3/openapi-1.0.0.yaml @@ -4629,20 +4629,7 @@ components: readOnly: true evaluate: type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} description: The expression to evaluate allOf: - type: object @@ -5608,20 +5595,7 @@ components: readOnly: true return: type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} description: The value to return allOf: - type: object @@ -5654,8 +5628,7 @@ components: readOnly: true set: type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} description: The value to set allOf: - type: object @@ -6039,79 +6012,7 @@ components: arguments: anyOf: - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} - type: string enum: - _ @@ -6354,20 +6255,7 @@ components: properties: info: type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} description: Any additional info or data Tasks.WaitForInputStep: type: object @@ -6423,20 +6311,7 @@ components: arguments: anyOf: - type: object - additionalProperties: - anyOf: - - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - $ref: '#/components/schemas/Common.PyExpression' - - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' - - type: array - items: - type: object - additionalProperties: - $ref: '#/components/schemas/Common.PyExpression' + additionalProperties: {} - type: string enum: - _