oh-my-opencode 4.16.0 → 4.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/codex-qa/SKILL.md +9 -7
- package/.agents/skills/codex-qa/references/logging-debug.md +6 -4
- package/.agents/skills/opencode-qa/SKILL.md +9 -9
- package/.agents/skills/opencode-qa/references/tui-tmux.md +10 -8
- package/dist/cli/codex-ulw-loop.d.ts +8 -0
- package/dist/cli/get-local-version/types.d.ts +1 -1
- package/dist/cli/index.js +260 -207
- package/dist/cli-node/index.js +260 -207
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/monitor/process.d.ts +17 -1
- package/dist/index.js +1048 -1001
- package/dist/skills/frontend/SKILL.md +9 -9
- package/dist/skills/frontend/references/design/README.md +7 -3
- package/dist/skills/frontend/references/design/_INDEX.md +1 -1
- package/dist/skills/frontend/references/design/design-system-architecture.md +24 -2
- package/dist/skills/frontend/references/designpowers/README.md +2 -2
- package/dist/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
- package/dist/skills/start-work/SKILL.md +2 -2
- package/dist/skills/visual-qa/SKILL.md +13 -17
- package/docs/reference/web-terminal-visual-qa.md +39 -45
- package/package.json +31 -25
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +18 -10
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +18 -10
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +11 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +18 -10
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +15 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +89 -27
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +55 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.js +33 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +10 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +15 -11
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +59 -11
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-snapshot.ts +38 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +11 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +15 -7
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +260 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-snapshot.test.ts +124 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +101 -2
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +10 -6
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +7 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +24 -2
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +2 -2
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +18 -10
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +7 -7
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +11 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +13 -17
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +22 -9
- package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +52 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +65 -39
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +2 -2
- package/packages/shared-skills/skills/frontend/SKILL.md +9 -9
- package/packages/shared-skills/skills/frontend/references/design/README.md +7 -3
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +24 -2
- package/packages/shared-skills/skills/frontend/references/designpowers/README.md +2 -2
- package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
- package/packages/shared-skills/skills/start-work/SKILL.md +2 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +13 -17
- package/script/qa/strip-ansi.mjs +10 -0
- package/script/qa/web-terminal-visual-qa.mjs +112 -195
- package/script/qa/xterm-live-terminal.mjs +180 -0
- package/script/qa/web-terminal-renderer.mjs +0 -218
|
@@ -56,9 +56,10 @@ exercises the surface; capture the artifact.
|
|
|
56
56
|
1. HTTP call — hit the live endpoint with `curl -i` (or a
|
|
57
57
|
Playwright APIRequestContext); capture status line + headers +
|
|
58
58
|
body.
|
|
59
|
-
2.
|
|
60
|
-
|
|
61
|
-
is
|
|
59
|
+
2. Terminal / TUI - drive a real pty and prove it through the
|
|
60
|
+
xterm.js web terminal (see the TUI visual QA note below). tmux
|
|
61
|
+
`send-keys` is fine for a boot smoke; NEVER `tmux capture-pane`
|
|
62
|
+
for color / layout / CJK evidence, which degrades truecolor.
|
|
62
63
|
3. Browser use — in Codex, use `browser:control-in-app-browser`
|
|
63
64
|
first when available and no authenticated/persistent user browser
|
|
64
65
|
profile is required. Otherwise use Chrome to drive the REAL page;
|
|
@@ -86,13 +87,13 @@ channel scenario when the behavior is user-facing. `--dry-run`,
|
|
|
86
87
|
printing the command, "should respond", and "looks correct" never
|
|
87
88
|
count.
|
|
88
89
|
|
|
89
|
-
For TUI visual QA,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
For TUI visual QA, render the terminal through the real xterm.js web
|
|
91
|
+
terminal and screenshot it - never a `tmux capture-pane` dump, which
|
|
92
|
+
degrades color and wide-glyph width. In this repo:
|
|
93
|
+
`node script/qa/web-terminal-visual-qa.mjs --title "<surface>" --command "<cmd>" --input "{Enter}" --evidence-dir <dir>`
|
|
94
|
+
(live pty + xterm.js in Chrome; `--from-file <capture>` replays a raw
|
|
95
|
+
stream). Outside this repo, capture equivalent browser-rendered terminal
|
|
96
|
+
evidence: screenshot + plain transcript + cleanup receipt.
|
|
96
97
|
|
|
97
98
|
# Bootstrap (DO ALL FOUR BEFORE ANY OTHER WORK — NO SKIPPING)
|
|
98
99
|
|
|
@@ -294,6 +295,13 @@ evidence for that step. Do not start dependent implementation until the
|
|
|
294
295
|
audit, research, or review result is integrated or explicitly recorded
|
|
295
296
|
as inconclusive. Do not generate a plan before spawned research lanes
|
|
296
297
|
that feed the plan have returned or been closed as inconclusive.
|
|
298
|
+
Spawn every independent child for the current wave first. After the wave
|
|
299
|
+
is launched, run `multi_agent_v1.wait_agent` for each spawned child until
|
|
300
|
+
each reaches terminal status (`completed`, `failed`, `blocked`, or
|
|
301
|
+
explicitly recorded inconclusive) before any dependent `update_plan`
|
|
302
|
+
transition, `create_goal` continuation, implementation tool call, plan
|
|
303
|
+
drafting, approval-gate work, PR handoff, or final response. A timeout is
|
|
304
|
+
not terminal status.
|
|
297
305
|
Do not write the final answer, PR handoff, or completion summary while
|
|
298
306
|
active child agents remain open. Use short `multi_agent_v1.wait_agent` cycles.
|
|
299
307
|
After two silent waits send `TASK STILL ACTIVE: return <deliverable> or
|
|
@@ -22,7 +22,7 @@ This skill is intentionally compact. The full workflow lives in `references/full
|
|
|
22
22
|
- Use the ulw-loop CLI state under `.omo/ulw-loop`; do not hand-edit goal state.
|
|
23
23
|
- 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.
|
|
24
24
|
- 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.
|
|
25
|
-
- Every success criterion needs observable evidence from a real surface: a channel (
|
|
25
|
+
- 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).
|
|
26
26
|
- Record evidence through the CLI only after cleanup receipts are available.
|
|
27
27
|
- Delegate code edits, test writes, fixes, and QA execution to right-sized Codex subagents when the workflow requires it.
|
|
28
28
|
- 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.
|
|
@@ -19,16 +19,16 @@ Audit each pass, fail, block, steering change, and checkpoint in `.omo/ulw-loop/
|
|
|
19
19
|
Run each criterion's real-surface proof yourself through the channel that faithfully exercises it; capture the artifact before recording PASS.
|
|
20
20
|
|
|
21
21
|
1. **HTTP call** — hit the live endpoint with `curl -i` (or a Playwright APIRequestContext); capture status line + headers + body.
|
|
22
|
-
2. **
|
|
22
|
+
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).
|
|
23
23
|
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.
|
|
24
24
|
4. **Computer use** — for desktop/GUI apps, drive the running app via OS automation (computer-use, AppleScript, xdotool, etc.); capture action log + screenshot.
|
|
25
25
|
|
|
26
|
-
For TUI visual QA,
|
|
27
|
-
screenshot
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
For TUI visual QA, render the terminal through the real xterm.js web terminal and
|
|
27
|
+
screenshot it - NEVER a `tmux capture-pane` dump (it degrades color and wide-glyph
|
|
28
|
+
width). In this repo run `node script/qa/web-terminal-visual-qa.mjs --command
|
|
29
|
+
"<cmd>" --input "{Enter}" --evidence-dir <dir>` (live pty + xterm.js in Chrome;
|
|
30
|
+
`--from-file` replays a raw stream) and record `terminal.png`, `terminal.txt`, and
|
|
31
|
+
`metadata.json`. Mandatory when a PR or review must inspect the terminal screen.
|
|
32
32
|
|
|
33
33
|
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.
|
|
34
34
|
|
|
@@ -67,6 +67,17 @@ Fan out read-only research before deciding. Every spawn names DELIVERABLE / SCOP
|
|
|
67
67
|
multi_agent_v1.spawn_agent({"message":"TASK: act as an explorer. DELIVERABLE: ... SCOPE: ... VERIFY: ...","agent_type":"explorer","fork_context":false})
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
+
Spawn every independent child for the current wave first. After the wave
|
|
71
|
+
is launched, use `multi_agent_v1.wait_agent` for each child until each
|
|
72
|
+
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.
|
|
73
|
+
|
|
74
|
+
For work likely to exceed one wait cycle, require the child to send
|
|
75
|
+
`WORKING: <task> - <current phase>` before long passes and
|
|
76
|
+
`BLOCKED: <reason>` only when progress stops. A `multi_agent_v1.wait_agent`
|
|
77
|
+
timeout only means no new mailbox update arrived. Treat a running child as
|
|
78
|
+
alive. Fallback only when the child is completed without the deliverable,
|
|
79
|
+
ack-only after followup, explicitly `BLOCKED:`, or no longer running.
|
|
80
|
+
|
|
70
81
|
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`.
|
|
71
82
|
|
|
72
83
|
## Stop rules
|
|
@@ -79,32 +79,28 @@ For reference-fidelity work, repeat the capture and diff for every referenced vi
|
|
|
79
79
|
|
|
80
80
|
### TUI
|
|
81
81
|
|
|
82
|
-
1.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
tmux capture-pane -e -p > capture-ansi.txt
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
2. When the TUI evidence will be attached to a PR or reviewed visually, render
|
|
90
|
-
the capture through the browser helper from the repository root:
|
|
82
|
+
1. Render the TUI through the REAL xterm.js web terminal and screenshot it -
|
|
83
|
+
NEVER `tmux capture-pane`, which degrades truecolor and misaligns wide (CJK)
|
|
84
|
+
glyphs. Run the command in a real pty and capture the browser render from the
|
|
85
|
+
repository root:
|
|
91
86
|
|
|
92
87
|
```
|
|
93
88
|
node script/qa/web-terminal-visual-qa.mjs --title "TUI Visual QA" \
|
|
94
|
-
--
|
|
89
|
+
--command "<tui-command>" \
|
|
90
|
+
--input "{ArrowDown}" --input "{Enter}" \
|
|
95
91
|
--evidence-dir .omo/evidence/<slug>/tui-web-terminal
|
|
96
92
|
```
|
|
97
93
|
|
|
98
|
-
|
|
99
|
-
`terminal
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
metadata with cleanup receipt.
|
|
94
|
+
Replay a saved raw stream with `--from-file <capture.ansi>` instead of
|
|
95
|
+
`--command`. This produces `terminal.png` (the true-color artifact),
|
|
96
|
+
`terminal.txt`, `terminal-ansi.txt`, and `metadata.json`. Treat this as the
|
|
97
|
+
standard TUI visual artifact pattern. Outside this repo, copy the pattern:
|
|
98
|
+
real pty -> xterm.js in a browser -> PNG + metadata with cleanup receipt.
|
|
103
99
|
|
|
104
|
-
|
|
100
|
+
2. Run the width check on the produced text and keep the JSON:
|
|
105
101
|
|
|
106
102
|
```
|
|
107
|
-
node "$SKILL_DIR/scripts/visual-qa.mjs" tui-check
|
|
103
|
+
node "$SKILL_DIR/scripts/visual-qa.mjs" tui-check .omo/evidence/<slug>/tui-web-terminal/terminal.txt --cols <N>
|
|
108
104
|
```
|
|
109
105
|
|
|
110
106
|
Key fields: `maxWidth`, `overflowLines[]`, `borderMisaligned`, `wideCharColumns[]`, `hasAnsi`.
|
|
@@ -68,7 +68,7 @@ test("#given aggregate SubagentStop hooks #when inspected #then start-work and L
|
|
|
68
68
|
assert.equal(verifierGroups.length, 1);
|
|
69
69
|
assert.equal(verifierGroups[0]?.groupIndex, 0);
|
|
70
70
|
assert.equal(verifierGroups[0]?.handler.timeout, 10);
|
|
71
|
-
assert.
|
|
71
|
+
assert.match(verifierGroups[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Verifying LazyCodex Executor Evidence$/);
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
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
|
|
|
84
84
|
|
|
85
85
|
// then
|
|
86
86
|
assert.equal(lspPostCompactHooks.length, 1);
|
|
87
|
-
assert.
|
|
87
|
+
assert.match(lspPostCompactHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Resetting LSP Diagnostics Cache$/);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
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
|
|
|
218
218
|
// then
|
|
219
219
|
assert.equal(codegraphPostToolUseHooks.length, 1);
|
|
220
220
|
assert.equal(codegraphPostToolUseHooks[0]?.matcher, "^(codegraph[._].*|mcp__codegraph__.*)$");
|
|
221
|
-
assert.
|
|
221
|
+
assert.match(codegraphPostToolUseHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Checking CodeGraph Init Guidance$/);
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
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
|
|
|
235
235
|
// then
|
|
236
236
|
assert.equal(threadTitleHooks.length, 1);
|
|
237
237
|
assert.equal(threadTitleHooks[0]?.matcher, "^(create_thread|codex_app\\.create_thread)$");
|
|
238
|
-
assert.
|
|
238
|
+
assert.match(threadTitleHooks[0]?.handler.statusMessage ?? "", /^\(OmO [^)]+\) Checking Thread Title Hygiene$/);
|
|
239
239
|
});
|
|
240
240
|
|
|
241
241
|
test("#given aggregate plugin packaging #when inspected #then hooks and compatibility sentinels stay Python-free", async () => {
|
|
@@ -171,7 +171,7 @@ test("#given the bootstrap component #when its SessionStart registration is insp
|
|
|
171
171
|
assert.equal(typeof handler.timeout, "number");
|
|
172
172
|
assert(handler.timeout <= 60, `${label} bootstrap timeout must stay <= 60 seconds`);
|
|
173
173
|
assert.equal(typeof handler.statusMessage, "string");
|
|
174
|
-
assert.match(handler.statusMessage, /^\(OmO
|
|
174
|
+
assert.match(handler.statusMessage, /^\(OmO [^)]+\) .+$/);
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
|
|
@@ -128,7 +128,7 @@ function collectCommandHooks(hooks, source, version) {
|
|
|
128
128
|
return commandHooks;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
test("#given hook status label #when formatting #then prefixes OmO display namespace", async () => {
|
|
131
|
+
test("#given hook status label #when formatting #then prefixes OmO display namespace and version", async () => {
|
|
132
132
|
// given
|
|
133
133
|
const version = (await readRepoJson("package.json")).version;
|
|
134
134
|
const label = "Checking Comments";
|
|
@@ -137,10 +137,10 @@ test("#given hook status label #when formatting #then prefixes OmO display names
|
|
|
137
137
|
const message = formatLazyCodexHookStatusMessage(version, label);
|
|
138
138
|
|
|
139
139
|
// then
|
|
140
|
-
assert.equal(message,
|
|
140
|
+
assert.equal(message, `(OmO ${version}) Checking Comments`);
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
-
test("#given hook status label with blank version #when formatting #then
|
|
143
|
+
test("#given hook status label with blank version #when formatting #then uses local OmO display version", () => {
|
|
144
144
|
// given
|
|
145
145
|
const version = " ";
|
|
146
146
|
const label = "Checking Comments";
|
|
@@ -149,7 +149,7 @@ test("#given hook status label with blank version #when formatting #then still p
|
|
|
149
149
|
const message = formatLazyCodexHookStatusMessage(version, label);
|
|
150
150
|
|
|
151
151
|
// then
|
|
152
|
-
assert.equal(message, "(OmO) Checking Comments");
|
|
152
|
+
assert.equal(message, "(OmO local) Checking Comments");
|
|
153
153
|
});
|
|
154
154
|
|
|
155
155
|
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
|
|
|
163
163
|
|
|
164
164
|
// then
|
|
165
165
|
assert.equal(normalized, "Checking Comments");
|
|
166
|
-
assert.equal(message,
|
|
166
|
+
assert.equal(message, `(OmO ${version}) Checking Comments`);
|
|
167
167
|
});
|
|
168
168
|
|
|
169
169
|
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
|
|
|
177
177
|
|
|
178
178
|
// then
|
|
179
179
|
assert.equal(normalized, "Verifying LazyCodex Executor Evidence");
|
|
180
|
-
assert.equal(message,
|
|
180
|
+
assert.equal(message, `(OmO ${version}) Verifying LazyCodex Executor Evidence`);
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
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
|
|
|
190
190
|
|
|
191
191
|
// then
|
|
192
192
|
assert.equal(normalized, "Recommending Git Bash MCP");
|
|
193
|
-
assert.equal(message, "(OmO) Recommending Git Bash MCP");
|
|
193
|
+
assert.equal(message, "(OmO 4.10.0) Recommending Git Bash MCP");
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
test("#given versioned OmO status label #when normalizing #then it does not duplicate display prefix", () => {
|
|
197
|
+
// given
|
|
198
|
+
const label = "(OmO 4.16.0) checking comments";
|
|
199
|
+
|
|
200
|
+
// when
|
|
201
|
+
const parsed = parseLazyCodexHookStatusMessage(label);
|
|
202
|
+
const message = formatLazyCodexHookStatusMessage("4.16.1", label);
|
|
203
|
+
|
|
204
|
+
// then
|
|
205
|
+
assert.deepEqual(parsed, { version: "4.16.0", label: "checking comments" });
|
|
206
|
+
assert.equal(message, "(OmO 4.16.1) Checking Comments");
|
|
194
207
|
});
|
|
195
208
|
test("#given aggregate comment-checker hook #when status is inspected #then it uses OmO comments label", async () => {
|
|
196
209
|
// given
|
|
@@ -201,7 +214,7 @@ test("#given aggregate comment-checker hook #when status is inspected #then it u
|
|
|
201
214
|
const commentCheckerHook = hooks.find((hook) => hook.command.includes("components/comment-checker/dist/cli.js"));
|
|
202
215
|
|
|
203
216
|
// then
|
|
204
|
-
assert.equal(commentCheckerHook?.statusMessage, formatLazyCodexHookStatusMessage("", "Checking Comments"));
|
|
217
|
+
assert.equal(commentCheckerHook?.statusMessage, formatLazyCodexHookStatusMessage(commentCheckerHook?.version ?? "", "Checking Comments"));
|
|
205
218
|
assert.doesNotMatch(JSON.stringify(aggregateManifests), /checking\s+OMO\s+comments/i);
|
|
206
219
|
});
|
|
207
220
|
|
|
@@ -231,6 +244,6 @@ test("#given aggregate and component hooks #when status messages are inspected #
|
|
|
231
244
|
const actualLabels = new Set(commandHooks.map((hook) => parseLazyCodexHookStatusMessage(hook.statusMessage)?.label));
|
|
232
245
|
assert.deepEqual([...expectedLabels.values()].filter((label) => !actualLabels.has(label)), []);
|
|
233
246
|
for (const hook of commandHooks) {
|
|
234
|
-
assert.match(hook.statusMessage, /^\(OmO
|
|
247
|
+
assert.match(hook.statusMessage, /^\(OmO [^)]+\) /);
|
|
235
248
|
}
|
|
236
249
|
});
|
|
@@ -88,10 +88,10 @@ test("#given source package versions and component without hooks #when hook stat
|
|
|
88
88
|
const aggregateHooks = await readJson(join(root, "hooks", "hooks.json"));
|
|
89
89
|
const componentHooks = await readJson(join(root, "components", "comment-checker", "hooks", "hooks.json"));
|
|
90
90
|
const lspHooks = await readJson(join(root, "components", "lsp", "hooks", "hooks.json"));
|
|
91
|
-
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");
|
|
92
|
-
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[1].statusMessage, "(OmO) Checking LSP Diagnostics");
|
|
93
|
-
assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");
|
|
94
|
-
assert.equal(lspHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking LSP Diagnostics");
|
|
91
|
+
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.1.0) Checking Comments");
|
|
92
|
+
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[1].statusMessage, "(OmO 0.1.0) Checking LSP Diagnostics");
|
|
93
|
+
assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.1.1) Checking Comments");
|
|
94
|
+
assert.equal(lspHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 0.2.0) Checking LSP Diagnostics");
|
|
95
95
|
});
|
|
96
96
|
|
|
97
97
|
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
|
|
|
139
139
|
// then
|
|
140
140
|
const aggregateHooks = await readJson(join(root, "hooks", "hooks.json"));
|
|
141
141
|
const componentHooks = await readJson(join(root, "components", "comment-checker", "hooks", "hooks.json"));
|
|
142
|
-
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");
|
|
143
|
-
assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO) Checking Comments");
|
|
142
|
+
assert.equal(aggregateHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 4.8.0) Checking Comments");
|
|
143
|
+
assert.equal(componentHooks.hooks.PostToolUse[0].hooks[0].statusMessage, "(OmO 4.8.0) Checking Comments");
|
|
144
144
|
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import test from "node:test";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
|
|
7
|
+
const root = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
8
|
+
|
|
9
|
+
async function readUlwPlanCopies() {
|
|
10
|
+
const componentPath = join(root, "components", "ultrawork", "skills", "ulw-plan", "SKILL.md");
|
|
11
|
+
const packagedPath = join(root, "skills", "ulw-plan", "SKILL.md");
|
|
12
|
+
return [
|
|
13
|
+
{ label: "component", path: componentPath, content: await readFile(componentPath, "utf8") },
|
|
14
|
+
{ label: "packaged", path: packagedPath, content: await readFile(packagedPath, "utf8") },
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
test("#given ulw-plan skill #when Codex delegation is inspected #then spawned planners block dependent work", async () => {
|
|
19
|
+
for (const copy of await readUlwPlanCopies()) {
|
|
20
|
+
assert.match(copy.content, /multi_agent_v1\.spawn_agent/, `${copy.label}: must document Codex spawning`);
|
|
21
|
+
assert.match(copy.content, /multi_agent_v1\.wait_agent/, `${copy.label}: must document Codex waiting`);
|
|
22
|
+
assert.match(
|
|
23
|
+
copy.content,
|
|
24
|
+
/Spawn every independent child for the current wave first/i,
|
|
25
|
+
`${copy.label}: must preserve independent spawn waves`,
|
|
26
|
+
);
|
|
27
|
+
assert.match(
|
|
28
|
+
copy.content,
|
|
29
|
+
/After the wave\s+is launched[\s\S]{0,240}multi_agent_v1\.wait_agent[\s\S]{0,240}terminal status/i,
|
|
30
|
+
`${copy.label}: must wait after the wave is launched`,
|
|
31
|
+
);
|
|
32
|
+
assert.doesNotMatch(
|
|
33
|
+
copy.content,
|
|
34
|
+
/Immediately after any `multi_agent_v1\.spawn_agent`/i,
|
|
35
|
+
`${copy.label}: must not serialize independent spawns`,
|
|
36
|
+
);
|
|
37
|
+
assert.match(copy.content, /terminal status/i, `${copy.label}: must wait until terminal status`);
|
|
38
|
+
assert.match(copy.content, /WORKING:/, `${copy.label}: must keep progress liveness guidance`);
|
|
39
|
+
assert.match(copy.content, /BLOCKED:/, `${copy.label}: must keep blocked liveness guidance`);
|
|
40
|
+
assert.match(
|
|
41
|
+
copy.content,
|
|
42
|
+
/timeout only means no new mailbox update arrived/i,
|
|
43
|
+
`${copy.label}: must frame wait timeouts as mailbox silence`,
|
|
44
|
+
);
|
|
45
|
+
assert.match(copy.content, /Fallback only when/, `${copy.label}: must keep explicit fallback conditions`);
|
|
46
|
+
assert.match(
|
|
47
|
+
copy.content,
|
|
48
|
+
/do not start dependent planning, drafting, approval-gate work, or final handoff/i,
|
|
49
|
+
`${copy.label}: must block dependent planning work before child results are integrated`,
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
});
|