MCPcopy Create free account
hub / github.com/shareAI-lab/learn-claude-code / safe_path

Function safe_path

agents/s12_worktree_task_isolation.py:478–482  ·  view source on GitHub ↗
(p: str)

Source from the content-addressed store, hash-verified

476
477# -- Base tools (kept minimal, same style as previous sessions) --
478def 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
485def run_bash(command: str) -> str:

Callers 3

run_readFunction · 0.70
run_writeFunction · 0.70
run_editFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected