oh-my-opencode 4.19.0 → 4.19.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 (214) hide show
  1. package/.agents/command/omomomo.md +1 -1
  2. package/.agents/skills/omomomo/SKILL.md +1 -1
  3. package/.opencode/command/omomomo.md +1 -1
  4. package/README.ja.md +6 -6
  5. package/README.ko.md +6 -6
  6. package/README.md +6 -6
  7. package/README.ru.md +6 -6
  8. package/README.zh-cn.md +6 -6
  9. package/dist/agents/atlas/agent.d.ts +1 -1
  10. package/dist/agents/gpt-prompt-identity.d.ts +3 -0
  11. package/dist/agents/sisyphus/gpt-5-5.d.ts +1 -1
  12. package/dist/agents/sisyphus/gpt-task-system-guide.d.ts +1 -0
  13. package/dist/agents/sisyphus-junior/gpt-5-5.d.ts +2 -2
  14. package/dist/cli/index.js +148 -94
  15. package/dist/cli-node/index.js +148 -94
  16. package/dist/config/schema/agent-overrides.d.ts +48 -48
  17. package/dist/config/schema/categories.d.ts +6 -6
  18. package/dist/config/schema/codegraph.d.ts +2 -0
  19. package/dist/config/schema/fallback-models.d.ts +5 -5
  20. package/dist/config/schema/oh-my-opencode-config.d.ts +50 -48
  21. package/dist/hooks/codegraph-bootstrap/hook.d.ts +3 -2
  22. package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +1 -1
  23. package/dist/hooks/start-work/notepad-scaffold.d.ts +10 -0
  24. package/dist/index.js +2612 -1473
  25. package/dist/oh-my-opencode.schema.json +11 -0
  26. package/dist/shared/omo-process-sweep.d.ts +18 -0
  27. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
  28. package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  29. package/dist/skills/ulw-plan/SKILL.md +20 -1
  30. package/dist/testing/create-plugin-module.d.ts +1 -0
  31. package/dist/tui.js +66 -56
  32. package/package.json +13 -13
  33. package/packages/git-bash-mcp/dist/cli.js +54 -8
  34. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +60 -0
  35. package/packages/lsp-core/src/lsp/client.ts +14 -1
  36. package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +2 -2
  37. package/packages/lsp-core/src/mcp.ts +9 -0
  38. package/packages/lsp-daemon/dist/cli.js +319 -51
  39. package/packages/lsp-daemon/dist/client.js +136 -48
  40. package/packages/lsp-daemon/dist/daemon-client.d.ts +0 -10
  41. package/packages/lsp-daemon/dist/daemon-client.js +4 -34
  42. package/packages/lsp-daemon/dist/daemon-failure-result.d.ts +3 -0
  43. package/packages/lsp-daemon/dist/daemon-failure-result.js +38 -0
  44. package/packages/lsp-daemon/dist/daemon-request-error.d.ts +14 -0
  45. package/packages/lsp-daemon/dist/daemon-request-error.js +26 -0
  46. package/packages/lsp-daemon/dist/daemon-server.js +5 -1
  47. package/packages/lsp-daemon/dist/index.js +137 -48
  48. package/packages/lsp-daemon/dist/proxy.d.ts +2 -0
  49. package/packages/lsp-daemon/dist/proxy.js +1 -0
  50. package/packages/lsp-daemon/dist/version-reap.d.ts +26 -0
  51. package/packages/lsp-daemon/dist/version-reap.js +182 -0
  52. package/packages/lsp-tools-mcp/dist/cli.js +61 -10
  53. package/packages/lsp-tools-mcp/dist/lsp/manager.js +6 -1
  54. package/packages/lsp-tools-mcp/dist/mcp.js +61 -10
  55. package/packages/lsp-tools-mcp/dist/tools.js +6 -1
  56. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  57. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +64 -8
  58. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  59. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  60. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +22 -2
  61. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +555 -251
  62. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +178 -89
  63. package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
  64. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +3 -1
  65. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +3 -1
  66. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +98 -32
  67. package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +5 -0
  68. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +15 -6
  69. package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +6 -2
  70. package/packages/omo-codex/plugin/components/codegraph/src/sweep-cli.ts +1 -0
  71. package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +148 -0
  72. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +31 -2
  73. package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +1 -1
  74. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +65 -1
  75. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -7
  76. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +1 -1
  77. package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +57 -3
  78. package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +41 -0
  79. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +109 -8
  80. package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +2 -2
  81. package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +43 -0
  82. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  83. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  84. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  85. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  86. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  87. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  88. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  89. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +80 -40
  90. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  91. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  92. package/packages/omo-codex/plugin/components/rules/dist/cli.js +11 -0
  93. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  94. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  95. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +11 -0
  96. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +60 -0
  97. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  98. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  99. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  100. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  101. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  102. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  103. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-clone-fidelity-reviewer.toml +2 -2
  104. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
  105. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +1 -1
  106. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +1 -1
  107. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +2 -2
  108. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +1 -1
  109. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
  110. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  111. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  112. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +20 -1
  113. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
  114. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +42 -0
  115. package/packages/omo-codex/plugin/components/ulw-loop/README.md +6 -4
  116. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.d.ts +21 -0
  117. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +64 -0
  118. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +15 -2
  119. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +1 -1
  120. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
  121. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
  122. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +3 -3
  123. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.d.ts +3 -0
  124. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +85 -0
  125. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +0 -1
  126. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -33
  127. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +998 -593
  128. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +1 -0
  129. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.d.ts +1 -1
  130. package/packages/omo-codex/plugin/components/ulw-loop/dist/constants.js +2 -0
  131. package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +6 -0
  132. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.d.ts +1 -0
  133. package/packages/omo-codex/plugin/components/ulw-loop/dist/goal-status.js +3 -0
  134. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.d.ts +1 -0
  135. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +4 -0
  136. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +1 -0
  137. package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +10 -2
  138. package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +1 -1
  139. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.d.ts +15 -0
  140. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-batch.js +84 -0
  141. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.d.ts +5 -0
  142. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-mutations.js +81 -0
  143. package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +7 -59
  144. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +12 -4
  145. package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.d.ts +9 -0
  146. package/packages/omo-codex/plugin/components/ulw-loop/dist/validation-batch.js +122 -0
  147. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  148. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  149. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +8 -6
  150. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +84 -0
  151. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +13 -2
  152. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +1 -1
  153. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +1 -1
  154. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +3 -3
  155. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +49 -0
  156. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +13 -45
  157. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +1 -0
  158. package/packages/omo-codex/plugin/components/ulw-loop/src/constants.ts +2 -0
  159. package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +7 -0
  160. package/packages/omo-codex/plugin/components/ulw-loop/src/goal-status.ts +4 -0
  161. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +4 -1
  162. package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +20 -2
  163. package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +1 -1
  164. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-batch.ts +125 -0
  165. package/packages/omo-codex/plugin/components/ulw-loop/src/steering-mutations.ts +59 -0
  166. package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +6 -58
  167. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +12 -4
  168. package/packages/omo-codex/plugin/components/ulw-loop/src/validation-batch.ts +122 -0
  169. package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +76 -0
  170. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint-continuation.test.ts +111 -0
  171. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-batch.test.ts +67 -0
  172. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-validation-batch.test.ts +57 -0
  173. package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +1 -0
  174. package/packages/omo-codex/plugin/components/ulw-loop/test/steering-batch.test.ts +152 -0
  175. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +29 -0
  176. package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch-checkpoint.test.ts +147 -0
  177. package/packages/omo-codex/plugin/components/ulw-loop/test/validation-batch.test.ts +73 -0
  178. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  179. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  180. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  181. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  182. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  183. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  184. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  185. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  186. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  187. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  188. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  189. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -2
  190. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  191. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -2
  192. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  193. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -2
  194. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  195. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  196. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  197. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  198. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  199. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  200. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  201. package/packages/omo-codex/plugin/package-lock.json +41 -41
  202. package/packages/omo-codex/plugin/package.json +1 -1
  203. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +43 -0
  204. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  205. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +8 -6
  206. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +20 -1
  207. package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +9 -9
  208. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +26 -0
  209. package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +41 -0
  210. package/packages/omo-codex/scripts/install-dist/install-local.mjs +49 -5
  211. package/packages/omo-codex/scripts/install-marketplace-cache.test.mjs +4 -1
  212. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.test.ts +87 -0
  213. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +35 -5
  214. package/packages/shared-skills/skills/ulw-plan/SKILL.md +20 -1
@@ -158,16 +158,35 @@ function bufferFromChunk(chunk) {
158
158
 
159
159
  // ../mcp-stdio-core/src/server.ts
160
160
  var DEFAULT_IDLE_TIMEOUT_MS = 10 * 60000;
161
+ var DEFAULT_PARENT_POLL_INTERVAL_MS = 30000;
161
162
  var noopLog = () => {};
163
+ function isProcessAlive(pid) {
164
+ try {
165
+ process.kill(pid, 0);
166
+ return true;
167
+ } catch (error) {
168
+ return !hasErrorCode(error, "ESRCH");
169
+ }
170
+ }
162
171
  async function runJsonRpcStdioServer(config) {
163
172
  const log = config.log ?? noopLog;
164
173
  const idleTimeoutMs = config.idleTimeoutMs ?? DEFAULT_IDLE_TIMEOUT_MS;
165
- const idleTimer = createIdleTimer(idleTimeoutMs, log, config.onIdleTimeout);
174
+ let isClosed = false;
175
+ const idleTimer = createIdleTimer(idleTimeoutMs, log, () => {
176
+ isClosed = true;
177
+ config.onIdleTimeout?.();
178
+ });
179
+ const watchdog = createParentWatchdog(config.parentWatchdog, (parentPid, pollIntervalMs) => {
180
+ isClosed = true;
181
+ log("parent_exit", { parent_pid: parentPid, poll_interval_ms: pollIntervalMs });
182
+ config.onParentExit?.();
183
+ config.input.destroy();
184
+ });
166
185
  log("stdio_started", { cwd: process.cwd(), idle_timeout_ms: idleTimeoutMs });
167
186
  idleTimer.arm();
168
187
  try {
169
188
  for await (const message of readStdioJsonRpcMessages(config.input)) {
170
- if (idleTimer.closed())
189
+ if (isClosed)
171
190
  break;
172
191
  idleTimer.arm();
173
192
  if (message.kind === "parse_error") {
@@ -178,8 +197,12 @@ async function runJsonRpcStdioServer(config) {
178
197
  if (!await handleRequest(message, config, log))
179
198
  break;
180
199
  }
200
+ } catch (error) {
201
+ if (!(isClosed && hasErrorCode(error, "ERR_STREAM_PREMATURE_CLOSE")))
202
+ throw error;
181
203
  } finally {
182
204
  idleTimer.clear();
205
+ watchdog.clear();
183
206
  log("stdio_stopped");
184
207
  }
185
208
  }
@@ -235,9 +258,33 @@ function isTerminalOutputError(error) {
235
258
  return false;
236
259
  return error.code === "EPIPE" || error.code === "ERR_STREAM_DESTROYED" || error.code === "ERR_STREAM_WRITE_AFTER_END";
237
260
  }
238
- function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
261
+ function hasErrorCode(error, code) {
262
+ return error instanceof Error && "code" in error && error.code === code;
263
+ }
264
+ function createParentWatchdog(config, onDeadParent) {
265
+ if (config === undefined)
266
+ return { clear: () => {} };
267
+ const pollIntervalMs = config.pollIntervalMs ?? DEFAULT_PARENT_POLL_INTERVAL_MS;
268
+ if (pollIntervalMs <= 0)
269
+ return { clear: () => {} };
270
+ const parentPid = config.parentPid ?? process.ppid;
271
+ const probeAlive = config.probeAlive ?? isProcessAlive;
272
+ let fired = false;
273
+ const timer = setInterval(() => {
274
+ if (fired || probeAlive(parentPid))
275
+ return;
276
+ fired = true;
277
+ onDeadParent(parentPid, pollIntervalMs);
278
+ }, pollIntervalMs);
279
+ timer.unref();
280
+ return {
281
+ clear: () => {
282
+ clearInterval(timer);
283
+ }
284
+ };
285
+ }
286
+ function createIdleTimer(idleTimeoutMs, log, onTimeout) {
239
287
  let timer = null;
240
- let isClosed = false;
241
288
  return {
242
289
  arm: () => {
243
290
  if (timer !== null)
@@ -245,9 +292,8 @@ function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
245
292
  if (idleTimeoutMs <= 0)
246
293
  return;
247
294
  timer = setTimeout(() => {
248
- isClosed = true;
249
295
  log("idle_timeout", { idle_timeout_ms: idleTimeoutMs });
250
- onIdleTimeout?.();
296
+ onTimeout();
251
297
  }, idleTimeoutMs);
252
298
  timer.unref();
253
299
  },
@@ -256,8 +302,7 @@ function createIdleTimer(idleTimeoutMs, log, onIdleTimeout) {
256
302
  return;
257
303
  clearTimeout(timer);
258
304
  timer = null;
259
- },
260
- closed: () => isClosed
305
+ }
261
306
  };
262
307
  }
263
308
  // ../lsp-core/src/lsp/client-wrapper.ts
@@ -3058,8 +3103,13 @@ class LspClient extends LspClientConnection {
3058
3103
  if (!pushFallbackOnly)
3059
3104
  continue;
3060
3105
  const remainingMs = deadlineAt - Date.now();
3061
- if (remainingMs <= 0)
3106
+ if (remainingMs <= 0) {
3107
+ if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
3108
+ const cached = this.documents.getPullCache(snapshot);
3109
+ return { items: cached === null ? [] : [...cached.diagnostics] };
3110
+ }
3062
3111
  return this.freshnessTimeout(absPath);
3112
+ }
3063
3113
  const waitMs = push.status === "wait" ? Math.min(push.waitMs, remainingMs) : remainingMs;
3064
3114
  await waitForDiagnosticsActivity(this.documents.waitForDiagnosticsActivity(snapshot, waitMs), signal);
3065
3115
  }
@@ -5026,12 +5076,13 @@ async function handleLspMcpRequest(input, options = {}) {
5026
5076
  }
5027
5077
  return errorResponse(id, -32601, `Method not found: ${String(method)}`);
5028
5078
  }
