oh-my-opencode 5.0.0-beta.25 → 5.0.0-beta.28

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 (193) hide show
  1. package/dist/cli/config-manager/parse-opencode-config-file.d.ts +2 -1
  2. package/dist/cli/doctor/checks/system-plugin.d.ts +4 -3
  3. package/dist/cli/index.js +309 -182
  4. package/dist/cli-node/index.js +332 -182
  5. package/dist/features/team-mode/tools/messaging-fallback-wake.d.ts +15 -0
  6. package/dist/hooks/todo-continuation-enforcer/types.d.ts +1 -0
  7. package/dist/index.js +1958 -1668
  8. package/dist/shared/index.d.ts +1 -0
  9. package/dist/shared/legacy-plugin-warning.d.ts +2 -1
  10. package/dist/shared/plugin-entry-migrator.d.ts +4 -3
  11. package/dist/shared/plugin-entry-shape.d.ts +6 -0
  12. package/dist/skills/data-scientist/SKILL.md +99 -239
  13. package/dist/skills/data-scientist/references/execution-surfaces.md +91 -0
  14. package/dist/skills/data-scientist/references/placement.md +74 -0
  15. package/dist/skills/data-scientist/references/polars-lane.md +95 -0
  16. package/dist/skills/data-scientist/references/uv-setup.md +1 -1
  17. package/dist/skills/data-scientist/references/visualization.md +64 -0
  18. package/dist/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
  19. package/dist/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
  20. package/dist/skills/debugging/SKILL.md +2 -0
  21. package/dist/skills/debugging/references/methodology/00-setup.md +12 -0
  22. package/dist/skills/debugging/references/methodology/02-investigate.md +21 -0
  23. package/dist/skills/debugging/references/runtimes/go.md +15 -1
  24. package/dist/skills/debugging/references/runtimes/native-binary.md +38 -0
  25. package/dist/skills/debugging/references/runtimes/node.md +25 -0
  26. package/dist/skills/debugging/references/runtimes/python.md +13 -0
  27. package/dist/skills/debugging/references/runtimes/rust.md +41 -0
  28. package/dist/skills/debugging/references/scripts/dap.mjs +267 -0
  29. package/dist/skills/debugging/references/scripts/dap.test.ts +86 -0
  30. package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  31. package/dist/skills/debugging/references/tools/dap.md +103 -0
  32. package/dist/skills/debugging/references/tools/frida.md +193 -0
  33. package/dist/skills/ulw-research/SKILL.md +3 -1
  34. package/dist/tools/delegate-task/types.d.ts +3 -0
  35. package/dist/tui.d.ts +12 -0
  36. package/dist/tui.js +106 -15
  37. package/package.json +18 -15
  38. package/packages/lsp-core/src/index.ts +1 -0
  39. package/packages/lsp-core/src/lsp/client-wrapper.ts +25 -5
  40. package/packages/lsp-core/src/lsp/client.ts +26 -0
  41. package/packages/lsp-core/src/lsp/connection.ts +16 -0
  42. package/packages/lsp-core/src/lsp/constants.ts +1 -0
  43. package/packages/lsp-core/src/lsp/format-document.test.ts +143 -0
  44. package/packages/lsp-core/src/lsp/format-document.ts +90 -0
  45. package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +151 -0
  46. package/packages/lsp-core/src/lsp/manager.ts +34 -1
  47. package/packages/lsp-core/src/lsp/server-definitions.ts +29 -0
  48. package/packages/lsp-core/src/lsp/server-installation.test.ts +376 -0
  49. package/packages/lsp-core/src/lsp/server-installation.ts +200 -27
  50. package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +170 -0
  51. package/packages/lsp-core/src/lsp/server-resolution.ts +18 -5
  52. package/packages/lsp-core/src/lsp/transport.ts +9 -0
  53. package/packages/lsp-core/src/lsp/types.ts +8 -0
  54. package/packages/lsp-core/src/request-context.test.ts +29 -0
  55. package/packages/lsp-core/src/request-context.ts +1 -1
  56. package/packages/lsp-core/src/tool-surface.test.ts +13 -1
  57. package/packages/lsp-core/src/tools/definitions.ts +14 -0
  58. package/packages/lsp-core/src/tools/format.test.ts +56 -0
  59. package/packages/lsp-core/src/tools/format.ts +56 -0
  60. package/packages/lsp-core/src/tools/index.ts +1 -0
  61. package/packages/lsp-core/src/tools/types.ts +10 -0
  62. package/packages/lsp-daemon/dist/cli.js +433 -145
  63. package/packages/lsp-daemon/dist/client.d.ts +10 -0
  64. package/packages/lsp-daemon/dist/client.js +402 -108
  65. package/packages/lsp-daemon/dist/daemon-client.d.ts +1 -0
  66. package/packages/lsp-daemon/dist/daemon-client.js +3 -0
  67. package/packages/lsp-daemon/dist/index.js +396 -108
  68. package/packages/lsp-tools-mcp/dist/cli.js +385 -100
  69. package/packages/lsp-tools-mcp/dist/lsp/manager.js +53 -0
  70. package/packages/lsp-tools-mcp/dist/mcp.js +385 -100
  71. package/packages/lsp-tools-mcp/dist/request-context.js +1 -1
  72. package/packages/lsp-tools-mcp/dist/tools.js +386 -100
  73. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  74. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -2
  75. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  76. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  77. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +69 -35
  78. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +21 -2
  79. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  80. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  81. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  82. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  83. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  84. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  85. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  86. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  87. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +404 -121
  88. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  89. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  90. package/packages/omo-codex/plugin/components/rules/dist/cli.js +3 -3
  91. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  92. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  93. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +3 -3
  94. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -4
  95. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  96. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  97. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +30 -15
  98. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +30 -15
  99. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  100. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  101. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  102. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  103. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  104. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  105. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  106. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  107. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  108. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  109. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  110. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  111. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  112. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  113. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  114. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  115. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  116. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  117. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  118. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  119. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  120. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  121. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  122. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  123. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  124. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  125. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  126. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  127. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  128. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  129. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  130. package/packages/omo-codex/plugin/model-catalog.json +3 -3
  131. package/packages/omo-codex/plugin/package-lock.json +13 -13
  132. package/packages/omo-codex/plugin/package.json +1 -1
  133. package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +3 -3
  134. package/packages/omo-codex/plugin/skills/data-scientist/SKILL.md +99 -239
  135. package/packages/omo-codex/plugin/skills/data-scientist/references/execution-surfaces.md +91 -0
  136. package/packages/omo-codex/plugin/skills/data-scientist/references/placement.md +74 -0
  137. package/packages/omo-codex/plugin/skills/data-scientist/references/polars-lane.md +95 -0
  138. package/packages/omo-codex/plugin/skills/data-scientist/references/uv-setup.md +1 -1
  139. package/packages/omo-codex/plugin/skills/data-scientist/references/visualization.md +64 -0
  140. package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
  141. package/packages/omo-codex/plugin/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
  142. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -0
  143. package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +12 -0
  144. package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +21 -0
  145. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +15 -1
  146. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +38 -0
  147. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +25 -0
  148. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +13 -0
  149. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +41 -0
  150. package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +267 -0
  151. package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  152. package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +103 -0
  153. package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +193 -0
  154. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +3 -1
  155. package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +1 -1
  156. package/packages/omo-codex/plugin/test/auto-update.test.mjs +2 -2
  157. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +8 -8
  158. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +2 -2
  159. package/packages/omo-codex/scripts/install-dist/install-local.mjs +38 -23
  160. package/packages/shared-skills/skills/data-scientist/SKILL.md +99 -239
  161. package/packages/shared-skills/skills/data-scientist/references/execution-surfaces.md +91 -0
  162. package/packages/shared-skills/skills/data-scientist/references/placement.md +74 -0
  163. package/packages/shared-skills/skills/data-scientist/references/polars-lane.md +95 -0
  164. package/packages/shared-skills/skills/data-scientist/references/uv-setup.md +1 -1
  165. package/packages/shared-skills/skills/data-scientist/references/visualization.md +64 -0
  166. package/packages/shared-skills/skills/data-scientist/scripts/ensure-js-deps.sh +28 -0
  167. package/packages/shared-skills/skills/data-scientist/scripts/ensure-py-deps.sh +37 -0
  168. package/packages/shared-skills/skills/debugging/SKILL.md +2 -0
  169. package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +12 -0
  170. package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +21 -0
  171. package/packages/shared-skills/skills/debugging/references/runtimes/go.md +15 -1
  172. package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +38 -0
  173. package/packages/shared-skills/skills/debugging/references/runtimes/node.md +25 -0
  174. package/packages/shared-skills/skills/debugging/references/runtimes/python.md +13 -0
  175. package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +41 -0
  176. package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +267 -0
  177. package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +86 -0
  178. package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  179. package/packages/shared-skills/skills/debugging/references/tools/dap.md +103 -0
  180. package/packages/shared-skills/skills/debugging/references/tools/frida.md +193 -0
  181. package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -1
  182. package/dist/skills/data-scientist/references/common-scenarios.md +0 -176
  183. package/dist/skills/data-scientist/references/execution-templates.md +0 -197
  184. package/dist/skills/data-scientist/references/integration-patterns.md +0 -153
  185. package/dist/skills/data-scientist/references/performance-benchmarks.md +0 -37
  186. package/packages/omo-codex/plugin/skills/data-scientist/references/common-scenarios.md +0 -176
  187. package/packages/omo-codex/plugin/skills/data-scientist/references/execution-templates.md +0 -197
  188. package/packages/omo-codex/plugin/skills/data-scientist/references/integration-patterns.md +0 -153
  189. package/packages/omo-codex/plugin/skills/data-scientist/references/performance-benchmarks.md +0 -37
  190. package/packages/shared-skills/skills/data-scientist/references/common-scenarios.md +0 -176
  191. package/packages/shared-skills/skills/data-scientist/references/execution-templates.md +0 -197
  192. package/packages/shared-skills/skills/data-scientist/references/integration-patterns.md +0 -153
  193. package/packages/shared-skills/skills/data-scientist/references/performance-benchmarks.md +0 -37
