Skip to main content

Module volume

Module volume 

Source
Expand description

Volume root detection + v2 path helpers.

find_omne_root walks up from a starting directory looking for an ancestor that contains a .omne/ subdirectory. upgrade and validate use this so they work from any subdirectory of a volume; init deliberately does not walk up (R13 — init creates in the current directory only).

The remaining helpers derive v2 volume paths from a root: static lib/{cfg,docs} content, runtime var/runs/<run_id>/{events.jsonl, nodes/*}, and per-run worktrees under wt/<run_id>. Centralizing the layout here keeps the scaffold, runner, validator, and event-log modules from drifting on directory names.

The Python module’s is_mounted() helper is not ported per R12: the submodule/mount model was removed when releases-based distribution replaced the submodule architecture.

Functions§

cfg_dir
.omne/lib/cfg/ — per-volume static configuration.
core_dir
.omne/core/ — kernel tarball extraction target.
dist_dir
.omne/dist/ — distro tarball extraction target (v1-renamed from image/). Distro skill discovery and docs-baseline seeding both key on this path.
docs_baseline
.omne/lib/docs/index.md — the docs baseline entry point.
docs_dir
.omne/lib/docs/ — knowledge-base root.
events_log_path
.omne/var/runs/<run_id>/events.jsonl — the per-run event log.
find_omne_root
Walk up from start looking for an ancestor that contains a .omne/ subdirectory. Returns the first match, or None when the walk reaches the filesystem root without finding one.
node_capture_wire_path
Forward-slash, volume-root-relative wire path for a node’s capture file. Always .omne/var/runs/<run_id>/nodes/<node_id>.out with forward slashes regardless of host OS — written into the output_path field of node.completed events so Windows and Unix readers see the same wire shape.
nodes_dir
.omne/var/runs/<run_id>/nodes/ — per-node capture directory.
omne_dir
.omne/ root under the volume.
run_dir
.omne/var/runs/<run_id>/ — a specific run’s state directory.
runs_dir
.omne/var/runs/ — per-run directories live under this.
ulid_lock_path
.omne/var/.ulid-last — advisory-locked file holding the last allocated ULID for cross-process monotonicity.
var_dir
.omne/var/ — runtime state root. Contains runs/ and the monotonic-ULID lock file.
wt_dir
.omne/wt/ — worktree root.
wt_for
.omne/wt/<run_id>/ — the detached worktree for a specific run.