5029
- async function runMcpStdioServer(input = process.stdin, output = process.stdout) {
5079
+ async function runMcpStdioServer(input = process.stdin, output = process.stdout, options = {}) {
5030
5080
  const requestContext = createStandaloneMcpRequestContext();
5031
5081
  await runJsonRpcStdioServer({
5032
5082
  input,
5033
5083
  output,
5034
5084
  idleTimeoutMs: 0,
5085
+ parentWatchdog: options.parentWatchdog ?? {},
5035
5086
  handler: (request) => runWithRequestContext(requestContext, () => handleLspMcpRequest(request)),
5036
5087
  handlerOptions: undefined
5037
5088
  });
@@ -2796,8 +2796,13 @@ class LspClient extends LspClientConnection {
2796
2796
  if (!pushFallbackOnly)
2797
2797
  continue;
2798
2798
  const remainingMs = deadlineAt - Date.now();
2799
- if (remainingMs <= 0)
2799
+ if (remainingMs <= 0) {
2800
+ if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
2801
+ const cached = this.documents.getPullCache(snapshot);
2802
+ return { items: cached === null ? [] : [...cached.diagnostics] };
2803
+ }
2800
2804
  return this.freshnessTimeout(absPath);
2805
+ }
2801
2806
  const waitMs = push.status === "wait" ? Math.min(push.waitMs, remainingMs) : remainingMs;
2802
2807
  await waitForDiagnosticsActivity(this.documents.waitForDiagnosticsActivity(snapshot, waitMs), signal);
2803
2808
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo",
3
- "version": "4.19.0",
3
+ "version": "4.19.1",
4
4
  "description": "One Codex plugin namespace for Yeongyu's local Codex components.",
5
5
  "author": {
6
6
  "name": "Yeongyu Kim",
@@ -438,7 +438,7 @@ async function readOptionalFile(path) {
438
438
  }
439
439
 
440
440
  // components/bootstrap/src/worker.ts
441
- import { appendFile as appendFile2, mkdir as mkdir8, readFile as readFile13 } from "node:fs/promises";
441
+ import { appendFile as appendFile2, mkdir as mkdir8, readFile as readFile14 } from "node:fs/promises";
442
442
  import { homedir as homedir4 } from "node:os";
443
443
  import { dirname as dirname9, join as join22, resolve as resolve7 } from "node:path";
444
444
  import { fileURLToPath as fileURLToPath2 } from "node:url";
@@ -864,7 +864,7 @@ async function defaultVersionProbe2(binaryPath) {
864
864
  }
865
865
 
866
866
  // components/bootstrap/src/setup.ts
867
- import { copyFile as copyFile2, mkdir as mkdir7, readdir as readdir5, rm as rm10, stat as stat5 } from "node:fs/promises";
867
+ import { copyFile as copyFile2, mkdir as mkdir7, readFile as readFile13, readdir as readdir5, rm as rm10, stat as stat5 } from "node:fs/promises";
868
868
  import { join as join21 } from "node:path";
869
869
 
870
870
  // ../src/install/link-cached-plugin-agents.ts
@@ -1457,6 +1457,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
1457
1457
  {
1458
1458
  previous: { model: "gpt-5.6-sol", effort: "xhigh" },
1459
1459
  current: { model: "gpt-5.6-sol", effort: "max" }
1460
+ },
1461
+ {
1462
+ previous: { model: "gpt-5.6-sol", effort: "max" },
1463
+ current: { model: "gpt-5.6-sol", effort: "high" }
1460
1464
  }
1461
1465
  ]
1462
1466
  ],
@@ -1466,6 +1470,37 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
1466
1470
  {
1467
1471
  previous: { model: "gpt-5.6-sol", effort: "high" },
1468
1472
  current: { model: "gpt-5.6-luna", effort: "max" }
1473
+ },
1474
+ {
1475
+ previous: { model: "gpt-5.6-luna", effort: "max" },
1476
+ current: { model: "gpt-5.6-terra", effort: "high" }
1477
+ }
1478
+ ]
1479
+ ],
1480
+ [
1481
+ "lazycodex-worker-high",
1482
+ [
1483
+ {
1484
+ previous: { model: "gpt-5.6-sol", effort: "max" },
1485
+ current: { model: "gpt-5.6-sol", effort: "medium" }
1486
+ }
1487
+ ]
1488
+ ],
1489
+ [
1490
+ "lazycodex-code-reviewer",
1491
+ [
1492
+ {
1493
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
1494
+ current: { model: "gpt-5.6-terra", effort: "medium" }
1495
+ }
1496
+ ]
1497
+ ],
1498
+ [
1499
+ "lazycodex-clone-fidelity-reviewer",
1500
+ [
1501
+ {
1502
+ previous: { model: "gpt-5.6-sol", effort: "xhigh" },
1503
+ current: { model: "gpt-5.6-terra", effort: "high" }
1469
1504
  }
1470
1505
  ]
1471
1506
  ],
