(self, storage, storage_key: str, local_root: Path)
| 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: |
no test coverage detected