(p: str)
| 476 | |
| 477 | # -- Base tools (kept minimal, same style as previous sessions) -- |
| 478 | def safe_path(p: str) -> Path: |
| 479 | path = (WORKDIR / p).resolve() |
| 480 | if not path.is_relative_to(WORKDIR): |
| 481 | raise ValueError(f"Path escapes workspace: {p}") |
| 482 | return path |
| 483 | |
| 484 | |
| 485 | def run_bash(command: str) -> str: |