Project back to the dict-of-dicts shape that the pre-Chunk-B readers used. Kept for back-compat during the migration cycle so the deprecated ``ToolContext.background_bash_tasks`` view exposes the historical key set unchanged.
(self)
| 67 | return "completed" if rc == 0 else "failed" |
| 68 | |
| 69 | def to_legacy_dict(self) -> dict[str, Any]: |
| 70 | """Project back to the dict-of-dicts shape that the pre-Chunk-B |
| 71 | readers used. Kept for back-compat during the migration cycle so |
| 72 | the deprecated ``ToolContext.background_bash_tasks`` view exposes |
| 73 | the historical key set unchanged. |
| 74 | """ |
| 75 | return { |
| 76 | "task_id": self.id, |
| 77 | "command": self.command, |
| 78 | "description": self.description, |
| 79 | "cwd": self.cwd, |
| 80 | "started_at": self.start_time, |
| 81 | "output_path": self.output_path, |
| 82 | "pid": self.pid, |
| 83 | "_proc": self.proc, |
| 84 | "_handle": self.handle, |
| 85 | "exit_code": self.exit_code, |
| 86 | "finished_at": self.finished_at, |
| 87 | } |
| 88 | |
| 89 | |
| 90 | def is_local_shell_task(state: Any) -> bool: |
no outgoing calls
no test coverage detected