lazycodex-ai 5.1.43 → 5.1.45

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 (273) hide show
  1. package/dist/cli/index.js +948 -416
  2. package/dist/cli/service-auth/keystore.d.ts +4 -2
  3. package/dist/cli-node/index.js +948 -416
  4. package/docs/reference/web-terminal-visual-qa.md +8 -0
  5. package/package.json +1 -1
  6. package/packages/lsp-daemon/dist/cli.js +4 -4
  7. package/packages/lsp-daemon/dist/client.js +4 -4
  8. package/packages/lsp-daemon/dist/index.js +4 -4
  9. package/packages/lsp-daemon/package.json +3 -3
  10. package/packages/lsp-tools-mcp/dist/cli.js +4 -4
  11. package/packages/lsp-tools-mcp/dist/mcp.js +4 -4
  12. package/packages/lsp-tools-mcp/dist/tools.js +4 -4
  13. package/packages/lsp-tools-mcp/package.json +3 -3
  14. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  15. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +62 -21
  16. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  17. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  18. package/packages/omo-codex/plugin/components/bootstrap/src/hook.ts +1 -1
  19. package/packages/omo-codex/plugin/components/comment-checker/biome.json +1 -21
  20. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  21. package/packages/omo-codex/plugin/components/comment-checker/package.json +4 -4
  22. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  23. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/biome.json +1 -21
  25. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  26. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +4 -4
  27. package/packages/omo-codex/plugin/components/lsp/biome.json +1 -21
  28. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
  29. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +4 -4
  30. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  31. package/packages/omo-codex/plugin/components/lsp/package.json +4 -4
  32. package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +0 -1
  33. package/packages/omo-codex/plugin/components/lsp/test/codex-hook-not-installed.test.ts +1 -1
  34. package/packages/omo-codex/plugin/components/rules/biome.json +1 -21
  35. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  36. package/packages/omo-codex/plugin/components/rules/package.json +4 -4
  37. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  38. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  39. package/packages/omo-codex/plugin/components/telemetry/biome.json +1 -21
  40. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +90 -1
  41. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +91 -1
  42. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  43. package/packages/omo-codex/plugin/components/telemetry/package.json +4 -4
  44. package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +2 -2
  45. package/packages/omo-codex/plugin/components/ultrawork/biome.json +1 -21
  46. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  47. package/packages/omo-codex/plugin/components/ultrawork/package.json +4 -4
  48. package/packages/omo-codex/plugin/components/ulw-execute-continuation/biome.json +1 -21
  49. package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +1 -1
  50. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  51. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +4 -4
  52. package/packages/omo-codex/plugin/components/ulw-loop/biome.json +1 -21
  53. package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +1 -1
  54. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +7 -7
  55. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +5 -5
  56. package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +1 -1
  57. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  58. package/packages/omo-codex/plugin/components/ulw-loop/package.json +4 -4
  59. package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +1 -1
  60. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +5 -5
  61. package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +1 -1
  62. package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +2 -0
  63. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  64. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  65. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  66. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  67. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  68. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  69. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  70. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  71. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  72. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  73. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  74. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  75. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  76. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  77. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  78. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  79. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  80. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  81. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  82. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  83. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  84. package/packages/omo-codex/plugin/package-lock.json +12 -12
  85. package/packages/omo-codex/plugin/package.json +1 -1
  86. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +7 -7
  87. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +2 -0
  88. package/packages/omo-codex/plugin/skills/browser/SKILL.md +21 -22
  89. package/packages/omo-codex/plugin/skills/browser/references/commands.md +2 -9
  90. package/packages/omo-codex/plugin/skills/browser/references/install.md +1 -2
  91. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  92. package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +2 -2
  93. package/packages/omo-codex/plugin/skills/browser/scripts/browser-engine-guard.mjs +63 -487
  94. package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +1 -1
  95. package/packages/omo-codex/plugin/skills/browser/scripts/omowright.mjs +1 -10
  96. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +79 -118
  97. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +75 -224
  98. package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +32 -27
  99. package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +2 -2
  100. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
  101. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
  102. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/collect-files.ts +53 -0
  103. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
  104. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
  105. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
  106. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
  107. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
  108. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
  109. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
  110. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
  111. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
  112. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
  113. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
  114. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
  115. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
  116. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
  117. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
  118. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
  119. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
  120. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
  121. package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
  122. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
  123. package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -7
  124. package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +10 -7
  125. package/packages/omo-codex/plugin/skills/programming/references/typescript/bootstrap.md +9 -23
  126. package/packages/omo-codex/plugin/skills/programming/references/typescript/oxc-lint.md +130 -0
  127. package/packages/omo-codex/plugin/skills/programming/references/typescript/tsconfig-strict.md +6 -62
  128. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
  129. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +20 -81
  130. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
  131. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
  132. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
  133. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
  134. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
  135. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
  136. package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
  137. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +14 -14
  138. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
  139. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +2 -2
  140. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +2 -2
  141. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  142. package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +9 -3
  143. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
  144. package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +7 -6
  145. package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +116 -0
  146. package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +51 -3
  147. package/packages/omo-codex/plugin/skills/ulw-research/scripts/claims-index.mjs +125 -0
  148. package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +68 -3
  149. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +136 -0
  150. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +204 -0
  151. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +103 -0
  152. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +145 -0
  153. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +63 -0
  154. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +1 -1
  155. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +1 -1
  156. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +1 -27
  157. package/packages/omo-codex/plugin/skills/ulw-research/scripts/lexicon.mjs +47 -0
  158. package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +226 -0
  159. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +2 -3
  160. package/packages/omo-codex/plugin/skills/ulw-research/scripts/particles-ko.mjs +108 -0
  161. package/packages/omo-codex/plugin/skills/ulw-research/scripts/rational.mjs +139 -0
  162. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +2 -2
  163. package/packages/omo-codex/plugin/skills/ulw-research/scripts/sentence-split.mjs +77 -0
  164. package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-normalize.mjs +82 -0
  165. package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-similarity.mjs +28 -0
  166. package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +105 -0
  167. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +71 -64
  168. package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +4 -1
  169. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +6 -6
  170. package/packages/omo-codex/scripts/install-dist/install-local.mjs +152 -23
  171. package/packages/shared-skills/skills/browser/SKILL.md +21 -22
  172. package/packages/shared-skills/skills/browser/references/commands.md +2 -9
  173. package/packages/shared-skills/skills/browser/references/install.md +1 -2
  174. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
  175. package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +2 -2
  176. package/packages/shared-skills/skills/browser/scripts/browser-engine-guard.mjs +63 -487
  177. package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +1 -1
  178. package/packages/shared-skills/skills/browser/scripts/omowright.mjs +1 -10
  179. package/packages/shared-skills/skills/frontend/SKILL.md +79 -118
  180. package/packages/shared-skills/skills/frontend/references/design/README.md +75 -224
  181. package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +32 -27
  182. package/packages/shared-skills/skills/frontend/references/perfection/README.md +2 -2
  183. package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
  184. package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.test.ts +101 -0
  185. package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
  186. package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.test.ts +50 -0
  187. package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.ts +53 -0
  188. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
  189. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
  190. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
  191. package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
  192. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
  193. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
  194. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
  195. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
  196. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
  197. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
  198. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
  199. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
  200. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
  201. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
  202. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
  203. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
  204. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
  205. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
  206. package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
  207. package/packages/shared-skills/skills/programming/SKILL.md +10 -7
  208. package/packages/shared-skills/skills/programming/references/typescript/README.md +10 -7
  209. package/packages/shared-skills/skills/programming/references/typescript/bootstrap.md +9 -23
  210. package/packages/shared-skills/skills/programming/references/typescript/oxc-lint.md +130 -0
  211. package/packages/shared-skills/skills/programming/references/typescript/tsconfig-strict.md +6 -62
  212. package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
  213. package/packages/shared-skills/skills/programming/scripts/typescript/new-project.test.ts +162 -0
  214. package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +20 -81
  215. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
  216. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
  217. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
  218. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
  219. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
  220. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
  221. package/packages/shared-skills/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
  222. package/packages/shared-skills/skills/refactor/SKILL.md +13 -13
  223. package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
  224. package/packages/shared-skills/skills/ulw-research/AGENTS.md +9 -3
  225. package/packages/shared-skills/skills/ulw-research/SKILL.md +2 -2
  226. package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +7 -6
  227. package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +116 -0
  228. package/packages/shared-skills/skills/ulw-research/references/report-gates.md +51 -3
  229. package/packages/shared-skills/skills/ulw-research/scripts/claims-index.mjs +125 -0
  230. package/packages/shared-skills/skills/ulw-research/scripts/claims-index.test.ts +149 -0
  231. package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +68 -3
  232. package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +97 -12
  233. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +190 -0
  234. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +136 -0
  235. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +141 -0
  236. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +204 -0
  237. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.test.ts +43 -0
  238. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +103 -0
  239. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +252 -0
  240. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +145 -0
  241. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.test.ts +179 -0
  242. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +63 -0
  243. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.test.ts +46 -0
  244. package/packages/shared-skills/skills/ulw-research/scripts/gates-context.test.ts +64 -0
  245. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +1 -1
  246. package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +1 -1
  247. package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +1 -27
  248. package/packages/shared-skills/skills/ulw-research/scripts/lexicon.mjs +47 -0
  249. package/packages/shared-skills/skills/ulw-research/scripts/lexicon.test.ts +57 -0
  250. package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +226 -0
  251. package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +120 -0
  252. package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +2 -3
  253. package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +29 -0
  254. package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.mjs +108 -0
  255. package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.test.ts +86 -0
  256. package/packages/shared-skills/skills/ulw-research/scripts/rational.mjs +139 -0
  257. package/packages/shared-skills/skills/ulw-research/scripts/rational.test.ts +46 -0
  258. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +2 -2
  259. package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.mjs +77 -0
  260. package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.test.ts +109 -0
  261. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/claim-graph.md +13 -0
  262. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-locked.md +17 -0
  263. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-pending.md +17 -0
  264. package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.mjs +82 -0
  265. package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.test.ts +73 -0
  266. package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.mjs +28 -0
  267. package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.test.ts +38 -0
  268. package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +105 -0
  269. package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +83 -0
  270. package/packages/shared-skills/skills/visual-qa/SKILL.md +70 -63
  271. package/packages/shared-skills/skills/visual-qa/scripts/skill-doc-fields.test.ts +34 -0
  272. package/script/qa/web-terminal-visual-qa.mjs +6 -2
  273. package/script/qa/xterm-live-terminal.mjs +26 -3
