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

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 (143) hide show
  1. package/dist/cli/index.js +266 -153
  2. package/dist/cli-node/index.js +266 -153
  3. package/dist/features/team-mode/tools/messaging-fallback-wake.d.ts +15 -0
  4. package/dist/index.js +1920 -1655
  5. package/dist/skills/debugging/SKILL.md +2 -0
  6. package/dist/skills/debugging/references/methodology/00-setup.md +12 -0
  7. package/dist/skills/debugging/references/methodology/02-investigate.md +21 -0
  8. package/dist/skills/debugging/references/runtimes/go.md +15 -1
  9. package/dist/skills/debugging/references/runtimes/native-binary.md +38 -0
  10. package/dist/skills/debugging/references/runtimes/node.md +25 -0
  11. package/dist/skills/debugging/references/runtimes/python.md +13 -0
  12. package/dist/skills/debugging/references/runtimes/rust.md +41 -0
  13. package/dist/skills/debugging/references/scripts/dap.mjs +267 -0
  14. package/dist/skills/debugging/references/scripts/dap.test.ts +86 -0
  15. package/dist/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  16. package/dist/skills/debugging/references/tools/dap.md +103 -0
  17. package/dist/skills/debugging/references/tools/frida.md +193 -0
  18. package/dist/tools/delegate-task/types.d.ts +3 -0
  19. package/dist/tui.js +103 -12
  20. package/package.json +18 -15
  21. package/packages/lsp-core/src/index.ts +1 -0
  22. package/packages/lsp-core/src/lsp/client-wrapper.ts +25 -5
  23. package/packages/lsp-core/src/lsp/client.ts +26 -0
  24. package/packages/lsp-core/src/lsp/connection.ts +16 -0
  25. package/packages/lsp-core/src/lsp/constants.ts +1 -0
  26. package/packages/lsp-core/src/lsp/format-document.test.ts +143 -0
  27. package/packages/lsp-core/src/lsp/format-document.ts +90 -0
  28. package/packages/lsp-core/src/lsp/manager-max-clients.test.ts +151 -0
  29. package/packages/lsp-core/src/lsp/manager.ts +34 -1
  30. package/packages/lsp-core/src/lsp/server-definitions.ts +29 -0
  31. package/packages/lsp-core/src/lsp/server-installation.test.ts +376 -0
  32. package/packages/lsp-core/src/lsp/server-installation.ts +200 -27
  33. package/packages/lsp-core/src/lsp/server-resolution-local-binary.test.ts +170 -0
  34. package/packages/lsp-core/src/lsp/server-resolution.ts +18 -5
  35. package/packages/lsp-core/src/lsp/transport.ts +9 -0
  36. package/packages/lsp-core/src/lsp/types.ts +8 -0
  37. package/packages/lsp-core/src/tool-surface.test.ts +13 -1
  38. package/packages/lsp-core/src/tools/definitions.ts +14 -0
  39. package/packages/lsp-core/src/tools/format.test.ts +56 -0
  40. package/packages/lsp-core/src/tools/format.ts +56 -0
  41. package/packages/lsp-core/src/tools/index.ts +1 -0
  42. package/packages/lsp-core/src/tools/types.ts +10 -0
  43. package/packages/lsp-daemon/dist/cli.js +432 -144
  44. package/packages/lsp-daemon/dist/client.d.ts +10 -0
  45. package/packages/lsp-daemon/dist/client.js +401 -107
  46. package/packages/lsp-daemon/dist/daemon-client.d.ts +1 -0
  47. package/packages/lsp-daemon/dist/daemon-client.js +3 -0
  48. package/packages/lsp-daemon/dist/index.js +395 -107
  49. package/packages/lsp-tools-mcp/dist/cli.js +384 -99
  50. package/packages/lsp-tools-mcp/dist/lsp/manager.js +53 -0
  51. package/packages/lsp-tools-mcp/dist/mcp.js +384 -99
  52. package/packages/lsp-tools-mcp/dist/tools.js +385 -99
  53. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  54. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -2
  55. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  56. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  57. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +69 -35
  58. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +21 -2
  59. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  60. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  61. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  62. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  63. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  64. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  65. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  66. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  67. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +404 -121
  68. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  69. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  70. package/packages/omo-codex/plugin/components/rules/dist/cli.js +3 -3
  71. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  72. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  73. package/packages/omo-codex/plugin/components/rules/src/post-compact-budget.ts +3 -3
  74. package/packages/omo-codex/plugin/components/rules/test/post-compact-budget.test.ts +4 -4
  75. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  76. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  77. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +30 -15
  78. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +30 -15
  79. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  80. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  81. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  82. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  83. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  84. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  85. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  86. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  87. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  88. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  89. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  90. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  91. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  92. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  93. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  94. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  95. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  96. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  97. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  98. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  99. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  100. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  101. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  102. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  103. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  104. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  105. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  106. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  107. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  108. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  109. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  110. package/packages/omo-codex/plugin/model-catalog.json +3 -3
  111. package/packages/omo-codex/plugin/package-lock.json +13 -13
  112. package/packages/omo-codex/plugin/package.json +1 -1
  113. package/packages/omo-codex/plugin/scripts/migrate-codex-config/catalog.mjs +3 -3
  114. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -0
  115. package/packages/omo-codex/plugin/skills/debugging/references/methodology/00-setup.md +12 -0
  116. package/packages/omo-codex/plugin/skills/debugging/references/methodology/02-investigate.md +21 -0
  117. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/go.md +15 -1
  118. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/native-binary.md +38 -0
  119. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/node.md +25 -0
  120. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/python.md +13 -0
  121. package/packages/omo-codex/plugin/skills/debugging/references/runtimes/rust.md +41 -0
  122. package/packages/omo-codex/plugin/skills/debugging/references/scripts/dap.mjs +267 -0
  123. package/packages/omo-codex/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  124. package/packages/omo-codex/plugin/skills/debugging/references/tools/dap.md +103 -0
  125. package/packages/omo-codex/plugin/skills/debugging/references/tools/frida.md +193 -0
  126. package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +1 -1
  127. package/packages/omo-codex/plugin/test/auto-update.test.mjs +2 -2
  128. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +8 -8
  129. package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +2 -2
  130. package/packages/omo-codex/scripts/install-dist/install-local.mjs +38 -23
  131. package/packages/shared-skills/skills/debugging/SKILL.md +2 -0
  132. package/packages/shared-skills/skills/debugging/references/methodology/00-setup.md +12 -0
  133. package/packages/shared-skills/skills/debugging/references/methodology/02-investigate.md +21 -0
  134. package/packages/shared-skills/skills/debugging/references/runtimes/go.md +15 -1
  135. package/packages/shared-skills/skills/debugging/references/runtimes/native-binary.md +38 -0
  136. package/packages/shared-skills/skills/debugging/references/runtimes/node.md +25 -0
  137. package/packages/shared-skills/skills/debugging/references/runtimes/python.md +13 -0
  138. package/packages/shared-skills/skills/debugging/references/runtimes/rust.md +41 -0
  139. package/packages/shared-skills/skills/debugging/references/scripts/dap.mjs +267 -0
  140. package/packages/shared-skills/skills/debugging/references/scripts/dap.test.ts +86 -0
  141. package/packages/shared-skills/skills/debugging/references/scripts/fixture-adapter.mjs +59 -0
  142. package/packages/shared-skills/skills/debugging/references/tools/dap.md +103 -0
  143. package/packages/shared-skills/skills/debugging/references/tools/frida.md +193 -0
