MCPcopy
hub / github.com/dataelement/Clawith / _materialize_entry

Method _materialize_entry

backend/app/services/agent_manager.py:56–65  ·  view source on GitHub ↗
(self, storage, storage_key: str, local_root: Path)

Source from the content-addressed store, hash-verified

54 return agent_dir
55
56 async def _materialize_entry(self, storage, storage_key: str, local_root: Path) -> None:
57 rel = Path(storage_key).relative_to(Path(storage_key).parts[0]).as_posix()
58 local_path = local_root / rel
59 if await storage.is_dir(storage_key):
60 local_path.mkdir(parents=True, exist_ok=True)
61 for child in await storage.list_dir(storage_key):
62 await self._materialize_entry(storage, child.key, local_root)
63 return
64 local_path.parent.mkdir(parents=True, exist_ok=True)
65 local_path.write_bytes(await storage.read_bytes(storage_key))
66
67 async def initialize_agent_files(self, db: AsyncSession, agent: Agent,
68 personality: str = "", boundaries: str = "") -> None:

Callers 1

Calls 4

is_dirMethod · 0.45
list_dirMethod · 0.45
write_bytesMethod · 0.45
read_bytesMethod · 0.45

Tested by

no test coverage detected