The one and only agent harness for complex codebases. Project memory, planning, execution, and verified completion inside Codex.
JavaScript aiai-agentsclaudeclaude-codeclicodexdeveloper-toolslazylazycodexoh-my-openagentomoopenaiorchestrationtypescript
chore: sync Codex marketplace v4.16.1
github-actions[bot]58d34daae803
diff --git a/plugins/omo/.codex-plugin/plugin.json b/plugins/omo/.codex-plugin/plugin.jsonindex b0f668f6..d5e58e96 100644--- a/plugins/omo/.codex-plugin/plugin.json+++ b/plugins/omo/.codex-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "omo",- "version": "4.16.0",+ "version": "4.16.1","description": "One Codex plugin namespace for Yeongyu's local Codex components.","author": {"name": "Yeongyu Kim",diff --git a/plugins/omo/components/bootstrap/hooks/hooks.json b/plugins/omo/components/bootstrap/hooks/hooks.jsonindex bb0527c8..f75e298d 100644--- a/plugins/omo/components/bootstrap/hooks/hooks.json+++ b/plugins/omo/components/bootstrap/hooks/hooks.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 4.16.1) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/components/bootstrap/package.json b/plugins/omo/components/bootstrap/package.jsonindex f274e30c..f741570d 100644--- a/plugins/omo/components/bootstrap/package.json+++ b/plugins/omo/components/bootstrap/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-bootstrap",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.","type": "module","private": true,diff --git a/plugins/omo/components/codegraph/package.json b/plugins/omo/components/codegraph/package.jsonindex 7cecfe25..75c883c7 100644--- a/plugins/omo/components/codegraph/package.json+++ b/plugins/omo/components/codegraph/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-codegraph",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin MCP wrapper for CodeGraph.","type": "module","private": true,diff --git a/plugins/omo/components/comment-checker/hooks/hooks.json b/plugins/omo/components/comment-checker/hooks/hooks.jsonindex c10bc23c..a124b4e9 100644--- a/plugins/omo/components/comment-checker/hooks/hooks.json+++ b/plugins/omo/components/comment-checker/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO) Checking Comments"+ "statusMessage": "(OmO 4.16.1) Checking Comments"}]}diff --git a/plugins/omo/components/comment-checker/package.json b/plugins/omo/components/comment-checker/package.jsonindex 8f699c94..27f5ca11 100644--- a/plugins/omo/components/comment-checker/package.json+++ b/plugins/omo/components/comment-checker/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-comment-checker",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin that runs comment-checker after edit-like PostToolUse hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/git-bash/hooks/hooks.json b/plugins/omo/components/git-bash/hooks/hooks.jsonindex 198a02fa..42603d5d 100644--- a/plugins/omo/components/git-bash/hooks/hooks.json+++ b/plugins/omo/components/git-bash/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO) Recommending Git Bash MCP"+ "statusMessage": "(OmO 4.16.1) Recommending Git Bash MCP"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO) Resetting Git Bash MCP Reminder"+ "statusMessage": "(OmO 4.16.1) Resetting Git Bash MCP Reminder"}]}diff --git a/plugins/omo/components/git-bash/package.json b/plugins/omo/components/git-bash/package.jsonindex d5483aaa..7e23a22a 100644--- a/plugins/omo/components/git-bash/package.json+++ b/plugins/omo/components/git-bash/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex hook component that reminds Windows sessions to prefer the OMO git_bash MCP.","type": "module","private": true,diff --git a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.jsonindex 85fe00a5..56857859 100644--- a/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json+++ b/plugins/omo/components/lazycodex-executor-verify/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO) Verifying LazyCodex Executor Evidence"+ "statusMessage": "(OmO 4.16.1) Verifying LazyCodex Executor Evidence"}]}diff --git a/plugins/omo/components/lazycodex-executor-verify/package.json b/plugins/omo/components/lazycodex-executor-verify/package.jsonindex 29a27af0..5467c3b8 100644--- a/plugins/omo/components/lazycodex-executor-verify/package.json+++ b/plugins/omo/components/lazycodex-executor-verify/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/lsp/hooks/hooks.json b/plugins/omo/components/lsp/hooks/hooks.jsonindex e67298d5..a09e8447 100644--- a/plugins/omo/components/lsp/hooks/hooks.json+++ b/plugins/omo/components/lsp/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO) Checking LSP Diagnostics"+ "statusMessage": "(OmO 4.16.1) Checking LSP Diagnostics"}]}@@ -21,7 +21,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO) Resetting LSP Diagnostics Cache"+ "statusMessage": "(OmO 4.16.1) Resetting LSP Diagnostics Cache"}]}diff --git a/plugins/omo/components/lsp/package.json b/plugins/omo/components/lsp/package.jsonindex 2657ac02..9c7a2e9f 100644--- a/plugins/omo/components/lsp/package.json+++ b/plugins/omo/components/lsp/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-lsp",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin that exposes Language Server Protocol tools and post-edit diagnostics.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/rules/hooks/hooks.json b/plugins/omo/components/rules/hooks/hooks.jsonindex 594743f1..29b0e61e 100644--- a/plugins/omo/components/rules/hooks/hooks.json+++ b/plugins/omo/components/rules/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO) Loading Project Rules"+ "statusMessage": "(OmO 4.16.1) Loading Project Rules"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO) Loading Project Rules"+ "statusMessage": "(OmO 4.16.1) Loading Project Rules"}]}@@ -32,7 +32,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO) Matching Project Rules"+ "statusMessage": "(OmO 4.16.1) Matching Project Rules"}]}@@ -45,7 +45,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO) Resetting Project Rule Cache"+ "statusMessage": "(OmO 4.16.1) Resetting Project Rule Cache"}]}diff --git a/plugins/omo/components/rules/package.json b/plugins/omo/components/rules/package.jsonindex 8a385ad7..196c4416 100644--- a/plugins/omo/components/rules/package.json+++ b/plugins/omo/components/rules/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-rules",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin that injects project rule files into model context through lifecycle hooks.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/start-work-continuation/directive.md b/plugins/omo/components/start-work-continuation/directive.mdindex d7ed29e7..f4d7b8f6 100644--- a/plugins/omo/components/start-work-continuation/directive.md+++ b/plugins/omo/components/start-work-continuation/directive.md@@ -20,7 +20,7 @@ You are mid-flight on a Prometheus work plan; this turn is an automatic continua3. Follow the `start-work` skill in full. The skill is already loaded from your earlier turn — re-read its file at `packages/omo-codex/plugin/skills/start-work/SKILL.md` if you have lost context.4. Apply the checkbox's tier from its ledger entry, or classify it now per the start-work skill: LIGHT (default — a narrow change inside existing layers) needs one real-surface proof of the deliverable, with auxiliary surfaces first-class for CLI- or data-shaped work, and only trigger-mapped adversarial classes; HEAVY (new module/abstraction, auth/security, external integration, schema/migration, concurrency, cross-domain refactor, care signals) takes the full per-criterion regime. When unsure, take HEAVY; never downgrade.5. Decompose the checkbox into atomic sub-tasks. Dispatch them in PARALLEL via `multi_agent_v1.spawn_agent` calls in this same response unless a sub-task has a NAMED blocking dependency (input from another sub-task or shared file). Use `fork_context: false` unless full history is truly required. Put role and specialty instructions inside `message`.-6. Every sub-task message MUST be self-contained, executable, not a context handoff: start with `TASK: <imperative assignment>`, then name `DELIVERABLE`, `SCOPE`, and `VERIFY`. It must include all 7 sections and a Manual-QA channel with exact invocation (`curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`) and PASS/FAIL observable, plus ultraqa classes, artifact, and cleanup receipt. Channels: HTTP (`curl -i`); tmux (`send-keys` + `capture-pane`); browser (Codex: `browser:control-in-app-browser` first unless auth/persistent profile needed; else Chrome/agent-browser); computer use.+6. Every sub-task message MUST be self-contained, executable, not a context handoff: start with `TASK: <imperative assignment>`, then name `DELIVERABLE`, `SCOPE`, and `VERIFY`. It must include all 7 sections and a Manual-QA channel with exact invocation (`curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`) and PASS/FAIL observable, plus ultraqa classes, artifact, and cleanup receipt. Channels: HTTP (`curl -i`); terminal/TUI (`send-keys` for boot smoke; xterm.js web terminal for color/visual evidence, never `tmux capture-pane`); browser (Codex: `browser:control-in-app-browser` first unless auth/persistent profile needed; else Chrome/agent-browser); computer use.7. Treat every worker DoneClaim as untrusted input. Run independent AdversarialVerify before any checkbox can become FullyDone; `confirmed` is the only pass verdict, while `false-positive`, `needs-fix`, and `needs-human-review` loop back to the executor with exact feedback.8. Use `multi_agent_v1.wait_agent` for mailbox signals, not proof of completion — a timeout only means no new mailbox update arrived; a running child is alive. For sub-tasks likely to exceed one wait cycle, require `WORKING: <task> - <current phase>` before long passes and `BLOCKED: <reason>` only when progress stops. Send `TASK STILL ACTIVE: return <deliverable> or BLOCKED: <reason>` only when the child is completed without the deliverable, ack-only, or no longer running. If that followup is still silent or ack-only, record inconclusive, do not count it as pass/review approval, close if safe, and respawn a smaller `fork_context: false` task with the missing deliverable.9. After verification of ALL sub-tasks under this checkbox: `apply_patch` the plan to change `- [ ]` → `- [x]`, re-read the plan to confirm the count decreased, append a `task-completed` line to the ledger, then continue.@@ -30,7 +30,7 @@ You are mid-flight on a Prometheus work plan; this turn is an automatic continua- No production code before a failing-first proof exists: a unit test at a seam, otherwise the sub-task's Manual-QA scenario captured failing. A test that mirrors its implementation (mock-call assertions, pinned constants) is not evidence. When the change touches existing behavior, PIN it first: a baseline characterization test that passes on the unchanged code, with exact inputs, exact observable, and exact assertion. PIN → RED → GREEN → SURFACE.- No `--dry-run` as evidence. No "should work". No "tests pass" as completion proof.-- TUI visual evidence MUST use the web terminal pattern when a task drives an OpenCode/Codex/terminal UI: capture the pane or run `node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>` (or `--command` when tmux is available), then cite `terminal.png`, `terminal.txt`, and `metadata.json`.+- TUI visual evidence MUST render through the real xterm.js web terminal, never `tmux capture-pane`: run `node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw stream), then cite `terminal.png`, `terminal.txt`, and `metadata.json`.- No `as any` / `@ts-ignore` / `@ts-expect-error`. No deleting failing tests.- Probe every ultraqa adversarial class whose trigger fact holds (malformed input, prompt injection, cancel/resume, stale state, dirty worktree, hung or long commands, flaky tests, misleading success output, repeated interruptions — trigger map in the start-work skill) and capture the observable for each. A clean happy-path artifact alone is NOT a PASS when an applicable class went unprobed; record skipped classes with a one-line not-applicable reason.- Cleanup receipt is mandatory. Register each QA teardown (scripts, tmux, browser contexts, PIDs, ports, containers, temp dirs) as a todo when it spawns, then execute it. Leftover QA state = BLOCKED, not PASS.diff --git a/plugins/omo/components/start-work-continuation/hooks/hooks.json b/plugins/omo/components/start-work-continuation/hooks/hooks.jsonindex e9648230..56acc733 100644--- a/plugins/omo/components/start-work-continuation/hooks/hooks.json+++ b/plugins/omo/components/start-work-continuation/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO) Checking Start-Work Continuation"+ "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation"}]}@@ -19,7 +19,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO) Checking Start-Work Continuation"+ "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation"}]}diff --git a/plugins/omo/components/start-work-continuation/package.json b/plugins/omo/components/start-work-continuation/package.jsonindex 36e4b09e..0f90cfc2 100644--- a/plugins/omo/components/start-work-continuation/package.json+++ b/plugins/omo/components/start-work-continuation/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-start-work-continuation",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex Stop hook continuation injector for omo-codex start-work plans.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/teammode/hooks/hooks.json b/plugins/omo/components/teammode/hooks/hooks.jsonindex df3f1e02..4fdaea49 100644--- a/plugins/omo/components/teammode/hooks/hooks.json+++ b/plugins/omo/components/teammode/hooks/hooks.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO) Checking Thread Title Hygiene"+ "statusMessage": "(OmO 4.16.1) Checking Thread Title Hygiene"}]}diff --git a/plugins/omo/components/teammode/package.json b/plugins/omo/components/teammode/package.jsonindex 495ecfd1..4a39b871 100644--- a/plugins/omo/components/teammode/package.json+++ b/plugins/omo/components/teammode/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/codex-teammode",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex team-mode hook component that keeps background thread titles descriptive after create_thread.","type": "module","private": true,diff --git a/plugins/omo/components/telemetry/hooks/hooks.json b/plugins/omo/components/telemetry/hooks/hooks.jsonindex 99c16422..2aee39db 100644--- a/plugins/omo/components/telemetry/hooks/hooks.json+++ b/plugins/omo/components/telemetry/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO) Recording Session Telemetry"+ "statusMessage": "(OmO 4.16.1) Recording Session Telemetry"}]}diff --git a/plugins/omo/components/telemetry/package.json b/plugins/omo/components/telemetry/package.jsonindex f4510693..d8f860f9 100644--- a/plugins/omo/components/telemetry/package.json+++ b/plugins/omo/components/telemetry/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-telemetry",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin component that emits omo-codex anonymous daily-active telemetry on SessionStart.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/directive.md b/plugins/omo/components/ultrawork/directive.mdindex 0ac61fa6..ecd9828d 100644--- a/plugins/omo/components/ultrawork/directive.md+++ b/plugins/omo/components/ultrawork/directive.md@@ -49,9 +49,10 @@ exercises the surface; capture the artifact.1. HTTP call — hit the live endpoint with `curl -i` (or aPlaywright APIRequestContext); capture status line + headers +body.- 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with- `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript- is the artifact.+ 2. Terminal / TUI - drive a real pty and prove it through the+ xterm.js web terminal (see the TUI visual QA note below). tmux+ `send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`+ for color / layout / CJK evidence, which degrades truecolor.3. Browser use — in Codex, use `browser:control-in-app-browser`first when available and no authenticated/persistent user browserprofile is required. Otherwise use Chrome to drive the REAL page;@@ -79,13 +80,13 @@ channel scenario when the behavior is user-facing. `--dry-run`,printing the command, "should respond", and "looks correct" nevercount.-For TUI visual QA, terminal transcripts alone are not enough when a-visual surface is being evaluated. In this repo, prefer-`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`-or the helper's `--command` tmux-backed PTY connector when available.-Outside this repo, capture equivalent browser/computer-use rendered-terminal evidence: screenshot, plain transcript, rendered HTML or action-log, and cleanup receipt.+For TUI visual QA, render the terminal through the real xterm.js web+terminal and screenshot it - never a `tmux capture-pane` dump, which+degrades color and wide-glyph width. In this repo:+`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`+(live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw+stream). Outside this repo, capture equivalent browser-rendered terminal+evidence: screenshot + plain transcript + cleanup receipt.# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)@@ -287,6 +288,13 @@ evidence for that step. Do not start dependent implementation until theaudit, research, or review result is integrated or explicitly recordedas inconclusive. Do not generate a plan before spawned research lanesthat feed the plan have returned or been closed as inconclusive.+Spawn every independent child for the current wave first. After the wave+is launched, run `multi_agent_v1.wait_agent` for each spawned child until+each reaches terminal status (`completed`, `failed`, `blocked`, or+explicitly recorded inconclusive) before any dependent `update_plan`+transition, `create_goal` continuation, implementation tool call, plan+drafting, approval-gate work, PR handoff, or final response. A timeout is+not terminal status.Do not write the final answer, PR handoff, or completion summary whileactive child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.After two silent waits send `TASK STILL ACTIVE: return <deliverable> ordiff --git a/plugins/omo/components/ultrawork/hooks/hooks.json b/plugins/omo/components/ultrawork/hooks/hooks.jsonindex 6d4df022..04284752 100644--- a/plugins/omo/components/ultrawork/hooks/hooks.json+++ b/plugins/omo/components/ultrawork/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO) Checking Ultrawork Trigger"+ "statusMessage": "(OmO 4.16.1) Checking Ultrawork Trigger"}]}diff --git a/plugins/omo/components/ultrawork/package.json b/plugins/omo/components/ultrawork/package.jsonindex 58c37f56..182d62b4 100644--- a/plugins/omo/components/ultrawork/package.json+++ b/plugins/omo/components/ultrawork/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ultrawork",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin that injects the ultrawork orchestration directive and ships LazyCodex planning, review, QA, and gate agent roles.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.mdindex 61ed059a..55d0b6cb 100644--- a/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md+++ b/plugins/omo/components/ultrawork/skills/ultrawork/SKILL.md@@ -56,9 +56,10 @@ exercises the surface; capture the artifact.1. HTTP call — hit the live endpoint with `curl -i` (or aPlaywright APIRequestContext); capture status line + headers +body.- 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with- `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript- is the artifact.+ 2. Terminal / TUI - drive a real pty and prove it through the+ xterm.js web terminal (see the TUI visual QA note below). tmux+ `send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`+ for color / layout / CJK evidence, which degrades truecolor.3. Browser use — in Codex, use `browser:control-in-app-browser`first when available and no authenticated/persistent user browserprofile is required. Otherwise use Chrome to drive the REAL page;@@ -86,13 +87,13 @@ channel scenario when the behavior is user-facing. `--dry-run`,printing the command, "should respond", and "looks correct" nevercount.-For TUI visual QA, terminal transcripts alone are not enough when a-visual surface is being evaluated. In this repo, prefer-`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`-or the helper's `--command` tmux-backed PTY connector when available.-Outside this repo, capture equivalent browser/computer-use rendered-terminal evidence: screenshot, plain transcript, rendered HTML or action-log, and cleanup receipt.+For TUI visual QA, render the terminal through the real xterm.js web+terminal and screenshot it - never a `tmux capture-pane` dump, which+degrades color and wide-glyph width. In this repo:+`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`+(live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw+stream). Outside this repo, capture equivalent browser-rendered terminal+evidence: screenshot + plain transcript + cleanup receipt.# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)@@ -294,6 +295,13 @@ evidence for that step. Do not start dependent implementation until theaudit, research, or review result is integrated or explicitly recordedas inconclusive. Do not generate a plan before spawned research lanesthat feed the plan have returned or been closed as inconclusive.+Spawn every independent child for the current wave first. After the wave+is launched, run `multi_agent_v1.wait_agent` for each spawned child until+each reaches terminal status (`completed`, `failed`, `blocked`, or+explicitly recorded inconclusive) before any dependent `update_plan`+transition, `create_goal` continuation, implementation tool call, plan+drafting, approval-gate work, PR handoff, or final response. A timeout is+not terminal status.Do not write the final answer, PR handoff, or completion summary whileactive child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.After two silent waits send `TASK STILL ACTIVE: return <deliverable> ordiff --git a/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md b/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.mdindex e038420e..4e7a99b3 100644--- a/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md+++ b/plugins/omo/components/ultrawork/skills/ulw-plan/SKILL.md@@ -67,6 +67,17 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOPmulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+Spawn every independent child for the current wave first. After the wave+is launched, use `multi_agent_v1.wait_agent` for each child until each+reaches terminal status. A timeout is not terminal status. Do not start dependent planning, drafting, approval-gate work, or final handoff until each child result is integrated or recorded as inconclusive.++For work likely to exceed one wait cycle, require the child to send+`WORKING: <task> - <current phase>` before long passes and+`BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent`+timeout only means no new mailbox update arrived. Treat a running child as+alive. Fallback only when the child is completed without the deliverable,+ack-only after followup, explicitly `BLOCKED:`, or no longer running.+Roles: `explorer` (internal patterns/conventions/tests), `librarian` (external docs/contracts), `metis` (gap analysis), `momus` (high-accuracy plan review). Full spawn/wait/fallback discipline is in `references/full-workflow.md`.## Stop rulesdiff --git a/plugins/omo/components/ultrawork/test/codex-hook.test.ts b/plugins/omo/components/ultrawork/test/codex-hook.test.tsindex e4d1ba27..580bb036 100644--- a/plugins/omo/components/ultrawork/test/codex-hook.test.ts+++ b/plugins/omo/components/ultrawork/test/codex-hook.test.ts@@ -190,7 +190,7 @@ describe("codex ultrawork hook", () => {expect(parsed.hookSpecificOutput.additionalContext).toMatch(/# Manual-QA channels/);expect(parsed.hookSpecificOutput.additionalContext).toMatch(/TESTS ALONE NEVER PROVE DONE/);expect(parsed.hookSpecificOutput.additionalContext).toMatch(/1\. HTTP call/);- expect(parsed.hookSpecificOutput.additionalContext).toMatch(/2\. tmux/);+ expect(parsed.hookSpecificOutput.additionalContext).toMatch(/2\. Terminal \/ TUI/);expect(parsed.hookSpecificOutput.additionalContext).toMatch(/3\. Browser use/);expect(parsed.hookSpecificOutput.additionalContext).toMatch(/4\. Computer use/);expect(parsed.hookSpecificOutput.additionalContext).toMatch(/CLEANUP \(PAIRED/);@@ -244,6 +244,27 @@ describe("codex ultrawork hook", () => {expect(directive).toMatch(/WORKING:/);});+ it("#given directive #when inspected #then blocks dependent work until spawned planners finish", () => {+ // given+ const payload = {+ hook_event_name: "UserPromptSubmit",+ prompt: "ulw",+ };++ // when+ const output = runUserPromptSubmitHook(payload, { skillFilePath: null });+ const parsed = parseHookOutput(output);++ // then+ const directive = parsed.hookSpecificOutput.additionalContext;+ expect(directive).toMatch(/Subagent-dependent transition barrier/);+ expect(directive).toMatch(/Spawn every independent child for the current wave first/);+ expect(directive).toMatch(/After the wave\s+is launched[\s\S]{0,240}wait_agent[\s\S]{0,240}terminal status/);+ expect(directive).not.toMatch(/Immediately after any `multi_agent_v1\.spawn_agent`/);+ expect(directive).toMatch(/Do not start dependent implementation/);+ expect(directive).toMatch(/Do not mark an `update_plan` step `completed`/);+ });+it("#given directive #when inspected #then keeps impact-proportional sizing invariants", () => {// givenconst payload = {diff --git a/plugins/omo/components/ulw-loop/CHANGELOG.md b/plugins/omo/components/ulw-loop/CHANGELOG.mdindex ee8c83b0..52cd8fc0 100644--- a/plugins/omo/components/ulw-loop/CHANGELOG.md+++ b/plugins/omo/components/ulw-loop/CHANGELOG.md@@ -2,6 +2,10 @@## [0.1.0] - unreleased+- **Memory:** steering ledger entries no longer embed the full plan four times (`before`/`after` at both the audit and entry level). Accepted steers now record a compact `UlwLoopSteeringPlanSnapshot` (plan counters + only the goals the mutation touched), shrinking a measured real-world entry from 189KB to 7.8KB (~24x) and ending quadratic `ledger.jsonl` growth over long runs.+- **Memory:** steering dedup (`--idempotency-key` / `promptSignature`) streams the ledger line-by-line with a substring pre-filter instead of `JSON.parse`-ing every entry into memory; dedup returns strip legacy full-plan `before`/`after` payloads from re-surfaced audits. `readSteeringLedgerEntries` streams too.+- **Memory:** `withUlwLoopMutationLock` no longer retains the mutation result (full plan/audit) per `(repo, scope)` in its module-level lock map; settled gates self-evict, so long-lived embedders stop accumulating entries.+- **Fix:** `omo ulw-loop steer --idempotency-key` was parsed but never forwarded into the proposal, so CLI steers never deduped. It is now wired through.- Standalone ultrawork injection (`--with-ultrawork`) now emits the same compact bootstrap pointer as the ultrawork component (opener mandate, `create_goal` with `objective` only, read the bundled `ultrawork` skill at a runtime-resolved absolute path), falling back to the full bundled directive when the plugin skills tree is absent. Keeps the injected payload below Codex App's hook-output truncation budget (code-yeongyu/oh-my-openagent#5828).- Initial scaffold of codex-ulw-loop plugin.- Per-Criterion Cycle: `EXECUTE` is now **EXECUTE-AS-SCENARIO** — the agent must run the Manual-QA channel scenario the criterion named (HTTP call / tmux / browser use / computer use; see new `## Manual-QA channels` section). Inserted a new **CLEAN (PAIRED, NEVER SKIP)** step that tears down every QA-spawned process / `tmux` session / browser context / container / port / temp dir before recording evidence; the cleanup receipt is embedded in the `--evidence` string. Missing receipt → record BLOCKED, not PASS. Added Constraint #13 and a Stop Rule for leftover state.diff --git a/plugins/omo/components/ulw-loop/directive.md b/plugins/omo/components/ulw-loop/directive.mdindex 0ac61fa6..ecd9828d 100644--- a/plugins/omo/components/ulw-loop/directive.md+++ b/plugins/omo/components/ulw-loop/directive.md@@ -49,9 +49,10 @@ exercises the surface; capture the artifact.1. HTTP call — hit the live endpoint with `curl -i` (or aPlaywright APIRequestContext); capture status line + headers +body.- 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with- `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript- is the artifact.+ 2. Terminal / TUI - drive a real pty and prove it through the+ xterm.js web terminal (see the TUI visual QA note below). tmux+ `send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`+ for color / layout / CJK evidence, which degrades truecolor.3. Browser use — in Codex, use `browser:control-in-app-browser`first when available and no authenticated/persistent user browserprofile is required. Otherwise use Chrome to drive the REAL page;@@ -79,13 +80,13 @@ channel scenario when the behavior is user-facing. `--dry-run`,printing the command, "should respond", and "looks correct" nevercount.-For TUI visual QA, terminal transcripts alone are not enough when a-visual surface is being evaluated. In this repo, prefer-`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`-or the helper's `--command` tmux-backed PTY connector when available.-Outside this repo, capture equivalent browser/computer-use rendered-terminal evidence: screenshot, plain transcript, rendered HTML or action-log, and cleanup receipt.+For TUI visual QA, render the terminal through the real xterm.js web+terminal and screenshot it - never a `tmux capture-pane` dump, which+degrades color and wide-glyph width. In this repo:+`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`+(live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw+stream). Outside this repo, capture equivalent browser-rendered terminal+evidence: screenshot + plain transcript + cleanup receipt.# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)@@ -287,6 +288,13 @@ evidence for that step. Do not start dependent implementation until theaudit, research, or review result is integrated or explicitly recordedas inconclusive. Do not generate a plan before spawned research lanesthat feed the plan have returned or been closed as inconclusive.+Spawn every independent child for the current wave first. After the wave+is launched, run `multi_agent_v1.wait_agent` for each spawned child until+each reaches terminal status (`completed`, `failed`, `blocked`, or+explicitly recorded inconclusive) before any dependent `update_plan`+transition, `create_goal` continuation, implementation tool call, plan+drafting, approval-gate work, PR handoff, or final response. A timeout is+not terminal status.Do not write the final answer, PR handoff, or completion summary whileactive child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.After two silent waits send `TASK STILL ACTIVE: return <deliverable> ordiff --git a/plugins/omo/components/ulw-loop/hooks/hooks.json b/plugins/omo/components/ulw-loop/hooks/hooks.jsonindex 9c99444b..43493c87 100644--- a/plugins/omo/components/ulw-loop/hooks/hooks.json+++ b/plugins/omo/components/ulw-loop/hooks/hooks.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit --with-ultrawork","timeout": 10,- "statusMessage": "(OmO) Checking Ulw-Loop Steering"+ "statusMessage": "(OmO 4.16.1) Checking Ulw-Loop Steering"}]}@@ -20,7 +20,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO) Enforcing Unlimited Ulw-Loop Budget"+ "statusMessage": "(OmO 4.16.1) Enforcing Unlimited Ulw-Loop Budget"}]}diff --git a/plugins/omo/components/ulw-loop/package.json b/plugins/omo/components/ulw-loop/package.jsonindex e4634474..c71f9278 100644--- a/plugins/omo/components/ulw-loop/package.json+++ b/plugins/omo/components/ulw-loop/package.json@@ -1,6 +1,6 @@{"name": "@code-yeongyu/codex-ulw-loop",- "version": "4.16.0",+ "version": "4.16.1","description": "Codex plugin: durable repo-native multi-goal orchestration with embedded success criteria and observable evidence audit.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.mdindex 16b76902..81a02958 100644--- a/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md+++ b/plugins/omo/components/ulw-loop/skills/ulw-loop/SKILL.md@@ -22,7 +22,7 @@ This skill is intentionally compact. The full workflow lives in `references/full- Use the ulw-loop CLI state under `.omo/ulw-loop`; do not hand-edit goal state.- After any compaction or context loss, re-read brief + goals + ledger FIRST plus `omo ulw-loop status --json`, then resume; never re-plan from scratch.- If `omo ulw-loop create-goals` says the existing aggregate is already complete, start unrelated new work with a fresh `--session-id <new-id>` instead of steering or forcing the completed default state. Use `--force` only to intentionally overwrite completed evidence.-- Every success criterion needs observable evidence from a real surface: a channel (tmux, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).+- Every success criterion needs observable evidence from a real surface: a channel (terminal/TUI via the xterm.js web terminal, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).- Record evidence through the CLI only after cleanup receipts are available.- Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.- Every `multi_agent_v1.spawn_agent` message starts with `TASK:`, then names `DELIVERABLE`, `SCOPE`, and `VERIFY`; put role and specialty instructions inside `message`; use `fork_context: false` unless full history is truly required.diff --git a/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md b/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.mdindex 78b84716..a4799afd 100644--- a/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md+++ b/plugins/omo/components/ulw-loop/skills/ulw-loop/references/full-workflow.md@@ -19,16 +19,16 @@ Audit each pass, fail, block, steering change, and checkpoint in `.omo/ulw-loop/Run each criterion's real-surface proof yourself through the channel that faithfully exercises it; capture the artifact before recording PASS.1. **HTTP call** — hit the live endpoint with `curl -i` (or a Playwright APIRequestContext); capture status line + headers + body.-2. **tmux** — `tmux new-session -d -s ulw-qa-<criterion>`, drive with `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript is the artifact.+2. **Terminal / TUI** - prove it through the xterm.js web terminal; tmux `send-keys` is fine for a boot smoke, but NEVER `tmux capture-pane` for color/layout/CJK evidence (it degrades truecolor).3. **Browser use** — in Codex, use `browser:control-in-app-browser` first when available and the scenario does not need an authenticated or persistent user browser profile. Otherwise use Chrome to drive the REAL page; if unavailable, use agent-browser. Capture action log + screenshot path. Never downgrade a browser-facing criterion.4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.-For TUI visual QA, pair the tmux transcript with a browser-rendered terminal-screenshot. In this repo run `node script/qa/web-terminal-visual-qa.mjs---from-file <capture.txt> --evidence-dir <dir>` and record `terminal.png`,-`terminal.html`, `terminal.txt`, and `metadata.json` as the visual evidence-bundle. This is mandatory when a PR or review needs to inspect the terminal-screen, not just the text.+For TUI visual QA, render the terminal through the real xterm.js web terminal and+screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph+width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command+"<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;+`--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and+`metadata.json`. Mandatory when a PR or review must inspect the terminal screen.Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump) are first-class evidence for CLI- or data-shaped criteria; use a channel scenario when the behavior is user-facing. `--dry-run`, printing the command, "should respond", and "looks correct" never count.diff --git a/plugins/omo/components/ulw-loop/src/cli-commands.ts b/plugins/omo/components/ulw-loop/src/cli-commands.tsindex ff952eae..c43bd191 100644--- a/plugins/omo/components/ulw-loop/src/cli-commands.ts+++ b/plugins/omo/components/ulw-loop/src/cli-commands.ts@@ -39,8 +39,8 @@ export async function ulwLoopCommand(argv: readonly string[]): Promise<number> {const rest = argv.slice(1);const repoRoot = process.cwd();const json = hasFlag(rest, "--json");- const scope = commandScope(rest);try {+ const scope = commandScope(rest);if (!isUlwLoopSubcommand(command)) {if (json) {printJsonError(@@ -94,7 +94,22 @@ function unhandledSubcommand(command: never): never {throw new UlwLoopError(`Unhandled ulw-loop subcommand: ${String(command)}.`, "ULW_LOOP_SUBCOMMAND_UNHANDLED");}+const SESSION_ID_FLAG = "--session-id";++function sessionIdFlagPresent(argv: readonly string[]): boolean {+ return hasFlag(argv, SESSION_ID_FLAG) || argv.some((arg) => arg.startsWith(`${SESSION_ID_FLAG}=`));+}+function commandScope(argv: readonly string[]): UlwLoopScope | undefined {- const sessionId = readValue(argv, "--session-id") ?? resolveUlwLoopSessionIdFromEnv();+ if (sessionIdFlagPresent(argv)) {+ const sessionId = readValue(argv, SESSION_ID_FLAG)?.trim();+ if (!sessionId) {+ throw new UlwLoopError(`${SESSION_ID_FLAG} requires a non-empty value.`, "ULW_LOOP_SESSION_ID_REQUIRED", {+ details: { flag: SESSION_ID_FLAG },+ });+ }+ return { sessionId };+ }+ const sessionId = resolveUlwLoopSessionIdFromEnv();return sessionId === null ? undefined : { sessionId };}diff --git a/plugins/omo/components/ulw-loop/src/cli-steering.ts b/plugins/omo/components/ulw-loop/src/cli-steering.tsindex e90f7a14..6b2d8eb8 100644--- a/plugins/omo/components/ulw-loop/src/cli-steering.ts+++ b/plugins/omo/components/ulw-loop/src/cli-steering.ts@@ -73,7 +73,8 @@ function model(value: string | undefined): UlwLoopSuccessCriterionUserModel | unfunction neverKind(kind: never): never { return fail(`Unsupported steering kind: ${String(kind)}.`, "ULW_LOOP_STEERING_KIND_UNSUPPORTED", { kind }); }export async function parseSteeringProposal(argv: readonly string[]): Promise<CliSteeringProposal> {- const kind = parseSteeringKind(argv); const source = parseSteeringSource(argv); const base = { kind, source, evidence: required(argv, "--evidence"), rationale: required(argv, "--rationale") };+ const kind = parseSteeringKind(argv); const source = parseSteeringSource(argv); const idempotencyKey = text(readValue(argv, "--idempotency-key"), "--idempotency-key");+ const base = { kind, source, evidence: required(argv, "--evidence"), rationale: required(argv, "--rationale"), ...(idempotencyKey === undefined ? {} : { idempotencyKey }) };switch (kind) {case "add_subgoal": return normalizeSteeringProposal({ ...base, title: required(argv, "--title"), objective: required(argv, "--objective") });case "split_subgoal": { const goalId = requiredGoal(argv); return normalizeSteeringProposal({ ...base, goalId, targetGoalId: goalId, childGoals: await children(argv, "--children", true) }); }diff --git a/plugins/omo/components/ulw-loop/src/plan-io.ts b/plugins/omo/components/ulw-loop/src/plan-io.tsindex 79f2044e..0214296b 100644--- a/plugins/omo/components/ulw-loop/src/plan-io.ts+++ b/plugins/omo/components/ulw-loop/src/plan-io.ts@@ -1,4 +1,6 @@+import { createReadStream } from "node:fs";import { appendFile, mkdir, readFile, rename, writeFile } from "node:fs/promises";+import { createInterface } from "node:readline";import { aggregateCodexObjectiveForScope } from "./goal-status.js";import {@@ -14,7 +16,7 @@ import { iso, ULW_LOOP_DIR, ULW_LOOP_GOALS, ULW_LOOP_LEDGER, UlwLoopError } fromconst LEGACY_OBJECTIVE_PREFIX = `Complete all ulw-loop stories in ${ULW_LOOP_DIR}/${ULW_LOOP_GOALS}: `;const LEGACY_OBJECTIVE = `Complete all ulw-loop stories listed in ${ULW_LOOP_DIR}/${ULW_LOOP_GOALS}. Use ${ULW_LOOP_DIR}/${ULW_LOOP_LEDGER} as the durable audit trail.`;-const locks = new Map<string, Promise<unknown>>();+const locks = new Map<string, Promise<undefined>>();function hasCode(error: unknown, code: string): boolean {return error instanceof Error && "code" in error && error.code === code;@@ -43,12 +45,19 @@ export async function withUlwLoopMutationLock<T>(const fn = typeof scopeOrFn === "function" ? scopeOrFn : maybeFn;if (fn === undefined) throw new UlwLoopError("Missing ulw-loop mutation body.", "ULW_LOOP_LOCK_BODY_MISSING");const lockKey = `${repoRoot}\0${ulwLoopRelativeDir(scope)}`;- const prior = locks.get(lockKey) ?? Promise.resolve();+ const prior = locks.get(lockKey) ?? Promise.resolve(undefined);const run = prior.then(fn, fn);- locks.set(- lockKey,- run.catch(() => undefined),+ // The stored gate resolves to undefined so the map never retains fn's result+ // (plans/audits), and it removes itself once no newer waiter replaced it —+ // otherwise a long-lived host leaks one entry per (repo, scope) forever.+ const gate: Promise<undefined> = run.then(+ () => undefined,+ () => undefined,);+ locks.set(lockKey, gate);+ void gate.then(() => {+ if (locks.get(lockKey) === gate) locks.delete(lockKey);+ });return run;}@@ -107,18 +116,57 @@ export async function appendLedger(repoRoot: string, entry: UlwLoopLedgerEntry,await appendFile(ulwLoopLedgerPath(repoRoot, scope), `${JSON.stringify(entry)}\n`, "utf8");}-export async function readSteeringLedgerEntries(repoRoot: string, scope?: UlwLoopScope): Promise<UlwLoopLedgerEntry[]> {- let raw: string;+/**+ * Streams raw ledger lines without materializing the file. Real ledgers reach+ * many MB (legacy entries embedded full-plan snapshots), so `readFile` here+ * ballooned every steer/dedup path; line-at-a-time keeps memory O(longest line).+ */+async function* ledgerLines(repoRoot: string, scope?: UlwLoopScope): AsyncGenerator<string> {+ const stream = createReadStream(ulwLoopLedgerPath(repoRoot, scope), { encoding: "utf8" });+ const lines = createInterface({ input: stream, crlfDelay: Number.POSITIVE_INFINITY });try {- raw = await readFile(ulwLoopLedgerPath(repoRoot, scope), "utf8");+ for await (const line of lines) {+ if (line.trim().length > 0) yield line;+ }} catch (error) {- if (hasCode(error, "ENOENT")) return [];- throw error;+ if (!hasCode(error, "ENOENT")) throw error;+ } finally {+ lines.close();+ stream.destroy();}+}++export async function readSteeringLedgerEntries(repoRoot: string, scope?: UlwLoopScope): Promise<UlwLoopLedgerEntry[]> {const entries: UlwLoopLedgerEntry[] = [];- for (const line of raw.split(/\r?\n/).filter(Boolean)) {+ for await (const line of ledgerLines(repoRoot, scope)) {const entry: UlwLoopLedgerEntry = JSON.parse(line);if (isSteeringKind(entry.kind)) entries.push(entry);}return entries;}++/**+ * First accepted steering entry matching an idempotency key/prompt signature.+ * A cheap substring probe on the raw line skips JSON.parse for the vast+ * majority of entries, so dedup stays flat even on legacy multi-MB ledgers.+ */+export async function findAcceptedSteeringLedgerEntry(+ repoRoot: string,+ key: string,+ scope?: UlwLoopScope,+): Promise<UlwLoopLedgerEntry | undefined> {+ const probe = JSON.stringify(key);+ for await (const line of ledgerLines(repoRoot, scope)) {+ if (!line.includes(probe)) continue;+ const entry: UlwLoopLedgerEntry = JSON.parse(line);+ if (!isSteeringKind(entry.kind)) continue;+ if (entry.steering?.invariant.accepted !== true) continue;+ if (+ entry.idempotencyKey === key ||+ entry.steering.idempotencyKey === key ||+ entry.steering.promptSignature === key+ )+ return entry;+ }+ return undefined;+}diff --git a/plugins/omo/components/ulw-loop/src/steering-snapshot.ts b/plugins/omo/components/ulw-loop/src/steering-snapshot.tsnew file mode 100644index 00000000..67082611--- /dev/null+++ b/plugins/omo/components/ulw-loop/src/steering-snapshot.ts@@ -0,0 +1,38 @@+import type { UlwLoopItem, UlwLoopPlan } from "./domain-types.js";+import type { UlwLoopSteeringPlanSnapshot } from "./steering-types.js";++/**+ * Compact before/after snapshots for steering ledger entries.+ *+ * Ledger entries used to embed the FULL plan (every goal, criterion, and+ * evidence string) twice per audit and twice more at the entry top level.+ * That made each accepted steer O(plan size) on disk, so the ledger grew+ * quadratically over a run, and every dedup scan re-hydrated all of it into+ * memory. A snapshot instead records plan-level counters plus only the goals+ * the mutation actually touched, keeping each entry O(changed goals).+ */+export function buildSteeringPlanSnapshot(+ plan: UlwLoopPlan,+ changedGoalIds: ReadonlySet<string>,+): UlwLoopSteeringPlanSnapshot {+ const snapshot: UlwLoopSteeringPlanSnapshot = {+ updatedAt: plan.updatedAt,+ goalCount: plan.goals.length,+ goalIds: plan.goals.map((goal) => goal.id),+ goals: plan.goals.filter((goal) => changedGoalIds.has(goal.id)),+ };+ return plan.activeGoalId === undefined ? snapshot : { ...snapshot, activeGoalId: plan.activeGoalId };+}++/** Ids of goals that differ between two plans, including added or removed goals. */+export function changedGoalIdsBetween(before: UlwLoopPlan, after: UlwLoopPlan): Set<string> {+ const beforeById = new Map<string, UlwLoopItem>(before.goals.map((goal) => [goal.id, goal]));+ const changed = new Set<string>();+ for (const goal of after.goals) {+ const prior = beforeById.get(goal.id);+ if (prior === undefined || JSON.stringify(prior) !== JSON.stringify(goal)) changed.add(goal.id);+ beforeById.delete(goal.id);+ }+ for (const id of beforeById.keys()) changed.add(id);+ return changed;+}diff --git a/plugins/omo/components/ulw-loop/src/steering-types.ts b/plugins/omo/components/ulw-loop/src/steering-types.tsindex 210b675d..f9063098 100644--- a/plugins/omo/components/ulw-loop/src/steering-types.ts+++ b/plugins/omo/components/ulw-loop/src/steering-types.ts@@ -1,5 +1,5 @@import type { UlwLoopSteeringMutationKind, UlwLoopSteeringSource } from "./constants.js";-import type { UlwLoopPlan } from "./domain-types.js";+import type { UlwLoopItem, UlwLoopPlan } from "./domain-types.js";export interface UlwLoopSteeringInvariantResult {accepted: boolean;@@ -44,13 +44,21 @@ export interface UlwLoopSteeringProposal {now?: Date;}+export interface UlwLoopSteeringPlanSnapshot {+ readonly updatedAt: string;+ readonly activeGoalId?: string;+ readonly goalCount: number;+ readonly goalIds: readonly string[];+ readonly goals: readonly UlwLoopItem[];+}+export interface UlwLoopSteeringAudit {kind: UlwLoopSteeringMutationKind;source: UlwLoopSteeringSource;targetGoalIds: string[];criterionId?: string;- before?: unknown;- after?: unknown;+ before?: UlwLoopSteeringPlanSnapshot;+ after?: UlwLoopSteeringPlanSnapshot;evidence: string;rationale: string;invariant: UlwLoopSteeringInvariantResult;diff --git a/plugins/omo/components/ulw-loop/src/steering.ts b/plugins/omo/components/ulw-loop/src/steering.tsindex 76ae86da..11f459d5 100644--- a/plugins/omo/components/ulw-loop/src/steering.ts+++ b/plugins/omo/components/ulw-loop/src/steering.ts@@ -2,7 +2,8 @@import { isUlwLoopDone } from "./goal-status.js";import type { UlwLoopScope } from "./paths.js";import { seedDefaultSuccessCriteria } from "./plan-crud.js";-import { appendLedger, readSteeringLedgerEntries, readUlwLoopPlan, withUlwLoopMutationLock, writePlan } from "./plan-io.js";+import { appendLedger, findAcceptedSteeringLedgerEntry, readUlwLoopPlan, withUlwLoopMutationLock, writePlan } from "./plan-io.js";+import { buildSteeringPlanSnapshot, changedGoalIdsBetween } from "./steering-snapshot.js";import type {SteerUlwLoopResult,UlwLoopItem,@@ -245,13 +246,22 @@ export async function steerUlwLoop(repoRoot: string, proposal: UlwLoopSteeringPrreturn withUlwLoopMutationLock(repoRoot, scope, async () => {const plan = await readUlwLoopPlan(repoRoot, scope);const key = proposal.idempotencyKey ?? proposal.promptSignature;- const prior = key === undefined ? undefined : (await readSteeringLedgerEntries(repoRoot, scope)).find((entry) => entry.steering?.invariant.accepted === true && (entry.idempotencyKey === key || entry.steering.idempotencyKey === key || entry.steering.promptSignature === key));- if (prior?.steering !== undefined) return { plan, accepted: true, audit: { ...prior.steering, deduped: true }, rejectedReasons: [], deduped: true };+ const prior = key === undefined ? undefined : await findAcceptedSteeringLedgerEntry(repoRoot, key, scope);+ if (prior?.steering !== undefined) {+ // Legacy entries embedded full-plan before/after snapshots; never+ // re-surface those multi-MB payloads on the dedup path.+ const { before: _before, after: _after, ...compactPrior } = prior.steering;+ return { plan, accepted: true, audit: { ...compactPrior, deduped: true }, rejectedReasons: [], deduped: true };+ }const audit = validateUlwLoopSteeringProposal(plan, proposal);const accepted = audit.invariant.accepted;const next = accepted ? applySteeringMutation(plan, proposal, audit) : plan;- const finalAudit: UlwLoopSteeringAudit = { ...audit, before: plan };- if (accepted) finalAudit.after = next;+ const finalAudit: UlwLoopSteeringAudit = { ...audit };+ if (accepted) {+ const changed = changedGoalIdsBetween(plan, next);+ finalAudit.before = buildSteeringPlanSnapshot(plan, changed);+ finalAudit.after = buildSteeringPlanSnapshot(next, changed);+ }if (accepted) await writePlan(repoRoot, next, scope);await appendLedger(repoRoot, ledgerEntry(proposal, finalAudit, proposal.now?.toISOString() ?? iso()), scope);return { plan: next, accepted, audit: finalAudit, rejectedReasons: audit.invariant.rejectedReasons, deduped: false };@@ -264,7 +274,5 @@ function ledgerEntry(proposal: UlwLoopSteeringProposal, audit: UlwLoopSteeringAuif (goalId !== undefined) entry.goalId = goalId;if (proposal.criterionId !== undefined) entry.criterionId = proposal.criterionId;if (proposal.idempotencyKey !== undefined) entry.idempotencyKey = proposal.idempotencyKey;- if (audit.before !== undefined) entry.before = audit.before;- if (audit.after !== undefined) entry.after = audit.after;return entry;}diff --git a/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts b/plugins/omo/components/ulw-loop/test/cli-create-goals.test.tsindex 6c9ff6cd..c7af1553 100644--- a/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts+++ b/plugins/omo/components/ulw-loop/test/cli-create-goals.test.ts@@ -169,4 +169,20 @@ describe("ulwLoopCommand create-goals", () => {expect(await readFile(join(testDir, ".omo/ulw-loop/manual-456/goals.json"), "utf8")).toContain("Manual scoped");});++ it("#given a valueless --session-id #when creating goals #then it fails and writes no plan", async () => {+ const code = await ulwLoopCommand(["create-goals", "--session-id", "--brief", "- Alpha"]);++ expect(code).toBe(1);+ expect(err.join("")).toContain("--session-id requires a non-empty value");+ await expect(readFile(join(testDir, ".omo/ulw-loop/goals.json"), "utf8")).rejects.toThrow();+ });++ it("#given an empty --session-id= #when creating goals #then it fails and writes no plan", async () => {+ const code = await ulwLoopCommand(["create-goals", "--session-id=", "--brief", "- Alpha"]);++ expect(code).toBe(1);+ expect(err.join("")).toContain("--session-id requires a non-empty value");+ await expect(readFile(join(testDir, ".omo/ulw-loop/goals.json"), "utf8")).rejects.toThrow();+ });});diff --git a/plugins/omo/components/ulw-loop/test/plan-io.test.ts b/plugins/omo/components/ulw-loop/test/plan-io.test.tsindex fe4a0777..61297434 100644--- a/plugins/omo/components/ulw-loop/test/plan-io.test.ts+++ b/plugins/omo/components/ulw-loop/test/plan-io.test.ts@@ -1,16 +1,18 @@-import { copyFile, mkdir, mkdtemp, readdir, readFile, writeFile } from "node:fs/promises";+import { appendFile, copyFile, mkdir, mkdtemp, readdir, readFile, writeFile } from "node:fs/promises";import { tmpdir } from "node:os";import { join } from "node:path";+import { setImmediate as tick } from "node:timers/promises";import { beforeEach, describe, expect, it } from "vitest";import { ulwLoopDir, ulwLoopGoalsPath, ulwLoopLedgerPath } from "../src/paths.js";import {appendLedger,+ findAcceptedSteeringLedgerEntry,readSteeringLedgerEntries,readUlwLoopPlan,withUlwLoopMutationLock,writePlan,} from "../src/plan-io.js";-import type { UlwLoopItem, UlwLoopLedgerEntry, UlwLoopPlan } from "../src/types.js";+import type { UlwLoopItem, UlwLoopLedgerEntry, UlwLoopPlan, UlwLoopSteeringAudit } from "../src/types.js";import { UlwLoopError } from "../src/types.js";const NOW = "2026-05-23T00:00:00.000Z";@@ -51,6 +53,45 @@ function entry(kind: UlwLoopLedgerEntry["kind"], goalId = "G001"): UlwLoopLedgerreturn { at: NOW, kind, goalId };}+function steeringAudit(overrides: Partial<UlwLoopSteeringAudit> = {}): UlwLoopSteeringAudit {+ return {+ kind: "revise_pending_wording",+ source: "cli",+ targetGoalIds: ["G001"],+ evidence: "observed evidence",+ rationale: "needed change",+ invariant: {+ accepted: true,+ structuralInvariantAccepted: true,+ evidenceBackedNecessity: true,+ noEasierCompletion: true,+ rejectedReasons: [],+ },+ ...overrides,+ };+}++function rejectedSteeringAudit(overrides: Partial<UlwLoopSteeringAudit> = {}): UlwLoopSteeringAudit {+ return steeringAudit({+ invariant: {+ accepted: false,+ structuralInvariantAccepted: false,+ evidenceBackedNecessity: false,+ noEasierCompletion: true,+ rejectedReasons: ["missing evidence"],+ },+ ...overrides,+ });+}++function steeringEntry(+ kind: UlwLoopLedgerEntry["kind"],+ audit: UlwLoopSteeringAudit,+ overrides: Partial<UlwLoopLedgerEntry> = {},+): UlwLoopLedgerEntry {+ return { at: NOW, kind, goalId: "G001", steering: audit, ...overrides };+}+async function makeRepo(): Promise<string> {return mkdtemp(join(tmpdir(), "ug-io-"));}@@ -209,6 +250,112 @@ describe("readSteeringLedgerEntries", () => {});});+describe("findAcceptedSteeringLedgerEntry", () => {+ it.each([+ [+ "top-level idempotencyKey",+ steeringEntry("steering_accepted", steeringAudit(), { idempotencyKey: "needle-key" }),+ ],+ ["steering.idempotencyKey", steeringEntry("steering_accepted", steeringAudit({ idempotencyKey: "needle-key" }))],+ [+ "steering.promptSignature",+ steeringEntry("steering_accepted", steeringAudit({ promptSignature: "needle-key" })),+ ],+ ] as const)("finds an accepted entry by %s", async (_name, target) => {+ // given+ const repoRoot = await makeRepo();+ await appendLedger(repoRoot, steeringEntry("steering_accepted", steeringAudit({ idempotencyKey: "other-key" })));+ await appendLedger(repoRoot, target);++ // when+ const found = await findAcceptedSteeringLedgerEntry(repoRoot, "needle-key");++ // then+ expect(found).toEqual(target);+ });++ it("skips a rejected entry carrying the same key", async () => {+ // given+ const repoRoot = await makeRepo();+ await appendLedger(+ repoRoot,+ steeringEntry("steering_rejected", rejectedSteeringAudit({ idempotencyKey: "needle-key" })),+ );++ // when/then+ await expect(findAcceptedSteeringLedgerEntry(repoRoot, "needle-key")).resolves.toBeUndefined();+ });++ it("returns the accepted entry even when a rejected one with the same key precedes it", async () => {+ // given+ const repoRoot = await makeRepo();+ const accepted = steeringEntry("steering_accepted", steeringAudit({ idempotencyKey: "needle-key" }));+ await appendLedger(+ repoRoot,+ steeringEntry("steering_rejected", rejectedSteeringAudit({ idempotencyKey: "needle-key" })),+ );+ await appendLedger(repoRoot, accepted);++ // when/then+ await expect(findAcceptedSteeringLedgerEntry(repoRoot, "needle-key")).resolves.toEqual(accepted);+ });++ it("returns undefined when the ledger file is missing", async () => {+ // given+ const repoRoot = await makeRepo();++ // when/then+ await expect(findAcceptedSteeringLedgerEntry(repoRoot, "needle-key")).resolves.toBeUndefined();+ });++ it("ignores the key when it only appears in non-steering entries", async () => {+ // given+ const repoRoot = await makeRepo();+ await appendLedger(repoRoot, { at: NOW, kind: "goal_completed", goalId: "G001", idempotencyKey: "needle-key" });+ await appendLedger(repoRoot, { at: NOW, kind: "evidence_captured", goalId: "G001", evidence: "needle-key" });++ // when/then+ await expect(findAcceptedSteeringLedgerEntry(repoRoot, "needle-key")).resolves.toBeUndefined();+ });++ it("ignores an accepted entry whose key only appears in evidence text", async () => {+ // given+ const repoRoot = await makeRepo();+ await appendLedger(repoRoot, steeringEntry("steering_accepted", steeringAudit({ evidence: "needle-key" })));++ // when/then+ await expect(findAcceptedSteeringLedgerEntry(repoRoot, "needle-key")).resolves.toBeUndefined();+ });++ it("finds the key inside a legacy entry embedding full before/after plans", async () => {+ // given+ const repoRoot = await makeRepo();+ const bulkyGoals = Array.from({ length: 20 }, (_, index) =>+ makeGoal({ id: `G${String(index + 1).padStart(3, "0")}`, objective: `evidence detail ${index} `.repeat(200) }),+ );+ const bulkyPlan = makePlan({ goals: bulkyGoals });+ const legacyLine = JSON.stringify({+ at: NOW,+ kind: "steering_accepted",+ goalId: "G001",+ idempotencyKey: "needle-key",+ before: bulkyPlan,+ after: bulkyPlan,+ steering: { ...steeringAudit({ idempotencyKey: "needle-key" }), before: bulkyPlan, after: bulkyPlan },+ });+ await mkdir(ulwLoopDir(repoRoot), { recursive: true });+ await appendFile(ulwLoopLedgerPath(repoRoot), `${legacyLine}\n`, "utf8");++ // when+ const found = await findAcceptedSteeringLedgerEntry(repoRoot, "needle-key");++ // then+ expect(legacyLine.length).toBeGreaterThan(100_000);+ expect(found?.kind).toBe("steering_accepted");+ expect(found?.idempotencyKey).toBe("needle-key");+ });+});+describe("withUlwLoopMutationLock", () => {it("serializes concurrent invocations", async () => {// given@@ -236,4 +383,115 @@ describe("withUlwLoopMutationLock", () => {expect(maxActive).toBe(1);expect(await readFile(counterPath, "utf8")).toBe("3");});++ it("propagates the body rejection and keeps later calls working", async () => {+ // given+ const repoRoot = await makeRepo();++ // when+ const failure = withUlwLoopMutationLock(repoRoot, async () => {+ throw new Error("body exploded");+ });++ // then+ await expect(failure).rejects.toThrow("body exploded");+ await expect(withUlwLoopMutationLock(repoRoot, async () => "recovered")).resolves.toBe("recovered");+ });++ it("still serializes a second batch after the first batch's gate settles", async () => {+ // given+ const repoRoot = await makeRepo();+ let active = 0;+ let maxActive = 0;+ const body = async (): Promise<void> => {+ active += 1;+ maxActive = Math.max(maxActive, active);+ await tick();+ active -= 1;+ };++ // when+ await Promise.all([1, 2, 3].map(() => withUlwLoopMutationLock(repoRoot, body)));+ await tick();+ await Promise.all([1, 2].map(() => withUlwLoopMutationLock(repoRoot, body)));++ // then+ expect(maxActive).toBe(1);+ });++ it("keeps an in-flight successor locked when an earlier gate settles", async () => {+ // given+ const repoRoot = await makeRepo();+ const events: string[] = [];+ let releaseSecond = false;++ // when+ const first = withUlwLoopMutationLock(repoRoot, async () => {+ events.push("first");+ });+ const second = withUlwLoopMutationLock(repoRoot, async () => {+ events.push("second:start");+ while (!releaseSecond) await tick();+ events.push("second:end");+ });+ await first;+ await tick();+ const third = withUlwLoopMutationLock(repoRoot, async () => {+ events.push("third");+ });+ releaseSecond = true;+ await Promise.all([second, third]);++ // then+ expect(events).toEqual(["first", "second:start", "second:end", "third"]);+ });++ it("does not serialize distinct repo roots against each other", async () => {+ // given+ const rootA = await makeRepo();+ const rootB = await makeRepo();+ const events: string[] = [];+ let releaseA = false;++ // when+ const held = withUlwLoopMutationLock(rootA, async () => {+ events.push("a:start");+ while (!releaseA) await tick();+ events.push("a:end");+ });+ await withUlwLoopMutationLock(rootB, async () => {+ events.push("b");+ });+ releaseA = true;+ await held;++ // then+ expect(events).toEqual(["a:start", "b", "a:end"]);+ });++ it("serializes per scope while distinct scopes stay independent", async () => {+ // given+ const repoRoot = await makeRepo();+ const scoped = { sessionId: "session-a" };+ const events: string[] = [];+ let releaseScoped = false;++ // when+ const heldScoped = withUlwLoopMutationLock(repoRoot, scoped, async () => {+ events.push("scoped-1:start");+ while (!releaseScoped) await tick();+ events.push("scoped-1:end");+ });+ const queuedScoped = withUlwLoopMutationLock(repoRoot, scoped, async () => {+ events.push("scoped-2");+ });+ await withUlwLoopMutationLock(repoRoot, async () => {+ events.push("root-scope");+ });+ releaseScoped = true;+ await Promise.all([heldScoped, queuedScoped]);++ // then+ expect(events).toEqual(["scoped-1:start", "root-scope", "scoped-1:end", "scoped-2"]);+ });});diff --git a/plugins/omo/components/ulw-loop/test/steering-snapshot.test.ts b/plugins/omo/components/ulw-loop/test/steering-snapshot.test.tsnew file mode 100644index 00000000..ece8c186--- /dev/null+++ b/plugins/omo/components/ulw-loop/test/steering-snapshot.test.ts@@ -0,0 +1,124 @@+import { describe, expect, it } from "vitest";+import { buildSteeringPlanSnapshot, changedGoalIdsBetween } from "../src/steering-snapshot.js";+import type { UlwLoopItem, UlwLoopPlan } from "../src/types.js";++const NOW = "2026-05-23T00:00:00.000Z";++function goal(id: string, overrides: Partial<UlwLoopItem> = {}): UlwLoopItem {+ return {+ id,+ title: `Goal ${id}`,+ objective: `Objective for ${id}`,+ status: "pending",+ successCriteria: [],+ attempt: 0,+ createdAt: NOW,+ updatedAt: NOW,+ ...overrides,+ };+}++function plan(goals: UlwLoopItem[], overrides: Partial<UlwLoopPlan> = {}): UlwLoopPlan {+ return {+ version: 1,+ createdAt: NOW,+ updatedAt: NOW,+ briefPath: ".omo/ulw-loop/brief.md",+ goalsPath: ".omo/ulw-loop/goals.json",+ ledgerPath: ".omo/ulw-loop/ledger.jsonl",+ goals,+ ...overrides,+ };+}++describe("changedGoalIdsBetween", () => {+ it.each([+ {+ name: "added goal",+ before: [goal("G001"), goal("G002")],+ after: [goal("G001"), goal("G002"), goal("G003")],+ expected: ["G003"],+ },+ {+ name: "removed goal",+ before: [goal("G001"), goal("G002")],+ after: [goal("G001")],+ expected: ["G002"],+ },+ {+ name: "mutated goal",+ before: [goal("G001"), goal("G002")],+ after: [goal("G001"), goal("G002", { title: "Rewritten" })],+ expected: ["G002"],+ },+ {+ name: "reordered-only goals",+ before: [goal("G001"), goal("G002"), goal("G003")],+ after: [goal("G003"), goal("G001"), goal("G002")],+ expected: [],+ },+ {+ name: "identical plans",+ before: [goal("G001"), goal("G002")],+ after: [goal("G001"), goal("G002")],+ expected: [],+ },+ {+ name: "add + remove + mutate at once",+ before: [goal("G001"), goal("G002"), goal("G003")],+ after: [goal("G001", { status: "blocked" }), goal("G003"), goal("G004")],+ expected: ["G001", "G002", "G004"],+ },+ ])("detects $name", ({ before, after, expected }) => {+ // when+ const changed = changedGoalIdsBetween(plan(before), plan(after));++ // then+ expect([...changed].sort()).toEqual(expected);+ });+});++describe("buildSteeringPlanSnapshot", () => {+ it("includes only changed goals while keeping full goalIds order and goalCount", () => {+ // given+ const goals = [goal("G001"), goal("G002"), goal("G003"), goal("G004")];+ const source = plan(goals);++ // when+ const snapshot = buildSteeringPlanSnapshot(source, new Set(["G003"]));++ // then+ expect(snapshot.goals.map((item) => item.id)).toEqual(["G003"]);+ expect(snapshot.goals[0]).toEqual(goals[2]);+ expect(snapshot.goalIds).toEqual(["G001", "G002", "G003", "G004"]);+ expect(snapshot.goalCount).toBe(4);+ expect(snapshot.updatedAt).toBe(NOW);+ });++ it("omits the activeGoalId key entirely when the plan has none", () => {+ // when+ const snapshot = buildSteeringPlanSnapshot(plan([goal("G001")]), new Set(["G001"]));++ // then+ expect("activeGoalId" in snapshot).toBe(false);+ });++ it("carries activeGoalId when the plan has one", () => {+ // when+ const snapshot = buildSteeringPlanSnapshot(plan([goal("G001")], { activeGoalId: "G001" }), new Set());++ // then+ expect(snapshot.activeGoalId).toBe("G001");+ });++ it("keeps plan order for changed goals regardless of set insertion order", () => {+ // given+ const source = plan([goal("G001"), goal("G002"), goal("G003")]);++ // when+ const snapshot = buildSteeringPlanSnapshot(source, new Set(["G003", "G001"]));++ // then+ expect(snapshot.goals.map((item) => item.id)).toEqual(["G001", "G003"]);+ });+});diff --git a/plugins/omo/components/ulw-loop/test/steering.test.ts b/plugins/omo/components/ulw-loop/test/steering.test.tsindex cfd7e3ff..7904b3eb 100644--- a/plugins/omo/components/ulw-loop/test/steering.test.ts+++ b/plugins/omo/components/ulw-loop/test/steering.test.ts@@ -1,8 +1,8 @@-import { mkdtemp, readFile } from "node:fs/promises";+import { appendFile, mkdtemp, readFile } from "node:fs/promises";import { tmpdir } from "node:os";import { join } from "node:path";import { describe, expect, it } from "vitest";-import { ulwLoopGoalsPath } from "../src/paths.js";+import { ulwLoopGoalsPath, ulwLoopLedgerPath } from "../src/paths.js";import { readSteeringLedgerEntries, readUlwLoopPlan, writePlan } from "../src/plan-io.js";import {applySteeringMutation,@@ -12,6 +12,7 @@ import {} from "../src/steering.js";import type {UlwLoopItem,+ UlwLoopLedgerEntry,UlwLoopPlan,UlwLoopSteeringProposal,UlwLoopSuccessCriterion,@@ -320,6 +321,104 @@ describe("steerUlwLoop", () => {expect(second.deduped).toBe(true);expect((await readUlwLoopPlan(repoRoot)).goals).toHaveLength(4);});++ describe("compact steering ledger entries", () => {+ const DETAIL = "evidence detail ".repeat(200);++ function fatGoal(id: string): UlwLoopItem {+ return goal({+ id,+ title: `Fat goal ${id}`,+ objective: `Objective ${id}: ${DETAIL}`,+ evidence: DETAIL,+ successCriteria: [+ criterion({ id: "C001", scenario: DETAIL, expectedEvidence: DETAIL }),+ criterion({ id: "C002", scenario: DETAIL, expectedEvidence: DETAIL }),+ ],+ });+ }++ function fatPlan(): UlwLoopPlan {+ return plan({+ goals: Array.from({ length: 20 }, (_, index) => fatGoal(`G${String(index + 1).padStart(3, "0")}`)),+ });+ }++ it("writes an O(changed goals) ledger entry instead of embedding the full plan", async () => {+ // given+ const seed = fatPlan();+ const planBytes = JSON.stringify(seed).length;+ const repoRoot = await repoWithPlan(seed);++ // when+ await steerUlwLoop(+ repoRoot,+ steering({ kind: "revise_pending_wording", targetGoalId: "G010", revisedTitle: "Sharper goal ten" }),+ );++ // then+ const lines = (await readFile(ulwLoopLedgerPath(repoRoot), "utf8")).split("\n").filter(Boolean);+ expect(lines).toHaveLength(1);+ const line = lines[0] ?? "";+ expect(line.length).toBeLessThan(planBytes / 4);+ const entry: UlwLoopLedgerEntry = JSON.parse(line);+ expect("before" in entry).toBe(false);+ expect("after" in entry).toBe(false);+ expect(entry.steering?.before?.goals.map((item) => item.id)).toEqual(["G010"]);+ expect(entry.steering?.after?.goals.map((item) => item.id)).toEqual(["G010"]);+ expect(entry.steering?.after?.goals[0]?.title).toBe("Sharper goal ten");+ expect(entry.steering?.before?.goalCount).toBe(20);+ expect(entry.steering?.before?.goalIds).toEqual(seed.goals.map((item) => item.id));+ });+ });++ it("dedup against a legacy full-plan entry strips before/after from the returned audit", async () => {+ // given+ const seed = plan();+ const repoRoot = await repoWithPlan(seed);+ const legacyLine = JSON.stringify({+ at: NOW,+ kind: "steering_accepted",+ goalId: "G001",+ idempotencyKey: "legacy-key",+ evidence: "observable blocker evidence",+ message: "the plan must change to stay safe",+ mutationKind: "revise_pending_wording",+ steering: {+ kind: "revise_pending_wording",+ source: "cli",+ targetGoalIds: ["G001"],+ evidence: "observable blocker evidence",+ rationale: "the plan must change to stay safe",+ idempotencyKey: "legacy-key",+ invariant: {+ accepted: true,+ structuralInvariantAccepted: true,+ evidenceBackedNecessity: true,+ noEasierCompletion: true,+ rejectedReasons: [],+ },+ before: seed,+ after: seed,+ },+ });+ await appendFile(ulwLoopLedgerPath(repoRoot), `${legacyLine}\n`, "utf8");++ // when+ const result = await steerUlwLoop(repoRoot, steering({ idempotencyKey: "legacy-key" }));++ // then+ expect(result.deduped).toBe(true);+ expect(result.accepted).toBe(true);+ expect("before" in result.audit).toBe(false);+ expect("after" in result.audit).toBe(false);+ expect(result.audit).toMatchObject({+ kind: "revise_pending_wording",+ idempotencyKey: "legacy-key",+ deduped: true,+ });+ expect((await readUlwLoopPlan(repoRoot)).goals).toEqual(seed.goals);+ });});describe("parseUlwLoopSteeringDirective", () => {diff --git a/plugins/omo/dist/cli-node/index.js b/plugins/omo/dist/cli-node/index.jsindex 51c9410f..a6c3d18b 100755--- a/plugins/omo/dist/cli-node/index.js+++ b/plugins/omo/dist/cli-node/index.js@@ -2146,7 +2146,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "4.16.0",+ version: "4.16.1",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2192,10 +2192,11 @@ var init_package = __esm(() => {"dist","bin","postinstall.mjs",+ "script/qa/strip-ansi.mjs","script/qa/web-terminal-redaction.d.mts","script/qa/web-terminal-redaction.mjs",- "script/qa/web-terminal-renderer.mjs","script/qa/web-terminal-visual-qa.mjs",+ "script/qa/xterm-live-terminal.mjs","docs/reference/github-attachment-upload.md","docs/reference/web-terminal-visual-qa.md",".opencode/command",@@ -2261,6 +2262,7 @@ var init_package = __esm(() => {"build:all": "bun run build && bun run build:binaries","build:binaries": "bun run script/build-binaries.ts","build:schema": "bun run script/build-schema.ts",+ "build:omo-schema": "bun run script/build-omo-schema.ts","build:model-capabilities": "bun run script/build-model-capabilities.ts",clean: "rm -rf dist",prepack: "bun run build:materialize-frontend",@@ -2317,51 +2319,55 @@ var init_package = __esm(() => {zod: "^4.4.3"},devDependencies: {- "@oh-my-opencode/git-bash-mcp": "workspace:*",- "@oh-my-opencode/lsp-core": "workspace:*",- "@oh-my-opencode/mcp-stdio-core": "workspace:*",- "@oh-my-opencode/mcp-client-core": "workspace:*","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/boulder-state": "workspace:*","@oh-my-opencode/claude-code-compat-core": "workspace:*",- "@oh-my-opencode/skills-loader-core": "workspace:*","@oh-my-opencode/comment-checker-core": "workspace:*","@oh-my-opencode/delegate-core": "workspace:*",+ "@oh-my-opencode/git-bash-mcp": "workspace:*","@oh-my-opencode/hashline-core": "workspace:*",- "@oh-my-opencode/tmux-core": "workspace:*",- "@oh-my-opencode/team-core": "workspace:*",- "@oh-my-opencode/openclaw-core": "workspace:*",+ "@oh-my-opencode/lsp-core": "workspace:*",+ "@oh-my-opencode/mcp-client-core": "workspace:*",+ "@oh-my-opencode/mcp-stdio-core": "workspace:*","@oh-my-opencode/model-core": "workspace:*",- "@oh-my-opencode/omo-config-core": "workspace:*","@oh-my-opencode/omo-codex": "workspace:*",+ "@oh-my-opencode/omo-config-core": "workspace:*","@oh-my-opencode/omo-senpi": "workspace:*",- "@oh-my-opencode/senpi-task": "workspace:*",+ "@oh-my-opencode/openclaw-core": "workspace:*","@oh-my-opencode/pi-goal": "workspace:*","@oh-my-opencode/pi-webfetch": "workspace:*","@oh-my-opencode/prompts-core": "workspace:*","@oh-my-opencode/rules-engine": "workspace:*",+ "@oh-my-opencode/senpi-task": "workspace:*","@oh-my-opencode/shared-skills": "workspace:*",+ "@oh-my-opencode/skills-loader-core": "workspace:*",+ "@oh-my-opencode/team-core": "workspace:*","@oh-my-opencode/telemetry-core": "workspace:*",+ "@oh-my-opencode/tmux-core": "workspace:*","@oh-my-opencode/utils": "workspace:*",- "@typescript/native-preview": "7.0.0-dev.20260518.1","@types/js-yaml": "^4.0.9","@types/picomatch": "^4.0.3",+ "@typescript/native-preview": "7.0.0-dev.20260518.1",+ "@xterm/addon-unicode11": "^0.9.0",+ "@xterm/xterm": "^6.0.0","bun-types": "1.3.14",+ "node-pty": "^1.1.0",+ "puppeteer-core": "^25.3.0",typescript: "^6.0.3"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "4.16.0",- "oh-my-opencode-darwin-x64": "4.16.0",- "oh-my-opencode-darwin-x64-baseline": "4.16.0",- "oh-my-opencode-linux-arm64": "4.16.0",- "oh-my-opencode-linux-arm64-musl": "4.16.0",- "oh-my-opencode-linux-x64": "4.16.0",- "oh-my-opencode-linux-x64-baseline": "4.16.0",- "oh-my-opencode-linux-x64-musl": "4.16.0",- "oh-my-opencode-linux-x64-musl-baseline": "4.16.0",- "oh-my-opencode-windows-arm64": "4.16.0",- "oh-my-opencode-windows-x64": "4.16.0",- "oh-my-opencode-windows-x64-baseline": "4.16.0"+ "oh-my-opencode-darwin-arm64": "4.16.1",+ "oh-my-opencode-darwin-x64": "4.16.1",+ "oh-my-opencode-darwin-x64-baseline": "4.16.1",+ "oh-my-opencode-linux-arm64": "4.16.1",+ "oh-my-opencode-linux-arm64-musl": "4.16.1",+ "oh-my-opencode-linux-x64": "4.16.1",+ "oh-my-opencode-linux-x64-baseline": "4.16.1",+ "oh-my-opencode-linux-x64-musl": "4.16.1",+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.1",+ "oh-my-opencode-windows-arm64": "4.16.1",+ "oh-my-opencode-windows-x64": "4.16.1",+ "oh-my-opencode-windows-x64-baseline": "4.16.1"},overrides: {"@earendil-works/pi-agent-core": "0.80.3",@@ -66684,20 +66690,20 @@ var init_config_manager = __esm(() => {// packages/telemetry-core/src/activity-state.tsimport { existsSync as existsSync28, mkdirSync as mkdirSync8, readFileSync as readFileSync13 } from "node:fs";-import { basename as basename10, join as join50 } from "node:path";+import { basename as basename10, join as join51 } from "node:path";function resolveTelemetryStateDir(product, options = {}) {const dataDir = resolveXdgDataDir(product.cacheDirName, {env: options.env,osProvider: options.osProvider});- const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join50(options.env.XDG_DATA_HOME, product.cacheDirName);+ const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join51(options.env.XDG_DATA_HOME, product.cacheDirName);if (dataDir === xdgStateDir || xdgStateDir === undefined && basename10(dataDir) === product.cacheDirName) {return dataDir;}- return join50(dataDir, product.cacheDirName);+ return join51(dataDir, product.cacheDirName);}function getTelemetryActivityStateFilePath(stateDir) {- return join50(stateDir, POSTHOG_ACTIVITY_STATE_FILE);+ return join51(stateDir, POSTHOG_ACTIVITY_STATE_FILE);}function getDailyActiveCaptureState(input) {const state = readPostHogActivityState(input.stateDir, input.diagnostics);@@ -66768,9 +66774,9 @@ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY =// packages/telemetry-core/src/diagnostics.tsimport { appendFileSync as appendFileSync2, existsSync as existsSync29, mkdirSync as mkdirSync9, readFileSync as readFileSync14 } from "node:fs";-import { join as join51 } from "node:path";+import { join as join52 } from "node:path";function getTelemetryDiagnosticsFilePath(diagnosticsDir) {- return join51(diagnosticsDir, DIAGNOSTICS_FILE_NAME);+ return join52(diagnosticsDir, DIAGNOSTICS_FILE_NAME);}function writeTelemetryDiagnostic(input, options) {const now = options.now ?? new Date;@@ -72491,7 +72497,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "4.16.0",+ version: "4.16.1",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",@@ -73461,7 +73467,7 @@ var init_update_toasts = __esm(() => {// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.tsimport { existsSync as existsSync49 } from "node:fs";-import { dirname as dirname27, join as join69 } from "node:path";+import { dirname as dirname27, join as join70 } from "node:path";import { fileURLToPath as fileURLToPath5 } from "node:url";function defaultGetModuleHostingWorkspace() {try {@@ -73615,7 +73621,7 @@ var init_background_update_check = __esm(() => {init_update_toasts();defaultDeps4 = {existsSync: existsSync49,- join: join69,+ join: join70,runBunInstallWithDetails,log: log2,getOpenCodeCacheDir,@@ -74224,7 +74230,7 @@ function getUnsupportedOpenCodeVersionMessage(openCodeVersion) {}// packages/omo-codex/src/install/install-codex.ts-import { join as join52, resolve as resolve15 } from "node:path";+import { join as join53, resolve as resolve15 } from "node:path";import { existsSync as existsSync30 } from "node:fs";import { homedir as homedir6 } from "node:os";@@ -77182,7 +77188,11 @@ function stampHookGroups(hooks, version) {function stampHookStatusMessage(hook, version) {if (!isPlainRecord3(hook) || typeof hook.statusMessage !== "string")return;- hook.statusMessage = hook.statusMessage.replace(/^LazyCodex\([^)]+\):\s*/, "(OmO) ");+ hook.statusMessage = hook.statusMessage.replace(/^(?:LazyCodex\([^)]+\):|\(OmO(?:\s+[^)]+)?\))\s*/, `(OmO ${normalizeHookStatusVersion(version)}) `);+}+function normalizeHookStatusVersion(version) {+ const normalized = version.trim();+ return normalized.length === 0 ? "local" : normalized;}// packages/omo-codex/src/install/codex-process.ts@@ -77527,11 +77537,32 @@ function resolveCodexInstallerBinDir(input) {return resolve14(homeDir, ".local", "bin");}-// packages/omo-codex/src/install/omo-sot-migration.ts+// packages/omo-codex/src/install/codex-git-bash-hooks.ts+import { readFile as readFile19, writeFile as writeFile10 } from "node:fs/promises";import { join as join48 } from "node:path";+var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([+ "./hooks/pre-tool-use-recommending-git-bash-mcp.json",+ "./hooks/post-compact-resetting-git-bash-mcp-reminder.json"+]);+async function removeGitBashHooksOffWindows(input) {+ if (input.platform === "win32")+ return;+ const manifestPath = join48(input.pluginRoot, ".codex-plugin", "plugin.json");+ const parsed = JSON.parse(await readFile19(manifestPath, "utf8"));+ if (!isPlainRecord3(parsed) || !Array.isArray(parsed.hooks))+ return;+ const hooks = parsed.hooks.filter((hook) => typeof hook !== "string" || !WINDOWS_ONLY_GIT_BASH_HOOKS.has(hook));+ if (hooks.length === parsed.hooks.length)+ return;+ await writeFile10(manifestPath, `${JSON.stringify({ ...parsed, hooks }, null, "\t")}+`);+}++// packages/omo-codex/src/install/omo-sot-migration.ts+import { join as join49 } from "node:path";async function seedAndMigrateOmoSot(input) {const commandEnv = { ...input.env };- const scriptPath = join48(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");+ const scriptPath = join49(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");try {await input.runCommand(process.execPath, [scriptPath, "--seed"], {cwd: input.repoRoot,@@ -77546,7 +77577,7 @@ async function seedAndMigrateOmoSot(input) {// packages/omo-codex/src/install/install-ast-grep-sg.tsinit_src();-import { join as join49 } from "node:path";+import { join as join50 } from "node:path";function describeResult(result) {if (result.kind === "succeeded")return null;@@ -77560,7 +77591,7 @@ async function installAstGrepForCodex(options) {return;const platform = options.platform ?? process.platform;const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);- const skillDir = join49(plugin.path, "skills", "ast-grep");+ const skillDir = join50(plugin.path, "skills", "ast-grep");const installer = options.installer ?? runAstGrepSkillInstall;try {const result = await installer({ platform, skillDir, targetDir });@@ -77594,7 +77625,7 @@ async function runCodexInstaller(options = {}) {const env3 = options.env ?? process.env;const platform = options.platform ?? process.platform;const repoRoot = resolve15(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env3 }));- const codexHome = resolve15(options.codexHome ?? env3.CODEX_HOME ?? join52(homedir6(), ".codex"));+ const codexHome = resolve15(options.codexHome ?? env3.CODEX_HOME ?? join53(homedir6(), ".codex"));const projectDirectory = resolve15(options.projectDirectory ?? env3.OMO_CODEX_PROJECT ?? process.cwd());const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env3 });const runCommand = options.runCommand ?? defaultRunCommand;@@ -77610,9 +77641,9 @@ async function runCodexInstaller(options = {}) {if (!gitBashResolution.found) {throw new Error(gitBashResolution.installHint);}- const codexPackageRoot = join52(repoRoot, "packages", "omo-codex");+ const codexPackageRoot = join53(repoRoot, "packages", "omo-codex");const marketplace = await readMarketplace(repoRoot, {- marketplacePath: join52(codexPackageRoot, "marketplace.json")+ marketplacePath: join53(codexPackageRoot, "marketplace.json")});const distributionManifest = await readDistributionManifest(repoRoot);const installed = [];@@ -77644,6 +77675,7 @@ async function runCodexInstaller(options = {}) {if (marketplace.name === "sisyphuslabs" && plugin.name === "omo") {await stampLazyCodexPluginVersion({ pluginRoot: plugin.path, version: version2 });await writeLazyCodexInstallSnapshot({ pluginRoot: plugin.path, distributionManifest });+ await removeGitBashHooksOffWindows({ platform, pluginRoot: plugin.path });}const links = await linkCachedPluginBins({ binDir, pluginRoot: plugin.path, platform });for (const link of links) {@@ -77654,7 +77686,7 @@ async function runCodexInstaller(options = {}) {if (runtimeLink !== null)log4(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);else- log4(`Warning: skipped the omo runtime wrapper because ${join52(repoRoot, "dist", "cli", "index.js")} is missing; omo ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);+ log4(`Warning: skipped the omo runtime wrapper because ${join53(repoRoot, "dist", "cli", "index.js")} is missing; omo ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);}pluginSources.push({ name: entry.name, sourcePath });installed.push(plugin);@@ -77708,13 +77740,13 @@ async function runCodexInstaller(options = {}) {});}await reapLspDaemons(codexHome).catch(() => []);- const marketplaceRoot = join52(codexHome, "plugins", "cache", marketplace.name);+ const marketplaceRoot = join53(codexHome, "plugins", "cache", marketplace.name);await writeCachedMarketplaceManifest({marketplaceName: marketplace.name,marketplaceRoot,plugins: installed});- const configPath = join52(codexHome, "config.toml");+ const configPath = join53(codexHome, "config.toml");await updateCodexConfig({configPath,repoRoot: codexPackageRoot,@@ -77774,7 +77806,7 @@ function findRepoRootFromImporter(importerDir) {for (let depth = 0;depth <= 7; depth += 1) {if (isRepoRootWithCodexPlugin(current))return current;- for (const wrapperPackageRoot of [join52(current, "node_modules", "oh-my-openagent"), join52(current, "oh-my-openagent")]) {+ for (const wrapperPackageRoot of [join53(current, "node_modules", "oh-my-openagent"), join53(current, "oh-my-openagent")]) {if (isRepoRootWithCodexPlugin(wrapperPackageRoot))return wrapperPackageRoot;}@@ -77792,7 +77824,7 @@ function findRepoRoot(input) {return findRepoRootFromImporter(input.importerDir);}function isRepoRootWithCodexPlugin(repoRoot) {- return existsSync30(join52(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));+ return existsSync30(join53(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));}function codexMarketplaceSource(marketplaceRoot) {return { sourceType: "local", source: marketplaceRoot };@@ -77927,12 +77959,12 @@ function defaultRunCommand2(command, args) {});}// packages/omo-codex/src/install/codex-cleanup.ts-import { lstat as lstat11, readFile as readFile20, readdir as readdir9, rm as rm11, rmdir } from "node:fs/promises";+import { lstat as lstat11, readFile as readFile21, readdir as readdir9, rm as rm11, rmdir } from "node:fs/promises";import { homedir as homedir8 } from "node:os";-import { isAbsolute as isAbsolute10, join as join54, relative as relative7, resolve as resolve17 } from "node:path";+import { isAbsolute as isAbsolute10, join as join55, relative as relative7, resolve as resolve17 } from "node:path";// packages/omo-codex/src/install/codex-cleanup-config.ts-import { lstat as lstat10, mkdir as mkdir8, readFile as readFile19, writeFile as writeFile10 } from "node:fs/promises";+import { lstat as lstat10, mkdir as mkdir8, readFile as readFile20, writeFile as writeFile11 } from "node:fs/promises";import { dirname as dirname18 } from "node:path";var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];@@ -77962,14 +77994,14 @@ function cleanupCodexLightConfigText(config) {async function cleanupCodexConfig(configPath, now) {if (!await configExists(configPath))return { changed: false };- const original = await readFile19(configPath, "utf8");+ const original = await readFile20(configPath, "utf8");const next = cleanupCodexLightConfigText(original);if (next === original)return { changed: false };const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;await mkdir8(dirname18(configPath), { recursive: true });- await writeFile10(backupPath, original);- await writeFile10(configPath, `${next.trimEnd()}+ await writeFile11(backupPath, original);+ await writeFile11(configPath, `${next.trimEnd()}`);return { changed: true, backupPath };}@@ -78046,7 +78078,7 @@ function nodeErrorCode4(error) {}// packages/omo-codex/src/install/codex-cleanup-safety.ts-import { dirname as dirname19, isAbsolute as isAbsolute9, join as join53, relative as relative6, resolve as resolve16 } from "node:path";+import { dirname as dirname19, isAbsolute as isAbsolute9, join as join54, relative as relative6, resolve as resolve16 } from "node:path";function validateManagedCleanupTarget(input) {if (!isAbsolute9(input.path))return skipped(input.path, "outside managed Codex cleanup scope");@@ -78059,11 +78091,11 @@ function validateManagedCleanupTarget(input) {if (target === codexHome)return skipped(input.path, "outside managed Codex cleanup scope");const exactManagedRoots = new Set([- resolve16(join53(codexHome, "plugins", "cache", "sisyphuslabs")),- resolve16(join53(codexHome, ".tmp", "marketplaces", "sisyphuslabs")),- resolve16(join53(codexHome, "runtime", "ast-grep")),- resolve16(join53(codexHome, "runtime", "node")),- resolve16(join53(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap"))+ resolve16(join54(codexHome, "plugins", "cache", "sisyphuslabs")),+ resolve16(join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs")),+ resolve16(join54(codexHome, "runtime", "ast-grep")),+ resolve16(join54(codexHome, "runtime", "node")),+ resolve16(join54(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap"))]);if (exactManagedRoots.has(target))return null;@@ -78093,8 +78125,8 @@ function skipped(path7, reason) {var INSTALLED_AGENTS_MANIFEST = ".installed-agents.json";async function cleanupCodexLight(input = {}) {const env3 = input.env ?? process.env;- const codexHome = resolve17(input.codexHome ?? env3.CODEX_HOME ?? join54(homedir8(), ".codex"));- const configPath = join54(codexHome, "config.toml");+ const codexHome = resolve17(input.codexHome ?? env3.CODEX_HOME ?? join55(homedir8(), ".codex"));+ const configPath = join55(codexHome, "config.toml");const agentPaths = await collectInstalledAgentPaths(codexHome, configPath);const configCleanup = await cleanupCodexConfig(configPath, input.now);const agentCleanup = await removeManifestListedAgentLinks(codexHome, agentPaths);@@ -78133,17 +78165,17 @@ async function cleanupCodexLight(input = {}) {}function managedGlobalStatePaths(codexHome) {return [- join54(codexHome, "plugins", "cache", "sisyphuslabs"),- join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs"),- join54(codexHome, "runtime", "ast-grep"),- join54(codexHome, "runtime", "node"),- join54(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap")+ join55(codexHome, "plugins", "cache", "sisyphuslabs"),+ join55(codexHome, ".tmp", "marketplaces", "sisyphuslabs"),+ join55(codexHome, "runtime", "ast-grep"),+ join55(codexHome, "runtime", "node"),+ join55(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap")];}var BOOTSTRAP_DATA_GLOB_MAX_DEPTH = 5;async function collectBootstrapDataDirsByGlob(codexHome) {const results = [];- await walkForManagedBootstrapDirs(join54(codexHome, "plugins"), 0, results);+ await walkForManagedBootstrapDirs(join55(codexHome, "plugins"), 0, results);return results;}async function walkForManagedBootstrapDirs(directory, depth, results) {@@ -78155,9 +78187,9 @@ async function walkForManagedBootstrapDirs(directory, depth, results) {for (const entry of entries) {if (!entry.isDirectory())continue;- const childPath = join54(directory, entry.name);+ const childPath = join55(directory, entry.name);if (isManagedBootstrapOwnerName(entry.name)) {- const bootstrapDir = join54(childPath, "bootstrap");+ const bootstrapDir = join55(childPath, "bootstrap");if (await exists5(bootstrapDir))results.push(bootstrapDir);continue;@@ -78191,7 +78223,7 @@ async function attemptRemove(path7) {}async function pruneEmptyRuntimeDirBestEffort(codexHome) {try {- await rmdir(join54(codexHome, "runtime"));+ await rmdir(join55(codexHome, "runtime"));} catch (error) {if (isExpectedRuntimePruneFailure(error))return;@@ -78203,14 +78235,14 @@ function isExpectedRuntimePruneFailure(error) {}async function collectInstalledAgentPaths(codexHome, configPath) {const manifestPaths = [- join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)+ join55(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)];- const versionRoot = join54(codexHome, "plugins", "cache", "sisyphuslabs", "omo");+ const versionRoot = join55(codexHome, "plugins", "cache", "sisyphuslabs", "omo");if (await exists5(versionRoot)) {const entries = await readdir9(versionRoot, { withFileTypes: true });for (const entry of entries) {if (entry.isDirectory())- manifestPaths.push(join54(versionRoot, entry.name, INSTALLED_AGENTS_MANIFEST));+ manifestPaths.push(join55(versionRoot, entry.name, INSTALLED_AGENTS_MANIFEST));}}const paths = new Set;@@ -78227,19 +78259,19 @@ async function collectInstalledAgentPaths(codexHome, configPath) {async function readManagedAgentPathsFromConfig(codexHome, configPath) {if (!await exists5(configPath))return [];- const config = await readFile20(configPath, "utf8");- return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join54(codexHome, "agents", `${agentName}.toml`));+ const config = await readFile21(configPath, "utf8");+ return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join55(codexHome, "agents", `${agentName}.toml`));}async function readInstalledAgentManifest(manifestPath) {if (!await exists5(manifestPath))return [];- const parsed = JSON.parse(await readFile20(manifestPath, "utf8"));+ const parsed = JSON.parse(await readFile21(manifestPath, "utf8"));if (!isPlainRecord3(parsed) || !Array.isArray(parsed.agents))return [];return parsed.agents.filter((path7) => typeof path7 === "string");}async function removeManifestListedAgentLinks(codexHome, paths) {- const agentsDir = join54(codexHome, "agents");+ const agentsDir = join55(codexHome, "agents");const removed = [];const skipped2 = [];for (const path7 of paths) {@@ -78292,16 +78324,16 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".// packages/omo-senpi/src/install/install-senpi.tsimport { execFile as execFile3 } from "node:child_process";import { constants as constants7, existsSync as existsSync32 } from "node:fs";-import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile21, rename as rename5, writeFile as writeFile11 } from "node:fs/promises";+import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile22, rename as rename5, writeFile as writeFile12 } from "node:fs/promises";import { homedir as homedir9 } from "node:os";-import { dirname as dirname20, join as join55, resolve as resolve18 } from "node:path";+import { dirname as dirname20, join as join56, resolve as resolve18 } from "node:path";import { fileURLToPath } from "node:url";import { promisify as promisify2 } from "node:util";var execFileAsync2 = promisify2(execFile3);var REQUIRED_PLUGIN_ARTIFACTS = [- join55("extensions", "omo.js"),- join55("skills", "ultrawork", "SKILL.md"),- join55("skills", "ulw-loop", "SKILL.md")+ join56("extensions", "omo.js"),+ join56("skills", "ultrawork", "SKILL.md"),+ join56("skills", "ulw-loop", "SKILL.md")];async function runSenpiInstaller(options = {}) {const context = resolveInstallContext(options);@@ -78326,13 +78358,13 @@ async function runSenpiInstaller(options = {}) {function resolveInstallContext(options) {const env3 = options.env ?? process.env;const repoRoot = resolve18(options.repoRoot ?? findRepoRoot2(dirname20(fileURLToPath(import.meta.url))));- const agentDir = resolve18(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join55(homedir9(), ".senpi", "agent"));- const pluginPath = resolve18(options.pluginPath ?? join55(repoRoot, "packages", "omo-senpi", "plugin"));+ const agentDir = resolve18(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join56(homedir9(), ".senpi", "agent"));+ const pluginPath = resolve18(options.pluginPath ?? join56(repoRoot, "packages", "omo-senpi", "plugin"));return {env: env3,repoRoot,agentDir,- settingsPath: join55(agentDir, "settings.json"),+ settingsPath: join56(agentDir, "settings.json"),pluginPath,runCommand: options.runCommand ?? defaultRunCommand3};@@ -78341,12 +78373,12 @@ async function ensurePluginArtifacts(context) {const missing = await hasMissingPluginArtifact(context.pluginPath);if (!missing)return;- await context.runCommand("node", [join55(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });- await context.runCommand("node", [join55(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });+ await context.runCommand("node", [join56(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });+ await context.runCommand("node", [join56(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });}async function hasMissingPluginArtifact(pluginPath) {for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {- if (!await fileExists(join55(pluginPath, artifact)))+ if (!await fileExists(join56(pluginPath, artifact)))return true;}return false;@@ -78361,7 +78393,7 @@ async function defaultRunCommand3(command, args, options) {async function readSettings(settingsPath) {let raw;try {- raw = await readFile21(settingsPath, "utf8");+ raw = await readFile22(settingsPath, "utf8");} catch (error) {if (isErrno(error, "ENOENT"))return {};@@ -78390,11 +78422,11 @@ async function writeSettingsAtomically(settingsPath, settings) {if (await fileExists(settingsPath)) {await copyFile3(settingsPath, backupPath);} else {- await writeFile11(backupPath, `{}+ await writeFile12(backupPath, `{}`, "utf8");}const tempPath = `${settingsPath}.${process.pid}.${Date.now()}.tmp`;- await writeFile11(tempPath, `${JSON.stringify(settings, null, 2)}+ await writeFile12(tempPath, `${JSON.stringify(settings, null, 2)}`, "utf8");await rename5(tempPath, settingsPath);return backupPath;@@ -78414,7 +78446,7 @@ function timestampForBackup() {function findRepoRoot2(importerDir) {let current = importerDir;for (let depth = 0;depth <= 7; depth += 1) {- if (fileExistsSync(join55(current, "packages", "omo-senpi", "plugin", "package.json")))+ if (fileExistsSync(join56(current, "packages", "omo-senpi", "plugin", "package.json")))return current;current = resolve18(current, "..");}@@ -78474,19 +78506,19 @@ init_provider_availability();// packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.tsimport { existsSync as existsSync34, mkdirSync as mkdirSync10, readFileSync as readFileSync16 } from "node:fs";-import { join as join57 } from "node:path";+import { join as join58 } from "node:path";// packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.tsinit_shared();import { existsSync as existsSync33, readFileSync as readFileSync15 } from "node:fs";-import { join as join56 } from "node:path";+import { join as join57 } from "node:path";var TUI_SUBPATH = "tui";var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;function fileEntryPackageJsonPath(entry) {let path7 = entry.slice("file:".length);if (path7.startsWith("//"))path7 = path7.slice(2);- return join56(path7, "package.json");+ return join57(path7, "package.json");}function packageJsonExportsTui(pkgJsonPath) {if (!existsSync33(pkgJsonPath))@@ -78524,7 +78556,7 @@ function packageExportsTuiForServerEntry(entry) {const packageName = packageNameFromServerEntry(entry);if (packageName === null)return null;- return packageJsonExportsTui(join56(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));+ return packageJsonExportsTui(join57(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));}function isOurFilePluginEntry(entry) {if (typeof entry !== "string" || !entry.startsWith("file:"))@@ -78589,7 +78621,7 @@ function detectServerPluginRegistration() {}}function detectTuiPluginRegistration() {- const tuiJsonPath = join56(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");+ const tuiJsonPath = join57(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");if (!existsSync33(tuiJsonPath)) {return {registered: false,@@ -78745,10 +78777,10 @@ function readConfig(path7) {return null;}function readServerConfig(configDir) {- const jsoncPath = join57(configDir, "opencode.jsonc");+ const jsoncPath = join58(configDir, "opencode.jsonc");if (existsSync34(jsoncPath))return readConfig(jsoncPath);- const jsonPath = join57(configDir, "opencode.json");+ const jsonPath = join58(configDir, "opencode.json");if (existsSync34(jsonPath))return readConfig(jsonPath);return null;@@ -78790,7 +78822,7 @@ function ensureTuiPluginEntry(opts = {}) {if (!desiredEntry) {return { changed: false, reason: "no-server-entry" };}- const tuiJsonPath = join57(configDir, "tui.json");+ const tuiJsonPath = join58(configDir, "tui.json");const { config, malformed } = readTuiConfig(tuiJsonPath);if (malformed) {return { changed: false, reason: "malformed" };@@ -78806,7 +78838,7 @@ function ensureTuiPluginEntry(opts = {}) {// packages/omo-opencode/src/cli/install-ast-grep-sg.tsimport { homedir as homedir10 } from "node:os";-import { join as join58 } from "node:path";+import { join as join59 } from "node:path";// packages/shared-skills/index.mjsimport { fileURLToPath as fileURLToPath2 } from "node:url";@@ -78825,9 +78857,9 @@ function describeResult2(result) {}async function installAstGrepForOpenCode(options = {}) {const platform = options.platform ?? process.platform;- const baseDir = join58(options.homeDir ?? homedir10(), ".omo");+ const baseDir = join59(options.homeDir ?? homedir10(), ".omo");const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);- const skillDir = join58(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");+ const skillDir = join59(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");const installer = options.installer ?? runAstGrepSkillInstall;try {const result = await installer({ platform, skillDir, targetDir });@@ -97326,9 +97358,9 @@ function readCurrentTopLevelTask(planPath) {}// packages/boulder-state/src/storage/path.tsimport { existsSync as existsSync38 } from "node:fs";-import { isAbsolute as isAbsolute11, join as join60, relative as relative8, resolve as resolve19 } from "node:path";+import { isAbsolute as isAbsolute11, join as join61, relative as relative8, resolve as resolve19 } from "node:path";function getBoulderFilePath(directory) {- return join60(directory, BOULDER_DIR, BOULDER_FILE);+ return join61(directory, BOULDER_DIR, BOULDER_FILE);}function resolveTrackedPath(baseDirectory, trackedPath) {return isAbsolute11(trackedPath) ? resolve19(trackedPath) : resolve19(baseDirectory, trackedPath);@@ -97555,9 +97587,9 @@ init_state();var CONTINUATION_MARKER_DIR = ".omo/run-continuation";// packages/omo-opencode/src/features/run-continuation-state/storage.tsimport { existsSync as existsSync41, mkdirSync as mkdirSync11, readFileSync as readFileSync21, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";-import { join as join61 } from "node:path";+import { join as join62 } from "node:path";function getMarkerPath(directory, sessionID) {- return join61(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);+ return join62(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);}function readContinuationMarker(directory, sessionID) {const markerPath = getMarkerPath(directory, sessionID);@@ -97630,7 +97662,7 @@ async function isSessionInBoulderLineage(input) {init_shared();init_compaction_marker();import { readFileSync as readFileSync22, readdirSync as readdirSync6 } from "node:fs";-import { join as join62 } from "node:path";+import { join as join63 } from "node:path";var defaultSessionLastAgentDeps = {getMessageDir,isSqliteBackend,@@ -97690,7 +97722,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {try {const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {try {- const content = readFileSync22(join62(messageDir, fileName), "utf-8");+ const content = readFileSync22(join63(messageDir, fileName), "utf-8");const parsed = JSON.parse(content);return {fileName,@@ -97734,7 +97766,7 @@ init_agent_display_names();// packages/omo-opencode/src/hooks/ralph-loop/storage.tsinit_frontmatter2();import { existsSync as existsSync42, readFileSync as readFileSync23, writeFileSync as writeFileSync7, unlinkSync as unlinkSync5, mkdirSync as mkdirSync12 } from "node:fs";-import { dirname as dirname23, join as join63 } from "node:path";+import { dirname as dirname23, join as join64 } from "node:path";// packages/omo-opencode/src/hooks/ralph-loop/constants.tsvar DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";@@ -97743,7 +97775,7 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";// packages/omo-opencode/src/hooks/ralph-loop/storage.tsfunction getStateFilePath(directory, customPath) {- return customPath ? join63(directory, customPath) : join63(directory, DEFAULT_STATE_FILE);+ return customPath ? join64(directory, customPath) : join64(directory, DEFAULT_STATE_FILE);}function readState(directory, customPath) {const filePath = getStateFilePath(directory, customPath);@@ -98715,6 +98747,10 @@ function formatVersionOutput(info) {lines.push(` ${SYMBOLS3.pin} ${import_picocolors17.default.magenta(`Version pinned to ${info.pinnedVersion}`)}`);lines.push(` ${import_picocolors17.default.dim("Update check skipped for pinned versions")}`);break;+ case "pinned-mismatch":+ lines.push(` ${SYMBOLS3.warn} ${import_picocolors17.default.yellow(`Version pinned to ${info.pinnedVersion} but running ${info.currentVersion}`)}`);+ lines.push(` ${import_picocolors17.default.dim("The pin only skips the update check; it does not control which version OpenCode loads")}`);+ break;case "error":lines.push(` ${SYMBOLS3.cross} ${import_picocolors17.default.red("Unable to check for updates")}`);lines.push(` ${import_picocolors17.default.dim("Network error or npm registry unavailable")}`);@@ -98751,14 +98787,16 @@ async function getLocalVersion(options = {}) {}const pluginInfo = findPluginEntry(directory);if (pluginInfo?.isPinned) {+ const actualVersion = getCachedVersion();+ const isMismatch = actualVersion !== null && actualVersion !== pluginInfo.pinnedVersion;const info2 = {- currentVersion: pluginInfo.pinnedVersion,+ currentVersion: isMismatch ? actualVersion : pluginInfo.pinnedVersion,latestVersion: null,isUpToDate: false,isLocalDev: false,isPinned: true,pinnedVersion: pluginInfo.pinnedVersion,- status: "pinned"+ status: isMismatch ? "pinned-mismatch" : "pinned"};console.log(options.json ? formatJsonOutput(info2) : formatVersionOutput(info2));return 0;@@ -98827,7 +98865,7 @@ init_extract_semver();init_bun_which_shim();import { existsSync as existsSync50, accessSync as accessSync4, constants as constants10 } from "node:fs";import { homedir as homedir14 } from "node:os";-import { join as join70 } from "node:path";+import { join as join71 } from "node:path";// packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.tsinit_spawn_with_windows_hide();@@ -98919,17 +98957,17 @@ function getDesktopAppPaths(platform) {case "darwin":return ["/Applications/OpenCode.app/Contents/MacOS/OpenCode",- join70(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")+ join71(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")];case "win32": {const programFiles = process.env.ProgramFiles;const localAppData = process.env.LOCALAPPDATA;const paths = [];if (programFiles) {- paths.push(join70(programFiles, "OpenCode", "OpenCode.exe"));+ paths.push(join71(programFiles, "OpenCode", "OpenCode.exe"));}if (localAppData) {- paths.push(join70(localAppData, "OpenCode", "OpenCode.exe"));+ paths.push(join71(localAppData, "OpenCode", "OpenCode.exe"));}return paths;}@@ -98937,8 +98975,8 @@ function getDesktopAppPaths(platform) {return ["/usr/bin/opencode","/usr/lib/opencode/opencode",- join70(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),- join70(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")+ join71(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),+ join71(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")];default:return [];@@ -98970,7 +99008,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exiconst candidates = getCommandCandidates2(platform);for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {for (const command of candidates) {- const fullPath = join70(entry, command);+ const fullPath = join71(entry, command);if (checkExists(fullPath) && isExecutable2(fullPath)) {return { binary: command, path: fullPath };}@@ -99112,22 +99150,22 @@ init_package_json_locator();import { existsSync as existsSync52, readFileSync as readFileSync32, readdirSync as readdirSync8 } from "node:fs";import { createRequire as createRequire3 } from "node:module";import { homedir as homedir15 } from "node:os";-import { join as join71 } from "node:path";+import { join as join72 } from "node:path";import { fileURLToPath as fileURLToPath6 } from "node:url";init_shared();function getPlatformDefaultCacheDir(platform = process.platform) {if (platform === "darwin")- return join71(homedir15(), "Library", "Caches");+ return join72(homedir15(), "Library", "Caches");if (platform === "win32")- return process.env.LOCALAPPDATA ?? join71(homedir15(), "AppData", "Local");- return join71(homedir15(), ".cache");+ return process.env.LOCALAPPDATA ?? join72(homedir15(), "AppData", "Local");+ return join72(homedir15(), ".cache");}function resolveOpenCodeCacheDir() {const xdgCacheHome = process.env.XDG_CACHE_HOME;if (xdgCacheHome)- return join71(xdgCacheHome, "opencode");+ return join72(xdgCacheHome, "opencode");const fromShared = getOpenCodeCacheDir();- const platformDefault = join71(getPlatformDefaultCacheDir(), "opencode");+ const platformDefault = join72(getPlatformDefaultCacheDir(), "opencode");if (existsSync52(fromShared) || !existsSync52(platformDefault))return fromShared;return platformDefault;@@ -99159,11 +99197,11 @@ function normalizeVersion(value) {function createPackageCandidates(rootDir) {return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({packageName,- installedPackagePath: join71(rootDir, "node_modules", packageName, "package.json")+ installedPackagePath: join72(rootDir, "node_modules", packageName, "package.json")}));}function createTaggedInstallCandidates(rootDir) {- const packagesDir = join71(rootDir, "packages");+ const packagesDir = join72(rootDir, "packages");if (!existsSync52(packagesDir))return [];const candidates = [];@@ -99171,14 +99209,14 @@ function createTaggedInstallCandidates(rootDir) {const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));if (packageName === undefined)continue;- const installDir = join71(packagesDir, entryName);+ const installDir = join72(packagesDir, entryName);candidates.push({cacheDir: installDir,- cachePackagePath: join71(installDir, "package.json"),+ cachePackagePath: join72(installDir, "package.json"),packageCandidates: [{packageName,- installedPackagePath: join71(installDir, "node_modules", packageName, "package.json")+ installedPackagePath: join72(installDir, "node_modules", packageName, "package.json")}]});@@ -99223,13 +99261,13 @@ function getLoadedPluginVersion() {const candidates = [{cacheDir: configDir,- cachePackagePath: join71(configDir, "package.json"),+ cachePackagePath: join72(configDir, "package.json"),packageCandidates: createPackageCandidates(configDir)},...createTaggedInstallCandidates(configDir),{cacheDir,- cachePackagePath: join71(cacheDir, "package.json"),+ cachePackagePath: join72(cacheDir, "package.json"),packageCandidates: createPackageCandidates(cacheDir)},...createTaggedInstallCandidates(cacheDir)@@ -99536,18 +99574,18 @@ function validatePluginConfig(directory) {init_shared();import { existsSync as existsSync54, readFileSync as readFileSync35 } from "node:fs";import { homedir as homedir17 } from "node:os";-import { join as join72 } from "node:path";+import { join as join73 } from "node:path";function getUserConfigDir2() {const xdgConfig = process.env.XDG_CONFIG_HOME;if (xdgConfig)- return join72(xdgConfig, "opencode");- return join72(homedir17(), ".config", "opencode");+ return join73(xdgConfig, "opencode");+ return join73(homedir17(), ".config", "opencode");}function loadCustomProviderNames() {const configDir = getUserConfigDir2();const candidatePaths = [- join72(configDir, "opencode.json"),- join72(configDir, "opencode.jsonc")+ join73(configDir, "opencode.json"),+ join73(configDir, "opencode.jsonc")];for (const configPath of candidatePaths) {if (!existsSync54(configPath))@@ -99568,7 +99606,7 @@ function loadCustomProviderNames() {return [];}function loadAvailableModelsFromCache() {- const cacheFile = join72(getOpenCodeCacheDir(), "models.json");+ const cacheFile = join73(getOpenCodeCacheDir(), "models.json");const customProviders = loadCustomProviderNames();if (!existsSync54(cacheFile)) {if (customProviders.length > 0) {@@ -99605,8 +99643,8 @@ init_model_capabilities2();init_shared();init_plugin_identity();import { readFileSync as readFileSync36 } from "node:fs";-import { join as join73 } from "node:path";-var PROJECT_CONFIG_DIR = join73(process.cwd(), ".opencode");+import { join as join74 } from "node:path";+var PROJECT_CONFIG_DIR = join74(process.cwd(), ".opencode");function loadOmoConfig() {const projectDetected = detectPluginConfigFile(PROJECT_CONFIG_DIR, {basenames: [CONFIG_BASENAME],@@ -99644,7 +99682,7 @@ function loadOmoConfig() {// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.tsinit_shared();-import { join as join74 } from "node:path";+import { join as join75 } from "node:path";// packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.tsfunction formatModelWithVariant(model, variant) {@@ -99686,7 +99724,7 @@ function formatCapabilityResolutionLabel(mode) {}function buildModelResolutionDetails(options) {const details = [];- const cacheFile = join74(getOpenCodeCacheDir(), "models.json");+ const cacheFile = join75(getOpenCodeCacheDir(), "models.json");details.push("═══ Available Models (from cache) ═══");details.push("");if (options.available.cacheExists) {@@ -99965,25 +100003,25 @@ init_src();import { existsSync as existsSync55 } from "node:fs";import { createRequire as createRequire4 } from "node:module";import { homedir as homedir19 } from "node:os";-import { dirname as dirname29, join as join76 } from "node:path";+import { dirname as dirname29, join as join77 } from "node:path";// packages/omo-opencode/src/hooks/comment-checker/downloader.ts-import { join as join75 } from "path";+import { join as join76 } from "path";import { homedir as homedir18, tmpdir as tmpdir3 } from "os";init_binary_downloader();init_logger2();init_plugin_identity();var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";-var DEBUG_FILE = join75(tmpdir3(), "comment-checker-debug.log");+var DEBUG_FILE = join76(tmpdir3(), "comment-checker-debug.log");function getCacheDir2() {if (process.platform === "win32") {const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;- const base2 = localAppData || join75(homedir18(), "AppData", "Local");- return join75(base2, CACHE_DIR_NAME, "bin");+ const base2 = localAppData || join76(homedir18(), "AppData", "Local");+ return join76(base2, CACHE_DIR_NAME, "bin");}const xdgCache = process.env.XDG_CACHE_HOME;- const base = xdgCache || join75(homedir18(), ".cache");- return join75(base, CACHE_DIR_NAME, "bin");+ const base = xdgCache || join76(homedir18(), ".cache");+ return join76(base, CACHE_DIR_NAME, "bin");}function getBinaryName() {return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";@@ -100033,7 +100071,7 @@ async function getBinaryVersion(binary) {}}async function checkAstGrepCli() {- const runtimeDir = astGrepRuntimeDir(join76(homedir19(), ".omo"));+ const runtimeDir = astGrepRuntimeDir(join77(homedir19(), ".omo"));const sgPath = findSgBinarySync({ runtimeDir });if (sgPath === null) {return {@@ -100063,10 +100101,10 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPathconst platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;try {const packageDir = baseDirOverride ?? dirname29(resolvePackageJsonPath());- const vendorPath = join76(packageDir, "vendor", platformKey, binaryName);+ const vendorPath = join77(packageDir, "vendor", platformKey, binaryName);if (existsSync55(vendorPath))return vendorPath;- const binPath = join76(packageDir, "bin", binaryName);+ const binPath = join77(packageDir, "bin", binaryName);if (existsSync55(binPath))return binPath;} catch (error51) {@@ -100212,7 +100250,7 @@ async function getGhCliInfo(dependencies = {}) {// packages/omo-opencode/src/cli/doctor/checks/tools-lsp.tsimport { readFileSync as readFileSync37 } from "node:fs";-import { join as join77 } from "node:path";+import { join as join78 } from "node:path";// packages/omo-opencode/src/mcp/lsp.tsimport { existsSync as existsSync56 } from "node:fs";@@ -100419,7 +100457,7 @@ function readOmoConfig(configDirectory) {}function isLspMcpDisabled(options) {const userConfigDirectory = options.configDirectory ?? getOpenCodeConfigDir({ binary: "opencode" });- const projectConfigDirectory = join77(options.cwd ?? process.cwd(), ".opencode");+ const projectConfigDirectory = join78(options.cwd ?? process.cwd(), ".opencode");const userConfig = readOmoConfig(userConfigDirectory);const projectConfig = readOmoConfig(projectConfigDirectory);const disabledMcps = new Set([@@ -100440,13 +100478,13 @@ function getInstalledLspServers(options = {}) {init_shared();import { existsSync as existsSync57, readFileSync as readFileSync38 } from "node:fs";import { homedir as homedir20 } from "node:os";-import { join as join78 } from "node:path";+import { join as join79 } from "node:path";var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];function getMcpConfigPaths() {return [- join78(homedir20(), ".claude", ".mcp.json"),- join78(process.cwd(), ".mcp.json"),- join78(process.cwd(), ".claude", ".mcp.json")+ join79(homedir20(), ".claude", ".mcp.json"),+ join79(process.cwd(), ".mcp.json"),+ join79(process.cwd(), ".claude", ".mcp.json")];}function loadUserMcpConfig() {@@ -100746,9 +100784,9 @@ async function pathExists(dir) {// packages/omo-opencode/src/cli/doctor/checks/codex.tsinit_src();import { existsSync as existsSync59 } from "node:fs";-import { lstat as lstat12, readdir as readdir10, readFile as readFile22 } from "node:fs/promises";+import { lstat as lstat12, readdir as readdir10, readFile as readFile23 } from "node:fs/promises";import { homedir as homedir22 } from "node:os";-import { basename as basename13, join as join79, resolve as resolve22 } from "node:path";+import { basename as basename13, join as join80, resolve as resolve22 } from "node:path";// packages/omo-opencode/package.jsonvar package_default3 = {name: "@oh-my-opencode/omo-opencode",@@ -100806,13 +100844,13 @@ var CODEX_BIN_NAMES = ["omo-git-bash-hook"];async function gatherCodexSummary(deps = {}) {- const codexHome = resolve22(deps.codexHome ?? process.env.CODEX_HOME ?? join79(homedir22(), ".codex"));+ const codexHome = resolve22(deps.codexHome ?? process.env.CODEX_HOME ?? join80(homedir22(), ".codex"));const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();const pluginRoot = await resolveInstalledPluginRoot(codexHome);- const manifest = pluginRoot === null ? null : await readJson(join79(pluginRoot, ".codex-plugin", "plugin.json"));- const installSnapshot = pluginRoot === null ? null : await readJson(join79(pluginRoot, "lazycodex-install.json"));- const configPath = join79(codexHome, "config.toml");+ const manifest = pluginRoot === null ? null : await readJson(join80(pluginRoot, ".codex-plugin", "plugin.json"));+ const installSnapshot = pluginRoot === null ? null : await readJson(join80(pluginRoot, "lazycodex-install.json"));+ const configPath = join80(codexHome, "config.toml");const pluginVersion = stringField(manifest, "version");return {codexPath: detection.found && "path" in detection ? detection.path : null,@@ -100869,7 +100907,7 @@ function buildCodexIssues(summary) {if (summary.pluginRoot === null) {issues.push({title: "OMO Codex plugin is not installed",- description: `Expected cached plugin at ${join79("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,+ description: `Expected cached plugin at ${join80("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,fix: "Run: npx lazycodex-ai install",severity: "error",affects: ["plugin loading"]@@ -100934,12 +100972,12 @@ function buildCodexIssues(summary) {return issues;}async function resolveInstalledPluginRoot(codexHome) {- const pluginRoot = join79(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);+ const pluginRoot = join80(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);if (!existsSync59(pluginRoot))return null;const versions2 = await readdir10(pluginRoot, { withFileTypes: true });const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);- return candidates.length === 0 ? null : join79(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);+ return candidates.length === 0 ? null : join80(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);}async function readCodexConfigSummary(configPath) {if (!existsSync59(configPath)) {@@ -100953,7 +100991,7 @@ async function readCodexConfigSummary(configPath) {companionLifecycleHookStateEvents: []};}- const content = await readFile22(configPath, "utf8");+ const content = await readFile23(configPath, "utf8");return {exists: true,marketplaceConfigured: content.includes("[marketplaces.sisyphuslabs]"),@@ -100967,13 +101005,13 @@ async function readCodexConfigSummary(configPath) {async function readLinkedBins(binDir) {const linked = [];for (const name of CODEX_BIN_NAMES) {- if (await pathExists2(join79(binDir, process.platform === "win32" ? `${name}.cmd` : name)))+ if (await pathExists2(join80(binDir, process.platform === "win32" ? `${name}.cmd` : name)))linked.push(name);}return linked;}async function readLinkedAgents(codexHome) {- const agentsDir = join79(codexHome, "agents");+ const agentsDir = join80(codexHome, "agents");if (!existsSync59(agentsDir))return [];const entries = await readdir10(agentsDir, { withFileTypes: true });@@ -100981,7 +101019,7 @@ async function readLinkedAgents(codexHome) {}async function readJson(path16) {try {- const parsed = JSON.parse(await readFile22(path16, "utf8"));+ const parsed = JSON.parse(await readFile23(path16, "utf8"));return isPlainRecord(parsed) ? parsed : null;} catch (error51) {if (error51 instanceof Error)@@ -101087,9 +101125,9 @@ async function pathExists2(path16) {// packages/omo-opencode/src/cli/doctor/checks/codex-components.tsinit_src();-import { readdir as readdir11, readFile as readFile23, stat as stat6 } from "node:fs/promises";+import { readdir as readdir11, readFile as readFile24, stat as stat6 } from "node:fs/promises";import { homedir as homedir23 } from "node:os";-import { dirname as dirname31, isAbsolute as isAbsolute12, join as join80, relative as relative10, resolve as resolve23, sep as sep9 } from "node:path";+import { dirname as dirname31, isAbsolute as isAbsolute12, join as join81, relative as relative10, resolve as resolve23, sep as sep9 } from "node:path";var CODEX_COMPONENTS_CHECK_ID = "codex-components";var CODEX_COMPONENTS_CHECK_NAME = "codex-components";var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";@@ -101099,7 +101137,7 @@ async function checkCodexComponents(deps = {}) {const env3 = deps.env ?? process.env;const platform = deps.platform ?? process.platform;const arch = deps.arch ?? process.arch;- const codexHome = resolve23(deps.codexHome ?? env3["CODEX_HOME"] ?? join80(homedir23(), ".codex"));+ const codexHome = resolve23(deps.codexHome ?? env3["CODEX_HOME"] ?? join81(homedir23(), ".codex"));const summary = await gatherCodexSummary({ ...deps, codexHome });if (summary.pluginRoot === null) {return {@@ -101124,7 +101162,7 @@ async function checkCodexComponents(deps = {}) {});}const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);- const runtimeSgPath = join80(runtimeSgDir, sgBinaryName(platform));+ const runtimeSgPath = join81(runtimeSgDir, sgBinaryName(platform));const sg = findSgBinarySync({arch,env: env3,@@ -101236,7 +101274,7 @@ async function findManifestPaths(root, manifestName) {for (const entry of entries) {if (entry.name === "node_modules" || entry.name === ".git")continue;- const entryPath = join80(root, entry.name);+ const entryPath = join81(root, entry.name);if (entry.isDirectory()) {paths2.push(...await findManifestPaths(entryPath, manifestName));continue;@@ -101280,18 +101318,18 @@ function isPluginRuntimePathArg(arg) {return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));}function runtimeSgDirectory(codexHome, platform, arch) {- return join80(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));+ return join81(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));}function describeSgSource(sgPath, env3, runtimeSgDir, platform) {const override = env3[SG_PATH_ENV_KEY]?.trim();if (override !== undefined && override.length > 0 && sgPath === override)return `env override ${SG_PATH_ENV_KEY}`;- if (sgPath === join80(runtimeSgDir, sgBinaryName(platform)))+ if (sgPath === join81(runtimeSgDir, sgBinaryName(platform)))return "runtime dir";return "PATH";}async function readBootstrapStateSummary(codexHome) {- const statePath = join80(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");+ const statePath = join81(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");const raw = await readJson2(statePath);if (raw === null)return null;@@ -101340,7 +101378,7 @@ function degradedDetailLines(entries) {}async function readJson2(path16) {try {- const parsed = JSON.parse(await readFile23(path16, "utf8"));+ const parsed = JSON.parse(await readFile24(path16, "utf8"));return isRecord5(parsed) ? parsed : null;} catch (error51) {if (error51 instanceof Error)@@ -101368,17 +101406,17 @@ function isRecord5(value) {// packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.tsimport { existsSync as existsSync60 } from "node:fs";-import { readFile as readFile24 } from "node:fs/promises";+import { readFile as readFile25 } from "node:fs/promises";import { homedir as homedir24 } from "node:os";-import { join as join81, resolve as resolve24 } from "node:path";+import { join as join82, resolve as resolve24 } from "node:path";var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";var CHECK_NAME = "codex-runtime-wrapper";var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";async function checkCodexRuntimeWrapper(deps = {}) {- const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join81(homedir24(), ".codex"));+ const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join82(homedir24(), ".codex"));const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });const platform = deps.platform ?? process.platform;- const wrapperPath = join81(binDir, platform === "win32" ? "omo.cmd" : "omo");+ const wrapperPath = join82(binDir, platform === "win32" ? "omo.cmd" : "omo");const wrapper = await readRuntimeWrapper(wrapperPath);const issues = [];if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {@@ -101403,7 +101441,7 @@ async function checkCodexRuntimeWrapper(deps = {}) {}async function readRuntimeWrapper(path16) {try {- return await readFile24(path16, "utf8");+ return await readFile25(path16, "utf8");} catch (error51) {if (error51 instanceof Error)return null;@@ -101890,12 +101928,12 @@ import {unlinkSync as unlinkSync8,writeFileSync as writeFileSync11} from "node:fs";-import { basename as basename14, dirname as dirname32, join as join84 } from "node:path";+import { basename as basename14, dirname as dirname32, join as join85 } from "node:path";// packages/mcp-client-core/src/config-dir.tsimport { existsSync as existsSync61, realpathSync as realpathSync8 } from "node:fs";import { homedir as homedir25 } from "node:os";-import { join as join82, resolve as resolve25 } from "node:path";+import { join as join83, resolve as resolve25 } from "node:path";function resolveConfigPath2(pathValue) {const resolvedPath = resolve25(pathValue);if (!existsSync61(resolvedPath))@@ -101913,13 +101951,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {if (customConfigDir) {return resolveConfigPath2(customConfigDir);}- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join82(homedir25(), ".config");- return resolveConfigPath2(join82(xdgConfigDir, "opencode"));+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join83(homedir25(), ".config");+ return resolveConfigPath2(join83(xdgConfigDir, "opencode"));}// packages/mcp-client-core/src/mcp-oauth/storage-index.tsimport { chmodSync as chmodSync3, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync6, writeFileSync as writeFileSync10 } from "node:fs";-import { join as join83 } from "node:path";+import { join as join84 } from "node:path";var INDEX_FILE_NAME = "index.json";function isTokenIndex(value) {if (typeof value !== "object" || value === null || Array.isArray(value))@@ -101927,7 +101965,7 @@ function isTokenIndex(value) {return Object.values(value).every((entry) => typeof entry === "string");}function getIndexPath(storageDir) {- return join83(storageDir, INDEX_FILE_NAME);+ return join84(storageDir, INDEX_FILE_NAME);}function readTokenIndex(storageDir) {const indexPath = getIndexPath(storageDir);@@ -101971,16 +102009,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {var STORAGE_DIR_NAME = "mcp-oauth";var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";function getMcpOauthStorageDir() {- return join84(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);+ return join85(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);}function getMcpOauthServerHash(serverHost, resource) {return createHash4("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);}function getMcpOauthStoragePath(serverHost, resource) {- return join84(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);+ return join85(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);}function getLegacyStoragePath() {- return join84(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);+ return join85(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);}function normalizeHost2(serverHost) {let host = serverHost.trim();@@ -102159,7 +102197,7 @@ function listTokensByHost(serverHost) {for (const [hash2, indexedKey] of Object.entries(index)) {if (!indexedKey.startsWith(prefix))continue;- const indexedToken = readTokenFile(join84(getMcpOauthStorageDir(), `${hash2}.json`));+ const indexedToken = readTokenFile(join85(getMcpOauthStorageDir(), `${hash2}.json`));if (indexedToken)result[indexedKey] = indexedToken;}@@ -102174,7 +102212,7 @@ function listAllTokens() {for (const entry of readdirSync9(dir, { withFileTypes: true })) {if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")continue;- const token = readTokenFile(join84(dir, entry.name));+ const token = readTokenFile(join85(dir, entry.name));const hash2 = basename14(entry.name, ".json");if (token)result[index[hash2] ?? hash2] = token;@@ -102898,8 +102936,9 @@ async function boulder(options) {}// packages/omo-opencode/src/cli/codex-ulw-loop.tsimport { spawn as spawn5 } from "node:child_process";-import { existsSync as existsSync65, realpathSync as realpathSync9 } from "node:fs";+import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync9 } from "node:fs";import { homedir as homedir26 } from "node:os";+var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";function resolveCodexUlwLoopCommand(input = {}) {const env3 = input.env ?? process.env;const homeDir = input.homeDir ?? homedir26();@@ -102912,6 +102951,8 @@ function resolveCodexUlwLoopCommand(input = {}) {});if (componentCli !== null)return { executable: process.execPath, argsPrefix: [componentCli] };+ if (env3[ULW_LOOP_DELEGATION_SENTINEL] === "1")+ return null;const legacyLocalBin = resolveLegacyLocalOmoBin(env3, homeDir, input.currentExecutablePaths ?? [process.argv[1]].filter((value) => typeof value === "string"));if (legacyLocalBin !== null)return { executable: legacyLocalBin, argsPrefix: ["ulw-loop"] };@@ -102923,14 +102964,17 @@ async function codexUlwLoop(args) {console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");return 1;}- return new Promise((resolve26) => {- const child = spawn5(command.executable, [...command.argsPrefix, ...args], { stdio: "inherit" });- child.on("error", (error51) => {- console.error(error51.message);- resolve26(1);- });- child.on("close", (code) => resolve26(code ?? 1));+ const { promise: promise2, resolve: resolve26 } = Promise.withResolvers();+ const child = spawn5(command.executable, [...command.argsPrefix, ...args], {+ stdio: "inherit",+ env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }+ });+ child.on("error", (error51) => {+ console.error(error51.message);+ resolve26(1);});+ child.on("close", (code) => resolve26(code ?? 1));+ return promise2;}function resolveLocalUlwLoopBin(env3, homeDir) {const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });@@ -102938,7 +102982,16 @@ function resolveLocalUlwLoopBin(env3, homeDir) {}function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });- return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths)) ?? null;+ return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;+}+function isGeneratedRuntimeWrapper(candidate) {+ try {+ return readFileSync43(candidate, "utf8").includes(RUNTIME_WRAPPER_MARKER);+ } catch (error51) {+ if (error51 instanceof Error)+ return false;+ return false;+ }}function isCurrentExecutable(candidate, currentExecutablePaths) {const candidateRealPath = realpathOrSelf(candidate);diff --git a/plugins/omo/dist/cli/index.js b/plugins/omo/dist/cli/index.jsindex f4915bbe..6d2b4b93 100755--- a/plugins/omo/dist/cli/index.js+++ b/plugins/omo/dist/cli/index.js@@ -2145,7 +2145,7 @@ var package_default;var init_package = __esm(() => {package_default = {name: "oh-my-opencode",- version: "4.16.0",+ version: "4.16.1",description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",main: "./dist/index.js",types: "dist/index.d.ts",@@ -2191,10 +2191,11 @@ var init_package = __esm(() => {"dist","bin","postinstall.mjs",+ "script/qa/strip-ansi.mjs","script/qa/web-terminal-redaction.d.mts","script/qa/web-terminal-redaction.mjs",- "script/qa/web-terminal-renderer.mjs","script/qa/web-terminal-visual-qa.mjs",+ "script/qa/xterm-live-terminal.mjs","docs/reference/github-attachment-upload.md","docs/reference/web-terminal-visual-qa.md",".opencode/command",@@ -2260,6 +2261,7 @@ var init_package = __esm(() => {"build:all": "bun run build && bun run build:binaries","build:binaries": "bun run script/build-binaries.ts","build:schema": "bun run script/build-schema.ts",+ "build:omo-schema": "bun run script/build-omo-schema.ts","build:model-capabilities": "bun run script/build-model-capabilities.ts",clean: "rm -rf dist",prepack: "bun run build:materialize-frontend",@@ -2316,51 +2318,55 @@ var init_package = __esm(() => {zod: "^4.4.3"},devDependencies: {- "@oh-my-opencode/git-bash-mcp": "workspace:*",- "@oh-my-opencode/lsp-core": "workspace:*",- "@oh-my-opencode/mcp-stdio-core": "workspace:*",- "@oh-my-opencode/mcp-client-core": "workspace:*","@oh-my-opencode/agents-md-core": "workspace:*","@oh-my-opencode/boulder-state": "workspace:*","@oh-my-opencode/claude-code-compat-core": "workspace:*",- "@oh-my-opencode/skills-loader-core": "workspace:*","@oh-my-opencode/comment-checker-core": "workspace:*","@oh-my-opencode/delegate-core": "workspace:*",+ "@oh-my-opencode/git-bash-mcp": "workspace:*","@oh-my-opencode/hashline-core": "workspace:*",- "@oh-my-opencode/tmux-core": "workspace:*",- "@oh-my-opencode/team-core": "workspace:*",- "@oh-my-opencode/openclaw-core": "workspace:*",+ "@oh-my-opencode/lsp-core": "workspace:*",+ "@oh-my-opencode/mcp-client-core": "workspace:*",+ "@oh-my-opencode/mcp-stdio-core": "workspace:*","@oh-my-opencode/model-core": "workspace:*",- "@oh-my-opencode/omo-config-core": "workspace:*","@oh-my-opencode/omo-codex": "workspace:*",+ "@oh-my-opencode/omo-config-core": "workspace:*","@oh-my-opencode/omo-senpi": "workspace:*",- "@oh-my-opencode/senpi-task": "workspace:*",+ "@oh-my-opencode/openclaw-core": "workspace:*","@oh-my-opencode/pi-goal": "workspace:*","@oh-my-opencode/pi-webfetch": "workspace:*","@oh-my-opencode/prompts-core": "workspace:*","@oh-my-opencode/rules-engine": "workspace:*",+ "@oh-my-opencode/senpi-task": "workspace:*","@oh-my-opencode/shared-skills": "workspace:*",+ "@oh-my-opencode/skills-loader-core": "workspace:*",+ "@oh-my-opencode/team-core": "workspace:*","@oh-my-opencode/telemetry-core": "workspace:*",+ "@oh-my-opencode/tmux-core": "workspace:*","@oh-my-opencode/utils": "workspace:*",- "@typescript/native-preview": "7.0.0-dev.20260518.1","@types/js-yaml": "^4.0.9","@types/picomatch": "^4.0.3",+ "@typescript/native-preview": "7.0.0-dev.20260518.1",+ "@xterm/addon-unicode11": "^0.9.0",+ "@xterm/xterm": "^6.0.0","bun-types": "1.3.14",+ "node-pty": "^1.1.0",+ "puppeteer-core": "^25.3.0",typescript: "^6.0.3"},optionalDependencies: {- "oh-my-opencode-darwin-arm64": "4.16.0",- "oh-my-opencode-darwin-x64": "4.16.0",- "oh-my-opencode-darwin-x64-baseline": "4.16.0",- "oh-my-opencode-linux-arm64": "4.16.0",- "oh-my-opencode-linux-arm64-musl": "4.16.0",- "oh-my-opencode-linux-x64": "4.16.0",- "oh-my-opencode-linux-x64-baseline": "4.16.0",- "oh-my-opencode-linux-x64-musl": "4.16.0",- "oh-my-opencode-linux-x64-musl-baseline": "4.16.0",- "oh-my-opencode-windows-arm64": "4.16.0",- "oh-my-opencode-windows-x64": "4.16.0",- "oh-my-opencode-windows-x64-baseline": "4.16.0"+ "oh-my-opencode-darwin-arm64": "4.16.1",+ "oh-my-opencode-darwin-x64": "4.16.1",+ "oh-my-opencode-darwin-x64-baseline": "4.16.1",+ "oh-my-opencode-linux-arm64": "4.16.1",+ "oh-my-opencode-linux-arm64-musl": "4.16.1",+ "oh-my-opencode-linux-x64": "4.16.1",+ "oh-my-opencode-linux-x64-baseline": "4.16.1",+ "oh-my-opencode-linux-x64-musl": "4.16.1",+ "oh-my-opencode-linux-x64-musl-baseline": "4.16.1",+ "oh-my-opencode-windows-arm64": "4.16.1",+ "oh-my-opencode-windows-x64": "4.16.1",+ "oh-my-opencode-windows-x64-baseline": "4.16.1"},overrides: {"@earendil-works/pi-agent-core": "0.80.3",@@ -66628,20 +66634,20 @@ var init_config_manager = __esm(() => {// packages/telemetry-core/src/activity-state.tsimport { existsSync as existsSync28, mkdirSync as mkdirSync8, readFileSync as readFileSync13 } from "fs";-import { basename as basename10, join as join50 } from "path";+import { basename as basename10, join as join51 } from "path";function resolveTelemetryStateDir(product, options = {}) {const dataDir = resolveXdgDataDir(product.cacheDirName, {env: options.env,osProvider: options.osProvider});- const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join50(options.env.XDG_DATA_HOME, product.cacheDirName);+ const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join51(options.env.XDG_DATA_HOME, product.cacheDirName);if (dataDir === xdgStateDir || xdgStateDir === undefined && basename10(dataDir) === product.cacheDirName) {return dataDir;}- return join50(dataDir, product.cacheDirName);+ return join51(dataDir, product.cacheDirName);}function getTelemetryActivityStateFilePath(stateDir) {- return join50(stateDir, POSTHOG_ACTIVITY_STATE_FILE);+ return join51(stateDir, POSTHOG_ACTIVITY_STATE_FILE);}function getDailyActiveCaptureState(input) {const state = readPostHogActivityState(input.stateDir, input.diagnostics);@@ -66712,9 +66718,9 @@ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY =// packages/telemetry-core/src/diagnostics.tsimport { appendFileSync as appendFileSync2, existsSync as existsSync29, mkdirSync as mkdirSync9, readFileSync as readFileSync14 } from "fs";-import { join as join51 } from "path";+import { join as join52 } from "path";function getTelemetryDiagnosticsFilePath(diagnosticsDir) {- return join51(diagnosticsDir, DIAGNOSTICS_FILE_NAME);+ return join52(diagnosticsDir, DIAGNOSTICS_FILE_NAME);}function writeTelemetryDiagnostic(input, options) {const now = options.now ?? new Date;@@ -72435,7 +72441,7 @@ var package_default2;var init_package2 = __esm(() => {package_default2 = {name: "@oh-my-opencode/omo-codex",- version: "4.16.0",+ version: "4.16.1",type: "module",private: true,description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",@@ -73405,7 +73411,7 @@ var init_update_toasts = __esm(() => {// packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.tsimport { existsSync as existsSync49 } from "fs";-import { dirname as dirname27, join as join69 } from "path";+import { dirname as dirname27, join as join70 } from "path";import { fileURLToPath as fileURLToPath5 } from "url";function defaultGetModuleHostingWorkspace() {try {@@ -73559,7 +73565,7 @@ var init_background_update_check = __esm(() => {init_update_toasts();defaultDeps4 = {existsSync: existsSync49,- join: join69,+ join: join70,runBunInstallWithDetails,log: log2,getOpenCodeCacheDir,@@ -74168,7 +74174,7 @@ function getUnsupportedOpenCodeVersionMessage(openCodeVersion) {}// packages/omo-codex/src/install/install-codex.ts-import { join as join52, resolve as resolve15 } from "path";+import { join as join53, resolve as resolve15 } from "path";import { existsSync as existsSync30 } from "fs";import { homedir as homedir6 } from "os";@@ -77126,7 +77132,11 @@ function stampHookGroups(hooks, version) {function stampHookStatusMessage(hook, version) {if (!isPlainRecord3(hook) || typeof hook.statusMessage !== "string")return;- hook.statusMessage = hook.statusMessage.replace(/^LazyCodex\([^)]+\):\s*/, "(OmO) ");+ hook.statusMessage = hook.statusMessage.replace(/^(?:LazyCodex\([^)]+\):|\(OmO(?:\s+[^)]+)?\))\s*/, `(OmO ${normalizeHookStatusVersion(version)}) `);+}+function normalizeHookStatusVersion(version) {+ const normalized = version.trim();+ return normalized.length === 0 ? "local" : normalized;}// packages/omo-codex/src/install/codex-process.ts@@ -77471,11 +77481,32 @@ function resolveCodexInstallerBinDir(input) {return resolve14(homeDir, ".local", "bin");}-// packages/omo-codex/src/install/omo-sot-migration.ts+// packages/omo-codex/src/install/codex-git-bash-hooks.ts+import { readFile as readFile19, writeFile as writeFile10 } from "fs/promises";import { join as join48 } from "path";+var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([+ "./hooks/pre-tool-use-recommending-git-bash-mcp.json",+ "./hooks/post-compact-resetting-git-bash-mcp-reminder.json"+]);+async function removeGitBashHooksOffWindows(input) {+ if (input.platform === "win32")+ return;+ const manifestPath = join48(input.pluginRoot, ".codex-plugin", "plugin.json");+ const parsed = JSON.parse(await readFile19(manifestPath, "utf8"));+ if (!isPlainRecord3(parsed) || !Array.isArray(parsed.hooks))+ return;+ const hooks = parsed.hooks.filter((hook) => typeof hook !== "string" || !WINDOWS_ONLY_GIT_BASH_HOOKS.has(hook));+ if (hooks.length === parsed.hooks.length)+ return;+ await writeFile10(manifestPath, `${JSON.stringify({ ...parsed, hooks }, null, "\t")}+`);+}++// packages/omo-codex/src/install/omo-sot-migration.ts+import { join as join49 } from "path";async function seedAndMigrateOmoSot(input) {const commandEnv = { ...input.env };- const scriptPath = join48(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");+ const scriptPath = join49(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");try {await input.runCommand(process.execPath, [scriptPath, "--seed"], {cwd: input.repoRoot,@@ -77490,7 +77521,7 @@ async function seedAndMigrateOmoSot(input) {// packages/omo-codex/src/install/install-ast-grep-sg.tsinit_src();-import { join as join49 } from "path";+import { join as join50 } from "path";function describeResult(result) {if (result.kind === "succeeded")return null;@@ -77504,7 +77535,7 @@ async function installAstGrepForCodex(options) {return;const platform = options.platform ?? process.platform;const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);- const skillDir = join49(plugin.path, "skills", "ast-grep");+ const skillDir = join50(plugin.path, "skills", "ast-grep");const installer = options.installer ?? runAstGrepSkillInstall;try {const result = await installer({ platform, skillDir, targetDir });@@ -77538,7 +77569,7 @@ async function runCodexInstaller(options = {}) {const env3 = options.env ?? process.env;const platform = options.platform ?? process.platform;const repoRoot = resolve15(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env3 }));- const codexHome = resolve15(options.codexHome ?? env3.CODEX_HOME ?? join52(homedir6(), ".codex"));+ const codexHome = resolve15(options.codexHome ?? env3.CODEX_HOME ?? join53(homedir6(), ".codex"));const projectDirectory = resolve15(options.projectDirectory ?? env3.OMO_CODEX_PROJECT ?? process.cwd());const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env3 });const runCommand = options.runCommand ?? defaultRunCommand;@@ -77554,9 +77585,9 @@ async function runCodexInstaller(options = {}) {if (!gitBashResolution.found) {throw new Error(gitBashResolution.installHint);}- const codexPackageRoot = join52(repoRoot, "packages", "omo-codex");+ const codexPackageRoot = join53(repoRoot, "packages", "omo-codex");const marketplace = await readMarketplace(repoRoot, {- marketplacePath: join52(codexPackageRoot, "marketplace.json")+ marketplacePath: join53(codexPackageRoot, "marketplace.json")});const distributionManifest = await readDistributionManifest(repoRoot);const installed = [];@@ -77588,6 +77619,7 @@ async function runCodexInstaller(options = {}) {if (marketplace.name === "sisyphuslabs" && plugin.name === "omo") {await stampLazyCodexPluginVersion({ pluginRoot: plugin.path, version: version2 });await writeLazyCodexInstallSnapshot({ pluginRoot: plugin.path, distributionManifest });+ await removeGitBashHooksOffWindows({ platform, pluginRoot: plugin.path });}const links = await linkCachedPluginBins({ binDir, pluginRoot: plugin.path, platform });for (const link of links) {@@ -77598,7 +77630,7 @@ async function runCodexInstaller(options = {}) {if (runtimeLink !== null)log4(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);else- log4(`Warning: skipped the omo runtime wrapper because ${join52(repoRoot, "dist", "cli", "index.js")} is missing; omo ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);+ log4(`Warning: skipped the omo runtime wrapper because ${join53(repoRoot, "dist", "cli", "index.js")} is missing; omo ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);}pluginSources.push({ name: entry.name, sourcePath });installed.push(plugin);@@ -77652,13 +77684,13 @@ async function runCodexInstaller(options = {}) {});}await reapLspDaemons(codexHome).catch(() => []);- const marketplaceRoot = join52(codexHome, "plugins", "cache", marketplace.name);+ const marketplaceRoot = join53(codexHome, "plugins", "cache", marketplace.name);await writeCachedMarketplaceManifest({marketplaceName: marketplace.name,marketplaceRoot,plugins: installed});- const configPath = join52(codexHome, "config.toml");+ const configPath = join53(codexHome, "config.toml");await updateCodexConfig({configPath,repoRoot: codexPackageRoot,@@ -77718,7 +77750,7 @@ function findRepoRootFromImporter(importerDir) {for (let depth = 0;depth <= 7; depth += 1) {if (isRepoRootWithCodexPlugin(current))return current;- for (const wrapperPackageRoot of [join52(current, "node_modules", "oh-my-openagent"), join52(current, "oh-my-openagent")]) {+ for (const wrapperPackageRoot of [join53(current, "node_modules", "oh-my-openagent"), join53(current, "oh-my-openagent")]) {if (isRepoRootWithCodexPlugin(wrapperPackageRoot))return wrapperPackageRoot;}@@ -77736,7 +77768,7 @@ function findRepoRoot(input) {return findRepoRootFromImporter(input.importerDir);}function isRepoRootWithCodexPlugin(repoRoot) {- return existsSync30(join52(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));+ return existsSync30(join53(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));}function codexMarketplaceSource(marketplaceRoot) {return { sourceType: "local", source: marketplaceRoot };@@ -77871,12 +77903,12 @@ function defaultRunCommand2(command, args) {});}// packages/omo-codex/src/install/codex-cleanup.ts-import { lstat as lstat11, readFile as readFile20, readdir as readdir9, rm as rm11, rmdir } from "fs/promises";+import { lstat as lstat11, readFile as readFile21, readdir as readdir9, rm as rm11, rmdir } from "fs/promises";import { homedir as homedir8 } from "os";-import { isAbsolute as isAbsolute10, join as join54, relative as relative7, resolve as resolve17 } from "path";+import { isAbsolute as isAbsolute10, join as join55, relative as relative7, resolve as resolve17 } from "path";// packages/omo-codex/src/install/codex-cleanup-config.ts-import { lstat as lstat10, mkdir as mkdir8, readFile as readFile19, writeFile as writeFile10 } from "fs/promises";+import { lstat as lstat10, mkdir as mkdir8, readFile as readFile20, writeFile as writeFile11 } from "fs/promises";import { dirname as dirname18 } from "path";var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];@@ -77906,14 +77938,14 @@ function cleanupCodexLightConfigText(config) {async function cleanupCodexConfig(configPath, now) {if (!await configExists(configPath))return { changed: false };- const original = await readFile19(configPath, "utf8");+ const original = await readFile20(configPath, "utf8");const next = cleanupCodexLightConfigText(original);if (next === original)return { changed: false };const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;await mkdir8(dirname18(configPath), { recursive: true });- await writeFile10(backupPath, original);- await writeFile10(configPath, `${next.trimEnd()}+ await writeFile11(backupPath, original);+ await writeFile11(configPath, `${next.trimEnd()}`);return { changed: true, backupPath };}@@ -77990,7 +78022,7 @@ function nodeErrorCode4(error) {}// packages/omo-codex/src/install/codex-cleanup-safety.ts-import { dirname as dirname19, isAbsolute as isAbsolute9, join as join53, relative as relative6, resolve as resolve16 } from "path";+import { dirname as dirname19, isAbsolute as isAbsolute9, join as join54, relative as relative6, resolve as resolve16 } from "path";function validateManagedCleanupTarget(input) {if (!isAbsolute9(input.path))return skipped(input.path, "outside managed Codex cleanup scope");@@ -78003,11 +78035,11 @@ function validateManagedCleanupTarget(input) {if (target === codexHome)return skipped(input.path, "outside managed Codex cleanup scope");const exactManagedRoots = new Set([- resolve16(join53(codexHome, "plugins", "cache", "sisyphuslabs")),- resolve16(join53(codexHome, ".tmp", "marketplaces", "sisyphuslabs")),- resolve16(join53(codexHome, "runtime", "ast-grep")),- resolve16(join53(codexHome, "runtime", "node")),- resolve16(join53(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap"))+ resolve16(join54(codexHome, "plugins", "cache", "sisyphuslabs")),+ resolve16(join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs")),+ resolve16(join54(codexHome, "runtime", "ast-grep")),+ resolve16(join54(codexHome, "runtime", "node")),+ resolve16(join54(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap"))]);if (exactManagedRoots.has(target))return null;@@ -78037,8 +78069,8 @@ function skipped(path7, reason) {var INSTALLED_AGENTS_MANIFEST = ".installed-agents.json";async function cleanupCodexLight(input = {}) {const env3 = input.env ?? process.env;- const codexHome = resolve17(input.codexHome ?? env3.CODEX_HOME ?? join54(homedir8(), ".codex"));- const configPath = join54(codexHome, "config.toml");+ const codexHome = resolve17(input.codexHome ?? env3.CODEX_HOME ?? join55(homedir8(), ".codex"));+ const configPath = join55(codexHome, "config.toml");const agentPaths = await collectInstalledAgentPaths(codexHome, configPath);const configCleanup = await cleanupCodexConfig(configPath, input.now);const agentCleanup = await removeManifestListedAgentLinks(codexHome, agentPaths);@@ -78077,17 +78109,17 @@ async function cleanupCodexLight(input = {}) {}function managedGlobalStatePaths(codexHome) {return [- join54(codexHome, "plugins", "cache", "sisyphuslabs"),- join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs"),- join54(codexHome, "runtime", "ast-grep"),- join54(codexHome, "runtime", "node"),- join54(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap")+ join55(codexHome, "plugins", "cache", "sisyphuslabs"),+ join55(codexHome, ".tmp", "marketplaces", "sisyphuslabs"),+ join55(codexHome, "runtime", "ast-grep"),+ join55(codexHome, "runtime", "node"),+ join55(codexHome, "plugins", "data", "omo-sisyphuslabs", "bootstrap")];}var BOOTSTRAP_DATA_GLOB_MAX_DEPTH = 5;async function collectBootstrapDataDirsByGlob(codexHome) {const results = [];- await walkForManagedBootstrapDirs(join54(codexHome, "plugins"), 0, results);+ await walkForManagedBootstrapDirs(join55(codexHome, "plugins"), 0, results);return results;}async function walkForManagedBootstrapDirs(directory, depth, results) {@@ -78099,9 +78131,9 @@ async function walkForManagedBootstrapDirs(directory, depth, results) {for (const entry of entries) {if (!entry.isDirectory())continue;- const childPath = join54(directory, entry.name);+ const childPath = join55(directory, entry.name);if (isManagedBootstrapOwnerName(entry.name)) {- const bootstrapDir = join54(childPath, "bootstrap");+ const bootstrapDir = join55(childPath, "bootstrap");if (await exists5(bootstrapDir))results.push(bootstrapDir);continue;@@ -78135,7 +78167,7 @@ async function attemptRemove(path7) {}async function pruneEmptyRuntimeDirBestEffort(codexHome) {try {- await rmdir(join54(codexHome, "runtime"));+ await rmdir(join55(codexHome, "runtime"));} catch (error) {if (isExpectedRuntimePruneFailure(error))return;@@ -78147,14 +78179,14 @@ function isExpectedRuntimePruneFailure(error) {}async function collectInstalledAgentPaths(codexHome, configPath) {const manifestPaths = [- join54(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)+ join55(codexHome, ".tmp", "marketplaces", "sisyphuslabs", "plugins", "omo", INSTALLED_AGENTS_MANIFEST)];- const versionRoot = join54(codexHome, "plugins", "cache", "sisyphuslabs", "omo");+ const versionRoot = join55(codexHome, "plugins", "cache", "sisyphuslabs", "omo");if (await exists5(versionRoot)) {const entries = await readdir9(versionRoot, { withFileTypes: true });for (const entry of entries) {if (entry.isDirectory())- manifestPaths.push(join54(versionRoot, entry.name, INSTALLED_AGENTS_MANIFEST));+ manifestPaths.push(join55(versionRoot, entry.name, INSTALLED_AGENTS_MANIFEST));}}const paths = new Set;@@ -78171,19 +78203,19 @@ async function collectInstalledAgentPaths(codexHome, configPath) {async function readManagedAgentPathsFromConfig(codexHome, configPath) {if (!await exists5(configPath))return [];- const config = await readFile20(configPath, "utf8");- return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join54(codexHome, "agents", `${agentName}.toml`));+ const config = await readFile21(configPath, "utf8");+ return MANAGED_CODEX_AGENT_NAMES2.filter((agentName) => config.includes(`config_file = ${JSON.stringify(`./agents/${agentName}.toml`)}`)).map((agentName) => join55(codexHome, "agents", `${agentName}.toml`));}async function readInstalledAgentManifest(manifestPath) {if (!await exists5(manifestPath))return [];- const parsed = JSON.parse(await readFile20(manifestPath, "utf8"));+ const parsed = JSON.parse(await readFile21(manifestPath, "utf8"));if (!isPlainRecord3(parsed) || !Array.isArray(parsed.agents))return [];return parsed.agents.filter((path7) => typeof path7 === "string");}async function removeManifestListedAgentLinks(codexHome, paths) {- const agentsDir = join54(codexHome, "agents");+ const agentsDir = join55(codexHome, "agents");const removed = [];const skipped2 = [];for (const path7 of paths) {@@ -78236,16 +78268,16 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".// packages/omo-senpi/src/install/install-senpi.tsimport { execFile as execFile3 } from "child_process";import { constants as constants7, existsSync as existsSync32 } from "fs";-import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile21, rename as rename5, writeFile as writeFile11 } from "fs/promises";+import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile22, rename as rename5, writeFile as writeFile12 } from "fs/promises";import { homedir as homedir9 } from "os";-import { dirname as dirname20, join as join55, resolve as resolve18 } from "path";+import { dirname as dirname20, join as join56, resolve as resolve18 } from "path";import { fileURLToPath } from "url";import { promisify as promisify2 } from "util";var execFileAsync2 = promisify2(execFile3);var REQUIRED_PLUGIN_ARTIFACTS = [- join55("extensions", "omo.js"),- join55("skills", "ultrawork", "SKILL.md"),- join55("skills", "ulw-loop", "SKILL.md")+ join56("extensions", "omo.js"),+ join56("skills", "ultrawork", "SKILL.md"),+ join56("skills", "ulw-loop", "SKILL.md")];async function runSenpiInstaller(options = {}) {const context = resolveInstallContext(options);@@ -78270,13 +78302,13 @@ async function runSenpiInstaller(options = {}) {function resolveInstallContext(options) {const env3 = options.env ?? process.env;const repoRoot = resolve18(options.repoRoot ?? findRepoRoot2(dirname20(fileURLToPath(import.meta.url))));- const agentDir = resolve18(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join55(homedir9(), ".senpi", "agent"));- const pluginPath = resolve18(options.pluginPath ?? join55(repoRoot, "packages", "omo-senpi", "plugin"));+ const agentDir = resolve18(options.agentDir ?? env3.SENPI_CODING_AGENT_DIR ?? join56(homedir9(), ".senpi", "agent"));+ const pluginPath = resolve18(options.pluginPath ?? join56(repoRoot, "packages", "omo-senpi", "plugin"));return {env: env3,repoRoot,agentDir,- settingsPath: join55(agentDir, "settings.json"),+ settingsPath: join56(agentDir, "settings.json"),pluginPath,runCommand: options.runCommand ?? defaultRunCommand3};@@ -78285,12 +78317,12 @@ async function ensurePluginArtifacts(context) {const missing = await hasMissingPluginArtifact(context.pluginPath);if (!missing)return;- await context.runCommand("node", [join55(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });- await context.runCommand("node", [join55(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });+ await context.runCommand("node", [join56(context.pluginPath, "scripts", "build-extension.mjs")], { cwd: context.repoRoot });+ await context.runCommand("node", [join56(context.pluginPath, "scripts", "sync-skills.mjs")], { cwd: context.repoRoot });}async function hasMissingPluginArtifact(pluginPath) {for (const artifact of REQUIRED_PLUGIN_ARTIFACTS) {- if (!await fileExists(join55(pluginPath, artifact)))+ if (!await fileExists(join56(pluginPath, artifact)))return true;}return false;@@ -78305,7 +78337,7 @@ async function defaultRunCommand3(command, args, options) {async function readSettings(settingsPath) {let raw;try {- raw = await readFile21(settingsPath, "utf8");+ raw = await readFile22(settingsPath, "utf8");} catch (error) {if (isErrno(error, "ENOENT"))return {};@@ -78334,11 +78366,11 @@ async function writeSettingsAtomically(settingsPath, settings) {if (await fileExists(settingsPath)) {await copyFile3(settingsPath, backupPath);} else {- await writeFile11(backupPath, `{}+ await writeFile12(backupPath, `{}`, "utf8");}const tempPath = `${settingsPath}.${process.pid}.${Date.now()}.tmp`;- await writeFile11(tempPath, `${JSON.stringify(settings, null, 2)}+ await writeFile12(tempPath, `${JSON.stringify(settings, null, 2)}`, "utf8");await rename5(tempPath, settingsPath);return backupPath;@@ -78358,7 +78390,7 @@ function timestampForBackup() {function findRepoRoot2(importerDir) {let current = importerDir;for (let depth = 0;depth <= 7; depth += 1) {- if (fileExistsSync(join55(current, "packages", "omo-senpi", "plugin", "package.json")))+ if (fileExistsSync(join56(current, "packages", "omo-senpi", "plugin", "package.json")))return current;current = resolve18(current, "..");}@@ -78418,19 +78450,19 @@ init_provider_availability();// packages/omo-opencode/src/cli/config-manager/add-tui-plugin-to-tui-config.tsimport { existsSync as existsSync34, mkdirSync as mkdirSync10, readFileSync as readFileSync16 } from "fs";-import { join as join57 } from "path";+import { join as join58 } from "path";// packages/omo-opencode/src/cli/doctor/checks/tui-plugin-config.tsinit_shared();import { existsSync as existsSync33, readFileSync as readFileSync15 } from "fs";-import { join as join56 } from "path";+import { join as join57 } from "path";var TUI_SUBPATH = "tui";var TUI_EXPORT_SUBPATH = `./${TUI_SUBPATH}`;function fileEntryPackageJsonPath(entry) {let path7 = entry.slice("file:".length);if (path7.startsWith("//"))path7 = path7.slice(2);- return join56(path7, "package.json");+ return join57(path7, "package.json");}function packageJsonExportsTui(pkgJsonPath) {if (!existsSync33(pkgJsonPath))@@ -78468,7 +78500,7 @@ function packageExportsTuiForServerEntry(entry) {const packageName = packageNameFromServerEntry(entry);if (packageName === null)return null;- return packageJsonExportsTui(join56(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));+ return packageJsonExportsTui(join57(getOpenCodeConfigDir({ binary: "opencode" }), "node_modules", packageName, "package.json"));}function isOurFilePluginEntry(entry) {if (typeof entry !== "string" || !entry.startsWith("file:"))@@ -78533,7 +78565,7 @@ function detectServerPluginRegistration() {}}function detectTuiPluginRegistration() {- const tuiJsonPath = join56(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");+ const tuiJsonPath = join57(getOpenCodeConfigDir({ binary: "opencode" }), "tui.json");if (!existsSync33(tuiJsonPath)) {return {registered: false,@@ -78689,10 +78721,10 @@ function readConfig(path7) {return null;}function readServerConfig(configDir) {- const jsoncPath = join57(configDir, "opencode.jsonc");+ const jsoncPath = join58(configDir, "opencode.jsonc");if (existsSync34(jsoncPath))return readConfig(jsoncPath);- const jsonPath = join57(configDir, "opencode.json");+ const jsonPath = join58(configDir, "opencode.json");if (existsSync34(jsonPath))return readConfig(jsonPath);return null;@@ -78734,7 +78766,7 @@ function ensureTuiPluginEntry(opts = {}) {if (!desiredEntry) {return { changed: false, reason: "no-server-entry" };}- const tuiJsonPath = join57(configDir, "tui.json");+ const tuiJsonPath = join58(configDir, "tui.json");const { config, malformed } = readTuiConfig(tuiJsonPath);if (malformed) {return { changed: false, reason: "malformed" };@@ -78750,7 +78782,7 @@ function ensureTuiPluginEntry(opts = {}) {// packages/omo-opencode/src/cli/install-ast-grep-sg.tsimport { homedir as homedir10 } from "os";-import { join as join58 } from "path";+import { join as join59 } from "path";// packages/shared-skills/index.mjsimport { fileURLToPath as fileURLToPath2 } from "url";@@ -78769,9 +78801,9 @@ function describeResult2(result) {}async function installAstGrepForOpenCode(options = {}) {const platform = options.platform ?? process.platform;- const baseDir = join58(options.homeDir ?? homedir10(), ".omo");+ const baseDir = join59(options.homeDir ?? homedir10(), ".omo");const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);- const skillDir = join58(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");+ const skillDir = join59(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");const installer = options.installer ?? runAstGrepSkillInstall;try {const result = await installer({ platform, skillDir, targetDir });@@ -97270,9 +97302,9 @@ function readCurrentTopLevelTask(planPath) {}// packages/boulder-state/src/storage/path.tsimport { existsSync as existsSync38 } from "fs";-import { isAbsolute as isAbsolute11, join as join60, relative as relative8, resolve as resolve19 } from "path";+import { isAbsolute as isAbsolute11, join as join61, relative as relative8, resolve as resolve19 } from "path";function getBoulderFilePath(directory) {- return join60(directory, BOULDER_DIR, BOULDER_FILE);+ return join61(directory, BOULDER_DIR, BOULDER_FILE);}function resolveTrackedPath(baseDirectory, trackedPath) {return isAbsolute11(trackedPath) ? resolve19(trackedPath) : resolve19(baseDirectory, trackedPath);@@ -97499,9 +97531,9 @@ init_state();var CONTINUATION_MARKER_DIR = ".omo/run-continuation";// packages/omo-opencode/src/features/run-continuation-state/storage.tsimport { existsSync as existsSync41, mkdirSync as mkdirSync11, readFileSync as readFileSync21, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "fs";-import { join as join61 } from "path";+import { join as join62 } from "path";function getMarkerPath(directory, sessionID) {- return join61(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);+ return join62(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);}function readContinuationMarker(directory, sessionID) {const markerPath = getMarkerPath(directory, sessionID);@@ -97574,7 +97606,7 @@ async function isSessionInBoulderLineage(input) {init_shared();init_compaction_marker();import { readFileSync as readFileSync22, readdirSync as readdirSync6 } from "fs";-import { join as join62 } from "path";+import { join as join63 } from "path";var defaultSessionLastAgentDeps = {getMessageDir,isSqliteBackend,@@ -97634,7 +97666,7 @@ async function getLastAgentFromSession(sessionID, client3, deps = {}) {try {const messages = readdirSync6(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {try {- const content = readFileSync22(join62(messageDir, fileName), "utf-8");+ const content = readFileSync22(join63(messageDir, fileName), "utf-8");const parsed = JSON.parse(content);return {fileName,@@ -97678,7 +97710,7 @@ init_agent_display_names();// packages/omo-opencode/src/hooks/ralph-loop/storage.tsinit_frontmatter2();import { existsSync as existsSync42, readFileSync as readFileSync23, writeFileSync as writeFileSync7, unlinkSync as unlinkSync5, mkdirSync as mkdirSync12 } from "fs";-import { dirname as dirname23, join as join63 } from "path";+import { dirname as dirname23, join as join64 } from "path";// packages/omo-opencode/src/hooks/ralph-loop/constants.tsvar DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";@@ -97687,7 +97719,7 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";// packages/omo-opencode/src/hooks/ralph-loop/storage.tsfunction getStateFilePath(directory, customPath) {- return customPath ? join63(directory, customPath) : join63(directory, DEFAULT_STATE_FILE);+ return customPath ? join64(directory, customPath) : join64(directory, DEFAULT_STATE_FILE);}function readState(directory, customPath) {const filePath = getStateFilePath(directory, customPath);@@ -98659,6 +98691,10 @@ function formatVersionOutput(info) {lines.push(` ${SYMBOLS3.pin} ${import_picocolors17.default.magenta(`Version pinned to ${info.pinnedVersion}`)}`);lines.push(` ${import_picocolors17.default.dim("Update check skipped for pinned versions")}`);break;+ case "pinned-mismatch":+ lines.push(` ${SYMBOLS3.warn} ${import_picocolors17.default.yellow(`Version pinned to ${info.pinnedVersion} but running ${info.currentVersion}`)}`);+ lines.push(` ${import_picocolors17.default.dim("The pin only skips the update check; it does not control which version OpenCode loads")}`);+ break;case "error":lines.push(` ${SYMBOLS3.cross} ${import_picocolors17.default.red("Unable to check for updates")}`);lines.push(` ${import_picocolors17.default.dim("Network error or npm registry unavailable")}`);@@ -98695,14 +98731,16 @@ async function getLocalVersion(options = {}) {}const pluginInfo = findPluginEntry(directory);if (pluginInfo?.isPinned) {+ const actualVersion = getCachedVersion();+ const isMismatch = actualVersion !== null && actualVersion !== pluginInfo.pinnedVersion;const info2 = {- currentVersion: pluginInfo.pinnedVersion,+ currentVersion: isMismatch ? actualVersion : pluginInfo.pinnedVersion,latestVersion: null,isUpToDate: false,isLocalDev: false,isPinned: true,pinnedVersion: pluginInfo.pinnedVersion,- status: "pinned"+ status: isMismatch ? "pinned-mismatch" : "pinned"};console.log(options.json ? formatJsonOutput(info2) : formatVersionOutput(info2));return 0;@@ -98771,7 +98809,7 @@ init_extract_semver();init_bun_which_shim();import { existsSync as existsSync50, accessSync as accessSync4, constants as constants10 } from "fs";import { homedir as homedir14 } from "os";-import { join as join70 } from "path";+import { join as join71 } from "path";// packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.tsinit_spawn_with_windows_hide();@@ -98863,17 +98901,17 @@ function getDesktopAppPaths(platform) {case "darwin":return ["/Applications/OpenCode.app/Contents/MacOS/OpenCode",- join70(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")+ join71(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")];case "win32": {const programFiles = process.env.ProgramFiles;const localAppData = process.env.LOCALAPPDATA;const paths = [];if (programFiles) {- paths.push(join70(programFiles, "OpenCode", "OpenCode.exe"));+ paths.push(join71(programFiles, "OpenCode", "OpenCode.exe"));}if (localAppData) {- paths.push(join70(localAppData, "OpenCode", "OpenCode.exe"));+ paths.push(join71(localAppData, "OpenCode", "OpenCode.exe"));}return paths;}@@ -98881,8 +98919,8 @@ function getDesktopAppPaths(platform) {return ["/usr/bin/opencode","/usr/lib/opencode/opencode",- join70(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),- join70(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")+ join71(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),+ join71(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")];default:return [];@@ -98914,7 +98952,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exiconst candidates = getCommandCandidates2(platform);for (const entry of pathEnv.split(delimiter3).filter(Boolean)) {for (const command of candidates) {- const fullPath = join70(entry, command);+ const fullPath = join71(entry, command);if (checkExists(fullPath) && isExecutable2(fullPath)) {return { binary: command, path: fullPath };}@@ -99056,22 +99094,22 @@ init_package_json_locator();import { existsSync as existsSync52, readFileSync as readFileSync32, readdirSync as readdirSync8 } from "fs";import { createRequire as createRequire2 } from "module";import { homedir as homedir15 } from "os";-import { join as join71 } from "path";+import { join as join72 } from "path";import { fileURLToPath as fileURLToPath6 } from "url";init_shared();function getPlatformDefaultCacheDir(platform = process.platform) {if (platform === "darwin")- return join71(homedir15(), "Library", "Caches");+ return join72(homedir15(), "Library", "Caches");if (platform === "win32")- return process.env.LOCALAPPDATA ?? join71(homedir15(), "AppData", "Local");- return join71(homedir15(), ".cache");+ return process.env.LOCALAPPDATA ?? join72(homedir15(), "AppData", "Local");+ return join72(homedir15(), ".cache");}function resolveOpenCodeCacheDir() {const xdgCacheHome = process.env.XDG_CACHE_HOME;if (xdgCacheHome)- return join71(xdgCacheHome, "opencode");+ return join72(xdgCacheHome, "opencode");const fromShared = getOpenCodeCacheDir();- const platformDefault = join71(getPlatformDefaultCacheDir(), "opencode");+ const platformDefault = join72(getPlatformDefaultCacheDir(), "opencode");if (existsSync52(fromShared) || !existsSync52(platformDefault))return fromShared;return platformDefault;@@ -99103,11 +99141,11 @@ function normalizeVersion(value) {function createPackageCandidates(rootDir) {return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({packageName,- installedPackagePath: join71(rootDir, "node_modules", packageName, "package.json")+ installedPackagePath: join72(rootDir, "node_modules", packageName, "package.json")}));}function createTaggedInstallCandidates(rootDir) {- const packagesDir = join71(rootDir, "packages");+ const packagesDir = join72(rootDir, "packages");if (!existsSync52(packagesDir))return [];const candidates = [];@@ -99115,14 +99153,14 @@ function createTaggedInstallCandidates(rootDir) {const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));if (packageName === undefined)continue;- const installDir = join71(packagesDir, entryName);+ const installDir = join72(packagesDir, entryName);candidates.push({cacheDir: installDir,- cachePackagePath: join71(installDir, "package.json"),+ cachePackagePath: join72(installDir, "package.json"),packageCandidates: [{packageName,- installedPackagePath: join71(installDir, "node_modules", packageName, "package.json")+ installedPackagePath: join72(installDir, "node_modules", packageName, "package.json")}]});@@ -99167,13 +99205,13 @@ function getLoadedPluginVersion() {const candidates = [{cacheDir: configDir,- cachePackagePath: join71(configDir, "package.json"),+ cachePackagePath: join72(configDir, "package.json"),packageCandidates: createPackageCandidates(configDir)},...createTaggedInstallCandidates(configDir),{cacheDir,- cachePackagePath: join71(cacheDir, "package.json"),+ cachePackagePath: join72(cacheDir, "package.json"),packageCandidates: createPackageCandidates(cacheDir)},...createTaggedInstallCandidates(cacheDir)@@ -99480,18 +99518,18 @@ function validatePluginConfig(directory) {init_shared();import { existsSync as existsSync54, readFileSync as readFileSync35 } from "fs";import { homedir as homedir17 } from "os";-import { join as join72 } from "path";+import { join as join73 } from "path";function getUserConfigDir2() {const xdgConfig = process.env.XDG_CONFIG_HOME;if (xdgConfig)- return join72(xdgConfig, "opencode");- return join72(homedir17(), ".config", "opencode");+ return join73(xdgConfig, "opencode");+ return join73(homedir17(), ".config", "opencode");}function loadCustomProviderNames() {const configDir = getUserConfigDir2();const candidatePaths = [- join72(configDir, "opencode.json"),- join72(configDir, "opencode.jsonc")+ join73(configDir, "opencode.json"),+ join73(configDir, "opencode.jsonc")];for (const configPath of candidatePaths) {if (!existsSync54(configPath))@@ -99512,7 +99550,7 @@ function loadCustomProviderNames() {return [];}function loadAvailableModelsFromCache() {- const cacheFile = join72(getOpenCodeCacheDir(), "models.json");+ const cacheFile = join73(getOpenCodeCacheDir(), "models.json");const customProviders = loadCustomProviderNames();if (!existsSync54(cacheFile)) {if (customProviders.length > 0) {@@ -99549,8 +99587,8 @@ init_model_capabilities2();init_shared();init_plugin_identity();import { readFileSync as readFileSync36 } from "fs";-import { join as join73 } from "path";-var PROJECT_CONFIG_DIR = join73(process.cwd(), ".opencode");+import { join as join74 } from "path";+var PROJECT_CONFIG_DIR = join74(process.cwd(), ".opencode");function loadOmoConfig() {const projectDetected = detectPluginConfigFile(PROJECT_CONFIG_DIR, {basenames: [CONFIG_BASENAME],@@ -99588,7 +99626,7 @@ function loadOmoConfig() {// packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.tsinit_shared();-import { join as join74 } from "path";+import { join as join75 } from "path";// packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.tsfunction formatModelWithVariant(model, variant) {@@ -99630,7 +99668,7 @@ function formatCapabilityResolutionLabel(mode) {}function buildModelResolutionDetails(options) {const details = [];- const cacheFile = join74(getOpenCodeCacheDir(), "models.json");+ const cacheFile = join75(getOpenCodeCacheDir(), "models.json");details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");details.push("");if (options.available.cacheExists) {@@ -99909,25 +99947,25 @@ init_src();import { existsSync as existsSync55 } from "fs";import { createRequire as createRequire3 } from "module";import { homedir as homedir19 } from "os";-import { dirname as dirname29, join as join76 } from "path";+import { dirname as dirname29, join as join77 } from "path";// packages/omo-opencode/src/hooks/comment-checker/downloader.ts-import { join as join75 } from "path";+import { join as join76 } from "path";import { homedir as homedir18, tmpdir as tmpdir3 } from "os";init_binary_downloader();init_logger2();init_plugin_identity();var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";-var DEBUG_FILE = join75(tmpdir3(), "comment-checker-debug.log");+var DEBUG_FILE = join76(tmpdir3(), "comment-checker-debug.log");function getCacheDir2() {if (process.platform === "win32") {const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;- const base2 = localAppData || join75(homedir18(), "AppData", "Local");- return join75(base2, CACHE_DIR_NAME, "bin");+ const base2 = localAppData || join76(homedir18(), "AppData", "Local");+ return join76(base2, CACHE_DIR_NAME, "bin");}const xdgCache = process.env.XDG_CACHE_HOME;- const base = xdgCache || join75(homedir18(), ".cache");- return join75(base, CACHE_DIR_NAME, "bin");+ const base = xdgCache || join76(homedir18(), ".cache");+ return join76(base, CACHE_DIR_NAME, "bin");}function getBinaryName() {return process.platform === "win32" ? "comment-checker.exe" : "comment-checker";@@ -99977,7 +100015,7 @@ async function getBinaryVersion(binary) {}}async function checkAstGrepCli() {- const runtimeDir = astGrepRuntimeDir(join76(homedir19(), ".omo"));+ const runtimeDir = astGrepRuntimeDir(join77(homedir19(), ".omo"));const sgPath = findSgBinarySync({ runtimeDir });if (sgPath === null) {return {@@ -100007,10 +100045,10 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPathconst platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;try {const packageDir = baseDirOverride ?? dirname29(resolvePackageJsonPath());- const vendorPath = join76(packageDir, "vendor", platformKey, binaryName);+ const vendorPath = join77(packageDir, "vendor", platformKey, binaryName);if (existsSync55(vendorPath))return vendorPath;- const binPath = join76(packageDir, "bin", binaryName);+ const binPath = join77(packageDir, "bin", binaryName);if (existsSync55(binPath))return binPath;} catch (error51) {@@ -100156,7 +100194,7 @@ async function getGhCliInfo(dependencies = {}) {// packages/omo-opencode/src/cli/doctor/checks/tools-lsp.tsimport { readFileSync as readFileSync37 } from "fs";-import { join as join77 } from "path";+import { join as join78 } from "path";// packages/omo-opencode/src/mcp/lsp.tsimport { existsSync as existsSync56 } from "fs";@@ -100363,7 +100401,7 @@ function readOmoConfig(configDirectory) {}function isLspMcpDisabled(options) {const userConfigDirectory = options.configDirectory ?? getOpenCodeConfigDir({ binary: "opencode" });- const projectConfigDirectory = join77(options.cwd ?? process.cwd(), ".opencode");+ const projectConfigDirectory = join78(options.cwd ?? process.cwd(), ".opencode");const userConfig = readOmoConfig(userConfigDirectory);const projectConfig = readOmoConfig(projectConfigDirectory);const disabledMcps = new Set([@@ -100384,13 +100422,13 @@ function getInstalledLspServers(options = {}) {init_shared();import { existsSync as existsSync57, readFileSync as readFileSync38 } from "fs";import { homedir as homedir20 } from "os";-import { join as join78 } from "path";+import { join as join79 } from "path";var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];function getMcpConfigPaths() {return [- join78(homedir20(), ".claude", ".mcp.json"),- join78(process.cwd(), ".mcp.json"),- join78(process.cwd(), ".claude", ".mcp.json")+ join79(homedir20(), ".claude", ".mcp.json"),+ join79(process.cwd(), ".mcp.json"),+ join79(process.cwd(), ".claude", ".mcp.json")];}function loadUserMcpConfig() {@@ -100690,9 +100728,9 @@ async function pathExists(dir) {// packages/omo-opencode/src/cli/doctor/checks/codex.tsinit_src();import { existsSync as existsSync59 } from "fs";-import { lstat as lstat12, readdir as readdir10, readFile as readFile22 } from "fs/promises";+import { lstat as lstat12, readdir as readdir10, readFile as readFile23 } from "fs/promises";import { homedir as homedir22 } from "os";-import { basename as basename13, join as join79, resolve as resolve22 } from "path";+import { basename as basename13, join as join80, resolve as resolve22 } from "path";// packages/omo-opencode/package.jsonvar package_default3 = {name: "@oh-my-opencode/omo-opencode",@@ -100750,13 +100788,13 @@ var CODEX_BIN_NAMES = ["omo-git-bash-hook"];async function gatherCodexSummary(deps = {}) {- const codexHome = resolve22(deps.codexHome ?? process.env.CODEX_HOME ?? join79(homedir22(), ".codex"));+ const codexHome = resolve22(deps.codexHome ?? process.env.CODEX_HOME ?? join80(homedir22(), ".codex"));const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();const pluginRoot = await resolveInstalledPluginRoot(codexHome);- const manifest = pluginRoot === null ? null : await readJson(join79(pluginRoot, ".codex-plugin", "plugin.json"));- const installSnapshot = pluginRoot === null ? null : await readJson(join79(pluginRoot, "lazycodex-install.json"));- const configPath = join79(codexHome, "config.toml");+ const manifest = pluginRoot === null ? null : await readJson(join80(pluginRoot, ".codex-plugin", "plugin.json"));+ const installSnapshot = pluginRoot === null ? null : await readJson(join80(pluginRoot, "lazycodex-install.json"));+ const configPath = join80(codexHome, "config.toml");const pluginVersion = stringField(manifest, "version");return {codexPath: detection.found && "path" in detection ? detection.path : null,@@ -100813,7 +100851,7 @@ function buildCodexIssues(summary) {if (summary.pluginRoot === null) {issues.push({title: "OMO Codex plugin is not installed",- description: `Expected cached plugin at ${join79("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,+ description: `Expected cached plugin at ${join80("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,fix: "Run: npx lazycodex-ai install",severity: "error",affects: ["plugin loading"]@@ -100878,12 +100916,12 @@ function buildCodexIssues(summary) {return issues;}async function resolveInstalledPluginRoot(codexHome) {- const pluginRoot = join79(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);+ const pluginRoot = join80(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);if (!existsSync59(pluginRoot))return null;const versions2 = await readdir10(pluginRoot, { withFileTypes: true });const candidates = versions2.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);- return candidates.length === 0 ? null : join79(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);+ return candidates.length === 0 ? null : join80(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);}async function readCodexConfigSummary(configPath) {if (!existsSync59(configPath)) {@@ -100897,7 +100935,7 @@ async function readCodexConfigSummary(configPath) {companionLifecycleHookStateEvents: []};}- const content = await readFile22(configPath, "utf8");+ const content = await readFile23(configPath, "utf8");return {exists: true,marketplaceConfigured: content.includes("[marketplaces.sisyphuslabs]"),@@ -100911,13 +100949,13 @@ async function readCodexConfigSummary(configPath) {async function readLinkedBins(binDir) {const linked = [];for (const name of CODEX_BIN_NAMES) {- if (await pathExists2(join79(binDir, process.platform === "win32" ? `${name}.cmd` : name)))+ if (await pathExists2(join80(binDir, process.platform === "win32" ? `${name}.cmd` : name)))linked.push(name);}return linked;}async function readLinkedAgents(codexHome) {- const agentsDir = join79(codexHome, "agents");+ const agentsDir = join80(codexHome, "agents");if (!existsSync59(agentsDir))return [];const entries = await readdir10(agentsDir, { withFileTypes: true });@@ -100925,7 +100963,7 @@ async function readLinkedAgents(codexHome) {}async function readJson(path16) {try {- const parsed = JSON.parse(await readFile22(path16, "utf8"));+ const parsed = JSON.parse(await readFile23(path16, "utf8"));return isPlainRecord(parsed) ? parsed : null;} catch (error51) {if (error51 instanceof Error)@@ -101031,9 +101069,9 @@ async function pathExists2(path16) {// packages/omo-opencode/src/cli/doctor/checks/codex-components.tsinit_src();-import { readdir as readdir11, readFile as readFile23, stat as stat6 } from "fs/promises";+import { readdir as readdir11, readFile as readFile24, stat as stat6 } from "fs/promises";import { homedir as homedir23 } from "os";-import { dirname as dirname31, isAbsolute as isAbsolute12, join as join80, relative as relative10, resolve as resolve23, sep as sep9 } from "path";+import { dirname as dirname31, isAbsolute as isAbsolute12, join as join81, relative as relative10, resolve as resolve23, sep as sep9 } from "path";var CODEX_COMPONENTS_CHECK_ID = "codex-components";var CODEX_COMPONENTS_CHECK_NAME = "codex-components";var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";@@ -101043,7 +101081,7 @@ async function checkCodexComponents(deps = {}) {const env3 = deps.env ?? process.env;const platform = deps.platform ?? process.platform;const arch = deps.arch ?? process.arch;- const codexHome = resolve23(deps.codexHome ?? env3["CODEX_HOME"] ?? join80(homedir23(), ".codex"));+ const codexHome = resolve23(deps.codexHome ?? env3["CODEX_HOME"] ?? join81(homedir23(), ".codex"));const summary = await gatherCodexSummary({ ...deps, codexHome });if (summary.pluginRoot === null) {return {@@ -101068,7 +101106,7 @@ async function checkCodexComponents(deps = {}) {});}const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);- const runtimeSgPath = join80(runtimeSgDir, sgBinaryName(platform));+ const runtimeSgPath = join81(runtimeSgDir, sgBinaryName(platform));const sg = findSgBinarySync({arch,env: env3,@@ -101180,7 +101218,7 @@ async function findManifestPaths(root, manifestName) {for (const entry of entries) {if (entry.name === "node_modules" || entry.name === ".git")continue;- const entryPath = join80(root, entry.name);+ const entryPath = join81(root, entry.name);if (entry.isDirectory()) {paths2.push(...await findManifestPaths(entryPath, manifestName));continue;@@ -101224,18 +101262,18 @@ function isPluginRuntimePathArg(arg) {return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute12(arg));}function runtimeSgDirectory(codexHome, platform, arch) {- return join80(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));+ return join81(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));}function describeSgSource(sgPath, env3, runtimeSgDir, platform) {const override = env3[SG_PATH_ENV_KEY]?.trim();if (override !== undefined && override.length > 0 && sgPath === override)return `env override ${SG_PATH_ENV_KEY}`;- if (sgPath === join80(runtimeSgDir, sgBinaryName(platform)))+ if (sgPath === join81(runtimeSgDir, sgBinaryName(platform)))return "runtime dir";return "PATH";}async function readBootstrapStateSummary(codexHome) {- const statePath = join80(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");+ const statePath = join81(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");const raw = await readJson2(statePath);if (raw === null)return null;@@ -101284,7 +101322,7 @@ function degradedDetailLines(entries) {}async function readJson2(path16) {try {- const parsed = JSON.parse(await readFile23(path16, "utf8"));+ const parsed = JSON.parse(await readFile24(path16, "utf8"));return isRecord5(parsed) ? parsed : null;} catch (error51) {if (error51 instanceof Error)@@ -101312,17 +101350,17 @@ function isRecord5(value) {// packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.tsimport { existsSync as existsSync60 } from "fs";-import { readFile as readFile24 } from "fs/promises";+import { readFile as readFile25 } from "fs/promises";import { homedir as homedir24 } from "os";-import { join as join81, resolve as resolve24 } from "path";+import { join as join82, resolve as resolve24 } from "path";var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";var CHECK_NAME = "codex-runtime-wrapper";var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";async function checkCodexRuntimeWrapper(deps = {}) {- const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join81(homedir24(), ".codex"));+ const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join82(homedir24(), ".codex"));const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });const platform = deps.platform ?? process.platform;- const wrapperPath = join81(binDir, platform === "win32" ? "omo.cmd" : "omo");+ const wrapperPath = join82(binDir, platform === "win32" ? "omo.cmd" : "omo");const wrapper = await readRuntimeWrapper(wrapperPath);const issues = [];if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {@@ -101347,7 +101385,7 @@ async function checkCodexRuntimeWrapper(deps = {}) {}async function readRuntimeWrapper(path16) {try {- return await readFile24(path16, "utf8");+ return await readFile25(path16, "utf8");} catch (error51) {if (error51 instanceof Error)return null;@@ -101834,12 +101872,12 @@ import {unlinkSync as unlinkSync8,writeFileSync as writeFileSync11} from "fs";-import { basename as basename14, dirname as dirname32, join as join84 } from "path";+import { basename as basename14, dirname as dirname32, join as join85 } from "path";// packages/mcp-client-core/src/config-dir.tsimport { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";import { homedir as homedir25 } from "os";-import { join as join82, resolve as resolve25 } from "path";+import { join as join83, resolve as resolve25 } from "path";function resolveConfigPath2(pathValue) {const resolvedPath = resolve25(pathValue);if (!existsSync61(resolvedPath))@@ -101857,13 +101895,13 @@ function getOpenCodeCliConfigDir(env3 = process.env) {if (customConfigDir) {return resolveConfigPath2(customConfigDir);}- const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join82(homedir25(), ".config");- return resolveConfigPath2(join82(xdgConfigDir, "opencode"));+ const xdgConfigDir = env3["XDG_CONFIG_HOME"]?.trim() || join83(homedir25(), ".config");+ return resolveConfigPath2(join83(xdgConfigDir, "opencode"));}// packages/mcp-client-core/src/mcp-oauth/storage-index.tsimport { chmodSync as chmodSync3, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync6, writeFileSync as writeFileSync10 } from "fs";-import { join as join83 } from "path";+import { join as join84 } from "path";var INDEX_FILE_NAME = "index.json";function isTokenIndex(value) {if (typeof value !== "object" || value === null || Array.isArray(value))@@ -101871,7 +101909,7 @@ function isTokenIndex(value) {return Object.values(value).every((entry) => typeof entry === "string");}function getIndexPath(storageDir) {- return join83(storageDir, INDEX_FILE_NAME);+ return join84(storageDir, INDEX_FILE_NAME);}function readTokenIndex(storageDir) {const indexPath = getIndexPath(storageDir);@@ -101915,16 +101953,16 @@ function deleteTokenIndexEntry(storageDir, hash2) {var STORAGE_DIR_NAME = "mcp-oauth";var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";function getMcpOauthStorageDir() {- return join84(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);+ return join85(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);}function getMcpOauthServerHash(serverHost, resource) {return createHash4("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);}function getMcpOauthStoragePath(serverHost, resource) {- return join84(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);+ return join85(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);}function getLegacyStoragePath() {- return join84(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);+ return join85(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);}function normalizeHost2(serverHost) {let host = serverHost.trim();@@ -102103,7 +102141,7 @@ function listTokensByHost(serverHost) {for (const [hash2, indexedKey] of Object.entries(index)) {if (!indexedKey.startsWith(prefix))continue;- const indexedToken = readTokenFile(join84(getMcpOauthStorageDir(), `${hash2}.json`));+ const indexedToken = readTokenFile(join85(getMcpOauthStorageDir(), `${hash2}.json`));if (indexedToken)result[indexedKey] = indexedToken;}@@ -102118,7 +102156,7 @@ function listAllTokens() {for (const entry of readdirSync9(dir, { withFileTypes: true })) {if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")continue;- const token = readTokenFile(join84(dir, entry.name));+ const token = readTokenFile(join85(dir, entry.name));const hash2 = basename14(entry.name, ".json");if (token)result[index[hash2] ?? hash2] = token;@@ -102842,8 +102880,9 @@ async function boulder(options) {}// packages/omo-opencode/src/cli/codex-ulw-loop.tsimport { spawn as spawn5 } from "child_process";-import { existsSync as existsSync65, realpathSync as realpathSync9 } from "fs";+import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync9 } from "fs";import { homedir as homedir26 } from "os";+var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";function resolveCodexUlwLoopCommand(input = {}) {const env3 = input.env ?? process.env;const homeDir = input.homeDir ?? homedir26();@@ -102856,6 +102895,8 @@ function resolveCodexUlwLoopCommand(input = {}) {});if (componentCli !== null)return { executable: process.execPath, argsPrefix: [componentCli] };+ if (env3[ULW_LOOP_DELEGATION_SENTINEL] === "1")+ return null;const legacyLocalBin = resolveLegacyLocalOmoBin(env3, homeDir, input.currentExecutablePaths ?? [process.argv[1]].filter((value) => typeof value === "string"));if (legacyLocalBin !== null)return { executable: legacyLocalBin, argsPrefix: ["ulw-loop"] };@@ -102867,14 +102908,17 @@ async function codexUlwLoop(args) {console.error("Codex ulw-loop is not installed. Run: npx lazycodex-ai@latest install --no-tui");return 1;}- return new Promise((resolve26) => {- const child = spawn5(command.executable, [...command.argsPrefix, ...args], { stdio: "inherit" });- child.on("error", (error51) => {- console.error(error51.message);- resolve26(1);- });- child.on("close", (code) => resolve26(code ?? 1));+ const { promise: promise2, resolve: resolve26 } = Promise.withResolvers();+ const child = spawn5(command.executable, [...command.argsPrefix, ...args], {+ stdio: "inherit",+ env: { ...process.env, [ULW_LOOP_DELEGATION_SENTINEL]: "1" }});+ child.on("error", (error51) => {+ console.error(error51.message);+ resolve26(1);+ });+ child.on("close", (code) => resolve26(code ?? 1));+ return promise2;}function resolveLocalUlwLoopBin(env3, homeDir) {const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env: env3, homeDir });@@ -102882,7 +102926,16 @@ function resolveLocalUlwLoopBin(env3, homeDir) {}function resolveLegacyLocalOmoBin(env3, homeDir, currentExecutablePaths) {const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env: env3, homeDir });- return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths)) ?? null;+ return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;+}+function isGeneratedRuntimeWrapper(candidate) {+ try {+ return readFileSync43(candidate, "utf8").includes(RUNTIME_WRAPPER_MARKER);+ } catch (error51) {+ if (error51 instanceof Error)+ return false;+ return false;+ }}function isCurrentExecutable(candidate, currentExecutablePaths) {const candidateRealPath = realpathOrSelf(candidate);diff --git a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.jsonindex 4314a581..1b6cbf7a 100644--- a/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json+++ b/plugins/omo/hooks/post-compact-resetting-git-bash-mcp-reminder.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO) Resetting Git Bash MCP Reminder",+ "statusMessage": "(OmO 4.16.1) Resetting Git Bash MCP Reminder","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.jsonindex a1756f44..6a784ce0 100644--- a/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-lsp-diagnostics-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-compact","timeout": 5,- "statusMessage": "(OmO) Resetting LSP Diagnostics Cache",+ "statusMessage": "(OmO 4.16.1) Resetting LSP Diagnostics Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.jsonindex 3c6edf85..7587cdce 100644--- a/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json+++ b/plugins/omo/hooks/post-compact-resetting-project-rule-cache.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-compact","timeout": 10,- "statusMessage": "(OmO) Resetting Project Rule Cache",+ "statusMessage": "(OmO 4.16.1) Resetting Project Rule Cache","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-compact"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.jsonindex a9128767..77b3f667 100644--- a/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json+++ b/plugins/omo/hooks/post-tool-use-checking-codegraph-init-guidance.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook post-tool-use","timeout": 5,- "statusMessage": "(OmO) Checking CodeGraph Init Guidance",+ "statusMessage": "(OmO 4.16.1) Checking CodeGraph Init Guidance","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-comments.json b/plugins/omo/hooks/post-tool-use-checking-comments.jsonindex bee2fa92..3f8a156f 100644--- a/plugins/omo/hooks/post-tool-use-checking-comments.json+++ b/plugins/omo/hooks/post-tool-use-checking-comments.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/comment-checker/dist/cli.js\" hook post-tool-use","timeout": 30,- "statusMessage": "(OmO) Checking Comments",+ "statusMessage": "(OmO 4.16.1) Checking Comments","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\comment-checker\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.jsonindex 05252143..c715f73d 100644--- a/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json+++ b/plugins/omo/hooks/post-tool-use-checking-lsp-diagnostics.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lsp/dist/cli.js\" hook post-tool-use","timeout": 60,- "statusMessage": "(OmO) Checking LSP Diagnostics",+ "statusMessage": "(OmO 4.16.1) Checking LSP Diagnostics","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lsp\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.jsonindex 9515b03f..f60ea8c0 100644--- a/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json+++ b/plugins/omo/hooks/post-tool-use-checking-thread-title-hygiene.json@@ -8,7 +8,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/teammode/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO) Checking Thread Title Hygiene",+ "statusMessage": "(OmO 4.16.1) Checking Thread Title Hygiene","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\teammode\\dist\\cli.js\" hook post-tool-use"}]diff --git a/plugins/omo/hooks/post-tool-use-matching-project-rules.json b/plugins/omo/hooks/post-tool-use-matching-project-rules.jsonindex d50772e9..63ef9ec8 100644--- a/plugins/omo/hooks/post-tool-use-matching-project-rules.json+++ b/plugins/omo/hooks/post-tool-use-matching-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook post-tool-use","timeout": 10,- "statusMessage": "(OmO) Matching Project Rules",+ "statusMessage": "(OmO 4.16.1) Matching Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook post-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.jsonindex 472f9f2a..b479db4b 100644--- a/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json+++ b/plugins/omo/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO) Enforcing Unlimited Goal Budget",+ "statusMessage": "(OmO 4.16.1) Enforcing Unlimited Goal Budget","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.jsonindex 57be3f8e..998d12bd 100644--- a/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json+++ b/plugins/omo/hooks/pre-tool-use-recommending-git-bash-mcp.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/git-bash/dist/cli.js\" hook pre-tool-use","timeout": 5,- "statusMessage": "(OmO) Recommending Git Bash MCP",+ "statusMessage": "(OmO 4.16.1) Recommending Git Bash MCP","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\git-bash\\dist\\cli.js\" hook pre-tool-use"}],diff --git a/plugins/omo/hooks/session-start-checking-auto-update.json b/plugins/omo/hooks/session-start-checking-auto-update.jsonindex eb0e0fdb..ce2b5ffe 100644--- a/plugins/omo/hooks/session-start-checking-auto-update.json+++ b/plugins/omo/hooks/session-start-checking-auto-update.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/scripts/auto-update.mjs\" hook session-start","timeout": 5,- "statusMessage": "(OmO) Checking Auto Update",+ "statusMessage": "(OmO 4.16.1) Checking Auto Update","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\scripts\\auto-update.mjs\" hook session-start"}],diff --git a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.jsonindex bb0527c8..f75e298d 100644--- a/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json+++ b/plugins/omo/hooks/session-start-checking-bootstrap-provisioning.json@@ -8,7 +8,7 @@"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"","timeout": 30,- "statusMessage": "(OmO) Checking Bootstrap Provisioning"+ "statusMessage": "(OmO 4.16.1) Checking Bootstrap Provisioning"}]}diff --git a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.jsonindex 20a53952..052be4f8 100644--- a/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json+++ b/plugins/omo/hooks/session-start-checking-codegraph-bootstrap.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO) Checking CodeGraph Bootstrap",+ "statusMessage": "(OmO 4.16.1) Checking CodeGraph Bootstrap","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-loading-project-rules.json b/plugins/omo/hooks/session-start-loading-project-rules.jsonindex 2a811de4..8e95b44b 100644--- a/plugins/omo/hooks/session-start-loading-project-rules.json+++ b/plugins/omo/hooks/session-start-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start","timeout": 10,- "statusMessage": "(OmO) Loading Project Rules",+ "statusMessage": "(OmO 4.16.1) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/session-start-recording-session-telemetry.json b/plugins/omo/hooks/session-start-recording-session-telemetry.jsonindex 0cd6fecd..6b96dbc3 100644--- a/plugins/omo/hooks/session-start-recording-session-telemetry.json+++ b/plugins/omo/hooks/session-start-recording-session-telemetry.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start","timeout": 5,- "statusMessage": "(OmO) Recording Session Telemetry",+ "statusMessage": "(OmO 4.16.1) Recording Session Telemetry","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"}]diff --git a/plugins/omo/hooks/stop-checking-start-work-continuation.json b/plugins/omo/hooks/stop-checking-start-work-continuation.jsonindex 322e4059..efeea782 100644--- a/plugins/omo/hooks/stop-checking-start-work-continuation.json+++ b/plugins/omo/hooks/stop-checking-start-work-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop","timeout": 10,- "statusMessage": "(OmO) Checking Start-Work Continuation",+ "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook stop"}]diff --git a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.jsonindex 0e3338ae..79219b9d 100644--- a/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json+++ b/plugins/omo/hooks/subagent-stop-checking-start-work-continuation.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO) Checking Start-Work Continuation",+ "statusMessage": "(OmO 4.16.1) Checking Start-Work Continuation","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook subagent-stop"}]diff --git a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.jsonindex 7edb12df..074ee6ff 100644--- a/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json+++ b/plugins/omo/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop","timeout": 10,- "statusMessage": "(OmO) Verifying LazyCodex Executor Evidence",+ "statusMessage": "(OmO 4.16.1) Verifying LazyCodex Executor Evidence","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"}],diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.jsonindex c27bce02..575ae963 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ultrawork-trigger.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit","timeout": 5,- "statusMessage": "(OmO) Checking Ultrawork Trigger",+ "statusMessage": "(OmO 4.16.1) Checking Ultrawork Trigger","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.jsonindex 75ebc9ca..256d1478 100644--- a/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json+++ b/plugins/omo/hooks/user-prompt-submit-checking-ulw-loop-steering.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO) Checking Ulw-Loop Steering",+ "statusMessage": "(OmO 4.16.1) Checking Ulw-Loop Steering","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.jsonindex 7eec62b4..c987bd2b 100644--- a/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json+++ b/plugins/omo/hooks/user-prompt-submit-loading-project-rules.json@@ -7,7 +7,7 @@"type": "command","command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit","timeout": 10,- "statusMessage": "(OmO) Loading Project Rules",+ "statusMessage": "(OmO 4.16.1) Loading Project Rules","commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"}]diff --git a/plugins/omo/package-lock.json b/plugins/omo/package-lock.jsonindex 91ff539e..571bc8a4 100644--- a/plugins/omo/package-lock.json+++ b/plugins/omo/package-lock.json@@ -1,12 +1,12 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.0",+ "version": "4.16.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.0",+ "version": "4.16.1","workspaces": ["components/codegraph","components/comment-checker",@@ -93,7 +93,7 @@},"components/codegraph": {"name": "@sisyphuslabs/codex-codegraph",- "version": "4.16.0",+ "version": "4.16.1","bin": {"omo-codegraph": "dist/cli.js"},@@ -112,7 +112,7 @@},"components/comment-checker": {"name": "@code-yeongyu/codex-comment-checker",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"omo-comment-checker": "dist/cli.js"@@ -133,7 +133,7 @@},"components/git-bash": {"name": "@sisyphuslabs/codex-git-bash-hook",- "version": "4.16.0",+ "version": "4.16.1","bin": {"omo-git-bash-hook": "dist/cli.js"},@@ -148,7 +148,7 @@},"components/lazycodex-executor-verify": {"name": "@code-yeongyu/codex-lazycodex-executor-verify",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"lazycodex-executor-verify": "dist/cli.js"@@ -165,7 +165,7 @@},"components/lsp": {"name": "@code-yeongyu/codex-lsp",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","dependencies": {"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"@@ -185,7 +185,7 @@},"components/rules": {"name": "@code-yeongyu/codex-rules",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","dependencies": {"picomatch": "^4.0.3"@@ -207,7 +207,7 @@},"components/start-work-continuation": {"name": "@code-yeongyu/codex-start-work-continuation",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"omo-start-work-continuation": "dist/cli.js"@@ -224,7 +224,7 @@},"components/teammode": {"name": "@sisyphuslabs/codex-teammode",- "version": "4.16.0",+ "version": "4.16.1","devDependencies": {"@types/node": "^25.9.3","bun-types": "^1.3.1",@@ -237,7 +237,7 @@},"components/telemetry": {"name": "@code-yeongyu/codex-telemetry",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"omo-telemetry": "dist/cli.js"@@ -255,7 +255,7 @@},"components/ultrawork": {"name": "@code-yeongyu/codex-ultrawork",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"omo-ultrawork": "dist/cli.js"@@ -273,7 +273,7 @@},"components/ulw-loop": {"name": "@code-yeongyu/codex-ulw-loop",- "version": "4.16.0",+ "version": "4.16.1","license": "MIT","bin": {"omo-ulw-loop": "dist/cli.js",diff --git a/plugins/omo/package.json b/plugins/omo/package.jsonindex 9b9dccd1..f5508085 100644--- a/plugins/omo/package.json+++ b/plugins/omo/package.json@@ -1,6 +1,6 @@{"name": "@sisyphuslabs/omo-codex-plugin",- "version": "4.16.0",+ "version": "4.16.1","description": "Aggregate Codex plugin root for OMO components.","type": "module","packageManager": "[email protected]",diff --git a/plugins/omo/scripts/hook-status-message.mjs b/plugins/omo/scripts/hook-status-message.mjsindex ae3b40a1..6b3b9ea1 100644--- a/plugins/omo/scripts/hook-status-message.mjs+++ b/plugins/omo/scripts/hook-status-message.mjs@@ -1,4 +1,4 @@-const PRODUCT_PREFIX = "(OmO)";+const PRODUCT_NAME = "OmO";const WORD_OVERRIDES = new Map([["codegraph", "CodeGraph"],@@ -9,15 +9,14 @@ const WORD_OVERRIDES = new Map([]);export function formatLazyCodexHookStatusMessage(version, label) {- void version;- return `${PRODUCT_PREFIX} ${normalizeLazyCodexHookStatusLabel(label)}`;+ return `(${PRODUCT_NAME} ${normalizeVersion(version)}) ${normalizeLazyCodexHookStatusLabel(label)}`;}export function normalizeLazyCodexHookStatusLabel(label) {const parsed = parseLazyCodexHookStatusMessage(label);const rawLabel = parsed === null ? label : parsed.label;const normalized = rawLabel- .replace(/^\(OmO\)\s*/i, " ")+ .replace(/^\(OmO(?:\s+[^)]+)?\)\s*/i, " ").replace(/\bOMO\b/gi, " ").replace(/\s+/g, " ").trim();@@ -30,14 +29,19 @@ export function normalizeLazyCodexHookStatusLabel(label) {export function parseLazyCodexHookStatusMessage(message) {const trimmed = message.trim();- const current = /^\(OmO\)\s+(.+)$/.exec(trimmed);- if (current !== null) return { version: undefined, label: current[1] };+ const current = /^\(OmO(?:\s+([^)]+))?\)\s+(.+)$/.exec(trimmed);+ if (current !== null) return { version: current[1], label: current[2] };const legacy = /^LazyCodex\(([^)]+)\):\s+(.+)$/.exec(trimmed);if (legacy === null) return null;const [, version, label] = legacy;return { version, label };}+function normalizeVersion(version) {+ const normalized = version.trim();+ return normalized.length === 0 ? "local" : normalized;+}+function formatWord(word) {const lower = word.toLowerCase();const override = WORD_OVERRIDES.get(lower);diff --git a/plugins/omo/skills/frontend/SKILL.md b/plugins/omo/skills/frontend/SKILL.mdindex 08c131d5..43860733 100644--- a/plugins/omo/skills/frontend/SKILL.md+++ b/plugins/omo/skills/frontend/SKILL.md@@ -16,7 +16,7 @@ This file is a router, not a rulebook. The rules live in four rulesets under `re| ANY UI implementation, styling, redesign, mockup, or visual decision | `references/design/README.md` FIRST. It enforces two mandatory gates — the Design System Gate (a `DESIGN.md` must exist before any component is written) and the React Dev Tooling Gate (react-grab / react-scan / react-doctor installed by default) — then routes to the taste and brand references below. || Writing or modifying frontend code, OR auditing performance / SEO / accessibility / quality | ALSO `references/perfection/README.md`. Lighthouse 100 in every category, measured on real Playwright Chromium (never the `lighthouse` CLI), achieved through architecture — never by dropping animations or hiding content. || Looking up a concrete style, color palette, font pairing, chart type, landing-page structure, or UX guideline — or generating a project design system from keywords | `references/ui-ux-db/README.md`. A searchable CSV database with a CLI; a lookup tool, not a posture. Load on demand; `design` stays the source of truth for taste and the `DESIGN.md` contract. |-| Design operating-layer work: personas, cognitive accessibility, design critique, design debt, handoff, synthetic user testing, or designpowers-style guidance | `references/designpowers/README.md`. This is an internal frontend ruleset, not a separate skill. It enriches `/frontend` routing with design brief, role-reference, accessibility, evidence, and debt language while preserving the `design` and `perfection` gates. |+| ANY implementation or redesign that creates or updates `DESIGN.md` — plus explicit operating-layer asks (personas, critique, debt, handoff, synthetic user testing) | `references/designpowers/README.md` + `references/designpowers/lane-c-review.md`. An internal frontend ruleset, not a separate skill: lane-c is the Phase Final flatness/critique reviewer, and its accessibility-constraints and accepted-debt language fills the required `DESIGN.md` sections. Load other lanes only when their phase applies. |**For implementation work, design + perfection load together.** A page that hits Lighthouse 100 but looks like AI slop has failed; a page that looks beautiful but ships a 2 MB bundle has failed. Both win or neither does.@@ -28,15 +28,15 @@ Every implementation must choose one of these branches before UI code changes:- **Static visual reference** (screenshot, generated mockup, Stitch/Imagen output, Figma export, overview, or annotated packet): load `references/design/image-to-code-skill.md` plus the relevant design/perfection files, extract the reference's exact tokens, layout geometry, copy, spacing, states, and responsive intent into `DESIGN.md`, then implement reusable primitives against that contract.- **Live site or URL reference** (the user names a site to clone or gives a URL): load `references/design/clone-from-url.md`. Drive a real browser and extract the runtime truth via `getComputedStyle` — tokens, layout geometry, default/hover/focus/active states, transitions and keyframes, and downloaded assets — into `DESIGN.md`, then clone-code reusable primitives against that contract.Final QA for both runs `/visual-qa` in reference-fidelity mode: compare the actual UI against the reference pixel-by-pixel and verify the code is an extensible design-system implementation, not a screenshot-matched one-off.-2. **Greenfield or fresh setup:** if the user gave no concrete visual reference, design direction is a research deliverable, not a vibe. Fire every available research lane IN PARALLEL before `DESIGN.md` is written; skip a lane only when its tool or network is genuinely unavailable, and name the skip in `DESIGN.md`:- - **Embedded references:** use `references/design/_INDEX.md` to shortlist 2-3 plausible Layer B references, then deeply load exactly one Layer A style skill and one Layer B brand/design-system reference; use `open-design` only when the curated set has no fit; add `ui-ux-db` lookups for palette/type/domain questions.- - **Lazyweb real-product screens:** run the curl-only recipe in `references/design/lazyweb.md` to see how shipped products in the target domain actually look; harvest layout grammar and component patterns, never pixel copies.- - **Imagen concept drafts:** generate 2-3 imagen concept drafts, each seeded with the loaded Layer A + Layer B tokens (palette, type, material); pick the strongest and treat the chosen draft as the reference-fidelity contract.- Synthesize every lane into `DESIGN.md`. Treat sources as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions, then recombine them into project-specific primitives. Never freestyle past the selected references, never copy logos or brand-specific copy. Define Section 5 primitives and their default/hover/active/focus/disabled/loading/empty/error states before code, and pass each through mobile/tablet/desktop visual QA before product screens.+2. **Greenfield or fresh setup:** if the user gave no concrete visual reference, design research is a build step with named deliverables — not exploration to be budgeted. Exploration-stop instincts ("enough exploration", two-wave caps) do not apply here. Fire every research lane IN PARALLEL before `DESIGN.md` is written, and open `DESIGN.md` with a `## 0. Research Log` section recording each lane's deliverable — a lane with no Research Log line did not run. Skip a lane only when its tool or network is genuinely unavailable, and name the skip in `DESIGN.md`:+ - **Embedded references:** use `references/design/_INDEX.md` to shortlist 2-3 plausible Layer B references, then read exactly one Layer A style skill and one Layer B reference in full — every line, no partial reads (they are 200-500 lines; a sliced read produces the flattened token set this gate exists to prevent). Log the shortlist, the pick, and why. Use `open-design` only when the curated set has no fit; add `ui-ux-db` lookups for palette/type/domain questions.+ - **Lazyweb real-product screens:** READ `references/design/lazyweb.md` FIRST and run its recipe verbatim — do not improvise curl calls against lazyweb.com; the recipe mints its own anonymous token. Log the queries run, how many screens you actually VIEWED, and the layout grammar harvested — never pixel copies.+ - **Imagen concept drafts:** generate 2-3 imagen concept drafts, each seeded with the loaded Layer A + Layer B tokens (palette, type, material); pick the strongest and treat the chosen draft as the reference-fidelity contract. Log the draft paths and the pick.+ Synthesize every lane into `DESIGN.md`. Treat sources as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions, then recombine them into project-specific primitives. Never freestyle past the selected references, never copy logos or brand-specific copy. Then run the Primitive Showcase Gate (`references/design/README.md` Phase 0) before any product screen.3. **Existing project with `DESIGN.md` or a component system:** read it, follow it, and update it before implementation only when the requested work needs a new token, primitive, state, motion rule, accessibility constraint, accepted debt, or reference-fidelity requirement.4. **Existing project with UI but no `DESIGN.md` and no reusable component layer:** STOP and ask the user one focused question: should you preserve the current look with copy-nearby styling, or extract a real `DESIGN.md` plus reusable components before continuing? Do not silently choose.-When `references/designpowers/README.md` is loaded for implementation, redesign, or design-system work, feed its personas, accessibility, critique, debt, handoff, and role-reference guidance into the branch above. The resulting `DESIGN.md` is the implementation contract: tokens, typography, spacing, primitives, motion, responsive behavior, accessibility constraints, and accepted debt must be named there before code uses them. Verify component primitives, states, and final screens with real visual QA evidence; pass design-system decisions, implementation evidence, and unresolved debt into `/review-work` for significant implementation work.+For implementation, redesign, or design-system work that creates or updates `DESIGN.md`, `references/designpowers/README.md` + `lane-c-review.md` are part of the default load — feed their personas, accessibility, critique, debt, handoff, and role-reference guidance into the branch above. The resulting `DESIGN.md` is the implementation contract: tokens, typography, spacing, primitives, motion, responsive behavior, accessibility constraints, and accepted debt must be named there before code uses them. Verify component primitives, states, and final screens with real visual QA evidence; pass design-system decisions, implementation evidence, and unresolved debt into `/review-work` for significant implementation work.## Ruleset 1 — design (`references/design/`)@@ -46,7 +46,7 @@ The reference library has one architecture file, 12 taste skills (Layer A — *h| File | Read when ||---|---|-| `design-system-architecture.md` | The project has no `DESIGN.md` (defines the 7-section structure you must create first), or you are extracting a design system from existing UI code. |+| `design-system-architecture.md` | The project has no `DESIGN.md` (defines the structure you must create first — 8 sections plus a greenfield-only `## 0. Research Log`), or you are extracting a design system from existing UI code. |### Layer A — taste skills (pick AT MOST ONE style skill; they encode opposing philosophies)@@ -102,7 +102,7 @@ Domains: `product` `style` `typography` `color` `landing` `chart` `ux` `react` `## Ruleset 4 — designpowers (`references/designpowers/`)-`README.md` routes design operating-layer guidance from the pinned `Owl-Listener/designpowers` reference corpus into the existing frontend workflow. Load it when a frontend task needs explicit personas, accessibility and cognitive constraints, design critique, design debt, handoff, synthetic user testing, motion guidance, or role-reference prompts. It does not replace this frontend skill, `/visual-qa`, `/ulw-plan`, `/start-work`, or `/review-work`; it supplies richer design context that must first be distilled into the project `DESIGN.md`, then used as the design-system contract for implementation and verification.+`README.md` routes design operating-layer guidance from the pinned `Owl-Listener/designpowers` reference corpus into the existing frontend workflow. Load it — together with `lane-c-review.md` — for every implementation or redesign that creates or updates `DESIGN.md`, and additionally when a task needs explicit personas, accessibility and cognitive constraints, design critique, design debt, handoff, synthetic user testing, motion guidance, or role-reference prompts. It does not replace this frontend skill, `/visual-qa`, `/ulw-plan`, `/start-work`, or `/review-work`; it supplies richer design context that must first be distilled into the project `DESIGN.md`, then used as the design-system contract for implementation and verification.## Quick routes — most common requestsdiff --git a/plugins/omo/skills/frontend/references/design/README.md b/plugins/omo/skills/frontend/references/design/README.mdindex c2e16e08..3c82267b 100644--- a/plugins/omo/skills/frontend/references/design/README.md+++ b/plugins/omo/skills/frontend/references/design/README.md@@ -38,12 +38,12 @@ Before touching any UI code, before routing to any reference, before even thinki1. Read `design-system-architecture.md` — it defines the exact structure.2. Identify the branch: greenfield setup, existing UI with implicit patterns/components, or existing UI with no reusable component layer.-3. **Greenfield setup:** if the user gave no concrete visual reference, use `_INDEX.md` to shortlist 2-3 plausible Layer B references, then deeply load exactly one Layer A style skill and one Layer B brand/design-system reference; use `open-design` only when the curated set has no fit. Treat those references as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions into `DESIGN.md`, then recombine them into project-specific primitives. Customize for the user's product and content, but do not freestyle past the selected references; never copy logos, trademarked assets, or brand-specific copy.+3. **Greenfield setup:** if the user gave no concrete visual reference, use `_INDEX.md` to shortlist 2-3 plausible Layer B references, then read exactly one Layer A style skill and one Layer B brand/design-system reference in full — every line, no partial reads; use `open-design` only when the curated set has no fit. Open `DESIGN.md` with a `## 0. Research Log` recording each research lane's deliverable (embedded-reference shortlist + pick, lazyweb screens viewed, imagen drafts — see the SKILL.md workflow); a lane with no line did not run. Treat those references as source material, not mood labels: extract tokens, layout grammar, component anatomy, interaction states, motion, and taste decisions into `DESIGN.md`, then recombine them into project-specific primitives. Customize for the user's product and content, but do not freestyle past the selected references; never copy logos, trademarked assets, or brand-specific copy.- **Commit a distinctive direction BEFORE extracting tokens.** In 1-2 sentences, name the atmosphere, the signature material, the color story, and the one moment a visitor will remember. For an expressive brief, sketch 2-3 genuinely different directions and pick the boldest one you can defend with the loaded reference; do not average them, because the average IS the generic default this skill exists to beat. A locked, never-revisited one-shot decision is how a page ends up flat.- **The reference's distinctive material MUST survive extraction (expressive briefs).** The common failure is loading a rich reference and then distilling it into a generic dark-SaaS token set. Your `DESIGN.md` must carry the *non-default* decisions forward and name which reference each came from: the actual elevation recipe (the specific layers that make a surface read as glass/glossy, not a single blur), a multi-stop perceptual color ramp (not one brand hex reused at varied opacity), the explicit display/body/mono type choices, and one signature interaction. Self-check before writing code: if your `DESIGN.md` could describe any generic dark SaaS, you flattened the reference — go back and put the specific material in.4. **Existing UI with implicit patterns/components:** extract the colors, typography, spacing, primitives, states, and motion already in use. Write `DESIGN.md` to codify what exists before changing UI code.5. **Existing UI with no reusable component layer:** STOP and ask whether to preserve the current style with copy-nearby edits or extract a `DESIGN.md` plus reusable components first. Do not silently choose the cheaper path or the larger refactor.-6. **Do not proceed to product screens until `DESIGN.md` exists, Section 5 names the reusable primitives and their states, and each primitive plus required state passes mobile/tablet/desktop visual QA in a component showcase or equivalent state harness.**+6. Finish the triage at the Primitive Showcase Gate below.#### If YES design system exists → READ IT, FOLLOW IT@@ -52,7 +52,11 @@ Before touching any UI code, before routing to any reference, before even thinki3. If you need a token that doesn't exist, **add it to `DESIGN.md` first**, then use it.4. Never introduce raw hex codes, arbitrary px values, or ad-hoc component patterns that bypass the system.-**This gate is non-negotiable. No design system = no UI work. Period.**+**The Design System Gate is non-negotiable. No design system = no UI work. Period.**++### Primitive Showcase Gate (MANDATORY)++**Do not proceed to product screens until `DESIGN.md` exists, Section 5 names the reusable primitives and their states, and each primitive plus required state passes mobile/tablet/desktop visual QA in a component showcase or equivalent state harness.** Skipping this gate ships ad-hoc-styled product screens and re-enters the redesign loop.## Phase 0.5 — React Dev Tooling Gate (MANDATORY for React projects)diff --git a/plugins/omo/skills/frontend/references/design/_INDEX.md b/plugins/omo/skills/frontend/references/design/_INDEX.mdindex 00e36ba0..3c201c93 100644--- a/plugins/omo/skills/frontend/references/design/_INDEX.md+++ b/plugins/omo/skills/frontend/references/design/_INDEX.md@@ -13,7 +13,7 @@ All reference files live flat in this directory. Three layers:| File | Purpose | Load when ||---|---|---|-| `design-system-architecture.md` | Defines the 7-section `DESIGN.md` structure (atmosphere, color tokens, typography scale, spacing system, components, motion, depth). Creation workflow for new and existing projects. Validation rules and memory management. | Phase 0 fires and no `DESIGN.md` exists in the project. Also load when extracting a design system from existing code. |+| `design-system-architecture.md` | Defines the `DESIGN.md` structure — 8 sections plus a greenfield-only `## 0. Research Log` (atmosphere, color tokens, typography scale, spacing system, components, motion, depth, accessibility constraints & accepted debt). Creation workflow for new and existing projects. Validation rules and memory management. | Phase 0 fires and no `DESIGN.md` exists in the project. Also load when extracting a design system from existing code. |---diff --git a/plugins/omo/skills/frontend/references/design/design-system-architecture.md b/plugins/omo/skills/frontend/references/design/design-system-architecture.mdindex 76d5b8da..4dc0795f 100644--- a/plugins/omo/skills/frontend/references/design/design-system-architecture.md+++ b/plugins/omo/skills/frontend/references/design/design-system-architecture.md@@ -16,11 +16,19 @@ Every frontend project MUST have a `DESIGN.md` at its root. This file is the sin## DESIGN.md Structure-The file has 7 sections. Every section is mandatory. Skip nothing.+The file has 8 sections plus a greenfield-only `## 0. Research Log`. Every section is mandatory. Skip nothing.```markdown# [Project Name] Design System+## 0. Research Log (greenfield only)++One line per research lane, written before the sections below — a lane with no line did not run:+- Embedded refs: shortlisted [2-3 Layer B candidates] → picked [Layer A] + [Layer B] because [reason]+- Lazyweb: [N] queries, [M] screens viewed → [layout grammar taken]+- Imagen drafts: [paths] → picked [draft] as the reference-fidelity contract+- Skipped lanes: [lane] — [tool/network reason]+## 1. Atmosphere & IdentityOne paragraph. What this product FEELS like. Not what it does — how it feels to use.@@ -165,6 +173,19 @@ If borders:If tonal-shift:Surfaces use progressively lighter/darker shades. No borders, no shadows.++## 8. Accessibility Constraints & Accepted Debt++### Constraints+- WCAG target: [e.g. 2.2 AA] — contrast floor [4.5:1 body / 3:1 large text], visible focus on every+ interactive element, full keyboard reachability, `prefers-reduced-motion` respected (Section 6).++### Accepted Debt+| Item | Location | Why accepted | Owner / Exit |+|------|----------|--------------|--------------|+| [debt] | [file/screen] | [reason + user sign-off] | [when it gets fixed] |++New debt is recorded here at the moment it is accepted — never silently.```## Creation Workflow@@ -173,7 +194,7 @@ Surfaces use progressively lighter/darker shades. No borders, no shadows.1. **Select references before taste** — no visual reference means `_INDEX.md` shortlist of 2-3 Layer B candidates, then exactly one Layer A style skill and one Layer B brand/design-system reference. Use `open-design` only when the curated set has no fit.2. **Assemble from references** — extract tokens, layout grammar, component anatomy, states, motion, and taste decisions, then recombine them into project-specific primitives. Customize for the user's product; never copy logos, trademarked assets, or brand-specific copy.-3. **Define the system** — atmosphere, palette, typography, spacing, and one depth strategy, grounded in the selected references and product semantics.+3. **Define the system** — atmosphere, palette, typography, spacing, and one depth strategy, grounded in the selected references and product semantics. Sanity-check the palette and type pairing with one `ui-ux-db` domain search (CLI in `references/ui-ux-db/README.md`).4. **Document initial primitives** — only components you are about to build, including variants and states.5. **Write it to `DESIGN.md`** at project root.6. **Build a primitive showcase first** — exercise each primitive's default, hover, active, focus, disabled, loading, empty, and error states at mobile/tablet/desktop widths before composing product screens.@@ -199,6 +220,7 @@ After every component implementation, check:- [ ] Component reused 2+ times? Documented in Section 5.- [ ] Motion follows the timing table. No arbitrary durations.- [ ] Component visual QA passed for each primitive and required state before product screens were composed.+- [ ] Section 8 accessibility constraints hold for the new component; any new debt is recorded in Section 8, not silently accepted.## Memory Managementdiff --git a/plugins/omo/skills/frontend/references/designpowers/README.md b/plugins/omo/skills/frontend/references/designpowers/README.mdindex dd592acc..f56941f1 100644--- a/plugins/omo/skills/frontend/references/designpowers/README.md+++ b/plugins/omo/skills/frontend/references/designpowers/README.md@@ -2,7 +2,7 @@This is an internal frontend ruleset, not a standalone skill. `/frontend` remains the only public activation point for web UI, UX, visual design, accessibility, design QA, and frontend implementation routing.-Load this reference from the frontend router when a task needs design operating-layer guidance: personas, cognitive accessibility, critique, design debt, handoff, synthetic user testing, motion guidance, or designpowers-style role references.+Load this reference from the frontend router for EVERY implementation or redesign that creates or updates `DESIGN.md`, and whenever a task needs design operating-layer guidance: personas, cognitive accessibility, critique, design debt, handoff, synthetic user testing, motion guidance, or designpowers-style role references.The purpose of this ruleset is to enrich the existing frontend workflow while preserving its gates:@@ -18,7 +18,7 @@ Read these files before applying designpowers guidance:1. `README.md` - this frontend integration contract.2. `routing.md` - how designpowers context feeds existing frontend, planning, execution, visual QA, and review routes.3. `orchestration.md` - shared state, Direct/Auto prompt semantics, safeguards, and role-reference rules.-4. Phase lane docs, loaded only when relevant:+4. Phase lane docs — `lane-c-review.md` loads with this README for every implementation or redesign heading into Phase Final review (it is the flatness/critique reviewer); the other lanes load only when their phase applies:- `lane-a-direction.md` for planning, direction, discovery, personas, taste, and accessibility constraints.- `lane-b-execution.md` for execution, UI build prompts, frontend handoff, and implementation evidence.- `lane-c-review.md` for visual QA, design critique, review gates, and objective evidence before judgment.diff --git a/plugins/omo/skills/frontend/references/designpowers/lane-b-execution.md b/plugins/omo/skills/frontend/references/designpowers/lane-b-execution.mdindex 86ebea16..6ffbb4ee 100644--- a/plugins/omo/skills/frontend/references/designpowers/lane-b-execution.md+++ b/plugins/omo/skills/frontend/references/designpowers/lane-b-execution.md@@ -44,7 +44,7 @@ Lane B worker DoneClaims must include:- Exact changed files and the `frontend` references loaded.- The real-surface QA invocation required by `start-work` for the UI surface, with captured artifact path.-- Screenshot, browser, HTTP, or tmux artifacts appropriate to the visible surface.+- Screenshot, browser, HTTP, or xterm.js web-terminal artifacts appropriate to the visible surface.- Accessibility evidence from the existing OpenAgent frontend path, such as Lighthouse, react-doctor, keyboard checks, or other plan-required checks.- A short design trace: which persona, design principle, token, or state requirement each major UI decision satisfies.- Cleanup receipts for any browser session, server, tmux session, temporary artifact, or process used during QA.diff --git a/plugins/omo/skills/start-work/SKILL.md b/plugins/omo/skills/start-work/SKILL.mdindex e7825570..3b4c297c 100644--- a/plugins/omo/skills/start-work/SKILL.md+++ b/plugins/omo/skills/start-work/SKILL.md@@ -108,10 +108,10 @@ Each sub-task message must include:4. Automated verification commands to run.5. One Manual-QA channel, named with the exact tool and exact invocation (the literal `curl`, `send-keys`, `browser:control-in-app-browser` action, `page.click`, payload, selectors, and the binary observable that decides PASS/FAIL), not "verify it works". A LIGHT checkbox needs one real-surface proof of its deliverable, and auxiliary surfaces (CLI stdout, DB state diff, parsed config dump) are first-class when the surface is CLI- or data-shaped:- HTTP call: `curl -i` against the live endpoint.- - tmux: a `tmux` session driven with `send-keys`, dumped via `capture-pane`.+ - Terminal / TUI: drive a real pty; `tmux send-keys` is fine for a boot/behavior smoke, but color/layout/CJK evidence goes through the xterm.js web terminal below, NEVER `tmux capture-pane`.- Browser use: in Codex, use `browser:control-in-app-browser` first when available and the scenario does not need an authenticated or persistent user browser profile; otherwise drive the real page with Chrome, or agent-browser (https://github.com/vercel-labs/agent-browser) when Chrome is unavailable.- Computer use: OS-level GUI automation against the running desktop app when the surface is not a page.- - TUI visual evidence: when a tmux/TUI claim needs visual QA or PR proof, run `node script/qa/web-terminal-visual-qa.mjs --from-file <capture.txt> --evidence-dir <dir>` and attach `terminal.png` plus `metadata.json`.+ - TUI visual evidence: when a TUI claim needs visual QA or PR proof, run `node script/qa/web-terminal-visual-qa.mjs --command "<cmd>" --input "{Enter}" --evidence-dir <dir>` (real pty rendered through xterm.js in Chrome) and attach `terminal.png` plus `metadata.json`.6. The adversarial classes that apply to this sub-task (from the 9 ultraqa classes) and how each is probed.7. Required artifact path and cleanup receipt.diff --git a/plugins/omo/skills/ultrawork/SKILL.md b/plugins/omo/skills/ultrawork/SKILL.mdindex 61ed059a..55d0b6cb 100644--- a/plugins/omo/skills/ultrawork/SKILL.md+++ b/plugins/omo/skills/ultrawork/SKILL.md@@ -56,9 +56,10 @@ exercises the surface; capture the artifact.1. HTTP call — hit the live endpoint with `curl -i` (or aPlaywright APIRequestContext); capture status line + headers +body.- 2. tmux — `tmux new-session -d -s ulw-qa-<criterion>`, drive with- `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript- is the artifact.+ 2. Terminal / TUI - drive a real pty and prove it through the+ xterm.js web terminal (see the TUI visual QA note below). tmux+ `send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`+ for color / layout / CJK evidence, which degrades truecolor.3. Browser use — in Codex, use `browser:control-in-app-browser`first when available and no authenticated/persistent user browserprofile is required. Otherwise use Chrome to drive the REAL page;@@ -86,13 +87,13 @@ channel scenario when the behavior is user-facing. `--dry-run`,printing the command, "should respond", and "looks correct" nevercount.-For TUI visual QA, terminal transcripts alone are not enough when a-visual surface is being evaluated. In this repo, prefer-`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --from-file <capture.txt> --evidence-dir <dir>`-or the helper's `--command` tmux-backed PTY connector when available.-Outside this repo, capture equivalent browser/computer-use rendered-terminal evidence: screenshot, plain transcript, rendered HTML or action-log, and cleanup receipt.+For TUI visual QA, render the terminal through the real xterm.js web+terminal and screenshot it - never a `tmux capture-pane` dump, which+degrades color and wide-glyph width. In this repo:+`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`+(live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw+stream). Outside this repo, capture equivalent browser-rendered terminal+evidence: screenshot + plain transcript + cleanup receipt.# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)@@ -294,6 +295,13 @@ evidence for that step. Do not start dependent implementation until theaudit, research, or review result is integrated or explicitly recordedas inconclusive. Do not generate a plan before spawned research lanesthat feed the plan have returned or been closed as inconclusive.+Spawn every independent child for the current wave first. After the wave+is launched, run `multi_agent_v1.wait_agent` for each spawned child until+each reaches terminal status (`completed`, `failed`, `blocked`, or+explicitly recorded inconclusive) before any dependent `update_plan`+transition, `create_goal` continuation, implementation tool call, plan+drafting, approval-gate work, PR handoff, or final response. A timeout is+not terminal status.Do not write the final answer, PR handoff, or completion summary whileactive child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.After two silent waits send `TASK STILL ACTIVE: return <deliverable> ordiff --git a/plugins/omo/skills/ulw-loop/SKILL.md b/plugins/omo/skills/ulw-loop/SKILL.mdindex 16b76902..81a02958 100644--- a/plugins/omo/skills/ulw-loop/SKILL.md+++ b/plugins/omo/skills/ulw-loop/SKILL.md@@ -22,7 +22,7 @@ This skill is intentionally compact. The full workflow lives in `references/full- Use the ulw-loop CLI state under `.omo/ulw-loop`; do not hand-edit goal state.- After any compaction or context loss, re-read brief + goals + ledger FIRST plus `omo ulw-loop status --json`, then resume; never re-plan from scratch.- If `omo ulw-loop create-goals` says the existing aggregate is already complete, start unrelated new work with a fresh `--session-id <new-id>` instead of steering or forcing the completed default state. Use `--force` only to intentionally overwrite completed evidence.-- Every success criterion needs observable evidence from a real surface: a channel (tmux, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).+- Every success criterion needs observable evidence from a real surface: a channel (terminal/TUI via the xterm.js web terminal, HTTP, browser, computer-use) or, for CLI- or data-shaped criteria, an auxiliary surface (CLI stdout, DB diff, parsed config dump).- Record evidence through the CLI only after cleanup receipts are available.- Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.- Every `multi_agent_v1.spawn_agent` message starts with `TASK:`, then names `DELIVERABLE`, `SCOPE`, and `VERIFY`; put role and specialty instructions inside `message`; use `fork_context: false` unless full history is truly required.diff --git a/plugins/omo/skills/ulw-loop/references/full-workflow.md b/plugins/omo/skills/ulw-loop/references/full-workflow.mdindex 78b84716..a4799afd 100644--- a/plugins/omo/skills/ulw-loop/references/full-workflow.md+++ b/plugins/omo/skills/ulw-loop/references/full-workflow.md@@ -19,16 +19,16 @@ Audit each pass, fail, block, steering change, and checkpoint in `.omo/ulw-loop/Run each criterion's real-surface proof yourself through the channel that faithfully exercises it; capture the artifact before recording PASS.1. **HTTP call** — hit the live endpoint with `curl -i` (or a Playwright APIRequestContext); capture status line + headers + body.-2. **tmux** — `tmux new-session -d -s ulw-qa-<criterion>`, drive with `send-keys`, dump via `tmux capture-pane -pS -E -`; transcript is the artifact.+2. **Terminal / TUI** - prove it through the xterm.js web terminal; tmux `send-keys` is fine for a boot smoke, but NEVER `tmux capture-pane` for color/layout/CJK evidence (it degrades truecolor).3. **Browser use** — in Codex, use `browser:control-in-app-browser` first when available and the scenario does not need an authenticated or persistent user browser profile. Otherwise use Chrome to drive the REAL page; if unavailable, use agent-browser. Capture action log + screenshot path. Never downgrade a browser-facing criterion.4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.-For TUI visual QA, pair the tmux transcript with a browser-rendered terminal-screenshot. In this repo run `node script/qa/web-terminal-visual-qa.mjs---from-file <capture.txt> --evidence-dir <dir>` and record `terminal.png`,-`terminal.html`, `terminal.txt`, and `metadata.json` as the visual evidence-bundle. This is mandatory when a PR or review needs to inspect the terminal-screen, not just the text.+For TUI visual QA, render the terminal through the real xterm.js web terminal and+screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph+width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command+"<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;+`--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and+`metadata.json`. Mandatory when a PR or review must inspect the terminal screen.Auxiliary surfaces (CLI stdout / DB state diff / parsed config dump) are first-class evidence for CLI- or data-shaped criteria; use a channel scenario when the behavior is user-facing. `--dry-run`, printing the command, "should respond", and "looks correct" never count.diff --git a/plugins/omo/skills/ulw-plan/SKILL.md b/plugins/omo/skills/ulw-plan/SKILL.mdindex e038420e..4e7a99b3 100644--- a/plugins/omo/skills/ulw-plan/SKILL.md+++ b/plugins/omo/skills/ulw-plan/SKILL.md@@ -67,6 +67,17 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOPmulti_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})```+Spawn every independent child for the current wave first. After the wave+is launched, use `multi_agent_v1.wait_agent` for each child until each+reaches terminal status. A timeout is not terminal status. Do not start dependent planning, drafting, approval-gate work, or final handoff until each child result is integrated or recorded as inconclusive.++For work likely to exceed one wait cycle, require the child to send+`WORKING: <task> - <current phase>` before long passes and+`BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent`+timeout only means no new mailbox update arrived. Treat a running child as+alive. Fallback only when the child is completed without the deliverable,+ack-only after followup, explicitly `BLOCKED:`, or no longer running.+Roles: `explorer` (internal patterns/conventions/tests), `librarian` (external docs/contracts), `metis` (gap analysis), `momus` (high-accuracy plan review). Full spawn/wait/fallback discipline is in `references/full-workflow.md`.## Stop rulesdiff --git a/plugins/omo/skills/visual-qa/SKILL.md b/plugins/omo/skills/visual-qa/SKILL.mdindex d85bc84f..bbf5d604 100644--- a/plugins/omo/skills/visual-qa/SKILL.md+++ b/plugins/omo/skills/visual-qa/SKILL.md@@ -79,32 +79,28 @@ For reference-fidelity work, repeat the capture and diff for every referenced vi### TUI-1. Capture plain text and an ANSI-preserving copy:--```-tmux capture-pane -p > capture.txt-tmux capture-pane -e -p > capture-ansi.txt-```--2. When the TUI evidence will be attached to a PR or reviewed visually, render- the capture through the browser helper from the repository root:+1. Render the TUI through the REAL xterm.js web terminal and screenshot it -+ NEVER `tmux capture-pane`, which degrades truecolor and misaligns wide (CJK)+ glyphs. Run the command in a real pty and capture the browser render from the+ repository root:```node script/qa/web-terminal-visual-qa.mjs --title "TUI Visual QA" \- --from-file capture.txt \+ --command "<tui-command>" \+ --input "{ArrowDown}" --input "{Enter}" \--evidence-dir .omo/evidence/<slug>/tui-web-terminal```-This produces `terminal.png`, `terminal.html`, `terminal.txt`,-`terminal-ansi.txt`, and `metadata.json`. Treat this as the standard TUI visual-artifact pattern for terminal screenshots. If the project is outside this repo,-copy the same pattern: terminal capture -> browser-rendered page -> PNG +-metadata with cleanup receipt.+ Replay a saved raw stream with `--from-file <capture.ansi>` instead of+ `--command`. This produces `terminal.png` (the true-color artifact),+ `terminal.txt`, `terminal-ansi.txt`, and `metadata.json`. Treat this as the+ standard TUI visual artifact pattern. Outside this repo, copy the pattern:+ real pty -> xterm.js in a browser -> PNG + metadata with cleanup receipt.-3. Run the check with the REAL terminal width and keep the JSON:+2. Run the width check on the produced text and keep the JSON:```-node "$SKILL_DIR/scripts/visual-qa.mjs" tui-check capture.txt --cols <N>+node "$SKILL_DIR/scripts/visual-qa.mjs" tui-check .omo/evidence/<slug>/tui-web-terminal/terminal.txt --cols <N>```Key fields: `maxWidth`, `overflowLines[]`, `borderMisaligned`, `wideCharColumns[]`, `hasAnsi`.diff --git a/plugins/omo/test/aggregate-hooks.test.mjs b/plugins/omo/test/aggregate-hooks.test.mjsindex 926b2c1a..f2d55737 100644--- a/plugins/omo/test/aggregate-hooks.test.mjs+++ b/plugins/omo/test/aggregate-hooks.test.mjs@@ -68,7 +68,7 @@ test("#given aggregate SubagentStop hooks #when inspected #then start-work and Lassert.equal(verifierGroups.length, 1);assert.equal(verifierGroups[0]?.groupIndex, 0);assert.equal(verifierGroups[0]?.handler.timeout, 10);- assert.equal(verifierGroups[0]?.handler.statusMessage, "(OmO) Verifying LazyCodex Executor Evidence");+ assert.match(verifierGroups[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Verifying LazyCodex Executor Evidence$/);});test("#given aggregate PostCompact hooks #when hooks are inspected #then LSP diagnostics cache reset is registered", async () => {@@ -84,7 +84,7 @@ test("#given aggregate PostCompact hooks #when hooks are inspected #then LSP dia// thenassert.equal(lspPostCompactHooks.length, 1);- assert.equal(lspPostCompactHooks[0]?.handler.statusMessage, "(OmO) Resetting LSP Diagnostics Cache");+ assert.match(lspPostCompactHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Resetting LSP Diagnostics Cache$/);});test("#given aggregate hook commands #when inspected #then every command exposes a Codex status message", async () => {@@ -218,7 +218,7 @@ test("#given aggregate PostToolUse hooks #when inspected #then CodeGraph init gu// thenassert.equal(codegraphPostToolUseHooks.length, 1);assert.equal(codegraphPostToolUseHooks[0]?.matcher, "^(codegraph[._].*|mcp__codegraph__.*)$");- assert.equal(codegraphPostToolUseHooks[0]?.handler.statusMessage, "(OmO) Checking CodeGraph Init Guidance");+ assert.match(codegraphPostToolUseHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Checking CodeGraph Init Guidance$/);});test("#given aggregate PostToolUse hooks #when inspected #then thread title hygiene is registered for created Codex threads", async () => {@@ -235,7 +235,7 @@ test("#given aggregate PostToolUse hooks #when inspected #then thread title hygi// thenassert.equal(threadTitleHooks.length, 1);assert.equal(threadTitleHooks[0]?.matcher, "^(create_thread|codex_app\\.create_thread)$");- assert.equal(threadTitleHooks[0]?.handler.statusMessage, "(OmO) Checking Thread Title Hygiene");+ assert.match(threadTitleHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Checking Thread Title Hygiene$/);});test("#given aggregate plugin packaging #when inspected #then hooks and compatibility sentinels stay Python-free", async () => {diff --git a/plugins/omo/test/bootstrap-hooks.test.mjs b/plugins/omo/test/bootstrap-hooks.test.mjsindex 8fb7881d..f22ab6cd 100644--- a/plugins/omo/test/bootstrap-hooks.test.mjs+++ b/plugins/omo/test/bootstrap-hooks.test.mjs@@ -171,7 +171,7 @@ test("#given the bootstrap component #when its SessionStart registration is inspassert.equal(typeof handler.timeout, "number");assert(handler.timeout <= 60, `${label} bootstrap timeout must stay <= 60 seconds`);assert.equal(typeof handler.statusMessage, "string");- assert.match(handler.statusMessage, /^\(OmO\) .+$/);+ assert.match(handler.statusMessage, /^\(OmO [^)]+\) .+$/);}});diff --git a/plugins/omo/test/hook-status-message.test.mjs b/plugins/omo/test/hook-status-message.test.mjsindex 26029cb2..04b16524 100644--- a/plugins/omo/test/hook-status-message.test.mjs+++ b/plugins/omo/test/hook-status-message.test.mjs@@ -128,7 +128,7 @@ function collectCommandHooks(hooks, source, version) {return commandHooks;}-test("#given hook status label #when formatting #then prefixes OmO display namespace", async () => {+test("#given hook status label #when formatting #then prefixes OmO display namespace and version", async () => {// givenconst version = (await readRepoJson("package.json")).version;const label = "Checking Comments";@@ -137,10 +137,10 @@ test("#given hook status label #when formatting #then prefixes OmO display namesconst message = formatLazyCodexHookStatusMessage(version, label);// then- assert.equal(message, "(OmO) Checking Comments");+ assert.equal(message, `(OmO ${version}) Checking Comments`);});-test("#given hook status label with blank version #when formatting #then still prefixes OmO display namespace", () => {+test("#given hook status label with blank version #when formatting #then uses local OmO display version", () => {// givenconst version = " ";const label = "Checking Comments";@@ -149,7 +149,7 @@ test("#given hook status label with blank version #when formatting #then still pconst message = formatLazyCodexHookStatusMessage(version, label);// then- assert.equal(message, "(OmO) Checking Comments");+ assert.equal(message, "(OmO local) Checking Comments");});test("#given loose legacy status label #when normalizing #then removes OMO wording and title-cases label", async () => {@@ -163,7 +163,7 @@ test("#given loose legacy status label #when normalizing #then removes OMO wordi// thenassert.equal(normalized, "Checking Comments");- assert.equal(message, "(OmO) Checking Comments");+ assert.equal(message, `(OmO ${version}) Checking Comments`);});test("#given LazyCodex appears inside hook label #when normalizing #then product casing is preserved", async () => {@@ -177,7 +177,7 @@ test("#given LazyCodex appears inside hook label #when normalizing #then product// thenassert.equal(normalized, "Verifying LazyCodex Executor Evidence");- assert.equal(message, "(OmO) Verifying LazyCodex Executor Evidence");+ assert.equal(message, `(OmO ${version}) Verifying LazyCodex Executor Evidence`);});test("#given MCP appears inside hook label #when normalizing #then protocol casing is preserved", () => {@@ -190,7 +190,20 @@ test("#given MCP appears inside hook label #when normalizing #then protocol casi// thenassert.equal(normalized, "Recommending Git Bash MCP");- assert.equal(message, "(OmO) Recommending Git Bash MCP");+ assert.equal(message, "(OmO 4.10.0) Recommending Git Bash MCP");+});++test("#given versioned OmO status label #when normalizing #then it does not duplicate display prefix", () => {+ // given+ const label = "(OmO 4.16.0) checking comments";++ // when+ const parsed = parseLazyCodexHookStatusMessage(label);+ const message = formatLazyCodexHookStatusMessage("4.16.1", label);++ // then+ assert.deepEqual(parsed, { version: "4.16.0", label: "checking comments" });+ assert.equal(message, "(OmO 4.16.1) Checking Comments");});test("#given aggregate comment-checker hook #when status is inspected #then it uses OmO comments label", async () => {// given@@ -201,7 +214,7 @@ test("#given aggregate comment-checker hook #when status is inspected #then it uconst commentCheckerHook = hooks.find((hook) => hook.command.includes("components/comment-checker/dist/cli.js"));// then- assert.equal(commentCheckerHook?.statusMessage, formatLazyCodexHookStatusMessage("", "Checking Comments"));+ assert.equal(commentCheckerHook?.statusMessage, formatLazyCodexHookStatusMessage(commentCheckerHook?.version ?? "", "Checking Comments"));assert.doesNotMatch(JSON.stringify(aggregateManifests), /checking\s+OMO\s+comments/i);});@@ -231,6 +244,6 @@ test("#given aggregate and component hooks #when status messages are inspected #const actualLabels = new Set(commandHooks.map((hook) => parseLazyCodexHookStatusMessage(hook.statusMessage)?.label));assert.deepEqual([...expectedLabels.values()].filter((label) => !actualLabels.has(label)), []);for (const hook of commandHooks) {- assert.match(hook.statusMessage, /^\(OmO\) /);+ assert.match(hook.statusMessage, /^\(OmO [^)]+\) /);}});diff --git a/plugins/omo/test/sync-hook-status-messages.test.mjs b/plugins/omo/test/sync-hook-status-messages.test.mjsindex b8c45fa1..7e2969c0 100644--- a/plugins/omo/test/sync-hook-status-messages.test.mjs+++ b/plugins/omo/test/sync-hook-status-messages.test.mjs@@ -88,10 +88,10 @@ test("#given source package versions and component without hooks #when hook statconst aggregateHooks = await readJson(join(root, "hooks", "hooks.json"));const componentHooks = await readJson(join(root, "components", "comment-checker", "hooks", "hooks.json"));const lspHooks = await readJson(join(root, "components", "lsp", "hooks", "hooks.json"));- assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");- assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[1].statusMessage, "(OmO) Checking LSP Diagnostics");- assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");- assert.equal(lspHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking LSP Diagnostics");+ assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.1.0) Checking Comments");+ assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[1].statusMessage, "(OmO 0.1.0) Checking LSP Diagnostics");+ assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.1.1) Checking Comments");+ assert.equal(lspHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.2.0) Checking LSP Diagnostics");});test("#given release version override #when hook status messages sync #then aggregate hooks use release version", async () => {@@ -139,6 +139,6 @@ test("#given release version override #when hook status messages sync #then aggr// thenconst aggregateHooks = await readJson(join(root, "hooks", "hooks.json"));const componentHooks = await readJson(join(root, "components", "comment-checker", "hooks", "hooks.json"));- assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");- assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");+ assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 4.8.0) Checking Comments");+ assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 4.8.0) Checking Comments");});diff --git a/plugins/omo/test/ulw-plan-skill-contract.test.mjs b/plugins/omo/test/ulw-plan-skill-contract.test.mjsnew file mode 100644index 00000000..0b3db5b5--- /dev/null+++ b/plugins/omo/test/ulw-plan-skill-contract.test.mjs@@ -0,0 +1,52 @@+import assert from "node:assert/strict";+import { readFile } from "node:fs/promises";+import { dirname, join } from "node:path";+import test from "node:test";+import { fileURLToPath } from "node:url";++const root = dirname(dirname(fileURLToPath(import.meta.url)));++async function readUlwPlanCopies() {+ const componentPath = join(root, "components", "ultrawork", "skills", "ulw-plan", "SKILL.md");+ const packagedPath = join(root, "skills", "ulw-plan", "SKILL.md");+ return [+ { label: "component", path: componentPath, content: await readFile(componentPath, "utf8") },+ { label: "packaged", path: packagedPath, content: await readFile(packagedPath, "utf8") },+ ];+}++test("#given ulw-plan skill #when Codex delegation is inspected #then spawned planners block dependent work", async () => {+ for (const copy of await readUlwPlanCopies()) {+ assert.match(copy.content, /multi_agent_v1\.spawn_agent/, `${copy.label}: must document Codex spawning`);+ assert.match(copy.content, /multi_agent_v1\.wait_agent/, `${copy.label}: must document Codex waiting`);+ assert.match(+ copy.content,+ /Spawn every independent child for the current wave first/i,+ `${copy.label}: must preserve independent spawn waves`,+ );+ assert.match(+ copy.content,+ /After the wave\s+is launched[\s\S]{0,240}multi_agent_v1\.wait_agent[\s\S]{0,240}terminal status/i,+ `${copy.label}: must wait after the wave is launched`,+ );+ assert.doesNotMatch(+ copy.content,+ /Immediately after any `multi_agent_v1\.spawn_agent`/i,+ `${copy.label}: must not serialize independent spawns`,+ );+ assert.match(copy.content, /terminal status/i, `${copy.label}: must wait until terminal status`);+ assert.match(copy.content, /WORKING:/, `${copy.label}: must keep progress liveness guidance`);+ assert.match(copy.content, /BLOCKED:/, `${copy.label}: must keep blocked liveness guidance`);+ assert.match(+ copy.content,+ /timeout only means no new mailbox update arrived/i,+ `${copy.label}: must frame wait timeouts as mailbox silence`,+ );+ assert.match(copy.content, /Fallback only when/, `${copy.label}: must keep explicit fallback conditions`);+ assert.match(+ copy.content,+ /do not start dependent planning, drafting, approval-gate work, or final handoff/i,+ `${copy.label}: must block dependent planning work before child results are integrated`,+ );+ }+});