oh-my-opencode 4.6.0 → 4.7.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.
Files changed (90) hide show
  1. package/bin/version-mismatch.js +47 -0
  2. package/bin/version-mismatch.test.ts +120 -0
  3. package/dist/cli/codex-ulw-loop.d.ts +12 -0
  4. package/dist/cli/doctor/checks/tui-plugin-config.d.ts +2 -0
  5. package/dist/cli/index.js +5999 -5542
  6. package/dist/cli/install-codex/codex-config-reasoning.d.ts +2 -1
  7. package/dist/cli/install-codex/codex-model-catalog.d.ts +13 -0
  8. package/dist/features/background-agent/concurrency.d.ts +1 -0
  9. package/dist/features/background-agent/process-cleanup.d.ts +6 -0
  10. package/dist/features/claude-code-session-state/state.d.ts +1 -0
  11. package/dist/features/opencode-skill-loader/index.d.ts +1 -0
  12. package/dist/features/opencode-skill-loader/opencode-config-skills-reader.d.ts +5 -0
  13. package/dist/features/tmux-subagent/attachable-session-status.d.ts +1 -1
  14. package/dist/features/tmux-subagent/session-status-parser.d.ts +1 -0
  15. package/dist/hooks/comment-checker/cli.d.ts +1 -0
  16. package/dist/hooks/tasks-todowrite-disabler/constants.d.ts +1 -1
  17. package/dist/index.js +4250 -3776
  18. package/dist/shared/command-executor/execute-hook-command.d.ts +2 -0
  19. package/dist/tools/skill/description-formatter.d.ts +5 -1
  20. package/dist/tools/skill/types.d.ts +1 -0
  21. package/package.json +13 -14
  22. package/packages/ast-grep-mcp/dist/cli.js +53 -9
  23. package/packages/lsp-tools-mcp/dist/lsp/process.js +1 -1
  24. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +13 -0
  25. package/packages/omo-codex/plugin/components/lsp/src/cli.ts +6 -2
  26. package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +13 -2
  27. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +30 -79
  28. package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +116 -0
  29. package/packages/omo-codex/plugin/components/lsp/src/mutated-file-paths.ts +88 -0
  30. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +206 -0
  31. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +5 -3
  32. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +6 -4
  33. package/packages/omo-codex/plugin/components/rules/src/codex-hook-options.ts +1 -0
  34. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +0 -2
  35. package/packages/omo-codex/plugin/components/rules/src/rules/finder.ts +15 -2
  36. package/packages/omo-codex/plugin/components/rules/src/rules-engine-factory.ts +4 -1
  37. package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +28 -5
  38. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +1 -1
  39. package/packages/omo-codex/plugin/components/ultrawork/CHANGELOG.md +1 -1
  40. package/packages/omo-codex/plugin/components/ultrawork/README.md +1 -1
  41. package/packages/omo-codex/plugin/components/ultrawork/agents/codex-ultrawork-reviewer.toml +3 -1
  42. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +7 -7
  43. package/packages/omo-codex/plugin/components/ultrawork/directive.md +1 -1
  44. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +5 -4
  45. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +4 -3
  46. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +12 -1
  47. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +19 -1
  48. package/packages/omo-codex/plugin/hooks/hooks.json +24 -2
  49. package/packages/omo-codex/plugin/model-catalog.json +49 -0
  50. package/packages/omo-codex/plugin/scripts/auto-update.mjs +159 -0
  51. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +269 -0
  52. package/packages/omo-codex/plugin/scripts/sync-hook-status-messages.mjs +4 -9
  53. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +6 -6
  54. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +6 -6
  55. package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +127 -0
  56. package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +9 -0
  57. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +6 -6
  58. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +6 -6
  59. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +7 -7
  60. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +6 -6
  61. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +5 -4
  62. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +4 -3
  63. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +17 -17
  64. package/packages/omo-codex/plugin/test/aggregate.test.mjs +188 -19
  65. package/packages/omo-codex/plugin/test/auto-update.test.mjs +129 -0
  66. package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +7 -27
  67. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +146 -0
  68. package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +27 -1
  69. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +22 -0
  70. package/packages/omo-codex/scripts/install/cli-args.mjs +1 -1
  71. package/packages/omo-codex/scripts/install/config.mjs +2 -15
  72. package/packages/omo-codex/scripts/install/delegated-command.mjs +1 -1
  73. package/packages/omo-codex/scripts/install/legacy-bins.mjs +1 -0
  74. package/packages/omo-codex/scripts/install/model-catalog.mjs +66 -0
  75. package/packages/omo-codex/scripts/install/permissions.mjs +11 -0
  76. package/packages/omo-codex/scripts/install/reasoning-config.mjs +65 -7
  77. package/packages/omo-codex/scripts/install-bin-links.test.mjs +23 -0
  78. package/packages/omo-codex/scripts/install-config-autonomous-features.test.mjs +83 -0
  79. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +82 -3
  80. package/packages/omo-codex/scripts/install-config.test.mjs +5 -6
  81. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +30 -2
  82. package/packages/omo-codex/scripts/install-local.mjs +1 -1
  83. package/packages/omo-codex/scripts/install-local.test.mjs +3 -1
  84. package/packages/shared-skills/skills/lcx-report-bug/SKILL.md +127 -0
  85. package/packages/shared-skills/skills/lcx-report-bug/agents/openai.yaml +9 -0
  86. package/packages/shared-skills/skills/review-work/SKILL.md +7 -7
  87. package/packages/shared-skills/skills/start-work/SKILL.md +6 -6
  88. package/packages/shared-skills/skills/ulw-plan/SKILL.md +11 -11
  89. package/postinstall.mjs +36 -3
  90. package/dist/cli/install-codex/codex-config-mcp.d.ts +0 -1