@@ -2133,7 +2133,7 @@ var package_default;
2133
2133
  var init_package = __esm(() => {
2134
2134
  package_default = {
2135
2135
  name: "oh-my-opencode",
2136
- version: "5.1.43",
2136
+ version: "5.1.45",
2137
2137
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2138
2138
  main: "./dist/index.js",
2139
2139
  types: "dist/index.d.ts",
@@ -2253,6 +2253,8 @@ var init_package = __esm(() => {
2253
2253
  "build:senpi-plugin": "bun run build:lsp-daemon && bun run build:ast-grep-mcp && bun run build:senpi-plugin:stage",
2254
2254
  "build:senpi-plugin:native": "node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-ast-grep-mcp-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-x-search-skill.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/build-daemon-launch-spec.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",
2255
2255
  "build:senpi-plugin:stage": "bun run build:materialize-frontend && node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-ast-grep-mcp-runtime.mjs && node packages/omo-senpi/plugin/scripts/stage-x-search-skill.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/build-daemon-launch-spec.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",
2256
+ "bundle-inputs": "node packages/omo-senpi/plugin/scripts/bundle-inputs.mjs",
2257
+ "bundle-inputs:check": "node packages/omo-senpi/plugin/scripts/bundle-inputs.mjs --check",
2256
2258
  "build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
2257
2259
  "build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
2258
2260
  "build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
@@ -2271,7 +2273,8 @@ var init_package = __esm(() => {
2271
2273
  postinstall: "node postinstall.mjs",
2272
2274
  prepublishOnly: "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
2273
2275
  "test:model-capabilities": "bun test --timeout 20000 packages/model-core/src/model-capability-aliases.test.ts packages/model-core/src/model-capability-guardrails.test.ts packages/model-core/src/model-capabilities.test.ts packages/omo-opencode/src/cli/doctor/checks/model-resolution.test.ts --bail",
2274
- typecheck: "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
2276
+ "check:copy": "bun script/check-copy.ts",
2277
+ typecheck: "bun run check:copy && tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
2275
2278
  "typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/isolation-core/tsconfig.json && tsgo --noEmit -p packages/memory-core/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json && tsgo --noEmit -p packages/omo-native/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-protocol/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-engine/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-prelude/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-service/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-tool/tsconfig.json",
2276
2279
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
2277
2280
  test: "bun test --timeout 20000",
@@ -2282,7 +2285,10 @@ var init_package = __esm(() => {
2282
2285
  "test:windows-codex": "bun run test:codex",
2283
2286
  "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
2284
2287
  "build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build",
2285
- "test:desktop": "bun script/check-cargo-pinned-deps.mjs && bun run --cwd packages/senpi-desktop-protocol test && bun run --cwd packages/senpi-desktop-engine test && bun run --cwd packages/senpi-desktop-prelude test && bun run --cwd packages/senpi-desktop-service test && bun run --cwd packages/senpi-desktop-tool test"
2288
+ "test:desktop": "bun script/check-cargo-pinned-deps.mjs && bun run --cwd packages/senpi-desktop-protocol test && bun run --cwd packages/senpi-desktop-engine test && bun run --cwd packages/senpi-desktop-prelude test && bun run --cwd packages/senpi-desktop-service test && bun run --cwd packages/senpi-desktop-tool test",
2289
+ "lint:ratchet": "bun script/lint-ratchet.ts",
2290
+ "lint:ratchet:update": "bun script/lint-ratchet.ts --update",
2291
+ lint: "bun run check:copy && oxlint packages/lsp-tools-mcp packages/lsp-daemon packages/web packages/omo-codex/plugin/components/comment-checker packages/omo-codex/plugin/components/lazycodex-executor-verify packages/omo-codex/plugin/components/lsp packages/omo-codex/plugin/components/rules packages/omo-codex/plugin/components/telemetry packages/omo-codex/plugin/components/ultrawork packages/omo-codex/plugin/components/ulw-execute-continuation packages/omo-codex/plugin/components/ulw-loop"
2286
2292
  },
2287
2293
  keywords: [
2288
2294
  "opencode",
@@ -2310,7 +2316,7 @@ var init_package = __esm(() => {
2310
2316
  },
2311
2317
  devDependencies: {
2312
2318
  "@clack/prompts": "^1.8.1",
2313
- "@code-yeongyu/senpi": "2026.10.21-2",
2319
+ "@code-yeongyu/senpi": "2026.10.23-1",
2314
2320
  "@modelcontextprotocol/sdk": "^1.30.0",
2315
2321
  "@oh-my-opencode/agents-md-core": "workspace:*",
2316
2322
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -2364,6 +2370,8 @@ var init_package = __esm(() => {
2364
2370
  "jsonc-parser": "^3.3.1",
2365
2371
  "node-pty": "^1.1.0",
2366
2372
  omowright: "github:code-yeongyu/omowright#f87ef4d63fe7b56fe117dbab246c8ad88dd8a780",
2373
+ "oxc-parser": "0.148.0",
2374
+ oxlint: "1.89.0",
2367
2375
  picocolors: "^1.1.1",
2368
2376
  picomatch: "^4.0.7",
2369
2377
  "posthog-node": "^5.52.4",
@@ -2371,18 +2379,18 @@ var init_package = __esm(() => {
2371
2379
  typescript: "^7.0.2"
2372
2380
  },
2373
2381
  optionalDependencies: {
2374
- "oh-my-opencode-darwin-arm64": "5.1.43",
2375
- "oh-my-opencode-darwin-x64": "5.1.43",
2376
- "oh-my-opencode-darwin-x64-baseline": "5.1.43",
2377
- "oh-my-opencode-linux-arm64": "5.1.43",
2378
- "oh-my-opencode-linux-arm64-musl": "5.1.43",
2379
- "oh-my-opencode-linux-x64": "5.1.43",
2380
- "oh-my-opencode-linux-x64-baseline": "5.1.43",
2381
- "oh-my-opencode-linux-x64-musl": "5.1.43",
2382
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.43",
2383
- "oh-my-opencode-windows-arm64": "5.1.43",
2384
- "oh-my-opencode-windows-x64": "5.1.43",
2385
- "oh-my-opencode-windows-x64-baseline": "5.1.43"
2382
+ "oh-my-opencode-darwin-arm64": "5.1.45",
2383
+ "oh-my-opencode-darwin-x64": "5.1.45",
2384
+ "oh-my-opencode-darwin-x64-baseline": "5.1.45",
2385
+ "oh-my-opencode-linux-arm64": "5.1.45",
2386
+ "oh-my-opencode-linux-arm64-musl": "5.1.45",
2387
+ "oh-my-opencode-linux-x64": "5.1.45",
2388
+ "oh-my-opencode-linux-x64-baseline": "5.1.45",
2389
+ "oh-my-opencode-linux-x64-musl": "5.1.45",
2390
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.45",
2391
+ "oh-my-opencode-windows-arm64": "5.1.45",
2392
+ "oh-my-opencode-windows-x64": "5.1.45",
2393
+ "oh-my-opencode-windows-x64-baseline": "5.1.45"
2386
2394
  },
2387
2395
  overrides: {
2388
2396
  hono: "^4.13.8",
@@ -7544,6 +7552,20 @@ var init_logger = __esm(() => {
7544
7552
  DEFAULT_MAX_LOG_FILE_SIZE_BYTES = 50 * 1024 * 1024;
7545
7553
  });
7546
7554
 
7555
+ // packages/utils/src/logging/product-identity.ts
7556
+ function createProductIdentity(input) {
7557
+ return {
7558
+ pluginName: input.pluginName,
7559
+ legacyPluginName: input.legacyPluginName,
7560
+ publishedPackageName: input.publishedPackageName,
7561
+ acceptedPackageNames: input.acceptedPackageNames ?? [input.publishedPackageName, input.pluginName],
7562
+ configBasename: input.configBasename,
7563
+ legacyConfigBasename: input.legacyConfigBasename,
7564
+ logFileName: input.logFileName,
7565
+ cacheDirName: input.cacheDirName
7566
+ };
7567
+ }
7568
+
7547
7569
  // packages/utils/src/logging/index.ts
7548
7570
  var init_logging = __esm(() => {
7549
7571
  init_logger();
@@ -7964,8 +7986,17 @@ function classifyPathEnvironment(absolutePath) {
7964
7986
  }
7965
7987
  var init_classify_path_environment = () => {};
7966
7988
 
7989
+ // packages/utils/src/command-executor/home-directory.ts
7990
+ import { homedir as homedir3 } from "node:os";
7991
+ function getHomeDirectory() {
7992
+ return process.env.HOME || process.env.USERPROFILE || homedir3();
7993
+ }
7994
+ var init_home_directory = () => {};
7995
+
7967
7996
  // packages/utils/src/command-executor.ts
7968
- var init_command_executor = () => {};
7997
+ var init_command_executor = __esm(() => {
7998
+ init_home_directory();
7999
+ });
7969
8000
 
7970
8001
  // packages/utils/src/git-worktree/index.ts
7971
8002
  var init_git_worktree = () => {};
@@ -8008,6 +8039,25 @@ var init_internal_initiator_marker = __esm(() => {
8008
8039
  INTERNAL_NOREPLY_MARKER_DETECT_PATTERN = /<!--\s*OMO_INTERNAL_NOREPLY\s*-->/;
8009
8040
  });
8010
8041
 
8042
+ // packages/model-core/src/latest-models.ts
8043
+ var LATEST_MODEL_BY_FAMILY;
8044
+ var init_latest_models = __esm(() => {
8045
+ LATEST_MODEL_BY_FAMILY = {
8046
+ claudeOpus: "claude-opus-5-5",
8047
+ claudeSonnet: "claude-sonnet-5-5",
8048
+ claudeHaiku: "claude-haiku-5-5",
8049
+ claudeFable: "claude-fable-5-1",
8050
+ gptAstra: "gpt-6-astra",
8051
+ gptSol: "gpt-6.1-sol",
8052
+ gptSolFast: "gpt-6.1-sol-fast",
8053
+ gptLunaFast: "gpt-6-luna-fast",
8054
+ glm: "glm-5.3",
8055
+ glmFlash: "glm-5.3-flash",
8056
+ kimi: "kimi-k3",
8057
+ geminiPro: "gemini-4-argon"
8058
+ };
8059
+ });
8060
+
8011
8061
  // packages/utils/src/migration/agent-category.ts
8012
8062
  function configureMigrationCategoryDefaults(defaults) {
8013
8063
  categoryDefaults = defaults ?? {};
@@ -9264,17 +9314,18 @@ var init_file_reference_resolver = __esm(() => {
9264
9314
  // packages/model-core/src/agent-model-requirements.ts
9265
9315
  var AGENT_MODEL_REQUIREMENTS;
9266
9316
  var init_agent_model_requirements = __esm(() => {
9317
+ init_latest_models();
9267
9318
  AGENT_MODEL_REQUIREMENTS = {
9268
9319
  sisyphus: {
9269
9320
  fallbackChain: [
9270
9321
  {
9271
9322
  providers: ["anthropic", "github-copilot", "opencode"],
9272
- model: "claude-opus-5-5",
9323
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9273
9324
  variant: "max"
9274
9325
  },
9275
9326
  {
9276
9327
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode", "bailian-coding-plan", "moonshotai-cn", "firmware", "ollama-cloud", "aihubmix"],
9277
- model: "kimi-k3"
9328
+ model: LATEST_MODEL_BY_FAMILY.kimi
9278
9329
  },
9279
9330
  {
9280
9331
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
@@ -9308,7 +9359,7 @@ var init_agent_model_requirements = __esm(() => {
9308
9359
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
9309
9360
  {
9310
9361
  providers: ["google", "google-vertex", "opencode"],
9311
- model: "gemini-4-argon",
9362
+ model: LATEST_MODEL_BY_FAMILY.geminiPro,
9312
9363
  variant: "high"
9313
9364
  },
9314
9365
  {
@@ -9318,7 +9369,7 @@ var init_agent_model_requirements = __esm(() => {
9318
9369
  },
9319
9370
  {
9320
9371
  providers: ["anthropic", "github-copilot", "opencode"],
9321
- model: "claude-opus-5-5",
9372
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9322
9373
  variant: "max"
9323
9374
  },
9324
9375
  { providers: ["opencode-go"], model: "glm-5.2" }
@@ -9327,8 +9378,8 @@ var init_agent_model_requirements = __esm(() => {
9327
9378
  librarian: {
9328
9379
  fallbackChain: [
9329
9380
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
9330
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9331
- { providers: ["anthropic", "github-copilot"], model: "claude-haiku-5-5", variant: "medium" },
9381
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9382
+ { providers: ["anthropic", "github-copilot"], model: LATEST_MODEL_BY_FAMILY.claudeHaiku, variant: "medium" },
9332
9383
  { providers: ["deepseek"], model: "deepseek-flash", variant: "max" },
9333
9384
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
9334
9385
  { providers: ["opencode-go"], model: "minimax-m2.7" }
@@ -9337,8 +9388,8 @@ var init_agent_model_requirements = __esm(() => {
9337
9388
  explore: {
9338
9389
  fallbackChain: [
9339
9390
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
9340
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9341
- { providers: ["anthropic", "github-copilot"], model: "claude-haiku-5-5", variant: "medium" },
9391
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9392
+ { providers: ["anthropic", "github-copilot"], model: LATEST_MODEL_BY_FAMILY.claudeHaiku, variant: "medium" },
9342
9393
  { providers: ["deepseek"], model: "deepseek-flash", variant: "max" },
9343
9394
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
9344
9395
  { providers: ["opencode-go"], model: "minimax-m2.7" }
@@ -9347,7 +9398,7 @@ var init_agent_model_requirements = __esm(() => {
9347
9398
  "multimodal-looker": {
9348
9399
  fallbackChain: [
9349
9400
  { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "low" },
9350
- { providers: ["opencode-go"], model: "kimi-k3" },
9401
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9351
9402
  { providers: ["zai-coding-plan"], model: "glm-4.6v" },
9352
9403
  { providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"], model: "gpt-5-nano" }
9353
9404
  ]
@@ -9356,17 +9407,17 @@ var init_agent_model_requirements = __esm(() => {
9356
9407
  fallbackChain: [
9357
9408
  {
9358
9409
  providers: ["anthropic", "github-copilot", "opencode"],
9359
- model: "claude-fable-5-1",
9410
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9360
9411
  variant: "xhigh"
9361
9412
  },
9362
9413
  {
9363
9414
  providers: ["anthropic", "github-copilot", "opencode"],
9364
- model: "claude-opus-5-5",
9415
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9365
9416
  variant: "max"
9366
9417
  },
9367
9418
  {
9368
9419
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
9369
- model: "kimi-k3",
9420
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9370
9421
  variant: "max"
9371
9422
  }
9372
9423
  ]
@@ -9375,34 +9426,34 @@ var init_agent_model_requirements = __esm(() => {
9375
9426
  fallbackChain: [
9376
9427
  {
9377
9428
  providers: ["anthropic", "github-copilot", "opencode"],
9378
- model: "claude-fable-5-1",
9429
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9379
9430
  variant: "max"
9380
9431
  },
9381
9432
  {
9382
9433
  providers: ["anthropic", "github-copilot", "opencode"],
9383
- model: "claude-opus-5-5",
9434
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9384
9435
  variant: "max"
9385
9436
  },
9386
9437
  {
9387
9438
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
9388
- model: "kimi-k3",
9439
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9389
9440
  variant: "max"
9390
9441
  }
9391
9442
  ]
9392
9443
  },
9393
9444
  momus: {
9394
9445
  fallbackChain: [
9395
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "xhigh" },
9396
- { providers: ["github-copilot"], model: "gpt-6-astra", variant: "high" },
9397
- { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "high" },
9446
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "xhigh" },
9447
+ { providers: ["github-copilot"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "high" },
9448
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "high" },
9398
9449
  {
9399
9450
  providers: ["anthropic", "github-copilot", "opencode"],
9400
- model: "claude-opus-5-5",
9451
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9401
9452
  variant: "max"
9402
9453
  },
9403
9454
  {
9404
9455
  providers: ["google", "google-vertex", "opencode"],
9405
- model: "gemini-4-argon",
9456
+ model: LATEST_MODEL_BY_FAMILY.geminiPro,
9406
9457
  variant: "high"
9407
9458
  },
9408
9459
  {
@@ -9416,7 +9467,7 @@ var init_agent_model_requirements = __esm(() => {
9416
9467
  atlas: {
9417
9468
  fallbackChain: [
9418
9469
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
9419
- { providers: ["opencode-go"], model: "kimi-k3" },
9470
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9420
9471
  {
9421
9472
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9422
9473
  model: "gpt-5.6-sol",
@@ -9430,7 +9481,7 @@ var init_agent_model_requirements = __esm(() => {
9430
9481
  "sisyphus-junior": {
9431
9482
  fallbackChain: [
9432
9483
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
9433
- { providers: ["opencode-go"], model: "kimi-k3" },
9484
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9434
9485
  {
9435
9486
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9436
9487
  model: "gpt-5.6-sol",
@@ -9448,32 +9499,33 @@ var init_agent_model_requirements = __esm(() => {
9448
9499
  // packages/model-core/src/category-model-requirements.ts
9449
9500
  var CATEGORY_MODEL_REQUIREMENTS;
9450
9501
  var init_category_model_requirements = __esm(() => {
9502
+ init_latest_models();
9451
9503
  CATEGORY_MODEL_REQUIREMENTS = {
9452
9504
  "visual-engineering": {
9453
9505
  fallbackChain: [
9454
- { providers: ["google", "google-vertex", "opencode"], model: "gemini-4-argon", variant: "low" },
9506
+ { providers: ["google", "google-vertex", "opencode"], model: LATEST_MODEL_BY_FAMILY.geminiPro, variant: "low" },
9455
9507
  {
9456
9508
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9457
- model: "claude-fable-5-1",
9509
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9458
9510
  variant: "max"
9459
9511
  },
9460
9512
  {
9461
9513
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9462
- model: "claude-opus-5-5",
9514
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9463
9515
  variant: "max"
9464
9516
  },
9465
9517
  {
9466
9518
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9467
- model: "kimi-k3",
9519
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9468
9520
  variant: "max"
9469
9521
  }
9470
9522
  ]
9471
9523
  },
9472
9524
  ultrabrain: {
9473
9525
  fallbackChain: [
9474
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "max" },
9475
- { providers: ["github-copilot"], model: "gpt-6-astra", variant: "max" },
9476
- { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "max" },
9526
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9527
+ { providers: ["github-copilot"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9528
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9477
9529
  { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.6-sol", variant: "max" },
9478
9530
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "max" },
9479
9531
  { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "max" }
@@ -9481,8 +9533,8 @@ var init_category_model_requirements = __esm(() => {
9481
9533
  },
9482
9534
  "deep-low": {
9483
9535
  fallbackChain: [
9484
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol", variant: "medium" },
9485
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol-fast", variant: "medium" },
9536
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSol, variant: "medium" },
9537
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSolFast, variant: "medium" },
9486
9538
  {
9487
9539
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9488
9540
  model: "gpt-5.6-sol",
@@ -9495,7 +9547,7 @@ var init_category_model_requirements = __esm(() => {
9495
9547
  fallbackChain: [
9496
9548
  {
9497
9549
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9498
- model: "gpt-6-astra",
9550
+ model: LATEST_MODEL_BY_FAMILY.gptAstra,
9499
9551
  variant: "high"
9500
9552
  }
9501
9553
  ]
@@ -9504,27 +9556,27 @@ var init_category_model_requirements = __esm(() => {
9504
9556
  fallbackChain: [
9505
9557
  {
9506
9558
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9507
- model: "claude-fable-5-1",
9559
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9508
9560
  variant: "max"
9509
9561
  },
9510
9562
  {
9511
9563
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9512
- model: "claude-opus-5-5",
9564
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9513
9565
  variant: "max"
9514
9566
  },
9515
9567
  {
9516
9568
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9517
- model: "kimi-k3",
9569
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9518
9570
  variant: "max"
9519
9571
  }
9520
9572
  ]
9521
9573
  },
9522
9574
  quick: {
9523
9575
  fallbackChain: [
9524
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9576
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9525
9577
  {
9526
9578
  providers: ["anthropic", "anthropic-api", "github-copilot"],
9527
- model: "claude-haiku-5-5",
9579
+ model: LATEST_MODEL_BY_FAMILY.claudeHaiku,
9528
9580
  variant: "medium"
9529
9581
  },
9530
9582
  { providers: ["deepseek"], model: "deepseek-flash", variant: "off" },
@@ -9536,7 +9588,7 @@ var init_category_model_requirements = __esm(() => {
9536
9588
  { providers: ["opencode-go"], model: "minimax-m3", variant: "max" },
9537
9589
  { providers: ["opencode-go"], model: "minimax-m2.7", variant: "max" },
9538
9590
  { providers: ["xai"], model: "grok-4.20-0309-non-reasoning" },
9539
- { providers: ["zai-coding-plan"], model: "glm-5.3-flash", variant: "low" },
9591
+ { providers: ["zai-coding-plan"], model: LATEST_MODEL_BY_FAMILY.glmFlash, variant: "low" },
9540
9592
  { providers: ["xiaomi"], model: "mimo-v2.6-flash", variant: "low" }
9541
9593
  ]
9542
9594
  },
@@ -9544,13 +9596,13 @@ var init_category_model_requirements = __esm(() => {
9544
9596
  fallbackChain: [
9545
9597
  {
9546
9598
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9547
- model: "claude-sonnet-5-5",
9599
+ model: LATEST_MODEL_BY_FAMILY.claudeSonnet,
9548
9600
  variant: "medium"
9549
9601
  },
9550
9602
  { providers: ["xiaomi", "opencode-go"], model: "mimo-v2.6-pro", variant: "max" },
9551
9603
  { providers: ["xai", "github-copilot", "opencode-go"], model: "grok-4.7", variant: "xhigh" },
9552
- { providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "high" },
9553
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol", variant: "medium" },
9604
+ { providers: ["zai-coding-plan", "opencode-go"], model: LATEST_MODEL_BY_FAMILY.glm, variant: "high" },
9605
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSol, variant: "medium" },
9554
9606
  {
9555
9607
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9556
9608
  model: "gpt-5.6-sol",
@@ -9574,13 +9626,13 @@ var init_category_model_requirements = __esm(() => {
9574
9626
  fallbackChain: [
9575
9627
  {
9576
9628
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9577
- model: "claude-opus-5-5",
9629
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9578
9630
  variant: "medium"
9579
9631
  },
9580
- { providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "max" },
9632
+ { providers: ["zai-coding-plan", "opencode-go"], model: LATEST_MODEL_BY_FAMILY.glm, variant: "max" },
9581
9633
  {
9582
9634
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9583
- model: "kimi-k3",
9635
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9584
9636
  variant: "max"
9585
9637
  }
9586
9638
  ]
@@ -9588,10 +9640,10 @@ var init_category_model_requirements = __esm(() => {
9588
9640
  writing: {
9589
9641
  requiresAnyModel: true,
9590
9642
  fallbackChain: [
9591
- { providers: ["google", "google-vertex", "opencode"], model: "gemini-4-argon", variant: "low" },
9643
+ { providers: ["google", "google-vertex", "opencode"], model: LATEST_MODEL_BY_FAMILY.geminiPro, variant: "low" },
9592
9644
  {
9593
9645
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9594
- model: "claude-opus-5-5",
9646
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9595
9647
  variant: "low"
9596
9648
  },
9597
9649
  {
@@ -11083,6 +11135,7 @@ var init_src2 = __esm(() => {
11083
11135
  init_model_resolver();
11084
11136
  init_provider_model_id_transform();
11085
11137
  init_model_requirements();
11138
+ init_latest_models();
11086
11139
  init_model_family_detectors();
11087
11140
  init_model_capability_aliases();
11088
11141
  init_model_capability_heuristics();
@@ -11404,16 +11457,17 @@ Approach:
11404
11457
  - This is for tasks requiring exceptional creativity
11405
11458
  </Category_Context>`, GOOGLE_CATEGORIES;
11406
11459
  var init_google_categories = __esm(() => {
11460
+ init_latest_models();
11407
11461
  GOOGLE_CATEGORIES = [
11408
11462
  {
11409
11463
  name: "visual-engineering",
11410
- config: { model: "google/gemini-4-argon", variant: "low" },
11464
+ config: { model: `google/${LATEST_MODEL_BY_FAMILY.geminiPro}`, variant: "low" },
11411
11465
  description: "Visual design, UI/UX, frontend, styling, animation, and design systems",
11412
11466
  promptAppend: VISUAL_CATEGORY_PROMPT_APPEND
11413
11467
  },
11414
11468
  {
11415
11469
  name: "artistry",
11416
- config: { model: "anthropic/claude-fable-5-1", variant: "max" },
11470
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeFable}`, variant: "max" },
11417
11471
  description: "Complex problem-solving with unconventional, creative approaches - beyond standard patterns",
11418
11472
  promptAppend: ARTISTRY_CATEGORY_PROMPT_APPEND
11419
11473
  }
@@ -11447,10 +11501,11 @@ ANTI-AI-SLOP RULES (NON-NEGOTIABLE):
11447
11501
  - Write like a human, not a corporate template.
11448
11502
  </Category_Context>`, KIMI_CATEGORIES;
11449
11503
  var init_kimi_categories = __esm(() => {
11504
+ init_latest_models();
11450
11505
  KIMI_CATEGORIES = [
11451
11506
  {
11452
11507
  name: "writing",
11453
- config: { model: "google/gemini-4-argon", variant: "low" },
11508
+ config: { model: `google/${LATEST_MODEL_BY_FAMILY.geminiPro}`, variant: "low" },
11454
11509
  description: "Documentation, prose, technical writing",
11455
11510
  promptAppend: WRITING_CATEGORY_PROMPT_APPEND
11456
11511
  }
@@ -11585,21 +11640,23 @@ You are working on tasks that don't fit specific categories but require moderate
11585
11640
  </Category_Context>`, UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits, effort is moderate, and scope stays within a few files/modules. Prefer any matching specialist category.</Selection_Gate>
11586
11641
  <Caller_Warning>Provide explicit must-do steps, forbidden scope, and concrete success criteria.</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
11587
11642
  You are working on tasks that don't fit specific categories but require substantial effort.
11588
- </Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Of the two deep lanes this is the default: the child settles its decisions from what it reads. When unsure, choose deep-low; a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt, and you re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
11643
+ </Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Of the two deep lanes this is the default: the child settles its decisions from what it reads. When unsure, choose deep-low; a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt, and you re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL, OPENAI_CATEGORIES;
11589
11644
  var init_openai_categories = __esm(() => {
11590
11645
  init_types();
11591
- DEEP_LOW_GATE_MODELS = ["gpt-6.1-sol", "gpt-6.1-sol-fast", "gpt-5.6-sol-fast", "gpt-5.6-sol"];
11646
+ init_latest_models();
11647
+ DEEP_LOW_GATE_MODELS = [LATEST_MODEL_BY_FAMILY.gptSol, LATEST_MODEL_BY_FAMILY.gptSolFast, "gpt-5.6-sol-fast", "gpt-5.6-sol"];
11648
+ DEEP_HIGH_GATE_MODEL = LATEST_MODEL_BY_FAMILY.gptAstra;
11592
11649
  OPENAI_CATEGORIES = [
11593
11650
  {
11594
11651
  name: "ultrabrain",
11595
- config: { model: "openai/gpt-6-astra", variant: "max" },
11652
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptAstra}`, variant: "max" },
11596
11653
  description: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
11597
11654
  promptAppend: ULTRABRAIN_CATEGORY_PROMPT_APPEND,
11598
11655
  resolvePromptAppend: resolveUltrabrainCategoryPromptAppend
11599
11656
  },
11600
11657
  {
11601
11658
  name: "deep-low",
11602
- config: { model: "openai/gpt-6.1-sol", variant: "medium" },
11659
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptSol}`, variant: "medium" },
11603
11660
  description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads; preferred over deep-high for 3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work. Multiple goals fan out as parallel calls.",
11604
11661
  callerGuidance: DEEP_LOW_CATEGORY_CALLER_GUIDANCE,
11605
11662
  promptAppend: DEEP_LOW_CATEGORY_PROMPT_APPEND,
@@ -11608,7 +11665,7 @@ var init_openai_categories = __esm(() => {
11608
11665
  },
11609
11666
  {
11610
11667
  name: "deep-high",
11611
- config: { model: "openai/gpt-6-astra", variant: "high" },
11668
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptAstra}`, variant: "high" },
11612
11669
  description: "Escalation deep lane: a goal whose central decision cannot be settled from evidence alone. Same one-goal, one-deliverable contract as deep-low.",
11613
11670
  callerGuidance: DEEP_HIGH_CATEGORY_CALLER_GUIDANCE,
11614
11671
  promptAppend: DEEP_HIGH_CATEGORY_PROMPT_APPEND,
@@ -11617,21 +11674,21 @@ var init_openai_categories = __esm(() => {
11617
11674
  },
11618
11675
  {
11619
11676
  name: "quick",
11620
- config: { model: "openai/gpt-6-luna-fast", variant: "low" },
11677
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" },
11621
11678
  description: "Trivial tasks - single file changes, typo fixes, simple modifications",
11622
11679
  callerGuidance: QUICK_CATEGORY_CALLER_GUIDANCE,
11623
11680
  promptAppend: QUICK_CATEGORY_PROMPT_APPEND
11624
11681
  },
11625
11682
  {
11626
11683
  name: "unspecified-low",
11627
- config: { model: "anthropic/claude-sonnet-5-5", variant: "medium" },
11684
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeSonnet}`, variant: "medium" },
11628
11685
  description: "Tasks that don't fit other categories, low effort required",
11629
11686
  callerGuidance: UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE,
11630
11687
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
11631
11688
  },
11632
11689
  {
11633
11690
  name: "unspecified-high",
11634
- config: { model: "anthropic/claude-opus-5-5", variant: "medium" },
11691
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeOpus}`, variant: "medium" },
11635
11692
  description: "Tasks that don't fit other categories, high effort required",
11636
11693
  callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
11637
11694
  promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
@@ -11680,7 +11737,7 @@ var init_migration2 = __esm(() => {
11680
11737
 
11681
11738
  // packages/omo-opencode/src/shared/opencode-config-dir.ts
11682
11739
  import { existsSync as existsSync5, realpathSync as realpathSync2 } from "node:fs";
11683
- import { homedir as homedir4 } from "node:os";
11740
+ import { homedir as homedir5 } from "node:os";
11684
11741
  import { join as join6, posix, resolve, win32 } from "node:path";
11685
11742
  function isDevBuild(version) {
11686
11743
  if (!version)
@@ -11691,14 +11748,14 @@ function getTauriConfigDir(identifier) {
11691
11748
  const platform = process.platform;
11692
11749
  switch (platform) {
11693
11750
  case "darwin":
11694
- return join6(homedir4(), "Library", "Application Support", identifier);
11751
+ return join6(homedir5(), "Library", "Application Support", identifier);
11695
11752
  case "win32": {
11696
- const appData = process.env.APPDATA || join6(homedir4(), "AppData", "Roaming");
11753
+ const appData = process.env.APPDATA || join6(homedir5(), "AppData", "Roaming");
11697
11754
  return win32.join(appData, identifier);
11698
11755
  }
11699
11756
  case "linux":
11700
11757
  default: {
11701
- const xdgConfig = process.env.XDG_CONFIG_HOME || join6(homedir4(), ".config");
11758
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join6(homedir5(), ".config");
11702
11759
  return join6(xdgConfig, identifier);
11703
11760
  }
11704
11761
  }
@@ -11742,7 +11799,7 @@ function getWslLinuxHomeDir(windowsConfigRoot) {
11742
11799
  function getCliDefaultConfigDir() {
11743
11800
  const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
11744
11801
  const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment() && isWindowsUserConfigRoot(envXdgConfig);
11745
- const xdgConfig = shouldIgnoreWindowsXdg ? posix.join(getWslLinuxHomeDir(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join6(homedir4(), ".config");
11802
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix.join(getWslLinuxHomeDir(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join6(homedir5(), ".config");
11746
11803
  const configDir = isWslEnvironment() ? posix.join(xdgConfig, "opencode") : join6(xdgConfig, "opencode");
11747
11804
  return resolveConfigPath(configDir);
11748
11805
  }
@@ -70389,10 +70446,11 @@ var ANTHROPIC_PREFIX = "anthropic/", CLAUDE_CODE_ALIAS_MAP;
70389
70446
  var init_claude_model_mapper = __esm(() => {
70390
70447
  init_model_format_normalizer();
70391
70448
  init_model_normalization2();
70449
+ init_latest_models();
70392
70450
  CLAUDE_CODE_ALIAS_MAP = new Map([
70393
- ["sonnet", `${ANTHROPIC_PREFIX}claude-sonnet-4-6`],
70394
- ["opus", `${ANTHROPIC_PREFIX}claude-opus-5-5`],
70395
- ["haiku", `${ANTHROPIC_PREFIX}claude-haiku-5-5`]
70451
+ ["sonnet", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeSonnet}`],
70452
+ ["opus", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeOpus}`],
70453
+ ["haiku", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeHaiku}`]
70396
70454
  ]);
70397
70455
  });
70398
70456
 
@@ -76875,7 +76933,7 @@ var init_git_master = __esm(() => {
76875
76933
  OmoGitMasterSettingsLayerSchema = object(OmoGitMasterSettingsShape).partial().strict();
76876
76934
  OmoGitMasterSettingsSchema = OmoGitMasterSettingsLayerSchema.extend({
76877
76935
  commit_footer: union([boolean2(), string2()]).default(false),
76878
- include_co_authored_by: boolean2().default(false),
76936
+ include_co_authored_by: boolean2().default(true),
76879
76937
  git_env_prefix: GitEnvPrefixSchema.default("GIT_MASTER=1")
76880
76938
  }).strict();
76881
76939
  });
@@ -76909,7 +76967,7 @@ var init_memory_agreements = __esm(() => {
76909
76967
  });
76910
76968
 
76911
76969
  // packages/omo-config-core/src/schema/memory.ts
76912
- var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryRecallEventCapsSchema, OmoMemoryRecallSchema, OmoMemoryNudgeSchema, OmoMemoryFactsSchema, OmoMemoryDreamSchema, OmoMemoryPeopleSchema, OmoMemorySoulSchema, OmoMemoryWriteNoticeSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryRecallEventCapsLayerSchema, OmoMemoryRecallLayerSchema, OmoMemoryNudgeLayerSchema, OmoMemoryFactsLayerSchema, OmoMemoryDreamLayerSchema, OmoMemoryPeopleLayerSchema, OmoMemorySoulLayerSchema, OmoMemoryWriteNoticeLayerSchema, OmoMemoryProjectionSchema, OmoMemoryProjectionLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemoryAutoIdentitySchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
76970
+ var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryRecallEventCapsSchema, OmoMemoryRecallSchema, OmoMemoryProjectScopeSchema, OmoMemoryProjectScopeLayerSchema, OmoMemoryNudgeSchema, OmoMemoryFactsSchema, OmoMemoryDreamSchema, OmoMemoryPeopleSchema, OmoMemorySoulSchema, OmoMemoryWriteNoticeSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryRecallEventCapsLayerSchema, OmoMemoryRecallLayerSchema, OmoMemoryNudgeLayerSchema, OmoMemoryFactsLayerSchema, OmoMemoryDreamLayerSchema, OmoMemoryPeopleLayerSchema, OmoMemorySoulLayerSchema, OmoMemoryWriteNoticeLayerSchema, OmoMemoryProjectionSchema, OmoMemoryProjectionLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemoryAutoIdentitySchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
76913
76971
  var init_memory = __esm(() => {
76914
76972
  init_zod();
76915
76973
  init_memory_agreements();
@@ -76949,6 +77007,14 @@ var init_memory = __esm(() => {
76949
77007
  tool_budget: number2().int().positive().default(8),
76950
77008
  query_expansion: boolean2().default(false)
76951
77009
  }).strict();
77010
+ OmoMemoryProjectScopeSchema = object({
77011
+ nudge: boolean2().default(true),
77012
+ recall: boolean2().default(true)
77013
+ }).strict();
77014
+ OmoMemoryProjectScopeLayerSchema = object({
77015
+ nudge: boolean2().optional(),
77016
+ recall: boolean2().optional()
77017
+ }).strict();
76952
77018
  OmoMemoryNudgeSchema = object({
76953
77019
  enabled: boolean2().default(true),
76954
77020
  every_user_turns: number2().int().min(1).default(10)
@@ -77104,6 +77170,7 @@ var init_memory = __esm(() => {
77104
77170
  tool_budget: 8,
77105
77171
  query_expansion: false
77106
77172
  }),
77173
+ project_scope: OmoMemoryProjectScopeSchema.default({ nudge: true, recall: true }),
77107
77174
  projection: OmoMemoryProjectionSchema.default({ max_entries_per_directory: 40, max_bytes: 24576 }),
77108
77175
  compile_warn_tokens: number2().int().positive().default(30000),
77109
77176
  agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
@@ -77123,6 +77190,7 @@ var init_memory = __esm(() => {
77123
77190
  sync: OmoMemorySyncLayerSchema.optional(),
77124
77191
  search: OmoMemorySearchLayerSchema.optional(),
77125
77192
  recall: OmoMemoryRecallLayerSchema.optional(),
77193
+ project_scope: OmoMemoryProjectScopeLayerSchema.optional(),
77126
77194
  projection: OmoMemoryProjectionLayerSchema.optional(),
77127
77195
  compile_warn_tokens: number2().int().positive().optional(),
77128
77196
  agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
@@ -77420,7 +77488,8 @@ var OmoTelemetrySettingsShape, OmoTelemetrySettingsLayerSchema, OmoTelemetrySett
77420
77488
  var init_telemetry = __esm(() => {
77421
77489
  init_zod();
77422
77490
  OmoTelemetrySettingsShape = {
77423
- enabled: boolean2()
77491
+ enabled: boolean2(),
77492
+ rawTurnSampleRate: number2().min(0).max(1)
77424
77493
  };
77425
77494
  OmoTelemetrySettingsLayerSchema = object(OmoTelemetrySettingsShape).partial().strict();
77426
77495
  OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
@@ -77447,11 +77516,24 @@ var init_format_on_mutation = __esm(() => {
77447
77516
  }).strict();
77448
77517
  });
77449
77518
 
77450
- // packages/omo-config-core/src/schema/gateway.ts
77451
- var OmoGatewaySectionSchema;
77452
- var init_gateway = __esm(() => {
77519
+ // packages/omo-config-core/src/schema/dori.ts
77520
+ var OmoDoriSectionSchema;
77521
+ var init_dori = __esm(() => {
77522
+ init_zod();
77523
+ OmoDoriSectionSchema = record(string2(), unknown()).describe("Chat-surface dori settings, owned and validated by a separately installed dori package. omo accepts the key and never reads it.");
77524
+ });
77525
+
77526
+ // packages/omo-config-core/src/schema/provenance.ts
77527
+ var OmoProvenanceSettingsSchema;
77528
+ var init_provenance = __esm(() => {
77453
77529
  init_zod();
77454
- OmoGatewaySectionSchema = record(string2(), unknown()).describe("Chat-surface gateway settings, owned and validated by a separately installed gateway package. omo accepts the key and never reads it.");
77530
+ OmoProvenanceSettingsSchema = object({
77531
+ workspaces: array(object({
77532
+ name: string2().trim().min(1).regex(/\S/),
77533
+ git_owners: array(string2().trim().min(1).regex(/\S/)).optional(),
77534
+ paths: array(string2().trim().min(1).regex(/\S/)).optional()
77535
+ }).strict()).optional()
77536
+ }).strict();
77455
77537
  });
77456
77538
 
77457
77539
  // packages/omo-config-core/src/schema/config.ts
@@ -77470,13 +77552,15 @@ var init_config = __esm(() => {
77470
77552
  init_team();
77471
77553
  init_telemetry();
77472
77554
  init_format_on_mutation();
77473
- init_gateway();
77555
+ init_dori();
77556
+ init_provenance();
77474
77557
  OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
77475
77558
  OmoDisabledSkillsSchema = array(string2());
77476
77559
  OmoExcludedModelsSchema = array(string2());
77477
77560
  OmoTypedHarnessConfigSchema = object({
77561
+ provenance: OmoProvenanceSettingsSchema.optional(),
77478
77562
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77479
- gateway: OmoGatewaySectionSchema.optional(),
77563
+ dori: OmoDoriSectionSchema.optional(),
77480
77564
  categories: OmoCategoriesConfigSchema.optional(),
77481
77565
  agents: OmoAgentsConfigSchema.optional(),
77482
77566
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -77493,7 +77577,9 @@ var init_config = __esm(() => {
77493
77577
  exclude_models: OmoExcludedModelsSchema.optional()
77494
77578
  }).strict();
77495
77579
  OmoConfigProfileSchema = object({
77580
+ provenance: OmoProvenanceSettingsSchema.optional(),
77496
77581
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77582
+ dori: OmoDoriSectionSchema.optional(),
77497
77583
  categories: OmoCategoriesConfigSchema.optional(),
77498
77584
  agents: OmoAgentsConfigSchema.optional(),
77499
77585
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -77514,8 +77600,9 @@ var init_config = __esm(() => {
77514
77600
  "[codex]": OmoTypedHarnessConfigSchema.optional()
77515
77601
  }).strict();
77516
77602
  OmoConfigSchema = object({
77603
+ provenance: OmoProvenanceSettingsSchema.optional(),
77517
77604
  formatOnMutation: OmoFormatOnMutationSchema.optional(),
77518
- gateway: OmoGatewaySectionSchema.optional(),
77605
+ dori: OmoDoriSectionSchema.optional(),
77519
77606
  $schema: string2().optional(),
77520
77607
  categories: OmoCategoriesConfigSchema.optional(),
77521
77608
  agents: OmoAgentsConfigSchema.optional(),
@@ -77540,8 +77627,9 @@ var init_config = __esm(() => {
77540
77627
  legacy_migrations: record(string2(), unknown()).optional()
77541
77628
  }).strict();
77542
77629
  OmoConfigLayerSchema = object({
77630
+ provenance: OmoProvenanceSettingsSchema.optional(),
77543
77631
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77544
- gateway: OmoGatewaySectionSchema.optional(),
77632
+ dori: OmoDoriSectionSchema.optional(),
77545
77633
  $schema: string2().optional(),
77546
77634
  categories: OmoCategoriesConfigSchema.optional(),
77547
77635
  agents: OmoAgentsConfigSchema.optional(),
@@ -77683,6 +77771,54 @@ var init_legacy_harness_names = __esm(() => {
77683
77771
  init_harness();
77684
77772
  });
77685
77773
 
77774
+ // packages/omo-config-core/src/schema/legacy-dori-section.ts
77775
+ function isRecord11(value) {
77776
+ return value !== null && typeof value === "object" && !Array.isArray(value);
77777
+ }
77778
+ function migrateLegacyDoriSection(document) {
77779
+ if (!isRecord11(document))
77780
+ return { document: {}, diagnostics: [] };
77781
+ const diagnostics = [];
77782
+ const rename = (container, path) => {
77783
+ const result = { ...container };
77784
+ if (Object.hasOwn(container, "gateway")) {
77785
+ if (Object.hasOwn(container, "dori")) {
77786
+ diagnostics.push(`${[...path, "gateway"].join(".")} removed: dori is already configured`);
77787
+ } else {
77788
+ result.dori = container.gateway;
77789
+ diagnostics.push(`${[...path, "gateway"].join(".")} renamed to dori`);
77790
+ }
77791
+ delete result.gateway;
77792
+ }
77793
+ return result;
77794
+ };
77795
+ const layer = (container, path) => {
77796
+ const result = rename(container, path);
77797
+ for (const key of HARNESS_BLOCKS) {
77798
+ const block = container[key];
77799
+ if (isRecord11(block))
77800
+ result[key] = rename(block, [...path, key]);
77801
+ }
77802
+ return result;
77803
+ };
77804
+ const result = layer(document, []);
77805
+ if (isRecord11(document.profiles)) {
77806
+ const profiles = {};
77807
+ for (const [name, profile] of Object.entries(document.profiles)) {
77808
+ profiles[name] = isRecord11(profile) ? layer(profile, ["profiles", name]) : profile;
77809
+ }
77810
+ result.profiles = profiles;
77811
+ }
77812
+ return { document: result, diagnostics };
77813
+ }
77814
+ function hasLegacyGatewaySection(document) {
77815
+ return migrateLegacyDoriSection(document).diagnostics.length > 0;
77816
+ }
77817
+ var HARNESS_BLOCKS;
77818
+ var init_legacy_dori_section = __esm(() => {
77819
+ HARNESS_BLOCKS = ["[opencode]", "[native]", "[senpi]", "[codex]"];
77820
+ });
77821
+
77686
77822
  // packages/omo-config-core/src/schema/index.ts
77687
77823
  var init_schema = __esm(() => {
77688
77824
  init_agent();
@@ -77690,15 +77826,17 @@ var init_schema = __esm(() => {
77690
77826
  init_config();
77691
77827
  init_fallback_models();
77692
77828
  init_format_on_mutation();
77693
- init_gateway();
77829
+ init_dori();
77694
77830
  init_git_master();
77695
77831
  init_harness();
77696
77832
  init_legacy_category_names();
77697
77833
  init_legacy_harness_names();
77834
+ init_legacy_dori_section();
77698
77835
  init_memory();
77699
77836
  init_model_catalog();
77700
77837
  init_model_profile();
77701
77838
  init_model_ref();
77839
+ init_provenance();
77702
77840
  init_side_panel();
77703
77841
  init_task();
77704
77842
  init_team();
@@ -77984,7 +78122,7 @@ function invalidValueDiagnostics(path, dropped) {
77984
78122
  function unrecognizedKeyIssues(issues) {
77985
78123
  return issues.flatMap((issue) => issue.code === "unrecognized_keys" ? [{ keys: issue.keys, path: issue.path.map((segment) => String(segment)) }] : []);
77986
78124
  }
77987
- function isRecord11(value) {
78125
+ function isRecord12(value) {
77988
78126
  return typeof value === "object" && value !== null && !Array.isArray(value);
77989
78127
  }
77990
78128
  function sanitizeUnsafeKeys(value, path = []) {
@@ -77997,7 +78135,7 @@ function sanitizeUnsafeKeys(value, path = []) {
77997
78135
  });
77998
78136
  return { issues, value: sanitized };
77999
78137
  }
78000
- if (!isRecord11(value))
78138
+ if (!isRecord12(value))
78001
78139
  return { issues: [], value };
78002
78140
  const issues = [];
78003
78141
  if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
@@ -78023,13 +78161,13 @@ function containerAt(record, path) {
78023
78161
  if (!Number.isInteger(index) || index < 0 || index >= node.length)
78024
78162
  return null;
78025
78163
  node = node[index];
78026
- } else if (isRecord11(node) && Object.hasOwn(node, segment)) {
78164
+ } else if (isRecord12(node) && Object.hasOwn(node, segment)) {
78027
78165
  node = node[segment];
78028
78166
  } else {
78029
78167
  return null;
78030
78168
  }
78031
78169
  }
78032
- return isRecord11(node) ? node : null;
78170
+ return isRecord12(node) ? node : null;
78033
78171
  }
78034
78172
  function stripUnrecognizedKeys(record, issues) {
78035
78173
  const stripped = structuredClone(record);
@@ -80498,13 +80636,14 @@ function applyOpenAiOnlyModelCatalog(config) {
80498
80636
  }
80499
80637
  var OPENAI_ONLY_AGENT_OVERRIDES, OPENAI_ONLY_CATEGORY_OVERRIDES;
80500
80638
  var init_openai_only_model_catalog = __esm(() => {
80639
+ init_latest_models();
80501
80640
  OPENAI_ONLY_AGENT_OVERRIDES = {
80502
- explore: { model: "openai/gpt-6-luna-fast", variant: "low" },
80503
- librarian: { model: "openai/gpt-6-luna-fast", variant: "low" }
80641
+ explore: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" },
80642
+ librarian: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" }
80504
80643
  };
80505
80644
  OPENAI_ONLY_CATEGORY_OVERRIDES = {
80506
80645
  artistry: { model: "openai/gpt-5.6-sol", variant: "xhigh" },
80507
- quick: { model: "openai/gpt-6-luna-fast" },
80646
+ quick: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}` },
80508
80647
  "visual-engineering": { model: "openai/gpt-5.6-sol", variant: "high" }
80509
80648
  };
80510
80649
  });
@@ -80713,9 +80852,9 @@ function generateModelConfig(config) {
80713
80852
  if (role === "explore") {
80714
80853
  let agentConfig;
80715
80854
  if (avail.native.openai) {
80716
- agentConfig = { model: "openai/gpt-6-luna-fast", variant: "low" };
80855
+ agentConfig = { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" };
80717
80856
  } else if (avail.native.claude) {
80718
- agentConfig = { model: "anthropic/claude-haiku-5-5", variant: "medium" };
80857
+ agentConfig = { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeHaiku}`, variant: "medium" };
80719
80858
  } else if (avail.opencodeZen) {
80720
80859
  agentConfig = { model: "opencode/gpt-5-nano" };
80721
80860
  } else if (avail.opencodeGo) {
@@ -80798,6 +80937,7 @@ var init_model_fallback = __esm(() => {
80798
80937
  init_fallback_chain_resolution();
80799
80938
  init_provider_model_id_transform2();
80800
80939
  init_fallback_lane_policy();
80940
+ init_latest_models();
80801
80941
  });
80802
80942
 
80803
80943
  // packages/omo-opencode/src/cli/config-manager/generate-omo-config.ts
@@ -81655,6 +81795,18 @@ function subscriptionProviderRenamePlan(targetPath) {
81655
81795
  transform: inspect
81656
81796
  };
81657
81797
  }
81798
+ function doriSectionRenamePlan(targetPath, rename) {
81799
+ const inspect = (sources) => rename.transform(sources[0]?.value);
81800
+ return {
81801
+ id: DORI_SECTION_RENAME_MIGRATION_ID,
81802
+ inspect,
81803
+ mode: "replace-target",
81804
+ shouldRun: rename.shouldRun,
81805
+ sources: [],
81806
+ targetPath,
81807
+ transform: inspect
81808
+ };
81809
+ }
81658
81810
  function existingOmoConfigPath(directory, options) {
81659
81811
  const fileSystem = discoveryFileSystem(options);
81660
81812
  for (const fileName of ["omo.jsonc", "omo.json"]) {
@@ -81716,6 +81868,7 @@ function createLegacyConfigMigrationPlans(options) {
81716
81868
  addReasoningTarget(plan.targetPath);
81717
81869
  const inPlaceTargets = [...reasoningTargets.values()];
81718
81870
  return [
81871
+ ...inPlaceTargets.map((targetPath) => doriSectionRenamePlan(targetPath, options.doriSectionRename)),
81719
81872
  ...legacyPlans,
81720
81873
  ...inPlaceTargets.map(reasoningPlan),
81721
81874
  ...inPlaceTargets.map(categoryDeepSplitPlan),
@@ -81723,6 +81876,7 @@ function createLegacyConfigMigrationPlans(options) {
81723
81876
  ...inPlaceTargets.map(subscriptionProviderRenamePlan)
81724
81877
  ];
81725
81878
  }
81879
+ var DORI_SECTION_RENAME_MIGRATION_ID = "2026-10-dori-section-rename";
81726
81880
  var init_migration_plans = __esm(() => {
81727
81881
  init_discovery2();
81728
81882
  init_discovery_paths2();
@@ -81749,6 +81903,16 @@ var init_config_migration = __esm(() => {
81749
81903
  init_reasoning_unification();
81750
81904
  });
81751
81905
 
81906
+ // packages/omo-opencode/src/config-migration/dori-section-rename.ts
81907
+ var doriSectionRename;
81908
+ var init_dori_section_rename = __esm(() => {
81909
+ init_src4();
81910
+ doriSectionRename = {
81911
+ shouldRun: hasLegacyGatewaySection,
81912
+ transform: migrateLegacyDoriSection
81913
+ };
81914
+ });
81915
+
81752
81916
  // packages/omo-opencode/src/startup-migration.ts
81753
81917
  import { posix as posix5 } from "node:path";
81754
81918
  function homeDirectory(options) {
@@ -81788,6 +81952,7 @@ function runOpenCodeStartupMigration(options) {
81788
81952
  ...options.backupTimestamp === undefined ? {} : { backupTimestamp: options.backupTimestamp },
81789
81953
  cwd: options.cwd,
81790
81954
  ...options.discoveryFileSystem === undefined ? {} : { fileSystem: options.discoveryFileSystem },
81955
+ doriSectionRename,
81791
81956
  environment: options.environment ?? process.env,
81792
81957
  homeDir,
81793
81958
  pathOperations: options.pathOperations ?? posix5,
@@ -81824,6 +81989,7 @@ function runOpenCodeStartupMigration(options) {
81824
81989
  var init_startup_migration = __esm(() => {
81825
81990
  init_src4();
81826
81991
  init_config_migration();
81992
+ init_dori_section_rename();
81827
81993
  });
81828
81994
 
81829
81995
  // packages/omo-opencode/src/cli/config-manager/deep-merge-record.ts
@@ -82565,7 +82731,7 @@ function shouldRetainLine(line, cutoffMs) {
82565
82731
  function parseDiagnosticLine(line) {
82566
82732
  try {
82567
82733
  const parsed = JSON.parse(line);
82568
- if (!isRecord13(parsed)) {
82734
+ if (!isRecord14(parsed)) {
82569
82735
  return null;
82570
82736
  }
82571
82737
  return parsed;
@@ -82576,7 +82742,7 @@ function parseDiagnosticLine(line) {
82576
82742
  throw error;
82577
82743
  }
82578
82744
  }
82579
- function isRecord13(value) {
82745
+ function isRecord14(value) {
82580
82746
  return value !== null && typeof value === "object" && !Array.isArray(value);
82581
82747
  }
82582
82748
  function trimToMaxBytes(lines) {
@@ -90264,7 +90430,7 @@ function coerceBool(value) {
90264
90430
  function coerceString(value) {
90265
90431
  return typeof value == "string" ? value : undefined;
90266
90432
  }
90267
- function isRecord14(value) {
90433
+ function isRecord15(value) {
90268
90434
  return typeof value == "object" && value !== null && !Array.isArray(value);
90269
90435
  }
90270
90436
  function toRfc3339(timestamp) {
@@ -90286,7 +90452,7 @@ function relocateInto(properties, key, value) {
90286
90452
  properties[key] = value;
90287
90453
  }
90288
90454
  function buildV1Event(message) {
90289
- const sourceProperties = isRecord14(message.properties) ? message.properties : {};
90455
+ const sourceProperties = isRecord15(message.properties) ? message.properties : {};
90290
90456
  const properties = {
90291
90457
  ...sourceProperties
90292
90458
  };
@@ -92225,20 +92391,98 @@ var init_index_node = __esm(() => {
92225
92391
  };
92226
92392
  });
92227
92393
 
92394
+ // packages/telemetry-core/src/telemetry-delivery-error.ts
92395
+ var PERMANENT_STATUSES, TelemetryDeliveryError;
92396
+ var init_telemetry_delivery_error = __esm(() => {
92397
+ PERMANENT_STATUSES = new Set([400, 413]);
92398
+ TelemetryDeliveryError = class TelemetryDeliveryError extends Error {
92399
+ permanent;
92400
+ status;
92401
+ constructor(status, cause) {
92402
+ super(status === undefined ? "telemetry event was not delivered (no response)" : `telemetry event was rejected with HTTP ${status}`, { cause });
92403
+ this.name = "TelemetryDeliveryError";
92404
+ this.status = status;
92405
+ this.permanent = status !== undefined && PERMANENT_STATUSES.has(status);
92406
+ }
92407
+ };
92408
+ });
92409
+
92410
+ // packages/telemetry-core/src/posthog-immediate-send.ts
92411
+ function createImmediateSender(apiKey, options, PostHogClient) {
92412
+ const baseFetch = options.fetch ?? ((url, init) => fetch(url, init));
92413
+ let current;
92414
+ const trackedFetch = async (url, init) => {
92415
+ const attempt = current;
92416
+ try {
92417
+ const response = await baseFetch(url, init);
92418
+ if (attempt !== undefined)
92419
+ attempt.status = response.status;
92420
+ return response;
92421
+ } catch (error) {
92422
+ if (attempt !== undefined)
92423
+ attempt.error = error;
92424
+ throw error;
92425
+ }
92426
+ };
92427
+ const client = new PostHogClient(apiKey, { ...options, fetch: trackedFetch, fetchRetryCount: 0 });
92428
+ let queue = Promise.resolve();
92429
+ const sendOne = async (message) => {
92430
+ const attempt = {};
92431
+ current = attempt;
92432
+ try {
92433
+ await client.captureImmediate(message);
92434
+ } finally {
92435
+ current = undefined;
92436
+ }
92437
+ const { status } = attempt;
92438
+ if (status === undefined || status < 200 || status >= 300)
92439
+ throw new TelemetryDeliveryError(status, attempt.error);
92440
+ };
92441
+ return {
92442
+ send(message) {
92443
+ const result = queue.then(() => sendOne(message));
92444
+ queue = result.catch(() => {
92445
+ return;
92446
+ });
92447
+ return result;
92448
+ },
92449
+ async shutdown() {
92450
+ await client.shutdown();
92451
+ }
92452
+ };
92453
+ }
92454
+ var init_posthog_immediate_send = __esm(() => {
92455
+ init_telemetry_delivery_error();
92456
+ });
92457
+
92228
92458
  // packages/telemetry-core/src/posthog-transport.ts
92229
92459
  class PostHogTelemetryTransport {
92230
92460
  #client;
92461
+ #apiKey;
92462
+ #options;
92463
+ #immediate;
92231
92464
  constructor(apiKey, options) {
92232
92465
  this.#client = new PostHog(apiKey, options);
92466
+ this.#apiKey = apiKey;
92467
+ this.#options = options;
92233
92468
  }
92234
92469
  capture(message) {
92235
92470
  this.#client.capture(message);
92236
92471
  }
92472
+ captureImmediate(message) {
92473
+ this.#immediate ??= Promise.resolve().then(() => (init_posthog_immediate_send(), {})).then(({}) => createImmediateSender(this.#apiKey, this.#options, PostHog)).catch((error) => {
92474
+ this.#immediate = undefined;
92475
+ throw error;
92476
+ });
92477
+ return this.#immediate.then((sender) => sender.send(message));
92478
+ }
92237
92479
  async flush() {
92238
92480
  await this.#client.flush();
92239
92481
  }
92240
92482
  async shutdown() {
92241
- await this.#client.shutdown();
92483
+ await Promise.all([this.#client.shutdown(), this.#immediate?.then((sender) => sender.shutdown(), () => {
92484
+ return;
92485
+ })]);
92242
92486
  }
92243
92487
  }
92244
92488
  function createDefaultPostHogTransport(apiKey, options) {
@@ -92264,6 +92508,12 @@ var init_posthog_client = __esm(() => {
92264
92508
  // packages/telemetry-core/src/record-daily-active.ts
92265
92509
  var init_record_daily_active = () => {};
92266
92510
 
92511
+ // packages/telemetry-core/src/turn-trace-bridge.ts
92512
+ var REGISTRY;
92513
+ var init_turn_trace_bridge = __esm(() => {
92514
+ REGISTRY = Symbol.for("omo.telemetry.turn-traceparent.v1");
92515
+ });
92516
+
92267
92517
  // packages/telemetry-core/src/index.ts
92268
92518
  var init_src5 = __esm(() => {
92269
92519
  init_activity_state();
@@ -92275,6 +92525,7 @@ var init_src5 = __esm(() => {
92275
92525
  init_machine_id();
92276
92526
  init_posthog_client();
92277
92527
  init_record_daily_active();
92528
+ init_turn_trace_bridge();
92278
92529
  });
92279
92530
 
92280
92531
  // packages/omo-codex/package.json
@@ -92282,7 +92533,7 @@ var package_default2;
92282
92533
  var init_package2 = __esm(() => {
92283
92534
  package_default2 = {
92284
92535
  name: "@oh-my-opencode/omo-codex",
92285
- version: "5.1.43",
92536
+ version: "5.1.45",
92286
92537
  type: "module",
92287
92538
  private: true,
92288
92539
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -92313,6 +92564,7 @@ var init_package2 = __esm(() => {
92313
92564
  "sync:skills": "node plugin/scripts/sync-skills.mjs"
92314
92565
  },
92315
92566
  dependencies: {
92567
+ "@oh-my-opencode/model-core": "workspace:*",
92316
92568
  "@oh-my-opencode/shared-skills": "workspace:*",
92317
92569
  "@oh-my-opencode/utils": "workspace:*"
92318
92570
  },
@@ -93253,20 +93505,20 @@ var init_update_toasts = __esm(() => {
93253
93505
  });
93254
93506
 
93255
93507
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
93256
- import { existsSync as existsSync48 } from "node:fs";
93257
- import { dirname as dirname32, join as join79 } from "node:path";
93508
+ import { existsSync as existsSync50 } from "node:fs";
93509
+ import { dirname as dirname35, join as join84 } from "node:path";
93258
93510
  import { fileURLToPath as fileURLToPath5 } from "node:url";
93259
93511
  function defaultGetModuleHostingWorkspace() {
93260
93512
  try {
93261
- const currentDir = dirname32(fileURLToPath5(import.meta.url));
93513
+ const currentDir = dirname35(fileURLToPath5(import.meta.url));
93262
93514
  const pkgJsonPath = findPackageJsonUp(currentDir);
93263
93515
  if (!pkgJsonPath)
93264
93516
  return null;
93265
- const pkgDir = dirname32(pkgJsonPath);
93266
- const nodeModulesDir = dirname32(pkgDir);
93517
+ const pkgDir = dirname35(pkgJsonPath);
93518
+ const nodeModulesDir = dirname35(pkgDir);
93267
93519
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
93268
93520
  return null;
93269
- return dirname32(nodeModulesDir);
93521
+ return dirname35(nodeModulesDir);
93270
93522
  } catch (error) {
93271
93523
  if (error instanceof Error) {
93272
93524
  return null;
@@ -93413,8 +93665,8 @@ var init_background_update_check = __esm(() => {
93413
93665
  init_semver_compare();
93414
93666
  init_update_toasts();
93415
93667
  defaultDeps4 = {
93416
- existsSync: existsSync48,
93417
- join: join79,
93668
+ existsSync: existsSync50,
93669
+ join: join84,
93418
93670
  runBunInstallWithDetails,
93419
93671
  log: log2,
93420
93672
  getOpenCodeCacheDir,
@@ -93831,7 +94083,7 @@ function getUnsupportedOpenCodeVersionMessage(openCodeVersion) {
93831
94083
  // packages/omo-codex/src/install/install-codex.ts
93832
94084
  import { join as join56, resolve as resolve13 } from "node:path";
93833
94085
  import { existsSync as existsSync27 } from "node:fs";
93834
- import { homedir as homedir6 } from "node:os";
94086
+ import { homedir as homedir7 } from "node:os";
93835
94087
 
93836
94088
  // packages/omo-codex/src/install/codex-cache-bins.ts
93837
94089
  import { chmod, lstat as lstat4, mkdir, readFile as readFile3, readdir as readdir2, readlink as readlink3, rm as rm3, stat as stat2, symlink, writeFile } from "node:fs/promises";
@@ -96290,11 +96542,12 @@ function isRootSetting(line, key) {
96290
96542
  }
96291
96543
 
96292
96544
  // packages/omo-codex/src/install/codex-model-catalog.ts
96545
+ init_latest_models();
96293
96546
  import { readFile as readFile10 } from "node:fs/promises";
96294
96547
  import { join as join36 } from "node:path";
96295
96548
  var FALLBACK_CODEX_MODEL_CATALOG = {
96296
96549
  current: {
96297
- model: "gpt-6-astra",
96550
+ model: LATEST_MODEL_BY_FAMILY.gptAstra,
96298
96551
  modelContextWindow: 600000,
96299
96552
  modelReasoningEffort: "high",
96300
96553
  planModeReasoningEffort: "xhigh"
@@ -96450,10 +96703,10 @@ function readCatalogMultiAgentVersion(model, cachePath) {
96450
96703
  } catch {
96451
96704
  return null;
96452
96705
  }
96453
- if (!isRecord12(cache) || !Array.isArray(cache.models))
96706
+ if (!isRecord13(cache) || !Array.isArray(cache.models))
96454
96707
  return null;
96455
96708
  for (const entry of cache.models) {
96456
- if (!isRecord12(entry))
96709
+ if (!isRecord13(entry))
96457
96710
  continue;
96458
96711
  if (entry.slug !== model && entry.id !== model)
96459
96712
  continue;
@@ -96478,7 +96731,7 @@ function readRootModelCatalogPath(config) {
96478
96731
  const single = config.match(/^\s*model_catalog_json\s*=\s*'([^']+)'/m);
96479
96732
  return single?.[1] ?? null;
96480
96733
  }
96481
- function isRecord12(value) {
96734
+ function isRecord13(value) {
96482
96735
  return typeof value === "object" && value !== null && !Array.isArray(value);
96483
96736
  }
96484
96737
  function removeFeatureFlagSetting(config, featureName) {
@@ -96867,6 +97120,7 @@ import { lstat as lstat7, readFile as readFile13, readdir as readdir6, writeFile
96867
97120
  import { join as join40 } from "node:path";
96868
97121
 
96869
97122
  // packages/omo-codex/src/install/managed-agent-reasoning-defaults.ts
97123
+ init_latest_models();
96870
97124
  var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96871
97125
  [
96872
97126
  "explorer",
@@ -96881,7 +97135,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96881
97135
  },
96882
97136
  {
96883
97137
  previous: { model: "gpt-5.6-luna", effort: "low" },
96884
- current: { model: "gpt-6-astra", effort: "low" }
97138
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
96885
97139
  }
96886
97140
  ]
96887
97141
  ],
@@ -96898,7 +97152,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96898
97152
  },
96899
97153
  {
96900
97154
  previous: { model: "gpt-5.6-luna", effort: "low" },
96901
- current: { model: "gpt-6-astra", effort: "low" }
97155
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
96902
97156
  }
96903
97157
  ]
96904
97158
  ],
@@ -96907,7 +97161,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96907
97161
  [
96908
97162
  {
96909
97163
  previous: { model: "gpt-5.6-sol", effort: "high" },
96910
- current: { model: "gpt-6-astra", effort: "high" }
97164
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96911
97165
  }
96912
97166
  ]
96913
97167
  ],
@@ -96916,7 +97170,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96916
97170
  [
96917
97171
  {
96918
97172
  previous: { model: "gpt-5.6-luna", effort: "high" },
96919
- current: { model: "gpt-6-astra", effort: "high" }
97173
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96920
97174
  }
96921
97175
  ]
96922
97176
  ],
@@ -96933,7 +97187,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96933
97187
  },
96934
97188
  {
96935
97189
  previous: { model: "gpt-5.6-terra", effort: "high" },
96936
- current: { model: "gpt-6-astra", effort: "high" }
97190
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96937
97191
  }
96938
97192
  ]
96939
97193
  ],
@@ -96950,7 +97204,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96950
97204
  },
96951
97205
  {
96952
97206
  previous: { model: "gpt-5.6-sol", effort: "high" },
96953
- current: { model: "gpt-6-astra", effort: "high" }
97207
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96954
97208
  }
96955
97209
  ]
96956
97210
  ],
@@ -96967,7 +97221,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96967
97221
  },
96968
97222
  {
96969
97223
  previous: { model: "gpt-5.6-terra", effort: "high" },
96970
- current: { model: "gpt-6-astra", effort: "high" }
97224
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96971
97225
  }
96972
97226
  ]
96973
97227
  ],
@@ -96980,7 +97234,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96980
97234
  },
96981
97235
  {
96982
97236
  previous: { model: "gpt-5.6-sol", effort: "medium" },
96983
- current: { model: "gpt-6-astra", effort: "medium" }
97237
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "medium" }
96984
97238
  }
96985
97239
  ]
96986
97240
  ],
@@ -96993,7 +97247,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96993
97247
  },
96994
97248
  {
96995
97249
  previous: { model: "gpt-5.6-terra", effort: "medium" },
96996
- current: { model: "gpt-6-astra", effort: "medium" }
97250
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "medium" }
96997
97251
  }
96998
97252
  ]
96999
97253
  ],
@@ -97006,7 +97260,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
97006
97260
  },
97007
97261
  {
97008
97262
  previous: { model: "gpt-5.6-terra", effort: "high" },
97009
- current: { model: "gpt-6-astra", effort: "high" }
97263
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
97010
97264
  }
97011
97265
  ]
97012
97266
  ],
@@ -97019,7 +97273,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
97019
97273
  },
97020
97274
  {
97021
97275
  previous: { model: "gpt-5.6-luna", effort: "high" },
97022
- current: { model: "gpt-6-astra", effort: "high" }
97276
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
97023
97277
  }
97024
97278
  ]
97025
97279
  ],
@@ -97036,7 +97290,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
97036
97290
  },
97037
97291
  {
97038
97292
  previous: { model: "gpt-5.6-sol", effort: "low" },
97039
- current: { model: "gpt-6-astra", effort: "low" }
97293
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
97040
97294
  }
97041
97295
  ]
97042
97296
  ]
@@ -98407,13 +98661,13 @@ function processIsRunning(pid) {
98407
98661
  }
98408
98662
 
98409
98663
  // packages/omo-codex/src/install/codex-installer-bin-dir.ts
98410
- import { homedir as homedir5 } from "node:os";
98664
+ import { homedir as homedir6 } from "node:os";
98411
98665
  import { join as join49, resolve as resolve12 } from "node:path";
98412
98666
  function resolveCodexInstallerBinDir(input) {
98413
98667
  const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
98414
98668
  if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
98415
98669
  return resolve12(explicitBinDir.trim());
98416
- const homeDir = input.homeDir ?? homedir5();
98670
+ const homeDir = input.homeDir ?? homedir6();
98417
98671
  const defaultCodexHome = resolve12(homeDir, ".codex");
98418
98672
  const resolvedCodexHome = resolve12(input.codexHome);
98419
98673
  if (resolvedCodexHome !== defaultCodexHome)
@@ -98539,7 +98793,7 @@ async function runCodexInstaller(options = {}) {
98539
98793
  const env = options.env ?? process.env;
98540
98794
  const platform = options.platform ?? process.platform;
98541
98795
  const repoRoot = resolve13(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env }));
98542
- const codexHome = resolve13(options.codexHome ?? env.CODEX_HOME ?? join56(homedir6(), ".codex"));
98796
+ const codexHome = resolve13(options.codexHome ?? env.CODEX_HOME ?? join56(homedir7(), ".codex"));
98543
98797
  const projectDirectory = resolve13(options.projectDirectory ?? env.OMO_CODEX_PROJECT ?? process.cwd());
98544
98798
  const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env });
98545
98799
  const runCommand = options.runCommand ?? defaultRunCommand;
@@ -98731,7 +98985,7 @@ function codexMarketplaceSource(marketplaceRoot) {
98731
98985
  init_bun_which_shim();
98732
98986
  import { execFile as execFile2 } from "node:child_process";
98733
98987
  import { existsSync as existsSync28 } from "node:fs";
98734
- import { homedir as homedir7 } from "node:os";
98988
+ import { homedir as homedir8 } from "node:os";
98735
98989
  import { posix as posix8, win32 as win324 } from "node:path";
98736
98990
  var CODEX_PATH_CHECK_LABEL = "codex (PATH)";
98737
98991
  var WINDOWS_START_APPS_ARGS = [
@@ -98742,7 +98996,7 @@ var WINDOWS_START_APPS_ARGS = [
98742
98996
  async function detectCodexInstallation(input = {}) {
98743
98997
  const platform = input.platform ?? process.platform;
98744
98998
  const env = input.env ?? process.env;
98745
- const homeDir = input.homeDir ?? homedir7();
98999
+ const homeDir = input.homeDir ?? homedir8();
98746
99000
  const exists = input.exists ?? existsSync28;
98747
99001
  const which = input.which ?? bunWhich;
98748
99002
  const checkedPaths = [CODEX_PATH_CHECK_LABEL];
@@ -98858,7 +99112,7 @@ function defaultRunCommand2(command, args) {
98858
99112
  }
98859
99113
  // packages/omo-codex/src/install/codex-cleanup.ts
98860
99114
  import { lstat as lstat15, readFile as readFile27, readdir as readdir13, rm as rm14, rmdir } from "node:fs/promises";
98861
- import { homedir as homedir8 } from "node:os";
99115
+ import { homedir as homedir9 } from "node:os";
98862
99116
  import { isAbsolute as isAbsolute11, join as join59, relative as relative6, resolve as resolve16 } from "node:path";
98863
99117
 
98864
99118
  // packages/omo-codex/src/install/codex-cleanup-bins.ts
@@ -99097,7 +99351,7 @@ function skipped(path, reason) {
99097
99351
  var INSTALLED_AGENTS_MANIFEST = ".installed-agents.json";
99098
99352
  async function cleanupCodexLight(input = {}) {
99099
99353
  const env = input.env ?? process.env;
99100
- const codexHome = resolve16(input.codexHome ?? env.CODEX_HOME ?? join59(homedir8(), ".codex"));
99354
+ const codexHome = resolve16(input.codexHome ?? env.CODEX_HOME ?? join59(homedir9(), ".codex"));
99101
99355
  const configPath = join59(codexHome, "config.toml");
99102
99356
  const installedBinDir = await readInstalledCodexBinDir(codexHome);
99103
99357
  const agentPaths = await collectInstalledAgentPaths(codexHome, configPath);
@@ -99309,14 +99563,14 @@ function nodeErrorCode6(error) {
99309
99563
  // packages/omo-senpi/src/install/install-senpi.ts
99310
99564
  import { execFile as execFile3 } from "node:child_process";
99311
99565
  import { existsSync as existsSync31 } from "node:fs";
99312
- import { homedir as homedir11 } from "node:os";
99566
+ import { homedir as homedir12 } from "node:os";
99313
99567
  import { dirname as dirname25, join as join64, resolve as resolve20 } from "node:path";
99314
99568
  import { fileURLToPath } from "node:url";
99315
99569
  import { promisify as promisify2 } from "node:util";
99316
99570
 
99317
- // packages/omo-senpi/src/components/agent-home/resolve-agent-home.ts
99571
+ // packages/senpi-task/src/agent-home.ts
99318
99572
  import { existsSync as existsSync29 } from "node:fs";
99319
- import { homedir as homedir9 } from "node:os";
99573
+ import { homedir as homedir10 } from "node:os";
99320
99574
  import { join as join60, resolve as resolve17 } from "node:path";
99321
99575
  var AGENT_DIR_ENV_NAMES = [
99322
99576
  "OMO_CODING_AGENT_DIR",
@@ -99325,7 +99579,7 @@ var AGENT_DIR_ENV_NAMES = [
99325
99579
  ];
99326
99580
  var AGENT_HOME_SENTINEL = "settings.json";
99327
99581
  function resolveAgentHome(options) {
99328
- const { env, homeDir = homedir9(), exists = existsSync29 } = options;
99582
+ const { env, homeDir = homedir10(), exists = existsSync29 } = options;
99329
99583
  for (const name of AGENT_DIR_ENV_NAMES) {
99330
99584
  const configured = env[name]?.trim();
99331
99585
  if (configured)
@@ -99339,16 +99593,15 @@ function resolveAgentHome(options) {
99339
99593
  return brandedHome;
99340
99594
  return join60(homeDir, ".senpi", "agent");
99341
99595
  }
99342
-
99343
99596
  // packages/omo-senpi/src/install/local-launcher.ts
99344
99597
  import { chmodSync as chmodSync3, existsSync as existsSync30, mkdirSync as mkdirSync12, readFileSync as readFileSync14, rmSync as rmSync4, writeFileSync as writeFileSync7 } from "node:fs";
99345
- import { homedir as homedir10 } from "node:os";
99598
+ import { homedir as homedir11 } from "node:os";
99346
99599
  import { dirname as dirname22, join as join61, resolve as resolve18 } from "node:path";
99347
99600
  var MARKER = "omo-local-launcher";
99348
- function localLauncherPath(homeDir = homedir10()) {
99601
+ function localLauncherPath(homeDir = homedir11()) {
99349
99602
  return join61(homeDir, ".local", "bin", "omo");
99350
99603
  }
99351
- function localLauncherCmdPath(homeDir = homedir10()) {
99604
+ function localLauncherCmdPath(homeDir = homedir11()) {
99352
99605
  return join61(homeDir, ".local", "bin", "omo.cmd");
99353
99606
  }
99354
99607
  function releaseChannel(version) {
@@ -99476,7 +99729,7 @@ async function readSettings(settingsPath) {
99476
99729
  throw error;
99477
99730
  }
99478
99731
  const parsed = JSON.parse(raw);
99479
- if (!isRecord15(parsed))
99732
+ if (!isRecord16(parsed))
99480
99733
  throw new Error(`${settingsPath} must contain a JSON object`);
99481
99734
  return parsed;
99482
99735
  }
@@ -99537,7 +99790,7 @@ async function nextBackupPath(settingsPath) {
99537
99790
  function timestampForBackup() {
99538
99791
  return new Date().toISOString().replace(/[-:.]/g, "");
99539
99792
  }
99540
- function isRecord15(value) {
99793
+ function isRecord16(value) {
99541
99794
  return typeof value === "object" && value !== null && !Array.isArray(value);
99542
99795
  }
99543
99796
  async function readPackageName(packagePath) {
@@ -99557,7 +99810,7 @@ async function readPackageName(packagePath) {
99557
99810
  return;
99558
99811
  throw error;
99559
99812
  }
99560
- return isRecord15(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
99813
+ return isRecord16(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
99561
99814
  }
99562
99815
  async function fileExists(path) {
99563
99816
  try {
@@ -99581,13 +99834,17 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
99581
99834
  join63("extensions", "omo-memory-doctor.js"),
99582
99835
  join63("extensions", "omo-memory-memfs.js"),
99583
99836
  join63("extensions", "omo-memory-palace.js"),
99837
+ join63("extensions", "omo-device-account.js"),
99838
+ join63("extensions", "omo-memory-commands.js"),
99584
99839
  join63("extensions", "omo-session-history.js"),
99585
99840
  join63("extensions", "omo-recall-store.js"),
99841
+ join63("extensions", "omo-dori-migration.js"),
99586
99842
  join63("extensions", "omo-telemetry-posthog.js"),
99587
99843
  join63("extensions", "omo-memory-sync.js"),
99588
99844
  join63("extensions", "loro_wasm_bg.wasm"),
99589
99845
  join63("extensions", "CaseFolding.txt"),
99590
99846
  join63("extensions", "omo-thread-client.js"),
99847
+ join63("extensions", "omo-telemetry-recovery.js"),
99591
99848
  join63("extensions", "omo-feedback.js"),
99592
99849
  join63("extensions", "omo-claim-receipt.js"),
99593
99850
  join63("extensions", "assets.generated.json"),
@@ -99691,7 +99948,7 @@ async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
99691
99948
  }
99692
99949
  }
99693
99950
  function isAstGrepRuntimeManifest(value) {
99694
- if (!isRecord15(value))
99951
+ if (!isRecord16(value))
99695
99952
  return false;
99696
99953
  return typeof value.sha256 === "string" && /^[a-f0-9]{64}$/.test(value.sha256) && typeof value.mode === "number" && Number.isInteger(value.mode) && typeof value.stagedAtUtc === "string" && !Number.isNaN(Date.parse(value.stagedAtUtc));
99697
99954
  }
@@ -99747,7 +100004,7 @@ function resolveInstallContext(options) {
99747
100004
  const env = options.env ?? process.env;
99748
100005
  const allowBuild = options.pluginPath === undefined;
99749
100006
  const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
99750
- const homeDir = options.homeDir ?? env.HOME ?? homedir11();
100007
+ const homeDir = options.homeDir ?? env.HOME ?? homedir12();
99751
100008
  const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env, homeDir }));
99752
100009
  const pluginPath = resolve20(options.pluginPath ?? join64(repoRoot, "packages", "omo-senpi", "plugin"));
99753
100010
  return {
@@ -100043,7 +100300,7 @@ function shadowWarning(resolved, native, isWindows) {
100043
100300
  // packages/omo-opencode/src/cli/install-native/run-native-install.ts
100044
100301
  init_bun_which_shim();
100045
100302
  init_spawn_with_windows_hide();
100046
- import { homedir as homedir12 } from "node:os";
100303
+ import { homedir as homedir13 } from "node:os";
100047
100304
  function describeExit(plan, result) {
100048
100305
  const stderr = result.stderr?.trim();
100049
100306
  const head = `${plan.packageManager} exited with code ${result.exitCode}`;
@@ -100107,7 +100364,7 @@ function nativeInstallFailureLines(failure) {
100107
100364
  function defaultNativeInstallDependencies() {
100108
100365
  return {
100109
100366
  isBunAvailable: () => bunWhich("bun") !== null,
100110
- environment: resolveOmoBinEnvironment({ env: process.env, platform: process.platform, homeDir: homedir12() }),
100367
+ environment: resolveOmoBinEnvironment({ env: process.env, platform: process.platform, homeDir: homedir13() }),
100111
100368
  spawn: async (command, args) => {
100112
100369
  const proc = spawnWithWindowsHide([command, ...args], {
100113
100370
  env: process.env,
@@ -100509,7 +100766,7 @@ async function checkTuiPluginConfig() {
100509
100766
  if (!server.registered && tui.registered) {
100510
100767
  issues.push({
100511
100768
  title: "Server plugin entry missing from opencode.json",
100512
- description: `The TUI plugin entry ("${PLUGIN_NAME}") is registered in tui.json, ` + "but the server plugin (oh-my-openagent) is missing from opencode.json. " + "The plugin cannot function correctly without both halves — the server side " + "handles tool dispatch, hook execution, and SDK integration.",
100769
+ description: `The TUI plugin entry ("${PLUGIN_NAME}") is registered in tui.json, ` + "but the server plugin (oh-my-openagent) is missing from opencode.json. " + "The plugin cannot function correctly without both halves: the server side " + "handles tool dispatch, hook execution, and SDK integration.",
100513
100770
  fix: "Re-run the installer (`npx oh-my-openagent install`) to auto-write opencode.json, " + `or add "${PLUGIN_NAME}" to the "plugin" array in ${server.configPath ?? "opencode.json"}.`,
100514
100771
  affects: ["tool dispatch", "hook execution", "SDK integration"],
100515
100772
  severity: "warning"
@@ -100678,7 +100935,7 @@ function refreshOpenCodePluginSandboxes(options = {}) {
100678
100935
  }
100679
100936
 
100680
100937
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
100681
- import { homedir as homedir13 } from "node:os";
100938
+ import { homedir as homedir14 } from "node:os";
100682
100939
  import { join as join69 } from "node:path";
100683
100940
 
100684
100941
  // packages/shared-skills/index.mjs
@@ -100701,7 +100958,7 @@ function describeResult2(result) {
100701
100958
  }
100702
100959
  async function installAstGrepForOpenCode(options = {}) {
100703
100960
  const platform = options.platform ?? process.platform;
100704
- const baseDir = join69(options.homeDir ?? homedir13(), ".omo");
100961
+ const baseDir = join69(options.homeDir ?? homedir14(), ".omo");
100705
100962
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
100706
100963
  const skillDir = join69(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
100707
100964
  const installer = options.installer ?? runAstGrepSkillInstall;
@@ -103275,9 +103532,250 @@ async function processEvents(ctx, stream, state) {
103275
103532
  }
103276
103533
  }
103277
103534
  }
103535
+ // packages/omo-opencode/src/config/validate.ts
103536
+ import { dirname as dirname29, isAbsolute as isAbsolute13, join as join74, relative as relative7 } from "node:path";
103537
+
103538
+ // packages/skills-loader-core/src/shared/skill-path-resolver.ts
103539
+ init_skill_path_resolver();
103540
+
103541
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-mcp-config.ts
103542
+ init_js_yaml();
103543
+
103544
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-provenance.ts
103545
+ import { basename as basename11, dirname as dirname28, join as join73, resolve as resolve23, sep as sep9 } from "node:path";
103546
+ import { homedir as homedir16 } from "node:os";
103547
+
103548
+ // packages/skills-loader-core/src/shared/claude-config-dir.ts
103549
+ init_src();
103550
+ import { join as join70 } from "node:path";
103551
+ function getClaudeConfigDir() {
103552
+ const envConfigDir = process.env.CLAUDE_CONFIG_DIR;
103553
+ if (envConfigDir) {
103554
+ return envConfigDir;
103555
+ }
103556
+ return join70(getHomeDirectory(), ".claude");
103557
+ }
103558
+ // packages/skills-loader-core/src/shared/opencode-config-dir.ts
103559
+ import { existsSync as existsSync36, realpathSync as realpathSync9 } from "node:fs";
103560
+ import { homedir as homedir15 } from "node:os";
103561
+ import { join as join71, posix as posix10, resolve as resolve21, win32 as win326 } from "node:path";
103562
+
103563
+ // packages/skills-loader-core/src/shared/plugin-identity.ts
103564
+ init_src();
103565
+ var PRODUCT_IDENTITY = createProductIdentity({
103566
+ pluginName: "oh-my-openagent",
103567
+ legacyPluginName: "oh-my-opencode",
103568
+ publishedPackageName: "oh-my-opencode",
103569
+ configBasename: "oh-my-openagent",
103570
+ legacyConfigBasename: "oh-my-opencode",
103571
+ logFileName: "oh-my-opencode.log",
103572
+ cacheDirName: "oh-my-opencode"
103573
+ });
103574
+ var PLUGIN_NAME2 = PRODUCT_IDENTITY.pluginName;
103575
+ var LEGACY_PLUGIN_NAME2 = PRODUCT_IDENTITY.legacyPluginName;
103576
+ var PUBLISHED_PACKAGE_NAME2 = PRODUCT_IDENTITY.publishedPackageName;
103577
+ var CONFIG_BASENAME = PRODUCT_IDENTITY.configBasename;
103578
+ var LEGACY_CONFIG_BASENAME = PRODUCT_IDENTITY.legacyConfigBasename;
103579
+ var LOG_FILENAME3 = PRODUCT_IDENTITY.logFileName;
103580
+ var CACHE_DIR_NAME3 = PRODUCT_IDENTITY.cacheDirName;
103581
+
103582
+ // packages/skills-loader-core/src/shared/opencode-config-dir.ts
103583
+ var TAURI_APP_IDENTIFIER2 = "ai.opencode.desktop";
103584
+ var TAURI_APP_IDENTIFIER_DEV2 = "ai.opencode.desktop.dev";
103585
+ function isDevBuild2(version) {
103586
+ if (!version)
103587
+ return false;
103588
+ return version.includes("-dev") || version.includes(".dev");
103589
+ }
103590
+ function getTauriConfigDir2(identifier) {
103591
+ const platform = process.platform;
103592
+ switch (platform) {
103593
+ case "darwin":
103594
+ return join71(homedir15(), "Library", "Application Support", identifier);
103595
+ case "win32": {
103596
+ const appData = process.env.APPDATA || join71(homedir15(), "AppData", "Roaming");
103597
+ return win326.join(appData, identifier);
103598
+ }
103599
+ case "linux":
103600
+ default: {
103601
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join71(homedir15(), ".config");
103602
+ return join71(xdgConfig, identifier);
103603
+ }
103604
+ }
103605
+ }
103606
+ function resolveConfigPath2(pathValue) {
103607
+ if (isWslEnvironment2() && pathValue.startsWith("/")) {
103608
+ return posix10.normalize(pathValue);
103609
+ }
103610
+ const resolvedPath = resolve21(pathValue);
103611
+ if (!existsSync36(resolvedPath))
103612
+ return resolvedPath;
103613
+ try {
103614
+ return realpathSync9(resolvedPath);
103615
+ } catch (error) {
103616
+ if (error instanceof Error) {
103617
+ return resolvedPath;
103618
+ }
103619
+ return resolvedPath;
103620
+ }
103621
+ }
103622
+ function isWslEnvironment2() {
103623
+ return process.platform === "linux" && (Boolean(process.env.WSL_DISTRO_NAME?.trim()) || Boolean(process.env.WSL_INTEROP?.trim()));
103624
+ }
103625
+ function isWindowsUserConfigRoot2(pathValue) {
103626
+ const normalizedPath = pathValue.replaceAll("\\", "/").toLowerCase();
103627
+ return /^[a-z]:\/users\//.test(normalizedPath) || /^\/mnt\/[a-z]\/users\//.test(normalizedPath);
103628
+ }
103629
+ function getWindowsUserFromConfigRoot2(pathValue) {
103630
+ const normalizedPath = pathValue.replaceAll("\\", "/");
103631
+ const match = /^(?:[a-z]:|\/mnt\/[a-z])\/Users\/([^/]+)/i.exec(normalizedPath);
103632
+ return match?.[1] ?? null;
103633
+ }
103634
+ function getWslLinuxHomeDir2(windowsConfigRoot) {
103635
+ const envHome = process.env.HOME?.trim();
103636
+ if (envHome && envHome.startsWith("/") && !isWindowsUserConfigRoot2(envHome)) {
103637
+ return envHome;
103638
+ }
103639
+ const user = process.env.USER?.trim() || process.env.LOGNAME?.trim() || process.env.SUDO_USER?.trim() || (windowsConfigRoot ? getWindowsUserFromConfigRoot2(windowsConfigRoot) : undefined);
103640
+ return user ? posix10.join("/home", user) : null;
103641
+ }
103642
+ function getCliDefaultConfigDir2() {
103643
+ const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
103644
+ const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment2() && isWindowsUserConfigRoot2(envXdgConfig);
103645
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix10.join(getWslLinuxHomeDir2(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join71(homedir15(), ".config");
103646
+ const configDir = isWslEnvironment2() ? posix10.join(xdgConfig, "opencode") : join71(xdgConfig, "opencode");
103647
+ return resolveConfigPath2(configDir);
103648
+ }
103649
+ function getCliCustomConfigDir2() {
103650
+ const envConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
103651
+ if (!envConfigDir) {
103652
+ return null;
103653
+ }
103654
+ return resolveConfigPath2(envConfigDir);
103655
+ }
103656
+ function getCliConfigDir2() {
103657
+ return getCliCustomConfigDir2() ?? getCliDefaultConfigDir2();
103658
+ }
103659
+ function getOpenCodeConfigDirs2(options) {
103660
+ if (options.binary !== "opencode") {
103661
+ return [getOpenCodeConfigDir2(options)];
103662
+ }
103663
+ const customConfigDir = getCliCustomConfigDir2();
103664
+ return Array.from(new Set([
103665
+ ...customConfigDir ? [customConfigDir] : [],
103666
+ getCliDefaultConfigDir2()
103667
+ ]));
103668
+ }
103669
+ function getOpenCodeConfigDir2(options) {
103670
+ const { binary, version, checkExisting = true } = options;
103671
+ if (binary === "opencode") {
103672
+ return getCliConfigDir2();
103673
+ }
103674
+ const identifier = isDevBuild2(version) ? TAURI_APP_IDENTIFIER_DEV2 : TAURI_APP_IDENTIFIER2;
103675
+ const tauriDirBase = getTauriConfigDir2(identifier);
103676
+ const tauriDir = process.platform === "win32" ? win326.isAbsolute(tauriDirBase) ? win326.normalize(tauriDirBase) : win326.resolve(tauriDirBase) : resolveConfigPath2(tauriDirBase);
103677
+ if (checkExisting) {
103678
+ const legacyDir = getCliConfigDir2();
103679
+ const legacyConfig = join71(legacyDir, "opencode.json");
103680
+ const legacyConfigC = join71(legacyDir, "opencode.jsonc");
103681
+ if (existsSync36(legacyConfig) || existsSync36(legacyConfigC)) {
103682
+ return legacyDir;
103683
+ }
103684
+ }
103685
+ return tauriDir;
103686
+ }
103687
+ // packages/skills-loader-core/src/shared/project-discovery-dirs.ts
103688
+ import { execFileSync as execFileSync3 } from "node:child_process";
103689
+ import { existsSync as existsSync37, realpathSync as realpathSync10 } from "node:fs";
103690
+ import { dirname as dirname27, join as join72, resolve as resolve22, win32 as win327 } from "node:path";
103691
+ var worktreePathCache2 = new Map;
103692
+ function normalizePath(path) {
103693
+ const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path) ? path : resolve22(path);
103694
+ if (!existsSync37(resolvedPath)) {
103695
+ return resolvedPath;
103696
+ }
103697
+ try {
103698
+ return realpathSync10.native(resolvedPath);
103699
+ } catch (error) {
103700
+ if (!(error instanceof Error)) {
103701
+ throw error;
103702
+ }
103703
+ try {
103704
+ return realpathSync10(resolvedPath);
103705
+ } catch (fallbackError) {
103706
+ if (!(fallbackError instanceof Error)) {
103707
+ throw fallbackError;
103708
+ }
103709
+ return resolvedPath;
103710
+ }
103711
+ }
103712
+ }
103713
+ function pathKey2(path) {
103714
+ const normalized = path.replace(/\\/g, "/");
103715
+ return process.platform === "win32" ? normalized.toLowerCase() : normalized;
103716
+ }
103717
+ function detectWorktreePath(directory) {
103718
+ const resolvedDirectory = resolve22(directory);
103719
+ const cacheKey = pathKey2(normalizePath(resolvedDirectory));
103720
+ if (worktreePathCache2.has(cacheKey)) {
103721
+ return worktreePathCache2.get(cacheKey);
103722
+ }
103723
+ let ancestor = normalizePath(resolvedDirectory);
103724
+ while (true) {
103725
+ if (existsSync37(join72(ancestor, ".git"))) {
103726
+ worktreePathCache2.set(cacheKey, ancestor);
103727
+ return ancestor;
103728
+ }
103729
+ const parent = dirname27(ancestor);
103730
+ if (parent === ancestor)
103731
+ break;
103732
+ ancestor = parent;
103733
+ }
103734
+ try {
103735
+ const worktreePath = execFileSync3("git", ["rev-parse", "--show-toplevel"], {
103736
+ cwd: resolvedDirectory,
103737
+ encoding: "utf-8",
103738
+ timeout: 5000,
103739
+ stdio: ["pipe", "pipe", "pipe"]
103740
+ }).trim();
103741
+ const normalizedWorktreePath = normalizePath(worktreePath);
103742
+ worktreePathCache2.set(cacheKey, normalizedWorktreePath);
103743
+ return normalizedWorktreePath;
103744
+ } catch (error) {
103745
+ if (!(error instanceof Error)) {
103746
+ throw error;
103747
+ }
103748
+ worktreePathCache2.set(cacheKey, undefined);
103749
+ return;
103750
+ }
103751
+ }
103752
+ // packages/skills-loader-core/src/shared/internal-initiator-marker.ts
103753
+ init_internal_initiator_marker();
103754
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-provenance.ts
103755
+ var observers = new Set;
103756
+ function knownUserSkillRoots() {
103757
+ const home = homedir16();
103758
+ return [
103759
+ join73(getClaudeConfigDir(), "skills"),
103760
+ join73(home, ".agents", "skills"),
103761
+ join73(home, ".omo", "agent", "skills"),
103762
+ join73(home, ".senpi", "agent", "skills"),
103763
+ sharedSkillsRootPath(),
103764
+ ...getOpenCodeConfigDirs2({ binary: "opencode" }).flatMap((dir) => [
103765
+ join73(dir, "skills"),
103766
+ join73(dir, "skill")
103767
+ ])
103768
+ ];
103769
+ }
103770
+
103771
+ // packages/skills-loader-core/src/features/opencode-skill-loader/config-source-discovery.ts
103772
+ var sourceOrigins = new WeakMap;
103773
+ function setSkillSourceProvenance(config, provenance) {
103774
+ sourceOrigins.set(config, provenance);
103775
+ }
103776
+
103278
103777
  // packages/omo-opencode/src/config/validate.ts
103279
103778
  init_src4();
103280
- import { relative as relative7 } from "node:path";
103281
103779
 
103282
103780
  // packages/omo-opencode/src/shared/disabled-providers.ts
103283
103781
  init_config_errors();
@@ -103401,7 +103899,7 @@ function appendViews(views, layers, select, keyPrefix) {
103401
103899
  for (const layer of layers) {
103402
103900
  const config = select(layer.config);
103403
103901
  if (Object.keys(config).length > 0)
103404
- views.push({ config, keyPrefix, path: layer.source.path });
103902
+ views.push({ config, keyPrefix, path: layer.source.path, scope: layer.source.scope });
103405
103903
  }
103406
103904
  }
103407
103905
  function recordFields(value, fields) {
@@ -103931,7 +104429,7 @@ var GitEnvPrefixSchema2 = string2().refine(isValidGitEnvPrefix, { message: GIT_E
103931
104429
  init_zod();
103932
104430
  var GitMasterConfigSchema = object({
103933
104431
  commit_footer: union([boolean2(), string2()]).default(false),
103934
- include_co_authored_by: boolean2().default(false),
104432
+ include_co_authored_by: boolean2().default(true),
103935
104433
  git_env_prefix: GitEnvPrefixSchema2
103936
104434
  });
103937
104435
  // packages/omo-opencode/src/config/schema/hooks.ts
@@ -104240,7 +104738,7 @@ var OhMyOpenCodeConfigSchema = object({
104240
104738
  babysitting: BabysittingConfigSchema.optional(),
104241
104739
  git_master: GitMasterConfigSchema.default({
104242
104740
  commit_footer: false,
104243
- include_co_authored_by: false,
104741
+ include_co_authored_by: true,
104244
104742
  git_env_prefix: "GIT_MASTER=1"
104245
104743
  }),
104246
104744
  browser_automation_engine: BrowserAutomationConfigSchema.optional(),
@@ -104411,6 +104909,28 @@ function validatePluginConfig(directory, environment = process.env) {
104411
104909
  const userConfig = parseConfig(prunePluginView({ config: chain.protectedUserView, homeDir, keyPrefix: "", path: "" }).config);
104412
104910
  const config = applyDisabledProviders(materializeAgentModelChains(protectUserFields(mergeViews(views), userConfig)));
104413
104911
  warnLegacyUlwExecuteKey(chain.views);
104912
+ if (config.skills) {
104913
+ const owner = chain.views.findLast((view) => Object.hasOwn(view.config, "skills"));
104914
+ const userRoots = [...knownUserSkillRoots()];
104915
+ for (const view of chain.views.filter((candidate) => candidate.scope === "user")) {
104916
+ const settings = OhMyOpenCodeConfigSchema.safeParse({ skills: view.config.skills });
104917
+ const skills = settings.success ? settings.data.skills : undefined;
104918
+ if (!skills || Array.isArray(skills))
104919
+ continue;
104920
+ for (const source of skills.sources ?? []) {
104921
+ const path = typeof source === "string" ? source : source.path;
104922
+ if (/^https?:\/\//.test(path))
104923
+ continue;
104924
+ userRoots.push(path.startsWith("~/") ? join74(homeDir ?? "", path.slice(2)) : isAbsolute13(path) ? path : join74(dirname29(view.path), path));
104925
+ }
104926
+ }
104927
+ setSkillSourceProvenance(config.skills, {
104928
+ kind: owner?.scope === "user" ? "user" : "project-auto",
104929
+ selectedRoot: owner ? dirname29(owner.path) : directory,
104930
+ projectRoot: detectWorktreePath(directory) ?? directory,
104931
+ userRoots
104932
+ });
104933
+ }
104414
104934
  return {
104415
104935
  valid: messages.length === 0,
104416
104936
  messages,
@@ -104434,7 +104954,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
104434
104954
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
104435
104955
  init_bun_which_shim();
104436
104956
  init_spawn_with_windows_hide();
104437
- import { delimiter as delimiter2, dirname as dirname27, posix as posix10, win32 as win326 } from "node:path";
104957
+ import { delimiter as delimiter2, dirname as dirname30, posix as posix11, win32 as win328 } from "node:path";
104438
104958
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
104439
104959
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
104440
104960
  function getCommandCandidates(platform) {
@@ -104444,8 +104964,8 @@ function getCommandCandidates(platform) {
104444
104964
  }
104445
104965
  function getPathTools(platform) {
104446
104966
  if (platform === "win32")
104447
- return win326;
104448
- return posix10;
104967
+ return win328;
104968
+ return posix11;
104449
104969
  }
104450
104970
  function collectCandidateBinaryPaths(pathEnv, which = bunWhich, platform = process.platform) {
104451
104971
  const seen = new Set;
@@ -104492,7 +105012,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe = can
104492
105012
  return null;
104493
105013
  }
104494
105014
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
104495
- const preferredDir = dirname27(binaryPath);
105015
+ const preferredDir = dirname30(binaryPath);
104496
105016
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
104497
105017
  return [preferredDir, ...existing].join(delimiter2);
104498
105018
  }
@@ -105099,9 +105619,9 @@ function buildTaskRef(section, label) {
105099
105619
  };
105100
105620
  }
105101
105621
  // packages/boulder-state/src/top-level-task.ts
105102
- import { existsSync as existsSync36, readFileSync as readFileSync19 } from "node:fs";
105622
+ import { existsSync as existsSync38, readFileSync as readFileSync19 } from "node:fs";
105103
105623
  function readCurrentTopLevelTask(planPath) {
105104
- if (!existsSync36(planPath)) {
105624
+ if (!existsSync38(planPath)) {
105105
105625
  return null;
105106
105626
  }
105107
105627
  try {
@@ -105112,13 +105632,13 @@ function readCurrentTopLevelTask(planPath) {
105112
105632
  }
105113
105633
  }
105114
105634
  // packages/boulder-state/src/storage/path.ts
105115
- import { existsSync as existsSync37 } from "node:fs";
105116
- import { isAbsolute as isAbsolute13, join as join70, relative as relative8, resolve as resolve21 } from "node:path";
105635
+ import { existsSync as existsSync39 } from "node:fs";
105636
+ import { isAbsolute as isAbsolute14, join as join75, relative as relative8, resolve as resolve24 } from "node:path";
105117
105637
  function getBoulderFilePath(directory) {
105118
- return join70(directory, BOULDER_DIR, BOULDER_FILE);
105638
+ return join75(directory, BOULDER_DIR, BOULDER_FILE);
105119
105639
  }
105120
105640
  function resolveTrackedPath(baseDirectory, trackedPath) {
105121
- return isAbsolute13(trackedPath) ? resolve21(trackedPath) : resolve21(baseDirectory, trackedPath);
105641
+ return isAbsolute14(trackedPath) ? resolve24(trackedPath) : resolve24(baseDirectory, trackedPath);
105122
105642
  }
105123
105643
  function resolveBoulderPlanPath(directory, state) {
105124
105644
  const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
@@ -105126,22 +105646,22 @@ function resolveBoulderPlanPath(directory, state) {
105126
105646
  if (!worktreePath) {
105127
105647
  return absolutePlanPath;
105128
105648
  }
105129
- const absoluteDirectory = resolve21(directory);
105649
+ const absoluteDirectory = resolve24(directory);
105130
105650
  const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
105131
- if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute13(relativePlanPath)) {
105651
+ if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute14(relativePlanPath)) {
105132
105652
  return absolutePlanPath;
105133
105653
  }
105134
105654
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
105135
- const worktreePlanPath = resolve21(absoluteWorktreePath, relativePlanPath);
105136
- return existsSync37(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
105655
+ const worktreePlanPath = resolve24(absoluteWorktreePath, relativePlanPath);
105656
+ return existsSync39(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
105137
105657
  }
105138
105658
  function resolveBoulderPlanPathForWork(directory, work) {
105139
105659
  return resolveBoulderPlanPath(directory, work);
105140
105660
  }
105141
105661
  // packages/boulder-state/src/storage/plan-progress.ts
105142
- import { existsSync as existsSync38, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "node:fs";
105662
+ import { existsSync as existsSync40, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "node:fs";
105143
105663
  function getPlanProgress(planPath) {
105144
- if (!existsSync38(planPath)) {
105664
+ if (!existsSync40(planPath)) {
105145
105665
  return { total: 0, completed: 0, isComplete: false };
105146
105666
  }
105147
105667
  try {
@@ -105224,10 +105744,10 @@ function selectMirrorWork(state) {
105224
105744
  return sorted[0] ?? null;
105225
105745
  }
105226
105746
  // packages/boulder-state/src/storage/read-state.ts
105227
- import { existsSync as existsSync39, readFileSync as readFileSync21 } from "node:fs";
105747
+ import { existsSync as existsSync41, readFileSync as readFileSync21 } from "node:fs";
105228
105748
  function readBoulderState(directory) {
105229
105749
  const filePath = getBoulderFilePath(directory);
105230
- if (!existsSync39(filePath)) {
105750
+ if (!existsSync41(filePath)) {
105231
105751
  return null;
105232
105752
  }
105233
105753
  try {
@@ -105299,14 +105819,14 @@ init_state();
105299
105819
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
105300
105820
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
105301
105821
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
105302
- import { existsSync as existsSync40, mkdirSync as mkdirSync14, readFileSync as readFileSync22, rmSync as rmSync6, writeFileSync as writeFileSync8 } from "node:fs";
105303
- import { join as join71 } from "node:path";
105822
+ import { existsSync as existsSync42, mkdirSync as mkdirSync14, readFileSync as readFileSync22, rmSync as rmSync6, writeFileSync as writeFileSync8 } from "node:fs";
105823
+ import { join as join76 } from "node:path";
105304
105824
  function getMarkerPath(directory, sessionID) {
105305
- return join71(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
105825
+ return join76(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
105306
105826
  }
105307
105827
  function readContinuationMarker(directory, sessionID) {
105308
105828
  const markerPath = getMarkerPath(directory, sessionID);
105309
- if (!existsSync40(markerPath))
105829
+ if (!existsSync42(markerPath))
105310
105830
  return null;
105311
105831
  try {
105312
105832
  const raw = readFileSync22(markerPath, "utf-8");
@@ -105375,7 +105895,7 @@ async function isSessionInBoulderLineage(input) {
105375
105895
  init_shared();
105376
105896
  init_compaction_marker();
105377
105897
  import { readFileSync as readFileSync23, readdirSync as readdirSync10 } from "node:fs";
105378
- import { join as join72 } from "node:path";
105898
+ import { join as join77 } from "node:path";
105379
105899
  var defaultSessionLastAgentDeps = {
105380
105900
  getMessageDir,
105381
105901
  isSqliteBackend,
@@ -105435,7 +105955,7 @@ async function getLastAgentFromSession(sessionID, client, deps = {}) {
105435
105955
  try {
105436
105956
  const messages = readdirSync10(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
105437
105957
  try {
105438
- const content = readFileSync23(join72(messageDir, fileName), "utf-8");
105958
+ const content = readFileSync23(join77(messageDir, fileName), "utf-8");
105439
105959
  const parsed = JSON.parse(content);
105440
105960
  return {
105441
105961
  fileName,
@@ -105478,8 +105998,8 @@ init_agent_display_names();
105478
105998
 
105479
105999
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
105480
106000
  init_frontmatter2();
105481
- import { existsSync as existsSync41, readFileSync as readFileSync24, writeFileSync as writeFileSync9, unlinkSync as unlinkSync6, mkdirSync as mkdirSync15 } from "node:fs";
105482
- import { dirname as dirname28, join as join73 } from "node:path";
106001
+ import { existsSync as existsSync43, readFileSync as readFileSync24, writeFileSync as writeFileSync9, unlinkSync as unlinkSync6, mkdirSync as mkdirSync15 } from "node:fs";
106002
+ import { dirname as dirname31, join as join78 } from "node:path";
105483
106003
 
105484
106004
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
105485
106005
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -105488,11 +106008,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
105488
106008
 
105489
106009
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
105490
106010
  function getStateFilePath(directory, customPath) {
105491
- return customPath ? join73(directory, customPath) : join73(directory, DEFAULT_STATE_FILE);
106011
+ return customPath ? join78(directory, customPath) : join78(directory, DEFAULT_STATE_FILE);
105492
106012
  }
105493
106013
  function readState(directory, customPath) {
105494
106014
  const filePath = getStateFilePath(directory, customPath);
105495
- if (!existsSync41(filePath)) {
106015
+ if (!existsSync43(filePath)) {
105496
106016
  return null;
105497
106017
  }
105498
106018
  try {
@@ -106630,14 +107150,14 @@ async function getLocalVersion(options = {}) {
106630
107150
  }
106631
107151
  }
106632
107152
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
106633
- import { existsSync as existsSync52, readFileSync as readFileSync34 } from "node:fs";
107153
+ import { existsSync as existsSync54, readFileSync as readFileSync34 } from "node:fs";
106634
107154
 
106635
107155
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
106636
107156
  init_extract_semver();
106637
107157
  init_bun_which_shim();
106638
- import { existsSync as existsSync49, accessSync as accessSync4, constants as constants12 } from "node:fs";
106639
- import { homedir as homedir16 } from "node:os";
106640
- import { join as join80 } from "node:path";
107158
+ import { existsSync as existsSync51, accessSync as accessSync4, constants as constants12 } from "node:fs";
107159
+ import { homedir as homedir19 } from "node:os";
107160
+ import { join as join85 } from "node:path";
106641
107161
 
106642
107162
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
106643
107163
  init_spawn_with_windows_hide();
@@ -106724,22 +107244,22 @@ function isExecutable2(path) {
106724
107244
  }
106725
107245
  }
106726
107246
  function getDesktopAppPaths(platform) {
106727
- const home = homedir16();
107247
+ const home = homedir19();
106728
107248
  switch (platform) {
106729
107249
  case "darwin":
106730
107250
  return [
106731
107251
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
106732
- join80(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
107252
+ join85(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
106733
107253
  ];
106734
107254
  case "win32": {
106735
107255
  const programFiles = process.env.ProgramFiles;
106736
107256
  const localAppData = process.env.LOCALAPPDATA;
106737
107257
  const paths = [];
106738
107258
  if (programFiles) {
106739
- paths.push(join80(programFiles, "OpenCode", "OpenCode.exe"));
107259
+ paths.push(join85(programFiles, "OpenCode", "OpenCode.exe"));
106740
107260
  }
106741
107261
  if (localAppData) {
106742
- paths.push(join80(localAppData, "OpenCode", "OpenCode.exe"));
107262
+ paths.push(join85(localAppData, "OpenCode", "OpenCode.exe"));
106743
107263
  }
106744
107264
  return paths;
106745
107265
  }
@@ -106747,8 +107267,8 @@ function getDesktopAppPaths(platform) {
106747
107267
  return [
106748
107268
  "/usr/bin/opencode",
106749
107269
  "/usr/lib/opencode/opencode",
106750
- join80(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
106751
- join80(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
107270
+ join85(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
107271
+ join85(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
106752
107272
  ];
106753
107273
  default:
106754
107274
  return [];
@@ -106760,7 +107280,7 @@ function buildVersionCommand(binaryPath, platform) {
106760
107280
  }
106761
107281
  return [binaryPath, "--version"];
106762
107282
  }
106763
- function findDesktopBinary(platform = process.platform, checkExists = existsSync49) {
107283
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync51) {
106764
107284
  for (const desktopPath of getDesktopAppPaths(platform)) {
106765
107285
  if (checkExists(desktopPath)) {
106766
107286
  return { binary: "opencode", path: desktopPath };
@@ -106768,7 +107288,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
106768
107288
  }
106769
107289
  return null;
106770
107290
  }
106771
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync49) {
107291
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync51) {
106772
107292
  for (const binary of OPENCODE_BINARIES2) {
106773
107293
  const path = bunWhich(binary);
106774
107294
  if (path && checkExists(path)) {
@@ -106780,7 +107300,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
106780
107300
  const candidates = getCommandCandidates2(platform);
106781
107301
  for (const entry of pathEnv.split(delimiter).filter(Boolean)) {
106782
107302
  for (const command of candidates) {
106783
- const fullPath = join80(entry, command);
107303
+ const fullPath = join85(entry, command);
106784
107304
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
106785
107305
  return { binary: command, path: fullPath };
106786
107306
  }
@@ -106826,12 +107346,12 @@ function compareVersions3(current, minimum) {
106826
107346
 
106827
107347
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
106828
107348
  init_shared();
106829
- import { existsSync as existsSync50, readFileSync as readFileSync32 } from "node:fs";
107349
+ import { existsSync as existsSync52, readFileSync as readFileSync32 } from "node:fs";
106830
107350
  function detectConfigPath() {
106831
107351
  const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
106832
- if (existsSync50(paths.configJsonc))
107352
+ if (existsSync52(paths.configJsonc))
106833
107353
  return paths.configJsonc;
106834
- if (existsSync50(paths.configJson))
107354
+ if (existsSync52(paths.configJson))
106835
107355
  return paths.configJson;
106836
107356
  return null;
106837
107357
  }
@@ -106921,36 +107441,36 @@ init_file_utils2();
106921
107441
  init_checker();
106922
107442
  init_auto_update_checker();
106923
107443
  init_package_json_locator();
106924
- import { existsSync as existsSync51, readFileSync as readFileSync33, readdirSync as readdirSync12 } from "node:fs";
107444
+ import { existsSync as existsSync53, readFileSync as readFileSync33, readdirSync as readdirSync12 } from "node:fs";
106925
107445
  import { createRequire as createRequire2 } from "node:module";
106926
- import { homedir as homedir17 } from "node:os";
106927
- import { join as join81 } from "node:path";
107446
+ import { homedir as homedir20 } from "node:os";
107447
+ import { join as join86 } from "node:path";
106928
107448
  import { fileURLToPath as fileURLToPath6 } from "node:url";
106929
107449
  init_shared();
106930
107450
  function getPlatformDefaultCacheDir(platform = process.platform) {
106931
107451
  if (platform === "darwin")
106932
- return join81(homedir17(), "Library", "Caches");
107452
+ return join86(homedir20(), "Library", "Caches");
106933
107453
  if (platform === "win32")
106934
- return process.env.LOCALAPPDATA ?? join81(homedir17(), "AppData", "Local");
106935
- return join81(homedir17(), ".cache");
107454
+ return process.env.LOCALAPPDATA ?? join86(homedir20(), "AppData", "Local");
107455
+ return join86(homedir20(), ".cache");
106936
107456
  }
106937
107457
  function resolveOpenCodeCacheDir() {
106938
107458
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
106939
107459
  if (xdgCacheHome)
106940
- return join81(xdgCacheHome, "opencode");
107460
+ return join86(xdgCacheHome, "opencode");
106941
107461
  const fromShared = getOpenCodeCacheDir();
106942
- const platformDefault = join81(getPlatformDefaultCacheDir(), "opencode");
106943
- if (existsSync51(fromShared) || !existsSync51(platformDefault))
107462
+ const platformDefault = join86(getPlatformDefaultCacheDir(), "opencode");
107463
+ if (existsSync53(fromShared) || !existsSync53(platformDefault))
106944
107464
  return fromShared;
106945
107465
  return platformDefault;
106946
107466
  }
106947
107467
  function resolveExistingDir(dirPath) {
106948
- if (!existsSync51(dirPath))
107468
+ if (!existsSync53(dirPath))
106949
107469
  return dirPath;
106950
107470
  return resolveSymlink(dirPath);
106951
107471
  }
106952
107472
  function readPackageJson(filePath) {
106953
- if (!existsSync51(filePath))
107473
+ if (!existsSync53(filePath))
106954
107474
  return null;
106955
107475
  try {
106956
107476
  const content = readFileSync33(filePath, "utf-8");
@@ -106971,26 +107491,26 @@ function normalizeVersion(value) {
106971
107491
  function createPackageCandidates(rootDir) {
106972
107492
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
106973
107493
  packageName,
106974
- installedPackagePath: join81(rootDir, "node_modules", packageName, "package.json")
107494
+ installedPackagePath: join86(rootDir, "node_modules", packageName, "package.json")
106975
107495
  }));
106976
107496
  }
106977
107497
  function createTaggedInstallCandidates(rootDir) {
106978
- const packagesDir = join81(rootDir, "packages");
106979
- if (!existsSync51(packagesDir))
107498
+ const packagesDir = join86(rootDir, "packages");
107499
+ if (!existsSync53(packagesDir))
106980
107500
  return [];
106981
107501
  const candidates = [];
106982
107502
  for (const entryName of readdirSync12(packagesDir).sort()) {
106983
107503
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
106984
107504
  if (packageName === undefined)
106985
107505
  continue;
106986
- const installDir = join81(packagesDir, entryName);
107506
+ const installDir = join86(packagesDir, entryName);
106987
107507
  candidates.push({
106988
107508
  cacheDir: installDir,
106989
- cachePackagePath: join81(installDir, "package.json"),
107509
+ cachePackagePath: join86(installDir, "package.json"),
106990
107510
  packageCandidates: [
106991
107511
  {
106992
107512
  packageName,
106993
- installedPackagePath: join81(installDir, "node_modules", packageName, "package.json")
107513
+ installedPackagePath: join86(installDir, "node_modules", packageName, "package.json")
106994
107514
  }
106995
107515
  ]
106996
107516
  });
@@ -106998,7 +107518,7 @@ function createTaggedInstallCandidates(rootDir) {
106998
107518
  return candidates;
106999
107519
  }
107000
107520
  function selectInstalledPackage(candidate) {
107001
- return candidate.packageCandidates.find((packageCandidate) => existsSync51(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
107521
+ return candidate.packageCandidates.find((packageCandidate) => existsSync53(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
107002
107522
  }
107003
107523
  function getExpectedVersion(cachePackage, packageName) {
107004
107524
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -107009,7 +107529,7 @@ function resolveInstalledPackageJsonPath() {
107009
107529
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
107010
107530
  try {
107011
107531
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
107012
- if (existsSync51(packageJsonPath)) {
107532
+ if (existsSync53(packageJsonPath)) {
107013
107533
  return { packageName, packageJsonPath };
107014
107534
  }
107015
107535
  } catch {
@@ -107035,22 +107555,22 @@ function getLoadedPluginVersion() {
107035
107555
  const candidates = [
107036
107556
  {
107037
107557
  cacheDir: configDir,
107038
- cachePackagePath: join81(configDir, "package.json"),
107558
+ cachePackagePath: join86(configDir, "package.json"),
107039
107559
  packageCandidates: createPackageCandidates(configDir)
107040
107560
  },
107041
107561
  ...createTaggedInstallCandidates(configDir),
107042
107562
  {
107043
107563
  cacheDir,
107044
- cachePackagePath: join81(cacheDir, "package.json"),
107564
+ cachePackagePath: join86(cacheDir, "package.json"),
107045
107565
  packageCandidates: createPackageCandidates(cacheDir)
107046
107566
  },
107047
107567
  ...createTaggedInstallCandidates(cacheDir)
107048
107568
  ];
107049
- const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync51(packageCandidate.installedPackagePath))) ?? candidates[0];
107569
+ const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync53(packageCandidate.installedPackagePath))) ?? candidates[0];
107050
107570
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
107051
107571
  const selectedPackage = selectInstalledPackage(selectedCandidate);
107052
107572
  const candidateInstalledPath = selectedPackage.installedPackagePath;
107053
- const candidateExists = existsSync51(candidateInstalledPath);
107573
+ const candidateExists = existsSync53(candidateInstalledPath);
107054
107574
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
107055
107575
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
107056
107576
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -107086,7 +107606,7 @@ var defaultDeps5 = {
107086
107606
  getLoadedPluginVersion,
107087
107607
  getLatestPluginVersion,
107088
107608
  getSuggestedInstallTag,
107089
- configExists: existsSync52,
107609
+ configExists: existsSync54,
107090
107610
  readConfigFile: (path) => readFileSync34(path, "utf-8"),
107091
107611
  parseConfigContent: (content) => parseJsonc(content)
107092
107612
  };
@@ -107232,23 +107752,23 @@ async function checkSystem(deps = defaultDeps5) {
107232
107752
 
107233
107753
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
107234
107754
  init_shared();
107235
- import { existsSync as existsSync53, readFileSync as readFileSync35 } from "node:fs";
107236
- import { homedir as homedir18 } from "node:os";
107237
- import { join as join82 } from "node:path";
107755
+ import { existsSync as existsSync55, readFileSync as readFileSync35 } from "node:fs";
107756
+ import { homedir as homedir21 } from "node:os";
107757
+ import { join as join87 } from "node:path";
107238
107758
  function getUserConfigDir2() {
107239
107759
  const xdgConfig = process.env.XDG_CONFIG_HOME;
107240
107760
  if (xdgConfig)
107241
- return join82(xdgConfig, "opencode");
107242
- return join82(homedir18(), ".config", "opencode");
107761
+ return join87(xdgConfig, "opencode");
107762
+ return join87(homedir21(), ".config", "opencode");
107243
107763
  }
107244
107764
  function loadCustomProviderNames() {
107245
107765
  const configDir = getUserConfigDir2();
107246
107766
  const candidatePaths = [
107247
- join82(configDir, "opencode.json"),
107248
- join82(configDir, "opencode.jsonc")
107767
+ join87(configDir, "opencode.json"),
107768
+ join87(configDir, "opencode.jsonc")
107249
107769
  ];
107250
107770
  for (const configPath of candidatePaths) {
107251
- if (!existsSync53(configPath))
107771
+ if (!existsSync55(configPath))
107252
107772
  continue;
107253
107773
  try {
107254
107774
  const content = readFileSync35(configPath, "utf-8");
@@ -107266,9 +107786,9 @@ function loadCustomProviderNames() {
107266
107786
  return [];
107267
107787
  }
107268
107788
  function loadAvailableModelsFromCache() {
107269
- const cacheFile = join82(getOpenCodeCacheDir(), "models.json");
107789
+ const cacheFile = join87(getOpenCodeCacheDir(), "models.json");
107270
107790
  const customProviders = loadCustomProviderNames();
107271
- if (!existsSync53(cacheFile)) {
107791
+ if (!existsSync55(cacheFile)) {
107272
107792
  if (customProviders.length > 0) {
107273
107793
  return { providers: customProviders, modelCount: 0, cacheExists: true };
107274
107794
  }
@@ -107328,7 +107848,7 @@ function loadOmoConfig2() {
107328
107848
 
107329
107849
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
107330
107850
  init_shared();
107331
- import { join as join83 } from "node:path";
107851
+ import { join as join88 } from "node:path";
107332
107852
 
107333
107853
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
107334
107854
  function formatModelWithVariant(model, variant) {
@@ -107370,7 +107890,7 @@ function formatCapabilityResolutionLabel(mode) {
107370
107890
  }
107371
107891
  function buildModelResolutionDetails(options) {
107372
107892
  const details = [];
107373
- const cacheFile = join83(getOpenCodeCacheDir(), "models.json");
107893
+ const cacheFile = join88(getOpenCodeCacheDir(), "models.json");
107374
107894
  details.push("═══ Available Models (from cache) ═══");
107375
107895
  details.push("");
107376
107896
  if (options.available.cacheExists) {
@@ -107526,11 +108046,13 @@ async function checkModels() {
107526
108046
 
107527
108047
  // packages/omo-opencode/src/cli/doctor/checks/legacy-config-leftovers.ts
107528
108048
  init_config_migration();
107529
- import { posix as posix11, win32 as win327 } from "node:path";
108049
+ init_dori_section_rename();
108050
+ import { posix as posix12, win32 as win329 } from "node:path";
107530
108051
  function findLegacyConfigLeftovers(options) {
107531
- const pathOperations = options.pathOperations ?? (process.platform === "win32" ? win327 : posix11);
108052
+ const pathOperations = options.pathOperations ?? (process.platform === "win32" ? win329 : posix12);
107532
108053
  const paths = createLegacyConfigMigrationPlans({
107533
108054
  cwd: options.cwd,
108055
+ doriSectionRename,
107534
108056
  environment: options.environment ?? process.env,
107535
108057
  homeDir: options.homeDir,
107536
108058
  pathOperations,
@@ -107717,8 +108239,8 @@ async function checkBrowserProvider() {
107717
108239
  init_src4();
107718
108240
  init_main();
107719
108241
  init_config_migration();
107720
- import { existsSync as existsSync54, readFileSync as readFileSync36 } from "node:fs";
107721
- import { join as join84 } from "node:path";
108242
+ import { existsSync as existsSync56, readFileSync as readFileSync36 } from "node:fs";
108243
+ import { join as join89 } from "node:path";
107722
108244
  var CANONICAL_REPLACEMENT = new Map([
107723
108245
  ["variant", "reasoning"],
107724
108246
  ["reasoningEffort", "reasoning"],
@@ -107729,14 +108251,14 @@ var CANONICAL_REPLACEMENT = new Map([
107729
108251
  var MIGRATE_SUFFIX = ", or run: oh-my-openagent config migrate";
107730
108252
  var TUNING_CONTAINERS = new Set(["agents", "categories", "models"]);
107731
108253
  var PASSTHROUGH_CONTAINERS = new Set(["provider_options", "providerOptions"]);
107732
- function isRecord16(value) {
108254
+ function isRecord17(value) {
107733
108255
  return value !== null && typeof value === "object" && !Array.isArray(value);
107734
108256
  }
107735
108257
  function isHarnessBlock(key) {
107736
108258
  return key.startsWith("[") && key.endsWith("]");
107737
108259
  }
107738
108260
  function collectIssues(configPath, value, prefix, fixSuffix) {
107739
- if (!isRecord16(value))
108261
+ if (!isRecord17(value))
107740
108262
  return [];
107741
108263
  const issues = [];
107742
108264
  for (const [key, child] of Object.entries(value)) {
@@ -107752,7 +108274,7 @@ function collectIssues(configPath, value, prefix, fixSuffix) {
107752
108274
  });
107753
108275
  continue;
107754
108276
  }
107755
- if (!isRecord16(child))
108277
+ if (!isRecord17(child))
107756
108278
  continue;
107757
108279
  if (PASSTHROUGH_CONTAINERS.has(key))
107758
108280
  continue;
@@ -107771,7 +108293,7 @@ function collectIssues(configPath, value, prefix, fixSuffix) {
107771
108293
  return issues;
107772
108294
  }
107773
108295
  function migrateFixSuffix(parsed) {
107774
- if (isRecord16(parsed) && hasMigrationMarker(parsed, REASONING_UNIFICATION_MIGRATION_ID))
108296
+ if (isRecord17(parsed) && hasMigrationMarker(parsed, REASONING_UNIFICATION_MIGRATION_ID))
107775
108297
  return "";
107776
108298
  return MIGRATE_SUFFIX;
107777
108299
  }
@@ -107779,13 +108301,13 @@ function userConfigPaths() {
107779
108301
  const home = process.env.HOME ?? process.env.USERPROFILE;
107780
108302
  if (home === undefined || home.length === 0)
107781
108303
  return [];
107782
- return [join84(home, ".omo", "omo.jsonc"), join84(home, ".omo", "omo.json")];
108304
+ return [join89(home, ".omo", "omo.jsonc"), join89(home, ".omo", "omo.json")];
107783
108305
  }
107784
108306
  async function checkDeprecatedReasoningKeys() {
107785
108307
  const issues = [];
107786
108308
  const scanned = [];
107787
108309
  for (const configPath of userConfigPaths()) {
107788
- if (!existsSync54(configPath))
108310
+ if (!existsSync56(configPath))
107789
108311
  continue;
107790
108312
  scanned.push(configPath);
107791
108313
  const parsed = parse2(readFileSync36(configPath, "utf-8"));
@@ -107801,12 +108323,12 @@ async function checkDeprecatedReasoningKeys() {
107801
108323
  }
107802
108324
 
107803
108325
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
107804
- import { existsSync as existsSync55 } from "node:fs";
108326
+ import { existsSync as existsSync57 } from "node:fs";
107805
108327
  import { createRequire as createRequire4 } from "node:module";
107806
- import { homedir as homedir20 } from "node:os";
107807
- import { join as join89 } from "node:path";
108328
+ import { homedir as homedir23 } from "node:os";
108329
+ import { join as join94 } from "node:path";
107808
108330
  // packages/comment-checker-core/src/release.ts
107809
- import { join as join85 } from "node:path";
108331
+ import { join as join90 } from "node:path";
107810
108332
  var COMMENT_CHECKER_RELEASE_VERSION = "0.8.0";
107811
108333
  function commentCheckerBinaryName(platform) {
107812
108334
  return platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -107814,26 +108336,26 @@ function commentCheckerBinaryName(platform) {
107814
108336
  function commentCheckerCacheDir(input) {
107815
108337
  if (input.platform === "win32") {
107816
108338
  const localAppData = input.env.LOCALAPPDATA || input.env.APPDATA;
107817
- const base = localAppData || join85(input.homedir, "AppData", "Local");
107818
- return join85(base, input.cacheDirName, "bin");
108339
+ const base = localAppData || join90(input.homedir, "AppData", "Local");
108340
+ return join90(base, input.cacheDirName, "bin");
107819
108341
  }
107820
- const base = input.env.XDG_CACHE_HOME || join85(input.homedir, ".cache");
107821
- return join85(base, input.cacheDirName, "bin");
108342
+ const base = input.env.XDG_CACHE_HOME || join90(input.homedir, ".cache");
108343
+ return join90(base, input.cacheDirName, "bin");
107822
108344
  }
107823
108345
  // packages/comment-checker-core/src/cached-release.ts
107824
108346
  import { readFileSync as readFileSync37, writeFileSync as writeFileSync12 } from "node:fs";
107825
- import { join as join86 } from "node:path";
108347
+ import { join as join91 } from "node:path";
107826
108348
  var COMMENT_CHECKER_VERSION_MARKER = "comment-checker.version";
107827
108349
  function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSync37(path, "utf-8")) {
107828
108350
  try {
107829
- return readFile(join86(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
108351
+ return readFile(join91(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
107830
108352
  } catch {
107831
108353
  return false;
107832
108354
  }
107833
108355
  }
107834
108356
  // packages/comment-checker-core/src/package-binary.ts
107835
108357
  import { createRequire as createRequire3 } from "node:module";
107836
- import { dirname as dirname33, join as join87 } from "node:path";
108358
+ import { dirname as dirname36, join as join92 } from "node:path";
107837
108359
  var COMMENT_CHECKER_PACKAGE_NAME = "@code-yeongyu/comment-checker";
107838
108360
  function isModuleResolutionMiss(error) {
107839
108361
  return error instanceof Error || typeof error === "object" && error !== null && "name" in error && error.name === "ResolveMessage";
@@ -107841,18 +108363,18 @@ function isModuleResolutionMiss(error) {
107841
108363
  function findCommentCheckerPackageBinary(input) {
107842
108364
  const packageName = input.packageName ?? COMMENT_CHECKER_PACKAGE_NAME;
107843
108365
  const platformKey = `${input.platform ?? process.platform}-${input.arch ?? process.arch}`;
107844
- const packageDir = dirname33(input.packageJsonPath);
108366
+ const packageDir = dirname36(input.packageJsonPath);
107845
108367
  const candidates = [
107846
108368
  resolvePlatformPackageBinary(input.packageJsonPath, `${packageName}-${platformKey}`, input.binaryName),
107847
- join87(packageDir, "vendor", platformKey, input.binaryName),
107848
- join87(packageDir, "bin", input.binaryName)
108369
+ join92(packageDir, "vendor", platformKey, input.binaryName),
108370
+ join92(packageDir, "bin", input.binaryName)
107849
108371
  ];
107850
108372
  return candidates.find((candidate) => candidate !== null && input.existsSync(candidate)) ?? null;
107851
108373
  }
107852
108374
  function resolvePlatformPackageBinary(packageJsonPath, platformPackageName, binaryName) {
107853
108375
  try {
107854
108376
  const manifestPath = createRequire3(packageJsonPath).resolve(`${platformPackageName}/package.json`);
107855
- return join87(dirname33(manifestPath), "bin", binaryName);
108377
+ return join92(dirname36(manifestPath), "bin", binaryName);
107856
108378
  } catch (error) {
107857
108379
  if (isModuleResolutionMiss(error))
107858
108380
  return null;
@@ -107863,18 +108385,18 @@ function resolvePlatformPackageBinary(packageJsonPath, platformPackageName, bina
107863
108385
  init_src();
107864
108386
 
107865
108387
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
107866
- import { join as join88 } from "path";
107867
- import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
108388
+ import { join as join93 } from "path";
108389
+ import { homedir as homedir22, tmpdir as tmpdir4 } from "os";
107868
108390
  init_binary_downloader();
107869
108391
  init_logger2();
107870
108392
  init_plugin_identity();
107871
108393
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
107872
- var DEBUG_FILE = join88(tmpdir4(), "comment-checker-debug.log");
108394
+ var DEBUG_FILE = join93(tmpdir4(), "comment-checker-debug.log");
107873
108395
  function getCacheDir2() {
107874
108396
  return commentCheckerCacheDir({
107875
108397
  platform: process.platform,
107876
108398
  env: process.env,
107877
- homedir: homedir19(),
108399
+ homedir: homedir22(),
107878
108400
  cacheDirName: CACHE_DIR_NAME
107879
108401
  });
107880
108402
  }
@@ -107928,7 +108450,7 @@ async function getBinaryVersion(binary) {
107928
108450
  }
107929
108451
  }
107930
108452
  async function checkAstGrepCli() {
107931
- const runtimeDir = astGrepRuntimeDir(join89(homedir20(), ".omo"));
108453
+ const runtimeDir = astGrepRuntimeDir(join94(homedir23(), ".omo"));
107932
108454
  const sgPath = findSgBinarySync({ runtimeDir });
107933
108455
  if (sgPath === null) {
107934
108456
  return {
@@ -107956,8 +108478,8 @@ function resolveCommentCheckerPackageJson() {
107956
108478
  function findCommentCheckerPackageBinary2(baseDirOverride, resolvePackageJsonPath = resolveCommentCheckerPackageJson) {
107957
108479
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
107958
108480
  try {
107959
- const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join89(baseDirOverride, "package.json");
107960
- return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync55 });
108481
+ const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join94(baseDirOverride, "package.json");
108482
+ return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync57 });
107961
108483
  } catch (error) {
107962
108484
  if (!(error instanceof Error) && !isModuleResolutionFailure(error))
107963
108485
  throw error;
@@ -108102,8 +108624,8 @@ async function getGhCliInfo(dependencies = {}) {
108102
108624
  // packages/omo-opencode/src/mcp/lsp.ts
108103
108625
  init_zod();
108104
108626
  init_opencode_config_dir();
108105
- import { existsSync as existsSync56, readFileSync as readFileSync38 } from "node:fs";
108106
- import { delimiter as delimiter3, dirname as dirname35, resolve as resolve23 } from "node:path";
108627
+ import { existsSync as existsSync58, readFileSync as readFileSync38 } from "node:fs";
108628
+ import { delimiter as delimiter3, dirname as dirname38, resolve as resolve26 } from "node:path";
108107
108629
  import { fileURLToPath as fileURLToPath7 } from "node:url";
108108
108630
 
108109
108631
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -108116,7 +108638,7 @@ function hasCliSuffix(candidatePath, suffix) {
108116
108638
 
108117
108639
  // packages/omo-opencode/src/mcp/runtime-executable.ts
108118
108640
  init_bun_which_shim();
108119
- import { basename as basename11 } from "node:path";
108641
+ import { basename as basename12 } from "node:path";
108120
108642
  var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
108121
108643
  function isUnsafeCommandName2(commandName) {
108122
108644
  if (commandName.length === 0)
@@ -108132,7 +108654,7 @@ function isUnsafeCommandName2(commandName) {
108132
108654
  return false;
108133
108655
  }
108134
108656
  function isNodeExecPath(execPath) {
108135
- return NODE_EXECUTABLE_NAMES.has(basename11(execPath).toLowerCase());
108657
+ return NODE_EXECUTABLE_NAMES.has(basename12(execPath).toLowerCase());
108136
108658
  }
108137
108659
  function resolveRuntimeExecutable(commandName, options = {}) {
108138
108660
  if (isUnsafeCommandName2(commandName)) {
@@ -108150,7 +108672,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
108150
108672
  }
108151
108673
 
108152
108674
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
108153
- import { resolve as resolve22 } from "node:path";
108675
+ import { resolve as resolve25 } from "node:path";
108154
108676
  function resolveJavaScriptRuntime(resolveExecutable) {
108155
108677
  const node = resolveExecutable("node");
108156
108678
  return node.available ? node : resolveExecutable("bun");
@@ -108158,9 +108680,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
108158
108680
  function createAncestorCliCandidates(options) {
108159
108681
  const candidates = [];
108160
108682
  const seenPaths = new Set;
108161
- let currentDirectory = resolve22(options.startDirectory);
108683
+ let currentDirectory = resolve25(options.startDirectory);
108162
108684
  while (true) {
108163
- const distCliPath = resolve22(currentDirectory, options.packageRel, options.distCliRel);
108685
+ const distCliPath = resolve25(currentDirectory, options.packageRel, options.distCliRel);
108164
108686
  if (!seenPaths.has(distCliPath)) {
108165
108687
  const runtime = resolveJavaScriptRuntime(options.resolveExecutable);
108166
108688
  seenPaths.add(distCliPath);
@@ -108172,7 +108694,7 @@ function createAncestorCliCandidates(options) {
108172
108694
  runtimeAvailable: runtime.available
108173
108695
  });
108174
108696
  }
108175
- const sourceCliPath = resolve22(currentDirectory, options.packageRel, options.sourceCliRel);
108697
+ const sourceCliPath = resolve25(currentDirectory, options.packageRel, options.sourceCliRel);
108176
108698
  if (!seenPaths.has(sourceCliPath)) {
108177
108699
  const runtime = options.resolveExecutable("bun");
108178
108700
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -108189,7 +108711,7 @@ function createAncestorCliCandidates(options) {
108189
108711
  runtimeAvailable: runtime.available
108190
108712
  });
108191
108713
  }
108192
- const parentDirectory = resolve22(currentDirectory, "..");
108714
+ const parentDirectory = resolve25(currentDirectory, "..");
108193
108715
  if (parentDirectory === currentDirectory)
108194
108716
  return candidates;
108195
108717
  currentDirectory = parentDirectory;
@@ -108234,7 +108756,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
108234
108756
  ].join(";");
108235
108757
  function getModuleDirectory(moduleUrl) {
108236
108758
  try {
108237
- return dirname35(fileURLToPath7(moduleUrl));
108759
+ return dirname38(fileURLToPath7(moduleUrl));
108238
108760
  } catch (error) {
108239
108761
  if (!(error instanceof Error))
108240
108762
  throw error;
@@ -108242,11 +108764,11 @@ function getModuleDirectory(moduleUrl) {
108242
108764
  }
108243
108765
  }
108244
108766
  function findBootstrapRoot(candidates, pathExists) {
108245
- return candidates.find((candidate) => pathExists(resolve23(candidate.root, "package.json")))?.root ?? process.cwd();
108767
+ return candidates.find((candidate) => pathExists(resolve26(candidate.root, "package.json")))?.root ?? process.cwd();
108246
108768
  }
108247
108769
  function readDaemonPackageVersion(root) {
108248
108770
  try {
108249
- const packageJson = JSON.parse(readFileSync38(resolve23(root, PACKAGE_REL, "package.json"), "utf-8"));
108771
+ const packageJson = JSON.parse(readFileSync38(resolve26(root, PACKAGE_REL, "package.json"), "utf-8"));
108250
108772
  return DaemonPackageSchema.parse(packageJson).version;
108251
108773
  } catch (error) {
108252
108774
  if (!(error instanceof Error))
@@ -108258,17 +108780,17 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
108258
108780
  const runtime = resolveJavaScriptRuntime(resolveExecutable);
108259
108781
  const bun = resolveExecutable("bun");
108260
108782
  const npm = resolveExecutable("npm");
108261
- const packageManifestPath = resolve23(root, PACKAGE_REL, "package.json");
108783
+ const packageManifestPath = resolve26(root, PACKAGE_REL, "package.json");
108262
108784
  return {
108263
108785
  command: [runtime.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
108264
108786
  root,
108265
- path: resolve23(root, PACKAGE_REL, DIST_CLI_REL),
108787
+ path: resolve26(root, PACKAGE_REL, DIST_CLI_REL),
108266
108788
  exists: runtime.available && npm.available && pathExists(packageManifestPath),
108267
108789
  runtimeAvailable: runtime.available
108268
108790
  };
108269
108791
  }
108270
108792
  function resolveLspCommand(options = {}) {
108271
- const pathExists = options.exists ?? existsSync56;
108793
+ const pathExists = options.exists ?? existsSync58;
108272
108794
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
108273
108795
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
108274
108796
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -108278,7 +108800,7 @@ function resolveLspCommand(options = {}) {
108278
108800
  sourceCliRel: SOURCE_CLI_REL,
108279
108801
  pathExists,
108280
108802
  resolveExecutable,
108281
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve23(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
108803
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve26(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
108282
108804
  }) : [];
108283
108805
  const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
108284
108806
  if (distCandidate) {
@@ -108292,7 +108814,7 @@ function resolveLspCommand(options = {}) {
108292
108814
  }
108293
108815
  function createLspMcpConfig(options = {}) {
108294
108816
  const resolvedCommand = resolveLspCommand(options);
108295
- const cwd = resolve23(options.cwd ?? process.cwd());
108817
+ const cwd = resolve26(options.cwd ?? process.cwd());
108296
108818
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
108297
108819
  const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
108298
108820
  return {
@@ -108302,9 +108824,9 @@ function createLspMcpConfig(options = {}) {
108302
108824
  cwd,
108303
108825
  environment: {
108304
108826
  LSP_TOOLS_MCP_CWD: cwd,
108305
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve23(cwd, configPath)).join(delimiter3),
108306
- LSP_TOOLS_MCP_USER_CONFIG: resolve23(configDir, "lsp.json"),
108307
- LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve23(configDir, "lsp-install-decisions.json"),
108827
+ LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve26(cwd, configPath)).join(delimiter3),
108828
+ LSP_TOOLS_MCP_USER_CONFIG: resolve26(configDir, "lsp.json"),
108829
+ LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve26(configDir, "lsp-install-decisions.json"),
108308
108830
  ...sourceVersion ? {
108309
108831
  [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
108310
108832
  [OMO_LSP_DAEMON_VERSION]: sourceVersion
@@ -108329,21 +108851,21 @@ function getInstalledLspServers(options = {}) {
108329
108851
 
108330
108852
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
108331
108853
  init_shared();
108332
- import { existsSync as existsSync57, readFileSync as readFileSync39 } from "node:fs";
108333
- import { homedir as homedir21 } from "node:os";
108334
- import { join as join90 } from "node:path";
108854
+ import { existsSync as existsSync59, readFileSync as readFileSync39 } from "node:fs";
108855
+ import { homedir as homedir24 } from "node:os";
108856
+ import { join as join95 } from "node:path";
108335
108857
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
108336
108858
  function getMcpConfigPaths() {
108337
108859
  return [
108338
- join90(homedir21(), ".claude", ".mcp.json"),
108339
- join90(process.cwd(), ".mcp.json"),
108340
- join90(process.cwd(), ".claude", ".mcp.json")
108860
+ join95(homedir24(), ".claude", ".mcp.json"),
108861
+ join95(process.cwd(), ".mcp.json"),
108862
+ join95(process.cwd(), ".claude", ".mcp.json")
108341
108863
  ];
108342
108864
  }
108343
108865
  function loadUserMcpConfig() {
108344
108866
  const servers = {};
108345
108867
  for (const configPath of getMcpConfigPaths()) {
108346
- if (!existsSync57(configPath))
108868
+ if (!existsSync59(configPath))
108347
108869
  continue;
108348
108870
  try {
108349
108871
  const content = readFileSync39(configPath, "utf-8");
@@ -108481,12 +109003,12 @@ async function checkTools() {
108481
109003
 
108482
109004
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
108483
109005
  init_src5();
108484
- import { existsSync as existsSync58, readFileSync as readFileSync40 } from "node:fs";
109006
+ import { existsSync as existsSync60, readFileSync as readFileSync40 } from "node:fs";
108485
109007
  function isTelemetryState(value) {
108486
109008
  return value !== null && typeof value === "object" && !Array.isArray(value);
108487
109009
  }
108488
109010
  function readLastActiveDay(stateFilePath) {
108489
- if (!existsSync58(stateFilePath)) {
109011
+ if (!existsSync60(stateFilePath)) {
108490
109012
  return "never";
108491
109013
  }
108492
109014
  let parsed;
@@ -108549,17 +109071,17 @@ async function probeBinary(cmd, args, spawnImpl) {
108549
109071
  }
108550
109072
 
108551
109073
  // packages/team-core/src/team-registry/paths.ts
108552
- import { homedir as homedir22 } from "node:os";
109074
+ import { homedir as homedir25 } from "node:os";
108553
109075
  import path13 from "node:path";
108554
109076
  function resolveBaseDir(config) {
108555
- return expandHomeDirectory(config.base_dir ?? path13.join(homedir22(), ".omo"));
109077
+ return expandHomeDirectory(config.base_dir ?? path13.join(homedir25(), ".omo"));
108556
109078
  }
108557
109079
  function expandHomeDirectory(directoryPath) {
108558
109080
  if (directoryPath === "~") {
108559
- return homedir22();
109081
+ return homedir25();
108560
109082
  }
108561
109083
  if (directoryPath.startsWith("~/") || directoryPath.startsWith("~\\")) {
108562
- return path13.join(homedir22(), directoryPath.slice(2));
109084
+ return path13.join(homedir25(), directoryPath.slice(2));
108563
109085
  }
108564
109086
  return directoryPath;
108565
109087
  }
@@ -108616,10 +109138,10 @@ async function pathExists2(dir) {
108616
109138
 
108617
109139
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
108618
109140
  init_src();
108619
- import { existsSync as existsSync59 } from "node:fs";
109141
+ import { existsSync as existsSync61 } from "node:fs";
108620
109142
  import { lstat as lstat16, readdir as readdir14, readFile as readFile30 } from "node:fs/promises";
108621
- import { homedir as homedir23 } from "node:os";
108622
- import { basename as basename12, join as join91, resolve as resolve24 } from "node:path";
109143
+ import { homedir as homedir26 } from "node:os";
109144
+ import { basename as basename13, join as join96, resolve as resolve27 } from "node:path";
108623
109145
  // packages/omo-opencode/package.json
108624
109146
  var package_default3 = {
108625
109147
  name: "@oh-my-opencode/omo-opencode",
@@ -108636,6 +109158,10 @@ var package_default3 = {
108636
109158
  types: "./src/cli/service-auth/index.ts",
108637
109159
  import: "./src/cli/service-auth/index.ts"
108638
109160
  },
109161
+ "./config-migration/dori-section-rename": {
109162
+ types: "./src/config-migration/dori-section-rename.ts",
109163
+ import: "./src/config-migration/dori-section-rename.ts"
109164
+ },
108639
109165
  "./binary-downloader": {
108640
109166
  types: "./src/shared/binary-downloader.ts",
108641
109167
  import: "./src/shared/binary-downloader.ts"
@@ -108678,7 +109204,7 @@ var package_default3 = {
108678
109204
 
108679
109205
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
108680
109206
  var MARKETPLACE_NAME = "sisyphuslabs";
108681
- var PLUGIN_NAME2 = "omo";
109207
+ var PLUGIN_NAME3 = "omo";
108682
109208
  var COMPANION_PLUGIN_KEY = "codex@openai-codex";
108683
109209
  var DEFAULT_PLUGIN_VERSION = "0.1.0";
108684
109210
  var COMPANION_LIFECYCLE_EVENTS = new Set(["session_start", "stop"]);
@@ -108693,20 +109219,20 @@ var CODEX_BIN_NAMES = [
108693
109219
  "omo-git-bash-hook"
108694
109220
  ];
108695
109221
  async function gatherCodexSummary(deps = {}) {
108696
- const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join91(homedir23(), ".codex"));
109222
+ const codexHome = resolve27(deps.codexHome ?? process.env.CODEX_HOME ?? join96(homedir26(), ".codex"));
108697
109223
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
108698
109224
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
108699
109225
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
108700
- const manifest = pluginRoot === null ? null : await readJson(join91(pluginRoot, ".codex-plugin", "plugin.json"));
108701
- const installSnapshot = pluginRoot === null ? null : await readJson(join91(pluginRoot, "lazycodex-install.json"));
108702
- const configPath = join91(codexHome, "config.toml");
109226
+ const manifest = pluginRoot === null ? null : await readJson(join96(pluginRoot, ".codex-plugin", "plugin.json"));
109227
+ const installSnapshot = pluginRoot === null ? null : await readJson(join96(pluginRoot, "lazycodex-install.json"));
109228
+ const configPath = join96(codexHome, "config.toml");
108703
109229
  const pluginVersion = stringField(manifest, "version");
108704
109230
  return {
108705
109231
  codexPath: detection.found && "path" in detection ? detection.path : null,
108706
109232
  codexSource: detection.found ? detection.source : null,
108707
109233
  codexAppId: detection.found && "appId" in detection ? detection.appId : null,
108708
109234
  marketplaceName: MARKETPLACE_NAME,
108709
- pluginName: PLUGIN_NAME2,
109235
+ pluginName: PLUGIN_NAME3,
108710
109236
  pluginVersion,
108711
109237
  pluginVersionStamped: pluginVersion !== null && pluginVersion !== DEFAULT_PLUGIN_VERSION,
108712
109238
  installerVersion: deps.installerVersion ?? package_default3.version,
@@ -108756,7 +109282,7 @@ function buildCodexIssues(summary) {
108756
109282
  if (summary.pluginRoot === null) {
108757
109283
  issues.push({
108758
109284
  title: "OMO Codex plugin is not installed",
108759
- description: `Expected cached plugin at ${join91("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
109285
+ description: `Expected cached plugin at ${join96("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME3, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
108760
109286
  fix: "Run: npx lazycodex-ai install",
108761
109287
  severity: "error",
108762
109288
  affects: ["plugin loading"]
@@ -108821,15 +109347,15 @@ function buildCodexIssues(summary) {
108821
109347
  return issues;
108822
109348
  }
108823
109349
  async function resolveInstalledPluginRoot(codexHome) {
108824
- const pluginRoot = join91(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
108825
- if (!existsSync59(pluginRoot))
109350
+ const pluginRoot = join96(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME3);
109351
+ if (!existsSync61(pluginRoot))
108826
109352
  return null;
108827
109353
  const versions = await readdir14(pluginRoot, { withFileTypes: true });
108828
109354
  const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
108829
- return candidates.length === 0 ? null : join91(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
109355
+ return candidates.length === 0 ? null : join96(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
108830
109356
  }
108831
109357
  async function readCodexConfigSummary(configPath) {
108832
- if (!existsSync59(configPath)) {
109358
+ if (!existsSync61(configPath)) {
108833
109359
  return {
108834
109360
  exists: false,
108835
109361
  marketplaceConfigured: false,
@@ -108854,17 +109380,17 @@ async function readCodexConfigSummary(configPath) {
108854
109380
  async function readLinkedBins(binDir) {
108855
109381
  const linked = [];
108856
109382
  for (const name of CODEX_BIN_NAMES) {
108857
- if (await pathExists3(join91(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
109383
+ if (await pathExists3(join96(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
108858
109384
  linked.push(name);
108859
109385
  }
108860
109386
  return linked;
108861
109387
  }
108862
109388
  async function readLinkedAgents(codexHome) {
108863
- const agentsDir = join91(codexHome, "agents");
108864
- if (!existsSync59(agentsDir))
109389
+ const agentsDir = join96(codexHome, "agents");
109390
+ if (!existsSync61(agentsDir))
108865
109391
  return [];
108866
109392
  const entries = await readdir14(agentsDir, { withFileTypes: true });
108867
- return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename12(entry.name, ".toml")).sort();
109393
+ return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename13(entry.name, ".toml")).sort();
108868
109394
  }
108869
109395
  async function readJson(path) {
108870
109396
  try {
@@ -108993,24 +109519,24 @@ function resolveLatestVersion(input) {
108993
109519
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
108994
109520
  init_src();
108995
109521
  import { readdir as readdir15, readFile as readFile31, stat as stat7 } from "node:fs/promises";
108996
- import { homedir as homedir24 } from "node:os";
108997
- import { dirname as dirname36, isAbsolute as isAbsolute14, join as join92, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
109522
+ import { homedir as homedir27 } from "node:os";
109523
+ import { dirname as dirname39, isAbsolute as isAbsolute15, join as join97, relative as relative9, resolve as resolve28, sep as sep10 } from "node:path";
108998
109524
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
108999
109525
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
109000
109526
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
109001
- var BOOTSTRAP_PENDING_MESSAGE = "bootstrap pending — start a Codex session";
109527
+ var BOOTSTRAP_PENDING_MESSAGE = "bootstrap pending: start a Codex session";
109002
109528
  var REINSTALL_FIX = "Reinstall: npx lazycodex-ai install (or upgrade: codex plugin marketplace upgrade sisyphuslabs)";
109003
109529
  async function checkCodexComponents(deps = {}) {
109004
109530
  const env = deps.env ?? process.env;
109005
109531
  const platform = deps.platform ?? process.platform;
109006
109532
  const arch = deps.arch ?? process.arch;
109007
- const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ?? join92(homedir24(), ".codex"));
109533
+ const codexHome = resolve28(deps.codexHome ?? env["CODEX_HOME"] ?? join97(homedir27(), ".codex"));
109008
109534
  const summary = await gatherCodexSummary({ ...deps, codexHome });
109009
109535
  if (summary.pluginRoot === null) {
109010
109536
  return {
109011
109537
  name: CODEX_COMPONENTS_CHECK_NAME,
109012
109538
  status: "skip",
109013
- message: "OMO Codex plugin is not installed — skipping component checks",
109539
+ message: "OMO Codex plugin is not installed: skipping component checks",
109014
109540
  details: [`plugin root: not installed under ${codexHome}`],
109015
109541
  issues: []
109016
109542
  };
@@ -109029,7 +109555,7 @@ async function checkCodexComponents(deps = {}) {
109029
109555
  });
109030
109556
  }
109031
109557
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
109032
- const runtimeSgPath = join92(runtimeSgDir, sgBinaryName(platform));
109558
+ const runtimeSgPath = join97(runtimeSgDir, sgBinaryName(platform));
109033
109559
  const sg = findSgBinarySync({
109034
109560
  arch,
109035
109561
  env,
@@ -109066,12 +109592,12 @@ async function auditBundleTargets(pluginRoot) {
109066
109592
  let referencedCount = 0;
109067
109593
  for (const manifestPath of await findManifestPaths(pluginRoot, ".mcp.json")) {
109068
109594
  const manifest = await readJson2(manifestPath);
109069
- if (manifest === null || !isRecord18(manifest["mcpServers"]))
109595
+ if (manifest === null || !isRecord19(manifest["mcpServers"]))
109070
109596
  continue;
109071
- const manifestRoot = dirname36(manifestPath);
109072
- const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
109597
+ const manifestRoot = dirname39(manifestPath);
109598
+ const isRootManifest = resolve28(manifestRoot) === resolve28(pluginRoot);
109073
109599
  for (const server of Object.values(manifest["mcpServers"])) {
109074
- if (!isRecord18(server) || !Array.isArray(server["args"]))
109600
+ if (!isRecord19(server) || !Array.isArray(server["args"]))
109075
109601
  continue;
109076
109602
  for (const arg of server["args"]) {
109077
109603
  if (typeof arg !== "string" || !isPluginRuntimePathArg(arg))
@@ -109089,7 +109615,7 @@ async function auditBundleTargets(pluginRoot) {
109089
109615
  continue;
109090
109616
  const commands = [];
109091
109617
  collectHookCommands(manifest, commands);
109092
- const hookPluginRoot = dirname36(dirname36(hookManifestPath));
109618
+ const hookPluginRoot = dirname39(dirname39(hookManifestPath));
109093
109619
  for (const command of commands) {
109094
109620
  for (const relativePath of extractPluginRootPaths(command)) {
109095
109621
  referencedCount += 1;
@@ -109111,9 +109637,9 @@ function recordBrokenTarget(broken, classified, origin) {
109111
109637
  broken.push(entry);
109112
109638
  }
109113
109639
  async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
109114
- const targetPath = resolve25(baseRoot, relativePath);
109115
- const bundleRootPath = resolve25(bundleRoot);
109116
- const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
109640
+ const targetPath = resolve28(baseRoot, relativePath);
109641
+ const bundleRootPath = resolve28(bundleRoot);
109642
+ const bundleRootPrefix = bundleRootPath.endsWith(sep10) ? bundleRootPath : `${bundleRootPath}${sep10}`;
109117
109643
  if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
109118
109644
  if (allowEscape)
109119
109645
  return null;
@@ -109128,7 +109654,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
109128
109654
  }
109129
109655
  async function findHookManifestPaths(root) {
109130
109656
  const paths = await findManifestPaths(root, "hooks.json");
109131
- return paths.filter((path) => dirname36(path).endsWith(`${sep9}hooks`));
109657
+ return paths.filter((path) => dirname39(path).endsWith(`${sep10}hooks`));
109132
109658
  }
109133
109659
  async function findManifestPaths(root, manifestName) {
109134
109660
  let entries;
@@ -109141,7 +109667,7 @@ async function findManifestPaths(root, manifestName) {
109141
109667
  for (const entry of entries) {
109142
109668
  if (entry.name === "node_modules" || entry.name === ".git")
109143
109669
  continue;
109144
- const entryPath = join92(root, entry.name);
109670
+ const entryPath = join97(root, entry.name);
109145
109671
  if (entry.isDirectory()) {
109146
109672
  paths.push(...await findManifestPaths(entryPath, manifestName));
109147
109673
  continue;
@@ -109157,7 +109683,7 @@ function collectHookCommands(value, commands) {
109157
109683
  collectHookCommands(item, commands);
109158
109684
  return;
109159
109685
  }
109160
- if (!isRecord18(value))
109686
+ if (!isRecord19(value))
109161
109687
  return;
109162
109688
  if (value["type"] === "command") {
109163
109689
  if (typeof value["command"] === "string")
@@ -109182,21 +109708,21 @@ function extractPluginRootPaths(command) {
109182
109708
  }
109183
109709
  function isPluginRuntimePathArg(arg) {
109184
109710
  const normalized = normalizePathSeparators(arg);
109185
- return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute14(arg));
109711
+ return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute15(arg));
109186
109712
  }
109187
109713
  function runtimeSgDirectory(codexHome, platform, arch) {
109188
- return join92(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
109714
+ return join97(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
109189
109715
  }
109190
109716
  function describeSgSource(sgPath, env, runtimeSgDir, platform) {
109191
109717
  const override = env[SG_PATH_ENV_KEY]?.trim();
109192
109718
  if (override !== undefined && override.length > 0 && sgPath === override)
109193
109719
  return `env override ${SG_PATH_ENV_KEY}`;
109194
- if (sgPath === join92(runtimeSgDir, sgBinaryName(platform)))
109720
+ if (sgPath === join97(runtimeSgDir, sgBinaryName(platform)))
109195
109721
  return "runtime dir";
109196
109722
  return "PATH";
109197
109723
  }
109198
109724
  async function readBootstrapStateSummary(codexHome) {
109199
- const statePath = join92(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
109725
+ const statePath = join97(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
109200
109726
  const raw = await readJson2(statePath);
109201
109727
  if (raw === null)
109202
109728
  return null;
@@ -109212,7 +109738,7 @@ function parseDegradedEntries(value) {
109212
109738
  return [];
109213
109739
  const entries = [];
109214
109740
  for (const item of value) {
109215
- if (!isRecord18(item))
109741
+ if (!isRecord19(item))
109216
109742
  continue;
109217
109743
  if (typeof item["component"] !== "string" || typeof item["reason"] !== "string")
109218
109744
  continue;
@@ -109246,7 +109772,7 @@ function degradedDetailLines(entries) {
109246
109772
  async function readJson2(path) {
109247
109773
  try {
109248
109774
  const parsed = JSON.parse(await readFile31(path, "utf8"));
109249
- return isRecord18(parsed) ? parsed : null;
109775
+ return isRecord19(parsed) ? parsed : null;
109250
109776
  } catch (error) {
109251
109777
  if (error instanceof Error)
109252
109778
  return null;
@@ -109267,29 +109793,29 @@ function normalizeRelative(root, target) {
109267
109793
  function normalizePathSeparators(path) {
109268
109794
  return path.split("\\").join("/");
109269
109795
  }
109270
- function isRecord18(value) {
109796
+ function isRecord19(value) {
109271
109797
  return typeof value === "object" && value !== null && !Array.isArray(value);
109272
109798
  }
109273
109799
 
109274
109800
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
109275
- import { existsSync as existsSync60 } from "node:fs";
109801
+ import { existsSync as existsSync62 } from "node:fs";
109276
109802
  import { readFile as readFile32 } from "node:fs/promises";
109277
- import { homedir as homedir25 } from "node:os";
109278
- import { join as join93, resolve as resolve26 } from "node:path";
109803
+ import { homedir as homedir28 } from "node:os";
109804
+ import { join as join98, resolve as resolve29 } from "node:path";
109279
109805
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
109280
109806
  var CHECK_NAME = "codex-runtime-wrapper";
109281
109807
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
109282
109808
  async function checkCodexRuntimeWrapper(deps = {}) {
109283
- const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join93(homedir25(), ".codex"));
109809
+ const codexHome = resolve29(deps.codexHome ?? process.env.CODEX_HOME ?? join98(homedir28(), ".codex"));
109284
109810
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
109285
109811
  const platform = deps.platform ?? process.platform;
109286
- const wrapperPath = join93(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
109287
- const legacyWrapperPath = join93(binDir, platform === "win32" ? "omo.cmd" : "omo");
109812
+ const wrapperPath = join98(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
109813
+ const legacyWrapperPath = join98(binDir, platform === "win32" ? "omo.cmd" : "omo");
109288
109814
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
109289
109815
  const issues = [];
109290
109816
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
109291
109817
  const targetPath = parseRuntimeTargetPath(wrapper);
109292
- if (targetPath !== null && !existsSync60(targetPath)) {
109818
+ if (targetPath !== null && !existsSync62(targetPath)) {
109293
109819
  issues.push({
109294
109820
  title: "omo-agent-toolkit runtime wrapper target is missing",
109295
109821
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -109815,7 +110341,7 @@ init_commander();
109815
110341
  import { createHash as createHash7 } from "node:crypto";
109816
110342
  import {
109817
110343
  chmodSync as chmodSync5,
109818
- existsSync as existsSync63,
110344
+ existsSync as existsSync65,
109819
110345
  mkdirSync as mkdirSync17,
109820
110346
  readdirSync as readdirSync13,
109821
110347
  readFileSync as readFileSync42,
@@ -109823,18 +110349,18 @@ import {
109823
110349
  unlinkSync as unlinkSync9,
109824
110350
  writeFileSync as writeFileSync14
109825
110351
  } from "node:fs";
109826
- import { basename as basename13, dirname as dirname37, join as join96 } from "node:path";
110352
+ import { basename as basename14, dirname as dirname40, join as join101 } from "node:path";
109827
110353
 
109828
110354
  // packages/mcp-client-core/src/config-dir.ts
109829
- import { existsSync as existsSync61, realpathSync as realpathSync10 } from "node:fs";
109830
- import { homedir as homedir26 } from "node:os";
109831
- import { join as join94, resolve as resolve27 } from "node:path";
109832
- function resolveConfigPath2(pathValue) {
109833
- const resolvedPath = resolve27(pathValue);
109834
- if (!existsSync61(resolvedPath))
110355
+ import { existsSync as existsSync63, realpathSync as realpathSync12 } from "node:fs";
110356
+ import { homedir as homedir29 } from "node:os";
110357
+ import { join as join99, resolve as resolve30 } from "node:path";
110358
+ function resolveConfigPath3(pathValue) {
110359
+ const resolvedPath = resolve30(pathValue);
110360
+ if (!existsSync63(resolvedPath))
109835
110361
  return resolvedPath;
109836
110362
  try {
109837
- return realpathSync10(resolvedPath);
110363
+ return realpathSync12(resolvedPath);
109838
110364
  } catch (error) {
109839
110365
  if (!(error instanceof Error))
109840
110366
  throw error;
@@ -109844,15 +110370,15 @@ function resolveConfigPath2(pathValue) {
109844
110370
  function getOpenCodeCliConfigDir(env = process.env) {
109845
110371
  const customConfigDir = env["OPENCODE_CONFIG_DIR"]?.trim();
109846
110372
  if (customConfigDir) {
109847
- return resolveConfigPath2(customConfigDir);
110373
+ return resolveConfigPath3(customConfigDir);
109848
110374
  }
109849
- const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join94(homedir26(), ".config");
109850
- return resolveConfigPath2(join94(xdgConfigDir, "opencode"));
110375
+ const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join99(homedir29(), ".config");
110376
+ return resolveConfigPath3(join99(xdgConfigDir, "opencode"));
109851
110377
  }
109852
110378
 
109853
110379
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
109854
- import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "node:fs";
109855
- import { join as join95 } from "node:path";
110380
+ import { chmodSync as chmodSync4, existsSync as existsSync64, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "node:fs";
110381
+ import { join as join100 } from "node:path";
109856
110382
  var INDEX_FILE_NAME = "index.json";
109857
110383
  function isTokenIndex(value) {
109858
110384
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -109860,11 +110386,11 @@ function isTokenIndex(value) {
109860
110386
  return Object.values(value).every((entry) => typeof entry === "string");
109861
110387
  }
109862
110388
  function getIndexPath(storageDir) {
109863
- return join95(storageDir, INDEX_FILE_NAME);
110389
+ return join100(storageDir, INDEX_FILE_NAME);
109864
110390
  }
109865
110391
  function readTokenIndex(storageDir) {
109866
110392
  const indexPath = getIndexPath(storageDir);
109867
- if (!existsSync62(indexPath))
110393
+ if (!existsSync64(indexPath))
109868
110394
  return {};
109869
110395
  try {
109870
110396
  const parsed = JSON.parse(readFileSync41(indexPath, "utf-8"));
@@ -109904,16 +110430,16 @@ function deleteTokenIndexEntry(storageDir, hash) {
109904
110430
  var STORAGE_DIR_NAME = "mcp-oauth";
109905
110431
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
109906
110432
  function getMcpOauthStorageDir() {
109907
- return join96(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
110433
+ return join101(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
109908
110434
  }
109909
110435
  function getMcpOauthServerHash(serverHost, resource) {
109910
110436
  return createHash7("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
109911
110437
  }
109912
110438
  function getMcpOauthStoragePath(serverHost, resource) {
109913
- return join96(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
110439
+ return join101(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
109914
110440
  }
109915
110441
  function getLegacyStoragePath() {
109916
- return join96(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
110442
+ return join101(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
109917
110443
  }
109918
110444
  function normalizeHost2(serverHost) {
109919
110445
  let host = serverHost.trim();
@@ -109974,7 +110500,7 @@ function isOAuthTokenData(value) {
109974
110500
  return clientSecret === undefined || typeof clientSecret === "string";
109975
110501
  }
109976
110502
  function readTokenFile(filePath) {
109977
- if (!existsSync63(filePath))
110503
+ if (!existsSync65(filePath))
109978
110504
  return null;
109979
110505
  try {
109980
110506
  const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
@@ -109987,7 +110513,7 @@ function readTokenFile(filePath) {
109987
110513
  }
109988
110514
  function readLegacyStore() {
109989
110515
  const filePath = getLegacyStoragePath();
109990
- if (!existsSync63(filePath))
110516
+ if (!existsSync65(filePath))
109991
110517
  return null;
109992
110518
  try {
109993
110519
  const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
@@ -110007,8 +110533,8 @@ function readLegacyStore() {
110007
110533
  }
110008
110534
  function writeTokenFile(filePath, token) {
110009
110535
  try {
110010
- const dir = dirname37(filePath);
110011
- if (!existsSync63(dir)) {
110536
+ const dir = dirname40(filePath);
110537
+ if (!existsSync65(dir)) {
110012
110538
  mkdirSync17(dir, { recursive: true });
110013
110539
  }
110014
110540
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -110032,7 +110558,7 @@ function saveToken(serverHost, resource, token) {
110032
110558
  }
110033
110559
  function deleteToken(serverHost, resource) {
110034
110560
  const filePath = getMcpOauthStoragePath(serverHost, resource);
110035
- if (!existsSync63(filePath))
110561
+ if (!existsSync65(filePath))
110036
110562
  return deleteLegacyToken(serverHost, resource);
110037
110563
  try {
110038
110564
  unlinkSync9(filePath);
@@ -110054,7 +110580,7 @@ function deleteLegacyToken(serverHost, resource) {
110054
110580
  if (Object.keys(store).length === 0) {
110055
110581
  try {
110056
110582
  const filePath = getLegacyStoragePath();
110057
- if (existsSync63(filePath))
110583
+ if (existsSync65(filePath))
110058
110584
  unlinkSync9(filePath);
110059
110585
  return true;
110060
110586
  } catch (deleteError) {
@@ -110092,7 +110618,7 @@ function listTokensByHost(serverHost) {
110092
110618
  for (const [hash, indexedKey] of Object.entries(index)) {
110093
110619
  if (!indexedKey.startsWith(prefix))
110094
110620
  continue;
110095
- const indexedToken = readTokenFile(join96(getMcpOauthStorageDir(), `${hash}.json`));
110621
+ const indexedToken = readTokenFile(join101(getMcpOauthStorageDir(), `${hash}.json`));
110096
110622
  if (indexedToken)
110097
110623
  result[indexedKey] = indexedToken;
110098
110624
  }
@@ -110101,14 +110627,14 @@ function listTokensByHost(serverHost) {
110101
110627
  function listAllTokens() {
110102
110628
  const result = { ...readLegacyStore() ?? {} };
110103
110629
  const dir = getMcpOauthStorageDir();
110104
- if (!existsSync63(dir))
110630
+ if (!existsSync65(dir))
110105
110631
  return result;
110106
110632
  const index = readTokenIndex(dir);
110107
110633
  for (const entry of readdirSync13(dir, { withFileTypes: true })) {
110108
110634
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
110109
110635
  continue;
110110
- const token = readTokenFile(join96(dir, entry.name));
110111
- const hash = basename13(entry.name, ".json");
110636
+ const token = readTokenFile(join101(dir, entry.name));
110637
+ const hash = basename14(entry.name, ".json");
110112
110638
  if (token)
110113
110639
  result[index[hash] ?? hash] = token;
110114
110640
  }
@@ -110116,7 +110642,7 @@ function listAllTokens() {
110116
110642
  }
110117
110643
 
110118
110644
  // packages/mcp-client-core/src/plugin-identity.ts
110119
- var PLUGIN_NAME3 = "oh-my-openagent";
110645
+ var PLUGIN_NAME4 = "oh-my-openagent";
110120
110646
 
110121
110647
  // packages/mcp-client-core/src/mcp-oauth/discovery.ts
110122
110648
  var discoveryCache = new Map;
@@ -110493,7 +111019,7 @@ class McpOAuthProvider {
110493
111019
  const clientInfo = await getOrRegisterClient({
110494
111020
  ...metadata.registrationEndpoint ? { registrationEndpoint: metadata.registrationEndpoint } : {},
110495
111021
  serverIdentifier: this.serverUrl,
110496
- clientName: PLUGIN_NAME3,
111022
+ clientName: PLUGIN_NAME4,
110497
111023
  redirectUris: [this.redirectUrl()],
110498
111024
  tokenEndpointAuthMethod: "none",
110499
111025
  ...this.configClientId ? { clientId: this.configClientId } : {},
@@ -111179,8 +111705,8 @@ async function loadDeviceKeyring(store) {
111179
111705
 
111180
111706
  // packages/omo-opencode/src/cli/account-keys/keystore.ts
111181
111707
  import { execFile as execFile5 } from "node:child_process";
111182
- import { homedir as homedir27 } from "node:os";
111183
- import { join as join97 } from "node:path";
111708
+ import { homedir as homedir30 } from "node:os";
111709
+ import { join as join102 } from "node:path";
111184
111710
  var DEFAULT_SERVICE = "omo-cli";
111185
111711
  function defaultRun(argv, input) {
111186
111712
  const [file, ...args] = argv;
@@ -111288,8 +111814,8 @@ function createLibsecretKeyStore(name, run) {
111288
111814
  }
111289
111815
  function createDpapiKeyStore(name, run) {
111290
111816
  const safeName = name.replace(/[^A-Za-z0-9._-]/g, "-");
111291
- const directory = join97(process.env.LOCALAPPDATA ?? join97(homedir27(), "AppData", "Local"), "omo");
111292
- const file = join97(directory, `device-keys-${safeName}.bin`);
111817
+ const directory = join102(process.env.LOCALAPPDATA ?? join102(homedir30(), "AppData", "Local"), "omo");
111818
+ const file = join102(directory, `device-keys-${safeName}.bin`);
111293
111819
  const ps = (literal) => `'${literal.replace(/'/g, "''")}'`;
111294
111820
  const prelude = "Add-Type -AssemblyName System.Security; ";
111295
111821
  const fail = () => new Error("omo account keys: Windows DPAPI is unavailable. Sign in with your Windows account (DPAPI needs the account credential) and try again. " + "Private keys are only ever stored through DPAPI (a per-user encrypted blob).");
@@ -111453,6 +111979,7 @@ class ApiRefusal extends SignInError {
111453
111979
  "account_deleted",
111454
111980
  "reauth_required",
111455
111981
  "invalid_grant",
111982
+ "device_revoked",
111456
111983
  "entitlement_required",
111457
111984
  "authorization_pending",
111458
111985
  "slow_down",
@@ -111692,7 +112219,10 @@ var probeSecretServiceLock = () => new Promise((resolve) => {
111692
112219
  });
111693
112220
 
111694
112221
  // packages/omo-opencode/src/cli/service-auth/keystore.ts
111695
- class KeychainLockedError extends SignInError {
112222
+ class CredentialStoreError extends SignInError {
112223
+ }
112224
+
112225
+ class KeychainLockedError extends CredentialStoreError {
111696
112226
  }
111697
112227
  var LOCKED = /-25308|errSecInteractionNotAllowed|interaction is not allowed|locked collection/i;
111698
112228
  var UNLOCKED_REUSE_MS = 30000;
@@ -111715,7 +112245,7 @@ function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null
111715
112245
  if (platformName === null)
111716
112246
  throw new SignInError("This platform has no supported OS credential store.");
111717
112247
  const key = { service: "omo-cli", name: credentialId(api) };
111718
- const unavailable = (error) => isLocked(error) ? new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`) : new SignInError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
112248
+ const unavailable = (error) => isLocked(error) ? new KeychainLockedError(`${platformName} is locked. Unlock it, then try again. Credentials are never saved to a file.`) : new CredentialStoreError(`Cannot access ${platformName}. Unlock or enable the OS credential store and try again. Credentials are never saved to a file.`);
111719
112249
  let unlockedUntil = 0;
111720
112250
  let noticed = false;
111721
112251
  const assertUsable = async () => {
@@ -111870,12 +112400,12 @@ async function loginLoopback(session, options) {
111870
112400
 
111871
112401
  // packages/omo-opencode/src/cli/service-auth/session.ts
111872
112402
  import { mkdir as mkdir10 } from "node:fs/promises";
111873
- import { homedir as homedir28 } from "node:os";
111874
- import { join as join98 } from "node:path";
112403
+ import { homedir as homedir31 } from "node:os";
112404
+ import { join as join103 } from "node:path";
111875
112405
 
111876
112406
  // packages/team-core/src/team-state-store/lock-publish.ts
111877
112407
  import { access as access3, open as open2, unlink as unlink2 } from "node:fs/promises";
111878
- import { dirname as dirname38 } from "node:path";
112408
+ import { dirname as dirname41 } from "node:path";
111879
112409
 
111880
112410
  // packages/team-core/src/team-state-store/lock-record.ts
111881
112411
  import { randomUUID as randomUUID5 } from "node:crypto";
@@ -111975,7 +112505,7 @@ async function assertRetryableLockOpenError(lockPath, error, deps) {
111975
112505
  if (code === "EPERM") {
111976
112506
  if (await pathMayExist(lockPath, deps))
111977
112507
  return;
111978
- if ((deps?.platform ?? process.platform) === "win32" && await pathMayExist(dirname38(lockPath), deps))
112508
+ if ((deps?.platform ?? process.platform) === "win32" && await pathMayExist(dirname41(lockPath), deps))
111979
112509
  return;
111980
112510
  }
111981
112511
  throw error;
@@ -112114,12 +112644,12 @@ class SessionEnded extends SignInError {
112114
112644
  this.code = code;
112115
112645
  }
112116
112646
  }
112117
- var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required"]);
112647
+ var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required", "device_revoked"]);
112118
112648
  function createSession(options) {
112119
112649
  const api = serviceOrigin(options.api);
112120
112650
  const { store, signal } = options;
112121
- const directory = join98(options.home ?? homedir28(), ".omo", "session-locks");
112122
- const lockPath = join98(directory, `${credentialId(api)}.lock`);
112651
+ const directory = join103(options.home ?? homedir31(), ".omo", "session-locks");
112652
+ const lockPath = join103(directory, `${credentialId(api)}.lock`);
112123
112653
  async function locked(action) {
112124
112654
  await mkdir10(directory, { recursive: true, mode: 448 });
112125
112655
  signal?.throwIfAborted();
@@ -112141,7 +112671,9 @@ function createSession(options) {
112141
112671
  await store.write({ ...current, ...tokens });
112142
112672
  return tokens.accessToken;
112143
112673
  } catch (error) {
112144
- if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant"].includes(error.code)) {
112674
+ if (error instanceof CredentialStoreError)
112675
+ throw error;
112676
+ if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant", "device_revoked"].includes(error.code)) {
112145
112677
  await store.clear();
112146
112678
  throw new SessionEnded(error.code === "reauth_required" ? "This session was ended because its refresh token was reused. Sign in again with omo login." : "Sign in again with omo login.", DEVICE_REVOKING_REFUSALS.has(error.code), error.code);
112147
112679
  }
@@ -112370,7 +112902,7 @@ function resolveInstallArgs(options, invocationName = process.env.OMO_INVOCATION
112370
112902
  init_commander();
112371
112903
 
112372
112904
  // packages/omo-opencode/src/cli/boulder/boulder.ts
112373
- import { existsSync as existsSync64 } from "node:fs";
112905
+ import { existsSync as existsSync66 } from "node:fs";
112374
112906
 
112375
112907
  // packages/omo-opencode/src/cli/boulder/formatter.ts
112376
112908
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -112507,10 +113039,10 @@ async function boulder(options) {
112507
113039
  const boulderFilePath = getBoulderFilePath(directory);
112508
113040
  const state = readBoulderState(directory);
112509
113041
  if (!state) {
112510
- const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
113042
+ const message = existsSync66(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112511
113043
  process.stderr.write(`${message}
112512
113044
  `);
112513
- return existsSync64(boulderFilePath) ? 2 : 1;
113045
+ return existsSync66(boulderFilePath) ? 2 : 1;
112514
113046
  }
112515
113047
  const works = getBoulderWorks(state);
112516
113048
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -112528,12 +113060,12 @@ async function boulder(options) {
112528
113060
  }
112529
113061
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
112530
113062
  import { spawn as spawn6 } from "node:child_process";
112531
- import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync11 } from "node:fs";
112532
- import { homedir as homedir29 } from "node:os";
113063
+ import { existsSync as existsSync67, readFileSync as readFileSync43, realpathSync as realpathSync13 } from "node:fs";
113064
+ import { homedir as homedir32 } from "node:os";
112533
113065
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
112534
113066
  function resolveCodexUlwLoopCommand(input = {}) {
112535
113067
  const env = input.env ?? process.env;
112536
- const homeDir = input.homeDir ?? homedir29();
113068
+ const homeDir = input.homeDir ?? homedir32();
112537
113069
  const localComponentBin = resolveLocalUlwLoopBin(env, homeDir);
112538
113070
  if (localComponentBin !== null)
112539
113071
  return { executable: localComponentBin, argsPrefix: [] };
@@ -112570,11 +113102,11 @@ async function codexUlwLoop(args) {
112570
113102
  }
112571
113103
  function resolveLocalUlwLoopBin(env, homeDir) {
112572
113104
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env, homeDir });
112573
- return candidates.find((candidate) => existsSync65(candidate)) ?? null;
113105
+ return candidates.find((candidate) => existsSync67(candidate)) ?? null;
112574
113106
  }
112575
113107
  function resolveLegacyLocalOmoBin(env, homeDir, currentExecutablePaths) {
112576
113108
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env, homeDir });
112577
- return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
113109
+ return candidates.find((candidate) => existsSync67(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
112578
113110
  }
112579
113111
  function isGeneratedRuntimeWrapper(candidate) {
112580
113112
  try {
@@ -112591,7 +113123,7 @@ function isCurrentExecutable(candidate, currentExecutablePaths) {
112591
113123
  }
112592
113124
  function realpathOrSelf2(path) {
112593
113125
  try {
112594
- return realpathSync11(path);
113126
+ return realpathSync13(path);
112595
113127
  } catch (error) {
112596
113128
  if (error instanceof Error)
112597
113129
  return path;
@@ -112775,7 +113307,7 @@ function linkedWorktrees(records) {
112775
113307
  return records.slice(1);
112776
113308
  }
112777
113309
  // packages/omo-opencode/src/cli/worktree-sweep/sweep.ts
112778
- import { existsSync as existsSync66 } from "node:fs";
113310
+ import { existsSync as existsSync68 } from "node:fs";
112779
113311
  import { stat as stat9 } from "node:fs/promises";
112780
113312
  import os7 from "node:os";
112781
113313
  import { normalize as normalize2 } from "node:path";
@@ -112866,7 +113398,7 @@ async function isOlderThan(worktreePath, days, now) {
112866
113398
  }
112867
113399
  }
112868
113400
  async function classifyRecord(repo, record, defaultBranch, options) {
112869
- const pathExists = existsSync66(record.path);
113401
+ const pathExists = existsSync68(record.path);
112870
113402
  const external = isExcludedPath(record.path, options.excludePrefixes, options.home);
112871
113403
  const current = options.currentWorktree !== undefined && record.path === options.currentWorktree;
112872
113404
  if (record.locked || !pathExists || external || current) {
@@ -112895,7 +113427,7 @@ async function sweepRepo(repo, options) {
112895
113427
  const records = linkedWorktrees(allRecords);
112896
113428
  const startedInLinked = records.some((record) => record.path === toplevel);
112897
113429
  const mainWorktree = allRecords[0]?.path;
112898
- const root = startedInLinked && mainWorktree !== undefined && existsSync66(mainWorktree) ? mainWorktree : toplevel;
113430
+ const root = startedInLinked && mainWorktree !== undefined && existsSync68(mainWorktree) ? mainWorktree : toplevel;
112899
113431
  const currentWorktree = startedInLinked ? toplevel : undefined;
112900
113432
  const classifications = [];
112901
113433
  for (const record of records) {
@@ -113024,7 +113556,7 @@ prunes.
113024
113556
 
113025
113557
  // packages/omo-opencode/src/cli/config-migrate.ts
113026
113558
  init_startup_migration();
113027
- import { posix as posix12 } from "node:path";
113559
+ import { posix as posix13 } from "node:path";
113028
113560
  function reports(result) {
113029
113561
  return result.results.map((entry) => ({
113030
113562
  diagnostics: entry.diagnostics,
@@ -113058,7 +113590,7 @@ function runConfigMigrate(options = {}) {
113058
113590
  dryRun: options.dryRun ?? false,
113059
113591
  environment,
113060
113592
  ...homeDir === undefined ? {} : { env: { HOME: homeDir }, homeDir },
113061
- pathOperations: posix12
113593
+ pathOperations: posix13
113062
113594
  });
113063
113595
  const report = reports(result);
113064
113596
  const response = {