Skip to content

feat(daemon): add oh-my-pi (omp) episode reader - #91

Merged
MAnders333 merged 1 commit into
mainfrom
feat/oh-my-pi-reader
Sep 30, 2026
Merged

MAnders333 merged 1 commit into
mainfrom
feat/oh-my-pi-reader

Conversation

@MAnders333

@MAnders333 MAnders333 commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

What

New episode source: oh-my-pi — the omp harness (package @oh-my-pi/pi-coding-agent).

oh-my-pi is a pi-family fork and writes the same session JSONL (v3) — verified against real sessions on this machine ({"type":"session","version":3,id,timestamp,cwd} plus a {"type":"title",…} preamble) — so the parser is shared, not copied:

  • PiEpisodeReader gains a source constructor parameter (default "pi" — zero behavior change for the pi source; episodes were already stamped from this.source)
  • OhMyPiEpisodeReader extends PiEpisodeReader, passing the distinct oh-my-pi source id (idempotency keys and source cursors stay separate from pi)

Layout

oh-my-pi keeps a shared layer plus per-mode layers (profiles were added after pi's flat layout):

<root>/agent/sessions/<projectDir>/<timestamp>_<uuid>.jsonl
<root>/profiles/<mode>/agent/sessions/<projectDir>/<timestamp>_<uuid>.jsonl

resolveOhMyPiSessionsDirs() scans both shapes under OMP_SESSIONS_ROOT (default ~/.omp).

Wiring

  • OMP_ENABLED=false hard-disable; missing dirs → soft-skip log (same as pi — the harness may simply not be installed)
  • [sources] oh-my-pi: <dirs> on startup
  • README: oh-my-pi rows in both source tables plus pi's previously missing env-var rows

Tests

tests/episodes-oh-my-pi.test.ts — the new surfaces only (parsing itself is pi's shared suite):

  • resolver: shared layer + every profiles/<mode>/agent layer, ignores non-sessions dirs, [] when absent
  • source === "oh-my-pi" (idempotency identity)
  • end-to-end episode from a real-shaped file: title preamble tolerated, content/project/title-fallback assertions, minSessionMessages (4) respected

5/5 in file · full suite 605 pass / 48 skip / 0 fail · tsc --noEmit ✓ · biome clean on all changed files (repo-wide biome baseline remains red on main — pre-existing debt at untouched lines; --no-verify noted in the commit, same as #89).

Effect on a machine without oh-my-pi

[sources] oh-my-pi: no sessions directories found under ~/.omp — skipping. — one log line, no warning, no behavior change.

oh-my-pi (the omp harness, package @oh-my-pi/pi-coding-agent) is a pi-family
fork and writes the same session JSONL (v3), so the parser is shared:
PiEpisodeReader gains a source-id parameter (default "pi" - no behavior
change) and OhMyPiEpisodeReader supplies oh-my-pi's layout and the distinct
"oh-my-pi" idempotency source.

Session dirs under OMP_SESSIONS_ROOT (default ~/.omp):
  <root>/agent/sessions/<projectDir>/*.jsonl
  <root>/profiles/<mode>/agent/sessions/<projectDir>/*.jsonl

Registered with the same soft-skip as pi (log, no warn, when absent) and
OMP_ENABLED=false hard-disable. README documents both sources' env vars
(pi's rows were missing).

Committed with --no-verify: repo-wide biome baseline is red on main
(pre-existing debt); all changed files are format-clean.
@MAnders333
MAnders333 merged commit 0d767d0 into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant