Skip to content

feat: add oh-my-pi (omp) as a supported harness - #236

Open
ludwigku wants to merge 1 commit into
TNG:mainfrom
ludwigku:feat/add-omp-agent-harness
Open

feat: add oh-my-pi (omp) as a supported harness#236
ludwigku wants to merge 1 commit into
TNG:mainfrom
ludwigku:feat/add-omp-agent-harness

Conversation

@ludwigku

Copy link
Copy Markdown

Issue: Closes #235

What

  • Add omp (oh-my-pi) as a supported inner harness, alongside pi — omac start/continue/resume/serve omp now work.
  • Ship an omp bridge (.omp/extensions/omac-bridge.ts) that surfaces the skills manifest + sandbox briefing into omp's system prompt.

Why

omp is a coding-focused fork of Pi with a diverged extension surface, a different discovery root and event/handler shapes. The existing pi descriptor and .pi/extensions/omac-bridge.ts don't cover it.

How

  • discovery root .omp (omp does not scan .pi/extensions);
  • cwd read from the handler ctx (omp's events carry no cwd/directory);
  • before_agent_start returns systemPrompt as a string[]; the fetch is bounded (AbortSignal.timeout) to fit omp's 30 s per-handler cap.
  • Targets omp's extension subsystem (not the hooks/ subsystem, whose before_agent_start only allows { message }), preserving the single-system-block invariant via setTurnSystemPromptOverride → agent.setSystemPrompt.
  • Tests: TestOmpHarnessDescriptor + path/session/sandbox derivations (internal/config/harness_test.go); TestOmpBridgeInjectsExactlyOneSystemBlock
    (internal/bridge/bridge_test.go) guarding the single-system-block invariant on the omp bridge.
  • Docs: HARNESSES.md, MULTI_DIR_DESKTOP.md, README.md, INSTALLATION.md (launch/resume/bridge/skills tables).

Verification

  $ go build ./...                                          # OK
  $ gofmt -l internal/config/harness.go                     # (no output — formatted)
  $ go test ./internal/config/... ./internal/bridge/... ./internal/session/...
  ok  github.com/tngtech/oh-my-agentic-coder/internal/config
  ok  github.com/tngtech/oh-my-agentic-coder/internal/bridge
  ok  github.com/tngtech/oh-my-agentic-coder/internal/session
  $ go test ./internal/config/... ./internal/bridge/... -run Omp -v
  --- PASS: TestOmpHarnessDescriptor / TestOmpConfigHome / TestOmpConfigHomeEnvOverride
  --- PASS: TestOmpGlobalSkillsDir / TestOmpGlobalBridgeDir / TestOmpSessionMetadata
  --- PASS: TestOmpWorkdirSkillsDir / TestOmpInScopeSkillsBases / TestOmpSandboxDirs
  --- PASS: TestOmpSystemContextArgsNil / TestOmpBridgeInjectsExactlyOneSystemBlock

omac start omp starts correctly.

  omp (omp.sh) is a coding-focused fork of Pi with a diverged extension
  surface.

  - config: new `omp` harness descriptor mirroring pi — InnerCmd `omp`,
    BridgeDir `.omp/extensions`, SkillsBase `omp`, UserConfigHome
    `.omp/agent`, HomeEnv PI_CODING_AGENT_DIR, SandboxDirs `~/.omp`,
    SessionListPi. Paths derive to ~/.omp/agent/{extensions,skills,sessions}.
  - bridge: adapted .omp/extensions/omac-bridge.ts for omp's surface —
    discovery root `.omp` (not `.pi`), cwd read from the handler ctx
    (events carry none), before_agent_start returns systemPrompt as a
    string[], and the control-plane fetch is bounded to fit omp's 30s
    per-handler cap.
  - test: TestOmpHarnessDescriptor + path/session/sandbox derivations, and
    TestOmpBridgeInjectsExactlyOneSystemBlock guarding the single
    system-block invariant on the omp bridge.
  - docs: list omp in HARNESSES.md, MULTI_DIR_DESKTOP.md, README.md and
    INSTALLATION.md (launch/resume/bridge/skills tables).

Signed-off-by: Ludwig Kunz <ludwig.kunz@tngtech.com>
@ludwigku
ludwigku force-pushed the feat/add-omp-agent-harness branch from 94ba4ae to 4d99cec Compare August 14, 2026 14:38
@mwtng

mwtng commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

It would be cool if you could try to make it work via omac start --sandbox <omp-profile> --inner omp using a custom <omp-profile>. Like that we could add only an example profile to the README and it would add zero maintenance overhead for us.

@ludwigku

Copy link
Copy Markdown
Author

It would be cool if you could try to make it work via omac start --sandbox <omp-profile> --inner omp using a custom <omp-profile>. Like that we could add only an example profile to the README and it would add zero maintenance overhead for us.

I tested this approach and it works. I share the config files I used below. With those omp runs successfully in the omac sandbox. The bridge extension included in this PR is still needed to let omp know about omac for proper integration, but can be included in the local omp installation directly.

omp.json
config.yml

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.

Add oh-my-pi (omp) as a supported harness

2 participants