MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / to_legacy_dict

Method to_legacy_dict

src/tasks/local_shell.py:69–87  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
90def is_local_shell_task(state: Any) -> bool:

Callers 1

spawn_background_bashFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected