perago.completed_result#

perago.completed_result(output)[源代码]#

Build a completed worker attempt result.

The helper keeps success result construction consistent across workspace and workspace-free attempts after their output payload has already been validated by the execution layer.

Parameters:
outputdict of str to Any

Validated task output payload. Workspace tasks include both workspace and result keys; workspace-free tasks include only result.

Returns:
RuntimeTaskResult

Result with status "COMPLETED" and the supplied output.

参数:

output (dict[str, Any])

返回类型:

RuntimeTaskResult

参见

RuntimeTaskResult

Validated result model.

build_workspace_task_output

Build a completed workspace task output.

build_workspace_free_task_output

Build a completed workspace-free task output.

Examples

>>> completed_result({"result": {"valid": True}}).status
'COMPLETED'