Skip to content

feat: add oh-my-pi (omp) as a supported agent#2166

Open
oldschoola wants to merge 1 commit into
rtk-ai:developfrom
oldschoola:feat/oh-my-pi-agent
Open

feat: add oh-my-pi (omp) as a supported agent#2166
oldschoola wants to merge 1 commit into
rtk-ai:developfrom
oldschoola:feat/oh-my-pi-agent

Conversation

@oldschoola
Copy link
Copy Markdown

Summary

Adds oh-my-pi (@oh-my-pi/pi-coding-agent, binary omp) as a new agent integration, parallel to the existing pi (@earendil-works/pi-coding-agent) hook. They are different projects that happen to share a name and an ExtensionAPI shape; the existing pi integration is left fully intact.

  • New TypeScript extension at hooks/omp/rtk.ts — delegates to rtk rewrite on the tool_call event via the omp ExtensionAPI, fail-open, version-guarded rtk >= 0.40.0.
  • New AgentTarget::OhMyPi clap variant: rtk init --agent omp (alias --agent oh-my-pi). Install paths: ~/.omp/agent/extensions/rtk.ts global (honors the same PI_CODING_AGENT_DIR env that oh-my-pi itself reads) or .omp/extensions/rtk.ts project-local.
  • run_omp_mode / uninstall_omp wired through run_cli and uninstall_init_dispatch alongside Pi and Hermes; doc updates in top-level README.md and hooks/README.md.

Test plan

  • cargo build clean
  • cargo test --bin rtk — 2003 passed, 0 failed (1997 baseline + 12 new mirrored install/uninstall/dry-run tests for both global and local scope + 3 new CLI parse tests for --agent omp, the oh-my-pi alias, and the uninstall form)
  • Manual smoke: rtk init --agent omp --dry-run and rtk init --agent oh-my-pi --dry-run both emit the expected "would create .omp/extensions/rtk.ts" plan; rtk init --help lists the new variant
  • cargo fmt --all && cargo clippy --all-targets — not run on this Windows workstation; happy to run if CI flags anything

Notes

  • pi (earendil) integration is completely untouched — no shared code paths were modified, only new symbols added.
  • omp reuses the existing PI_CODING_AGENT_DIR env var because the oh-my-pi runtime itself reads that same variable (different default base: .omp/agent vs .pi/agent). Documented in hooks/omp/README.md.
  • hooks/omp/rtk.ts mirrors hooks/pi/rtk.ts line-for-line aside from the import source and the minimum-version constant — keeps future cross-maintenance trivial.

Adds a parallel extension-based integration for oh-my-pi
(@oh-my-pi/pi-coding-agent, binary 'omp'), alongside the
existing @earendil-works/pi-coding-agent ('pi') integration.

- New hooks/omp/rtk.ts TypeScript extension delegating to
  'rtk rewrite' via the omp ExtensionAPI (tool_call event,
  isToolCallEventType('bash', event), pi.exec, fail-open)
- AgentTarget::OhMyPi clap variant: --agent omp (alias oh-my-pi)
- Install paths: ~/.omp/agent/extensions/rtk.ts (global,
  overridable via PI_CODING_AGENT_DIR) or .omp/extensions/rtk.ts
  (project-local)
- run_omp_mode / uninstall_omp wired through run_cli and
  uninstall_init_dispatch alongside Pi and Hermes
- 12 mirrored unit tests covering install / uninstall / dry-run
  for both global and local scope, plus 3 CLI parse tests
- README + hooks/README list oh-my-pi as a 14th/10th agent

Existing @earendil-works pi integration left fully intact.
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


oh-my-pi seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants