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
package/dist/cli/index.js CHANGED
@@ -2132,7 +2132,7 @@ var package_default;
2132
2132
  var init_package = __esm(() => {
2133
2133
  package_default = {
2134
2134
  name: "oh-my-opencode",
2135
- version: "5.1.43",
2135
+ version: "5.1.45",
2136
2136
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2137
2137
  main: "./dist/index.js",
2138
2138
  types: "dist/index.d.ts",
@@ -2252,6 +2252,8 @@ var init_package = __esm(() => {
2252
2252
  "build:senpi-plugin": "bun run build:lsp-daemon && bun run build:ast-grep-mcp && bun run build:senpi-plugin:stage",
2253
2253
  "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",
2254
2254
  "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",
2255
+ "bundle-inputs": "node packages/omo-senpi/plugin/scripts/bundle-inputs.mjs",
2256
+ "bundle-inputs:check": "node packages/omo-senpi/plugin/scripts/bundle-inputs.mjs --check",
2255
2257
  "build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
2256
2258
  "build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
2257
2259
  "build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
@@ -2270,7 +2272,8 @@ var init_package = __esm(() => {
2270
2272
  postinstall: "node postinstall.mjs",
2271
2273
  prepublishOnly: "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
2272
2274
  "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",
2273
- typecheck: "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
2275
+ "check:copy": "bun script/check-copy.ts",
2276
+ typecheck: "bun run check:copy && tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
2274
2277
  "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",
2275
2278
  "typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
2276
2279
  test: "bun test --timeout 20000",
@@ -2281,7 +2284,10 @@ var init_package = __esm(() => {
2281
2284
  "test:windows-codex": "bun run test:codex",
2282
2285
  "build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
2283
2286
  "build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build",
2284
- "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"
2287
+ "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
+ "lint:ratchet": "bun script/lint-ratchet.ts",
2289
+ "lint:ratchet:update": "bun script/lint-ratchet.ts --update",
2290
+ 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"
2285
2291
  },
2286
2292
  keywords: [
2287
2293
  "opencode",
@@ -2309,7 +2315,7 @@ var init_package = __esm(() => {
2309
2315
  },
2310
2316
  devDependencies: {
2311
2317
  "@clack/prompts": "^1.8.1",
2312
- "@code-yeongyu/senpi": "2026.10.21-2",
2318
+ "@code-yeongyu/senpi": "2026.10.23-1",
2313
2319
  "@modelcontextprotocol/sdk": "^1.30.0",
2314
2320
  "@oh-my-opencode/agents-md-core": "workspace:*",
2315
2321
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
@@ -2363,6 +2369,8 @@ var init_package = __esm(() => {
2363
2369
  "jsonc-parser": "^3.3.1",
2364
2370
  "node-pty": "^1.1.0",
2365
2371
  omowright: "github:code-yeongyu/omowright#f87ef4d63fe7b56fe117dbab246c8ad88dd8a780",
2372
+ "oxc-parser": "0.148.0",
2373
+ oxlint: "1.89.0",
2366
2374
  picocolors: "^1.1.1",
2367
2375
  picomatch: "^4.0.7",
2368
2376
  "posthog-node": "^5.52.4",
@@ -2370,18 +2378,18 @@ var init_package = __esm(() => {
2370
2378
  typescript: "^7.0.2"
2371
2379
  },
2372
2380
  optionalDependencies: {
2373
- "oh-my-opencode-darwin-arm64": "5.1.43",
2374
- "oh-my-opencode-darwin-x64": "5.1.43",
2375
- "oh-my-opencode-darwin-x64-baseline": "5.1.43",
2376
- "oh-my-opencode-linux-arm64": "5.1.43",
2377
- "oh-my-opencode-linux-arm64-musl": "5.1.43",
2378
- "oh-my-opencode-linux-x64": "5.1.43",
2379
- "oh-my-opencode-linux-x64-baseline": "5.1.43",
2380
- "oh-my-opencode-linux-x64-musl": "5.1.43",
2381
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.43",
2382
- "oh-my-opencode-windows-arm64": "5.1.43",
2383
- "oh-my-opencode-windows-x64": "5.1.43",
2384
- "oh-my-opencode-windows-x64-baseline": "5.1.43"
2381
+ "oh-my-opencode-darwin-arm64": "5.1.45",
2382
+ "oh-my-opencode-darwin-x64": "5.1.45",
2383
+ "oh-my-opencode-darwin-x64-baseline": "5.1.45",
2384
+ "oh-my-opencode-linux-arm64": "5.1.45",
2385
+ "oh-my-opencode-linux-arm64-musl": "5.1.45",
2386
+ "oh-my-opencode-linux-x64": "5.1.45",
2387
+ "oh-my-opencode-linux-x64-baseline": "5.1.45",
2388
+ "oh-my-opencode-linux-x64-musl": "5.1.45",
2389
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.45",
2390
+ "oh-my-opencode-windows-arm64": "5.1.45",
2391
+ "oh-my-opencode-windows-x64": "5.1.45",
2392
+ "oh-my-opencode-windows-x64-baseline": "5.1.45"
2385
2393
  },
2386
2394
  overrides: {
2387
2395
  hono: "^4.13.8",
@@ -7543,6 +7551,20 @@ var init_logger = __esm(() => {
7543
7551
  DEFAULT_MAX_LOG_FILE_SIZE_BYTES = 50 * 1024 * 1024;
7544
7552
  });
7545
7553
 
7554
+ // packages/utils/src/logging/product-identity.ts
7555
+ function createProductIdentity(input) {
7556
+ return {
7557
+ pluginName: input.pluginName,
7558
+ legacyPluginName: input.legacyPluginName,
7559
+ publishedPackageName: input.publishedPackageName,
7560
+ acceptedPackageNames: input.acceptedPackageNames ?? [input.publishedPackageName, input.pluginName],
7561
+ configBasename: input.configBasename,
7562
+ legacyConfigBasename: input.legacyConfigBasename,
7563
+ logFileName: input.logFileName,
7564
+ cacheDirName: input.cacheDirName
7565
+ };
7566
+ }
7567
+
7546
7568
  // packages/utils/src/logging/index.ts
7547
7569
  var init_logging = __esm(() => {
7548
7570
  init_logger();
@@ -7963,8 +7985,17 @@ function classifyPathEnvironment(absolutePath) {
7963
7985
  }
7964
7986
  var init_classify_path_environment = () => {};
7965
7987
 
7988
+ // packages/utils/src/command-executor/home-directory.ts
7989
+ import { homedir as homedir3 } from "os";
7990
+ function getHomeDirectory() {
7991
+ return process.env.HOME || process.env.USERPROFILE || homedir3();
7992
+ }
7993
+ var init_home_directory = () => {};
7994
+
7966
7995
  // packages/utils/src/command-executor.ts
7967
- var init_command_executor = () => {};
7996
+ var init_command_executor = __esm(() => {
7997
+ init_home_directory();
7998
+ });
7968
7999
 
7969
8000
  // packages/utils/src/git-worktree/index.ts
7970
8001
  var init_git_worktree = () => {};
@@ -8007,6 +8038,25 @@ var init_internal_initiator_marker = __esm(() => {
8007
8038
  INTERNAL_NOREPLY_MARKER_DETECT_PATTERN = /<!--\s*OMO_INTERNAL_NOREPLY\s*-->/;
8008
8039
  });
8009
8040
 
8041
+ // packages/model-core/src/latest-models.ts
8042
+ var LATEST_MODEL_BY_FAMILY;
8043
+ var init_latest_models = __esm(() => {
8044
+ LATEST_MODEL_BY_FAMILY = {
8045
+ claudeOpus: "claude-opus-5-5",
8046
+ claudeSonnet: "claude-sonnet-5-5",
8047
+ claudeHaiku: "claude-haiku-5-5",
8048
+ claudeFable: "claude-fable-5-1",
8049
+ gptAstra: "gpt-6-astra",
8050
+ gptSol: "gpt-6.1-sol",
8051
+ gptSolFast: "gpt-6.1-sol-fast",
8052
+ gptLunaFast: "gpt-6-luna-fast",
8053
+ glm: "glm-5.3",
8054
+ glmFlash: "glm-5.3-flash",
8055
+ kimi: "kimi-k3",
8056
+ geminiPro: "gemini-4-argon"
8057
+ };
8058
+ });
8059
+
8010
8060
  // packages/utils/src/migration/agent-category.ts
8011
8061
  function configureMigrationCategoryDefaults(defaults) {
8012
8062
  categoryDefaults = defaults ?? {};
@@ -9263,17 +9313,18 @@ var init_file_reference_resolver = __esm(() => {
9263
9313
  // packages/model-core/src/agent-model-requirements.ts
9264
9314
  var AGENT_MODEL_REQUIREMENTS;
9265
9315
  var init_agent_model_requirements = __esm(() => {
9316
+ init_latest_models();
9266
9317
  AGENT_MODEL_REQUIREMENTS = {
9267
9318
  sisyphus: {
9268
9319
  fallbackChain: [
9269
9320
  {
9270
9321
  providers: ["anthropic", "github-copilot", "opencode"],
9271
- model: "claude-opus-5-5",
9322
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9272
9323
  variant: "max"
9273
9324
  },
9274
9325
  {
9275
9326
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode", "bailian-coding-plan", "moonshotai-cn", "firmware", "ollama-cloud", "aihubmix"],
9276
- model: "kimi-k3"
9327
+ model: LATEST_MODEL_BY_FAMILY.kimi
9277
9328
  },
9278
9329
  {
9279
9330
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
@@ -9307,7 +9358,7 @@ var init_agent_model_requirements = __esm(() => {
9307
9358
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "high" },
9308
9359
  {
9309
9360
  providers: ["google", "google-vertex", "opencode"],
9310
- model: "gemini-4-argon",
9361
+ model: LATEST_MODEL_BY_FAMILY.geminiPro,
9311
9362
  variant: "high"
9312
9363
  },
9313
9364
  {
@@ -9317,7 +9368,7 @@ var init_agent_model_requirements = __esm(() => {
9317
9368
  },
9318
9369
  {
9319
9370
  providers: ["anthropic", "github-copilot", "opencode"],
9320
- model: "claude-opus-5-5",
9371
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9321
9372
  variant: "max"
9322
9373
  },
9323
9374
  { providers: ["opencode-go"], model: "glm-5.2" }
@@ -9326,8 +9377,8 @@ var init_agent_model_requirements = __esm(() => {
9326
9377
  librarian: {
9327
9378
  fallbackChain: [
9328
9379
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
9329
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9330
- { providers: ["anthropic", "github-copilot"], model: "claude-haiku-5-5", variant: "medium" },
9380
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9381
+ { providers: ["anthropic", "github-copilot"], model: LATEST_MODEL_BY_FAMILY.claudeHaiku, variant: "medium" },
9331
9382
  { providers: ["deepseek"], model: "deepseek-flash", variant: "max" },
9332
9383
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
9333
9384
  { providers: ["opencode-go"], model: "minimax-m2.7" }
@@ -9336,8 +9387,8 @@ var init_agent_model_requirements = __esm(() => {
9336
9387
  explore: {
9337
9388
  fallbackChain: [
9338
9389
  { providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed", variant: "off" },
9339
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9340
- { providers: ["anthropic", "github-copilot"], model: "claude-haiku-5-5", variant: "medium" },
9390
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9391
+ { providers: ["anthropic", "github-copilot"], model: LATEST_MODEL_BY_FAMILY.claudeHaiku, variant: "medium" },
9341
9392
  { providers: ["deepseek"], model: "deepseek-flash", variant: "max" },
9342
9393
  { providers: ["opencode-go", "bailian-coding-plan"], model: "qwen3.7-plus" },
9343
9394
  { providers: ["opencode-go"], model: "minimax-m2.7" }
@@ -9346,7 +9397,7 @@ var init_agent_model_requirements = __esm(() => {
9346
9397
  "multimodal-looker": {
9347
9398
  fallbackChain: [
9348
9399
  { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "low" },
9349
- { providers: ["opencode-go"], model: "kimi-k3" },
9400
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9350
9401
  { providers: ["zai-coding-plan"], model: "glm-4.6v" },
9351
9402
  { providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"], model: "gpt-5-nano" }
9352
9403
  ]
@@ -9355,17 +9406,17 @@ var init_agent_model_requirements = __esm(() => {
9355
9406
  fallbackChain: [
9356
9407
  {
9357
9408
  providers: ["anthropic", "github-copilot", "opencode"],
9358
- model: "claude-fable-5-1",
9409
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9359
9410
  variant: "xhigh"
9360
9411
  },
9361
9412
  {
9362
9413
  providers: ["anthropic", "github-copilot", "opencode"],
9363
- model: "claude-opus-5-5",
9414
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9364
9415
  variant: "max"
9365
9416
  },
9366
9417
  {
9367
9418
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
9368
- model: "kimi-k3",
9419
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9369
9420
  variant: "max"
9370
9421
  }
9371
9422
  ]
@@ -9374,34 +9425,34 @@ var init_agent_model_requirements = __esm(() => {
9374
9425
  fallbackChain: [
9375
9426
  {
9376
9427
  providers: ["anthropic", "github-copilot", "opencode"],
9377
- model: "claude-fable-5-1",
9428
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9378
9429
  variant: "max"
9379
9430
  },
9380
9431
  {
9381
9432
  providers: ["anthropic", "github-copilot", "opencode"],
9382
- model: "claude-opus-5-5",
9433
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9383
9434
  variant: "max"
9384
9435
  },
9385
9436
  {
9386
9437
  providers: ["opencode-go", "kimi-for-coding", "moonshotai", "opencode"],
9387
- model: "kimi-k3",
9438
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9388
9439
  variant: "max"
9389
9440
  }
9390
9441
  ]
9391
9442
  },
9392
9443
  momus: {
9393
9444
  fallbackChain: [
9394
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "xhigh" },
9395
- { providers: ["github-copilot"], model: "gpt-6-astra", variant: "high" },
9396
- { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "high" },
9445
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "xhigh" },
9446
+ { providers: ["github-copilot"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "high" },
9447
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "high" },
9397
9448
  {
9398
9449
  providers: ["anthropic", "github-copilot", "opencode"],
9399
- model: "claude-opus-5-5",
9450
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9400
9451
  variant: "max"
9401
9452
  },
9402
9453
  {
9403
9454
  providers: ["google", "google-vertex", "opencode"],
9404
- model: "gemini-4-argon",
9455
+ model: LATEST_MODEL_BY_FAMILY.geminiPro,
9405
9456
  variant: "high"
9406
9457
  },
9407
9458
  {
@@ -9415,7 +9466,7 @@ var init_agent_model_requirements = __esm(() => {
9415
9466
  atlas: {
9416
9467
  fallbackChain: [
9417
9468
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
9418
- { providers: ["opencode-go"], model: "kimi-k3" },
9469
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9419
9470
  {
9420
9471
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9421
9472
  model: "gpt-5.6-sol",
@@ -9429,7 +9480,7 @@ var init_agent_model_requirements = __esm(() => {
9429
9480
  "sisyphus-junior": {
9430
9481
  fallbackChain: [
9431
9482
  { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-5" },
9432
- { providers: ["opencode-go"], model: "kimi-k3" },
9483
+ { providers: ["opencode-go"], model: LATEST_MODEL_BY_FAMILY.kimi },
9433
9484
  {
9434
9485
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9435
9486
  model: "gpt-5.6-sol",
@@ -9447,32 +9498,33 @@ var init_agent_model_requirements = __esm(() => {
9447
9498
  // packages/model-core/src/category-model-requirements.ts
9448
9499
  var CATEGORY_MODEL_REQUIREMENTS;
9449
9500
  var init_category_model_requirements = __esm(() => {
9501
+ init_latest_models();
9450
9502
  CATEGORY_MODEL_REQUIREMENTS = {
9451
9503
  "visual-engineering": {
9452
9504
  fallbackChain: [
9453
- { providers: ["google", "google-vertex", "opencode"], model: "gemini-4-argon", variant: "low" },
9505
+ { providers: ["google", "google-vertex", "opencode"], model: LATEST_MODEL_BY_FAMILY.geminiPro, variant: "low" },
9454
9506
  {
9455
9507
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9456
- model: "claude-fable-5-1",
9508
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9457
9509
  variant: "max"
9458
9510
  },
9459
9511
  {
9460
9512
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9461
- model: "claude-opus-5-5",
9513
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9462
9514
  variant: "max"
9463
9515
  },
9464
9516
  {
9465
9517
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9466
- model: "kimi-k3",
9518
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9467
9519
  variant: "max"
9468
9520
  }
9469
9521
  ]
9470
9522
  },
9471
9523
  ultrabrain: {
9472
9524
  fallbackChain: [
9473
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-astra", variant: "max" },
9474
- { providers: ["github-copilot"], model: "gpt-6-astra", variant: "max" },
9475
- { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-6-astra", variant: "max" },
9525
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9526
+ { providers: ["github-copilot"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9527
+ { providers: ["openai", "chatgpt-subscription", "opencode"], model: LATEST_MODEL_BY_FAMILY.gptAstra, variant: "max" },
9476
9528
  { providers: ["openai", "chatgpt-subscription"], model: "gpt-5.6-sol", variant: "max" },
9477
9529
  { providers: ["github-copilot"], model: "gpt-5.6-sol", variant: "max" },
9478
9530
  { providers: ["openai", "chatgpt-subscription", "opencode"], model: "gpt-5.6-sol", variant: "max" }
@@ -9480,8 +9532,8 @@ var init_category_model_requirements = __esm(() => {
9480
9532
  },
9481
9533
  "deep-low": {
9482
9534
  fallbackChain: [
9483
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol", variant: "medium" },
9484
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol-fast", variant: "medium" },
9535
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSol, variant: "medium" },
9536
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSolFast, variant: "medium" },
9485
9537
  {
9486
9538
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9487
9539
  model: "gpt-5.6-sol",
@@ -9494,7 +9546,7 @@ var init_category_model_requirements = __esm(() => {
9494
9546
  fallbackChain: [
9495
9547
  {
9496
9548
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9497
- model: "gpt-6-astra",
9549
+ model: LATEST_MODEL_BY_FAMILY.gptAstra,
9498
9550
  variant: "high"
9499
9551
  }
9500
9552
  ]
@@ -9503,27 +9555,27 @@ var init_category_model_requirements = __esm(() => {
9503
9555
  fallbackChain: [
9504
9556
  {
9505
9557
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9506
- model: "claude-fable-5-1",
9558
+ model: LATEST_MODEL_BY_FAMILY.claudeFable,
9507
9559
  variant: "max"
9508
9560
  },
9509
9561
  {
9510
9562
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9511
- model: "claude-opus-5-5",
9563
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9512
9564
  variant: "max"
9513
9565
  },
9514
9566
  {
9515
9567
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9516
- model: "kimi-k3",
9568
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9517
9569
  variant: "max"
9518
9570
  }
9519
9571
  ]
9520
9572
  },
9521
9573
  quick: {
9522
9574
  fallbackChain: [
9523
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6-luna-fast", variant: "low" },
9575
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptLunaFast, variant: "low" },
9524
9576
  {
9525
9577
  providers: ["anthropic", "anthropic-api", "github-copilot"],
9526
- model: "claude-haiku-5-5",
9578
+ model: LATEST_MODEL_BY_FAMILY.claudeHaiku,
9527
9579
  variant: "medium"
9528
9580
  },
9529
9581
  { providers: ["deepseek"], model: "deepseek-flash", variant: "off" },
@@ -9535,7 +9587,7 @@ var init_category_model_requirements = __esm(() => {
9535
9587
  { providers: ["opencode-go"], model: "minimax-m3", variant: "max" },
9536
9588
  { providers: ["opencode-go"], model: "minimax-m2.7", variant: "max" },
9537
9589
  { providers: ["xai"], model: "grok-4.20-0309-non-reasoning" },
9538
- { providers: ["zai-coding-plan"], model: "glm-5.3-flash", variant: "low" },
9590
+ { providers: ["zai-coding-plan"], model: LATEST_MODEL_BY_FAMILY.glmFlash, variant: "low" },
9539
9591
  { providers: ["xiaomi"], model: "mimo-v2.6-flash", variant: "low" }
9540
9592
  ]
9541
9593
  },
@@ -9543,13 +9595,13 @@ var init_category_model_requirements = __esm(() => {
9543
9595
  fallbackChain: [
9544
9596
  {
9545
9597
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9546
- model: "claude-sonnet-5-5",
9598
+ model: LATEST_MODEL_BY_FAMILY.claudeSonnet,
9547
9599
  variant: "medium"
9548
9600
  },
9549
9601
  { providers: ["xiaomi", "opencode-go"], model: "mimo-v2.6-pro", variant: "max" },
9550
9602
  { providers: ["xai", "github-copilot", "opencode-go"], model: "grok-4.7", variant: "xhigh" },
9551
- { providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "high" },
9552
- { providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol", variant: "medium" },
9603
+ { providers: ["zai-coding-plan", "opencode-go"], model: LATEST_MODEL_BY_FAMILY.glm, variant: "high" },
9604
+ { providers: ["openai", "chatgpt-subscription"], model: LATEST_MODEL_BY_FAMILY.gptSol, variant: "medium" },
9553
9605
  {
9554
9606
  providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
9555
9607
  model: "gpt-5.6-sol",
@@ -9573,13 +9625,13 @@ var init_category_model_requirements = __esm(() => {
9573
9625
  fallbackChain: [
9574
9626
  {
9575
9627
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9576
- model: "claude-opus-5-5",
9628
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9577
9629
  variant: "medium"
9578
9630
  },
9579
- { providers: ["zai-coding-plan", "opencode-go"], model: "glm-5.3", variant: "max" },
9631
+ { providers: ["zai-coding-plan", "opencode-go"], model: LATEST_MODEL_BY_FAMILY.glm, variant: "max" },
9580
9632
  {
9581
9633
  providers: ["kimi-for-coding", "moonshotai", "opencode-go", "opencode"],
9582
- model: "kimi-k3",
9634
+ model: LATEST_MODEL_BY_FAMILY.kimi,
9583
9635
  variant: "max"
9584
9636
  }
9585
9637
  ]
@@ -9587,10 +9639,10 @@ var init_category_model_requirements = __esm(() => {
9587
9639
  writing: {
9588
9640
  requiresAnyModel: true,
9589
9641
  fallbackChain: [
9590
- { providers: ["google", "google-vertex", "opencode"], model: "gemini-4-argon", variant: "low" },
9642
+ { providers: ["google", "google-vertex", "opencode"], model: LATEST_MODEL_BY_FAMILY.geminiPro, variant: "low" },
9591
9643
  {
9592
9644
  providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
9593
- model: "claude-opus-5-5",
9645
+ model: LATEST_MODEL_BY_FAMILY.claudeOpus,
9594
9646
  variant: "low"
9595
9647
  },
9596
9648
  {
@@ -11082,6 +11134,7 @@ var init_src2 = __esm(() => {
11082
11134
  init_model_resolver();
11083
11135
  init_provider_model_id_transform();
11084
11136
  init_model_requirements();
11137
+ init_latest_models();
11085
11138
  init_model_family_detectors();
11086
11139
  init_model_capability_aliases();
11087
11140
  init_model_capability_heuristics();
@@ -11403,16 +11456,17 @@ Approach:
11403
11456
  - This is for tasks requiring exceptional creativity
11404
11457
  </Category_Context>`, GOOGLE_CATEGORIES;
11405
11458
  var init_google_categories = __esm(() => {
11459
+ init_latest_models();
11406
11460
  GOOGLE_CATEGORIES = [
11407
11461
  {
11408
11462
  name: "visual-engineering",
11409
- config: { model: "google/gemini-4-argon", variant: "low" },
11463
+ config: { model: `google/${LATEST_MODEL_BY_FAMILY.geminiPro}`, variant: "low" },
11410
11464
  description: "Visual design, UI/UX, frontend, styling, animation, and design systems",
11411
11465
  promptAppend: VISUAL_CATEGORY_PROMPT_APPEND
11412
11466
  },
11413
11467
  {
11414
11468
  name: "artistry",
11415
- config: { model: "anthropic/claude-fable-5-1", variant: "max" },
11469
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeFable}`, variant: "max" },
11416
11470
  description: "Complex problem-solving with unconventional, creative approaches - beyond standard patterns",
11417
11471
  promptAppend: ARTISTRY_CATEGORY_PROMPT_APPEND
11418
11472
  }
@@ -11446,10 +11500,11 @@ ANTI-AI-SLOP RULES (NON-NEGOTIABLE):
11446
11500
  - Write like a human, not a corporate template.
11447
11501
  </Category_Context>`, KIMI_CATEGORIES;
11448
11502
  var init_kimi_categories = __esm(() => {
11503
+ init_latest_models();
11449
11504
  KIMI_CATEGORIES = [
11450
11505
  {
11451
11506
  name: "writing",
11452
- config: { model: "google/gemini-4-argon", variant: "low" },
11507
+ config: { model: `google/${LATEST_MODEL_BY_FAMILY.geminiPro}`, variant: "low" },
11453
11508
  description: "Documentation, prose, technical writing",
11454
11509
  promptAppend: WRITING_CATEGORY_PROMPT_APPEND
11455
11510
  }
@@ -11584,21 +11639,23 @@ You are working on tasks that don't fit specific categories but require moderate
11584
11639
  </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>
11585
11640
  <Caller_Warning>Provide explicit must-do steps, forbidden scope, and concrete success criteria.</Caller_Warning>`, UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
11586
11641
  You are working on tasks that don't fit specific categories but require substantial effort.
11587
- </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;
11642
+ </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;
11588
11643
  var init_openai_categories = __esm(() => {
11589
11644
  init_types();
11590
- DEEP_LOW_GATE_MODELS = ["gpt-6.1-sol", "gpt-6.1-sol-fast", "gpt-5.6-sol-fast", "gpt-5.6-sol"];
11645
+ init_latest_models();
11646
+ DEEP_LOW_GATE_MODELS = [LATEST_MODEL_BY_FAMILY.gptSol, LATEST_MODEL_BY_FAMILY.gptSolFast, "gpt-5.6-sol-fast", "gpt-5.6-sol"];
11647
+ DEEP_HIGH_GATE_MODEL = LATEST_MODEL_BY_FAMILY.gptAstra;
11591
11648
  OPENAI_CATEGORIES = [
11592
11649
  {
11593
11650
  name: "ultrabrain",
11594
- config: { model: "openai/gpt-6-astra", variant: "max" },
11651
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptAstra}`, variant: "max" },
11595
11652
  description: "Use ONLY for genuinely hard, logic-heavy tasks. Give clear goals only, not step-by-step instructions.",
11596
11653
  promptAppend: ULTRABRAIN_CATEGORY_PROMPT_APPEND,
11597
11654
  resolvePromptAppend: resolveUltrabrainCategoryPromptAppend
11598
11655
  },
11599
11656
  {
11600
11657
  name: "deep-low",
11601
- config: { model: "openai/gpt-6.1-sol", variant: "medium" },
11658
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptSol}`, variant: "medium" },
11602
11659
  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.",
11603
11660
  callerGuidance: DEEP_LOW_CATEGORY_CALLER_GUIDANCE,
11604
11661
  promptAppend: DEEP_LOW_CATEGORY_PROMPT_APPEND,
@@ -11607,7 +11664,7 @@ var init_openai_categories = __esm(() => {
11607
11664
  },
11608
11665
  {
11609
11666
  name: "deep-high",
11610
- config: { model: "openai/gpt-6-astra", variant: "high" },
11667
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptAstra}`, variant: "high" },
11611
11668
  description: "Escalation deep lane: a goal whose central decision cannot be settled from evidence alone. Same one-goal, one-deliverable contract as deep-low.",
11612
11669
  callerGuidance: DEEP_HIGH_CATEGORY_CALLER_GUIDANCE,
11613
11670
  promptAppend: DEEP_HIGH_CATEGORY_PROMPT_APPEND,
@@ -11616,21 +11673,21 @@ var init_openai_categories = __esm(() => {
11616
11673
  },
11617
11674
  {
11618
11675
  name: "quick",
11619
- config: { model: "openai/gpt-6-luna-fast", variant: "low" },
11676
+ config: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" },
11620
11677
  description: "Trivial tasks - single file changes, typo fixes, simple modifications",
11621
11678
  callerGuidance: QUICK_CATEGORY_CALLER_GUIDANCE,
11622
11679
  promptAppend: QUICK_CATEGORY_PROMPT_APPEND
11623
11680
  },
11624
11681
  {
11625
11682
  name: "unspecified-low",
11626
- config: { model: "anthropic/claude-sonnet-5-5", variant: "medium" },
11683
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeSonnet}`, variant: "medium" },
11627
11684
  description: "Tasks that don't fit other categories, low effort required",
11628
11685
  callerGuidance: UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE,
11629
11686
  promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
11630
11687
  },
11631
11688
  {
11632
11689
  name: "unspecified-high",
11633
- config: { model: "anthropic/claude-opus-5-5", variant: "medium" },
11690
+ config: { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeOpus}`, variant: "medium" },
11634
11691
  description: "Tasks that don't fit other categories, high effort required",
11635
11692
  callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
11636
11693
  promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND,
@@ -11679,7 +11736,7 @@ var init_migration2 = __esm(() => {
11679
11736
 
11680
11737
  // packages/omo-opencode/src/shared/opencode-config-dir.ts
11681
11738
  import { existsSync as existsSync5, realpathSync as realpathSync2 } from "fs";
11682
- import { homedir as homedir4 } from "os";
11739
+ import { homedir as homedir5 } from "os";
11683
11740
  import { join as join6, posix, resolve, win32 } from "path";
11684
11741
  function isDevBuild(version) {
11685
11742
  if (!version)
@@ -11690,14 +11747,14 @@ function getTauriConfigDir(identifier) {
11690
11747
  const platform = process.platform;
11691
11748
  switch (platform) {
11692
11749
  case "darwin":
11693
- return join6(homedir4(), "Library", "Application Support", identifier);
11750
+ return join6(homedir5(), "Library", "Application Support", identifier);
11694
11751
  case "win32": {
11695
- const appData = process.env.APPDATA || join6(homedir4(), "AppData", "Roaming");
11752
+ const appData = process.env.APPDATA || join6(homedir5(), "AppData", "Roaming");
11696
11753
  return win32.join(appData, identifier);
11697
11754
  }
11698
11755
  case "linux":
11699
11756
  default: {
11700
- const xdgConfig = process.env.XDG_CONFIG_HOME || join6(homedir4(), ".config");
11757
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join6(homedir5(), ".config");
11701
11758
  return join6(xdgConfig, identifier);
11702
11759
  }
11703
11760
  }
@@ -11741,7 +11798,7 @@ function getWslLinuxHomeDir(windowsConfigRoot) {
11741
11798
  function getCliDefaultConfigDir() {
11742
11799
  const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
11743
11800
  const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment() && isWindowsUserConfigRoot(envXdgConfig);
11744
- const xdgConfig = shouldIgnoreWindowsXdg ? posix.join(getWslLinuxHomeDir(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join6(homedir4(), ".config");
11801
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix.join(getWslLinuxHomeDir(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join6(homedir5(), ".config");
11745
11802
  const configDir = isWslEnvironment() ? posix.join(xdgConfig, "opencode") : join6(xdgConfig, "opencode");
11746
11803
  return resolveConfigPath(configDir);
11747
11804
  }
@@ -70388,10 +70445,11 @@ var ANTHROPIC_PREFIX = "anthropic/", CLAUDE_CODE_ALIAS_MAP;
70388
70445
  var init_claude_model_mapper = __esm(() => {
70389
70446
  init_model_format_normalizer();
70390
70447
  init_model_normalization2();
70448
+ init_latest_models();
70391
70449
  CLAUDE_CODE_ALIAS_MAP = new Map([
70392
- ["sonnet", `${ANTHROPIC_PREFIX}claude-sonnet-4-6`],
70393
- ["opus", `${ANTHROPIC_PREFIX}claude-opus-5-5`],
70394
- ["haiku", `${ANTHROPIC_PREFIX}claude-haiku-5-5`]
70450
+ ["sonnet", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeSonnet}`],
70451
+ ["opus", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeOpus}`],
70452
+ ["haiku", `${ANTHROPIC_PREFIX}${LATEST_MODEL_BY_FAMILY.claudeHaiku}`]
70395
70453
  ]);
70396
70454
  });
70397
70455
 
@@ -76796,7 +76854,7 @@ var init_git_master = __esm(() => {
76796
76854
  OmoGitMasterSettingsLayerSchema = object(OmoGitMasterSettingsShape).partial().strict();
76797
76855
  OmoGitMasterSettingsSchema = OmoGitMasterSettingsLayerSchema.extend({
76798
76856
  commit_footer: union([boolean2(), string2()]).default(false),
76799
- include_co_authored_by: boolean2().default(false),
76857
+ include_co_authored_by: boolean2().default(true),
76800
76858
  git_env_prefix: GitEnvPrefixSchema.default("GIT_MASTER=1")
76801
76859
  }).strict();
76802
76860
  });
@@ -76830,7 +76888,7 @@ var init_memory_agreements = __esm(() => {
76830
76888
  });
76831
76889
 
76832
76890
  // packages/omo-config-core/src/schema/memory.ts
76833
- 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;
76891
+ 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;
76834
76892
  var init_memory = __esm(() => {
76835
76893
  init_zod();
76836
76894
  init_memory_agreements();
@@ -76870,6 +76928,14 @@ var init_memory = __esm(() => {
76870
76928
  tool_budget: number2().int().positive().default(8),
76871
76929
  query_expansion: boolean2().default(false)
76872
76930
  }).strict();
76931
+ OmoMemoryProjectScopeSchema = object({
76932
+ nudge: boolean2().default(true),
76933
+ recall: boolean2().default(true)
76934
+ }).strict();
76935
+ OmoMemoryProjectScopeLayerSchema = object({
76936
+ nudge: boolean2().optional(),
76937
+ recall: boolean2().optional()
76938
+ }).strict();
76873
76939
  OmoMemoryNudgeSchema = object({
76874
76940
  enabled: boolean2().default(true),
76875
76941
  every_user_turns: number2().int().min(1).default(10)
@@ -77025,6 +77091,7 @@ var init_memory = __esm(() => {
77025
77091
  tool_budget: 8,
77026
77092
  query_expansion: false
77027
77093
  }),
77094
+ project_scope: OmoMemoryProjectScopeSchema.default({ nudge: true, recall: true }),
77028
77095
  projection: OmoMemoryProjectionSchema.default({ max_entries_per_directory: 40, max_bytes: 24576 }),
77029
77096
  compile_warn_tokens: number2().int().positive().default(30000),
77030
77097
  agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
@@ -77044,6 +77111,7 @@ var init_memory = __esm(() => {
77044
77111
  sync: OmoMemorySyncLayerSchema.optional(),
77045
77112
  search: OmoMemorySearchLayerSchema.optional(),
77046
77113
  recall: OmoMemoryRecallLayerSchema.optional(),
77114
+ project_scope: OmoMemoryProjectScopeLayerSchema.optional(),
77047
77115
  projection: OmoMemoryProjectionLayerSchema.optional(),
77048
77116
  compile_warn_tokens: number2().int().positive().optional(),
77049
77117
  agents: record(string2(), OmoMemoryAgentOverridesSchema).optional()
@@ -77341,7 +77409,8 @@ var OmoTelemetrySettingsShape, OmoTelemetrySettingsLayerSchema, OmoTelemetrySett
77341
77409
  var init_telemetry = __esm(() => {
77342
77410
  init_zod();
77343
77411
  OmoTelemetrySettingsShape = {
77344
- enabled: boolean2()
77412
+ enabled: boolean2(),
77413
+ rawTurnSampleRate: number2().min(0).max(1)
77345
77414
  };
77346
77415
  OmoTelemetrySettingsLayerSchema = object(OmoTelemetrySettingsShape).partial().strict();
77347
77416
  OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
@@ -77368,11 +77437,24 @@ var init_format_on_mutation = __esm(() => {
77368
77437
  }).strict();
77369
77438
  });
77370
77439
 
77371
- // packages/omo-config-core/src/schema/gateway.ts
77372
- var OmoGatewaySectionSchema;
77373
- var init_gateway = __esm(() => {
77440
+ // packages/omo-config-core/src/schema/dori.ts
77441
+ var OmoDoriSectionSchema;
77442
+ var init_dori = __esm(() => {
77443
+ init_zod();
77444
+ 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.");
77445
+ });
77446
+
77447
+ // packages/omo-config-core/src/schema/provenance.ts
77448
+ var OmoProvenanceSettingsSchema;
77449
+ var init_provenance = __esm(() => {
77374
77450
  init_zod();
77375
- 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.");
77451
+ OmoProvenanceSettingsSchema = object({
77452
+ workspaces: array(object({
77453
+ name: string2().trim().min(1).regex(/\S/),
77454
+ git_owners: array(string2().trim().min(1).regex(/\S/)).optional(),
77455
+ paths: array(string2().trim().min(1).regex(/\S/)).optional()
77456
+ }).strict()).optional()
77457
+ }).strict();
77376
77458
  });
77377
77459
 
77378
77460
  // packages/omo-config-core/src/schema/config.ts
@@ -77391,13 +77473,15 @@ var init_config = __esm(() => {
77391
77473
  init_team();
77392
77474
  init_telemetry();
77393
77475
  init_format_on_mutation();
77394
- init_gateway();
77476
+ init_dori();
77477
+ init_provenance();
77395
77478
  OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
77396
77479
  OmoDisabledSkillsSchema = array(string2());
77397
77480
  OmoExcludedModelsSchema = array(string2());
77398
77481
  OmoTypedHarnessConfigSchema = object({
77482
+ provenance: OmoProvenanceSettingsSchema.optional(),
77399
77483
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77400
- gateway: OmoGatewaySectionSchema.optional(),
77484
+ dori: OmoDoriSectionSchema.optional(),
77401
77485
  categories: OmoCategoriesConfigSchema.optional(),
77402
77486
  agents: OmoAgentsConfigSchema.optional(),
77403
77487
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -77414,7 +77498,9 @@ var init_config = __esm(() => {
77414
77498
  exclude_models: OmoExcludedModelsSchema.optional()
77415
77499
  }).strict();
77416
77500
  OmoConfigProfileSchema = object({
77501
+ provenance: OmoProvenanceSettingsSchema.optional(),
77417
77502
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77503
+ dori: OmoDoriSectionSchema.optional(),
77418
77504
  categories: OmoCategoriesConfigSchema.optional(),
77419
77505
  agents: OmoAgentsConfigSchema.optional(),
77420
77506
  git_master: OmoGitMasterSettingsLayerSchema.optional(),
@@ -77435,8 +77521,9 @@ var init_config = __esm(() => {
77435
77521
  "[codex]": OmoTypedHarnessConfigSchema.optional()
77436
77522
  }).strict();
77437
77523
  OmoConfigSchema = object({
77524
+ provenance: OmoProvenanceSettingsSchema.optional(),
77438
77525
  formatOnMutation: OmoFormatOnMutationSchema.optional(),
77439
- gateway: OmoGatewaySectionSchema.optional(),
77526
+ dori: OmoDoriSectionSchema.optional(),
77440
77527
  $schema: string2().optional(),
77441
77528
  categories: OmoCategoriesConfigSchema.optional(),
77442
77529
  agents: OmoAgentsConfigSchema.optional(),
@@ -77461,8 +77548,9 @@ var init_config = __esm(() => {
77461
77548
  legacy_migrations: record(string2(), unknown()).optional()
77462
77549
  }).strict();
77463
77550
  OmoConfigLayerSchema = object({
77551
+ provenance: OmoProvenanceSettingsSchema.optional(),
77464
77552
  formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
77465
- gateway: OmoGatewaySectionSchema.optional(),
77553
+ dori: OmoDoriSectionSchema.optional(),
77466
77554
  $schema: string2().optional(),
77467
77555
  categories: OmoCategoriesConfigSchema.optional(),
77468
77556
  agents: OmoAgentsConfigSchema.optional(),
@@ -77604,6 +77692,54 @@ var init_legacy_harness_names = __esm(() => {
77604
77692
  init_harness();
77605
77693
  });
77606
77694
 
77695
+ // packages/omo-config-core/src/schema/legacy-dori-section.ts
77696
+ function isRecord11(value) {
77697
+ return value !== null && typeof value === "object" && !Array.isArray(value);
77698
+ }
77699
+ function migrateLegacyDoriSection(document) {
77700
+ if (!isRecord11(document))
77701
+ return { document: {}, diagnostics: [] };
77702
+ const diagnostics = [];
77703
+ const rename = (container, path) => {
77704
+ const result = { ...container };
77705
+ if (Object.hasOwn(container, "gateway")) {
77706
+ if (Object.hasOwn(container, "dori")) {
77707
+ diagnostics.push(`${[...path, "gateway"].join(".")} removed: dori is already configured`);
77708
+ } else {
77709
+ result.dori = container.gateway;
77710
+ diagnostics.push(`${[...path, "gateway"].join(".")} renamed to dori`);
77711
+ }
77712
+ delete result.gateway;
77713
+ }
77714
+ return result;
77715
+ };
77716
+ const layer = (container, path) => {
77717
+ const result = rename(container, path);
77718
+ for (const key of HARNESS_BLOCKS) {
77719
+ const block = container[key];
77720
+ if (isRecord11(block))
77721
+ result[key] = rename(block, [...path, key]);
77722
+ }
77723
+ return result;
77724
+ };
77725
+ const result = layer(document, []);
77726
+ if (isRecord11(document.profiles)) {
77727
+ const profiles = {};
77728
+ for (const [name, profile] of Object.entries(document.profiles)) {
77729
+ profiles[name] = isRecord11(profile) ? layer(profile, ["profiles", name]) : profile;
77730
+ }
77731
+ result.profiles = profiles;
77732
+ }
77733
+ return { document: result, diagnostics };
77734
+ }
77735
+ function hasLegacyGatewaySection(document) {
77736
+ return migrateLegacyDoriSection(document).diagnostics.length > 0;
77737
+ }
77738
+ var HARNESS_BLOCKS;
77739
+ var init_legacy_dori_section = __esm(() => {
77740
+ HARNESS_BLOCKS = ["[opencode]", "[native]", "[senpi]", "[codex]"];
77741
+ });
77742
+
77607
77743
  // packages/omo-config-core/src/schema/index.ts
77608
77744
  var init_schema = __esm(() => {
77609
77745
  init_agent();
@@ -77611,15 +77747,17 @@ var init_schema = __esm(() => {
77611
77747
  init_config();
77612
77748
  init_fallback_models();
77613
77749
  init_format_on_mutation();
77614
- init_gateway();
77750
+ init_dori();
77615
77751
  init_git_master();
77616
77752
  init_harness();
77617
77753
  init_legacy_category_names();
77618
77754
  init_legacy_harness_names();
77755
+ init_legacy_dori_section();
77619
77756
  init_memory();
77620
77757
  init_model_catalog();
77621
77758
  init_model_profile();
77622
77759
  init_model_ref();
77760
+ init_provenance();
77623
77761
  init_side_panel();
77624
77762
  init_task();
77625
77763
  init_team();
@@ -77905,7 +78043,7 @@ function invalidValueDiagnostics(path, dropped) {
77905
78043
  function unrecognizedKeyIssues(issues) {
77906
78044
  return issues.flatMap((issue) => issue.code === "unrecognized_keys" ? [{ keys: issue.keys, path: issue.path.map((segment) => String(segment)) }] : []);
77907
78045
  }
77908
- function isRecord11(value) {
78046
+ function isRecord12(value) {
77909
78047
  return typeof value === "object" && value !== null && !Array.isArray(value);
77910
78048
  }
77911
78049
  function sanitizeUnsafeKeys(value, path = []) {
@@ -77918,7 +78056,7 @@ function sanitizeUnsafeKeys(value, path = []) {
77918
78056
  });
77919
78057
  return { issues, value: sanitized };
77920
78058
  }
77921
- if (!isRecord11(value))
78059
+ if (!isRecord12(value))
77922
78060
  return { issues: [], value };
77923
78061
  const issues = [];
77924
78062
  if (Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
@@ -77944,13 +78082,13 @@ function containerAt(record, path) {
77944
78082
  if (!Number.isInteger(index) || index < 0 || index >= node.length)
77945
78083
  return null;
77946
78084
  node = node[index];
77947
- } else if (isRecord11(node) && Object.hasOwn(node, segment)) {
78085
+ } else if (isRecord12(node) && Object.hasOwn(node, segment)) {
77948
78086
  node = node[segment];
77949
78087
  } else {
77950
78088
  return null;
77951
78089
  }
77952
78090
  }
77953
- return isRecord11(node) ? node : null;
78091
+ return isRecord12(node) ? node : null;
77954
78092
  }
77955
78093
  function stripUnrecognizedKeys(record, issues) {
77956
78094
  const stripped = structuredClone(record);
@@ -80419,13 +80557,14 @@ function applyOpenAiOnlyModelCatalog(config) {
80419
80557
  }
80420
80558
  var OPENAI_ONLY_AGENT_OVERRIDES, OPENAI_ONLY_CATEGORY_OVERRIDES;
80421
80559
  var init_openai_only_model_catalog = __esm(() => {
80560
+ init_latest_models();
80422
80561
  OPENAI_ONLY_AGENT_OVERRIDES = {
80423
- explore: { model: "openai/gpt-6-luna-fast", variant: "low" },
80424
- librarian: { model: "openai/gpt-6-luna-fast", variant: "low" }
80562
+ explore: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" },
80563
+ librarian: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" }
80425
80564
  };
80426
80565
  OPENAI_ONLY_CATEGORY_OVERRIDES = {
80427
80566
  artistry: { model: "openai/gpt-5.6-sol", variant: "xhigh" },
80428
- quick: { model: "openai/gpt-6-luna-fast" },
80567
+ quick: { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}` },
80429
80568
  "visual-engineering": { model: "openai/gpt-5.6-sol", variant: "high" }
80430
80569
  };
80431
80570
  });
@@ -80634,9 +80773,9 @@ function generateModelConfig(config) {
80634
80773
  if (role === "explore") {
80635
80774
  let agentConfig;
80636
80775
  if (avail.native.openai) {
80637
- agentConfig = { model: "openai/gpt-6-luna-fast", variant: "low" };
80776
+ agentConfig = { model: `openai/${LATEST_MODEL_BY_FAMILY.gptLunaFast}`, variant: "low" };
80638
80777
  } else if (avail.native.claude) {
80639
- agentConfig = { model: "anthropic/claude-haiku-5-5", variant: "medium" };
80778
+ agentConfig = { model: `anthropic/${LATEST_MODEL_BY_FAMILY.claudeHaiku}`, variant: "medium" };
80640
80779
  } else if (avail.opencodeZen) {
80641
80780
  agentConfig = { model: "opencode/gpt-5-nano" };
80642
80781
  } else if (avail.opencodeGo) {
@@ -80719,6 +80858,7 @@ var init_model_fallback = __esm(() => {
80719
80858
  init_fallback_chain_resolution();
80720
80859
  init_provider_model_id_transform2();
80721
80860
  init_fallback_lane_policy();
80861
+ init_latest_models();
80722
80862
  });
80723
80863
 
80724
80864
  // packages/omo-opencode/src/cli/config-manager/generate-omo-config.ts
@@ -81576,6 +81716,18 @@ function subscriptionProviderRenamePlan(targetPath) {
81576
81716
  transform: inspect
81577
81717
  };
81578
81718
  }
81719
+ function doriSectionRenamePlan(targetPath, rename) {
81720
+ const inspect = (sources) => rename.transform(sources[0]?.value);
81721
+ return {
81722
+ id: DORI_SECTION_RENAME_MIGRATION_ID,
81723
+ inspect,
81724
+ mode: "replace-target",
81725
+ shouldRun: rename.shouldRun,
81726
+ sources: [],
81727
+ targetPath,
81728
+ transform: inspect
81729
+ };
81730
+ }
81579
81731
  function existingOmoConfigPath(directory, options) {
81580
81732
  const fileSystem = discoveryFileSystem(options);
81581
81733
  for (const fileName of ["omo.jsonc", "omo.json"]) {
@@ -81637,6 +81789,7 @@ function createLegacyConfigMigrationPlans(options) {
81637
81789
  addReasoningTarget(plan.targetPath);
81638
81790
  const inPlaceTargets = [...reasoningTargets.values()];
81639
81791
  return [
81792
+ ...inPlaceTargets.map((targetPath) => doriSectionRenamePlan(targetPath, options.doriSectionRename)),
81640
81793
  ...legacyPlans,
81641
81794
  ...inPlaceTargets.map(reasoningPlan),
81642
81795
  ...inPlaceTargets.map(categoryDeepSplitPlan),
@@ -81644,6 +81797,7 @@ function createLegacyConfigMigrationPlans(options) {
81644
81797
  ...inPlaceTargets.map(subscriptionProviderRenamePlan)
81645
81798
  ];
81646
81799
  }
81800
+ var DORI_SECTION_RENAME_MIGRATION_ID = "2026-10-dori-section-rename";
81647
81801
  var init_migration_plans = __esm(() => {
81648
81802
  init_discovery2();
81649
81803
  init_discovery_paths2();
@@ -81670,6 +81824,16 @@ var init_config_migration = __esm(() => {
81670
81824
  init_reasoning_unification();
81671
81825
  });
81672
81826
 
81827
+ // packages/omo-opencode/src/config-migration/dori-section-rename.ts
81828
+ var doriSectionRename;
81829
+ var init_dori_section_rename = __esm(() => {
81830
+ init_src4();
81831
+ doriSectionRename = {
81832
+ shouldRun: hasLegacyGatewaySection,
81833
+ transform: migrateLegacyDoriSection
81834
+ };
81835
+ });
81836
+
81673
81837
  // packages/omo-opencode/src/startup-migration.ts
81674
81838
  import { posix as posix5 } from "path";
81675
81839
  function homeDirectory(options) {
@@ -81709,6 +81873,7 @@ function runOpenCodeStartupMigration(options) {
81709
81873
  ...options.backupTimestamp === undefined ? {} : { backupTimestamp: options.backupTimestamp },
81710
81874
  cwd: options.cwd,
81711
81875
  ...options.discoveryFileSystem === undefined ? {} : { fileSystem: options.discoveryFileSystem },
81876
+ doriSectionRename,
81712
81877
  environment: options.environment ?? process.env,
81713
81878
  homeDir,
81714
81879
  pathOperations: options.pathOperations ?? posix5,
@@ -81745,6 +81910,7 @@ function runOpenCodeStartupMigration(options) {
81745
81910
  var init_startup_migration = __esm(() => {
81746
81911
  init_src4();
81747
81912
  init_config_migration();
81913
+ init_dori_section_rename();
81748
81914
  });
81749
81915
 
81750
81916
  // packages/omo-opencode/src/cli/config-manager/deep-merge-record.ts
@@ -82486,7 +82652,7 @@ function shouldRetainLine(line, cutoffMs) {
82486
82652
  function parseDiagnosticLine(line) {
82487
82653
  try {
82488
82654
  const parsed = JSON.parse(line);
82489
- if (!isRecord13(parsed)) {
82655
+ if (!isRecord14(parsed)) {
82490
82656
  return null;
82491
82657
  }
82492
82658
  return parsed;
@@ -82497,7 +82663,7 @@ function parseDiagnosticLine(line) {
82497
82663
  throw error;
82498
82664
  }
82499
82665
  }
82500
- function isRecord13(value) {
82666
+ function isRecord14(value) {
82501
82667
  return value !== null && typeof value === "object" && !Array.isArray(value);
82502
82668
  }
82503
82669
  function trimToMaxBytes(lines) {
@@ -90185,7 +90351,7 @@ function coerceBool(value) {
90185
90351
  function coerceString(value) {
90186
90352
  return typeof value == "string" ? value : undefined;
90187
90353
  }
90188
- function isRecord14(value) {
90354
+ function isRecord15(value) {
90189
90355
  return typeof value == "object" && value !== null && !Array.isArray(value);
90190
90356
  }
90191
90357
  function toRfc3339(timestamp) {
@@ -90207,7 +90373,7 @@ function relocateInto(properties, key, value) {
90207
90373
  properties[key] = value;
90208
90374
  }
90209
90375
  function buildV1Event(message) {
90210
- const sourceProperties = isRecord14(message.properties) ? message.properties : {};
90376
+ const sourceProperties = isRecord15(message.properties) ? message.properties : {};
90211
90377
  const properties = {
90212
90378
  ...sourceProperties
90213
90379
  };
@@ -92146,20 +92312,98 @@ var init_index_node = __esm(() => {
92146
92312
  };
92147
92313
  });
92148
92314
 
92315
+ // packages/telemetry-core/src/telemetry-delivery-error.ts
92316
+ var PERMANENT_STATUSES, TelemetryDeliveryError;
92317
+ var init_telemetry_delivery_error = __esm(() => {
92318
+ PERMANENT_STATUSES = new Set([400, 413]);
92319
+ TelemetryDeliveryError = class TelemetryDeliveryError extends Error {
92320
+ permanent;
92321
+ status;
92322
+ constructor(status, cause) {
92323
+ super(status === undefined ? "telemetry event was not delivered (no response)" : `telemetry event was rejected with HTTP ${status}`, { cause });
92324
+ this.name = "TelemetryDeliveryError";
92325
+ this.status = status;
92326
+ this.permanent = status !== undefined && PERMANENT_STATUSES.has(status);
92327
+ }
92328
+ };
92329
+ });
92330
+
92331
+ // packages/telemetry-core/src/posthog-immediate-send.ts
92332
+ function createImmediateSender(apiKey, options, PostHogClient) {
92333
+ const baseFetch = options.fetch ?? ((url, init) => fetch(url, init));
92334
+ let current;
92335
+ const trackedFetch = async (url, init) => {
92336
+ const attempt = current;
92337
+ try {
92338
+ const response = await baseFetch(url, init);
92339
+ if (attempt !== undefined)
92340
+ attempt.status = response.status;
92341
+ return response;
92342
+ } catch (error) {
92343
+ if (attempt !== undefined)
92344
+ attempt.error = error;
92345
+ throw error;
92346
+ }
92347
+ };
92348
+ const client = new PostHogClient(apiKey, { ...options, fetch: trackedFetch, fetchRetryCount: 0 });
92349
+ let queue = Promise.resolve();
92350
+ const sendOne = async (message) => {
92351
+ const attempt = {};
92352
+ current = attempt;
92353
+ try {
92354
+ await client.captureImmediate(message);
92355
+ } finally {
92356
+ current = undefined;
92357
+ }
92358
+ const { status } = attempt;
92359
+ if (status === undefined || status < 200 || status >= 300)
92360
+ throw new TelemetryDeliveryError(status, attempt.error);
92361
+ };
92362
+ return {
92363
+ send(message) {
92364
+ const result = queue.then(() => sendOne(message));
92365
+ queue = result.catch(() => {
92366
+ return;
92367
+ });
92368
+ return result;
92369
+ },
92370
+ async shutdown() {
92371
+ await client.shutdown();
92372
+ }
92373
+ };
92374
+ }
92375
+ var init_posthog_immediate_send = __esm(() => {
92376
+ init_telemetry_delivery_error();
92377
+ });
92378
+
92149
92379
  // packages/telemetry-core/src/posthog-transport.ts
92150
92380
  class PostHogTelemetryTransport {
92151
92381
  #client;
92382
+ #apiKey;
92383
+ #options;
92384
+ #immediate;
92152
92385
  constructor(apiKey, options) {
92153
92386
  this.#client = new PostHog(apiKey, options);
92387
+ this.#apiKey = apiKey;
92388
+ this.#options = options;
92154
92389
  }
92155
92390
  capture(message) {
92156
92391
  this.#client.capture(message);
92157
92392
  }
92393
+ captureImmediate(message) {
92394
+ this.#immediate ??= Promise.resolve().then(() => (init_posthog_immediate_send(), {})).then(({}) => createImmediateSender(this.#apiKey, this.#options, PostHog)).catch((error) => {
92395
+ this.#immediate = undefined;
92396
+ throw error;
92397
+ });
92398
+ return this.#immediate.then((sender) => sender.send(message));
92399
+ }
92158
92400
  async flush() {
92159
92401
  await this.#client.flush();
92160
92402
  }
92161
92403
  async shutdown() {
92162
- await this.#client.shutdown();
92404
+ await Promise.all([this.#client.shutdown(), this.#immediate?.then((sender) => sender.shutdown(), () => {
92405
+ return;
92406
+ })]);
92163
92407
  }
92164
92408
  }
92165
92409
  function createDefaultPostHogTransport(apiKey, options) {
@@ -92185,6 +92429,12 @@ var init_posthog_client = __esm(() => {
92185
92429
  // packages/telemetry-core/src/record-daily-active.ts
92186
92430
  var init_record_daily_active = () => {};
92187
92431
 
92432
+ // packages/telemetry-core/src/turn-trace-bridge.ts
92433
+ var REGISTRY;
92434
+ var init_turn_trace_bridge = __esm(() => {
92435
+ REGISTRY = Symbol.for("omo.telemetry.turn-traceparent.v1");
92436
+ });
92437
+
92188
92438
  // packages/telemetry-core/src/index.ts
92189
92439
  var init_src5 = __esm(() => {
92190
92440
  init_activity_state();
@@ -92196,6 +92446,7 @@ var init_src5 = __esm(() => {
92196
92446
  init_machine_id();
92197
92447
  init_posthog_client();
92198
92448
  init_record_daily_active();
92449
+ init_turn_trace_bridge();
92199
92450
  });
92200
92451
 
92201
92452
  // packages/omo-codex/package.json
@@ -92203,7 +92454,7 @@ var package_default2;
92203
92454
  var init_package2 = __esm(() => {
92204
92455
  package_default2 = {
92205
92456
  name: "@oh-my-opencode/omo-codex",
92206
- version: "5.1.43",
92457
+ version: "5.1.45",
92207
92458
  type: "module",
92208
92459
  private: true,
92209
92460
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -92234,6 +92485,7 @@ var init_package2 = __esm(() => {
92234
92485
  "sync:skills": "node plugin/scripts/sync-skills.mjs"
92235
92486
  },
92236
92487
  dependencies: {
92488
+ "@oh-my-opencode/model-core": "workspace:*",
92237
92489
  "@oh-my-opencode/shared-skills": "workspace:*",
92238
92490
  "@oh-my-opencode/utils": "workspace:*"
92239
92491
  },
@@ -93174,20 +93426,20 @@ var init_update_toasts = __esm(() => {
93174
93426
  });
93175
93427
 
93176
93428
  // packages/omo-opencode/src/hooks/auto-update-checker/hook/background-update-check.ts
93177
- import { existsSync as existsSync48 } from "fs";
93178
- import { dirname as dirname32, join as join79 } from "path";
93429
+ import { existsSync as existsSync50 } from "fs";
93430
+ import { dirname as dirname35, join as join84 } from "path";
93179
93431
  import { fileURLToPath as fileURLToPath5 } from "url";
93180
93432
  function defaultGetModuleHostingWorkspace() {
93181
93433
  try {
93182
- const currentDir = dirname32(fileURLToPath5(import.meta.url));
93434
+ const currentDir = dirname35(fileURLToPath5(import.meta.url));
93183
93435
  const pkgJsonPath = findPackageJsonUp(currentDir);
93184
93436
  if (!pkgJsonPath)
93185
93437
  return null;
93186
- const pkgDir = dirname32(pkgJsonPath);
93187
- const nodeModulesDir = dirname32(pkgDir);
93438
+ const pkgDir = dirname35(pkgJsonPath);
93439
+ const nodeModulesDir = dirname35(pkgDir);
93188
93440
  if (nodeModulesDir.split(/[\\/]/).pop() !== "node_modules")
93189
93441
  return null;
93190
- return dirname32(nodeModulesDir);
93442
+ return dirname35(nodeModulesDir);
93191
93443
  } catch (error) {
93192
93444
  if (error instanceof Error) {
93193
93445
  return null;
@@ -93334,8 +93586,8 @@ var init_background_update_check = __esm(() => {
93334
93586
  init_semver_compare();
93335
93587
  init_update_toasts();
93336
93588
  defaultDeps4 = {
93337
- existsSync: existsSync48,
93338
- join: join79,
93589
+ existsSync: existsSync50,
93590
+ join: join84,
93339
93591
  runBunInstallWithDetails,
93340
93592
  log: log2,
93341
93593
  getOpenCodeCacheDir,
@@ -93752,7 +94004,7 @@ function getUnsupportedOpenCodeVersionMessage(openCodeVersion) {
93752
94004
  // packages/omo-codex/src/install/install-codex.ts
93753
94005
  import { join as join56, resolve as resolve13 } from "path";
93754
94006
  import { existsSync as existsSync27 } from "fs";
93755
- import { homedir as homedir6 } from "os";
94007
+ import { homedir as homedir7 } from "os";
93756
94008
 
93757
94009
  // packages/omo-codex/src/install/codex-cache-bins.ts
93758
94010
  import { chmod, lstat as lstat4, mkdir, readFile as readFile3, readdir as readdir2, readlink as readlink3, rm as rm3, stat as stat2, symlink, writeFile } from "fs/promises";
@@ -96211,11 +96463,12 @@ function isRootSetting(line, key) {
96211
96463
  }
96212
96464
 
96213
96465
  // packages/omo-codex/src/install/codex-model-catalog.ts
96466
+ init_latest_models();
96214
96467
  import { readFile as readFile10 } from "fs/promises";
96215
96468
  import { join as join36 } from "path";
96216
96469
  var FALLBACK_CODEX_MODEL_CATALOG = {
96217
96470
  current: {
96218
- model: "gpt-6-astra",
96471
+ model: LATEST_MODEL_BY_FAMILY.gptAstra,
96219
96472
  modelContextWindow: 600000,
96220
96473
  modelReasoningEffort: "high",
96221
96474
  planModeReasoningEffort: "xhigh"
@@ -96371,10 +96624,10 @@ function readCatalogMultiAgentVersion(model, cachePath) {
96371
96624
  } catch {
96372
96625
  return null;
96373
96626
  }
96374
- if (!isRecord12(cache) || !Array.isArray(cache.models))
96627
+ if (!isRecord13(cache) || !Array.isArray(cache.models))
96375
96628
  return null;
96376
96629
  for (const entry of cache.models) {
96377
- if (!isRecord12(entry))
96630
+ if (!isRecord13(entry))
96378
96631
  continue;
96379
96632
  if (entry.slug !== model && entry.id !== model)
96380
96633
  continue;
@@ -96399,7 +96652,7 @@ function readRootModelCatalogPath(config) {
96399
96652
  const single = config.match(/^\s*model_catalog_json\s*=\s*'([^']+)'/m);
96400
96653
  return single?.[1] ?? null;
96401
96654
  }
96402
- function isRecord12(value) {
96655
+ function isRecord13(value) {
96403
96656
  return typeof value === "object" && value !== null && !Array.isArray(value);
96404
96657
  }
96405
96658
  function removeFeatureFlagSetting(config, featureName) {
@@ -96788,6 +97041,7 @@ import { lstat as lstat7, readFile as readFile13, readdir as readdir6, writeFile
96788
97041
  import { join as join40 } from "path";
96789
97042
 
96790
97043
  // packages/omo-codex/src/install/managed-agent-reasoning-defaults.ts
97044
+ init_latest_models();
96791
97045
  var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96792
97046
  [
96793
97047
  "explorer",
@@ -96802,7 +97056,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96802
97056
  },
96803
97057
  {
96804
97058
  previous: { model: "gpt-5.6-luna", effort: "low" },
96805
- current: { model: "gpt-6-astra", effort: "low" }
97059
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
96806
97060
  }
96807
97061
  ]
96808
97062
  ],
@@ -96819,7 +97073,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96819
97073
  },
96820
97074
  {
96821
97075
  previous: { model: "gpt-5.6-luna", effort: "low" },
96822
- current: { model: "gpt-6-astra", effort: "low" }
97076
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
96823
97077
  }
96824
97078
  ]
96825
97079
  ],
@@ -96828,7 +97082,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96828
97082
  [
96829
97083
  {
96830
97084
  previous: { model: "gpt-5.6-sol", effort: "high" },
96831
- current: { model: "gpt-6-astra", effort: "high" }
97085
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96832
97086
  }
96833
97087
  ]
96834
97088
  ],
@@ -96837,7 +97091,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96837
97091
  [
96838
97092
  {
96839
97093
  previous: { model: "gpt-5.6-luna", effort: "high" },
96840
- current: { model: "gpt-6-astra", effort: "high" }
97094
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96841
97095
  }
96842
97096
  ]
96843
97097
  ],
@@ -96854,7 +97108,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96854
97108
  },
96855
97109
  {
96856
97110
  previous: { model: "gpt-5.6-terra", effort: "high" },
96857
- current: { model: "gpt-6-astra", effort: "high" }
97111
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96858
97112
  }
96859
97113
  ]
96860
97114
  ],
@@ -96871,7 +97125,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96871
97125
  },
96872
97126
  {
96873
97127
  previous: { model: "gpt-5.6-sol", effort: "high" },
96874
- current: { model: "gpt-6-astra", effort: "high" }
97128
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96875
97129
  }
96876
97130
  ]
96877
97131
  ],
@@ -96888,7 +97142,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96888
97142
  },
96889
97143
  {
96890
97144
  previous: { model: "gpt-5.6-terra", effort: "high" },
96891
- current: { model: "gpt-6-astra", effort: "high" }
97145
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96892
97146
  }
96893
97147
  ]
96894
97148
  ],
@@ -96901,7 +97155,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96901
97155
  },
96902
97156
  {
96903
97157
  previous: { model: "gpt-5.6-sol", effort: "medium" },
96904
- current: { model: "gpt-6-astra", effort: "medium" }
97158
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "medium" }
96905
97159
  }
96906
97160
  ]
96907
97161
  ],
@@ -96914,7 +97168,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96914
97168
  },
96915
97169
  {
96916
97170
  previous: { model: "gpt-5.6-terra", effort: "medium" },
96917
- current: { model: "gpt-6-astra", effort: "medium" }
97171
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "medium" }
96918
97172
  }
96919
97173
  ]
96920
97174
  ],
@@ -96927,7 +97181,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96927
97181
  },
96928
97182
  {
96929
97183
  previous: { model: "gpt-5.6-terra", effort: "high" },
96930
- current: { model: "gpt-6-astra", effort: "high" }
97184
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96931
97185
  }
96932
97186
  ]
96933
97187
  ],
@@ -96940,7 +97194,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96940
97194
  },
96941
97195
  {
96942
97196
  previous: { model: "gpt-5.6-luna", effort: "high" },
96943
- current: { model: "gpt-6-astra", effort: "high" }
97197
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "high" }
96944
97198
  }
96945
97199
  ]
96946
97200
  ],
@@ -96957,7 +97211,7 @@ var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
96957
97211
  },
96958
97212
  {
96959
97213
  previous: { model: "gpt-5.6-sol", effort: "low" },
96960
- current: { model: "gpt-6-astra", effort: "low" }
97214
+ current: { model: LATEST_MODEL_BY_FAMILY.gptAstra, effort: "low" }
96961
97215
  }
96962
97216
  ]
96963
97217
  ]
@@ -98328,13 +98582,13 @@ function processIsRunning(pid) {
98328
98582
  }
98329
98583
 
98330
98584
  // packages/omo-codex/src/install/codex-installer-bin-dir.ts
98331
- import { homedir as homedir5 } from "os";
98585
+ import { homedir as homedir6 } from "os";
98332
98586
  import { join as join49, resolve as resolve12 } from "path";
98333
98587
  function resolveCodexInstallerBinDir(input) {
98334
98588
  const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
98335
98589
  if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
98336
98590
  return resolve12(explicitBinDir.trim());
98337
- const homeDir = input.homeDir ?? homedir5();
98591
+ const homeDir = input.homeDir ?? homedir6();
98338
98592
  const defaultCodexHome = resolve12(homeDir, ".codex");
98339
98593
  const resolvedCodexHome = resolve12(input.codexHome);
98340
98594
  if (resolvedCodexHome !== defaultCodexHome)
@@ -98460,7 +98714,7 @@ async function runCodexInstaller(options = {}) {
98460
98714
  const env = options.env ?? process.env;
98461
98715
  const platform = options.platform ?? process.platform;
98462
98716
  const repoRoot = resolve13(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env }));
98463
- const codexHome = resolve13(options.codexHome ?? env.CODEX_HOME ?? join56(homedir6(), ".codex"));
98717
+ const codexHome = resolve13(options.codexHome ?? env.CODEX_HOME ?? join56(homedir7(), ".codex"));
98464
98718
  const projectDirectory = resolve13(options.projectDirectory ?? env.OMO_CODEX_PROJECT ?? process.cwd());
98465
98719
  const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env });
98466
98720
  const runCommand = options.runCommand ?? defaultRunCommand;
@@ -98652,7 +98906,7 @@ function codexMarketplaceSource(marketplaceRoot) {
98652
98906
  init_bun_which_shim();
98653
98907
  import { execFile as execFile2 } from "child_process";
98654
98908
  import { existsSync as existsSync28 } from "fs";
98655
- import { homedir as homedir7 } from "os";
98909
+ import { homedir as homedir8 } from "os";
98656
98910
  import { posix as posix8, win32 as win324 } from "path";
98657
98911
  var CODEX_PATH_CHECK_LABEL = "codex (PATH)";
98658
98912
  var WINDOWS_START_APPS_ARGS = [
@@ -98663,7 +98917,7 @@ var WINDOWS_START_APPS_ARGS = [
98663
98917
  async function detectCodexInstallation(input = {}) {
98664
98918
  const platform = input.platform ?? process.platform;
98665
98919
  const env = input.env ?? process.env;
98666
- const homeDir = input.homeDir ?? homedir7();
98920
+ const homeDir = input.homeDir ?? homedir8();
98667
98921
  const exists = input.exists ?? existsSync28;
98668
98922
  const which = input.which ?? bunWhich;
98669
98923
  const checkedPaths = [CODEX_PATH_CHECK_LABEL];
@@ -98779,7 +99033,7 @@ function defaultRunCommand2(command, args) {
98779
99033
  }
98780
99034
  // packages/omo-codex/src/install/codex-cleanup.ts
98781
99035
  import { lstat as lstat15, readFile as readFile27, readdir as readdir13, rm as rm14, rmdir } from "fs/promises";
98782
- import { homedir as homedir8 } from "os";
99036
+ import { homedir as homedir9 } from "os";
98783
99037
  import { isAbsolute as isAbsolute11, join as join59, relative as relative6, resolve as resolve16 } from "path";
98784
99038
 
98785
99039
  // packages/omo-codex/src/install/codex-cleanup-bins.ts
@@ -99018,7 +99272,7 @@ function skipped(path, reason) {
99018
99272
  var INSTALLED_AGENTS_MANIFEST = ".installed-agents.json";
99019
99273
  async function cleanupCodexLight(input = {}) {
99020
99274
  const env = input.env ?? process.env;
99021
- const codexHome = resolve16(input.codexHome ?? env.CODEX_HOME ?? join59(homedir8(), ".codex"));
99275
+ const codexHome = resolve16(input.codexHome ?? env.CODEX_HOME ?? join59(homedir9(), ".codex"));
99022
99276
  const configPath = join59(codexHome, "config.toml");
99023
99277
  const installedBinDir = await readInstalledCodexBinDir(codexHome);
99024
99278
  const agentPaths = await collectInstalledAgentPaths(codexHome, configPath);
@@ -99230,14 +99484,14 @@ function nodeErrorCode6(error) {
99230
99484
  // packages/omo-senpi/src/install/install-senpi.ts
99231
99485
  import { execFile as execFile3 } from "child_process";
99232
99486
  import { existsSync as existsSync31 } from "fs";
99233
- import { homedir as homedir11 } from "os";
99487
+ import { homedir as homedir12 } from "os";
99234
99488
  import { dirname as dirname25, join as join64, resolve as resolve20 } from "path";
99235
99489
  import { fileURLToPath } from "url";
99236
99490
  import { promisify as promisify2 } from "util";
99237
99491
 
99238
- // packages/omo-senpi/src/components/agent-home/resolve-agent-home.ts
99492
+ // packages/senpi-task/src/agent-home.ts
99239
99493
  import { existsSync as existsSync29 } from "fs";
99240
- import { homedir as homedir9 } from "os";
99494
+ import { homedir as homedir10 } from "os";
99241
99495
  import { join as join60, resolve as resolve17 } from "path";
99242
99496
  var AGENT_DIR_ENV_NAMES = [
99243
99497
  "OMO_CODING_AGENT_DIR",
@@ -99246,7 +99500,7 @@ var AGENT_DIR_ENV_NAMES = [
99246
99500
  ];
99247
99501
  var AGENT_HOME_SENTINEL = "settings.json";
99248
99502
  function resolveAgentHome(options) {
99249
- const { env, homeDir = homedir9(), exists = existsSync29 } = options;
99503
+ const { env, homeDir = homedir10(), exists = existsSync29 } = options;
99250
99504
  for (const name of AGENT_DIR_ENV_NAMES) {
99251
99505
  const configured = env[name]?.trim();
99252
99506
  if (configured)
@@ -99260,16 +99514,15 @@ function resolveAgentHome(options) {
99260
99514
  return brandedHome;
99261
99515
  return join60(homeDir, ".senpi", "agent");
99262
99516
  }
99263
-
99264
99517
  // packages/omo-senpi/src/install/local-launcher.ts
99265
99518
  import { chmodSync as chmodSync3, existsSync as existsSync30, mkdirSync as mkdirSync12, readFileSync as readFileSync14, rmSync as rmSync4, writeFileSync as writeFileSync7 } from "fs";
99266
- import { homedir as homedir10 } from "os";
99519
+ import { homedir as homedir11 } from "os";
99267
99520
  import { dirname as dirname22, join as join61, resolve as resolve18 } from "path";
99268
99521
  var MARKER = "omo-local-launcher";
99269
- function localLauncherPath(homeDir = homedir10()) {
99522
+ function localLauncherPath(homeDir = homedir11()) {
99270
99523
  return join61(homeDir, ".local", "bin", "omo");
99271
99524
  }
99272
- function localLauncherCmdPath(homeDir = homedir10()) {
99525
+ function localLauncherCmdPath(homeDir = homedir11()) {
99273
99526
  return join61(homeDir, ".local", "bin", "omo.cmd");
99274
99527
  }
99275
99528
  function releaseChannel(version) {
@@ -99397,7 +99650,7 @@ async function readSettings(settingsPath) {
99397
99650
  throw error;
99398
99651
  }
99399
99652
  const parsed = JSON.parse(raw);
99400
- if (!isRecord15(parsed))
99653
+ if (!isRecord16(parsed))
99401
99654
  throw new Error(`${settingsPath} must contain a JSON object`);
99402
99655
  return parsed;
99403
99656
  }
@@ -99458,7 +99711,7 @@ async function nextBackupPath(settingsPath) {
99458
99711
  function timestampForBackup() {
99459
99712
  return new Date().toISOString().replace(/[-:.]/g, "");
99460
99713
  }
99461
- function isRecord15(value) {
99714
+ function isRecord16(value) {
99462
99715
  return typeof value === "object" && value !== null && !Array.isArray(value);
99463
99716
  }
99464
99717
  async function readPackageName(packagePath) {
@@ -99478,7 +99731,7 @@ async function readPackageName(packagePath) {
99478
99731
  return;
99479
99732
  throw error;
99480
99733
  }
99481
- return isRecord15(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
99734
+ return isRecord16(parsed) && typeof parsed.name === "string" ? parsed.name : undefined;
99482
99735
  }
99483
99736
  async function fileExists(path) {
99484
99737
  try {
@@ -99502,13 +99755,17 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
99502
99755
  join63("extensions", "omo-memory-doctor.js"),
99503
99756
  join63("extensions", "omo-memory-memfs.js"),
99504
99757
  join63("extensions", "omo-memory-palace.js"),
99758
+ join63("extensions", "omo-device-account.js"),
99759
+ join63("extensions", "omo-memory-commands.js"),
99505
99760
  join63("extensions", "omo-session-history.js"),
99506
99761
  join63("extensions", "omo-recall-store.js"),
99762
+ join63("extensions", "omo-dori-migration.js"),
99507
99763
  join63("extensions", "omo-telemetry-posthog.js"),
99508
99764
  join63("extensions", "omo-memory-sync.js"),
99509
99765
  join63("extensions", "loro_wasm_bg.wasm"),
99510
99766
  join63("extensions", "CaseFolding.txt"),
99511
99767
  join63("extensions", "omo-thread-client.js"),
99768
+ join63("extensions", "omo-telemetry-recovery.js"),
99512
99769
  join63("extensions", "omo-feedback.js"),
99513
99770
  join63("extensions", "omo-claim-receipt.js"),
99514
99771
  join63("extensions", "assets.generated.json"),
@@ -99612,7 +99869,7 @@ async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
99612
99869
  }
99613
99870
  }
99614
99871
  function isAstGrepRuntimeManifest(value) {
99615
- if (!isRecord15(value))
99872
+ if (!isRecord16(value))
99616
99873
  return false;
99617
99874
  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));
99618
99875
  }
@@ -99668,7 +99925,7 @@ function resolveInstallContext(options) {
99668
99925
  const env = options.env ?? process.env;
99669
99926
  const allowBuild = options.pluginPath === undefined;
99670
99927
  const repoRoot = resolve20(options.repoRoot ?? (allowBuild ? findRepoRoot2(dirname25(fileURLToPath(import.meta.url))) : dirname25(resolve20(options.pluginPath))));
99671
- const homeDir = options.homeDir ?? env.HOME ?? homedir11();
99928
+ const homeDir = options.homeDir ?? env.HOME ?? homedir12();
99672
99929
  const agentDir = resolve20(options.agentDir ?? resolveAgentHome({ env, homeDir }));
99673
99930
  const pluginPath = resolve20(options.pluginPath ?? join64(repoRoot, "packages", "omo-senpi", "plugin"));
99674
99931
  return {
@@ -99964,7 +100221,7 @@ function shadowWarning(resolved, native, isWindows) {
99964
100221
  // packages/omo-opencode/src/cli/install-native/run-native-install.ts
99965
100222
  init_bun_which_shim();
99966
100223
  init_spawn_with_windows_hide();
99967
- import { homedir as homedir12 } from "os";
100224
+ import { homedir as homedir13 } from "os";
99968
100225
  function describeExit(plan, result) {
99969
100226
  const stderr = result.stderr?.trim();
99970
100227
  const head = `${plan.packageManager} exited with code ${result.exitCode}`;
@@ -100028,7 +100285,7 @@ function nativeInstallFailureLines(failure) {
100028
100285
  function defaultNativeInstallDependencies() {
100029
100286
  return {
100030
100287
  isBunAvailable: () => bunWhich("bun") !== null,
100031
- environment: resolveOmoBinEnvironment({ env: process.env, platform: process.platform, homeDir: homedir12() }),
100288
+ environment: resolveOmoBinEnvironment({ env: process.env, platform: process.platform, homeDir: homedir13() }),
100032
100289
  spawn: async (command, args) => {
100033
100290
  const proc = spawnWithWindowsHide([command, ...args], {
100034
100291
  env: process.env,
@@ -100430,7 +100687,7 @@ async function checkTuiPluginConfig() {
100430
100687
  if (!server.registered && tui.registered) {
100431
100688
  issues.push({
100432
100689
  title: "Server plugin entry missing from opencode.json",
100433
- 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 \u2014 the server side " + "handles tool dispatch, hook execution, and SDK integration.",
100690
+ 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.",
100434
100691
  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"}.`,
100435
100692
  affects: ["tool dispatch", "hook execution", "SDK integration"],
100436
100693
  severity: "warning"
@@ -100599,7 +100856,7 @@ function refreshOpenCodePluginSandboxes(options = {}) {
100599
100856
  }
100600
100857
 
100601
100858
  // packages/omo-opencode/src/cli/install-ast-grep-sg.ts
100602
- import { homedir as homedir13 } from "os";
100859
+ import { homedir as homedir14 } from "os";
100603
100860
  import { join as join69 } from "path";
100604
100861
 
100605
100862
  // packages/shared-skills/index.mjs
@@ -100622,7 +100879,7 @@ function describeResult2(result) {
100622
100879
  }
100623
100880
  async function installAstGrepForOpenCode(options = {}) {
100624
100881
  const platform = options.platform ?? process.platform;
100625
- const baseDir = join69(options.homeDir ?? homedir13(), ".omo");
100882
+ const baseDir = join69(options.homeDir ?? homedir14(), ".omo");
100626
100883
  const targetDir = astGrepRuntimeDir(baseDir, platform, options.arch ?? process.arch);
100627
100884
  const skillDir = join69(options.sharedSkillsRoot ?? sharedSkillsRootPath(), "ast-grep");
100628
100885
  const installer = options.installer ?? runAstGrepSkillInstall;
@@ -103196,9 +103453,250 @@ async function processEvents(ctx, stream, state) {
103196
103453
  }
103197
103454
  }
103198
103455
  }
103456
+ // packages/omo-opencode/src/config/validate.ts
103457
+ import { dirname as dirname29, isAbsolute as isAbsolute13, join as join74, relative as relative7 } from "path";
103458
+
103459
+ // packages/skills-loader-core/src/shared/skill-path-resolver.ts
103460
+ init_skill_path_resolver();
103461
+
103462
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-mcp-config.ts
103463
+ init_js_yaml();
103464
+
103465
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-provenance.ts
103466
+ import { basename as basename11, dirname as dirname28, join as join73, resolve as resolve23, sep as sep9 } from "path";
103467
+ import { homedir as homedir16 } from "os";
103468
+
103469
+ // packages/skills-loader-core/src/shared/claude-config-dir.ts
103470
+ init_src();
103471
+ import { join as join70 } from "path";
103472
+ function getClaudeConfigDir() {
103473
+ const envConfigDir = process.env.CLAUDE_CONFIG_DIR;
103474
+ if (envConfigDir) {
103475
+ return envConfigDir;
103476
+ }
103477
+ return join70(getHomeDirectory(), ".claude");
103478
+ }
103479
+ // packages/skills-loader-core/src/shared/opencode-config-dir.ts
103480
+ import { existsSync as existsSync36, realpathSync as realpathSync9 } from "fs";
103481
+ import { homedir as homedir15 } from "os";
103482
+ import { join as join71, posix as posix10, resolve as resolve21, win32 as win326 } from "path";
103483
+
103484
+ // packages/skills-loader-core/src/shared/plugin-identity.ts
103485
+ init_src();
103486
+ var PRODUCT_IDENTITY = createProductIdentity({
103487
+ pluginName: "oh-my-openagent",
103488
+ legacyPluginName: "oh-my-opencode",
103489
+ publishedPackageName: "oh-my-opencode",
103490
+ configBasename: "oh-my-openagent",
103491
+ legacyConfigBasename: "oh-my-opencode",
103492
+ logFileName: "oh-my-opencode.log",
103493
+ cacheDirName: "oh-my-opencode"
103494
+ });
103495
+ var PLUGIN_NAME2 = PRODUCT_IDENTITY.pluginName;
103496
+ var LEGACY_PLUGIN_NAME2 = PRODUCT_IDENTITY.legacyPluginName;
103497
+ var PUBLISHED_PACKAGE_NAME2 = PRODUCT_IDENTITY.publishedPackageName;
103498
+ var CONFIG_BASENAME = PRODUCT_IDENTITY.configBasename;
103499
+ var LEGACY_CONFIG_BASENAME = PRODUCT_IDENTITY.legacyConfigBasename;
103500
+ var LOG_FILENAME3 = PRODUCT_IDENTITY.logFileName;
103501
+ var CACHE_DIR_NAME3 = PRODUCT_IDENTITY.cacheDirName;
103502
+
103503
+ // packages/skills-loader-core/src/shared/opencode-config-dir.ts
103504
+ var TAURI_APP_IDENTIFIER2 = "ai.opencode.desktop";
103505
+ var TAURI_APP_IDENTIFIER_DEV2 = "ai.opencode.desktop.dev";
103506
+ function isDevBuild2(version) {
103507
+ if (!version)
103508
+ return false;
103509
+ return version.includes("-dev") || version.includes(".dev");
103510
+ }
103511
+ function getTauriConfigDir2(identifier) {
103512
+ const platform = process.platform;
103513
+ switch (platform) {
103514
+ case "darwin":
103515
+ return join71(homedir15(), "Library", "Application Support", identifier);
103516
+ case "win32": {
103517
+ const appData = process.env.APPDATA || join71(homedir15(), "AppData", "Roaming");
103518
+ return win326.join(appData, identifier);
103519
+ }
103520
+ case "linux":
103521
+ default: {
103522
+ const xdgConfig = process.env.XDG_CONFIG_HOME || join71(homedir15(), ".config");
103523
+ return join71(xdgConfig, identifier);
103524
+ }
103525
+ }
103526
+ }
103527
+ function resolveConfigPath2(pathValue) {
103528
+ if (isWslEnvironment2() && pathValue.startsWith("/")) {
103529
+ return posix10.normalize(pathValue);
103530
+ }
103531
+ const resolvedPath = resolve21(pathValue);
103532
+ if (!existsSync36(resolvedPath))
103533
+ return resolvedPath;
103534
+ try {
103535
+ return realpathSync9(resolvedPath);
103536
+ } catch (error) {
103537
+ if (error instanceof Error) {
103538
+ return resolvedPath;
103539
+ }
103540
+ return resolvedPath;
103541
+ }
103542
+ }
103543
+ function isWslEnvironment2() {
103544
+ return process.platform === "linux" && (Boolean(process.env.WSL_DISTRO_NAME?.trim()) || Boolean(process.env.WSL_INTEROP?.trim()));
103545
+ }
103546
+ function isWindowsUserConfigRoot2(pathValue) {
103547
+ const normalizedPath = pathValue.replaceAll("\\", "/").toLowerCase();
103548
+ return /^[a-z]:\/users\//.test(normalizedPath) || /^\/mnt\/[a-z]\/users\//.test(normalizedPath);
103549
+ }
103550
+ function getWindowsUserFromConfigRoot2(pathValue) {
103551
+ const normalizedPath = pathValue.replaceAll("\\", "/");
103552
+ const match = /^(?:[a-z]:|\/mnt\/[a-z])\/Users\/([^/]+)/i.exec(normalizedPath);
103553
+ return match?.[1] ?? null;
103554
+ }
103555
+ function getWslLinuxHomeDir2(windowsConfigRoot) {
103556
+ const envHome = process.env.HOME?.trim();
103557
+ if (envHome && envHome.startsWith("/") && !isWindowsUserConfigRoot2(envHome)) {
103558
+ return envHome;
103559
+ }
103560
+ const user = process.env.USER?.trim() || process.env.LOGNAME?.trim() || process.env.SUDO_USER?.trim() || (windowsConfigRoot ? getWindowsUserFromConfigRoot2(windowsConfigRoot) : undefined);
103561
+ return user ? posix10.join("/home", user) : null;
103562
+ }
103563
+ function getCliDefaultConfigDir2() {
103564
+ const envXdgConfig = process.env.XDG_CONFIG_HOME?.trim();
103565
+ const shouldIgnoreWindowsXdg = envXdgConfig !== undefined && envXdgConfig.length > 0 && isWslEnvironment2() && isWindowsUserConfigRoot2(envXdgConfig);
103566
+ const xdgConfig = shouldIgnoreWindowsXdg ? posix10.join(getWslLinuxHomeDir2(envXdgConfig) ?? "/home", ".config") : envXdgConfig || join71(homedir15(), ".config");
103567
+ const configDir = isWslEnvironment2() ? posix10.join(xdgConfig, "opencode") : join71(xdgConfig, "opencode");
103568
+ return resolveConfigPath2(configDir);
103569
+ }
103570
+ function getCliCustomConfigDir2() {
103571
+ const envConfigDir = process.env.OPENCODE_CONFIG_DIR?.trim();
103572
+ if (!envConfigDir) {
103573
+ return null;
103574
+ }
103575
+ return resolveConfigPath2(envConfigDir);
103576
+ }
103577
+ function getCliConfigDir2() {
103578
+ return getCliCustomConfigDir2() ?? getCliDefaultConfigDir2();
103579
+ }
103580
+ function getOpenCodeConfigDirs2(options) {
103581
+ if (options.binary !== "opencode") {
103582
+ return [getOpenCodeConfigDir2(options)];
103583
+ }
103584
+ const customConfigDir = getCliCustomConfigDir2();
103585
+ return Array.from(new Set([
103586
+ ...customConfigDir ? [customConfigDir] : [],
103587
+ getCliDefaultConfigDir2()
103588
+ ]));
103589
+ }
103590
+ function getOpenCodeConfigDir2(options) {
103591
+ const { binary, version, checkExisting = true } = options;
103592
+ if (binary === "opencode") {
103593
+ return getCliConfigDir2();
103594
+ }
103595
+ const identifier = isDevBuild2(version) ? TAURI_APP_IDENTIFIER_DEV2 : TAURI_APP_IDENTIFIER2;
103596
+ const tauriDirBase = getTauriConfigDir2(identifier);
103597
+ const tauriDir = process.platform === "win32" ? win326.isAbsolute(tauriDirBase) ? win326.normalize(tauriDirBase) : win326.resolve(tauriDirBase) : resolveConfigPath2(tauriDirBase);
103598
+ if (checkExisting) {
103599
+ const legacyDir = getCliConfigDir2();
103600
+ const legacyConfig = join71(legacyDir, "opencode.json");
103601
+ const legacyConfigC = join71(legacyDir, "opencode.jsonc");
103602
+ if (existsSync36(legacyConfig) || existsSync36(legacyConfigC)) {
103603
+ return legacyDir;
103604
+ }
103605
+ }
103606
+ return tauriDir;
103607
+ }
103608
+ // packages/skills-loader-core/src/shared/project-discovery-dirs.ts
103609
+ import { execFileSync as execFileSync3 } from "child_process";
103610
+ import { existsSync as existsSync37, realpathSync as realpathSync10 } from "fs";
103611
+ import { dirname as dirname27, join as join72, resolve as resolve22, win32 as win327 } from "path";
103612
+ var worktreePathCache2 = new Map;
103613
+ function normalizePath(path) {
103614
+ const resolvedPath = process.platform !== "win32" && win327.isAbsolute(path) ? path : resolve22(path);
103615
+ if (!existsSync37(resolvedPath)) {
103616
+ return resolvedPath;
103617
+ }
103618
+ try {
103619
+ return realpathSync10.native(resolvedPath);
103620
+ } catch (error) {
103621
+ if (!(error instanceof Error)) {
103622
+ throw error;
103623
+ }
103624
+ try {
103625
+ return realpathSync10(resolvedPath);
103626
+ } catch (fallbackError) {
103627
+ if (!(fallbackError instanceof Error)) {
103628
+ throw fallbackError;
103629
+ }
103630
+ return resolvedPath;
103631
+ }
103632
+ }
103633
+ }
103634
+ function pathKey2(path) {
103635
+ const normalized = path.replace(/\\/g, "/");
103636
+ return process.platform === "win32" ? normalized.toLowerCase() : normalized;
103637
+ }
103638
+ function detectWorktreePath(directory) {
103639
+ const resolvedDirectory = resolve22(directory);
103640
+ const cacheKey = pathKey2(normalizePath(resolvedDirectory));
103641
+ if (worktreePathCache2.has(cacheKey)) {
103642
+ return worktreePathCache2.get(cacheKey);
103643
+ }
103644
+ let ancestor = normalizePath(resolvedDirectory);
103645
+ while (true) {
103646
+ if (existsSync37(join72(ancestor, ".git"))) {
103647
+ worktreePathCache2.set(cacheKey, ancestor);
103648
+ return ancestor;
103649
+ }
103650
+ const parent = dirname27(ancestor);
103651
+ if (parent === ancestor)
103652
+ break;
103653
+ ancestor = parent;
103654
+ }
103655
+ try {
103656
+ const worktreePath = execFileSync3("git", ["rev-parse", "--show-toplevel"], {
103657
+ cwd: resolvedDirectory,
103658
+ encoding: "utf-8",
103659
+ timeout: 5000,
103660
+ stdio: ["pipe", "pipe", "pipe"]
103661
+ }).trim();
103662
+ const normalizedWorktreePath = normalizePath(worktreePath);
103663
+ worktreePathCache2.set(cacheKey, normalizedWorktreePath);
103664
+ return normalizedWorktreePath;
103665
+ } catch (error) {
103666
+ if (!(error instanceof Error)) {
103667
+ throw error;
103668
+ }
103669
+ worktreePathCache2.set(cacheKey, undefined);
103670
+ return;
103671
+ }
103672
+ }
103673
+ // packages/skills-loader-core/src/shared/internal-initiator-marker.ts
103674
+ init_internal_initiator_marker();
103675
+ // packages/skills-loader-core/src/features/opencode-skill-loader/skill-provenance.ts
103676
+ var observers = new Set;
103677
+ function knownUserSkillRoots() {
103678
+ const home = homedir16();
103679
+ return [
103680
+ join73(getClaudeConfigDir(), "skills"),
103681
+ join73(home, ".agents", "skills"),
103682
+ join73(home, ".omo", "agent", "skills"),
103683
+ join73(home, ".senpi", "agent", "skills"),
103684
+ sharedSkillsRootPath(),
103685
+ ...getOpenCodeConfigDirs2({ binary: "opencode" }).flatMap((dir) => [
103686
+ join73(dir, "skills"),
103687
+ join73(dir, "skill")
103688
+ ])
103689
+ ];
103690
+ }
103691
+
103692
+ // packages/skills-loader-core/src/features/opencode-skill-loader/config-source-discovery.ts
103693
+ var sourceOrigins = new WeakMap;
103694
+ function setSkillSourceProvenance(config, provenance) {
103695
+ sourceOrigins.set(config, provenance);
103696
+ }
103697
+
103199
103698
  // packages/omo-opencode/src/config/validate.ts
103200
103699
  init_src4();
103201
- import { relative as relative7 } from "path";
103202
103700
 
103203
103701
  // packages/omo-opencode/src/shared/disabled-providers.ts
103204
103702
  init_config_errors();
@@ -103322,7 +103820,7 @@ function appendViews(views, layers, select, keyPrefix) {
103322
103820
  for (const layer of layers) {
103323
103821
  const config = select(layer.config);
103324
103822
  if (Object.keys(config).length > 0)
103325
- views.push({ config, keyPrefix, path: layer.source.path });
103823
+ views.push({ config, keyPrefix, path: layer.source.path, scope: layer.source.scope });
103326
103824
  }
103327
103825
  }
103328
103826
  function recordFields(value, fields) {
@@ -103852,7 +104350,7 @@ var GitEnvPrefixSchema2 = string2().refine(isValidGitEnvPrefix, { message: GIT_E
103852
104350
  init_zod();
103853
104351
  var GitMasterConfigSchema = object({
103854
104352
  commit_footer: union([boolean2(), string2()]).default(false),
103855
- include_co_authored_by: boolean2().default(false),
104353
+ include_co_authored_by: boolean2().default(true),
103856
104354
  git_env_prefix: GitEnvPrefixSchema2
103857
104355
  });
103858
104356
  // packages/omo-opencode/src/config/schema/hooks.ts
@@ -104161,7 +104659,7 @@ var OhMyOpenCodeConfigSchema = object({
104161
104659
  babysitting: BabysittingConfigSchema.optional(),
104162
104660
  git_master: GitMasterConfigSchema.default({
104163
104661
  commit_footer: false,
104164
- include_co_authored_by: false,
104662
+ include_co_authored_by: true,
104165
104663
  git_env_prefix: "GIT_MASTER=1"
104166
104664
  }),
104167
104665
  browser_automation_engine: BrowserAutomationConfigSchema.optional(),
@@ -104332,6 +104830,28 @@ function validatePluginConfig(directory, environment = process.env) {
104332
104830
  const userConfig = parseConfig(prunePluginView({ config: chain.protectedUserView, homeDir, keyPrefix: "", path: "" }).config);
104333
104831
  const config = applyDisabledProviders(materializeAgentModelChains(protectUserFields(mergeViews(views), userConfig)));
104334
104832
  warnLegacyUlwExecuteKey(chain.views);
104833
+ if (config.skills) {
104834
+ const owner = chain.views.findLast((view) => Object.hasOwn(view.config, "skills"));
104835
+ const userRoots = [...knownUserSkillRoots()];
104836
+ for (const view of chain.views.filter((candidate) => candidate.scope === "user")) {
104837
+ const settings = OhMyOpenCodeConfigSchema.safeParse({ skills: view.config.skills });
104838
+ const skills = settings.success ? settings.data.skills : undefined;
104839
+ if (!skills || Array.isArray(skills))
104840
+ continue;
104841
+ for (const source of skills.sources ?? []) {
104842
+ const path = typeof source === "string" ? source : source.path;
104843
+ if (/^https?:\/\//.test(path))
104844
+ continue;
104845
+ userRoots.push(path.startsWith("~/") ? join74(homeDir ?? "", path.slice(2)) : isAbsolute13(path) ? path : join74(dirname29(view.path), path));
104846
+ }
104847
+ }
104848
+ setSkillSourceProvenance(config.skills, {
104849
+ kind: owner?.scope === "user" ? "user" : "project-auto",
104850
+ selectedRoot: owner ? dirname29(owner.path) : directory,
104851
+ projectRoot: detectWorktreePath(directory) ?? directory,
104852
+ userRoots
104853
+ });
104854
+ }
104335
104855
  return {
104336
104856
  valid: messages.length === 0,
104337
104857
  messages,
@@ -104355,7 +104875,7 @@ var import_picocolors11 = __toESM(require_picocolors(), 1);
104355
104875
  // packages/omo-opencode/src/cli/run/opencode-binary-resolver.ts
104356
104876
  init_bun_which_shim();
104357
104877
  init_spawn_with_windows_hide();
104358
- import { delimiter as delimiter2, dirname as dirname27, posix as posix10, win32 as win326 } from "path";
104878
+ import { delimiter as delimiter2, dirname as dirname30, posix as posix11, win32 as win328 } from "path";
104359
104879
  var OPENCODE_COMMANDS = ["opencode", "opencode-desktop"];
104360
104880
  var WINDOWS_SUFFIXES = ["", ".exe", ".cmd", ".bat", ".ps1"];
104361
104881
  function getCommandCandidates(platform) {
@@ -104365,8 +104885,8 @@ function getCommandCandidates(platform) {
104365
104885
  }
104366
104886
  function getPathTools(platform) {
104367
104887
  if (platform === "win32")
104368
- return win326;
104369
- return posix10;
104888
+ return win328;
104889
+ return posix11;
104370
104890
  }
104371
104891
  function collectCandidateBinaryPaths(pathEnv, which = bunWhich, platform = process.platform) {
104372
104892
  const seen = new Set;
@@ -104413,7 +104933,7 @@ async function findWorkingOpencodeBinary(pathEnv = process.env.PATH, probe = can
104413
104933
  return null;
104414
104934
  }
104415
104935
  function buildPathWithBinaryFirst(pathEnv, binaryPath) {
104416
- const preferredDir = dirname27(binaryPath);
104936
+ const preferredDir = dirname30(binaryPath);
104417
104937
  const existing = (pathEnv ?? "").split(delimiter2).filter((entry) => entry.length > 0 && entry !== preferredDir);
104418
104938
  return [preferredDir, ...existing].join(delimiter2);
104419
104939
  }
@@ -105020,9 +105540,9 @@ function buildTaskRef(section, label) {
105020
105540
  };
105021
105541
  }
105022
105542
  // packages/boulder-state/src/top-level-task.ts
105023
- import { existsSync as existsSync36, readFileSync as readFileSync19 } from "fs";
105543
+ import { existsSync as existsSync38, readFileSync as readFileSync19 } from "fs";
105024
105544
  function readCurrentTopLevelTask(planPath) {
105025
- if (!existsSync36(planPath)) {
105545
+ if (!existsSync38(planPath)) {
105026
105546
  return null;
105027
105547
  }
105028
105548
  try {
@@ -105033,13 +105553,13 @@ function readCurrentTopLevelTask(planPath) {
105033
105553
  }
105034
105554
  }
105035
105555
  // packages/boulder-state/src/storage/path.ts
105036
- import { existsSync as existsSync37 } from "fs";
105037
- import { isAbsolute as isAbsolute13, join as join70, relative as relative8, resolve as resolve21 } from "path";
105556
+ import { existsSync as existsSync39 } from "fs";
105557
+ import { isAbsolute as isAbsolute14, join as join75, relative as relative8, resolve as resolve24 } from "path";
105038
105558
  function getBoulderFilePath(directory) {
105039
- return join70(directory, BOULDER_DIR, BOULDER_FILE);
105559
+ return join75(directory, BOULDER_DIR, BOULDER_FILE);
105040
105560
  }
105041
105561
  function resolveTrackedPath(baseDirectory, trackedPath) {
105042
- return isAbsolute13(trackedPath) ? resolve21(trackedPath) : resolve21(baseDirectory, trackedPath);
105562
+ return isAbsolute14(trackedPath) ? resolve24(trackedPath) : resolve24(baseDirectory, trackedPath);
105043
105563
  }
105044
105564
  function resolveBoulderPlanPath(directory, state) {
105045
105565
  const absolutePlanPath = resolveTrackedPath(directory, state.active_plan);
@@ -105047,22 +105567,22 @@ function resolveBoulderPlanPath(directory, state) {
105047
105567
  if (!worktreePath) {
105048
105568
  return absolutePlanPath;
105049
105569
  }
105050
- const absoluteDirectory = resolve21(directory);
105570
+ const absoluteDirectory = resolve24(directory);
105051
105571
  const relativePlanPath = relative8(absoluteDirectory, absolutePlanPath);
105052
- if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute13(relativePlanPath)) {
105572
+ if (relativePlanPath.length === 0 || relativePlanPath.startsWith("..") || isAbsolute14(relativePlanPath)) {
105053
105573
  return absolutePlanPath;
105054
105574
  }
105055
105575
  const absoluteWorktreePath = resolveTrackedPath(directory, worktreePath);
105056
- const worktreePlanPath = resolve21(absoluteWorktreePath, relativePlanPath);
105057
- return existsSync37(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
105576
+ const worktreePlanPath = resolve24(absoluteWorktreePath, relativePlanPath);
105577
+ return existsSync39(worktreePlanPath) ? worktreePlanPath : absolutePlanPath;
105058
105578
  }
105059
105579
  function resolveBoulderPlanPathForWork(directory, work) {
105060
105580
  return resolveBoulderPlanPath(directory, work);
105061
105581
  }
105062
105582
  // packages/boulder-state/src/storage/plan-progress.ts
105063
- import { existsSync as existsSync38, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "fs";
105583
+ import { existsSync as existsSync40, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "fs";
105064
105584
  function getPlanProgress(planPath) {
105065
- if (!existsSync38(planPath)) {
105585
+ if (!existsSync40(planPath)) {
105066
105586
  return { total: 0, completed: 0, isComplete: false };
105067
105587
  }
105068
105588
  try {
@@ -105145,10 +105665,10 @@ function selectMirrorWork(state) {
105145
105665
  return sorted[0] ?? null;
105146
105666
  }
105147
105667
  // packages/boulder-state/src/storage/read-state.ts
105148
- import { existsSync as existsSync39, readFileSync as readFileSync21 } from "fs";
105668
+ import { existsSync as existsSync41, readFileSync as readFileSync21 } from "fs";
105149
105669
  function readBoulderState(directory) {
105150
105670
  const filePath = getBoulderFilePath(directory);
105151
- if (!existsSync39(filePath)) {
105671
+ if (!existsSync41(filePath)) {
105152
105672
  return null;
105153
105673
  }
105154
105674
  try {
@@ -105220,14 +105740,14 @@ init_state();
105220
105740
  // packages/omo-opencode/src/features/run-continuation-state/constants.ts
105221
105741
  var CONTINUATION_MARKER_DIR = ".omo/run-continuation";
105222
105742
  // packages/omo-opencode/src/features/run-continuation-state/storage.ts
105223
- import { existsSync as existsSync40, mkdirSync as mkdirSync14, readFileSync as readFileSync22, rmSync as rmSync6, writeFileSync as writeFileSync8 } from "fs";
105224
- import { join as join71 } from "path";
105743
+ import { existsSync as existsSync42, mkdirSync as mkdirSync14, readFileSync as readFileSync22, rmSync as rmSync6, writeFileSync as writeFileSync8 } from "fs";
105744
+ import { join as join76 } from "path";
105225
105745
  function getMarkerPath(directory, sessionID) {
105226
- return join71(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
105746
+ return join76(directory, CONTINUATION_MARKER_DIR, `${sessionID}.json`);
105227
105747
  }
105228
105748
  function readContinuationMarker(directory, sessionID) {
105229
105749
  const markerPath = getMarkerPath(directory, sessionID);
105230
- if (!existsSync40(markerPath))
105750
+ if (!existsSync42(markerPath))
105231
105751
  return null;
105232
105752
  try {
105233
105753
  const raw = readFileSync22(markerPath, "utf-8");
@@ -105296,7 +105816,7 @@ async function isSessionInBoulderLineage(input) {
105296
105816
  init_shared();
105297
105817
  init_compaction_marker();
105298
105818
  import { readFileSync as readFileSync23, readdirSync as readdirSync10 } from "fs";
105299
- import { join as join72 } from "path";
105819
+ import { join as join77 } from "path";
105300
105820
  var defaultSessionLastAgentDeps = {
105301
105821
  getMessageDir,
105302
105822
  isSqliteBackend,
@@ -105356,7 +105876,7 @@ async function getLastAgentFromSession(sessionID, client, deps = {}) {
105356
105876
  try {
105357
105877
  const messages = readdirSync10(messageDir).filter((fileName) => fileName.endsWith(".json")).map((fileName) => {
105358
105878
  try {
105359
- const content = readFileSync23(join72(messageDir, fileName), "utf-8");
105879
+ const content = readFileSync23(join77(messageDir, fileName), "utf-8");
105360
105880
  const parsed = JSON.parse(content);
105361
105881
  return {
105362
105882
  fileName,
@@ -105399,8 +105919,8 @@ init_agent_display_names();
105399
105919
 
105400
105920
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
105401
105921
  init_frontmatter2();
105402
- import { existsSync as existsSync41, readFileSync as readFileSync24, writeFileSync as writeFileSync9, unlinkSync as unlinkSync6, mkdirSync as mkdirSync15 } from "fs";
105403
- import { dirname as dirname28, join as join73 } from "path";
105922
+ import { existsSync as existsSync43, readFileSync as readFileSync24, writeFileSync as writeFileSync9, unlinkSync as unlinkSync6, mkdirSync as mkdirSync15 } from "fs";
105923
+ import { dirname as dirname31, join as join78 } from "path";
105404
105924
 
105405
105925
  // packages/omo-opencode/src/hooks/ralph-loop/constants.ts
105406
105926
  var DEFAULT_STATE_FILE = ".omo/ralph-loop.local.md";
@@ -105409,11 +105929,11 @@ var DEFAULT_COMPLETION_PROMISE = "DONE";
105409
105929
 
105410
105930
  // packages/omo-opencode/src/hooks/ralph-loop/storage.ts
105411
105931
  function getStateFilePath(directory, customPath) {
105412
- return customPath ? join73(directory, customPath) : join73(directory, DEFAULT_STATE_FILE);
105932
+ return customPath ? join78(directory, customPath) : join78(directory, DEFAULT_STATE_FILE);
105413
105933
  }
105414
105934
  function readState(directory, customPath) {
105415
105935
  const filePath = getStateFilePath(directory, customPath);
105416
- if (!existsSync41(filePath)) {
105936
+ if (!existsSync43(filePath)) {
105417
105937
  return null;
105418
105938
  }
105419
105939
  try {
@@ -106551,14 +107071,14 @@ async function getLocalVersion(options = {}) {
106551
107071
  }
106552
107072
  }
106553
107073
  // packages/omo-opencode/src/cli/doctor/checks/system.ts
106554
- import { existsSync as existsSync52, readFileSync as readFileSync34 } from "fs";
107074
+ import { existsSync as existsSync54, readFileSync as readFileSync34 } from "fs";
106555
107075
 
106556
107076
  // packages/omo-opencode/src/cli/doctor/checks/system-binary.ts
106557
107077
  init_extract_semver();
106558
107078
  init_bun_which_shim();
106559
- import { existsSync as existsSync49, accessSync as accessSync4, constants as constants12 } from "fs";
106560
- import { homedir as homedir16 } from "os";
106561
- import { join as join80 } from "path";
107079
+ import { existsSync as existsSync51, accessSync as accessSync4, constants as constants12 } from "fs";
107080
+ import { homedir as homedir19 } from "os";
107081
+ import { join as join85 } from "path";
106562
107082
 
106563
107083
  // packages/omo-opencode/src/cli/doctor/framework/spawn-with-timeout.ts
106564
107084
  init_spawn_with_windows_hide();
@@ -106645,22 +107165,22 @@ function isExecutable2(path) {
106645
107165
  }
106646
107166
  }
106647
107167
  function getDesktopAppPaths(platform) {
106648
- const home = homedir16();
107168
+ const home = homedir19();
106649
107169
  switch (platform) {
106650
107170
  case "darwin":
106651
107171
  return [
106652
107172
  "/Applications/OpenCode.app/Contents/MacOS/OpenCode",
106653
- join80(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
107173
+ join85(home, "Applications", "OpenCode.app", "Contents", "MacOS", "OpenCode")
106654
107174
  ];
106655
107175
  case "win32": {
106656
107176
  const programFiles = process.env.ProgramFiles;
106657
107177
  const localAppData = process.env.LOCALAPPDATA;
106658
107178
  const paths = [];
106659
107179
  if (programFiles) {
106660
- paths.push(join80(programFiles, "OpenCode", "OpenCode.exe"));
107180
+ paths.push(join85(programFiles, "OpenCode", "OpenCode.exe"));
106661
107181
  }
106662
107182
  if (localAppData) {
106663
- paths.push(join80(localAppData, "OpenCode", "OpenCode.exe"));
107183
+ paths.push(join85(localAppData, "OpenCode", "OpenCode.exe"));
106664
107184
  }
106665
107185
  return paths;
106666
107186
  }
@@ -106668,8 +107188,8 @@ function getDesktopAppPaths(platform) {
106668
107188
  return [
106669
107189
  "/usr/bin/opencode",
106670
107190
  "/usr/lib/opencode/opencode",
106671
- join80(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
106672
- join80(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
107191
+ join85(home, "Applications", "opencode-desktop-linux-x86_64.AppImage"),
107192
+ join85(home, "Applications", "opencode-desktop-linux-aarch64.AppImage")
106673
107193
  ];
106674
107194
  default:
106675
107195
  return [];
@@ -106681,7 +107201,7 @@ function buildVersionCommand(binaryPath, platform) {
106681
107201
  }
106682
107202
  return [binaryPath, "--version"];
106683
107203
  }
106684
- function findDesktopBinary(platform = process.platform, checkExists = existsSync49) {
107204
+ function findDesktopBinary(platform = process.platform, checkExists = existsSync51) {
106685
107205
  for (const desktopPath of getDesktopAppPaths(platform)) {
106686
107206
  if (checkExists(desktopPath)) {
106687
107207
  return { binary: "opencode", path: desktopPath };
@@ -106689,7 +107209,7 @@ function findDesktopBinary(platform = process.platform, checkExists = existsSync
106689
107209
  }
106690
107210
  return null;
106691
107211
  }
106692
- async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync49) {
107212
+ async function findOpenCodeBinary(platform = process.platform, checkExists = existsSync51) {
106693
107213
  for (const binary of OPENCODE_BINARIES2) {
106694
107214
  const path = bunWhich(binary);
106695
107215
  if (path && checkExists(path)) {
@@ -106701,7 +107221,7 @@ async function findOpenCodeBinary(platform = process.platform, checkExists = exi
106701
107221
  const candidates = getCommandCandidates2(platform);
106702
107222
  for (const entry of pathEnv.split(delimiter).filter(Boolean)) {
106703
107223
  for (const command of candidates) {
106704
- const fullPath = join80(entry, command);
107224
+ const fullPath = join85(entry, command);
106705
107225
  if (checkExists(fullPath) && isExecutable2(fullPath)) {
106706
107226
  return { binary: command, path: fullPath };
106707
107227
  }
@@ -106747,12 +107267,12 @@ function compareVersions3(current, minimum) {
106747
107267
 
106748
107268
  // packages/omo-opencode/src/cli/doctor/checks/system-plugin.ts
106749
107269
  init_shared();
106750
- import { existsSync as existsSync50, readFileSync as readFileSync32 } from "fs";
107270
+ import { existsSync as existsSync52, readFileSync as readFileSync32 } from "fs";
106751
107271
  function detectConfigPath() {
106752
107272
  const paths = getOpenCodeConfigPaths({ binary: "opencode", version: null });
106753
- if (existsSync50(paths.configJsonc))
107273
+ if (existsSync52(paths.configJsonc))
106754
107274
  return paths.configJsonc;
106755
- if (existsSync50(paths.configJson))
107275
+ if (existsSync52(paths.configJson))
106756
107276
  return paths.configJson;
106757
107277
  return null;
106758
107278
  }
@@ -106842,36 +107362,36 @@ init_file_utils2();
106842
107362
  init_checker();
106843
107363
  init_auto_update_checker();
106844
107364
  init_package_json_locator();
106845
- import { existsSync as existsSync51, readFileSync as readFileSync33, readdirSync as readdirSync12 } from "fs";
107365
+ import { existsSync as existsSync53, readFileSync as readFileSync33, readdirSync as readdirSync12 } from "fs";
106846
107366
  import { createRequire } from "module";
106847
- import { homedir as homedir17 } from "os";
106848
- import { join as join81 } from "path";
107367
+ import { homedir as homedir20 } from "os";
107368
+ import { join as join86 } from "path";
106849
107369
  import { fileURLToPath as fileURLToPath6 } from "url";
106850
107370
  init_shared();
106851
107371
  function getPlatformDefaultCacheDir(platform = process.platform) {
106852
107372
  if (platform === "darwin")
106853
- return join81(homedir17(), "Library", "Caches");
107373
+ return join86(homedir20(), "Library", "Caches");
106854
107374
  if (platform === "win32")
106855
- return process.env.LOCALAPPDATA ?? join81(homedir17(), "AppData", "Local");
106856
- return join81(homedir17(), ".cache");
107375
+ return process.env.LOCALAPPDATA ?? join86(homedir20(), "AppData", "Local");
107376
+ return join86(homedir20(), ".cache");
106857
107377
  }
106858
107378
  function resolveOpenCodeCacheDir() {
106859
107379
  const xdgCacheHome = process.env.XDG_CACHE_HOME;
106860
107380
  if (xdgCacheHome)
106861
- return join81(xdgCacheHome, "opencode");
107381
+ return join86(xdgCacheHome, "opencode");
106862
107382
  const fromShared = getOpenCodeCacheDir();
106863
- const platformDefault = join81(getPlatformDefaultCacheDir(), "opencode");
106864
- if (existsSync51(fromShared) || !existsSync51(platformDefault))
107383
+ const platformDefault = join86(getPlatformDefaultCacheDir(), "opencode");
107384
+ if (existsSync53(fromShared) || !existsSync53(platformDefault))
106865
107385
  return fromShared;
106866
107386
  return platformDefault;
106867
107387
  }
106868
107388
  function resolveExistingDir(dirPath) {
106869
- if (!existsSync51(dirPath))
107389
+ if (!existsSync53(dirPath))
106870
107390
  return dirPath;
106871
107391
  return resolveSymlink(dirPath);
106872
107392
  }
106873
107393
  function readPackageJson(filePath) {
106874
- if (!existsSync51(filePath))
107394
+ if (!existsSync53(filePath))
106875
107395
  return null;
106876
107396
  try {
106877
107397
  const content = readFileSync33(filePath, "utf-8");
@@ -106892,26 +107412,26 @@ function normalizeVersion(value) {
106892
107412
  function createPackageCandidates(rootDir) {
106893
107413
  return ACCEPTED_PACKAGE_NAMES.map((packageName) => ({
106894
107414
  packageName,
106895
- installedPackagePath: join81(rootDir, "node_modules", packageName, "package.json")
107415
+ installedPackagePath: join86(rootDir, "node_modules", packageName, "package.json")
106896
107416
  }));
106897
107417
  }
106898
107418
  function createTaggedInstallCandidates(rootDir) {
106899
- const packagesDir = join81(rootDir, "packages");
106900
- if (!existsSync51(packagesDir))
107419
+ const packagesDir = join86(rootDir, "packages");
107420
+ if (!existsSync53(packagesDir))
106901
107421
  return [];
106902
107422
  const candidates = [];
106903
107423
  for (const entryName of readdirSync12(packagesDir).sort()) {
106904
107424
  const packageName = ACCEPTED_PACKAGE_NAMES.find((name) => entryName.startsWith(`${name}@`));
106905
107425
  if (packageName === undefined)
106906
107426
  continue;
106907
- const installDir = join81(packagesDir, entryName);
107427
+ const installDir = join86(packagesDir, entryName);
106908
107428
  candidates.push({
106909
107429
  cacheDir: installDir,
106910
- cachePackagePath: join81(installDir, "package.json"),
107430
+ cachePackagePath: join86(installDir, "package.json"),
106911
107431
  packageCandidates: [
106912
107432
  {
106913
107433
  packageName,
106914
- installedPackagePath: join81(installDir, "node_modules", packageName, "package.json")
107434
+ installedPackagePath: join86(installDir, "node_modules", packageName, "package.json")
106915
107435
  }
106916
107436
  ]
106917
107437
  });
@@ -106919,7 +107439,7 @@ function createTaggedInstallCandidates(rootDir) {
106919
107439
  return candidates;
106920
107440
  }
106921
107441
  function selectInstalledPackage(candidate) {
106922
- return candidate.packageCandidates.find((packageCandidate) => existsSync51(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
107442
+ return candidate.packageCandidates.find((packageCandidate) => existsSync53(packageCandidate.installedPackagePath)) ?? candidate.packageCandidates[0];
106923
107443
  }
106924
107444
  function getExpectedVersion(cachePackage, packageName) {
106925
107445
  return normalizeVersion(cachePackage?.dependencies?.[packageName]) ?? normalizeVersion(cachePackage?.dependencies?.[PACKAGE_NAME]);
@@ -106930,7 +107450,7 @@ function resolveInstalledPackageJsonPath() {
106930
107450
  for (const packageName of ACCEPTED_PACKAGE_NAMES) {
106931
107451
  try {
106932
107452
  const packageJsonPath = require2.resolve(`${packageName}/package.json`);
106933
- if (existsSync51(packageJsonPath)) {
107453
+ if (existsSync53(packageJsonPath)) {
106934
107454
  return { packageName, packageJsonPath };
106935
107455
  }
106936
107456
  } catch {
@@ -106956,22 +107476,22 @@ function getLoadedPluginVersion() {
106956
107476
  const candidates = [
106957
107477
  {
106958
107478
  cacheDir: configDir,
106959
- cachePackagePath: join81(configDir, "package.json"),
107479
+ cachePackagePath: join86(configDir, "package.json"),
106960
107480
  packageCandidates: createPackageCandidates(configDir)
106961
107481
  },
106962
107482
  ...createTaggedInstallCandidates(configDir),
106963
107483
  {
106964
107484
  cacheDir,
106965
- cachePackagePath: join81(cacheDir, "package.json"),
107485
+ cachePackagePath: join86(cacheDir, "package.json"),
106966
107486
  packageCandidates: createPackageCandidates(cacheDir)
106967
107487
  },
106968
107488
  ...createTaggedInstallCandidates(cacheDir)
106969
107489
  ];
106970
- const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync51(packageCandidate.installedPackagePath))) ?? candidates[0];
107490
+ const selectedCandidate = candidates.find((candidate) => candidate.packageCandidates.some((packageCandidate) => existsSync53(packageCandidate.installedPackagePath))) ?? candidates[0];
106971
107491
  const { cacheDir: selectedDir, cachePackagePath } = selectedCandidate;
106972
107492
  const selectedPackage = selectInstalledPackage(selectedCandidate);
106973
107493
  const candidateInstalledPath = selectedPackage.installedPackagePath;
106974
- const candidateExists = existsSync51(candidateInstalledPath);
107494
+ const candidateExists = existsSync53(candidateInstalledPath);
106975
107495
  const resolvedFallback = candidateExists ? null : resolveInstalledPackageJsonPath();
106976
107496
  const installedPackagePath = resolvedFallback?.packageJsonPath ?? candidateInstalledPath;
106977
107497
  const resolvedPackageName = resolvedFallback?.packageName ?? selectedPackage.packageName;
@@ -107007,7 +107527,7 @@ var defaultDeps5 = {
107007
107527
  getLoadedPluginVersion,
107008
107528
  getLatestPluginVersion,
107009
107529
  getSuggestedInstallTag,
107010
- configExists: existsSync52,
107530
+ configExists: existsSync54,
107011
107531
  readConfigFile: (path) => readFileSync34(path, "utf-8"),
107012
107532
  parseConfigContent: (content) => parseJsonc(content)
107013
107533
  };
@@ -107153,23 +107673,23 @@ async function checkSystem(deps = defaultDeps5) {
107153
107673
 
107154
107674
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-cache.ts
107155
107675
  init_shared();
107156
- import { existsSync as existsSync53, readFileSync as readFileSync35 } from "fs";
107157
- import { homedir as homedir18 } from "os";
107158
- import { join as join82 } from "path";
107676
+ import { existsSync as existsSync55, readFileSync as readFileSync35 } from "fs";
107677
+ import { homedir as homedir21 } from "os";
107678
+ import { join as join87 } from "path";
107159
107679
  function getUserConfigDir2() {
107160
107680
  const xdgConfig = process.env.XDG_CONFIG_HOME;
107161
107681
  if (xdgConfig)
107162
- return join82(xdgConfig, "opencode");
107163
- return join82(homedir18(), ".config", "opencode");
107682
+ return join87(xdgConfig, "opencode");
107683
+ return join87(homedir21(), ".config", "opencode");
107164
107684
  }
107165
107685
  function loadCustomProviderNames() {
107166
107686
  const configDir = getUserConfigDir2();
107167
107687
  const candidatePaths = [
107168
- join82(configDir, "opencode.json"),
107169
- join82(configDir, "opencode.jsonc")
107688
+ join87(configDir, "opencode.json"),
107689
+ join87(configDir, "opencode.jsonc")
107170
107690
  ];
107171
107691
  for (const configPath of candidatePaths) {
107172
- if (!existsSync53(configPath))
107692
+ if (!existsSync55(configPath))
107173
107693
  continue;
107174
107694
  try {
107175
107695
  const content = readFileSync35(configPath, "utf-8");
@@ -107187,9 +107707,9 @@ function loadCustomProviderNames() {
107187
107707
  return [];
107188
107708
  }
107189
107709
  function loadAvailableModelsFromCache() {
107190
- const cacheFile = join82(getOpenCodeCacheDir(), "models.json");
107710
+ const cacheFile = join87(getOpenCodeCacheDir(), "models.json");
107191
107711
  const customProviders = loadCustomProviderNames();
107192
- if (!existsSync53(cacheFile)) {
107712
+ if (!existsSync55(cacheFile)) {
107193
107713
  if (customProviders.length > 0) {
107194
107714
  return { providers: customProviders, modelCount: 0, cacheExists: true };
107195
107715
  }
@@ -107249,7 +107769,7 @@ function loadOmoConfig2() {
107249
107769
 
107250
107770
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-details.ts
107251
107771
  init_shared();
107252
- import { join as join83 } from "path";
107772
+ import { join as join88 } from "path";
107253
107773
 
107254
107774
  // packages/omo-opencode/src/cli/doctor/checks/model-resolution-variant.ts
107255
107775
  function formatModelWithVariant(model, variant) {
@@ -107291,7 +107811,7 @@ function formatCapabilityResolutionLabel(mode) {
107291
107811
  }
107292
107812
  function buildModelResolutionDetails(options) {
107293
107813
  const details = [];
107294
- const cacheFile = join83(getOpenCodeCacheDir(), "models.json");
107814
+ const cacheFile = join88(getOpenCodeCacheDir(), "models.json");
107295
107815
  details.push("\u2550\u2550\u2550 Available Models (from cache) \u2550\u2550\u2550");
107296
107816
  details.push("");
107297
107817
  if (options.available.cacheExists) {
@@ -107447,11 +107967,13 @@ async function checkModels() {
107447
107967
 
107448
107968
  // packages/omo-opencode/src/cli/doctor/checks/legacy-config-leftovers.ts
107449
107969
  init_config_migration();
107450
- import { posix as posix11, win32 as win327 } from "path";
107970
+ init_dori_section_rename();
107971
+ import { posix as posix12, win32 as win329 } from "path";
107451
107972
  function findLegacyConfigLeftovers(options) {
107452
- const pathOperations = options.pathOperations ?? (process.platform === "win32" ? win327 : posix11);
107973
+ const pathOperations = options.pathOperations ?? (process.platform === "win32" ? win329 : posix12);
107453
107974
  const paths = createLegacyConfigMigrationPlans({
107454
107975
  cwd: options.cwd,
107976
+ doriSectionRename,
107455
107977
  environment: options.environment ?? process.env,
107456
107978
  homeDir: options.homeDir,
107457
107979
  pathOperations,
@@ -107638,8 +108160,8 @@ async function checkBrowserProvider() {
107638
108160
  init_src4();
107639
108161
  init_main();
107640
108162
  init_config_migration();
107641
- import { existsSync as existsSync54, readFileSync as readFileSync36 } from "fs";
107642
- import { join as join84 } from "path";
108163
+ import { existsSync as existsSync56, readFileSync as readFileSync36 } from "fs";
108164
+ import { join as join89 } from "path";
107643
108165
  var CANONICAL_REPLACEMENT = new Map([
107644
108166
  ["variant", "reasoning"],
107645
108167
  ["reasoningEffort", "reasoning"],
@@ -107650,14 +108172,14 @@ var CANONICAL_REPLACEMENT = new Map([
107650
108172
  var MIGRATE_SUFFIX = ", or run: oh-my-openagent config migrate";
107651
108173
  var TUNING_CONTAINERS = new Set(["agents", "categories", "models"]);
107652
108174
  var PASSTHROUGH_CONTAINERS = new Set(["provider_options", "providerOptions"]);
107653
- function isRecord16(value) {
108175
+ function isRecord17(value) {
107654
108176
  return value !== null && typeof value === "object" && !Array.isArray(value);
107655
108177
  }
107656
108178
  function isHarnessBlock(key) {
107657
108179
  return key.startsWith("[") && key.endsWith("]");
107658
108180
  }
107659
108181
  function collectIssues(configPath, value, prefix, fixSuffix) {
107660
- if (!isRecord16(value))
108182
+ if (!isRecord17(value))
107661
108183
  return [];
107662
108184
  const issues = [];
107663
108185
  for (const [key, child] of Object.entries(value)) {
@@ -107673,7 +108195,7 @@ function collectIssues(configPath, value, prefix, fixSuffix) {
107673
108195
  });
107674
108196
  continue;
107675
108197
  }
107676
- if (!isRecord16(child))
108198
+ if (!isRecord17(child))
107677
108199
  continue;
107678
108200
  if (PASSTHROUGH_CONTAINERS.has(key))
107679
108201
  continue;
@@ -107692,7 +108214,7 @@ function collectIssues(configPath, value, prefix, fixSuffix) {
107692
108214
  return issues;
107693
108215
  }
107694
108216
  function migrateFixSuffix(parsed) {
107695
- if (isRecord16(parsed) && hasMigrationMarker(parsed, REASONING_UNIFICATION_MIGRATION_ID))
108217
+ if (isRecord17(parsed) && hasMigrationMarker(parsed, REASONING_UNIFICATION_MIGRATION_ID))
107696
108218
  return "";
107697
108219
  return MIGRATE_SUFFIX;
107698
108220
  }
@@ -107700,13 +108222,13 @@ function userConfigPaths() {
107700
108222
  const home = process.env.HOME ?? process.env.USERPROFILE;
107701
108223
  if (home === undefined || home.length === 0)
107702
108224
  return [];
107703
- return [join84(home, ".omo", "omo.jsonc"), join84(home, ".omo", "omo.json")];
108225
+ return [join89(home, ".omo", "omo.jsonc"), join89(home, ".omo", "omo.json")];
107704
108226
  }
107705
108227
  async function checkDeprecatedReasoningKeys() {
107706
108228
  const issues = [];
107707
108229
  const scanned = [];
107708
108230
  for (const configPath of userConfigPaths()) {
107709
- if (!existsSync54(configPath))
108231
+ if (!existsSync56(configPath))
107710
108232
  continue;
107711
108233
  scanned.push(configPath);
107712
108234
  const parsed = parse2(readFileSync36(configPath, "utf-8"));
@@ -107722,12 +108244,12 @@ async function checkDeprecatedReasoningKeys() {
107722
108244
  }
107723
108245
 
107724
108246
  // packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
107725
- import { existsSync as existsSync55 } from "fs";
108247
+ import { existsSync as existsSync57 } from "fs";
107726
108248
  import { createRequire as createRequire3 } from "module";
107727
- import { homedir as homedir20 } from "os";
107728
- import { join as join89 } from "path";
108249
+ import { homedir as homedir23 } from "os";
108250
+ import { join as join94 } from "path";
107729
108251
  // packages/comment-checker-core/src/release.ts
107730
- import { join as join85 } from "path";
108252
+ import { join as join90 } from "path";
107731
108253
  var COMMENT_CHECKER_RELEASE_VERSION = "0.8.0";
107732
108254
  function commentCheckerBinaryName(platform) {
107733
108255
  return platform === "win32" ? "comment-checker.exe" : "comment-checker";
@@ -107735,26 +108257,26 @@ function commentCheckerBinaryName(platform) {
107735
108257
  function commentCheckerCacheDir(input) {
107736
108258
  if (input.platform === "win32") {
107737
108259
  const localAppData = input.env.LOCALAPPDATA || input.env.APPDATA;
107738
- const base = localAppData || join85(input.homedir, "AppData", "Local");
107739
- return join85(base, input.cacheDirName, "bin");
108260
+ const base = localAppData || join90(input.homedir, "AppData", "Local");
108261
+ return join90(base, input.cacheDirName, "bin");
107740
108262
  }
107741
- const base = input.env.XDG_CACHE_HOME || join85(input.homedir, ".cache");
107742
- return join85(base, input.cacheDirName, "bin");
108263
+ const base = input.env.XDG_CACHE_HOME || join90(input.homedir, ".cache");
108264
+ return join90(base, input.cacheDirName, "bin");
107743
108265
  }
107744
108266
  // packages/comment-checker-core/src/cached-release.ts
107745
108267
  import { readFileSync as readFileSync37, writeFileSync as writeFileSync12 } from "fs";
107746
- import { join as join86 } from "path";
108268
+ import { join as join91 } from "path";
107747
108269
  var COMMENT_CHECKER_VERSION_MARKER = "comment-checker.version";
107748
108270
  function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSync37(path, "utf-8")) {
107749
108271
  try {
107750
- return readFile(join86(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
108272
+ return readFile(join91(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
107751
108273
  } catch {
107752
108274
  return false;
107753
108275
  }
107754
108276
  }
107755
108277
  // packages/comment-checker-core/src/package-binary.ts
107756
108278
  import { createRequire as createRequire2 } from "module";
107757
- import { dirname as dirname33, join as join87 } from "path";
108279
+ import { dirname as dirname36, join as join92 } from "path";
107758
108280
  var COMMENT_CHECKER_PACKAGE_NAME = "@code-yeongyu/comment-checker";
107759
108281
  function isModuleResolutionMiss(error) {
107760
108282
  return error instanceof Error || typeof error === "object" && error !== null && "name" in error && error.name === "ResolveMessage";
@@ -107762,18 +108284,18 @@ function isModuleResolutionMiss(error) {
107762
108284
  function findCommentCheckerPackageBinary(input) {
107763
108285
  const packageName = input.packageName ?? COMMENT_CHECKER_PACKAGE_NAME;
107764
108286
  const platformKey = `${input.platform ?? process.platform}-${input.arch ?? process.arch}`;
107765
- const packageDir = dirname33(input.packageJsonPath);
108287
+ const packageDir = dirname36(input.packageJsonPath);
107766
108288
  const candidates = [
107767
108289
  resolvePlatformPackageBinary(input.packageJsonPath, `${packageName}-${platformKey}`, input.binaryName),
107768
- join87(packageDir, "vendor", platformKey, input.binaryName),
107769
- join87(packageDir, "bin", input.binaryName)
108290
+ join92(packageDir, "vendor", platformKey, input.binaryName),
108291
+ join92(packageDir, "bin", input.binaryName)
107770
108292
  ];
107771
108293
  return candidates.find((candidate) => candidate !== null && input.existsSync(candidate)) ?? null;
107772
108294
  }
107773
108295
  function resolvePlatformPackageBinary(packageJsonPath, platformPackageName, binaryName) {
107774
108296
  try {
107775
108297
  const manifestPath = createRequire2(packageJsonPath).resolve(`${platformPackageName}/package.json`);
107776
- return join87(dirname33(manifestPath), "bin", binaryName);
108298
+ return join92(dirname36(manifestPath), "bin", binaryName);
107777
108299
  } catch (error) {
107778
108300
  if (isModuleResolutionMiss(error))
107779
108301
  return null;
@@ -107784,18 +108306,18 @@ function resolvePlatformPackageBinary(packageJsonPath, platformPackageName, bina
107784
108306
  init_src();
107785
108307
 
107786
108308
  // packages/omo-opencode/src/hooks/comment-checker/downloader.ts
107787
- import { join as join88 } from "path";
107788
- import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
108309
+ import { join as join93 } from "path";
108310
+ import { homedir as homedir22, tmpdir as tmpdir4 } from "os";
107789
108311
  init_binary_downloader();
107790
108312
  init_logger2();
107791
108313
  init_plugin_identity();
107792
108314
  var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
107793
- var DEBUG_FILE = join88(tmpdir4(), "comment-checker-debug.log");
108315
+ var DEBUG_FILE = join93(tmpdir4(), "comment-checker-debug.log");
107794
108316
  function getCacheDir2() {
107795
108317
  return commentCheckerCacheDir({
107796
108318
  platform: process.platform,
107797
108319
  env: process.env,
107798
- homedir: homedir19(),
108320
+ homedir: homedir22(),
107799
108321
  cacheDirName: CACHE_DIR_NAME
107800
108322
  });
107801
108323
  }
@@ -107849,7 +108371,7 @@ async function getBinaryVersion(binary) {
107849
108371
  }
107850
108372
  }
107851
108373
  async function checkAstGrepCli() {
107852
- const runtimeDir = astGrepRuntimeDir(join89(homedir20(), ".omo"));
108374
+ const runtimeDir = astGrepRuntimeDir(join94(homedir23(), ".omo"));
107853
108375
  const sgPath = findSgBinarySync({ runtimeDir });
107854
108376
  if (sgPath === null) {
107855
108377
  return {
@@ -107877,8 +108399,8 @@ function resolveCommentCheckerPackageJson() {
107877
108399
  function findCommentCheckerPackageBinary2(baseDirOverride, resolvePackageJsonPath = resolveCommentCheckerPackageJson) {
107878
108400
  const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
107879
108401
  try {
107880
- const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join89(baseDirOverride, "package.json");
107881
- return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync55 });
108402
+ const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join94(baseDirOverride, "package.json");
108403
+ return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync57 });
107882
108404
  } catch (error) {
107883
108405
  if (!(error instanceof Error) && !isModuleResolutionFailure(error))
107884
108406
  throw error;
@@ -108023,8 +108545,8 @@ async function getGhCliInfo(dependencies = {}) {
108023
108545
  // packages/omo-opencode/src/mcp/lsp.ts
108024
108546
  init_zod();
108025
108547
  init_opencode_config_dir();
108026
- import { existsSync as existsSync56, readFileSync as readFileSync38 } from "fs";
108027
- import { delimiter as delimiter3, dirname as dirname35, resolve as resolve23 } from "path";
108548
+ import { existsSync as existsSync58, readFileSync as readFileSync38 } from "fs";
108549
+ import { delimiter as delimiter3, dirname as dirname38, resolve as resolve26 } from "path";
108028
108550
  import { fileURLToPath as fileURLToPath7 } from "url";
108029
108551
 
108030
108552
  // packages/omo-opencode/src/mcp/cli-suffix.ts
@@ -108037,7 +108559,7 @@ function hasCliSuffix(candidatePath, suffix) {
108037
108559
 
108038
108560
  // packages/omo-opencode/src/mcp/runtime-executable.ts
108039
108561
  init_bun_which_shim();
108040
- import { basename as basename11 } from "path";
108562
+ import { basename as basename12 } from "path";
108041
108563
  var NODE_EXECUTABLE_NAMES = new Set(["node", "node.exe"]);
108042
108564
  function isUnsafeCommandName2(commandName) {
108043
108565
  if (commandName.length === 0)
@@ -108053,7 +108575,7 @@ function isUnsafeCommandName2(commandName) {
108053
108575
  return false;
108054
108576
  }
108055
108577
  function isNodeExecPath(execPath) {
108056
- return NODE_EXECUTABLE_NAMES.has(basename11(execPath).toLowerCase());
108578
+ return NODE_EXECUTABLE_NAMES.has(basename12(execPath).toLowerCase());
108057
108579
  }
108058
108580
  function resolveRuntimeExecutable(commandName, options = {}) {
108059
108581
  if (isUnsafeCommandName2(commandName)) {
@@ -108071,7 +108593,7 @@ function resolveRuntimeExecutable(commandName, options = {}) {
108071
108593
  }
108072
108594
 
108073
108595
  // packages/omo-opencode/src/mcp/shared/ancestor-cli-resolver.ts
108074
- import { resolve as resolve22 } from "path";
108596
+ import { resolve as resolve25 } from "path";
108075
108597
  function resolveJavaScriptRuntime(resolveExecutable) {
108076
108598
  const node = resolveExecutable("node");
108077
108599
  return node.available ? node : resolveExecutable("bun");
@@ -108079,9 +108601,9 @@ function resolveJavaScriptRuntime(resolveExecutable) {
108079
108601
  function createAncestorCliCandidates(options) {
108080
108602
  const candidates = [];
108081
108603
  const seenPaths = new Set;
108082
- let currentDirectory = resolve22(options.startDirectory);
108604
+ let currentDirectory = resolve25(options.startDirectory);
108083
108605
  while (true) {
108084
- const distCliPath = resolve22(currentDirectory, options.packageRel, options.distCliRel);
108606
+ const distCliPath = resolve25(currentDirectory, options.packageRel, options.distCliRel);
108085
108607
  if (!seenPaths.has(distCliPath)) {
108086
108608
  const runtime = resolveJavaScriptRuntime(options.resolveExecutable);
108087
108609
  seenPaths.add(distCliPath);
@@ -108093,7 +108615,7 @@ function createAncestorCliCandidates(options) {
108093
108615
  runtimeAvailable: runtime.available
108094
108616
  });
108095
108617
  }
108096
- const sourceCliPath = resolve22(currentDirectory, options.packageRel, options.sourceCliRel);
108618
+ const sourceCliPath = resolve25(currentDirectory, options.packageRel, options.sourceCliRel);
108097
108619
  if (!seenPaths.has(sourceCliPath)) {
108098
108620
  const runtime = options.resolveExecutable("bun");
108099
108621
  const sourceCandidateAvailable = options.isSourceCandidateAvailable?.({
@@ -108110,7 +108632,7 @@ function createAncestorCliCandidates(options) {
108110
108632
  runtimeAvailable: runtime.available
108111
108633
  });
108112
108634
  }
108113
- const parentDirectory = resolve22(currentDirectory, "..");
108635
+ const parentDirectory = resolve25(currentDirectory, "..");
108114
108636
  if (parentDirectory === currentDirectory)
108115
108637
  return candidates;
108116
108638
  currentDirectory = parentDirectory;
@@ -108155,7 +108677,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
108155
108677
  ].join(";");
108156
108678
  function getModuleDirectory(moduleUrl) {
108157
108679
  try {
108158
- return dirname35(fileURLToPath7(moduleUrl));
108680
+ return dirname38(fileURLToPath7(moduleUrl));
108159
108681
  } catch (error) {
108160
108682
  if (!(error instanceof Error))
108161
108683
  throw error;
@@ -108163,11 +108685,11 @@ function getModuleDirectory(moduleUrl) {
108163
108685
  }
108164
108686
  }
108165
108687
  function findBootstrapRoot(candidates, pathExists) {
108166
- return candidates.find((candidate) => pathExists(resolve23(candidate.root, "package.json")))?.root ?? process.cwd();
108688
+ return candidates.find((candidate) => pathExists(resolve26(candidate.root, "package.json")))?.root ?? process.cwd();
108167
108689
  }
108168
108690
  function readDaemonPackageVersion(root) {
108169
108691
  try {
108170
- const packageJson = JSON.parse(readFileSync38(resolve23(root, PACKAGE_REL, "package.json"), "utf-8"));
108692
+ const packageJson = JSON.parse(readFileSync38(resolve26(root, PACKAGE_REL, "package.json"), "utf-8"));
108171
108693
  return DaemonPackageSchema.parse(packageJson).version;
108172
108694
  } catch (error) {
108173
108695
  if (!(error instanceof Error))
@@ -108179,17 +108701,17 @@ function createBootstrapCandidate(root, pathExists, resolveExecutable) {
108179
108701
  const runtime = resolveJavaScriptRuntime(resolveExecutable);
108180
108702
  const bun = resolveExecutable("bun");
108181
108703
  const npm = resolveExecutable("npm");
108182
- const packageManifestPath = resolve23(root, PACKAGE_REL, "package.json");
108704
+ const packageManifestPath = resolve26(root, PACKAGE_REL, "package.json");
108183
108705
  return {
108184
108706
  command: [runtime.command, "-e", LSP_BOOTSTRAP_SCRIPT, root, npm.command, bun.command],
108185
108707
  root,
108186
- path: resolve23(root, PACKAGE_REL, DIST_CLI_REL),
108708
+ path: resolve26(root, PACKAGE_REL, DIST_CLI_REL),
108187
108709
  exists: runtime.available && npm.available && pathExists(packageManifestPath),
108188
108710
  runtimeAvailable: runtime.available
108189
108711
  };
108190
108712
  }
108191
108713
  function resolveLspCommand(options = {}) {
108192
- const pathExists = options.exists ?? existsSync56;
108714
+ const pathExists = options.exists ?? existsSync58;
108193
108715
  const resolveExecutable = options.resolveExecutable ?? resolveRuntimeExecutable;
108194
108716
  const moduleDirectory = getModuleDirectory(options.moduleUrl ?? import.meta.url);
108195
108717
  const candidates = moduleDirectory ? createAncestorCliCandidates({
@@ -108199,7 +108721,7 @@ function resolveLspCommand(options = {}) {
108199
108721
  sourceCliRel: SOURCE_CLI_REL,
108200
108722
  pathExists,
108201
108723
  resolveExecutable,
108202
- isSourceCandidateAvailable: ({ root }) => pathExists(resolve23(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
108724
+ isSourceCandidateAvailable: ({ root }) => pathExists(resolve26(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
108203
108725
  }) : [];
108204
108726
  const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
108205
108727
  if (distCandidate) {
@@ -108213,7 +108735,7 @@ function resolveLspCommand(options = {}) {
108213
108735
  }
108214
108736
  function createLspMcpConfig(options = {}) {
108215
108737
  const resolvedCommand = resolveLspCommand(options);
108216
- const cwd = resolve23(options.cwd ?? process.cwd());
108738
+ const cwd = resolve26(options.cwd ?? process.cwd());
108217
108739
  const configDir = getOpenCodeConfigDir({ binary: "opencode" });
108218
108740
  const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
108219
108741
  return {
@@ -108223,9 +108745,9 @@ function createLspMcpConfig(options = {}) {
108223
108745
  cwd,
108224
108746
  environment: {
108225
108747
  LSP_TOOLS_MCP_CWD: cwd,
108226
- LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve23(cwd, configPath)).join(delimiter3),
108227
- LSP_TOOLS_MCP_USER_CONFIG: resolve23(configDir, "lsp.json"),
108228
- LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve23(configDir, "lsp-install-decisions.json"),
108748
+ LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve26(cwd, configPath)).join(delimiter3),
108749
+ LSP_TOOLS_MCP_USER_CONFIG: resolve26(configDir, "lsp.json"),
108750
+ LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve26(configDir, "lsp-install-decisions.json"),
108229
108751
  ...sourceVersion ? {
108230
108752
  [OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
108231
108753
  [OMO_LSP_DAEMON_VERSION]: sourceVersion
@@ -108250,21 +108772,21 @@ function getInstalledLspServers(options = {}) {
108250
108772
 
108251
108773
  // packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
108252
108774
  init_shared();
108253
- import { existsSync as existsSync57, readFileSync as readFileSync39 } from "fs";
108254
- import { homedir as homedir21 } from "os";
108255
- import { join as join90 } from "path";
108775
+ import { existsSync as existsSync59, readFileSync as readFileSync39 } from "fs";
108776
+ import { homedir as homedir24 } from "os";
108777
+ import { join as join95 } from "path";
108256
108778
  var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
108257
108779
  function getMcpConfigPaths() {
108258
108780
  return [
108259
- join90(homedir21(), ".claude", ".mcp.json"),
108260
- join90(process.cwd(), ".mcp.json"),
108261
- join90(process.cwd(), ".claude", ".mcp.json")
108781
+ join95(homedir24(), ".claude", ".mcp.json"),
108782
+ join95(process.cwd(), ".mcp.json"),
108783
+ join95(process.cwd(), ".claude", ".mcp.json")
108262
108784
  ];
108263
108785
  }
108264
108786
  function loadUserMcpConfig() {
108265
108787
  const servers = {};
108266
108788
  for (const configPath of getMcpConfigPaths()) {
108267
- if (!existsSync57(configPath))
108789
+ if (!existsSync59(configPath))
108268
108790
  continue;
108269
108791
  try {
108270
108792
  const content = readFileSync39(configPath, "utf-8");
@@ -108402,12 +108924,12 @@ async function checkTools() {
108402
108924
 
108403
108925
  // packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
108404
108926
  init_src5();
108405
- import { existsSync as existsSync58, readFileSync as readFileSync40 } from "fs";
108927
+ import { existsSync as existsSync60, readFileSync as readFileSync40 } from "fs";
108406
108928
  function isTelemetryState(value) {
108407
108929
  return value !== null && typeof value === "object" && !Array.isArray(value);
108408
108930
  }
108409
108931
  function readLastActiveDay(stateFilePath) {
108410
- if (!existsSync58(stateFilePath)) {
108932
+ if (!existsSync60(stateFilePath)) {
108411
108933
  return "never";
108412
108934
  }
108413
108935
  let parsed;
@@ -108470,17 +108992,17 @@ async function probeBinary(cmd, args, spawnImpl) {
108470
108992
  }
108471
108993
 
108472
108994
  // packages/team-core/src/team-registry/paths.ts
108473
- import { homedir as homedir22 } from "os";
108995
+ import { homedir as homedir25 } from "os";
108474
108996
  import path13 from "path";
108475
108997
  function resolveBaseDir(config) {
108476
- return expandHomeDirectory(config.base_dir ?? path13.join(homedir22(), ".omo"));
108998
+ return expandHomeDirectory(config.base_dir ?? path13.join(homedir25(), ".omo"));
108477
108999
  }
108478
109000
  function expandHomeDirectory(directoryPath) {
108479
109001
  if (directoryPath === "~") {
108480
- return homedir22();
109002
+ return homedir25();
108481
109003
  }
108482
109004
  if (directoryPath.startsWith("~/") || directoryPath.startsWith("~\\")) {
108483
- return path13.join(homedir22(), directoryPath.slice(2));
109005
+ return path13.join(homedir25(), directoryPath.slice(2));
108484
109006
  }
108485
109007
  return directoryPath;
108486
109008
  }
@@ -108537,10 +109059,10 @@ async function pathExists2(dir) {
108537
109059
 
108538
109060
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
108539
109061
  init_src();
108540
- import { existsSync as existsSync59 } from "fs";
109062
+ import { existsSync as existsSync61 } from "fs";
108541
109063
  import { lstat as lstat16, readdir as readdir14, readFile as readFile30 } from "fs/promises";
108542
- import { homedir as homedir23 } from "os";
108543
- import { basename as basename12, join as join91, resolve as resolve24 } from "path";
109064
+ import { homedir as homedir26 } from "os";
109065
+ import { basename as basename13, join as join96, resolve as resolve27 } from "path";
108544
109066
  // packages/omo-opencode/package.json
108545
109067
  var package_default3 = {
108546
109068
  name: "@oh-my-opencode/omo-opencode",
@@ -108557,6 +109079,10 @@ var package_default3 = {
108557
109079
  types: "./src/cli/service-auth/index.ts",
108558
109080
  import: "./src/cli/service-auth/index.ts"
108559
109081
  },
109082
+ "./config-migration/dori-section-rename": {
109083
+ types: "./src/config-migration/dori-section-rename.ts",
109084
+ import: "./src/config-migration/dori-section-rename.ts"
109085
+ },
108560
109086
  "./binary-downloader": {
108561
109087
  types: "./src/shared/binary-downloader.ts",
108562
109088
  import: "./src/shared/binary-downloader.ts"
@@ -108599,7 +109125,7 @@ var package_default3 = {
108599
109125
 
108600
109126
  // packages/omo-opencode/src/cli/doctor/checks/codex.ts
108601
109127
  var MARKETPLACE_NAME = "sisyphuslabs";
108602
- var PLUGIN_NAME2 = "omo";
109128
+ var PLUGIN_NAME3 = "omo";
108603
109129
  var COMPANION_PLUGIN_KEY = "codex@openai-codex";
108604
109130
  var DEFAULT_PLUGIN_VERSION = "0.1.0";
108605
109131
  var COMPANION_LIFECYCLE_EVENTS = new Set(["session_start", "stop"]);
@@ -108614,20 +109140,20 @@ var CODEX_BIN_NAMES = [
108614
109140
  "omo-git-bash-hook"
108615
109141
  ];
108616
109142
  async function gatherCodexSummary(deps = {}) {
108617
- const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join91(homedir23(), ".codex"));
109143
+ const codexHome = resolve27(deps.codexHome ?? process.env.CODEX_HOME ?? join96(homedir26(), ".codex"));
108618
109144
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
108619
109145
  const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
108620
109146
  const pluginRoot = await resolveInstalledPluginRoot(codexHome);
108621
- const manifest = pluginRoot === null ? null : await readJson(join91(pluginRoot, ".codex-plugin", "plugin.json"));
108622
- const installSnapshot = pluginRoot === null ? null : await readJson(join91(pluginRoot, "lazycodex-install.json"));
108623
- const configPath = join91(codexHome, "config.toml");
109147
+ const manifest = pluginRoot === null ? null : await readJson(join96(pluginRoot, ".codex-plugin", "plugin.json"));
109148
+ const installSnapshot = pluginRoot === null ? null : await readJson(join96(pluginRoot, "lazycodex-install.json"));
109149
+ const configPath = join96(codexHome, "config.toml");
108624
109150
  const pluginVersion = stringField(manifest, "version");
108625
109151
  return {
108626
109152
  codexPath: detection.found && "path" in detection ? detection.path : null,
108627
109153
  codexSource: detection.found ? detection.source : null,
108628
109154
  codexAppId: detection.found && "appId" in detection ? detection.appId : null,
108629
109155
  marketplaceName: MARKETPLACE_NAME,
108630
- pluginName: PLUGIN_NAME2,
109156
+ pluginName: PLUGIN_NAME3,
108631
109157
  pluginVersion,
108632
109158
  pluginVersionStamped: pluginVersion !== null && pluginVersion !== DEFAULT_PLUGIN_VERSION,
108633
109159
  installerVersion: deps.installerVersion ?? package_default3.version,
@@ -108677,7 +109203,7 @@ function buildCodexIssues(summary) {
108677
109203
  if (summary.pluginRoot === null) {
108678
109204
  issues.push({
108679
109205
  title: "OMO Codex plugin is not installed",
108680
- description: `Expected cached plugin at ${join91("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
109206
+ description: `Expected cached plugin at ${join96("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME3, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
108681
109207
  fix: "Run: npx lazycodex-ai install",
108682
109208
  severity: "error",
108683
109209
  affects: ["plugin loading"]
@@ -108742,15 +109268,15 @@ function buildCodexIssues(summary) {
108742
109268
  return issues;
108743
109269
  }
108744
109270
  async function resolveInstalledPluginRoot(codexHome) {
108745
- const pluginRoot = join91(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
108746
- if (!existsSync59(pluginRoot))
109271
+ const pluginRoot = join96(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME3);
109272
+ if (!existsSync61(pluginRoot))
108747
109273
  return null;
108748
109274
  const versions = await readdir14(pluginRoot, { withFileTypes: true });
108749
109275
  const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
108750
- return candidates.length === 0 ? null : join91(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
109276
+ return candidates.length === 0 ? null : join96(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
108751
109277
  }
108752
109278
  async function readCodexConfigSummary(configPath) {
108753
- if (!existsSync59(configPath)) {
109279
+ if (!existsSync61(configPath)) {
108754
109280
  return {
108755
109281
  exists: false,
108756
109282
  marketplaceConfigured: false,
@@ -108775,17 +109301,17 @@ async function readCodexConfigSummary(configPath) {
108775
109301
  async function readLinkedBins(binDir) {
108776
109302
  const linked = [];
108777
109303
  for (const name of CODEX_BIN_NAMES) {
108778
- if (await pathExists3(join91(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
109304
+ if (await pathExists3(join96(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
108779
109305
  linked.push(name);
108780
109306
  }
108781
109307
  return linked;
108782
109308
  }
108783
109309
  async function readLinkedAgents(codexHome) {
108784
- const agentsDir = join91(codexHome, "agents");
108785
- if (!existsSync59(agentsDir))
109310
+ const agentsDir = join96(codexHome, "agents");
109311
+ if (!existsSync61(agentsDir))
108786
109312
  return [];
108787
109313
  const entries = await readdir14(agentsDir, { withFileTypes: true });
108788
- return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename12(entry.name, ".toml")).sort();
109314
+ return entries.filter((entry) => entry.isFile() || entry.isSymbolicLink()).map((entry) => basename13(entry.name, ".toml")).sort();
108789
109315
  }
108790
109316
  async function readJson(path) {
108791
109317
  try {
@@ -108914,24 +109440,24 @@ function resolveLatestVersion(input) {
108914
109440
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
108915
109441
  init_src();
108916
109442
  import { readdir as readdir15, readFile as readFile31, stat as stat7 } from "fs/promises";
108917
- import { homedir as homedir24 } from "os";
108918
- import { dirname as dirname36, isAbsolute as isAbsolute14, join as join92, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
109443
+ import { homedir as homedir27 } from "os";
109444
+ import { dirname as dirname39, isAbsolute as isAbsolute15, join as join97, relative as relative9, resolve as resolve28, sep as sep10 } from "path";
108919
109445
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
108920
109446
  var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
108921
109447
  var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
108922
- var BOOTSTRAP_PENDING_MESSAGE = "bootstrap pending \u2014 start a Codex session";
109448
+ var BOOTSTRAP_PENDING_MESSAGE = "bootstrap pending: start a Codex session";
108923
109449
  var REINSTALL_FIX = "Reinstall: npx lazycodex-ai install (or upgrade: codex plugin marketplace upgrade sisyphuslabs)";
108924
109450
  async function checkCodexComponents(deps = {}) {
108925
109451
  const env = deps.env ?? process.env;
108926
109452
  const platform = deps.platform ?? process.platform;
108927
109453
  const arch = deps.arch ?? process.arch;
108928
- const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ?? join92(homedir24(), ".codex"));
109454
+ const codexHome = resolve28(deps.codexHome ?? env["CODEX_HOME"] ?? join97(homedir27(), ".codex"));
108929
109455
  const summary = await gatherCodexSummary({ ...deps, codexHome });
108930
109456
  if (summary.pluginRoot === null) {
108931
109457
  return {
108932
109458
  name: CODEX_COMPONENTS_CHECK_NAME,
108933
109459
  status: "skip",
108934
- message: "OMO Codex plugin is not installed \u2014 skipping component checks",
109460
+ message: "OMO Codex plugin is not installed: skipping component checks",
108935
109461
  details: [`plugin root: not installed under ${codexHome}`],
108936
109462
  issues: []
108937
109463
  };
@@ -108950,7 +109476,7 @@ async function checkCodexComponents(deps = {}) {
108950
109476
  });
108951
109477
  }
108952
109478
  const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
108953
- const runtimeSgPath = join92(runtimeSgDir, sgBinaryName(platform));
109479
+ const runtimeSgPath = join97(runtimeSgDir, sgBinaryName(platform));
108954
109480
  const sg = findSgBinarySync({
108955
109481
  arch,
108956
109482
  env,
@@ -108987,12 +109513,12 @@ async function auditBundleTargets(pluginRoot) {
108987
109513
  let referencedCount = 0;
108988
109514
  for (const manifestPath of await findManifestPaths(pluginRoot, ".mcp.json")) {
108989
109515
  const manifest = await readJson2(manifestPath);
108990
- if (manifest === null || !isRecord18(manifest["mcpServers"]))
109516
+ if (manifest === null || !isRecord19(manifest["mcpServers"]))
108991
109517
  continue;
108992
- const manifestRoot = dirname36(manifestPath);
108993
- const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
109518
+ const manifestRoot = dirname39(manifestPath);
109519
+ const isRootManifest = resolve28(manifestRoot) === resolve28(pluginRoot);
108994
109520
  for (const server of Object.values(manifest["mcpServers"])) {
108995
- if (!isRecord18(server) || !Array.isArray(server["args"]))
109521
+ if (!isRecord19(server) || !Array.isArray(server["args"]))
108996
109522
  continue;
108997
109523
  for (const arg of server["args"]) {
108998
109524
  if (typeof arg !== "string" || !isPluginRuntimePathArg(arg))
@@ -109010,7 +109536,7 @@ async function auditBundleTargets(pluginRoot) {
109010
109536
  continue;
109011
109537
  const commands = [];
109012
109538
  collectHookCommands(manifest, commands);
109013
- const hookPluginRoot = dirname36(dirname36(hookManifestPath));
109539
+ const hookPluginRoot = dirname39(dirname39(hookManifestPath));
109014
109540
  for (const command of commands) {
109015
109541
  for (const relativePath of extractPluginRootPaths(command)) {
109016
109542
  referencedCount += 1;
@@ -109032,9 +109558,9 @@ function recordBrokenTarget(broken, classified, origin) {
109032
109558
  broken.push(entry);
109033
109559
  }
109034
109560
  async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEscape) {
109035
- const targetPath = resolve25(baseRoot, relativePath);
109036
- const bundleRootPath = resolve25(bundleRoot);
109037
- const bundleRootPrefix = bundleRootPath.endsWith(sep9) ? bundleRootPath : `${bundleRootPath}${sep9}`;
109561
+ const targetPath = resolve28(baseRoot, relativePath);
109562
+ const bundleRootPath = resolve28(bundleRoot);
109563
+ const bundleRootPrefix = bundleRootPath.endsWith(sep10) ? bundleRootPath : `${bundleRootPath}${sep10}`;
109038
109564
  if (targetPath !== bundleRootPath && !targetPath.startsWith(bundleRootPrefix)) {
109039
109565
  if (allowEscape)
109040
109566
  return null;
@@ -109049,7 +109575,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
109049
109575
  }
109050
109576
  async function findHookManifestPaths(root) {
109051
109577
  const paths = await findManifestPaths(root, "hooks.json");
109052
- return paths.filter((path) => dirname36(path).endsWith(`${sep9}hooks`));
109578
+ return paths.filter((path) => dirname39(path).endsWith(`${sep10}hooks`));
109053
109579
  }
109054
109580
  async function findManifestPaths(root, manifestName) {
109055
109581
  let entries;
@@ -109062,7 +109588,7 @@ async function findManifestPaths(root, manifestName) {
109062
109588
  for (const entry of entries) {
109063
109589
  if (entry.name === "node_modules" || entry.name === ".git")
109064
109590
  continue;
109065
- const entryPath = join92(root, entry.name);
109591
+ const entryPath = join97(root, entry.name);
109066
109592
  if (entry.isDirectory()) {
109067
109593
  paths.push(...await findManifestPaths(entryPath, manifestName));
109068
109594
  continue;
@@ -109078,7 +109604,7 @@ function collectHookCommands(value, commands) {
109078
109604
  collectHookCommands(item, commands);
109079
109605
  return;
109080
109606
  }
109081
- if (!isRecord18(value))
109607
+ if (!isRecord19(value))
109082
109608
  return;
109083
109609
  if (value["type"] === "command") {
109084
109610
  if (typeof value["command"] === "string")
@@ -109103,21 +109629,21 @@ function extractPluginRootPaths(command) {
109103
109629
  }
109104
109630
  function isPluginRuntimePathArg(arg) {
109105
109631
  const normalized = normalizePathSeparators(arg);
109106
- return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute14(arg));
109632
+ return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute15(arg));
109107
109633
  }
109108
109634
  function runtimeSgDirectory(codexHome, platform, arch) {
109109
- return join92(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
109635
+ return join97(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
109110
109636
  }
109111
109637
  function describeSgSource(sgPath, env, runtimeSgDir, platform) {
109112
109638
  const override = env[SG_PATH_ENV_KEY]?.trim();
109113
109639
  if (override !== undefined && override.length > 0 && sgPath === override)
109114
109640
  return `env override ${SG_PATH_ENV_KEY}`;
109115
- if (sgPath === join92(runtimeSgDir, sgBinaryName(platform)))
109641
+ if (sgPath === join97(runtimeSgDir, sgBinaryName(platform)))
109116
109642
  return "runtime dir";
109117
109643
  return "PATH";
109118
109644
  }
109119
109645
  async function readBootstrapStateSummary(codexHome) {
109120
- const statePath = join92(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
109646
+ const statePath = join97(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
109121
109647
  const raw = await readJson2(statePath);
109122
109648
  if (raw === null)
109123
109649
  return null;
@@ -109133,7 +109659,7 @@ function parseDegradedEntries(value) {
109133
109659
  return [];
109134
109660
  const entries = [];
109135
109661
  for (const item of value) {
109136
- if (!isRecord18(item))
109662
+ if (!isRecord19(item))
109137
109663
  continue;
109138
109664
  if (typeof item["component"] !== "string" || typeof item["reason"] !== "string")
109139
109665
  continue;
@@ -109167,7 +109693,7 @@ function degradedDetailLines(entries) {
109167
109693
  async function readJson2(path) {
109168
109694
  try {
109169
109695
  const parsed = JSON.parse(await readFile31(path, "utf8"));
109170
- return isRecord18(parsed) ? parsed : null;
109696
+ return isRecord19(parsed) ? parsed : null;
109171
109697
  } catch (error) {
109172
109698
  if (error instanceof Error)
109173
109699
  return null;
@@ -109188,29 +109714,29 @@ function normalizeRelative(root, target) {
109188
109714
  function normalizePathSeparators(path) {
109189
109715
  return path.split("\\").join("/");
109190
109716
  }
109191
- function isRecord18(value) {
109717
+ function isRecord19(value) {
109192
109718
  return typeof value === "object" && value !== null && !Array.isArray(value);
109193
109719
  }
109194
109720
 
109195
109721
  // packages/omo-opencode/src/cli/doctor/checks/codex-runtime-wrapper.ts
109196
- import { existsSync as existsSync60 } from "fs";
109722
+ import { existsSync as existsSync62 } from "fs";
109197
109723
  import { readFile as readFile32 } from "fs/promises";
109198
- import { homedir as homedir25 } from "os";
109199
- import { join as join93, resolve as resolve26 } from "path";
109724
+ import { homedir as homedir28 } from "os";
109725
+ import { join as join98, resolve as resolve29 } from "path";
109200
109726
  var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
109201
109727
  var CHECK_NAME = "codex-runtime-wrapper";
109202
109728
  var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
109203
109729
  async function checkCodexRuntimeWrapper(deps = {}) {
109204
- const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join93(homedir25(), ".codex"));
109730
+ const codexHome = resolve29(deps.codexHome ?? process.env.CODEX_HOME ?? join98(homedir28(), ".codex"));
109205
109731
  const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
109206
109732
  const platform = deps.platform ?? process.platform;
109207
- const wrapperPath = join93(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
109208
- const legacyWrapperPath = join93(binDir, platform === "win32" ? "omo.cmd" : "omo");
109733
+ const wrapperPath = join98(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
109734
+ const legacyWrapperPath = join98(binDir, platform === "win32" ? "omo.cmd" : "omo");
109209
109735
  const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
109210
109736
  const issues = [];
109211
109737
  if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
109212
109738
  const targetPath = parseRuntimeTargetPath(wrapper);
109213
- if (targetPath !== null && !existsSync60(targetPath)) {
109739
+ if (targetPath !== null && !existsSync62(targetPath)) {
109214
109740
  issues.push({
109215
109741
  title: "omo-agent-toolkit runtime wrapper target is missing",
109216
109742
  description: `Generated omo-agent-toolkit runtime wrapper at ${wrapperPath} points to missing target ${targetPath}.`,
@@ -109736,7 +110262,7 @@ init_commander();
109736
110262
  import { createHash as createHash7 } from "crypto";
109737
110263
  import {
109738
110264
  chmodSync as chmodSync5,
109739
- existsSync as existsSync63,
110265
+ existsSync as existsSync65,
109740
110266
  mkdirSync as mkdirSync17,
109741
110267
  readdirSync as readdirSync13,
109742
110268
  readFileSync as readFileSync42,
@@ -109744,18 +110270,18 @@ import {
109744
110270
  unlinkSync as unlinkSync9,
109745
110271
  writeFileSync as writeFileSync14
109746
110272
  } from "fs";
109747
- import { basename as basename13, dirname as dirname37, join as join96 } from "path";
110273
+ import { basename as basename14, dirname as dirname40, join as join101 } from "path";
109748
110274
 
109749
110275
  // packages/mcp-client-core/src/config-dir.ts
109750
- import { existsSync as existsSync61, realpathSync as realpathSync10 } from "fs";
109751
- import { homedir as homedir26 } from "os";
109752
- import { join as join94, resolve as resolve27 } from "path";
109753
- function resolveConfigPath2(pathValue) {
109754
- const resolvedPath = resolve27(pathValue);
109755
- if (!existsSync61(resolvedPath))
110276
+ import { existsSync as existsSync63, realpathSync as realpathSync12 } from "fs";
110277
+ import { homedir as homedir29 } from "os";
110278
+ import { join as join99, resolve as resolve30 } from "path";
110279
+ function resolveConfigPath3(pathValue) {
110280
+ const resolvedPath = resolve30(pathValue);
110281
+ if (!existsSync63(resolvedPath))
109756
110282
  return resolvedPath;
109757
110283
  try {
109758
- return realpathSync10(resolvedPath);
110284
+ return realpathSync12(resolvedPath);
109759
110285
  } catch (error) {
109760
110286
  if (!(error instanceof Error))
109761
110287
  throw error;
@@ -109765,15 +110291,15 @@ function resolveConfigPath2(pathValue) {
109765
110291
  function getOpenCodeCliConfigDir(env = process.env) {
109766
110292
  const customConfigDir = env["OPENCODE_CONFIG_DIR"]?.trim();
109767
110293
  if (customConfigDir) {
109768
- return resolveConfigPath2(customConfigDir);
110294
+ return resolveConfigPath3(customConfigDir);
109769
110295
  }
109770
- const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join94(homedir26(), ".config");
109771
- return resolveConfigPath2(join94(xdgConfigDir, "opencode"));
110296
+ const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join99(homedir29(), ".config");
110297
+ return resolveConfigPath3(join99(xdgConfigDir, "opencode"));
109772
110298
  }
109773
110299
 
109774
110300
  // packages/mcp-client-core/src/mcp-oauth/storage-index.ts
109775
- import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "fs";
109776
- import { join as join95 } from "path";
110301
+ import { chmodSync as chmodSync4, existsSync as existsSync64, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "fs";
110302
+ import { join as join100 } from "path";
109777
110303
  var INDEX_FILE_NAME = "index.json";
109778
110304
  function isTokenIndex(value) {
109779
110305
  if (typeof value !== "object" || value === null || Array.isArray(value))
@@ -109781,11 +110307,11 @@ function isTokenIndex(value) {
109781
110307
  return Object.values(value).every((entry) => typeof entry === "string");
109782
110308
  }
109783
110309
  function getIndexPath(storageDir) {
109784
- return join95(storageDir, INDEX_FILE_NAME);
110310
+ return join100(storageDir, INDEX_FILE_NAME);
109785
110311
  }
109786
110312
  function readTokenIndex(storageDir) {
109787
110313
  const indexPath = getIndexPath(storageDir);
109788
- if (!existsSync62(indexPath))
110314
+ if (!existsSync64(indexPath))
109789
110315
  return {};
109790
110316
  try {
109791
110317
  const parsed = JSON.parse(readFileSync41(indexPath, "utf-8"));
@@ -109825,16 +110351,16 @@ function deleteTokenIndexEntry(storageDir, hash) {
109825
110351
  var STORAGE_DIR_NAME = "mcp-oauth";
109826
110352
  var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
109827
110353
  function getMcpOauthStorageDir() {
109828
- return join96(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
110354
+ return join101(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
109829
110355
  }
109830
110356
  function getMcpOauthServerHash(serverHost, resource) {
109831
110357
  return createHash7("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
109832
110358
  }
109833
110359
  function getMcpOauthStoragePath(serverHost, resource) {
109834
- return join96(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
110360
+ return join101(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
109835
110361
  }
109836
110362
  function getLegacyStoragePath() {
109837
- return join96(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
110363
+ return join101(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
109838
110364
  }
109839
110365
  function normalizeHost2(serverHost) {
109840
110366
  let host = serverHost.trim();
@@ -109895,7 +110421,7 @@ function isOAuthTokenData(value) {
109895
110421
  return clientSecret === undefined || typeof clientSecret === "string";
109896
110422
  }
109897
110423
  function readTokenFile(filePath) {
109898
- if (!existsSync63(filePath))
110424
+ if (!existsSync65(filePath))
109899
110425
  return null;
109900
110426
  try {
109901
110427
  const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
@@ -109908,7 +110434,7 @@ function readTokenFile(filePath) {
109908
110434
  }
109909
110435
  function readLegacyStore() {
109910
110436
  const filePath = getLegacyStoragePath();
109911
- if (!existsSync63(filePath))
110437
+ if (!existsSync65(filePath))
109912
110438
  return null;
109913
110439
  try {
109914
110440
  const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
@@ -109928,8 +110454,8 @@ function readLegacyStore() {
109928
110454
  }
109929
110455
  function writeTokenFile(filePath, token) {
109930
110456
  try {
109931
- const dir = dirname37(filePath);
109932
- if (!existsSync63(dir)) {
110457
+ const dir = dirname40(filePath);
110458
+ if (!existsSync65(dir)) {
109933
110459
  mkdirSync17(dir, { recursive: true });
109934
110460
  }
109935
110461
  const tempPath = `${filePath}.tmp.${Date.now()}`;
@@ -109953,7 +110479,7 @@ function saveToken(serverHost, resource, token) {
109953
110479
  }
109954
110480
  function deleteToken(serverHost, resource) {
109955
110481
  const filePath = getMcpOauthStoragePath(serverHost, resource);
109956
- if (!existsSync63(filePath))
110482
+ if (!existsSync65(filePath))
109957
110483
  return deleteLegacyToken(serverHost, resource);
109958
110484
  try {
109959
110485
  unlinkSync9(filePath);
@@ -109975,7 +110501,7 @@ function deleteLegacyToken(serverHost, resource) {
109975
110501
  if (Object.keys(store).length === 0) {
109976
110502
  try {
109977
110503
  const filePath = getLegacyStoragePath();
109978
- if (existsSync63(filePath))
110504
+ if (existsSync65(filePath))
109979
110505
  unlinkSync9(filePath);
109980
110506
  return true;
109981
110507
  } catch (deleteError) {
@@ -110013,7 +110539,7 @@ function listTokensByHost(serverHost) {
110013
110539
  for (const [hash, indexedKey] of Object.entries(index)) {
110014
110540
  if (!indexedKey.startsWith(prefix))
110015
110541
  continue;
110016
- const indexedToken = readTokenFile(join96(getMcpOauthStorageDir(), `${hash}.json`));
110542
+ const indexedToken = readTokenFile(join101(getMcpOauthStorageDir(), `${hash}.json`));
110017
110543
  if (indexedToken)
110018
110544
  result[indexedKey] = indexedToken;
110019
110545
  }
@@ -110022,14 +110548,14 @@ function listTokensByHost(serverHost) {
110022
110548
  function listAllTokens() {
110023
110549
  const result = { ...readLegacyStore() ?? {} };
110024
110550
  const dir = getMcpOauthStorageDir();
110025
- if (!existsSync63(dir))
110551
+ if (!existsSync65(dir))
110026
110552
  return result;
110027
110553
  const index = readTokenIndex(dir);
110028
110554
  for (const entry of readdirSync13(dir, { withFileTypes: true })) {
110029
110555
  if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
110030
110556
  continue;
110031
- const token = readTokenFile(join96(dir, entry.name));
110032
- const hash = basename13(entry.name, ".json");
110557
+ const token = readTokenFile(join101(dir, entry.name));
110558
+ const hash = basename14(entry.name, ".json");
110033
110559
  if (token)
110034
110560
  result[index[hash] ?? hash] = token;
110035
110561
  }
@@ -110037,7 +110563,7 @@ function listAllTokens() {
110037
110563
  }
110038
110564
 
110039
110565
  // packages/mcp-client-core/src/plugin-identity.ts
110040
- var PLUGIN_NAME3 = "oh-my-openagent";
110566
+ var PLUGIN_NAME4 = "oh-my-openagent";
110041
110567
 
110042
110568
  // packages/mcp-client-core/src/mcp-oauth/discovery.ts
110043
110569
  var discoveryCache = new Map;
@@ -110414,7 +110940,7 @@ class McpOAuthProvider {
110414
110940
  const clientInfo = await getOrRegisterClient({
110415
110941
  ...metadata.registrationEndpoint ? { registrationEndpoint: metadata.registrationEndpoint } : {},
110416
110942
  serverIdentifier: this.serverUrl,
110417
- clientName: PLUGIN_NAME3,
110943
+ clientName: PLUGIN_NAME4,
110418
110944
  redirectUris: [this.redirectUrl()],
110419
110945
  tokenEndpointAuthMethod: "none",
110420
110946
  ...this.configClientId ? { clientId: this.configClientId } : {},
@@ -111100,8 +111626,8 @@ async function loadDeviceKeyring(store) {
111100
111626
 
111101
111627
  // packages/omo-opencode/src/cli/account-keys/keystore.ts
111102
111628
  import { execFile as execFile5 } from "child_process";
111103
- import { homedir as homedir27 } from "os";
111104
- import { join as join97 } from "path";
111629
+ import { homedir as homedir30 } from "os";
111630
+ import { join as join102 } from "path";
111105
111631
  var DEFAULT_SERVICE = "omo-cli";
111106
111632
  function defaultRun(argv, input) {
111107
111633
  const [file, ...args] = argv;
@@ -111209,8 +111735,8 @@ function createLibsecretKeyStore(name, run) {
111209
111735
  }
111210
111736
  function createDpapiKeyStore(name, run) {
111211
111737
  const safeName = name.replace(/[^A-Za-z0-9._-]/g, "-");
111212
- const directory = join97(process.env.LOCALAPPDATA ?? join97(homedir27(), "AppData", "Local"), "omo");
111213
- const file = join97(directory, `device-keys-${safeName}.bin`);
111738
+ const directory = join102(process.env.LOCALAPPDATA ?? join102(homedir30(), "AppData", "Local"), "omo");
111739
+ const file = join102(directory, `device-keys-${safeName}.bin`);
111214
111740
  const ps = (literal) => `'${literal.replace(/'/g, "''")}'`;
111215
111741
  const prelude = "Add-Type -AssemblyName System.Security; ";
111216
111742
  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).");
@@ -111374,6 +111900,7 @@ class ApiRefusal extends SignInError {
111374
111900
  "account_deleted",
111375
111901
  "reauth_required",
111376
111902
  "invalid_grant",
111903
+ "device_revoked",
111377
111904
  "entitlement_required",
111378
111905
  "authorization_pending",
111379
111906
  "slow_down",
@@ -111613,7 +112140,10 @@ var probeSecretServiceLock = () => new Promise((resolve) => {
111613
112140
  });
111614
112141
 
111615
112142
  // packages/omo-opencode/src/cli/service-auth/keystore.ts
111616
- class KeychainLockedError extends SignInError {
112143
+ class CredentialStoreError extends SignInError {
112144
+ }
112145
+
112146
+ class KeychainLockedError extends CredentialStoreError {
111617
112147
  }
111618
112148
  var LOCKED = /-25308|errSecInteractionNotAllowed|interaction is not allowed|locked collection/i;
111619
112149
  var UNLOCKED_REUSE_MS = 30000;
@@ -111636,7 +112166,7 @@ function createCredentialStore(api, secrets = typeof Bun === "undefined" ? null
111636
112166
  if (platformName === null)
111637
112167
  throw new SignInError("This platform has no supported OS credential store.");
111638
112168
  const key = { service: "omo-cli", name: credentialId(api) };
111639
- 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.`);
112169
+ 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.`);
111640
112170
  let unlockedUntil = 0;
111641
112171
  let noticed = false;
111642
112172
  const assertUsable = async () => {
@@ -111791,12 +112321,12 @@ async function loginLoopback(session, options) {
111791
112321
 
111792
112322
  // packages/omo-opencode/src/cli/service-auth/session.ts
111793
112323
  import { mkdir as mkdir10 } from "fs/promises";
111794
- import { homedir as homedir28 } from "os";
111795
- import { join as join98 } from "path";
112324
+ import { homedir as homedir31 } from "os";
112325
+ import { join as join103 } from "path";
111796
112326
 
111797
112327
  // packages/team-core/src/team-state-store/lock-publish.ts
111798
112328
  import { access as access3, open as open2, unlink as unlink2 } from "fs/promises";
111799
- import { dirname as dirname38 } from "path";
112329
+ import { dirname as dirname41 } from "path";
111800
112330
 
111801
112331
  // packages/team-core/src/team-state-store/lock-record.ts
111802
112332
  import { randomUUID as randomUUID5 } from "crypto";
@@ -111896,7 +112426,7 @@ async function assertRetryableLockOpenError(lockPath, error, deps) {
111896
112426
  if (code === "EPERM") {
111897
112427
  if (await pathMayExist(lockPath, deps))
111898
112428
  return;
111899
- if ((deps?.platform ?? process.platform) === "win32" && await pathMayExist(dirname38(lockPath), deps))
112429
+ if ((deps?.platform ?? process.platform) === "win32" && await pathMayExist(dirname41(lockPath), deps))
111900
112430
  return;
111901
112431
  }
111902
112432
  throw error;
@@ -112035,12 +112565,12 @@ class SessionEnded extends SignInError {
112035
112565
  this.code = code;
112036
112566
  }
112037
112567
  }
112038
- var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required"]);
112568
+ var DEVICE_REVOKING_REFUSALS = new Set(["account_deleted", "reauth_required", "device_revoked"]);
112039
112569
  function createSession(options) {
112040
112570
  const api = serviceOrigin(options.api);
112041
112571
  const { store, signal } = options;
112042
- const directory = join98(options.home ?? homedir28(), ".omo", "session-locks");
112043
- const lockPath = join98(directory, `${credentialId(api)}.lock`);
112572
+ const directory = join103(options.home ?? homedir31(), ".omo", "session-locks");
112573
+ const lockPath = join103(directory, `${credentialId(api)}.lock`);
112044
112574
  async function locked(action) {
112045
112575
  await mkdir10(directory, { recursive: true, mode: 448 });
112046
112576
  signal?.throwIfAborted();
@@ -112062,7 +112592,9 @@ function createSession(options) {
112062
112592
  await store.write({ ...current, ...tokens });
112063
112593
  return tokens.accessToken;
112064
112594
  } catch (error) {
112065
- if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant"].includes(error.code)) {
112595
+ if (error instanceof CredentialStoreError)
112596
+ throw error;
112597
+ if (error instanceof ApiRefusal && error.status < 500 && ["unauthorized", "account_deleted", "reauth_required", "invalid_grant", "device_revoked"].includes(error.code)) {
112066
112598
  await store.clear();
112067
112599
  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);
112068
112600
  }
@@ -112291,7 +112823,7 @@ function resolveInstallArgs(options, invocationName = process.env.OMO_INVOCATION
112291
112823
  init_commander();
112292
112824
 
112293
112825
  // packages/omo-opencode/src/cli/boulder/boulder.ts
112294
- import { existsSync as existsSync64 } from "fs";
112826
+ import { existsSync as existsSync66 } from "fs";
112295
112827
 
112296
112828
  // packages/omo-opencode/src/cli/boulder/formatter.ts
112297
112829
  var import_picocolors22 = __toESM(require_picocolors(), 1);
@@ -112428,10 +112960,10 @@ async function boulder(options) {
112428
112960
  const boulderFilePath = getBoulderFilePath(directory);
112429
112961
  const state = readBoulderState(directory);
112430
112962
  if (!state) {
112431
- const message = existsSync64(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112963
+ const message = existsSync66(boulderFilePath) ? formatReadErrorMessage(options.json) : formatNoBoulderMessage(options.json);
112432
112964
  process.stderr.write(`${message}
112433
112965
  `);
112434
- return existsSync64(boulderFilePath) ? 2 : 1;
112966
+ return existsSync66(boulderFilePath) ? 2 : 1;
112435
112967
  }
112436
112968
  const works = getBoulderWorks(state);
112437
112969
  const filteredWorks = options.workId ? works.filter((work) => work.work_id === options.workId) : works;
@@ -112449,12 +112981,12 @@ async function boulder(options) {
112449
112981
  }
112450
112982
  // packages/omo-opencode/src/cli/codex-ulw-loop.ts
112451
112983
  import { spawn as spawn6 } from "child_process";
112452
- import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync11 } from "fs";
112453
- import { homedir as homedir29 } from "os";
112984
+ import { existsSync as existsSync67, readFileSync as readFileSync43, realpathSync as realpathSync13 } from "fs";
112985
+ import { homedir as homedir32 } from "os";
112454
112986
  var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
112455
112987
  function resolveCodexUlwLoopCommand(input = {}) {
112456
112988
  const env = input.env ?? process.env;
112457
- const homeDir = input.homeDir ?? homedir29();
112989
+ const homeDir = input.homeDir ?? homedir32();
112458
112990
  const localComponentBin = resolveLocalUlwLoopBin(env, homeDir);
112459
112991
  if (localComponentBin !== null)
112460
112992
  return { executable: localComponentBin, argsPrefix: [] };
@@ -112491,11 +113023,11 @@ async function codexUlwLoop(args) {
112491
113023
  }
112492
113024
  function resolveLocalUlwLoopBin(env, homeDir) {
112493
113025
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo-ulw-loop", env, homeDir });
112494
- return candidates.find((candidate) => existsSync65(candidate)) ?? null;
113026
+ return candidates.find((candidate) => existsSync67(candidate)) ?? null;
112495
113027
  }
112496
113028
  function resolveLegacyLocalOmoBin(env, homeDir, currentExecutablePaths) {
112497
113029
  const candidates = resolveCodexComponentBinCandidates({ executableName: "omo", env, homeDir });
112498
- return candidates.find((candidate) => existsSync65(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
113030
+ return candidates.find((candidate) => existsSync67(candidate) && !isCurrentExecutable(candidate, currentExecutablePaths) && !isGeneratedRuntimeWrapper(candidate)) ?? null;
112499
113031
  }
112500
113032
  function isGeneratedRuntimeWrapper(candidate) {
112501
113033
  try {
@@ -112512,7 +113044,7 @@ function isCurrentExecutable(candidate, currentExecutablePaths) {
112512
113044
  }
112513
113045
  function realpathOrSelf2(path) {
112514
113046
  try {
112515
- return realpathSync11(path);
113047
+ return realpathSync13(path);
112516
113048
  } catch (error) {
112517
113049
  if (error instanceof Error)
112518
113050
  return path;
@@ -112696,7 +113228,7 @@ function linkedWorktrees(records) {
112696
113228
  return records.slice(1);
112697
113229
  }
112698
113230
  // packages/omo-opencode/src/cli/worktree-sweep/sweep.ts
112699
- import { existsSync as existsSync66 } from "fs";
113231
+ import { existsSync as existsSync68 } from "fs";
112700
113232
  import { stat as stat9 } from "fs/promises";
112701
113233
  import os7 from "os";
112702
113234
  import { normalize as normalize2 } from "path";
@@ -112787,7 +113319,7 @@ async function isOlderThan(worktreePath, days, now) {
112787
113319
  }
112788
113320
  }
112789
113321
  async function classifyRecord(repo, record, defaultBranch, options) {
112790
- const pathExists = existsSync66(record.path);
113322
+ const pathExists = existsSync68(record.path);
112791
113323
  const external = isExcludedPath(record.path, options.excludePrefixes, options.home);
112792
113324
  const current = options.currentWorktree !== undefined && record.path === options.currentWorktree;
112793
113325
  if (record.locked || !pathExists || external || current) {
@@ -112816,7 +113348,7 @@ async function sweepRepo(repo, options) {
112816
113348
  const records = linkedWorktrees(allRecords);
112817
113349
  const startedInLinked = records.some((record) => record.path === toplevel);
112818
113350
  const mainWorktree = allRecords[0]?.path;
112819
- const root = startedInLinked && mainWorktree !== undefined && existsSync66(mainWorktree) ? mainWorktree : toplevel;
113351
+ const root = startedInLinked && mainWorktree !== undefined && existsSync68(mainWorktree) ? mainWorktree : toplevel;
112820
113352
  const currentWorktree = startedInLinked ? toplevel : undefined;
112821
113353
  const classifications = [];
112822
113354
  for (const record of records) {
@@ -112945,7 +113477,7 @@ prunes.
112945
113477
 
112946
113478
  // packages/omo-opencode/src/cli/config-migrate.ts
112947
113479
  init_startup_migration();
112948
- import { posix as posix12 } from "path";
113480
+ import { posix as posix13 } from "path";
112949
113481
  function reports(result) {
112950
113482
  return result.results.map((entry) => ({
112951
113483
  diagnostics: entry.diagnostics,
@@ -112979,7 +113511,7 @@ function runConfigMigrate(options = {}) {
112979
113511
  dryRun: options.dryRun ?? false,
112980
113512
  environment,
112981
113513
  ...homeDir === undefined ? {} : { env: { HOME: homeDir }, homeDir },
112982
- pathOperations: posix12
113514
+ pathOperations: posix13
112983
113515
  });
112984
113516
  const report = reports(result);
112985
113517
  const response = {