(reason: BindingFailureReason, action?: string)
| 918 | | 'capture_failed'; |
| 919 | |
| 920 | function bindingFailure(reason: BindingFailureReason, action?: string): ComputerToolResult { |
| 921 | // `retired_action` is an internal distinction, not a twenty-ninth word for |
| 922 | // the model: it is the same fact as `duplicate_action` with a different |
| 923 | // recovery, and the recovery is the sentence, not the code. |
| 924 | const error: ComputerUseErrorCode = isComputerUseErrorCode(reason) |
| 925 | ? reason |
| 926 | : reason === 'retired_action' |
| 927 | ? 'duplicate_action' |
| 928 | : 'stale_frame'; |
| 929 | const tool = action ? `maka_computer.${action}` : 'maka_computer'; |
| 930 | return { |
| 931 | text: `${tool} failed: ${error} — ${BINDING_FAILURE_RECOVERY[reason]}`, |
| 932 | error, |
| 933 | }; |
| 934 | } |
| 935 | |
| 936 | function preservePartialDelivery(result: CuRunResult): CuRunResult { |
| 937 | if ( |
no test coverage detected