Storage
storage
¶
Filesystem storage queries for agent-owned directories.
Every task leaves a footprint on the host: a workspace, agent config files, and shared config mounts that survive across containers. This module measures those footprints so the orchestrator can report them.
TaskStorageInfo(task_id, workspace_bytes, agent_config_bytes)
dataclass
¶
Disk usage snapshot for a single task's host directories.
task_id
instance-attribute
¶
workspace_bytes
instance-attribute
¶
agent_config_bytes
instance-attribute
¶
total_bytes
property
¶
Combined footprint of workspace and agent config.
measure(task_dir)
classmethod
¶
Measure a single task's disk footprint.
Expects the standard layout: <task_dir>/workspace-dangerous/
for the agent-writable code, <task_dir>/agent-config/ for
per-task configuration.
Source code in src/terok_executor/storage.py
measure_all(tasks_root)
classmethod
¶
Measure every task under tasks_root, sorted by task ID.
Source code in src/terok_executor/storage.py
SharedMountStorageInfo(name, label, bytes)
dataclass
¶
Disk usage for one shared config mount directory.
name
instance-attribute
¶
label
instance-attribute
¶
bytes
instance-attribute
¶
measure_all(mounts_base=None)
classmethod
¶
Measure each shared config mount directory.
Labels come from the agent roster when available, falling back to a title-cased version of the directory name.