collapse • AI Agent SDK

collapse: Project a “RunTerminal“ onto the existing “RunStatus“ vocabulary.

collapse

Function

</div>

This function is defined in the run_outcome module.

Project a `RunTerminal onto the existing RunStatus` vocabulary.

Collapses to exactly one of `success/timeout/cancelled/ failure` for all downstream consumers.

Signature

python
def collapse(outcome: RunTerminal) -> RunStatus

Parameters

ParamField RunTerminal

No description available.

Returns

ResponseField RunStatus

The result of the operation.

Source

View on GitHub

praisonaiagents/run_outcome.py at line 447