feat: add omp (Oh My Pi) harness adapter#374
Open
Boxyboxy wants to merge 3 commits into
Open
Conversation
Add omp as a sixth verified harness adapter alongside claude, codex,
opencode, pi, and grok. omp is Pi-derived but distinct: it sets OMPCODE=1
(and CLAUDECODE=1, so detection must check OMPCODE first), runs as
process `omp`, needs --auto-approve for autonomy, uses --thinking for
effort, and exposes an active session_stop hook that forces a
continuation by returning {continue:true} - making omp a direct-blocking
turn-end harness (class with claude/codex).
- detection: fm-harness.sh prefers OMPCODE over CLAUDECODE, plus ancestry
- lock: fm-lock.sh HARNESS_RE recognizes ^omp$
- spawn: launch template (--auto-approve, -e turn-end signal ext),
--model/--thinking flags (omit max), crewmate turn_end extension
- busy detection: the busy-only "esc" hint token in fm-watch.sh and
fm-tmux-lib.sh (omp's Working... uses a unicode ellipsis)
- liveness: backends/tmux.sh classifies an omp pane as alive
- bootstrap: crew-dispatch verified()/effort_ok, secondmate-liveness set
- session-start: load-health check for the auto-discovered guard
- teardown: state/<id>.omp-ext.ts cleanup at both sites
- primary guard: tracked auto-discovered
.omp/extensions/fm-primary-turnend-guard.ts (session_stop)
- supervision: docs/supervision-protocols/omp.md + repair_line arm
- knowledge: harness-adapters skill omp section + expanded new-adapter
wiring checklist so future adapters are fully wired
- tests: new fm-omp-harness.test.sh + fm-lock.test.sh and coverage in
bootstrap, teardown, turnend-guard, supervision, liveness; tests/lib.sh
now clears ambient harness markers so detection is hermetic
Verified live on omp 16.3.12.
# Conflicts: # .agents/skills/harness-adapters/SKILL.md # README.md # bin/fm-spawn.sh # docs/turnend-guard.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
omp(Oh My Pi) as a sixth verified firstmate harness adapter, alongside claude, codex, opencode, pi, and grok. Firstmate can now detect when it is itself running on omp (previously mis-detected as claude), and can spawn / supervise / steer / recover / tear down omp crewmates and secondmates, hold its session lock under omp, and run its own primary turn-end guard + watcher supervision under omp.Why omp is distinct (not just "pi")
omp is Pi-derived but differs in ways that matter to the adapter:
OMPCODE=1andCLAUDECODE=1, so detection must check OMPCODE first or omp mis-detects as claude.omp, so it supports confident secondmate liveness (pi's barenodedoes not).--auto-approve..omp/extensions/*.tsis a native auto-discovery root, so the primary turn-end guard is a tracked, auto-discovered extension (no-ewiring, no generated bridge like pi needs).session_stophook that forces a continuation by returning{continue:true}, making omp a direct-blocking turn-end harness (class with claude/codex) - a third mechanism distinct from the passive follow-up used by pi/grok/opencode.Surface
fm-harness.sh), lock (fm-lock.sh), spawn mechanics + crewmate turn-end signal extension (fm-spawn.sh).fm-watch.sh,fm-tmux-lib.sh), liveness (bin/backends/tmux.sh).fm-bootstrap.sh), session-start guard load-health (fm-session-start.sh), teardown cleanup (fm-teardown.sh)..omp/extensions/fm-primary-turnend-guard.ts(session_stop); classification comment +repair_linearm; newdocs/supervision-protocols/omp.md;docs/turnend-guard.md.harness-adaptersskill omp section + an expanded new-adapter wiring checklist so future adapters are fully wired; verified-set enumerations acrossAGENTS.md,README.md, docs, and the afk skill.tests/fm-omp-harness.test.shandtests/fm-lock.test.sh, plus coverage in bootstrap/teardown/turnend-guard/supervision/liveness;tests/lib.shnow clears ambient harness markers so detection is hermetic across dev machines.How it was built
Spec-first: a frozen spec was authored, then reviewed from four angles in parallel (adapter-integration consistency, version-resilience, correctness/security, test coverage). The review caught real gaps the first draft missed - a
fm-lock.shblocker (an omp primary could not hold its session lock), three separate adapter enumerations infm-bootstrap.sh, and therepair_line()arm - which were folded into the spec before the parallel implementation.Verification
⟦esc⟧),/quitexit + resume line,.omp/extensionsauto-discovery of a committed file, andsession_stopforced continuation (with both a static return and a realistic async handler that awaits a spawned subprocess).shellcheck bin/*.sh bin/backends/*.sh tests/*.shis clean.Interrupt (Escape) is inferred from omp's own
⟦esc⟧hint rather than cleanly observed; a re-confirm item is recorded in the skill's re-verification checklist.