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

Function _backfill_observable_input

src/tool_system/tools/write.py:47–53  ·  view source on GitHub ↗

Expand *file_path* in-place so hook allowlists cannot be bypassed via ``~`` or relative paths.

(tool_input: dict[str, Any])

Source from the content-addressed store, hash-verified

45# ---------------------------------------------------------------------------
46
47def _backfill_observable_input(tool_input: dict[str, Any]) -> None:
48 """Expand *file_path* in-place so hook allowlists cannot be bypassed
49 via ``~`` or relative paths.
50 """
51 fp = tool_input.get("file_path")
52 if isinstance(fp, str):
53 tool_input["file_path"] = _expand_path(fp)
54
55
56# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 2

_expand_pathFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected