oh-my-opencode 5.1.48 → 5.1.51

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 (495) hide show
  1. package/dist/agents/refusal-rule.d.ts +7 -0
  2. package/dist/cli/index.js +1194 -752
  3. package/dist/cli/service-auth/accounts-gate.d.ts +11 -0
  4. package/dist/cli/service-auth/commands.d.ts +2 -4
  5. package/dist/cli/service-auth/index.d.ts +1 -1
  6. package/dist/cli/service-auth/keystore.d.ts +26 -2
  7. package/dist/cli/service-auth/protocol.d.ts +7 -1
  8. package/dist/cli/service-auth/session.d.ts +6 -0
  9. package/dist/cli/service-auth/signed-out-marker.d.ts +11 -0
  10. package/dist/cli-node/index.js +1194 -752
  11. package/dist/config/schema/hooks.d.ts +1 -0
  12. package/dist/create-hooks.d.ts +1 -0
  13. package/dist/features/boulder-state/storage.d.ts +1 -1
  14. package/dist/features/boulder-state/types.d.ts +1 -1
  15. package/dist/hooks/atlas/idle-continuation.d.ts +2 -1
  16. package/dist/hooks/atlas/types.d.ts +9 -1
  17. package/dist/hooks/index.d.ts +1 -0
  18. package/dist/hooks/momus-review-persistence/hook.d.ts +19 -0
  19. package/dist/hooks/momus-review-persistence/index.d.ts +1 -0
  20. package/dist/hooks/momus-review-persistence/review-resolution.d.ts +20 -0
  21. package/dist/hooks/prometheus-md-only/constants.d.ts +2 -0
  22. package/dist/hooks/prometheus-md-only/fixtures/denial-log.d.ts +1 -0
  23. package/dist/hooks/prometheus-md-only/fixtures/guarded-hashline.d.ts +1 -0
  24. package/dist/hooks/prometheus-md-only/fixtures/invoke-before.d.ts +7 -0
  25. package/dist/hooks/prometheus-md-only/fixtures/opencode-patch-parser.d.ts +2 -0
  26. package/dist/hooks/prometheus-md-only/hook.d.ts +5 -1
  27. package/dist/hooks/prometheus-md-only/path-policy.d.ts +2 -9
  28. package/dist/hooks/prometheus-md-only/vendor/opencode-patch-parser.d.ts +22 -0
  29. package/dist/index.js +2322 -1045
  30. package/dist/plugin/hooks/create-core-hooks.d.ts +1 -0
  31. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  32. package/dist/shared/posthog-activity-state.d.ts +1 -0
  33. package/dist/shared/posthog.d.ts +1 -2
  34. package/dist/shared/resolve-file-write-path.d.ts +6 -0
  35. package/dist/skills/ast-grep/README.md +1 -1
  36. package/dist/skills/ast-grep/install.ps1 +5 -3
  37. package/dist/skills/ast-grep/install.sh +4 -5
  38. package/dist/skills/ast-grep/references/install.md +2 -2
  39. package/dist/skills/ast-grep/scripts/ast_grep_helper.py +13 -3
  40. package/dist/skills/browser/runtime/omowright/manifest.json +1 -1
  41. package/dist/skills/coding-agent-sessions/AGENTS.md +5 -4
  42. package/dist/skills/coding-agent-sessions/SKILL.md +11 -11
  43. package/dist/skills/coding-agent-sessions/references/all-platforms.md +2 -2
  44. package/dist/skills/coding-agent-sessions/references/codex.md +4 -4
  45. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +1 -1
  46. package/dist/skills/coding-agent-sessions/scripts/find-agent-sessions.py +6 -3
  47. package/dist/skills/frontend/ATTRIBUTION.md +1 -1
  48. package/dist/skills/frontend/SKILL.md +34 -12
  49. package/dist/skills/frontend/references/design/README.md +2 -2
  50. package/dist/skills/frontend/references/design/_INDEX.md +2 -1
  51. package/dist/skills/frontend/references/design/component-catalogs.md +14 -10
  52. package/dist/skills/frontend/references/design/design-system-architecture.md +19 -6
  53. package/dist/skills/frontend/references/design/grounding.md +29 -0
  54. package/dist/skills/frontend/references/ui-ux-db/scripts/design_system.py +2 -0
  55. package/dist/skills/frontend/references/ui-ux-db/scripts/search.py +2 -0
  56. package/dist/skills/ultimate-browsing/SKILL.md +5 -4
  57. package/dist/skills/ultimate-browsing/engine/AGENTS.md +2 -2
  58. package/dist/skills/ultimate-browsing/engine/__main__.py +9 -6
  59. package/dist/skills/ultimate-browsing/engine/summary.py +1 -1
  60. package/dist/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  61. package/dist/skills/ultimate-browsing/scripts/extract_cookies.py +4 -2
  62. package/dist/skills/ulw-research/AGENTS.md +8 -4
  63. package/dist/skills/ulw-research/SKILL.md +7 -316
  64. package/dist/skills/ulw-research/references/deliverable-phase.md +23 -21
  65. package/dist/skills/ulw-research/references/fact-ledger-grammar.md +7 -3
  66. package/dist/skills/ulw-research/references/fact-ledger.md +42 -8
  67. package/dist/skills/ulw-research/references/fidelity-claim-kinds.md +1 -1
  68. package/dist/skills/ulw-research/references/markdown-blocks.md +12 -0
  69. package/dist/skills/ulw-research/references/report-gates.md +12 -5
  70. package/dist/skills/ulw-research/references/research-collection.md +195 -0
  71. package/dist/skills/ulw-research/references/research-delivery.md +123 -0
  72. package/dist/skills/ulw-research/scripts/claim-kinds.mjs +33 -5
  73. package/dist/skills/ulw-research/scripts/claim-kinds.test.ts +37 -2
  74. package/dist/skills/ulw-research/scripts/claim-prefix.test.ts +76 -0
  75. package/dist/skills/ulw-research/scripts/contracts-validation.test.ts +83 -0
  76. package/dist/skills/ulw-research/scripts/contracts.mjs +13 -4
  77. package/dist/skills/ulw-research/scripts/contracts.test.ts +6 -110
  78. package/dist/skills/ulw-research/scripts/conversion-altered.test.ts +154 -0
  79. package/dist/skills/ulw-research/scripts/conversion-originals.test.ts +297 -0
  80. package/dist/skills/ulw-research/scripts/conversion-probe-classes.test.ts +361 -0
  81. package/dist/skills/ulw-research/scripts/conversion-probe.mjs +229 -0
  82. package/dist/skills/ulw-research/scripts/conversion-probe.test.ts +218 -0
  83. package/dist/skills/ulw-research/scripts/copy-returns-polish.test.ts +4 -3
  84. package/dist/skills/ulw-research/scripts/css-hiding.mjs +158 -0
  85. package/dist/skills/ulw-research/scripts/css-lite.mjs +4 -2
  86. package/dist/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +186 -0
  87. package/dist/skills/ulw-research/scripts/delivery-barrier.test.ts +40 -87
  88. package/dist/skills/ulw-research/scripts/entities.mjs +13 -4
  89. package/dist/skills/ulw-research/scripts/fact-commands-fill.mjs +11 -1
  90. package/dist/skills/ulw-research/scripts/fact-commands-meaning.mjs +13 -9
  91. package/dist/skills/ulw-research/scripts/fact-commands-polish.mjs +40 -18
  92. package/dist/skills/ulw-research/scripts/fact-commands-verify.mjs +25 -8
  93. package/dist/skills/ulw-research/scripts/fact-commands.mjs +35 -16
  94. package/dist/skills/ulw-research/scripts/fact-derive-2.test.ts +149 -0
  95. package/dist/skills/ulw-research/scripts/fact-derive.mjs +7 -2
  96. package/dist/skills/ulw-research/scripts/fact-derive.test.ts +7 -192
  97. package/dist/skills/ulw-research/scripts/fact-fill.mjs +6 -4
  98. package/dist/skills/ulw-research/scripts/fact-ledger-kinds.mjs +6 -7
  99. package/dist/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +2 -1
  100. package/dist/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +2 -1
  101. package/dist/skills/ulw-research/scripts/fact-locate.mjs +15 -9
  102. package/dist/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +149 -0
  103. package/dist/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +4 -168
  104. package/dist/skills/ulw-research/scripts/fact-unit-rules.test.ts +3 -229
  105. package/dist/skills/ulw-research/scripts/fidelity-claims.mjs +4 -3
  106. package/dist/skills/ulw-research/scripts/fidelity-csv.mjs +32 -0
  107. package/dist/skills/ulw-research/scripts/fidelity-lexicon.mjs +1 -1
  108. package/dist/skills/ulw-research/scripts/fidelity-originals.mjs +161 -0
  109. package/dist/skills/ulw-research/scripts/fidelity-policy.mjs +4 -4
  110. package/dist/skills/ulw-research/scripts/fidelity-records.mjs +81 -14
  111. package/dist/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +49 -0
  112. package/dist/skills/ulw-research/scripts/fidelity-sources.mjs +76 -0
  113. package/dist/skills/ulw-research/scripts/fidelity-trace.mjs +25 -11
  114. package/dist/skills/ulw-research/scripts/fidelity-value-unit.mjs +202 -0
  115. package/dist/skills/ulw-research/scripts/fidelity-values.mjs +40 -39
  116. package/dist/skills/ulw-research/scripts/fidelity-values.test.ts +8 -29
  117. package/dist/skills/ulw-research/scripts/gates-fidelity.mjs +8 -6
  118. package/dist/skills/ulw-research/scripts/gates-static-headings.test.ts +17 -0
  119. package/dist/skills/ulw-research/scripts/gates-static.mjs +10 -1
  120. package/dist/skills/ulw-research/scripts/html-lite.mjs +6 -2
  121. package/dist/skills/ulw-research/scripts/html-markup.mjs +2 -2
  122. package/dist/skills/ulw-research/scripts/html-text-map.mjs +140 -0
  123. package/dist/skills/ulw-research/scripts/html-text-map.test.ts +148 -0
  124. package/dist/skills/ulw-research/scripts/markdown-closers.mjs +126 -0
  125. package/dist/skills/ulw-research/scripts/md-lite-boundaries.test.ts +46 -0
  126. package/dist/skills/ulw-research/scripts/md-lite.mjs +1 -1
  127. package/dist/skills/ulw-research/scripts/number-grammar.mjs +33 -0
  128. package/dist/skills/ulw-research/scripts/number-grammar.test.ts +36 -0
  129. package/dist/skills/ulw-research/scripts/numerals.mjs +18 -7
  130. package/dist/skills/ulw-research/scripts/numerals.test.ts +3 -0
  131. package/dist/skills/ulw-research/scripts/outcome-start.mjs +66 -0
  132. package/dist/skills/ulw-research/scripts/outcome-start.test.ts +109 -0
  133. package/dist/skills/ulw-research/scripts/outcome.mjs +11 -22
  134. package/dist/skills/ulw-research/scripts/page-source-locator.test.ts +187 -0
  135. package/dist/skills/ulw-research/scripts/placeholder.mjs +18 -6
  136. package/dist/skills/ulw-research/scripts/polish-apply.mjs +3 -2
  137. package/dist/skills/ulw-research/scripts/polish-markup.test.ts +15 -1
  138. package/dist/skills/ulw-research/scripts/polish-partial.test.ts +42 -0
  139. package/dist/skills/ulw-research/scripts/raw-decode.mjs +110 -0
  140. package/dist/skills/ulw-research/scripts/raw-locator.mjs +47 -0
  141. package/dist/skills/ulw-research/scripts/raw-snapshot.test.ts +139 -0
  142. package/dist/skills/ulw-research/scripts/report-tools-2.test.ts +233 -0
  143. package/dist/skills/ulw-research/scripts/report-tools-3.test.ts +141 -0
  144. package/dist/skills/ulw-research/scripts/report-tools-4.test.ts +135 -0
  145. package/dist/skills/ulw-research/scripts/report-tools-5.test.ts +231 -0
  146. package/dist/skills/ulw-research/scripts/report-tools-commands.mjs +1 -1
  147. package/dist/skills/ulw-research/scripts/report-tools.mjs +7 -1
  148. package/dist/skills/ulw-research/scripts/report-tools.test.ts +5 -800
  149. package/dist/skills/ulw-research/scripts/snapshot-readability.test.ts +116 -0
  150. package/dist/skills/ulw-research/scripts/source-commands.mjs +79 -26
  151. package/dist/skills/ulw-research/scripts/source-integrity.test.ts +243 -0
  152. package/dist/skills/ulw-research/scripts/source-refresh.mjs +82 -0
  153. package/dist/skills/ulw-research/scripts/source-snapshot.mjs +73 -69
  154. package/dist/skills/ulw-research/scripts/source-snapshot.test.ts +7 -4
  155. package/dist/skills/ulw-research/scripts/source-view.mjs +89 -0
  156. package/dist/skills/ulw-research/scripts/sources-citation.mjs +203 -0
  157. package/dist/skills/ulw-research/scripts/sources-citation.test.ts +236 -0
  158. package/dist/skills/ulw-research/scripts/tests/contracts-support.ts +147 -0
  159. package/dist/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +59 -0
  160. package/dist/skills/ulw-research/scripts/tests/derive-clock.ts +4 -0
  161. package/dist/skills/ulw-research/scripts/tests/fact-derive-support.ts +65 -0
  162. package/dist/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +41 -0
  163. package/dist/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +241 -0
  164. package/dist/skills/ulw-research/scripts/tests/fidelity-values-support.ts +30 -0
  165. package/dist/skills/ulw-research/scripts/tests/fixtures/conversion-probe.html +14 -0
  166. package/dist/skills/ulw-research/scripts/tests/fixtures/sources-shapes.html +20 -0
  167. package/dist/skills/ulw-research/scripts/tests/numeral-classes.ts +196 -0
  168. package/dist/skills/ulw-research/scripts/tests/report-tools-support.ts +182 -0
  169. package/dist/skills/ulw-research/scripts/tests/value-mode-support.ts +48 -0
  170. package/dist/skills/ulw-research/scripts/units.mjs +14 -3
  171. package/dist/skills/ulw-research/scripts/units.test.ts +10 -0
  172. package/dist/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +255 -0
  173. package/dist/skills/ulw-research/scripts/value-mode-unit.test.ts +179 -0
  174. package/dist/skills/ulw-research/scripts/value-rules-cli.test.ts +157 -0
  175. package/dist/skills/ulw-research/scripts/value-rules-followups.test.ts +72 -0
  176. package/dist/skills/ulw-research/scripts/value-rules-priority.test.ts +80 -0
  177. package/dist/tools/delegate-task/executor-types.d.ts +1 -0
  178. package/dist/tools/delegate-task/sync-session-existence.d.ts +4 -0
  179. package/dist/tools/delegate-task/types.d.ts +1 -0
  180. package/dist/tools/skill/description-formatter.d.ts +2 -1
  181. package/dist/tools/skill/types.d.ts +6 -0
  182. package/dist/tui.js +131 -33
  183. package/package.json +18 -15
  184. package/packages/git-bash-mcp/package.json +1 -1
  185. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  186. package/packages/omo-codex/plugin/README.md +1 -1
  187. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  188. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  189. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  190. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  191. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  192. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  193. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  194. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  195. package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/SKILL.md +51 -55
  196. package/packages/omo-codex/plugin/components/lcx/skills/lcx-contribute-bug-fix/agents/openai.yaml +1 -1
  197. package/packages/omo-codex/plugin/components/lcx/skills/lcx-report-bug/SKILL.md +7 -7
  198. package/packages/omo-codex/plugin/components/lcx/skills/lcx-report-bug/agents/openai.yaml +1 -1
  199. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  200. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  201. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  202. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  203. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  204. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  205. package/packages/omo-codex/plugin/components/teammode/package.json +2 -2
  206. package/packages/omo-codex/plugin/components/telemetry/README.md +2 -2
  207. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +52 -15
  208. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +52 -19
  209. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  210. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  211. package/packages/omo-codex/plugin/components/telemetry/src/codex-hook.ts +2 -9
  212. package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +4 -13
  213. package/packages/omo-codex/plugin/components/telemetry/src/product-identity.ts +0 -2
  214. package/packages/omo-codex/plugin/components/telemetry/test/codex-hook-diagnostics.test.ts +0 -3
  215. package/packages/omo-codex/plugin/components/telemetry/test/codex-hook.test.ts +3 -8
  216. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +3 -0
  217. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  218. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  219. package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +1 -1
  220. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  221. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  222. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +3 -0
  223. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  224. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  225. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  226. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  227. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  228. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  229. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  230. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  231. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  232. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  233. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  234. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  235. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  236. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  237. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  238. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  239. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  240. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  241. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  242. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  243. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  244. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  245. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  246. package/packages/omo-codex/plugin/package-lock.json +16 -16
  247. package/packages/omo-codex/plugin/package.json +1 -1
  248. package/packages/omo-codex/plugin/shared/package.json +1 -1
  249. package/packages/omo-codex/plugin/skills/ast-grep/README.md +1 -1
  250. package/packages/omo-codex/plugin/skills/ast-grep/install.ps1 +5 -3
  251. package/packages/omo-codex/plugin/skills/ast-grep/install.sh +4 -5
  252. package/packages/omo-codex/plugin/skills/ast-grep/references/install.md +2 -2
  253. package/packages/omo-codex/plugin/skills/ast-grep/scripts/ast_grep_helper.py +13 -3
  254. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
  255. package/packages/omo-codex/plugin/skills/coding-agent-sessions/AGENTS.md +5 -4
  256. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +11 -11
  257. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +2 -2
  258. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/codex.md +4 -4
  259. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +1 -1
  260. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/find-agent-sessions.py +6 -3
  261. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +1 -1
  262. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +34 -12
  263. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +2 -2
  264. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +2 -1
  265. package/packages/omo-codex/plugin/skills/frontend/references/design/component-catalogs.md +14 -10
  266. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +19 -6
  267. package/packages/omo-codex/plugin/skills/frontend/references/design/grounding.md +29 -0
  268. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/design_system.py +2 -0
  269. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/search.py +2 -0
  270. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/SKILL.md +51 -55
  271. package/packages/omo-codex/plugin/skills/lcx-contribute-bug-fix/agents/openai.yaml +1 -1
  272. package/packages/omo-codex/plugin/skills/lcx-report-bug/SKILL.md +7 -7
  273. package/packages/omo-codex/plugin/skills/lcx-report-bug/agents/openai.yaml +1 -1
  274. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +5 -4
  275. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +2 -2
  276. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +9 -6
  277. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/summary.py +1 -1
  278. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  279. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +4 -2
  280. package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +3 -0
  281. package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +8 -4
  282. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +7 -316
  283. package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +23 -21
  284. package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +7 -3
  285. package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger.md +42 -8
  286. package/packages/omo-codex/plugin/skills/ulw-research/references/fidelity-claim-kinds.md +1 -1
  287. package/packages/omo-codex/plugin/skills/ulw-research/references/markdown-blocks.md +12 -0
  288. package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +12 -5
  289. package/packages/omo-codex/plugin/skills/ulw-research/references/research-collection.md +195 -0
  290. package/packages/omo-codex/plugin/skills/ulw-research/references/research-delivery.md +123 -0
  291. package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +33 -5
  292. package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +13 -4
  293. package/packages/omo-codex/plugin/skills/ulw-research/scripts/conversion-probe.mjs +229 -0
  294. package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-hiding.mjs +158 -0
  295. package/packages/omo-codex/plugin/skills/ulw-research/scripts/css-lite.mjs +4 -2
  296. package/packages/omo-codex/plugin/skills/ulw-research/scripts/entities.mjs +13 -4
  297. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-fill.mjs +11 -1
  298. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +13 -9
  299. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +40 -18
  300. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +25 -8
  301. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +35 -16
  302. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +7 -2
  303. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +6 -4
  304. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +6 -7
  305. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +15 -9
  306. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +4 -3
  307. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-csv.mjs +32 -0
  308. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +1 -1
  309. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-originals.mjs +161 -0
  310. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-policy.mjs +4 -4
  311. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +81 -14
  312. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +49 -0
  313. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-sources.mjs +76 -0
  314. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +25 -11
  315. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-value-unit.mjs +202 -0
  316. package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +40 -39
  317. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +8 -6
  318. package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +10 -1
  319. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +6 -2
  320. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +2 -2
  321. package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-text-map.mjs +140 -0
  322. package/packages/omo-codex/plugin/skills/ulw-research/scripts/markdown-closers.mjs +126 -0
  323. package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +1 -1
  324. package/packages/omo-codex/plugin/skills/ulw-research/scripts/number-grammar.mjs +33 -0
  325. package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +18 -7
  326. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome-start.mjs +66 -0
  327. package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +11 -22
  328. package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +18 -6
  329. package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +3 -2
  330. package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-decode.mjs +110 -0
  331. package/packages/omo-codex/plugin/skills/ulw-research/scripts/raw-locator.mjs +47 -0
  332. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +1 -1
  333. package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +7 -1
  334. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +79 -26
  335. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-refresh.mjs +82 -0
  336. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +73 -69
  337. package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-view.mjs +89 -0
  338. package/packages/omo-codex/plugin/skills/ulw-research/scripts/sources-citation.mjs +203 -0
  339. package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +14 -3
  340. package/packages/omo-codex/plugin/test/payload-equivalence.test.mjs +6 -4
  341. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -3
  342. package/packages/omo-codex/scripts/install-dist/install-local.mjs +338 -237
  343. package/packages/prompts-core/prompts/ultrawork/codex.md +3 -0
  344. package/packages/shared-skills/skill-source-filter.mjs +6 -2
  345. package/packages/shared-skills/skills/ast-grep/README.md +1 -1
  346. package/packages/shared-skills/skills/ast-grep/install.ps1 +5 -3
  347. package/packages/shared-skills/skills/ast-grep/install.sh +4 -5
  348. package/packages/shared-skills/skills/ast-grep/references/install.md +2 -2
  349. package/packages/shared-skills/skills/ast-grep/scripts/ast_grep_helper.py +13 -3
  350. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
  351. package/packages/shared-skills/skills/coding-agent-sessions/AGENTS.md +5 -4
  352. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +11 -11
  353. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +2 -2
  354. package/packages/shared-skills/skills/coding-agent-sessions/references/codex.md +4 -4
  355. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +1 -1
  356. package/packages/shared-skills/skills/coding-agent-sessions/scripts/find-agent-sessions.py +6 -3
  357. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +1 -1
  358. package/packages/shared-skills/skills/frontend/SKILL.md +34 -12
  359. package/packages/shared-skills/skills/frontend/references/design/README.md +2 -2
  360. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +2 -1
  361. package/packages/shared-skills/skills/frontend/references/design/component-catalogs.md +14 -10
  362. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +19 -6
  363. package/packages/shared-skills/skills/frontend/references/design/grounding.md +29 -0
  364. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/design_system.py +2 -0
  365. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/search.py +2 -0
  366. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +5 -4
  367. package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +2 -2
  368. package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +9 -6
  369. package/packages/shared-skills/skills/ultimate-browsing/engine/summary.py +1 -1
  370. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +4 -4
  371. package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +4 -2
  372. package/packages/shared-skills/skills/ulw-research/AGENTS.md +8 -4
  373. package/packages/shared-skills/skills/ulw-research/SKILL.md +7 -316
  374. package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +23 -21
  375. package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +7 -3
  376. package/packages/shared-skills/skills/ulw-research/references/fact-ledger.md +42 -8
  377. package/packages/shared-skills/skills/ulw-research/references/fidelity-claim-kinds.md +1 -1
  378. package/packages/shared-skills/skills/ulw-research/references/markdown-blocks.md +12 -0
  379. package/packages/shared-skills/skills/ulw-research/references/report-gates.md +12 -5
  380. package/packages/shared-skills/skills/ulw-research/references/research-collection.md +195 -0
  381. package/packages/shared-skills/skills/ulw-research/references/research-delivery.md +123 -0
  382. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +33 -5
  383. package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +37 -2
  384. package/packages/shared-skills/skills/ulw-research/scripts/claim-prefix.test.ts +76 -0
  385. package/packages/shared-skills/skills/ulw-research/scripts/contracts-validation.test.ts +83 -0
  386. package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +13 -4
  387. package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +6 -110
  388. package/packages/shared-skills/skills/ulw-research/scripts/conversion-altered.test.ts +154 -0
  389. package/packages/shared-skills/skills/ulw-research/scripts/conversion-originals.test.ts +297 -0
  390. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe-classes.test.ts +361 -0
  391. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.mjs +229 -0
  392. package/packages/shared-skills/skills/ulw-research/scripts/conversion-probe.test.ts +218 -0
  393. package/packages/shared-skills/skills/ulw-research/scripts/copy-returns-polish.test.ts +4 -3
  394. package/packages/shared-skills/skills/ulw-research/scripts/css-hiding.mjs +158 -0
  395. package/packages/shared-skills/skills/ulw-research/scripts/css-lite.mjs +4 -2
  396. package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier-meaning.test.ts +186 -0
  397. package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +40 -87
  398. package/packages/shared-skills/skills/ulw-research/scripts/entities.mjs +13 -4
  399. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-fill.mjs +11 -1
  400. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +13 -9
  401. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-polish.mjs +40 -18
  402. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +25 -8
  403. package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +35 -16
  404. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive-2.test.ts +149 -0
  405. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +7 -2
  406. package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +7 -192
  407. package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +6 -4
  408. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +6 -7
  409. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +2 -1
  410. package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +2 -1
  411. package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +15 -9
  412. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions-2.test.ts +149 -0
  413. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +4 -168
  414. package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +3 -229
  415. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +4 -3
  416. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-csv.mjs +32 -0
  417. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +1 -1
  418. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-originals.mjs +161 -0
  419. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-policy.mjs +4 -4
  420. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +81 -14
  421. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +49 -0
  422. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-sources.mjs +76 -0
  423. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +25 -11
  424. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-value-unit.mjs +202 -0
  425. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +40 -39
  426. package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +8 -29
  427. package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +8 -6
  428. package/packages/shared-skills/skills/ulw-research/scripts/gates-static-headings.test.ts +17 -0
  429. package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +10 -1
  430. package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +6 -2
  431. package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +2 -2
  432. package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.mjs +140 -0
  433. package/packages/shared-skills/skills/ulw-research/scripts/html-text-map.test.ts +148 -0
  434. package/packages/shared-skills/skills/ulw-research/scripts/markdown-closers.mjs +126 -0
  435. package/packages/shared-skills/skills/ulw-research/scripts/md-lite-boundaries.test.ts +46 -0
  436. package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +1 -1
  437. package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.mjs +33 -0
  438. package/packages/shared-skills/skills/ulw-research/scripts/number-grammar.test.ts +36 -0
  439. package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +18 -7
  440. package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +3 -0
  441. package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.mjs +66 -0
  442. package/packages/shared-skills/skills/ulw-research/scripts/outcome-start.test.ts +109 -0
  443. package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +11 -22
  444. package/packages/shared-skills/skills/ulw-research/scripts/page-source-locator.test.ts +187 -0
  445. package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +18 -6
  446. package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +3 -2
  447. package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +15 -1
  448. package/packages/shared-skills/skills/ulw-research/scripts/polish-partial.test.ts +42 -0
  449. package/packages/shared-skills/skills/ulw-research/scripts/raw-decode.mjs +110 -0
  450. package/packages/shared-skills/skills/ulw-research/scripts/raw-locator.mjs +47 -0
  451. package/packages/shared-skills/skills/ulw-research/scripts/raw-snapshot.test.ts +139 -0
  452. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-2.test.ts +233 -0
  453. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-3.test.ts +141 -0
  454. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-4.test.ts +135 -0
  455. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-5.test.ts +231 -0
  456. package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +1 -1
  457. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +7 -1
  458. package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +5 -800
  459. package/packages/shared-skills/skills/ulw-research/scripts/snapshot-readability.test.ts +116 -0
  460. package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +79 -26
  461. package/packages/shared-skills/skills/ulw-research/scripts/source-integrity.test.ts +243 -0
  462. package/packages/shared-skills/skills/ulw-research/scripts/source-refresh.mjs +82 -0
  463. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +73 -69
  464. package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +7 -4
  465. package/packages/shared-skills/skills/ulw-research/scripts/source-view.mjs +89 -0
  466. package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.mjs +203 -0
  467. package/packages/shared-skills/skills/ulw-research/scripts/sources-citation.test.ts +236 -0
  468. package/packages/shared-skills/skills/ulw-research/scripts/tests/contracts-support.ts +147 -0
  469. package/packages/shared-skills/skills/ulw-research/scripts/tests/delivery-barrier-session.ts +59 -0
  470. package/packages/shared-skills/skills/ulw-research/scripts/tests/derive-clock.ts +4 -0
  471. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-derive-support.ts +65 -0
  472. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-dimensions-support.ts +41 -0
  473. package/packages/shared-skills/skills/ulw-research/scripts/tests/fact-unit-rules-support.ts +241 -0
  474. package/packages/shared-skills/skills/ulw-research/scripts/tests/fidelity-values-support.ts +30 -0
  475. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/conversion-probe.html +14 -0
  476. package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/sources-shapes.html +20 -0
  477. package/packages/shared-skills/skills/ulw-research/scripts/tests/numeral-classes.ts +196 -0
  478. package/packages/shared-skills/skills/ulw-research/scripts/tests/report-tools-support.ts +182 -0
  479. package/packages/shared-skills/skills/ulw-research/scripts/tests/value-mode-support.ts +48 -0
  480. package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +14 -3
  481. package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +10 -0
  482. package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit-classes.test.ts +255 -0
  483. package/packages/shared-skills/skills/ulw-research/scripts/value-mode-unit.test.ts +179 -0
  484. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-cli.test.ts +157 -0
  485. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-followups.test.ts +72 -0
  486. package/packages/shared-skills/skills/ulw-research/scripts/value-rules-priority.test.ts +80 -0
  487. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/amp_redirect_stub.html +0 -7
  488. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/search_interstitial.html +0 -19
  489. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_available.json +0 -1
  490. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/fixtures/wayback_snapshot.html +0 -1128
  491. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +0 -77
  492. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_stealth.py +0 -86
  493. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +0 -279
  494. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate.py +0 -252
  495. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_surrogate_validators.py +0 -78
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // omo-codex-install:59bc5768b3b3ef6732c97bec7583a523952e5e1d9fdf5d8e5fb245658043bfca:fadb66139b4d0de34630f6b4bddc87783374d2be2659a207a4bb01c2c2f852d0
2
+ // omo-codex-install:2cc6bdfa5c18e3ada377e31b95394052d0d763fa5ca10fb77204728c12f8ab45:ea48fd64c2b141e89231f77a680d39339a6c5b336e6b0cfc9d5a100ac79018bd
3
3
  var __esm = (fn, res, err) => () => {
4
4
  if (fn)
5
5
  try {
@@ -108,9 +108,9 @@ var init_atomic_write = __esm(() => {
108
108
 
109
109
  // packages/telemetry-core/src/day-claim.ts
110
110
  import { closeSync as closeSync2, mkdirSync as mkdirSync2, openSync as openSync2, readdirSync, rmSync as rmSync2 } from "node:fs";
111
- import { join as join34 } from "node:path";
111
+ import { join as join35 } from "node:path";
112
112
  function getTelemetryDayClaimFilePath(stateDir, dayUTC) {
113
- return join34(stateDir, `${CLAIM_PREFIX}${dayUTC}${CLAIM_SUFFIX}`);
113
+ return join35(stateDir, `${CLAIM_PREFIX}${dayUTC}${CLAIM_SUFFIX}`);
114
114
  }
115
115
  function claimUtcDay(stateDir, dayUTC) {
116
116
  try {
@@ -136,7 +136,7 @@ function pruneSupersededClaims(stateDir, dayUTC) {
136
136
  if (!entry.startsWith(CLAIM_PREFIX) || !entry.endsWith(CLAIM_SUFFIX))
137
137
  continue;
138
138
  try {
139
- rmSync2(join34(stateDir, entry), { force: true });
139
+ rmSync2(join35(stateDir, entry), { force: true });
140
140
  } catch {}
141
141
  }
142
142
  }
@@ -145,20 +145,20 @@ var init_day_claim = () => {};
145
145
 
146
146
  // packages/telemetry-core/src/activity-state.ts
147
147
  import { existsSync as existsSync5, mkdirSync as mkdirSync3, readFileSync as readFileSync3 } from "node:fs";
148
- import { basename as basename6, join as join35 } from "node:path";
148
+ import { basename as basename6, join as join36 } from "node:path";
149
149
  function resolveTelemetryStateDir(product, options = {}) {
150
150
  const dataDir = resolveXdgDataDir(product.cacheDirName, {
151
151
  env: options.env,
152
152
  osProvider: options.osProvider
153
153
  });
154
- const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join35(options.env.XDG_DATA_HOME, product.cacheDirName);
154
+ const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join36(options.env.XDG_DATA_HOME, product.cacheDirName);
155
155
  if (dataDir === xdgStateDir || xdgStateDir === undefined && basename6(dataDir) === product.cacheDirName) {
156
156
  return dataDir;
157
157
  }
158
- return join35(dataDir, product.cacheDirName);
158
+ return join36(dataDir, product.cacheDirName);
159
159
  }
160
160
  function getTelemetryActivityStateFilePath(stateDir) {
161
- return join35(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
161
+ return join36(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
162
162
  }
163
163
  function getDailyActiveCaptureState(input) {
164
164
  const dayUTC = getUtcDayString(input.now ?? new Date);
@@ -242,9 +242,9 @@ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY =
242
242
 
243
243
  // packages/telemetry-core/src/diagnostics.ts
244
244
  import { appendFileSync, existsSync as existsSync6, mkdirSync as mkdirSync4, readFileSync as readFileSync4 } from "node:fs";
245
- import { join as join36 } from "node:path";
245
+ import { join as join37 } from "node:path";
246
246
  function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
247
- return join36(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
247
+ return join37(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
248
248
  }
249
249
  function writeTelemetryDiagnostic(input, options) {
250
250
  const now = options.now ?? new Date;
@@ -453,14 +453,10 @@ var init_event_id = __esm(() => {
453
453
  });
454
454
 
455
455
  // packages/telemetry-core/src/machine-id.ts
456
- import { createHash as createHash5 } from "node:crypto";
457
456
  import os2 from "node:os";
458
457
  function getDefaultTelemetryOsProvider() {
459
458
  return os2;
460
459
  }
461
- function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
462
- return createHash5("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
463
- }
464
460
  var init_machine_id = () => {};
465
461
 
466
462
  // packages/telemetry-core/src/injected-client.ts
@@ -610,7 +606,7 @@ var init_injected_client = __esm(() => {
610
606
  });
611
607
 
612
608
  // node_modules/.bun/posthog-node@5.52.4/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
613
- import { dirname as dirname11, posix as posix3, sep as sep7 } from "node:path";
609
+ import { dirname as dirname11, posix as posix3, sep as sep8 } from "node:path";
614
610
  function createModulerModifier() {
615
611
  const getModuleFromFileName = createGetModuleFromFilename();
616
612
  return async (frames) => {
@@ -619,7 +615,7 @@ function createModulerModifier() {
619
615
  return frames;
620
616
  };
621
617
  }
622
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname11(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
618
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname11(process.argv[1]) : process.cwd(), isWindows = sep8 === "\\") {
623
619
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
624
620
  return (filename) => {
625
621
  if (!filename)
@@ -6979,16 +6975,16 @@ var init_context_lines_node = __esm(() => {
6979
6975
  });
6980
6976
 
6981
6977
  // node_modules/.bun/posthog-node@5.52.4/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/relative-path.node.mjs
6982
- import { isAbsolute as isAbsolute8, relative as relative4, sep as sep8 } from "node:path";
6978
+ import { isAbsolute as isAbsolute8, relative as relative5, sep as sep9 } from "node:path";
6983
6979
  function createRelativePathModifier(basePath = process.cwd()) {
6984
- const isWindows = sep8 === "\\";
6980
+ const isWindows = sep9 === "\\";
6985
6981
  const toUnix = (p) => isWindows ? p.replace(/\\/g, "/") : p;
6986
6982
  const normalizedBase = toUnix(basePath);
6987
6983
  return async (frames) => {
6988
6984
  for (const frame of frames)
6989
6985
  if (!(!frame.filename || frame.filename.startsWith("node:") || frame.filename.startsWith("data:"))) {
6990
6986
  if (isAbsolute8(frame.filename))
6991
- frame.filename = toUnix(relative4(normalizedBase, toUnix(frame.filename)));
6987
+ frame.filename = toUnix(relative5(normalizedBase, toUnix(frame.filename)));
6992
6988
  }
6993
6989
  return frames;
6994
6990
  };
@@ -10086,6 +10082,55 @@ var init_posthog_transport = __esm(() => {
10086
10082
  // packages/telemetry-core/src/events.ts
10087
10083
  var init_events = () => {};
10088
10084
 
10085
+ // packages/telemetry-core/src/install-id.ts
10086
+ import { createHash as createHash5, randomBytes } from "node:crypto";
10087
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "node:fs";
10088
+ import { dirname as dirname12, join as join38 } from "node:path";
10089
+ function getTelemetryInstallDistinctId(stateDir) {
10090
+ return createHash5("sha256").update(readOrCreateInstallId(join38(stateDir, TELEMETRY_INSTALL_ID_FILE_NAME))).digest("hex");
10091
+ }
10092
+ function readOrCreateInstallId(path) {
10093
+ const persisted = readInstallId(path);
10094
+ if (persisted !== undefined)
10095
+ return persisted;
10096
+ const installId = randomBytes(32).toString("hex");
10097
+ try {
10098
+ mkdirSync5(dirname12(path), { recursive: true });
10099
+ writeFileSync2(path, `${installId}
10100
+ `, { flag: "wx", mode: 384 });
10101
+ fallbackInstallIds.delete(path);
10102
+ return installId;
10103
+ } catch {
10104
+ const concurrentlyCreated = readInstallId(path);
10105
+ if (concurrentlyCreated !== undefined)
10106
+ return concurrentlyCreated;
10107
+ try {
10108
+ writeFileSync2(path, `${installId}
10109
+ `, { flag: "w", mode: 384 });
10110
+ fallbackInstallIds.delete(path);
10111
+ return installId;
10112
+ } catch {}
10113
+ const fallback = fallbackInstallIds.get(path);
10114
+ if (fallback !== undefined)
10115
+ return fallback;
10116
+ fallbackInstallIds.set(path, installId);
10117
+ return installId;
10118
+ }
10119
+ }
10120
+ function readInstallId(path) {
10121
+ try {
10122
+ const value = readFileSync5(path, "utf8").trim();
10123
+ return INSTALL_ID_PATTERN.test(value) ? value : undefined;
10124
+ } catch {
10125
+ return;
10126
+ }
10127
+ }
10128
+ var TELEMETRY_INSTALL_ID_FILE_NAME = "install-id", INSTALL_ID_PATTERN, fallbackInstallIds;
10129
+ var init_install_id = __esm(() => {
10130
+ INSTALL_ID_PATTERN = /^[0-9a-f]{64}$/;
10131
+ fallbackInstallIds = new Map;
10132
+ });
10133
+
10089
10134
  // packages/telemetry-core/src/posthog-client.ts
10090
10135
  function createTelemetryClient2(input) {
10091
10136
  return createTelemetryClient({ ...input, transportFactory: input.transportFactory ?? createDefaultPostHogTransport });
@@ -10112,6 +10157,7 @@ var init_src = __esm(() => {
10112
10157
  init_env();
10113
10158
  init_event_id();
10114
10159
  init_events();
10160
+ init_install_id();
10115
10161
  init_machine_id();
10116
10162
  init_posthog_client();
10117
10163
  init_record_daily_active();
@@ -10123,7 +10169,7 @@ var package_default;
10123
10169
  var init_package = __esm(() => {
10124
10170
  package_default = {
10125
10171
  name: "@oh-my-opencode/omo-codex",
10126
- version: "5.1.48",
10172
+ version: "5.1.51",
10127
10173
  type: "module",
10128
10174
  private: true,
10129
10175
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -10159,7 +10205,7 @@ var init_package = __esm(() => {
10159
10205
  "@oh-my-opencode/utils": "workspace:*"
10160
10206
  },
10161
10207
  devDependencies: {
10162
- "bun-types": "1.4.3"
10208
+ "bun-types": "1.4.4"
10163
10209
  }
10164
10210
  };
10165
10211
  });
@@ -10174,7 +10220,6 @@ function createCodexTelemetryProductConfig(packageVersion = getProductVersion(),
10174
10220
  defaultApiKey: DEFAULT_POSTHOG_API_KEY,
10175
10221
  defaultHost: DEFAULT_POSTHOG_HOST,
10176
10222
  eventName: EVENT_NAME,
10177
- machineIdPrefix: MACHINE_ID_PREFIX,
10178
10223
  packageName: PACKAGE_NAME,
10179
10224
  packageVersion,
10180
10225
  platform: "omo-codex",
@@ -10189,7 +10234,7 @@ function createCodexTelemetryProductConfig(packageVersion = getProductVersion(),
10189
10234
  additionalProperties
10190
10235
  };
10191
10236
  }
10192
- var PRODUCT_NAME = "omo-codex", PACKAGE_NAME = "@oh-my-opencode/omo-codex", CACHE_DIR_NAME = "omo-codex", EVENT_NAME = "omo_codex_daily_active", PRODUCT_ENV_PREFIX = "OMO_CODEX", MACHINE_ID_PREFIX = "omo-codex:";
10237
+ var PRODUCT_NAME = "omo-codex", PACKAGE_NAME = "@oh-my-opencode/omo-codex", CACHE_DIR_NAME = "omo-codex", EVENT_NAME = "omo_codex_daily_active", PRODUCT_ENV_PREFIX = "OMO_CODEX";
10193
10238
  var init_product_identity = __esm(() => {
10194
10239
  init_src();
10195
10240
  init_package();
@@ -10267,7 +10312,7 @@ function createPostHogClient(source, options = {}) {
10267
10312
  }
10268
10313
  const activityStateProvider = resolveActivityStateProvider(options);
10269
10314
  return {
10270
- trackActive: (distinctId, reason) => {
10315
+ trackActive: (reason) => {
10271
10316
  const activityState = options.stateDir === undefined ? activityStateProvider() : getDailyActiveCaptureState({
10272
10317
  diagnostics: writeTelemetryDiagnostic2,
10273
10318
  now: options.now,
@@ -10278,7 +10323,7 @@ function createPostHogClient(source, options = {}) {
10278
10323
  }
10279
10324
  client.trackActive({
10280
10325
  dayUTC: activityState.dayUTC,
10281
- distinctId,
10326
+ distinctId: getTelemetryInstallDistinctId(options.stateDir ?? getActivityStateDir()),
10282
10327
  reason
10283
10328
  });
10284
10329
  },
@@ -10287,15 +10332,13 @@ function createPostHogClient(source, options = {}) {
10287
10332
  }
10288
10333
  };
10289
10334
  }
10290
- function getPostHogDistinctId() {
10291
- return getTelemetryDistinctId(MACHINE_ID_PREFIX, resolveOsProvider());
10292
- }
10293
10335
  function createInstallPostHog() {
10294
10336
  return createPostHogClient("install");
10295
10337
  }
10296
10338
  var osProviderOverride2 = null, activityStateProviderOverride = null, transportFactoryOverride = null, NO_OP_POSTHOG;
10297
10339
  var init_posthog = __esm(() => {
10298
10340
  init_src();
10341
+ init_data_path();
10299
10342
  init_diagnostics2();
10300
10343
  init_posthog_activity_state();
10301
10344
  init_product_identity();
@@ -10316,7 +10359,7 @@ var init_telemetry = __esm(() => {
10316
10359
 
10317
10360
  // packages/omo-codex/src/install/install-local-cli.ts
10318
10361
  import { readFile as readFile26 } from "node:fs/promises";
10319
- import { dirname as dirname13, join as join41, resolve as resolve11 } from "node:path";
10362
+ import { dirname as dirname14, join as join43, resolve as resolve11 } from "node:path";
10320
10363
  import { fileURLToPath as fileURLToPath2 } from "node:url";
10321
10364
 
10322
10365
  // packages/utils/src/runtime/spawn.ts
@@ -10587,7 +10630,7 @@ var defaultRunCommand = async (command, args, options) => {
10587
10630
  };
10588
10631
 
10589
10632
  // packages/omo-codex/src/install/install-codex.ts
10590
- import { join as join37, resolve as resolve10 } from "node:path";
10633
+ import { join as join39, resolve as resolve10 } from "node:path";
10591
10634
  import { existsSync as existsSync7 } from "node:fs";
10592
10635
  import { homedir as homedir2 } from "node:os";
10593
10636
 
@@ -11141,8 +11184,8 @@ async function existingNonSymlink(path) {
11141
11184
  }
11142
11185
  }
11143
11186
  // packages/omo-codex/src/install/codex-cache-install.ts
11144
- import { cp as cp2, mkdir as mkdir3, readFile as readFile8, readdir as readdir4, rename, rm as rm4 } from "node:fs/promises";
11145
- import { basename as basename2, dirname as dirname4, join as join10, sep as sep5 } from "node:path";
11187
+ import { cp as cp3, mkdir as mkdir3, readFile as readFile8, readdir as readdir5, rename as rename2, rm as rm5 } from "node:fs/promises";
11188
+ import { basename as basename2, dirname as dirname4, join as join11, sep as sep6 } from "node:path";
11146
11189
 
11147
11190
  // packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
11148
11191
  import { cp, mkdir as mkdir2, readFile as readFile4, stat as stat3 } from "node:fs/promises";
@@ -11494,9 +11537,66 @@ async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
11494
11537
  `);
11495
11538
  }
11496
11539
 
11540
+ // packages/omo-codex/src/install/codex-cache-payload.ts
11541
+ import { cp as cp2, lstat as lstat5, mkdtemp, readdir as readdir4, rename, rm as rm4 } from "node:fs/promises";
11542
+ import { join as join9, relative as relative4, sep as sep4 } from "node:path";
11543
+ var NPM_BIN_PATH_SEGMENT = `${sep4}node_modules${sep4}.bin${sep4}`;
11544
+ async function finalizeCachedPluginPayload(pluginRoot) {
11545
+ await materializeDirectory(pluginRoot);
11546
+ const unsupported = await unsupportedEntries(pluginRoot, pluginRoot);
11547
+ if (unsupported.length > 0) {
11548
+ throw new Error(`Codex plugin contains unsupported entry types: ${unsupported.sort().join(", ")}`);
11549
+ }
11550
+ }
11551
+ async function materializeDirectory(directory) {
11552
+ for (const name of await readdir4(directory)) {
11553
+ const path = join9(directory, name);
11554
+ let entry = await lstat5(path);
11555
+ if (path.includes(NPM_BIN_PATH_SEGMENT) && !entry.isFile() && !entry.isDirectory()) {
11556
+ await rm4(path, { recursive: true, force: true });
11557
+ continue;
11558
+ }
11559
+ if (entry.isSymbolicLink()) {
11560
+ const staging = await mkdtemp(join9(directory, ".omo-materialize-"));
11561
+ try {
11562
+ const copyPath = join9(staging, "entry");
11563
+ await cp2(path, copyPath, {
11564
+ recursive: true,
11565
+ dereference: true,
11566
+ filter: async (source) => {
11567
+ if (!source.includes(NPM_BIN_PATH_SEGMENT))
11568
+ return true;
11569
+ const sourceEntry = await lstat5(source);
11570
+ return sourceEntry.isFile() || sourceEntry.isDirectory();
11571
+ }
11572
+ });
11573
+ await rm4(path, { force: true, recursive: true });
11574
+ await rename(copyPath, path);
11575
+ } finally {
11576
+ await rm4(staging, { recursive: true, force: true });
11577
+ }
11578
+ entry = await lstat5(path);
11579
+ }
11580
+ if (entry.isDirectory())
11581
+ await materializeDirectory(path);
11582
+ }
11583
+ }
11584
+ async function unsupportedEntries(root, directory) {
11585
+ const unsupported = [];
11586
+ for (const name of await readdir4(directory)) {
11587
+ const path = join9(directory, name);
11588
+ const entry = await lstat5(path);
11589
+ if (entry.isDirectory())
11590
+ unsupported.push(...await unsupportedEntries(root, path));
11591
+ else if (!entry.isFile())
11592
+ unsupported.push(relative4(root, path));
11593
+ }
11594
+ return unsupported;
11595
+ }
11596
+
11497
11597
  // packages/omo-codex/src/install/codex-hook-targets.ts
11498
11598
  import { readFile as readFile7 } from "node:fs/promises";
11499
- import { join as join9, sep as sep4 } from "node:path";
11599
+ import { join as join10, sep as sep5 } from "node:path";
11500
11600
  var PLUGIN_ROOT_TARGET_PATTERN = /\$\{PLUGIN_ROOT\}[\\/]+([^"']+)/g;
11501
11601
  async function findMissingHookCommandTargets(pluginRoot) {
11502
11602
  const commands = [];
@@ -11513,7 +11613,7 @@ async function findMissingHookCommandTargets(pluginRoot) {
11513
11613
  const targetSuffix = match[1];
11514
11614
  if (targetSuffix === undefined)
11515
11615
  continue;
11516
- const target = join9(pluginRoot, ...targetSuffix.split(/[\\/]+/));
11616
+ const target = join10(pluginRoot, ...targetSuffix.split(/[\\/]+/));
11517
11617
  if (seen.has(target))
11518
11618
  continue;
11519
11619
  seen.add(target);
@@ -11524,17 +11624,17 @@ async function findMissingHookCommandTargets(pluginRoot) {
11524
11624
  return missing;
11525
11625
  }
11526
11626
  async function hookManifestPaths(pluginRoot) {
11527
- const pluginManifestPath = join9(pluginRoot, ".codex-plugin", "plugin.json");
11627
+ const pluginManifestPath = join10(pluginRoot, ".codex-plugin", "plugin.json");
11528
11628
  if (!await fileExistsStrict(pluginManifestPath))
11529
- return [join9(pluginRoot, "hooks", "hooks.json")];
11629
+ return [join10(pluginRoot, "hooks", "hooks.json")];
11530
11630
  const parsed = JSON.parse(await readFile7(pluginManifestPath, "utf8"));
11531
11631
  if (!isPlainRecord(parsed))
11532
11632
  return [];
11533
11633
  if (typeof parsed.hooks === "string" && parsed.hooks.trim() !== "") {
11534
- return [join9(pluginRoot, stripDotSlash(parsed.hooks))];
11634
+ return [join10(pluginRoot, stripDotSlash(parsed.hooks))];
11535
11635
  }
11536
11636
  if (Array.isArray(parsed.hooks)) {
11537
- return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) => join9(pluginRoot, stripDotSlash(hookPath)));
11637
+ return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) => join10(pluginRoot, stripDotSlash(hookPath)));
11538
11638
  }
11539
11639
  return [];
11540
11640
  }
@@ -11545,7 +11645,7 @@ async function assertHookCommandTargets(pluginRoot) {
11545
11645
  const missing = await findMissingHookCommandTargets(pluginRoot);
11546
11646
  if (missing.length === 0)
11547
11647
  return;
11548
- const relativeMissing = missing.map((path) => path.split(`${pluginRoot}${sep4}`).join("").split(sep4).join("/"));
11648
+ const relativeMissing = missing.map((path) => path.split(`${pluginRoot}${sep5}`).join("").split(sep5).join("/"));
11549
11649
  throw new Error(`Plugin payload is missing ${missing.length} hook command target(s) referenced by hooks.json: ${relativeMissing.join(", ")}. ` + "The previous plugin cache was left untouched; this payload was not activated.");
11550
11650
  }
11551
11651
  function collectCommands(value, commands) {
@@ -11572,9 +11672,9 @@ async function installCachedPlugin(input) {
11572
11672
  await maybeRunNpmInstall(input.sourcePath, input.runCommand, npmInstallEnv);
11573
11673
  await maybeRunNpmBuild(input.sourcePath, input.runCommand, env);
11574
11674
  }
11575
- const targetPath = join10(input.codexHome, "plugins", "cache", input.marketplaceName, input.name, input.version);
11675
+ const targetPath = join11(input.codexHome, "plugins", "cache", input.marketplaceName, input.name, input.version);
11576
11676
  const tempPath = createTempSiblingPath(targetPath);
11577
- await rm4(tempPath, { recursive: true, force: true });
11677
+ await rm5(tempPath, { recursive: true, force: true });
11578
11678
  try {
11579
11679
  await copyDirectory(input.sourcePath, tempPath);
11580
11680
  const rewroteLocalFileDependencies = await rewriteCachedPackageLocalFileDependencies(tempPath, input.sourcePath);
@@ -11590,30 +11690,31 @@ async function installCachedPlugin(input) {
11590
11690
  await rewriteCachedMcpManifest(tempPath, input.sourcePath);
11591
11691
  await rewriteCachedManifestRoot(tempPath, tempPath, targetPath);
11592
11692
  await assertHookCommandTargets(tempPath);
11593
- await promoteDirectory(tempPath, targetPath, input.renameDirectory ?? rename);
11594
- const versions = await readdir4(dirname4(targetPath), { withFileTypes: true });
11693
+ await finalizeCachedPluginPayload(tempPath);
11694
+ await promoteDirectory(tempPath, targetPath, input.renameDirectory ?? rename2);
11695
+ const versions = await readdir5(dirname4(targetPath), { withFileTypes: true });
11595
11696
  for (const entry of versions) {
11596
11697
  if (!entry.isDirectory() || entry.name === input.version || entry.name.startsWith("."))
11597
11698
  continue;
11598
11699
  if (!/^[a-zA-Z0-9_+-][a-zA-Z0-9._+-]*$/.test(entry.name))
11599
11700
  continue;
11600
- await rm4(join10(dirname4(targetPath), entry.name), { recursive: true, force: true });
11701
+ await rm5(join11(dirname4(targetPath), entry.name), { recursive: true, force: true });
11601
11702
  }
11602
11703
  } catch (error) {
11603
- await rm4(tempPath, { recursive: true, force: true });
11704
+ await rm5(tempPath, { recursive: true, force: true });
11604
11705
  throw error;
11605
11706
  }
11606
11707
  return { name: input.name, version: input.version, path: targetPath };
11607
11708
  }
11608
11709
  async function maybeRunNpmInstall(cwd, runCommand, env, args = ["install"]) {
11609
- if (!await fileExistsStrict(join10(cwd, "package.json")))
11710
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
11610
11711
  return;
11611
11712
  await runCommand("npm", args, { cwd, env });
11612
11713
  }
11613
11714
  async function maybeRunNpmBuild(cwd, runCommand, env) {
11614
- if (!await fileExistsStrict(join10(cwd, "package.json")))
11715
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
11615
11716
  return;
11616
- const packageJson = JSON.parse(await readFile8(join10(cwd, "package.json"), "utf8"));
11717
+ const packageJson = JSON.parse(await readFile8(join11(cwd, "package.json"), "utf8"));
11617
11718
  if (!isPlainRecord(packageJson))
11618
11719
  return;
11619
11720
  const scripts = packageJson.scripts;
@@ -11622,9 +11723,9 @@ async function maybeRunNpmBuild(cwd, runCommand, env) {
11622
11723
  await runCommand("npm", ["run", "build"], { cwd, env });
11623
11724
  }
11624
11725
  async function maybeRunNpmSyncSkills(cwd, runCommand, env) {
11625
- if (!await fileExistsStrict(join10(cwd, "package.json")))
11726
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
11626
11727
  return;
11627
- const packageJson = JSON.parse(await readFile8(join10(cwd, "package.json"), "utf8"));
11728
+ const packageJson = JSON.parse(await readFile8(join11(cwd, "package.json"), "utf8"));
11628
11729
  if (!isPlainRecord(packageJson))
11629
11730
  return;
11630
11731
  const scripts = packageJson.scripts;
@@ -11636,18 +11737,18 @@ function sanitizeNpmInstallEnv(env) {
11636
11737
  return Object.fromEntries(Object.entries(env).filter(([key]) => key.toLowerCase() !== "npm_config_allow_scripts"));
11637
11738
  }
11638
11739
  function createTempSiblingPath(targetPath) {
11639
- return join10(dirname4(targetPath), `.tmp-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
11740
+ return join11(dirname4(targetPath), `.tmp-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
11640
11741
  }
11641
11742
  function createBackupSiblingPath(targetPath) {
11642
- return join10(dirname4(targetPath), `.backup-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
11743
+ return join11(dirname4(targetPath), `.backup-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
11643
11744
  }
11644
11745
  async function copyDirectory(sourcePath, targetPath) {
11645
11746
  await mkdir3(dirname4(targetPath), { recursive: true });
11646
- await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
11747
+ await cp3(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
11647
11748
  }
11648
11749
  async function promoteDirectory(tempPath, targetPath, renameDirectory) {
11649
11750
  const backupPath = createBackupSiblingPath(targetPath);
11650
- await rm4(backupPath, { recursive: true, force: true });
11751
+ await rm5(backupPath, { recursive: true, force: true });
11651
11752
  let backupMoved = false;
11652
11753
  try {
11653
11754
  if (await fileExistsStrict(targetPath)) {
@@ -11661,19 +11762,19 @@ async function promoteDirectory(tempPath, targetPath, renameDirectory) {
11661
11762
  throw error;
11662
11763
  }
11663
11764
  if (backupMoved)
11664
- await rm4(backupPath, { recursive: true, force: true });
11765
+ await rm5(backupPath, { recursive: true, force: true });
11665
11766
  }
11666
11767
  async function restoreBackupDirectory(backupPath, targetPath, renameDirectory) {
11667
11768
  if (!await fileExistsStrict(backupPath))
11668
11769
  return;
11669
- await rm4(targetPath, { recursive: true, force: true });
11770
+ await rm5(targetPath, { recursive: true, force: true });
11670
11771
  await renameDirectory(backupPath, targetPath);
11671
11772
  }
11672
11773
  function shouldCopyPluginPath(path, root) {
11673
- const relative = path === root ? "" : path.slice(root.length + sep5.length);
11774
+ const relative = path === root ? "" : path.slice(root.length + sep6.length);
11674
11775
  if (relative === "")
11675
11776
  return true;
11676
- const parts = relative.split(sep5);
11777
+ const parts = relative.split(sep6);
11677
11778
  if (parts.some((part) => part === ".git" || part === "node_modules"))
11678
11779
  return false;
11679
11780
  return !isNestedComponentMcpManifest(parts);
@@ -11687,18 +11788,18 @@ var removedSparkshellPromptSurfaceFiles = new Set(["directive.md", "plugin.json"
11687
11788
  var removedSparkshellTextFilePattern = /\.(?:json|md|toml|ya?ml)$/i;
11688
11789
  async function assertNoRemovedSparkshellPromptReferences(pluginRoot) {
11689
11790
  for (const filePath of await listRemovedSparkshellPromptSurfaceFiles(pluginRoot, "")) {
11690
- const content = await readFile8(join10(pluginRoot, filePath), "utf8");
11791
+ const content = await readFile8(join11(pluginRoot, filePath), "utf8");
11691
11792
  if (!removedSparkshellReferencePattern.test(content))
11692
11793
  continue;
11693
11794
  throw new Error(`removed sparkshell reference found in Codex plugin prompt surface: ${filePath}`);
11694
11795
  }
11695
11796
  }
11696
11797
  async function listRemovedSparkshellPromptSurfaceFiles(pluginRoot, relativeDirectory) {
11697
- const directory = relativeDirectory === "" ? pluginRoot : join10(pluginRoot, relativeDirectory);
11698
- const entries = await readdir4(directory, { withFileTypes: true });
11798
+ const directory = relativeDirectory === "" ? pluginRoot : join11(pluginRoot, relativeDirectory);
11799
+ const entries = await readdir5(directory, { withFileTypes: true });
11699
11800
  const files = [];
11700
11801
  for (const entry of entries) {
11701
- const relativePath = relativeDirectory === "" ? entry.name : join10(relativeDirectory, entry.name);
11802
+ const relativePath = relativeDirectory === "" ? entry.name : join11(relativeDirectory, entry.name);
11702
11803
  if (entry.isDirectory()) {
11703
11804
  if (shouldDescendIntoRemovedSparkshellPromptSurface(relativePath)) {
11704
11805
  files.push(...await listRemovedSparkshellPromptSurfaceFiles(pluginRoot, relativePath));
@@ -11711,7 +11812,7 @@ async function listRemovedSparkshellPromptSurfaceFiles(pluginRoot, relativeDirec
11711
11812
  return files.sort();
11712
11813
  }
11713
11814
  function shouldDescendIntoRemovedSparkshellPromptSurface(relativePath) {
11714
- const parts = relativePath.split(sep5);
11815
+ const parts = relativePath.split(sep6);
11715
11816
  if (parts.some((part) => part === ".git" || part === "dist" || part === "node_modules"))
11716
11817
  return false;
11717
11818
  if (parts[0] === "components") {
@@ -11724,7 +11825,7 @@ function shouldDescendIntoRemovedSparkshellPromptSurface(relativePath) {
11724
11825
  function shouldCheckRemovedSparkshellPromptFile(relativePath) {
11725
11826
  if (!removedSparkshellTextFilePattern.test(relativePath))
11726
11827
  return false;
11727
- const parts = relativePath.split(sep5);
11828
+ const parts = relativePath.split(sep6);
11728
11829
  const fileName = parts.at(-1) ?? "";
11729
11830
  if (parts[0] === "components") {
11730
11831
  if (parts.length === 3)
@@ -11738,25 +11839,25 @@ async function copyRootRuntimeDists(input) {
11738
11839
  if (repoRoot === null)
11739
11840
  return;
11740
11841
  for (const runtimePath of ["dist/cli", "dist/cli-node"]) {
11741
- const sourcePath = join10(repoRoot, runtimePath);
11742
- if (!await fileExistsStrict(join10(sourcePath, "index.js")))
11842
+ const sourcePath = join11(repoRoot, runtimePath);
11843
+ if (!await fileExistsStrict(join11(sourcePath, "index.js")))
11743
11844
  continue;
11744
- await mkdir3(dirname4(join10(input.pluginRoot, runtimePath)), { recursive: true });
11745
- await cp2(sourcePath, join10(input.pluginRoot, runtimePath), { recursive: true });
11845
+ await mkdir3(dirname4(join11(input.pluginRoot, runtimePath)), { recursive: true });
11846
+ await cp3(sourcePath, join11(input.pluginRoot, runtimePath), { recursive: true });
11746
11847
  }
11747
11848
  }
11748
- var canonicalPromptRelativePaths = [join10("packages", "prompts-core", "prompts", "ultrawork", "codex.md")];
11849
+ var canonicalPromptRelativePaths = [join11("packages", "prompts-core", "prompts", "ultrawork", "codex.md")];
11749
11850
  async function copyCanonicalPromptSources(input) {
11750
11851
  const repoRoot = repoRootForCodexPluginSource(input.sourcePath);
11751
11852
  if (repoRoot === null)
11752
11853
  return;
11753
11854
  for (const relativePath of canonicalPromptRelativePaths) {
11754
- const sourceFile = join10(repoRoot, relativePath);
11855
+ const sourceFile = join11(repoRoot, relativePath);
11755
11856
  if (!await fileExistsStrict(sourceFile))
11756
11857
  continue;
11757
- const targetFile = join10(input.pluginRoot, relativePath);
11858
+ const targetFile = join11(input.pluginRoot, relativePath);
11758
11859
  await mkdir3(dirname4(targetFile), { recursive: true });
11759
- await cp2(sourceFile, targetFile);
11860
+ await cp3(sourceFile, targetFile);
11760
11861
  }
11761
11862
  }
11762
11863
  function repoRootForCodexPluginSource(sourcePath) {
@@ -11771,10 +11872,10 @@ function repoRootForCodexPluginSource(sourcePath) {
11771
11872
  return dirname4(packagesRoot);
11772
11873
  }
11773
11874
  // packages/omo-codex/src/install/codex-cache-prune.ts
11774
- import { lstat as lstat5, readdir as readdir5, rm as rm5, stat as stat4 } from "node:fs/promises";
11775
- import { join as join11 } from "node:path";
11875
+ import { lstat as lstat6, readdir as readdir6, rm as rm6, stat as stat4 } from "node:fs/promises";
11876
+ import { join as join12 } from "node:path";
11776
11877
  async function pruneMarketplaceCache(input) {
11777
- const cacheRoot = join11(input.codexHome, "plugins", "cache", input.marketplaceName);
11878
+ const cacheRoot = join12(input.codexHome, "plugins", "cache", input.marketplaceName);
11778
11879
  if (!await fileExistsStrict(cacheRoot))
11779
11880
  return;
11780
11881
  const keep = new Set(input.keepPluginNames);
@@ -11782,28 +11883,28 @@ async function pruneMarketplaceCache(input) {
11782
11883
  for (const entry of entries) {
11783
11884
  if (!entry.isDirectory() || keep.has(entry.name))
11784
11885
  continue;
11785
- await rm5(join11(cacheRoot, entry.name), { recursive: true, force: true });
11886
+ await rm6(join12(cacheRoot, entry.name), { recursive: true, force: true });
11786
11887
  }
11787
11888
  }
11788
11889
  async function pruneMarketplacePluginCaches(input) {
11789
- const cacheRoot = join11(input.codexHome, "plugins", "cache", input.marketplaceName);
11890
+ const cacheRoot = join12(input.codexHome, "plugins", "cache", input.marketplaceName);
11790
11891
  if (!await fileExistsStrict(cacheRoot))
11791
11892
  return;
11792
11893
  for (const pluginName of input.pluginNames) {
11793
- await rm5(join11(cacheRoot, pluginName), { recursive: true, force: true });
11894
+ await rm6(join12(cacheRoot, pluginName), { recursive: true, force: true });
11794
11895
  }
11795
11896
  const remainingEntries = await readCacheEntryNames(cacheRoot);
11796
11897
  if (remainingEntries.length === 0) {
11797
- await rm5(cacheRoot, { recursive: true, force: true });
11898
+ await rm6(cacheRoot, { recursive: true, force: true });
11798
11899
  }
11799
11900
  }
11800
11901
  async function readCacheEntries(path) {
11801
11902
  const emptyEntries = [];
11802
- return readCacheRoot(path, () => readdir5(path, { withFileTypes: true }), emptyEntries);
11903
+ return readCacheRoot(path, () => readdir6(path, { withFileTypes: true }), emptyEntries);
11803
11904
  }
11804
11905
  async function readCacheEntryNames(path) {
11805
11906
  const emptyNames = [];
11806
- return readCacheRoot(path, () => readdir5(path), emptyNames);
11907
+ return readCacheRoot(path, () => readdir6(path), emptyNames);
11807
11908
  }
11808
11909
  async function readCacheRoot(path, readEntries, fallback) {
11809
11910
  try {
@@ -11818,7 +11919,7 @@ async function readCacheRoot(path, readEntries, fallback) {
11818
11919
  }
11819
11920
  async function isBrokenCacheSymlink(path) {
11820
11921
  try {
11821
- const entry = await lstat5(path);
11922
+ const entry = await lstat6(path);
11822
11923
  if (!entry.isSymbolicLink())
11823
11924
  return false;
11824
11925
  } catch (error) {
@@ -11836,18 +11937,18 @@ async function isBrokenCacheSymlink(path) {
11836
11937
  }
11837
11938
  }
11838
11939
  // packages/omo-codex/src/install/codex-cached-marketplace-manifest.ts
11839
- import { mkdir as mkdir4, rename as rename2, rm as rm6, stat as stat5, writeFile as writeFile4 } from "node:fs/promises";
11840
- import { join as join12 } from "node:path";
11940
+ import { mkdir as mkdir4, rename as rename3, rm as rm7, stat as stat5, writeFile as writeFile4 } from "node:fs/promises";
11941
+ import { join as join13 } from "node:path";
11841
11942
  async function writeCachedMarketplaceManifest(input) {
11842
- const marketplaceDir = join12(input.marketplaceRoot, ".agents", "plugins");
11943
+ const marketplaceDir = join13(input.marketplaceRoot, ".agents", "plugins");
11843
11944
  await mkdir4(marketplaceDir, { recursive: true });
11844
11945
  for (const plugin of input.plugins) {
11845
- const pluginPath = join12(input.marketplaceRoot, plugin.name, plugin.version);
11946
+ const pluginPath = join13(input.marketplaceRoot, plugin.name, plugin.version);
11846
11947
  if (!await isDirectory2(pluginPath))
11847
11948
  throw new Error(`Cannot write cached marketplace manifest: ${pluginPath} does not exist`);
11848
11949
  }
11849
- const manifestPath = join12(marketplaceDir, "marketplace.json");
11850
- const tempPath = join12(marketplaceDir, `.marketplace.json.tmp-${process.pid}-${Date.now()}`);
11950
+ const manifestPath = join13(marketplaceDir, "marketplace.json");
11951
+ const tempPath = join13(marketplaceDir, `.marketplace.json.tmp-${process.pid}-${Date.now()}`);
11851
11952
  try {
11852
11953
  await writeFile4(tempPath, `${JSON.stringify({
11853
11954
  name: input.marketplaceName,
@@ -11857,9 +11958,9 @@ async function writeCachedMarketplaceManifest(input) {
11857
11958
  }))
11858
11959
  }, null, "\t")}
11859
11960
  `);
11860
- await rename2(tempPath, manifestPath);
11961
+ await rename3(tempPath, manifestPath);
11861
11962
  } catch (error) {
11862
- await rm6(tempPath, { force: true });
11963
+ await rm7(tempPath, { force: true });
11863
11964
  throw error;
11864
11965
  }
11865
11966
  }
@@ -11876,7 +11977,7 @@ async function isDirectory2(path) {
11876
11977
  // packages/omo-codex/src/install/codex-package-layout.ts
11877
11978
  import { existsSync as existsSync2 } from "node:fs";
11878
11979
  import { readFile as readFile9 } from "node:fs/promises";
11879
- import { join as join13 } from "node:path";
11980
+ import { join as join14 } from "node:path";
11880
11981
  var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
11881
11982
  "@code-yeongyu/lazycodex",
11882
11983
  "@code-yeongyu/lazycodex-ai",
@@ -11886,9 +11987,9 @@ var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
11886
11987
  "oh-my-openagent"
11887
11988
  ]);
11888
11989
  async function shouldBuildSourcePackages(repoRoot) {
11889
- if (existsSync2(join13(repoRoot, "packages", "omo-opencode", "src", "index.ts")))
11990
+ if (existsSync2(join14(repoRoot, "packages", "omo-opencode", "src", "index.ts")))
11890
11991
  return true;
11891
- const packageJsonPath = join13(repoRoot, "package.json");
11992
+ const packageJsonPath = join14(repoRoot, "package.json");
11892
11993
  if (!existsSync2(packageJsonPath))
11893
11994
  return true;
11894
11995
  const packageJson = JSON.parse(await readFile9(packageJsonPath, "utf8"));
@@ -12495,13 +12596,13 @@ function tomlKeySegment(value) {
12495
12596
  }
12496
12597
 
12497
12598
  // packages/omo-codex/src/install/codex-config-atomic-write.ts
12498
- import { lstat as lstat6, readlink as readlink4, realpath, rename as rename3, unlink, writeFile as writeFile5 } from "node:fs/promises";
12499
- import { basename as basename3, dirname as dirname5, isAbsolute as isAbsolute5, join as join14, resolve as resolve6 } from "node:path";
12599
+ import { lstat as lstat7, readlink as readlink4, realpath, rename as rename4, unlink, writeFile as writeFile5 } from "node:fs/promises";
12600
+ import { basename as basename3, dirname as dirname5, isAbsolute as isAbsolute5, join as join15, resolve as resolve6 } from "node:path";
12500
12601
  var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
12501
12602
  var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
12502
12603
  async function writeFileAtomic(targetPath, data) {
12503
12604
  const writeTarget = await resolveSymlinkTarget(targetPath);
12504
- const temporaryPath = join14(dirname5(writeTarget), `.tmp-${basename3(writeTarget)}-${process.pid}-${Date.now()}`);
12605
+ const temporaryPath = join15(dirname5(writeTarget), `.tmp-${basename3(writeTarget)}-${process.pid}-${Date.now()}`);
12505
12606
  await writeFile5(temporaryPath, data);
12506
12607
  try {
12507
12608
  await renameWithRetry(temporaryPath, writeTarget);
@@ -12516,7 +12617,7 @@ async function writeFileAtomic(targetPath, data) {
12516
12617
  }
12517
12618
  async function resolveSymlinkTarget(targetPath) {
12518
12619
  try {
12519
- const linkStats = await lstat6(targetPath);
12620
+ const linkStats = await lstat7(targetPath);
12520
12621
  if (!linkStats.isSymbolicLink())
12521
12622
  return targetPath;
12522
12623
  } catch (error) {
@@ -12536,7 +12637,7 @@ async function resolveSymlinkTarget(targetPath) {
12536
12637
  async function renameWithRetry(fromPath, toPath) {
12537
12638
  for (let attempt = 0;; attempt += 1) {
12538
12639
  try {
12539
- await rename3(fromPath, toPath);
12640
+ await rename4(fromPath, toPath);
12540
12641
  return;
12541
12642
  } catch (error) {
12542
12643
  if (!isRetriableRenameError(error) || attempt >= RENAME_RETRY_DELAYS_MS.length) {
@@ -13001,7 +13102,7 @@ function isRootSetting(line, key) {
13001
13102
 
13002
13103
  // packages/omo-codex/src/install/codex-model-catalog.ts
13003
13104
  import { readFile as readFile10 } from "node:fs/promises";
13004
- import { join as join15 } from "node:path";
13105
+ import { join as join16 } from "node:path";
13005
13106
 
13006
13107
  // packages/model-core/src/latest-models.ts
13007
13108
  var LATEST_MODEL_BY_FAMILY = {
@@ -13050,7 +13151,7 @@ var FALLBACK_CODEX_MODEL_CATALOG = {
13050
13151
  ]
13051
13152
  };
13052
13153
  async function readCodexModelCatalog(codexPackageRoot) {
13053
- const catalogPath = join15(codexPackageRoot, "plugin", "model-catalog.json");
13154
+ const catalogPath = join16(codexPackageRoot, "plugin", "model-catalog.json");
13054
13155
  try {
13055
13156
  const parsed = JSON.parse(await readFile10(catalogPath, "utf8"));
13056
13157
  return parseCodexModelCatalog(parsed) ?? FALLBACK_CODEX_MODEL_CATALOG;
@@ -13134,7 +13235,7 @@ function isRootSetting2(line, key) {
13134
13235
 
13135
13236
  // packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
13136
13237
  import { readFileSync } from "node:fs";
13137
- import { dirname as dirname6, isAbsolute as isAbsolute6, join as join16 } from "node:path";
13238
+ import { dirname as dirname6, isAbsolute as isAbsolute6, join as join17 } from "node:path";
13138
13239
  var CODEX_AGENTS_HEADER = "agents";
13139
13240
  var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
13140
13241
  function ensureCodexMultiAgentV2Config(config, options = {}) {
@@ -13162,8 +13263,8 @@ function resolveCodexMultiAgentVersion(config, configPath) {
13162
13263
  }
13163
13264
  function resolveCatalogPath(configuredPath, configPath) {
13164
13265
  if (configuredPath === null)
13165
- return join16(dirname6(configPath), "models_cache.json");
13166
- return isAbsolute6(configuredPath) ? configuredPath : join16(dirname6(configPath), configuredPath);
13266
+ return join17(dirname6(configPath), "models_cache.json");
13267
+ return isAbsolute6(configuredPath) ? configuredPath : join17(dirname6(configPath), configuredPath);
13167
13268
  }
13168
13269
  function readCatalogMultiAgentVersion(model, cachePath) {
13169
13270
  let raw;
@@ -13326,7 +13427,7 @@ function isMissingFileError(error) {
13326
13427
  // packages/omo-codex/src/install/codex-hook-trust.ts
13327
13428
  import { createHash } from "node:crypto";
13328
13429
  import { readFile as readFile12 } from "node:fs/promises";
13329
- import { join as join17 } from "node:path";
13430
+ import { join as join18 } from "node:path";
13330
13431
  var EVENT_LABELS = new Map([
13331
13432
  ["PreToolUse", "pre_tool_use"],
13332
13433
  ["PermissionRequest", "permission_request"],
@@ -13340,7 +13441,7 @@ var EVENT_LABELS = new Map([
13340
13441
  ["Stop", "stop"]
13341
13442
  ]);
13342
13443
  async function trustedHookStatesForPlugin(input) {
13343
- const manifestPath = join17(input.pluginRoot, ".codex-plugin", "plugin.json");
13444
+ const manifestPath = join18(input.pluginRoot, ".codex-plugin", "plugin.json");
13344
13445
  if (!await exists(manifestPath))
13345
13446
  return [];
13346
13447
  const manifest = JSON.parse(await readFile12(manifestPath, "utf8"));
@@ -13348,7 +13449,7 @@ async function trustedHookStatesForPlugin(input) {
13348
13449
  return [];
13349
13450
  const states = [];
13350
13451
  for (const hookPath of hookManifestPaths2(manifest.hooks)) {
13351
- const hooksPath = join17(input.pluginRoot, hookPath);
13452
+ const hooksPath = join18(input.pluginRoot, hookPath);
13352
13453
  if (!await exists(hooksPath))
13353
13454
  continue;
13354
13455
  const parsed = JSON.parse(await readFile12(hooksPath, "utf8"));
@@ -21524,7 +21625,7 @@ function validateConfigLayer(path, data) {
21524
21625
 
21525
21626
  // packages/omo-config-core/src/loader/paths.ts
21526
21627
  import { userInfo } from "node:os";
21527
- import { dirname as dirname8, join as join18, posix, resolve as resolve7 } from "node:path";
21628
+ import { dirname as dirname8, join as join19, posix, resolve as resolve7 } from "node:path";
21528
21629
 
21529
21630
  // packages/omo-config-core/src/internal/posix-path.ts
21530
21631
  function toPosixPath2(path) {
@@ -21539,14 +21640,14 @@ function resolveHomeDir(env = process.env) {
21539
21640
  return homeDir.startsWith("/") ? posix.resolve(homeDir) : toPosixPath2(resolve7(homeDir));
21540
21641
  }
21541
21642
  function resolveUserOmoConfigDirectory(env = process.env) {
21542
- return join18(resolveHomeDir(env), ".omo");
21643
+ return join19(resolveHomeDir(env), ".omo");
21543
21644
  }
21544
21645
  function detectUserOmoJsonPath(env, fileSystem) {
21545
21646
  const configDir = resolveUserOmoConfigDirectory(env);
21546
- const jsoncPath = join18(configDir, "omo.jsonc");
21647
+ const jsoncPath = join19(configDir, "omo.jsonc");
21547
21648
  if (fileSystem.existsSync(jsoncPath))
21548
21649
  return jsoncPath;
21549
- const jsonPath = join18(configDir, "omo.json");
21650
+ const jsonPath = join19(configDir, "omo.json");
21550
21651
  return fileSystem.existsSync(jsonPath) ? jsonPath : jsoncPath;
21551
21652
  }
21552
21653
  function isSymlinkedProjectPath(path, fileSystem) {
@@ -21564,13 +21665,13 @@ function isLoadableProjectConfigFile(path, fileSystem) {
21564
21665
  return fileSystem.existsSync(path) && !isSymlinkedProjectPath(path, fileSystem);
21565
21666
  }
21566
21667
  function detectOmoJsonPath(dir, fileSystem) {
21567
- const omoDir = join18(dir, ".omo");
21668
+ const omoDir = join19(dir, ".omo");
21568
21669
  if (isSymlinkedProjectPath(omoDir, fileSystem))
21569
21670
  return null;
21570
- const jsoncPath = join18(omoDir, "omo.jsonc");
21671
+ const jsoncPath = join19(omoDir, "omo.jsonc");
21571
21672
  if (isLoadableProjectConfigFile(jsoncPath, fileSystem))
21572
21673
  return jsoncPath;
21573
- const jsonPath = join18(omoDir, "omo.json");
21674
+ const jsonPath = join19(omoDir, "omo.json");
21574
21675
  return isLoadableProjectConfigFile(jsonPath, fileSystem) ? jsonPath : null;
21575
21676
  }
21576
21677
  function realpathOrSelf(path, fileSystem) {
@@ -21890,8 +21991,8 @@ function recordAt(value, key) {
21890
21991
  }
21891
21992
 
21892
21993
  // packages/omo-codex/src/install/codex-marketplace-snapshot.ts
21893
- import { cp as cp3, mkdir as mkdir6, rename as rename4, rm as rm7, writeFile as writeFile6 } from "node:fs/promises";
21894
- import { join as join19, sep as sep6 } from "node:path";
21994
+ import { cp as cp4, mkdir as mkdir6, rename as rename5, rm as rm8, writeFile as writeFile6 } from "node:fs/promises";
21995
+ import { join as join20, sep as sep7 } from "node:path";
21895
21996
  var INSTALLED_MARKETPLACES_DIR = ".tmp/marketplaces";
21896
21997
  async function writeInstalledMarketplaceSnapshot(input) {
21897
21998
  const marketplaceRoot = installedMarketplaceRoot(input.codexHome, input.marketplace.name);
@@ -21904,51 +22005,51 @@ async function writeInstalledMarketplaceSnapshot(input) {
21904
22005
  return snapshotPlugins;
21905
22006
  }
21906
22007
  function installedMarketplaceRoot(codexHome, marketplaceName) {
21907
- return join19(codexHome, INSTALLED_MARKETPLACES_DIR, marketplaceName);
22008
+ return join20(codexHome, INSTALLED_MARKETPLACES_DIR, marketplaceName);
21908
22009
  }
21909
22010
  async function writeMarketplaceManifest(marketplaceRoot, marketplace) {
21910
- const manifestDir = join19(marketplaceRoot, ".agents", "plugins");
22011
+ const manifestDir = join20(marketplaceRoot, ".agents", "plugins");
21911
22012
  await mkdir6(manifestDir, { recursive: true });
21912
- const tempPath = join19(manifestDir, `.marketplace-${process.pid}-${Date.now()}.json.tmp`);
22013
+ const tempPath = join20(manifestDir, `.marketplace-${process.pid}-${Date.now()}.json.tmp`);
21913
22014
  await writeFile6(tempPath, `${JSON.stringify(marketplace, null, "\t")}
21914
22015
  `);
21915
- await rename4(tempPath, join19(manifestDir, "marketplace.json"));
22016
+ await rename5(tempPath, join20(manifestDir, "marketplace.json"));
21916
22017
  }
21917
22018
  async function writeSnapshotPlugin(marketplaceRoot, plugin) {
21918
- const pluginsDir = join19(marketplaceRoot, "plugins");
22019
+ const pluginsDir = join20(marketplaceRoot, "plugins");
21919
22020
  await mkdir6(pluginsDir, { recursive: true });
21920
- const targetPath = join19(pluginsDir, plugin.name);
21921
- const tempPath = join19(pluginsDir, `.tmp-${plugin.name}-${process.pid}-${Date.now()}`);
21922
- await rm7(tempPath, { recursive: true, force: true });
21923
- await cp3(plugin.sourcePath, tempPath, {
22021
+ const targetPath = join20(pluginsDir, plugin.name);
22022
+ const tempPath = join20(pluginsDir, `.tmp-${plugin.name}-${process.pid}-${Date.now()}`);
22023
+ await rm8(tempPath, { recursive: true, force: true });
22024
+ await cp4(plugin.sourcePath, tempPath, {
21924
22025
  recursive: true,
21925
22026
  filter: (source) => shouldCopyMarketplaceSourcePath(source, plugin.sourcePath)
21926
22027
  });
21927
22028
  await copyBundledMcpRuntimeDists({ pluginRoot: tempPath, sourceRoot: plugin.sourcePath });
21928
- await rm7(targetPath, { recursive: true, force: true });
21929
- await rename4(tempPath, targetPath);
22029
+ await rm8(targetPath, { recursive: true, force: true });
22030
+ await rename5(tempPath, targetPath);
21930
22031
  await rewriteCachedMcpManifest(targetPath, plugin.sourcePath);
21931
22032
  return { name: plugin.name, path: targetPath };
21932
22033
  }
21933
22034
  function shouldCopyMarketplaceSourcePath(path, root) {
21934
- const relative = path === root ? "" : path.slice(root.length + sep6.length);
22035
+ const relative = path === root ? "" : path.slice(root.length + sep7.length);
21935
22036
  if (relative === "")
21936
22037
  return true;
21937
- const parts = relative.split(sep6);
22038
+ const parts = relative.split(sep7);
21938
22039
  return !parts.some((part) => part === ".git" || part === "node_modules");
21939
22040
  }
21940
22041
 
21941
22042
  // packages/omo-codex/src/install/link-cached-plugin-agents.ts
21942
- import { copyFile, lstat as lstat10, mkdir as mkdir7, readdir as readdir7, readFile as readFile17, rm as rm11, writeFile as writeFile9 } from "node:fs/promises";
21943
- import { basename as basename4, join as join24 } from "node:path";
22043
+ import { copyFile, lstat as lstat11, mkdir as mkdir7, readdir as readdir8, readFile as readFile17, rm as rm12, writeFile as writeFile9 } from "node:fs/promises";
22044
+ import { basename as basename4, join as join25 } from "node:path";
21944
22045
 
21945
22046
  // packages/omo-codex/src/install/agent-model-overrides.ts
21946
- import { readFile as readFile14, rm as rm8, writeFile as writeFile8 } from "node:fs/promises";
21947
- import { join as join21 } from "node:path";
22047
+ import { readFile as readFile14, rm as rm9, writeFile as writeFile8 } from "node:fs/promises";
22048
+ import { join as join22 } from "node:path";
21948
22049
 
21949
22050
  // packages/omo-codex/src/install/preserved-agent-settings.ts
21950
- import { lstat as lstat7, readFile as readFile13, readdir as readdir6, writeFile as writeFile7 } from "node:fs/promises";
21951
- import { join as join20 } from "node:path";
22051
+ import { lstat as lstat8, readFile as readFile13, readdir as readdir7, writeFile as writeFile7 } from "node:fs/promises";
22052
+ import { join as join21 } from "node:path";
21952
22053
 
21953
22054
  // packages/omo-codex/src/install/managed-agent-reasoning-defaults.ts
21954
22055
  var MANAGED_REASONING_DEFAULT_UPGRADES = new Map([
@@ -22141,15 +22242,15 @@ function resolveManagedAgentReasoning(input) {
22141
22242
 
22142
22243
  // packages/omo-codex/src/install/preserved-agent-settings.ts
22143
22244
  async function capturePreservedAgentReasoning(input) {
22144
- const agentsDir = join20(input.codexHome, "agents");
22245
+ const agentsDir = join21(input.codexHome, "agents");
22145
22246
  if (!await exists2(agentsDir))
22146
22247
  return new Map;
22147
22248
  const preserved = new Map;
22148
- const agentEntries = await readdir6(agentsDir, { withFileTypes: true });
22249
+ const agentEntries = await readdir7(agentsDir, { withFileTypes: true });
22149
22250
  for (const entry of agentEntries) {
22150
22251
  if (!entry.name.endsWith(".toml"))
22151
22252
  continue;
22152
- const content = await readTextIfExists(join20(agentsDir, entry.name));
22253
+ const content = await readTextIfExists(join21(agentsDir, entry.name));
22153
22254
  if (content === null)
22154
22255
  continue;
22155
22256
  const effort = extractReasoningEffort(content);
@@ -22163,15 +22264,15 @@ async function capturePreservedAgentReasoning(input) {
22163
22264
  return preserved;
22164
22265
  }
22165
22266
  async function capturePreservedAgentServiceTier(input) {
22166
- const agentsDir = join20(input.codexHome, "agents");
22267
+ const agentsDir = join21(input.codexHome, "agents");
22167
22268
  if (!await exists2(agentsDir))
22168
22269
  return new Map;
22169
22270
  const preserved = new Map;
22170
- const agentEntries = await readdir6(agentsDir, { withFileTypes: true });
22271
+ const agentEntries = await readdir7(agentsDir, { withFileTypes: true });
22171
22272
  for (const entry of agentEntries) {
22172
22273
  if (!entry.name.endsWith(".toml"))
22173
22274
  continue;
22174
- const content = await readTextIfExists(join20(agentsDir, entry.name));
22275
+ const content = await readTextIfExists(join21(agentsDir, entry.name));
22175
22276
  if (content === null)
22176
22277
  continue;
22177
22278
  preserved.set(agentNameFromToml(entry.name), extractServiceTier(content));
@@ -22300,7 +22401,7 @@ function agentNameFromToml(fileName) {
22300
22401
  }
22301
22402
  async function exists2(path) {
22302
22403
  try {
22303
- await lstat7(path);
22404
+ await lstat8(path);
22304
22405
  return true;
22305
22406
  } catch (error) {
22306
22407
  if (nodeErrorCode(error) !== "ENOENT")
@@ -22339,7 +22440,7 @@ async function readAgentModelReceipts(codexHome) {
22339
22440
  async function writeAgentModelReceipts(codexHome, receipts) {
22340
22441
  const path = receiptPath(codexHome);
22341
22442
  if (receipts.size === 0) {
22342
- await rm8(path, { force: true });
22443
+ await rm9(path, { force: true });
22343
22444
  return;
22344
22445
  }
22345
22446
  await writeFile8(path, `${JSON.stringify(Object.fromEntries(receipts), null, "\t")}
@@ -22360,7 +22461,7 @@ async function applyAgentOverride(input) {
22360
22461
  await writeFile8(input.linkPath, content);
22361
22462
  }
22362
22463
  function receiptPath(codexHome) {
22363
- return join21(codexHome, "agents", RECEIPT_FILE);
22464
+ return join22(codexHome, "agents", RECEIPT_FILE);
22364
22465
  }
22365
22466
  function parseJson(content) {
22366
22467
  try {
@@ -22392,8 +22493,8 @@ function handEditedAgentModel(installedModel, receipt) {
22392
22493
  }
22393
22494
 
22394
22495
  // packages/omo-codex/src/install/retired-managed-agent-purge.ts
22395
- import { lstat as lstat8, readFile as readFile15, rm as rm9 } from "node:fs/promises";
22396
- import { join as join22 } from "node:path";
22496
+ import { lstat as lstat9, readFile as readFile15, rm as rm10 } from "node:fs/promises";
22497
+ import { join as join23 } from "node:path";
22397
22498
  var RETIRED_MANAGED_AGENT_FILES = [
22398
22499
  {
22399
22500
  fileName: "codex-ultrawork-reviewer.toml",
@@ -22405,20 +22506,20 @@ var RETIRED_MANAGED_AGENT_FILES = [
22405
22506
  }
22406
22507
  ];
22407
22508
  async function purgeRetiredManagedAgentFiles(input) {
22408
- const agentsDir = join22(input.codexHome, "agents");
22509
+ const agentsDir = join23(input.codexHome, "agents");
22409
22510
  if (!await exists3(agentsDir))
22410
22511
  return;
22411
22512
  for (const retiredAgent of RETIRED_MANAGED_AGENT_FILES) {
22412
- const agentPath = join22(agentsDir, retiredAgent.fileName);
22513
+ const agentPath = join23(agentsDir, retiredAgent.fileName);
22413
22514
  if (!await exists3(agentPath))
22414
22515
  continue;
22415
- const agentStat = await lstat8(agentPath);
22516
+ const agentStat = await lstat9(agentPath);
22416
22517
  if (agentStat.isDirectory() && !agentStat.isSymbolicLink())
22417
22518
  continue;
22418
22519
  const content = await readTextIfExists2(agentPath);
22419
22520
  if (content === null || !hasRequiredMarkers(content, retiredAgent.requiredMarkers))
22420
22521
  continue;
22421
- await rm9(agentPath, { force: true });
22522
+ await rm10(agentPath, { force: true });
22422
22523
  }
22423
22524
  }
22424
22525
  function hasRequiredMarkers(content, markers) {
@@ -22435,7 +22536,7 @@ async function readTextIfExists2(path) {
22435
22536
  }
22436
22537
  async function exists3(path) {
22437
22538
  try {
22438
- await lstat8(path);
22539
+ await lstat9(path);
22439
22540
  return true;
22440
22541
  } catch (error) {
22441
22542
  if (nodeErrorCode2(error) !== "ENOENT")
@@ -22451,15 +22552,15 @@ function nodeErrorCode2(error) {
22451
22552
 
22452
22553
  // packages/omo-codex/src/install/default-agent-role.ts
22453
22554
  import { createHash as createHash3 } from "node:crypto";
22454
- import { lstat as lstat9, readFile as readFile16, rm as rm10 } from "node:fs/promises";
22455
- import { join as join23 } from "node:path";
22555
+ import { lstat as lstat10, readFile as readFile16, rm as rm11 } from "node:fs/promises";
22556
+ import { join as join24 } from "node:path";
22456
22557
  var REGISTRATION = { name: "default", configFile: "./agents/default.toml" };
22457
22558
  async function installDefaultAgentRole(input) {
22458
- const target = join23(input.codexHome, "agents", "default.toml");
22459
- const receipt = join23(input.codexHome, "agents", ".lazycodex-default.sha256");
22460
- const configPath = join23(input.codexHome, "config.toml");
22559
+ const target = join24(input.codexHome, "agents", "default.toml");
22560
+ const receipt = join24(input.codexHome, "agents", ".lazycodex-default.sha256");
22561
+ const configPath = join24(input.codexHome, "config.toml");
22461
22562
  const config = await readIfPresent(configPath);
22462
- const entry = await lstat9(target).catch((error) => {
22563
+ const entry = await lstat10(target).catch((error) => {
22463
22564
  if (error instanceof Error && "code" in error && error.code === "ENOENT")
22464
22565
  return null;
22465
22566
  throw error;
@@ -22480,8 +22581,8 @@ async function installDefaultAgentRole(input) {
22480
22581
  if (next !== config)
22481
22582
  await writeFileAtomic(configPath, next);
22482
22583
  }
22483
- await rm10(target);
22484
- await rm10(receipt);
22584
+ await rm11(target);
22585
+ await rm11(receipt);
22485
22586
  }
22486
22587
  return null;
22487
22588
  }
@@ -22518,7 +22619,7 @@ async function linkCachedPluginAgents(input) {
22518
22619
  await writeManifest(input.pluginRoot, []);
22519
22620
  return [];
22520
22621
  }
22521
- const agentsDir = join24(input.codexHome, "agents");
22622
+ const agentsDir = join25(input.codexHome, "agents");
22522
22623
  await mkdir7(agentsDir, { recursive: true });
22523
22624
  const previousReceipts = await readAgentModelReceipts(input.codexHome);
22524
22625
  const receipts = new Map;
@@ -22526,7 +22627,7 @@ async function linkCachedPluginAgents(input) {
22526
22627
  for (const agentPath of bundledAgents) {
22527
22628
  const agentFileName = basename4(agentPath);
22528
22629
  const agentName = agentNameFromToml2(agentFileName);
22529
- const linkPath = join24(agentsDir, agentFileName);
22630
+ const linkPath = join25(agentsDir, agentFileName);
22530
22631
  receipts.set(agentName, await syncAgentFile({ ...input, agentName, agentPath, linkPath, previousReceipt: previousReceipts.get(agentName) }));
22531
22632
  linked.push({ name: agentFileName, path: linkPath, target: agentPath });
22532
22633
  }
@@ -22566,22 +22667,22 @@ async function syncAgentFile(input) {
22566
22667
  };
22567
22668
  }
22568
22669
  async function discoverBundledAgents(pluginRoot) {
22569
- const componentsRoot = join24(pluginRoot, "components");
22670
+ const componentsRoot = join25(pluginRoot, "components");
22570
22671
  if (!await exists4(componentsRoot))
22571
22672
  return [];
22572
- const componentEntries = await readdir7(componentsRoot, { withFileTypes: true });
22673
+ const componentEntries = await readdir8(componentsRoot, { withFileTypes: true });
22573
22674
  const agents = [];
22574
22675
  for (const entry of componentEntries) {
22575
22676
  if (!entry.isDirectory())
22576
22677
  continue;
22577
- const agentsRoot = join24(componentsRoot, entry.name, "agents");
22678
+ const agentsRoot = join25(componentsRoot, entry.name, "agents");
22578
22679
  if (!await exists4(agentsRoot))
22579
22680
  continue;
22580
- const agentEntries = await readdir7(agentsRoot, { withFileTypes: true });
22681
+ const agentEntries = await readdir8(agentsRoot, { withFileTypes: true });
22581
22682
  for (const file of agentEntries) {
22582
22683
  if (!file.isFile() || !file.name.endsWith(".toml"))
22583
22684
  continue;
22584
- agents.push(join24(agentsRoot, file.name));
22685
+ agents.push(join25(agentsRoot, file.name));
22585
22686
  }
22586
22687
  }
22587
22688
  agents.sort();
@@ -22594,14 +22695,14 @@ async function replaceWithCopy(linkPath, target) {
22594
22695
  async function prepareReplacement(linkPath) {
22595
22696
  if (!await exists4(linkPath))
22596
22697
  return;
22597
- const entryStat = await lstat10(linkPath);
22698
+ const entryStat = await lstat11(linkPath);
22598
22699
  if (entryStat.isDirectory() && !entryStat.isSymbolicLink()) {
22599
22700
  throw new Error(`${linkPath} already exists and is a directory; refusing to replace`);
22600
22701
  }
22601
- await rm11(linkPath, { force: true });
22702
+ await rm12(linkPath, { force: true });
22602
22703
  }
22603
22704
  async function writeManifest(pluginRoot, agentPaths) {
22604
- const manifestPath = join24(pluginRoot, MANIFEST_FILE);
22705
+ const manifestPath = join25(pluginRoot, MANIFEST_FILE);
22605
22706
  const payload = { agents: [...agentPaths].sort() };
22606
22707
  await writeFile9(manifestPath, `${JSON.stringify(payload, null, "\t")}
22607
22708
  `);
@@ -22611,7 +22712,7 @@ function agentNameFromToml2(fileName) {
22611
22712
  }
22612
22713
  async function exists4(path) {
22613
22714
  try {
22614
- await lstat10(path);
22715
+ await lstat11(path);
22615
22716
  return true;
22616
22717
  } catch (error) {
22617
22718
  if (nodeErrorCode3(error) !== "ENOENT")
@@ -22673,10 +22774,10 @@ function agentNameFromToml3(fileName) {
22673
22774
 
22674
22775
  // packages/omo-codex/src/install/codex-marketplace.ts
22675
22776
  import { readFile as readFile18 } from "node:fs/promises";
22676
- import { join as join25 } from "node:path";
22777
+ import { join as join26 } from "node:path";
22677
22778
  var DEFAULT_MARKETPLACE_PATH = "packages/omo-codex/marketplace.json";
22678
22779
  async function readMarketplace(repoRoot, options) {
22679
- const marketplacePath = options?.marketplacePath ?? join25(repoRoot, DEFAULT_MARKETPLACE_PATH);
22780
+ const marketplacePath = options?.marketplacePath ?? join26(repoRoot, DEFAULT_MARKETPLACE_PATH);
22680
22781
  const raw = await readFile18(marketplacePath, "utf8");
22681
22782
  const parsed = JSON.parse(raw);
22682
22783
  if (!isPlainRecord(parsed))
@@ -22695,10 +22796,10 @@ async function readMarketplace(repoRoot, options) {
22695
22796
  function resolvePluginSource(repoRoot, plugin, options) {
22696
22797
  const sourcePath = localSourcePath(options?.pathOverride ?? plugin.source);
22697
22798
  const relativePath = sourcePath.slice(2);
22698
- return join25(repoRoot, ...relativePath.split(/[\\/]/));
22799
+ return join26(repoRoot, ...relativePath.split(/[\\/]/));
22699
22800
  }
22700
22801
  async function readPluginManifest(pluginRoot) {
22701
- const raw = await readFile18(join25(pluginRoot, ".codex-plugin", "plugin.json"), "utf8");
22802
+ const raw = await readFile18(join26(pluginRoot, ".codex-plugin", "plugin.json"), "utf8");
22702
22803
  const parsed = JSON.parse(raw);
22703
22804
  if (!isPlainRecord(parsed))
22704
22805
  throw new Error(`${pluginRoot} plugin.json must be an object`);
@@ -22779,11 +22880,11 @@ function validateLocalSourcePath(path) {
22779
22880
  }
22780
22881
 
22781
22882
  // packages/omo-codex/src/install/lazycodex-version-stamp.ts
22782
- import { readdir as readdir8, readFile as readFile19, writeFile as writeFile10 } from "node:fs/promises";
22783
- import { join as join26 } from "node:path";
22883
+ import { readdir as readdir9, readFile as readFile19, writeFile as writeFile10 } from "node:fs/promises";
22884
+ import { join as join27 } from "node:path";
22784
22885
  async function readDistributionManifest(repoRoot) {
22785
22886
  try {
22786
- const parsed = JSON.parse(await readFile19(join26(repoRoot, "package.json"), "utf8"));
22887
+ const parsed = JSON.parse(await readFile19(join27(repoRoot, "package.json"), "utf8"));
22787
22888
  if (!isPlainRecord(parsed) || typeof parsed.version !== "string" || parsed.version.trim().length === 0)
22788
22889
  return;
22789
22890
  return {
@@ -22807,19 +22908,19 @@ function resolveLazyCodexPluginVersion(input) {
22807
22908
  return input.manifestVersion ?? "local";
22808
22909
  }
22809
22910
  async function stampLazyCodexPluginVersion(input) {
22810
- const manifestPath = join26(input.pluginRoot, ".codex-plugin", "plugin.json");
22911
+ const manifestPath = join27(input.pluginRoot, ".codex-plugin", "plugin.json");
22811
22912
  const hookPaths = await readPluginHookPaths(manifestPath);
22812
22913
  await stampJsonVersion(manifestPath, input.version);
22813
- await stampJsonVersion(join26(input.pluginRoot, "package.json"), input.version);
22914
+ await stampJsonVersion(join27(input.pluginRoot, "package.json"), input.version);
22814
22915
  for (const hookPath of hookPaths) {
22815
- await stampHookStatusMessages(join26(input.pluginRoot, hookPath), input.version);
22916
+ await stampHookStatusMessages(join27(input.pluginRoot, hookPath), input.version);
22816
22917
  }
22817
22918
  await stampComponentVersions(input);
22818
22919
  }
22819
22920
  async function writeLazyCodexInstallSnapshot(input) {
22820
22921
  if (input.distributionManifest === undefined)
22821
22922
  return;
22822
- await writeFile10(join26(input.pluginRoot, "lazycodex-install.json"), `${JSON.stringify({
22923
+ await writeFile10(join27(input.pluginRoot, "lazycodex-install.json"), `${JSON.stringify({
22823
22924
  packageName: input.distributionManifest.name,
22824
22925
  version: input.distributionManifest.version
22825
22926
  }, null, "\t")}
@@ -22876,16 +22977,16 @@ async function stampHookStatusMessages(path, version) {
22876
22977
  async function stampComponentVersions(input) {
22877
22978
  let entries;
22878
22979
  try {
22879
- entries = await readdir8(join26(input.pluginRoot, "components"));
22980
+ entries = await readdir9(join27(input.pluginRoot, "components"));
22880
22981
  } catch (error) {
22881
22982
  if (error instanceof Error)
22882
22983
  return;
22883
22984
  throw error;
22884
22985
  }
22885
22986
  for (const entry of entries) {
22886
- const componentRoot = join26(input.pluginRoot, "components", entry);
22887
- await stampJsonVersion(join26(componentRoot, "package.json"), input.version);
22888
- await stampHookStatusMessages(join26(componentRoot, "hooks", "hooks.json"), input.version);
22987
+ const componentRoot = join27(input.pluginRoot, "components", entry);
22988
+ await stampJsonVersion(join27(componentRoot, "package.json"), input.version);
22989
+ await stampHookStatusMessages(join27(componentRoot, "hooks", "hooks.json"), input.version);
22889
22990
  }
22890
22991
  }
22891
22992
  function stampHookGroups(hooks, version) {
@@ -22914,8 +23015,8 @@ function normalizeHookStatusVersion(version) {
22914
23015
  }
22915
23016
 
22916
23017
  // packages/omo-codex/src/install/codex-project-local-cleanup.ts
22917
- import { copyFile as copyFile2, lstat as lstat11, readFile as readFile20, writeFile as writeFile11 } from "node:fs/promises";
22918
- import { dirname as dirname9, join as join27, resolve as resolve8 } from "node:path";
23018
+ import { copyFile as copyFile2, lstat as lstat12, readFile as readFile20, writeFile as writeFile11 } from "node:fs/promises";
23019
+ import { dirname as dirname9, join as join28, resolve as resolve8 } from "node:path";
22919
23020
  var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
22920
23021
  var PROJECT_LOCAL_ARTIFACT_PATHS = [
22921
23022
  ".codex/hooks.json",
@@ -23018,17 +23119,17 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
23018
23119
  if (startDirectoryStat !== null && !startDirectoryStat.isDirectory()) {
23019
23120
  throw new ProjectLocalCleanupStartDirectoryError(startDirectory);
23020
23121
  }
23021
- const codexHomeConfigPath = codexHome === undefined ? null : join27(resolve8(codexHome), "config.toml");
23122
+ const codexHomeConfigPath = codexHome === undefined ? null : join28(resolve8(codexHome), "config.toml");
23022
23123
  let current = resolve8(startDirectory);
23023
23124
  const configPathsFromCwd = [];
23024
23125
  while (true) {
23025
- const configPath = join27(current, ".codex", "config.toml");
23126
+ const configPath = join28(current, ".codex", "config.toml");
23026
23127
  if (await isRegularProjectLocalConfig(current, configPath)) {
23027
23128
  if (codexHomeConfigPath === null || resolve8(configPath) !== codexHomeConfigPath) {
23028
23129
  configPathsFromCwd.push(configPath);
23029
23130
  }
23030
23131
  }
23031
- if (await exists5(join27(current, ".git"))) {
23132
+ if (await exists5(join28(current, ".git"))) {
23032
23133
  return configPathsFromCwd.length === 0 ? null : {
23033
23134
  projectRoot: current,
23034
23135
  configPaths: [...configPathsFromCwd].reverse(),
@@ -23048,7 +23149,7 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
23048
23149
  }
23049
23150
  }
23050
23151
  async function isRegularProjectLocalConfig(directory, configPath) {
23051
- const codexDirStat = await maybeLstat(join27(directory, ".codex"));
23152
+ const codexDirStat = await maybeLstat(join28(directory, ".codex"));
23052
23153
  if (codexDirStat === null || !codexDirStat.isDirectory() || codexDirStat.isSymbolicLink())
23053
23154
  return false;
23054
23155
  const configStat = await maybeLstat(configPath);
@@ -23068,7 +23169,7 @@ async function collectProjectLocalArtifacts(projectRoots) {
23068
23169
  const seenPaths = new Set;
23069
23170
  for (const projectRoot of projectRoots) {
23070
23171
  for (const relativePath of PROJECT_LOCAL_ARTIFACT_PATHS) {
23071
- const artifactPath = join27(projectRoot, relativePath);
23172
+ const artifactPath = join28(projectRoot, relativePath);
23072
23173
  if (seenPaths.has(artifactPath))
23073
23174
  continue;
23074
23175
  const entryStat = await maybeLstat(artifactPath);
@@ -23102,7 +23203,7 @@ function formatBackupTimestamp(date) {
23102
23203
  }
23103
23204
  async function maybeLstat(path) {
23104
23205
  try {
23105
- return await lstat11(path);
23206
+ return await lstat12(path);
23106
23207
  } catch (error) {
23107
23208
  if (nodeErrorCode4(error) === "ENOENT")
23108
23209
  return null;
@@ -23144,13 +23245,13 @@ function formatUnknownError(error) {
23144
23245
 
23145
23246
  // packages/omo-codex/src/install/lsp-daemon-reaper.ts
23146
23247
  import { createHash as createHash4 } from "node:crypto";
23147
- import { lstat as lstat12, readFile as readFile22, readdir as readdir10, rm as rm12 } from "node:fs/promises";
23248
+ import { lstat as lstat13, readFile as readFile22, readdir as readdir11, rm as rm13 } from "node:fs/promises";
23148
23249
  import { tmpdir } from "node:os";
23149
- import { join as join28, posix as posix2 } from "node:path";
23250
+ import { join as join29, posix as posix2 } from "node:path";
23150
23251
 
23151
23252
  // packages/omo-codex/src/install/lsp-daemon-reaper-attestation.ts
23152
23253
  import { execFile } from "node:child_process";
23153
- import { readFile as readFile21, readdir as readdir9, readlink as readlink5 } from "node:fs/promises";
23254
+ import { readFile as readFile21, readdir as readdir10, readlink as readlink5 } from "node:fs/promises";
23154
23255
  import { connect } from "node:net";
23155
23256
  import { basename as basename5 } from "node:path";
23156
23257
  var PROBE_TIMEOUT_MS = 500;
@@ -23193,7 +23294,7 @@ async function attestLegacyDaemonOwnership(input, deps = {}) {
23193
23294
  }
23194
23295
  async function attestLinuxOwnership(input, deps) {
23195
23296
  const readFileImpl = deps.readFile ?? readFile21;
23196
- const readDirImpl = deps.readDir ?? readdir9;
23297
+ const readDirImpl = deps.readDir ?? readdir10;
23197
23298
  const readLinkImpl = deps.readLink ?? readlink5;
23198
23299
  const procNetUnix = await readText(readFileImpl, "/proc/net/unix");
23199
23300
  if (procNetUnix === null)
@@ -23319,17 +23420,17 @@ async function readBinary(readFileImpl, path) {
23319
23420
  var LEGACY_EXIT_WAIT_TIMEOUT_MS = 5000;
23320
23421
  var LEGACY_VERSION_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._+-]{0,127}$/;
23321
23422
  async function reapLspDaemons(codexHome, deps = {}) {
23322
- const daemonRoot = join28(codexHome, "codex-lsp", "daemon");
23423
+ const daemonRoot = join29(codexHome, "codex-lsp", "daemon");
23323
23424
  const platform = deps.platform ?? process.platform;
23324
23425
  const tmpDir = deps.tmpDir ?? tmpdir();
23325
23426
  const probe = deps.probeLegacyJsonRpc ?? probeLegacyJsonRpcEndpoint;
23326
23427
  const attest = deps.attestLegacyDaemonOwnership ?? ((input) => attestLegacyDaemonOwnership(input));
23327
23428
  const killProcess = deps.killProcess ?? sendSigterm;
23328
23429
  const waitForProcessExit = deps.waitForProcessExit ?? defaultWaitForProcessExit;
23329
- const entries = await readdir10(daemonRoot, { withFileTypes: true }).catch(() => []);
23430
+ const entries = await readdir11(daemonRoot, { withFileTypes: true }).catch(() => []);
23330
23431
  const results = [];
23331
23432
  for (const entry of [...entries].sort((left, right) => left.name.localeCompare(right.name))) {
23332
- const versionPath = join28(daemonRoot, entry.name);
23433
+ const versionPath = join29(daemonRoot, entry.name);
23333
23434
  const parsedVersion = parseVersionEntry(entry.name);
23334
23435
  if (parsedVersion === null || !entry.isDirectory()) {
23335
23436
  await removeVersionDir(versionPath);
@@ -23377,7 +23478,7 @@ function parseVersionEntry(entryName) {
23377
23478
  return LEGACY_VERSION_PATTERN.test(version) ? version : null;
23378
23479
  }
23379
23480
  async function readLegacyMetadata(input) {
23380
- const pidText = await readRegularTrimmedFile(join28(input.versionPath, "daemon.pid"));
23481
+ const pidText = await readRegularTrimmedFile(join29(input.versionPath, "daemon.pid"));
23381
23482
  if (pidText === "non_regular")
23382
23483
  return { kind: "remove", reason: "removed non-regular legacy daemon metadata" };
23383
23484
  if (pidText === null)
@@ -23385,7 +23486,7 @@ async function readLegacyMetadata(input) {
23385
23486
  const pid = Number.parseInt(pidText, 10);
23386
23487
  if (!Number.isInteger(pid) || pid <= 0)
23387
23488
  return { kind: "remove", reason: "removed malformed legacy daemon metadata" };
23388
- const endpointText = await readRegularTrimmedFile(join28(input.versionPath, "daemon.endpoint"));
23489
+ const endpointText = await readRegularTrimmedFile(join29(input.versionPath, "daemon.endpoint"));
23389
23490
  if (endpointText === "non_regular")
23390
23491
  return { kind: "remove", reason: "removed non-regular legacy daemon metadata" };
23391
23492
  if (endpointText === null)
@@ -23412,7 +23513,7 @@ function legacyEndpointCandidates(input) {
23412
23513
  return [natural, hashed];
23413
23514
  }
23414
23515
  async function readRegularTrimmedFile(path) {
23415
- const stats = await lstat12(path).catch(() => null);
23516
+ const stats = await lstat13(path).catch(() => null);
23416
23517
  if (stats === null)
23417
23518
  return null;
23418
23519
  if (!stats.isFile())
@@ -23424,7 +23525,7 @@ function shortDigest(value) {
23424
23525
  return createHash4("sha256").update(value).digest("hex").slice(0, 16);
23425
23526
  }
23426
23527
  async function removeVersionDir(path) {
23427
- await rm12(path, { recursive: true, force: true });
23528
+ await rm13(path, { recursive: true, force: true });
23428
23529
  }
23429
23530
  function removed(version, reason) {
23430
23531
  return { version, status: "removed", reason };
@@ -23464,7 +23565,7 @@ function processIsRunning(pid) {
23464
23565
 
23465
23566
  // packages/omo-codex/src/install/codex-installer-bin-dir.ts
23466
23567
  import { homedir } from "node:os";
23467
- import { join as join29, resolve as resolve9 } from "node:path";
23568
+ import { join as join30, resolve as resolve9 } from "node:path";
23468
23569
  function resolveCodexInstallerBinDir(input) {
23469
23570
  const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
23470
23571
  if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
@@ -23473,22 +23574,22 @@ function resolveCodexInstallerBinDir(input) {
23473
23574
  const defaultCodexHome = resolve9(homeDir, ".codex");
23474
23575
  const resolvedCodexHome = resolve9(input.codexHome);
23475
23576
  if (resolvedCodexHome !== defaultCodexHome)
23476
- return join29(resolvedCodexHome, "bin");
23577
+ return join30(resolvedCodexHome, "bin");
23477
23578
  return resolve9(homeDir, ".local", "bin");
23478
23579
  }
23479
23580
 
23480
23581
  // packages/omo-codex/src/install/codex-installed-bin-dir.ts
23481
- import { readFile as readFile23, readdir as readdir11, writeFile as writeFile12 } from "node:fs/promises";
23482
- import { join as join30 } from "node:path";
23582
+ import { readFile as readFile23, readdir as readdir12, writeFile as writeFile12 } from "node:fs/promises";
23583
+ import { join as join31 } from "node:path";
23483
23584
  var INSTALLED_BIN_DIR_MANIFEST = ".installed-bin-dir.json";
23484
23585
  async function writeInstalledCodexBinDir(input) {
23485
- await writeFile12(join30(input.pluginRoot, INSTALLED_BIN_DIR_MANIFEST), `${JSON.stringify({ binDir: input.binDir }, null, 2)}
23586
+ await writeFile12(join31(input.pluginRoot, INSTALLED_BIN_DIR_MANIFEST), `${JSON.stringify({ binDir: input.binDir }, null, 2)}
23486
23587
  `);
23487
23588
  }
23488
23589
 
23489
23590
  // packages/omo-codex/src/install/codex-git-bash-hooks.ts
23490
23591
  import { readFile as readFile24, writeFile as writeFile13 } from "node:fs/promises";
23491
- import { join as join31 } from "node:path";
23592
+ import { join as join32 } from "node:path";
23492
23593
  var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([
23493
23594
  "./hooks/pre-tool-use-recommending-git-bash-mcp.json",
23494
23595
  "./hooks/post-compact-resetting-git-bash-mcp-reminder.json"
@@ -23496,7 +23597,7 @@ var WINDOWS_ONLY_GIT_BASH_HOOKS = new Set([
23496
23597
  async function removeGitBashHooksOffWindows(input) {
23497
23598
  if (input.platform === "win32")
23498
23599
  return;
23499
- const manifestPath = join31(input.pluginRoot, ".codex-plugin", "plugin.json");
23600
+ const manifestPath = join32(input.pluginRoot, ".codex-plugin", "plugin.json");
23500
23601
  const parsed = JSON.parse(await readFile24(manifestPath, "utf8"));
23501
23602
  if (!isPlainRecord(parsed) || !Array.isArray(parsed.hooks))
23502
23603
  return;
@@ -23508,12 +23609,12 @@ async function removeGitBashHooksOffWindows(input) {
23508
23609
  }
23509
23610
 
23510
23611
  // packages/omo-codex/src/install/install-ast-grep-sg.ts
23511
- import { join as join33 } from "node:path";
23612
+ import { join as join34 } from "node:path";
23512
23613
 
23513
23614
  // packages/utils/src/ast-grep/install-script.ts
23514
23615
  import { spawn as spawn2 } from "node:child_process";
23515
23616
  import { existsSync as existsSync4 } from "node:fs";
23516
- import { join as join32 } from "node:path";
23617
+ import { join as join33 } from "node:path";
23517
23618
 
23518
23619
  // packages/utils/src/ast-grep/sg-manifest.ts
23519
23620
  function normalizeRuntimePlatform(platform = process.platform) {
@@ -23535,7 +23636,7 @@ var AST_GREP_BIN_DIR_ENV_KEY = "OMO_AST_GREP_BIN_DIR";
23535
23636
  var KILL_GRACE_MS = 1000;
23536
23637
  var AST_GREP_INSTALL_TIMEOUT_MS = 30000;
23537
23638
  function astGrepRuntimeDir(baseDir, platform = process.platform, arch = process.arch) {
23538
- return join32(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
23639
+ return join33(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
23539
23640
  }
23540
23641
  function isMissingExecutable(error) {
23541
23642
  if (!("code" in error))
@@ -23573,7 +23674,7 @@ function defaultSpawnProcess(command, args, options) {
23573
23674
  };
23574
23675
  }
23575
23676
  function scriptPathForPlatform(skillDir, platform) {
23576
- return join32(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
23677
+ return join33(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
23577
23678
  }
23578
23679
  function invocationsForPlatform(scriptPath, platform) {
23579
23680
  if (platform !== "win32")
@@ -23659,7 +23760,7 @@ async function installAstGrepForCodex(options) {
23659
23760
  return;
23660
23761
  const platform = options.platform ?? process.platform;
23661
23762
  const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
23662
- const skillDir = join33(plugin.path, "skills", "ast-grep");
23763
+ const skillDir = join34(plugin.path, "skills", "ast-grep");
23663
23764
  const installer = options.installer ?? runAstGrepSkillInstall;
23664
23765
  try {
23665
23766
  const result = await installer({ platform, skillDir, targetDir });
@@ -23677,7 +23778,7 @@ async function trackCodexInstallTelemetry() {
23677
23778
  try {
23678
23779
  await Promise.resolve().then(() => init_telemetry());
23679
23780
  const posthog = createInstallPostHog();
23680
- posthog.trackActive(getPostHogDistinctId(), "install_completed");
23781
+ posthog.trackActive("install_completed");
23681
23782
  await posthog.shutdown();
23682
23783
  } catch (error) {
23683
23784
  if (error instanceof Error)
@@ -23692,7 +23793,7 @@ async function runCodexInstaller(options = {}) {
23692
23793
  const env = options.env ?? process.env;
23693
23794
  const platform = options.platform ?? process.platform;
23694
23795
  const repoRoot = resolve10(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env }));
23695
- const codexHome = resolve10(options.codexHome ?? env.CODEX_HOME ?? join37(homedir2(), ".codex"));
23796
+ const codexHome = resolve10(options.codexHome ?? env.CODEX_HOME ?? join39(homedir2(), ".codex"));
23696
23797
  const projectDirectory = resolve10(options.projectDirectory ?? env.OMO_CODEX_PROJECT ?? process.cwd());
23697
23798
  const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env });
23698
23799
  const runCommand = options.runCommand ?? defaultRunCommand;
@@ -23709,9 +23810,9 @@ async function runCodexInstaller(options = {}) {
23709
23810
  if (!gitBashResolution.found) {
23710
23811
  throw new Error(gitBashResolution.installHint);
23711
23812
  }
23712
- const codexPackageRoot = join37(repoRoot, "packages", "omo-codex");
23813
+ const codexPackageRoot = join39(repoRoot, "packages", "omo-codex");
23713
23814
  const marketplace = await readMarketplace(repoRoot, {
23714
- marketplacePath: join37(codexPackageRoot, "marketplace.json")
23815
+ marketplacePath: join39(codexPackageRoot, "marketplace.json")
23715
23816
  });
23716
23817
  const distributionManifest = await readDistributionManifest(repoRoot);
23717
23818
  const installed = [];
@@ -23756,7 +23857,7 @@ async function runCodexInstaller(options = {}) {
23756
23857
  if (runtimeLink !== null)
23757
23858
  log(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
23758
23859
  else
23759
- log(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${join37(repoRoot, "dist", "cli", "index.js")} is missing; omo-agent-toolkit ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
23860
+ log(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${join39(repoRoot, "dist", "cli", "index.js")} is missing; omo-agent-toolkit ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
23760
23861
  }
23761
23862
  pluginSources.push({ name: entry.name, sourcePath });
23762
23863
  installed.push(plugin);
@@ -23806,13 +23907,13 @@ async function runCodexInstaller(options = {}) {
23806
23907
  continue;
23807
23908
  log(`Warning: deferred legacy Codex LSP daemon cleanup for v${cleanup.version}: ${cleanup.reason}`);
23808
23909
  }
23809
- const marketplaceRoot = join37(codexHome, "plugins", "cache", marketplace.name);
23910
+ const marketplaceRoot = join39(codexHome, "plugins", "cache", marketplace.name);
23810
23911
  await writeCachedMarketplaceManifest({
23811
23912
  marketplaceName: marketplace.name,
23812
23913
  marketplaceRoot,
23813
23914
  plugins: installed
23814
23915
  });
23815
- const configPath = join37(codexHome, "config.toml");
23916
+ const configPath = join39(codexHome, "config.toml");
23816
23917
  await updateCodexConfig({
23817
23918
  configPath,
23818
23919
  repoRoot: codexPackageRoot,
@@ -23857,7 +23958,7 @@ function findRepoRootFromImporter(importerDir) {
23857
23958
  for (let depth = 0;depth <= 7; depth += 1) {
23858
23959
  if (isRepoRootWithCodexPlugin(current))
23859
23960
  return current;
23860
- for (const wrapperPackageRoot of [join37(current, "node_modules", "oh-my-openagent"), join37(current, "oh-my-openagent")]) {
23961
+ for (const wrapperPackageRoot of [join39(current, "node_modules", "oh-my-openagent"), join39(current, "oh-my-openagent")]) {
23861
23962
  if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
23862
23963
  return wrapperPackageRoot;
23863
23964
  }
@@ -23875,7 +23976,7 @@ function findRepoRoot(input) {
23875
23976
  return findRepoRootFromImporter(input.importerDir);
23876
23977
  }
23877
23978
  function isRepoRootWithCodexPlugin(repoRoot) {
23878
- return existsSync7(join37(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
23979
+ return existsSync7(join39(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
23879
23980
  }
23880
23981
  function codexMarketplaceSource(marketplaceRoot) {
23881
23982
  return { sourceType: "local", source: marketplaceRoot };
@@ -24187,13 +24288,13 @@ function shellQuote(value) {
24187
24288
 
24188
24289
  // packages/omo-codex/src/install/lazycodex-manual-update.ts
24189
24290
  import { spawn as spawn3, spawnSync as spawnSync2 } from "node:child_process";
24190
- import { readFileSync as readFileSync5 } from "node:fs";
24191
- import { dirname as dirname12, join as join39 } from "node:path";
24291
+ import { readFileSync as readFileSync6 } from "node:fs";
24292
+ import { dirname as dirname13, join as join41 } from "node:path";
24192
24293
  import { createInterface as createInterface2 } from "node:readline/promises";
24193
24294
  import { fileURLToPath } from "node:url";
24194
24295
 
24195
24296
  // packages/omo-codex/src/install/lazycodex-bun-global-paths.ts
24196
- import { join as join38 } from "node:path";
24297
+ import { join as join40 } from "node:path";
24197
24298
  function isBunGlobalEntrypointPath(invokedPath, env) {
24198
24299
  if (typeof invokedPath !== "string" || invokedPath.trim().length === 0)
24199
24300
  return false;
@@ -24204,8 +24305,8 @@ function resolveBunGlobalRoots(env) {
24204
24305
  const bunInstallRoot = env.BUN_INSTALL?.trim();
24205
24306
  const homeRoot = env.HOME?.trim();
24206
24307
  return [
24207
- ...bunInstallRoot ? [join38(bunInstallRoot, "bin"), join38(bunInstallRoot, "install", "global", "node_modules")] : [],
24208
- ...homeRoot ? [join38(homeRoot, ".bun", "bin"), join38(homeRoot, ".bun", "install", "global", "node_modules")] : []
24308
+ ...bunInstallRoot ? [join40(bunInstallRoot, "bin"), join40(bunInstallRoot, "install", "global", "node_modules")] : [],
24309
+ ...homeRoot ? [join40(homeRoot, ".bun", "bin"), join40(homeRoot, ".bun", "install", "global", "node_modules")] : []
24209
24310
  ].map(normalizePathForPrefix);
24210
24311
  }
24211
24312
  function normalizePathForPrefix(path) {
@@ -24297,8 +24398,8 @@ function resolveArgs(env) {
24297
24398
  function resolveCurrentVersion(env) {
24298
24399
  if (env.LAZYCODEX_CURRENT_VERSION?.trim())
24299
24400
  return env.LAZYCODEX_CURRENT_VERSION.trim();
24300
- const pluginRoot = dirname12(dirname12(fileURLToPath(import.meta.url)));
24301
- return readVersionManifest(resolveInstalledVersionPath(env, pluginRoot)) ?? readVersionManifest(join39(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join39(pluginRoot, ".codex-plugin", "plugin.json"));
24401
+ const pluginRoot = dirname13(dirname13(fileURLToPath(import.meta.url)));
24402
+ return readVersionManifest(resolveInstalledVersionPath(env, pluginRoot)) ?? readVersionManifest(join41(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join41(pluginRoot, ".codex-plugin", "plugin.json"));
24302
24403
  }
24303
24404
  function resolveLatestVersion(env) {
24304
24405
  if (env.LAZYCODEX_LATEST_VERSION?.trim())
@@ -24414,11 +24515,11 @@ function compareVersions(left, right) {
24414
24515
  function resolveInstalledVersionPath(env, pluginRoot) {
24415
24516
  if (env.LAZYCODEX_INSTALLED_VERSION_FILE?.trim())
24416
24517
  return env.LAZYCODEX_INSTALLED_VERSION_FILE.trim();
24417
- return join39(pluginRoot, INSTALLED_VERSION_FILE);
24518
+ return join41(pluginRoot, INSTALLED_VERSION_FILE);
24418
24519
  }
24419
24520
  function readVersionManifest(path) {
24420
24521
  try {
24421
- const parsed = JSON.parse(readFileSync5(path, "utf8"));
24522
+ const parsed = JSON.parse(readFileSync6(path, "utf8"));
24422
24523
  if (typeof parsed === "object" && parsed !== null && "version" in parsed && typeof parsed.version === "string") {
24423
24524
  return parsed.version;
24424
24525
  }
@@ -24431,10 +24532,10 @@ function readVersionManifest(path) {
24431
24532
  }
24432
24533
  // packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
24433
24534
  import { readFile as readFile25, writeFile as writeFile14 } from "node:fs/promises";
24434
- import { join as join40 } from "node:path";
24535
+ import { join as join42 } from "node:path";
24435
24536
  var GIT_BASH_ENV_KEY2 = "OMO_CODEX_GIT_BASH_PATH";
24436
24537
  async function stampGitBashMcpEnv(input) {
24437
- const manifestPath = join40(input.pluginRoot, ".mcp.json");
24538
+ const manifestPath = join42(input.pluginRoot, ".mcp.json");
24438
24539
  if (!await fileExistsStrict(manifestPath))
24439
24540
  return false;
24440
24541
  const parsed = JSON.parse(await readFile25(manifestPath, "utf8"));
@@ -24465,7 +24566,7 @@ async function installMarketplaceLocally(options = {}) {
24465
24566
  return runCodexInstaller(options);
24466
24567
  }
24467
24568
  function resolveDefaultRepoRootForEntrypoint(entrypointPath) {
24468
- return resolve11(dirname13(entrypointPath), "..", "..", "..");
24569
+ return resolve11(dirname14(entrypointPath), "..", "..", "..");
24469
24570
  }
24470
24571
  function resolveDefaultRepoRoot() {
24471
24572
  return resolveDefaultRepoRootForEntrypoint(fileURLToPath2(import.meta.url));
@@ -24481,7 +24582,7 @@ async function runLazyCodexInstallLocalCli(input) {
24481
24582
  return 0;
24482
24583
  }
24483
24584
  if (parsed.kind === "version") {
24484
- const packageJson = JSON.parse(await readFile26(join41(input.defaultRepoRoot, "package.json"), "utf8"));
24585
+ const packageJson = JSON.parse(await readFile26(join43(input.defaultRepoRoot, "package.json"), "utf8"));
24485
24586
  const version = typeof packageJson.version === "string" ? packageJson.version : "unknown";
24486
24587
  input.log(`lazycodex-ai ${version}`);
24487
24588
  return 0;