oh-my-opencode 4.12.1 → 4.14.0

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 (911) hide show
  1. package/.agents/skills/codex-qa/SKILL.md +15 -0
  2. package/.agents/skills/codex-qa/references/logging-debug.md +12 -0
  3. package/.agents/skills/opencode-qa/SKILL.md +17 -0
  4. package/.agents/skills/opencode-qa/references/tui-tmux.md +17 -0
  5. package/.agents/skills/work-with-pr/SKILL.md +18 -10
  6. package/.opencode/skills/work-with-pr/SKILL.md +18 -10
  7. package/README.md +3 -3
  8. package/THIRD-PARTY-NOTICES.md +1 -1
  9. package/dist/agents/sisyphus-agent-factory.d.ts +9 -0
  10. package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +31 -0
  11. package/dist/cli/doctor/checks/telemetry.d.ts +2 -0
  12. package/dist/cli/doctor/framework/constants.d.ts +1 -0
  13. package/dist/cli/doctor/framework/doctor-target.d.ts +1 -1
  14. package/dist/cli/index.js +25417 -16991
  15. package/dist/cli-node/index.js +25598 -17172
  16. package/dist/config/schema/codegraph.d.ts +1 -0
  17. package/dist/config/schema/oh-my-opencode-config.d.ts +3 -0
  18. package/dist/config/schema/runtime-fallback.d.ts +1 -0
  19. package/dist/features/background-agent/background-task-marker.d.ts +8 -0
  20. package/dist/features/background-agent/fallback-retry-handler.d.ts +1 -0
  21. package/dist/features/background-agent/manager.d.ts +1 -0
  22. package/dist/features/background-agent/parent-wake-dedupe.d.ts +1 -0
  23. package/dist/features/background-agent/parent-wake-notifier-types.d.ts +2 -0
  24. package/dist/features/background-agent/parent-wake-notifier.d.ts +1 -0
  25. package/dist/features/background-agent/parent-wake-window-recovery.d.ts +2 -0
  26. package/dist/features/team-mode/test-support/async-test-helpers.d.ts +19 -0
  27. package/dist/hooks/atlas/final-wave-approval-gate.d.ts +1 -0
  28. package/dist/hooks/atlas/subagent-completion-reminder.d.ts +30 -0
  29. package/dist/hooks/atlas/types.d.ts +2 -0
  30. package/dist/hooks/atlas/verification-reminders.d.ts +3 -0
  31. package/dist/hooks/runtime-fallback/auto-retry-dispatch.d.ts +2 -2
  32. package/dist/hooks/runtime-fallback/auto-retry-timeout.d.ts +2 -2
  33. package/dist/hooks/runtime-fallback/auto-retry.d.ts +1 -1
  34. package/dist/hooks/runtime-fallback/fallback-state-snapshot.d.ts +13 -0
  35. package/dist/hooks/runtime-fallback/types.d.ts +8 -0
  36. package/dist/hooks/team-session-events/team-idle-wake-hint.d.ts +1 -0
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +33620 -19652
  39. package/dist/mcp/context7.d.ts +9 -8
  40. package/dist/oh-my-opencode.schema.json +12 -0
  41. package/dist/plugin/runtime-skill-resolver.d.ts +35 -0
  42. package/dist/plugin/skill-context.d.ts +9 -0
  43. package/dist/shared/posthog.d.ts +17 -10
  44. package/dist/shared/telemetry-product-identity.d.ts +2 -0
  45. package/dist/skills/coding-agent-sessions/SKILL.md +128 -0
  46. package/dist/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  47. package/dist/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  48. package/dist/skills/coding-agent-sessions/references/claude.md +32 -0
  49. package/dist/skills/coding-agent-sessions/references/codex.md +30 -0
  50. package/dist/skills/coding-agent-sessions/references/opencode.md +43 -0
  51. package/dist/skills/coding-agent-sessions/references/senpi.md +17 -0
  52. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  53. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  54. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  55. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  56. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  57. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  58. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  59. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  60. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  61. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  62. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  63. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  64. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  65. package/dist/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  66. package/dist/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  67. package/dist/skills/frontend/ATTRIBUTION.md +77 -9
  68. package/dist/skills/frontend/SKILL.md +29 -8
  69. package/dist/skills/frontend/references/design/README.md +29 -12
  70. package/dist/skills/frontend/references/design/_INDEX.md +3 -3
  71. package/dist/skills/frontend/references/design/airbnb.md +3 -0
  72. package/dist/skills/frontend/references/design/airtable.md +3 -0
  73. package/dist/skills/frontend/references/design/apple.md +3 -0
  74. package/dist/skills/frontend/references/design/binance.md +3 -0
  75. package/dist/skills/frontend/references/design/bmw.md +3 -0
  76. package/dist/skills/frontend/references/design/bugatti.md +3 -0
  77. package/dist/skills/frontend/references/design/cal.md +3 -0
  78. package/dist/skills/frontend/references/design/claude.md +3 -0
  79. package/dist/skills/frontend/references/design/clay.md +3 -0
  80. package/dist/skills/frontend/references/design/clickhouse.md +3 -0
  81. package/dist/skills/frontend/references/design/cohere.md +3 -0
  82. package/dist/skills/frontend/references/design/coinbase.md +3 -0
  83. package/dist/skills/frontend/references/design/composio.md +3 -0
  84. package/dist/skills/frontend/references/design/cursor.md +3 -0
  85. package/dist/skills/frontend/references/design/design-system-architecture.md +22 -19
  86. package/dist/skills/frontend/references/design/elevenlabs.md +3 -0
  87. package/dist/skills/frontend/references/design/expo.md +3 -0
  88. package/dist/skills/frontend/references/design/ferrari.md +3 -0
  89. package/dist/skills/frontend/references/design/figma.md +3 -0
  90. package/dist/skills/frontend/references/design/framer.md +3 -0
  91. package/dist/skills/frontend/references/design/hashicorp.md +3 -0
  92. package/dist/skills/frontend/references/design/ibm.md +3 -0
  93. package/dist/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
  94. package/dist/skills/frontend/references/design/intercom.md +3 -0
  95. package/dist/skills/frontend/references/design/kraken.md +3 -0
  96. package/dist/skills/frontend/references/design/lamborghini.md +3 -0
  97. package/dist/skills/frontend/references/design/linear.app.md +3 -0
  98. package/dist/skills/frontend/references/design/lovable.md +3 -0
  99. package/dist/skills/frontend/references/design/mastercard.md +3 -0
  100. package/dist/skills/frontend/references/design/meta.md +3 -0
  101. package/dist/skills/frontend/references/design/minimax.md +3 -0
  102. package/dist/skills/frontend/references/design/mintlify.md +3 -0
  103. package/dist/skills/frontend/references/design/miro.md +3 -0
  104. package/dist/skills/frontend/references/design/mistral.ai.md +3 -0
  105. package/dist/skills/frontend/references/design/mongodb.md +3 -0
  106. package/dist/skills/frontend/references/design/nike.md +3 -0
  107. package/dist/skills/frontend/references/design/notion.md +3 -0
  108. package/dist/skills/frontend/references/design/nvidia.md +3 -0
  109. package/dist/skills/frontend/references/design/ollama.md +3 -0
  110. package/dist/skills/frontend/references/design/opencode.ai.md +3 -0
  111. package/dist/skills/frontend/references/design/pinterest.md +3 -0
  112. package/dist/skills/frontend/references/design/playstation.md +3 -0
  113. package/dist/skills/frontend/references/design/posthog.md +3 -0
  114. package/dist/skills/frontend/references/design/raycast.md +3 -0
  115. package/dist/skills/frontend/references/design/renault.md +3 -0
  116. package/dist/skills/frontend/references/design/replicate.md +3 -0
  117. package/dist/skills/frontend/references/design/resend.md +3 -0
  118. package/dist/skills/frontend/references/design/revolut.md +3 -0
  119. package/dist/skills/frontend/references/design/runwayml.md +3 -0
  120. package/dist/skills/frontend/references/design/sanity.md +3 -0
  121. package/dist/skills/frontend/references/design/sentry.md +3 -0
  122. package/dist/skills/frontend/references/design/shopify.md +3 -0
  123. package/dist/skills/frontend/references/design/spacex.md +3 -0
  124. package/dist/skills/frontend/references/design/spotify.md +3 -0
  125. package/dist/skills/frontend/references/design/starbucks.md +3 -0
  126. package/dist/skills/frontend/references/design/stitch-skill.md +1 -1
  127. package/dist/skills/frontend/references/design/stripe.md +3 -0
  128. package/dist/skills/frontend/references/design/supabase.md +3 -0
  129. package/dist/skills/frontend/references/design/superhuman.md +3 -0
  130. package/dist/skills/frontend/references/design/taste-skill.md +1188 -208
  131. package/dist/skills/frontend/references/design/tesla.md +3 -0
  132. package/dist/skills/frontend/references/design/theverge.md +3 -0
  133. package/dist/skills/frontend/references/design/together.ai.md +3 -0
  134. package/dist/skills/frontend/references/design/uber.md +3 -0
  135. package/dist/skills/frontend/references/design/vercel.md +3 -0
  136. package/dist/skills/frontend/references/design/vodafone.md +3 -0
  137. package/dist/skills/frontend/references/design/voltagent.md +3 -0
  138. package/dist/skills/frontend/references/design/warp.md +3 -0
  139. package/dist/skills/frontend/references/design/webflow.md +3 -0
  140. package/dist/skills/frontend/references/design/wired.md +3 -0
  141. package/dist/skills/frontend/references/design/wise.md +3 -0
  142. package/dist/skills/frontend/references/design/x.ai.md +3 -0
  143. package/dist/skills/frontend/references/design/zapier.md +3 -0
  144. package/dist/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  145. package/dist/skills/frontend/references/designpowers/README.md +48 -0
  146. package/dist/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  147. package/dist/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  148. package/dist/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  149. package/dist/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  150. package/dist/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  151. package/dist/skills/frontend/references/designpowers/orchestration.md +80 -0
  152. package/dist/skills/frontend/references/designpowers/routing.md +79 -0
  153. package/dist/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  154. package/dist/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  155. package/dist/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  156. package/dist/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  157. package/dist/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  158. package/dist/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  159. package/dist/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  160. package/dist/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  161. package/dist/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  162. package/dist/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  163. package/dist/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  164. package/dist/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  165. package/dist/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  166. package/dist/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  167. package/dist/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  168. package/dist/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  169. package/dist/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  170. package/dist/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  171. package/dist/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  172. package/dist/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  173. package/dist/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  174. package/dist/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  175. package/dist/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  176. package/dist/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  177. package/dist/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  178. package/dist/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  179. package/dist/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  180. package/dist/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  181. package/dist/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  182. package/dist/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  183. package/dist/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  184. package/dist/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  185. package/dist/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  186. package/dist/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  187. package/dist/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  188. package/dist/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  189. package/dist/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  190. package/dist/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  191. package/dist/skills/frontend/references/ui-ux-db/README.md +501 -115
  192. package/dist/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
  193. package/dist/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
  194. package/dist/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
  195. package/dist/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
  196. package/dist/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
  197. package/dist/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
  198. package/dist/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
  199. package/dist/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
  200. package/dist/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
  201. package/dist/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
  202. package/dist/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
  203. package/dist/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
  204. package/dist/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
  205. package/dist/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
  206. package/dist/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
  207. package/dist/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
  208. package/dist/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
  209. package/dist/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
  210. package/dist/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
  211. package/dist/skills/git-master/SKILL.md +4 -0
  212. package/dist/skills/lcx-doctor/SKILL.md +1 -1
  213. package/dist/skills/review-work/SKILL.md +3 -3
  214. package/dist/skills/start-work/SKILL.md +7 -5
  215. package/dist/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
  216. package/dist/skills/ultimate-browsing/SKILL.md +140 -0
  217. package/dist/skills/ultimate-browsing/engine/__init__.py +24 -0
  218. package/dist/skills/ultimate-browsing/engine/__main__.py +106 -0
  219. package/dist/skills/ultimate-browsing/engine/bias_check.py +174 -0
  220. package/dist/skills/ultimate-browsing/engine/curl_probe.py +91 -0
  221. package/dist/skills/ultimate-browsing/engine/executor.py +192 -0
  222. package/dist/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
  223. package/dist/skills/ultimate-browsing/engine/referers.py +15 -0
  224. package/dist/skills/ultimate-browsing/engine/result_schema.py +45 -0
  225. package/dist/skills/ultimate-browsing/engine/summary.py +37 -0
  226. package/dist/skills/ultimate-browsing/engine/templates/package.json +11 -0
  227. package/dist/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
  228. package/dist/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
  229. package/dist/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
  230. package/dist/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
  231. package/dist/skills/ultimate-browsing/engine/url_transforms.py +98 -0
  232. package/dist/skills/ultimate-browsing/engine/validators.py +216 -0
  233. package/dist/skills/ultimate-browsing/engine/waf_detector.py +214 -0
  234. package/dist/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
  235. package/dist/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
  236. package/dist/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
  237. package/dist/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
  238. package/dist/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
  239. package/dist/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
  240. package/dist/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
  241. package/dist/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
  242. package/dist/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
  243. package/dist/skills/ultimate-browsing/references/insane-search/README.md +319 -0
  244. package/dist/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
  245. package/dist/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
  246. package/dist/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
  247. package/dist/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
  248. package/dist/skills/ultimate-browsing/references/insane-search/media.md +123 -0
  249. package/dist/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
  250. package/dist/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
  251. package/dist/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
  252. package/dist/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
  253. package/dist/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
  254. package/dist/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
  255. package/dist/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
  256. package/dist/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
  257. package/dist/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
  258. package/dist/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
  259. package/dist/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
  260. package/dist/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +110 -0
  261. package/dist/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +245 -0
  262. package/dist/skills/ultraresearch/SKILL.md +4 -233
  263. package/dist/skills/ulw-plan/SKILL.md +9 -4
  264. package/dist/skills/ulw-plan/references/full-workflow.md +11 -6
  265. package/dist/skills/ulw-plan/references/intent-clear.md +3 -3
  266. package/dist/skills/ulw-plan/references/intent-unclear.md +1 -1
  267. package/dist/skills/ulw-research/ATTRIBUTION.md +49 -0
  268. package/dist/skills/ulw-research/SKILL.md +260 -0
  269. package/dist/skills/visual-qa/SKILL.md +105 -14
  270. package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +120 -1
  271. package/dist/testing/create-plugin-module.d.ts +2 -0
  272. package/dist/tools/delegate-task/sync-task-deps.d.ts +8 -6
  273. package/dist/tools/skill-mcp/tools.d.ts +1 -1
  274. package/dist/tui.js +23924 -16116
  275. package/docs/reference/github-attachment-upload.md +51 -0
  276. package/docs/reference/web-terminal-visual-qa.md +81 -0
  277. package/package.json +23 -15
  278. package/packages/lsp-core/src/lsp/process.ts +4 -1
  279. package/packages/lsp-core/src/mcp.ts +1 -0
  280. package/packages/lsp-daemon/dist/cli.js +5 -1
  281. package/packages/lsp-daemon/dist/index.js +5 -1
  282. package/packages/lsp-daemon/dist/proxy.js +1 -0
  283. package/packages/lsp-tools-mcp/dist/cli.js +5 -1
  284. package/packages/lsp-tools-mcp/dist/lsp/manager.js +4 -1
  285. package/packages/lsp-tools-mcp/dist/mcp.js +5 -1
  286. package/packages/lsp-tools-mcp/dist/tools.js +4 -1
  287. package/packages/omo-codex/THIRD-PARTY-NOTICES.md +27 -4
  288. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  289. package/packages/omo-codex/plugin/README.md +1 -1
  290. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +447 -94
  291. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  292. package/packages/omo-codex/plugin/components/bootstrap/scripts/bootstrap.ps1 +37 -68
  293. package/packages/omo-codex/plugin/components/bootstrap/scripts/node-dispatch.ps1 +75 -0
  294. package/packages/omo-codex/plugin/components/bootstrap/src/cli.ts +1 -1
  295. package/packages/omo-codex/plugin/components/bootstrap/src/setup.ts +2 -18
  296. package/packages/omo-codex/plugin/components/codegraph/LICENSE +21 -0
  297. package/packages/omo-codex/plugin/components/codegraph/NODE-RUNTIME-LICENSES.md +2951 -0
  298. package/packages/omo-codex/plugin/components/codegraph/NOTICE +16 -0
  299. package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +889 -364
  300. package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +497 -59
  301. package/packages/omo-codex/plugin/components/codegraph/package.json +10 -4
  302. package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +7 -1
  303. package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +103 -3
  304. package/packages/omo-codex/plugin/components/codegraph/src/mcp-bridge.ts +114 -0
  305. package/packages/omo-codex/plugin/components/codegraph/src/mcp-unavailable.ts +75 -0
  306. package/packages/omo-codex/plugin/components/codegraph/src/serve-invocation.ts +29 -0
  307. package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +60 -70
  308. package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +27 -11
  309. package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +31 -239
  310. package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +91 -0
  311. package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +1 -1
  312. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +146 -0
  313. package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +68 -0
  314. package/packages/omo-codex/plugin/components/codegraph/test/serve-node-support.test.ts +11 -1
  315. package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +133 -0
  316. package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +13 -120
  317. package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +8 -1
  318. package/packages/omo-codex/plugin/components/codegraph/test/session-start-trust-boundary.test.ts +63 -0
  319. package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-availability.test.ts +106 -0
  320. package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +220 -0
  321. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  322. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  323. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  324. package/packages/omo-codex/plugin/components/lsp/dist/cli.js +4 -1
  325. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  326. package/packages/omo-codex/plugin/components/rules/dist/cli.js +3 -3
  327. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  328. package/packages/omo-codex/plugin/components/rules/src/sparkshell-awareness.ts +3 -3
  329. package/packages/omo-codex/plugin/components/rules/test/sparkshell-awareness.test.ts +42 -9
  330. package/packages/omo-codex/plugin/components/start-work-continuation/directive.md +6 -6
  331. package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
  332. package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +23 -0
  333. package/packages/omo-codex/plugin/components/teammode/dist/cli.js +22 -4
  334. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  335. package/packages/omo-codex/plugin/components/teammode/skills/teammode/SKILL.md +97 -32
  336. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-guide.mjs +48 -20
  337. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-state.mjs +70 -3
  338. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team-worktree.mjs +113 -0
  339. package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +69 -6
  340. package/packages/omo-codex/plugin/components/teammode/src/codex-hook.ts +19 -4
  341. package/packages/omo-codex/plugin/components/teammode/test/thread-title-hook.test.ts +32 -2
  342. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  343. package/packages/omo-codex/plugin/components/ultrawork/README.md +1 -1
  344. package/packages/omo-codex/plugin/components/ultrawork/agents/explorer.toml +1 -1
  345. package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +2 -2
  346. package/packages/omo-codex/plugin/components/ultrawork/directive.md +24 -7
  347. package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +1 -1
  348. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  349. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +6 -4
  350. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +11 -6
  351. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +3 -3
  352. package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +1 -1
  353. package/packages/omo-codex/plugin/components/ultrawork/src/codex-hook.ts +1 -1
  354. package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook-trigger-policy.test.ts +24 -0
  355. package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +29 -3
  356. package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
  357. package/packages/omo-codex/plugin/components/ulw-loop/README.md +25 -21
  358. package/packages/omo-codex/plugin/components/ulw-loop/biome.json +1 -1
  359. package/packages/omo-codex/plugin/components/ulw-loop/directive.md +381 -0
  360. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +14 -1
  361. package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +145 -14
  362. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.d.ts +6 -3
  363. package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-hook.js +16 -6
  364. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.d.ts +5 -0
  365. package/packages/omo-codex/plugin/components/ulw-loop/dist/ultrawork-directive.js +104 -0
  366. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +1 -1
  367. package/packages/omo-codex/plugin/components/ulw-loop/package.json +2 -1
  368. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +23 -14
  369. package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +14 -1
  370. package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +4 -2
  371. package/packages/omo-codex/plugin/components/ulw-loop/src/codex-hook.ts +28 -6
  372. package/packages/omo-codex/plugin/components/ulw-loop/src/ultrawork-directive.ts +113 -0
  373. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +33 -2
  374. package/packages/omo-codex/plugin/components/ulw-loop/test/cli-steering-kind-guidance.test.ts +31 -0
  375. package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +13 -0
  376. package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +36 -0
  377. package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +13 -1
  378. package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +64 -0
  379. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +2 -1
  380. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +2 -1
  381. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +2 -1
  382. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +2 -1
  383. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +2 -1
  384. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +2 -1
  385. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +2 -1
  386. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +2 -1
  387. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +2 -1
  388. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +2 -1
  389. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +2 -1
  390. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +2 -1
  391. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +2 -1
  392. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +2 -1
  393. package/packages/omo-codex/plugin/hooks/stop-checking-start-work-continuation.json +2 -1
  394. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-continuation.json +2 -1
  395. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +2 -1
  396. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +2 -1
  397. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +2 -1
  398. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +2 -1
  399. package/packages/omo-codex/plugin/package-lock.json +112 -13
  400. package/packages/omo-codex/plugin/package.json +2 -2
  401. package/packages/omo-codex/plugin/scripts/auto-update-plan.mjs +133 -0
  402. package/packages/omo-codex/plugin/scripts/auto-update-release-notes.mjs +135 -0
  403. package/packages/omo-codex/plugin/scripts/auto-update.mjs +42 -138
  404. package/packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs +42 -0
  405. package/packages/omo-codex/plugin/scripts/migrate-codex-config/context7-placeholder-guard.mjs +131 -0
  406. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-mode-guard.mjs +60 -0
  407. package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +3 -10
  408. package/packages/omo-codex/plugin/scripts/migrate-codex-config/root-settings.mjs +31 -1
  409. package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +73 -0
  410. package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +20 -3
  411. package/packages/omo-codex/plugin/scripts/sync-skills.mjs +30 -8
  412. package/packages/omo-codex/plugin/shared/src/config-loader.ts +20 -2
  413. package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +16 -0
  414. package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +128 -0
  415. package/packages/omo-codex/plugin/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  416. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  417. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/claude.md +32 -0
  418. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/codex.md +30 -0
  419. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/opencode.md +43 -0
  420. package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +17 -0
  421. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  422. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  423. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  424. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  425. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  426. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  427. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  428. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  429. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  430. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  431. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  432. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  433. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  434. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  435. package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  436. package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +77 -9
  437. package/packages/omo-codex/plugin/skills/frontend/SKILL.md +29 -8
  438. package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +29 -12
  439. package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +3 -3
  440. package/packages/omo-codex/plugin/skills/frontend/references/design/airbnb.md +3 -0
  441. package/packages/omo-codex/plugin/skills/frontend/references/design/airtable.md +3 -0
  442. package/packages/omo-codex/plugin/skills/frontend/references/design/apple.md +3 -0
  443. package/packages/omo-codex/plugin/skills/frontend/references/design/binance.md +3 -0
  444. package/packages/omo-codex/plugin/skills/frontend/references/design/bmw.md +3 -0
  445. package/packages/omo-codex/plugin/skills/frontend/references/design/bugatti.md +3 -0
  446. package/packages/omo-codex/plugin/skills/frontend/references/design/cal.md +3 -0
  447. package/packages/omo-codex/plugin/skills/frontend/references/design/claude.md +3 -0
  448. package/packages/omo-codex/plugin/skills/frontend/references/design/clay.md +3 -0
  449. package/packages/omo-codex/plugin/skills/frontend/references/design/clickhouse.md +3 -0
  450. package/packages/omo-codex/plugin/skills/frontend/references/design/cohere.md +3 -0
  451. package/packages/omo-codex/plugin/skills/frontend/references/design/coinbase.md +3 -0
  452. package/packages/omo-codex/plugin/skills/frontend/references/design/composio.md +3 -0
  453. package/packages/omo-codex/plugin/skills/frontend/references/design/cursor.md +3 -0
  454. package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +22 -19
  455. package/packages/omo-codex/plugin/skills/frontend/references/design/elevenlabs.md +3 -0
  456. package/packages/omo-codex/plugin/skills/frontend/references/design/expo.md +3 -0
  457. package/packages/omo-codex/plugin/skills/frontend/references/design/ferrari.md +3 -0
  458. package/packages/omo-codex/plugin/skills/frontend/references/design/figma.md +3 -0
  459. package/packages/omo-codex/plugin/skills/frontend/references/design/framer.md +3 -0
  460. package/packages/omo-codex/plugin/skills/frontend/references/design/hashicorp.md +3 -0
  461. package/packages/omo-codex/plugin/skills/frontend/references/design/ibm.md +3 -0
  462. package/packages/omo-codex/plugin/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
  463. package/packages/omo-codex/plugin/skills/frontend/references/design/intercom.md +3 -0
  464. package/packages/omo-codex/plugin/skills/frontend/references/design/kraken.md +3 -0
  465. package/packages/omo-codex/plugin/skills/frontend/references/design/lamborghini.md +3 -0
  466. package/packages/omo-codex/plugin/skills/frontend/references/design/linear.app.md +3 -0
  467. package/packages/omo-codex/plugin/skills/frontend/references/design/lovable.md +3 -0
  468. package/packages/omo-codex/plugin/skills/frontend/references/design/mastercard.md +3 -0
  469. package/packages/omo-codex/plugin/skills/frontend/references/design/meta.md +3 -0
  470. package/packages/omo-codex/plugin/skills/frontend/references/design/minimax.md +3 -0
  471. package/packages/omo-codex/plugin/skills/frontend/references/design/mintlify.md +3 -0
  472. package/packages/omo-codex/plugin/skills/frontend/references/design/miro.md +3 -0
  473. package/packages/omo-codex/plugin/skills/frontend/references/design/mistral.ai.md +3 -0
  474. package/packages/omo-codex/plugin/skills/frontend/references/design/mongodb.md +3 -0
  475. package/packages/omo-codex/plugin/skills/frontend/references/design/nike.md +3 -0
  476. package/packages/omo-codex/plugin/skills/frontend/references/design/notion.md +3 -0
  477. package/packages/omo-codex/plugin/skills/frontend/references/design/nvidia.md +3 -0
  478. package/packages/omo-codex/plugin/skills/frontend/references/design/ollama.md +3 -0
  479. package/packages/omo-codex/plugin/skills/frontend/references/design/opencode.ai.md +3 -0
  480. package/packages/omo-codex/plugin/skills/frontend/references/design/pinterest.md +3 -0
  481. package/packages/omo-codex/plugin/skills/frontend/references/design/playstation.md +3 -0
  482. package/packages/omo-codex/plugin/skills/frontend/references/design/posthog.md +3 -0
  483. package/packages/omo-codex/plugin/skills/frontend/references/design/raycast.md +3 -0
  484. package/packages/omo-codex/plugin/skills/frontend/references/design/renault.md +3 -0
  485. package/packages/omo-codex/plugin/skills/frontend/references/design/replicate.md +3 -0
  486. package/packages/omo-codex/plugin/skills/frontend/references/design/resend.md +3 -0
  487. package/packages/omo-codex/plugin/skills/frontend/references/design/revolut.md +3 -0
  488. package/packages/omo-codex/plugin/skills/frontend/references/design/runwayml.md +3 -0
  489. package/packages/omo-codex/plugin/skills/frontend/references/design/sanity.md +3 -0
  490. package/packages/omo-codex/plugin/skills/frontend/references/design/sentry.md +3 -0
  491. package/packages/omo-codex/plugin/skills/frontend/references/design/shopify.md +3 -0
  492. package/packages/omo-codex/plugin/skills/frontend/references/design/spacex.md +3 -0
  493. package/packages/omo-codex/plugin/skills/frontend/references/design/spotify.md +3 -0
  494. package/packages/omo-codex/plugin/skills/frontend/references/design/starbucks.md +3 -0
  495. package/packages/omo-codex/plugin/skills/frontend/references/design/stitch-skill.md +1 -1
  496. package/packages/omo-codex/plugin/skills/frontend/references/design/stripe.md +3 -0
  497. package/packages/omo-codex/plugin/skills/frontend/references/design/supabase.md +3 -0
  498. package/packages/omo-codex/plugin/skills/frontend/references/design/superhuman.md +3 -0
  499. package/packages/omo-codex/plugin/skills/frontend/references/design/taste-skill.md +1188 -208
  500. package/packages/omo-codex/plugin/skills/frontend/references/design/tesla.md +3 -0
  501. package/packages/omo-codex/plugin/skills/frontend/references/design/theverge.md +3 -0
  502. package/packages/omo-codex/plugin/skills/frontend/references/design/together.ai.md +3 -0
  503. package/packages/omo-codex/plugin/skills/frontend/references/design/uber.md +3 -0
  504. package/packages/omo-codex/plugin/skills/frontend/references/design/vercel.md +3 -0
  505. package/packages/omo-codex/plugin/skills/frontend/references/design/vodafone.md +3 -0
  506. package/packages/omo-codex/plugin/skills/frontend/references/design/voltagent.md +3 -0
  507. package/packages/omo-codex/plugin/skills/frontend/references/design/warp.md +3 -0
  508. package/packages/omo-codex/plugin/skills/frontend/references/design/webflow.md +3 -0
  509. package/packages/omo-codex/plugin/skills/frontend/references/design/wired.md +3 -0
  510. package/packages/omo-codex/plugin/skills/frontend/references/design/wise.md +3 -0
  511. package/packages/omo-codex/plugin/skills/frontend/references/design/x.ai.md +3 -0
  512. package/packages/omo-codex/plugin/skills/frontend/references/design/zapier.md +3 -0
  513. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  514. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +48 -0
  515. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  516. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  517. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  518. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  519. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  520. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/orchestration.md +80 -0
  521. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/routing.md +79 -0
  522. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  523. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  524. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  525. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  526. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  527. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  528. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  529. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  530. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  531. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  532. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  533. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  534. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  535. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  536. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  537. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  538. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  539. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  540. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  541. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  542. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  543. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  544. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  545. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  546. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  547. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  548. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  549. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  550. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  551. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  552. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  553. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  554. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  555. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  556. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  557. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  558. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  559. package/packages/omo-codex/plugin/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  560. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/README.md +501 -115
  561. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
  562. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
  563. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
  564. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
  565. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
  566. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
  567. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
  568. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
  569. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
  570. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
  571. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
  572. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
  573. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
  574. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
  575. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
  576. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
  577. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
  578. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
  579. package/packages/omo-codex/plugin/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
  580. package/packages/omo-codex/plugin/skills/git-master/SKILL.md +4 -0
  581. package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +4 -0
  582. package/packages/omo-codex/plugin/skills/lcx-doctor/SKILL.md +1 -1
  583. package/packages/omo-codex/plugin/skills/refactor/SKILL.md +4 -0
  584. package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +4 -0
  585. package/packages/omo-codex/plugin/skills/review-work/SKILL.md +12 -4
  586. package/packages/omo-codex/plugin/skills/start-work/SKILL.md +14 -8
  587. package/packages/omo-codex/plugin/skills/teammode/SKILL.md +97 -32
  588. package/packages/omo-codex/plugin/skills/teammode/scripts/team-guide.mjs +48 -20
  589. package/packages/omo-codex/plugin/skills/teammode/scripts/team-state.mjs +70 -3
  590. package/packages/omo-codex/plugin/skills/teammode/scripts/team-worktree.mjs +113 -0
  591. package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +69 -6
  592. package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
  593. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +140 -0
  594. package/packages/omo-codex/plugin/skills/ultimate-browsing/agents/openai.yaml +2 -0
  595. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__init__.py +24 -0
  596. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/__main__.py +106 -0
  597. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/bias_check.py +174 -0
  598. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/curl_probe.py +91 -0
  599. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/executor.py +192 -0
  600. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
  601. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/referers.py +15 -0
  602. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/result_schema.py +45 -0
  603. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/summary.py +37 -0
  604. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +11 -0
  605. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
  606. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
  607. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
  608. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
  609. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/url_transforms.py +98 -0
  610. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/validators.py +216 -0
  611. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_detector.py +214 -0
  612. package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
  613. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
  614. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
  615. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
  616. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
  617. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
  618. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
  619. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
  620. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
  621. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +319 -0
  622. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
  623. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
  624. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
  625. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
  626. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/media.md +123 -0
  627. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
  628. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
  629. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
  630. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
  631. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
  632. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
  633. package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
  634. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
  635. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
  636. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
  637. package/packages/omo-codex/plugin/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
  638. package/packages/omo-codex/plugin/skills/ultraresearch/SKILL.md +4 -231
  639. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +23 -14
  640. package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +6 -4
  641. package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +11 -6
  642. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +3 -3
  643. package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +1 -1
  644. package/packages/omo-codex/plugin/skills/ulw-research/ATTRIBUTION.md +49 -0
  645. package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +262 -0
  646. package/packages/omo-codex/plugin/skills/ulw-research/agents/openai.yaml +2 -0
  647. package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +109 -14
  648. package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +2 -1
  649. package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -0
  650. package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -0
  651. package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +96 -0
  652. package/packages/omo-codex/plugin/test/auto-update-restart-notice.test.mjs +36 -4
  653. package/packages/omo-codex/plugin/test/bootstrap-binlinks.test.mjs +23 -5
  654. package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +38 -0
  655. package/packages/omo-codex/plugin/test/bootstrap-ps-guard.test.mjs +25 -0
  656. package/packages/omo-codex/plugin/test/bootstrap-setup.test.mjs +1 -7
  657. package/packages/omo-codex/plugin/test/component-codegraph-mcp-smoke.test.mjs +76 -0
  658. package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +206 -6
  659. package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +44 -0
  660. package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +50 -1
  661. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +11 -7
  662. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +28 -2
  663. package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +107 -0
  664. package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +117 -0
  665. package/packages/omo-codex/plugin/test/teammode-thread-title.test.mjs +169 -0
  666. package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +249 -0
  667. package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +285 -0
  668. package/packages/omo-codex/scripts/install-bin-links.test.mjs +6 -1
  669. package/packages/omo-codex/scripts/install-cache-copy.test.mjs +51 -0
  670. package/packages/omo-codex/scripts/install-cli-args.test.mjs +1 -1
  671. package/packages/omo-codex/scripts/install-config-git-bash.test.mjs +23 -0
  672. package/packages/omo-codex/scripts/install-config.test.mjs +198 -17
  673. package/packages/omo-codex/scripts/install-delegated-command.test.mjs +76 -4
  674. package/packages/omo-codex/scripts/install-dist/install-local.mjs +1021 -298
  675. package/packages/omo-codex/scripts/install-local-entrypoint.test.mjs +40 -3
  676. package/packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs +24 -15
  677. package/packages/omo-codex/scripts/install-local.test.mjs +5 -1
  678. package/packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs +84 -0
  679. package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +128 -0
  680. package/packages/shared-skills/skills/coding-agent-sessions/agents/openai.yaml +4 -0
  681. package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +71 -0
  682. package/packages/shared-skills/skills/coding-agent-sessions/references/claude.md +32 -0
  683. package/packages/shared-skills/skills/coding-agent-sessions/references/codex.md +30 -0
  684. package/packages/shared-skills/skills/coding-agent-sessions/references/opencode.md +43 -0
  685. package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +17 -0
  686. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/__init__.py +1 -0
  687. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/claude.py +66 -0
  688. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +283 -0
  689. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/codex.py +105 -0
  690. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +275 -0
  691. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/jsonio.py +55 -0
  692. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/kiro_scanner.py +91 -0
  693. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/opencode.py +289 -0
  694. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +92 -0
  695. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_optional_scanners.py +203 -0
  696. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/sqlite_scanners.py +177 -0
  697. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/timeparse.py +51 -0
  698. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +149 -0
  699. package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/types.py +57 -0
  700. package/packages/shared-skills/skills/coding-agent-sessions/scripts/find-agent-sessions.py +19 -0
  701. package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +77 -9
  702. package/packages/shared-skills/skills/frontend/SKILL.md +29 -8
  703. package/packages/shared-skills/skills/frontend/references/design/README.md +29 -12
  704. package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +3 -3
  705. package/packages/shared-skills/skills/frontend/references/design/airbnb.md +3 -0
  706. package/packages/shared-skills/skills/frontend/references/design/airtable.md +3 -0
  707. package/packages/shared-skills/skills/frontend/references/design/apple.md +3 -0
  708. package/packages/shared-skills/skills/frontend/references/design/binance.md +3 -0
  709. package/packages/shared-skills/skills/frontend/references/design/bmw.md +3 -0
  710. package/packages/shared-skills/skills/frontend/references/design/bugatti.md +3 -0
  711. package/packages/shared-skills/skills/frontend/references/design/cal.md +3 -0
  712. package/packages/shared-skills/skills/frontend/references/design/claude.md +3 -0
  713. package/packages/shared-skills/skills/frontend/references/design/clay.md +3 -0
  714. package/packages/shared-skills/skills/frontend/references/design/clickhouse.md +3 -0
  715. package/packages/shared-skills/skills/frontend/references/design/cohere.md +3 -0
  716. package/packages/shared-skills/skills/frontend/references/design/coinbase.md +3 -0
  717. package/packages/shared-skills/skills/frontend/references/design/composio.md +3 -0
  718. package/packages/shared-skills/skills/frontend/references/design/cursor.md +3 -0
  719. package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +22 -19
  720. package/packages/shared-skills/skills/frontend/references/design/elevenlabs.md +3 -0
  721. package/packages/shared-skills/skills/frontend/references/design/expo.md +3 -0
  722. package/packages/shared-skills/skills/frontend/references/design/ferrari.md +3 -0
  723. package/packages/shared-skills/skills/frontend/references/design/figma.md +3 -0
  724. package/packages/shared-skills/skills/frontend/references/design/framer.md +3 -0
  725. package/packages/shared-skills/skills/frontend/references/design/hashicorp.md +3 -0
  726. package/packages/shared-skills/skills/frontend/references/design/ibm.md +3 -0
  727. package/packages/shared-skills/skills/frontend/references/design/imagegen-frontend-web.md +380 -79
  728. package/packages/shared-skills/skills/frontend/references/design/intercom.md +3 -0
  729. package/packages/shared-skills/skills/frontend/references/design/kraken.md +3 -0
  730. package/packages/shared-skills/skills/frontend/references/design/lamborghini.md +3 -0
  731. package/packages/shared-skills/skills/frontend/references/design/linear.app.md +3 -0
  732. package/packages/shared-skills/skills/frontend/references/design/lovable.md +3 -0
  733. package/packages/shared-skills/skills/frontend/references/design/mastercard.md +3 -0
  734. package/packages/shared-skills/skills/frontend/references/design/meta.md +3 -0
  735. package/packages/shared-skills/skills/frontend/references/design/minimax.md +3 -0
  736. package/packages/shared-skills/skills/frontend/references/design/mintlify.md +3 -0
  737. package/packages/shared-skills/skills/frontend/references/design/miro.md +3 -0
  738. package/packages/shared-skills/skills/frontend/references/design/mistral.ai.md +3 -0
  739. package/packages/shared-skills/skills/frontend/references/design/mongodb.md +3 -0
  740. package/packages/shared-skills/skills/frontend/references/design/nike.md +3 -0
  741. package/packages/shared-skills/skills/frontend/references/design/notion.md +3 -0
  742. package/packages/shared-skills/skills/frontend/references/design/nvidia.md +3 -0
  743. package/packages/shared-skills/skills/frontend/references/design/ollama.md +3 -0
  744. package/packages/shared-skills/skills/frontend/references/design/opencode.ai.md +3 -0
  745. package/packages/shared-skills/skills/frontend/references/design/pinterest.md +3 -0
  746. package/packages/shared-skills/skills/frontend/references/design/playstation.md +3 -0
  747. package/packages/shared-skills/skills/frontend/references/design/posthog.md +3 -0
  748. package/packages/shared-skills/skills/frontend/references/design/raycast.md +3 -0
  749. package/packages/shared-skills/skills/frontend/references/design/renault.md +3 -0
  750. package/packages/shared-skills/skills/frontend/references/design/replicate.md +3 -0
  751. package/packages/shared-skills/skills/frontend/references/design/resend.md +3 -0
  752. package/packages/shared-skills/skills/frontend/references/design/revolut.md +3 -0
  753. package/packages/shared-skills/skills/frontend/references/design/runwayml.md +3 -0
  754. package/packages/shared-skills/skills/frontend/references/design/sanity.md +3 -0
  755. package/packages/shared-skills/skills/frontend/references/design/sentry.md +3 -0
  756. package/packages/shared-skills/skills/frontend/references/design/shopify.md +3 -0
  757. package/packages/shared-skills/skills/frontend/references/design/spacex.md +3 -0
  758. package/packages/shared-skills/skills/frontend/references/design/spotify.md +3 -0
  759. package/packages/shared-skills/skills/frontend/references/design/starbucks.md +3 -0
  760. package/packages/shared-skills/skills/frontend/references/design/stitch-skill.md +1 -1
  761. package/packages/shared-skills/skills/frontend/references/design/stripe.md +3 -0
  762. package/packages/shared-skills/skills/frontend/references/design/supabase.md +3 -0
  763. package/packages/shared-skills/skills/frontend/references/design/superhuman.md +3 -0
  764. package/packages/shared-skills/skills/frontend/references/design/taste-skill.md +1188 -208
  765. package/packages/shared-skills/skills/frontend/references/design/tesla.md +3 -0
  766. package/packages/shared-skills/skills/frontend/references/design/theverge.md +3 -0
  767. package/packages/shared-skills/skills/frontend/references/design/together.ai.md +3 -0
  768. package/packages/shared-skills/skills/frontend/references/design/uber.md +3 -0
  769. package/packages/shared-skills/skills/frontend/references/design/vercel.md +3 -0
  770. package/packages/shared-skills/skills/frontend/references/design/vodafone.md +3 -0
  771. package/packages/shared-skills/skills/frontend/references/design/voltagent.md +3 -0
  772. package/packages/shared-skills/skills/frontend/references/design/warp.md +3 -0
  773. package/packages/shared-skills/skills/frontend/references/design/webflow.md +3 -0
  774. package/packages/shared-skills/skills/frontend/references/design/wired.md +3 -0
  775. package/packages/shared-skills/skills/frontend/references/design/wise.md +3 -0
  776. package/packages/shared-skills/skills/frontend/references/design/x.ai.md +3 -0
  777. package/packages/shared-skills/skills/frontend/references/design/zapier.md +3 -0
  778. package/packages/shared-skills/skills/frontend/references/designpowers/EVIDENCE.md +89 -0
  779. package/packages/shared-skills/skills/frontend/references/designpowers/README.md +48 -0
  780. package/packages/shared-skills/skills/frontend/references/designpowers/UPSTREAM.md +80 -0
  781. package/packages/shared-skills/skills/frontend/references/designpowers/lane-a-direction.md +64 -0
  782. package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +65 -0
  783. package/packages/shared-skills/skills/frontend/references/designpowers/lane-c-review.md +65 -0
  784. package/packages/shared-skills/skills/frontend/references/designpowers/lane-d-memory.md +83 -0
  785. package/packages/shared-skills/skills/frontend/references/designpowers/orchestration.md +80 -0
  786. package/packages/shared-skills/skills/frontend/references/designpowers/routing.md +79 -0
  787. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/LICENSE +21 -0
  788. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/accessibility-reviewer.md +83 -0
  789. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/content-writer.md +132 -0
  790. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-builder.md +109 -0
  791. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-critic.md +89 -0
  792. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-lead.md +113 -0
  793. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-scout.md +78 -0
  794. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/design-strategist.md +121 -0
  795. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/heuristic-evaluator.md +268 -0
  796. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/inspiration-scout.md +107 -0
  797. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/agents/motion-designer.md +120 -0
  798. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/accessible-content/SKILL.md +101 -0
  799. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/adaptive-interfaces/SKILL.md +109 -0
  800. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/cognitive-accessibility/SKILL.md +107 -0
  801. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debate/SKILL.md +199 -0
  802. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-debt-tracker/SKILL.md +174 -0
  803. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-handoff/SKILL.md +125 -0
  804. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-md/SKILL.md +106 -0
  805. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-retrospective/SKILL.md +266 -0
  806. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-review/SKILL.md +123 -0
  807. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/design-system-alignment/SKILL.md +120 -0
  808. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/designpowers-critique/SKILL.md +164 -0
  809. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/heuristic-evaluation/SKILL.md +85 -0
  810. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inclusive-personas/SKILL.md +98 -0
  811. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/inspiration-scouting/SKILL.md +165 -0
  812. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/interaction-design/SKILL.md +122 -0
  813. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/motion-choreography/SKILL.md +81 -0
  814. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/research-planning/SKILL.md +96 -0
  815. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/responsive-patterns/SKILL.md +77 -0
  816. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/synthetic-user-testing/SKILL.md +192 -0
  817. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-feedback/SKILL.md +165 -0
  818. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/taste-report/SKILL.md +78 -0
  819. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/token-architecture/SKILL.md +75 -0
  820. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/ui-composition/SKILL.md +117 -0
  821. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/usability-testing/SKILL.md +78 -0
  822. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/verification-before-shipping/SKILL.md +125 -0
  823. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/voice-and-tone/SKILL.md +79 -0
  824. package/packages/shared-skills/skills/frontend/references/designpowers/vendor/skills/writing-design-plans/SKILL.md +119 -0
  825. package/packages/shared-skills/skills/frontend/references/ui-ux-db/README.md +501 -115
  826. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/charts.csv +26 -26
  827. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/colors.csv +162 -97
  828. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/icons.csv +105 -100
  829. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/landing.csv +22 -18
  830. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/products.csv +162 -97
  831. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/flutter.csv +53 -53
  832. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/html-tailwind.csv +56 -56
  833. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/nextjs.csv +53 -53
  834. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/react.csv +54 -54
  835. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/svelte.csv +54 -54
  836. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/swiftui.csv +51 -51
  837. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/stacks/vue.csv +50 -50
  838. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/styles.csv +17 -0
  839. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/typography.csv +17 -1
  840. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/ui-reasoning.csv +162 -101
  841. package/packages/shared-skills/skills/frontend/references/ui-ux-db/data/web-interface.csv +30 -30
  842. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/core.py +31 -22
  843. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/design_system.py +150 -69
  844. package/packages/shared-skills/skills/frontend/references/ui-ux-db/scripts/search.py +3 -3
  845. package/packages/shared-skills/skills/git-master/SKILL.md +4 -0
  846. package/packages/shared-skills/skills/lcx-doctor/SKILL.md +1 -1
  847. package/packages/shared-skills/skills/review-work/SKILL.md +3 -3
  848. package/packages/shared-skills/skills/start-work/SKILL.md +7 -5
  849. package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +105 -0
  850. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +140 -0
  851. package/packages/shared-skills/skills/ultimate-browsing/engine/__init__.py +24 -0
  852. package/packages/shared-skills/skills/ultimate-browsing/engine/__main__.py +106 -0
  853. package/packages/shared-skills/skills/ultimate-browsing/engine/bias_check.py +174 -0
  854. package/packages/shared-skills/skills/ultimate-browsing/engine/curl_probe.py +91 -0
  855. package/packages/shared-skills/skills/ultimate-browsing/engine/executor.py +192 -0
  856. package/packages/shared-skills/skills/ultimate-browsing/engine/fetch_chain.py +268 -0
  857. package/packages/shared-skills/skills/ultimate-browsing/engine/referers.py +15 -0
  858. package/packages/shared-skills/skills/ultimate-browsing/engine/result_schema.py +45 -0
  859. package/packages/shared-skills/skills/ultimate-browsing/engine/summary.py +37 -0
  860. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +11 -0
  861. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +129 -0
  862. package/packages/shared-skills/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +167 -0
  863. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_fetch_chain.py +77 -0
  864. package/packages/shared-skills/skills/ultimate-browsing/engine/tests/test_playwright_templates.py +282 -0
  865. package/packages/shared-skills/skills/ultimate-browsing/engine/url_transforms.py +98 -0
  866. package/packages/shared-skills/skills/ultimate-browsing/engine/validators.py +216 -0
  867. package/packages/shared-skills/skills/ultimate-browsing/engine/waf_detector.py +214 -0
  868. package/packages/shared-skills/skills/ultimate-browsing/engine/waf_profiles.yaml +162 -0
  869. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/README.md +79 -0
  870. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/career.md +29 -0
  871. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/dev.md +62 -0
  872. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/search.md +33 -0
  873. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/social.md +207 -0
  874. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/video.md +115 -0
  875. package/packages/shared-skills/skills/ultimate-browsing/references/agent-reach/web.md +76 -0
  876. package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +120 -0
  877. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +319 -0
  878. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/cache-archive.md +83 -0
  879. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/fallback.md +159 -0
  880. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/jina.md +130 -0
  881. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/json-api.md +133 -0
  882. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/media.md +123 -0
  883. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/metadata.md +116 -0
  884. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/naver.md +107 -0
  885. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/playwright.md +142 -0
  886. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/public-api.md +119 -0
  887. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/rss.md +123 -0
  888. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/tls-impersonate.md +186 -0
  889. package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/twitter.md +104 -0
  890. package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_crypto.py +75 -0
  891. package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_domains.py +38 -0
  892. package/packages/shared-skills/skills/ultimate-browsing/scripts/cookie_paths.py +112 -0
  893. package/packages/shared-skills/skills/ultimate-browsing/scripts/extract_cookies.py +280 -0
  894. package/packages/shared-skills/skills/ultimate-browsing/scripts/tests/test_cookie_domain_filter.py +110 -0
  895. package/packages/shared-skills/skills/ultimate-browsing/scripts/tests/test_extract_cookies.py +245 -0
  896. package/packages/shared-skills/skills/ultraresearch/SKILL.md +4 -233
  897. package/packages/shared-skills/skills/ulw-plan/SKILL.md +9 -4
  898. package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +11 -6
  899. package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +3 -3
  900. package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +1 -1
  901. package/packages/shared-skills/skills/ulw-research/ATTRIBUTION.md +49 -0
  902. package/packages/shared-skills/skills/ulw-research/SKILL.md +260 -0
  903. package/packages/shared-skills/skills/visual-qa/SKILL.md +105 -14
  904. package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +120 -1
  905. package/script/qa/web-terminal-redaction.d.mts +13 -0
  906. package/script/qa/web-terminal-redaction.mjs +43 -0
  907. package/script/qa/web-terminal-renderer.mjs +218 -0
  908. package/script/qa/web-terminal-visual-qa.mjs +264 -0
  909. package/packages/omo-codex/plugin/components/codegraph/dist/cli.d.ts +0 -2
  910. package/packages/omo-codex/plugin/components/codegraph/dist/serve.d.ts +0 -32
  911. package/packages/omo-codex/plugin/test/ultraresearch-skill-contract.test.mjs +0 -174
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
17
17
 
18
18
  // packages/utils/src/xdg-data-dir.ts
19
- import { accessSync, constants, mkdirSync } from "node:fs";
19
+ import { accessSync as accessSync2, constants as constants2, mkdirSync } from "node:fs";
20
20
  import os from "node:os";
21
21
  import path from "node:path";
22
22
  function resolveXdgDataDir(appName, options = {}) {
@@ -28,7 +28,7 @@ function resolveXdgDataDir(appName, options = {}) {
28
28
  function resolveWritableDirectory(preferredDir, fallbackSuffix, osProvider) {
29
29
  try {
30
30
  mkdirSync(preferredDir, { recursive: true });
31
- accessSync(preferredDir, constants.W_OK);
31
+ accessSync2(preferredDir, constants2.W_OK);
32
32
  return preferredDir;
33
33
  } catch (error) {
34
34
  if (!(error instanceof Error))
@@ -95,21 +95,21 @@ var init_atomic_write = __esm(() => {
95
95
  });
96
96
 
97
97
  // packages/telemetry-core/src/activity-state.ts
98
- import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync } from "node:fs";
99
- import { basename as basename5, join as join27 } from "node:path";
98
+ import { existsSync as existsSync5, mkdirSync as mkdirSync2, readFileSync } from "node:fs";
99
+ import { basename as basename6, join as join29 } from "node:path";
100
100
  function resolveTelemetryStateDir(product, options = {}) {
101
101
  const dataDir = resolveXdgDataDir(product.cacheDirName, {
102
102
  env: options.env,
103
103
  osProvider: options.osProvider
104
104
  });
105
- const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join27(options.env.XDG_DATA_HOME, product.cacheDirName);
106
- if (dataDir === xdgStateDir || xdgStateDir === undefined && basename5(dataDir) === product.cacheDirName) {
105
+ const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join29(options.env.XDG_DATA_HOME, product.cacheDirName);
106
+ if (dataDir === xdgStateDir || xdgStateDir === undefined && basename6(dataDir) === product.cacheDirName) {
107
107
  return dataDir;
108
108
  }
109
- return join27(dataDir, product.cacheDirName);
109
+ return join29(dataDir, product.cacheDirName);
110
110
  }
111
111
  function getTelemetryActivityStateFilePath(stateDir) {
112
- return join27(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
112
+ return join29(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
113
113
  }
114
114
  function getDailyActiveCaptureState(input) {
115
115
  const state = readPostHogActivityState(input.stateDir, input.diagnostics);
@@ -134,7 +134,7 @@ function isPostHogActivityState(value) {
134
134
  }
135
135
  function readPostHogActivityState(stateDir, diagnostics) {
136
136
  const stateFilePath = getTelemetryActivityStateFilePath(stateDir);
137
- if (!existsSync4(stateFilePath)) {
137
+ if (!existsSync5(stateFilePath)) {
138
138
  return {};
139
139
  }
140
140
  try {
@@ -179,10 +179,10 @@ var init_activity_state = __esm(() => {
179
179
  var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
180
180
 
181
181
  // packages/telemetry-core/src/diagnostics.ts
182
- import { appendFileSync, existsSync as existsSync5, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
183
- import { join as join28 } from "node:path";
182
+ import { appendFileSync, existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
183
+ import { join as join30 } from "node:path";
184
184
  function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
185
- return join28(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
185
+ return join30(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
186
186
  }
187
187
  function writeTelemetryDiagnostic(input, options) {
188
188
  const now = options.now ?? new Date;
@@ -200,7 +200,7 @@ function writeTelemetryDiagnostic(input, options) {
200
200
  }
201
201
  function cleanupTelemetryDiagnostics(options) {
202
202
  const diagnosticsFilePath = getTelemetryDiagnosticsFilePath(options.diagnosticsDir);
203
- if (!existsSync5(diagnosticsFilePath)) {
203
+ if (!existsSync6(diagnosticsFilePath)) {
204
204
  return;
205
205
  }
206
206
  try {
@@ -348,7 +348,7 @@ function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetr
348
348
  var init_machine_id = () => {};
349
349
 
350
350
  // node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
351
- import { dirname as dirname7, posix, sep as sep7 } from "node:path";
351
+ import { dirname as dirname8, posix, sep as sep7 } from "node:path";
352
352
  function createModulerModifier() {
353
353
  const getModuleFromFileName = createGetModuleFromFilename();
354
354
  return async (frames) => {
@@ -357,7 +357,7 @@ function createModulerModifier() {
357
357
  return frames;
358
358
  };
359
359
  }
360
- function createGetModuleFromFilename(basePath = process.argv[1] ? dirname7(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
360
+ function createGetModuleFromFilename(basePath = process.argv[1] ? dirname8(process.argv[1]) : process.cwd(), isWindows = sep7 === "\\") {
361
361
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
362
362
  return (filename) => {
363
363
  if (!filename)
@@ -5907,7 +5907,7 @@ var package_default;
5907
5907
  var init_package = __esm(() => {
5908
5908
  package_default = {
5909
5909
  name: "@oh-my-opencode/omo-codex",
5910
- version: "4.12.1",
5910
+ version: "4.14.0",
5911
5911
  type: "module",
5912
5912
  private: true,
5913
5913
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -6042,7 +6042,7 @@ function createPostHogClient(source, options = {}) {
6042
6042
  osProvider: options.osProvider ?? resolveOsProvider(),
6043
6043
  product: createCodexTelemetryProductConfig(),
6044
6044
  source,
6045
- transportFactory: options.transportFactory
6045
+ transportFactory: options.transportFactory ?? transportFactoryOverride ?? undefined
6046
6046
  });
6047
6047
  if (!client.enabled) {
6048
6048
  return NO_OP_POSTHOG;
@@ -6093,7 +6093,7 @@ function __setActivityStateProviderForTesting(provider) {
6093
6093
  function __resetActivityStateProviderForTesting() {
6094
6094
  activityStateProviderOverride = null;
6095
6095
  }
6096
- var osProviderOverride2 = null, activityStateProviderOverride = null, NO_OP_POSTHOG;
6096
+ var osProviderOverride2 = null, activityStateProviderOverride = null, transportFactoryOverride = null, NO_OP_POSTHOG;
6097
6097
  var init_posthog = __esm(() => {
6098
6098
  init_src();
6099
6099
  init_diagnostics2();
@@ -6127,7 +6127,7 @@ var init_telemetry = __esm(() => {
6127
6127
 
6128
6128
  // packages/omo-codex/src/install/install-local-cli.ts
6129
6129
  import { readFile as readFile19 } from "node:fs/promises";
6130
- import { dirname as dirname9, join as join33, resolve as resolve11 } from "node:path";
6130
+ import { dirname as dirname10, join as join35, resolve as resolve11 } from "node:path";
6131
6131
  import { fileURLToPath as fileURLToPath2 } from "node:url";
6132
6132
 
6133
6133
  // packages/utils/src/runtime/spawn.ts
@@ -6284,11 +6284,74 @@ function spawn(cmdOrOpts, opts) {
6284
6284
  throw new Error("spawn requires a command");
6285
6285
  return wrapNodeProcess(nodeSpawn(bin, args, createNodeSpawnOptions(options)));
6286
6286
  }
6287
+ // packages/utils/src/runtime/which.ts
6288
+ import { accessSync, constants } from "node:fs";
6289
+ import { delimiter, join } from "node:path";
6290
+ var runtime2 = globalThis;
6291
+ function isUnsafeCommandName(commandName) {
6292
+ if (commandName.includes("/") || commandName.includes("\\"))
6293
+ return true;
6294
+ if (commandName === "." || commandName === ".." || commandName.includes(".."))
6295
+ return true;
6296
+ if (/^[a-zA-Z]:/.test(commandName))
6297
+ return true;
6298
+ if (commandName.includes("\x00"))
6299
+ return true;
6300
+ return false;
6301
+ }
6302
+ function isExecutable(filePath) {
6303
+ try {
6304
+ accessSync(filePath, process.platform === "win32" ? constants.F_OK : constants.X_OK);
6305
+ return true;
6306
+ } catch (error) {
6307
+ if (!(error instanceof Error) && Object.prototype.toString.call(error) !== "[object Error]") {
6308
+ throw error;
6309
+ }
6310
+ return false;
6311
+ }
6312
+ }
6313
+ function resolvePathValue() {
6314
+ if (process.platform === "win32")
6315
+ return process.env["Path"] ?? process.env["PATH"];
6316
+ return process.env["PATH"];
6317
+ }
6318
+ function getWindowsCandidates(commandName) {
6319
+ if (process.platform !== "win32")
6320
+ return [commandName];
6321
+ if (/\.[^\\/]+$/.test(commandName))
6322
+ return [commandName];
6323
+ return [commandName, `${commandName}.exe`, `${commandName}.cmd`, `${commandName}.bat`, `${commandName}.com`];
6324
+ }
6325
+ function bunWhich(commandName) {
6326
+ if (!commandName)
6327
+ return null;
6328
+ if (isUnsafeCommandName(commandName))
6329
+ return null;
6330
+ const candidateNames = getWindowsCandidates(commandName);
6331
+ for (const candidateName of candidateNames) {
6332
+ const resolvedPath = runtime2.Bun?.which(candidateName) ?? null;
6333
+ if (resolvedPath !== null)
6334
+ return resolvedPath;
6335
+ }
6336
+ const pathValue = resolvePathValue();
6337
+ if (!pathValue)
6338
+ return null;
6339
+ const pathEntries = pathValue.split(delimiter).filter((pathEntry) => pathEntry.length > 0);
6340
+ if (pathEntries.length === 0)
6341
+ return null;
6342
+ for (const pathEntry of pathEntries) {
6343
+ for (const candidateName of candidateNames) {
6344
+ const candidatePath = join(pathEntry, candidateName);
6345
+ if (isExecutable(candidatePath))
6346
+ return candidatePath;
6347
+ }
6348
+ }
6349
+ return null;
6350
+ }
6287
6351
  // packages/utils/src/runtime/git-bash.ts
6288
6352
  import { execFileSync } from "node:child_process";
6289
6353
  import { existsSync } from "node:fs";
6290
6354
  var GIT_BASH_ENV_KEY = "OMO_CODEX_GIT_BASH_PATH";
6291
- var WINGET_INSTALL_ARGS = ["install", "--id", "Git.Git", "-e", "--source", "winget"];
6292
6355
  var PROGRAM_FILES_GIT_BASH = "C:\\Program Files\\Git\\bin\\bash.exe";
6293
6356
  var PROGRAM_FILES_X86_GIT_BASH = "C:\\Program Files (x86)\\Git\\bin\\bash.exe";
6294
6357
  var NON_GIT_BASH_LAUNCHER_DIR_SEGMENTS = ["\\windows\\system32\\", "\\microsoft\\windowsapps\\"];
@@ -6395,16 +6458,54 @@ var defaultRunCommand = async (command, args, options) => {
6395
6458
  };
6396
6459
 
6397
6460
  // packages/omo-codex/src/install/install-codex.ts
6398
- import { join as join29, resolve as resolve10 } from "node:path";
6399
- import { existsSync as existsSync6 } from "node:fs";
6461
+ import { join as join31, resolve as resolve10 } from "node:path";
6462
+ import { existsSync as existsSync7 } from "node:fs";
6400
6463
  import { homedir as homedir2 } from "node:os";
6401
6464
 
6402
6465
  // packages/omo-codex/src/install/codex-cache-bins.ts
6403
6466
  import { chmod, lstat as lstat3, mkdir, readFile as readFile2, readdir, readlink as readlink2, rm as rm2, stat, symlink, writeFile } from "node:fs/promises";
6404
- import { basename, isAbsolute, join as join3, relative, resolve, sep } from "node:path";
6467
+ import { basename, isAbsolute, join as join4, relative, resolve, sep } from "node:path";
6405
6468
 
6406
6469
  // packages/omo-codex/src/install/codex-cache-command-shim.ts
6407
6470
  var COMMAND_SHIM_MARKER = ":: generated by oh-my-openagent Codex installer";
6471
+ function windowsNodeDiscoveryLines() {
6472
+ return [
6473
+ "setlocal EnableExtensions EnableDelayedExpansion",
6474
+ 'set "OMO_NODE_BINARY="',
6475
+ 'set "OMO_NODE_REPL_NODE_PATH=%NODE_REPL_NODE_PATH%"',
6476
+ 'if exist "%CODEX_HOME%\\config.toml" (',
6477
+ ` for /f "tokens=1,* delims==" %%A in ('findstr /R /C:"NODE_REPL_NODE_PATH[ ]*=" "%CODEX_HOME%\\config.toml" 2^>nul') do (`,
6478
+ ' set "OMO_NODE_REPL_NODE_PATH=%%B"',
6479
+ " )",
6480
+ ")",
6481
+ "if defined OMO_NODE_REPL_NODE_PATH (",
6482
+ ' set "OMO_NODE_BINARY=!OMO_NODE_REPL_NODE_PATH!"',
6483
+ ' for /f "tokens=* delims= " %%N in ("!OMO_NODE_BINARY!") do set "OMO_NODE_BINARY=%%N"',
6484
+ ` if "!OMO_NODE_BINARY:~0,1!"=="'" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~1!"`,
6485
+ ` if "!OMO_NODE_BINARY:~-1!"=="'" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~0,-1!"`,
6486
+ ' if "!OMO_NODE_BINARY:~0,1!"=="^"" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~1!"',
6487
+ ' if "!OMO_NODE_BINARY:~-1!"=="^"" set "OMO_NODE_BINARY=!OMO_NODE_BINARY:~0,-1!"',
6488
+ ' if defined OMO_NODE_BINARY if not exist "!OMO_NODE_BINARY!" set "OMO_NODE_BINARY="',
6489
+ ")",
6490
+ 'if not defined OMO_NODE_BINARY where node >nul 2>nul && set "OMO_NODE_BINARY=node"'
6491
+ ];
6492
+ }
6493
+ function windowsCommandShim(targetPath) {
6494
+ return [
6495
+ "@echo off",
6496
+ COMMAND_SHIM_MARKER,
6497
+ 'if not defined CODEX_HOME set "CODEX_HOME=%USERPROFILE%\\.codex"',
6498
+ ...windowsNodeDiscoveryLines(),
6499
+ "if not defined OMO_NODE_BINARY (",
6500
+ " echo omo: no Node runtime was discovered from NODE_REPL_NODE_PATH or PATH; rerun LazyCodex install from Codex Desktop 1>&2",
6501
+ " exit /b 127",
6502
+ ")",
6503
+ `"%OMO_NODE_BINARY%" "${targetPath}" %*`,
6504
+ "exit /b %ERRORLEVEL%",
6505
+ ""
6506
+ ].join(`\r
6507
+ `);
6508
+ }
6408
6509
 
6409
6510
  // packages/omo-codex/src/install/codex-cache-fs.ts
6410
6511
  import { lstat } from "node:fs/promises";
@@ -6427,7 +6528,7 @@ function isNodeErrorWithCode(error) {
6427
6528
 
6428
6529
  // packages/omo-codex/src/install/codex-cache-legacy-bins.ts
6429
6530
  import { lstat as lstat2, readFile, readlink, rm } from "node:fs/promises";
6430
- import { join } from "node:path";
6531
+ import { join as join2 } from "node:path";
6431
6532
  var LEGACY_CODEX_COMPONENT_BINS = [
6432
6533
  { name: "omo", component: "ulw-loop" },
6433
6534
  { name: "codex-comment-checker", component: "comment-checker" },
@@ -6439,7 +6540,7 @@ var LEGACY_CODEX_COMPONENT_BINS = [
6439
6540
  ];
6440
6541
  async function removeLegacyCodexComponentBins(binDir, platform) {
6441
6542
  for (const entry of LEGACY_CODEX_COMPONENT_BINS) {
6442
- const linkPath = join(binDir, platform === "win32" ? `${entry.name}.cmd` : entry.name);
6543
+ const linkPath = join2(binDir, platform === "win32" ? `${entry.name}.cmd` : entry.name);
6443
6544
  await removeLegacyCodexComponentBin(linkPath, entry.component, platform);
6444
6545
  }
6445
6546
  }
@@ -6490,10 +6591,10 @@ function isNodeErrorWithCode2(error) {
6490
6591
  }
6491
6592
 
6492
6593
  // packages/omo-codex/src/install/codex-cache-runtime-wrapper.ts
6493
- import { join as join2 } from "node:path";
6594
+ import { join as join3 } from "node:path";
6494
6595
  var RUNTIME_WRAPPER_MARKER = "OMO_GENERATED_RUNTIME_WRAPPER";
6495
6596
  function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
6496
- const ulwLoopBin = toPosixPath(join2(binDir, "omo-ulw-loop"));
6597
+ const ulwLoopBin = toPosixPath(join3(binDir, "omo-ulw-loop"));
6497
6598
  const nodeCli = escapePosixDoubleQuoted(toPosixPath(nodeCliPath));
6498
6599
  const escapedCliPath = escapePosixDoubleQuoted(toPosixPath(cliPath));
6499
6600
  const escapedCodexHome = escapePosixDoubleQuoted(toPosixPath(codexHome));
@@ -6539,29 +6640,30 @@ function posixRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
6539
6640
  `);
6540
6641
  }
6541
6642
  function windowsRuntimeWrapper(cliPath, codexHome, binDir, nodeCliPath) {
6542
- const ulwLoopBin = join2(binDir, "omo-ulw-loop.cmd");
6643
+ const ulwLoopBin = join3(binDir, "omo-ulw-loop.cmd");
6543
6644
  return [
6544
6645
  "@echo off",
6545
6646
  `rem ${RUNTIME_WRAPPER_MARKER}`,
6546
6647
  `if not defined CODEX_HOME set "CODEX_HOME=${codexHome}"`,
6547
6648
  'if not defined OMO_SPARKSHELL_APP_SERVER_SOCKET set "OMO_SPARKSHELL_APP_SERVER_SOCKET=%CODEX_HOME%\\app-server-control\\app-server-control.sock"',
6649
+ ...windowsNodeDiscoveryLines(),
6548
6650
  `if "%~1"=="ulw-loop" if exist "${ulwLoopBin}" (`,
6549
6651
  " shift /1",
6550
6652
  ` "${ulwLoopBin}" %*`,
6551
6653
  " exit /b %ERRORLEVEL%",
6552
6654
  ")",
6553
- `if "%OMO_RUNTIME%"=="node" if exist "${nodeCliPath}" (`,
6554
- ` node "${nodeCliPath}" %*`,
6655
+ `if "%OMO_RUNTIME%"=="node" if defined OMO_NODE_BINARY if exist "${nodeCliPath}" (`,
6656
+ ` "%OMO_NODE_BINARY%" "${nodeCliPath}" %*`,
6555
6657
  " exit /b %ERRORLEVEL%",
6556
6658
  ")",
6557
6659
  'if not defined BUN_BINARY where bun >nul 2>nul && set "BUN_BINARY=bun"',
6558
6660
  'if not defined BUN_BINARY if exist "%USERPROFILE%\\.bun\\bin\\bun.exe" set "BUN_BINARY=%USERPROFILE%\\.bun\\bin\\bun.exe"',
6559
6661
  "if not defined BUN_BINARY (",
6560
- ` if exist "${nodeCliPath}" (`,
6561
- ` node "${nodeCliPath}" %*`,
6662
+ ` if defined OMO_NODE_BINARY if exist "${nodeCliPath}" (`,
6663
+ ` "%OMO_NODE_BINARY%" "${nodeCliPath}" %*`,
6562
6664
  " exit /b %ERRORLEVEL%",
6563
6665
  " )",
6564
- ` echo omo: bun runtime not found and the node fallback CLI is missing at ${nodeCliPath}; install bun from https://bun.sh or reinstall omo and force OMO_RUNTIME=node 1>&2`,
6666
+ ` echo omo: bun runtime not found, no Node runtime was discovered from NODE_REPL_NODE_PATH or PATH, or the node fallback CLI is missing at ${nodeCliPath}; install bun from https://bun.sh or rerun LazyCodex install from Codex Desktop 1>&2`,
6565
6667
  " exit /b 127",
6566
6668
  ")",
6567
6669
  `if not exist "${cliPath}" (`,
@@ -6594,30 +6696,44 @@ async function linkCachedPluginBins(input) {
6594
6696
  }
6595
6697
  return linked;
6596
6698
  }
6699
+ async function removeCachedManagedNpmBinShims(pluginRoot) {
6700
+ const binLinks = await discoverPackageBins(pluginRoot);
6701
+ if (binLinks.length === 0)
6702
+ return;
6703
+ const npmBinDir = join4(pluginRoot, "node_modules", ".bin");
6704
+ if (!await isFileSystemEntry(npmBinDir))
6705
+ return;
6706
+ const managedBinNames = new Set(binLinks.map((link) => link.name));
6707
+ for (const name of managedBinNames) {
6708
+ for (const suffix of ["", ".cmd", ".ps1"]) {
6709
+ await rm2(join4(npmBinDir, `${name}${suffix}`), { force: true });
6710
+ }
6711
+ }
6712
+ }
6597
6713
  async function linkRootRuntimeBin(input) {
6598
- const cliPath = join3(input.repoRoot, "dist", "cli", "index.js");
6714
+ const cliPath = join4(input.repoRoot, "dist", "cli", "index.js");
6599
6715
  if (!await isFile(cliPath))
6600
6716
  return null;
6601
- const nodeCliPath = join3(input.repoRoot, "dist", "cli-node", "index.js");
6717
+ const nodeCliPath = join4(input.repoRoot, "dist", "cli-node", "index.js");
6602
6718
  const platform = input.platform ?? process.platform;
6603
6719
  await mkdir(input.binDir, { recursive: true });
6604
6720
  if (platform === "win32") {
6605
- const linkPath2 = join3(input.binDir, "omo.cmd");
6721
+ const linkPath2 = join4(input.binDir, "omo.cmd");
6606
6722
  await replaceRuntimeWrapper(linkPath2, windowsRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
6607
6723
  return { name: "omo", path: linkPath2, target: cliPath };
6608
6724
  }
6609
- const linkPath = join3(input.binDir, "omo");
6725
+ const linkPath = join4(input.binDir, "omo");
6610
6726
  await replaceRuntimeWrapper(linkPath, posixRuntimeWrapper(cliPath, input.codexHome, input.binDir, nodeCliPath));
6611
6727
  await chmod(linkPath, 493);
6612
6728
  return { name: "omo", path: linkPath, target: cliPath };
6613
6729
  }
6614
6730
  async function linkCachedPluginBin(binDir, link, platform) {
6615
6731
  if (platform === "win32") {
6616
- const linkPath2 = join3(binDir, `${link.name}.cmd`);
6732
+ const linkPath2 = join4(binDir, `${link.name}.cmd`);
6617
6733
  await replaceCommandShim(linkPath2, link.target);
6618
6734
  return linkPath2;
6619
6735
  }
6620
- const linkPath = join3(binDir, link.name);
6736
+ const linkPath = join4(binDir, link.name);
6621
6737
  await replaceSymlink(linkPath, link.target);
6622
6738
  return linkPath;
6623
6739
  }
@@ -6630,6 +6746,16 @@ async function isFile(path) {
6630
6746
  throw error;
6631
6747
  }
6632
6748
  }
6749
+ async function isFileSystemEntry(path) {
6750
+ try {
6751
+ await stat(path);
6752
+ return true;
6753
+ } catch (error) {
6754
+ if (isNodeErrorWithCode(error) && error.code === "ENOENT")
6755
+ return false;
6756
+ throw error;
6757
+ }
6758
+ }
6633
6759
  async function discoverPackageBins(root) {
6634
6760
  const links = [];
6635
6761
  await collectPackageBins(root, root, links);
@@ -6638,14 +6764,14 @@ async function discoverPackageBins(root) {
6638
6764
  async function collectPackageBins(directory, root, links) {
6639
6765
  const entries = await readdir(directory, { withFileTypes: true });
6640
6766
  if (entries.some((entry) => entry.isFile() && entry.name === "package.json")) {
6641
- await appendPackageBinLinks(join3(directory, "package.json"), directory, root, links);
6767
+ await appendPackageBinLinks(join4(directory, "package.json"), directory, root, links);
6642
6768
  }
6643
6769
  for (const entry of entries) {
6644
6770
  if (!entry.isDirectory())
6645
6771
  continue;
6646
6772
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist")
6647
6773
  continue;
6648
- const childPath = join3(directory, entry.name);
6774
+ const childPath = join4(directory, entry.name);
6649
6775
  if (!childPath.startsWith(root))
6650
6776
  continue;
6651
6777
  await collectPackageBins(childPath, root, links);
@@ -6704,10 +6830,7 @@ async function replaceSymlink(linkPath, targetPath) {
6704
6830
  async function replaceCommandShim(linkPath, targetPath) {
6705
6831
  if (await existingNonShim(linkPath))
6706
6832
  throw new Error(`${linkPath} already exists and is not a command shim`);
6707
- await writeFile(linkPath, `@echo off\r
6708
- ${COMMAND_SHIM_MARKER}\r
6709
- node "${targetPath}" %*\r
6710
- `);
6833
+ await writeFile(linkPath, windowsCommandShim(targetPath));
6711
6834
  }
6712
6835
  async function replaceRuntimeWrapper(linkPath, content) {
6713
6836
  if (await existingNonRuntimeWrapper(linkPath))
@@ -6760,11 +6883,11 @@ async function existingNonSymlink(path) {
6760
6883
  }
6761
6884
  // packages/omo-codex/src/install/codex-cache-install.ts
6762
6885
  import { cp as cp2, mkdir as mkdir3, readFile as readFile7, rename, rm as rm3 } from "node:fs/promises";
6763
- import { basename as basename2, dirname as dirname3, join as join9, sep as sep5 } from "node:path";
6886
+ import { basename as basename3, dirname as dirname4, join as join11, sep as sep5 } from "node:path";
6764
6887
 
6765
6888
  // packages/omo-codex/src/install/codex-cache-bundled-mcps.ts
6766
6889
  import { cp, mkdir as mkdir2, readFile as readFile3, stat as stat2 } from "node:fs/promises";
6767
- import { dirname, join as join4, resolve as resolve2 } from "node:path";
6890
+ import { dirname, join as join5, resolve as resolve2 } from "node:path";
6768
6891
  var BUNDLED_MCP_RUNTIMES = [
6769
6892
  {
6770
6893
  label: "Git Bash MCP",
@@ -6782,23 +6905,23 @@ var BUNDLED_MCP_RUNTIMES = [
6782
6905
  }
6783
6906
  ];
6784
6907
  async function copyBundledMcpRuntimeDists(input) {
6785
- const sourceArgs = await readSourceMcpArgs(join4(input.sourceRoot, ".mcp.json"));
6786
- for (const runtime2 of BUNDLED_MCP_RUNTIMES) {
6787
- if (!sourceArgs.has(runtime2.sourceArg))
6908
+ const sourceArgs = await readSourceMcpArgs(join5(input.sourceRoot, ".mcp.json"));
6909
+ for (const runtime3 of BUNDLED_MCP_RUNTIMES) {
6910
+ if (!sourceArgs.has(runtime3.sourceArg))
6788
6911
  continue;
6789
- await copyBundledMcpRuntimeDist(input.pluginRoot, input.sourceRoot, runtime2);
6912
+ await copyBundledMcpRuntimeDist(input.pluginRoot, input.sourceRoot, runtime3);
6790
6913
  }
6791
6914
  }
6792
6915
  function resolveBundledMcpRuntimeArg(pluginRoot, arg) {
6793
- const runtime2 = BUNDLED_MCP_RUNTIMES.find((candidate) => candidate.sourceArg === arg);
6794
- return runtime2 ? join4(pluginRoot, runtime2.destinationArg) : null;
6916
+ const runtime3 = BUNDLED_MCP_RUNTIMES.find((candidate) => candidate.sourceArg === arg);
6917
+ return runtime3 ? join5(pluginRoot, runtime3.destinationArg) : null;
6795
6918
  }
6796
- async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime2) {
6797
- const sourcePath = resolve2(sourceRoot, runtime2.sourceDistFromPlugin);
6919
+ async function copyBundledMcpRuntimeDist(pluginRoot, sourceRoot, runtime3) {
6920
+ const sourcePath = resolve2(sourceRoot, runtime3.sourceDistFromPlugin);
6798
6921
  if (!await isDirectory(sourcePath)) {
6799
- throw new Error(`missing built ${runtime2.label} dist at ${sourcePath}`);
6922
+ throw new Error(`missing built ${runtime3.label} dist at ${sourcePath}`);
6800
6923
  }
6801
- const destinationPath = join4(pluginRoot, runtime2.destinationDistFromPlugin);
6924
+ const destinationPath = join5(pluginRoot, runtime3.destinationDistFromPlugin);
6802
6925
  await mkdir2(dirname(destinationPath), { recursive: true });
6803
6926
  await cp(sourcePath, destinationPath, { recursive: true });
6804
6927
  }
@@ -6837,10 +6960,10 @@ async function isDirectory(path) {
6837
6960
  // packages/omo-codex/src/install/codex-cache-local-dependencies.ts
6838
6961
  import { realpathSync } from "node:fs";
6839
6962
  import { readFile as readFile4, readdir as readdir2, writeFile as writeFile2 } from "node:fs/promises";
6840
- import { dirname as dirname2, isAbsolute as isAbsolute3, join as join6, relative as relative3, resolve as resolve4, sep as sep2 } from "node:path";
6963
+ import { dirname as dirname2, isAbsolute as isAbsolute3, join as join7, relative as relative3, resolve as resolve4, sep as sep2 } from "node:path";
6841
6964
 
6842
6965
  // packages/omo-codex/src/install/codex-cache-paths.ts
6843
- import { isAbsolute as isAbsolute2, join as join5, relative as relative2, resolve as resolve3 } from "node:path";
6966
+ import { isAbsolute as isAbsolute2, join as join6, relative as relative2, resolve as resolve3 } from "node:path";
6844
6967
  function resolveCachedRuntimePath(pluginRoot, sourceRoot, runtimePath) {
6845
6968
  const targetPath = resolve3(pluginRoot, runtimePath);
6846
6969
  if (isPathInside(targetPath, pluginRoot))
@@ -6863,7 +6986,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
6863
6986
  if (!isPlainRecord(parsed))
6864
6987
  continue;
6865
6988
  const packageDir = dirname2(packageJsonPath);
6866
- const sourcePackageDir = join6(sourceRoot, relative3(pluginRoot, packageDir));
6989
+ const sourcePackageDir = join7(sourceRoot, relative3(pluginRoot, packageDir));
6867
6990
  let changed = false;
6868
6991
  for (const field of ["dependencies", "optionalDependencies", "peerDependencies"]) {
6869
6992
  const dependencies = parsed[field];
@@ -6901,7 +7024,7 @@ async function rewriteCachedPackageLocalFileDependencies(pluginRoot, sourceRoot)
6901
7024
  `);
6902
7025
  }
6903
7026
  async function readPackageLock(pluginRoot) {
6904
- const path = join6(pluginRoot, "package-lock.json");
7027
+ const path = join7(pluginRoot, "package-lock.json");
6905
7028
  try {
6906
7029
  const parsed = JSON.parse(await readFile4(path, "utf8"));
6907
7030
  return { path, value: isPlainRecord(parsed) ? parsed : null, changed: false };
@@ -6962,14 +7085,14 @@ function canonicalizeExistingPath(path) {
6962
7085
  async function collectPackageJsonPaths(directory, root, paths) {
6963
7086
  const entries = await readdir2(directory, { withFileTypes: true });
6964
7087
  if (entries.some((entry) => entry.isFile() && entry.name === "package.json")) {
6965
- paths.push(join6(directory, "package.json"));
7088
+ paths.push(join7(directory, "package.json"));
6966
7089
  }
6967
7090
  for (const entry of entries) {
6968
7091
  if (!entry.isDirectory())
6969
7092
  continue;
6970
7093
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist")
6971
7094
  continue;
6972
- const childPath = join6(directory, entry.name);
7095
+ const childPath = join7(directory, entry.name);
6973
7096
  if (!isPathInside(childPath, root))
6974
7097
  continue;
6975
7098
  await collectPackageJsonPaths(childPath, root, paths);
@@ -6978,10 +7101,127 @@ async function collectPackageJsonPaths(directory, root, paths) {
6978
7101
 
6979
7102
  // packages/omo-codex/src/install/codex-cache-mcp-manifest.ts
6980
7103
  import { readFile as readFile5, writeFile as writeFile3 } from "node:fs/promises";
6981
- import { join as join7, sep as sep3 } from "node:path";
7104
+ import { join as join9, sep as sep3 } from "node:path";
7105
+
7106
+ // packages/utils/src/codegraph/resolve.ts
7107
+ import { existsSync as existsSync2 } from "node:fs";
7108
+ import { spawnSync as spawnSync2 } from "node:child_process";
7109
+ import { basename as basename2, dirname as dirname3, join as join8 } from "node:path";
7110
+ import { createRequire } from "node:module";
7111
+
7112
+ // packages/utils/src/codegraph/node-support.ts
7113
+ var CODEGRAPH_MIN_NODE_MAJOR = 20;
7114
+ var CODEGRAPH_BLOCKED_NODE_MAJOR = 25;
7115
+ var CODEGRAPH_UNSAFE_NODE_ENV = "CODEGRAPH_ALLOW_UNSAFE_NODE";
7116
+ var CODEGRAPH_NODE_BIN_ENV = "CODEGRAPH_NODE_BIN";
7117
+ function evaluateCodegraphNodeSupport(options = {}) {
7118
+ const nodeVersion = options.nodeVersion ?? process.versions.node;
7119
+ const env = options.env ?? process.env;
7120
+ const override = (env[CODEGRAPH_UNSAFE_NODE_ENV]?.trim().length ?? 0) > 0;
7121
+ const major = parseNodeMajor(nodeVersion);
7122
+ if (major >= CODEGRAPH_BLOCKED_NODE_MAJOR) {
7123
+ return { major, override, reason: "too-new", supported: override };
7124
+ }
7125
+ if (major < CODEGRAPH_MIN_NODE_MAJOR) {
7126
+ return { major, override, reason: "too-old", supported: override };
7127
+ }
7128
+ return { major, override, supported: true };
7129
+ }
7130
+ function parseNodeMajor(version) {
7131
+ const normalized = version.startsWith("v") ? version.slice(1) : version;
7132
+ const major = Number.parseInt(normalized.split(".")[0] ?? "", 10);
7133
+ return Number.isNaN(major) ? 0 : major;
7134
+ }
7135
+
7136
+ // packages/utils/src/codegraph/resolve.ts
7137
+ var CODEGRAPH_NODE_CANDIDATES = ["node24", "node22", "node20", "node"];
7138
+ var CODEGRAPH_NODE_PATH_CANDIDATES = [
7139
+ "/opt/homebrew/opt/node@24/bin/node",
7140
+ "/opt/homebrew/opt/node@22/bin/node",
7141
+ "/opt/homebrew/opt/node@20/bin/node",
7142
+ "/usr/local/opt/node@24/bin/node",
7143
+ "/usr/local/opt/node@22/bin/node",
7144
+ "/usr/local/opt/node@20/bin/node"
7145
+ ];
7146
+ var requireFromHere = createRequire(import.meta.url);
7147
+ function defaultNodeVersion(nodePath) {
7148
+ if (nodePath === process.execPath && isNodeExecutableName(nodePath))
7149
+ return process.versions.node;
7150
+ try {
7151
+ const result = spawnSync2(nodePath, ["--version"], {
7152
+ encoding: "utf8",
7153
+ timeout: 2000,
7154
+ windowsHide: true
7155
+ });
7156
+ if (result.error !== undefined || result.status !== 0)
7157
+ return null;
7158
+ const version = `${result.stdout}
7159
+ ${result.stderr}`.trim().split(/\s+/)[0];
7160
+ return version === undefined || version.length === 0 ? null : version;
7161
+ } catch (error) {
7162
+ if (error instanceof Error)
7163
+ return null;
7164
+ throw error;
7165
+ }
7166
+ }
7167
+ function isNodeExecutableName(filePath) {
7168
+ const executable = basename2(filePath).toLowerCase();
7169
+ return executable === "node" || executable === "node.exe" || /^node\d+(\.exe)?$/.test(executable);
7170
+ }
7171
+ function looksLikePath(command) {
7172
+ return command.includes("/") || command.includes("\\") || /^[a-zA-Z]:/.test(command);
7173
+ }
7174
+ function resolveConfiguredNodeRuntime(configured, fileExists, which2) {
7175
+ if (looksLikePath(configured))
7176
+ return fileExists(configured) ? configured : null;
7177
+ return which2(configured);
7178
+ }
7179
+ function supportsCodegraphNodeRuntime(nodePath, env, nodeVersion) {
7180
+ const version = nodeVersion(nodePath);
7181
+ if (version === null)
7182
+ return false;
7183
+ return evaluateCodegraphNodeSupport({ env, nodeVersion: version }).supported;
7184
+ }
7185
+ function defaultNodeRuntime(env, fileExists, which2, nodeVersion) {
7186
+ const configured = env[CODEGRAPH_NODE_BIN_ENV]?.trim();
7187
+ if (configured !== undefined && configured.length > 0) {
7188
+ const resolved = resolveConfiguredNodeRuntime(configured, fileExists, which2);
7189
+ return resolved !== null && supportsCodegraphNodeRuntime(resolved, env, nodeVersion) ? resolved : null;
7190
+ }
7191
+ const candidates = [
7192
+ ...isNodeExecutableName(process.execPath) ? [process.execPath] : [],
7193
+ ...CODEGRAPH_NODE_CANDIDATES.map((commandName) => which2(commandName)).filter((candidate) => candidate !== null),
7194
+ ...CODEGRAPH_NODE_PATH_CANDIDATES.filter((candidate) => fileExists(candidate))
7195
+ ];
7196
+ const seen = new Set;
7197
+ for (const candidate of candidates) {
7198
+ if (seen.has(candidate))
7199
+ continue;
7200
+ seen.add(candidate);
7201
+ if (supportsCodegraphNodeRuntime(candidate, env, nodeVersion))
7202
+ return candidate;
7203
+ }
7204
+ return null;
7205
+ }
7206
+ function resolveCodegraphNodeRuntime(options = {}) {
7207
+ const env = options.env ?? process.env;
7208
+ return defaultNodeRuntime(env, options.fileExists ?? existsSync2, options.which ?? bunWhich, options.nodeVersion ?? defaultNodeVersion);
7209
+ }
7210
+ function resolveCodegraphNodeSupport(options = {}) {
7211
+ const env = options.env ?? process.env;
7212
+ const nodeVersion = options.nodeVersion ?? defaultNodeVersion;
7213
+ const runtime3 = resolveCodegraphNodeRuntime({ ...options, env, nodeVersion });
7214
+ if (runtime3 === null) {
7215
+ return evaluateCodegraphNodeSupport({ env, nodeVersion: "0.0.0" });
7216
+ }
7217
+ return evaluateCodegraphNodeSupport({ env, nodeVersion: nodeVersion(runtime3) ?? "0.0.0" });
7218
+ }
7219
+
7220
+ // packages/omo-codex/src/install/codex-cache-mcp-manifest.ts
6982
7221
  var CODEGRAPH_RELATIVE_ARGS = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
6983
- async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
6984
- const manifestPath = join7(pluginRoot, ".mcp.json");
7222
+ var CONTEXT7_API_KEY_ENV = "CONTEXT7_API_KEY";
7223
+ async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot, options = {}) {
7224
+ const manifestPath = join9(pluginRoot, ".mcp.json");
6985
7225
  if (!await fileExistsStrict(manifestPath))
6986
7226
  return;
6987
7227
  const raw = await readFile5(manifestPath, "utf8");
@@ -6989,7 +7229,7 @@ async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
6989
7229
  if (!isPlainRecord(parsed) || !isPlainRecord(parsed.mcpServers))
6990
7230
  return;
6991
7231
  let changed = false;
6992
- for (const server of Object.values(parsed.mcpServers)) {
7232
+ for (const [serverName, server] of Object.entries(parsed.mcpServers)) {
6993
7233
  if (!isPlainRecord(server))
6994
7234
  continue;
6995
7235
  if (server.cwd === "." || server.cwd === "./") {
@@ -6997,31 +7237,95 @@ async function rewriteCachedMcpManifest(pluginRoot, sourceRoot = pluginRoot) {
6997
7237
  changed = true;
6998
7238
  }
6999
7239
  const currentArgs = server.args;
7000
- if (!Array.isArray(currentArgs))
7001
- continue;
7002
- const nextArgs = currentArgs.map((arg) => {
7003
- if (typeof arg !== "string")
7240
+ if (Array.isArray(currentArgs)) {
7241
+ const nextArgs = currentArgs.map((arg) => {
7242
+ if (typeof arg !== "string")
7243
+ return arg;
7244
+ const bundledMcpRuntimeArg = resolveBundledMcpRuntimeArg(pluginRoot, arg);
7245
+ if (bundledMcpRuntimeArg !== null)
7246
+ return bundledMcpRuntimeArg;
7247
+ if (CODEGRAPH_RELATIVE_ARGS.has(arg))
7248
+ return join9(pluginRoot, "components", "codegraph", "dist", "serve.js");
7249
+ if (arg.startsWith("./") || arg.startsWith("../"))
7250
+ return resolveCachedRuntimePath(pluginRoot, sourceRoot, arg);
7004
7251
  return arg;
7005
- const bundledMcpRuntimeArg = resolveBundledMcpRuntimeArg(pluginRoot, arg);
7006
- if (bundledMcpRuntimeArg !== null)
7007
- return bundledMcpRuntimeArg;
7008
- if (CODEGRAPH_RELATIVE_ARGS.has(arg))
7009
- return join7(pluginRoot, "components", "codegraph", "dist", "serve.js");
7010
- if (arg.startsWith("./") || arg.startsWith("../"))
7011
- return resolveCachedRuntimePath(pluginRoot, sourceRoot, arg);
7012
- return arg;
7013
- });
7014
- if (nextArgs.some((value, index) => value !== currentArgs[index])) {
7015
- server.args = nextArgs;
7252
+ });
7253
+ if (nextArgs.some((value, index) => value !== currentArgs[index])) {
7254
+ server.args = nextArgs;
7255
+ changed = true;
7256
+ }
7257
+ }
7258
+ if (serverName === "context7" && sanitizeContext7Auth(server)) {
7016
7259
  changed = true;
7017
7260
  }
7261
+ if (!Array.isArray(currentArgs))
7262
+ continue;
7263
+ if (server === parsed.mcpServers.codegraph) {
7264
+ const runtime3 = options.codegraphNodeRuntime?.() ?? resolveCodegraphNodeRuntime();
7265
+ if (runtime3 !== null && server.command === "node") {
7266
+ server.command = runtime3;
7267
+ changed = true;
7268
+ }
7269
+ }
7018
7270
  }
7019
7271
  if (changed)
7020
7272
  await writeFile3(manifestPath, `${JSON.stringify(parsed, null, "\t")}
7021
7273
  `);
7022
7274
  }
7275
+ function sanitizeContext7Auth(server) {
7276
+ let changed = false;
7277
+ const currentArgs = server.args;
7278
+ if (Array.isArray(currentArgs)) {
7279
+ const nextArgs = removeContext7ApiKeyArgs(currentArgs);
7280
+ if (nextArgs.some((value, index) => value !== currentArgs[index]) || nextArgs.length !== currentArgs.length) {
7281
+ server.args = nextArgs;
7282
+ changed = true;
7283
+ }
7284
+ }
7285
+ const beforeEnv = JSON.stringify(server.env);
7286
+ const nextEnv = sanitizeContext7Env(server.env);
7287
+ if (Object.keys(nextEnv).length > 0) {
7288
+ server.env = nextEnv;
7289
+ } else {
7290
+ delete server.env;
7291
+ }
7292
+ return changed || JSON.stringify(server.env) !== beforeEnv;
7293
+ }
7294
+ function removeContext7ApiKeyArgs(args) {
7295
+ const nextArgs = [];
7296
+ for (let index = 0;index < args.length; index += 1) {
7297
+ const arg = args[index];
7298
+ const value = args[index + 1];
7299
+ if (typeof arg === "string" && isContext7ApiKeyFlag(arg) && (isPlaceholderContext7ApiKey(value) || value === undefined)) {
7300
+ index += 1;
7301
+ continue;
7302
+ }
7303
+ nextArgs.push(arg);
7304
+ }
7305
+ return nextArgs;
7306
+ }
7307
+ function sanitizeContext7Env(value) {
7308
+ const nextEnv = {};
7309
+ if (isPlainRecord(value)) {
7310
+ for (const [key, envValue] of Object.entries(value)) {
7311
+ if (key === CONTEXT7_API_KEY_ENV && isPlaceholderContext7ApiKey(envValue))
7312
+ continue;
7313
+ nextEnv[key] = envValue;
7314
+ }
7315
+ }
7316
+ return nextEnv;
7317
+ }
7318
+ function isContext7ApiKeyFlag(value) {
7319
+ return value === "--api-key" || value === "--apiKey";
7320
+ }
7321
+ function isPlaceholderContext7ApiKey(value) {
7322
+ if (typeof value !== "string")
7323
+ return false;
7324
+ const normalized = value.trim().toLowerCase().replace(/[<>"'`]/g, "").replace(/[\s_-]+/g, " ");
7325
+ return normalized.length === 0 || normalized === "your api key";
7326
+ }
7023
7327
  async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
7024
- const manifestPath = join7(pluginRoot, ".mcp.json");
7328
+ const manifestPath = join9(pluginRoot, ".mcp.json");
7025
7329
  if (!await fileExistsStrict(manifestPath))
7026
7330
  return;
7027
7331
  const raw = await readFile5(manifestPath, "utf8");
@@ -7057,7 +7361,7 @@ async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
7057
7361
 
7058
7362
  // packages/omo-codex/src/install/codex-hook-targets.ts
7059
7363
  import { readFile as readFile6 } from "node:fs/promises";
7060
- import { join as join8, sep as sep4 } from "node:path";
7364
+ import { join as join10, sep as sep4 } from "node:path";
7061
7365
  var PLUGIN_ROOT_TARGET_PATTERN = /\$\{PLUGIN_ROOT\}[\\/]+([^"']+)/g;
7062
7366
  async function findMissingHookCommandTargets(pluginRoot) {
7063
7367
  const commands = [];
@@ -7074,7 +7378,7 @@ async function findMissingHookCommandTargets(pluginRoot) {
7074
7378
  const targetSuffix = match[1];
7075
7379
  if (targetSuffix === undefined)
7076
7380
  continue;
7077
- const target = join8(pluginRoot, ...targetSuffix.split(/[\\/]+/));
7381
+ const target = join10(pluginRoot, ...targetSuffix.split(/[\\/]+/));
7078
7382
  if (seen.has(target))
7079
7383
  continue;
7080
7384
  seen.add(target);
@@ -7085,17 +7389,17 @@ async function findMissingHookCommandTargets(pluginRoot) {
7085
7389
  return missing;
7086
7390
  }
7087
7391
  async function hookManifestPaths(pluginRoot) {
7088
- const pluginManifestPath = join8(pluginRoot, ".codex-plugin", "plugin.json");
7392
+ const pluginManifestPath = join10(pluginRoot, ".codex-plugin", "plugin.json");
7089
7393
  if (!await fileExistsStrict(pluginManifestPath))
7090
- return [join8(pluginRoot, "hooks", "hooks.json")];
7394
+ return [join10(pluginRoot, "hooks", "hooks.json")];
7091
7395
  const parsed = JSON.parse(await readFile6(pluginManifestPath, "utf8"));
7092
7396
  if (!isPlainRecord(parsed))
7093
7397
  return [];
7094
7398
  if (typeof parsed.hooks === "string" && parsed.hooks.trim() !== "") {
7095
- return [join8(pluginRoot, stripDotSlash(parsed.hooks))];
7399
+ return [join10(pluginRoot, stripDotSlash(parsed.hooks))];
7096
7400
  }
7097
7401
  if (Array.isArray(parsed.hooks)) {
7098
- return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) => join8(pluginRoot, stripDotSlash(hookPath)));
7402
+ return parsed.hooks.filter((hookPath) => typeof hookPath === "string" && hookPath.trim() !== "").map((hookPath) => join10(pluginRoot, stripDotSlash(hookPath)));
7099
7403
  }
7100
7404
  return [];
7101
7405
  }
@@ -7131,7 +7435,7 @@ async function installCachedPlugin(input) {
7131
7435
  await maybeRunNpmInstall(input.sourcePath, input.runCommand);
7132
7436
  await maybeRunNpmBuild(input.sourcePath, input.runCommand);
7133
7437
  }
7134
- const targetPath = join9(input.codexHome, "plugins", "cache", input.marketplaceName, input.name, input.version);
7438
+ const targetPath = join11(input.codexHome, "plugins", "cache", input.marketplaceName, input.name, input.version);
7135
7439
  const tempPath = createTempSiblingPath(targetPath);
7136
7440
  await rm3(tempPath, { recursive: true, force: true });
7137
7441
  try {
@@ -7139,6 +7443,7 @@ async function installCachedPlugin(input) {
7139
7443
  await rewriteCachedPackageLocalFileDependencies(tempPath, input.sourcePath);
7140
7444
  await copyBundledMcpRuntimeDists({ pluginRoot: tempPath, sourceRoot: input.sourcePath });
7141
7445
  await maybeRunNpmInstall(tempPath, input.runCommand, ["ci", "--omit=dev"]);
7446
+ await removeCachedManagedNpmBinShims(tempPath);
7142
7447
  if (input.buildSource === false)
7143
7448
  await maybeRunNpmSyncSkills(tempPath, input.runCommand);
7144
7449
  await rewriteCachedMcpManifest(tempPath, input.sourcePath);
@@ -7152,14 +7457,14 @@ async function installCachedPlugin(input) {
7152
7457
  return { name: input.name, version: input.version, path: targetPath };
7153
7458
  }
7154
7459
  async function maybeRunNpmInstall(cwd, runCommand, args = ["install"]) {
7155
- if (!await fileExistsStrict(join9(cwd, "package.json")))
7460
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
7156
7461
  return;
7157
7462
  await runCommand("npm", args, { cwd });
7158
7463
  }
7159
7464
  async function maybeRunNpmBuild(cwd, runCommand) {
7160
- if (!await fileExistsStrict(join9(cwd, "package.json")))
7465
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
7161
7466
  return;
7162
- const packageJson = JSON.parse(await readFile7(join9(cwd, "package.json"), "utf8"));
7467
+ const packageJson = JSON.parse(await readFile7(join11(cwd, "package.json"), "utf8"));
7163
7468
  if (!isPlainRecord(packageJson))
7164
7469
  return;
7165
7470
  const scripts = packageJson.scripts;
@@ -7168,9 +7473,9 @@ async function maybeRunNpmBuild(cwd, runCommand) {
7168
7473
  await runCommand("npm", ["run", "build"], { cwd });
7169
7474
  }
7170
7475
  async function maybeRunNpmSyncSkills(cwd, runCommand) {
7171
- if (!await fileExistsStrict(join9(cwd, "package.json")))
7476
+ if (!await fileExistsStrict(join11(cwd, "package.json")))
7172
7477
  return;
7173
- const packageJson = JSON.parse(await readFile7(join9(cwd, "package.json"), "utf8"));
7478
+ const packageJson = JSON.parse(await readFile7(join11(cwd, "package.json"), "utf8"));
7174
7479
  if (!isPlainRecord(packageJson))
7175
7480
  return;
7176
7481
  const scripts = packageJson.scripts;
@@ -7179,13 +7484,13 @@ async function maybeRunNpmSyncSkills(cwd, runCommand) {
7179
7484
  await runCommand("npm", ["run", "sync:skills"], { cwd });
7180
7485
  }
7181
7486
  function createTempSiblingPath(targetPath) {
7182
- return join9(dirname3(targetPath), `.tmp-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
7487
+ return join11(dirname4(targetPath), `.tmp-${basename3(targetPath)}-${process.pid}-${Date.now()}`);
7183
7488
  }
7184
7489
  function createBackupSiblingPath(targetPath) {
7185
- return join9(dirname3(targetPath), `.backup-${basename2(targetPath)}-${process.pid}-${Date.now()}`);
7490
+ return join11(dirname4(targetPath), `.backup-${basename3(targetPath)}-${process.pid}-${Date.now()}`);
7186
7491
  }
7187
7492
  async function copyDirectory(sourcePath, targetPath) {
7188
- await mkdir3(dirname3(targetPath), { recursive: true });
7493
+ await mkdir3(dirname4(targetPath), { recursive: true });
7189
7494
  await cp2(sourcePath, targetPath, { recursive: true, filter: (source) => shouldCopyPluginPath(source, sourcePath) });
7190
7495
  }
7191
7496
  async function promoteDirectory(tempPath, targetPath, renameDirectory) {
@@ -7221,9 +7526,9 @@ function shouldCopyPluginPath(path, root) {
7221
7526
  }
7222
7527
  // packages/omo-codex/src/install/codex-cache-prune.ts
7223
7528
  import { lstat as lstat4, readdir as readdir3, rm as rm4, stat as stat3 } from "node:fs/promises";
7224
- import { join as join10 } from "node:path";
7529
+ import { join as join12 } from "node:path";
7225
7530
  async function pruneMarketplaceCache(input) {
7226
- const cacheRoot = join10(input.codexHome, "plugins", "cache", input.marketplaceName);
7531
+ const cacheRoot = join12(input.codexHome, "plugins", "cache", input.marketplaceName);
7227
7532
  if (!await fileExistsStrict(cacheRoot))
7228
7533
  return;
7229
7534
  const keep = new Set(input.keepPluginNames);
@@ -7231,15 +7536,15 @@ async function pruneMarketplaceCache(input) {
7231
7536
  for (const entry of entries) {
7232
7537
  if (!entry.isDirectory() || keep.has(entry.name))
7233
7538
  continue;
7234
- await rm4(join10(cacheRoot, entry.name), { recursive: true, force: true });
7539
+ await rm4(join12(cacheRoot, entry.name), { recursive: true, force: true });
7235
7540
  }
7236
7541
  }
7237
7542
  async function pruneMarketplacePluginCaches(input) {
7238
- const cacheRoot = join10(input.codexHome, "plugins", "cache", input.marketplaceName);
7543
+ const cacheRoot = join12(input.codexHome, "plugins", "cache", input.marketplaceName);
7239
7544
  if (!await fileExistsStrict(cacheRoot))
7240
7545
  return;
7241
7546
  for (const pluginName of input.pluginNames) {
7242
- await rm4(join10(cacheRoot, pluginName), { recursive: true, force: true });
7547
+ await rm4(join12(cacheRoot, pluginName), { recursive: true, force: true });
7243
7548
  }
7244
7549
  const remainingEntries = await readCacheEntryNames(cacheRoot);
7245
7550
  if (remainingEntries.length === 0) {
@@ -7286,11 +7591,11 @@ async function isBrokenCacheSymlink(path) {
7286
7591
  }
7287
7592
  // packages/omo-codex/src/install/codex-cached-marketplace-manifest.ts
7288
7593
  import { mkdir as mkdir4, writeFile as writeFile4 } from "node:fs/promises";
7289
- import { join as join11 } from "node:path";
7594
+ import { join as join13 } from "node:path";
7290
7595
  async function writeCachedMarketplaceManifest(input) {
7291
- const marketplaceDir = join11(input.marketplaceRoot, ".agents", "plugins");
7596
+ const marketplaceDir = join13(input.marketplaceRoot, ".agents", "plugins");
7292
7597
  await mkdir4(marketplaceDir, { recursive: true });
7293
- await writeFile4(join11(marketplaceDir, "marketplace.json"), `${JSON.stringify({
7598
+ await writeFile4(join13(marketplaceDir, "marketplace.json"), `${JSON.stringify({
7294
7599
  name: input.marketplaceName,
7295
7600
  plugins: input.plugins.map((plugin) => ({
7296
7601
  name: plugin.name,
@@ -7301,9 +7606,9 @@ async function writeCachedMarketplaceManifest(input) {
7301
7606
  }
7302
7607
 
7303
7608
  // packages/omo-codex/src/install/codex-package-layout.ts
7304
- import { existsSync as existsSync2 } from "node:fs";
7609
+ import { existsSync as existsSync3 } from "node:fs";
7305
7610
  import { readFile as readFile8 } from "node:fs/promises";
7306
- import { join as join12 } from "node:path";
7611
+ import { join as join14 } from "node:path";
7307
7612
  var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
7308
7613
  "@code-yeongyu/lazycodex",
7309
7614
  "@code-yeongyu/lazycodex-ai",
@@ -7313,10 +7618,10 @@ var PACKAGED_CODEX_INSTALLER_NAMES = new Set([
7313
7618
  "oh-my-openagent"
7314
7619
  ]);
7315
7620
  async function shouldBuildSourcePackages(repoRoot) {
7316
- if (existsSync2(join12(repoRoot, "packages", "omo-opencode", "src", "index.ts")))
7621
+ if (existsSync3(join14(repoRoot, "packages", "omo-opencode", "src", "index.ts")))
7317
7622
  return true;
7318
- const packageJsonPath = join12(repoRoot, "package.json");
7319
- if (!existsSync2(packageJsonPath))
7623
+ const packageJsonPath = join14(repoRoot, "package.json");
7624
+ if (!existsSync3(packageJsonPath))
7320
7625
  return true;
7321
7626
  const packageJson = JSON.parse(await readFile8(packageJsonPath, "utf8"));
7322
7627
  if (!isPlainRecord(packageJson) || typeof packageJson.name !== "string")
@@ -7326,11 +7631,12 @@ async function shouldBuildSourcePackages(repoRoot) {
7326
7631
 
7327
7632
  // packages/omo-codex/src/install/codex-config-toml.ts
7328
7633
  import { mkdir as mkdir5, readFile as readFile10 } from "node:fs/promises";
7329
- import { dirname as dirname5 } from "node:path";
7634
+ import { dirname as dirname6 } from "node:path";
7330
7635
 
7331
7636
  // packages/omo-codex/src/install/toml-section-editor.ts
7332
7637
  function findTomlSection(config, header) {
7333
7638
  const headerLine = `[${header}]`;
7639
+ const targetHeaderPath = parseTomlDottedKey(header);
7334
7640
  const lines = config.match(/[^\n]*\n?|$/g) ?? [];
7335
7641
  let offset = 0;
7336
7642
  let start = -1;
@@ -7339,9 +7645,9 @@ function findTomlSection(config, header) {
7339
7645
  break;
7340
7646
  const trimmed = line.trim();
7341
7647
  if (start === -1) {
7342
- if (trimmed === headerLine)
7648
+ if (tomlTableHeaderMatches(trimmed, headerLine, targetHeaderPath))
7343
7649
  start = offset;
7344
- } else if (trimmed.startsWith("[") && trimmed.endsWith("]")) {
7650
+ } else if (isTomlTableHeaderLine(line)) {
7345
7651
  return { start, end: offset, text: config.slice(start, offset) };
7346
7652
  }
7347
7653
  offset += line.length;
@@ -7351,12 +7657,12 @@ function findTomlSection(config, header) {
7351
7657
  return { start, end: config.length, text: config.slice(start) };
7352
7658
  }
7353
7659
  function replaceOrInsertSetting(config, section, key, value) {
7354
- const linePattern = new RegExp(`^${escapeRegExp(key)}\\s*=.*$`, "m");
7660
+ const linePattern = new RegExp(`^[ \\t]*${escapeRegExp(key)}[ \\t]*=.*$`, "m");
7355
7661
  const replacement = linePattern.test(section.text) ? section.text.replace(linePattern, `${key} = ${value}`) : insertSetting(section.text, key, value);
7356
7662
  return config.slice(0, section.start) + replacement + config.slice(section.end);
7357
7663
  }
7358
7664
  function removeSetting(config, section, key) {
7359
- const linePattern = new RegExp(`^\\s*${escapeRegExp(key)}\\s*=.*(?:\\n|$)`, "m");
7665
+ const linePattern = new RegExp(`^[ \\t]*${escapeRegExp(key)}[ \\t]*=.*(?:\\n|$)`, "m");
7360
7666
  const replacement = section.text.replace(linePattern, "");
7361
7667
  return config.slice(0, section.start) + replacement + config.slice(section.end);
7362
7668
  }
@@ -7364,7 +7670,7 @@ function replaceOrInsertRootSetting(config, key, value) {
7364
7670
  const sectionStart = findFirstTableStart(config);
7365
7671
  const root = config.slice(0, sectionStart);
7366
7672
  const suffix = config.slice(sectionStart);
7367
- const linePattern = new RegExp(`^${escapeRegExp(key)}\\s*=.*$`, "m");
7673
+ const linePattern = new RegExp(`^[ \\t]*${escapeRegExp(key)}[ \\t]*=.*$`, "m");
7368
7674
  const replacement = linePattern.test(root) ? root.replace(linePattern, `${key} = ${value}`) : `${root.trimEnd()}${root.trimEnd().length > 0 ? `
7369
7675
  ` : ""}${key} = ${value}
7370
7676
  `;
@@ -7382,8 +7688,16 @@ function appendBlock(config, block) {
7382
7688
  `;
7383
7689
  }
7384
7690
  function findFirstTableStart(config) {
7385
- const match = config.match(/^[[].*$/m);
7386
- return match?.index ?? config.length;
7691
+ const lines = config.match(/[^\n]*\n?|$/g) ?? [];
7692
+ let offset = 0;
7693
+ for (const line of lines) {
7694
+ if (line.length === 0)
7695
+ break;
7696
+ if (isTomlTableHeaderLine(line))
7697
+ return offset;
7698
+ offset += line.length;
7699
+ }
7700
+ return config.length;
7387
7701
  }
7388
7702
  function insertSetting(sectionText, key, value) {
7389
7703
  const lines = sectionText.split(`
@@ -7395,10 +7709,169 @@ function insertSetting(sectionText, key, value) {
7395
7709
  function escapeRegExp(value) {
7396
7710
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7397
7711
  }
7712
+ function tomlTableHeaderMatches(line, headerLine, targetHeaderPath) {
7713
+ const normalizedLine = stripUnquotedInlineComment(line).trim();
7714
+ if (normalizedLine === headerLine)
7715
+ return true;
7716
+ if (!targetHeaderPath)
7717
+ return false;
7718
+ const candidateHeaderPath = parseTomlTableHeader(normalizedLine);
7719
+ if (!candidateHeaderPath || candidateHeaderPath.length !== targetHeaderPath.length)
7720
+ return false;
7721
+ return candidateHeaderPath.every((part, index) => part === targetHeaderPath[index]);
7722
+ }
7723
+ function parseTomlTableHeader(line) {
7724
+ const normalizedLine = stripUnquotedInlineComment(line).trim();
7725
+ if (!normalizedLine.startsWith("[") || !normalizedLine.endsWith("]") || normalizedLine.startsWith("[["))
7726
+ return null;
7727
+ return parseTomlDottedKey(normalizedLine.slice(1, -1).trim());
7728
+ }
7729
+ function isTomlTableHeaderLine(line) {
7730
+ const normalizedLine = stripUnquotedInlineComment(line).trim();
7731
+ return normalizedLine.startsWith("[") && normalizedLine.endsWith("]");
7732
+ }
7733
+ function stripUnquotedInlineComment(line) {
7734
+ let quote = null;
7735
+ let index = 0;
7736
+ while (index < line.length) {
7737
+ const char = line[index];
7738
+ if (quote === '"') {
7739
+ if (char === "\\") {
7740
+ index += 2;
7741
+ continue;
7742
+ }
7743
+ if (char === '"')
7744
+ quote = null;
7745
+ index += 1;
7746
+ continue;
7747
+ }
7748
+ if (quote === "'") {
7749
+ if (char === "'")
7750
+ quote = null;
7751
+ index += 1;
7752
+ continue;
7753
+ }
7754
+ if (char === '"' || char === "'") {
7755
+ quote = char;
7756
+ index += 1;
7757
+ continue;
7758
+ }
7759
+ if (char === "#")
7760
+ return line.slice(0, index);
7761
+ index += 1;
7762
+ }
7763
+ return line;
7764
+ }
7765
+ function parseTomlDottedKey(input) {
7766
+ const parts = [];
7767
+ let index = 0;
7768
+ while (index < input.length) {
7769
+ index = skipWhitespace(input, index);
7770
+ const parsedKey = parseTomlKeyPart(input, index);
7771
+ if (!parsedKey)
7772
+ return null;
7773
+ parts.push(parsedKey.value);
7774
+ index = skipWhitespace(input, parsedKey.nextIndex);
7775
+ if (index === input.length)
7776
+ return parts;
7777
+ if (input[index] !== ".")
7778
+ return null;
7779
+ index += 1;
7780
+ }
7781
+ return parts.length > 0 ? parts : null;
7782
+ }
7783
+ function parseTomlKeyPart(input, startIndex) {
7784
+ const quote = input[startIndex];
7785
+ if (quote === "'")
7786
+ return parseLiteralTomlString(input, startIndex);
7787
+ if (quote === '"')
7788
+ return parseBasicTomlString(input, startIndex);
7789
+ return parseBareTomlKey(input, startIndex);
7790
+ }
7791
+ function parseLiteralTomlString(input, startIndex) {
7792
+ let index = startIndex + 1;
7793
+ let value = "";
7794
+ while (index < input.length) {
7795
+ const char = input[index];
7796
+ if (char === "'")
7797
+ return { value, nextIndex: index + 1 };
7798
+ value += char;
7799
+ index += 1;
7800
+ }
7801
+ return null;
7802
+ }
7803
+ function parseBasicTomlString(input, startIndex) {
7804
+ let index = startIndex + 1;
7805
+ let value = "";
7806
+ while (index < input.length) {
7807
+ const char = input[index];
7808
+ if (char === '"')
7809
+ return { value, nextIndex: index + 1 };
7810
+ if (char !== "\\") {
7811
+ value += char;
7812
+ index += 1;
7813
+ continue;
7814
+ }
7815
+ const escaped = parseBasicTomlEscape(input, index);
7816
+ if (!escaped)
7817
+ return null;
7818
+ value += escaped.value;
7819
+ index = escaped.nextIndex;
7820
+ }
7821
+ return null;
7822
+ }
7823
+ function parseBasicTomlEscape(input, backslashIndex) {
7824
+ const escape = input[backslashIndex + 1];
7825
+ if (escape === undefined)
7826
+ return null;
7827
+ if (escape === "b")
7828
+ return { value: "\b", nextIndex: backslashIndex + 2 };
7829
+ if (escape === "t")
7830
+ return { value: "\t", nextIndex: backslashIndex + 2 };
7831
+ if (escape === "n")
7832
+ return { value: `
7833
+ `, nextIndex: backslashIndex + 2 };
7834
+ if (escape === "f")
7835
+ return { value: "\f", nextIndex: backslashIndex + 2 };
7836
+ if (escape === "r")
7837
+ return { value: "\r", nextIndex: backslashIndex + 2 };
7838
+ if (escape === '"')
7839
+ return { value: '"', nextIndex: backslashIndex + 2 };
7840
+ if (escape === "\\")
7841
+ return { value: "\\", nextIndex: backslashIndex + 2 };
7842
+ if (escape === "u")
7843
+ return parseUnicodeEscape(input, backslashIndex + 2, 4);
7844
+ if (escape === "U")
7845
+ return parseUnicodeEscape(input, backslashIndex + 2, 8);
7846
+ return null;
7847
+ }
7848
+ function parseUnicodeEscape(input, digitsStart, digitCount) {
7849
+ const digits = input.slice(digitsStart, digitsStart + digitCount);
7850
+ if (digits.length !== digitCount || !/^[0-9A-Fa-f]+$/.test(digits))
7851
+ return null;
7852
+ const codePoint = Number.parseInt(digits, 16);
7853
+ if (codePoint > 1114111)
7854
+ return null;
7855
+ return { value: String.fromCodePoint(codePoint), nextIndex: digitsStart + digitCount };
7856
+ }
7857
+ function parseBareTomlKey(input, startIndex) {
7858
+ let index = startIndex;
7859
+ while (index < input.length && /[A-Za-z0-9_-]/.test(input[index]))
7860
+ index += 1;
7861
+ if (index === startIndex)
7862
+ return null;
7863
+ return { value: input.slice(startIndex, index), nextIndex: index };
7864
+ }
7865
+ function skipWhitespace(input, startIndex) {
7866
+ let index = startIndex;
7867
+ while (index < input.length && /\s/.test(input[index]))
7868
+ index += 1;
7869
+ return index;
7870
+ }
7398
7871
 
7399
7872
  // packages/omo-codex/src/install/codex-config-toml-sections.ts
7400
7873
  function removeTomlSections(config, shouldRemove) {
7401
- return splitTomlSections(config).filter((section) => section.header === null || !shouldRemove(section.header)).map((section) => section.text).join("").replace(/\n{3,}/g, `
7874
+ return splitTomlSections(config).filter((section) => section.header === null || !shouldRemove(section.header, section)).map((section) => section.text).join("").replace(/\n{3,}/g, `
7402
7875
 
7403
7876
  `);
7404
7877
  }
@@ -7423,52 +7896,56 @@ function splitTomlSections(config) {
7423
7896
  return sections;
7424
7897
  }
7425
7898
  function parsePluginHeaderKey(header) {
7426
- const prefix = "plugins.";
7427
- if (!header.startsWith(prefix))
7428
- return null;
7429
- return parseLeadingJsonString(header.slice(prefix.length));
7899
+ const path = parseTomlDottedKey(header);
7900
+ return path?.[0] === "plugins" ? path[1] ?? null : null;
7430
7901
  }
7431
7902
  function parseAgentHeaderName(header) {
7432
- const prefix = "agents.";
7433
- if (!header.startsWith(prefix))
7434
- return null;
7435
- const key = header.slice(prefix.length);
7436
- return key.startsWith('"') ? parseLeadingJsonString(key) : key;
7903
+ const path = parseTomlDottedKey(header);
7904
+ return path?.[0] === "agents" ? path[1] ?? null : null;
7437
7905
  }
7438
- function parseJsonString(value) {
7439
- try {
7440
- const parsed = JSON.parse(value);
7441
- return typeof parsed === "string" ? parsed : null;
7442
- } catch (error) {
7443
- if (error instanceof Error)
7444
- return null;
7906
+ function parseHookStateHeaderKey(header) {
7907
+ const path = parseTomlDottedKey(header);
7908
+ if (path?.[0] !== "hooks" || path[1] !== "state")
7445
7909
  return null;
7446
- }
7910
+ return path[2] ?? null;
7447
7911
  }
7448
7912
  function parseTomlHeader(line) {
7449
- const trimmed = line.trim();
7913
+ const trimmed = stripTomlLineComment(line).trim();
7450
7914
  if (!trimmed.startsWith("[") || !trimmed.endsWith("]") || trimmed.startsWith("[["))
7451
7915
  return null;
7452
7916
  return trimmed.slice(1, -1);
7453
7917
  }
7454
- function parseLeadingJsonString(value) {
7455
- if (!value.startsWith('"'))
7456
- return parseJsonString(value);
7457
- let escaped = false;
7458
- for (let index = 1;index < value.length; index += 1) {
7459
- const char = value[index];
7460
- if (escaped) {
7461
- escaped = false;
7918
+ function stripTomlLineComment(line) {
7919
+ let quote = null;
7920
+ let index = 0;
7921
+ while (index < line.length) {
7922
+ const char = line[index];
7923
+ if (quote === '"') {
7924
+ if (char === "\\") {
7925
+ index += 2;
7926
+ continue;
7927
+ }
7928
+ if (char === '"')
7929
+ quote = null;
7930
+ index += 1;
7931
+ continue;
7932
+ }
7933
+ if (quote === "'") {
7934
+ if (char === "'")
7935
+ quote = null;
7936
+ index += 1;
7462
7937
  continue;
7463
7938
  }
7464
- if (char === "\\") {
7465
- escaped = true;
7939
+ if (char === '"' || char === "'") {
7940
+ quote = char;
7941
+ index += 1;
7466
7942
  continue;
7467
7943
  }
7468
- if (char === '"')
7469
- return parseJsonString(value.slice(0, index + 1));
7944
+ if (char === "#")
7945
+ return line.slice(0, index);
7946
+ index += 1;
7470
7947
  }
7471
- return null;
7948
+ return line;
7472
7949
  }
7473
7950
 
7474
7951
  // packages/omo-codex/src/install/codex-config-agents.ts
@@ -7513,12 +7990,12 @@ function tomlKeySegment(value) {
7513
7990
 
7514
7991
  // packages/omo-codex/src/install/codex-config-atomic-write.ts
7515
7992
  import { lstat as lstat5, readlink as readlink3, realpath, rename as rename2, unlink, writeFile as writeFile5 } from "node:fs/promises";
7516
- import { basename as basename3, dirname as dirname4, isAbsolute as isAbsolute4, join as join13, resolve as resolve5 } from "node:path";
7993
+ import { basename as basename4, dirname as dirname5, isAbsolute as isAbsolute4, join as join15, resolve as resolve5 } from "node:path";
7517
7994
  var RENAME_RETRY_DELAYS_MS = [10, 25, 50];
7518
7995
  var RETRIABLE_RENAME_CODES = new Set(["EPERM", "EBUSY"]);
7519
7996
  async function writeFileAtomic(targetPath, data) {
7520
7997
  const writeTarget = await resolveSymlinkTarget(targetPath);
7521
- const temporaryPath = join13(dirname4(writeTarget), `.tmp-${basename3(writeTarget)}-${process.pid}-${Date.now()}`);
7998
+ const temporaryPath = join15(dirname5(writeTarget), `.tmp-${basename4(writeTarget)}-${process.pid}-${Date.now()}`);
7522
7999
  await writeFile5(temporaryPath, data);
7523
8000
  try {
7524
8001
  await renameWithRetry(temporaryPath, writeTarget);
@@ -7547,7 +8024,7 @@ async function resolveSymlinkTarget(targetPath) {
7547
8024
  if (!(error instanceof Error))
7548
8025
  throw error;
7549
8026
  const linkValue = await readlink3(targetPath);
7550
- return isAbsolute4(linkValue) ? linkValue : resolve5(dirname4(targetPath), linkValue);
8027
+ return isAbsolute4(linkValue) ? linkValue : resolve5(dirname5(targetPath), linkValue);
7551
8028
  }
7552
8029
  }
7553
8030
  async function renameWithRetry(fromPath, toPath) {
@@ -7606,10 +8083,7 @@ function removeStaleMarketplacePluginBlocks(config, marketplaceName, keepPluginN
7606
8083
  }
7607
8084
  function removeStaleMarketplaceHookStateBlocks(config, marketplaceName, keepPluginNames) {
7608
8085
  return removeTomlSections(config, (header) => {
7609
- const prefix = "hooks.state.";
7610
- if (!header.startsWith(prefix))
7611
- return false;
7612
- const hookKey = parseJsonString(header.slice(prefix.length));
8086
+ const hookKey = parseHookStateHeaderKey(header);
7613
8087
  if (hookKey === null)
7614
8088
  return false;
7615
8089
  const separator = hookKey.indexOf(":");
@@ -7694,9 +8168,11 @@ enabled = true
7694
8168
  function ensureOmoBuiltinMcpPolicies(config, input) {
7695
8169
  if (input.marketplaceName !== "sisyphuslabs" || !input.pluginNames.includes("omo"))
7696
8170
  return config;
8171
+ const codegraphEnabled = input.codegraphMcpEnabled ?? true;
7697
8172
  const gitBashEnabled = (input.platform ?? process.platform) === "win32" && input.gitBashEnabled === true;
7698
- let nextConfig = ensurePluginMcpEnabled(config, "omo@sisyphuslabs", "context7", true);
7699
- nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "codegraph", true);
8173
+ let nextConfig = removeStaleContext7PlaceholderMcp(config);
8174
+ nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "context7", true);
8175
+ nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "codegraph", codegraphEnabled);
7700
8176
  nextConfig = ensurePluginMcpEnabled(nextConfig, "omo@sisyphuslabs", "git_bash", gitBashEnabled);
7701
8177
  return nextConfig;
7702
8178
  }
@@ -7719,6 +8195,107 @@ enabled = ${enabledValue}
7719
8195
  `);
7720
8196
  return replaceOrInsertSetting(config, section, "enabled", enabledValue);
7721
8197
  }
8198
+ function removeStaleContext7PlaceholderMcp(config) {
8199
+ return removeTomlSections(config, (header, section) => header === "mcp_servers.context7" && isContext7PlaceholderSection(section.text));
8200
+ }
8201
+ function isContext7PlaceholderSection(sectionText) {
8202
+ const args = readStringArraySetting(sectionText, "args");
8203
+ if (args === null || !args.includes("@upstash/context7-mcp"))
8204
+ return false;
8205
+ const apiKey = valueAfter(args, "--api-key");
8206
+ return apiKey !== null && isPlaceholderApiKey(apiKey);
8207
+ }
8208
+ function valueAfter(values, key) {
8209
+ const index = values.indexOf(key);
8210
+ return index >= 0 ? values[index + 1] ?? null : null;
8211
+ }
8212
+ function isPlaceholderApiKey(value) {
8213
+ return /^your[-_ ]?api[-_ ]?key$/i.test(value);
8214
+ }
8215
+ function readStringArraySetting(sectionText, key) {
8216
+ for (const line of sectionText.split(`
8217
+ `)) {
8218
+ if (!new RegExp(`^\\s*${key}\\s*=`).test(line))
8219
+ continue;
8220
+ const assignmentIndex = line.indexOf("=");
8221
+ if (assignmentIndex === -1)
8222
+ return null;
8223
+ return parseTomlStringArray(stripUnquotedInlineComment2(line.slice(assignmentIndex + 1)).trim());
8224
+ }
8225
+ return null;
8226
+ }
8227
+ function parseTomlStringArray(value) {
8228
+ if (!value.startsWith("[") || !value.endsWith("]"))
8229
+ return null;
8230
+ const items = [];
8231
+ let index = 1;
8232
+ while (index < value.length - 1) {
8233
+ const char = value[index];
8234
+ if (char === '"' || char === "'") {
8235
+ const parsed = parseTomlString(value, index);
8236
+ if (parsed === null)
8237
+ return null;
8238
+ items.push(parsed.value);
8239
+ index = parsed.nextIndex;
8240
+ continue;
8241
+ }
8242
+ index += 1;
8243
+ }
8244
+ return items;
8245
+ }
8246
+ function parseTomlString(input, startIndex) {
8247
+ const quote = input[startIndex];
8248
+ let value = "";
8249
+ let index = startIndex + 1;
8250
+ while (index < input.length) {
8251
+ const char = input[index];
8252
+ if (quote === '"' && char === "\\") {
8253
+ const next = input[index + 1];
8254
+ if (next === undefined)
8255
+ return null;
8256
+ value += next;
8257
+ index += 2;
8258
+ continue;
8259
+ }
8260
+ if (char === quote)
8261
+ return { value, nextIndex: index + 1 };
8262
+ value += char;
8263
+ index += 1;
8264
+ }
8265
+ return null;
8266
+ }
8267
+ function stripUnquotedInlineComment2(line) {
8268
+ let quote = null;
8269
+ let index = 0;
8270
+ while (index < line.length) {
8271
+ const char = line[index];
8272
+ if (quote === '"') {
8273
+ if (char === "\\") {
8274
+ index += 2;
8275
+ continue;
8276
+ }
8277
+ if (char === '"')
8278
+ quote = null;
8279
+ index += 1;
8280
+ continue;
8281
+ }
8282
+ if (quote === "'") {
8283
+ if (char === "'")
8284
+ quote = null;
8285
+ index += 1;
8286
+ continue;
8287
+ }
8288
+ if (char === '"' || char === "'") {
8289
+ quote = char;
8290
+ index += 1;
8291
+ continue;
8292
+ }
8293
+ if (char === "#")
8294
+ return line.slice(0, index);
8295
+ index += 1;
8296
+ }
8297
+ return line;
8298
+ }
7722
8299
 
7723
8300
  // packages/omo-codex/src/install/codex-config-reasoning.ts
7724
8301
  var MANAGED_KEYS = ["model", "model_context_window", "model_reasoning_effort", "plan_mode_reasoning_effort"];
@@ -7789,7 +8366,7 @@ function isRootSetting(line, key) {
7789
8366
 
7790
8367
  // packages/omo-codex/src/install/codex-model-catalog.ts
7791
8368
  import { readFile as readFile9 } from "node:fs/promises";
7792
- import { join as join14 } from "node:path";
8369
+ import { join as join16 } from "node:path";
7793
8370
  var FALLBACK_CODEX_MODEL_CATALOG = {
7794
8371
  current: {
7795
8372
  model: "gpt-5.5",
@@ -7808,7 +8385,7 @@ var FALLBACK_CODEX_MODEL_CATALOG = {
7808
8385
  ]
7809
8386
  };
7810
8387
  async function readCodexModelCatalog(codexPackageRoot) {
7811
- const catalogPath = join14(codexPackageRoot, "plugin", "model-catalog.json");
8388
+ const catalogPath = join16(codexPackageRoot, "plugin", "model-catalog.json");
7812
8389
  try {
7813
8390
  const parsed = JSON.parse(await readFile9(catalogPath, "utf8"));
7814
8391
  return parseCodexModelCatalog(parsed) ?? FALLBACK_CODEX_MODEL_CATALOG;
@@ -7859,36 +8436,92 @@ function parseProfileMatch(match) {
7859
8436
  return profile;
7860
8437
  }
7861
8438
 
8439
+ // packages/omo-codex/src/install/codex-multi-agent-mode-config.ts
8440
+ var CODEX_MULTI_AGENT_MODE_KEY = "multi_agent_mode";
8441
+ function removeUnsupportedCodexMultiAgentModeConfig(config) {
8442
+ const lines = config.split(/\n/);
8443
+ const output = [];
8444
+ let inRoot = true;
8445
+ let changed = false;
8446
+ for (const line of lines) {
8447
+ const sectionHeader = isSectionHeader2(line);
8448
+ if (inRoot && isRootSetting2(line, CODEX_MULTI_AGENT_MODE_KEY)) {
8449
+ changed = true;
8450
+ continue;
8451
+ }
8452
+ output.push(line);
8453
+ if (sectionHeader)
8454
+ inRoot = false;
8455
+ }
8456
+ return changed ? output.join(`
8457
+ `) : config;
8458
+ }
8459
+ function isSectionHeader2(line) {
8460
+ return isTomlTableHeaderLine(line);
8461
+ }
8462
+ function isRootSetting2(line, key) {
8463
+ const trimmed = line.trimStart();
8464
+ if (trimmed.startsWith("#") || trimmed.startsWith("["))
8465
+ return false;
8466
+ const match = trimmed.match(/^([A-Za-z_][A-Za-z0-9_]*)\s*=/);
8467
+ return match?.[1] === key;
8468
+ }
8469
+
7862
8470
  // packages/omo-codex/src/install/codex-multi-agent-v2-config.ts
8471
+ var CODEX_AGENTS_HEADER = "agents";
7863
8472
  var CODEX_MULTI_AGENT_V2_HEADER = "features.multi_agent_v2";
7864
- var CODEX_MULTI_AGENT_V2_MAX_CONCURRENT_THREADS_PER_SESSION = 1e4;
8473
+ var CODEX_SUBAGENT_THREAD_LIMIT = 1000;
7865
8474
  function ensureCodexMultiAgentV2Config(config) {
7866
- const normalizedConfig = removeLegacyAgentsMaxThreadsSetting(removeFeatureFlagSetting(config, "multi_agent_v2"));
7867
- const section = findTomlSection(normalizedConfig, CODEX_MULTI_AGENT_V2_HEADER);
7868
- const maxThreadsValue = CODEX_MULTI_AGENT_V2_MAX_CONCURRENT_THREADS_PER_SESSION.toString();
8475
+ const featureFlag = removeFeatureFlagSetting(config, "multi_agent_v2");
8476
+ const agentsConfig = ensureAgentsMaxThreads(featureFlag.config);
8477
+ const section = findTomlSection(agentsConfig, CODEX_MULTI_AGENT_V2_HEADER);
8478
+ const maxThreadsValue = CODEX_SUBAGENT_THREAD_LIMIT.toString();
7869
8479
  if (!section) {
7870
- return appendBlock(normalizedConfig, `[${CODEX_MULTI_AGENT_V2_HEADER}]
8480
+ const enabledSetting = featureFlag.value === false ? `enabled = false
8481
+ ` : "";
8482
+ return appendBlock(agentsConfig, `[${CODEX_MULTI_AGENT_V2_HEADER}]
8483
+ ${enabledSetting}max_concurrent_threads_per_session = ${maxThreadsValue}
8484
+ `);
8485
+ }
8486
+ const withPreservedDisable = featureFlag.value === false ? replaceOrInsertSetting(agentsConfig, section, "enabled", "false") : agentsConfig;
8487
+ const updatedSection = featureFlag.value === false ? findTomlSection(withPreservedDisable, CODEX_MULTI_AGENT_V2_HEADER) : section;
8488
+ if (!updatedSection) {
8489
+ return appendBlock(withPreservedDisable, `[${CODEX_MULTI_AGENT_V2_HEADER}]
8490
+ enabled = false
7871
8491
  max_concurrent_threads_per_session = ${maxThreadsValue}
7872
8492
  `);
7873
8493
  }
7874
- return replaceOrInsertSetting(normalizedConfig, section, "max_concurrent_threads_per_session", maxThreadsValue);
8494
+ return replaceOrInsertSetting(withPreservedDisable, updatedSection, "max_concurrent_threads_per_session", maxThreadsValue);
7875
8495
  }
7876
8496
  function removeFeatureFlagSetting(config, featureName) {
7877
8497
  const section = findTomlSection(config, "features");
7878
8498
  if (!section)
7879
- return config;
7880
- return removeSetting(config, section, featureName);
8499
+ return { config, value: null };
8500
+ return {
8501
+ config: removeSetting(config, section, featureName),
8502
+ value: readBooleanSetting(section.text, featureName)
8503
+ };
7881
8504
  }
7882
- function removeLegacyAgentsMaxThreadsSetting(config) {
7883
- const section = findTomlSection(config, "agents");
7884
- if (!section)
7885
- return config;
7886
- return removeSetting(config, section, "max_threads");
8505
+ function ensureAgentsMaxThreads(config) {
8506
+ const maxThreadsValue = CODEX_SUBAGENT_THREAD_LIMIT.toString();
8507
+ const section = findTomlSection(config, CODEX_AGENTS_HEADER);
8508
+ if (!section) {
8509
+ return appendBlock(config, `[${CODEX_AGENTS_HEADER}]
8510
+ max_threads = ${maxThreadsValue}
8511
+ `);
8512
+ }
8513
+ return replaceOrInsertSetting(config, section, "max_threads", maxThreadsValue);
8514
+ }
8515
+ function readBooleanSetting(sectionText, key) {
8516
+ const match = new RegExp(`^\\s*${escapeRegExp(key)}\\s*=\\s*(true|false)\\s*(?:#.*)?$`, "m").exec(sectionText);
8517
+ if (!match)
8518
+ return null;
8519
+ return match[1] === "true";
7887
8520
  }
7888
8521
 
7889
8522
  // packages/omo-codex/src/install/codex-config-toml.ts
7890
8523
  async function updateCodexConfig(input) {
7891
- await mkdir5(dirname5(input.configPath), { recursive: true });
8524
+ await mkdir5(dirname6(input.configPath), { recursive: true });
7892
8525
  let config = "";
7893
8526
  if (await exists(input.configPath))
7894
8527
  config = await readFile10(input.configPath, "utf8");
@@ -7905,6 +8538,7 @@ async function updateCodexConfig(input) {
7905
8538
  config = ensureFeatureEnabled(config, "plugin_hooks");
7906
8539
  config = ensureFeatureEnabled(config, "multi_agent");
7907
8540
  config = ensureFeatureEnabled(config, "child_agents_md");
8541
+ config = removeUnsupportedCodexMultiAgentModeConfig(config);
7908
8542
  config = ensureCodexReasoningConfig(config, await readCodexModelCatalog(input.repoRoot));
7909
8543
  config = ensureCodexMultiAgentV2Config(config);
7910
8544
  if (input.autonomousPermissions === true)
@@ -7939,7 +8573,7 @@ async function exists(path) {
7939
8573
  // packages/omo-codex/src/install/codex-hook-trust.ts
7940
8574
  import { createHash } from "node:crypto";
7941
8575
  import { readFile as readFile11 } from "node:fs/promises";
7942
- import { join as join15 } from "node:path";
8576
+ import { join as join17 } from "node:path";
7943
8577
  var EVENT_LABELS = new Map([
7944
8578
  ["PreToolUse", "pre_tool_use"],
7945
8579
  ["PermissionRequest", "permission_request"],
@@ -7953,7 +8587,7 @@ var EVENT_LABELS = new Map([
7953
8587
  ["Stop", "stop"]
7954
8588
  ]);
7955
8589
  async function trustedHookStatesForPlugin(input) {
7956
- const manifestPath = join15(input.pluginRoot, ".codex-plugin", "plugin.json");
8590
+ const manifestPath = join17(input.pluginRoot, ".codex-plugin", "plugin.json");
7957
8591
  if (!await exists2(manifestPath))
7958
8592
  return [];
7959
8593
  const manifest = JSON.parse(await readFile11(manifestPath, "utf8"));
@@ -7961,7 +8595,7 @@ async function trustedHookStatesForPlugin(input) {
7961
8595
  return [];
7962
8596
  const states = [];
7963
8597
  for (const hookPath of hookManifestPaths2(manifest.hooks)) {
7964
- const hooksPath = join15(input.pluginRoot, hookPath);
8598
+ const hooksPath = join17(input.pluginRoot, hookPath);
7965
8599
  if (!await exists2(hooksPath))
7966
8600
  continue;
7967
8601
  const parsed = JSON.parse(await readFile11(hooksPath, "utf8"));
@@ -7969,7 +8603,8 @@ async function trustedHookStatesForPlugin(input) {
7969
8603
  continue;
7970
8604
  states.push(...trustedHookStatesForHooksFile({
7971
8605
  keySource: `${input.pluginName}@${input.marketplaceName}:${hookPath}`,
7972
- hooks: parsed.hooks
8606
+ hooks: parsed.hooks,
8607
+ platform: input.platform ?? process.platform
7973
8608
  }));
7974
8609
  }
7975
8610
  return states;
@@ -7997,20 +8632,28 @@ function trustedHookStatesForHooksFile(input) {
7997
8632
  continue;
7998
8633
  if (handler.async === true)
7999
8634
  continue;
8000
- if (typeof handler.command !== "string" || handler.command.trim() === "")
8635
+ const command = commandForPlatform(handler, input.platform);
8636
+ if (command === undefined || command.trim() === "")
8001
8637
  continue;
8002
8638
  const key = `${input.keySource}:${eventLabel}:${groupIndex}:${handlerIndex}`;
8003
- states.push({ key, trustedHash: commandHookHash(eventLabel, group.matcher, handler) });
8639
+ states.push({ key, trustedHash: commandHookHash(eventLabel, group.matcher, handler, command) });
8004
8640
  }
8005
8641
  }
8006
8642
  }
8007
8643
  return states;
8008
8644
  }
8009
- function commandHookHash(eventName, matcher, handler) {
8645
+ function commandForPlatform(handler, platform) {
8646
+ if (typeof handler.command !== "string")
8647
+ return;
8648
+ if (platform === "win32" && typeof handler.commandWindows === "string")
8649
+ return handler.commandWindows;
8650
+ return handler.command;
8651
+ }
8652
+ function commandHookHash(eventName, matcher, handler, command) {
8010
8653
  const timeout = Math.max(Number(handler.timeout ?? 600), 1);
8011
8654
  const normalizedHandler = {
8012
8655
  type: "command",
8013
- command: handler.command,
8656
+ command,
8014
8657
  timeout,
8015
8658
  async: false
8016
8659
  };
@@ -8048,25 +8691,13 @@ async function exists2(path) {
8048
8691
  }
8049
8692
 
8050
8693
  // packages/omo-codex/src/install/git-bash.ts
8051
- var SKIP_GIT_BASH_AUTO_INSTALL_ENV_KEY = "OMO_CODEX_SKIP_GIT_BASH_AUTO_INSTALL";
8052
8694
  var resolveGitBashForCurrentProcess2 = (input = {}) => {
8053
8695
  return toCodexResolution(resolveGitBashForCurrentProcess(input));
8054
8696
  };
8055
8697
  async function prepareGitBashForInstall(input) {
8056
8698
  const resolve6 = input.resolveGitBash ?? (() => resolveGitBashForCurrentProcess2({ platform: input.platform, env: input.env }));
8057
8699
  const initialResolution = resolve6();
8058
- if (input.platform !== "win32" || initialResolution.found)
8059
- return initialResolution;
8060
- if (input.env[SKIP_GIT_BASH_AUTO_INSTALL_ENV_KEY] === "1")
8061
- return initialResolution;
8062
- try {
8063
- await input.runCommand("winget", WINGET_INSTALL_ARGS, { cwd: input.cwd });
8064
- } catch (error) {
8065
- if (!(error instanceof Error))
8066
- throw error;
8067
- return initialResolution;
8068
- }
8069
- return resolve6();
8700
+ return initialResolution;
8070
8701
  }
8071
8702
  function toCodexResolution(resolution) {
8072
8703
  if (resolution.found) {
@@ -8090,11 +8721,11 @@ function toCodexResolution(resolution) {
8090
8721
 
8091
8722
  // packages/omo-codex/src/install/link-cached-plugin-agents.ts
8092
8723
  import { copyFile, lstat as lstat7, mkdir as mkdir6, readFile as readFile13, readdir as readdir4, rm as rm6, writeFile as writeFile6 } from "node:fs/promises";
8093
- import { basename as basename4, join as join17 } from "node:path";
8724
+ import { basename as basename5, join as join19 } from "node:path";
8094
8725
 
8095
8726
  // packages/omo-codex/src/install/retired-managed-agent-purge.ts
8096
8727
  import { lstat as lstat6, readFile as readFile12, rm as rm5 } from "node:fs/promises";
8097
- import { join as join16 } from "node:path";
8728
+ import { join as join18 } from "node:path";
8098
8729
  var RETIRED_MANAGED_AGENT_FILES = [
8099
8730
  {
8100
8731
  fileName: "codex-ultrawork-reviewer.toml",
@@ -8106,11 +8737,11 @@ var RETIRED_MANAGED_AGENT_FILES = [
8106
8737
  }
8107
8738
  ];
8108
8739
  async function purgeRetiredManagedAgentFiles(input) {
8109
- const agentsDir = join16(input.codexHome, "agents");
8740
+ const agentsDir = join18(input.codexHome, "agents");
8110
8741
  if (!await exists3(agentsDir))
8111
8742
  return;
8112
8743
  for (const retiredAgent of RETIRED_MANAGED_AGENT_FILES) {
8113
- const agentPath = join16(agentsDir, retiredAgent.fileName);
8744
+ const agentPath = join18(agentsDir, retiredAgent.fileName);
8114
8745
  if (!await exists3(agentPath))
8115
8746
  continue;
8116
8747
  const agentStat = await lstat6(agentPath);
@@ -8153,7 +8784,7 @@ function nodeErrorCode(error) {
8153
8784
  // packages/omo-codex/src/install/link-cached-plugin-agents.ts
8154
8785
  var MANIFEST_FILE = ".installed-agents.json";
8155
8786
  async function capturePreservedAgentReasoning(input) {
8156
- const agentsDir = join17(input.codexHome, "agents");
8787
+ const agentsDir = join19(input.codexHome, "agents");
8157
8788
  if (!await exists4(agentsDir))
8158
8789
  return new Map;
8159
8790
  const preserved = new Map;
@@ -8161,7 +8792,7 @@ async function capturePreservedAgentReasoning(input) {
8161
8792
  for (const entry of agentEntries) {
8162
8793
  if (!entry.name.endsWith(".toml"))
8163
8794
  continue;
8164
- const content = await readTextIfExists2(join17(agentsDir, entry.name));
8795
+ const content = await readTextIfExists2(join19(agentsDir, entry.name));
8165
8796
  if (content === null)
8166
8797
  continue;
8167
8798
  const effort = extractReasoningEffort(content);
@@ -8171,7 +8802,7 @@ async function capturePreservedAgentReasoning(input) {
8171
8802
  return preserved;
8172
8803
  }
8173
8804
  async function capturePreservedAgentServiceTier(input) {
8174
- const agentsDir = join17(input.codexHome, "agents");
8805
+ const agentsDir = join19(input.codexHome, "agents");
8175
8806
  if (!await exists4(agentsDir))
8176
8807
  return new Map;
8177
8808
  const preserved = new Map;
@@ -8179,7 +8810,7 @@ async function capturePreservedAgentServiceTier(input) {
8179
8810
  for (const entry of agentEntries) {
8180
8811
  if (!entry.name.endsWith(".toml"))
8181
8812
  continue;
8182
- const content = await readTextIfExists2(join17(agentsDir, entry.name));
8813
+ const content = await readTextIfExists2(join19(agentsDir, entry.name));
8183
8814
  if (content === null)
8184
8815
  continue;
8185
8816
  preserved.set(agentNameFromToml(entry.name), extractServiceTier(content));
@@ -8193,13 +8824,13 @@ async function linkCachedPluginAgents(input) {
8193
8824
  await writeManifest(input.pluginRoot, []);
8194
8825
  return [];
8195
8826
  }
8196
- const agentsDir = join17(input.codexHome, "agents");
8827
+ const agentsDir = join19(input.codexHome, "agents");
8197
8828
  await mkdir6(agentsDir, { recursive: true });
8198
8829
  const linked = [];
8199
8830
  for (const agentPath of bundledAgents) {
8200
- const agentFileName = basename4(agentPath);
8831
+ const agentFileName = basename5(agentPath);
8201
8832
  const agentName = agentNameFromToml(agentFileName);
8202
- const linkPath = join17(agentsDir, agentFileName);
8833
+ const linkPath = join19(agentsDir, agentFileName);
8203
8834
  await replaceWithCopy(linkPath, agentPath);
8204
8835
  await restorePreservedReasoning({
8205
8836
  agentName,
@@ -8229,7 +8860,7 @@ async function restorePreservedServiceTier(input) {
8229
8860
  await writeFile6(input.linkPath, replacement.content);
8230
8861
  }
8231
8862
  async function discoverBundledAgents(pluginRoot) {
8232
- const componentsRoot = join17(pluginRoot, "components");
8863
+ const componentsRoot = join19(pluginRoot, "components");
8233
8864
  if (!await exists4(componentsRoot))
8234
8865
  return [];
8235
8866
  const componentEntries = await readdir4(componentsRoot, { withFileTypes: true });
@@ -8237,14 +8868,14 @@ async function discoverBundledAgents(pluginRoot) {
8237
8868
  for (const entry of componentEntries) {
8238
8869
  if (!entry.isDirectory())
8239
8870
  continue;
8240
- const agentsRoot = join17(componentsRoot, entry.name, "agents");
8871
+ const agentsRoot = join19(componentsRoot, entry.name, "agents");
8241
8872
  if (!await exists4(agentsRoot))
8242
8873
  continue;
8243
8874
  const agentEntries = await readdir4(agentsRoot, { withFileTypes: true });
8244
8875
  for (const file2 of agentEntries) {
8245
8876
  if (!file2.isFile() || !file2.name.endsWith(".toml"))
8246
8877
  continue;
8247
- agents.push(join17(agentsRoot, file2.name));
8878
+ agents.push(join19(agentsRoot, file2.name));
8248
8879
  }
8249
8880
  }
8250
8881
  agents.sort();
@@ -8264,7 +8895,7 @@ async function prepareReplacement(linkPath) {
8264
8895
  await rm6(linkPath, { force: true });
8265
8896
  }
8266
8897
  async function writeManifest(pluginRoot, agentPaths) {
8267
- const manifestPath = join17(pluginRoot, MANIFEST_FILE);
8898
+ const manifestPath = join19(pluginRoot, MANIFEST_FILE);
8268
8899
  const payload = { agents: [...agentPaths].sort() };
8269
8900
  await writeFile6(manifestPath, `${JSON.stringify(payload, null, "\t")}
8270
8901
  `);
@@ -8298,12 +8929,12 @@ function extractServiceTier(content) {
8298
8929
  }
8299
8930
  function extractTopLevelStringSetting(content, key) {
8300
8931
  for (const line of content.split(/\n/)) {
8301
- if (isSectionHeader2(line))
8932
+ if (isSectionHeader3(line))
8302
8933
  return null;
8303
8934
  const rawValue = topLevelStringSettingRawValue(line, key);
8304
8935
  if (rawValue === undefined)
8305
8936
  continue;
8306
- const parsed = parseJsonString2(rawValue);
8937
+ const parsed = parseJsonString(rawValue);
8307
8938
  if (parsed !== null)
8308
8939
  return parsed;
8309
8940
  }
@@ -8319,7 +8950,7 @@ function replaceTopLevelStringSetting(content, key, value, options) {
8319
8950
  const lines = content.split(/\n/);
8320
8951
  for (let index = 0;index < lines.length; index += 1) {
8321
8952
  const line = lines[index];
8322
- if (line === undefined || isSectionHeader2(line))
8953
+ if (line === undefined || isSectionHeader3(line))
8323
8954
  break;
8324
8955
  if (topLevelStringSettingRawValue(line, key) === undefined)
8325
8956
  continue;
@@ -8349,7 +8980,7 @@ function topLevelStringSettingRawValue(line, key) {
8349
8980
  return rawValue;
8350
8981
  }
8351
8982
  function topLevelInsertionIndex(lines) {
8352
- const sectionIndex = lines.findIndex((line) => isSectionHeader2(line));
8983
+ const sectionIndex = lines.findIndex((line) => isSectionHeader3(line));
8353
8984
  const topLevelEnd = sectionIndex === -1 ? lines.length : sectionIndex;
8354
8985
  let insertionIndex = topLevelEnd;
8355
8986
  while (insertionIndex > 0 && lines[insertionIndex - 1] === "") {
@@ -8357,14 +8988,14 @@ function topLevelInsertionIndex(lines) {
8357
8988
  }
8358
8989
  return insertionIndex;
8359
8990
  }
8360
- function isSectionHeader2(line) {
8991
+ function isSectionHeader3(line) {
8361
8992
  const trimmed = line.trim();
8362
8993
  return trimmed.startsWith("[") && trimmed.endsWith("]");
8363
8994
  }
8364
8995
  function agentNameFromToml(fileName) {
8365
8996
  return fileName.endsWith(".toml") ? fileName.slice(0, -".toml".length) : fileName;
8366
8997
  }
8367
- function parseJsonString2(value) {
8998
+ function parseJsonString(value) {
8368
8999
  try {
8369
9000
  const parsed = JSON.parse(value);
8370
9001
  return typeof parsed === "string" ? parsed : null;
@@ -8392,10 +9023,10 @@ function nodeErrorCode2(error) {
8392
9023
 
8393
9024
  // packages/omo-codex/src/install/codex-marketplace.ts
8394
9025
  import { readFile as readFile14 } from "node:fs/promises";
8395
- import { join as join18 } from "node:path";
9026
+ import { join as join20 } from "node:path";
8396
9027
  var DEFAULT_MARKETPLACE_PATH = "packages/omo-codex/marketplace.json";
8397
9028
  async function readMarketplace(repoRoot, options) {
8398
- const marketplacePath = options?.marketplacePath ?? join18(repoRoot, DEFAULT_MARKETPLACE_PATH);
9029
+ const marketplacePath = options?.marketplacePath ?? join20(repoRoot, DEFAULT_MARKETPLACE_PATH);
8399
9030
  const raw = await readFile14(marketplacePath, "utf8");
8400
9031
  const parsed = JSON.parse(raw);
8401
9032
  if (!isPlainRecord(parsed))
@@ -8414,10 +9045,10 @@ async function readMarketplace(repoRoot, options) {
8414
9045
  function resolvePluginSource(repoRoot, plugin, options) {
8415
9046
  const sourcePath = localSourcePath(options?.pathOverride ?? plugin.source);
8416
9047
  const relativePath = sourcePath.slice(2);
8417
- return join18(repoRoot, ...relativePath.split(/[\\/]/));
9048
+ return join20(repoRoot, ...relativePath.split(/[\\/]/));
8418
9049
  }
8419
9050
  async function readPluginManifest(pluginRoot) {
8420
- const raw = await readFile14(join18(pluginRoot, ".codex-plugin", "plugin.json"), "utf8");
9051
+ const raw = await readFile14(join20(pluginRoot, ".codex-plugin", "plugin.json"), "utf8");
8421
9052
  const parsed = JSON.parse(raw);
8422
9053
  if (!isPlainRecord(parsed))
8423
9054
  throw new Error(`${pluginRoot} plugin.json must be an object`);
@@ -8499,7 +9130,7 @@ function validateLocalSourcePath(path) {
8499
9130
 
8500
9131
  // packages/omo-codex/src/install/codex-marketplace-snapshot.ts
8501
9132
  import { cp as cp3, mkdir as mkdir7, rename as rename3, rm as rm7, writeFile as writeFile7 } from "node:fs/promises";
8502
- import { join as join19, sep as sep6 } from "node:path";
9133
+ import { join as join21, sep as sep6 } from "node:path";
8503
9134
  var INSTALLED_MARKETPLACES_DIR = ".tmp/marketplaces";
8504
9135
  async function writeInstalledMarketplaceSnapshot(input) {
8505
9136
  const marketplaceRoot = installedMarketplaceRoot(input.codexHome, input.marketplace.name);
@@ -8512,21 +9143,21 @@ async function writeInstalledMarketplaceSnapshot(input) {
8512
9143
  return snapshotPlugins;
8513
9144
  }
8514
9145
  function installedMarketplaceRoot(codexHome, marketplaceName) {
8515
- return join19(codexHome, INSTALLED_MARKETPLACES_DIR, marketplaceName);
9146
+ return join21(codexHome, INSTALLED_MARKETPLACES_DIR, marketplaceName);
8516
9147
  }
8517
9148
  async function writeMarketplaceManifest(marketplaceRoot, marketplace) {
8518
- const manifestDir = join19(marketplaceRoot, ".agents", "plugins");
9149
+ const manifestDir = join21(marketplaceRoot, ".agents", "plugins");
8519
9150
  await mkdir7(manifestDir, { recursive: true });
8520
- const tempPath = join19(manifestDir, `.marketplace-${process.pid}-${Date.now()}.json.tmp`);
9151
+ const tempPath = join21(manifestDir, `.marketplace-${process.pid}-${Date.now()}.json.tmp`);
8521
9152
  await writeFile7(tempPath, `${JSON.stringify(marketplace, null, "\t")}
8522
9153
  `);
8523
- await rename3(tempPath, join19(manifestDir, "marketplace.json"));
9154
+ await rename3(tempPath, join21(manifestDir, "marketplace.json"));
8524
9155
  }
8525
9156
  async function writeSnapshotPlugin(marketplaceRoot, plugin) {
8526
- const pluginsDir = join19(marketplaceRoot, "plugins");
9157
+ const pluginsDir = join21(marketplaceRoot, "plugins");
8527
9158
  await mkdir7(pluginsDir, { recursive: true });
8528
- const targetPath = join19(pluginsDir, plugin.name);
8529
- const tempPath = join19(pluginsDir, `.tmp-${plugin.name}-${process.pid}-${Date.now()}`);
9159
+ const targetPath = join21(pluginsDir, plugin.name);
9160
+ const tempPath = join21(pluginsDir, `.tmp-${plugin.name}-${process.pid}-${Date.now()}`);
8530
9161
  await rm7(tempPath, { recursive: true, force: true });
8531
9162
  await cp3(plugin.sourcePath, tempPath, {
8532
9163
  recursive: true,
@@ -8548,10 +9179,10 @@ function shouldCopyMarketplaceSourcePath(path, root) {
8548
9179
 
8549
9180
  // packages/omo-codex/src/install/lazycodex-version-stamp.ts
8550
9181
  import { readdir as readdir5, readFile as readFile15, writeFile as writeFile8 } from "node:fs/promises";
8551
- import { join as join20 } from "node:path";
9182
+ import { join as join22 } from "node:path";
8552
9183
  async function readDistributionManifest(repoRoot) {
8553
9184
  try {
8554
- const parsed = JSON.parse(await readFile15(join20(repoRoot, "package.json"), "utf8"));
9185
+ const parsed = JSON.parse(await readFile15(join22(repoRoot, "package.json"), "utf8"));
8555
9186
  if (!isPlainRecord(parsed) || typeof parsed.version !== "string" || parsed.version.trim().length === 0)
8556
9187
  return;
8557
9188
  return {
@@ -8571,19 +9202,19 @@ function resolveLazyCodexPluginVersion(input) {
8571
9202
  return input.manifestVersion ?? "local";
8572
9203
  }
8573
9204
  async function stampLazyCodexPluginVersion(input) {
8574
- const manifestPath = join20(input.pluginRoot, ".codex-plugin", "plugin.json");
9205
+ const manifestPath = join22(input.pluginRoot, ".codex-plugin", "plugin.json");
8575
9206
  const hookPaths = await readPluginHookPaths(manifestPath);
8576
9207
  await stampJsonVersion(manifestPath, input.version);
8577
- await stampJsonVersion(join20(input.pluginRoot, "package.json"), input.version);
9208
+ await stampJsonVersion(join22(input.pluginRoot, "package.json"), input.version);
8578
9209
  for (const hookPath of hookPaths) {
8579
- await stampHookStatusMessages(join20(input.pluginRoot, hookPath), input.version);
9210
+ await stampHookStatusMessages(join22(input.pluginRoot, hookPath), input.version);
8580
9211
  }
8581
9212
  await stampComponentVersions(input);
8582
9213
  }
8583
9214
  async function writeLazyCodexInstallSnapshot(input) {
8584
9215
  if (input.distributionManifest === undefined)
8585
9216
  return;
8586
- await writeFile8(join20(input.pluginRoot, "lazycodex-install.json"), `${JSON.stringify({
9217
+ await writeFile8(join22(input.pluginRoot, "lazycodex-install.json"), `${JSON.stringify({
8587
9218
  packageName: input.distributionManifest.name,
8588
9219
  version: input.distributionManifest.version
8589
9220
  }, null, "\t")}
@@ -8640,16 +9271,16 @@ async function stampHookStatusMessages(path, version) {
8640
9271
  async function stampComponentVersions(input) {
8641
9272
  let entries;
8642
9273
  try {
8643
- entries = await readdir5(join20(input.pluginRoot, "components"));
9274
+ entries = await readdir5(join22(input.pluginRoot, "components"));
8644
9275
  } catch (error) {
8645
9276
  if (error instanceof Error)
8646
9277
  return;
8647
9278
  throw error;
8648
9279
  }
8649
9280
  for (const entry of entries) {
8650
- const componentRoot = join20(input.pluginRoot, "components", entry);
8651
- await stampJsonVersion(join20(componentRoot, "package.json"), input.version);
8652
- await stampHookStatusMessages(join20(componentRoot, "hooks", "hooks.json"), input.version);
9281
+ const componentRoot = join22(input.pluginRoot, "components", entry);
9282
+ await stampJsonVersion(join22(componentRoot, "package.json"), input.version);
9283
+ await stampHookStatusMessages(join22(componentRoot, "hooks", "hooks.json"), input.version);
8653
9284
  }
8654
9285
  }
8655
9286
  function stampHookGroups(hooks, version) {
@@ -8675,7 +9306,7 @@ function stampHookStatusMessage(hook, version) {
8675
9306
 
8676
9307
  // packages/omo-codex/src/install/codex-project-local-cleanup.ts
8677
9308
  import { copyFile as copyFile2, lstat as lstat8, readFile as readFile16, writeFile as writeFile9 } from "node:fs/promises";
8678
- import { dirname as dirname6, join as join21, resolve as resolve6 } from "node:path";
9309
+ import { dirname as dirname7, join as join23, resolve as resolve6 } from "node:path";
8679
9310
  var LEGACY_AGENT_CONFLICT_KEYS = ["max_threads"];
8680
9311
  var PROJECT_LOCAL_ARTIFACT_PATHS = [
8681
9312
  ".codex/hooks.json",
@@ -8778,37 +9409,37 @@ async function findProjectLocalCodexConfigs(startDirectory, codexHome) {
8778
9409
  if (startDirectoryStat !== null && !startDirectoryStat.isDirectory()) {
8779
9410
  throw new ProjectLocalCleanupStartDirectoryError(startDirectory);
8780
9411
  }
8781
- const codexHomeConfigPath = codexHome === undefined ? null : join21(resolve6(codexHome), "config.toml");
9412
+ const codexHomeConfigPath = codexHome === undefined ? null : join23(resolve6(codexHome), "config.toml");
8782
9413
  let current = resolve6(startDirectory);
8783
9414
  const configPathsFromCwd = [];
8784
9415
  while (true) {
8785
- const configPath = join21(current, ".codex", "config.toml");
9416
+ const configPath = join23(current, ".codex", "config.toml");
8786
9417
  if (await isRegularProjectLocalConfig(current, configPath)) {
8787
9418
  if (codexHomeConfigPath === null || resolve6(configPath) !== codexHomeConfigPath) {
8788
9419
  configPathsFromCwd.push(configPath);
8789
9420
  }
8790
9421
  }
8791
- if (await exists5(join21(current, ".git"))) {
9422
+ if (await exists5(join23(current, ".git"))) {
8792
9423
  return configPathsFromCwd.length === 0 ? null : {
8793
9424
  projectRoot: current,
8794
9425
  configPaths: [...configPathsFromCwd].reverse(),
8795
9426
  artifactRoots: artifactRootsForConfigPaths(configPathsFromCwd)
8796
9427
  };
8797
9428
  }
8798
- const parent = dirname6(current);
9429
+ const parent = dirname7(current);
8799
9430
  if (parent === current) {
8800
9431
  const nearestConfigPath = configPathsFromCwd[0];
8801
9432
  return nearestConfigPath === undefined ? null : {
8802
- projectRoot: dirname6(dirname6(nearestConfigPath)),
9433
+ projectRoot: dirname7(dirname7(nearestConfigPath)),
8803
9434
  configPaths: [nearestConfigPath],
8804
- artifactRoots: [dirname6(dirname6(nearestConfigPath))]
9435
+ artifactRoots: [dirname7(dirname7(nearestConfigPath))]
8805
9436
  };
8806
9437
  }
8807
9438
  current = parent;
8808
9439
  }
8809
9440
  }
8810
9441
  async function isRegularProjectLocalConfig(directory, configPath) {
8811
- const codexDirStat = await maybeLstat(join21(directory, ".codex"));
9442
+ const codexDirStat = await maybeLstat(join23(directory, ".codex"));
8812
9443
  if (codexDirStat === null || !codexDirStat.isDirectory() || codexDirStat.isSymbolicLink())
8813
9444
  return false;
8814
9445
  const configStat = await maybeLstat(configPath);
@@ -8817,7 +9448,7 @@ async function isRegularProjectLocalConfig(directory, configPath) {
8817
9448
  function artifactRootsForConfigPaths(configPaths) {
8818
9449
  const roots = [];
8819
9450
  for (const configPath of configPaths) {
8820
- const root = dirname6(dirname6(configPath));
9451
+ const root = dirname7(dirname7(configPath));
8821
9452
  if (!roots.includes(root))
8822
9453
  roots.push(root);
8823
9454
  }
@@ -8828,7 +9459,7 @@ async function collectProjectLocalArtifacts(projectRoots) {
8828
9459
  const seenPaths = new Set;
8829
9460
  for (const projectRoot of projectRoots) {
8830
9461
  for (const relativePath of PROJECT_LOCAL_ARTIFACT_PATHS) {
8831
- const artifactPath = join21(projectRoot, relativePath);
9462
+ const artifactPath = join23(projectRoot, relativePath);
8832
9463
  if (seenPaths.has(artifactPath))
8833
9464
  continue;
8834
9465
  const entryStat = await maybeLstat(artifactPath);
@@ -8905,11 +9536,11 @@ function formatUnknownError(error) {
8905
9536
  // packages/omo-codex/src/install/lsp-daemon-reaper.ts
8906
9537
  import { readFile as readFile17, readdir as readdir6, rm as rm8 } from "node:fs/promises";
8907
9538
  import { connect } from "node:net";
8908
- import { join as join22 } from "node:path";
9539
+ import { join as join24 } from "node:path";
8909
9540
  async function reapLspDaemons(codexHome, deps = {}) {
8910
9541
  const killProcess = deps.killProcess ?? sendSigterm;
8911
9542
  const isDaemonLive = deps.isDaemonLive ?? probeSocketLive;
8912
- const daemonRoot = join22(codexHome, "codex-lsp", "daemon");
9543
+ const daemonRoot = join24(codexHome, "codex-lsp", "daemon");
8913
9544
  const reaped = [];
8914
9545
  let entries;
8915
9546
  try {
@@ -8918,9 +9549,9 @@ async function reapLspDaemons(codexHome, deps = {}) {
8918
9549
  return reaped;
8919
9550
  }
8920
9551
  for (const entry of entries) {
8921
- const versionDir = join22(daemonRoot, entry);
8922
- const pid = await readPidFile(join22(versionDir, "daemon.pid"));
8923
- const socketPath = await readEndpointFile(join22(versionDir, "daemon.endpoint"));
9552
+ const versionDir = join24(daemonRoot, entry);
9553
+ const pid = await readPidFile(join24(versionDir, "daemon.pid"));
9554
+ const socketPath = await readEndpointFile(join24(versionDir, "daemon.endpoint"));
8924
9555
  if (pid !== null && socketPath !== null && await isDaemonLive(socketPath) && killProcess(pid)) {
8925
9556
  reaped.push(pid);
8926
9557
  }
@@ -8974,7 +9605,7 @@ function sendSigterm(pid) {
8974
9605
 
8975
9606
  // packages/omo-codex/src/install/codex-installer-bin-dir.ts
8976
9607
  import { homedir } from "node:os";
8977
- import { join as join23, resolve as resolve7 } from "node:path";
9608
+ import { join as join25, resolve as resolve7 } from "node:path";
8978
9609
  function resolveCodexInstallerBinDir(input) {
8979
9610
  const explicitBinDir = input.binDir ?? input.env?.CODEX_LOCAL_BIN_DIR;
8980
9611
  if (explicitBinDir !== undefined && explicitBinDir.trim().length > 0)
@@ -8983,15 +9614,15 @@ function resolveCodexInstallerBinDir(input) {
8983
9614
  const defaultCodexHome = resolve7(homeDir, ".codex");
8984
9615
  const resolvedCodexHome = resolve7(input.codexHome);
8985
9616
  if (resolvedCodexHome !== defaultCodexHome)
8986
- return join23(resolvedCodexHome, "bin");
9617
+ return join25(resolvedCodexHome, "bin");
8987
9618
  return resolve7(homeDir, ".local", "bin");
8988
9619
  }
8989
9620
 
8990
9621
  // packages/omo-codex/src/install/omo-sot-migration.ts
8991
- import { join as join24 } from "node:path";
9622
+ import { join as join26 } from "node:path";
8992
9623
  async function seedAndMigrateOmoSot(input) {
8993
9624
  const commandEnv = { ...input.env };
8994
- const scriptPath = join24(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
9625
+ const scriptPath = join26(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
8995
9626
  try {
8996
9627
  await input.runCommand(process.execPath, [scriptPath, "--seed"], {
8997
9628
  cwd: input.repoRoot,
@@ -9005,7 +9636,7 @@ async function seedAndMigrateOmoSot(input) {
9005
9636
  }
9006
9637
 
9007
9638
  // packages/omo-codex/src/install/install-ast-grep-sg.ts
9008
- import { join as join26 } from "node:path";
9639
+ import { join as join28 } from "node:path";
9009
9640
 
9010
9641
  // packages/utils/src/deep-merge.ts
9011
9642
  var DANGEROUS_KEYS = new Set(["__proto__", "constructor", "prototype"]);
@@ -11976,12 +12607,12 @@ function runtimeSlug(platform = process.platform, arch = process.arch) {
11976
12607
  }
11977
12608
  // packages/utils/src/ast-grep/install-script.ts
11978
12609
  import { spawn as spawn3 } from "node:child_process";
11979
- import { existsSync as existsSync3 } from "node:fs";
11980
- import { join as join25 } from "node:path";
12610
+ import { existsSync as existsSync4 } from "node:fs";
12611
+ import { join as join27 } from "node:path";
11981
12612
  var AST_GREP_BIN_DIR_ENV_KEY = "OMO_AST_GREP_BIN_DIR";
11982
12613
  var AST_GREP_INSTALL_TIMEOUT_MS = 30000;
11983
12614
  function astGrepRuntimeDir(baseDir, platform = process.platform, arch = process.arch) {
11984
- return join25(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
12615
+ return join27(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
11985
12616
  }
11986
12617
  function isMissingExecutable(error) {
11987
12618
  if (!("code" in error))
@@ -12019,7 +12650,7 @@ function defaultSpawnProcess(command, args, options) {
12019
12650
  };
12020
12651
  }
12021
12652
  function scriptPathForPlatform(skillDir, platform) {
12022
- return join25(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
12653
+ return join27(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
12023
12654
  }
12024
12655
  function invocationsForPlatform(scriptPath, platform) {
12025
12656
  if (platform !== "win32")
@@ -12047,7 +12678,7 @@ function failedReason(outcome) {
12047
12678
  }
12048
12679
  async function runAstGrepSkillInstall(options) {
12049
12680
  const platform = options.platform ?? process.platform;
12050
- const fileExists = options.fileExists ?? existsSync3;
12681
+ const fileExists = options.fileExists ?? existsSync4;
12051
12682
  const scriptPath = scriptPathForPlatform(options.skillDir, platform);
12052
12683
  if (!fileExists(scriptPath))
12053
12684
  return { kind: "skipped", reason: `missing ${scriptPath}` };
@@ -12076,13 +12707,46 @@ async function runAstGrepSkillInstall(options) {
12076
12707
  return { kind: "failed", reason: String(error) };
12077
12708
  }
12078
12709
  }
12710
+ // packages/utils/src/codegraph/env.ts
12711
+ var SAFE_AMBIENT_ENV_KEYS = new Set([
12712
+ "APPDATA",
12713
+ "CI",
12714
+ "CODEX_HOME",
12715
+ "ComSpec",
12716
+ "HOME",
12717
+ "HOMEDRIVE",
12718
+ "HOMEPATH",
12719
+ "LANG",
12720
+ "LC_ALL",
12721
+ "LC_CTYPE",
12722
+ "LOCALAPPDATA",
12723
+ "PATH",
12724
+ "PATHEXT",
12725
+ "Path",
12726
+ "SystemRoot",
12727
+ "TEMP",
12728
+ "TMP",
12729
+ "TMPDIR",
12730
+ "USERPROFILE",
12731
+ "WINDIR",
12732
+ "XDG_CACHE_HOME",
12733
+ "XDG_CONFIG_HOME",
12734
+ "XDG_DATA_HOME",
12735
+ "XDG_STATE_HOME"
12736
+ ]);
12737
+ var SAFE_CODEGRAPH_RUNTIME_ENV_KEYS = new Set([
12738
+ "CODEGRAPH_ALLOW_UNSAFE_NODE",
12739
+ "CODEGRAPH_BIN",
12740
+ "CODEGRAPH_FAKE_LOG",
12741
+ "CODEGRAPH_NODE_BIN",
12742
+ "OMO_CODEGRAPH_BIN",
12743
+ "OMO_CODEGRAPH_PROJECT_CWD",
12744
+ "OMO_CODEGRAPH_SESSION_START_CWD"
12745
+ ]);
12079
12746
  // packages/utils/src/codegraph/provision.ts
12080
12747
  import { execFile } from "node:child_process";
12081
12748
  import { promisify } from "node:util";
12082
12749
  var execFileAsync = promisify(execFile);
12083
- // packages/utils/src/codegraph/resolve.ts
12084
- import { createRequire } from "node:module";
12085
- var requireFromHere = createRequire(import.meta.url);
12086
12750
  // packages/utils/src/command-executor/execute-command.ts
12087
12751
  import { exec } from "node:child_process";
12088
12752
  import { promisify as promisify2 } from "node:util";
@@ -12286,6 +12950,13 @@ function messageIsTerminalNoReplyUser(message) {
12286
12950
  const initiatorMessage = toInternalInitiatorMessageLike(message);
12287
12951
  return initiatorMessage !== undefined && isTerminalNoReplyUserMessage(initiatorMessage);
12288
12952
  }
12953
+ function messageHasInternalInitiatorMarker(message) {
12954
+ const initiatorMessage = toInternalInitiatorMessageLike(message);
12955
+ if (initiatorMessage === undefined) {
12956
+ return false;
12957
+ }
12958
+ return (initiatorMessage.parts ?? []).some((part) => part.type === "text" && typeof part.text === "string" && hasInternalInitiatorMarker(part.text));
12959
+ }
12289
12960
  var QUESTION_TOOL_NAMES = new Set(["question", "ask_user_question", "askuserquestion"]);
12290
12961
  function partToolName(part) {
12291
12962
  if (typeof part.name === "string") {
@@ -12458,6 +13129,9 @@ function latestAssistantTurnBlocksInternalPrompt(messages) {
12458
13129
  continue;
12459
13130
  }
12460
13131
  if (!sawAssistantAfterLatestUser) {
13132
+ if (messageHasInternalInitiatorMarker(message)) {
13133
+ continue;
13134
+ }
12461
13135
  return true;
12462
13136
  }
12463
13137
  continue;
@@ -12787,7 +13461,7 @@ async function installAstGrepForCodex(options) {
12787
13461
  return;
12788
13462
  const platform = options.platform ?? process.platform;
12789
13463
  const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
12790
- const skillDir = join26(plugin.path, "skills", "ast-grep");
13464
+ const skillDir = join28(plugin.path, "skills", "ast-grep");
12791
13465
  const installer = options.installer ?? runAstGrepSkillInstall;
12792
13466
  try {
12793
13467
  const result = await installer({ platform, skillDir, targetDir });
@@ -12820,7 +13494,7 @@ async function runCodexInstaller(options = {}) {
12820
13494
  const env3 = options.env ?? process.env;
12821
13495
  const platform = options.platform ?? process.platform;
12822
13496
  const repoRoot = resolve10(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env3 }));
12823
- const codexHome = resolve10(options.codexHome ?? env3.CODEX_HOME ?? join29(homedir2(), ".codex"));
13497
+ const codexHome = resolve10(options.codexHome ?? env3.CODEX_HOME ?? join31(homedir2(), ".codex"));
12824
13498
  const projectDirectory = resolve10(options.projectDirectory ?? env3.OMO_CODEX_PROJECT ?? process.cwd());
12825
13499
  const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env3 });
12826
13500
  const runCommand = options.runCommand ?? defaultRunCommand;
@@ -12831,16 +13505,14 @@ async function runCodexInstaller(options = {}) {
12831
13505
  const gitBashResolution = await prepareGitBashForInstall({
12832
13506
  platform,
12833
13507
  env: env3,
12834
- cwd: repoRoot,
12835
- runCommand,
12836
13508
  resolveGitBash: platform === "win32" ? options.gitBashResolver ?? (() => resolveGitBashForCurrentProcess2({ platform, env: env3 })) : undefined
12837
13509
  });
12838
13510
  if (!gitBashResolution.found) {
12839
13511
  throw new Error(gitBashResolution.installHint);
12840
13512
  }
12841
- const codexPackageRoot = join29(repoRoot, "packages", "omo-codex");
13513
+ const codexPackageRoot = join31(repoRoot, "packages", "omo-codex");
12842
13514
  const marketplace = await readMarketplace(repoRoot, {
12843
- marketplacePath: join29(codexPackageRoot, "marketplace.json")
13515
+ marketplacePath: join31(codexPackageRoot, "marketplace.json")
12844
13516
  });
12845
13517
  const distributionManifest = await readDistributionManifest(repoRoot);
12846
13518
  const installed = [];
@@ -12882,7 +13554,7 @@ async function runCodexInstaller(options = {}) {
12882
13554
  if (runtimeLink !== null)
12883
13555
  log2(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
12884
13556
  else
12885
- log2(`Warning: skipped the omo runtime wrapper because ${join29(repoRoot, "dist", "cli", "index.js")} is missing; omo sparkshell/ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
13557
+ log2(`Warning: skipped the omo runtime wrapper because ${join31(repoRoot, "dist", "cli", "index.js")} is missing; omo sparkshell/ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
12886
13558
  }
12887
13559
  pluginSources.push({ name: entry.name, sourcePath });
12888
13560
  installed.push(plugin);
@@ -12919,6 +13591,7 @@ async function runCodexInstaller(options = {}) {
12919
13591
  }
12920
13592
  const trustedHookStates = (await Promise.all(installed.map((plugin) => trustedHookStatesForPlugin({
12921
13593
  marketplaceName: marketplace.name,
13594
+ platform,
12922
13595
  pluginName: plugin.name,
12923
13596
  pluginRoot: plugin.path
12924
13597
  })))).flat();
@@ -12935,13 +13608,13 @@ async function runCodexInstaller(options = {}) {
12935
13608
  });
12936
13609
  }
12937
13610
  await reapLspDaemons(codexHome).catch(() => []);
12938
- const marketplaceRoot = join29(codexHome, "plugins", "cache", marketplace.name);
13611
+ const marketplaceRoot = join31(codexHome, "plugins", "cache", marketplace.name);
12939
13612
  await writeCachedMarketplaceManifest({
12940
13613
  marketplaceName: marketplace.name,
12941
13614
  marketplaceRoot,
12942
13615
  plugins: installed
12943
13616
  });
12944
- const configPath = join29(codexHome, "config.toml");
13617
+ const configPath = join31(codexHome, "config.toml");
12945
13618
  await updateCodexConfig({
12946
13619
  configPath,
12947
13620
  repoRoot: codexPackageRoot,
@@ -12949,6 +13622,7 @@ async function runCodexInstaller(options = {}) {
12949
13622
  marketplaceSource: codexMarketplaceSource(marketplaceRoot),
12950
13623
  pluginNames: marketplace.plugins.map((plugin) => plugin.name),
12951
13624
  platform,
13625
+ codegraphMcpEnabled: options.codegraphMcpEnabled ?? resolveCodegraphNodeSupport({ env: env3 }).supported,
12952
13626
  gitBashEnabled: platform === "win32" && gitBashResolution.found,
12953
13627
  trustedHookStates,
12954
13628
  agentConfigs: [...agentConfigs.values()].sort((left, right) => left.name.localeCompare(right.name)),
@@ -13000,7 +13674,7 @@ function findRepoRootFromImporter(importerDir) {
13000
13674
  for (let depth = 0;depth <= 7; depth += 1) {
13001
13675
  if (isRepoRootWithCodexPlugin(current))
13002
13676
  return current;
13003
- for (const wrapperPackageRoot of [join29(current, "node_modules", "oh-my-openagent"), join29(current, "oh-my-openagent")]) {
13677
+ for (const wrapperPackageRoot of [join31(current, "node_modules", "oh-my-openagent"), join31(current, "oh-my-openagent")]) {
13004
13678
  if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
13005
13679
  return wrapperPackageRoot;
13006
13680
  }
@@ -13018,7 +13692,7 @@ function findRepoRoot(input) {
13018
13692
  return findRepoRootFromImporter(input.importerDir);
13019
13693
  }
13020
13694
  function isRepoRootWithCodexPlugin(repoRoot) {
13021
- return existsSync6(join29(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
13695
+ return existsSync7(join31(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
13022
13696
  }
13023
13697
  function codexMarketplaceSource(marketplaceRoot) {
13024
13698
  return { sourceType: "local", source: marketplaceRoot };
@@ -13188,22 +13862,28 @@ function formatLazyCodexInstallHelp() {
13188
13862
  "`uninstall` removes managed Codex Light state; `cleanup` is a backward-compatible alias.",
13189
13863
  "`update` refreshes the installed Codex Light edition in place.",
13190
13864
  "",
13191
- `Pass-through commands delegated to the omo CLI: ${passthrough}.`
13865
+ `Commands supported by lazycodex-ai: ${passthrough}.`,
13866
+ "`doctor` runs the Codex LazyCodex doctor workflow; other pass-through commands delegate to the omo CLI."
13192
13867
  ].join(`
13193
13868
  `);
13194
13869
  }
13195
13870
 
13196
13871
  // packages/omo-codex/src/install/lazycodex-delegated-command.ts
13197
13872
  async function runDelegatedOmoCommand(parsed, options) {
13873
+ if (parsed.command === "doctor" && process.env.LAZYCODEX_DOCTOR_LCX_ACTIVE === "1") {
13874
+ throw new Error("Refusing recursive lazycodex doctor invocation from inside $omo:lcx-doctor");
13875
+ }
13198
13876
  const invocation = buildDelegatedOmoInvocation(parsed);
13199
13877
  if (parsed.dryRun) {
13200
- options.log(`${invocation.command} ${invocation.args.join(" ")}`);
13878
+ options.log(formatShellCommand(invocation.command, invocation.args));
13201
13879
  return;
13202
13880
  }
13203
- const env3 = { ...process.env, OMO_INVOCATION_NAME: "omo" };
13881
+ const env3 = invocation.delegatesToOmo ? { ...process.env, OMO_INVOCATION_NAME: "omo", ...invocation.env } : { ...process.env, ...invocation.env };
13204
13882
  await options.runCommand(invocation.command, invocation.args, { cwd: options.cwd, env: env3 });
13205
13883
  }
13206
13884
  function buildDelegatedOmoInvocation(parsed) {
13885
+ if (parsed.command === "doctor")
13886
+ return buildLazyCodexDoctorInvocation(parsed.args);
13207
13887
  const args = ["--yes", "--package", "oh-my-openagent", "omo", parsed.command];
13208
13888
  if (parsed.command === "install") {
13209
13889
  args.push("--platform=codex");
@@ -13222,18 +13902,61 @@ function buildDelegatedOmoInvocation(parsed) {
13222
13902
  } else {
13223
13903
  args.push(...parsed.args);
13224
13904
  }
13225
- return { command: "npx", args };
13905
+ return { command: "npx", args, delegatesToOmo: true };
13906
+ }
13907
+ function buildLazyCodexDoctorInvocation(doctorArgs) {
13908
+ return {
13909
+ command: "codex",
13910
+ args: [
13911
+ "exec",
13912
+ "--ephemeral",
13913
+ "--sandbox",
13914
+ "read-only",
13915
+ "--skip-git-repo-check",
13916
+ "--cd",
13917
+ ".",
13918
+ buildLazyCodexDoctorPrompt(doctorArgs)
13919
+ ],
13920
+ delegatesToOmo: false,
13921
+ env: {
13922
+ LAZYCODEX_DOCTOR_LCX_ACTIVE: "1"
13923
+ }
13924
+ };
13925
+ }
13926
+ function buildLazyCodexDoctorPrompt(doctorArgs) {
13927
+ return [
13928
+ "Use $omo:lcx-doctor to diagnose this LazyCodex/Codex installation.",
13929
+ "This command is already the lazycodex doctor surface; never invoke lazycodex doctor from inside the doctor workflow.",
13930
+ "Sync the latest LazyCodex and OpenAI Codex sources into /tmp, inventory the local installation,",
13931
+ "probe the Codex plugin/cache/hooks/MCP state, and report PASS/WARN/FAIL findings with evidence and remediations.",
13932
+ buildDoctorOutputInstruction(doctorArgs),
13933
+ doctorArgs.length > 0 ? `Requested doctor arguments: ${doctorArgs.join(" ")}` : "Requested doctor arguments: none"
13934
+ ].join(" ");
13935
+ }
13936
+ function buildDoctorOutputInstruction(doctorArgs) {
13937
+ if (doctorArgs.includes("--json")) {
13938
+ return "Return exactly one JSON object with summary, environment, checks, remediations, and knownIssues fields; do not wrap it in Markdown.";
13939
+ }
13940
+ return "Return the standard Markdown LazyCodex Doctor Report.";
13941
+ }
13942
+ function formatShellCommand(command, args) {
13943
+ return [command, ...args].map(shellQuote).join(" ");
13944
+ }
13945
+ function shellQuote(value) {
13946
+ if (/^[A-Za-z0-9_/:=.,@%+-]+$/.test(value))
13947
+ return value;
13948
+ return `'${value.replaceAll("'", "'\\''")}'`;
13226
13949
  }
13227
13950
 
13228
13951
  // packages/omo-codex/src/install/lazycodex-manual-update.ts
13229
- import { spawn as spawn4, spawnSync as spawnSync2 } from "node:child_process";
13952
+ import { spawn as spawn4, spawnSync as spawnSync3 } from "node:child_process";
13230
13953
  import { readFileSync as readFileSync3 } from "node:fs";
13231
- import { dirname as dirname8, join as join31 } from "node:path";
13954
+ import { dirname as dirname9, join as join33 } from "node:path";
13232
13955
  import { createInterface as createInterface2 } from "node:readline/promises";
13233
13956
  import { fileURLToPath } from "node:url";
13234
13957
 
13235
13958
  // packages/omo-codex/src/install/lazycodex-bun-global-paths.ts
13236
- import { join as join30 } from "node:path";
13959
+ import { join as join32 } from "node:path";
13237
13960
  function isBunGlobalEntrypointPath(invokedPath, env3) {
13238
13961
  if (typeof invokedPath !== "string" || invokedPath.trim().length === 0)
13239
13962
  return false;
@@ -13244,8 +13967,8 @@ function resolveBunGlobalRoots(env3) {
13244
13967
  const bunInstallRoot = env3.BUN_INSTALL?.trim();
13245
13968
  const homeRoot = env3.HOME?.trim();
13246
13969
  return [
13247
- ...bunInstallRoot ? [join30(bunInstallRoot, "bin"), join30(bunInstallRoot, "install", "global", "node_modules")] : [],
13248
- ...homeRoot ? [join30(homeRoot, ".bun", "bin"), join30(homeRoot, ".bun", "install", "global", "node_modules")] : []
13970
+ ...bunInstallRoot ? [join32(bunInstallRoot, "bin"), join32(bunInstallRoot, "install", "global", "node_modules")] : [],
13971
+ ...homeRoot ? [join32(homeRoot, ".bun", "bin"), join32(homeRoot, ".bun", "install", "global", "node_modules")] : []
13249
13972
  ].map(normalizePathForPrefix);
13250
13973
  }
13251
13974
  function normalizePathForPrefix(path2) {
@@ -13337,13 +14060,13 @@ function resolveArgs(env3) {
13337
14060
  function resolveCurrentVersion(env3) {
13338
14061
  if (env3.LAZYCODEX_CURRENT_VERSION?.trim())
13339
14062
  return env3.LAZYCODEX_CURRENT_VERSION.trim();
13340
- const pluginRoot = dirname8(dirname8(fileURLToPath(import.meta.url)));
13341
- return readVersionManifest(resolveInstalledVersionPath(env3, pluginRoot)) ?? readVersionManifest(join31(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join31(pluginRoot, ".codex-plugin", "plugin.json"));
14063
+ const pluginRoot = dirname9(dirname9(fileURLToPath(import.meta.url)));
14064
+ return readVersionManifest(resolveInstalledVersionPath(env3, pluginRoot)) ?? readVersionManifest(join33(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join33(pluginRoot, ".codex-plugin", "plugin.json"));
13342
14065
  }
13343
14066
  function resolveLatestVersion(env3) {
13344
14067
  if (env3.LAZYCODEX_LATEST_VERSION?.trim())
13345
14068
  return env3.LAZYCODEX_LATEST_VERSION.trim();
13346
- const result = spawnSync2("npm", ["view", "lazycodex-ai", "version", "--silent"], {
14069
+ const result = spawnSync3("npm", ["view", "lazycodex-ai", "version", "--silent"], {
13347
14070
  encoding: "utf8",
13348
14071
  stdio: ["ignore", "pipe", "ignore"]
13349
14072
  });
@@ -13371,7 +14094,7 @@ ${trustCommand}`);
13371
14094
  ${trustCommand}`);
13372
14095
  }
13373
14096
  function resolveKnownBunGlobalUntrustedPackages(env3) {
13374
- const result = spawnSync2(BUN_UPDATE_COMMAND, BUN_GLOBAL_UNTRUSTED_ARGS, {
14097
+ const result = spawnSync3(BUN_UPDATE_COMMAND, BUN_GLOBAL_UNTRUSTED_ARGS, {
13375
14098
  encoding: "utf8",
13376
14099
  env: env3,
13377
14100
  stdio: ["ignore", "pipe", "ignore"]
@@ -13454,7 +14177,7 @@ function compareVersions(left, right) {
13454
14177
  function resolveInstalledVersionPath(env3, pluginRoot) {
13455
14178
  if (env3.LAZYCODEX_INSTALLED_VERSION_FILE?.trim())
13456
14179
  return env3.LAZYCODEX_INSTALLED_VERSION_FILE.trim();
13457
- return join31(pluginRoot, INSTALLED_VERSION_FILE);
14180
+ return join33(pluginRoot, INSTALLED_VERSION_FILE);
13458
14181
  }
13459
14182
  function readVersionManifest(path2) {
13460
14183
  try {
@@ -13471,11 +14194,11 @@ function readVersionManifest(path2) {
13471
14194
  }
13472
14195
  // packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
13473
14196
  import { readFile as readFile18, writeFile as writeFile10 } from "node:fs/promises";
13474
- import { join as join32 } from "node:path";
14197
+ import { join as join34 } from "node:path";
13475
14198
  var GIT_BASH_ENV_KEY2 = "OMO_CODEX_GIT_BASH_PATH";
13476
14199
  var CODEGRAPH_RELATIVE_ARGS2 = new Set(["components/codegraph/dist/serve.js", "./components/codegraph/dist/serve.js"]);
13477
14200
  async function stampGitBashMcpEnv(input) {
13478
- const manifestPath = join32(input.pluginRoot, ".mcp.json");
14201
+ const manifestPath = join34(input.pluginRoot, ".mcp.json");
13479
14202
  if (!await fileExistsStrict(manifestPath))
13480
14203
  return false;
13481
14204
  const parsed = JSON.parse(await readFile18(manifestPath, "utf8"));
@@ -13508,7 +14231,7 @@ function stampCodegraphMcpPath(mcpServers, pluginRoot) {
13508
14231
  const entrypoint = args[0];
13509
14232
  if (typeof entrypoint !== "string" || !CODEGRAPH_RELATIVE_ARGS2.has(entrypoint))
13510
14233
  return false;
13511
- codegraphServer["args"] = [join32(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
14234
+ codegraphServer["args"] = [join34(pluginRoot, "components", "codegraph", "dist", "serve.js"), ...args.slice(1)];
13512
14235
  return true;
13513
14236
  }
13514
14237
 
@@ -13517,7 +14240,7 @@ async function installMarketplaceLocally(options = {}) {
13517
14240
  return runCodexInstaller(options);
13518
14241
  }
13519
14242
  function resolveDefaultRepoRootForEntrypoint(entrypointPath) {
13520
- return resolve11(dirname9(entrypointPath), "..", "..", "..");
14243
+ return resolve11(dirname10(entrypointPath), "..", "..", "..");
13521
14244
  }
13522
14245
  function resolveDefaultRepoRoot() {
13523
14246
  return resolveDefaultRepoRootForEntrypoint(fileURLToPath2(import.meta.url));
@@ -13529,7 +14252,7 @@ async function runLazyCodexInstallLocalCli(input) {
13529
14252
  return 0;
13530
14253
  }
13531
14254
  if (parsed.kind === "version") {
13532
- const packageJson = JSON.parse(await readFile19(join33(input.defaultRepoRoot, "package.json"), "utf8"));
14255
+ const packageJson = JSON.parse(await readFile19(join35(input.defaultRepoRoot, "package.json"), "utf8"));
13533
14256
  const version2 = typeof packageJson.version === "string" ? packageJson.version : "unknown";
13534
14257
  input.log(`lazycodex-ai ${version2}`);
13535
14258
  return 0;