Execute a tool call block, return output.
(block)
| 281 | |
| 282 | |
| 283 | def execute_tool(block) -> str: |
| 284 | """Execute a tool call block, return output.""" |
| 285 | handler = { |
| 286 | "bash": run_bash, "read_file": run_read, "write_file": run_write, |
| 287 | "create_task": run_create_task, "list_tasks": run_list_tasks, |
| 288 | "get_task": run_get_task, "claim_task": run_claim_task, |
| 289 | "complete_task": run_complete_task, |
| 290 | "schedule_cron": run_schedule_cron, "list_crons": run_list_crons, |
| 291 | "cancel_cron": run_cancel_cron, |
| 292 | "spawn_teammate": run_spawn_teammate, |
| 293 | "send_message": run_send_message, "check_inbox": run_check_inbox, |
| 294 | }.get(block.name) |
| 295 | if handler: |
| 296 | return handler(**block.input) |
| 297 | return f"Unknown tool: {block.name}" |
| 298 | |
| 299 | |
| 300 | def start_background_task(block) -> str: |
no test coverage detected