oh-my-opencode 4.18.0 → 4.18.2

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 (226) hide show
  1. package/.agents/skills/codex-qa/scripts/lsp-e2e.sh +3677 -0
  2. package/.agents/skills/opencode-qa/scripts/lsp-e2e.sh +3154 -0
  3. package/.agents/skills/work-with-pr/SKILL.md +16 -37
  4. package/.agents/skills/work-with-pr-workspace/evals/evals.json +3 -3
  5. package/.opencode/skills/work-with-pr/SKILL.md +16 -37
  6. package/.opencode/skills/work-with-pr-workspace/evals/evals.json +3 -3
  7. package/bin/AGENTS.md +33 -0
  8. package/dist/cli/index.js +500 -158
  9. package/dist/cli-node/index.js +500 -158
  10. package/dist/hooks/anthropic-context-window-limit-recovery/empty-content-recovery-sdk.d.ts +6 -0
  11. package/dist/hooks/category-skill-reminder/hook.d.ts +9 -1
  12. package/dist/hooks/comment-checker/hook.d.ts +8 -1
  13. package/dist/hooks/todo-continuation-enforcer/types.d.ts +3 -0
  14. package/dist/index.js +956 -702
  15. package/dist/plugin/messages-transform.d.ts +1 -0
  16. package/dist/plugin-handlers/prometheus-agent-config-builder.d.ts +2 -0
  17. package/dist/tui.js +43 -4
  18. package/package.json +16 -16
  19. package/packages/git-bash-mcp/dist/cli.js +81 -19
  20. package/packages/lsp-core/package.json +4 -0
  21. package/packages/lsp-core/src/index.ts +1 -0
  22. package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +18 -0
  23. package/packages/lsp-core/src/lsp/cleanup-errors.ts +12 -3
  24. package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +261 -0
  25. package/packages/lsp-core/src/lsp/client-wrapper.test.ts +63 -0
  26. package/packages/lsp-core/src/lsp/client-wrapper.ts +35 -5
  27. package/packages/lsp-core/src/lsp/client.ts +262 -80
  28. package/packages/lsp-core/src/lsp/config-loader.ts +5 -17
  29. package/packages/lsp-core/src/lsp/connection.ts +12 -6
  30. package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +221 -0
  31. package/packages/lsp-core/src/lsp/directory-diagnostics.ts +61 -28
  32. package/packages/lsp-core/src/lsp/errors.ts +11 -0
  33. package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +283 -0
  34. package/packages/lsp-core/src/lsp/fixtures/workspace-edit-contract-probe.ts +196 -0
  35. package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +215 -0
  36. package/packages/lsp-core/src/lsp/formatters.ts +3 -0
  37. package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +97 -0
  38. package/packages/lsp-core/src/lsp/json-rpc-connection.ts +73 -5
  39. package/packages/lsp-core/src/lsp/server-install-state.ts +3 -6
  40. package/packages/lsp-core/src/lsp/transport-protocol.ts +52 -0
  41. package/packages/lsp-core/src/lsp/transport.ts +96 -70
  42. package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +19 -0
  43. package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +214 -0
  44. package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +113 -0
  45. package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +163 -0
  46. package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +163 -0
  47. package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +67 -0
  48. package/packages/lsp-core/src/lsp/workspace-document-state.ts +368 -0
  49. package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +113 -0
  50. package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +140 -0
  51. package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +220 -0
  52. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +56 -0
  53. package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +30 -0
  54. package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +44 -0
  55. package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +147 -0
  56. package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +59 -0
  57. package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +130 -0
  58. package/packages/lsp-core/src/lsp/workspace-edit-path.ts +98 -0
  59. package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +60 -0
  60. package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +73 -0
  61. package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +174 -0
  62. package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +89 -0
  63. package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +183 -0
  64. package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +53 -0
  65. package/packages/lsp-core/src/lsp/workspace-edit-text.ts +125 -0
  66. package/packages/lsp-core/src/lsp/workspace-edit-types.ts +121 -0
  67. package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +95 -0
  68. package/packages/lsp-core/src/lsp/workspace-edit.ts +49 -200
  69. package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +182 -0
  70. package/packages/lsp-core/src/mcp.ts +18 -7
  71. package/packages/lsp-core/src/missing-dependency-result.test.ts +105 -0
  72. package/packages/lsp-core/src/missing-dependency-result.ts +57 -0
  73. package/packages/lsp-core/src/post-edit/index.ts +1 -0
  74. package/packages/lsp-core/src/post-edit/orchestration.test.ts +157 -0
  75. package/packages/lsp-core/src/post-edit/orchestration.ts +178 -0
  76. package/packages/lsp-core/src/request-context.test.ts +171 -0
  77. package/packages/lsp-core/src/request-context.ts +222 -9
  78. package/packages/lsp-core/src/tool-surface.test.ts +4 -1
  79. package/packages/lsp-core/src/tools/diagnostics.ts +32 -13
  80. package/packages/lsp-core/src/tools/navigation.ts +12 -12
  81. package/packages/lsp-core/src/tools/rename.ts +10 -15
  82. package/packages/lsp-core/src/tools/symbols.ts +11 -11
  83. package/packages/lsp-core/src/tools/types.ts +2 -1
  84. package/packages/lsp-daemon/dist/cli.js +3330 -764
  85. package/packages/lsp-daemon/dist/client.d.ts +105 -0
  86. package/packages/lsp-daemon/dist/client.js +5995 -0
  87. package/packages/lsp-daemon/dist/daemon-client.d.ts +12 -7
  88. package/packages/lsp-daemon/dist/daemon-client.js +139 -32
  89. package/packages/lsp-daemon/dist/daemon-server.d.ts +1 -0
  90. package/packages/lsp-daemon/dist/daemon-server.js +40 -15
  91. package/packages/lsp-daemon/dist/ensure-daemon.d.ts +10 -8
  92. package/packages/lsp-daemon/dist/ensure-daemon.js +135 -51
  93. package/packages/lsp-daemon/dist/index.d.ts +2 -2
  94. package/packages/lsp-daemon/dist/index.js +3093 -786
  95. package/packages/lsp-daemon/dist/ipc-protocol.d.ts +46 -0
  96. package/packages/lsp-daemon/dist/ipc-protocol.js +187 -0
  97. package/packages/lsp-daemon/dist/lock.js +14 -4
  98. package/packages/lsp-daemon/dist/ownership.d.ts +49 -0
  99. package/packages/lsp-daemon/dist/ownership.js +168 -0
  100. package/packages/lsp-daemon/dist/paths.d.ts +33 -9
  101. package/packages/lsp-daemon/dist/paths.js +72 -33
  102. package/packages/lsp-daemon/dist/proxy.d.ts +5 -0
  103. package/packages/lsp-daemon/dist/proxy.js +123 -16
  104. package/packages/lsp-daemon/dist/request-routing.d.ts +7 -2
  105. package/packages/lsp-daemon/dist/request-routing.js +71 -22
  106. package/packages/lsp-daemon/dist/run-daemon.js +9 -2
  107. package/packages/lsp-daemon/dist/runtime-contract.d.ts +21 -0
  108. package/packages/lsp-daemon/dist/runtime-contract.js +58 -0
  109. package/packages/lsp-daemon/dist/socket-jsonrpc.js +6 -1
  110. package/packages/lsp-daemon/package.json +12 -3
  111. package/packages/lsp-tools-mcp/dist/cli.js +2189 -454
  112. package/packages/lsp-tools-mcp/dist/lsp/manager.js +1741 -148
  113. package/packages/lsp-tools-mcp/dist/mcp.js +2206 -471
  114. package/packages/lsp-tools-mcp/dist/request-context.js +176 -6
  115. package/packages/lsp-tools-mcp/dist/tools.js +2119 -447
  116. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  117. package/packages/omo-codex/plugin/.mcp.json +2 -1
  118. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  119. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  120. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +100 -28
  121. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +100 -28
  122. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  123. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +21 -9
  124. package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +35 -0
  125. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge-lifecycle.test.ts +69 -0
  126. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +57 -1
  127. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  128. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  129. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  130. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  131. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  132. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  133. package/packages/omo-codex/plugin/components/lsp/.mcp.json +2 -1
  134. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +55 -0
  135. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +3033 -936
  136. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +0 -4
  137. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +5 -2
  138. package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +41 -62
  139. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.d.ts +1 -1
  140. package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +24 -15
  141. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +3 -7
  142. package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +23 -49
  143. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  144. package/packages/omo-codex/plugin/components/lsp/package.json +3 -2
  145. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +31 -1
  146. package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.test.mjs +76 -0
  147. package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +201 -0
  148. package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.test.mjs +55 -0
  149. package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +0 -4
  150. package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +49 -71
  151. package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +26 -15
  152. package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +26 -64
  153. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +16 -17
  154. package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +30 -4
  155. package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +20 -5
  156. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
  157. package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +5 -3
  158. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  159. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  160. package/packages/omo-codex/plugin/components/start-work-continuation/README.md +2 -2
  161. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +3 -3
  162. package/packages/omo-codex/plugin/components/start-work-continuation/dist/cli.js +2 -2
  163. package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
  164. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  165. package/packages/omo-codex/plugin/components/start-work-continuation/src/boulder-reader.ts +1 -1
  166. package/packages/omo-codex/plugin/components/start-work-continuation/src/codex-hook.ts +1 -1
  167. package/packages/omo-codex/plugin/components/start-work-continuation/test/boulder-reader.test.ts +15 -1
  168. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +20 -0
  169. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  170. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  171. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  172. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  173. package/packages/omo-codex/plugin/components/ultrawork/directive.md +50 -33
  174. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  175. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  176. package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +50 -33
  177. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +50 -33
  178. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +3 -3
  179. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +5 -6
  180. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  181. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  182. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  183. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +6 -5
  184. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +5 -6
  185. package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +2 -2
  186. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  187. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  188. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  189. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  190. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  191. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  192. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  193. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  194. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  195. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  196. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  197. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  198. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  199. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  200. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  201. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  202. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +1 -1
  203. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  204. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +1 -1
  205. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  206. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  207. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  208. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  209. package/packages/omo-codex/plugin/package-lock.json +26 -14
  210. package/packages/omo-codex/plugin/package.json +1 -1
  211. package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +2 -3
  212. package/packages/omo-codex/plugin/scripts/build-components.mjs +13 -1
  213. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +9 -1
  214. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +7 -0
  215. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +2 -1
  216. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +50 -33
  217. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  218. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +6 -5
  219. package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +8 -0
  220. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +128 -15
  221. package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +10 -0
  222. package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +2 -0
  223. package/packages/omo-codex/plugin/test/mcp-research-servers.test.mjs +1 -0
  224. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +7 -0
  225. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +34 -3
  226. package/packages/omo-codex/scripts/install-dist/install-local.mjs +328 -63
