Repository navigation
Conversation
4a666e8 to
401d106
Compare
|
Nice! Would be great to get this merged - thank you for working on this! |
401d106 to
df05c64
Compare
|
Thank you for this. Zeron's desktop is now v3 (apps/zgx), which replaces crates/ui. The rest of this PR is still wanted: could you drop the crates/ui changes and rebase on main? |
|
Sure! Thanks for the reponds. Will send it asap |
df05c64 to
a5098aa
Compare
|
Thanks! Rebased on main and dropped the crates/ui changes (icon, picker, settings). One small commit, The rebase needed a force-push. I also trimmed duplicate tests and dropped unrelated rustfmt hunks. The description now has a review guide, the test plan for the rebased head, and zgx screenshots (dark and light). |
a5098aa to
e02520e
Compare
Drive `omp --mode rpc-ui --allow-home` (Oh My Pi >= 18.11.0) directly, reusing the native Pi driver's transport, normalizer, dialogs and MCP bridge. OMP-specific lifecycle: ready handshake with v2 rpc_chunk frames, prompt_result / session_settled turn completion, abort_and_restore_queue interrupts, get_available_commands, title-line session files resumed with --resume, and `omp models --json` discovery. The OMP process and its model probe start through the engine's agent ledger (`process::spawn_agent`), like every other agent. Wired through proto, engine registry, harness updates, client catalog, iOS brand mark and docs (docs/omp.md, crates/harness/src/omp/PROTOCOL.md). Covered by a native fixture suite, an engine resume test and ignored real-omp tests.
OMP's tool names and argument shapes (glob, old_string/new_string, edits without a new text) now apply to OMP alone, and the version parser strips only an omp/ prefix, so Pi and the other agents map as they did on main. A steer OMP refuses no longer gets a Steered receipt, and the model listing keeps draining stderr past its cap.
ef2bc86 to
2380f25
Compare
Summary
Adds Oh My Pi (
omp) as a harness, driven over its native JSONL RPC on top of the native Pi RPC driver (#630). Closes #151. Related: #467, #87, #432 (both ACP-based).PiHarnessatompfails at launch (--no-themesis an unknown flag).crates/harness/src/ompreuses Pi's transport, normalizer, dialogs and MCP bridge, and implements OMP's own lifecycle. The contract is incrates/harness/src/omp/PROTOCOL.md; user docs indocs/omp.md.omp --mode rpc-ui --allow-home(min 18.11.0).prompt_result, oragentInvoked: false), and waits forsession_settledwhen background work is pending.set_steering_mode all(session-scoped in OMP, never persisted). Interrupt usesabort_and_restore_queue(OMP has noclear_queue).get_available_commands/available_commands_update. Models and per-model thinking levels come fromomp models --json(no model calls).--resume <file>; the index lives in<agent>/zeron-sessions.PI_CODING_AGENT_DIR, then~/.omp/agent.pi/rpc.rs: reads thereadyhandshake and reassembles v2rpc_chunkframes (64 MiB cap).glob, edit diffs,auto_compaction_*, UIcancel.pi/mcp.mjs: registers bridge tools withloadMode: "essential". OMP hides discoverable extension tools from the model; Pi ignores the field.executable::parse_versionacceptsomp/18.11.1.HarnessId::Ompin proto, engine registry, harness updates (omp update, npm@oh-my-pi/pi-coding-agent), install (curl -fsSL https://omp.sh/install | sh), skills (.omp/skills,skill:commands), client catalog, zgx mark/update name/provider search terms, iOS brand mark, landing page, READMEs.omp login); Zeron lists no OMP accounts.crates/ui: per review, no desktop v2 changes. One commit keeps threeHarnessId::Ompmatch arms (pickers.rs,settings/harnesses.rs,shell/harness_updates.rs) only so the workspace compiles.HarnessId::Omp("omp") is a new value of a strict serde enum, added the same way as the existing harnesses. An older peer that receives a frame namingomp(for example, a chat hosted with OMP on a newer device) cannot parse that frame. I did not add a capability gate. Tell me if you want one, or a lenientHarnessIdparse. No persisted keys or RPC methods are renamed.zeron-harnessnow uses the existing workspacerusqlite. It opens OMP'sagent.dbread-only to key the model-catalog cache on the credential listing (provider,credential_type, enabled). It never reads token data. Any error falls back to an empty key.omplike the Pi driver does: an owned process tree, an interrupt grace period, then kill. With an explicit agent dir it setsPI_CODING_AGENT_DIRand removesOMP_PROFILE/PI_PROFILEfor the child only (a named profile would override the dir).Review guide
Suggested order:
crates/harness/src/pi/**: behavior-preserving refactor so OMP reuses Pi's spawn, transport, dialogs, normalizer and session-file helpers. Upstream Pi tests are unchanged and pass.crates/harness/src/omp/**+PROTOCOL.md: the OMP dialect.HarnessId::Omparms in proto, engine (registry, accounts, updates + npm owner), client catalog, install, skills.crates/ui: three match arms only.Test plan
Added:
crates/harness/tests/omp_rpc.rs(16 tests) with theharness-omp-fixturepeer, which speaks the OMP dialect:ready, v1/v2 framing with an oversizedget_state,prompt_result,session_settled, steering bursts,abort_and_restore_queue, unknownget_commands/clear_queue, title-line sessions, profile precedence.crates/engine/tests/misc/omp_resume.rs: idle crash then resume through dispatch; a timed-out dialog does not strand the session.crates/harness/tests/omp_live.rs(#[ignore], real omp, isolated home, local mock provider, no model API calls).Ran on the rebased head (macOS arm64):
cargo test --locked -p zeron-harness: all suites pass (521 lib)cargo test --locked -p zeron-harness --features native-fixture --test omp_rpc --test pi_rpc: omp_rpc 16, pi_rpc 18 passcargo test --locked -p zeron-engine --test misc omp_/pi_: 2 + 2 pass;--lib harness_updates: 82 passcargo test --locked -p zeron-engine --lib: 894 pass, 1 fails:uploads::tests::chat_images_read_only_raster_files_inside_the_chat_folder(macOS/var→/private/vartempdir link;uploads.rsis untouched by this PR)cargo test --locked -p zeron-ui --lib -- --test-threads=1: 1998 passcargo test -p zeron-harness --test omp_live -- --ignored: 4 pass against omp 18.18.3;pi_live2 pass against pi 1.3.0cargo check --workspace --all-targetsandcargo check --manifest-path apps/zgx/Cargo.toml --all-targets: no errorscargo clippy --all-targets(harness, engine): no warnings on lines this PR adds.skills.rsalready failsnon_octal_unix_permissionsonmain.Manual, forked app with a real model:
These ran through the forked engine with
zeron mcp(list_models,create_chat,send_message,interrupt_chat,respond_to_input):zeron/whoami); shell toolaskdialog answered in ZeronBrandMarks.swiftonly adds anompcase)Screenshots
Captured from zgx (desktop v3, macOS) on the rebased head, with an isolated engine. Personal data is pixelated.
Model picker, Oh My Pi tab with models from
omp models --jsonand the thinking control:Settings → Providers, the Oh My Pi card:
Chat with Oh My Pi: