Skip to main content

Module run

Module run 

Source
Expand description

omne run <pipe> [--input k=v ...] — end-to-end pipe runner.

Stitches Units 4–11 together: pipe load + input validation, ULID allocation, worktree creation, per-run event log, DAG scheduling, node dispatch, terminal pipe.completed / pipe.aborted.

Transactional state lifecycle (plan HLD):

  1. Path-length + claude --version preflight — errors leave no state.
  2. Load + validate pipe against volume.
  3. Parse --input against pipe inputs: schema — errors leave no state.
  4. Allocate ULID → print run_id=<value> as first synchronous stdout line.
  5. Create detached-HEAD worktree.
  6. Open events.jsonl. On failure, teardown the worktree so every live worktree has a live run dir.
  7. Emit pipe.started + dispatch loop + emit pipe.completed or pipe.aborted.

Worktree is not auto-removed on successful runs in v1 — users reclaim via git worktree remove .omne/wt/<run_id>. See plan “Deferred to Separate Tasks: omne cleanup”.

Structs§

Args
Arguments for omne run.

Functions§

run
run_at_root
Test seam: run against an arbitrary starting directory with an injectable stdout sink and optional claude binary override.