package/dist/index.js CHANGED
@@ -9046,10 +9046,10 @@ async function runTmuxCommandOnce(tmuxPath, args, timeoutMs) {
9046
9046
  try {
9047
9047
  const exitCodeOrTimeout = timeoutMs === undefined ? await subprocess.exited : await Promise.race([
9048
9048
  subprocess.exited,
9049
- new Promise((resolve11) => {
9049
+ new Promise((resolve10) => {
9050
9050
  timeoutId = setTimeout(() => {
9051
9051
  abortController.abort();
9052
- resolve11("timeout");
9052
+ resolve10("timeout");
9053
9053
  }, timeoutMs);
9054
9054
  })
9055
9055
  ]);
@@ -9109,7 +9109,7 @@ function getCurrentPaneId() {
9109
9109
 
9110
9110
  // packages/tmux-core/src/tmux-utils/server-health.ts
9111
9111
  function delay(milliseconds) {
9112
- return new Promise((resolve11) => setTimeout(resolve11, milliseconds));
9112
+ return new Promise((resolve10) => setTimeout(resolve10, milliseconds));
9113
9113
  }
9114
9114
  function markServerRunningInProcess() {
9115
9115
  globalThis[SERVER_RUNNING_KEY] = true;
@@ -9309,7 +9309,7 @@ var init_pane_spawn = __esm(() => {
9309
9309
 
9310
9310
  // packages/tmux-core/src/tmux-utils/pane-close.ts
9311
9311
  function delay2(milliseconds) {
9312
- return new Promise((resolve11) => setTimeout(resolve11, milliseconds));
9312
+ return new Promise((resolve10) => setTimeout(resolve10, milliseconds));
9313
9313
  }
9314
9314
  async function closeTmuxPane(paneId) {
9315
9315
  const [{ isInsideTmux: isInsideTmux2 }, { runTmuxCommand: runTmuxCommand2 }] = await Promise.all([
@@ -10141,7 +10141,7 @@ __export(exports_pane_close, {
10141
10141
  closeTmuxPane: () => closeTmuxPane2
10142
10142
  });
10143
10143
  function delay3(milliseconds) {
10144
- return new Promise((resolve11) => setTimeout(resolve11, milliseconds));
10144
+ return new Promise((resolve10) => setTimeout(resolve10, milliseconds));
10145
10145
  }
10146
10146
  async function closeTmuxPane2(paneId) {
10147
10147
  const [{ log: log4 }, { isInsideTmux: isInsideTmux2 }, { getTmuxPath: getTmuxPath2 }, { runTmuxCommand: runTmuxCommand2 }] = await Promise.all([
@@ -10594,12 +10594,12 @@ var require_isexe = __commonJS((exports, module) => {
10594
10594
  if (typeof Promise !== "function") {
10595
10595
  throw new TypeError("callback not provided");
10596
10596
  }
10597
- return new Promise(function(resolve11, reject) {
10597
+ return new Promise(function(resolve10, reject) {
10598
10598
  isexe(path8, options || {}, function(er, is) {
10599
10599
  if (er) {
10600
10600
  reject(er);
10601
10601
  } else {
10602
- resolve11(is);
10602
+ resolve10(is);
10603
10603
  }
10604
10604
  });
10605
10605
  });
@@ -10661,27 +10661,27 @@ var require_which = __commonJS((exports, module) => {
10661
10661
  opt = {};
10662
10662
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
10663
10663
  const found = [];
10664
- const step = (i) => new Promise((resolve11, reject) => {
10664
+ const step = (i) => new Promise((resolve10, reject) => {
10665
10665
  if (i === pathEnv.length)
10666
- return opt.all && found.length ? resolve11(found) : reject(getNotFoundError(cmd));
10666
+ return opt.all && found.length ? resolve10(found) : reject(getNotFoundError(cmd));
10667
10667
  const ppRaw = pathEnv[i];
10668
10668
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
10669
10669
  const pCmd = path8.join(pathPart, cmd);
10670
10670
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
10671
- resolve11(subStep(p, i, 0));
10671
+ resolve10(subStep(p, i, 0));
10672
10672
  });
10673
- const subStep = (p, i, ii) => new Promise((resolve11, reject) => {
10673
+ const subStep = (p, i, ii) => new Promise((resolve10, reject) => {
10674
10674
  if (ii === pathExt.length)
10675
- return resolve11(step(i + 1));
10675
+ return resolve10(step(i + 1));
10676
10676
  const ext = pathExt[ii];
10677
10677
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
10678
10678
  if (!er && is) {
10679
10679
  if (opt.all)
10680
10680
  found.push(p + ext);
10681
10681
  else
10682
- return resolve11(p + ext);
10682
+ return resolve10(p + ext);
10683
10683
  }
10684
- return resolve11(subStep(p, i, ii + 1));
10684
+ return resolve10(subStep(p, i, ii + 1));
10685
10685
  });
10686
10686
  });
10687
10687
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -13005,7 +13005,7 @@ var init_types2 = __esm(() => {
13005
13005
 
13006
13006
  // packages/team-core/src/team-registry/paths.ts
13007
13007
  import { mkdir as mkdir3, readdir as readdir2, stat as stat2, chmod as chmod3 } from "fs/promises";
13008
- import { homedir as homedir23 } from "os";
13008
+ import { homedir as homedir22 } from "os";
13009
13009
  import path14 from "path";
13010
13010
  function getTeamDirectory(baseDir, teamName, scope, projectRoot) {
13011
13011
  if (scope === "project") {
@@ -13028,14 +13028,14 @@ function resolveContainedPath2(baseDir, pathSegments) {
13028
13028
  return resolvedPath;
13029
13029
  }
13030
13030
  function resolveBaseDir(config) {
13031
- return expandHomeDirectory(config.base_dir ?? path14.join(homedir23(), ".omo"));
13031
+ return expandHomeDirectory(config.base_dir ?? path14.join(homedir22(), ".omo"));
13032
13032
  }
13033
13033
  function expandHomeDirectory(directoryPath) {
13034
13034
  if (directoryPath === "~") {
13035
- return homedir23();
13035
+ return homedir22();
13036
13036
  }
13037
13037
  if (directoryPath.startsWith("~/") || directoryPath.startsWith("~\\")) {
13038
- return path14.join(homedir23(), directoryPath.slice(2));
13038
+ return path14.join(homedir22(), directoryPath.slice(2));
13039
13039
  }
13040
13040
  return directoryPath;
13041
13041
  }
@@ -13187,8 +13187,8 @@ import { randomUUID as randomUUID5 } from "crypto";
13187
13187
  import { access as access3, open, readFile as readFile4, rename as rename3, rm as rm3, unlink as unlink2 } from "fs/promises";
13188
13188
  import { dirname as dirname24 } from "path";
13189
13189
  function delay4(ms) {
13190
- return new Promise((resolve20) => {
13191
- setTimeout(resolve20, ms);
13190
+ return new Promise((resolve19) => {
13191
+ setTimeout(resolve19, ms);
13192
13192
  });
13193
13193
  }
13194
13194
  function buildOwnerContent(ownerTag) {
@@ -16591,7 +16591,7 @@ var require_compile = __commonJS((exports) => {
16591
16591
  const schOrFunc = root.refs[ref];
16592
16592
  if (schOrFunc)
16593
16593
  return schOrFunc;
16594
- let _sch = resolve36.call(this, root, ref);
16594
+ let _sch = resolve35.call(this, root, ref);
16595
16595
  if (_sch === undefined) {
16596
16596
  const schema = (_a = root.localRefs) === null || _a === undefined ? undefined : _a[ref];
16597
16597
  const { schemaId } = this.opts;
@@ -16618,7 +16618,7 @@ var require_compile = __commonJS((exports) => {
16618
16618
  function sameSchemaEnv(s1, s2) {
16619
16619
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
16620
16620
  }
16621
- function resolve36(root, ref) {
16621
+ function resolve35(root, ref) {
16622
16622
  let sch;
16623
16623
  while (typeof (sch = this.refs[ref]) == "string")
16624
16624
  ref = sch;
@@ -17204,7 +17204,7 @@ var require_fast_uri = __commonJS((exports, module) => {
17204
17204
  }
17205
17205
  return uri;
17206
17206
  }
17207
- function resolve36(baseURI, relativeURI, options) {
17207
+ function resolve35(baseURI, relativeURI, options) {
17208
17208
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
17209
17209
  const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
17210
17210
  schemelessOptions.skipEscape = true;
@@ -17463,7 +17463,7 @@ var require_fast_uri = __commonJS((exports, module) => {
17463
17463
  var fastUri = {
17464
17464
  SCHEMES,
17465
17465
  normalize: normalize4,
17466
- resolve: resolve36,
17466
+ resolve: resolve35,
17467
17467
  resolveComponent,
17468
17468
  equal,
17469
17469
  serialize,
@@ -20867,7 +20867,7 @@ function resolveFilePath(filePath, cwd) {
20867
20867
  }
20868
20868
  function readFileContent(resolvedPath) {
20869
20869
  if (!existsSync11(resolvedPath)) {
20870
- return `[file not found: ${resolvedPath}]`;
20870
+ return null;
20871
20871
  }
20872
20872
  const stat2 = statSync4(resolvedPath);
20873
20873
  if (stat2.isDirectory()) {
@@ -20897,13 +20897,16 @@ async function resolveFileReferencesInText(text, cwd = process.cwd(), depth = 0,
20897
20897
  continue;
20898
20898
  }
20899
20899
  const content = readFileContent(resolvedPath);
20900
+ if (content === null) {
20901
+ continue;
20902
+ }
20900
20903
  replacements.set(match.fullMatch, content);
20901
20904
  }
20902
20905
  let resolved = text;
20903
20906
  for (const [pattern, replacement] of replacements.entries()) {
20904
20907
  resolved = resolved.replaceAll(pattern, replacement);
20905
20908
  }
20906
- if (findFileReferences(resolved).length > 0 && depth + 1 < maxDepth) {
20909
+ if (replacements.size > 0 && findFileReferences(resolved).length > 0 && depth + 1 < maxDepth) {
20907
20910
  return resolveFileReferencesInText(resolved, cwd, depth + 1, maxDepth);
20908
20911
  }
20909
20912
  return resolved;
@@ -20941,7 +20944,7 @@ var AGENT_MODEL_REQUIREMENTS = {
20941
20944
  hephaestus: {
20942
20945
  fallbackChain: [
20943
20946
  {
20944
- providers: ["openai", "vercel"],
20947
+ providers: ["openai", "github-copilot", "vercel"],
20945
20948
  model: "gpt-5.6-sol",
20946
20949
  variant: "high"
20947
20950
  },
@@ -21052,6 +21055,11 @@ var AGENT_MODEL_REQUIREMENTS = {
21052
21055
  model: "gpt-5.6-sol",
21053
21056
  variant: "xhigh"
21054
21057
  },
21058
+ {
21059
+ providers: ["github-copilot"],
21060
+ model: "gpt-5.6-sol",
21061
+ variant: "high"
21062
+ },
21055
21063
  {
21056
21064
  providers: ["openai", "github-copilot", "opencode", "vercel"],
21057
21065
  model: "gpt-5.5",
@@ -21126,6 +21134,11 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21126
21134
  model: "gpt-5.6-sol",
21127
21135
  variant: "xhigh"
21128
21136
  },
21137
+ {
21138
+ providers: ["github-copilot"],
21139
+ model: "gpt-5.6-sol",
21140
+ variant: "high"
21141
+ },
21129
21142
  {
21130
21143
  providers: ["openai", "opencode", "vercel"],
21131
21144
  model: "gpt-5.5",
@@ -21152,7 +21165,12 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21152
21165
  variant: "xhigh"
21153
21166
  },
21154
21167
  {
21155
- providers: ["openai", "vercel"],
21168
+ providers: ["github-copilot"],
21169
+ model: "gpt-5.6-terra",
21170
+ variant: "high"
21171
+ },
21172
+ {
21173
+ providers: ["openai", "github-copilot", "vercel"],
21156
21174
  model: "gpt-5.6-sol",
21157
21175
  variant: "high"
21158
21176
  },
@@ -21219,6 +21237,11 @@ var CATEGORY_MODEL_REQUIREMENTS = {
21219
21237
  model: "gpt-5.6-luna",
21220
21238
  variant: "xhigh"
21221
21239
  },
21240
+ {
21241
+ providers: ["github-copilot"],
21242
+ model: "gpt-5.6-luna",
21243
+ variant: "high"
21244
+ },
21222
21245
  {
21223
21246
  providers: ["anthropic", "github-copilot", "opencode", "vercel"],
21224
21247
  model: "claude-sonnet-4-6"
@@ -21381,6 +21404,14 @@ var EXACT_ALIAS_RULES = [
21381
21404
  ];
21382
21405
  var EXACT_ALIAS_RULES_BY_MODEL = new Map(EXACT_ALIAS_RULES.map((rule) => [rule.aliasModelID, rule]));
21383
21406
  var PATTERN_ALIAS_RULES = [
21407
+ {
21408
+ ruleID: "openai-gpt-5.6-fast-service-tier-alias",
21409
+ description: "Normalizes OpenCode's OpenAI GPT-5.6 fast service-tier IDs to canonical snapshot IDs.",
21410
+ providerIDs: ["openai"],
21411
+ allowedSubproviderHosts: ["vercel"],
21412
+ match: (normalizedModelID) => /^gpt-5\.6-(?:sol|terra|luna)-fast$/.test(normalizedModelID),
21413
+ canonicalize: (normalizedModelID) => normalizedModelID.slice(0, -"-fast".length)
21414
+ },
21384
21415
  {
21385
21416
  ruleID: "claude-thinking-legacy-alias",
21386
21417
  description: "Normalizes the legacy claude-opus-4-7-thinking id to the canonical snapshot ID.",
@@ -21404,9 +21435,12 @@ function stripProviderPrefixForAliasLookup(normalizedModelID) {
21404
21435
  }
21405
21436
  return normalizedModelID.slice(slashIndex + 1);
21406
21437
  }
21407
- function resolveModelIDAlias(modelID) {
21438
+ function resolveModelIDAlias(modelID, providerID) {
21408
21439
  const requestedModelID = normalizeLookupModelID(modelID);
21409
21440
  const aliasLookupModelID = stripProviderPrefixForAliasLookup(requestedModelID);
21441
+ const normalizedProviderID = providerID ? normalizeLookupModelID(providerID) : undefined;
21442
+ const providerPrefixEnd = requestedModelID.indexOf("/");
21443
+ const embeddedProviderID = providerPrefixEnd > 0 ? requestedModelID.slice(0, providerPrefixEnd) : undefined;
21410
21444
  const exactRule = EXACT_ALIAS_RULES_BY_MODEL.get(aliasLookupModelID);
21411
21445
  if (exactRule) {
21412
21446
  return {
@@ -21417,6 +21451,13 @@ function resolveModelIDAlias(modelID) {
21417
21451
  };
21418
21452
  }
21419
21453
  for (const rule of PATTERN_ALIAS_RULES) {
21454
+ if (rule.providerIDs) {
21455
+ const matchesProviderID = normalizedProviderID !== undefined && rule.providerIDs.includes(normalizedProviderID);
21456
+ const matchesEmbeddedProviderID = normalizedProviderID !== undefined && rule.allowedSubproviderHosts?.includes(normalizedProviderID) === true && embeddedProviderID !== undefined && rule.providerIDs.includes(embeddedProviderID);
21457
+ if (!matchesProviderID && !matchesEmbeddedProviderID) {
21458
+ continue;
21459
+ }
21460
+ }
21420
21461
  if (!rule.match(aliasLookupModelID)) {
21421
21462
  continue;
21422
21463
  }
@@ -21922,21 +21963,25 @@ function resolveModelPipeline(request, providerCache = {
21922
21963
  } else {
21923
21964
  for (const entry of fallbackChain) {
21924
21965
  for (const provider of entry.providers) {
21925
- const fullModel = `${provider}/${entry.model}`;
21926
- const match = deps.fuzzyMatchModel(fullModel, availableModels, [provider]);
21927
- if (match) {
21928
- log3("Model resolved via fallback chain (availability confirmed)", {
21929
- provider,
21930
- model: entry.model,
21931
- match,
21932
- variant: entry.variant
21933
- });
21934
- return {
21935
- model: match,
21936
- provenance: "provider-fallback",
21937
- variant: entry.variant,
21938
- attempted
21939
- };
21966
+ const transformedModelId = deps.transformModelForProvider(provider, entry.model);
21967
+ const candidateModelIds = transformedModelId === entry.model ? [entry.model] : [entry.model, transformedModelId];
21968
+ for (const modelID of candidateModelIds) {
21969
+ const fullModel = `${provider}/${modelID}`;
21970
+ const match = deps.fuzzyMatchModel(fullModel, availableModels, [provider]);
21971
+ if (match) {
21972
+ log3("Model resolved via fallback chain (availability confirmed)", {
21973
+ provider,
21974
+ model: entry.model,
21975
+ match,
21976
+ variant: entry.variant
21977
+ });
21978
+ return {
21979
+ model: match,
21980
+ provenance: "provider-fallback",
21981
+ variant: entry.variant,
21982
+ attempted
21983
+ };
21984
+ }
21940
21985
  }
21941
21986
  }
21942
21987
  }
@@ -22498,6 +22543,9 @@ function classifyRuntimeFallbackError(error) {
22498
22543
  if (errorName?.includes("messageabortederror") || errorName?.includes("aborterror")) {
22499
22544
  return "abort";
22500
22545
  }
22546
+ if (errorName === "contextoverflowerror") {
22547
+ return "context_overflow";
22548
+ }
22501
22549
  if (errorName?.includes("ailoadapikeyerror") || errorName?.includes("loadapi") || /api.?key.?is.?missing/i.test(message) && /environment variable/i.test(message)) {
22502
22550
  return "missing_api_key";
22503
22551
  }
@@ -22516,7 +22564,7 @@ function isRuntimeFallbackRetryableError(error, retryOnErrors, options = {}) {
22516
22564
  const statusCode = getRuntimeFallbackStatusCode(error, retryOnErrors);
22517
22565
  const message = getRuntimeFallbackErrorMessage(error);
22518
22566
  const errorType = classifyRuntimeFallbackError(error);
22519
- if (errorType === "abort")
22567
+ if (errorType === "abort" || errorType === "context_overflow")
22520
22568
  return false;
22521
22569
  if (errorType === "missing_api_key" || errorType === "model_not_found" || errorType === "quota_exceeded") {
22522
22570
  return true;
@@ -22852,7 +22900,7 @@ function getProviderOverride(providerID, modelID) {
22852
22900
  return GITHUB_COPILOT_GPT5_MODEL.test(normalizeLookupModelID2(modelID)) ? GITHUB_COPILOT_GPT5_OVERRIDE : undefined;
22853
22901
  }
22854
22902
  function getModelCapabilities(input) {
22855
- const canonicalization = resolveModelIDAlias(input.modelID);
22903
+ const canonicalization = resolveModelIDAlias(input.modelID, input.providerID);
22856
22904
  const override = getOverride(input.modelID);
22857
22905
  const providerOverride = getProviderOverride(input.providerID, canonicalization.canonicalModelID);
22858
22906
  const runtimeModel = readRuntimeModel(input.runtimeModel ?? input.providerCache?.findProviderModelMetadata(input.providerID, input.modelID));
@@ -24608,34 +24656,18 @@ function migrateAgentConfig(config) {
24608
24656
  }
24609
24657
  // packages/omo-opencode/src/shared/load-opencode-plugins.ts
24610
24658
  import * as fs6 from "fs";
24611
- import * as os4 from "os";
24612
24659
  import * as path6 from "path";
24613
24660
  var opencodePluginsCache = new Map;
24614
- function getWindowsAppdataDir() {
24615
- return process.env.APPDATA || null;
24616
- }
24617
24661
  function getConfigPaths(directory) {
24618
- const crossPlatformDir = path6.join(os4.homedir(), ".config");
24619
- const paths = [
24662
+ const configDirs = getOpenCodeConfigDirs({ binary: "opencode" });
24663
+ return [
24620
24664
  path6.join(directory, ".opencode", "opencode.json"),
24621
24665
  path6.join(directory, ".opencode", "opencode.jsonc"),
24622
- path6.join(crossPlatformDir, "opencode", "opencode.json"),
24623
- path6.join(crossPlatformDir, "opencode", "opencode.jsonc")
24666
+ ...configDirs.flatMap((dir) => [
24667
+ path6.join(dir, "opencode.json"),
24668
+ path6.join(dir, "opencode.jsonc")
24669
+ ])
24624
24670
  ];
24625
- const customConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
24626
- if (customConfigDir) {
24627
- const resolvedCustomConfigDir = path6.resolve(customConfigDir);
24628
- paths.push(path6.join(resolvedCustomConfigDir, "opencode.json"));
24629
- paths.push(path6.join(resolvedCustomConfigDir, "opencode.jsonc"));
24630
- }
24631
- if (process.platform === "win32") {
24632
- const appdataDir = getWindowsAppdataDir();
24633
- if (appdataDir) {
24634
- paths.push(path6.join(appdataDir, "opencode", "opencode.json"));
24635
- paths.push(path6.join(appdataDir, "opencode", "opencode.jsonc"));
24636
- }
24637
- }
24638
- return Array.from(new Set(paths));
24639
24671
  }
24640
24672
  function loadOpencodePlugins(directory) {
24641
24673
  const cachedPluginEntries = opencodePluginsCache.get(directory);
@@ -76474,7 +76506,7 @@ init_route_resolver();
76474
76506
  // node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/gen/core/serverSentEvents.gen.js
76475
76507
  var createSseClient = ({ onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
76476
76508
  let lastEventId;
76477
- const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve11) => setTimeout(resolve11, ms)));
76509
+ const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve10) => setTimeout(resolve10, ms)));
76478
76510
  const createStream = async function* () {
76479
76511
  let retryDelay = sseDefaultRetryDelay ?? 3000;
76480
76512
  let attempt = 0;
@@ -78671,11 +78703,11 @@ function getOpenCodeCommandDirs(options) {
78671
78703
  // packages/omo-opencode/src/shared/project-discovery-dirs.ts
78672
78704
  import { execFileSync as execFileSync3 } from "child_process";
78673
78705
  import { existsSync as existsSync21, realpathSync as realpathSync7 } from "fs";
78674
- import { dirname as dirname7, join as join30, resolve as resolve11, win32 as win323 } from "path";
78706
+ import { dirname as dirname7, join as join30, resolve as resolve10, win32 as win323 } from "path";
78675
78707
  init_plugin_identity();
78676
78708
  var worktreePathCache = new Map;
78677
78709
  function normalizePath2(path8) {
78678
- const resolvedPath = process.platform !== "win32" && win323.isAbsolute(path8) ? path8 : resolve11(path8);
78710
+ const resolvedPath = process.platform !== "win32" && win323.isAbsolute(path8) ? path8 : resolve10(path8);
78679
78711
  if (!existsSync21(resolvedPath)) {
78680
78712
  return resolvedPath;
78681
78713
  }
@@ -78743,7 +78775,7 @@ function findAncestorDirectories(startDirectory, targetPaths, stopDirectory) {
78743
78775
  }
78744
78776
  }
78745
78777
  function detectWorktreePath(directory) {
78746
- const resolvedDirectory = resolve11(directory);
78778
+ const resolvedDirectory = resolve10(directory);
78747
78779
  const cacheKey = pathKey(normalizePath2(resolvedDirectory));
78748
78780
  if (worktreePathCache.has(cacheKey)) {
78749
78781
  return worktreePathCache.get(cacheKey);
@@ -78876,7 +78908,7 @@ var log4 = logger4.log;
78876
78908
  var getLogFilePath2 = logger4.getLogFilePath;
78877
78909
 
78878
78910
  // packages/claude-code-compat-core/src/features/claude-code-plugin-loader/scope-filter.ts
78879
- import { homedir as homedir14 } from "os";
78911
+ import { homedir as homedir13 } from "os";
78880
78912
  import { join as join31 } from "path";
78881
78913
 
78882
78914
  // packages/claude-code-compat-core/src/shared/contains-path.ts
@@ -78885,10 +78917,10 @@ init_src();
78885
78917
  // packages/claude-code-compat-core/src/features/claude-code-plugin-loader/scope-filter.ts
78886
78918
  function expandTilde(inputPath) {
78887
78919
  if (inputPath === "~") {
78888
- return homedir14();
78920
+ return homedir13();
78889
78921
  }
78890
78922
  if (inputPath.startsWith("~/") || inputPath.startsWith("~\\")) {
78891
- return join31(homedir14(), inputPath.slice(2));
78923
+ return join31(homedir13(), inputPath.slice(2));
78892
78924
  }
78893
78925
  return inputPath;
78894
78926
  }
@@ -78903,13 +78935,13 @@ function shouldLoadPluginForCwd(installation, cwd = process.cwd()) {
78903
78935
  }
78904
78936
 
78905
78937
  // packages/claude-code-compat-core/src/features/claude-code-plugin-loader/discovery-paths.ts
78906
- import { homedir as homedir15 } from "os";
78938
+ import { homedir as homedir14 } from "os";
78907
78939
  import { join as join32 } from "path";
78908
78940
  function getPluginsBaseDir() {
78909
78941
  if (process.env.CLAUDE_PLUGINS_HOME) {
78910
78942
  return process.env.CLAUDE_PLUGINS_HOME;
78911
78943
  }
78912
- return join32(homedir15(), ".claude", "plugins");
78944
+ return join32(homedir14(), ".claude", "plugins");
78913
78945
  }
78914
78946
  function getInstalledPluginsPath(pluginsBaseDir) {
78915
78947
  return join32(pluginsBaseDir ?? getPluginsBaseDir(), "installed_plugins.json");
@@ -78918,7 +78950,7 @@ function getClaudeSettingsPath() {
78918
78950
  if (process.env.CLAUDE_SETTINGS_PATH) {
78919
78951
  return process.env.CLAUDE_SETTINGS_PATH;
78920
78952
  }
78921
- return join32(homedir15(), ".claude", "settings.json");
78953
+ return join32(homedir14(), ".claude", "settings.json");
78922
78954
  }
78923
78955
 
78924
78956
  // packages/claude-code-compat-core/src/features/claude-code-plugin-loader/installed-plugin-database.ts
@@ -79332,7 +79364,7 @@ import { existsSync as existsSync28, readdirSync as readdirSync7, readFileSync a
79332
79364
  import { join as join37 } from "path";
79333
79365
 
79334
79366
  // packages/utils/src/skill-path-resolver.ts
79335
- import { isAbsolute as isAbsolute6, posix as posix3, relative as relative4, resolve as resolve12, win32 as win324 } from "path";
79367
+ import { isAbsolute as isAbsolute6, posix as posix3, relative as relative4, resolve as resolve11, win32 as win324 } from "path";
79336
79368
  function toDisplayPath(path8) {
79337
79369
  return path8.replaceAll("\\", "/");
79338
79370
  }
@@ -79371,7 +79403,7 @@ function resolveSkillPathReferences(content, basePath) {
79371
79403
  }
79372
79404
  return relativePath.endsWith("/") && !resolvedPath2.endsWith("/") ? `${resolvedPath2}/` : resolvedPath2;
79373
79405
  }
79374
- const resolvedPath = resolve12(normalizedBase, relativePath);
79406
+ const resolvedPath = resolve11(normalizedBase, relativePath);
79375
79407
  const relativePathFromBase = relative4(normalizedBase, resolvedPath);
79376
79408
  if (relativePathFromBase.startsWith("..") || isAbsolute6(relativePathFromBase)) {
79377
79409
  return match;
@@ -80543,6 +80575,13 @@ ${todoList}`;
80543
80575
  log2(`[${HOOK_NAME}] Skipped injection: session was cancelled before prompt`, { sessionID });
80544
80576
  return;
80545
80577
  }
80578
+ if (injectionState?.continuationBlockReason) {
80579
+ log2(`[${HOOK_NAME}] Skipped injection: continuation paused at turn boundary`, {
80580
+ sessionID,
80581
+ reason: injectionState.continuationBlockReason
80582
+ });
80583
+ return;
80584
+ }
80546
80585
  if (injectionState) {
80547
80586
  injectionState.inFlight = true;
80548
80587
  }
@@ -80582,6 +80621,9 @@ ${todoList}`;
80582
80621
  injectionState.inFlight = false;
80583
80622
  injectionState.lastInjectedAt = Date.now();
80584
80623
  injectionState.awaitingPostInjectionProgressCheck = true;
80624
+ injectionState.continuationResponseObserved = false;
80625
+ injectionState.continuationBlockReason = undefined;
80626
+ injectionState.pendingUserMessageID = undefined;
80585
80627
  injectionState.consecutiveFailures = 0;
80586
80628
  }
80587
80629
  return;
@@ -80600,6 +80642,9 @@ ${todoList}`;
80600
80642
  injectionState.inFlight = false;
80601
80643
  injectionState.lastInjectedAt = Date.now();
80602
80644
  injectionState.awaitingPostInjectionProgressCheck = true;
80645
+ injectionState.continuationResponseObserved = false;
80646
+ injectionState.continuationBlockReason = undefined;
80647
+ injectionState.pendingUserMessageID = undefined;
80603
80648
  injectionState.consecutiveFailures = 0;
80604
80649
  }
80605
80650
  } catch (error) {
@@ -80927,6 +80972,14 @@ async function handleSessionIdle(args) {
80927
80972
  return;
80928
80973
  }
80929
80974
  const progressUpdate = sessionStateStore.trackContinuationProgress(sessionID, incompleteCount, todos);
80975
+ if (state2.continuationBlockReason) {
80976
+ log2(`[${HOOK_NAME}] Skipped: continuation paused at turn boundary`, {
80977
+ sessionID,
80978
+ reason: state2.continuationBlockReason,
80979
+ hasProgressed: progressUpdate.hasProgressed
80980
+ });
80981
+ return;
80982
+ }
80930
80983
  if (shouldStopForStagnation({ sessionID, incompleteCount, progressUpdate })) {
80931
80984
  return;
80932
80985
  }
@@ -80965,6 +81018,39 @@ function resolveEventParts(properties) {
80965
81018
  function hasInternalSystemDirective(parts) {
80966
81019
  return (parts ?? []).some((part) => part.type === "text" && typeof part.text === "string" && isSystemDirective(part.text));
80967
81020
  }
81021
+ function hasAcceptedContinuationLifecycle(state2) {
81022
+ return state2.awaitingPostInjectionProgressCheck === true || state2.continuationResponseObserved === true || state2.continuationBlockReason === "directive-response";
81023
+ }
81024
+ function markContinuationResponseObserved(state2) {
81025
+ if (state2?.awaitingPostInjectionProgressCheck === true) {
81026
+ state2.continuationResponseObserved = true;
81027
+ }
81028
+ }
81029
+ function pauseForGenuineUserInterruption(args) {
81030
+ const { state: state2, sessionID, sessionStateStore } = args;
81031
+ state2.continuationBlockReason = "user-interruption";
81032
+ state2.continuationResponseObserved = false;
81033
+ state2.pendingUserMessageID = undefined;
81034
+ state2.abortDetectedAt = undefined;
81035
+ state2.wasCancelled = false;
81036
+ state2.tokenLimitDetected = false;
81037
+ sessionStateStore.cancelCountdown(sessionID);
81038
+ log2(`[${HOOK_NAME}] Paused continuation after genuine user interruption`, { sessionID });
81039
+ }
81040
+ function resolveUpdatedPart(properties) {
81041
+ const part = properties?.part;
81042
+ if (!isEventPart(part)) {
81043
+ return;
81044
+ }
81045
+ const messageID = part.messageID;
81046
+ if (messageID !== undefined && typeof messageID !== "string") {
81047
+ return;
81048
+ }
81049
+ return {
81050
+ ...part,
81051
+ ...messageID ? { messageID } : {}
81052
+ };
81053
+ }
80968
81054
  function handleNonIdleEvent(args) {
80969
81055
  const { eventType, properties, sessionStateStore } = args;
80970
81056
  if (eventType === "message.updated") {
@@ -80985,6 +81071,19 @@ function handleNonIdleEvent(args) {
80985
81071
  return;
80986
81072
  }
80987
81073
  const state2 = sessionStateStore.getExistingState(sessionID);
81074
+ const messageID = typeof info?.id === "string" ? info.id : undefined;
81075
+ if (parts === undefined && state2 && hasAcceptedContinuationLifecycle(state2) && messageID) {
81076
+ state2.pendingUserMessageID = messageID;
81077
+ log2(`[${HOOK_NAME}] Deferred user interruption classification until message part`, {
81078
+ sessionID,
81079
+ messageID
81080
+ });
81081
+ return;
81082
+ }
81083
+ if (state2 && hasAcceptedContinuationLifecycle(state2)) {
81084
+ pauseForGenuineUserInterruption({ state: state2, sessionID, sessionStateStore });
81085
+ return;
81086
+ }
80988
81087
  if (state2?.countdownStartedAt) {
80989
81088
  const elapsed = Date.now() - state2.countdownStartedAt;
80990
81089
  if (elapsed < COUNTDOWN_GRACE_PERIOD_MS) {
@@ -81003,6 +81102,7 @@ function handleNonIdleEvent(args) {
81003
81102
  if (role === "assistant") {
81004
81103
  const state2 = sessionStateStore.getExistingState(sessionID);
81005
81104
  if (state2) {
81105
+ markContinuationResponseObserved(state2);
81006
81106
  state2.abortDetectedAt = undefined;
81007
81107
  state2.wasCancelled = false;
81008
81108
  }
@@ -81016,6 +81116,27 @@ function handleNonIdleEvent(args) {
81016
81116
  if (targetSessionID) {
81017
81117
  const state2 = sessionStateStore.getExistingState(targetSessionID);
81018
81118
  if (state2) {
81119
+ const part = resolveUpdatedPart(properties);
81120
+ if (part?.messageID && part.messageID === state2.pendingUserMessageID) {
81121
+ state2.pendingUserMessageID = undefined;
81122
+ if (isSyntheticOrInternalOnlyTextParts([part])) {
81123
+ log2(`[${HOOK_NAME}] Ignoring synthetic/internal split user message`, {
81124
+ sessionID: targetSessionID,
81125
+ messageID: part.messageID
81126
+ });
81127
+ } else if (hasAcceptedContinuationLifecycle(state2)) {
81128
+ pauseForGenuineUserInterruption({
81129
+ state: state2,
81130
+ sessionID: targetSessionID,
81131
+ sessionStateStore
81132
+ });
81133
+ }
81134
+ return;
81135
+ }
81136
+ const info = properties?.info;
81137
+ if (info?.role === "assistant") {
81138
+ markContinuationResponseObserved(state2);
81139
+ }
81019
81140
  state2.abortDetectedAt = undefined;
81020
81141
  }
81021
81142
  sessionStateStore.cancelCountdown(targetSessionID);
@@ -81027,6 +81148,10 @@ function handleNonIdleEvent(args) {
81027
81148
  if (sessionID) {
81028
81149
  const state2 = sessionStateStore.getExistingState(sessionID);
81029
81150
  if (state2) {
81151
+ const info = properties?.info;
81152
+ if (info?.role === "assistant") {
81153
+ markContinuationResponseObserved(state2);
81154
+ }
81030
81155
  state2.abortDetectedAt = undefined;
81031
81156
  state2.wasCancelled = false;
81032
81157
  }
@@ -81039,6 +81164,7 @@ function handleNonIdleEvent(args) {
81039
81164
  if (sessionID) {
81040
81165
  const state2 = sessionStateStore.getExistingState(sessionID);
81041
81166
  if (state2) {
81167
+ markContinuationResponseObserved(state2);
81042
81168
  state2.abortDetectedAt = undefined;
81043
81169
  state2.wasCancelled = false;
81044
81170
  }
@@ -81112,6 +81238,9 @@ function createTodoContinuationHandler(args) {
81112
81238
  state2.lastIncompleteCount = undefined;
81113
81239
  state2.lastInjectedAt = undefined;
81114
81240
  state2.awaitingPostInjectionProgressCheck = false;
81241
+ state2.continuationResponseObserved = false;
81242
+ state2.continuationBlockReason = undefined;
81243
+ state2.pendingUserMessageID = undefined;
81115
81244
  state2.stagnationCount = 0;
81116
81245
  state2.consecutiveFailures = 0;
81117
81246
  shouldCancelCountdown = true;
@@ -81258,6 +81387,9 @@ function createSessionStateStore() {
81258
81387
  if (hasProgressed) {
81259
81388
  state2.stagnationCount = 0;
81260
81389
  state2.awaitingPostInjectionProgressCheck = false;
81390
+ state2.continuationResponseObserved = false;
81391
+ state2.continuationBlockReason = undefined;
81392
+ state2.pendingUserMessageID = undefined;
81261
81393
  return {
81262
81394
  previousIncompleteCount,
81263
81395
  previousStagnationCount,
@@ -81276,6 +81408,11 @@ function createSessionStateStore() {
81276
81408
  };
81277
81409
  }
81278
81410
  state2.awaitingPostInjectionProgressCheck = false;
81411
+ if (state2.continuationResponseObserved === true && state2.continuationBlockReason !== "user-interruption") {
81412
+ state2.continuationBlockReason = "directive-response";
81413
+ }
81414
+ state2.continuationResponseObserved = false;
81415
+ state2.pendingUserMessageID = undefined;
81279
81416
  state2.stagnationCount += 1;
81280
81417
  return {
81281
81418
  previousIncompleteCount,
@@ -81294,6 +81431,9 @@ function createSessionStateStore() {
81294
81431
  state2.lastIncompleteCount = undefined;
81295
81432
  state2.stagnationCount = 0;
81296
81433
  state2.awaitingPostInjectionProgressCheck = false;
81434
+ state2.continuationResponseObserved = false;
81435
+ state2.continuationBlockReason = undefined;
81436
+ state2.pendingUserMessageID = undefined;
81297
81437
  state2.allTodosCompletedAt = undefined;
81298
81438
  trackedSession.lastCompletedCount = undefined;
81299
81439
  trackedSession.lastTodoSnapshot = undefined;
@@ -82355,13 +82495,13 @@ async function runCommentChecker(input, options) {
82355
82495
  process3.stdin.end();
82356
82496
  let timeoutId = null;
82357
82497
  let graceId = null;
82358
- const timeoutPromise = new Promise((resolve13) => {
82498
+ const timeoutPromise = new Promise((resolve12) => {
82359
82499
  timeoutId = setTimer(() => {
82360
82500
  killProcessSafely(process3, "SIGTERM");
82361
82501
  graceId = setTimer(() => {
82362
82502
  killProcessSafely(process3, "SIGKILL");
82363
82503
  }, killGraceMs);
82364
- resolve13("timeout");
82504
+ resolve12("timeout");
82365
82505
  }, timeoutMs);
82366
82506
  });
82367
82507
  try {
@@ -82398,7 +82538,7 @@ async function runCommentChecker(input, options) {
82398
82538
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
82399
82539
  import { existsSync as existsSync38, appendFileSync as appendFileSync3 } from "fs";
82400
82540
  import { join as join45 } from "path";
82401
- import { homedir as homedir16, tmpdir as tmpdir3 } from "os";
82541
+ import { homedir as homedir15, tmpdir as tmpdir3 } from "os";
82402
82542
  import { createRequire as createRequire3 } from "module";
82403
82543
  init_logger2();
82404
82544
  init_plugin_identity();
@@ -82422,11 +82562,11 @@ var PLATFORM_MAP = {
82422
82562
  function getCacheDir2() {
82423
82563
  if (process.platform === "win32") {
82424
82564
  const localAppData = process.env.LOCALAPPDATA || process.env.APPDATA;
82425
- const base2 = localAppData || join45(homedir16(), "AppData", "Local");
82565
+ const base2 = localAppData || join45(homedir15(), "AppData", "Local");
82426
82566
  return join45(base2, CACHE_DIR_NAME, "bin");
82427
82567
  }
82428
82568
  const xdgCache = process.env.XDG_CACHE_HOME;
82429
- const base = xdgCache || join45(homedir16(), ".cache");
82569
+ const base = xdgCache || join45(homedir15(), ".cache");
82430
82570
  return join45(base, CACHE_DIR_NAME, "bin");
82431
82571
  }
82432
82572
  function getBinaryName() {
@@ -82460,8 +82600,8 @@ async function downloadCommentChecker() {
82460
82600
  return binaryPath;
82461
82601
  }
82462
82602
  const version = getPackageVersion();
82463
- const { os: os5, arch, ext } = platformInfo;
82464
- const assetName = `comment-checker_v${version}_${os5}_${arch}.${ext}`;
82603
+ const { os: os4, arch, ext } = platformInfo;
82604
+ const assetName = `comment-checker_v${version}_${os4}_${arch}.${ext}`;
82465
82605
  const downloadUrl = `https://github.com/${REPO}/releases/download/v${version}/${assetName}`;
82466
82606
  debugLog(`Downloading from: ${downloadUrl}`);
82467
82607
  log2(`[${PUBLISHED_PACKAGE_NAME}] Downloading comment-checker binary...`);
@@ -82781,13 +82921,20 @@ function debugLog3(...args) {
82781
82921
  fs9.appendFileSync(DEBUG_FILE3, msg);
82782
82922
  }
82783
82923
  }
82784
- function createCommentCheckerHooks(config) {
82924
+ function createCommentCheckerHooks(config, cliRunner) {
82925
+ const runner3 = cliRunner ?? {
82926
+ initializeCommentCheckerCli,
82927
+ getCommentCheckerCliPathPromise,
82928
+ isCliPathUsable,
82929
+ processWithCli,
82930
+ processApplyPatchEditsWithCli
82931
+ };
82785
82932
  debugLog3("createCommentCheckerHooks called", { config });
82786
82933
  return {
82787
82934
  "tool.execute.before": async (input, output) => {
82788
82935
  ensureCommentCheckerInitialization(() => {
82789
82936
  startPendingCallCleanup();
82790
- initializeCommentCheckerCli(debugLog3);
82937
+ runner3.initializeCommentCheckerCli(debugLog3);
82791
82938
  });
82792
82939
  debugLog3("tool.execute.before:", {
82793
82940
  tool: input.tool,
@@ -82841,13 +82988,13 @@ function createCommentCheckerHooks(config) {
82841
82988
  return;
82842
82989
  }
82843
82990
  try {
82844
- const cliPath = await getCommentCheckerCliPathPromise();
82845
- if (!isCliPathUsable(cliPath)) {
82991
+ const cliPath = await runner3.getCommentCheckerCliPathPromise();
82992
+ if (!runner3.isCliPathUsable(cliPath)) {
82846
82993
  debugLog3("CLI not available, skipping comment check");
82847
82994
  return;
82848
82995
  }
82849
82996
  debugLog3("using CLI for apply_patch:", cliPath);
82850
- await processApplyPatchEditsWithCli(input.sessionID, edits, output, cliPath, config?.custom_prompt, debugLog3);
82997
+ await runner3.processApplyPatchEditsWithCli(input.sessionID, edits, output, cliPath, config?.custom_prompt, debugLog3);
82851
82998
  } catch (err) {
82852
82999
  debugLog3("apply_patch comment check failed:", err);
82853
83000
  }
@@ -82860,13 +83007,13 @@ function createCommentCheckerHooks(config) {
82860
83007
  }
82861
83008
  debugLog3("processing pendingCall:", pendingCall);
82862
83009
  try {
82863
- const cliPath = await getCommentCheckerCliPathPromise();
82864
- if (!isCliPathUsable(cliPath)) {
83010
+ const cliPath = await runner3.getCommentCheckerCliPathPromise();
83011
+ if (!runner3.isCliPathUsable(cliPath)) {
82865
83012
  debugLog3("CLI not available, skipping comment check");
82866
83013
  return;
82867
83014
  }
82868
83015
  debugLog3("using CLI:", cliPath);
82869
- await processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, debugLog3);
83016
+ await runner3.processWithCli(input, pendingCall, output, cliPath, config?.custom_prompt, debugLog3);
82870
83017
  } catch (err) {
82871
83018
  debugLog3("tool.execute.after failed:", err);
82872
83019
  }
@@ -82947,7 +83094,7 @@ function createAgentsMdCache() {
82947
83094
  }
82948
83095
  // packages/rules-engine/src/agents-md.ts
82949
83096
  import { existsSync as existsSync41, realpathSync as realpathSync8, statSync as statSync5 } from "fs";
82950
- import { dirname as dirname11, isAbsolute as isAbsolute7, join as join48, relative as relative6, resolve as resolve13 } from "path";
83097
+ import { dirname as dirname11, isAbsolute as isAbsolute7, join as join48, relative as relative6, resolve as resolve12 } from "path";
82951
83098
 
82952
83099
  // packages/rules-engine/src/constants.ts
82953
83100
  var PROJECT_MARKERS = [".git", "pyproject.toml", "package.json", "Cargo.toml", "go.mod", ".venv"];
@@ -83016,7 +83163,7 @@ function canonicalizePath(path8) {
83016
83163
  return realpathSync8(path8);
83017
83164
  } catch (error) {
83018
83165
  if (error instanceof Error)
83019
- return resolve13(path8);
83166
+ return resolve12(path8);
83020
83167
  throw error;
83021
83168
  }
83022
83169
  }
@@ -83038,8 +83185,8 @@ function isSameOrChildPath(childPath, parentPath) {
83038
83185
  }
83039
83186
  // packages/rules-engine/src/finder.ts
83040
83187
  import { existsSync as existsSync43, statSync as statSync6 } from "fs";
83041
- import { homedir as homedir17 } from "os";
83042
- import { dirname as dirname13, isAbsolute as isAbsolute9, join as join50, relative as relative8, resolve as resolve14 } from "path";
83188
+ import { homedir as homedir16 } from "os";
83189
+ import { dirname as dirname13, isAbsolute as isAbsolute9, join as join50, relative as relative8, resolve as resolve13 } from "path";
83043
83190
 
83044
83191
  // packages/rules-engine/src/ordering.ts
83045
83192
  function sortCandidates(candidates) {
@@ -83126,7 +83273,7 @@ function setSisyphusRuleDeprecationLogger(logger6) {
83126
83273
  logSisyphusRuleDeprecation = logger6;
83127
83274
  }
83128
83275
  function findRuleFiles(projectRoot, homeDir, currentFile, options, cache) {
83129
- const startDir = dirname13(resolve14(currentFile));
83276
+ const startDir = dirname13(resolve13(currentFile));
83130
83277
  const skipClaudeUserRules = options?.skipClaudeUserRules ?? false;
83131
83278
  const effectiveProjectRoot = resolveEffectiveProjectRoot(projectRoot, options?.workspaceDirectory, startDir);
83132
83279
  const cacheKey = [projectRoot ?? "", effectiveProjectRoot, startDir, skipClaudeUserRules ? "1" : "0"].join("\x00");
@@ -83137,7 +83284,7 @@ function findRuleFiles(projectRoot, homeDir, currentFile, options, cache) {
83137
83284
  const seenRealPaths = new Set;
83138
83285
  addProjectRuleCandidates(effectiveProjectRoot, startDir, candidates, seenRealPaths, cache);
83139
83286
  addProjectSingleFileCandidates(effectiveProjectRoot, candidates, seenRealPaths);
83140
- addUserRuleCandidates(homeDir || homedir17(), skipClaudeUserRules, candidates, seenRealPaths, cache);
83287
+ addUserRuleCandidates(homeDir || homedir16(), skipClaudeUserRules, candidates, seenRealPaths, cache);
83141
83288
  const sorted = sortCandidates(candidates);
83142
83289
  cache?.set(cacheKey, sorted);
83143
83290
  return sorted;
@@ -83147,7 +83294,7 @@ function resolveEffectiveProjectRoot(projectRoot, workspaceDirectory, startDir)
83147
83294
  return projectRoot;
83148
83295
  if (!workspaceDirectory)
83149
83296
  return startDir;
83150
- const workspaceRoot = resolve14(workspaceDirectory);
83297
+ const workspaceRoot = resolve13(workspaceDirectory);
83151
83298
  return isSameOrChildPath2(startDir, workspaceRoot) ? workspaceRoot : startDir;
83152
83299
  }
83153
83300
  function addProjectRuleCandidates(projectRoot, startDir, candidates, seenRealPaths, cache) {
@@ -83395,11 +83542,11 @@ var TRUNCATION_NOTICE_PREFIX = `
83395
83542
  var TRUNCATION_NOTICE_SUFFIX = "]";
83396
83543
  // packages/agents-md-core/src/finder.ts
83397
83544
  import { realpathSync as realpathSync10 } from "fs";
83398
- import { isAbsolute as isAbsolute10, relative as relative10, resolve as resolve15 } from "path";
83545
+ import { isAbsolute as isAbsolute10, relative as relative10, resolve as resolve14 } from "path";
83399
83546
  function resolveFilePath2(rootDirectory, path8) {
83400
83547
  if (!path8)
83401
83548
  return null;
83402
- const resolved = isAbsolute10(path8) ? path8 : resolve15(rootDirectory, path8);
83549
+ const resolved = isAbsolute10(path8) ? path8 : resolve14(rootDirectory, path8);
83403
83550
  const canonicalRoot = canonicalizePath2(rootDirectory);
83404
83551
  const canonicalResolved = canonicalizePath2(resolved);
83405
83552
  return isSameOrChildPath3(canonicalResolved, canonicalRoot) ? canonicalResolved : null;
@@ -83409,7 +83556,7 @@ function canonicalizePath2(path8) {
83409
83556
  return realpathSync10(path8);
83410
83557
  } catch (error) {
83411
83558
  if (error instanceof Error) {
83412
- return resolve15(path8);
83559
+ return resolve14(path8);
83413
83560
  }
83414
83561
  throw error;
83415
83562
  }
@@ -83589,7 +83736,7 @@ import { dirname as dirname17 } from "path";
83589
83736
 
83590
83737
  // packages/omo-opencode/src/hooks/directory-readme-injector/finder.ts
83591
83738
  import { access as access2 } from "fs/promises";
83592
- import { dirname as dirname16, isAbsolute as isAbsolute11, join as join55, resolve as resolve16 } from "path";
83739
+ import { dirname as dirname16, isAbsolute as isAbsolute11, join as join55, resolve as resolve15 } from "path";
83593
83740
 
83594
83741
  // packages/omo-opencode/src/hooks/directory-readme-injector/constants.ts
83595
83742
  import { join as join54 } from "path";
@@ -83602,7 +83749,7 @@ function resolveFilePath3(rootDirectory, path8) {
83602
83749
  return null;
83603
83750
  if (isAbsolute11(path8))
83604
83751
  return path8;
83605
- return resolve16(rootDirectory, path8);
83752
+ return resolve15(rootDirectory, path8);
83606
83753
  }
83607
83754
  async function findReadmeMdUp(input) {
83608
83755
  const found = [];
@@ -84916,18 +85063,23 @@ async function findEmptyMessageByIndexFromSDK(client3, sessionID, targetIndex) {
84916
85063
  return null;
84917
85064
  }
84918
85065
  }
84919
- async function fixEmptyMessagesWithSDK(params) {
85066
+ var defaultStorage = {
85067
+ replaceEmptyTextPartsAsync,
85068
+ findMessagesWithEmptyTextPartsFromSDK,
85069
+ injectTextPartAsync
85070
+ };
85071
+ async function fixEmptyMessagesWithSDK(params, storage2 = defaultStorage) {
84920
85072
  let fixed = false;
84921
85073
  const fixedMessageIds = [];
84922
85074
  if (params.messageIndex !== undefined) {
84923
85075
  const targetMessageId = await findEmptyMessageByIndexFromSDK(params.client, params.sessionID, params.messageIndex);
84924
85076
  if (targetMessageId) {
84925
- const replaced = await replaceEmptyTextPartsAsync(params.client, params.sessionID, targetMessageId, params.placeholderText);
85077
+ const replaced = await storage2.replaceEmptyTextPartsAsync(params.client, params.sessionID, targetMessageId, params.placeholderText);
84926
85078
  if (replaced) {
84927
85079
  fixed = true;
84928
85080
  fixedMessageIds.push(targetMessageId);
84929
85081
  } else {
84930
- const injected = await injectTextPartAsync(params.client, params.sessionID, targetMessageId, params.placeholderText);
85082
+ const injected = await storage2.injectTextPartAsync(params.client, params.sessionID, targetMessageId, params.placeholderText);
84931
85083
  if (injected) {
84932
85084
  fixed = true;
84933
85085
  fixedMessageIds.push(targetMessageId);
@@ -84939,19 +85091,19 @@ async function fixEmptyMessagesWithSDK(params) {
84939
85091
  return { fixed, fixedMessageIds, scannedEmptyCount: 0 };
84940
85092
  }
84941
85093
  const emptyMessageIds = await findEmptyMessagesFromSDK(params.client, params.sessionID);
84942
- const emptyTextPartIds = await findMessagesWithEmptyTextPartsFromSDK(params.client, params.sessionID);
85094
+ const emptyTextPartIds = await storage2.findMessagesWithEmptyTextPartsFromSDK(params.client, params.sessionID);
84943
85095
  const additionalIds = emptyTextPartIds.filter((id) => !emptyMessageIds.includes(id));
84944
85096
  const allTargetIds = [...emptyMessageIds, ...additionalIds];
84945
85097
  if (allTargetIds.length === 0) {
84946
85098
  return { fixed: false, fixedMessageIds: [], scannedEmptyCount: 0 };
84947
85099
  }
84948
85100
  for (const messageID of allTargetIds) {
84949
- const replaced = await replaceEmptyTextPartsAsync(params.client, params.sessionID, messageID, params.placeholderText);
85101
+ const replaced = await storage2.replaceEmptyTextPartsAsync(params.client, params.sessionID, messageID, params.placeholderText);
84950
85102
  if (replaced) {
84951
85103
  fixed = true;
84952
85104
  fixedMessageIds.push(messageID);
84953
85105
  } else {
84954
- const injected = await injectTextPartAsync(params.client, params.sessionID, messageID, params.placeholderText);
85106
+ const injected = await storage2.injectTextPartAsync(params.client, params.sessionID, messageID, params.placeholderText);
84955
85107
  if (injected) {
84956
85108
  fixed = true;
84957
85109
  fixedMessageIds.push(messageID);
@@ -86601,14 +86753,14 @@ import { existsSync as existsSync54 } from "fs";
86601
86753
  import { join as join64 } from "path";
86602
86754
  var CONFIG_CACHE_TTL_MS2 = 30000;
86603
86755
  var configCache2 = new Map;
86604
- function getUserConfigPath() {
86605
- return join64(getOpenCodeConfigDir({ binary: "opencode" }), "opencode-cc-plugin.json");
86756
+ function getUserConfigPaths() {
86757
+ return getOpenCodeConfigDirs({ binary: "opencode" }).map((dir) => join64(dir, "opencode-cc-plugin.json"));
86606
86758
  }
86607
86759
  function getProjectConfigPath() {
86608
86760
  return join64(process.cwd(), ".opencode", "opencode-cc-plugin.json");
86609
86761
  }
86610
86762
  function getCacheKey2() {
86611
- return `${process.cwd()}::${getUserConfigPath()}`;
86763
+ return `${process.cwd()}::${getUserConfigPaths().join("|")}`;
86612
86764
  }
86613
86765
  function getCachedConfig2(cacheKey) {
86614
86766
  const cachedEntry = configCache2.get(cacheKey);
@@ -86663,16 +86815,26 @@ async function loadPluginExtendedConfig() {
86663
86815
  if (cachedConfig) {
86664
86816
  return cachedConfig;
86665
86817
  }
86666
- const userConfig = await loadConfigFromPath(getUserConfigPath());
86818
+ const userPaths = [...getUserConfigPaths()].reverse();
86819
+ let mergedDisabledHooks = {};
86820
+ for (const userPath of userPaths) {
86821
+ const userConfig = await loadConfigFromPath(userPath);
86822
+ if (userConfig?.disabledHooks) {
86823
+ mergedDisabledHooks = mergeDisabledHooks(mergedDisabledHooks, userConfig.disabledHooks);
86824
+ }
86825
+ }
86667
86826
  const projectConfig = await loadConfigFromPath(getProjectConfigPath());
86827
+ if (projectConfig?.disabledHooks) {
86828
+ mergedDisabledHooks = mergeDisabledHooks(mergedDisabledHooks, projectConfig.disabledHooks);
86829
+ }
86668
86830
  const merged = {
86669
- disabledHooks: mergeDisabledHooks(userConfig?.disabledHooks, projectConfig?.disabledHooks)
86831
+ disabledHooks: mergedDisabledHooks
86670
86832
  };
86671
- if (userConfig || projectConfig) {
86833
+ if (Object.keys(mergedDisabledHooks).length > 0 || projectConfig) {
86672
86834
  log2("Plugin extended config loaded", {
86673
- userConfigExists: userConfig !== null,
86835
+ userConfigPaths: getUserConfigPaths(),
86674
86836
  projectConfigExists: projectConfig !== null,
86675
- mergedDisabledHooks: merged.disabledHooks
86837
+ mergedDisabledHooks
86676
86838
  });
86677
86839
  }
86678
86840
  configCache2.set(cacheKey, {
@@ -88111,12 +88273,12 @@ function readCurrentTopLevelTask(planPath) {
88111
88273
  }
88112
88274
  // packages/boulder-state/src/storage/path.ts
88113
88275
  import { existsSync as existsSync57 } from "fs";
88114
- import { isAbsolute as isAbsolute12, join as join67, relative as relative11, resolve as resolve17 } from "path";
88276
+ import { isAbsolute as isAbsolute12, join as join67, relative as relative11, resolve as resolve16 } from "path";
88115
88277
  function getBoulderFilePath(directory) {
88116
88278
  return join67(directory, BOULDER_DIR, BOULDER_FILE);
88117
88279
  }
88118
88280
  function resolveTrackedPath(baseDirectory, trackedPath) {
88119
- return isAbsolute12(trackedPath) ? resolve17(trackedPath) : resolve17(baseDirectory, trackedPath);
88281
+ return isAbsolute12(trackedPath) ? resolve16(trackedPath) : resolve16(baseDirectory, trackedPath);
88120
88282
  }
88121
88283
  function resolveBoulderPlanPath(directory, state3) {
88122
88284
  const absolutePlanPath = resolveTrackedPath(directory, state3.active_plan);
@@ -88124,13 +88286,13 @@ function resolveBoulderPlanPath(directory, state3) {
88124
88286
  if (!worktreePath) {
88125
88287
  return absolutePlanPath;
88126
88288
  }
88127
- const absoluteDirectory = resolve17(directory);
88289
+ const absoluteDirectory = resolve16(directory);
88128
88290
  const relativePlanPath = relative11(absoluteDirectory, absolutePlanPath);
88129
88291
  if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute12(relativePlanPath)) {
88130
88292
  return absolutePlanPath;
88131
88293
  }
88132
88294
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
88133
- const worktreePlanPath = resolve17(absoluteWorktreePath, relativePlanPath);
88295
+ const worktreePlanPath = resolve16(absoluteWorktreePath, relativePlanPath);
88134
88296
  return existsSync57(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
88135
88297
  }
88136
88298
  function resolveBoulderPlanPathForWork(directory, work) {
@@ -88998,7 +89160,7 @@ function createSessionRuleScanCacheStore() {
88998
89160
  }
88999
89161
 
89000
89162
  // packages/omo-opencode/src/hooks/rules-injector/injection-processor.ts
89001
- import { homedir as homedir18 } from "os";
89163
+ import { homedir as homedir17 } from "os";
89002
89164
  // packages/omo-opencode/src/hooks/rules-injector/rule-file-finder.ts
89003
89165
  init_logger2();
89004
89166
  setSisyphusRuleDeprecationLogger(log2);
@@ -89104,13 +89266,13 @@ function setParsedRuleCacheEntry(realPath, entry) {
89104
89266
  }
89105
89267
 
89106
89268
  // packages/omo-opencode/src/hooks/rules-injector/path-resolution.ts
89107
- import { resolve as resolve18 } from "path";
89269
+ import { resolve as resolve17 } from "path";
89108
89270
  function resolveFilePath4(workspaceDirectory, path8) {
89109
89271
  if (!path8)
89110
89272
  return null;
89111
89273
  if (path8.startsWith("/"))
89112
89274
  return path8;
89113
- return resolve18(workspaceDirectory, path8);
89275
+ return resolve17(workspaceDirectory, path8);
89114
89276
  }
89115
89277
 
89116
89278
  // packages/omo-opencode/src/hooks/rules-injector/rule-match-reason.ts
@@ -89144,7 +89306,7 @@ function createRuleInjectionProcessor(deps) {
89144
89306
  getSessionCache: getSessionCache3,
89145
89307
  getSessionRuleScanCache,
89146
89308
  ruleFinderOptions,
89147
- homedir: getHomeDir = homedir18,
89309
+ homedir: getHomeDir = homedir17,
89148
89310
  shouldApplyRule: shouldApplyRuleImpl = shouldApplyRule,
89149
89311
  isDuplicateByRealPath: isDuplicateByRealPathImpl = isDuplicateByRealPath,
89150
89312
  createContentHash: createContentHashImpl = createContentHash,
@@ -89431,7 +89593,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
89431
89593
 
89432
89594
  // packages/omo-opencode/src/hooks/auto-update-checker/constants.ts
89433
89595
  import * as path8 from "path";
89434
- import * as os5 from "os";
89596
+ import * as os4 from "os";
89435
89597
  init_plugin_identity();
89436
89598
  var PACKAGE_NAME = PUBLISHED_PACKAGE_NAME;
89437
89599
  var ACCEPTED_PACKAGE_NAMES2 = ACCEPTED_PACKAGE_NAMES;
@@ -89440,10 +89602,10 @@ var NPM_FETCH_TIMEOUT = 5000;
89440
89602
  var CACHE_ROOT_DIR = getOpenCodeCacheDir();
89441
89603
  var CACHE_DIR = path8.join(CACHE_ROOT_DIR, "packages");
89442
89604
  var VERSION_FILE = path8.join(CACHE_ROOT_DIR, "version");
89443
- function getWindowsAppdataDir2() {
89605
+ function getWindowsAppdataDir() {
89444
89606
  if (process.platform !== "win32")
89445
89607
  return null;
89446
- return process.env.APPDATA ?? path8.join(os5.homedir(), "AppData", "Roaming");
89608
+ return process.env.APPDATA ?? path8.join(os4.homedir(), "AppData", "Roaming");
89447
89609
  }
89448
89610
  function getUserConfigDir() {
89449
89611
  return getOpenCodeConfigDir({ binary: "opencode" });
@@ -89458,7 +89620,7 @@ var INSTALLED_PACKAGE_JSON = path8.join(CACHE_DIR, "node_modules", PACKAGE_NAME,
89458
89620
  var INSTALLED_PACKAGE_JSON_CANDIDATES = ACCEPTED_PACKAGE_NAMES2.map((name) => path8.join(CACHE_DIR, "node_modules", name, "package.json"));
89459
89621
 
89460
89622
  // packages/omo-opencode/src/hooks/auto-update-checker/checker/config-paths.ts
89461
- import * as os6 from "os";
89623
+ import * as os5 from "os";
89462
89624
  import * as path9 from "path";
89463
89625
  function getConfigPaths2(directory) {
89464
89626
  const userConfigDir = getUserConfigDir();
@@ -89469,8 +89631,8 @@ function getConfigPaths2(directory) {
89469
89631
  getUserOpencodeConfigJsonc()
89470
89632
  ];
89471
89633
  if (process.platform === "win32") {
89472
- const crossPlatformDir = path9.join(os6.homedir(), ".config");
89473
- const appdataDir = getWindowsAppdataDir2();
89634
+ const crossPlatformDir = path9.join(os5.homedir(), ".config");
89635
+ const appdataDir = getWindowsAppdataDir();
89474
89636
  if (appdataDir) {
89475
89637
  const alternateDir = userConfigDir === crossPlatformDir ? appdataDir : crossPlatformDir;
89476
89638
  const alternateConfig = path9.join(alternateDir, "opencode", "opencode.json");
@@ -89670,7 +89832,7 @@ function getCachedVersion(options = {}) {
89670
89832
  // package.json
89671
89833
  var package_default = {
89672
89834
  name: "oh-my-opencode",
89673
- version: "4.18.0",
89835
+ version: "4.18.2",
89674
89836
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
89675
89837
  main: "./dist/index.js",
89676
89838
  types: "dist/index.d.ts",
@@ -89779,7 +89941,8 @@ var package_default = {
89779
89941
  "build:codex-install": "bun run script/build-codex-install.ts",
89780
89942
  "install:codex-dev": "bun run script/build-codex-install.ts && bun run script/install-codex-dev.ts",
89781
89943
  "build:codex-plugin": "npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build",
89782
- "build:senpi-plugin": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check",
89944
+ "build:senpi-plugin": "bun run build:lsp-daemon && bun run build:senpi-plugin:stage",
89945
+ "build:senpi-plugin:stage": "node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && node packages/omo-senpi/plugin/scripts/build-install.mjs",
89783
89946
  "build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
89784
89947
  "build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
89785
89948
  "build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
@@ -89801,7 +89964,7 @@ var package_default = {
89801
89964
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
89802
89965
  test: "bun test",
89803
89966
  "test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
89804
- "test:senpi": "node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && bun test packages/omo-senpi",
89967
+ "test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test packages/omo-senpi",
89805
89968
  "test:windows-codex": "bun run test:codex",
89806
89969
  "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
89807
89970
  },
@@ -89841,7 +90004,6 @@ var package_default = {
89841
90004
  picocolors: "^1.1.1",
89842
90005
  picomatch: "^4.0.4",
89843
90006
  "posthog-node": "^5.34.3",
89844
- "vscode-jsonrpc": "^8.2.1",
89845
90007
  zod: "^4.4.3"
89846
90008
  },
89847
90009
  devDependencies: {
@@ -89882,18 +90044,18 @@ var package_default = {
89882
90044
  typescript: "^6.0.3"
89883
90045
  },
89884
90046
  optionalDependencies: {
89885
- "oh-my-opencode-darwin-arm64": "4.18.0",
89886
- "oh-my-opencode-darwin-x64": "4.18.0",
89887
- "oh-my-opencode-darwin-x64-baseline": "4.18.0",
89888
- "oh-my-opencode-linux-arm64": "4.18.0",
89889
- "oh-my-opencode-linux-arm64-musl": "4.18.0",
89890
- "oh-my-opencode-linux-x64": "4.18.0",
89891
- "oh-my-opencode-linux-x64-baseline": "4.18.0",
89892
- "oh-my-opencode-linux-x64-musl": "4.18.0",
89893
- "oh-my-opencode-linux-x64-musl-baseline": "4.18.0",
89894
- "oh-my-opencode-windows-arm64": "4.18.0",
89895
- "oh-my-opencode-windows-x64": "4.18.0",
89896
- "oh-my-opencode-windows-x64-baseline": "4.18.0"
90047
+ "oh-my-opencode-darwin-arm64": "4.18.2",
90048
+ "oh-my-opencode-darwin-x64": "4.18.2",
90049
+ "oh-my-opencode-darwin-x64-baseline": "4.18.2",
90050
+ "oh-my-opencode-linux-arm64": "4.18.2",
90051
+ "oh-my-opencode-linux-arm64-musl": "4.18.2",
90052
+ "oh-my-opencode-linux-x64": "4.18.2",
90053
+ "oh-my-opencode-linux-x64-baseline": "4.18.2",
90054
+ "oh-my-opencode-linux-x64-musl": "4.18.2",
90055
+ "oh-my-opencode-linux-x64-musl-baseline": "4.18.2",
90056
+ "oh-my-opencode-windows-arm64": "4.18.2",
90057
+ "oh-my-opencode-windows-x64": "4.18.2",
90058
+ "oh-my-opencode-windows-x64-baseline": "4.18.2"
89897
90059
  },
89898
90060
  overrides: {
89899
90061
  "@earendil-works/pi-agent-core": "0.80.3",
@@ -90190,8 +90352,8 @@ function toReadableStream2(stream) {
90190
90352
  function wrapNodeProcess2(proc) {
90191
90353
  let resolveExited;
90192
90354
  let exitCode = null;
90193
- const exited = new Promise((resolve19, reject) => {
90194
- resolveExited = resolve19;
90355
+ const exited = new Promise((resolve18, reject) => {
90356
+ resolveExited = resolve18;
90195
90357
  proc.on("error", (error) => {
90196
90358
  if (exitCode === null) {
90197
90359
  exitCode = 1;
@@ -90290,8 +90452,8 @@ async function runBunInstallWithDetails(options) {
90290
90452
  });
90291
90453
  const outputPromise = Promise.all([readProcessOutput(proc.stdout), readProcessOutput(proc.stderr)]).then(([stdout, stderr]) => ({ stdout, stderr }));
90292
90454
  let timeoutId;
90293
- const timeoutPromise = new Promise((resolve19) => {
90294
- timeoutId = setTimeout(() => resolve19("timeout"), BUN_INSTALL_TIMEOUT_MS);
90455
+ const timeoutPromise = new Promise((resolve18) => {
90456
+ timeoutId = setTimeout(() => resolve18("timeout"), BUN_INSTALL_TIMEOUT_MS);
90295
90457
  });
90296
90458
  const exitPromise = proc.exited.then(() => "completed");
90297
90459
  const result = await Promise.race([exitPromise, timeoutPromise]);
@@ -90785,7 +90947,7 @@ async function showSpinnerToast(ctx, version, message) {
90785
90947
  duration: frameInterval + 50
90786
90948
  }
90787
90949
  }).catch(ignoreToastError);
90788
- await new Promise((resolve19) => setTimeout(resolve19, frameInterval));
90950
+ await new Promise((resolve18) => setTimeout(resolve18, frameInterval));
90789
90951
  }
90790
90952
  }
90791
90953
 
@@ -90885,7 +91047,7 @@ v${latestVersion} available. Restart OpenCode to apply.` : "OpenCode is now on S
90885
91047
  // packages/omo-opencode/src/hooks/codegraph-bootstrap/hook.ts
90886
91048
  init_src();
90887
91049
  import { existsSync as existsSync71 } from "fs";
90888
- import { homedir as homedir21 } from "os";
91050
+ import { homedir as homedir20 } from "os";
90889
91051
  import { join as join80 } from "path";
90890
91052
 
90891
91053
  // packages/omo-opencode/src/hooks/codegraph-bootstrap/command-runner.ts
@@ -90908,7 +91070,7 @@ function resolveExitCode(error) {
90908
91070
  async function runCodegraphCommand(projectRoot, command, args, options) {
90909
91071
  const { execFile: execFile3 } = await import("child_process");
90910
91072
  const invocation = resolveCodegraphCommandInvocation(command, args);
90911
- return new Promise((resolve19) => {
91073
+ return new Promise((resolve18) => {
90912
91074
  execFile3(invocation.command, [...invocation.args], {
90913
91075
  cwd: projectRoot,
90914
91076
  encoding: "utf8",
@@ -90918,10 +91080,10 @@ async function runCodegraphCommand(projectRoot, command, args, options) {
90918
91080
  windowsHide: true
90919
91081
  }, (error, stdout, stderr) => {
90920
91082
  if (error === null) {
90921
- resolve19({ exitCode: 0, stderr: toOutputText(stderr), stdout: toOutputText(stdout), timedOut: false });
91083
+ resolve18({ exitCode: 0, stderr: toOutputText(stderr), stdout: toOutputText(stdout), timedOut: false });
90922
91084
  return;
90923
91085
  }
90924
- resolve19({
91086
+ resolve18({
90925
91087
  exitCode: resolveExitCode(error),
90926
91088
  stderr: toOutputText(stderr),
90927
91089
  stdout: toOutputText(stdout),
@@ -90943,7 +91105,7 @@ function resolveCodegraphCommandInvocation(command, args, platform2 = process.pl
90943
91105
 
90944
91106
  // packages/omo-opencode/src/hooks/codegraph-bootstrap/project-root.ts
90945
91107
  init_src();
90946
- import { resolve as resolve19 } from "path";
91108
+ import { resolve as resolve18 } from "path";
90947
91109
  var PROJECT_ROOT_KEYS = ["directory", "worktree", "cwd", "projectRoot", "projectPath"];
90948
91110
  function readStringField(record, key) {
90949
91111
  const value = record[key];
@@ -90976,8 +91138,8 @@ function readRecordRoot(record) {
90976
91138
  }
90977
91139
  function resolveCodegraphProjectRoot(properties, fallbackDirectory) {
90978
91140
  if (!isRecord(properties))
90979
- return resolve19(fallbackDirectory);
90980
- return resolve19(readRecordRoot(properties) ?? fallbackDirectory);
91141
+ return resolve18(fallbackDirectory);
91142
+ return resolve18(readRecordRoot(properties) ?? fallbackDirectory);
90981
91143
  }
90982
91144
 
90983
91145
  // packages/omo-opencode/src/hooks/codegraph-bootstrap/status.ts
@@ -91039,7 +91201,7 @@ function defaultSchedule(task) {
91039
91201
  timer.unref?.();
91040
91202
  }
91041
91203
  function defaultInstallDir2() {
91042
- return join80(homedir21(), ".omo", "codegraph");
91204
+ return join80(homedir20(), ".omo", "codegraph");
91043
91205
  }
91044
91206
  function provisionedBinFromInstallDir(installDir) {
91045
91207
  if (installDir === undefined)
@@ -91178,7 +91340,7 @@ function createCodegraphBootstrapHook(ctx, config, depsOverride = {}) {
91178
91340
  }
91179
91341
  // packages/omo-opencode/src/hooks/ast-grep-sg-provision/hook.ts
91180
91342
  init_src();
91181
- import { homedir as homedir22 } from "os";
91343
+ import { homedir as homedir21 } from "os";
91182
91344
  import { join as join81 } from "path";
91183
91345
  var provisionedTargets = new Set;
91184
91346
  function defaultSchedule2(task) {
@@ -91198,7 +91360,7 @@ async function runProvision(targetDir, deps) {
91198
91360
  }
91199
91361
  var defaultDeps5 = {
91200
91362
  findSgBinary: findSgBinarySync,
91201
- homeDir: homedir22,
91363
+ homeDir: homedir21,
91202
91364
  log: log2,
91203
91365
  provisionSgBinary,
91204
91366
  schedule: defaultSchedule2
@@ -95627,8 +95789,8 @@ Before acting, survey the skills available in this system: scan their descriptio
95627
95789
  **ALWAYS run both tracks in parallel:**
95628
95790
  \`\`\`
95629
95791
  // Fire background agents for deep exploration
95630
- task(subagent_type="explore", load_skills=[], prompt="I'm implementing [TASK] and need to understand [KNOWLEDGE GAP]. Find [X] patterns in the codebase - file paths, implementation approach, conventions used, and how modules connect. I'll use this to [DOWNSTREAM DECISION]. Focus on production code in src/. Return file paths with brief descriptions.", run_in_background=true)
95631
- task(subagent_type="librarian", load_skills=[], prompt="I'm working with [TECHNOLOGY] and need [SPECIFIC INFO]. Find official docs and production examples for [Y] - API reference, configuration, recommended patterns, and pitfalls. Skip tutorials. I'll use this to [DECISION THIS INFORMS].", run_in_background=true)
95792
+ task(subagent_type="explore", load_skills=[], prompt="CONTEXT: implementing [TASK]; gap: [KNOWLEDGE GAP]. GOAL: find [X] patterns in the codebase - file paths, implementation approach, conventions, module connections - to unblock [DOWNSTREAM DECISION]. Focus on production code in src/. STOP WHEN: the findings answer the gap or two search rounds add nothing new. EVIDENCE: file:line refs with one-line descriptions.", run_in_background=true)
95793
+ task(subagent_type="librarian", load_skills=[], prompt="CONTEXT: working with [TECHNOLOGY]; need [SPECIFIC INFO]. GOAL: official docs and production examples for [Y] - API reference, configuration, recommended patterns, pitfalls - to unblock [DECISION THIS INFORMS]. Skip tutorials. STOP WHEN: the cited sources answer [SPECIFIC INFO] or sources repeat. EVIDENCE: source links with the claim each supports.", run_in_background=true)
95632
95794
 
95633
95795
  // WHILE THEY RUN - use direct tools for immediate context
95634
95796
  grep(pattern="relevant_pattern", path="src/")
@@ -95647,7 +95809,7 @@ deep_context = background_output(task_id=...)
95647
95809
 
95648
95810
  **Execute:**
95649
95811
  - Surgical, minimal changes matching existing patterns
95650
- - If delegating: provide exhaustive context and success criteria
95812
+ - If delegating: every child prompt carries GOAL, STOP WHEN (the exact observable condition that ends its run \u2014 the child stops the moment it holds), and EVIDENCE (what it returns so you can verify, not trust) \u2014 plus exhaustive context. Judge the child by its returned EVIDENCE against its STOP WHEN, never by its self-report.
95651
95813
 
95652
95814
  **Verify (per-scenario, not just "at the end"):**
95653
95815
  - RED\u2192GREEN proof captured (test id + assertion msg in both states)
@@ -95666,7 +95828,7 @@ Define 3+ scenarios covering: **happy path**, **edge** (boundary / empty / malfo
95666
95828
  - The real surface that proves it.
95667
95829
  - The test file + test id (written test-first; see TDD).
95668
95830
 
95669
- Scenarios are the contract. Done = every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured.
95831
+ Scenarios are the contract. Done = every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured. Then declare WHEN TO STOP for the whole run, in one line: "I'll stop right away when <the exact observable state that ends this run>" \u2014 its end state MUST be the full STOP GOAL from the Stop rules, never scenario completion alone. The Stop rules bind to this line \u2014 the moment it holds, you stop.
95670
95832
 
95671
95833
  ## TDD (MANDATORY on every production change)
95672
95834
 
@@ -95710,13 +95872,12 @@ Name the exact tool + exact invocation per scenario (literal \`curl\` / \`send-k
95710
95872
 
95711
95873
  Trigger if user said "\uC5C4\uBC00"/"strictly"/"rigorously"/"properly review", or task touches 3+ files OR ran 20+ turns OR 30+ min, or it's a refactor/migration/perf/security change. Spawn a high-rigor reviewer via \`task\` with goal + scenarios + evidence + diff. A concern blocks only when it cites a success criterion the evidence fails \u2014 others are notes. Fix cited blockers, re-run only the affected QA, and re-submit the delta at most twice; an approval with only notes left counts as approval. If cited blockers remain after two re-reviews, surface them to the user before declaring done.
95712
95874
 
95713
- ## COMPLETION CRITERIA
95875
+ ## STOP RULES
95714
95876
 
95715
- Done when ALL of:
95716
- 1. Every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured.
95717
- 2. Full test suite green; lsp_diagnostics clean on changed files.
95718
- 3. Code matches existing patterns; no scope creep.
95719
- 4. Reviewer gate (if triggered) returned unconditional approval.
95877
+ - After each result, ask whether the user's core request can now be answered with useful evidence in hand. If yes, answer now \u2014 skip any remaining retrieval, ceremony, or verification that adds no evidence.
95878
+ - The STOP GOAL: every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured; full suite green and \`lsp_diagnostics\` clean on changed files; QA teardown receipts recorded; no scope creep; and (if triggered) the reviewer gate approved unconditionally. Above ALL of that, the decisive test \u2014 outranking every other consideration \u2014 is: is the user's problem ACTUALLY SOLVED in observable behavior? If no, you are NOT done, whatever the checklist says. If yes, deliver the final message and STOP \u2014 no hesitation, no extra verification pass, no polish loop. Work past the stop goal is scope creep, not diligence.
95879
+ - After 2 identical failed attempts at one step, surface what was tried and ask the user before another retry.
95880
+ - After 2 parallel exploration waves yield no new useful facts, stop exploring and act.
95720
95881
 
95721
95882
  **Deliver exactly what was asked. No more, no less.**
95722
95883
 
@@ -97111,6 +97272,27 @@ var DELEGATION_TOOLS = new Set([
97111
97272
  "task",
97112
97273
  "call_omo_agent"
97113
97274
  ]);
97275
+ function findLatestReminderTarget(messages, sessionStates) {
97276
+ for (let messageIndex = messages.length - 1;messageIndex >= 0; messageIndex -= 1) {
97277
+ const message = messages[messageIndex];
97278
+ if (message?.info.role !== "user")
97279
+ continue;
97280
+ const sessionID = message.info.sessionID;
97281
+ const messageID = message.info.id;
97282
+ if (typeof sessionID !== "string" || typeof messageID !== "string")
97283
+ continue;
97284
+ const state3 = sessionStates.get(sessionID);
97285
+ if (!state3?.reminderPending || state3.reminderShown || state3.delegationUsed)
97286
+ continue;
97287
+ for (let partIndex = message.parts.length - 1;partIndex >= 0; partIndex -= 1) {
97288
+ const part = message.parts[partIndex];
97289
+ if (part && isRealUserTextPart(part)) {
97290
+ return { message, messageID, sessionID, state: state3, textPartIndex: partIndex };
97291
+ }
97292
+ }
97293
+ }
97294
+ return;
97295
+ }
97114
97296
  function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97115
97297
  const sessionStates = new Map;
97116
97298
  const reminderMessage = buildReminderMessage(availableSkills);
@@ -97118,6 +97300,7 @@ function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97118
97300
  if (!sessionStates.has(sessionID)) {
97119
97301
  sessionStates.set(sessionID, {
97120
97302
  delegationUsed: false,
97303
+ reminderPending: false,
97121
97304
  reminderShown: false,
97122
97305
  toolCallCount: 0
97123
97306
  });
@@ -97131,7 +97314,7 @@ function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97131
97314
  const agentKey = getAgentConfigKey(agent);
97132
97315
  return TARGET_AGENTS.has(agentKey) || agentKey.includes("sisyphus") || agentKey.includes("atlas");
97133
97316
  }
97134
- const toolExecuteAfter = async (input, output) => {
97317
+ const toolExecuteAfter = async (input, _output) => {
97135
97318
  const { tool, sessionID } = input;
97136
97319
  const toolLower = tool.toLowerCase();
97137
97320
  if (!isTargetAgent(sessionID, input.agent)) {
@@ -97140,6 +97323,7 @@ function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97140
97323
  const state3 = getOrCreateState2(sessionID);
97141
97324
  if (DELEGATION_TOOLS.has(toolLower)) {
97142
97325
  state3.delegationUsed = true;
97326
+ state3.reminderPending = false;
97143
97327
  log2("[category-skill-reminder] Delegation tool used", { sessionID, tool });
97144
97328
  return;
97145
97329
  }
@@ -97147,15 +97331,32 @@ function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97147
97331
  return;
97148
97332
  }
97149
97333
  state3.toolCallCount++;
97150
- if (state3.toolCallCount >= 3 && !state3.delegationUsed && !state3.reminderShown) {
97151
- output.output += reminderMessage;
97152
- state3.reminderShown = true;
97153
- log2("[category-skill-reminder] Reminder injected", {
97334
+ if (state3.toolCallCount >= 3 && !state3.delegationUsed && !state3.reminderPending && !state3.reminderShown) {
97335
+ state3.reminderPending = true;
97336
+ log2("[category-skill-reminder] Reminder queued", {
97154
97337
  sessionID,
97155
97338
  toolCallCount: state3.toolCallCount
97156
97339
  });
97157
97340
  }
97158
97341
  };
97342
+ const messagesTransform = async (_input, output) => {
97343
+ const target = findLatestReminderTarget(output.messages, sessionStates);
97344
+ if (!target)
97345
+ return;
97346
+ target.message.parts.splice(target.textPartIndex, 0, {
97347
+ id: `prt_category_skill_reminder_${target.messageID}`,
97348
+ sessionID: target.sessionID,
97349
+ messageID: target.messageID,
97350
+ type: "text",
97351
+ text: reminderMessage,
97352
+ synthetic: true
97353
+ });
97354
+ target.state.reminderPending = false;
97355
+ target.state.reminderShown = true;
97356
+ log2("[category-skill-reminder] Reminder injected", {
97357
+ sessionID: target.sessionID
97358
+ });
97359
+ };
97159
97360
  const eventHandler = async ({ event }) => {
97160
97361
  const props = event.properties;
97161
97362
  if (event.type === "session.deleted") {
@@ -97167,6 +97368,7 @@ function createCategorySkillReminderHook(_ctx, availableSkills = []) {
97167
97368
  };
97168
97369
  return {
97169
97370
  "tool.execute.after": toolExecuteAfter,
97371
+ "experimental.chat.messages.transform": messagesTransform,
97170
97372
  event: eventHandler
97171
97373
  };
97172
97374
  }
@@ -97373,7 +97575,7 @@ async function withTimeout(promise, timeoutMs) {
97373
97575
  var USER_MESSAGE_IN_PROGRESS_WINDOW_MS = 2000;
97374
97576
  var RAPID_IDLE_DEDUP_MS = 500;
97375
97577
  function sleep2(ms) {
97376
- return ms > 0 ? new Promise((resolve20) => setTimeout(resolve20, ms)) : Promise.resolve();
97578
+ return ms > 0 ? new Promise((resolve19) => setTimeout(resolve19, ms)) : Promise.resolve();
97377
97579
  }
97378
97580
  function hasActiveBackgroundTasks(backgroundManager, sessionID) {
97379
97581
  return backgroundManager ? backgroundManager.getTasksByParentSession(sessionID).some((task) => task.status === "pending" || task.status === "running") : false;
@@ -99413,8 +99615,8 @@ import { basename as basename14, dirname as dirname26, join as join89 } from "pa
99413
99615
 
99414
99616
  // packages/skills-loader-core/src/shared/opencode-config-dir.ts
99415
99617
  import { existsSync as existsSync76, realpathSync as realpathSync12 } from "fs";
99416
- import { homedir as homedir24 } from "os";
99417
- import { join as join88, posix as posix4, resolve as resolve20, win32 as win325 } from "path";
99618
+ import { homedir as homedir23 } from "os";
99619
+ import { join as join88, posix as posix4, resolve as resolve19, win32 as win325 } from "path";
99418
99620
 
99419
99621
  // packages/skills-loader-core/src/shared/plugin-identity.ts
99420
99622
  init_src();
@@ -99447,14 +99649,14 @@ function getTauriConfigDir2(identifier) {
99447
99649
  const platform2 = process.platform;
99448
99650
  switch (platform2) {
99449
99651
  case "darwin":
99450
- return join88(homedir24(), "Library", "Application Support", identifier);
99652
+ return join88(homedir23(), "Library", "Application Support", identifier);
99451
99653
  case "win32": {
99452
- const appData = process.env.APPDATA || join88(homedir24(), "AppData", "Roaming");
99654
+ const appData = process.env.APPDATA || join88(homedir23(), "AppData", "Roaming");
99453
99655
  return win325.join(appData, identifier);
99454
99656
  }
99455
99657
  case "linux":
99456
99658
  default: {
99457
- const xdgConfig = process.env.XDG_CONFIG_HOME || join88(homedir24(), ".config");
99659
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join88(homedir23(), ".config");
99458
99660
  return join88(xdgConfig, identifier);
99459
99661
  }
99460
99662
  }
@@ -99463,7 +99665,7 @@ function resolveConfigPath2(pathValue) {
99463
99665
  if (isWslEnvironment2() && pathValue.startsWith("/")) {
99464
99666
  return posix4.normalize(pathValue);
99465
99667
  }
99466
- const resolvedPath = resolve20(pathValue);
99668
+ const resolvedPath = resolve19(pathValue);
99467
99669
  if (!existsSync76(resolvedPath))
99468
99670
  return resolvedPath;
99469
99671
  try {
@@ -99498,7 +99700,7 @@ function getWslLinuxHomeDir2(windowsConfigRoot) {
99498
99700
  function getCliDefaultConfigDir2() {
99499
99701
  const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
99500
99702
  const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment2() && isWindowsUserConfigRoot2(envXdgConfig);
99501
- const xdgConfig = shouldIgnoreWindowsXdg ? posix4.join(getWslLinuxHomeDir2(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join88(homedir24(), ".config");
99703
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix4.join(getWslLinuxHomeDir2(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join88(homedir23(), ".config");
99502
99704
  const configDir = isWslEnvironment2() ? posix4.join(xdgConfig, "opencode") : join88(xdgConfig, "opencode");
99503
99705
  return resolveConfigPath2(configDir);
99504
99706
  }
@@ -99565,10 +99767,10 @@ function getOpenCodeSkillDirs(options) {
99565
99767
  // packages/skills-loader-core/src/shared/project-discovery-dirs.ts
99566
99768
  import { execFileSync as execFileSync4 } from "child_process";
99567
99769
  import { existsSync as existsSync77, realpathSync as realpathSync13 } from "fs";
99568
- import { dirname as dirname27, join as join90, resolve as resolve21, win32 as win326 } from "path";
99770
+ import { dirname as dirname27, join as join90, resolve as resolve20, win32 as win326 } from "path";
99569
99771
  var worktreePathCache2 = new Map;
99570
99772
  function normalizePath4(path17) {
99571
- const resolvedPath = process.platform !== "win32" && win326.isAbsolute(path17) ? path17 : resolve21(path17);
99773
+ const resolvedPath = process.platform !== "win32" && win326.isAbsolute(path17) ? path17 : resolve20(path17);
99572
99774
  if (!existsSync77(resolvedPath)) {
99573
99775
  return resolvedPath;
99574
99776
  }
@@ -99623,7 +99825,7 @@ function findAncestorDirectories2(startDirectory, targetPaths, stopDirectory) {
99623
99825
  }
99624
99826
  }
99625
99827
  function detectWorktreePath2(directory) {
99626
- const resolvedDirectory = resolve21(directory);
99828
+ const resolvedDirectory = resolve20(directory);
99627
99829
  const cacheKey = pathKey2(normalizePath4(resolvedDirectory));
99628
99830
  if (worktreePathCache2.has(cacheKey)) {
99629
99831
  return worktreePathCache2.get(cacheKey);
@@ -100155,21 +100357,21 @@ function builtinToLoadedSkill(builtin) {
100155
100357
  // packages/skills-loader-core/src/features/opencode-skill-loader/merger/config-skill-entry-loader.ts
100156
100358
  init_src();
100157
100359
  import { existsSync as existsSync79, readFileSync as readFileSync50 } from "fs";
100158
- import { dirname as dirname28, isAbsolute as isAbsolute13, resolve as resolve22 } from "path";
100159
- import { homedir as homedir25 } from "os";
100360
+ import { dirname as dirname28, isAbsolute as isAbsolute13, resolve as resolve21 } from "path";
100361
+ import { homedir as homedir24 } from "os";
100160
100362
  function resolveFilePath5(from, configDir) {
100161
100363
  let filePath = from;
100162
100364
  if (filePath.startsWith("{file:") && filePath.endsWith("}")) {
100163
100365
  filePath = filePath.slice(6, -1);
100164
100366
  }
100165
100367
  if (filePath.startsWith("~/")) {
100166
- return resolve22(homedir25(), filePath.slice(2));
100368
+ return resolve21(homedir24(), filePath.slice(2));
100167
100369
  }
100168
100370
  if (isAbsolute13(filePath)) {
100169
100371
  return filePath;
100170
100372
  }
100171
100373
  const baseDir = configDir || process.cwd();
100172
- return resolve22(baseDir, filePath);
100374
+ return resolve21(baseDir, filePath);
100173
100375
  }
100174
100376
  function loadSkillFromFile(filePath) {
100175
100377
  try {
@@ -103407,7 +103609,7 @@ function isDisabledSkillName(name, disabledSkills) {
103407
103609
  init_src();
103408
103610
  var import_picomatch2 = __toESM(require_picomatch2(), 1);
103409
103611
  import * as fs20 from "fs/promises";
103410
- import { homedir as homedir26 } from "os";
103612
+ import { homedir as homedir25 } from "os";
103411
103613
  import { dirname as dirname30, extname as extname2, isAbsolute as isAbsolute14, join as join97, relative as relative12 } from "path";
103412
103614
  var MAX_RECURSIVE_DEPTH = 10;
103413
103615
  function isHttpUrl(path17) {
@@ -103415,10 +103617,10 @@ function isHttpUrl(path17) {
103415
103617
  }
103416
103618
  function toAbsolutePath(path17, configDir) {
103417
103619
  if (path17 === "~") {
103418
- return homedir26();
103620
+ return homedir25();
103419
103621
  }
103420
103622
  if (path17.startsWith("~/")) {
103421
- return join97(homedir26(), path17.slice(2));
103623
+ return join97(homedir25(), path17.slice(2));
103422
103624
  }
103423
103625
  if (isAbsolute14(path17)) {
103424
103626
  return path17;
@@ -103506,12 +103708,14 @@ init_src();
103506
103708
  import * as fs21 from "fs";
103507
103709
  import * as path17 from "path";
103508
103710
  function getConfigPaths3(directory) {
103509
- const globalConfigDir = getOpenCodeConfigDir2({ binary: "opencode" });
103711
+ const globalConfigDirs = getOpenCodeConfigDirs2({ binary: "opencode" });
103510
103712
  return [
103511
103713
  path17.join(directory, ".opencode", "opencode.json"),
103512
103714
  path17.join(directory, ".opencode", "opencode.jsonc"),
103513
- path17.join(globalConfigDir, "opencode.json"),
103514
- path17.join(globalConfigDir, "opencode.jsonc")
103715
+ ...globalConfigDirs.flatMap((dir) => [
103716
+ path17.join(dir, "opencode.json"),
103717
+ path17.join(dir, "opencode.jsonc")
103718
+ ])
103515
103719
  ];
103516
103720
  }
103517
103721
  function toStringArray(value) {
@@ -105718,9 +105922,9 @@ function isPrometheusAgent(agentName) {
105718
105922
  }
105719
105923
 
105720
105924
  // packages/omo-opencode/src/hooks/prometheus-md-only/path-policy.ts
105721
- import { relative as relative13, resolve as resolve23, isAbsolute as isAbsolute15 } from "path";
105925
+ import { relative as relative13, resolve as resolve22, isAbsolute as isAbsolute15 } from "path";
105722
105926
  function isAllowedFile(filePath, workspaceRoot) {
105723
- const resolved = resolve23(workspaceRoot, filePath);
105927
+ const resolved = resolve22(workspaceRoot, filePath);
105724
105928
  const rel = relative13(workspaceRoot, resolved);
105725
105929
  if (rel.startsWith("..") || isAbsolute15(rel)) {
105726
105930
  return false;
@@ -105871,9 +106075,9 @@ init_logger2();
105871
106075
  // packages/omo-opencode/src/hooks/start-work/worktree-detector.ts
105872
106076
  import { execFileSync as execFileSync5 } from "child_process";
105873
106077
  import { existsSync as existsSync82, realpathSync as realpathSync14 } from "fs";
105874
- import { resolve as resolve24, win32 as win327 } from "path";
106078
+ import { resolve as resolve23, win32 as win327 } from "path";
105875
106079
  function normalizePath5(path18) {
105876
- const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path18) ? path18 : resolve24(path18);
106080
+ const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path18) ? path18 : resolve23(path18);
105877
106081
  if (!existsSync82(resolvedPath)) {
105878
106082
  return resolvedPath;
105879
106083
  }
@@ -107764,7 +107968,7 @@ async function validateSubagentSessionId(input) {
107764
107968
  }
107765
107969
 
107766
107970
  // packages/omo-opencode/src/hooks/atlas/tool-execute-after-direct-work.ts
107767
- import { resolve as resolve25 } from "path";
107971
+ import { resolve as resolve24 } from "path";
107768
107972
  init_logger2();
107769
107973
 
107770
107974
  // packages/omo-opencode/src/hooks/atlas/omo-path.ts
@@ -107874,7 +108078,7 @@ async function handleDirectWorkToolAfter(input) {
107874
108078
  const sessionWork = getWorkForSession(ctx.directory, toolInput.sessionID);
107875
108079
  if (sessionWork) {
107876
108080
  const planPath = resolveBoulderPlanPathForWork(ctx.directory, sessionWork);
107877
- if (resolve25(filePath) === resolve25(planPath) && planSnapshot !== undefined) {
108081
+ if (resolve24(filePath) === resolve24(planPath) && planSnapshot !== undefined) {
107878
108082
  const beforeCheckedKeys = parseCheckedTopLevelTaskKeys(planSnapshot);
107879
108083
  const afterCheckedKeys = readCheckedTaskKeysFromPlan(planPath);
107880
108084
  for (const taskKey of afterCheckedKeys) {
@@ -108623,7 +108827,7 @@ function createToolExecuteAfterHandler2(input) {
108623
108827
  // packages/omo-opencode/src/hooks/atlas/tool-execute-before.ts
108624
108828
  init_logger2();
108625
108829
  import { existsSync as existsSync85, readFileSync as readFileSync58 } from "fs";
108626
- import { resolve as resolve26 } from "path";
108830
+ import { resolve as resolve25 } from "path";
108627
108831
  var TASK_SECTION_HEADER_PATTERN = /^##\s*1\.\s*TASK\s*$/i;
108628
108832
  var TODO_TASK_LINE_PATTERN = /^(?:[-*]\s*\[\s*\]\s*)?(\d+)\.\s+(.+)$/;
108629
108833
  var FINAL_WAVE_TASK_LINE_PATTERN = /^(?:[-*]\s*\[\s*\]\s*)?(F\d+)\.\s+(.+)$/i;
@@ -108681,7 +108885,7 @@ function createToolExecuteBeforeHandler2(input) {
108681
108885
  const sessionWork = sessionID ? getWorkForSession(ctx.directory, sessionID) : null;
108682
108886
  const state3 = sessionWork ? null : readBoulderState(ctx.directory);
108683
108887
  const planPath = sessionWork ? resolveBoulderPlanPathForWork(ctx.directory, sessionWork) : state3 ? resolveBoulderPlanPath(ctx.directory, state3) : null;
108684
- if (planPath && resolve26(filePath) === resolve26(planPath) && pendingPlanSnapshots) {
108888
+ if (planPath && resolve25(filePath) === resolve25(planPath) && pendingPlanSnapshots) {
108685
108889
  try {
108686
108890
  if (existsSync85(planPath)) {
108687
108891
  pendingPlanSnapshots.set(toolInput.callID, readFileSync58(planPath, "utf-8"));
@@ -109053,9 +109257,10 @@ function resolveModelForDelegateTask(input, deps) {
109053
109257
  }
109054
109258
  }
109055
109259
  } else {
109056
- for (const entry of fallbackChain) {
109260
+ for (const [entryIndex, entry] of fallbackChain.entries()) {
109057
109261
  for (const provider of entry.providers) {
109058
- const fullModel = `${provider}/${entry.model}`;
109262
+ const transformedModelId = transformModelForProvider(provider, entry.model);
109263
+ const fullModel = `${provider}/${transformedModelId}`;
109059
109264
  const match = fuzzyMatchModel(fullModel, new Set(input.availableModels), [provider]);
109060
109265
  if (match) {
109061
109266
  if (explicitHighModel && entry.variant === "high" && match === explicitHighBaseModel) {
@@ -109064,7 +109269,12 @@ function resolveModelForDelegateTask(input, deps) {
109064
109269
  return { model: match, variant: entry.variant, fallbackEntry: entry, matchedFallback: true };
109065
109270
  }
109066
109271
  }
109067
- const crossProviderMatch = fuzzyMatchModel(entry.model, new Set(input.availableModels));
109272
+ const laterRungProviders = new Set(fallbackChain.slice(entryIndex + 1).filter((candidate) => candidate.model === entry.model).flatMap((candidate) => candidate.providers));
109273
+ const crossProviderCandidates = new Set([...input.availableModels].filter((model) => {
109274
+ const [provider] = model.split("/");
109275
+ return provider !== undefined && !laterRungProviders.has(provider);
109276
+ }));
109277
+ const crossProviderMatch = fuzzyMatchModel(entry.model, crossProviderCandidates);
109068
109278
  if (crossProviderMatch) {
109069
109279
  if (explicitHighModel && entry.variant === "high" && crossProviderMatch === explicitHighBaseModel) {
109070
109280
  return { model: explicitHighModel, fallbackEntry: entry, matchedFallback: true };
@@ -111279,10 +111489,19 @@ function getRawFallbackModelsForSession(sessionID, agent, pluginConfig) {
111279
111489
  }
111280
111490
  return;
111281
111491
  };
111492
+ const shouldInheritPlanFallback = pluginConfig.sisyphus_agent?.disabled !== true && pluginConfig.sisyphus_agent?.planner_enabled !== false && pluginConfig.sisyphus_agent?.replace_plan !== false;
111493
+ const tryGetPrometheusFallbackForPlan = (agentName) => {
111494
+ if (agentName.toLowerCase() !== "plan" || !shouldInheritPlanFallback)
111495
+ return;
111496
+ return tryGetFallbackFromAgent("prometheus");
111497
+ };
111282
111498
  if (agent) {
111283
111499
  const result = tryGetFallbackFromAgent(agent);
111284
111500
  if (result)
111285
111501
  return result;
111502
+ const planFallback = tryGetPrometheusFallbackForPlan(agent);
111503
+ if (planFallback)
111504
+ return planFallback;
111286
111505
  }
111287
111506
  const sessionAgentMatch = sessionID.match(agentPattern);
111288
111507
  if (sessionAgentMatch) {
@@ -111290,6 +111509,9 @@ function getRawFallbackModelsForSession(sessionID, agent, pluginConfig) {
111290
111509
  const result = tryGetFallbackFromAgent(detectedAgent);
111291
111510
  if (result)
111292
111511
  return result;
111512
+ const planFallback = tryGetPrometheusFallbackForPlan(detectedAgent);
111513
+ if (planFallback)
111514
+ return planFallback;
111293
111515
  }
111294
111516
  log2(`[${HOOK_NAME11}] No category/agent fallback models resolved for session`, { sessionID, agent });
111295
111517
  return;
@@ -112582,7 +112804,7 @@ function createRuntimeFallbackHook(ctx, options, factoryOverrides = {}) {
112582
112804
  }
112583
112805
  // packages/omo-opencode/src/hooks/write-existing-file-guard/hook.ts
112584
112806
  import { existsSync as existsSync87, realpathSync as realpathSync15 } from "fs";
112585
- import { basename as basename17, dirname as dirname32, isAbsolute as isAbsolute16, join as join101, normalize as normalize2, relative as relative14, resolve as resolve27 } from "path";
112807
+ import { basename as basename17, dirname as dirname32, isAbsolute as isAbsolute16, join as join101, normalize as normalize2, relative as relative14, resolve as resolve26 } from "path";
112586
112808
 
112587
112809
  // packages/omo-opencode/src/hooks/write-existing-file-guard/tool-execute-before-handler.ts
112588
112810
  import { existsSync as existsSync86 } from "fs";
@@ -112754,7 +112976,7 @@ function getPathFromArgs(args) {
112754
112976
  return args?.filePath ?? args?.path ?? args?.file_path;
112755
112977
  }
112756
112978
  function resolveInputPath(ctx, inputPath) {
112757
- return normalize2(isAbsolute16(inputPath) ? inputPath : resolve27(ctx.directory, inputPath));
112979
+ return normalize2(isAbsolute16(inputPath) ? inputPath : resolve26(ctx.directory, inputPath));
112758
112980
  }
112759
112981
  function isPathInsideDirectory(pathToCheck, directory) {
112760
112982
  const relativePath = relative14(directory, pathToCheck);
@@ -115742,7 +115964,7 @@ function createNotepadWriteGuardHook() {
115742
115964
  }
115743
115965
  // packages/omo-opencode/src/hooks/plan-format-validator/hook.ts
115744
115966
  import { existsSync as existsSync89, readFileSync as readFileSync60 } from "fs";
115745
- import { resolve as resolve28 } from "path";
115967
+ import { resolve as resolve27 } from "path";
115746
115968
  init_logger2();
115747
115969
  var WRITE_TOOLS = new Set(["Write", "Edit", "write", "edit"]);
115748
115970
  var CHECKBOX_PATTERN = /^[-*]\s*\[[ xX]\]/m;
@@ -115824,7 +116046,7 @@ function createPlanFormatValidatorHook(_ctx) {
115824
116046
  return;
115825
116047
  if (!isPlanFilePath(filePath))
115826
116048
  return;
115827
- const resolvedPath = resolve28(_ctx.directory, filePath);
116049
+ const resolvedPath = resolve27(_ctx.directory, filePath);
115828
116050
  if (!existsSync89(resolvedPath))
115829
116051
  return;
115830
116052
  const content = readFileSync60(resolvedPath, "utf-8");
@@ -115926,7 +116148,7 @@ function createMonitorStatusInjectorHook(monitorManager, config) {
115926
116148
  };
115927
116149
  }
115928
116150
  // packages/omo-opencode/src/tools/grep/tools.ts
115929
- import { resolve as resolve29 } from "path";
116151
+ import { resolve as resolve28 } from "path";
115930
116152
 
115931
116153
  // node_modules/.bun/@opencode-ai+plugin@1.15.13+8002cb46da36e070/node_modules/@opencode-ai/plugin/dist/tool.js
115932
116154
  import { z as z3 } from "zod";
@@ -116173,10 +116395,10 @@ class Semaphore {
116173
116395
  this.running++;
116174
116396
  return;
116175
116397
  }
116176
- return new Promise((resolve29) => {
116398
+ return new Promise((resolve28) => {
116177
116399
  this.queue.push(() => {
116178
116400
  this.running++;
116179
- resolve29();
116401
+ resolve28();
116180
116402
  });
116181
116403
  });
116182
116404
  }
@@ -116491,7 +116713,7 @@ function createGrepTools(ctx) {
116491
116713
  const globs = args.include ? [args.include] : undefined;
116492
116714
  const runtimeCtx = context;
116493
116715
  const dir = typeof runtimeCtx.directory === "string" ? runtimeCtx.directory : ctx.directory;
116494
- const searchPath = args.path ? resolve29(dir, args.path) : dir;
116716
+ const searchPath = args.path ? resolve28(dir, args.path) : dir;
116495
116717
  const paths = [searchPath];
116496
116718
  const outputMode = args.output_mode ?? "files_with_matches";
116497
116719
  const headLimit = args.head_limit ?? 0;
@@ -116522,11 +116744,11 @@ function createGrepTools(ctx) {
116522
116744
  return { grep };
116523
116745
  }
116524
116746
  // packages/omo-opencode/src/tools/glob/tools.ts
116525
- import { resolve as resolve31 } from "path";
116747
+ import { resolve as resolve30 } from "path";
116526
116748
 
116527
116749
  // packages/omo-opencode/src/tools/glob/cli.ts
116528
116750
  init_bun_spawn_shim();
116529
- import { resolve as resolve30 } from "path";
116751
+ import { resolve as resolve29 } from "path";
116530
116752
 
116531
116753
  // packages/omo-opencode/src/tools/glob/constants.ts
116532
116754
  var DEFAULT_TIMEOUT_MS3 = 60000;
@@ -116654,7 +116876,7 @@ async function runRgFilesInternal(options, resolvedCli, processSpawner = spawn)
116654
116876
  }
116655
116877
  let filePath;
116656
116878
  if (isRg) {
116657
- filePath = cwd ? resolve30(cwd, line) : line;
116879
+ filePath = cwd ? resolve29(cwd, line) : line;
116658
116880
  } else if (isWindows2) {
116659
116881
  filePath = line.trim();
116660
116882
  } else {
@@ -116714,7 +116936,7 @@ function createGlobTools(ctx) {
116714
116936
  const cli = await resolveGrepCliWithAutoInstall();
116715
116937
  const runtimeCtx = context;
116716
116938
  const dir = typeof runtimeCtx.directory === "string" ? runtimeCtx.directory : ctx.directory;
116717
- const searchPath = args.path ? resolve31(dir, args.path) : dir;
116939
+ const searchPath = args.path ? resolve30(dir, args.path) : dir;
116718
116940
  const result = await runRgFiles({
116719
116941
  pattern: args.pattern,
116720
116942
  paths: [searchPath]
@@ -118590,7 +118812,7 @@ init_logger2();
118590
118812
 
118591
118813
  // packages/omo-opencode/src/tools/background-task/delay.ts
118592
118814
  function delay5(ms) {
118593
- return new Promise((resolve32) => setTimeout(resolve32, ms));
118815
+ return new Promise((resolve31) => setTimeout(resolve31, ms));
118594
118816
  }
118595
118817
  // packages/omo-opencode/src/tools/background-task/create-background-output.ts
118596
118818
  init_logger2();
@@ -119436,19 +119658,19 @@ import { existsSync as existsSync97, readdirSync as readdirSync23 } from "fs";
119436
119658
  import { join as join112 } from "path";
119437
119659
 
119438
119660
  // packages/claude-code-compat-core/src/shared/claude-config-dir.ts
119439
- import { homedir as homedir27 } from "os";
119661
+ import { homedir as homedir26 } from "os";
119440
119662
  import { join as join107 } from "path";
119441
119663
  function getClaudeConfigDir3() {
119442
119664
  const envConfigDir = process.env.CLAUDE_CONFIG_DIR;
119443
119665
  if (envConfigDir) {
119444
119666
  return envConfigDir;
119445
119667
  }
119446
- return join107(process.env.HOME || process.env.USERPROFILE || homedir27(), ".claude");
119668
+ return join107(process.env.HOME || process.env.USERPROFILE || homedir26(), ".claude");
119447
119669
  }
119448
119670
  // packages/claude-code-compat-core/src/shared/opencode-config-dir.ts
119449
119671
  import { existsSync as existsSync93, realpathSync as realpathSync16 } from "fs";
119450
- import { homedir as homedir28 } from "os";
119451
- import { join as join108, posix as posix6, resolve as resolve32, win32 as win329 } from "path";
119672
+ import { homedir as homedir27 } from "os";
119673
+ import { join as join108, posix as posix6, resolve as resolve31, win32 as win329 } from "path";
119452
119674
  var TAURI_APP_IDENTIFIER3 = "ai.opencode.desktop";
119453
119675
  var TAURI_APP_IDENTIFIER_DEV3 = "ai.opencode.desktop.dev";
119454
119676
  function isDevBuild3(version) {
@@ -119460,14 +119682,14 @@ function getTauriConfigDir3(identifier) {
119460
119682
  const platform2 = process.platform;
119461
119683
  switch (platform2) {
119462
119684
  case "darwin":
119463
- return join108(homedir28(), "Library", "Application Support", identifier);
119685
+ return join108(homedir27(), "Library", "Application Support", identifier);
119464
119686
  case "win32": {
119465
- const appData = process.env.APPDATA || join108(homedir28(), "AppData", "Roaming");
119687
+ const appData = process.env.APPDATA || join108(homedir27(), "AppData", "Roaming");
119466
119688
  return win329.join(appData, identifier);
119467
119689
  }
119468
119690
  case "linux":
119469
119691
  default: {
119470
- const xdgConfig = process.env.XDG_CONFIG_HOME || join108(homedir28(), ".config");
119692
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join108(homedir27(), ".config");
119471
119693
  return join108(xdgConfig, identifier);
119472
119694
  }
119473
119695
  }
@@ -119476,7 +119698,7 @@ function resolveConfigPath3(pathValue) {
119476
119698
  if (isWslEnvironment3() && pathValue.startsWith("/")) {
119477
119699
  return posix6.normalize(pathValue);
119478
119700
  }
119479
- const resolvedPath = resolve32(pathValue);
119701
+ const resolvedPath = resolve31(pathValue);
119480
119702
  if (!existsSync93(resolvedPath))
119481
119703
  return resolvedPath;
119482
119704
  try {
@@ -119511,7 +119733,7 @@ function getWslLinuxHomeDir3(windowsConfigRoot) {
119511
119733
  function getCliDefaultConfigDir3() {
119512
119734
  const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
119513
119735
  const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment3() && isWindowsUserConfigRoot3(envXdgConfig);
119514
- const xdgConfig = shouldIgnoreWindowsXdg ? posix6.join(getWslLinuxHomeDir3(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join108(homedir28(), ".config");
119736
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix6.join(getWslLinuxHomeDir3(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join108(homedir27(), ".config");
119515
119737
  const configDir = isWslEnvironment3() ? posix6.join(xdgConfig, "opencode") : join108(xdgConfig, "opencode");
119516
119738
  return resolveConfigPath3(configDir);
119517
119739
  }
@@ -119556,12 +119778,12 @@ function getOpenCodeConfigDir3(options) {
119556
119778
  // packages/claude-code-compat-core/src/shared/jsonc-parser.ts
119557
119779
  init_src();
119558
119780
  // packages/claude-code-compat-core/src/shared/resolve-agent-definition-paths.ts
119559
- import { homedir as homedir29 } from "os";
119560
- import { isAbsolute as isAbsolute17, join as join109, resolve as resolve33 } from "path";
119781
+ import { homedir as homedir28 } from "os";
119782
+ import { isAbsolute as isAbsolute17, join as join109, resolve as resolve32 } from "path";
119561
119783
  function resolveAgentDefinitionPaths2(paths, baseDir, containmentDir) {
119562
119784
  return paths.flatMap((p) => {
119563
- const expanded = p.startsWith("~/") ? join109(homedir29(), p.slice(2)) : p;
119564
- const resolved = isAbsolute17(expanded) ? expanded : resolve33(baseDir, expanded);
119785
+ const expanded = p.startsWith("~/") ? join109(homedir28(), p.slice(2)) : p;
119786
+ const resolved = isAbsolute17(expanded) ? expanded : resolve32(baseDir, expanded);
119565
119787
  if (containmentDir !== null && !isWithinProject(resolved, containmentDir)) {
119566
119788
  log4(`agent_definitions path rejected (outside project boundary): ${p} -> ${resolved}`);
119567
119789
  return [];
@@ -119612,10 +119834,10 @@ function getOpenCodeCommandDirs2(options) {
119612
119834
  // packages/claude-code-compat-core/src/shared/project-discovery-dirs.ts
119613
119835
  import { execFileSync as execFileSync6 } from "child_process";
119614
119836
  import { existsSync as existsSync94, realpathSync as realpathSync17 } from "fs";
119615
- import { dirname as dirname37, join as join111, resolve as resolve34, win32 as win3210 } from "path";
119837
+ import { dirname as dirname37, join as join111, resolve as resolve33, win32 as win3210 } from "path";
119616
119838
  var worktreePathCache3 = new Map;
119617
119839
  function normalizePath6(path18) {
119618
- const resolvedPath = process.platform !== "win32" && win3210.isAbsolute(path18) ? path18 : resolve34(path18);
119840
+ const resolvedPath = process.platform !== "win32" && win3210.isAbsolute(path18) ? path18 : resolve33(path18);
119619
119841
  if (!existsSync94(resolvedPath)) {
119620
119842
  return resolvedPath;
119621
119843
  }
@@ -119640,7 +119862,7 @@ function pathKey3(path18) {
119640
119862
  return process.platform === "win32" ? normalized.toLowerCase() : normalized;
119641
119863
  }
119642
119864
  function detectWorktreePath4(directory) {
119643
- const resolvedDirectory = resolve34(directory);
119865
+ const resolvedDirectory = resolve33(directory);
119644
119866
  const cacheKey = pathKey3(normalizePath6(resolvedDirectory));
119645
119867
  if (worktreePathCache3.has(cacheKey)) {
119646
119868
  return worktreePathCache3.get(cacheKey);
@@ -119890,14 +120112,15 @@ function loadOpencodeProjectAgents(directory) {
119890
120112
  import * as fs22 from "fs";
119891
120113
  import * as path18 from "path";
119892
120114
  function getConfigPaths4(directory) {
119893
- const globalConfigDir = getOpenCodeConfigDir3({ binary: "opencode" });
119894
- const paths = [
120115
+ const globalConfigDirs = getOpenCodeConfigDirs3({ binary: "opencode" });
120116
+ return [
119895
120117
  path18.join(directory, ".opencode", "opencode.json"),
119896
120118
  path18.join(directory, ".opencode", "opencode.jsonc"),
119897
- path18.join(globalConfigDir, "opencode.json"),
119898
- path18.join(globalConfigDir, "opencode.jsonc")
120119
+ ...globalConfigDirs.flatMap((dir) => [
120120
+ path18.join(dir, "opencode.json"),
120121
+ path18.join(dir, "opencode.jsonc")
120122
+ ])
119899
120123
  ];
119900
- return paths;
119901
120124
  }
119902
120125
  function convertInlineAgent(agentData) {
119903
120126
  if (!agentData || typeof agentData !== "object") {
@@ -120077,7 +120300,7 @@ Task ID: ${task.id}`;
120077
120300
  if (toolContext.abort?.aborted) {
120078
120301
  break;
120079
120302
  }
120080
- await new Promise((resolve35) => setTimeout(resolve35, WAIT_FOR_SESSION_INTERVAL_MS));
120303
+ await new Promise((resolve34) => setTimeout(resolve34, WAIT_FOR_SESSION_INTERVAL_MS));
120081
120304
  }
120082
120305
  await toolContext.metadata?.({
120083
120306
  title: args.description,
@@ -120157,7 +120380,7 @@ async function waitForCompletion(sessionID, toolContext, ctx) {
120157
120380
  log2(`[call_omo_agent] Aborted by user`);
120158
120381
  throw new Error("Task aborted.");
120159
120382
  }
120160
- await new Promise((resolve35) => setTimeout(resolve35, POLL_INTERVAL_MS));
120383
+ await new Promise((resolve34) => setTimeout(resolve34, POLL_INTERVAL_MS));
120161
120384
  const statusResult = await ctx.client.session.status();
120162
120385
  const allStatuses = normalizeSDKResponse(statusResult, {});
120163
120386
  const sessionStatus = allStatuses[sessionID];
@@ -121360,7 +121583,7 @@ async function waitForLookAtSessionResult(client3, sessionID, options) {
121360
121583
  sawNonIdleStatus
121361
121584
  });
121362
121585
  }
121363
- await new Promise((resolve35) => setTimeout(resolve35, pollInterval));
121586
+ await new Promise((resolve34) => setTimeout(resolve34, pollInterval));
121364
121587
  }
121365
121588
  throw new Error(`[look_at] Polling timed out after ${timeout}ms waiting for session ${sessionID} to become idle`);
121366
121589
  }
@@ -123074,7 +123297,7 @@ async function executeUnstableAgentTask(args, ctx, executorCtx, parentContext, a
123074
123297
 
123075
123298
  Task ID: ${task.id}`;
123076
123299
  }
123077
- await new Promise((resolve35) => setTimeout(resolve35, timing.WAIT_FOR_SESSION_INTERVAL_MS));
123300
+ await new Promise((resolve34) => setTimeout(resolve34, timing.WAIT_FOR_SESSION_INTERVAL_MS));
123078
123301
  const updated = manager.getTask(task.id);
123079
123302
  sessionID = updated?.sessionId;
123080
123303
  }
@@ -123136,7 +123359,7 @@ Session ID: ${sessionID}`;
123136
123359
  }
123137
123360
  const timeoutBudgetMs = syncPollTimeoutMs ?? DEFAULT_SYNC_POLL_TIMEOUT_MS;
123138
123361
  const remainingBudgetMs = timeoutBudgetMs - (Date.now() - pollStart);
123139
- await new Promise((resolve35) => setTimeout(resolve35, Math.min(timingCfg.POLL_INTERVAL_MS, Math.max(1, remainingBudgetMs))));
123362
+ await new Promise((resolve34) => setTimeout(resolve34, Math.min(timingCfg.POLL_INTERVAL_MS, Math.max(1, remainingBudgetMs))));
123140
123363
  const statusResult = await client3.session.status();
123141
123364
  const allStatuses = normalizeSDKResponse(statusResult, {});
123142
123365
  const sessionStatus = allStatuses[sessionID];
@@ -123275,7 +123498,7 @@ function continueSessionSetup(args) {
123275
123498
  (async () => {
123276
123499
  const waitStart = Date.now();
123277
123500
  while (Date.now() - waitStart < args.timing.WAIT_FOR_SESSION_TIMEOUT_MS) {
123278
- await new Promise((resolve35) => setTimeout(resolve35, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123501
+ await new Promise((resolve34) => setTimeout(resolve34, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123279
123502
  const updated = args.manager.getTask(args.taskID);
123280
123503
  if (!updated) {
123281
123504
  return;
@@ -123313,7 +123536,7 @@ async function waitForBackgroundSessionStart(args) {
123313
123536
  args.onAbort();
123314
123537
  return;
123315
123538
  }
123316
- await new Promise((resolve35) => setTimeout(resolve35, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123539
+ await new Promise((resolve34) => setTimeout(resolve34, args.timing.WAIT_FOR_SESSION_INTERVAL_MS));
123317
123540
  }
123318
123541
  return sessionId;
123319
123542
  }
@@ -127078,9 +127301,9 @@ async function abortWithTimeout(client3, sessionID, timeoutMs = 1e4) {
127078
127301
  });
127079
127302
  return "failed";
127080
127303
  }),
127081
- new Promise((resolve35) => {
127304
+ new Promise((resolve34) => {
127082
127305
  timeoutHandle = setTimeout(() => {
127083
- resolve35("timed_out");
127306
+ resolve34("timed_out");
127084
127307
  }, timeoutMs);
127085
127308
  })
127086
127309
  ]);
@@ -127482,7 +127705,7 @@ class ConcurrencyManager {
127482
127705
  this.counts.set(key, current + 1);
127483
127706
  return;
127484
127707
  }
127485
- return new Promise((resolve35, reject) => {
127708
+ return new Promise((resolve34, reject) => {
127486
127709
  const queue = this.queues.get(key) ?? [];
127487
127710
  const entry = {
127488
127711
  taskId,
@@ -127490,7 +127713,7 @@ class ConcurrencyManager {
127490
127713
  if (entry.settled)
127491
127714
  return;
127492
127715
  entry.settled = true;
127493
- resolve35();
127716
+ resolve34();
127494
127717
  },
127495
127718
  rawReject: reject,
127496
127719
  settled: false
@@ -131031,11 +131254,7 @@ The fallback retry session is now created and can be inspected directly.
131031
131254
  throw new Error(`Task has no sessionID: ${existingTask.id}`);
131032
131255
  }
131033
131256
  if (existingTask.status === "running") {
131034
- log2("[background-agent] Resume skipped - task already running:", {
131035
- taskId: existingTask.id,
131036
- sessionID: existingTask.sessionId
131037
- });
131038
- return existingTask;
131257
+ throw new Error(`Task ${existingTask.id} is currently running and cannot accept a continuation prompt. ` + "Wait for it to complete before resuming it with task_id.");
131039
131258
  }
131040
131259
  const resumeSnapshot = this.captureResumeTaskSnapshot(existingTask);
131041
131260
  const completionTimer = this.completionTimers.get(existingTask.id);
@@ -132210,10 +132429,10 @@ The task was re-queued on a fallback model after a retryable failure.
132210
132429
  return this.scheduledFlushSettledCounts.get(sessionID) ?? 0;
132211
132430
  }
132212
132431
  awaitScheduledFlush(sessionID, sinceCount) {
132213
- return new Promise((resolve35) => {
132432
+ return new Promise((resolve34) => {
132214
132433
  const arm = () => {
132215
132434
  if ((this.scheduledFlushSettledCounts.get(sessionID) ?? 0) > sinceCount) {
132216
- resolve35();
132435
+ resolve34();
132217
132436
  return;
132218
132437
  }
132219
132438
  const waiters = this.scheduledFlushSettledWaiters.get(sessionID) ?? [];
@@ -133320,8 +133539,8 @@ function spawnMonitoredProcess(opts, deps) {
133320
133539
  let watchdogTimer;
133321
133540
  let graceTimer;
133322
133541
  let resolvePublicExit = () => {};
133323
- const publicExit = new Promise((resolve35) => {
133324
- resolvePublicExit = resolve35;
133542
+ const publicExit = new Promise((resolve34) => {
133543
+ resolvePublicExit = resolve34;
133325
133544
  });
133326
133545
  function clearWatchdog() {
133327
133546
  if (watchdogTimer !== undefined) {
@@ -133810,10 +134029,10 @@ import { basename as basename22, dirname as dirname41, join as join124 } from "p
133810
134029
 
133811
134030
  // packages/mcp-client-core/src/config-dir.ts
133812
134031
  import { existsSync as existsSync102, realpathSync as realpathSync18 } from "fs";
133813
- import { homedir as homedir30 } from "os";
133814
- import { join as join122, resolve as resolve35 } from "path";
134032
+ import { homedir as homedir29 } from "os";
134033
+ import { join as join122, resolve as resolve34 } from "path";
133815
134034
  function resolveConfigPath4(pathValue) {
133816
- const resolvedPath = resolve35(pathValue);
134035
+ const resolvedPath = resolve34(pathValue);
133817
134036
  if (!existsSync102(resolvedPath))
133818
134037
  return resolvedPath;
133819
134038
  try {
@@ -133829,7 +134048,7 @@ function getOpenCodeCliConfigDir(env2 = process.env) {
133829
134048
  if (customConfigDir) {
133830
134049
  return resolveConfigPath4(customConfigDir);
133831
134050
  }
133832
- const xdgConfigDir = env2["XDG_CONFIG_HOME"]?.trim() || join122(homedir30(), ".config");
134051
+ const xdgConfigDir = env2["XDG_CONFIG_HOME"]?.trim() || join122(homedir29(), ".config");
133833
134052
  return resolveConfigPath4(join122(xdgConfigDir, "opencode"));
133834
134053
  }
133835
134054
 
@@ -134209,7 +134428,7 @@ function buildAuthorizationUrl(authorizationEndpoint, options) {
134209
134428
  }
134210
134429
  var CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;
134211
134430
  function startCallbackServer(port) {
134212
- return new Promise((resolve36, reject) => {
134431
+ return new Promise((resolve35, reject) => {
134213
134432
  let timeoutId;
134214
134433
  const server2 = createServer2((request, response) => {
134215
134434
  clearTimeout(timeoutId);
@@ -134235,7 +134454,7 @@ function startCallbackServer(port) {
134235
134454
  response.writeHead(200, { "content-type": "text/html" });
134236
134455
  response.end("<html><body><h1>Authorization successful. You can close this tab.</h1></body></html>");
134237
134456
  server2.close();
134238
- resolve36({ code, state: state3 });
134457
+ resolve35({ code, state: state3 });
134239
134458
  });
134240
134459
  timeoutId = setTimeout(() => {
134241
134460
  server2.close();
@@ -136010,7 +136229,7 @@ class Protocol {
136010
136229
  return;
136011
136230
  }
136012
136231
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1000;
136013
- await new Promise((resolve36) => setTimeout(resolve36, pollInterval));
136232
+ await new Promise((resolve35) => setTimeout(resolve35, pollInterval));
136014
136233
  options?.signal?.throwIfAborted();
136015
136234
  }
136016
136235
  } catch (error) {
@@ -136022,7 +136241,7 @@ class Protocol {
136022
136241
  }
136023
136242
  request(request, resultSchema, options) {
136024
136243
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
136025
- return new Promise((resolve36, reject) => {
136244
+ return new Promise((resolve35, reject) => {
136026
136245
  const earlyReject = (error) => {
136027
136246
  reject(error);
136028
136247
  };
@@ -136100,7 +136319,7 @@ class Protocol {
136100
136319
  if (!parseResult.success) {
136101
136320
  reject(parseResult.error);
136102
136321
  } else {
136103
- resolve36(parseResult.data);
136322
+ resolve35(parseResult.data);
136104
136323
  }
136105
136324
  } catch (error) {
136106
136325
  reject(error);
@@ -136291,12 +136510,12 @@ class Protocol {
136291
136510
  interval = task.pollInterval;
136292
136511
  }
136293
136512
  } catch {}
136294
- return new Promise((resolve36, reject) => {
136513
+ return new Promise((resolve35, reject) => {
136295
136514
  if (signal.aborted) {
136296
136515
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
136297
136516
  return;
136298
136517
  }
136299
- const timeoutId = setTimeout(resolve36, interval);
136518
+ const timeoutId = setTimeout(resolve35, interval);
136300
136519
  signal.addEventListener("abort", () => {
136301
136520
  clearTimeout(timeoutId);
136302
136521
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -138825,7 +139044,7 @@ class StdioClientTransport {
138825
139044
  if (this._process) {
138826
139045
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
138827
139046
  }
138828
- return new Promise((resolve36, reject) => {
139047
+ return new Promise((resolve35, reject) => {
138829
139048
  this._process = import_cross_spawn2.default(this._serverParams.command, this._serverParams.args ?? [], {
138830
139049
  env: {
138831
139050
  ...getDefaultEnvironment(),
@@ -138841,7 +139060,7 @@ class StdioClientTransport {
138841
139060
  this.onerror?.(error);
138842
139061
  });
138843
139062
  this._process.on("spawn", () => {
138844
- resolve36();
139063
+ resolve35();
138845
139064
  });
138846
139065
  this._process.on("close", (_code) => {
138847
139066
  this._process = undefined;
@@ -138888,20 +139107,20 @@ class StdioClientTransport {
138888
139107
  if (this._process) {
138889
139108
  const processToClose = this._process;
138890
139109
  this._process = undefined;
138891
- const closePromise = new Promise((resolve36) => {
139110
+ const closePromise = new Promise((resolve35) => {
138892
139111
  processToClose.once("close", () => {
138893
- resolve36();
139112
+ resolve35();
138894
139113
  });
138895
139114
  });
138896
139115
  try {
138897
139116
  processToClose.stdin?.end();
138898
139117
  } catch {}
138899
- await Promise.race([closePromise, new Promise((resolve36) => setTimeout(resolve36, 2000).unref())]);
139118
+ await Promise.race([closePromise, new Promise((resolve35) => setTimeout(resolve35, 2000).unref())]);
138900
139119
  if (processToClose.exitCode === null) {
138901
139120
  try {
138902
139121
  processToClose.kill("SIGTERM");
138903
139122
  } catch {}
138904
- await Promise.race([closePromise, new Promise((resolve36) => setTimeout(resolve36, 2000).unref())]);
139123
+ await Promise.race([closePromise, new Promise((resolve35) => setTimeout(resolve35, 2000).unref())]);
138905
139124
  }
138906
139125
  if (processToClose.exitCode === null) {
138907
139126
  try {
@@ -138912,15 +139131,15 @@ class StdioClientTransport {
138912
139131
  this._readBuffer.clear();
138913
139132
  }
138914
139133
  send(message) {
138915
- return new Promise((resolve36) => {
139134
+ return new Promise((resolve35) => {
138916
139135
  if (!this._process?.stdin) {
138917
139136
  throw new Error("Not connected");
138918
139137
  }
138919
139138
  const json = serializeMessage(message);
138920
139139
  if (this._process.stdin.write(json)) {
138921
- resolve36();
139140
+ resolve35();
138922
139141
  } else {
138923
- this._process.stdin.once("drain", resolve36);
139142
+ this._process.stdin.once("drain", resolve35);
138924
139143
  }
138925
139144
  });
138926
139145
  }
@@ -139382,17 +139601,17 @@ import { dirname as dirname42 } from "path";
139382
139601
  // packages/omo-opencode/src/features/tui-sidebar/mirror-path.ts
139383
139602
  import { createHash as createHash8 } from "crypto";
139384
139603
  import { realpathSync as realpathSync19 } from "fs";
139385
- import { homedir as homedir31 } from "os";
139386
- import { join as join125, resolve as resolve36 } from "path";
139604
+ import { homedir as homedir30 } from "os";
139605
+ import { join as join125, resolve as resolve35 } from "path";
139387
139606
  function mirrorStorageDir() {
139388
- return join125(process.env.XDG_DATA_HOME ?? join125(homedir31(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
139607
+ return join125(process.env.XDG_DATA_HOME ?? join125(homedir30(), ".local", "share"), "opencode", "storage", "oh-my-openagent", MIRROR_DIR_NAME);
139389
139608
  }
139390
139609
  function canonicalProjectDir(projectDir) {
139391
139610
  try {
139392
139611
  return realpathSync19.native(projectDir);
139393
139612
  } catch (error) {
139394
139613
  if (error instanceof Error) {
139395
- return resolve36(projectDir);
139614
+ return resolve35(projectDir);
139396
139615
  }
139397
139616
  throw error;
139398
139617
  }
@@ -140667,8 +140886,8 @@ async function waitForSessionReady(params) {
140667
140886
  } catch (error) {
140668
140887
  log2("[tmux-session-manager] session status check error", { error: String(error) });
140669
140888
  }
140670
- await new Promise((resolve37) => {
140671
- setTimeout(resolve37, SESSION_READY_POLL_INTERVAL_MS);
140889
+ await new Promise((resolve36) => {
140890
+ setTimeout(resolve36, SESSION_READY_POLL_INTERVAL_MS);
140672
140891
  });
140673
140892
  }
140674
140893
  log2("[tmux-session-manager] session ready timeout", {
@@ -142258,11 +142477,11 @@ import {
142258
142477
 
142259
142478
  // packages/openclaw-core/src/reply-listener-paths.ts
142260
142479
  import { existsSync as existsSync105, mkdirSync as mkdirSync22 } from "fs";
142261
- import { homedir as homedir32 } from "os";
142480
+ import { homedir as homedir31 } from "os";
142262
142481
  import { join as join127 } from "path";
142263
142482
  var REPLY_LISTENER_SECURE_FILE_MODE = 384;
142264
142483
  function resolveReplyListenerHomeDir() {
142265
- return process.env.HOME ?? process.env.USERPROFILE ?? homedir32();
142484
+ return process.env.HOME ?? process.env.USERPROFILE ?? homedir31();
142266
142485
  }
142267
142486
  function getReplyListenerStateDir() {
142268
142487
  return join127(resolveReplyListenerHomeDir(), ".omo", "openclaw", "state");
@@ -142787,7 +143006,7 @@ function markReplyListenerStopped(state3, error) {
142787
143006
 
142788
143007
  // packages/openclaw-core/src/reply-listener-sleep.ts
142789
143008
  function sleep3(ms) {
142790
- return new Promise((resolve37) => setTimeout(resolve37, ms));
143009
+ return new Promise((resolve36) => setTimeout(resolve36, ms));
142791
143010
  }
142792
143011
 
142793
143012
  // packages/openclaw-core/src/reply-listener-signature.ts
@@ -143430,11 +143649,11 @@ async function createRuntimeSkillSourceServer(options, runtimeEnv = runtime6) {
143430
143649
  response.end(error instanceof Error ? error.message : String(error));
143431
143650
  }
143432
143651
  });
143433
- await new Promise((resolve37, reject) => {
143652
+ await new Promise((resolve36, reject) => {
143434
143653
  const onError = (error) => reject(error);
143435
143654
  const onListening = () => {
143436
143655
  server3.off("error", onError);
143437
- resolve37();
143656
+ resolve36();
143438
143657
  };
143439
143658
  server3.once("error", onError);
143440
143659
  server3.once("listening", onListening);
@@ -143465,7 +143684,7 @@ async function createRuntimeSkillSourceServer(options, runtimeEnv = runtime6) {
143465
143684
  // packages/claude-code-compat-core/src/features/claude-code-mcp-loader/loader.ts
143466
143685
  import { existsSync as existsSync110, readFileSync as readFileSync76 } from "fs";
143467
143686
  import { join as join130 } from "path";
143468
- import { homedir as homedir33 } from "os";
143687
+ import { homedir as homedir32 } from "os";
143469
143688
  function getMcpConfigPaths() {
143470
143689
  const claudeConfigDir = getClaudeConfigDir3();
143471
143690
  const homeDir = getHomeDir();
@@ -143478,7 +143697,7 @@ function getMcpConfigPaths() {
143478
143697
  ];
143479
143698
  }
143480
143699
  function getHomeDir() {
143481
- return process.env.HOME || process.env.USERPROFILE || homedir33();
143700
+ return process.env.HOME || process.env.USERPROFILE || homedir32();
143482
143701
  }
143483
143702
  async function loadMcpConfigFile(filePath) {
143484
143703
  if (!existsSync110(filePath)) {
@@ -150384,7 +150603,7 @@ Write the final message and stop **only when** Success Criteria are all true. Un
150384
150603
  function buildGpt55HephaestusPrompt(availableAgents, _availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
150385
150604
  const taskSystemGuide = buildTaskSystemGuide2(useTaskSystem);
150386
150605
  const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
150387
- const delegationTable = buildDelegationTable(availableAgents);
150606
+ const delegationTable = buildDelegationTable(availableAgents.filter((agent) => ["explore", "librarian", "oracle"].includes(agent.name)));
150388
150607
  const oracleSection = buildOracleSection(availableAgents);
150389
150608
  const frontendGuidance = buildFrontendGuidanceSection(availableCategories);
150390
150609
  return HEPHAESTUS_GPT_5_5_TEMPLATE.replace("{{ taskSystemGuide }}", taskSystemGuide).replace("{{ categorySkillsGuide }}", categorySkillsGuide).replace("{{ delegationTable }}", delegationTable).replace("{{ oracleSection }}", oracleSection).replace("{{ frontendGuidance }}", frontendGuidance);
@@ -150405,7 +150624,7 @@ ID contract: background task IDs (\`bg_...\`) use \`background_output(task_id="b
150405
150624
 
150406
150625
  User instructions override these defaults; newer instructions override older ones. Safety and type-safety constraints never yield.
150407
150626
 
150408
- Implement, don't propose. Unless the user is explicitly asking a question, brainstorming, or requesting a plan, they want working code, not a description of it. Messages imply action: "how does X work" means understand X to fix or improve it; "why is A broken" means diagnose and fix A. Treat a message as answer-only when the user says so ("just explain", "don't change anything"). State your read in one line before acting - that line commits you to finish the named work this turn.
150627
+ Implement, don't propose. Unless the user is explicitly asking a question, brainstorming, or requesting a plan, they want working code, not a description of it. Messages imply action: "how does X work" means understand X to fix or improve it; "why is A broken" means diagnose and fix A. Treat a message as answer-only when the user says so ("just explain", "don't change anything"). State your read in one line before acting - name the work and end with "I'll stop right away when <the exact, observable condition that ends this turn>". That line commits you to finish the named work this turn, and the stop condition you declared is BINDING - the instant it holds, stop (see Stop Rules).
150409
150628
 
150410
150629
  Make the requested in-scope changes and run non-destructive validation without asking first. Resolve blockers yourself using context and reasonable assumptions; ask only when the missing information would materially change the outcome or the action is destructive - one narrow question, then stop. Never ask permission for obvious work.
150411
150630
 
@@ -150433,6 +150652,8 @@ Once you delegate exploration to background agents, do not search the same thing
150433
150652
 
150434
150653
  Independent tool calls run in the same response; serial is the exception and requires a real dependency. Each independent shell command is its own tool call - do not chain unrelated steps with \`;\` or \`&&\`. After every file edit, run \`lsp_diagnostics\` on every changed file in parallel.
150435
150654
 
150655
+ Waiting is not free: a status poll replays the whole accumulated context through the model. Run a long command (install, build, suite, CI watch) to completion in one call with a timeout sized to the expected wait - or send output to a log file read once on a completion signal - never re-poll the same surface with empty reads or sub-minute waits. If two consecutive checks show no state change, double the wait or switch to a completion signal.
150656
+
150436
150657
  # Operating Loop
150437
150658
 
150438
150659
  **Explore -> Plan -> Implement -> Verify -> Manually QA.**
@@ -150440,7 +150661,7 @@ Independent tool calls run in the same response; serial is the exception and req
150440
150661
  - **Explore** per Discovery & Retrieval.
150441
150662
  - **Plan** with \`update_plan\` for non-trivial work: files to modify, specific changes, dependencies. Skip planning for the easiest 25%; never make single-step plans.
150442
150663
  - **Implement** surgically, matching codebase style - naming, indentation, imports, error handling - even when you would write it differently in a greenfield.
150443
- - **Verify** with the most relevant validation available, in parallel where possible: \`lsp_diagnostics\` on changed files, targeted tests for changed behavior, build for affected packages. If validation cannot run, say why and name the next best check.
150664
+ - **Verify** with the most relevant validation available, in parallel where possible: \`lsp_diagnostics\` on changed files, targeted tests for changed behavior, build for affected packages. If validation cannot run, say why and name the next best check. Re-run a validation command only when its inputs changed since its last green run; one full pass at the end replaces repeated identical reruns.
150444
150665
  - **Manually QA** through the artifact's surface, then write the final message.
150445
150666
 
150446
150667
  # Manual QA Gate
@@ -150503,7 +150724,7 @@ AGENTS.md files carry directory-scoped conventions. Obey them for files in their
150503
150724
 
150504
150725
  - Every \`task()\` call needs \`load_skills\` (an empty array \`[]\` is valid).
150505
150726
  - Reuse continuation IDs (\`ses_...\`) for follow-ups via \`task(task_id="ses_...")\`; never pass background task IDs (\`bg_...\`) to \`task()\`. This preserves the sub-agent's full context and saves 70%+ of tokens.
150506
- - Sub-agent prompts carry four fields - **CONTEXT** (task, modules, approach), **GOAL** (what decision the results unblock), **DOWNSTREAM** (how you will use them), **REQUEST** (what to find, return format, what to skip).
150727
+ - Sub-agent prompts carry six fields - **CONTEXT** (task, modules, approach), **GOAL** (the one outcome that makes the child done), **STOP WHEN** (the exact, observable condition that ends its run; the child stops the moment it holds, exactly like your own intent line), **EVIDENCE** (what the child returns so you can SEE, not trust, that the condition held), **DOWNSTREAM** (how you will use the result), **REQUEST** (what to find, return format, what to skip). Fill GOAL, STOP WHEN, and EVIDENCE with outcomes and binding constraints, never mechanisms - name the behavior the child's work must achieve or distinguish, not a copy-ready assertion string, prompt fragment, or expected pass/assert count. Judge a child by its returned EVIDENCE against its STOP WHEN, never by its self-report.
150507
150728
 
150508
150729
  **Background tasks.** Collect results via \`background_output(task_id="bg_...")\` after completion. Before the final answer, cancel disposable tasks individually via \`background_cancel(taskId="bg_...")\`; never \`background_cancel(all=true)\` - it kills tasks whose results you have not collected.
150509
150730
 
@@ -150527,11 +150748,11 @@ Done when ALL of:
150527
150748
  - The artifact has been driven through its matching surface this turn (Manual QA Gate).
150528
150749
  - The final message reports what you did, what you verified, what you could not verify (with the reason), and pre-existing issues you noticed but did not touch.
150529
150750
 
150530
- When you think you are done: re-read the original request and your intent line, run verification once more on changed files in parallel, then report.
150751
+ When you think you are done: re-read the original request and your intent line once, and confirm each criterion above against the evidence you already captured - do not open a fresh validation pass to manufacture it.
150531
150752
 
150532
150753
  # Stop Rules
150533
150754
 
150534
- Write the final message and stop only when Success Criteria are all true. Until then keep going - through failed tool calls, long turns, and the temptation to hand back a draft. Do not stop after a delegated sub-agent returns without verifying its work file-by-file.
150755
+ Write the final message and stop only when Success Criteria are all true. Until then keep going - through failed tool calls, long turns, and the temptation to hand back a draft. Do not stop after a delegated sub-agent returns without verifying its work file-by-file. The moment Success Criteria hold and the stop condition from your intent line is met, deliver the final message and STOP - stopping is mandatory and immediate, not a judgment call. No extra validation loop, no re-polish, no bonus refactor, no drive-by cleanup; every action past the stop goal is a defect, not diligence.
150535
150756
 
150536
150757
  **Hard invariants** - non-negotiable, regardless of pressure to ship:
150537
150758
 
@@ -150547,7 +150768,7 @@ Write the final message and stop only when Success Criteria are all true. Until
150547
150768
  function buildGpt56HephaestusPrompt(availableAgents, _availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
150548
150769
  const taskSystemGuide = buildTaskSystemGuide3(useTaskSystem);
150549
150770
  const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
150550
- const delegationTable = buildDelegationTable(availableAgents);
150771
+ const delegationTable = buildDelegationTable(availableAgents.filter((agent) => ["explore", "librarian", "oracle"].includes(agent.name)));
150551
150772
  const oracleSection = buildOracleSection(availableAgents);
150552
150773
  const frontendGuidance = buildFrontendGuidanceSection(availableCategories);
150553
150774
  return HEPHAESTUS_GPT_5_6_TEMPLATE.replace("{{ taskSystemGuide }}", taskSystemGuide).replace("{{ categorySkillsGuide }}", categorySkillsGuide).replace("{{ delegationTable }}", delegationTable).replace("{{ oracleSection }}", oracleSection).replace("{{ frontendGuidance }}", frontendGuidance);
@@ -150651,14 +150872,14 @@ function createHephaestusAgent(model, availableAgents, availableToolNames, avail
150651
150872
  createHephaestusAgent.mode = MODE9;
150652
150873
  // packages/omo-opencode/src/agents/builtin-agents/resolve-file-uri.ts
150653
150874
  import { existsSync as existsSync111, readFileSync as readFileSync77 } from "fs";
150654
- import { homedir as homedir34 } from "os";
150655
- import { isAbsolute as isAbsolute19, join as join131, resolve as resolve37 } from "path";
150875
+ import { homedir as homedir33 } from "os";
150876
+ import { isAbsolute as isAbsolute19, join as join131, resolve as resolve36 } from "path";
150656
150877
  init_logger2();
150657
150878
  var ALLOWED_HOME_SUBDIRS = [
150658
- join131(homedir34(), ".config", "opencode"),
150659
- join131(homedir34(), ".config", "oh-my-openagent"),
150660
- join131(homedir34(), ".omo"),
150661
- join131(homedir34(), ".opencode")
150879
+ join131(homedir33(), ".config", "opencode"),
150880
+ join131(homedir33(), ".config", "oh-my-openagent"),
150881
+ join131(homedir33(), ".omo"),
150882
+ join131(homedir33(), ".opencode")
150662
150883
  ];
150663
150884
  function isWithinAllowedPaths(filePath, projectRoot) {
150664
150885
  if (isWithinProject(filePath, projectRoot))
@@ -150676,8 +150897,8 @@ function resolvePromptAppend(promptAppend, configDir) {
150676
150897
  let filePath;
150677
150898
  try {
150678
150899
  const decoded = decodeURIComponent(encoded);
150679
- const expanded = decoded.startsWith("~/") ? decoded.replace(/^~\//, `${homedir34()}/`) : decoded;
150680
- filePath = isAbsolute19(expanded) ? expanded : resolve37(configDir ?? process.cwd(), expanded);
150900
+ const expanded = decoded.startsWith("~/") ? decoded.replace(/^~\//, `${homedir33()}/`) : decoded;
150901
+ filePath = isAbsolute19(expanded) ? expanded : resolve36(configDir ?? process.cwd(), expanded);
150681
150902
  } catch (error) {
150682
150903
  if (!(error instanceof Error)) {
150683
150904
  throw error;
@@ -152785,7 +153006,8 @@ var MODEL_SETTINGS_KEYS = [
152785
153006
  "thinking",
152786
153007
  "reasoningEffort",
152787
153008
  "textVerbosity",
152788
- "providerOptions"
153009
+ "providerOptions",
153010
+ "fallback_models"
152789
153011
  ];
152790
153012
  function buildPlanDemoteConfig(prometheusConfig, planOverride) {
152791
153013
  const modelSettings = {};
@@ -152860,6 +153082,7 @@ async function buildPrometheusAgentConfig(params) {
152860
153082
  const temperatureToUse = params.pluginPrometheusOverride?.temperature ?? categoryConfig?.temperature;
152861
153083
  const topPToUse = params.pluginPrometheusOverride?.top_p ?? categoryConfig?.top_p;
152862
153084
  const maxTokensToUse = params.pluginPrometheusOverride?.maxTokens ?? categoryConfig?.maxTokens;
153085
+ const fallbackModelsToUse = params.pluginPrometheusOverride?.fallback_models ?? categoryConfig?.fallback_models;
152863
153086
  const base = {
152864
153087
  ...resolvedModel ? { model: resolvedModel } : {},
152865
153088
  ...variantToUse ? { variant: variantToUse } : {},
@@ -152871,6 +153094,7 @@ async function buildPrometheusAgentConfig(params) {
152871
153094
  ...temperatureToUse !== undefined ? { temperature: temperatureToUse } : {},
152872
153095
  ...topPToUse !== undefined ? { top_p: topPToUse } : {},
152873
153096
  ...maxTokensToUse !== undefined ? { maxTokens: maxTokensToUse } : {},
153097
+ ...fallbackModelsToUse !== undefined ? { fallback_models: fallbackModelsToUse } : {},
152874
153098
  ...categoryConfig?.tools ? { tools: categoryConfig.tools } : {},
152875
153099
  ...thinkingToUse ? { thinking: thinkingToUse } : {},
152876
153100
  ...reasoningEffortToUse !== undefined ? { reasoningEffort: reasoningEffortToUse } : {},
@@ -153763,9 +153987,10 @@ function createCodegraphMcpConfig(options = {}) {
153763
153987
  }
153764
153988
 
153765
153989
  // packages/omo-opencode/src/mcp/lsp.ts
153766
- import { existsSync as existsSync113 } from "fs";
153767
- import { delimiter as delimiter2, dirname as dirname45, resolve as resolve39 } from "path";
153990
+ import { existsSync as existsSync113, readFileSync as readFileSync78 } from "fs";
153991
+ import { delimiter as delimiter2, dirname as dirname45, resolve as resolve38 } from "path";
153768
153992
  import { fileURLToPath as fileURLToPath8 } from "url";
153993
+ import { z as z11 } from "zod";
153769
153994
 
153770
153995
  // packages/omo-opencode/src/mcp/cli-suffix.ts
153771
153996
  function normalizeCliPath(path22) {
@@ -153776,7 +154001,7 @@ function hasCliSuffix(candidatePath, suffix) {
153776
154001
  }
153777
154002
 
153778
154003
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
153779
- import { resolve as resolve38 } from "path";
154004
+ import { resolve as resolve37 } from "path";
153780
154005
  function resolveJavaScriptRuntime(resolveExecutable) {
153781
154006
  const node = resolveExecutable("node");
153782
154007
  return node.available ? node : resolveExecutable("bun");
@@ -153784,9 +154009,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
153784
154009
  function createAncestorCliCandidates(options) {
153785
154010
  const candidates = [];
153786
154011
  const seenPaths = new Set;
153787
- let currentDirectory = resolve38(options.startDirectory);
154012
+ let currentDirectory = resolve37(options.startDirectory);
153788
154013
  while (true) {
153789
- const distCliPath = resolve38(currentDirectory, options.packageRel, options.distCliRel);
154014
+ const distCliPath = resolve37(currentDirectory, options.packageRel, options.distCliRel);
153790
154015
  if (!seenPaths.has(distCliPath)) {
153791
154016
  const runtime7 = resolveJavaScriptRuntime(options.resolveExecutable);
153792
154017
  seenPaths.add(distCliPath);
@@ -153798,7 +154023,7 @@ function createAncestorCliCandidates(options) {
153798
154023
  runtimeAvailable: runtime7.available
153799
154024
  });
153800
154025
  }
153801
- const sourceCliPath = resolve38(currentDirectory, options.packageRel, options.sourceCliRel);
154026
+ const sourceCliPath = resolve37(currentDirectory, options.packageRel, options.sourceCliRel);
153802
154027
  if (!seenPaths.has(sourceCliPath)) {
153803
154028
  const runtime7 = options.resolveExecutable("bun");
153804
154029
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -153815,7 +154040,7 @@ function createAncestorCliCandidates(options) {
153815
154040
  runtimeAvailable: runtime7.available
153816
154041
  });
153817
154042
  }
153818
- const parentDirectory = resolve38(currentDirectory, "..");
154043
+ const parentDirectory = resolve37(currentDirectory, "..");
153819
154044
  if (parentDirectory === currentDirectory)
153820
154045
  return candidates;
153821
154046
  currentDirectory = parentDirectory;
@@ -153828,8 +154053,15 @@ var LSP_TOOLS_PACKAGE_REL = "packages/lsp-tools-mcp";
153828
154053
  var DIST_CLI_REL = "dist/cli.js";
153829
154054
  var SOURCE_CLI_REL = "src/cli.ts";
153830
154055
  var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-client.json"];
154056
+ var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
154057
+ var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
154058
+ var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
154059
+ var DaemonPackageSchema = z11.object({
154060
+ version: z11.string().min(1)
154061
+ });
153831
154062
  var LSP_BOOTSTRAP_SCRIPT = [
153832
154063
  "const { existsSync } = require('node:fs')",
154064
+ "const { createRequire } = require('node:module')",
153833
154065
  "const { join } = require('node:path')",
153834
154066
  "const { spawnSync } = require('node:child_process')",
153835
154067
  "const root = process.argv[1]",
@@ -153838,16 +154070,18 @@ var LSP_BOOTSTRAP_SCRIPT = [
153838
154070
  `const toolsPackage = join(root, '${LSP_TOOLS_PACKAGE_REL}')`,
153839
154071
  `const daemonPackage = join(root, '${PACKAGE_REL}')`,
153840
154072
  "const toolsDist = join(toolsPackage, 'dist/cli.js')",
153841
- "const daemonDist = join(daemonPackage, 'dist/cli.js')",
154073
+ "const daemonPackageJson = join(daemonPackage, 'package.json')",
153842
154074
  "const daemonSource = join(daemonPackage, 'src/cli.ts')",
153843
154075
  "const run = (command, args, stdio) => spawnSync(command, args, { cwd: root, env: process.env, stdio })",
153844
154076
  "const finish = (result) => { if (result.error) { console.error(result.error.message); process.exit(1) } process.exit(result.status ?? 1) }",
153845
154077
  "const runIfAvailable = (command, args) => { const result = run(command, args, 'inherit'); if (result.error) return false; finish(result); return true }",
153846
- "if (existsSync(daemonDist)) finish(run(process.execPath, [daemonDist, 'mcp'], 'inherit'))",
153847
- "if (existsSync(daemonSource) && existsSync(toolsDist)) runIfAvailable(bun, [daemonSource, 'mcp'])",
154078
+ `const resolveDaemonCli = () => { try { return createRequire(daemonPackageJson).resolve('${DAEMON_PACKAGE_NAME}/cli') } catch (error) { if (error instanceof Error) return null; throw error } }`,
154079
+ "const daemonCli = existsSync(daemonPackageJson) ? resolveDaemonCli() : null",
154080
+ "if (daemonCli) finish(run(process.execPath, [daemonCli, 'mcp'], 'inherit'))",
154081
+ `if (existsSync(daemonSource) && existsSync(toolsDist)) { const pkg = require(daemonPackageJson); process.env.${OMO_LSP_DAEMON_CLI} = daemonSource; process.env.${OMO_LSP_DAEMON_VERSION} = pkg.version; runIfAvailable(bun, [daemonSource, 'mcp']) }`,
153848
154082
  "const steps = [[npm, ['--prefix', toolsPackage, 'install', '--no-package-lock', '--no-audit', '--no-fund']], [npm, ['--prefix', toolsPackage, 'run', 'build']], [npm, ['--prefix', daemonPackage, 'install', '--no-package-lock', '--no-audit', '--no-fund']], [npm, ['--prefix', daemonPackage, 'run', 'build']]]",
153849
154083
  "for (const [command, args] of steps) { const result = run(command, args, ['ignore', 'ignore', 'inherit']); if (result.error || result.status !== 0) finish(result) }",
153850
- "finish(run(process.execPath, [daemonDist, 'mcp'], 'inherit'))"
154084
+ "finish(run(process.execPath, [resolveDaemonCli(), 'mcp'], 'inherit'))"
153851
154085
  ].join(";");
153852
154086
  function getModuleDirectory(moduleUrl) {
153853
154087
  try {
@@ -153859,17 +154093,27 @@ function getModuleDirectory(moduleUrl) {
153859
154093
  }
153860
154094
  }
153861
154095
  function findBootstrapRoot(candidates, pathExists) {
153862
- return candidates.find((candidate) => pathExists(resolve39(candidate.root, "package.json")))?.root ?? process.cwd();
154096
+ return candidates.find((candidate) => pathExists(resolve38(candidate.root, "package.json")))?.root ?? process.cwd();
154097
+ }
154098
+ function readDaemonPackageVersion(root) {
154099
+ try {
154100
+ const packageJson = JSON.parse(readFileSync78(resolve38(root, PACKAGE_REL, "package.json"), "utf-8"));
154101
+ return DaemonPackageSchema.parse(packageJson).version;
154102
+ } catch (error) {
154103
+ if (!(error instanceof Error))
154104
+ throw error;
154105
+ return null;
154106
+ }
153863
154107
  }
153864
154108
  function createBootstrapCandidate(root, pathExists, resolveExecutable) {
153865
154109
  const runtime7 = resolveJavaScriptRuntime(resolveExecutable);
153866
154110
  const bun = resolveExecutable("bun");
153867
154111
  const npm = resolveExecutable("npm");
153868
- const packageManifestPath = resolve39(root, PACKAGE_REL, "package.json");
154112
+ const packageManifestPath = resolve38(root, PACKAGE_REL, "package.json");
153869
154113
  return {
153870
154114
  command: [runtime7.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
153871
154115
  root,
153872
- path: resolve39(root, PACKAGE_REL, DIST_CLI_REL),
154116
+ path: resolve38(root, PACKAGE_REL, DIST_CLI_REL),
153873
154117
  exists: runtime7.available && npm.available && pathExists(packageManifestPath),
153874
154118
  runtimeAvailable: runtime7.available
153875
154119
  };
@@ -153885,7 +154129,7 @@ function resolveLspCommand(options = {}) {
153885
154129
  sourceCliRel: SOURCE_CLI_REL,
153886
154130
  pathExists,
153887
154131
  resolveExecutable,
153888
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve39(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL))
154132
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve38(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
153889
154133
  }) : [];
153890
154134
  const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
153891
154135
  if (distCandidate) {
@@ -153899,20 +154143,29 @@ function resolveLspCommand(options = {}) {
153899
154143
  }
153900
154144
  function createLspMcpConfig(options = {}) {
153901
154145
  const resolvedCommand = resolveLspCommand(options);
154146
+ const cwd = resolve38(options.cwd ?? process.cwd());
154147
+ const configDir = getOpenCodeConfigDir({ binary: "opencode" });
154148
+ const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
153902
154149
  return {
153903
154150
  type: "local",
153904
154151
  command: resolvedCommand.command,
153905
154152
  enabled: resolvedCommand.exists,
153906
154153
  environment: {
153907
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.join(delimiter2)
154154
+ LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve38(cwd, configPath)).join(delimiter2),
154155
+ LSP_TOOLS_MCP_USER_CONFIG: resolve38(configDir, "lsp.json"),
154156
+ LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve38(configDir, "lsp-install-decisions.json"),
154157
+ ...sourceVersion ? {
154158
+ [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
154159
+ [OMO_LSP_DAEMON_VERSION]: sourceVersion
154160
+ } : {}
153908
154161
  }
153909
154162
  };
153910
154163
  }
153911
154164
 
153912
154165
  // packages/omo-opencode/src/mcp/types.ts
153913
- import { z as z11 } from "zod";
153914
- var McpNameSchema = z11.enum(["websearch", "context7", "grep_app", "lsp", "codegraph"]);
153915
- var AnyMcpNameSchema = z11.string().min(1);
154166
+ import { z as z12 } from "zod";
154167
+ var McpNameSchema = z12.enum(["websearch", "context7", "grep_app", "lsp", "codegraph"]);
154168
+ var AnyMcpNameSchema = z12.string().min(1);
153916
154169
 
153917
154170
  // packages/omo-opencode/src/mcp/index.ts
153918
154171
  function createBuiltinMcps(disabledMcps = [], config, options = {}) {
@@ -154515,7 +154768,7 @@ function createTeamModeToolsRecord(args) {
154515
154768
  // node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js
154516
154769
  var createSseClient2 = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url2, ...options }) => {
154517
154770
  let lastEventId;
154518
- const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve40) => setTimeout(resolve40, ms)));
154771
+ const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve39) => setTimeout(resolve39, ms)));
154519
154772
  const createStream = async function* () {
154520
154773
  let retryDelay = sseDefaultRetryDelay ?? 3000;
154521
154774
  let attempt = 0;
@@ -157989,14 +158242,14 @@ class OpencodeClient2 extends HeyApiClient {
157989
158242
  // node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/v2/server.js
157990
158243
  var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
157991
158244
  // packages/omo-opencode/src/plugin/native-skills.ts
157992
- import { z as z12 } from "zod";
157993
- var NativeSkillEntrySchema = z12.object({
157994
- name: z12.string(),
157995
- description: z12.string().default(""),
157996
- location: z12.string(),
157997
- content: z12.string()
158245
+ import { z as z13 } from "zod";
158246
+ var NativeSkillEntrySchema = z13.object({
158247
+ name: z13.string(),
158248
+ description: z13.string().default(""),
158249
+ location: z13.string(),
158250
+ content: z13.string()
157998
158251
  });
157999
- var NativeSkillEntriesSchema = z12.array(NativeSkillEntrySchema);
158252
+ var NativeSkillEntriesSchema = z13.array(NativeSkillEntrySchema);
158000
158253
  function getObjectProperty(value, property) {
158001
158254
  if (typeof value !== "object" || value === null)
158002
158255
  return;
@@ -158064,7 +158317,7 @@ async function readRuntimeHostSkills(client5) {
158064
158317
  function createRuntimeSkillsResolver(args) {
158065
158318
  const { baseSkills, readRuntimeHostSkills: readHostSkills, buildMergedSkills } = args;
158066
158319
  let inflight;
158067
- const resolve40 = async () => {
158320
+ const resolve39 = async () => {
158068
158321
  const hostSkills = await readHostSkills();
158069
158322
  if (!hostSkills)
158070
158323
  return baseSkills;
@@ -158076,7 +158329,7 @@ function createRuntimeSkillsResolver(args) {
158076
158329
  };
158077
158330
  return () => {
158078
158331
  if (!inflight)
158079
- inflight = resolve40();
158332
+ inflight = resolve39();
158080
158333
  return inflight;
158081
158334
  };
158082
158335
  }
@@ -158916,7 +159169,7 @@ async function waitForTaskSessionId(bgMgr, task, deadlineAt) {
158916
159169
  }
158917
159170
  sessionId = updatedTask?.sessionId;
158918
159171
  if (!sessionId)
158919
- await new Promise((resolve40) => setTimeout(resolve40, SESSION_ID_POLL_MS));
159172
+ await new Promise((resolve39) => setTimeout(resolve39, SESSION_ID_POLL_MS));
158920
159173
  }
158921
159174
  return sessionId;
158922
159175
  }
@@ -159134,7 +159387,7 @@ async function resolveParticipant2(teamRunId, sessionID, config, deps) {
159134
159387
  }
159135
159388
 
159136
159389
  // packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
159137
- import { z as z13 } from "zod";
159390
+ import { z as z14 } from "zod";
159138
159391
  init_types2();
159139
159392
  var TEAM_CREATE_USAGE = 'team_create requires exactly one of teamName or inline_spec. Use team_create({ teamName: "existing-team" }) or team_create({ inline_spec: { name: "team-name", members: [{ name: "worker", category: "quick", prompt: "Do the assigned work." }] } }).';
159140
159393
  function omitEmptyStringArgs(rawArgs) {
@@ -159143,10 +159396,10 @@ function omitEmptyStringArgs(rawArgs) {
159143
159396
  }
159144
159397
  return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
159145
159398
  }
159146
- var TeamCreateArgsSchema = z13.preprocess(omitEmptyStringArgs, z13.object({
159147
- teamName: z13.string().min(1).nullish(),
159148
- inline_spec: z13.unknown().nullish(),
159149
- leadSessionId: z13.string().nullish()
159399
+ var TeamCreateArgsSchema = z14.preprocess(omitEmptyStringArgs, z14.object({
159400
+ teamName: z14.string().min(1).nullish(),
159401
+ inline_spec: z14.unknown().nullish(),
159402
+ leadSessionId: z14.string().nullish()
159150
159403
  }).superRefine((value, ctx) => {
159151
159404
  const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
159152
159405
  if (optionCount !== 1) {
@@ -159267,7 +159520,7 @@ function createTeamCreateTool(config, client5, bgMgr, tmuxMgr, executorConfig, d
159267
159520
  });
159268
159521
  }
159269
159522
  // packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
159270
- import { z as z14 } from "zod";
159523
+ import { z as z15 } from "zod";
159271
159524
  // packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
159272
159525
  init_store3();
159273
159526
  init_shutdown_helpers();
@@ -159356,13 +159609,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
159356
159609
 
159357
159610
  // packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
159358
159611
  init_store2();
159359
- var TeamDeleteArgsSchema = z14.object({ teamRunId: z14.string().min(1), force: z14.boolean().optional() });
159360
- var TeamShutdownRequestArgsSchema = z14.object({ teamRunId: z14.string().min(1), targetMemberName: z14.string().min(1) });
159361
- var TeamApproveShutdownArgsSchema = z14.object({ teamRunId: z14.string().min(1), memberName: z14.string().min(1) });
159362
- var TeamRejectShutdownArgsSchema = z14.object({
159363
- teamRunId: z14.string().min(1),
159364
- memberName: z14.string().min(1),
159365
- reason: z14.string().min(1)
159612
+ var TeamDeleteArgsSchema = z15.object({ teamRunId: z15.string().min(1), force: z15.boolean().optional() });
159613
+ var TeamShutdownRequestArgsSchema = z15.object({ teamRunId: z15.string().min(1), targetMemberName: z15.string().min(1) });
159614
+ var TeamApproveShutdownArgsSchema = z15.object({ teamRunId: z15.string().min(1), memberName: z15.string().min(1) });
159615
+ var TeamRejectShutdownArgsSchema = z15.object({
159616
+ teamRunId: z15.string().min(1),
159617
+ memberName: z15.string().min(1),
159618
+ reason: z15.string().min(1)
159366
159619
  });
159367
159620
  var defaultTeamShutdownToolDeps = {
159368
159621
  listActiveTeams,
@@ -160404,13 +160657,13 @@ function logCaughtDbError(message, metadata, error) {
160404
160657
  log2(message, { ...metadata, error: String(error) });
160405
160658
  }
160406
160659
  function nextMicrotask() {
160407
- return new Promise((resolve40) => {
160408
- queueMicrotask(resolve40);
160660
+ return new Promise((resolve39) => {
160661
+ queueMicrotask(resolve39);
160409
160662
  });
160410
160663
  }
160411
160664
  function nextTimerTick() {
160412
- return new Promise((resolve40) => {
160413
- setTimeout(resolve40, 0);
160665
+ return new Promise((resolve39) => {
160666
+ setTimeout(resolve39, 0);
160414
160667
  });
160415
160668
  }
160416
160669
  function closeDbWithLog(db, message, metadata) {
@@ -161028,7 +161281,8 @@ var MESSAGES_TRANSFORM_HOOKS = [
161028
161281
  { key: "teamModeStatusInjector", name: "teamModeStatusInjector" },
161029
161282
  { key: "teamMailboxInjector", name: "teamMailboxInjector" },
161030
161283
  { key: "toolPairValidator", name: "toolPairValidator" },
161031
- { key: "monitorStatusInjector", name: "monitorStatusInjector" }
161284
+ { key: "monitorStatusInjector", name: "monitorStatusInjector" },
161285
+ { key: "categorySkillReminder", name: "categorySkillReminder" }
161032
161286
  ];
161033
161287
  function getSessionID2(message) {
161034
161288
  return message.info.sessionID;
@@ -163035,12 +163289,12 @@ function createPluginInterface(args) {
163035
163289
 
163036
163290
  // packages/omo-opencode/src/plugin-config/layered-config-loader.ts
163037
163291
  import * as fs25 from "fs";
163038
- import { homedir as homedir35 } from "os";
163292
+ import { homedir as homedir34 } from "os";
163039
163293
  import * as path27 from "path";
163040
163294
 
163041
163295
  // packages/omo-opencode/src/config/schema/agent-names.ts
163042
- import { z as z15 } from "zod";
163043
- var BuiltinAgentNameSchema = z15.enum([
163296
+ import { z as z16 } from "zod";
163297
+ var BuiltinAgentNameSchema = z16.enum([
163044
163298
  "sisyphus",
163045
163299
  "hephaestus",
163046
163300
  "prometheus",
@@ -163053,7 +163307,7 @@ var BuiltinAgentNameSchema = z15.enum([
163053
163307
  "atlas",
163054
163308
  "sisyphus-junior"
163055
163309
  ]);
163056
- var BuiltinSkillNameSchema = z15.enum([
163310
+ var BuiltinSkillNameSchema = z16.enum([
163057
163311
  "playwright",
163058
163312
  "agent-browser",
163059
163313
  "dev-browser",
@@ -163068,7 +163322,7 @@ var BuiltinSkillNameSchema = z15.enum([
163068
163322
  "visual-qa",
163069
163323
  "team-mode"
163070
163324
  ]);
163071
- var OverridableAgentNameSchema = z15.enum([
163325
+ var OverridableAgentNameSchema = z16.enum([
163072
163326
  "build",
163073
163327
  "plan",
163074
163328
  "sisyphus",
@@ -163085,40 +163339,40 @@ var OverridableAgentNameSchema = z15.enum([
163085
163339
  "atlas"
163086
163340
  ]);
163087
163341
  // packages/omo-opencode/src/config/schema/agent-overrides.ts
163088
- import { z as z18 } from "zod";
163342
+ import { z as z19 } from "zod";
163089
163343
 
163090
163344
  // packages/omo-opencode/src/config/schema/fallback-models.ts
163091
- import { z as z16 } from "zod";
163092
- var FallbackModelObjectSchema = z16.object({
163093
- model: z16.string(),
163094
- variant: z16.string().optional(),
163095
- reasoningEffort: z16.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163096
- temperature: z16.number().min(0).max(2).optional(),
163097
- top_p: z16.number().min(0).max(1).optional(),
163098
- maxTokens: z16.number().optional(),
163099
- thinking: z16.object({
163100
- type: z16.enum(["enabled", "disabled"]),
163101
- budgetTokens: z16.number().optional()
163345
+ import { z as z17 } from "zod";
163346
+ var FallbackModelObjectSchema = z17.object({
163347
+ model: z17.string(),
163348
+ variant: z17.string().optional(),
163349
+ reasoningEffort: z17.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163350
+ temperature: z17.number().min(0).max(2).optional(),
163351
+ top_p: z17.number().min(0).max(1).optional(),
163352
+ maxTokens: z17.number().optional(),
163353
+ thinking: z17.object({
163354
+ type: z17.enum(["enabled", "disabled"]),
163355
+ budgetTokens: z17.number().optional()
163102
163356
  }).optional()
163103
163357
  });
163104
- var FallbackModelStringArraySchema = z16.array(z16.string());
163105
- var FallbackModelObjectArraySchema = z16.array(FallbackModelObjectSchema);
163106
- var FallbackModelMixedArraySchema = z16.array(z16.union([z16.string(), FallbackModelObjectSchema]));
163107
- var FallbackModelsSchema = z16.union([
163108
- z16.string(),
163358
+ var FallbackModelStringArraySchema = z17.array(z17.string());
163359
+ var FallbackModelObjectArraySchema = z17.array(FallbackModelObjectSchema);
163360
+ var FallbackModelMixedArraySchema = z17.array(z17.union([z17.string(), FallbackModelObjectSchema]));
163361
+ var FallbackModelsSchema = z17.union([
163362
+ z17.string(),
163109
163363
  FallbackModelStringArraySchema,
163110
163364
  FallbackModelObjectArraySchema,
163111
163365
  FallbackModelMixedArraySchema
163112
163366
  ]);
163113
163367
 
163114
163368
  // packages/omo-opencode/src/config/schema/internal/permission.ts
163115
- import { z as z17 } from "zod";
163116
- var PermissionValueSchema = z17.enum(["ask", "allow", "deny"]);
163117
- var BashPermissionSchema = z17.union([
163369
+ import { z as z18 } from "zod";
163370
+ var PermissionValueSchema = z18.enum(["ask", "allow", "deny"]);
163371
+ var BashPermissionSchema = z18.union([
163118
163372
  PermissionValueSchema,
163119
- z17.record(z17.string(), PermissionValueSchema)
163373
+ z18.record(z18.string(), PermissionValueSchema)
163120
163374
  ]);
163121
- var AgentPermissionSchema = z17.object({
163375
+ var AgentPermissionSchema = z18.object({
163122
163376
  edit: PermissionValueSchema.optional(),
163123
163377
  bash: BashPermissionSchema.optional(),
163124
163378
  webfetch: PermissionValueSchema.optional(),
@@ -163128,46 +163382,46 @@ var AgentPermissionSchema = z17.object({
163128
163382
  }).catchall(PermissionValueSchema.optional());
163129
163383
 
163130
163384
  // packages/omo-opencode/src/config/schema/agent-overrides.ts
163131
- var AgentOverrideConfigSchema = z18.object({
163132
- model: z18.string().optional(),
163385
+ var AgentOverrideConfigSchema = z19.object({
163386
+ model: z19.string().optional(),
163133
163387
  fallback_models: FallbackModelsSchema.optional(),
163134
- variant: z18.string().optional(),
163135
- category: z18.string().optional(),
163136
- skills: z18.array(z18.string()).optional(),
163137
- temperature: z18.number().min(0).max(2).optional(),
163138
- top_p: z18.number().min(0).max(1).optional(),
163139
- prompt: z18.string().optional(),
163140
- prompt_append: z18.string().optional(),
163141
- tools: z18.record(z18.string(), z18.boolean()).optional(),
163142
- disable: z18.boolean().optional(),
163143
- description: z18.string().optional(),
163144
- mode: z18.enum(["subagent", "primary", "all"]).optional(),
163145
- color: z18.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
163146
- displayName: z18.string().optional(),
163388
+ variant: z19.string().optional(),
163389
+ category: z19.string().optional(),
163390
+ skills: z19.array(z19.string()).optional(),
163391
+ temperature: z19.number().min(0).max(2).optional(),
163392
+ top_p: z19.number().min(0).max(1).optional(),
163393
+ prompt: z19.string().optional(),
163394
+ prompt_append: z19.string().optional(),
163395
+ tools: z19.record(z19.string(), z19.boolean()).optional(),
163396
+ disable: z19.boolean().optional(),
163397
+ description: z19.string().optional(),
163398
+ mode: z19.enum(["subagent", "primary", "all"]).optional(),
163399
+ color: z19.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
163400
+ displayName: z19.string().optional(),
163147
163401
  permission: AgentPermissionSchema.optional(),
163148
- maxTokens: z18.number().optional(),
163149
- thinking: z18.object({
163150
- type: z18.enum(["enabled", "disabled"]),
163151
- budgetTokens: z18.number().optional()
163402
+ maxTokens: z19.number().optional(),
163403
+ thinking: z19.object({
163404
+ type: z19.enum(["enabled", "disabled"]),
163405
+ budgetTokens: z19.number().optional()
163152
163406
  }).optional(),
163153
- reasoningEffort: z18.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163154
- textVerbosity: z18.enum(["low", "medium", "high"]).optional(),
163155
- providerOptions: z18.record(z18.string(), z18.unknown()).optional(),
163156
- ultrawork: z18.object({
163157
- model: z18.string().optional(),
163158
- variant: z18.string().optional()
163407
+ reasoningEffort: z19.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163408
+ textVerbosity: z19.enum(["low", "medium", "high"]).optional(),
163409
+ providerOptions: z19.record(z19.string(), z19.unknown()).optional(),
163410
+ ultrawork: z19.object({
163411
+ model: z19.string().optional(),
163412
+ variant: z19.string().optional()
163159
163413
  }).optional(),
163160
- compaction: z18.object({
163161
- model: z18.string().optional(),
163162
- variant: z18.string().optional()
163414
+ compaction: z19.object({
163415
+ model: z19.string().optional(),
163416
+ variant: z19.string().optional()
163163
163417
  }).optional()
163164
163418
  });
163165
- var AgentOverridesSchema = z18.object({
163419
+ var AgentOverridesSchema = z19.object({
163166
163420
  build: AgentOverrideConfigSchema.optional(),
163167
163421
  plan: AgentOverrideConfigSchema.optional(),
163168
163422
  sisyphus: AgentOverrideConfigSchema.optional(),
163169
163423
  hephaestus: AgentOverrideConfigSchema.extend({
163170
- allow_non_gpt_model: z18.boolean().optional()
163424
+ allow_non_gpt_model: z19.boolean().optional()
163171
163425
  }).optional(),
163172
163426
  "sisyphus-junior": AgentOverrideConfigSchema.optional(),
163173
163427
  "OpenCode-Builder": AgentOverrideConfigSchema.optional(),
@@ -163181,65 +163435,65 @@ var AgentOverridesSchema = z18.object({
163181
163435
  atlas: AgentOverrideConfigSchema.optional()
163182
163436
  }).catchall(AgentOverrideConfigSchema.optional());
163183
163437
  // packages/omo-opencode/src/config/schema/babysitting.ts
163184
- import { z as z19 } from "zod";
163185
- var BabysittingConfigSchema = z19.object({
163186
- timeout_ms: z19.number().default(120000)
163438
+ import { z as z20 } from "zod";
163439
+ var BabysittingConfigSchema = z20.object({
163440
+ timeout_ms: z20.number().default(120000)
163187
163441
  });
163188
163442
  // packages/omo-opencode/src/config/schema/background-task.ts
163189
- import { z as z20 } from "zod";
163190
- var CircuitBreakerConfigSchema = z20.object({
163191
- enabled: z20.boolean().optional(),
163192
- maxToolCalls: z20.number().int().min(10).optional(),
163193
- consecutiveThreshold: z20.number().int().min(5).optional()
163443
+ import { z as z21 } from "zod";
163444
+ var CircuitBreakerConfigSchema = z21.object({
163445
+ enabled: z21.boolean().optional(),
163446
+ maxToolCalls: z21.number().int().min(10).optional(),
163447
+ consecutiveThreshold: z21.number().int().min(5).optional()
163194
163448
  });
163195
- var BackgroundTaskConfigSchema = z20.object({
163196
- defaultConcurrency: z20.number().min(1).optional(),
163197
- providerConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
163198
- modelConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
163199
- maxDepth: z20.number().int().min(1).optional(),
163200
- staleTimeoutMs: z20.number().min(60000).optional(),
163201
- messageStalenessTimeoutMs: z20.number().min(60000).optional(),
163202
- taskTtlMs: z20.number().min(300000).optional(),
163203
- sessionGoneTimeoutMs: z20.number().min(1e4).optional(),
163204
- taskCleanupDelayMs: z20.number().min(60000).optional(),
163205
- syncPollTimeoutMs: z20.number().min(60000).optional(),
163206
- maxToolCalls: z20.number().int().min(10).optional(),
163449
+ var BackgroundTaskConfigSchema = z21.object({
163450
+ defaultConcurrency: z21.number().min(1).optional(),
163451
+ providerConcurrency: z21.record(z21.string(), z21.number().min(0)).optional(),
163452
+ modelConcurrency: z21.record(z21.string(), z21.number().min(0)).optional(),
163453
+ maxDepth: z21.number().int().min(1).optional(),
163454
+ staleTimeoutMs: z21.number().min(60000).optional(),
163455
+ messageStalenessTimeoutMs: z21.number().min(60000).optional(),
163456
+ taskTtlMs: z21.number().min(300000).optional(),
163457
+ sessionGoneTimeoutMs: z21.number().min(1e4).optional(),
163458
+ taskCleanupDelayMs: z21.number().min(60000).optional(),
163459
+ syncPollTimeoutMs: z21.number().min(60000).optional(),
163460
+ maxToolCalls: z21.number().int().min(10).optional(),
163207
163461
  circuitBreaker: CircuitBreakerConfigSchema.optional()
163208
163462
  });
163209
163463
  // packages/omo-opencode/src/config/schema/browser-automation.ts
163210
- import { z as z21 } from "zod";
163211
- var BrowserAutomationProviderSchema = z21.enum([
163464
+ import { z as z22 } from "zod";
163465
+ var BrowserAutomationProviderSchema = z22.enum([
163212
163466
  "playwright",
163213
163467
  "agent-browser",
163214
163468
  "dev-browser",
163215
163469
  "playwright-cli"
163216
163470
  ]);
163217
- var BrowserAutomationConfigSchema = z21.object({
163471
+ var BrowserAutomationConfigSchema = z22.object({
163218
163472
  provider: BrowserAutomationProviderSchema.default("playwright")
163219
163473
  });
163220
163474
  // packages/omo-opencode/src/config/schema/categories.ts
163221
- import { z as z22 } from "zod";
163222
- var CategoryConfigSchema = z22.object({
163223
- description: z22.string().optional(),
163224
- model: z22.string().optional(),
163475
+ import { z as z23 } from "zod";
163476
+ var CategoryConfigSchema = z23.object({
163477
+ description: z23.string().optional(),
163478
+ model: z23.string().optional(),
163225
163479
  fallback_models: FallbackModelsSchema.optional(),
163226
- variant: z22.string().optional(),
163227
- temperature: z22.number().min(0).max(2).optional(),
163228
- top_p: z22.number().min(0).max(1).optional(),
163229
- maxTokens: z22.number().optional(),
163230
- thinking: z22.object({
163231
- type: z22.enum(["enabled", "disabled"]),
163232
- budgetTokens: z22.number().optional()
163480
+ variant: z23.string().optional(),
163481
+ temperature: z23.number().min(0).max(2).optional(),
163482
+ top_p: z23.number().min(0).max(1).optional(),
163483
+ maxTokens: z23.number().optional(),
163484
+ thinking: z23.object({
163485
+ type: z23.enum(["enabled", "disabled"]),
163486
+ budgetTokens: z23.number().optional()
163233
163487
  }).optional(),
163234
- reasoningEffort: z22.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163235
- textVerbosity: z22.enum(["low", "medium", "high"]).optional(),
163236
- tools: z22.record(z22.string(), z22.boolean()).optional(),
163237
- prompt_append: z22.string().optional(),
163238
- max_prompt_tokens: z22.number().int().positive().optional(),
163239
- is_unstable_agent: z22.boolean().optional(),
163240
- disable: z22.boolean().optional()
163488
+ reasoningEffort: z23.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
163489
+ textVerbosity: z23.enum(["low", "medium", "high"]).optional(),
163490
+ tools: z23.record(z23.string(), z23.boolean()).optional(),
163491
+ prompt_append: z23.string().optional(),
163492
+ max_prompt_tokens: z23.number().int().positive().optional(),
163493
+ is_unstable_agent: z23.boolean().optional(),
163494
+ disable: z23.boolean().optional()
163241
163495
  });
163242
- var BuiltinCategoryNameSchema = z22.enum([
163496
+ var BuiltinCategoryNameSchema = z23.enum([
163243
163497
  "visual-engineering",
163244
163498
  "ultrabrain",
163245
163499
  "deep",
@@ -163249,39 +163503,39 @@ var BuiltinCategoryNameSchema = z22.enum([
163249
163503
  "unspecified-high",
163250
163504
  "writing"
163251
163505
  ]);
163252
- var CategoriesConfigSchema = z22.record(z22.string(), CategoryConfigSchema);
163506
+ var CategoriesConfigSchema = z23.record(z23.string(), CategoryConfigSchema);
163253
163507
  // packages/omo-opencode/src/config/schema/claude-code.ts
163254
- import { z as z23 } from "zod";
163255
- var ClaudeCodeConfigSchema = z23.object({
163256
- mcp: z23.boolean().optional(),
163257
- commands: z23.boolean().optional(),
163258
- skills: z23.boolean().optional(),
163259
- agents: z23.boolean().optional(),
163260
- hooks: z23.boolean().optional(),
163261
- plugins: z23.boolean().optional(),
163262
- plugins_override: z23.record(z23.string(), z23.boolean()).optional(),
163263
- anthropic_provider: z23.string().trim().min(1).refine((v) => !v.includes("/"), {
163508
+ import { z as z24 } from "zod";
163509
+ var ClaudeCodeConfigSchema = z24.object({
163510
+ mcp: z24.boolean().optional(),
163511
+ commands: z24.boolean().optional(),
163512
+ skills: z24.boolean().optional(),
163513
+ agents: z24.boolean().optional(),
163514
+ hooks: z24.boolean().optional(),
163515
+ plugins: z24.boolean().optional(),
163516
+ plugins_override: z24.record(z24.string(), z24.boolean()).optional(),
163517
+ anthropic_provider: z24.string().trim().min(1).refine((v) => !v.includes("/"), {
163264
163518
  message: "anthropic_provider must be a provider name without '/'"
163265
163519
  }).optional()
163266
163520
  });
163267
163521
  // packages/omo-opencode/src/config/schema/codegraph.ts
163268
- import { z as z24 } from "zod";
163269
- var CodegraphConfigSchema = z24.object({
163270
- auto_init: z24.boolean().default(true),
163271
- auto_provision: z24.boolean().default(true),
163272
- enabled: z24.boolean().default(true),
163273
- install_dir: z24.string().optional(),
163274
- telemetry: z24.boolean().optional(),
163275
- watch_debounce_ms: z24.number().nonnegative().optional()
163522
+ import { z as z25 } from "zod";
163523
+ var CodegraphConfigSchema = z25.object({
163524
+ auto_init: z25.boolean().default(true),
163525
+ auto_provision: z25.boolean().default(true),
163526
+ enabled: z25.boolean().default(true),
163527
+ install_dir: z25.string().optional(),
163528
+ telemetry: z25.boolean().optional(),
163529
+ watch_debounce_ms: z25.number().nonnegative().optional()
163276
163530
  });
163277
163531
  // packages/omo-opencode/src/config/schema/comment-checker.ts
163278
- import { z as z25 } from "zod";
163279
- var CommentCheckerConfigSchema = z25.object({
163280
- custom_prompt: z25.string().optional()
163532
+ import { z as z26 } from "zod";
163533
+ var CommentCheckerConfigSchema = z26.object({
163534
+ custom_prompt: z26.string().optional()
163281
163535
  });
163282
163536
  // packages/omo-opencode/src/config/schema/commands.ts
163283
- import { z as z26 } from "zod";
163284
- var BuiltinCommandNameSchema = z26.enum([
163537
+ import { z as z27 } from "zod";
163538
+ var BuiltinCommandNameSchema = z27.enum([
163285
163539
  "ralph-loop",
163286
163540
  "ulw-loop",
163287
163541
  "cancel-ralph",
@@ -163292,21 +163546,21 @@ var BuiltinCommandNameSchema = z26.enum([
163292
163546
  "hyperplan"
163293
163547
  ]);
163294
163548
  // packages/omo-opencode/src/config/schema/default-mode.ts
163295
- import { z as z27 } from "zod";
163296
- var DefaultModeConfigSchema = z27.object({
163297
- ultrawork: z27.boolean().default(false),
163298
- ralph_loop: z27.boolean().default(false)
163549
+ import { z as z28 } from "zod";
163550
+ var DefaultModeConfigSchema = z28.object({
163551
+ ultrawork: z28.boolean().default(false),
163552
+ ralph_loop: z28.boolean().default(false)
163299
163553
  });
163300
163554
  // packages/omo-opencode/src/config/schema/dynamic-context-pruning.ts
163301
- import { z as z28 } from "zod";
163302
- var DynamicContextPruningConfigSchema = z28.object({
163303
- enabled: z28.boolean().default(false),
163304
- notification: z28.enum(["off", "minimal", "detailed"]).default("detailed"),
163305
- turn_protection: z28.object({
163306
- enabled: z28.boolean().default(true),
163307
- turns: z28.number().min(1).max(10).default(3)
163555
+ import { z as z29 } from "zod";
163556
+ var DynamicContextPruningConfigSchema = z29.object({
163557
+ enabled: z29.boolean().default(false),
163558
+ notification: z29.enum(["off", "minimal", "detailed"]).default("detailed"),
163559
+ turn_protection: z29.object({
163560
+ enabled: z29.boolean().default(true),
163561
+ turns: z29.number().min(1).max(10).default(3)
163308
163562
  }).optional(),
163309
- protected_tools: z28.array(z28.string()).default([
163563
+ protected_tools: z29.array(z29.string()).default([
163310
163564
  "task",
163311
163565
  "todowrite",
163312
163566
  "todoread",
@@ -163315,46 +163569,46 @@ var DynamicContextPruningConfigSchema = z28.object({
163315
163569
  "session_write",
163316
163570
  "session_search"
163317
163571
  ]),
163318
- strategies: z28.object({
163319
- deduplication: z28.object({
163320
- enabled: z28.boolean().default(true)
163572
+ strategies: z29.object({
163573
+ deduplication: z29.object({
163574
+ enabled: z29.boolean().default(true)
163321
163575
  }).optional(),
163322
- supersede_writes: z28.object({
163323
- enabled: z28.boolean().default(true),
163324
- aggressive: z28.boolean().default(false)
163576
+ supersede_writes: z29.object({
163577
+ enabled: z29.boolean().default(true),
163578
+ aggressive: z29.boolean().default(false)
163325
163579
  }).optional(),
163326
- purge_errors: z28.object({
163327
- enabled: z28.boolean().default(true),
163328
- turns: z28.number().min(1).max(20).default(5)
163580
+ purge_errors: z29.object({
163581
+ enabled: z29.boolean().default(true),
163582
+ turns: z29.number().min(1).max(20).default(5)
163329
163583
  }).optional()
163330
163584
  }).optional()
163331
163585
  });
163332
163586
  // packages/omo-opencode/src/config/schema/experimental.ts
163333
- import { z as z29 } from "zod";
163334
- var ExperimentalConfigSchema = z29.object({
163335
- aggressive_truncation: z29.boolean().optional(),
163336
- preemptive_compaction: z29.boolean().optional(),
163337
- truncate_all_tool_outputs: z29.boolean().optional(),
163587
+ import { z as z30 } from "zod";
163588
+ var ExperimentalConfigSchema = z30.object({
163589
+ aggressive_truncation: z30.boolean().optional(),
163590
+ preemptive_compaction: z30.boolean().optional(),
163591
+ truncate_all_tool_outputs: z30.boolean().optional(),
163338
163592
  dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
163339
- task_system: z29.boolean().optional(),
163340
- plugin_load_timeout_ms: z29.number().min(1000).optional(),
163341
- safe_hook_creation: z29.boolean().optional(),
163342
- disable_omo_env: z29.boolean().optional(),
163343
- hashline_edit: z29.boolean().optional(),
163344
- model_fallback_title: z29.boolean().optional(),
163345
- max_tools: z29.number().int().min(1).optional(),
163346
- disable_live_parent_wake_routing: z29.boolean().optional()
163593
+ task_system: z30.boolean().optional(),
163594
+ plugin_load_timeout_ms: z30.number().min(1000).optional(),
163595
+ safe_hook_creation: z30.boolean().optional(),
163596
+ disable_omo_env: z30.boolean().optional(),
163597
+ hashline_edit: z30.boolean().optional(),
163598
+ model_fallback_title: z30.boolean().optional(),
163599
+ max_tools: z30.number().int().min(1).optional(),
163600
+ disable_live_parent_wake_routing: z30.boolean().optional()
163347
163601
  });
163348
163602
  // packages/omo-opencode/src/config/schema/git-master.ts
163349
- import { z as z30 } from "zod";
163350
- var GitMasterConfigSchema = z30.object({
163351
- commit_footer: z30.union([z30.boolean(), z30.string()]).default(true),
163352
- include_co_authored_by: z30.boolean().default(true),
163603
+ import { z as z31 } from "zod";
163604
+ var GitMasterConfigSchema = z31.object({
163605
+ commit_footer: z31.union([z31.boolean(), z31.string()]).default(true),
163606
+ include_co_authored_by: z31.boolean().default(true),
163353
163607
  git_env_prefix: GitEnvPrefixSchema
163354
163608
  });
163355
163609
  // packages/omo-opencode/src/config/schema/hooks.ts
163356
- import { z as z31 } from "zod";
163357
- var HookNameSchema = z31.enum([
163610
+ import { z as z32 } from "zod";
163611
+ var HookNameSchema = z32.enum([
163358
163612
  "todo-continuation-enforcer",
163359
163613
  "session-notification",
163360
163614
  "comment-checker",
@@ -163413,229 +163667,229 @@ var HookNameSchema = z31.enum([
163413
163667
  "legacy-plugin-toast"
163414
163668
  ]);
163415
163669
  // packages/omo-opencode/src/config/schema/i18n.ts
163416
- import { z as z32 } from "zod";
163417
- var I18nConfigSchema = z32.object({
163418
- locale: z32.string().optional()
163670
+ import { z as z33 } from "zod";
163671
+ var I18nConfigSchema = z33.object({
163672
+ locale: z33.string().optional()
163419
163673
  });
163420
163674
  // packages/omo-opencode/src/config/schema/keyword-detector.ts
163421
- import { z as z33 } from "zod";
163422
- var KeywordTypeSchema = z33.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
163423
- var KeywordDetectorConfigSchema = z33.object({
163424
- enabled_expansions: z33.array(KeywordTypeSchema).optional(),
163425
- disabled_keywords: z33.array(KeywordTypeSchema).optional()
163675
+ import { z as z34 } from "zod";
163676
+ var KeywordTypeSchema = z34.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
163677
+ var KeywordDetectorConfigSchema = z34.object({
163678
+ enabled_expansions: z34.array(KeywordTypeSchema).optional(),
163679
+ disabled_keywords: z34.array(KeywordTypeSchema).optional()
163426
163680
  });
163427
163681
  // packages/omo-opencode/src/config/schema/model-capabilities.ts
163428
- import { z as z34 } from "zod";
163429
- var ModelCapabilitiesConfigSchema = z34.object({
163430
- enabled: z34.boolean().optional(),
163431
- auto_refresh_on_start: z34.boolean().optional(),
163432
- refresh_timeout_ms: z34.number().int().positive().optional(),
163433
- source_url: z34.string().url().optional()
163682
+ import { z as z35 } from "zod";
163683
+ var ModelCapabilitiesConfigSchema = z35.object({
163684
+ enabled: z35.boolean().optional(),
163685
+ auto_refresh_on_start: z35.boolean().optional(),
163686
+ refresh_timeout_ms: z35.number().int().positive().optional(),
163687
+ source_url: z35.string().url().optional()
163434
163688
  });
163435
163689
  // packages/omo-opencode/src/config/schema/notification.ts
163436
- import { z as z35 } from "zod";
163437
- var NotificationConfigSchema = z35.object({
163438
- force_enable: z35.boolean().optional()
163690
+ import { z as z36 } from "zod";
163691
+ var NotificationConfigSchema = z36.object({
163692
+ force_enable: z36.boolean().optional()
163439
163693
  });
163440
163694
  // packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
163441
- import { z as z48 } from "zod";
163695
+ import { z as z49 } from "zod";
163442
163696
 
163443
163697
  // packages/omo-opencode/src/config/schema/agent-definitions.ts
163444
- import { z as z36 } from "zod";
163445
- var AgentDefinitionPathSchema = z36.string().min(1);
163446
- var AgentDefinitionsConfigSchema = z36.array(AgentDefinitionPathSchema).optional();
163698
+ import { z as z37 } from "zod";
163699
+ var AgentDefinitionPathSchema = z37.string().min(1);
163700
+ var AgentDefinitionsConfigSchema = z37.array(AgentDefinitionPathSchema).optional();
163447
163701
 
163448
163702
  // packages/omo-opencode/src/config/schema/openclaw.ts
163449
- import { z as z37 } from "zod";
163450
- var OpenClawGatewaySchema = z37.object({
163451
- type: z37.enum(["http", "command"]).default("http"),
163452
- url: z37.string().optional(),
163453
- method: z37.string().default("POST"),
163454
- headers: z37.record(z37.string(), z37.string()).optional(),
163455
- command: z37.string().optional(),
163456
- timeout: z37.number().optional()
163703
+ import { z as z38 } from "zod";
163704
+ var OpenClawGatewaySchema = z38.object({
163705
+ type: z38.enum(["http", "command"]).default("http"),
163706
+ url: z38.string().optional(),
163707
+ method: z38.string().default("POST"),
163708
+ headers: z38.record(z38.string(), z38.string()).optional(),
163709
+ command: z38.string().optional(),
163710
+ timeout: z38.number().optional()
163457
163711
  });
163458
- var OpenClawHookSchema = z37.object({
163459
- enabled: z37.boolean().default(true),
163460
- gateway: z37.string(),
163461
- instruction: z37.string()
163712
+ var OpenClawHookSchema = z38.object({
163713
+ enabled: z38.boolean().default(true),
163714
+ gateway: z38.string(),
163715
+ instruction: z38.string()
163462
163716
  });
163463
- var OpenClawReplyListenerConfigSchema = z37.object({
163464
- discordBotToken: z37.string().optional(),
163465
- discordChannelId: z37.string().optional(),
163466
- discordMention: z37.string().optional(),
163467
- authorizedDiscordUserIds: z37.array(z37.string()).default([]),
163468
- telegramBotToken: z37.string().optional(),
163469
- telegramChatId: z37.string().optional(),
163470
- pollIntervalMs: z37.number().default(3000),
163471
- rateLimitPerMinute: z37.number().default(10),
163472
- maxMessageLength: z37.number().default(500),
163473
- includePrefix: z37.boolean().default(true)
163717
+ var OpenClawReplyListenerConfigSchema = z38.object({
163718
+ discordBotToken: z38.string().optional(),
163719
+ discordChannelId: z38.string().optional(),
163720
+ discordMention: z38.string().optional(),
163721
+ authorizedDiscordUserIds: z38.array(z38.string()).default([]),
163722
+ telegramBotToken: z38.string().optional(),
163723
+ telegramChatId: z38.string().optional(),
163724
+ pollIntervalMs: z38.number().default(3000),
163725
+ rateLimitPerMinute: z38.number().default(10),
163726
+ maxMessageLength: z38.number().default(500),
163727
+ includePrefix: z38.boolean().default(true)
163474
163728
  });
163475
- var OpenClawConfigSchema = z37.object({
163476
- enabled: z37.boolean().default(false),
163477
- gateways: z37.record(z37.string(), OpenClawGatewaySchema).default({}),
163478
- hooks: z37.record(z37.string(), OpenClawHookSchema).default({}),
163729
+ var OpenClawConfigSchema = z38.object({
163730
+ enabled: z38.boolean().default(false),
163731
+ gateways: z38.record(z38.string(), OpenClawGatewaySchema).default({}),
163732
+ hooks: z38.record(z38.string(), OpenClawHookSchema).default({}),
163479
163733
  replyListener: OpenClawReplyListenerConfigSchema.optional()
163480
163734
  });
163481
163735
 
163482
163736
  // packages/omo-opencode/src/config/schema/monitor.ts
163483
- import { z as z38 } from "zod";
163484
- var MonitorConfigSchema = z38.object({
163485
- enabled: z38.boolean().default(false),
163486
- live_mode_enabled: z38.boolean().default(false),
163487
- allowed_commands: z38.array(z38.string()).optional(),
163488
- max_monitors_per_session: z38.number().int().min(1).max(16).default(3),
163489
- max_runtime_ms: z38.number().int().min(1000).default(1800000),
163490
- batch_max_lines: z38.number().int().min(1).default(50),
163491
- batch_max_bytes: z38.number().int().min(1024).default(16384),
163492
- flush_interval_ms: z38.number().int().min(250).default(1000),
163493
- ring_max_lines: z38.number().int().min(1).default(1000),
163494
- line_max_bytes: z38.number().int().min(256).default(8192),
163495
- pattern_max_length: z38.number().int().min(1).default(512)
163737
+ import { z as z39 } from "zod";
163738
+ var MonitorConfigSchema = z39.object({
163739
+ enabled: z39.boolean().default(false),
163740
+ live_mode_enabled: z39.boolean().default(false),
163741
+ allowed_commands: z39.array(z39.string()).optional(),
163742
+ max_monitors_per_session: z39.number().int().min(1).max(16).default(3),
163743
+ max_runtime_ms: z39.number().int().min(1000).default(1800000),
163744
+ batch_max_lines: z39.number().int().min(1).default(50),
163745
+ batch_max_bytes: z39.number().int().min(1024).default(16384),
163746
+ flush_interval_ms: z39.number().int().min(250).default(1000),
163747
+ ring_max_lines: z39.number().int().min(1).default(1000),
163748
+ line_max_bytes: z39.number().int().min(256).default(8192),
163749
+ pattern_max_length: z39.number().int().min(1).default(512)
163496
163750
  });
163497
163751
 
163498
163752
  // packages/omo-opencode/src/config/schema/ralph-loop.ts
163499
- import { z as z39 } from "zod";
163500
- var RalphLoopConfigSchema = z39.object({
163501
- enabled: z39.boolean().default(false),
163502
- default_max_iterations: z39.number().min(1).max(1000).default(100),
163503
- state_dir: z39.string().optional(),
163504
- default_strategy: z39.enum(["reset", "continue"]).default("continue")
163753
+ import { z as z40 } from "zod";
163754
+ var RalphLoopConfigSchema = z40.object({
163755
+ enabled: z40.boolean().default(false),
163756
+ default_max_iterations: z40.number().min(1).max(1000).default(100),
163757
+ state_dir: z40.string().optional(),
163758
+ default_strategy: z40.enum(["reset", "continue"]).default("continue")
163505
163759
  });
163506
163760
 
163507
163761
  // packages/omo-opencode/src/config/schema/runtime-fallback.ts
163508
- import { z as z40 } from "zod";
163509
- var RuntimeFallbackConfigSchema = z40.object({
163510
- enabled: z40.boolean().optional(),
163511
- retry_on_errors: z40.array(z40.number()).optional(),
163512
- max_fallback_attempts: z40.number().min(1).max(20).optional(),
163513
- cooldown_seconds: z40.number().min(0).optional(),
163514
- timeout_seconds: z40.number().min(0).optional(),
163515
- notify_on_fallback: z40.boolean().optional(),
163516
- restore_primary_after_cooldown: z40.boolean().optional()
163762
+ import { z as z41 } from "zod";
163763
+ var RuntimeFallbackConfigSchema = z41.object({
163764
+ enabled: z41.boolean().optional(),
163765
+ retry_on_errors: z41.array(z41.number()).optional(),
163766
+ max_fallback_attempts: z41.number().min(1).max(20).optional(),
163767
+ cooldown_seconds: z41.number().min(0).optional(),
163768
+ timeout_seconds: z41.number().min(0).optional(),
163769
+ notify_on_fallback: z41.boolean().optional(),
163770
+ restore_primary_after_cooldown: z41.boolean().optional()
163517
163771
  });
163518
163772
 
163519
163773
  // packages/team-core/src/config.ts
163520
- import * as z41 from "zod";
163521
- var TeamModeConfigSchema = z41.object({
163522
- enabled: z41.boolean().default(false),
163523
- tmux_visualization: z41.boolean().default(false),
163524
- max_parallel_members: z41.number().int().min(1).max(8).default(4),
163525
- max_members: z41.number().int().min(1).max(8).default(8),
163526
- max_messages_per_run: z41.number().int().min(1).default(1e4),
163527
- max_wall_clock_minutes: z41.number().int().min(1).default(120),
163528
- max_member_turns: z41.number().int().min(1).default(500),
163529
- base_dir: z41.string().optional(),
163530
- message_payload_max_bytes: z41.number().int().min(1024).default(32768),
163531
- recipient_unread_max_bytes: z41.number().int().min(1024).default(262144),
163532
- mailbox_poll_interval_ms: z41.number().int().min(500).default(3000)
163774
+ import * as z42 from "zod";
163775
+ var TeamModeConfigSchema = z42.object({
163776
+ enabled: z42.boolean().default(false),
163777
+ tmux_visualization: z42.boolean().default(false),
163778
+ max_parallel_members: z42.number().int().min(1).max(8).default(4),
163779
+ max_members: z42.number().int().min(1).max(8).default(8),
163780
+ max_messages_per_run: z42.number().int().min(1).default(1e4),
163781
+ max_wall_clock_minutes: z42.number().int().min(1).default(120),
163782
+ max_member_turns: z42.number().int().min(1).default(500),
163783
+ base_dir: z42.string().optional(),
163784
+ message_payload_max_bytes: z42.number().int().min(1024).default(32768),
163785
+ recipient_unread_max_bytes: z42.number().int().min(1024).default(262144),
163786
+ mailbox_poll_interval_ms: z42.number().int().min(500).default(3000)
163533
163787
  });
163534
163788
  // packages/omo-opencode/src/config/schema/skills.ts
163535
- import { z as z42 } from "zod";
163536
- var SkillSourceSchema = z42.union([
163537
- z42.string(),
163538
- z42.object({
163539
- path: z42.string(),
163540
- recursive: z42.boolean().optional(),
163541
- glob: z42.string().optional()
163789
+ import { z as z43 } from "zod";
163790
+ var SkillSourceSchema = z43.union([
163791
+ z43.string(),
163792
+ z43.object({
163793
+ path: z43.string(),
163794
+ recursive: z43.boolean().optional(),
163795
+ glob: z43.string().optional()
163542
163796
  })
163543
163797
  ]);
163544
- var SkillDefinitionSchema = z42.object({
163545
- description: z42.string().optional(),
163546
- template: z42.string().optional(),
163547
- from: z42.string().optional(),
163548
- model: z42.string().optional(),
163549
- agent: z42.string().optional(),
163550
- subtask: z42.boolean().optional(),
163551
- "argument-hint": z42.string().optional(),
163552
- license: z42.string().optional(),
163553
- compatibility: z42.string().optional(),
163554
- metadata: z42.record(z42.string(), z42.unknown()).optional(),
163555
- "allowed-tools": z42.array(z42.string()).optional(),
163556
- disable: z42.boolean().optional()
163798
+ var SkillDefinitionSchema = z43.object({
163799
+ description: z43.string().optional(),
163800
+ template: z43.string().optional(),
163801
+ from: z43.string().optional(),
163802
+ model: z43.string().optional(),
163803
+ agent: z43.string().optional(),
163804
+ subtask: z43.boolean().optional(),
163805
+ "argument-hint": z43.string().optional(),
163806
+ license: z43.string().optional(),
163807
+ compatibility: z43.string().optional(),
163808
+ metadata: z43.record(z43.string(), z43.unknown()).optional(),
163809
+ "allowed-tools": z43.array(z43.string()).optional(),
163810
+ disable: z43.boolean().optional()
163557
163811
  });
163558
- var SkillEntrySchema = z42.union([z42.boolean(), SkillDefinitionSchema]);
163559
- var SkillsConfigSchema = z42.union([
163560
- z42.array(z42.string()),
163561
- z42.object({
163562
- sources: z42.array(SkillSourceSchema).optional(),
163563
- enable: z42.array(z42.string()).optional(),
163564
- disable: z42.array(z42.string()).optional()
163812
+ var SkillEntrySchema = z43.union([z43.boolean(), SkillDefinitionSchema]);
163813
+ var SkillsConfigSchema = z43.union([
163814
+ z43.array(z43.string()),
163815
+ z43.object({
163816
+ sources: z43.array(SkillSourceSchema).optional(),
163817
+ enable: z43.array(z43.string()).optional(),
163818
+ disable: z43.array(z43.string()).optional()
163565
163819
  }).catchall(SkillEntrySchema)
163566
163820
  ]);
163567
163821
 
163568
163822
  // packages/omo-opencode/src/config/schema/sisyphus.ts
163569
- import { z as z43 } from "zod";
163570
- var SisyphusTasksConfigSchema = z43.object({
163571
- storage_path: z43.string().optional(),
163572
- task_list_id: z43.string().optional(),
163573
- claude_code_compat: z43.boolean().default(false)
163823
+ import { z as z44 } from "zod";
163824
+ var SisyphusTasksConfigSchema = z44.object({
163825
+ storage_path: z44.string().optional(),
163826
+ task_list_id: z44.string().optional(),
163827
+ claude_code_compat: z44.boolean().default(false)
163574
163828
  });
163575
- var SisyphusConfigSchema = z43.object({
163829
+ var SisyphusConfigSchema = z44.object({
163576
163830
  tasks: SisyphusTasksConfigSchema.optional()
163577
163831
  });
163578
163832
 
163579
163833
  // packages/omo-opencode/src/config/schema/sisyphus-agent.ts
163580
- import { z as z44 } from "zod";
163581
- var SisyphusAgentConfigSchema = z44.object({
163582
- disabled: z44.boolean().optional(),
163583
- default_builder_enabled: z44.boolean().optional(),
163584
- planner_enabled: z44.boolean().optional(),
163585
- replace_plan: z44.boolean().optional(),
163586
- tdd: z44.boolean().default(true).optional()
163834
+ import { z as z45 } from "zod";
163835
+ var SisyphusAgentConfigSchema = z45.object({
163836
+ disabled: z45.boolean().optional(),
163837
+ default_builder_enabled: z45.boolean().optional(),
163838
+ planner_enabled: z45.boolean().optional(),
163839
+ replace_plan: z45.boolean().optional(),
163840
+ tdd: z45.boolean().default(true).optional()
163587
163841
  });
163588
163842
 
163589
163843
  // packages/omo-opencode/src/config/schema/tui.ts
163590
- import { z as z45 } from "zod";
163591
- var TuiSidebarConfigSchema = z45.object({
163592
- enabled: z45.boolean().default(true)
163844
+ import { z as z46 } from "zod";
163845
+ var TuiSidebarConfigSchema = z46.object({
163846
+ enabled: z46.boolean().default(true)
163593
163847
  });
163594
- var TuiConfigSchema = z45.object({
163848
+ var TuiConfigSchema = z46.object({
163595
163849
  sidebar: TuiSidebarConfigSchema.default({ enabled: true })
163596
163850
  });
163597
163851
 
163598
163852
  // packages/omo-opencode/src/config/schema/start-work.ts
163599
- import { z as z46 } from "zod";
163600
- var StartWorkConfigSchema = z46.object({
163601
- auto_commit: z46.boolean().default(true)
163853
+ import { z as z47 } from "zod";
163854
+ var StartWorkConfigSchema = z47.object({
163855
+ auto_commit: z47.boolean().default(true)
163602
163856
  });
163603
163857
 
163604
163858
  // packages/omo-opencode/src/config/schema/websearch.ts
163605
- import { z as z47 } from "zod";
163606
- var WebsearchProviderSchema = z47.enum(["exa", "tavily"]);
163607
- var WebsearchConfigSchema = z47.object({
163859
+ import { z as z48 } from "zod";
163860
+ var WebsearchProviderSchema = z48.enum(["exa", "tavily"]);
163861
+ var WebsearchConfigSchema = z48.object({
163608
163862
  provider: WebsearchProviderSchema.optional()
163609
163863
  });
163610
163864
 
163611
163865
  // packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
163612
- var OhMyOpenCodeConfigSchema = z48.object({
163613
- $schema: z48.string().optional(),
163614
- new_task_system_enabled: z48.boolean().optional(),
163615
- default_run_agent: z48.string().optional(),
163616
- agent_order: z48.array(z48.string().max(128)).max(64).optional(),
163866
+ var OhMyOpenCodeConfigSchema = z49.object({
163867
+ $schema: z49.string().optional(),
163868
+ new_task_system_enabled: z49.boolean().optional(),
163869
+ default_run_agent: z49.string().optional(),
163870
+ agent_order: z49.array(z49.string().max(128)).max(64).optional(),
163617
163871
  agent_definitions: AgentDefinitionsConfigSchema,
163618
- disabled_mcps: z48.array(AnyMcpNameSchema).optional(),
163619
- disabled_agents: z48.array(z48.string()).optional(),
163620
- disabled_skills: z48.array(z48.string()).optional(),
163621
- disabled_hooks: z48.array(z48.string()).optional(),
163622
- disabled_commands: z48.array(BuiltinCommandNameSchema).optional(),
163623
- disabled_tools: z48.array(z48.string()).optional(),
163624
- disabled_providers: z48.array(z48.string()).optional(),
163625
- mcp_env_allowlist: z48.array(z48.string()).optional(),
163626
- hashline_edit: z48.boolean().optional(),
163627
- telemetry: z48.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable. Independent of codegraph.telemetry."),
163628
- model_fallback: z48.boolean().optional(),
163872
+ disabled_mcps: z49.array(AnyMcpNameSchema).optional(),
163873
+ disabled_agents: z49.array(z49.string()).optional(),
163874
+ disabled_skills: z49.array(z49.string()).optional(),
163875
+ disabled_hooks: z49.array(z49.string()).optional(),
163876
+ disabled_commands: z49.array(BuiltinCommandNameSchema).optional(),
163877
+ disabled_tools: z49.array(z49.string()).optional(),
163878
+ disabled_providers: z49.array(z49.string()).optional(),
163879
+ mcp_env_allowlist: z49.array(z49.string()).optional(),
163880
+ hashline_edit: z49.boolean().optional(),
163881
+ telemetry: z49.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable. Independent of codegraph.telemetry."),
163882
+ model_fallback: z49.boolean().optional(),
163629
163883
  agents: AgentOverridesSchema.optional(),
163630
163884
  categories: CategoriesConfigSchema.optional(),
163631
163885
  claude_code: ClaudeCodeConfigSchema.optional(),
163632
163886
  sisyphus_agent: SisyphusAgentConfigSchema.optional(),
163633
163887
  comment_checker: CommentCheckerConfigSchema.optional(),
163634
163888
  experimental: ExperimentalConfigSchema.optional(),
163635
- auto_update: z48.boolean().optional(),
163889
+ auto_update: z49.boolean().optional(),
163636
163890
  skills: SkillsConfigSchema.optional(),
163637
163891
  ralph_loop: RalphLoopConfigSchema.optional(),
163638
- runtime_fallback: z48.union([z48.boolean(), RuntimeFallbackConfigSchema]).optional(),
163892
+ runtime_fallback: z49.union([z49.boolean(), RuntimeFallbackConfigSchema]).optional(),
163639
163893
  background_task: BackgroundTaskConfigSchema.optional(),
163640
163894
  notification: NotificationConfigSchema.optional(),
163641
163895
  model_capabilities: ModelCapabilitiesConfigSchema.optional(),
@@ -163658,7 +163912,7 @@ var OhMyOpenCodeConfigSchema = z48.object({
163658
163912
  sisyphus: SisyphusConfigSchema.optional(),
163659
163913
  start_work: StartWorkConfigSchema.optional(),
163660
163914
  default_mode: DefaultModeConfigSchema.optional(),
163661
- _migrations: z48.array(z48.string()).optional()
163915
+ _migrations: z49.array(z49.string()).optional()
163662
163916
  });
163663
163917
  // packages/omo-opencode/src/shared/disabled-providers.ts
163664
163918
  init_logger2();
@@ -163880,7 +164134,7 @@ function loadConfigFromPath2(configPath, _ctx) {
163880
164134
 
163881
164135
  // packages/omo-opencode/src/plugin-config/layered-config-loader.ts
163882
164136
  function resolveHomeDirectory() {
163883
- return process.env.HOME ?? process.env.USERPROFILE ?? homedir35();
164137
+ return process.env.HOME ?? process.env.USERPROFILE ?? homedir34();
163884
164138
  }
163885
164139
  function resolveConfigPathAfterLegacyMigration(detectedPath) {
163886
164140
  if (!path27.basename(detectedPath).startsWith(LEGACY_CONFIG_BASENAME)) {
@@ -164162,7 +164416,7 @@ init_logger2();
164162
164416
  // packages/telemetry-core/src/activity-state.ts
164163
164417
  init_atomic_write();
164164
164418
  init_xdg_data_dir();
164165
- import { existsSync as existsSync117, mkdirSync as mkdirSync24, readFileSync as readFileSync79 } from "fs";
164419
+ import { existsSync as existsSync117, mkdirSync as mkdirSync24, readFileSync as readFileSync80 } from "fs";
164166
164420
  import { basename as basename27, join as join136 } from "path";
164167
164421
  var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
164168
164422
  function resolveTelemetryStateDir(product, options = {}) {
@@ -164206,7 +164460,7 @@ function readPostHogActivityState(stateDir, diagnostics) {
164206
164460
  return {};
164207
164461
  }
164208
164462
  try {
164209
- const stateContent = readFileSync79(stateFilePath, "utf-8");
164463
+ const stateContent = readFileSync80(stateFilePath, "utf-8");
164210
164464
  const stateJson = JSON.parse(stateContent);
164211
164465
  if (!isPostHogActivityState(stateJson)) {
164212
164466
  return {};
@@ -164281,9 +164535,9 @@ function getTelemetryHost(env2 = process.env, defaultHost = DEFAULT_POSTHOG_HOST
164281
164535
 
164282
164536
  // packages/telemetry-core/src/machine-id.ts
164283
164537
  import { createHash as createHash9 } from "crypto";
164284
- import os7 from "os";
164538
+ import os6 from "os";
164285
164539
  function getDefaultTelemetryOsProvider() {
164286
- return os7;
164540
+ return os6;
164287
164541
  }
164288
164542
  function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
164289
164543
  return createHash9("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
@@ -166986,14 +167240,14 @@ async function addSourceContext(frames) {
166986
167240
  return frames;
166987
167241
  }
166988
167242
  function getContextLinesFromFile(path28, ranges, output) {
166989
- return new Promise((resolve40) => {
167243
+ return new Promise((resolve39) => {
166990
167244
  const stream = createReadStream(path28);
166991
167245
  const lineReaded = createInterface({
166992
167246
  input: stream
166993
167247
  });
166994
167248
  function destroyStreamAndResolve() {
166995
167249
  stream.destroy();
166996
- resolve40();
167250
+ resolve39();
166997
167251
  }
166998
167252
  let lineNumber = 0;
166999
167253
  let currentRangeIndex = 0;
@@ -168444,9 +168698,9 @@ class PostHogBackendClient extends PostHogCoreStateless {
168444
168698
  if (this.disabled || this.optedOut)
168445
168699
  return;
168446
168700
  if (!this._waitUntilCycle) {
168447
- let resolve40;
168701
+ let resolve39;
168448
168702
  const promise2 = new Promise((r) => {
168449
- resolve40 = r;
168703
+ resolve39 = r;
168450
168704
  });
168451
168705
  try {
168452
168706
  waitUntil(promise2);
@@ -168454,7 +168708,7 @@ class PostHogBackendClient extends PostHogCoreStateless {
168454
168708
  return;
168455
168709
  }
168456
168710
  this._waitUntilCycle = {
168457
- resolve: resolve40,
168711
+ resolve: resolve39,
168458
168712
  startedAt: Date.now(),
168459
168713
  timer: undefined
168460
168714
  };
@@ -168480,11 +168734,11 @@ class PostHogBackendClient extends PostHogCoreStateless {
168480
168734
  return cycle?.resolve;
168481
168735
  }
168482
168736
  async resolveWaitUntilFlush() {
168483
- const resolve40 = this._consumeWaitUntilCycle();
168737
+ const resolve39 = this._consumeWaitUntilCycle();
168484
168738
  try {
168485
168739
  await super.flush();
168486
168740
  } catch {} finally {
168487
- resolve40?.();
168741
+ resolve39?.();
168488
168742
  }
168489
168743
  }
168490
168744
  getPersistedProperty(key) {
@@ -168584,15 +168838,15 @@ class PostHogBackendClient extends PostHogCoreStateless {
168584
168838
  return true;
168585
168839
  if (this.featureFlagsPoller === undefined)
168586
168840
  return false;
168587
- return new Promise((resolve40) => {
168841
+ return new Promise((resolve39) => {
168588
168842
  const timeout = setTimeout(() => {
168589
168843
  cleanup();
168590
- resolve40(false);
168844
+ resolve39(false);
168591
168845
  }, timeoutMs);
168592
168846
  const cleanup = this._events.on("localEvaluationFlagsLoaded", (count) => {
168593
168847
  clearTimeout(timeout);
168594
168848
  cleanup();
168595
- resolve40(count > 0);
168849
+ resolve39(count > 0);
168596
168850
  });
168597
168851
  });
168598
168852
  }
@@ -169098,13 +169352,13 @@ class PostHogBackendClient extends PostHogCoreStateless {
169098
169352
  this.context?.enter(data, options);
169099
169353
  }
169100
169354
  async _shutdown(shutdownTimeoutMs) {
169101
- const resolve40 = this._consumeWaitUntilCycle();
169355
+ const resolve39 = this._consumeWaitUntilCycle();
169102
169356
  await this.featureFlagsPoller?.stopPoller(shutdownTimeoutMs);
169103
169357
  this.errorTracking.shutdown();
169104
169358
  try {
169105
169359
  return await super._shutdown(shutdownTimeoutMs);
169106
169360
  } finally {
169107
- resolve40?.();
169361
+ resolve39?.();
169108
169362
  }
169109
169363
  }
169110
169364
  async _requestRemoteConfigPayload(flagKey) {