@@ -57,14 +57,14 @@ test("#given lazycodex runs through an npm bin symlink #when running the Node in
57
57
  }
58
58
  });
59
59
 
60
- test("#given dry-run install flags #when running the Node installer entrypoint #then prints delegated codex install command", () => {
60
+ test("#given dry-run install flags #when running the Node installer entrypoint #then prints delegated autonomous codex install command", () => {
61
61
  // given
62
62
  const scriptPath = fileURLToPath(new URL("./install-local.mjs", import.meta.url));
63
63
 
64
64
  // when
65
65
  const output = execFileSync(
66
66
  process.execPath,
67
- [scriptPath, "--dry-run", "install", "--no-tui", "--codex-autonomous"],
67
+ [scriptPath, "--dry-run", "install", "--no-tui"],
68
68
  { encoding: "utf8" },
69
69
  ).trim();
70
70
 
@@ -72,6 +72,21 @@ test("#given dry-run install flags #when running the Node installer entrypoint #
72
72
  assert.equal(output, "npx --yes --package oh-my-openagent omo install --platform=codex --no-tui --codex-autonomous");
73
73
  });
74
74
 
75
+ test("#given dry-run install opt-out #when running the Node installer entrypoint #then preserves existing Codex permission settings", () => {
76
+ // given
77
+ const scriptPath = fileURLToPath(new URL("./install-local.mjs", import.meta.url));
78
+
79
+ // when
80
+ const output = execFileSync(
81
+ process.execPath,
82
+ [scriptPath, "--dry-run", "install", "--no-tui", "--no-codex-autonomous"],
83
+ { encoding: "utf8" },
84
+ ).trim();
85
+
86
+ // then
87
+ assert.equal(output, "npx --yes --package oh-my-openagent omo install --platform=codex --no-tui --no-codex-autonomous");
88
+ });
89
+
75
90
  test("#given dry-run doctor #when running the Node installer entrypoint #then prints delegated doctor command", () => {
76
91
  // given
77
92
  const scriptPath = fileURLToPath(new URL("./install-local.mjs", import.meta.url));
@@ -100,6 +115,19 @@ test("#given dry-run cleanup #when running the Node installer entrypoint #then p
100
115
  assert.equal(output, "npx --yes --package oh-my-openagent omo cleanup --platform=codex --project /tmp/lazycodex-qa");
101
116
  });
102
117
 
118
+ test("#given dry-run ulw-loop #when running the Node installer entrypoint #then prints delegated ulw-loop command", () => {
119
+ // given
120
+ const scriptPath = fileURLToPath(new URL("./install-local.mjs", import.meta.url));
121
+
122
+ // when
123
+ const output = execFileSync(process.execPath, [scriptPath, "--dry-run", "ulw-loop", "help"], {
124
+ encoding: "utf8",
125
+ }).trim();
126
+
127
+ // then
128
+ assert.equal(output, "npx --yes --package oh-my-openagent omo ulw-loop help");
129
+ });
130
+
103
131
  test("#given the invoking argv path disappears #when importing the Node installer module #then the entrypoint guard does not throw", () => {
104
132
  // given
105
133
  const scriptPath = fileURLToPath(new URL("./install-local.mjs", import.meta.url));
@@ -147,7 +147,7 @@ export async function installMarketplaceLocally(options = {}) {
147
147
  platform,
148
148
  trustedHookStates,
149
149
  agentConfigs: [...agentConfigs.values()].sort((left, right) => left.name.localeCompare(right.name)),
150
- autonomousPermissions: options.autonomousPermissions === true,
150
+ autonomousPermissions: options.autonomousPermissions !== false,
151
151
  });
152
152
  const projectCleanup = await repairProjectLocalCodexArtifactsBestEffort({ startDirectory: projectDirectory, codexHome, log });
153
153
  for (const configCleanup of projectCleanup.configs) {
@@ -219,7 +219,9 @@ test("#given local marketplace #when installing #then copies versioned plugins a
219
219
  );
220
220
 
221
221
  const config = await readFile(join(codexHome, "config.toml"), "utf8");
222
- assert.match(config, /\[features\]\n(?:plugin_hooks = true\n)?plugins = true/);
222
+ assert.match(config, /\[features\]/);
223
+ assert.match(config, /plugins = true/);
224
+ assert.match(config, /plugin_hooks = true/);
223
225
  assert.match(config, /\[marketplaces\.debug-marketplace\]/);
224
226
  assert.match(config, /source_type = "local"/);
225
227
  assert.match(config, /\[plugins\."alpha@debug-marketplace"\]\nenabled = true/);
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: lcx-report-bug
3
+ description: "Create a high-signal LazyCodex bug report for code-yeongyu/lazycodex. Use this whenever the user asks to report, file, open, or triage a LazyCodex, lazycodex-ai, omo-codex, or Codex plugin bug, especially when they need root cause, reproduction steps, expected fix guidance, and a GitHub issue."
4
+ metadata:
5
+ short-description: Report LazyCodex bugs with debugging evidence
6
+ ---
7
+
8
+ # lcx-report-bug
9
+
10
+ You are a LazyCodex bug reporter. Produce one useful GitHub issue in English for `code-yeongyu/lazycodex`, backed by runtime evidence rather than guesses.
11
+
12
+ Use GPT-5.5 style: outcome first, concise, evidence-bound. Keep the workflow moving, but do not file an issue until the root cause and reproduction path are concrete enough for a maintainer to act.
13
+
14
+ ## Goal
15
+
16
+ Create or prepare a GitHub issue that includes:
17
+
18
+ - clear title
19
+ - environment
20
+ - reproducible steps
21
+ - expected behavior
22
+ - actual behavior
23
+ - confirmed or strongly evidenced root cause
24
+ - fix approach, including files or components likely involved
25
+ - verification plan
26
+
27
+ ## Required Workflow
28
+
29
+ 1. Read the user's bug report and identify the affected surface: LazyCodex installer, Codex plugin, skill, hook, MCP, CLI alias, GitHub marketplace sync, or web/docs.
30
+ 2. Invoke `$omo:debugging` for the investigation. If Codex exposes only unqualified skill names in the current session, invoke `$debugging` and state that it is the OMO debugging skill.
31
+ 3. Follow the debugging skill far enough to gather runtime evidence:
32
+ - form at least three plausible hypotheses
33
+ - run the smallest reproduction that exercises the real surface
34
+ - confirm the root cause by observing the failing state
35
+ - identify the minimal fix path or maintainer action
36
+ 4. Search for an existing issue before creating a new one:
37
+
38
+ ```bash
39
+ gh issue list --repo code-yeongyu/lazycodex --search "<short error or symptom>" --state open
40
+ ```
41
+
42
+ 5. If a matching open issue exists, add a comment with the new evidence instead of creating a duplicate.
43
+ 6. If no matching issue exists, create the issue with `gh`.
44
+
45
+ ## Issue Body Template
46
+
47
+ Write the issue body in English and keep it direct:
48
+
49
+ ```markdown
50
+ ## Summary
51
+ [One or two sentences describing the user-visible failure.]
52
+
53
+ ## Environment
54
+ - LazyCodex version:
55
+ - Codex version:
56
+ - OS:
57
+ - Install method:
58
+ - Relevant config:
59
+
60
+ ## Reproduction
61
+ 1. [Exact command or UI action]
62
+ 2. [Exact next step]
63
+ 3. [Observed failure trigger]
64
+
65
+ ## Expected Behavior
66
+ [What should have happened.]
67
+
68
+ ## Actual Behavior
69
+ [What happened instead, including exact error text or output.]
70
+
71
+ ## Evidence
72
+ [Commands, logs, screenshots, traces, or links used to confirm the failure.]
73
+
74
+ ## Root Cause
75
+ [Confirmed cause. If not fully confirmed, say what evidence supports it and what remains uncertain.]
76
+
77
+ ## Proposed Fix
78
+ [Concrete implementation or operational fix. Include likely files, components, or commands.]
79
+
80
+ ## Verification Plan
81
+ - [Check that reproduces the original failure]
82
+ - [Check that proves the fix]
83
+ - [Regression check for adjacent LazyCodex/Codex plugin behavior]
84
+ ```
85
+
86
+ ## GitHub Creation Path
87
+
88
+ Prefer `gh`:
89
+
90
+ ```bash
91
+ ISSUE_BODY="/tmp/lcx-report-bug-$(date +%Y%m%d-%H%M%S).md"
92
+ $EDITOR "$ISSUE_BODY"
93
+ gh issue create --repo code-yeongyu/lazycodex --title "<clear title>" --body-file "$ISSUE_BODY"
94
+ ```
95
+
96
+ If `$EDITOR` is not usable, write the file with the available file-editing tool, then run the same `gh issue create` command.
97
+
98
+ After creating or commenting, return the issue URL and a short summary of the evidence used.
99
+
100
+ ## Browser use fallback
101
+
102
+ If `gh` is unavailable, unauthenticated, or blocked, use Browser Use against the real GitHub page:
103
+
104
+ 1. Open `https://github.com/code-yeongyu/lazycodex/issues/new`.
105
+ 2. Fill the title and body from the template.
106
+ 3. Submit the issue only after visually confirming the repo, title, and body.
107
+ 4. Capture the resulting issue URL.
108
+
109
+ ## Computer use fallback
110
+
111
+ If Browser Use is unavailable but a desktop browser is open and authenticated, use Computer Use:
112
+
113
+ 1. Navigate to `https://github.com/code-yeongyu/lazycodex/issues/new`.
114
+ 2. Fill the title and body.
115
+ 3. Verify the target repository and final text before submission.
116
+ 4. Submit and capture the issue URL.
117
+
118
+ ## Stop Conditions
119
+
120
+ Stop and ask one narrow question only when the missing fact changes the issue materially, such as the affected version, a private log the agent cannot access, or whether the user wants a duplicate filed despite an existing matching issue.
121
+
122
+ Do not file:
123
+
124
+ - a vague issue without reproduction steps
125
+ - an issue that claims a root cause not supported by runtime evidence
126
+ - a duplicate when commenting on an existing issue is enough
127
+ - a fix PR unless the user separately asks for one
@@ -0,0 +1,9 @@
1
+ interface:
2
+ display_name: "lcx-report-bug (omo)"
3
+ short_description: "Report LazyCodex bugs with debugging evidence"
4
+ search_terms:
5
+ - "lcx-report-bug"
6
+ - "lazycodex bug"
7
+ - "lazycodex issue"
8
+ - "omo-codex bug"
9
+ default_prompt: "Use $lcx-report-bug to investigate this LazyCodex bug and file a clear issue with reproduction, root cause, and fix guidance."
@@ -8,15 +8,15 @@ This skill may include examples copied from the OpenCode harness. In Codex, do n
8
8
 
9
9
  | OpenCode example | Codex tool to use |
10
10
  | --- | --- |
11
- | `call_omo_agent(subagent_type="explore", ...)` | `spawn_agent(agent_type="explorer", task_name="...", message="...")` |
12
- | `call_omo_agent(subagent_type="librarian", ...)` | `spawn_agent(agent_type="librarian", task_name="...", message="...")` |
13
- | `task(subagent_type="plan", ...)` | `spawn_agent(agent_type="plan", task_name="...", message="...")` |
14
- | `task(subagent_type="oracle", ...)` for final verification | `spawn_agent(agent_type="codex-ultrawork-reviewer", task_name="...", message="...")` |
15
- | `task(category="...", ...)` for implementation or QA | `spawn_agent(agent_type="worker", task_name="...", message="...")` |
11
+ | `call_omo_agent(subagent_type="explore", ...)` | `spawn_agent(agent_type="explorer", task_name="...", message="...", fork_turns="none")` |
12
+ | `call_omo_agent(subagent_type="librarian", ...)` | `spawn_agent(agent_type="librarian", task_name="...", message="...", fork_turns="none")` |
13
+ | `task(subagent_type="plan", ...)` | `spawn_agent(agent_type="plan", task_name="...", message="...", fork_turns="none")` |
14
+ | `task(subagent_type="oracle", ...)` for final verification | `spawn_agent(agent_type="codex-ultrawork-reviewer", task_name="...", message="...", fork_turns="none")` |
15
+ | `task(category="...", ...)` for implementation or QA | `spawn_agent(agent_type="worker", task_name="...", message="...", fork_turns="none")` |
16
16
  | `background_output(task_id="...")` | `wait_agent(...)` to wait for subagent completion and mailbox updates |
17
17
  | `team_*(...)` | Use Codex native subagents plus `send_message`, `followup_task`, `wait_agent`, and `close_agent` |
18
18
 
19
- When translating `load_skills=[...]`, include the requested skill names in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
19
+ Codex full-history forks inherit the parent agent type, model, and reasoning effort, so role-specific spawns with `agent_type` must use a non-full-history fork mode such as `fork_turns="none"`. Include any required conversation context, files, diffs, constraints, and requested skill names directly in the spawned agent's `message`. If a code block below conflicts with this section, this section wins.
20
20
 
21
21
  ## Codex Subagent Reliability
22
22
 
@@ -28,7 +28,7 @@ handoff. Role selection requires `agent_type`; `model` +
28
28
  worker. Prefer `fork_turns: "none"` unless full history is truly
29
29
  required; paste only the review context that worker needs.
30
30
 
31
- Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short wait_agent cycles. Never use a single long blocking wait for them.
31
+ Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short wait_agent cycles. Never use a single long blocking wait for them. While any child is active, keep the parent visibly alive with brief status updates that include active subagent count, agent names, last heartbeat, and whether the parent is waiting for mailbox updates.
32
32
 
33
33
  Use `wait_agent` for completion signals, but treat `wait_agent` as a
34
34
  mailbox signal, not proof of completion, content, or errors. After two
@@ -9,11 +9,11 @@ This skill ports the OpenCode `/start-work` flow onto Codex. Any OpenCode-only t
9
9
 
10
10
  | OpenCode example | Codex tool to use |
11
11
  | --- | --- |
12
- | `task(subagent_type="explore", ...)` | `spawn_agent(agent_type="explorer", task_name="...", message="...")` |
13
- | `task(subagent_type="librarian", ...)` | `spawn_agent(agent_type="librarian", task_name="...", message="...")` |
14
- | `task(subagent_type="plan", ...)` | `spawn_agent(agent_type="plan", task_name="...", message="...")` |
15
- | `task(subagent_type="oracle", ...)` for final verification | `spawn_agent(agent_type="codex-ultrawork-reviewer", task_name="...", message="...")` |
16
- | `task(category="...", ...)` for implementation or QA | `spawn_agent(agent_type="worker", task_name="...", message="...")` |
12
+ | `task(subagent_type="explore", ...)` | `spawn_agent(agent_type="explorer", task_name="...", message="...", fork_turns="none")` |
13
+ | `task(subagent_type="librarian", ...)` | `spawn_agent(agent_type="librarian", task_name="...", message="...", fork_turns="none")` |
14
+ | `task(subagent_type="plan", ...)` | `spawn_agent(agent_type="plan", task_name="...", message="...", fork_turns="none")` |
15
+ | `task(subagent_type="oracle", ...)` for final verification | `spawn_agent(agent_type="codex-ultrawork-reviewer", task_name="...", message="...", fork_turns="none")` |
16
+ | `task(category="...", ...)` for implementation or QA | `spawn_agent(agent_type="worker", task_name="...", message="...", fork_turns="none")` |
17
17
  | `background_output(task_id="...")` | `wait_agent(...)` |
18
18
  | `dispatchInternalPrompt(...)` | the `Stop` hook emits `{"decision":"block","reason":"<prompt>"}` automatically; see Continuation |
19
19
  | `team_*(...)` | `spawn_agent` + `send_message` + `followup_task` + `wait_agent` + `close_agent` |
@@ -30,7 +30,7 @@ handoff. Role selection requires `agent_type`; `model` +
30
30
  worker. Prefer `fork_turns: "none"` unless full history is truly
31
31
  required; paste only the context the child needs.
32
32
 
33
- Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short wait_agent cycles. Never use a single long blocking wait for them.
33
+ Plan and reviewer agents may run for a long time; spawn them in the background, keep doing independent root work, and poll with short wait_agent cycles. Never use a single long blocking wait for them. While any child is active, keep the parent visibly alive with brief status updates that include active subagent count, agent names, last heartbeat, and whether the parent is waiting for mailbox updates.
34
34
 
35
35
  Use `wait_agent` for completion signals, but treat `wait_agent` as a
36
36
  mailbox signal, not proof of completion, content, or errors. After two
@@ -10,7 +10,7 @@ Named after the Titan who brought fire to humanity, you bring foresight and stru
10
10
  **YOU ARE A PLANNER. NOT AN IMPLEMENTER. NOT A CODE WRITER.**
11
11
 
12
12
  When user says "do X", "fix X", "build X" - interpret as "create a work plan for X". No exceptions.
13
- Your only outputs: questions, research, work plans (`plans/<slug>.md`), drafts (`.omo/drafts/*.md`).
13
+ Your only outputs: questions, research, work plans (`.omo/plans/<slug>.md`), drafts (`.omo/drafts/*.md`).
14
14
  </identity>
15
15
 
16
16
  <mission>
@@ -52,7 +52,7 @@ This is your north star quality metric.
52
52
  - Spawning read-only subagents for research
53
53
 
54
54
  ### Allowed (plan artifacts only)
55
- - Writing/editing files in `plans/<slug>.md`
55
+ - Writing/editing files in `.omo/plans/<slug>.md`
56
56
  - Writing/editing files in `.omo/drafts/*.md`
57
57
 
58
58
  ### Forbidden (mutating, plan-executing)
@@ -169,7 +169,7 @@ ANY NO -> Ask the specific unclear question.
169
169
  Spawn the metis agent to analyze the planning session for contradictions, ambiguity, missing constraints, and execution risks:
170
170
 
171
171
  ```
172
- spawn_agent(agent_type="metis", task_name="gap-analysis",
172
+ spawn_agent(agent_type="metis", task_name="gap-analysis", fork_turns="none",
173
173
  message="Review this planning session. Goal: {summary}. Discussed: {key points}. Understanding: {interpretation}. Research: {findings}. Identify: contradictions, ambiguity, missing constraints, execution risks, scope creep areas, missing acceptance criteria.")
174
174
  ```
175
175
 
@@ -217,7 +217,7 @@ Self-review checklist:
217
217
  **Defaults Applied**: [default]: [assumption]
218
218
  **Decisions Needed**: [question requiring user input] (if any)
219
219
 
220
- Plan saved to: plans/{slug}.md
220
+ Plan saved to: .omo/plans/{slug}.md
221
221
  ```
222
222
 
223
223
  If "Decisions Needed" exists, wait for user response and update plan.
@@ -237,8 +237,8 @@ Only activated when user selects "High Accuracy Review".
237
237
  Spawn the momus agent with the plan file path:
238
238
 
239
239
  ```
240
- spawn_agent(agent_type="momus", task_name="plan-review",
241
- message="Review this plan: plans/{slug}.md")
240
+ spawn_agent(agent_type="momus", task_name="plan-review", fork_turns="none",
241
+ message="Review this plan: .omo/plans/{slug}.md")
242
242
  ```
243
243
 
244
244
  Handle the three-verdict response:
@@ -254,13 +254,13 @@ Handle the three-verdict response:
254
254
 
255
255
  After plan is complete (direct or Momus-approved):
256
256
  1. Delete draft: remove `.omo/drafts/{name}.md`
257
- 2. Guide user: "Plan saved to `plans/{slug}.md`. Spawn a worker agent to begin execution."
257
+ 2. Guide user: "Plan saved to `.omo/plans/{slug}.md`. Spawn a worker agent to begin execution."
258
258
  </phases>
259
259
 
260
260
  <plan_template>
261
261
  ## Plan Structure
262
262
 
263
- Generate to: `plans/{slug}.md`
263
+ Generate to: `.omo/plans/{slug}.md`
264
264
 
265
265
  **Single Plan Mandate**: No matter how large the task, EVERYTHING goes into ONE plan. Never split into "Phase 1, Phase 2". 50+ TODOs is fine.
266
266
 
@@ -292,7 +292,7 @@ Generate to: `plans/{slug}.md`
292
292
  > ZERO HUMAN INTERVENTION - all verification is agent-executed.
293
293
  - Test decision: [TDD / tests-after / none] + framework
294
294
  - QA policy: Every task has agent-executed scenarios
295
- - Evidence: evidence/task-{N}-{slug}.{ext}
295
+ - Evidence: .omo/evidence/task-{N}-{slug}.{ext}
296
296
 
297
297
  ## Execution Strategy
298
298
  ### Parallel Execution Waves
@@ -330,13 +330,13 @@ Wave 2: [dependent tasks]
330
330
  Tool: [bash / curl / tmux / playwright]
331
331
  Steps: [exact actions with specific data]
332
332
  Expected: [concrete, binary pass/fail]
333
- Evidence: evidence/task-{N}-{slug}.{ext}
333
+ Evidence: .omo/evidence/task-{N}-{slug}.{ext}
334
334
 
335
335
  Scenario: [Failure/edge case]
336
336
  Tool: [same]
337
337
  Steps: [trigger error condition]
338
338
  Expected: [graceful failure with correct error message/code]
339
- Evidence: evidence/task-{N}-{slug}-error.{ext}
339
+ Evidence: .omo/evidence/task-{N}-{slug}-error.{ext}
340
340
  ```
341
341
 
342
342
  **Commit**: YES/NO | Message: `type(scope): desc` | Files: [paths]
package/postinstall.mjs CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  getBinaryPath,
9
9
  resolvePlatformPackageBaseName,
10
10
  } from "./bin/platform.js";
11
+ import { detectPlatformBinaryMismatch } from "./bin/version-mismatch.js";
11
12
 
12
13
  const require = createRequire(import.meta.url);
13
14
 
@@ -81,12 +82,31 @@ function getLibcFamily() {
81
82
  }
82
83
  }
83
84
 
85
+ function readMainPackageJson() {
86
+ try {
87
+ return JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
88
+ } catch {
89
+ return null;
90
+ }
91
+ }
92
+
84
93
  function getPackageBaseName() {
94
+ const packageJson = readMainPackageJson();
95
+ return resolvePlatformPackageBaseName(packageJson?.name || "oh-my-opencode");
96
+ }
97
+
98
+ function getMainPackageVersion() {
99
+ const packageJson = readMainPackageJson();
100
+ return packageJson?.version ?? null;
101
+ }
102
+
103
+ function readPlatformPackageVersion(pkg) {
85
104
  try {
86
- const packageJson = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
87
- return resolvePlatformPackageBaseName(packageJson.name || "oh-my-opencode");
105
+ const platformPackageJsonPath = require.resolve(`${pkg}/package.json`);
106
+ const packageJson = JSON.parse(readFileSync(platformPackageJsonPath, "utf8"));
107
+ return packageJson.version ?? null;
88
108
  } catch {
89
- return "oh-my-opencode";
109
+ return null;
90
110
  }
91
111
  }
92
112
 
@@ -126,6 +146,19 @@ function main() {
126
146
  );
127
147
  }
128
148
 
149
+ const mismatch = detectPlatformBinaryMismatch({
150
+ mainVersion: getMainPackageVersion(),
151
+ platformVersion: readPlatformPackageVersion(resolvedPackage),
152
+ platformPackage: resolvedPackage,
153
+ });
154
+ if (mismatch) {
155
+ console.warn(`⚠ oh-my-opencode platform binary version mismatch detected`);
156
+ console.warn(` ${packageBaseName}: ${mismatch.mainVersion}`);
157
+ console.warn(` ${mismatch.platformPackage}: ${mismatch.platformVersion}`);
158
+ console.warn(` The startup banner may show the stale version until the platform binary is updated.`);
159
+ console.warn(` Fix: npm install -g ${packageBaseName}@${mismatch.mainVersion} ${mismatch.platformPackage}@${mismatch.mainVersion}`);
160
+ }
161
+
129
162
  console.log(`✓ oh-my-opencode binary installed for ${platform}-${arch} (${resolvedPackage})`);
130
163
  } catch (error) {
131
164
  console.warn(`⚠ oh-my-opencode: ${error.message}`);
@@ -1 +0,0 @@
1
- export declare function ensureContext7McpServer(config: string): string;