package/dist/cli/index.js CHANGED
@@ -54,7 +54,7 @@ var package_default;
54
54
  var init_package = __esm(() => {
55
55
  package_default = {
56
56
  name: "oh-my-opencode",
57
- version: "5.0.0-beta.25",
57
+ version: "5.0.0-beta.28",
58
58
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
59
59
  main: "./dist/index.js",
60
60
  types: "dist/index.d.ts",
@@ -235,7 +235,7 @@ var init_package = __esm(() => {
235
235
  zod: "^4.4.3"
236
236
  },
237
237
  devDependencies: {
238
- "@code-yeongyu/senpi": "2026.8.26-2",
238
+ "@code-yeongyu/senpi": "2026.8.30",
239
239
  "@oh-my-opencode/agents-md-core": "workspace:*",
240
240
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
241
241
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -276,18 +276,18 @@ var init_package = __esm(() => {
276
276
  typescript: "^7.0.2"
277
277
  },
278
278
  optionalDependencies: {
279
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.25",
280
- "oh-my-opencode-darwin-x64": "5.0.0-beta.25",
281
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.25",
282
- "oh-my-opencode-linux-arm64": "5.0.0-beta.25",
283
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.25",
284
- "oh-my-opencode-linux-x64": "5.0.0-beta.25",
285
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.25",
286
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.25",
287
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.25",
288
- "oh-my-opencode-windows-arm64": "5.0.0-beta.25",
289
- "oh-my-opencode-windows-x64": "5.0.0-beta.25",
290
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.25"
279
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.28",
280
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.28",
281
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.28",
282
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.28",
283
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.28",
284
+ "oh-my-opencode-linux-x64": "5.0.0-beta.28",
285
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.28",
286
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.28",
287
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.28",
288
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.28",
289
+ "oh-my-opencode-windows-x64": "5.0.0-beta.28",
290
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.28"
291
291
  },
292
292
  overrides: {
293
293
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -303,7 +303,10 @@ var init_package = __esm(() => {
303
303
  },
304
304
  trustedDependencies: [
305
305
  "@code-yeongyu/comment-checker"
306
- ]
306
+ ],
307
+ patchedDependencies: {
308
+ "@code-yeongyu/senpi@2026.8.30": "patches/@code-yeongyu%2Fsenpi@2026.8.30.patch"
309
+ }
307
310
  };
308
311
  });
309
312
 
@@ -4813,9 +4816,12 @@ import {
4813
4816
  fsyncSync,
4814
4817
  openSync,
4815
4818
  renameSync,
4819
+ rmSync,
4816
4820
  unlinkSync,
4817
4821
  writeFileSync
4818
4822
  } from "fs";
4823
+ import { randomUUID } from "crypto";
4824
+ import { dirname } from "path";
4819
4825
  function isToleratedFsyncError(error) {
4820
4826
  if (!(error instanceof Error))
4821
4827
  return false;
@@ -4831,24 +4837,36 @@ function tolerantFsyncSync(fileDescriptor, fsyncImpl) {
4831
4837
  }
4832
4838
  }
4833
4839
  function writeFileAtomically(filePath, content, options = {}) {
4834
- const tempPath = `${filePath}.tmp`;
4835
- writeFileSync(tempPath, content, "utf-8");
4836
- const tempFileDescriptor = openSync(tempPath, "r+");
4837
- try {
4838
- tolerantFsyncSync(tempFileDescriptor, options.fsyncSync ?? fsyncSync);
4839
- } finally {
4840
- closeSync(tempFileDescriptor);
4841
- }
4840
+ const platform = options.platform ?? process.platform;
4841
+ const fsyncImpl = options.fsyncSync ?? fsyncSync;
4842
+ const tempPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
4842
4843
  try {
4843
- renameSync(tempPath, filePath);
4844
- } catch (error) {
4845
- const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
4846
- if ((options.platform ?? process.platform) === "win32" && isPermissionError) {
4844
+ writeFileSync(tempPath, content, "utf-8");
4845
+ const tempFileDescriptor = openSync(tempPath, "r+");
4846
+ try {
4847
+ tolerantFsyncSync(tempFileDescriptor, fsyncImpl);
4848
+ } finally {
4849
+ closeSync(tempFileDescriptor);
4850
+ }
4851
+ try {
4852
+ renameSync(tempPath, filePath);
4853
+ } catch (error) {
4854
+ const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
4855
+ if (platform !== "win32" || !isPermissionError)
4856
+ throw error;
4847
4857
  unlinkSync(filePath);
4848
4858
  renameSync(tempPath, filePath);
4859
+ }
4860
+ if (platform === "win32")
4849
4861
  return;
4862
+ const directoryFileDescriptor = openSync(dirname(filePath), "r");
4863
+ try {
4864
+ tolerantFsyncSync(directoryFileDescriptor, fsyncImpl);
4865
+ } finally {
4866
+ closeSync(directoryFileDescriptor);
4850
4867
  }
4851
- throw error;
4868
+ } finally {
4869
+ rmSync(tempPath, { force: true });
4852
4870
  }
4853
4871
  }
4854
4872
  var TOLERATED_FSYNC_CODES;
@@ -20554,6 +20572,25 @@ var init_telemetry = __esm(() => {
20554
20572
  }).strict();
20555
20573
  });
20556
20574
 
20575
+ // packages/omo-config-core/src/schema/format-on-mutation.ts
20576
+ var mode, languages, OmoFormatOnMutationLayerSchema, OmoFormatOnMutationSchema;
20577
+ var init_format_on_mutation = __esm(() => {
20578
+ init_zod();
20579
+ mode = _enum2(["off", "best-effort", "required"]);
20580
+ languages = record(string2(), boolean2()).optional();
20581
+ OmoFormatOnMutationLayerSchema = object({
20582
+ mode: mode.optional(),
20583
+ languages,
20584
+ maxFileBytes: number2().int().positive().optional(),
20585
+ timeoutMs: number2().int().positive().optional()
20586
+ }).strict();
20587
+ OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
20588
+ mode: mode.default("best-effort"),
20589
+ maxFileBytes: number2().int().positive().default(1048576),
20590
+ timeoutMs: number2().int().positive().default(3000)
20591
+ }).strict();
20592
+ });
20593
+
20557
20594
  // packages/omo-config-core/src/schema/config.ts
20558
20595
  var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
20559
20596
  var init_config = __esm(() => {
@@ -20567,8 +20604,10 @@ var init_config = __esm(() => {
20567
20604
  init_task();
20568
20605
  init_team();
20569
20606
  init_telemetry();
20607
+ init_format_on_mutation();
20570
20608
  OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
20571
20609
  OmoTypedHarnessConfigSchema = object({
20610
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20572
20611
  categories: OmoCategoriesConfigSchema.optional(),
20573
20612
  agents: OmoAgentsConfigSchema.optional(),
20574
20613
  codegraph: OmoCodegraphSettingsLayerSchema.optional(),
@@ -20580,6 +20619,7 @@ var init_config = __esm(() => {
20580
20619
  telemetry: OmoTelemetrySettingsLayerSchema.optional()
20581
20620
  }).strict();
20582
20621
  OmoConfigProfileSchema = object({
20622
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20583
20623
  categories: OmoCategoriesConfigSchema.optional(),
20584
20624
  agents: OmoAgentsConfigSchema.optional(),
20585
20625
  codegraph: OmoCodegraphSettingsLayerSchema.optional(),
@@ -20594,6 +20634,7 @@ var init_config = __esm(() => {
20594
20634
  "[codex]": OmoTypedHarnessConfigSchema.optional()
20595
20635
  }).strict();
20596
20636
  OmoConfigSchema = object({
20637
+ formatOnMutation: OmoFormatOnMutationSchema.optional(),
20597
20638
  $schema: string2().optional(),
20598
20639
  categories: OmoCategoriesConfigSchema.optional(),
20599
20640
  agents: OmoAgentsConfigSchema.optional(),
@@ -20612,6 +20653,7 @@ var init_config = __esm(() => {
20612
20653
  legacy_migrations: record(string2(), unknown()).optional()
20613
20654
  }).strict();
20614
20655
  OmoConfigLayerSchema = object({
20656
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20615
20657
  $schema: string2().optional(),
20616
20658
  categories: OmoCategoriesConfigSchema.optional(),
20617
20659
  agents: OmoAgentsConfigSchema.optional(),
@@ -20638,6 +20680,7 @@ var init_schema = __esm(() => {
20638
20680
  init_codegraph();
20639
20681
  init_config();
20640
20682
  init_fallback_models();
20683
+ init_format_on_mutation();
20641
20684
  init_git_master();
20642
20685
  init_harness();
20643
20686
  init_memory();
@@ -20707,7 +20750,7 @@ var init_types = __esm(() => {
20707
20750
 
20708
20751
  // packages/omo-config-core/src/loader/paths.ts
20709
20752
  import { userInfo } from "os";
20710
- import { dirname, join as join3, posix, resolve } from "path";
20753
+ import { dirname as dirname2, join as join3, posix, resolve } from "path";
20711
20754
  function resolveHomeDir(env = process.env) {
20712
20755
  const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
20713
20756
  return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve(homeDir));
@@ -20772,7 +20815,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
20772
20815
  nearestFirst.push(configPath);
20773
20816
  if (isHomeDir)
20774
20817
  break;
20775
- const parentDir = dirname(currentDir);
20818
+ const parentDir = dirname2(currentDir);
20776
20819
  if (parentDir === currentDir)
20777
20820
  break;
20778
20821
  currentDir = parentDir;
@@ -21212,8 +21255,8 @@ var init_jsonc_parse = __esm(() => {
21212
21255
  });
21213
21256
 
21214
21257
  // packages/omo-config-core/src/writer/writer.ts
21215
- import { randomUUID } from "crypto";
21216
- import { dirname as dirname2, join as join4, posix as posix2 } from "path";
21258
+ import { randomUUID as randomUUID2 } from "crypto";
21259
+ import { dirname as dirname3, join as join4, posix as posix2 } from "path";
21217
21260
  function backupSuffix() {
21218
21261
  return new Date().toISOString().replace(/[:.]/g, "-");
21219
21262
  }
@@ -21246,20 +21289,20 @@ function resolveWritePath(options) {
21246
21289
  const jsoncPath2 = resolveUserOmoConfigPath(options.env);
21247
21290
  if (fileSystem.existsSync(jsoncPath2))
21248
21291
  return jsoncPath2;
21249
- const jsonPath2 = join4(dirname2(jsoncPath2), "omo.json");
21292
+ const jsonPath2 = join4(dirname3(jsoncPath2), "omo.json");
21250
21293
  return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
21251
21294
  }
21252
21295
  const jsoncPath = join4(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
21253
21296
  if (fileSystem.existsSync(jsoncPath))
21254
21297
  return jsoncPath;
21255
- const jsonPath = join4(dirname2(jsoncPath), "omo.json");
21298
+ const jsonPath = join4(dirname3(jsoncPath), "omo.json");
21256
21299
  return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
21257
21300
  }
21258
21301
  function directoryPath(path4) {
21259
- return path4.startsWith("/") ? posix2.dirname(path4) : dirname2(path4);
21302
+ return path4.startsWith("/") ? posix2.dirname(path4) : dirname3(path4);
21260
21303
  }
21261
21304
  function writeAtomically(path4, content, fileSystem) {
21262
- const tempPath = `${path4}.${randomUUID()}.tmp`;
21305
+ const tempPath = `${path4}.${randomUUID2()}.tmp`;
21263
21306
  let tempCreated = false;
21264
21307
  try {
21265
21308
  fileSystem.writeFileExclusiveSync(tempPath, content);
@@ -21542,7 +21585,7 @@ var init_types3 = __esm(() => {
21542
21585
  });
21543
21586
 
21544
21587
  // packages/omo-config-core/src/migration/commit.ts
21545
- import { basename, dirname as dirname3, join as join5, resolve as resolve2 } from "path";
21588
+ import { basename, dirname as dirname4, join as join5, resolve as resolve2 } from "path";
21546
21589
  function parseDocument(path4, content) {
21547
21590
  const parsed = parseJsoncSafe2(content);
21548
21591
  if (parsed.errors.length > 0 || !isPlainObject5(parsed.data)) {
@@ -21576,11 +21619,11 @@ function writerInput(targetPath, env) {
21576
21619
  const homeDir = resolveHomeDir(env);
21577
21620
  const userDirectory = toPosixPath(join5(homeDir, ".omo"));
21578
21621
  const fileName = basename(targetPath);
21579
- if (toPosixPath(dirname3(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21622
+ if (toPosixPath(dirname4(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21580
21623
  return { scope: "user" };
21581
21624
  }
21582
- if (basename(dirname3(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21583
- return { projectDir: dirname3(dirname3(targetPath)), scope: "project" };
21625
+ if (basename(dirname4(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21626
+ return { projectDir: dirname4(dirname4(targetPath)), scope: "project" };
21584
21627
  }
21585
21628
  throw new MigrationTransactionError(`Migration target is not an omo config path: ${targetPath}`);
21586
21629
  }
@@ -21943,7 +21986,7 @@ var init_recovery = __esm(() => {
21943
21986
  });
21944
21987
 
21945
21988
  // packages/omo-config-core/src/migration/batch.ts
21946
- import { dirname as dirname4, posix as posix3 } from "path";
21989
+ import { dirname as dirname5, posix as posix3 } from "path";
21947
21990
  function parseSource(path4, content) {
21948
21991
  const parsed = parseJsoncSafe2(content);
21949
21992
  if (parsed.errors.length > 0) {
@@ -21992,7 +22035,7 @@ function assertSafeSourcePaths(sources, protectedPaths) {
21992
22035
  }
21993
22036
  }
21994
22037
  function directoryPath2(path4) {
21995
- return path4.startsWith("/") ? posix3.dirname(path4) : dirname4(path4);
22038
+ return path4.startsWith("/") ? posix3.dirname(path4) : dirname5(path4);
21996
22039
  }
21997
22040
  function ensureBackupDirectories(moves, fileSystem) {
21998
22041
  for (const move of moves)
@@ -22623,7 +22666,7 @@ var init_process_sweep = () => {};
22623
22666
  // packages/utils/src/codegraph/resolve.ts
22624
22667
  import { existsSync as existsSync7 } from "fs";
22625
22668
  import { spawnSync } from "child_process";
22626
- import { basename as basename2, dirname as dirname5, join as join10 } from "path";
22669
+ import { basename as basename2, dirname as dirname6, join as join10 } from "path";
22627
22670
  import { createRequire } from "module";
22628
22671
  function defaultNodeVersion(nodePath) {
22629
22672
  if (nodePath === process.execPath && isNodeExecutableName(nodePath))
@@ -23057,6 +23100,9 @@ var init_message_inspection_error = () => {};
23057
23100
  function getPromptGateMessagesFetchTimeoutMs() {
23058
23101
  return promptGateMessagesFetchTimeoutMsForTesting ?? DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS;
23059
23102
  }
23103
+ function getPromptGateRevalidationTimeoutMs() {
23104
+ return promptGateRevalidationTimeoutMsForTesting ?? DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS;
23105
+ }
23060
23106
  async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName) {
23061
23107
  if (dispatchTimeoutMs <= 0) {
23062
23108
  return operation;
@@ -23075,7 +23121,7 @@ async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName)
23075
23121
  }
23076
23122
  }
23077
23123
  }
23078
- var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting;
23124
+ var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting, promptGateRevalidationTimeoutMsForTesting;
23079
23125
 
23080
23126
  // packages/utils/src/prompt-async-gate/pending-tool-turn.ts
23081
23127
  function getPromptQuery(input) {
@@ -23276,6 +23322,7 @@ async function dispatchAfterSessionIdle(args) {
23276
23322
  checkStatus,
23277
23323
  checkToolState,
23278
23324
  shouldDispatch,
23325
+ retryDispatchFailure,
23279
23326
  dispatch
23280
23327
  } = args;
23281
23328
  const existing = getActiveReservation(sessionID);
@@ -23330,7 +23377,9 @@ async function dispatchAfterSessionIdle(args) {
23330
23377
  });
23331
23378
  return { status: "active" };
23332
23379
  }
23333
- if (shouldDispatch?.() === false) {
23380
+ const dispatchDecision = shouldDispatch?.();
23381
+ const resolvedDispatchDecision = dispatchDecision !== undefined && typeof dispatchDecision !== "boolean" ? await withDispatchTimeout(dispatchDecision, Math.min(dispatchTimeoutMs, getPromptGateRevalidationTimeoutMs()), `[prompt-async-gate] ${sessionName} shouldDispatch`) : dispatchDecision;
23382
+ if (resolvedDispatchDecision === false) {
23334
23383
  log(`[prompt-async-gate] ${sessionName} cancelled before dispatch`, { sessionID, source });
23335
23384
  return { status: "cancelled" };
23336
23385
  }
@@ -23346,6 +23395,7 @@ async function dispatchAfterSessionIdle(args) {
23346
23395
  log(`[prompt-async-gate] ${sessionName} dispatched`, { sessionID, source });
23347
23396
  return { status: "dispatched", response };
23348
23397
  } catch (error51) {
23398
+ const queueRetryable = dispatchAttempted && retryDispatchFailure?.(error51) === true;
23349
23399
  if (dispatchAttempted) {
23350
23400
  rememberRecentPromptDispatch({
23351
23401
  sessionID,
@@ -23356,7 +23406,12 @@ async function dispatchAfterSessionIdle(args) {
23356
23406
  }
23357
23407
  const errorText = error51 instanceof Error ? `${error51.name}: ${error51.message}` : String(error51);
23358
23408
  log(`[prompt-async-gate] ${sessionName} failed`, { sessionID, source, error: errorText });
23359
- return { status: "failed", error: error51, dispatchAttempted };
23409
+ return {
23410
+ status: "failed",
23411
+ error: error51,
23412
+ dispatchAttempted,
23413
+ ...queueRetryable ? { queueRetryable: true } : {}
23414
+ };
23360
23415
  } finally {
23361
23416
  finishPromptReservation(sessionID, reservation, dispatchAttempted, postDispatchHoldMs);
23362
23417
  }
@@ -23418,6 +23473,7 @@ function schedulePromptQueueDrain(sessionID, delayMs) {
23418
23473
  promptQueueTimers.set(sessionID, timer);
23419
23474
  }
23420
23475
  function removePromptQueueEntry(sessionID, entry) {
23476
+ promptQueueRetryStates.delete(entry.id);
23421
23477
  const queue = promptQueues.get(sessionID);
23422
23478
  if (!queue) {
23423
23479
  return;
@@ -23447,6 +23503,7 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23447
23503
  promptQueueDraining.add(sessionID);
23448
23504
  clearPromptQueueTimer(sessionID);
23449
23505
  let awaitedResult;
23506
+ const deferredRetryIds = new Set;
23450
23507
  try {
23451
23508
  while (true) {
23452
23509
  const queue = promptQueues.get(sessionID);
@@ -23454,6 +23511,20 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23454
23511
  if (!entry) {
23455
23512
  break;
23456
23513
  }
23514
+ const retryState = promptQueueRetryStates.get(entry.id);
23515
+ if (entry.durableRetry && retryState?.retryAfter !== undefined && retryState.retryAfter > Date.now()) {
23516
+ if (deferredRetryIds.has(entry.id)) {
23517
+ const nextRetryAt = Math.min(...queue.flatMap((queued) => {
23518
+ const retryAfter = promptQueueRetryStates.get(queued.id)?.retryAfter;
23519
+ return retryAfter === undefined ? [] : [retryAfter];
23520
+ }));
23521
+ schedulePromptQueueDrain(sessionID, nextRetryAt - Date.now());
23522
+ break;
23523
+ }
23524
+ deferredRetryIds.add(entry.id);
23525
+ setPromptQueue(sessionID, [...queue.slice(1), entry]);
23526
+ continue;
23527
+ }
23457
23528
  promptQueueInFlight.set(sessionID, entry);
23458
23529
  const result = await dispatchAfterSessionIdle({
23459
23530
  sessionName: entry.sessionName,
@@ -23469,12 +23540,45 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23469
23540
  checkStatus: entry.checkStatus,
23470
23541
  checkToolState: entry.checkToolState,
23471
23542
  shouldDispatch: entry.shouldDispatch,
23543
+ retryDispatchFailure: entry.retryDispatchFailure,
23472
23544
  dispatch: entry.dispatch
23473
23545
  });
23474
23546
  if (promptQueueInFlight.get(sessionID)?.id === entry.id) {
23475
23547
  promptQueueInFlight.delete(sessionID);
23476
23548
  }
23477
- if (result.status === "active" || result.status === "reserved") {
23549
+ const retryableQueuedFailure = result.status === "failed" && (!result.dispatchAttempted || result.queueRetryable === true);
23550
+ if (retryableQueuedFailure) {
23551
+ const failureCount = (promptQueueRetryStates.get(entry.id)?.failureCount ?? 0) + 1;
23552
+ if (entry.durableRetry) {
23553
+ const exponentialBackoffMs = entry.queueRetryMs * 2 ** Math.min(failureCount, 7);
23554
+ const retryDelayMs = Math.max(entry.postDispatchHoldMs, Math.min(exponentialBackoffMs, MAX_DURABLE_RETRY_BACKOFF_MS));
23555
+ promptQueueRetryStates.set(entry.id, {
23556
+ failureCount,
23557
+ retryAfter: Date.now() + retryDelayMs
23558
+ });
23559
+ const currentQueue = promptQueues.get(sessionID);
23560
+ if (currentQueue && currentQueue.length > 1) {
23561
+ setPromptQueue(sessionID, [...currentQueue.slice(1), entry]);
23562
+ continue;
23563
+ }
23564
+ schedulePromptQueueDrain(sessionID, retryDelayMs);
23565
+ break;
23566
+ }
23567
+ if (failureCount >= MAX_QUEUED_RETRYABLE_FAILURES) {
23568
+ log("[prompt-async-gate] dropping queued prompt after repeated retryable failures", {
23569
+ sessionID,
23570
+ source: entry.source,
23571
+ failureCount
23572
+ });
23573
+ removePromptQueueEntry(sessionID, entry);
23574
+ if (awaitedEntry?.id === entry.id) {
23575
+ awaitedResult = result;
23576
+ }
23577
+ continue;
23578
+ }
23579
+ promptQueueRetryStates.set(entry.id, { failureCount });
23580
+ }
23581
+ if (result.status === "active" || result.status === "reserved" || retryableQueuedFailure) {
23478
23582
  const queued = queuedResult(entry, 1, result.status === "reserved" ? result.reservedBy : entry.source);
23479
23583
  if (awaitedEntry?.id === entry.id) {
23480
23584
  awaitedResult = queued;
@@ -23535,7 +23639,7 @@ async function enqueueInternalPrompt(entry) {
23535
23639
  const result = await drainPromptQueue(entry.sessionID, entry);
23536
23640
  return result ?? queuedResult(entry, 1);
23537
23641
  }
23538
- var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueSequence = 0;
23642
+ var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueRetryStates, MAX_QUEUED_RETRYABLE_FAILURES = 3, MAX_DURABLE_RETRY_BACKOFF_MS = 30000, promptQueueSequence = 0;
23539
23643
  var init_queue = __esm(() => {
23540
23644
  init_session_idle_dispatch();
23541
23645
  init_reservations();
@@ -23543,6 +23647,7 @@ var init_queue = __esm(() => {
23543
23647
  promptQueueDraining = new Set;
23544
23648
  promptQueueInFlight = new Map;
23545
23649
  promptQueueTimers = new Map;
23650
+ promptQueueRetryStates = new Map;
23546
23651
  setExpiredReservationHandler((sessionID) => {
23547
23652
  schedulePromptQueueDrain(sessionID, 0);
23548
23653
  });
@@ -23790,6 +23895,7 @@ async function dispatchInternalPrompt(args) {
23790
23895
  checkStatus: args.checkStatus !== false,
23791
23896
  checkToolState: args.checkToolState !== false,
23792
23897
  shouldDispatch: args.shouldDispatch,
23898
+ retryDispatchFailure: args.retryDispatchFailure,
23793
23899
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23794
23900
  });
23795
23901
  if (deferResult.status === "failed" && resolved.route === "live" && deferResult.error instanceof Error && deferResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -23817,7 +23923,9 @@ async function dispatchInternalPrompt(args) {
23817
23923
  queueRetryMs,
23818
23924
  checkStatus: args.checkStatus !== false,
23819
23925
  checkToolState: args.checkToolState !== false,
23926
+ durableRetry: args.durableRetry === true,
23820
23927
  shouldDispatch: args.shouldDispatch,
23928
+ retryDispatchFailure: args.retryDispatchFailure,
23821
23929
  dispatch: async (_dispatchInput) => dispatchWithPathCompatibility(dispatch, input)
23822
23930
  });
23823
23931
  }
@@ -23839,6 +23947,7 @@ async function dispatchInternalPrompt(args) {
23839
23947
  checkStatus: args.checkStatus !== false,
23840
23948
  checkToolState: args.checkToolState !== false,
23841
23949
  shouldDispatch: args.shouldDispatch,
23950
+ retryDispatchFailure: args.retryDispatchFailure,
23842
23951
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23843
23952
  });
23844
23953
  if (directResult.status === "failed" && resolved.route === "live" && directResult.error instanceof Error && directResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -26051,7 +26160,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
26051
26160
  // packages/omo-opencode/src/shared/opencode-version.ts
26052
26161
  import { execSync } from "child_process";
26053
26162
  import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
26054
- import { dirname as dirname6, join as join13 } from "path";
26163
+ import { dirname as dirname7, join as join13 } from "path";
26055
26164
  function parseVersion(version2) {
26056
26165
  const cleaned = version2.replace(/^v/, "").split("-")[0];
26057
26166
  return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
@@ -26092,7 +26201,7 @@ function parsePackageVersion(content) {
26092
26201
  function getPackageVersionFromBinary(binaryPath, deps) {
26093
26202
  try {
26094
26203
  const realBinaryPath = deps.realpath(binaryPath);
26095
- const packagePath = join13(dirname6(dirname6(realBinaryPath)), "package.json");
26204
+ const packagePath = join13(dirname7(dirname7(realBinaryPath)), "package.json");
26096
26205
  if (!deps.exists(packagePath))
26097
26206
  return null;
26098
26207
  return parsePackageVersion(deps.readText(packagePath));
@@ -26330,10 +26439,10 @@ import {
26330
26439
  } from "fs";
26331
26440
  function writeFileAtomically2(filePath, content, deps = {}) {
26332
26441
  const tempPath = `${filePath}.tmp`;
26333
- const mode = deps.mode;
26334
- writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
26335
- if (mode !== undefined) {
26336
- chmodSync2(tempPath, mode);
26442
+ const mode2 = deps.mode;
26443
+ writeFileSync3(tempPath, content, { encoding: "utf-8", mode: mode2 });
26444
+ if (mode2 !== undefined) {
26445
+ chmodSync2(tempPath, mode2);
26337
26446
  }
26338
26447
  const tempFileDescriptor = openSync2(tempPath, "r+");
26339
26448
  try {
@@ -26354,8 +26463,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
26354
26463
  throw error51;
26355
26464
  }
26356
26465
  }
26357
- if (mode !== undefined) {
26358
- chmodSync2(filePath, mode);
26466
+ if (mode2 !== undefined) {
26467
+ chmodSync2(filePath, mode2);
26359
26468
  }
26360
26469
  }
26361
26470
  var init_write_file_atomically = __esm(() => {
@@ -83747,7 +83856,17 @@ function isPreSendConnectionFailure2(error51) {
83747
83856
  if (error51.name === "AbortError") {
83748
83857
  return false;
83749
83858
  }
83750
- const CONNECTION_CODES = new Set(["ECONNREFUSED", "ENOTFOUND", "EAI_AGAIN"]);
83859
+ const CONNECTION_CODES = new Set([
83860
+ "ECONNREFUSED",
83861
+ "ENOTFOUND",
83862
+ "EAI_AGAIN",
83863
+ "ENETUNREACH",
83864
+ "EHOSTUNREACH",
83865
+ "ENETDOWN",
83866
+ "EHOSTDOWN",
83867
+ "EADDRNOTAVAIL",
83868
+ "UND_ERR_CONNECT_TIMEOUT"
83869
+ ]);
83751
83870
  const self = error51;
83752
83871
  if (self.code && CONNECTION_CODES.has(self.code)) {
83753
83872
  return true;
@@ -83759,12 +83878,6 @@ function isPreSendConnectionFailure2(error51) {
83759
83878
  return true;
83760
83879
  }
83761
83880
  }
83762
- if (error51 instanceof TypeError) {
83763
- const msg = error51.message;
83764
- if (msg.includes("fetch failed") || msg.includes("Unable to connect")) {
83765
- return true;
83766
- }
83767
- }
83768
83881
  return false;
83769
83882
  }
83770
83883
  function markLiveRouteUnavailable2(reason) {
@@ -84091,6 +84204,17 @@ var init_session_category_registry = __esm(() => {
84091
84204
  sessionCategoryMap = new Map;
84092
84205
  });
84093
84206
 
84207
+ // packages/omo-opencode/src/shared/plugin-entry-shape.ts
84208
+ function isPluginTupleEntry(entry) {
84209
+ return Array.isArray(entry) && typeof entry[0] === "string";
84210
+ }
84211
+ function getPluginEntryName(entry) {
84212
+ return isPluginTupleEntry(entry) ? entry[0] : entry;
84213
+ }
84214
+ function withPluginEntryName(entry, name) {
84215
+ return isPluginTupleEntry(entry) ? [name, entry[1]] : name;
84216
+ }
84217
+
84094
84218
  // packages/omo-opencode/src/shared/legacy-plugin-warning.ts
84095
84219
  var init_legacy_plugin_warning = __esm(() => {
84096
84220
  init_jsonc_parser2();
@@ -84307,7 +84431,7 @@ var init_plugin_name_with_version = __esm(() => {
84307
84431
 
84308
84432
  // packages/omo-opencode/src/cli/config-manager/backup-config.ts
84309
84433
  import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "fs";
84310
- import { dirname as dirname7 } from "path";
84434
+ import { dirname as dirname8 } from "path";
84311
84435
  function backupConfigFile(configPath) {
84312
84436
  if (!existsSync16(configPath)) {
84313
84437
  return { success: true };
@@ -84315,7 +84439,7 @@ function backupConfigFile(configPath) {
84315
84439
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
84316
84440
  const backupPath = `${configPath}.backup-${timestamp}`;
84317
84441
  try {
84318
- const dir = dirname7(backupPath);
84442
+ const dir = dirname8(backupPath);
84319
84443
  if (!existsSync16(dir)) {
84320
84444
  mkdirSync6(dir, { recursive: true });
84321
84445
  }
@@ -84513,7 +84637,7 @@ function extractVersionFromPluginEntry(entry) {
84513
84637
 
84514
84638
  // packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
84515
84639
  import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "fs";
84516
- import { basename as basename3, dirname as dirname8, join as join21 } from "path";
84640
+ import { basename as basename3, dirname as dirname9, join as join21 } from "path";
84517
84641
  function detectConfigFormatInDir(configDir) {
84518
84642
  const configJsonc = join21(configDir, "opencode.jsonc");
84519
84643
  const configJson = join21(configDir, "opencode.json");
@@ -84526,10 +84650,10 @@ function detectConfigFormatInDir(configDir) {
84526
84650
  return { format: "none", path: configJson };
84527
84651
  }
84528
84652
  function getParentConfigDirForProfile(configDir) {
84529
- const parentDir = dirname8(configDir);
84653
+ const parentDir = dirname9(configDir);
84530
84654
  if (basename3(parentDir) !== "profiles")
84531
84655
  return null;
84532
- return dirname8(parentDir);
84656
+ return dirname9(parentDir);
84533
84657
  }
84534
84658
  function listProfileConfigDirs(rootConfigDir) {
84535
84659
  const profilesDir = join21(rootConfigDir, "profiles");
@@ -84556,13 +84680,14 @@ function getConfigTargets() {
84556
84680
  });
84557
84681
  }
84558
84682
  function isSourceOmoPluginEntry(plugin) {
84559
- const normalized = plugin.toLowerCase().replaceAll("\\", "/");
84683
+ const normalized = getPluginEntryName(plugin).toLowerCase().replaceAll("\\", "/");
84560
84684
  if (!normalized.startsWith("file://"))
84561
84685
  return false;
84562
84686
  return /\/(omo(?:-[^/]*)?|oh-my-opencode|oh-my-openagent)\/(src|dist)\/index\.(ts|js)$/.test(normalized);
84563
84687
  }
84564
84688
  function isPackageOmoPluginEntry(plugin) {
84565
- return plugin === PLUGIN_NAME || plugin.startsWith(`${PLUGIN_NAME}@`) || plugin === LEGACY_PLUGIN_NAME || plugin.startsWith(`${LEGACY_PLUGIN_NAME}@`);
84689
+ const name = getPluginEntryName(plugin);
84690
+ return name === PLUGIN_NAME || name.startsWith(`${PLUGIN_NAME}@`) || name === LEGACY_PLUGIN_NAME || name.startsWith(`${LEGACY_PLUGIN_NAME}@`);
84566
84691
  }
84567
84692
  function isOurPlugin(plugin) {
84568
84693
  return isPackageOmoPluginEntry(plugin) || isSourceOmoPluginEntry(plugin);
@@ -84584,6 +84709,9 @@ function choosePluginEntry(params) {
84584
84709
  if (params.preferredSourceEntry) {
84585
84710
  return params.preferredSourceEntry;
84586
84711
  }
84712
+ if (params.existingEntry) {
84713
+ return withPluginEntryName(params.existingEntry, params.fallbackEntry);
84714
+ }
84587
84715
  return params.fallbackEntry;
84588
84716
  }
84589
84717
  function writePluginEntryToTarget(params) {
@@ -84617,7 +84745,7 @@ function writePluginEntryToTarget(params) {
84617
84745
  preferredSourceEntry
84618
84746
  });
84619
84747
  if (existingEntry && !preferredSourceEntry) {
84620
- const installedVersion = extractVersionFromPluginEntry(existingEntry);
84748
+ const installedVersion = extractVersionFromPluginEntry(getPluginEntryName(existingEntry));
84621
84749
  const compatibility = checkVersionCompatibility(installedVersion, currentVersion);
84622
84750
  if (!compatibility.canUpgrade) {
84623
84751
  return {
@@ -84640,20 +84768,12 @@ function writePluginEntryToTarget(params) {
84640
84768
  config3.plugin = normalizedPlugins;
84641
84769
  if (target.format === "jsonc") {
84642
84770
  const content = readFileSync8(target.path, "utf-8");
84643
- const pluginArrayRegex = /((?:"plugin"|plugin)\s*:\s*)\[([\s\S]*?)\]/;
84644
- const match = content.match(pluginArrayRegex);
84645
- if (match) {
84646
- const formattedPlugins = normalizedPlugins.map((p) => `"${p}"`).join(`,
84647
- `);
84648
- const newContent = content.replace(pluginArrayRegex, `$1[
84649
- ${formattedPlugins}
84650
- ]`);
84651
- writeFileSync5(target.path, newContent);
84652
- } else {
84653
- const newContent = content.replace(/(\{)/, `$1
84654
- "plugin": ["${nextPluginEntry}"],`);
84655
- writeFileSync5(target.path, newContent);
84656
- }
84771
+ const edits = modify(content, ["plugin"], normalizedPlugins, {
84772
+ formattingOptions: { insertSpaces: true, tabSize: 2, eol: `
84773
+ ` },
84774
+ getInsertionIndex: () => 0
84775
+ });
84776
+ writeFileSync5(target.path, applyEdits(content, edits));
84657
84777
  } else {
84658
84778
  writeFileSync5(target.path, JSON.stringify(config3, null, 2) + `
84659
84779
  `);
@@ -84698,6 +84818,7 @@ async function addPluginToOpenCodeConfig(currentVersion) {
84698
84818
  return primaryResult ?? { success: true, configPath: primaryTarget.path };
84699
84819
  }
84700
84820
  var init_add_plugin_to_opencode_config = __esm(() => {
84821
+ init_main();
84701
84822
  init_shared();
84702
84823
  init_backup_config();
84703
84824
  init_config_context();
@@ -86227,10 +86348,12 @@ function detectProvidersFromOmoConfig() {
86227
86348
  }
86228
86349
  }
86229
86350
  function isOurPlugin2(plugin) {
86230
- return plugin === PLUGIN_NAME || plugin.startsWith(`${PLUGIN_NAME}@`) || plugin === LEGACY_PLUGIN_NAME || plugin.startsWith(`${LEGACY_PLUGIN_NAME}@`);
86351
+ const name = getPluginEntryName(plugin);
86352
+ return name === PLUGIN_NAME || name.startsWith(`${PLUGIN_NAME}@`) || name === LEGACY_PLUGIN_NAME || name.startsWith(`${LEGACY_PLUGIN_NAME}@`);
86231
86353
  }
86232
86354
  function findOurPluginEntry2(plugins) {
86233
- return plugins.find(isOurPlugin2) ?? null;
86355
+ const entry = plugins.find(isOurPlugin2);
86356
+ return entry === undefined ? null : getPluginEntryName(entry);
86234
86357
  }
86235
86358
  function detectCurrentConfig() {
86236
86359
  const result = {
@@ -86663,7 +86786,7 @@ var init_env2 = __esm(() => {
86663
86786
  });
86664
86787
 
86665
86788
  // node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
86666
- import { dirname as dirname17, posix as posix7, sep as sep7 } from "path";
86789
+ import { dirname as dirname18, posix as posix7, sep as sep7 } from "path";
86667
86790
  function createModulerModifier() {
86668
86791
  const getModuleFromFileName = createGetModuleFromFilename();
86669
86792
  return async (frames) => {
@@ -86672,7 +86795,7 @@ function createModulerModifier() {
86672
86795
  return frames;
86673
86796
  };
86674
86797
  }
86675
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname17(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
86798
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname18(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
86676
86799
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
86677
86800
  return (filename) => {
86678
86801
  if (!filename)
@@ -92006,7 +92129,7 @@ function splitNodeOptions(nodeOptions) {
92006
92129
  return args;
92007
92130
  }
92008
92131
  function findUnhandledRejectionMode(args) {
92009
- let mode;
92132
+ let mode2;
92010
92133
  for (let index = 0;index < args.length; index++) {
92011
92134
  const argument = args[index];
92012
92135
  const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
@@ -92014,9 +92137,9 @@ function findUnhandledRejectionMode(args) {
92014
92137
  continue;
92015
92138
  const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
92016
92139
  if (UNHANDLED_REJECTION_MODES.has(value))
92017
- mode = value;
92140
+ mode2 = value;
92018
92141
  }
92019
- return mode;
92142
+ return mode2;
92020
92143
  }
92021
92144
  function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
92022
92145
  return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
@@ -92042,17 +92165,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
92042
92165
  _posthogErrorHandler: true
92043
92166
  });
92044
92167
  }
92045
- function addUncaughtExceptionListener(captureFn, onFatalFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
92168
+ function addUncaughtExceptionListener(captureFn, onFatalFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
92046
92169
  const process4 = globalThis.process;
92047
92170
  if (!process4)
92048
92171
  return;
92049
- if (mode === "strict")
92172
+ if (mode2 === "strict")
92050
92173
  return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
92051
92174
  process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
92052
92175
  }
92053
- function addUnhandledRejectionListener(captureFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
92176
+ function addUnhandledRejectionListener(captureFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
92054
92177
  const process4 = globalThis.process;
92055
- if (!process4 || mode === "throw" || mode === "strict" || mode === "warn-with-error-code")
92178
+ if (!process4 || mode2 === "throw" || mode2 === "strict" || mode2 === "warn-with-error-code")
92056
92179
  return;
92057
92180
  process4.on("unhandledRejection", (reason) => {
92058
92181
  captureFn(reason, {
@@ -94277,7 +94400,7 @@ var package_default2;
94277
94400
  var init_package2 = __esm(() => {
94278
94401
  package_default2 = {
94279
94402
  name: "@oh-my-opencode/omo-codex",
94280
- version: "5.0.0-beta.25",
94403
+ version: "5.0.0-beta.28",
94281
94404
  type: "module",
94282
94405
  private: true,
94283
94406
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -95247,19 +95370,19 @@ var init_update_toasts = __esm(() => {
95247
95370
 
95248
95371
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95249
95372
  import { existsSync as existsSync48 } from "fs";
95250
- import { dirname as dirname30, join as join76 } from "path";
95373
+ import { dirname as dirname31, join as join76 } from "path";
95251
95374
  import { fileURLToPath as fileURLToPath5 } from "url";
95252
95375
  function defaultGetModuleHostingWorkspace() {
95253
95376
  try {
95254
- const currentDir = dirname30(fileURLToPath5(import.meta.url));
95377
+ const currentDir = dirname31(fileURLToPath5(import.meta.url));
95255
95378
  const pkgJsonPath = findPackageJsonUp(currentDir);
95256
95379
  if (!pkgJsonPath)
95257
95380
  return null;
95258
- const pkgDir = dirname30(pkgJsonPath);
95259
- const nodeModulesDir = dirname30(pkgDir);
95381
+ const pkgDir = dirname31(pkgJsonPath);
95382
+ const nodeModulesDir = dirname31(pkgDir);
95260
95383
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
95261
95384
  return null;
95262
- return dirname30(nodeModulesDir);
95385
+ return dirname31(nodeModulesDir);
95263
95386
  } catch (error51) {
95264
95387
  if (error51 instanceof Error) {
95265
95388
  return null;
@@ -97808,9 +97931,9 @@ function formatConfigSummary(config3) {
97808
97931
  `);
97809
97932
  }
97810
97933
  function printHeader(isUpdate) {
97811
- const mode = isUpdate ? "Update" : "Install";
97934
+ const mode2 = isUpdate ? "Update" : "Install";
97812
97935
  console.log();
97813
- console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode} `)));
97936
+ console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode2} `)));
97814
97937
  console.log();
97815
97938
  }
97816
97939
  function printStep(step, total, message) {
@@ -98089,7 +98212,7 @@ function windowsCommandShim(targetPath) {
98089
98212
 
98090
98213
  // packages/omo-codex/src/install/codex-cache-dangling-bins.ts
98091
98214
  import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "fs/promises";
98092
- import { dirname as dirname9, isAbsolute, join as join23, resolve as resolve5 } from "path";
98215
+ import { dirname as dirname10, isAbsolute, join as join23, resolve as resolve5 } from "path";
98093
98216
 
98094
98217
  // packages/omo-codex/src/install/codex-cache-fs.ts
98095
98218
  import { lstat } from "fs/promises";
@@ -98136,7 +98259,7 @@ async function removeDanglingManagedSymlink(linkPath) {
98136
98259
  if (!linkStat.isSymbolicLink())
98137
98260
  return;
98138
98261
  const linkTarget = await readlink(linkPath);
98139
- const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname9(linkPath), linkTarget);
98262
+ const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname10(linkPath), linkTarget);
98140
98263
  if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
98141
98264
  await rm(linkPath, { force: true });
98142
98265
  } catch (error51) {
@@ -98598,11 +98721,11 @@ async function existingNonSymlink(path7) {
98598
98721
  }
98599
98722
  // packages/omo-codex/src/install/codex-cache-install.ts
98600
98723
  import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "fs/promises";
98601
- import { basename as basename5, dirname as dirname12, join as join32, sep as sep5 } from "path";
98724
+ import { basename as basename5, dirname as dirname13, join as join32, sep as sep5 } from "path";
98602
98725
 
98603
98726
  // packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
98604
98727
  import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "fs/promises";
98605
- import { dirname as dirname10, join as join27, resolve as resolve7 } from "path";
98728
+ import { dirname as dirname11, join as join27, resolve as resolve7 } from "path";
98606
98729
  var BUNDLED_MCP_RUNTIMES = [
98607
98730
  {
98608
98731
  label: "Git Bash MCP",
@@ -98637,7 +98760,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
98637
98760
  throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
98638
98761
  }
98639
98762
  const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
98640
- await mkdir2(dirname10(destinationPath), { recursive: true });
98763
+ await mkdir2(dirname11(destinationPath), { recursive: true });
98641
98764
  await cp(sourcePath, destinationPath, { recursive: true });
98642
98765
  }
98643
98766
  async function readSourceMcpArgs(path7) {
@@ -98675,7 +98798,7 @@ async function isDirectory(path7) {
98675
98798
  // packages/omo-codex/src/install/codex-cache-local-dependencies.ts
98676
98799
  import { realpathSync as realpathSync6 } from "fs";
98677
98800
  import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "fs/promises";
98678
- import { dirname as dirname11, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "path";
98801
+ import { dirname as dirname12, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "path";
98679
98802
 
98680
98803
  // packages/omo-codex/src/install/codex-cache-paths.ts
98681
98804
  import { existsSync as existsSync24, readdirSync as readdirSync6 } from "fs";
@@ -98744,7 +98867,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
98744
98867
  const parsed = JSON.parse(raw);
98745
98868
  if (!isPlainRecord4(parsed))
98746
98869
  continue;
98747
- const packageDir = dirname11(packageJsonPath);
98870
+ const packageDir = dirname12(packageJsonPath);
98748
98871
  const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
98749
98872
  let changed = false;
98750
98873
  for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
@@ -99139,13 +99262,13 @@ function sanitizeNpmInstallEnv(env2) {
99139
99262
  return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
99140
99263
  }
99141
99264
  function createTempSiblingPath(targetPath) {
99142
- return join32(dirname12(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99265
+ return join32(dirname13(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99143
99266
  }
99144
99267
  function createBackupSiblingPath(targetPath) {
99145
- return join32(dirname12(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99268
+ return join32(dirname13(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99146
99269
  }
99147
99270
  async function copyDirectory(sourcePath, targetPath) {
99148
- await mkdir3(dirname12(targetPath), { recursive: true });
99271
+ await mkdir3(dirname13(targetPath), { recursive: true });
99149
99272
  await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
99150
99273
  }
99151
99274
  async function promoteDirectory(tempPath, targetPath, renameDirectory) {
@@ -99244,20 +99367,20 @@ async function copyRootRuntimeDists(input) {
99244
99367
  const sourcePath = join32(repoRoot, runtimePath);
99245
99368
  if (!await fileExistsStrict(join32(sourcePath, "index.js")))
99246
99369
  continue;
99247
- await mkdir3(dirname12(join32(input.pluginRoot, runtimePath)), { recursive: true });
99370
+ await mkdir3(dirname13(join32(input.pluginRoot, runtimePath)), { recursive: true });
99248
99371
  await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
99249
99372
  }
99250
99373
  }
99251
99374
  function repoRootForCodexPluginSource(sourcePath) {
99252
- const codexPackageRoot = dirname12(sourcePath);
99253
- const packagesRoot = dirname12(codexPackageRoot);
99375
+ const codexPackageRoot = dirname13(sourcePath);
99376
+ const packagesRoot = dirname13(codexPackageRoot);
99254
99377
  if (basename5(sourcePath) !== "plugin")
99255
99378
  return null;
99256
99379
  if (basename5(codexPackageRoot) !== "omo-codex")
99257
99380
  return null;
99258
99381
  if (basename5(packagesRoot) !== "packages")
99259
99382
  return null;
99260
- return dirname12(packagesRoot);
99383
+ return dirname13(packagesRoot);
99261
99384
  }
99262
99385
  // packages/omo-codex/src/install/codex-cache-prune.ts
99263
99386
  import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "fs/promises";
@@ -99388,7 +99511,7 @@ async function shouldBuildSourcePackages(repoRoot) {
99388
99511
 
99389
99512
  // packages/omo-codex/src/install/codex-config-toml.ts
99390
99513
  import { mkdir as mkdir5, readFile as readFile11 } from "fs/promises";
99391
- import { dirname as dirname15 } from "path";
99514
+ import { dirname as dirname16 } from "path";
99392
99515
 
99393
99516
  // packages/omo-codex/src/install/toml-section-editor.ts
99394
99517
  function findTomlSection(config3, header) {
@@ -99970,12 +100093,12 @@ function tomlKeySegment(value) {
99970
100093
 
99971
100094
  // packages/omo-codex/src/install/codex-config-atomic-write.ts
99972
100095
  import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "fs/promises";
99973
- import { basename as basename6, dirname as dirname13, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "path";
100096
+ import { basename as basename6, dirname as dirname14, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "path";
99974
100097
  var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
99975
100098
  var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
99976
100099
  async function writeFileAtomic(targetPath, data) {
99977
100100
  const writeTarget = await resolveSymlinkTarget(targetPath);
99978
- const temporaryPath = join36(dirname13(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
100101
+ const temporaryPath = join36(dirname14(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
99979
100102
  await writeFile5(temporaryPath, data);
99980
100103
  try {
99981
100104
  await renameWithRetry(temporaryPath, writeTarget);
@@ -100004,7 +100127,7 @@ async function resolveSymlinkTarget(targetPath) {
100004
100127
  if (!(error51 instanceof Error))
100005
100128
  throw error51;
100006
100129
  const linkValue = await readlink4(targetPath);
100007
- return isAbsolute5(linkValue) ? linkValue : resolve10(dirname13(targetPath), linkValue);
100130
+ return isAbsolute5(linkValue) ? linkValue : resolve10(dirname14(targetPath), linkValue);
100008
100131
  }
100009
100132
  }
100010
100133
  async function renameWithRetry(fromPath, toPath) {
@@ -100484,14 +100607,14 @@ import { join as join37 } from "path";
100484
100607
  var FALLBACK_CODEX_MODEL_CATALOG = {
100485
100608
  current: {
100486
100609
  model: "gpt-5.6-sol",
100487
- modelContextWindow: 372000,
100610
+ modelContextWindow: 650000,
100488
100611
  modelReasoningEffort: "high",
100489
100612
  planModeReasoningEffort: "xhigh"
100490
100613
  },
100491
100614
  managedProfiles: [
100492
100615
  {
100493
100616
  model: "gpt-5.5",
100494
- modelContextWindow: 400000,
100617
+ modelContextWindow: 650000,
100495
100618
  modelReasoningEffort: "high",
100496
100619
  planModeReasoningEffort: "xhigh"
100497
100620
  },
@@ -100589,7 +100712,7 @@ function isRootSetting2(line, key) {
100589
100712
 
100590
100713
  // packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
100591
100714
  import { readFileSync as readFileSync11 } from "fs";
100592
- import { dirname as dirname14, isAbsolute as isAbsolute6, join as join38 } from "path";
100715
+ import { dirname as dirname15, isAbsolute as isAbsolute6, join as join38 } from "path";
100593
100716
  var CODEX_AGENTS_HEADER = "agents";
100594
100717
  var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
100595
100718
  var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
@@ -100626,8 +100749,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
100626
100749
  }
100627
100750
  function resolveCatalogPath(configuredPath, configPath) {
100628
100751
  if (configuredPath === null)
100629
- return join38(dirname14(configPath), "models_cache.json");
100630
- return isAbsolute6(configuredPath) ? configuredPath : join38(dirname14(configPath), configuredPath);
100752
+ return join38(dirname15(configPath), "models_cache.json");
100753
+ return isAbsolute6(configuredPath) ? configuredPath : join38(dirname15(configPath), configuredPath);
100631
100754
  }
100632
100755
  function readCatalogMultiAgentVersion(model, cachePath) {
100633
100756
  let raw;
@@ -100731,7 +100854,7 @@ function readBooleanSetting(sectionText, key) {
100731
100854
 
100732
100855
  // packages/omo-codex/src/install/codex-config-toml.ts
100733
100856
  async function updateCodexConfig(input) {
100734
- await mkdir5(dirname15(input.configPath), { recursive: true });
100857
+ await mkdir5(dirname16(input.configPath), { recursive: true });
100735
100858
  let config3;
100736
100859
  try {
100737
100860
  config3 = await readFile11(input.configPath, "utf8");
@@ -101704,7 +101827,7 @@ var defaultRunCommand = async (command, args, options) => {
101704
101827
 
101705
101828
  // packages/omo-codex/src/install/codex-project-local-cleanup.ts
101706
101829
  import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "fs/promises";
101707
- import { dirname as dirname16, join as join46, resolve as resolve11 } from "path";
101830
+ import { dirname as dirname17, join as join46, resolve as resolve11 } from "path";
101708
101831
  var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
101709
101832
  var PROJECT_LOCAL_ARTIFACT_PATHS = [
101710
101833
  ".codex/hooks.json",
@@ -101824,13 +101947,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
101824
101947
  artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
101825
101948
  };
101826
101949
  }
101827
- const parent = dirname16(current);
101950
+ const parent = dirname17(current);
101828
101951
  if (parent === current) {
101829
101952
  const nearestConfigPath = configPathsFromCwd[0];
101830
101953
  return nearestConfigPath === undefined ? null : {
101831
- projectRoot: dirname16(dirname16(nearestConfigPath)),
101954
+ projectRoot: dirname17(dirname17(nearestConfigPath)),
101832
101955
  configPaths: [nearestConfigPath],
101833
- artifactRoots: [dirname16(dirname16(nearestConfigPath))]
101956
+ artifactRoots: [dirname17(dirname17(nearestConfigPath))]
101834
101957
  };
101835
101958
  }
101836
101959
  current = parent;
@@ -101846,7 +101969,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
101846
101969
  function artifactRootsForConfigPaths(configPaths2) {
101847
101970
  const roots = [];
101848
101971
  for (const configPath of configPaths2) {
101849
- const root = dirname16(dirname16(configPath));
101972
+ const root = dirname17(dirname17(configPath));
101850
101973
  if (!roots.includes(root))
101851
101974
  roots.push(root);
101852
101975
  }
@@ -102756,7 +102879,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
102756
102879
 
102757
102880
  // packages/omo-codex/src/install/codex-cleanup-bins.ts
102758
102881
  import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "fs/promises";
102759
- import { dirname as dirname18, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "path";
102882
+ import { dirname as dirname19, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "path";
102760
102883
  var ROOT_RUNTIME_BIN_NAME = "omo";
102761
102884
  var MANAGED_CODEX_BIN_NAMES = new Set([
102762
102885
  ROOT_RUNTIME_BIN_NAME,
@@ -102813,7 +102936,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
102813
102936
  if (platform === "win32")
102814
102937
  return false;
102815
102938
  const linkTarget = await readlink6(linkPath);
102816
- const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname18(linkPath), linkTarget);
102939
+ const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname19(linkPath), linkTarget);
102817
102940
  return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
102818
102941
  }
102819
102942
  if (!entryStat.isFile())
@@ -102824,7 +102947,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
102824
102947
 
102825
102948
  // packages/omo-codex/src/install/codex-cleanup-config.ts
102826
102949
  import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "fs/promises";
102827
- import { dirname as dirname19 } from "path";
102950
+ import { dirname as dirname20 } from "path";
102828
102951
  var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
102829
102952
  var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
102830
102953
  var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
@@ -102861,7 +102984,7 @@ async function cleanupCodexConfig(configPath, now) {
102861
102984
  if (next === original)
102862
102985
  return { changed: false };
102863
102986
  const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
102864
- await mkdir8(dirname19(configPath), { recursive: true });
102987
+ await mkdir8(dirname20(configPath), { recursive: true });
102865
102988
  await writeFile13(backupPath, original);
102866
102989
  await writeFile13(configPath, `${next.trimEnd()}
102867
102990
  `);
@@ -102940,10 +103063,10 @@ function nodeErrorCode5(error51) {
102940
103063
  }
102941
103064
 
102942
103065
  // packages/omo-codex/src/install/codex-cleanup-safety.ts
102943
- import { dirname as dirname20, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "path";
103066
+ import { dirname as dirname21, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "path";
102944
103067
  function codexHomeResolvesToFilesystemRoot(codexHome) {
102945
103068
  const resolved = resolve15(codexHome);
102946
- return dirname20(resolved) === resolved;
103069
+ return dirname21(resolved) === resolved;
102947
103070
  }
102948
103071
  function validateManagedCleanupTarget(input) {
102949
103072
  if (!isAbsolute10(input.path))
@@ -103206,7 +103329,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
103206
103329
  import { execFile as execFile4 } from "child_process";
103207
103330
  import { existsSync as existsSync32 } from "fs";
103208
103331
  import { homedir as homedir11 } from "os";
103209
- import { dirname as dirname24, join as join63, resolve as resolve20 } from "path";
103332
+ import { dirname as dirname25, join as join63, resolve as resolve20 } from "path";
103210
103333
  import { fileURLToPath } from "url";
103211
103334
  import { promisify as promisify3 } from "util";
103212
103335
 
@@ -103237,9 +103360,9 @@ function resolveAgentHome(options) {
103237
103360
  }
103238
103361
 
103239
103362
  // packages/omo-senpi/src/install/local-launcher.ts
103240
- import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "fs";
103363
+ import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "fs";
103241
103364
  import { homedir as homedir10 } from "os";
103242
- import { dirname as dirname21, join as join60, resolve as resolve18 } from "path";
103365
+ import { dirname as dirname22, join as join60, resolve as resolve18 } from "path";
103243
103366
  var MARKER = "omo-local-launcher";
103244
103367
  function localLauncherPath(homeDir = homedir10()) {
103245
103368
  return join60(homeDir, ".local", "bin", "omo");
@@ -103310,7 +103433,7 @@ function installLocalLauncher(options) {
103310
103433
  const path7 = localLauncherPath(options.homeDir);
103311
103434
  if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
103312
103435
  return;
103313
- mkdirSync10(dirname21(path7), { recursive: true });
103436
+ mkdirSync10(dirname22(path7), { recursive: true });
103314
103437
  writeFileSync6(path7, renderLocalLauncher(options));
103315
103438
  chmodSync3(path7, 493);
103316
103439
  if ((options.platform ?? process.platform) === "win32") {
@@ -103325,12 +103448,12 @@ node "%~dp0omo" %*\r
103325
103448
  import { createHash as createHash5 } from "crypto";
103326
103449
  import { constants as constants9 } from "fs";
103327
103450
  import { access as access2, readFile as readFile26, stat as stat6 } from "fs/promises";
103328
- import { dirname as dirname23, join as join62 } from "path";
103451
+ import { dirname as dirname24, join as join62 } from "path";
103329
103452
 
103330
103453
  // packages/omo-senpi/src/install/senpi-settings.ts
103331
103454
  import { constants as constants8 } from "fs";
103332
103455
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "fs/promises";
103333
- import { dirname as dirname22, join as join61, resolve as resolve19 } from "path";
103456
+ import { dirname as dirname23, join as join61, resolve as resolve19 } from "path";
103334
103457
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
103335
103458
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
103336
103459
  join61("packages", "pi-goal"),
@@ -103377,7 +103500,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
103377
103500
  return entries.filter((entry) => entry !== undefined);
103378
103501
  }
103379
103502
  async function writeSettingsAtomically(settingsPath, settings) {
103380
- await mkdir9(dirname22(settingsPath), { recursive: true });
103503
+ await mkdir9(dirname23(settingsPath), { recursive: true });
103381
103504
  const backupPath = await nextBackupPath(settingsPath);
103382
103505
  if (await fileExists(settingsPath)) {
103383
103506
  await copyFile3(settingsPath, backupPath);
@@ -103497,7 +103620,7 @@ async function hasMissingPluginArtifact(pluginPath) {
103497
103620
  }
103498
103621
  async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
103499
103622
  const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
103500
- const manifestPath = join62(dirname23(runtimeEntry), "manifest.json");
103623
+ const manifestPath = join62(dirname24(runtimeEntry), "manifest.json");
103501
103624
  let runtimeStat;
103502
103625
  try {
103503
103626
  runtimeStat = await stat6(runtimeEntry);
@@ -103587,7 +103710,7 @@ async function runSenpiInstaller(options = {}) {
103587
103710
  function resolveInstallContext(options) {
103588
103711
  const env3 = options.env ?? process.env;
103589
103712
  const allowBuild = options.pluginPath === undefined;
103590
- const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve20(options.pluginPath))));
103713
+ const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
103591
103714
  const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
103592
103715
  const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
103593
103716
  return {
@@ -107591,7 +107714,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
107591
107714
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
107592
107715
  init_bun_which_shim();
107593
107716
  init_spawn_with_windows_hide();
107594
- import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "path";
107717
+ import { delimiter as delimiter2, dirname as dirname26, posix as posix9, win32 as win325 } from "path";
107595
107718
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
107596
107719
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
107597
107720
  function getCommandCandidates(platform) {
@@ -107649,7 +107772,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
107649
107772
  return null;
107650
107773
  }
107651
107774
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
107652
- const preferredDir = dirname25(binaryPath);
107775
+ const preferredDir = dirname26(binaryPath);
107653
107776
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
107654
107777
  return [preferredDir, ...existing].join(delimiter2);
107655
107778
  }
@@ -108427,7 +108550,7 @@ init_state();
108427
108550
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
108428
108551
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
108429
108552
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
108430
- import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "fs";
108553
+ import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "fs";
108431
108554
  import { join as join68 } from "path";
108432
108555
  function getMarkerPath(directory, sessionID) {
108433
108556
  return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
@@ -108607,7 +108730,7 @@ init_agent_display_names();
108607
108730
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
108608
108731
  init_frontmatter2();
108609
108732
  import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "fs";
108610
- import { dirname as dirname26, join as join70 } from "path";
108733
+ import { dirname as dirname27, join as join70 } from "path";
108611
108734
 
108612
108735
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
108613
108736
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -109922,14 +110045,15 @@ function detectConfigPath() {
109922
110045
  return null;
109923
110046
  }
109924
110047
  function parsePluginVersion(entry) {
109925
- if (entry.startsWith(`${PLUGIN_NAME}@`)) {
109926
- const value = entry.slice(PLUGIN_NAME.length + 1);
110048
+ const name = getPluginEntryName(entry);
110049
+ if (name.startsWith(`${PLUGIN_NAME}@`)) {
110050
+ const value = name.slice(PLUGIN_NAME.length + 1);
109927
110051
  if (!value || value === "latest")
109928
110052
  return null;
109929
110053
  return value;
109930
110054
  }
109931
- if (entry.startsWith(`${LEGACY_PLUGIN_NAME}@`)) {
109932
- const value = entry.slice(LEGACY_PLUGIN_NAME.length + 1);
110055
+ if (name.startsWith(`${LEGACY_PLUGIN_NAME}@`)) {
110056
+ const value = name.slice(LEGACY_PLUGIN_NAME.length + 1);
109933
110057
  if (!value || value === "latest")
109934
110058
  return null;
109935
110059
  return value;
@@ -109938,13 +110062,14 @@ function parsePluginVersion(entry) {
109938
110062
  }
109939
110063
  function findPluginEntry2(entries) {
109940
110064
  for (const entry of entries) {
109941
- if (entry === PLUGIN_NAME || entry.startsWith(`${PLUGIN_NAME}@`)) {
110065
+ const name = getPluginEntryName(entry);
110066
+ if (name === PLUGIN_NAME || name.startsWith(`${PLUGIN_NAME}@`)) {
109942
110067
  return { entry, isLocalDev: false };
109943
110068
  }
109944
- if (entry === LEGACY_PLUGIN_NAME || entry.startsWith(`${LEGACY_PLUGIN_NAME}@`)) {
110069
+ if (name === LEGACY_PLUGIN_NAME || name.startsWith(`${LEGACY_PLUGIN_NAME}@`)) {
109945
110070
  return { entry, isLocalDev: false };
109946
110071
  }
109947
- if (entry.startsWith("file://") && (entry.includes(PLUGIN_NAME) || entry.includes(LEGACY_PLUGIN_NAME))) {
110072
+ if (name.startsWith("file://") && (name.includes(PLUGIN_NAME) || name.includes(LEGACY_PLUGIN_NAME))) {
109948
110073
  return { entry, isLocalDev: true };
109949
110074
  }
109950
110075
  }
@@ -110266,13 +110391,14 @@ async function checkSystem(deps = defaultDeps6) {
110266
110391
  });
110267
110392
  }
110268
110393
  if (pluginInfo.entry && !pluginInfo.isLocalDev) {
110269
- const isLegacyName = pluginInfo.entry === LEGACY_PLUGIN_NAME || pluginInfo.entry.startsWith(`${LEGACY_PLUGIN_NAME}@`);
110394
+ const entryName = getPluginEntryName(pluginInfo.entry);
110395
+ const isLegacyName = entryName === LEGACY_PLUGIN_NAME || entryName.startsWith(`${LEGACY_PLUGIN_NAME}@`);
110270
110396
  if (isLegacyName) {
110271
- const suggestedEntry = pluginInfo.entry.replace(LEGACY_PLUGIN_NAME, PLUGIN_NAME);
110397
+ const suggestedEntry = entryName.replace(LEGACY_PLUGIN_NAME, PLUGIN_NAME);
110272
110398
  issues.push({
110273
110399
  title: "Using legacy package name",
110274
110400
  description: `Your opencode.json references "${LEGACY_PLUGIN_NAME}" which has been renamed to "${PLUGIN_NAME}". The old name may stop working in a future release.`,
110275
- fix: `Update your opencode.json plugin entry: "${pluginInfo.entry}" \u2192 "${suggestedEntry}"`,
110401
+ fix: `Update your opencode.json plugin entry: "${entryName}" \u2192 "${suggestedEntry}"`,
110276
110402
  severity: "warning",
110277
110403
  affects: ["plugin loading"]
110278
110404
  });
@@ -110449,8 +110575,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
110449
110575
  }
110450
110576
 
110451
110577
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
110452
- function formatCapabilityResolutionLabel(mode) {
110453
- return mode ?? "unknown";
110578
+ function formatCapabilityResolutionLabel(mode2) {
110579
+ return mode2 ?? "unknown";
110454
110580
  }
110455
110581
  function buildModelResolutionDetails(options) {
110456
110582
  const details = [];
@@ -110568,8 +110694,8 @@ function collectCapabilityResolutionIssues(info) {
110568
110694
  const issues = [];
110569
110695
  const allEntries = [...info.agents, ...info.categories];
110570
110696
  const fallbackEntries = allEntries.filter((entry) => {
110571
- const mode = entry.capabilityDiagnostics?.resolutionMode;
110572
- return mode === "unknown";
110697
+ const mode2 = entry.capabilityDiagnostics?.resolutionMode;
110698
+ return mode2 === "unknown";
110573
110699
  });
110574
110700
  if (fallbackEntries.length === 0) {
110575
110701
  return issues;
@@ -110845,7 +110971,7 @@ init_src2();
110845
110971
  import { existsSync as existsSync55 } from "fs";
110846
110972
  import { createRequire as createRequire3 } from "module";
110847
110973
  import { homedir as homedir19 } from "os";
110848
- import { dirname as dirname31, join as join83 } from "path";
110974
+ import { dirname as dirname32, join as join83 } from "path";
110849
110975
 
110850
110976
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
110851
110977
  import { join as join82 } from "path";
@@ -110942,7 +111068,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
110942
111068
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
110943
111069
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
110944
111070
  try {
110945
- const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
111071
+ const packageDir = baseDirOverride ?? dirname32(resolvePackageJsonPath());
110946
111072
  const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
110947
111073
  if (existsSync55(vendorPath))
110948
111074
  return vendorPath;
@@ -111094,7 +111220,7 @@ async function getGhCliInfo(dependencies = {}) {
111094
111220
  init_zod();
111095
111221
  init_opencode_config_dir();
111096
111222
  import { existsSync as existsSync56, readFileSync as readFileSync35 } from "fs";
111097
- import { delimiter as delimiter3, dirname as dirname32, resolve as resolve23 } from "path";
111223
+ import { delimiter as delimiter3, dirname as dirname33, resolve as resolve23 } from "path";
111098
111224
  import { fileURLToPath as fileURLToPath7 } from "url";
111099
111225
 
111100
111226
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -111225,7 +111351,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
111225
111351
  ].join(";");
111226
111352
  function getModuleDirectory(moduleUrl) {
111227
111353
  try {
111228
- return dirname32(fileURLToPath7(moduleUrl));
111354
+ return dirname33(fileURLToPath7(moduleUrl));
111229
111355
  } catch (error51) {
111230
111356
  if (!(error51 instanceof Error))
111231
111357
  throw error51;
@@ -111292,6 +111418,7 @@ function createLspMcpConfig(options = {}) {
111292
111418
  enabled: resolvedCommand.exists,
111293
111419
  cwd,
111294
111420
  environment: {
111421
+ LSP_TOOLS_MCP_CWD: cwd,
111295
111422
  LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve23(cwd, configPath)).join(delimiter3),
111296
111423
  LSP_TOOLS_MCP_USER_CONFIG: resolve23(configDir, "lsp.json"),
111297
111424
  LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve23(configDir, "lsp-install-decisions.json"),
@@ -111958,7 +112085,7 @@ async function pathExists2(path15) {
111958
112085
  init_src2();
111959
112086
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "fs/promises";
111960
112087
  import { homedir as homedir23 } from "os";
111961
- import { dirname as dirname33, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
112088
+ import { dirname as dirname34, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
111962
112089
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
111963
112090
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
111964
112091
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -112032,7 +112159,7 @@ async function auditBundleTargets(pluginRoot) {
112032
112159
  const manifest2 = await readJson2(manifestPath);
112033
112160
  if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
112034
112161
  continue;
112035
- const manifestRoot = dirname33(manifestPath);
112162
+ const manifestRoot = dirname34(manifestPath);
112036
112163
  const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
112037
112164
  for (const server2 of Object.values(manifest2["mcpServers"])) {
112038
112165
  if (!isRecord13(server2) || !Array.isArray(server2["args"]))
@@ -112053,7 +112180,7 @@ async function auditBundleTargets(pluginRoot) {
112053
112180
  continue;
112054
112181
  const commands2 = [];
112055
112182
  collectHookCommands(manifest2, commands2);
112056
- const hookPluginRoot = dirname33(dirname33(hookManifestPath));
112183
+ const hookPluginRoot = dirname34(dirname34(hookManifestPath));
112057
112184
  for (const command of commands2) {
112058
112185
  for (const relativePath of extractPluginRootPaths(command)) {
112059
112186
  referencedCount += 1;
@@ -112092,7 +112219,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
112092
112219
  }
112093
112220
  async function findHookManifestPaths(root) {
112094
112221
  const paths3 = await findManifestPaths(root, "hooks.json");
112095
- return paths3.filter((path15) => dirname33(path15).endsWith(`${sep9}hooks`));
112222
+ return paths3.filter((path15) => dirname34(path15).endsWith(`${sep9}hooks`));
112096
112223
  }
112097
112224
  async function findManifestPaths(root, manifestName) {
112098
112225
  let entries;
@@ -112611,8 +112738,8 @@ function formatVerbose(result) {
112611
112738
  }
112612
112739
 
112613
112740
  // packages/omo-opencode/src/cli/doctor/framework/formatter.ts
112614
- function formatDoctorOutput(result, mode) {
112615
- switch (mode) {
112741
+ function formatDoctorOutput(result, mode2) {
112742
+ switch (mode2) {
112616
112743
  case "default":
112617
112744
  return formatDefault(result);
112618
112745
  case "status":
@@ -112776,7 +112903,7 @@ import {
112776
112903
  unlinkSync as unlinkSync9,
112777
112904
  writeFileSync as writeFileSync12
112778
112905
  } from "fs";
112779
- import { basename as basename12, dirname as dirname34, join as join90 } from "path";
112906
+ import { basename as basename12, dirname as dirname35, join as join90 } from "path";
112780
112907
 
112781
112908
  // packages/mcp-client-core/src/config-dir.ts
112782
112909
  import { existsSync as existsSync61, realpathSync as realpathSync8 } from "fs";
@@ -112960,7 +113087,7 @@ function readLegacyStore() {
112960
113087
  }
112961
113088
  function writeTokenFile(filePath, token) {
112962
113089
  try {
112963
- const dir = dirname34(filePath);
113090
+ const dir = dirname35(filePath);
112964
113091
  if (!existsSync63(dir)) {
112965
113092
  mkdirSync15(dir, { recursive: true });
112966
113093
  }
@@ -113932,10 +114059,10 @@ function formatClassification(classification) {
113932
114059
  return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
113933
114060
  }
113934
114061
  function formatSummary(result) {
113935
- const mode = result.apply ? "apply" : "dry-run";
114062
+ const mode2 = result.apply ? "apply" : "dry-run";
113936
114063
  const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
113937
114064
  const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
113938
- return `SUMMARY mode=${mode} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
114065
+ return `SUMMARY mode=${mode2} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
113939
114066
  }
113940
114067
  function formatResult(result) {
113941
114068
  const lines = [];
@@ -114457,9 +114584,9 @@ Examples:
114457
114584
  `).action(async (options) => {
114458
114585
  const rootOptions = program2.opts();
114459
114586
  const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
114460
- const mode = options.status ? "status" : options.verbose ? "verbose" : "default";
114587
+ const mode2 = options.status ? "status" : options.verbose ? "verbose" : "default";
114461
114588
  const doctorOptions = {
114462
- mode,
114589
+ mode: mode2,
114463
114590
  json: options.json ?? false,
114464
114591
  target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
114465
114592
  };