@@ -1484,6 +1519,10 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
1484
1519
  {
1485
1520
  previous: { model: "gpt-5.6-sol", effort: "xhigh" },
1486
1521
  current: { model: "gpt-5.6-sol", effort: "high" }
1522
+ },
1523
+ {
1524
+ previous: { model: "gpt-5.6-sol", effort: "high" },
1525
+ current: { model: "gpt-5.6-sol", effort: "low" }
1487
1526
  }
1488
1527
  ]
1489
1528
  ]
@@ -2303,10 +2342,6 @@ async function existingNonSymlink(path) {
2303
2342
  }
2304
2343
  }
2305
2344
 
2306
- // ../src/install/codex-config-toml.ts
2307
- import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
2308
- import { dirname as dirname8 } from "node:path";
2309
-
2310
2345
  // ../src/install/codex-config-agents.ts
2311
2346
  var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE = ["codex-ultrawork-reviewer"];
2312
2347
  var CURRENT_MANAGED_CODEX_AGENT_NAMES = [
@@ -2336,6 +2371,12 @@ function removeStaleManagedAgentBlocks(config, keepAgentNames) {
2336
2371
 
2337
2372
  `);
2338
2373
  }
2374
+ function hasForeignAgentRegistration(config, agentConfig) {
2375
+ const section = findTomlSection(config, `agents.${tomlKeySegment(agentConfig.name)}`);
2376
+ if (!section)
2377
+ return false;
2378
+ return !section.text.includes(`config_file = ${JSON.stringify(agentConfig.configFile)}`);
2379
+ }
2339
2380
  function ensureAgentConfig(config, agentConfig) {
2340
2381
  const header = `agents.${tomlKeySegment(agentConfig.name)}`;
2341
2382
  const section = findTomlSection(config, header);
@@ -2350,6 +2391,10 @@ function tomlKeySegment(value) {
2350
2391
  return /^[A-Za-z0-9_-]+$/.test(value) ? value : JSON.stringify(value);
2351
2392
  }
2352
2393
 
2394
+ // ../src/install/codex-config-toml.ts
2395
+ import { mkdir as mkdir6, readFile as readFile10 } from "node:fs/promises";
2396
+ import { dirname as dirname8 } from "node:path";
2397
+
2353
2398
  // ../src/install/codex-config-atomic-write.ts
2354
2399
  import { lstat as lstat8, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile6 } from "node:fs/promises";
2355
2400
  import { basename as basename5, dirname as dirname6, isAbsolute as isAbsolute4, join as join15, resolve as resolve5 } from "node:path";
@@ -3520,13 +3565,15 @@ async function updateConfigStep(options, inputs, degraded) {
3520
3565
  const configPath = join21(options.codexHome, "config.toml");
3521
3566
  try {
3522
3567
  await assertWritableConfigIfPresent(configPath);
3568
+ const existingConfig = await readConfigIfPresent(configPath);
3569
+ const agentConfigs = inputs.agentConfigs.filter((agentConfig) => !hasForeignAgentRegistration(existingConfig, agentConfig));
3523
3570
  const trustedHookStates = await trustedHookStatesForPlugin({
3524
3571
  marketplaceName: SETUP_MARKETPLACE_NAME,
3525
3572
  pluginName: SETUP_PLUGIN_NAME,
3526
3573
  pluginRoot: options.pluginRoot
3527
3574
  });
3528
3575
  await updateCodexConfig({
3529
- agentConfigs: inputs.agentConfigs,
3576
+ agentConfigs,
3530
3577
  autonomousPermissions: false,
3531
3578
  configPath,
3532
3579
  gitBashEnabled: inputs.gitBashEnabled,
@@ -3559,6 +3606,15 @@ async function assertWritableConfigIfPresent(configPath) {
3559
3606
  function errorCode(error) {
3560
3607
  return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : undefined;
3561
3608
  }
3609
+ async function readConfigIfPresent(configPath) {
3610
+ try {
3611
+ return await readFile13(configPath, "utf8");
3612
+ } catch (error) {
3613
+ if (errorCode(error) === "ENOENT")
3614
+ return "";
3615
+ throw error;
3616
+ }
3617
+ }
3562
3618
  async function linkComponentBinsStep(options, degraded) {
3563
3619
  const binDir = resolveCodexInstallerBinDir({ codexHome: options.codexHome, env: options.env });
3564
3620
  try {
@@ -3678,7 +3734,7 @@ function resolvePluginDataRoot(env) {
3678
3734
  }
3679
3735
  async function readPluginVersion(pluginRoot) {
3680
3736
  try {
3681
- const parsed = JSON.parse(await readFile13(join22(pluginRoot, ".codex-plugin", "plugin.json"), "utf8"));
3737
+ const parsed = JSON.parse(await readFile14(join22(pluginRoot, ".codex-plugin", "plugin.json"), "utf8"));
3682
3738
  if (typeof parsed !== "object" || parsed === null)
3683
3739
  return;
3684
3740
  const version = parsed["version"];
@@ -8,7 +8,7 @@
8
8
  "command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
9
9
  "commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
10
10
  "timeout": 30,
11
- "statusMessage": "(OmO 4.19.0) Checking Bootstrap Provisioning"
11
+ "statusMessage": "(OmO 4.19.1) Checking Bootstrap Provisioning"
12
12
  }
13
13
  ]
14
14
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisyphuslabs/codex-bootstrap",
3
- "version": "4.19.0",
3
+ "version": "4.19.1",
4
4
  "description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
5
5
  "type": "module",
6
6
  "private": true,
@@ -1,4 +1,4 @@
1
- import { copyFile, mkdir, readdir, rm, stat } from "node:fs/promises";
1
+ import { copyFile, mkdir, readFile, readdir, rm, stat } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
3
 
4
4
  // These relative imports resolve at BUILD time in the monorepo; esbuild
@@ -10,6 +10,7 @@ import {
10
10
  linkCachedPluginAgents,
11
11
  } from "../../../../src/install/link-cached-plugin-agents.ts";
12
12
  import { linkCachedPluginBins, linkRootRuntimeBin } from "../../../../src/install/codex-cache-bins.ts";
13
+ import { hasForeignAgentRegistration } from "../../../../src/install/codex-config-agents.ts";
13
14
  import { updateCodexConfig } from "../../../../src/install/codex-config-toml.ts";
14
15
  import { stampGitBashMcpEnv } from "../../../../src/install/codex-git-bash-mcp-env.ts";
15
16
  import { trustedHookStatesForPlugin } from "../../../../src/install/codex-hook-trust.ts";
@@ -141,6 +142,16 @@ async function updateConfigStep(
141
142
  const configPath = join(options.codexHome, "config.toml");
142
143
  try {
143
144
  await assertWritableConfigIfPresent(configPath);
145
+ // Orca mirrors the system [agents.*] entries into its runtime CODEX_HOME
146
+ // without copying the agents directory. Re-stamping our own registration
147
+ // for such a role would collide with the mirrored entry once Codex
148
+ // discovers <codexHome>/agents/<name>.toml (two different file paths for
149
+ // one role name -> upstream warning), so foreign pre-existing blocks are
150
+ // left untouched; directory discovery still loads the linked toml.
151
+ const existingConfig = await readConfigIfPresent(configPath);
152
+ const agentConfigs = inputs.agentConfigs.filter(
153
+ (agentConfig) => !hasForeignAgentRegistration(existingConfig, agentConfig),
154
+ );
144
155
  // Re-stamping trusted hook hashes after an upgrade is what makes the
145
156
  // next session's hooks trusted again once the user re-approved the
146
157
  // bootstrap hook itself.
@@ -150,7 +161,7 @@ async function updateConfigStep(
150
161
  pluginRoot: options.pluginRoot,
151
162
  });
152
163
  await updateCodexConfig({
153
- agentConfigs: inputs.agentConfigs,
164
+ agentConfigs,
154
165
  // Hard invariant: the bootstrap worker NEVER writes permission keys
155
166
  // (approval/sandbox/network policies stay installer-flag-only).
156
167
  autonomousPermissions: false,
@@ -189,6 +200,15 @@ function errorCode(error: unknown): string | undefined {
189
200
  return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : undefined;
190
201
  }
191
202
 
203
+ async function readConfigIfPresent(configPath: string): Promise<string> {
204
+ try {
205
+ return await readFile(configPath, "utf8");
206
+ } catch (error) {
207
+ if (errorCode(error) === "ENOENT") return "";
208
+ throw error;
209
+ }
210
+ }
211
+
192
212
  async function linkComponentBinsStep(options: WorkerSetupOptions, degraded: BootstrapDegradedEntry[]): Promise<void> {
193
213
  const binDir = resolveCodexInstallerBinDir({ codexHome: options.codexHome, env: options.env });
194
214
  try {