Skip to content

ompbox: add Oh My Pi as a new harness - #82

Merged
guimou merged 3 commits into
mainfrom
feat/oh-my-pi
Sep 8, 2026
Merged

guimou merged 3 commits into
mainfrom
feat/oh-my-pi

Conversation

@guimou

@guimou guimou commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Oh My Pi (omp, https://github.com/can1357/oh-my-pi) as the fifth harness: launcher ompbox, image quay.io/guimou/ompbox, pin file OMP_VERSION (18.1.14), overlay firewall-domains-omp.txt, flag --omp-version.

Install

Prebuilt, self-contained release binary (omp-linux-x64 / omp-linux-arm64, glibc only) downloaded from GitHub Releases and verified against the release SHA256SUMS.txt. No npm/bun. Native addons (~340 MB) are extracted at build time; the startup update check is disabled through /etc/codebox/omp-config.yml, loaded via PI_CONFIG_FILES.

State layout (why it differs from the other launchers)

Verified by running omp 18.1.14 locally:

  • ~/.omp/agent/agent.db is a WAL-mode SQLite file holding OAuth tokens, /login API keys, settings, usage stats and the memory store keyed by cwd. Inside the container cwd is always /workspace, so the DB cannot be shared across projects, and WAL sidecars rule out a single-file bind mount. The whole agent dir is per project: ~/.omp/ompbox-projects/<project>/agent.
  • config.yml is saved via write-then-rename, so it is copied into the per-project dir at launch and refreshed when the host file is newer (cxbox config.toml pattern).
  • Shared config dirs (commands rules prompts instructions skills hooks tools extensions) are bind-mounted read-write from ~/.omp/agent; shared prompt/config files (SYSTEM.md APPEND_SYSTEM.md RULES.md TITLE_SYSTEM.md AGENTS.md models.yml mcp.json keybindings.json) read-only when present on the host.
  • --with-credentials mounts ~/.omp/.env and ~/.omp/agent/.env read-only (dotenv API keys). OAuth logins done inside the container stay per project.

Engine change

New optional ENV_PASSTHROUGH_EXCLUDE_REGEX in lib/box-common.sh. ompbox uses it to forward OMP_*/PI_* while keeping out the state-relocating vars (PI_CODING_AGENT_DIR, PI_CONFIG_DIR, PI_CONFIG_FILES, PI_PROFILE, OMP_PROFILE, PI_INSTALL_DIR). cxbox now uses it for CODEX_HOME, which its comment already claimed was not forwarded but the ^(CODEX_|…) regex did forward.

Also

CI workflows (release, build-and-push, tests, build-pod), k8s/Containerfile, k8s/gen-egress-firewall.sh, golden tests (4 new scenarios), .gitignore (.omp/), docs.

Test plan

  • tests/render-test.sh: 28/28 ok, no existing golden changed
  • shellcheck clean (CI file list)
  • Dockerfile omp arm logic run standalone: checksum OK, omp --versionomp/18.1.14
  • CI image build for omp (no podman in the dev environment)
  • First real run: ./ompbox --local after build, /login, resume, --with-credentials

guimou and others added 2 commits September 8, 2026 15:15
Oh My Pi (omp, https://github.com/can1357/oh-my-pi) is installed from the
checksum-verified prebuilt GitHub release binary (omp-linux-{x64,arm64}), with
its native addons pre-extracted at build time and the startup update check
disabled through a baked config overlay loaded via PI_CONFIG_FILES.

State layout: omp keeps OAuth tokens, API keys, settings, usage and its
memory store in one WAL-mode SQLite file (agent.db) keyed by cwd, which is
always /workspace inside the container. The whole agent dir is therefore
per project (~/.omp/ompbox-projects/<project>/agent); config.yml is copied
in at launch (omp saves it via rename, like Codex's config.toml); the shared
config dirs and prompt files from ~/.omp/agent are bind-mounted on top.
--with-credentials mounts the dotenv files ~/.omp/.env and ~/.omp/agent/.env
read-only.

Engine: add ENV_PASSTHROUGH_EXCLUDE_REGEX so a wrapper can keep specific
vars matching its prefix list from being forwarded (ompbox: the PI_*/OMP_*
vars that relocate omp state; cxbox: CODEX_HOME, which its comment already
claimed was not forwarded).

Also: CI workflows, pod image, egress firewall generator, golden tests and
docs updated for the fifth harness.

---
Signed-off-by: Guillaume Moutier <guimou@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
… run

The scheduled run (or a dispatch with bump_versions) now starts with a bump
job: it resolves the latest upstream version of every harness (npm dist-tag
latest for Claude Code, OpenCode, Qwen Code and Codex; latest GitHub release
for Oh My Pi), only ever moves a pin forward, commits the changed *_VERSION
files to main and hands that commit to detect/build. Bumped harnesses are
released as plain {box}-v{version}, the others as -N rebuilds, all in the
same run (GITHUB_TOKEN pushes do not trigger workflows).

build-and-push.yml gains an optional ref input so the checkout, the image
sha tag (metadata-action context: git) and the release target all point at
the bump commit. A concurrency group keeps a manual dispatch from overlapping
the cron run.

---
Signed-off-by: Guillaume Moutier <guimou@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
@guimou

guimou commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Second commit: the weekly release run now bumps *_VERSION to the latest upstream releases before building (direct commit to main, same run). Requires a one-time repo change before the next Monday run: add the GitHub Actions app as a bypass actor on the PR for main ruleset, otherwise the push is rejected and the run fails at the bump job. Details in docs/development.md → Release workflow.

On a personal repository the 'PR for main' ruleset offers no bypass for the
GitHub Actions app, only for deploy keys. The bump job therefore checks out
main with the BUMP_DEPLOY_KEY secret and pushes over SSH; the bump commit
carries [skip ci] so that push (which, unlike a GITHUB_TOKEN push, would
trigger workflows) does not start a second release run. A missing secret
fails the bump job with an explicit message. Setup documented in
docs/development.md.

---
Signed-off-by: Guillaume Moutier <guimou@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
@guimou

guimou commented Sep 8, 2026

Copy link
Copy Markdown
Owner Author

Update: on a personal repo the Actions app cannot be a ruleset bypass actor, so the bump job now pushes with a write-enabled deploy key (the "Deploy keys" entry in your bypass list) and marks the bump commit [skip ci]. One-time setup before the next Monday run:

ssh-keygen -t ed25519 -N '' -C 'ccbox release bump' -f bump-key
gh repo deploy-key add bump-key.pub --title 'release bump' --allow-write
gh secret set BUMP_DEPLOY_KEY < bump-key
rm bump-key bump-key.pub

then Settings → Rules → Rulesets → PR for main → Add bypass → tick Deploy keys. Without the secret the bump job fails with an explicit error (nothing gets built). Details in docs/development.md.

@guimou
guimou merged commit ab1515d into main Sep 8, 2026
@guimou
guimou deleted the feat/oh-my-pi branch September 9, 2026 12:40
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