@@ -55,7 +55,7 @@ var package_default;
55
55
  var init_package = __esm(() => {
56
56
  package_default = {
57
57
  name: "oh-my-opencode",
58
- version: "5.0.0-beta.25",
58
+ version: "5.0.0-beta.26",
59
59
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
60
60
  main: "./dist/index.js",
61
61
  types: "dist/index.d.ts",
@@ -236,7 +236,7 @@ var init_package = __esm(() => {
236
236
  zod: "^4.4.3"
237
237
  },
238
238
  devDependencies: {
239
- "@code-yeongyu/senpi": "2026.8.26-2",
239
+ "@code-yeongyu/senpi": "2026.8.28-2",
240
240
  "@oh-my-opencode/agents-md-core": "workspace:*",
241
241
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
242
242
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -277,18 +277,18 @@ var init_package = __esm(() => {
277
277
  typescript: "^7.0.2"
278
278
  },
279
279
  optionalDependencies: {
280
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.25",
281
- "oh-my-opencode-darwin-x64": "5.0.0-beta.25",
282
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.25",
283
- "oh-my-opencode-linux-arm64": "5.0.0-beta.25",
284
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.25",
285
- "oh-my-opencode-linux-x64": "5.0.0-beta.25",
286
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.25",
287
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.25",
288
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.25",
289
- "oh-my-opencode-windows-arm64": "5.0.0-beta.25",
290
- "oh-my-opencode-windows-x64": "5.0.0-beta.25",
291
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.25"
280
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.26",
281
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.26",
282
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.26",
283
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.26",
284
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.26",
285
+ "oh-my-opencode-linux-x64": "5.0.0-beta.26",
286
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.26",
287
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.26",
288
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.26",
289
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.26",
290
+ "oh-my-opencode-windows-x64": "5.0.0-beta.26",
291
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.26"
292
292
  },
293
293
  overrides: {
294
294
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -304,7 +304,10 @@ var init_package = __esm(() => {
304
304
  },
305
305
  trustedDependencies: [
306
306
  "@code-yeongyu/comment-checker"
307
- ]
307
+ ],
308
+ patchedDependencies: {
309
+ "@code-yeongyu/senpi@2026.8.28-2": "patches/@code-yeongyu%2Fsenpi@2026.8.28-2.patch"
310
+ }
308
311
  };
309
312
  });
310
313
 
@@ -4814,9 +4817,12 @@ import {
4814
4817
  fsyncSync,
4815
4818
  openSync,
4816
4819
  renameSync,
4820
+ rmSync,
4817
4821
  unlinkSync,
4818
4822
  writeFileSync
4819
4823
  } from "node:fs";
4824
+ import { randomUUID } from "node:crypto";
4825
+ import { dirname } from "node:path";
4820
4826
  function isToleratedFsyncError(error) {
4821
4827
  if (!(error instanceof Error))
4822
4828
  return false;
@@ -4832,24 +4838,36 @@ function tolerantFsyncSync(fileDescriptor, fsyncImpl) {
4832
4838
  }
4833
4839
  }
4834
4840
  function writeFileAtomically(filePath, content, options = {}) {
4835
- const tempPath = `${filePath}.tmp`;
4836
- writeFileSync(tempPath, content, "utf-8");
4837
- const tempFileDescriptor = openSync(tempPath, "r+");
4838
- try {
4839
- tolerantFsyncSync(tempFileDescriptor, options.fsyncSync ?? fsyncSync);
4840
- } finally {
4841
- closeSync(tempFileDescriptor);
4842
- }
4841
+ const platform = options.platform ?? process.platform;
4842
+ const fsyncImpl = options.fsyncSync ?? fsyncSync;
4843
+ const tempPath = `${filePath}.${process.pid}.${randomUUID()}.tmp`;
4843
4844
  try {
4844
- renameSync(tempPath, filePath);
4845
- } catch (error) {
4846
- const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
4847
- if ((options.platform ?? process.platform) === "win32" && isPermissionError) {
4845
+ writeFileSync(tempPath, content, "utf-8");
4846
+ const tempFileDescriptor = openSync(tempPath, "r+");
4847
+ try {
4848
+ tolerantFsyncSync(tempFileDescriptor, fsyncImpl);
4849
+ } finally {
4850
+ closeSync(tempFileDescriptor);
4851
+ }
4852
+ try {
4853
+ renameSync(tempPath, filePath);
4854
+ } catch (error) {
4855
+ const isPermissionError = error instanceof Error && (error.message.includes("EPERM") || error.message.includes("EACCES"));
4856
+ if (platform !== "win32" || !isPermissionError)
4857
+ throw error;
4848
4858
  unlinkSync(filePath);
4849
4859
  renameSync(tempPath, filePath);
4860
+ }
4861
+ if (platform === "win32")
4850
4862
  return;
4863
+ const directoryFileDescriptor = openSync(dirname(filePath), "r");
4864
+ try {
4865
+ tolerantFsyncSync(directoryFileDescriptor, fsyncImpl);
4866
+ } finally {
4867
+ closeSync(directoryFileDescriptor);
4851
4868
  }
4852
- throw error;
4869
+ } finally {
4870
+ rmSync(tempPath, { force: true });
4853
4871
  }
4854
4872
  }
4855
4873
  var TOLERATED_FSYNC_CODES;
@@ -20555,6 +20573,25 @@ var init_telemetry = __esm(() => {
20555
20573
  }).strict();
20556
20574
  });
20557
20575
 
20576
+ // packages/omo-config-core/src/schema/format-on-mutation.ts
20577
+ var mode, languages, OmoFormatOnMutationLayerSchema, OmoFormatOnMutationSchema;
20578
+ var init_format_on_mutation = __esm(() => {
20579
+ init_zod();
20580
+ mode = _enum2(["off", "best-effort", "required"]);
20581
+ languages = record(string2(), boolean2()).optional();
20582
+ OmoFormatOnMutationLayerSchema = object({
20583
+ mode: mode.optional(),
20584
+ languages,
20585
+ maxFileBytes: number2().int().positive().optional(),
20586
+ timeoutMs: number2().int().positive().optional()
20587
+ }).strict();
20588
+ OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
20589
+ mode: mode.default("best-effort"),
20590
+ maxFileBytes: number2().int().positive().default(1048576),
20591
+ timeoutMs: number2().int().positive().default(3000)
20592
+ }).strict();
20593
+ });
20594
+
20558
20595
  // packages/omo-config-core/src/schema/config.ts
20559
20596
  var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
20560
20597
  var init_config = __esm(() => {
@@ -20568,8 +20605,10 @@ var init_config = __esm(() => {
20568
20605
  init_task();
20569
20606
  init_team();
20570
20607
  init_telemetry();
20608
+ init_format_on_mutation();
20571
20609
  OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
20572
20610
  OmoTypedHarnessConfigSchema = object({
20611
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20573
20612
  categories: OmoCategoriesConfigSchema.optional(),
20574
20613
  agents: OmoAgentsConfigSchema.optional(),
20575
20614
  codegraph: OmoCodegraphSettingsLayerSchema.optional(),
@@ -20581,6 +20620,7 @@ var init_config = __esm(() => {
20581
20620
  telemetry: OmoTelemetrySettingsLayerSchema.optional()
20582
20621
  }).strict();
20583
20622
  OmoConfigProfileSchema = object({
20623
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20584
20624
  categories: OmoCategoriesConfigSchema.optional(),
20585
20625
  agents: OmoAgentsConfigSchema.optional(),
20586
20626
  codegraph: OmoCodegraphSettingsLayerSchema.optional(),
@@ -20595,6 +20635,7 @@ var init_config = __esm(() => {
20595
20635
  "[codex]": OmoTypedHarnessConfigSchema.optional()
20596
20636
  }).strict();
20597
20637
  OmoConfigSchema = object({
20638
+ formatOnMutation: OmoFormatOnMutationSchema.optional(),
20598
20639
  $schema: string2().optional(),
20599
20640
  categories: OmoCategoriesConfigSchema.optional(),
20600
20641
  agents: OmoAgentsConfigSchema.optional(),
@@ -20613,6 +20654,7 @@ var init_config = __esm(() => {
20613
20654
  legacy_migrations: record(string2(), unknown()).optional()
20614
20655
  }).strict();
20615
20656
  OmoConfigLayerSchema = object({
20657
+ formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
20616
20658
  $schema: string2().optional(),
20617
20659
  categories: OmoCategoriesConfigSchema.optional(),
20618
20660
  agents: OmoAgentsConfigSchema.optional(),
@@ -20639,6 +20681,7 @@ var init_schema = __esm(() => {
20639
20681
  init_codegraph();
20640
20682
  init_config();
20641
20683
  init_fallback_models();
20684
+ init_format_on_mutation();
20642
20685
  init_git_master();
20643
20686
  init_harness();
20644
20687
  init_memory();
@@ -20708,7 +20751,7 @@ var init_types = __esm(() => {
20708
20751
 
20709
20752
  // packages/omo-config-core/src/loader/paths.ts
20710
20753
  import { userInfo } from "node:os";
20711
- import { dirname, join as join3, posix, resolve } from "node:path";
20754
+ import { dirname as dirname2, join as join3, posix, resolve } from "node:path";
20712
20755
  function resolveHomeDir(env = process.env) {
20713
20756
  const homeDir = env.HOME ?? env.USERPROFILE ?? process.cwd();
20714
20757
  return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath(resolve(homeDir));
@@ -20773,7 +20816,7 @@ function findProjectConfigPathsFarthestFirst(cwd, homeDir, fileSystem, accountHo
20773
20816
  nearestFirst.push(configPath);
20774
20817
  if (isHomeDir)
20775
20818
  break;
20776
- const parentDir = dirname(currentDir);
20819
+ const parentDir = dirname2(currentDir);
20777
20820
  if (parentDir === currentDir)
20778
20821
  break;
20779
20822
  currentDir = parentDir;
@@ -21213,8 +21256,8 @@ var init_jsonc_parse = __esm(() => {
21213
21256
  });
21214
21257
 
21215
21258
  // packages/omo-config-core/src/writer/writer.ts
21216
- import { randomUUID } from "node:crypto";
21217
- import { dirname as dirname2, join as join4, posix as posix2 } from "node:path";
21259
+ import { randomUUID as randomUUID2 } from "node:crypto";
21260
+ import { dirname as dirname3, join as join4, posix as posix2 } from "node:path";
21218
21261
  function backupSuffix() {
21219
21262
  return new Date().toISOString().replace(/[:.]/g, "-");
21220
21263
  }
@@ -21247,20 +21290,20 @@ function resolveWritePath(options) {
21247
21290
  const jsoncPath2 = resolveUserOmoConfigPath(options.env);
21248
21291
  if (fileSystem.existsSync(jsoncPath2))
21249
21292
  return jsoncPath2;
21250
- const jsonPath2 = join4(dirname2(jsoncPath2), "omo.json");
21293
+ const jsonPath2 = join4(dirname3(jsoncPath2), "omo.json");
21251
21294
  return fileSystem.existsSync(jsonPath2) ? jsonPath2 : jsoncPath2;
21252
21295
  }
21253
21296
  const jsoncPath = join4(options.projectDir ?? process.cwd(), ".omo", "omo.jsonc");
21254
21297
  if (fileSystem.existsSync(jsoncPath))
21255
21298
  return jsoncPath;
21256
- const jsonPath = join4(dirname2(jsoncPath), "omo.json");
21299
+ const jsonPath = join4(dirname3(jsoncPath), "omo.json");
21257
21300
  return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
21258
21301
  }
21259
21302
  function directoryPath(path4) {
21260
- return path4.startsWith("/") ? posix2.dirname(path4) : dirname2(path4);
21303
+ return path4.startsWith("/") ? posix2.dirname(path4) : dirname3(path4);
21261
21304
  }
21262
21305
  function writeAtomically(path4, content, fileSystem) {
21263
- const tempPath = `${path4}.${randomUUID()}.tmp`;
21306
+ const tempPath = `${path4}.${randomUUID2()}.tmp`;
21264
21307
  let tempCreated = false;
21265
21308
  try {
21266
21309
  fileSystem.writeFileExclusiveSync(tempPath, content);
@@ -21543,7 +21586,7 @@ var init_types3 = __esm(() => {
21543
21586
  });
21544
21587
 
21545
21588
  // packages/omo-config-core/src/migration/commit.ts
21546
- import { basename, dirname as dirname3, join as join5, resolve as resolve2 } from "node:path";
21589
+ import { basename, dirname as dirname4, join as join5, resolve as resolve2 } from "node:path";
21547
21590
  function parseDocument(path4, content) {
21548
21591
  const parsed = parseJsoncSafe2(content);
21549
21592
  if (parsed.errors.length > 0 || !isPlainObject5(parsed.data)) {
@@ -21577,11 +21620,11 @@ function writerInput(targetPath, env) {
21577
21620
  const homeDir = resolveHomeDir(env);
21578
21621
  const userDirectory = toPosixPath(join5(homeDir, ".omo"));
21579
21622
  const fileName = basename(targetPath);
21580
- if (toPosixPath(dirname3(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21623
+ if (toPosixPath(dirname4(targetPath)) === userDirectory && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21581
21624
  return { scope: "user" };
21582
21625
  }
21583
- if (basename(dirname3(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21584
- return { projectDir: dirname3(dirname3(targetPath)), scope: "project" };
21626
+ if (basename(dirname4(targetPath)) === ".omo" && (fileName === "omo.json" || fileName === "omo.jsonc")) {
21627
+ return { projectDir: dirname4(dirname4(targetPath)), scope: "project" };
21585
21628
  }
21586
21629
  throw new MigrationTransactionError(`Migration target is not an omo config path: ${targetPath}`);
21587
21630
  }
@@ -21944,7 +21987,7 @@ var init_recovery = __esm(() => {
21944
21987
  });
21945
21988
 
21946
21989
  // packages/omo-config-core/src/migration/batch.ts
21947
- import { dirname as dirname4, posix as posix3 } from "node:path";
21990
+ import { dirname as dirname5, posix as posix3 } from "node:path";
21948
21991
  function parseSource(path4, content) {
21949
21992
  const parsed = parseJsoncSafe2(content);
21950
21993
  if (parsed.errors.length > 0) {
@@ -21993,7 +22036,7 @@ function assertSafeSourcePaths(sources, protectedPaths) {
21993
22036
  }
21994
22037
  }
21995
22038
  function directoryPath2(path4) {
21996
- return path4.startsWith("/") ? posix3.dirname(path4) : dirname4(path4);
22039
+ return path4.startsWith("/") ? posix3.dirname(path4) : dirname5(path4);
21997
22040
  }
21998
22041
  function ensureBackupDirectories(moves, fileSystem) {
21999
22042
  for (const move of moves)
@@ -22624,7 +22667,7 @@ var init_process_sweep = () => {};
22624
22667
  // packages/utils/src/codegraph/resolve.ts
22625
22668
  import { existsSync as existsSync7 } from "node:fs";
22626
22669
  import { spawnSync } from "node:child_process";
22627
- import { basename as basename2, dirname as dirname5, join as join10 } from "node:path";
22670
+ import { basename as basename2, dirname as dirname6, join as join10 } from "node:path";
22628
22671
  import { createRequire as createRequire2 } from "node:module";
22629
22672
  function defaultNodeVersion(nodePath) {
22630
22673
  if (nodePath === process.execPath && isNodeExecutableName(nodePath))
@@ -23058,6 +23101,9 @@ var init_message_inspection_error = () => {};
23058
23101
  function getPromptGateMessagesFetchTimeoutMs() {
23059
23102
  return promptGateMessagesFetchTimeoutMsForTesting ?? DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS;
23060
23103
  }
23104
+ function getPromptGateRevalidationTimeoutMs() {
23105
+ return promptGateRevalidationTimeoutMsForTesting ?? DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS;
23106
+ }
23061
23107
  async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName) {
23062
23108
  if (dispatchTimeoutMs <= 0) {
23063
23109
  return operation;
@@ -23076,7 +23122,7 @@ async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName)
23076
23122
  }
23077
23123
  }
23078
23124
  }
23079
- 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;
23125
+ 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;
23080
23126
 
23081
23127
  // packages/utils/src/prompt-async-gate/pending-tool-turn.ts
23082
23128
  function getPromptQuery(input) {
@@ -23277,6 +23323,7 @@ async function dispatchAfterSessionIdle(args) {
23277
23323
  checkStatus,
23278
23324
  checkToolState,
23279
23325
  shouldDispatch,
23326
+ retryDispatchFailure,
23280
23327
  dispatch
23281
23328
  } = args;
23282
23329
  const existing = getActiveReservation(sessionID);
@@ -23331,7 +23378,9 @@ async function dispatchAfterSessionIdle(args) {
23331
23378
  });
23332
23379
  return { status: "active" };
23333
23380
  }
23334
- if (shouldDispatch?.() === false) {
23381
+ const dispatchDecision = shouldDispatch?.();
23382
+ const resolvedDispatchDecision = dispatchDecision !== undefined && typeof dispatchDecision !== "boolean" ? await withDispatchTimeout(dispatchDecision, Math.min(dispatchTimeoutMs, getPromptGateRevalidationTimeoutMs()), `[prompt-async-gate] ${sessionName} shouldDispatch`) : dispatchDecision;
23383
+ if (resolvedDispatchDecision === false) {
23335
23384
  log(`[prompt-async-gate] ${sessionName} cancelled before dispatch`, { sessionID, source });
23336
23385
  return { status: "cancelled" };
23337
23386
  }
@@ -23347,6 +23396,7 @@ async function dispatchAfterSessionIdle(args) {
23347
23396
  log(`[prompt-async-gate] ${sessionName} dispatched`, { sessionID, source });
23348
23397
  return { status: "dispatched", response };
23349
23398
  } catch (error51) {
23399
+ const queueRetryable = dispatchAttempted && retryDispatchFailure?.(error51) === true;
23350
23400
  if (dispatchAttempted) {
23351
23401
  rememberRecentPromptDispatch({
23352
23402
  sessionID,
@@ -23357,7 +23407,12 @@ async function dispatchAfterSessionIdle(args) {
23357
23407
  }
23358
23408
  const errorText = error51 instanceof Error ? `${error51.name}: ${error51.message}` : String(error51);
23359
23409
  log(`[prompt-async-gate] ${sessionName} failed`, { sessionID, source, error: errorText });
23360
- return { status: "failed", error: error51, dispatchAttempted };
23410
+ return {
23411
+ status: "failed",
23412
+ error: error51,
23413
+ dispatchAttempted,
23414
+ ...queueRetryable ? { queueRetryable: true } : {}
23415
+ };
23361
23416
  } finally {
23362
23417
  finishPromptReservation(sessionID, reservation, dispatchAttempted, postDispatchHoldMs);
23363
23418
  }
@@ -23419,6 +23474,7 @@ function schedulePromptQueueDrain(sessionID, delayMs) {
23419
23474
  promptQueueTimers.set(sessionID, timer);
23420
23475
  }
23421
23476
  function removePromptQueueEntry(sessionID, entry) {
23477
+ promptQueueRetryStates.delete(entry.id);
23422
23478
  const queue = promptQueues.get(sessionID);
23423
23479
  if (!queue) {
23424
23480
  return;
@@ -23448,6 +23504,7 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23448
23504
  promptQueueDraining.add(sessionID);
23449
23505
  clearPromptQueueTimer(sessionID);
23450
23506
  let awaitedResult;
23507
+ const deferredRetryIds = new Set;
23451
23508
  try {
23452
23509
  while (true) {
23453
23510
  const queue = promptQueues.get(sessionID);
@@ -23455,6 +23512,20 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23455
23512
  if (!entry) {
23456
23513
  break;
23457
23514
  }
23515
+ const retryState = promptQueueRetryStates.get(entry.id);
23516
+ if (entry.durableRetry && retryState?.retryAfter !== undefined && retryState.retryAfter > Date.now()) {
23517
+ if (deferredRetryIds.has(entry.id)) {
23518
+ const nextRetryAt = Math.min(...queue.flatMap((queued) => {
23519
+ const retryAfter = promptQueueRetryStates.get(queued.id)?.retryAfter;
23520
+ return retryAfter === undefined ? [] : [retryAfter];
23521
+ }));
23522
+ schedulePromptQueueDrain(sessionID, nextRetryAt - Date.now());
23523
+ break;
23524
+ }
23525
+ deferredRetryIds.add(entry.id);
23526
+ setPromptQueue(sessionID, [...queue.slice(1), entry]);
23527
+ continue;
23528
+ }
23458
23529
  promptQueueInFlight.set(sessionID, entry);
23459
23530
  const result = await dispatchAfterSessionIdle({
23460
23531
  sessionName: entry.sessionName,
@@ -23470,12 +23541,45 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23470
23541
  checkStatus: entry.checkStatus,
23471
23542
  checkToolState: entry.checkToolState,
23472
23543
  shouldDispatch: entry.shouldDispatch,
23544
+ retryDispatchFailure: entry.retryDispatchFailure,
23473
23545
  dispatch: entry.dispatch
23474
23546
  });
23475
23547
  if (promptQueueInFlight.get(sessionID)?.id === entry.id) {
23476
23548
  promptQueueInFlight.delete(sessionID);
23477
23549
  }
23478
- if (result.status === "active" || result.status === "reserved") {
23550
+ const retryableQueuedFailure = result.status === "failed" && (!result.dispatchAttempted || result.queueRetryable === true);
23551
+ if (retryableQueuedFailure) {
23552
+ const failureCount = (promptQueueRetryStates.get(entry.id)?.failureCount ?? 0) + 1;
23553
+ if (entry.durableRetry) {
23554
+ const exponentialBackoffMs = entry.queueRetryMs * 2 ** Math.min(failureCount, 7);
23555
+ const retryDelayMs = Math.max(entry.postDispatchHoldMs, Math.min(exponentialBackoffMs, MAX_DURABLE_RETRY_BACKOFF_MS));
23556
+ promptQueueRetryStates.set(entry.id, {
23557
+ failureCount,
23558
+ retryAfter: Date.now() + retryDelayMs
23559
+ });
23560
+ const currentQueue = promptQueues.get(sessionID);
23561
+ if (currentQueue && currentQueue.length > 1) {
23562
+ setPromptQueue(sessionID, [...currentQueue.slice(1), entry]);
23563
+ continue;
23564
+ }
23565
+ schedulePromptQueueDrain(sessionID, retryDelayMs);
23566
+ break;
23567
+ }
23568
+ if (failureCount >= MAX_QUEUED_RETRYABLE_FAILURES) {
23569
+ log("[prompt-async-gate] dropping queued prompt after repeated retryable failures", {
23570
+ sessionID,
23571
+ source: entry.source,
23572
+ failureCount
23573
+ });
23574
+ removePromptQueueEntry(sessionID, entry);
23575
+ if (awaitedEntry?.id === entry.id) {
23576
+ awaitedResult = result;
23577
+ }
23578
+ continue;
23579
+ }
23580
+ promptQueueRetryStates.set(entry.id, { failureCount });
23581
+ }
23582
+ if (result.status === "active" || result.status === "reserved" || retryableQueuedFailure) {
23479
23583
  const queued = queuedResult(entry, 1, result.status === "reserved" ? result.reservedBy : entry.source);
23480
23584
  if (awaitedEntry?.id === entry.id) {
23481
23585
  awaitedResult = queued;
@@ -23536,7 +23640,7 @@ async function enqueueInternalPrompt(entry) {
23536
23640
  const result = await drainPromptQueue(entry.sessionID, entry);
23537
23641
  return result ?? queuedResult(entry, 1);
23538
23642
  }
23539
- var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueSequence = 0;
23643
+ var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueRetryStates, MAX_QUEUED_RETRYABLE_FAILURES = 3, MAX_DURABLE_RETRY_BACKOFF_MS = 30000, promptQueueSequence = 0;
23540
23644
  var init_queue = __esm(() => {
23541
23645
  init_session_idle_dispatch();
23542
23646
  init_reservations();
@@ -23544,6 +23648,7 @@ var init_queue = __esm(() => {
23544
23648
  promptQueueDraining = new Set;
23545
23649
  promptQueueInFlight = new Map;
23546
23650
  promptQueueTimers = new Map;
23651
+ promptQueueRetryStates = new Map;
23547
23652
  setExpiredReservationHandler((sessionID) => {
23548
23653
  schedulePromptQueueDrain(sessionID, 0);
23549
23654
  });
@@ -23791,6 +23896,7 @@ async function dispatchInternalPrompt(args) {
23791
23896
  checkStatus: args.checkStatus !== false,
23792
23897
  checkToolState: args.checkToolState !== false,
23793
23898
  shouldDispatch: args.shouldDispatch,
23899
+ retryDispatchFailure: args.retryDispatchFailure,
23794
23900
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23795
23901
  });
23796
23902
  if (deferResult.status === "failed" && resolved.route === "live" && deferResult.error instanceof Error && deferResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -23818,7 +23924,9 @@ async function dispatchInternalPrompt(args) {
23818
23924
  queueRetryMs,
23819
23925
  checkStatus: args.checkStatus !== false,
23820
23926
  checkToolState: args.checkToolState !== false,
23927
+ durableRetry: args.durableRetry === true,
23821
23928
  shouldDispatch: args.shouldDispatch,
23929
+ retryDispatchFailure: args.retryDispatchFailure,
23822
23930
  dispatch: async (_dispatchInput) => dispatchWithPathCompatibility(dispatch, input)
23823
23931
  });
23824
23932
  }
@@ -23840,6 +23948,7 @@ async function dispatchInternalPrompt(args) {
23840
23948
  checkStatus: args.checkStatus !== false,
23841
23949
  checkToolState: args.checkToolState !== false,
23842
23950
  shouldDispatch: args.shouldDispatch,
23951
+ retryDispatchFailure: args.retryDispatchFailure,
23843
23952
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23844
23953
  });
23845
23954
  if (directResult.status === "failed" && resolved.route === "live" && directResult.error instanceof Error && directResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -26052,7 +26161,7 @@ var init_resolve_agent_definition_paths = __esm(() => {
26052
26161
  // packages/omo-opencode/src/shared/opencode-version.ts
26053
26162
  import { execSync } from "child_process";
26054
26163
  import { existsSync as existsSync9, readFileSync as readFileSync3, realpathSync as realpathSync4 } from "fs";
26055
- import { dirname as dirname6, join as join13 } from "path";
26164
+ import { dirname as dirname7, join as join13 } from "path";
26056
26165
  function parseVersion(version2) {
26057
26166
  const cleaned = version2.replace(/^v/, "").split("-")[0];
26058
26167
  return cleaned.split(".").map((n) => parseInt(n, 10) || 0);
@@ -26093,7 +26202,7 @@ function parsePackageVersion(content) {
26093
26202
  function getPackageVersionFromBinary(binaryPath, deps) {
26094
26203
  try {
26095
26204
  const realBinaryPath = deps.realpath(binaryPath);
26096
- const packagePath = join13(dirname6(dirname6(realBinaryPath)), "package.json");
26205
+ const packagePath = join13(dirname7(dirname7(realBinaryPath)), "package.json");
26097
26206
  if (!deps.exists(packagePath))
26098
26207
  return null;
26099
26208
  return parsePackageVersion(deps.readText(packagePath));
@@ -26331,10 +26440,10 @@ import {
26331
26440
  } from "node:fs";
26332
26441
  function writeFileAtomically2(filePath, content, deps = {}) {
26333
26442
  const tempPath = `${filePath}.tmp`;
26334
- const mode = deps.mode;
26335
- writeFileSync3(tempPath, content, { encoding: "utf-8", mode });
26336
- if (mode !== undefined) {
26337
- chmodSync2(tempPath, mode);
26443
+ const mode2 = deps.mode;
26444
+ writeFileSync3(tempPath, content, { encoding: "utf-8", mode: mode2 });
26445
+ if (mode2 !== undefined) {
26446
+ chmodSync2(tempPath, mode2);
26338
26447
  }
26339
26448
  const tempFileDescriptor = openSync2(tempPath, "r+");
26340
26449
  try {
@@ -26355,8 +26464,8 @@ function writeFileAtomically2(filePath, content, deps = {}) {
26355
26464
  throw error51;
26356
26465
  }
26357
26466
  }
26358
- if (mode !== undefined) {
26359
- chmodSync2(filePath, mode);
26467
+ if (mode2 !== undefined) {
26468
+ chmodSync2(filePath, mode2);
26360
26469
  }
26361
26470
  }
26362
26471
  var init_write_file_atomically = __esm(() => {
@@ -83748,7 +83857,17 @@ function isPreSendConnectionFailure2(error51) {
83748
83857
  if (error51.name === "AbortError") {
83749
83858
  return false;
83750
83859
  }
83751
- const CONNECTION_CODES = new Set(["ECONNREFUSED", "ENOTFOUND", "EAI_AGAIN"]);
83860
+ const CONNECTION_CODES = new Set([
83861
+ "ECONNREFUSED",
83862
+ "ENOTFOUND",
83863
+ "EAI_AGAIN",
83864
+ "ENETUNREACH",
83865
+ "EHOSTUNREACH",
83866
+ "ENETDOWN",
83867
+ "EHOSTDOWN",
83868
+ "EADDRNOTAVAIL",
83869
+ "UND_ERR_CONNECT_TIMEOUT"
83870
+ ]);
83752
83871
  const self = error51;
83753
83872
  if (self.code && CONNECTION_CODES.has(self.code)) {
83754
83873
  return true;
@@ -83760,12 +83879,6 @@ function isPreSendConnectionFailure2(error51) {
83760
83879
  return true;
83761
83880
  }
83762
83881
  }
83763
- if (error51 instanceof TypeError) {
83764
- const msg = error51.message;
83765
- if (msg.includes("fetch failed") || msg.includes("Unable to connect")) {
83766
- return true;
83767
- }
83768
- }
83769
83882
  return false;
83770
83883
  }
83771
83884
  function markLiveRouteUnavailable2(reason) {
@@ -84363,7 +84476,7 @@ var init_plugin_name_with_version = __esm(() => {
84363
84476
 
84364
84477
  // packages/omo-opencode/src/cli/config-manager/backup-config.ts
84365
84478
  import { copyFileSync as copyFileSync2, existsSync as existsSync16, mkdirSync as mkdirSync6 } from "node:fs";
84366
- import { dirname as dirname7 } from "node:path";
84479
+ import { dirname as dirname8 } from "node:path";
84367
84480
  function backupConfigFile(configPath) {
84368
84481
  if (!existsSync16(configPath)) {
84369
84482
  return { success: true };
@@ -84371,7 +84484,7 @@ function backupConfigFile(configPath) {
84371
84484
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
84372
84485
  const backupPath = `${configPath}.backup-${timestamp}`;
84373
84486
  try {
84374
- const dir = dirname7(backupPath);
84487
+ const dir = dirname8(backupPath);
84375
84488
  if (!existsSync16(dir)) {
84376
84489
  mkdirSync6(dir, { recursive: true });
84377
84490
  }
@@ -84569,7 +84682,7 @@ function extractVersionFromPluginEntry(entry) {
84569
84682
 
84570
84683
  // packages/omo-opencode/src/cli/config-manager/add-plugin-to-opencode-config.ts
84571
84684
  import { existsSync as existsSync19, readdirSync as readdirSync4, readFileSync as readFileSync8, writeFileSync as writeFileSync5 } from "node:fs";
84572
- import { basename as basename3, dirname as dirname8, join as join21 } from "node:path";
84685
+ import { basename as basename3, dirname as dirname9, join as join21 } from "node:path";
84573
84686
  function detectConfigFormatInDir(configDir) {
84574
84687
  const configJsonc = join21(configDir, "opencode.jsonc");
84575
84688
  const configJson = join21(configDir, "opencode.json");
@@ -84582,10 +84695,10 @@ function detectConfigFormatInDir(configDir) {
84582
84695
  return { format: "none", path: configJson };
84583
84696
  }
84584
84697
  function getParentConfigDirForProfile(configDir) {
84585
- const parentDir = dirname8(configDir);
84698
+ const parentDir = dirname9(configDir);
84586
84699
  if (basename3(parentDir) !== "profiles")
84587
84700
  return null;
84588
- return dirname8(parentDir);
84701
+ return dirname9(parentDir);
84589
84702
  }
84590
84703
  function listProfileConfigDirs(rootConfigDir) {
84591
84704
  const profilesDir = join21(rootConfigDir, "profiles");
@@ -86719,7 +86832,7 @@ var init_env2 = __esm(() => {
86719
86832
  });
86720
86833
 
86721
86834
  // node_modules/.bun/posthog-node@5.51.1/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
86722
- import { dirname as dirname17, posix as posix7, sep as sep7 } from "path";
86835
+ import { dirname as dirname18, posix as posix7, sep as sep7 } from "path";
86723
86836
  function createModulerModifier() {
86724
86837
  const getModuleFromFileName = createGetModuleFromFilename();
86725
86838
  return async (frames) => {
@@ -86728,7 +86841,7 @@ function createModulerModifier() {
86728
86841
  return frames;
86729
86842
  };
86730
86843
  }
86731
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname17(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
86844
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname18(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
86732
86845
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
86733
86846
  return (filename) => {
86734
86847
  if (!filename)
@@ -92062,7 +92175,7 @@ function splitNodeOptions(nodeOptions) {
92062
92175
  return args;
92063
92176
  }
92064
92177
  function findUnhandledRejectionMode(args) {
92065
- let mode;
92178
+ let mode2;
92066
92179
  for (let index = 0;index < args.length; index++) {
92067
92180
  const argument = args[index];
92068
92181
  const optionName = UNHANDLED_REJECTION_OPTION_NAMES.find((name) => argument === name || argument.startsWith(`${name}=`));
@@ -92070,9 +92183,9 @@ function findUnhandledRejectionMode(args) {
92070
92183
  continue;
92071
92184
  const value = argument === optionName ? args[++index] : argument.slice(optionName.length + 1);
92072
92185
  if (UNHANDLED_REJECTION_MODES.has(value))
92073
- mode = value;
92186
+ mode2 = value;
92074
92187
  }
92075
- return mode;
92188
+ return mode2;
92076
92189
  }
92077
92190
  function getUnhandledRejectionMode(execArgv = STARTUP_EXEC_ARGV, nodeOptions = STARTUP_NODE_OPTIONS) {
92078
92191
  return findUnhandledRejectionMode(execArgv) ?? findUnhandledRejectionMode(splitNodeOptions(nodeOptions ?? "")) ?? "throw";
@@ -92098,17 +92211,17 @@ function makeUncaughtExceptionHandler(captureFn, onFatalFn) {
92098
92211
  _posthogErrorHandler: true
92099
92212
  });
92100
92213
  }
92101
- function addUncaughtExceptionListener(captureFn, onFatalFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
92214
+ function addUncaughtExceptionListener(captureFn, onFatalFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
92102
92215
  const process4 = globalThis.process;
92103
92216
  if (!process4)
92104
92217
  return;
92105
- if (mode === "strict")
92218
+ if (mode2 === "strict")
92106
92219
  return void process4.on("uncaughtExceptionMonitor", (error51, origin) => captureUncaughtException(captureFn, error51, origin));
92107
92220
  process4.on("uncaughtException", makeUncaughtExceptionHandler(captureFn, onFatalFn));
92108
92221
  }
92109
- function addUnhandledRejectionListener(captureFn, mode = STARTUP_UNHANDLED_REJECTION_MODE) {
92222
+ function addUnhandledRejectionListener(captureFn, mode2 = STARTUP_UNHANDLED_REJECTION_MODE) {
92110
92223
  const process4 = globalThis.process;
92111
- if (!process4 || mode === "throw" || mode === "strict" || mode === "warn-with-error-code")
92224
+ if (!process4 || mode2 === "throw" || mode2 === "strict" || mode2 === "warn-with-error-code")
92112
92225
  return;
92113
92226
  process4.on("unhandledRejection", (reason) => {
92114
92227
  captureFn(reason, {
@@ -94333,7 +94446,7 @@ var package_default2;
94333
94446
  var init_package2 = __esm(() => {
94334
94447
  package_default2 = {
94335
94448
  name: "@oh-my-opencode/omo-codex",
94336
- version: "5.0.0-beta.25",
94449
+ version: "5.0.0-beta.26",
94337
94450
  type: "module",
94338
94451
  private: true,
94339
94452
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -95303,19 +95416,19 @@ var init_update_toasts = __esm(() => {
95303
95416
 
95304
95417
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
95305
95418
  import { existsSync as existsSync48 } from "node:fs";
95306
- import { dirname as dirname30, join as join76 } from "node:path";
95419
+ import { dirname as dirname31, join as join76 } from "node:path";
95307
95420
  import { fileURLToPath as fileURLToPath5 } from "node:url";
95308
95421
  function defaultGetModuleHostingWorkspace() {
95309
95422
  try {
95310
- const currentDir = dirname30(fileURLToPath5(import.meta.url));
95423
+ const currentDir = dirname31(fileURLToPath5(import.meta.url));
95311
95424
  const pkgJsonPath = findPackageJsonUp(currentDir);
95312
95425
  if (!pkgJsonPath)
95313
95426
  return null;
95314
- const pkgDir = dirname30(pkgJsonPath);
95315
- const nodeModulesDir = dirname30(pkgDir);
95427
+ const pkgDir = dirname31(pkgJsonPath);
95428
+ const nodeModulesDir = dirname31(pkgDir);
95316
95429
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
95317
95430
  return null;
95318
- return dirname30(nodeModulesDir);
95431
+ return dirname31(nodeModulesDir);
95319
95432
  } catch (error51) {
95320
95433
  if (error51 instanceof Error) {
95321
95434
  return null;
@@ -97864,9 +97977,9 @@ function formatConfigSummary(config3) {
97864
97977
  `);
97865
97978
  }
97866
97979
  function printHeader(isUpdate) {
97867
- const mode = isUpdate ? "Update" : "Install";
97980
+ const mode2 = isUpdate ? "Update" : "Install";
97868
97981
  console.log();
97869
- console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode} `)));
97982
+ console.log(import_picocolors.default.bgMagenta(import_picocolors.default.white(` oMoMoMoMo... ${mode2} `)));
97870
97983
  console.log();
97871
97984
  }
97872
97985
  function printStep(step, total, message) {
@@ -98145,7 +98258,7 @@ function windowsCommandShim(targetPath) {
98145
98258
 
98146
98259
  // packages/omo-codex/src/install/codex-cache-dangling-bins.ts
98147
98260
  import { lstat as lstat2, readFile, readdir, readlink, rm, stat } from "node:fs/promises";
98148
- import { dirname as dirname9, isAbsolute, join as join23, resolve as resolve5 } from "node:path";
98261
+ import { dirname as dirname10, isAbsolute, join as join23, resolve as resolve5 } from "node:path";
98149
98262
 
98150
98263
  // packages/omo-codex/src/install/codex-cache-fs.ts
98151
98264
  import { lstat } from "node:fs/promises";
@@ -98192,7 +98305,7 @@ async function removeDanglingManagedSymlink(linkPath) {
98192
98305
  if (!linkStat.isSymbolicLink())
98193
98306
  return;
98194
98307
  const linkTarget = await readlink(linkPath);
98195
- const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname9(linkPath), linkTarget);
98308
+ const target = isAbsolute(linkTarget) ? linkTarget : resolve5(dirname10(linkPath), linkTarget);
98196
98309
  if (!await isFileSystemEntry(target) && isManagedComponentBinTarget(target))
98197
98310
  await rm(linkPath, { force: true });
98198
98311
  } catch (error51) {
@@ -98654,11 +98767,11 @@ async function existingNonSymlink(path7) {
98654
98767
  }
98655
98768
  // packages/omo-codex/src/install/codex-cache-install.ts
98656
98769
  import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "node:fs/promises";
98657
- import { basename as basename5, dirname as dirname12, join as join32, sep as sep5 } from "node:path";
98770
+ import { basename as basename5, dirname as dirname13, join as join32, sep as sep5 } from "node:path";
98658
98771
 
98659
98772
  // packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
98660
98773
  import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "node:fs/promises";
98661
- import { dirname as dirname10, join as join27, resolve as resolve7 } from "node:path";
98774
+ import { dirname as dirname11, join as join27, resolve as resolve7 } from "node:path";
98662
98775
  var BUNDLED_MCP_RUNTIMES = [
98663
98776
  {
98664
98777
  label: "Git Bash MCP",
@@ -98693,7 +98806,7 @@ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime4) {
98693
98806
  throw new Error(`missing built ${runtime4.label} dist at ${sourcePath}`);
98694
98807
  }
98695
98808
  const destinationPath = join27(pluginRoot, runtime4.destinationDistFromPlugin);
98696
- await mkdir2(dirname10(destinationPath), { recursive: true });
98809
+ await mkdir2(dirname11(destinationPath), { recursive: true });
98697
98810
  await cp(sourcePath, destinationPath, { recursive: true });
98698
98811
  }
98699
98812
  async function readSourceMcpArgs(path7) {
@@ -98731,7 +98844,7 @@ async function isDirectory(path7) {
98731
98844
  // packages/omo-codex/src/install/codex-cache-local-dependencies.ts
98732
98845
  import { realpathSync as realpathSync6 } from "node:fs";
98733
98846
  import { readFile as readFile5, readdir as readdir3, writeFile as writeFile2 } from "node:fs/promises";
98734
- import { dirname as dirname11, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "node:path";
98847
+ import { dirname as dirname12, isAbsolute as isAbsolute4, join as join29, relative as relative3, resolve as resolve9, sep as sep2 } from "node:path";
98735
98848
 
98736
98849
  // packages/omo-codex/src/install/codex-cache-paths.ts
98737
98850
  import { existsSync as existsSync24, readdirSync as readdirSync6 } from "node:fs";
@@ -98800,7 +98913,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
98800
98913
  const parsed = JSON.parse(raw);
98801
98914
  if (!isPlainRecord4(parsed))
98802
98915
  continue;
98803
- const packageDir = dirname11(packageJsonPath);
98916
+ const packageDir = dirname12(packageJsonPath);
98804
98917
  const sourcePackageDir = join29(sourceRoot, relative3(pluginRoot, packageDir));
98805
98918
  let changed = false;
98806
98919
  for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
@@ -99195,13 +99308,13 @@ function sanitizeNpmInstallEnv(env2) {
99195
99308
  return Object.fromEntries(Object.entries(env2).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
99196
99309
  }
99197
99310
  function createTempSiblingPath(targetPath) {
99198
- return join32(dirname12(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99311
+ return join32(dirname13(targetPath), `.tmp-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99199
99312
  }
99200
99313
  function createBackupSiblingPath(targetPath) {
99201
- return join32(dirname12(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99314
+ return join32(dirname13(targetPath), `.backup-${basename5(targetPath)}-${process.pid}-${Date.now()}`);
99202
99315
  }
99203
99316
  async function copyDirectory(sourcePath, targetPath) {
99204
- await mkdir3(dirname12(targetPath), { recursive: true });
99317
+ await mkdir3(dirname13(targetPath), { recursive: true });
99205
99318
  await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
99206
99319
  }
99207
99320
  async function promoteDirectory(tempPath, targetPath, renameDirectory) {
@@ -99300,20 +99413,20 @@ async function copyRootRuntimeDists(input) {
99300
99413
  const sourcePath = join32(repoRoot, runtimePath);
99301
99414
  if (!await fileExistsStrict(join32(sourcePath, "index.js")))
99302
99415
  continue;
99303
- await mkdir3(dirname12(join32(input.pluginRoot, runtimePath)), { recursive: true });
99416
+ await mkdir3(dirname13(join32(input.pluginRoot, runtimePath)), { recursive: true });
99304
99417
  await cp2(sourcePath, join32(input.pluginRoot, runtimePath), { recursive: true });
99305
99418
  }
99306
99419
  }
99307
99420
  function repoRootForCodexPluginSource(sourcePath) {
99308
- const codexPackageRoot = dirname12(sourcePath);
99309
- const packagesRoot = dirname12(codexPackageRoot);
99421
+ const codexPackageRoot = dirname13(sourcePath);
99422
+ const packagesRoot = dirname13(codexPackageRoot);
99310
99423
  if (basename5(sourcePath) !== "plugin")
99311
99424
  return null;
99312
99425
  if (basename5(codexPackageRoot) !== "omo-codex")
99313
99426
  return null;
99314
99427
  if (basename5(packagesRoot) !== "packages")
99315
99428
  return null;
99316
- return dirname12(packagesRoot);
99429
+ return dirname13(packagesRoot);
99317
99430
  }
99318
99431
  // packages/omo-codex/src/install/codex-cache-prune.ts
99319
99432
  import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "node:fs/promises";
@@ -99444,7 +99557,7 @@ async function shouldBuildSourcePackages(repoRoot) {
99444
99557
 
99445
99558
  // packages/omo-codex/src/install/codex-config-toml.ts
99446
99559
  import { mkdir as mkdir5, readFile as readFile11 } from "node:fs/promises";
99447
- import { dirname as dirname15 } from "node:path";
99560
+ import { dirname as dirname16 } from "node:path";
99448
99561
 
99449
99562
  // packages/omo-codex/src/install/toml-section-editor.ts
99450
99563
  function findTomlSection(config3, header) {
@@ -100026,12 +100139,12 @@ function tomlKeySegment(value) {
100026
100139
 
100027
100140
  // packages/omo-codex/src/install/codex-config-atomic-write.ts
100028
100141
  import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "node:fs/promises";
100029
- import { basename as basename6, dirname as dirname13, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "node:path";
100142
+ import { basename as basename6, dirname as dirname14, isAbsolute as isAbsolute5, join as join36, resolve as resolve10 } from "node:path";
100030
100143
  var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
100031
100144
  var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
100032
100145
  async function writeFileAtomic(targetPath, data) {
100033
100146
  const writeTarget = await resolveSymlinkTarget(targetPath);
100034
- const temporaryPath = join36(dirname13(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
100147
+ const temporaryPath = join36(dirname14(writeTarget), `.tmp-${basename6(writeTarget)}-${process.pid}-${Date.now()}`);
100035
100148
  await writeFile5(temporaryPath, data);
100036
100149
  try {
100037
100150
  await renameWithRetry(temporaryPath, writeTarget);
@@ -100060,7 +100173,7 @@ async function resolveSymlinkTarget(targetPath) {
100060
100173
  if (!(error51 instanceof Error))
100061
100174
  throw error51;
100062
100175
  const linkValue = await readlink4(targetPath);
100063
- return isAbsolute5(linkValue) ? linkValue : resolve10(dirname13(targetPath), linkValue);
100176
+ return isAbsolute5(linkValue) ? linkValue : resolve10(dirname14(targetPath), linkValue);
100064
100177
  }
100065
100178
  }
100066
100179
  async function renameWithRetry(fromPath, toPath) {
@@ -100540,14 +100653,14 @@ import { join as join37 } from "node:path";
100540
100653
  var FALLBACK_CODEX_MODEL_CATALOG = {
100541
100654
  current: {
100542
100655
  model: "gpt-5.6-sol",
100543
- modelContextWindow: 372000,
100656
+ modelContextWindow: 650000,
100544
100657
  modelReasoningEffort: "high",
100545
100658
  planModeReasoningEffort: "xhigh"
100546
100659
  },
100547
100660
  managedProfiles: [
100548
100661
  {
100549
100662
  model: "gpt-5.5",
100550
- modelContextWindow: 400000,
100663
+ modelContextWindow: 650000,
100551
100664
  modelReasoningEffort: "high",
100552
100665
  planModeReasoningEffort: "xhigh"
100553
100666
  },
@@ -100645,7 +100758,7 @@ function isRootSetting2(line, key) {
100645
100758
 
100646
100759
  // packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
100647
100760
  import { readFileSync as readFileSync11 } from "node:fs";
100648
- import { dirname as dirname14, isAbsolute as isAbsolute6, join as join38 } from "node:path";
100761
+ import { dirname as dirname15, isAbsolute as isAbsolute6, join as join38 } from "node:path";
100649
100762
  var CODEX_AGENTS_HEADER = "agents";
100650
100763
  var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
100651
100764
  var CODEX_MULTI_AGENT_V2_THREAD_LIMIT_KEY = `${CODEX_MULTI_AGENT_V2_HEADER}.max_concurrent_threads_per_session`;
@@ -100682,8 +100795,8 @@ function resolveCodexMultiAgentVersion(config3, configPath) {
100682
100795
  }
100683
100796
  function resolveCatalogPath(configuredPath, configPath) {
100684
100797
  if (configuredPath === null)
100685
- return join38(dirname14(configPath), "models_cache.json");
100686
- return isAbsolute6(configuredPath) ? configuredPath : join38(dirname14(configPath), configuredPath);
100798
+ return join38(dirname15(configPath), "models_cache.json");
100799
+ return isAbsolute6(configuredPath) ? configuredPath : join38(dirname15(configPath), configuredPath);
100687
100800
  }
100688
100801
  function readCatalogMultiAgentVersion(model, cachePath) {
100689
100802
  let raw;
@@ -100787,7 +100900,7 @@ function readBooleanSetting(sectionText, key) {
100787
100900
 
100788
100901
  // packages/omo-codex/src/install/codex-config-toml.ts
100789
100902
  async function updateCodexConfig(input) {
100790
- await mkdir5(dirname15(input.configPath), { recursive: true });
100903
+ await mkdir5(dirname16(input.configPath), { recursive: true });
100791
100904
  let config3;
100792
100905
  try {
100793
100906
  config3 = await readFile11(input.configPath, "utf8");
@@ -101760,7 +101873,7 @@ var defaultRunCommand = async (command, args, options) => {
101760
101873
 
101761
101874
  // packages/omo-codex/src/install/codex-project-local-cleanup.ts
101762
101875
  import { copyFile as copyFile2, lstat as lstat10, readFile as readFile17, writeFile as writeFile10 } from "node:fs/promises";
101763
- import { dirname as dirname16, join as join46, resolve as resolve11 } from "node:path";
101876
+ import { dirname as dirname17, join as join46, resolve as resolve11 } from "node:path";
101764
101877
  var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
101765
101878
  var PROJECT_LOCAL_ARTIFACT_PATHS = [
101766
101879
  ".codex/hooks.json",
@@ -101880,13 +101993,13 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
101880
101993
  artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
101881
101994
  };
101882
101995
  }
101883
- const parent = dirname16(current);
101996
+ const parent = dirname17(current);
101884
101997
  if (parent === current) {
101885
101998
  const nearestConfigPath = configPathsFromCwd[0];
101886
101999
  return nearestConfigPath === undefined ? null : {
101887
- projectRoot: dirname16(dirname16(nearestConfigPath)),
102000
+ projectRoot: dirname17(dirname17(nearestConfigPath)),
101888
102001
  configPaths: [nearestConfigPath],
101889
- artifactRoots: [dirname16(dirname16(nearestConfigPath))]
102002
+ artifactRoots: [dirname17(dirname17(nearestConfigPath))]
101890
102003
  };
101891
102004
  }
101892
102005
  current = parent;
@@ -101902,7 +102015,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
101902
102015
  function artifactRootsForConfigPaths(configPaths2) {
101903
102016
  const roots = [];
101904
102017
  for (const configPath of configPaths2) {
101905
- const root = dirname16(dirname16(configPath));
102018
+ const root = dirname17(dirname17(configPath));
101906
102019
  if (!roots.includes(root))
101907
102020
  roots.push(root);
101908
102021
  }
@@ -102812,7 +102925,7 @@ import { isAbsolute as isAbsolute11, join as join58, relative as relative6, reso
102812
102925
 
102813
102926
  // packages/omo-codex/src/install/codex-cleanup-bins.ts
102814
102927
  import { lstat as lstat12, readFile as readFile22, readdir as readdir12, readlink as readlink6, rm as rm11 } from "node:fs/promises";
102815
- import { dirname as dirname18, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "node:path";
102928
+ import { dirname as dirname19, isAbsolute as isAbsolute9, join as join56, resolve as resolve14 } from "node:path";
102816
102929
  var ROOT_RUNTIME_BIN_NAME = "omo";
102817
102930
  var MANAGED_CODEX_BIN_NAMES = new Set([
102818
102931
  ROOT_RUNTIME_BIN_NAME,
@@ -102869,7 +102982,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
102869
102982
  if (platform === "win32")
102870
102983
  return false;
102871
102984
  const linkTarget = await readlink6(linkPath);
102872
- const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname18(linkPath), linkTarget);
102985
+ const target = isAbsolute9(linkTarget) ? linkTarget : resolve14(dirname19(linkPath), linkTarget);
102873
102986
  return isManagedComponentBinTarget(target) || isLegacyCodexBinTarget(binName, target);
102874
102987
  }
102875
102988
  if (!entryStat.isFile())
@@ -102880,7 +102993,7 @@ async function isManagedCodexBin(linkPath, platform, binName) {
102880
102993
 
102881
102994
  // packages/omo-codex/src/install/codex-cleanup-config.ts
102882
102995
  import { lstat as lstat13, mkdir as mkdir8, readFile as readFile23, writeFile as writeFile13 } from "node:fs/promises";
102883
- import { dirname as dirname19 } from "node:path";
102996
+ import { dirname as dirname20 } from "node:path";
102884
102997
  var MANAGED_MARKETPLACES = ["sisyphuslabs", "lazycodex", "code-yeongyu-codex-plugins"];
102885
102998
  var LEGACY_MANAGED_CODEX_AGENT_NAMES_TO_PURGE2 = ["codex-ultrawork-reviewer"];
102886
102999
  var CURRENT_MANAGED_CODEX_AGENT_NAMES2 = [
@@ -102917,7 +103030,7 @@ async function cleanupCodexConfig(configPath, now) {
102917
103030
  if (next === original)
102918
103031
  return { changed: false };
102919
103032
  const backupPath = `${configPath}.backup-${formatBackupTimestamp2(now?.() ?? new Date)}`;
102920
- await mkdir8(dirname19(configPath), { recursive: true });
103033
+ await mkdir8(dirname20(configPath), { recursive: true });
102921
103034
  await writeFile13(backupPath, original);
102922
103035
  await writeFile13(configPath, `${next.trimEnd()}
102923
103036
  `);
@@ -102996,10 +103109,10 @@ function nodeErrorCode5(error51) {
102996
103109
  }
102997
103110
 
102998
103111
  // packages/omo-codex/src/install/codex-cleanup-safety.ts
102999
- import { dirname as dirname20, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "node:path";
103112
+ import { dirname as dirname21, isAbsolute as isAbsolute10, join as join57, relative as relative5, resolve as resolve15 } from "node:path";
103000
103113
  function codexHomeResolvesToFilesystemRoot(codexHome) {
103001
103114
  const resolved = resolve15(codexHome);
103002
- return dirname20(resolved) === resolved;
103115
+ return dirname21(resolved) === resolved;
103003
103116
  }
103004
103117
  function validateManagedCleanupTarget(input) {
103005
103118
  if (!isAbsolute10(input.path))
@@ -103262,7 +103375,7 @@ var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", ".
103262
103375
  import { execFile as execFile4 } from "node:child_process";
103263
103376
  import { existsSync as existsSync32 } from "node:fs";
103264
103377
  import { homedir as homedir11 } from "node:os";
103265
- import { dirname as dirname24, join as join63, resolve as resolve20 } from "node:path";
103378
+ import { dirname as dirname25, join as join63, resolve as resolve20 } from "node:path";
103266
103379
  import { fileURLToPath } from "node:url";
103267
103380
  import { promisify as promisify3 } from "node:util";
103268
103381
 
@@ -103293,9 +103406,9 @@ function resolveAgentHome(options) {
103293
103406
  }
103294
103407
 
103295
103408
  // packages/omo-senpi/src/install/local-launcher.ts
103296
- import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync, writeFileSync as writeFileSync6 } from "node:fs";
103409
+ import { chmodSync as chmodSync3, existsSync as existsSync31, mkdirSync as mkdirSync10, readFileSync as readFileSync14, rmSync as rmSync2, writeFileSync as writeFileSync6 } from "node:fs";
103297
103410
  import { homedir as homedir10 } from "node:os";
103298
- import { dirname as dirname21, join as join60, resolve as resolve18 } from "node:path";
103411
+ import { dirname as dirname22, join as join60, resolve as resolve18 } from "node:path";
103299
103412
  var MARKER = "omo-local-launcher";
103300
103413
  function localLauncherPath(homeDir = homedir10()) {
103301
103414
  return join60(homeDir, ".local", "bin", "omo");
@@ -103366,7 +103479,7 @@ function installLocalLauncher(options) {
103366
103479
  const path7 = localLauncherPath(options.homeDir);
103367
103480
  if (existsSync31(path7) && !readFileSync14(path7, "utf8").includes(MARKER))
103368
103481
  return;
103369
- mkdirSync10(dirname21(path7), { recursive: true });
103482
+ mkdirSync10(dirname22(path7), { recursive: true });
103370
103483
  writeFileSync6(path7, renderLocalLauncher(options));
103371
103484
  chmodSync3(path7, 493);
103372
103485
  if ((options.platform ?? process.platform) === "win32") {
@@ -103381,12 +103494,12 @@ node "%~dp0omo" %*\r
103381
103494
  import { createHash as createHash5 } from "node:crypto";
103382
103495
  import { constants as constants9 } from "node:fs";
103383
103496
  import { access as access2, readFile as readFile26, stat as stat6 } from "node:fs/promises";
103384
- import { dirname as dirname23, join as join62 } from "node:path";
103497
+ import { dirname as dirname24, join as join62 } from "node:path";
103385
103498
 
103386
103499
  // packages/omo-senpi/src/install/senpi-settings.ts
103387
103500
  import { constants as constants8 } from "node:fs";
103388
103501
  import { access, copyFile as copyFile3, mkdir as mkdir9, readFile as readFile25, rename as rename5, writeFile as writeFile14 } from "node:fs/promises";
103389
- import { dirname as dirname22, join as join61, resolve as resolve19 } from "node:path";
103502
+ import { dirname as dirname23, join as join61, resolve as resolve19 } from "node:path";
103390
103503
  var OMO_SENPI_PACKAGE_NAME = "@code-yeongyu/omo-senpi";
103391
103504
  var LEGACY_BUILTIN_SHADOW_PACKAGES = [
103392
103505
  join61("packages", "pi-goal"),
@@ -103433,7 +103546,7 @@ async function removeSupersededOmoPackages(packages, currentPluginPath, agentDir
103433
103546
  return entries.filter((entry) => entry !== undefined);
103434
103547
  }
103435
103548
  async function writeSettingsAtomically(settingsPath, settings) {
103436
- await mkdir9(dirname22(settingsPath), { recursive: true });
103549
+ await mkdir9(dirname23(settingsPath), { recursive: true });
103437
103550
  const backupPath = await nextBackupPath(settingsPath);
103438
103551
  if (await fileExists(settingsPath)) {
103439
103552
  await copyFile3(settingsPath, backupPath);
@@ -103553,7 +103666,7 @@ async function hasMissingPluginArtifact(pluginPath) {
103553
103666
  }
103554
103667
  async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
103555
103668
  const runtimeEntry = join62(pluginPath, "runtime", "ast-grep-mcp", "cli.js");
103556
- const manifestPath = join62(dirname23(runtimeEntry), "manifest.json");
103669
+ const manifestPath = join62(dirname24(runtimeEntry), "manifest.json");
103557
103670
  let runtimeStat;
103558
103671
  try {
103559
103672
  runtimeStat = await stat6(runtimeEntry);
@@ -103643,7 +103756,7 @@ async function runSenpiInstaller(options = {}) {
103643
103756
  function resolveInstallContext(options) {
103644
103757
  const env3 = options.env ?? process.env;
103645
103758
  const allowBuild = options.pluginPath === undefined;
103646
- const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname24(fileURLToPath(import.meta.url))) : dirname24(resolve20(options.pluginPath))));
103759
+ const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
103647
103760
  const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env: env3, homeDir: env3.HOME ?? homedir11() }));
103648
103761
  const pluginPath = resolve20(options.pluginPath ?? join63(repoRoot, "packages", "omo-senpi", "plugin"));
103649
103762
  return {
@@ -107647,7 +107760,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
107647
107760
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
107648
107761
  init_bun_which_shim();
107649
107762
  init_spawn_with_windows_hide();
107650
- import { delimiter as delimiter2, dirname as dirname25, posix as posix9, win32 as win325 } from "node:path";
107763
+ import { delimiter as delimiter2, dirname as dirname26, posix as posix9, win32 as win325 } from "node:path";
107651
107764
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
107652
107765
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
107653
107766
  function getCommandCandidates(platform) {
@@ -107705,7 +107818,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe2 = ca
107705
107818
  return null;
107706
107819
  }
107707
107820
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
107708
- const preferredDir = dirname25(binaryPath);
107821
+ const preferredDir = dirname26(binaryPath);
107709
107822
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
107710
107823
  return [preferredDir, ...existing].join(delimiter2);
107711
107824
  }
@@ -108483,7 +108596,7 @@ init_state();
108483
108596
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
108484
108597
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
108485
108598
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
108486
- import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync2, writeFileSync as writeFileSync7 } from "node:fs";
108599
+ import { existsSync as existsSync40, mkdirSync as mkdirSync12, readFileSync as readFileSync20, rmSync as rmSync3, writeFileSync as writeFileSync7 } from "node:fs";
108487
108600
  import { join as join68 } from "node:path";
108488
108601
  function getMarkerPath(directory, sessionID) {
108489
108602
  return join68(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
@@ -108663,7 +108776,7 @@ init_agent_display_names();
108663
108776
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
108664
108777
  init_frontmatter2();
108665
108778
  import { existsSync as existsSync41, readFileSync as readFileSync22, writeFileSync as writeFileSync8, unlinkSync as unlinkSync6, mkdirSync as mkdirSync13 } from "node:fs";
108666
- import { dirname as dirname26, join as join70 } from "node:path";
108779
+ import { dirname as dirname27, join as join70 } from "node:path";
108667
108780
 
108668
108781
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
108669
108782
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -110505,8 +110618,8 @@ function getCategoryEffectiveVariant(categoryName, requirement, config4) {
110505
110618
  }
110506
110619
 
110507
110620
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
110508
- function formatCapabilityResolutionLabel(mode) {
110509
- return mode ?? "unknown";
110621
+ function formatCapabilityResolutionLabel(mode2) {
110622
+ return mode2 ?? "unknown";
110510
110623
  }
110511
110624
  function buildModelResolutionDetails(options) {
110512
110625
  const details = [];
@@ -110624,8 +110737,8 @@ function collectCapabilityResolutionIssues(info) {
110624
110737
  const issues = [];
110625
110738
  const allEntries = [...info.agents, ...info.categories];
110626
110739
  const fallbackEntries = allEntries.filter((entry) => {
110627
- const mode = entry.capabilityDiagnostics?.resolutionMode;
110628
- return mode === "unknown";
110740
+ const mode2 = entry.capabilityDiagnostics?.resolutionMode;
110741
+ return mode2 === "unknown";
110629
110742
  });
110630
110743
  if (fallbackEntries.length === 0) {
110631
110744
  return issues;
@@ -110901,7 +111014,7 @@ init_src2();
110901
111014
  import { existsSync as existsSync55 } from "node:fs";
110902
111015
  import { createRequire as createRequire4 } from "node:module";
110903
111016
  import { homedir as homedir19 } from "node:os";
110904
- import { dirname as dirname31, join as join83 } from "node:path";
111017
+ import { dirname as dirname32, join as join83 } from "node:path";
110905
111018
 
110906
111019
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
110907
111020
  import { join as join82 } from "path";
@@ -110998,7 +111111,7 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
110998
111111
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
110999
111112
  const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
111000
111113
  try {
111001
- const packageDir = baseDirOverride ?? dirname31(resolvePackageJsonPath());
111114
+ const packageDir = baseDirOverride ?? dirname32(resolvePackageJsonPath());
111002
111115
  const vendorPath = join83(packageDir, "vendor", platformKey, binaryName);
111003
111116
  if (existsSync55(vendorPath))
111004
111117
  return vendorPath;
@@ -111150,7 +111263,7 @@ async function getGhCliInfo(dependencies = {}) {
111150
111263
  init_zod();
111151
111264
  init_opencode_config_dir();
111152
111265
  import { existsSync as existsSync56, readFileSync as readFileSync35 } from "node:fs";
111153
- import { delimiter as delimiter3, dirname as dirname32, resolve as resolve23 } from "node:path";
111266
+ import { delimiter as delimiter3, dirname as dirname33, resolve as resolve23 } from "node:path";
111154
111267
  import { fileURLToPath as fileURLToPath7 } from "node:url";
111155
111268
 
111156
111269
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -111281,7 +111394,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
111281
111394
  ].join(";");
111282
111395
  function getModuleDirectory(moduleUrl) {
111283
111396
  try {
111284
- return dirname32(fileURLToPath7(moduleUrl));
111397
+ return dirname33(fileURLToPath7(moduleUrl));
111285
111398
  } catch (error51) {
111286
111399
  if (!(error51 instanceof Error))
111287
111400
  throw error51;
@@ -112014,7 +112127,7 @@ async function pathExists2(path15) {
112014
112127
  init_src2();
112015
112128
  import { readdir as readdir15, readFile as readFile28, stat as stat7 } from "node:fs/promises";
112016
112129
  import { homedir as homedir23 } from "node:os";
112017
- import { dirname as dirname33, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
112130
+ import { dirname as dirname34, isAbsolute as isAbsolute13, join as join86, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
112018
112131
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
112019
112132
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
112020
112133
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
@@ -112088,7 +112201,7 @@ async function auditBundleTargets(pluginRoot) {
112088
112201
  const manifest2 = await readJson2(manifestPath);
112089
112202
  if (manifest2 === null || !isRecord13(manifest2["mcpServers"]))
112090
112203
  continue;
112091
- const manifestRoot = dirname33(manifestPath);
112204
+ const manifestRoot = dirname34(manifestPath);
112092
112205
  const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
112093
112206
  for (const server2 of Object.values(manifest2["mcpServers"])) {
112094
112207
  if (!isRecord13(server2) || !Array.isArray(server2["args"]))
@@ -112109,7 +112222,7 @@ async function auditBundleTargets(pluginRoot) {
112109
112222
  continue;
112110
112223
  const commands2 = [];
112111
112224
  collectHookCommands(manifest2, commands2);
112112
- const hookPluginRoot = dirname33(dirname33(hookManifestPath));
112225
+ const hookPluginRoot = dirname34(dirname34(hookManifestPath));
112113
112226
  for (const command of commands2) {
112114
112227
  for (const relativePath of extractPluginRootPaths(command)) {
112115
112228
  referencedCount += 1;
@@ -112148,7 +112261,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
112148
112261
  }
112149
112262
  async function findHookManifestPaths(root) {
112150
112263
  const paths3 = await findManifestPaths(root, "hooks.json");
112151
- return paths3.filter((path15) => dirname33(path15).endsWith(`${sep9}hooks`));
112264
+ return paths3.filter((path15) => dirname34(path15).endsWith(`${sep9}hooks`));
112152
112265
  }
112153
112266
  async function findManifestPaths(root, manifestName) {
112154
112267
  let entries;
@@ -112667,8 +112780,8 @@ function formatVerbose(result) {
112667
112780
  }
112668
112781
 
112669
112782
  // packages/omo-opencode/src/cli/doctor/framework/formatter.ts
112670
- function formatDoctorOutput(result, mode) {
112671
- switch (mode) {
112783
+ function formatDoctorOutput(result, mode2) {
112784
+ switch (mode2) {
112672
112785
  case "default":
112673
112786
  return formatDefault(result);
112674
112787
  case "status":
@@ -112832,7 +112945,7 @@ import {
112832
112945
  unlinkSync as unlinkSync9,
112833
112946
  writeFileSync as writeFileSync12
112834
112947
  } from "node:fs";
112835
- import { basename as basename12, dirname as dirname34, join as join90 } from "node:path";
112948
+ import { basename as basename12, dirname as dirname35, join as join90 } from "node:path";
112836
112949
 
112837
112950
  // packages/mcp-client-core/src/config-dir.ts
112838
112951
  import { existsSync as existsSync61, realpathSync as realpathSync8 } from "node:fs";
@@ -113016,7 +113129,7 @@ function readLegacyStore() {
113016
113129
  }
113017
113130
  function writeTokenFile(filePath, token) {
113018
113131
  try {
113019
- const dir = dirname34(filePath);
113132
+ const dir = dirname35(filePath);
113020
113133
  if (!existsSync63(dir)) {
113021
113134
  mkdirSync15(dir, { recursive: true });
113022
113135
  }
@@ -113988,10 +114101,10 @@ function formatClassification(classification) {
113988
114101
  return classification.ref.length > 0 ? `${head} ${classification.path} ${classification.ref}` : `${head} ${classification.path}`;
113989
114102
  }
113990
114103
  function formatSummary(result) {
113991
- const mode = result.apply ? "apply" : "dry-run";
114104
+ const mode2 = result.apply ? "apply" : "dry-run";
113992
114105
  const removed2 = result.repos.reduce((total, repo) => total + repo.removed.length, 0);
113993
114106
  const failed = result.repos.reduce((total, repo) => total + repo.failed.length, 0);
113994
- return `SUMMARY mode=${mode} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
114107
+ return `SUMMARY mode=${mode2} repos=${result.repos.length} sweep=${result.sweepCount} keep=${result.keepCount} prune=${result.pruneCount} removed=${removed2} failed=${failed}`;
113995
114108
  }
113996
114109
  function formatResult(result) {
113997
114110
  const lines = [];
@@ -114513,9 +114626,9 @@ Examples:
114513
114626
  `).action(async (options) => {
114514
114627
  const rootOptions = program2.opts();
114515
114628
  const rootDoctorPlatform = rootOptions.platform === "opencode" || rootOptions.platform === "codex" ? rootOptions.platform : undefined;
114516
- const mode = options.status ? "status" : options.verbose ? "verbose" : "default";
114629
+ const mode2 = options.status ? "status" : options.verbose ? "verbose" : "default";
114517
114630
  const doctorOptions = {
114518
- mode,
114631
+ mode: mode2,
114519
114632
  json: options.json ?? false,
114520
114633
  target: resolveDoctorTarget(process.env.OMO_INVOCATION_NAME, options.platform ?? rootDoctorPlatform)
114521
114634
  };