oh-my-codex 0.14.4 → 0.15.1

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 (614) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/Cargo.lock +6 -6
  3. package/Cargo.toml +2 -1
  4. package/README.md +40 -7
  5. package/crates/omx-explore/Cargo.toml +1 -0
  6. package/crates/omx-explore/src/main.rs +246 -24
  7. package/crates/omx-mux/Cargo.toml +1 -0
  8. package/crates/omx-runtime/Cargo.toml +1 -0
  9. package/crates/omx-runtime-core/Cargo.toml +1 -0
  10. package/crates/omx-runtime-core/src/dispatch.rs +2 -1
  11. package/crates/omx-runtime-core/src/engine.rs +2 -2
  12. package/crates/omx-runtime-core/src/mailbox.rs +2 -1
  13. package/crates/omx-sparkshell/Cargo.toml +1 -0
  14. package/crates/omx-sparkshell/src/codex_bridge.rs +1 -0
  15. package/crates/omx-sparkshell/src/prompt.rs +1 -0
  16. package/crates/omx-sparkshell/src/threshold.rs +1 -0
  17. package/dist/agents/__tests__/native-config.test.js +98 -4
  18. package/dist/agents/__tests__/native-config.test.js.map +1 -1
  19. package/dist/agents/native-config.d.ts +4 -0
  20. package/dist/agents/native-config.d.ts.map +1 -1
  21. package/dist/agents/native-config.js +19 -3
  22. package/dist/agents/native-config.js.map +1 -1
  23. package/dist/agents/policy.d.ts +10 -0
  24. package/dist/agents/policy.d.ts.map +1 -0
  25. package/dist/agents/policy.js +61 -0
  26. package/dist/agents/policy.js.map +1 -0
  27. package/dist/catalog/__tests__/generator.test.js +2 -0
  28. package/dist/catalog/__tests__/generator.test.js.map +1 -1
  29. package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts +2 -0
  30. package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts.map +1 -0
  31. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +72 -0
  32. package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -0
  33. package/dist/catalog/installable.d.ts +5 -0
  34. package/dist/catalog/installable.d.ts.map +1 -0
  35. package/dist/catalog/installable.js +13 -0
  36. package/dist/catalog/installable.js.map +1 -0
  37. package/dist/catalog/skill-mirror.d.ts +20 -0
  38. package/dist/catalog/skill-mirror.d.ts.map +1 -0
  39. package/dist/catalog/skill-mirror.js +104 -0
  40. package/dist/catalog/skill-mirror.js.map +1 -0
  41. package/dist/cli/__tests__/ask.test.js +4 -1
  42. package/dist/cli/__tests__/ask.test.js.map +1 -1
  43. package/dist/cli/__tests__/codex-plugin-layout.test.d.ts +2 -0
  44. package/dist/cli/__tests__/codex-plugin-layout.test.d.ts.map +1 -0
  45. package/dist/cli/__tests__/codex-plugin-layout.test.js +210 -0
  46. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -0
  47. package/dist/cli/__tests__/doctor-team.test.js +46 -1
  48. package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
  49. package/dist/cli/__tests__/doctor-warning-copy.test.js +225 -111
  50. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  51. package/dist/cli/__tests__/exec.test.js +96 -1
  52. package/dist/cli/__tests__/exec.test.js.map +1 -1
  53. package/dist/cli/__tests__/explore.test.js +26 -9
  54. package/dist/cli/__tests__/explore.test.js.map +1 -1
  55. package/dist/cli/__tests__/index.test.js +301 -7
  56. package/dist/cli/__tests__/index.test.js.map +1 -1
  57. package/dist/cli/__tests__/launch-fallback.test.js +358 -4
  58. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  59. package/dist/cli/__tests__/list.test.d.ts +2 -0
  60. package/dist/cli/__tests__/list.test.d.ts.map +1 -0
  61. package/dist/cli/__tests__/list.test.js +38 -0
  62. package/dist/cli/__tests__/list.test.js.map +1 -0
  63. package/dist/cli/__tests__/mcp-parity.test.js +86 -0
  64. package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
  65. package/dist/cli/__tests__/mcp-serve.test.d.ts +2 -0
  66. package/dist/cli/__tests__/mcp-serve.test.d.ts.map +1 -0
  67. package/dist/cli/__tests__/mcp-serve.test.js +38 -0
  68. package/dist/cli/__tests__/mcp-serve.test.js.map +1 -0
  69. package/dist/cli/__tests__/nested-help-routing.test.js +1 -0
  70. package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
  71. package/dist/cli/__tests__/package-bin-contract.test.js +58 -3
  72. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  73. package/dist/cli/__tests__/question.test.js +209 -5
  74. package/dist/cli/__tests__/question.test.js.map +1 -1
  75. package/dist/cli/__tests__/setup-agents-overwrite.test.js +146 -3
  76. package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
  77. package/dist/cli/__tests__/setup-install-mode.test.d.ts +2 -0
  78. package/dist/cli/__tests__/setup-install-mode.test.d.ts.map +1 -0
  79. package/dist/cli/__tests__/setup-install-mode.test.js +873 -0
  80. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -0
  81. package/dist/cli/__tests__/setup-prompts-overwrite.test.js +83 -22
  82. package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
  83. package/dist/cli/__tests__/setup-refresh.test.js +120 -2
  84. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  85. package/dist/cli/__tests__/setup-skills-overwrite.test.js +32 -13
  86. package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
  87. package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
  88. package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
  89. package/dist/cli/__tests__/sidecar.test.js +24 -0
  90. package/dist/cli/__tests__/sidecar.test.js.map +1 -0
  91. package/dist/cli/__tests__/team.test.js +90 -42
  92. package/dist/cli/__tests__/team.test.js.map +1 -1
  93. package/dist/cli/__tests__/version-sync-contract.test.js +11 -0
  94. package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
  95. package/dist/cli/codex-home.d.ts +4 -5
  96. package/dist/cli/codex-home.d.ts.map +1 -1
  97. package/dist/cli/codex-home.js +9 -37
  98. package/dist/cli/codex-home.js.map +1 -1
  99. package/dist/cli/doctor.d.ts +1 -1
  100. package/dist/cli/doctor.d.ts.map +1 -1
  101. package/dist/cli/doctor.js +509 -278
  102. package/dist/cli/doctor.js.map +1 -1
  103. package/dist/cli/index.d.ts +13 -5
  104. package/dist/cli/index.d.ts.map +1 -1
  105. package/dist/cli/index.js +351 -60
  106. package/dist/cli/index.js.map +1 -1
  107. package/dist/cli/list.d.ts +2 -0
  108. package/dist/cli/list.d.ts.map +1 -0
  109. package/dist/cli/list.js +40 -0
  110. package/dist/cli/list.js.map +1 -0
  111. package/dist/cli/mcp-serve.d.ts +12 -0
  112. package/dist/cli/mcp-serve.d.ts.map +1 -0
  113. package/dist/cli/mcp-serve.js +63 -0
  114. package/dist/cli/mcp-serve.js.map +1 -0
  115. package/dist/cli/plugin-marketplace.d.ts +13 -0
  116. package/dist/cli/plugin-marketplace.d.ts.map +1 -0
  117. package/dist/cli/plugin-marketplace.js +77 -0
  118. package/dist/cli/plugin-marketplace.js.map +1 -0
  119. package/dist/cli/question.d.ts.map +1 -1
  120. package/dist/cli/question.js +27 -2
  121. package/dist/cli/question.js.map +1 -1
  122. package/dist/cli/setup-preferences.d.ts +20 -0
  123. package/dist/cli/setup-preferences.d.ts.map +1 -0
  124. package/dist/cli/setup-preferences.js +71 -0
  125. package/dist/cli/setup-preferences.js.map +1 -0
  126. package/dist/cli/setup.d.ts +12 -3
  127. package/dist/cli/setup.d.ts.map +1 -1
  128. package/dist/cli/setup.js +1080 -254
  129. package/dist/cli/setup.js.map +1 -1
  130. package/dist/cli/team.d.ts +1 -0
  131. package/dist/cli/team.d.ts.map +1 -1
  132. package/dist/cli/team.js +22 -3
  133. package/dist/cli/team.js.map +1 -1
  134. package/dist/cli/uninstall.d.ts.map +1 -1
  135. package/dist/cli/uninstall.js +2 -8
  136. package/dist/cli/uninstall.js.map +1 -1
  137. package/dist/config/__tests__/generator-idempotent.test.js +100 -3
  138. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  139. package/dist/config/__tests__/generator-notify.test.js +6 -5
  140. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  141. package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
  142. package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
  143. package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
  144. package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
  145. package/dist/config/__tests__/models.test.js +35 -2
  146. package/dist/config/__tests__/models.test.js.map +1 -1
  147. package/dist/config/codex-hooks.d.ts.map +1 -1
  148. package/dist/config/codex-hooks.js +2 -7
  149. package/dist/config/codex-hooks.js.map +1 -1
  150. package/dist/config/generator.d.ts +10 -0
  151. package/dist/config/generator.d.ts.map +1 -1
  152. package/dist/config/generator.js +259 -76
  153. package/dist/config/generator.js.map +1 -1
  154. package/dist/config/models.d.ts +13 -3
  155. package/dist/config/models.d.ts.map +1 -1
  156. package/dist/config/models.js +25 -5
  157. package/dist/config/models.js.map +1 -1
  158. package/dist/config/omx-first-party-mcp.d.ts +18 -0
  159. package/dist/config/omx-first-party-mcp.d.ts.map +1 -0
  160. package/dist/config/omx-first-party-mcp.js +76 -0
  161. package/dist/config/omx-first-party-mcp.js.map +1 -0
  162. package/dist/document-refresh/__tests__/enforcer.test.d.ts +2 -0
  163. package/dist/document-refresh/__tests__/enforcer.test.d.ts.map +1 -0
  164. package/dist/document-refresh/__tests__/enforcer.test.js +128 -0
  165. package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -0
  166. package/dist/document-refresh/config.d.ts +9 -0
  167. package/dist/document-refresh/config.d.ts.map +1 -0
  168. package/dist/document-refresh/config.js +70 -0
  169. package/dist/document-refresh/config.js.map +1 -0
  170. package/dist/document-refresh/enforcer.d.ts +43 -0
  171. package/dist/document-refresh/enforcer.d.ts.map +1 -0
  172. package/dist/document-refresh/enforcer.js +329 -0
  173. package/dist/document-refresh/enforcer.js.map +1 -0
  174. package/dist/exec/followup.d.ts +44 -0
  175. package/dist/exec/followup.d.ts.map +1 -0
  176. package/dist/exec/followup.js +349 -0
  177. package/dist/exec/followup.js.map +1 -0
  178. package/dist/hooks/__tests__/codebase-map.test.js +63 -1
  179. package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
  180. package/dist/hooks/__tests__/deep-interview-contract.test.js +10 -7
  181. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  182. package/dist/hooks/__tests__/keyword-detector.test.js +89 -0
  183. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  184. package/dist/hooks/__tests__/notify-fallback-watcher.test.js +84 -1
  185. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  186. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -2
  187. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
  188. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +43 -0
  189. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
  190. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +17 -0
  191. package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
  192. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +53 -0
  193. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
  194. package/dist/hooks/__tests__/notify-hook-regression-205.test.js +4 -4
  195. package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
  196. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +103 -0
  197. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
  198. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +27 -13
  199. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  200. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
  201. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
  202. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
  203. package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
  204. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +70 -3
  205. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
  206. package/dist/hooks/__tests__/pre-context-gate-skills.test.js +5 -0
  207. package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
  208. package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +3 -2
  209. package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
  210. package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
  211. package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
  212. package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
  213. package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
  214. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts +2 -0
  215. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts.map +1 -0
  216. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +28 -0
  217. package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -0
  218. package/dist/hooks/__tests__/triage-heuristic.test.js +59 -4
  219. package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -1
  220. package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts +2 -0
  221. package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts.map +1 -0
  222. package/dist/hooks/__tests__/visual-ralph-skill.test.js +44 -0
  223. package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -0
  224. package/dist/hooks/codebase-map.d.ts.map +1 -1
  225. package/dist/hooks/codebase-map.js +83 -6
  226. package/dist/hooks/codebase-map.js.map +1 -1
  227. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  228. package/dist/hooks/keyword-detector.js +19 -14
  229. package/dist/hooks/keyword-detector.js.map +1 -1
  230. package/dist/hooks/prompt-guidance-contract.d.ts +6 -0
  231. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  232. package/dist/hooks/prompt-guidance-contract.js +89 -0
  233. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  234. package/dist/hooks/session.d.ts +2 -0
  235. package/dist/hooks/session.d.ts.map +1 -1
  236. package/dist/hooks/session.js +6 -0
  237. package/dist/hooks/session.js.map +1 -1
  238. package/dist/hooks/triage-heuristic.d.ts +2 -2
  239. package/dist/hooks/triage-heuristic.d.ts.map +1 -1
  240. package/dist/hooks/triage-heuristic.js +97 -20
  241. package/dist/hooks/triage-heuristic.js.map +1 -1
  242. package/dist/hooks/triage-state.d.ts +1 -1
  243. package/dist/hooks/triage-state.d.ts.map +1 -1
  244. package/dist/hooks/triage-state.js +2 -1
  245. package/dist/hooks/triage-state.js.map +1 -1
  246. package/dist/hud/__tests__/index.test.js +4 -4
  247. package/dist/hud/__tests__/index.test.js.map +1 -1
  248. package/dist/hud/__tests__/state.test.js +4 -0
  249. package/dist/hud/__tests__/state.test.js.map +1 -1
  250. package/dist/hud/__tests__/types.test.js +27 -0
  251. package/dist/hud/__tests__/types.test.js.map +1 -1
  252. package/dist/hud/state.d.ts.map +1 -1
  253. package/dist/hud/state.js +8 -0
  254. package/dist/hud/state.js.map +1 -1
  255. package/dist/hud/types.d.ts +9 -0
  256. package/dist/hud/types.d.ts.map +1 -1
  257. package/dist/hud/types.js +3 -0
  258. package/dist/hud/types.js.map +1 -1
  259. package/dist/mcp/__tests__/bootstrap.test.js +45 -5
  260. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  261. package/dist/mcp/__tests__/server-lifecycle.test.js +50 -7
  262. package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
  263. package/dist/mcp/__tests__/state-server.test.js +67 -9
  264. package/dist/mcp/__tests__/state-server.test.js.map +1 -1
  265. package/dist/mcp/bootstrap.d.ts +12 -1
  266. package/dist/mcp/bootstrap.d.ts.map +1 -1
  267. package/dist/mcp/bootstrap.js +87 -29
  268. package/dist/mcp/bootstrap.js.map +1 -1
  269. package/dist/mcp/state-server.d.ts +5 -11
  270. package/dist/mcp/state-server.d.ts.map +1 -1
  271. package/dist/mcp/state-server.js +16 -432
  272. package/dist/mcp/state-server.js.map +1 -1
  273. package/dist/planning/__tests__/artifacts.test.js +152 -1
  274. package/dist/planning/__tests__/artifacts.test.js.map +1 -1
  275. package/dist/planning/artifacts.d.ts +9 -0
  276. package/dist/planning/artifacts.d.ts.map +1 -1
  277. package/dist/planning/artifacts.js +60 -1
  278. package/dist/planning/artifacts.js.map +1 -1
  279. package/dist/question/__tests__/deep-interview.test.js +1 -1
  280. package/dist/question/__tests__/deep-interview.test.js.map +1 -1
  281. package/dist/question/__tests__/renderer.test.js +70 -0
  282. package/dist/question/__tests__/renderer.test.js.map +1 -1
  283. package/dist/question/__tests__/ui.test.js +49 -0
  284. package/dist/question/__tests__/ui.test.js.map +1 -1
  285. package/dist/question/renderer.d.ts +14 -1
  286. package/dist/question/renderer.d.ts.map +1 -1
  287. package/dist/question/renderer.js +109 -10
  288. package/dist/question/renderer.js.map +1 -1
  289. package/dist/question/state.d.ts +2 -0
  290. package/dist/question/state.d.ts.map +1 -1
  291. package/dist/question/state.js +4 -0
  292. package/dist/question/state.js.map +1 -1
  293. package/dist/question/types.d.ts +2 -1
  294. package/dist/question/types.d.ts.map +1 -1
  295. package/dist/question/types.js.map +1 -1
  296. package/dist/question/ui.d.ts.map +1 -1
  297. package/dist/question/ui.js +28 -8
  298. package/dist/question/ui.js.map +1 -1
  299. package/dist/runtime/__tests__/bridge.test.js +143 -1
  300. package/dist/runtime/__tests__/bridge.test.js.map +1 -1
  301. package/dist/runtime/bridge.d.ts +21 -0
  302. package/dist/runtime/bridge.d.ts.map +1 -1
  303. package/dist/runtime/bridge.js +54 -4
  304. package/dist/runtime/bridge.js.map +1 -1
  305. package/dist/scripts/__tests__/codex-native-hook.test.js +1904 -230
  306. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  307. package/dist/scripts/__tests__/generate-release-body.test.js +90 -1
  308. package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
  309. package/dist/scripts/__tests__/hook-derived-watcher.test.js +110 -2
  310. package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -1
  311. package/dist/scripts/__tests__/postinstall.test.js +7 -93
  312. package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
  313. package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
  314. package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
  315. package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
  316. package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
  317. package/dist/scripts/__tests__/run-test-files.test.d.ts +2 -0
  318. package/dist/scripts/__tests__/run-test-files.test.d.ts.map +1 -0
  319. package/dist/scripts/__tests__/run-test-files.test.js +62 -0
  320. package/dist/scripts/__tests__/run-test-files.test.js.map +1 -0
  321. package/dist/scripts/__tests__/smoke-packed-install.test.js +13 -1
  322. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  323. package/dist/scripts/__tests__/verify-native-agents.test.d.ts +2 -0
  324. package/dist/scripts/__tests__/verify-native-agents.test.d.ts.map +1 -0
  325. package/dist/scripts/__tests__/verify-native-agents.test.js +166 -0
  326. package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -0
  327. package/dist/scripts/codex-execution-surface.d.ts +16 -0
  328. package/dist/scripts/codex-execution-surface.d.ts.map +1 -0
  329. package/dist/scripts/codex-execution-surface.js +42 -0
  330. package/dist/scripts/codex-execution-surface.js.map +1 -0
  331. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  332. package/dist/scripts/codex-native-hook.js +418 -76
  333. package/dist/scripts/codex-native-hook.js.map +1 -1
  334. package/dist/scripts/codex-native-pre-post.d.ts +8 -0
  335. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  336. package/dist/scripts/codex-native-pre-post.js +133 -19
  337. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  338. package/dist/scripts/generate-release-body.d.ts +1 -0
  339. package/dist/scripts/generate-release-body.d.ts.map +1 -1
  340. package/dist/scripts/generate-release-body.js +32 -3
  341. package/dist/scripts/generate-release-body.js.map +1 -1
  342. package/dist/scripts/hook-derived-watcher.js +46 -7
  343. package/dist/scripts/hook-derived-watcher.js.map +1 -1
  344. package/dist/scripts/notify-fallback-watcher.js +59 -9
  345. package/dist/scripts/notify-fallback-watcher.js.map +1 -1
  346. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
  347. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
  348. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
  349. package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
  350. package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
  351. package/dist/scripts/notify-hook/managed-tmux.js +18 -1
  352. package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
  353. package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
  354. package/dist/scripts/notify-hook/process-runner.js +7 -3
  355. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  356. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  357. package/dist/scripts/notify-hook/team-dispatch.js +96 -11
  358. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  359. package/dist/scripts/notify-hook/team-tmux-guard.js +3 -3
  360. package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
  361. package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
  362. package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
  363. package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
  364. package/dist/scripts/notify-hook/team-worker.d.ts +1 -1
  365. package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
  366. package/dist/scripts/notify-hook/team-worker.js +3 -43
  367. package/dist/scripts/notify-hook/team-worker.js.map +1 -1
  368. package/dist/scripts/notify-hook.js +36 -5
  369. package/dist/scripts/notify-hook.js.map +1 -1
  370. package/dist/scripts/postinstall.d.ts +1 -5
  371. package/dist/scripts/postinstall.d.ts.map +1 -1
  372. package/dist/scripts/postinstall.js +3 -42
  373. package/dist/scripts/postinstall.js.map +1 -1
  374. package/dist/scripts/prompt-inventory.d.ts +29 -0
  375. package/dist/scripts/prompt-inventory.d.ts.map +1 -0
  376. package/dist/scripts/prompt-inventory.js +178 -0
  377. package/dist/scripts/prompt-inventory.js.map +1 -0
  378. package/dist/scripts/run-test-files.js +32 -2
  379. package/dist/scripts/run-test-files.js.map +1 -1
  380. package/dist/scripts/smoke-packed-install.d.ts +3 -0
  381. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  382. package/dist/scripts/smoke-packed-install.js +9 -1
  383. package/dist/scripts/smoke-packed-install.js.map +1 -1
  384. package/dist/scripts/sync-plugin-mirror.d.ts +13 -0
  385. package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -0
  386. package/dist/scripts/sync-plugin-mirror.js +242 -0
  387. package/dist/scripts/sync-plugin-mirror.js.map +1 -0
  388. package/dist/scripts/verify-native-agents.d.ts +16 -0
  389. package/dist/scripts/verify-native-agents.d.ts.map +1 -0
  390. package/dist/scripts/verify-native-agents.js +188 -0
  391. package/dist/scripts/verify-native-agents.js.map +1 -0
  392. package/dist/session-history/search.d.ts.map +1 -1
  393. package/dist/session-history/search.js +7 -2
  394. package/dist/session-history/search.js.map +1 -1
  395. package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
  396. package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
  397. package/dist/sidecar/__tests__/boundary.test.js +48 -0
  398. package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
  399. package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
  400. package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
  401. package/dist/sidecar/__tests__/collector.test.js +162 -0
  402. package/dist/sidecar/__tests__/collector.test.js.map +1 -0
  403. package/dist/sidecar/__tests__/render.test.d.ts +2 -0
  404. package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
  405. package/dist/sidecar/__tests__/render.test.js +67 -0
  406. package/dist/sidecar/__tests__/render.test.js.map +1 -0
  407. package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
  408. package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
  409. package/dist/sidecar/__tests__/tmux.test.js +30 -0
  410. package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
  411. package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
  412. package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
  413. package/dist/sidecar/__tests__/watch.test.js +42 -0
  414. package/dist/sidecar/__tests__/watch.test.js.map +1 -0
  415. package/dist/sidecar/collector.d.ts +4 -0
  416. package/dist/sidecar/collector.d.ts.map +1 -0
  417. package/dist/sidecar/collector.js +377 -0
  418. package/dist/sidecar/collector.js.map +1 -0
  419. package/dist/sidecar/index.d.ts +25 -0
  420. package/dist/sidecar/index.d.ts.map +1 -0
  421. package/dist/sidecar/index.js +165 -0
  422. package/dist/sidecar/index.js.map +1 -0
  423. package/dist/sidecar/render.d.ts +3 -0
  424. package/dist/sidecar/render.d.ts.map +1 -0
  425. package/dist/sidecar/render.js +72 -0
  426. package/dist/sidecar/render.js.map +1 -0
  427. package/dist/sidecar/tmux.d.ts +13 -0
  428. package/dist/sidecar/tmux.d.ts.map +1 -0
  429. package/dist/sidecar/tmux.js +44 -0
  430. package/dist/sidecar/tmux.js.map +1 -0
  431. package/dist/sidecar/types.d.ts +125 -0
  432. package/dist/sidecar/types.d.ts.map +1 -0
  433. package/dist/sidecar/types.js +2 -0
  434. package/dist/sidecar/types.js.map +1 -0
  435. package/dist/state/__tests__/operations.test.js +50 -22
  436. package/dist/state/__tests__/operations.test.js.map +1 -1
  437. package/dist/state/operations.d.ts +1 -1
  438. package/dist/state/operations.d.ts.map +1 -1
  439. package/dist/state/operations.js +19 -7
  440. package/dist/state/operations.js.map +1 -1
  441. package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
  442. package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
  443. package/dist/team/__tests__/commit-hygiene.test.js +93 -0
  444. package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
  445. package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
  446. package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
  447. package/dist/team/__tests__/delegation-policy.test.js +69 -0
  448. package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
  449. package/dist/team/__tests__/events.test.js +54 -4
  450. package/dist/team/__tests__/events.test.js.map +1 -1
  451. package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
  452. package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
  453. package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
  454. package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
  455. package/dist/team/__tests__/model-contract.test.js +18 -2
  456. package/dist/team/__tests__/model-contract.test.js.map +1 -1
  457. package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
  458. package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
  459. package/dist/team/__tests__/repo-aware-decomposition.test.js +95 -0
  460. package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
  461. package/dist/team/__tests__/runtime.test.js +677 -17
  462. package/dist/team/__tests__/runtime.test.js.map +1 -1
  463. package/dist/team/__tests__/state-root.test.js +177 -1
  464. package/dist/team/__tests__/state-root.test.js.map +1 -1
  465. package/dist/team/__tests__/state.test.js +110 -0
  466. package/dist/team/__tests__/state.test.js.map +1 -1
  467. package/dist/team/__tests__/tmux-session.test.js +301 -2
  468. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  469. package/dist/team/__tests__/worker-bootstrap.test.js +94 -0
  470. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  471. package/dist/team/commit-hygiene.d.ts +22 -3
  472. package/dist/team/commit-hygiene.d.ts.map +1 -1
  473. package/dist/team/commit-hygiene.js +134 -2
  474. package/dist/team/commit-hygiene.js.map +1 -1
  475. package/dist/team/contracts.d.ts +1 -1
  476. package/dist/team/contracts.d.ts.map +1 -1
  477. package/dist/team/contracts.js +2 -0
  478. package/dist/team/contracts.js.map +1 -1
  479. package/dist/team/dag-schema.d.ts +38 -0
  480. package/dist/team/dag-schema.d.ts.map +1 -0
  481. package/dist/team/dag-schema.js +221 -0
  482. package/dist/team/dag-schema.js.map +1 -0
  483. package/dist/team/delegation-policy.d.ts +3 -0
  484. package/dist/team/delegation-policy.d.ts.map +1 -0
  485. package/dist/team/delegation-policy.js +82 -0
  486. package/dist/team/delegation-policy.js.map +1 -0
  487. package/dist/team/model-contract.d.ts +3 -1
  488. package/dist/team/model-contract.d.ts.map +1 -1
  489. package/dist/team/model-contract.js +44 -5
  490. package/dist/team/model-contract.js.map +1 -1
  491. package/dist/team/repo-aware-decomposition.d.ts +60 -0
  492. package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
  493. package/dist/team/repo-aware-decomposition.js +229 -0
  494. package/dist/team/repo-aware-decomposition.js.map +1 -0
  495. package/dist/team/runtime.d.ts +34 -0
  496. package/dist/team/runtime.d.ts.map +1 -1
  497. package/dist/team/runtime.js +191 -50
  498. package/dist/team/runtime.js.map +1 -1
  499. package/dist/team/state/tasks.d.ts.map +1 -1
  500. package/dist/team/state/tasks.js +33 -0
  501. package/dist/team/state/tasks.js.map +1 -1
  502. package/dist/team/state/types.d.ts +23 -1
  503. package/dist/team/state/types.d.ts.map +1 -1
  504. package/dist/team/state/types.js.map +1 -1
  505. package/dist/team/state-root.d.ts +35 -0
  506. package/dist/team/state-root.d.ts.map +1 -1
  507. package/dist/team/state-root.js +281 -1
  508. package/dist/team/state-root.js.map +1 -1
  509. package/dist/team/state.d.ts +27 -1
  510. package/dist/team/state.d.ts.map +1 -1
  511. package/dist/team/state.js +6 -0
  512. package/dist/team/state.js.map +1 -1
  513. package/dist/team/tmux-session.d.ts +1 -0
  514. package/dist/team/tmux-session.d.ts.map +1 -1
  515. package/dist/team/tmux-session.js +83 -6
  516. package/dist/team/tmux-session.js.map +1 -1
  517. package/dist/team/worker-bootstrap.d.ts +3 -0
  518. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  519. package/dist/team/worker-bootstrap.js +77 -4
  520. package/dist/team/worker-bootstrap.js.map +1 -1
  521. package/dist/utils/__tests__/agents-model-table.test.js +8 -0
  522. package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
  523. package/dist/utils/__tests__/paths.test.js +42 -9
  524. package/dist/utils/__tests__/paths.test.js.map +1 -1
  525. package/dist/utils/agents-md.d.ts +3 -0
  526. package/dist/utils/agents-md.d.ts.map +1 -1
  527. package/dist/utils/agents-md.js +25 -0
  528. package/dist/utils/agents-md.js.map +1 -1
  529. package/dist/utils/agents-model-table.d.ts.map +1 -1
  530. package/dist/utils/agents-model-table.js +2 -3
  531. package/dist/utils/agents-model-table.js.map +1 -1
  532. package/package.json +14 -7
  533. package/plugins/oh-my-codex/.app.json +3 -0
  534. package/plugins/oh-my-codex/.codex-plugin/plugin.json +30 -0
  535. package/plugins/oh-my-codex/.mcp.json +44 -0
  536. package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +114 -0
  537. package/plugins/oh-my-codex/skills/analyze/SKILL.md +148 -0
  538. package/plugins/oh-my-codex/skills/ask-claude/SKILL.md +61 -0
  539. package/plugins/oh-my-codex/skills/ask-gemini/SKILL.md +61 -0
  540. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +231 -0
  541. package/plugins/oh-my-codex/skills/autoresearch/SKILL.md +68 -0
  542. package/plugins/oh-my-codex/skills/cancel/SKILL.md +399 -0
  543. package/plugins/oh-my-codex/skills/code-review/SKILL.md +290 -0
  544. package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +287 -0
  545. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +464 -0
  546. package/plugins/oh-my-codex/skills/doctor/SKILL.md +239 -0
  547. package/plugins/oh-my-codex/skills/help/SKILL.md +202 -0
  548. package/plugins/oh-my-codex/skills/hud/SKILL.md +98 -0
  549. package/plugins/oh-my-codex/skills/note/SKILL.md +62 -0
  550. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +135 -0
  551. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +86 -0
  552. package/plugins/oh-my-codex/skills/plan/SKILL.md +276 -0
  553. package/plugins/oh-my-codex/skills/ralph/SKILL.md +269 -0
  554. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +162 -0
  555. package/plugins/oh-my-codex/skills/security-review/SKILL.md +300 -0
  556. package/plugins/oh-my-codex/skills/skill/SKILL.md +835 -0
  557. package/plugins/oh-my-codex/skills/team/SKILL.md +510 -0
  558. package/plugins/oh-my-codex/skills/trace/SKILL.md +33 -0
  559. package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +143 -0
  560. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +175 -0
  561. package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +153 -0
  562. package/plugins/oh-my-codex/skills/visual-verdict/SKILL.md +76 -0
  563. package/plugins/oh-my-codex/skills/wiki/SKILL.md +57 -0
  564. package/plugins/oh-my-codex/skills/worker/SKILL.md +106 -0
  565. package/prompts/critic.md +35 -83
  566. package/prompts/executor.md +32 -109
  567. package/prompts/explore-harness.md +1 -1
  568. package/prompts/explore.md +37 -90
  569. package/prompts/planner.md +28 -58
  570. package/prompts/researcher.md +46 -78
  571. package/prompts/verifier.md +23 -31
  572. package/skills/autopilot/SKILL.md +1 -4
  573. package/skills/deep-interview/SKILL.md +8 -5
  574. package/skills/doctor/SKILL.md +45 -17
  575. package/skills/help/SKILL.md +2 -2
  576. package/skills/omx-setup/SKILL.md +52 -9
  577. package/skills/plan/SKILL.md +1 -4
  578. package/skills/ralph/SKILL.md +3 -5
  579. package/skills/ralplan/SKILL.md +2 -6
  580. package/skills/team/SKILL.md +2 -5
  581. package/skills/ultraqa/SKILL.md +1 -4
  582. package/skills/ultrawork/SKILL.md +2 -3
  583. package/skills/visual-ralph/SKILL.md +153 -0
  584. package/skills/web-clone/SKILL.md +12 -354
  585. package/src/scripts/__tests__/codex-native-hook.test.ts +2306 -224
  586. package/src/scripts/__tests__/generate-release-body.test.ts +109 -0
  587. package/src/scripts/__tests__/hook-derived-watcher.test.ts +132 -2
  588. package/src/scripts/__tests__/postinstall.test.ts +7 -104
  589. package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
  590. package/src/scripts/__tests__/run-test-files.test.ts +72 -0
  591. package/src/scripts/__tests__/smoke-packed-install.test.ts +15 -0
  592. package/src/scripts/__tests__/verify-native-agents.test.ts +204 -0
  593. package/src/scripts/codex-execution-surface.ts +73 -0
  594. package/src/scripts/codex-native-hook.ts +579 -82
  595. package/src/scripts/codex-native-pre-post.ts +157 -19
  596. package/src/scripts/generate-release-body.ts +34 -2
  597. package/src/scripts/hook-derived-watcher.ts +51 -8
  598. package/src/scripts/notify-fallback-watcher.ts +65 -9
  599. package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
  600. package/src/scripts/notify-hook/managed-tmux.ts +22 -4
  601. package/src/scripts/notify-hook/process-runner.ts +7 -3
  602. package/src/scripts/notify-hook/team-dispatch.ts +103 -11
  603. package/src/scripts/notify-hook/team-tmux-guard.ts +3 -3
  604. package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
  605. package/src/scripts/notify-hook/team-worker.ts +4 -48
  606. package/src/scripts/notify-hook.ts +36 -5
  607. package/src/scripts/postinstall.ts +4 -58
  608. package/src/scripts/prompt-inventory.ts +218 -0
  609. package/src/scripts/run-test-files.ts +41 -2
  610. package/src/scripts/smoke-packed-install.ts +10 -1
  611. package/src/scripts/sync-plugin-mirror.ts +360 -0
  612. package/src/scripts/verify-native-agents.ts +245 -0
  613. package/templates/AGENTS.md +26 -91
  614. package/templates/catalog-manifest.json +16 -1
@@ -8,6 +8,7 @@ import {
8
8
  buildFullChangelogLine,
9
9
  generateReleaseBody,
10
10
  renderContributorsSection,
11
+ verifyCompareRange,
11
12
  type Contributor,
12
13
  } from '../generate-release-body.js';
13
14
 
@@ -94,6 +95,18 @@ describe('generate-release-body', () => {
94
95
  it('prefers GitHub contributor handles when compare metadata is available', async () => {
95
96
  const root = await mkdtemp(join(tmpdir(), 'omx-generate-release-body-gh-'));
96
97
  try {
98
+ git(root, ['init']);
99
+ git(root, ['config', 'user.name', 'Release Bot']);
100
+ git(root, ['config', 'user.email', 'release@example.com']);
101
+ await writeFile(join(root, 'notes.txt'), 'base\n');
102
+ git(root, ['add', '.']);
103
+ git(root, ['commit', '-m', 'base']);
104
+ git(root, ['tag', 'v0.13.0']);
105
+ await writeFile(join(root, 'notes.txt'), 'release\n');
106
+ git(root, ['add', 'notes.txt']);
107
+ git(root, ['commit', '-m', 'release']);
108
+ git(root, ['tag', 'v0.13.1']);
109
+
97
110
  await writeFile(join(root, 'RELEASE_BODY.md'), TEMPLATE);
98
111
  const originalFetch = global.fetch;
99
112
  global.fetch = (async () => new Response(JSON.stringify({
@@ -126,9 +139,105 @@ describe('generate-release-body', () => {
126
139
  });
127
140
 
128
141
 
142
+ it('skips off-ancestry semver-previous tags when auto-resolving the compare base', async () => {
143
+ const root = await mkdtemp(join(tmpdir(), 'omx-generate-release-body-off-ancestry-'));
144
+ try {
145
+ git(root, ['init']);
146
+ git(root, ['config', 'user.name', 'Release Bot']);
147
+ git(root, ['config', 'user.email', 'release@example.com']);
148
+ await writeFile(join(root, 'notes.txt'), 'base\n');
149
+ git(root, ['add', '.']);
150
+ git(root, ['commit', '-m', 'base']);
151
+ git(root, ['tag', 'v0.14.3']);
152
+
153
+ await writeFile(join(root, 'notes.txt'), 'dev train\n');
154
+ git(root, ['add', 'notes.txt']);
155
+ git(root, ['commit', '-m', 'dev train']);
156
+ git(root, ['tag', 'v0.15.1']);
157
+
158
+ git(root, ['checkout', '-b', 'side-release', 'v0.14.3']);
159
+ await writeFile(join(root, 'side.txt'), 'side release\n');
160
+ git(root, ['add', 'side.txt']);
161
+ git(root, ['commit', '-m', 'side release']);
162
+ git(root, ['tag', 'v0.15.0']);
163
+ git(root, ['checkout', 'v0.15.1']);
164
+
165
+ await writeFile(join(root, 'RELEASE_BODY.md'), TEMPLATE);
166
+ await generateReleaseBody({
167
+ cwd: root,
168
+ templatePath: 'RELEASE_BODY.md',
169
+ outPath: 'RELEASE_BODY.generated.md',
170
+ currentTag: 'v0.15.1',
171
+ repo: 'example/oh-my-codex',
172
+ });
173
+
174
+ const generated = await readFile(join(root, 'RELEASE_BODY.generated.md'), 'utf-8');
175
+ assert.match(generated, /`v0\.14\.3\.\.\.v0\.15\.1`/);
176
+ assert.doesNotMatch(generated, /`v0\.15\.0\.\.\.v0\.15\.1`/);
177
+ } finally {
178
+ await rm(root, { recursive: true, force: true });
179
+ }
180
+ });
181
+
182
+
183
+ it('rejects missing or inverted compare refs before rendering a compare link', async () => {
184
+ const root = await mkdtemp(join(tmpdir(), 'omx-generate-release-body-range-'));
185
+ try {
186
+ git(root, ['init']);
187
+ git(root, ['config', 'user.name', 'Release Bot']);
188
+ git(root, ['config', 'user.email', 'release@example.com']);
189
+ await writeFile(join(root, 'notes.txt'), 'base\n');
190
+ git(root, ['add', '.']);
191
+ git(root, ['commit', '-m', 'base']);
192
+ git(root, ['tag', 'v0.13.0']);
193
+ await writeFile(join(root, 'notes.txt'), 'release\n');
194
+ git(root, ['add', 'notes.txt']);
195
+ git(root, ['commit', '-m', 'release']);
196
+ git(root, ['tag', 'v0.13.1']);
197
+
198
+ assert.doesNotThrow(() => verifyCompareRange(root, 'v0.13.1', 'v0.13.0'));
199
+ assert.throws(
200
+ () => verifyCompareRange(root, 'v0.13.1', 'v9.99.9'),
201
+ /unable to verify previous tag ref for release compare: v9\.99\.9/,
202
+ );
203
+ assert.throws(
204
+ () => verifyCompareRange(root, 'v0.13.0', 'v0.13.1'),
205
+ /invalid release compare range: v0\.13\.1 is not an ancestor of v0\.13\.0/,
206
+ );
207
+
208
+ await writeFile(join(root, 'RELEASE_BODY.md'), TEMPLATE);
209
+ await assert.rejects(
210
+ generateReleaseBody({
211
+ cwd: root,
212
+ templatePath: 'RELEASE_BODY.md',
213
+ outPath: 'RELEASE_BODY.generated.md',
214
+ currentTag: 'v0.13.1',
215
+ previousTag: 'v9.99.9',
216
+ repo: 'example/oh-my-codex',
217
+ }),
218
+ /unable to verify previous tag ref for release compare: v9\.99\.9/,
219
+ );
220
+ } finally {
221
+ await rm(root, { recursive: true, force: true });
222
+ }
223
+ });
224
+
225
+
129
226
  it('fails validation when the template is missing required metadata anchors', async () => {
130
227
  const root = await mkdtemp(join(tmpdir(), 'omx-generate-release-body-invalid-'));
131
228
  try {
229
+ git(root, ['init']);
230
+ git(root, ['config', 'user.name', 'Release Bot']);
231
+ git(root, ['config', 'user.email', 'release@example.com']);
232
+ await writeFile(join(root, 'notes.txt'), 'base\n');
233
+ git(root, ['add', '.']);
234
+ git(root, ['commit', '-m', 'base']);
235
+ git(root, ['tag', 'v0.13.0']);
236
+ await writeFile(join(root, 'notes.txt'), 'release\n');
237
+ git(root, ['add', 'notes.txt']);
238
+ git(root, ['commit', '-m', 'release']);
239
+ git(root, ['tag', 'v0.13.1']);
240
+
132
241
  await writeFile(join(root, 'RELEASE_BODY.md'), `# oh-my-codex v0.0.0
133
242
 
134
243
  ## Summary
@@ -1,7 +1,8 @@
1
1
  import assert from 'node:assert/strict';
2
- import { spawnSync } from 'node:child_process';
2
+ import { spawn, spawnSync } from 'node:child_process';
3
+ import { once } from 'node:events';
3
4
  import { existsSync } from 'node:fs';
4
- import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
5
+ import { appendFile, mkdir, mkdtemp, readFile, rename, rm, writeFile } from 'node:fs/promises';
5
6
  import { tmpdir } from 'node:os';
6
7
  import { join } from 'node:path';
7
8
  import { describe, it } from 'node:test';
@@ -18,7 +19,34 @@ function todaySessionDir(baseHome: string): string {
18
19
  );
19
20
  }
20
21
 
22
+ async function sleep(ms: number): Promise<void> {
23
+ await new Promise(resolve => setTimeout(resolve, ms));
24
+ }
25
+
26
+ async function waitFor(predicate: () => Promise<boolean>, timeoutMs: number = 3000, stepMs: number = 50): Promise<void> {
27
+ const deadline = Date.now() + timeoutMs;
28
+ while (Date.now() < deadline) {
29
+ if (await predicate()) return;
30
+ await sleep(stepMs);
31
+ }
32
+ throw new Error(`waitFor timed out after ${timeoutMs}ms`);
33
+ }
34
+
21
35
  describe('hook-derived-watcher', () => {
36
+ it('uses offset-bounded rollout reads instead of re-reading whole tracked files', async () => {
37
+ const source = await readFile(new URL('../hook-derived-watcher.js', import.meta.url), 'utf-8');
38
+
39
+ assert.match(source, /async function readFileDelta/);
40
+ assert.match(source, /while \(totalBytesRead < length\)/);
41
+ assert.match(source, /nextOffset: offset \+ totalBytesRead/);
42
+ assert.match(source, /new StringDecoder\('utf8'\)/);
43
+ assert.match(source, /decoder\.write\(bytes\)/);
44
+ assert.match(source, /const fileStat = await stat\(path\)\.catch\(\(\) => null\);\s*if \(!fileStat\)\s*continue;/);
45
+ assert.match(source, /if \(currentSize < meta\.offset\) \{\s*meta\.offset = 0;\s*meta\.partial = '';/);
46
+ assert.doesNotMatch(source, /const content = await readFile\(path, 'utf-8'\)[\s\S]*const delta = content\.slice\(meta\.offset\)/);
47
+ assert.doesNotMatch(source, /stat\(path\)\.catch\(\(\) => \(\{ size: 0 \}\)\)/);
48
+ });
49
+
22
50
  it('dispatches needs-input for assistant_message content arrays', async () => {
23
51
  const base = await mkdtemp(join(tmpdir(), 'omx-hook-derived-array-'));
24
52
  const homeDir = join(base, 'home');
@@ -108,4 +136,106 @@ export async function onHookEvent(event) {
108
136
  await rm(base, { recursive: true, force: true });
109
137
  }
110
138
  });
139
+
140
+ it('preserves multibyte assistant text split across polling reads', async () => {
141
+ const base = await mkdtemp(join(tmpdir(), 'omx-hook-derived-utf8-'));
142
+ const homeDir = join(base, 'home');
143
+ const cwd = join(base, 'cwd');
144
+ const hookLogPath = join(cwd, '.omx', 'hook-events.jsonl');
145
+
146
+ try {
147
+ await mkdir(todaySessionDir(homeDir), { recursive: true });
148
+ await mkdir(join(cwd, '.omx', 'hooks'), { recursive: true });
149
+
150
+ await writeFile(
151
+ join(cwd, '.omx', 'hooks', 'capture-needs-input.mjs'),
152
+ `import { appendFile, mkdir } from 'node:fs/promises';
153
+ import { dirname } from 'node:path';
154
+
155
+ export async function onHookEvent(event) {
156
+ await mkdir(dirname(${JSON.stringify(hookLogPath)}), { recursive: true });
157
+ await appendFile(${JSON.stringify(hookLogPath)}, JSON.stringify(event) + '\\n');
158
+ }
159
+ `,
160
+ );
161
+
162
+ const rolloutPath = join(todaySessionDir(homeDir), 'rollout-hook-derived-utf8.jsonl');
163
+ await writeFile(
164
+ rolloutPath,
165
+ `${JSON.stringify({
166
+ type: 'session_meta',
167
+ payload: {
168
+ id: 'thread-hook-utf8',
169
+ cwd,
170
+ },
171
+ })}\n`,
172
+ );
173
+
174
+ const watcherScript = new URL('../hook-derived-watcher.js', import.meta.url).pathname;
175
+ const child = spawn(
176
+ process.execPath,
177
+ [watcherScript, '--cwd', cwd, '--poll-ms', '75'],
178
+ {
179
+ cwd,
180
+ stdio: 'ignore',
181
+ env: {
182
+ ...process.env,
183
+ HOME: homeDir,
184
+ OMX_HOOK_DERIVED_SIGNALS: '1',
185
+ OMX_HOOK_PLUGINS: '1',
186
+ },
187
+ },
188
+ );
189
+
190
+ const watcherStatePath = join(cwd, '.omx', 'state', 'hook-derived-watcher-state.json');
191
+ await waitFor(async () => {
192
+ try {
193
+ const state = JSON.parse(await readFile(watcherStatePath, 'utf-8'));
194
+ return state.tracked_files === 1;
195
+ } catch {
196
+ return false;
197
+ }
198
+ });
199
+
200
+ const questionText = 'Can you preserve split emoji 🧪 please?';
201
+ const eventLine = `${JSON.stringify({
202
+ timestamp: new Date().toISOString(),
203
+ type: 'event_msg',
204
+ payload: {
205
+ type: 'assistant_message',
206
+ turn_id: 'turn-hook-utf8',
207
+ content: [{ type: 'output_text', text: questionText }],
208
+ },
209
+ })}\n`;
210
+ const bytes = Buffer.from(eventLine, 'utf8');
211
+ const emojiOffset = bytes.indexOf(Buffer.from('🧪', 'utf8'));
212
+ assert.ok(emojiOffset > 0, 'expected test payload to contain emoji bytes');
213
+
214
+ await appendFile(rolloutPath, bytes.subarray(0, emojiOffset + 1));
215
+ await sleep(250);
216
+ assert.equal(existsSync(hookLogPath), false, 'incomplete UTF-8 and JSON line should not dispatch');
217
+
218
+ const hiddenRolloutPath = `${rolloutPath}.missing`;
219
+ await rename(rolloutPath, hiddenRolloutPath);
220
+ await sleep(250);
221
+ assert.equal(existsSync(hookLogPath), false, 'transient missing file should preserve buffered bytes');
222
+ await rename(hiddenRolloutPath, rolloutPath);
223
+
224
+ await appendFile(rolloutPath, bytes.subarray(emojiOffset + 1));
225
+ await waitFor(async () => {
226
+ if (!existsSync(hookLogPath)) return false;
227
+ const raw = await readFile(hookLogPath, 'utf-8');
228
+ return raw.includes('turn-hook-utf8') && raw.includes(questionText);
229
+ }, 4000, 75);
230
+
231
+ child.kill('SIGTERM');
232
+ await once(child, 'exit');
233
+
234
+ const raw = await readFile(hookLogPath, 'utf-8');
235
+ assert.match(raw, /turn-hook-utf8/);
236
+ assert.match(raw, /Can you preserve split emoji 🧪 please\?/);
237
+ } finally {
238
+ await rm(base, { recursive: true, force: true });
239
+ }
240
+ });
111
241
  });
@@ -1,5 +1,5 @@
1
1
  import assert from "node:assert/strict";
2
- import { mkdtemp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
2
+ import { mkdtemp, readFile, rm } from "node:fs/promises";
3
3
  import { tmpdir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { describe, it } from "node:test";
@@ -24,70 +24,58 @@ describe("isGlobalInstallLifecycle", () => {
24
24
  });
25
25
 
26
26
  describe("runPostinstall", () => {
27
- it("runs interactive setup only for bumped global installs", async () => {
27
+ it("records the installed version and prints an explicit opt-in setup hint for bumped global installs", async () => {
28
28
  const root = await mkdtemp(join(tmpdir(), "omx-postinstall-"));
29
29
  const stampPath = join(root, ".codex", ".omx", "install-state.json");
30
30
  const logs: string[] = [];
31
- let setupCalls = 0;
32
31
 
33
32
  try {
34
33
  const result = await runPostinstall({
35
34
  env: { npm_config_global: "true" },
36
35
  getCurrentVersion: async () => "0.14.1",
37
- isInteractive: () => true,
38
36
  log: (message) => logs.push(message),
39
37
  readStamp: async () => ({
40
38
  installed_version: "0.14.0",
41
39
  setup_completed_version: "0.14.0",
42
40
  updated_at: "2026-04-20T00:00:00.000Z",
43
41
  }),
44
- runSetup: async () => {
45
- setupCalls += 1;
46
- },
47
42
  writeStamp: async (stamp) => writeUserInstallStamp(stamp, stampPath),
48
43
  });
49
44
 
50
- assert.equal(result.status, "setup-ran");
51
- assert.equal(setupCalls, 1);
52
- assert.match(logs.join("\n"), /Launching interactive setup/);
45
+ assert.equal(result.status, "hinted");
46
+ assert.match(logs.join("\n"), /OMX setup is explicit opt-in; run `omx setup` or `omx update` when you're ready/);
53
47
 
54
48
  const stamp = JSON.parse(await readFile(stampPath, "utf-8")) as {
55
49
  installed_version: string;
56
50
  setup_completed_version: string;
57
51
  };
58
52
  assert.equal(stamp.installed_version, "0.14.1");
59
- assert.equal(stamp.setup_completed_version, "0.14.1");
53
+ assert.equal(stamp.setup_completed_version, "0.14.0");
60
54
  } finally {
61
55
  await rm(root, { recursive: true, force: true });
62
56
  }
63
57
  });
64
58
 
65
- it("records the installed version and prints a hint when no TTY is available", async () => {
59
+ it("records the installed version and preserves prior setup state when printing the postinstall hint", async () => {
66
60
  const root = await mkdtemp(join(tmpdir(), "omx-postinstall-"));
67
61
  const stampPath = join(root, ".codex", ".omx", "install-state.json");
68
62
  const logs: string[] = [];
69
- let setupCalls = 0;
70
63
 
71
64
  try {
72
65
  const result = await runPostinstall({
73
66
  env: { npm_config_global: "true" },
74
67
  getCurrentVersion: async () => "0.14.1",
75
- isInteractive: () => false,
76
68
  log: (message) => logs.push(message),
77
69
  readStamp: async () => ({
78
70
  installed_version: "0.14.0",
79
71
  setup_completed_version: "0.14.0",
80
72
  updated_at: "2026-04-20T00:00:00.000Z",
81
73
  }),
82
- runSetup: async () => {
83
- setupCalls += 1;
84
- },
85
74
  writeStamp: async (stamp) => writeUserInstallStamp(stamp, stampPath),
86
75
  });
87
76
 
88
77
  assert.equal(result.status, "hinted");
89
- assert.equal(setupCalls, 0);
90
- assert.match(logs.join("\n"), /Run `omx setup` \(interactive\) or `omx update`/);
78
+ assert.match(logs.join("\n"), /run `omx setup` or `omx update` when you're ready/i);
91
79
 
92
80
  const stamp = JSON.parse(await readFile(stampPath, "utf-8")) as {
93
81
  installed_version: string;
@@ -101,110 +89,25 @@ describe("runPostinstall", () => {
101
89
  });
102
90
 
103
91
  it("skips local installs", async () => {
104
- let setupCalls = 0;
105
92
  const result = await runPostinstall({
106
93
  env: { npm_config_global: "false" },
107
94
  getCurrentVersion: async () => "0.14.1",
108
- isInteractive: () => true,
109
- runSetup: async () => {
110
- setupCalls += 1;
111
- },
112
95
  });
113
96
 
114
97
  assert.equal(result.status, "noop-local");
115
- assert.equal(setupCalls, 0);
116
98
  });
117
99
 
118
100
  it("does not rerun setup when the installed version matches the saved stamp", async () => {
119
- let setupCalls = 0;
120
101
  const result = await runPostinstall({
121
102
  env: { npm_config_global: "true" },
122
103
  getCurrentVersion: async () => "0.14.1",
123
- isInteractive: () => true,
124
104
  readStamp: async () => ({
125
105
  installed_version: "0.14.1",
126
106
  setup_completed_version: "0.14.1",
127
107
  updated_at: "2026-04-20T00:00:00.000Z",
128
108
  }),
129
- runSetup: async () => {
130
- setupCalls += 1;
131
- },
132
109
  });
133
110
 
134
111
  assert.equal(result.status, "noop-same-version");
135
- assert.equal(setupCalls, 0);
136
- });
137
-
138
- it("warns and exits cleanly when setup fails", async () => {
139
- const warnings: string[] = [];
140
- const result = await runPostinstall({
141
- env: { npm_config_global: "true" },
142
- getCurrentVersion: async () => "0.14.1",
143
- isInteractive: () => true,
144
- readStamp: async () => ({
145
- installed_version: "0.14.0",
146
- setup_completed_version: "0.14.0",
147
- updated_at: "2026-04-20T00:00:00.000Z",
148
- }),
149
- runSetup: async () => {
150
- throw new Error("boom");
151
- },
152
- warn: (message) => warnings.push(message),
153
- writeStamp: async () => {},
154
- });
155
-
156
- assert.equal(result.status, "setup-failed");
157
- assert.match(warnings.join("\n"), /non-fatal error: boom/);
158
- });
159
-
160
- it("runs interactive setup from the npm install prefix instead of the package dir or INIT_CWD", async () => {
161
- const installRoot = await mkdtemp(join(tmpdir(), "omx-postinstall-install-root-"));
162
- const packageRoot = await mkdtemp(join(tmpdir(), "omx-postinstall-package-root-"));
163
- const initCwd = await mkdtemp(join(tmpdir(), "omx-postinstall-init-cwd-"));
164
- const originalCwd = process.cwd();
165
- const scopeFile = join(installRoot, ".omx", "setup-scope.json");
166
- const packageScopeFile = join(packageRoot, ".omx", "setup-scope.json");
167
- const initCwdScopeFile = join(initCwd, ".omx", "setup-scope.json");
168
-
169
- try {
170
- process.chdir(packageRoot);
171
-
172
- const result = await runPostinstall({
173
- env: {
174
- npm_config_global: "true",
175
- npm_config_prefix: installRoot,
176
- INIT_CWD: initCwd,
177
- },
178
- getCurrentVersion: async () => "0.14.1",
179
- isInteractive: () => true,
180
- readStamp: async () => ({
181
- installed_version: "0.14.0",
182
- setup_completed_version: "0.14.0",
183
- updated_at: "2026-04-20T00:00:00.000Z",
184
- }),
185
- runSetup: async () => {
186
- await mkdir(join(process.cwd(), ".omx"), { recursive: true });
187
- await writeFile(
188
- join(process.cwd(), ".omx", "setup-scope.json"),
189
- JSON.stringify({ scope: "project" }),
190
- );
191
- },
192
- writeStamp: async () => {},
193
- });
194
-
195
- assert.equal(result.status, "setup-ran");
196
- assert.equal(process.cwd(), packageRoot);
197
- assert.equal(
198
- JSON.parse(await readFile(scopeFile, "utf-8")).scope,
199
- "project",
200
- );
201
- await assert.rejects(() => readFile(packageScopeFile, "utf-8"));
202
- await assert.rejects(() => readFile(initCwdScopeFile, "utf-8"));
203
- } finally {
204
- process.chdir(originalCwd);
205
- await rm(installRoot, { recursive: true, force: true });
206
- await rm(packageRoot, { recursive: true, force: true });
207
- await rm(initCwd, { recursive: true, force: true });
208
- }
209
112
  });
210
113
  });
@@ -0,0 +1,64 @@
1
+ import assert from 'node:assert/strict';
2
+ import { mkdtemp, rm, writeFile, mkdir } from 'node:fs/promises';
3
+ import { tmpdir } from 'node:os';
4
+ import { join } from 'node:path';
5
+ import { describe, it } from 'node:test';
6
+ import { buildPromptInventory, listPromptSurfacePaths, renderPromptInventoryMarkdown } from '../prompt-inventory.js';
7
+
8
+ describe('prompt inventory', () => {
9
+ it('counts prompt surfaces, absolute directives, markers, and duplicate fragments', async () => {
10
+ const root = await mkdtemp(join(tmpdir(), 'omx-prompt-inventory-'));
11
+ try {
12
+ await mkdir(join(root, 'templates'), { recursive: true });
13
+ await mkdir(join(root, 'prompts'), { recursive: true });
14
+ await mkdir(join(root, 'skills', 'worker'), { recursive: true });
15
+ await mkdir(join(root, 'docs', 'prompt-guidance-fragments'), { recursive: true });
16
+ await mkdir(join(root, 'src', 'hooks'), { recursive: true });
17
+ await mkdir(join(root, 'src', 'config'), { recursive: true });
18
+ await mkdir(join(root, 'src', 'cli'), { recursive: true });
19
+
20
+ const repeated = 'AUTO-CONTINUE for clear, already-requested, low-risk, reversible local work with evidence.';
21
+ await writeFile(join(root, 'AGENTS.md'), `# Root\n${repeated}\n<!-- omx:generated:agents-md -->\n`);
22
+ await writeFile(
23
+ join(root, 'templates', 'AGENTS.md'),
24
+ `# Template\nMUST preserve markers.\n${repeated}\n<!-- OMX:RUNTIME:START -->\n<!-- OMX:RUNTIME:END -->\n`,
25
+ );
26
+ await writeFile(join(root, 'prompts', 'executor.md'), `# Executor\nDO NOT stop early.\n${repeated}\n`);
27
+ await writeFile(join(root, 'skills', 'worker', 'SKILL.md'), '# Worker\nALWAYS claim tasks.\n');
28
+ await writeFile(join(root, 'docs', 'prompt-guidance-contract.md'), '# Contract\n');
29
+ await writeFile(join(root, 'docs', 'guidance-schema.md'), '# Schema\n');
30
+ await writeFile(join(root, 'docs', 'prompt-guidance-fragments', 'core.md'), 'fragment\n');
31
+ await writeFile(join(root, 'src', 'hooks', 'prompt-guidance-contract.ts'), 'export {};\n');
32
+ await writeFile(join(root, 'src', 'config', 'generator.ts'), 'export {};\n');
33
+ await writeFile(join(root, 'src', 'cli', 'setup.ts'), 'export {};\n');
34
+
35
+ const paths = listPromptSurfacePaths(root);
36
+ assert.deepEqual(paths, [
37
+ 'AGENTS.md',
38
+ 'docs/guidance-schema.md',
39
+ 'docs/prompt-guidance-contract.md',
40
+ 'docs/prompt-guidance-fragments/core.md',
41
+ 'prompts/executor.md',
42
+ 'skills/worker/SKILL.md',
43
+ 'src/cli/setup.ts',
44
+ 'src/config/generator.ts',
45
+ 'src/hooks/prompt-guidance-contract.ts',
46
+ 'templates/AGENTS.md',
47
+ ]);
48
+
49
+ const report = buildPromptInventory(root, '2026-01-01T00:00:00.000Z');
50
+ assert.equal(report.totals.files, paths.length);
51
+ assert.ok(report.totals.lines > 0);
52
+ assert.ok(report.totals.approximateTokens > 0);
53
+ assert.equal(report.totals.absoluteDirectiveCount, 6);
54
+ assert.equal(
55
+ report.surfaces.find((surface) => surface.path === 'templates/AGENTS.md')?.markers['<!-- OMX:RUNTIME:START -->'],
56
+ 1,
57
+ );
58
+ assert.equal(report.duplicateFragmentFamilies[0]?.count, 3);
59
+ assert.match(renderPromptInventoryMarkdown(report), /# Prompt Inventory/);
60
+ } finally {
61
+ await rm(root, { recursive: true, force: true });
62
+ }
63
+ });
64
+ });
@@ -0,0 +1,72 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ import { mkdirSync, mkdtempSync, writeFileSync, rmSync } from 'node:fs';
3
+ import { tmpdir } from 'node:os';
4
+ import { join } from 'node:path';
5
+ import { describe, it } from 'node:test';
6
+ import assert from 'node:assert/strict';
7
+
8
+ function runCompiledRunner(root: string, envOverrides: Record<string, string> = {}, timeoutMs = 5_000) {
9
+ return spawnSync(process.execPath, ['dist/scripts/run-test-files.js', root], {
10
+ cwd: process.cwd(),
11
+ encoding: 'utf-8',
12
+ env: {
13
+ ...process.env,
14
+ ...envOverrides,
15
+ },
16
+ timeout: timeoutMs,
17
+ });
18
+ }
19
+
20
+ describe('run-test-files diagnostics', () => {
21
+ it('applies a bounded node --test timeout so hanging tests fail with file context', () => {
22
+ const wd = mkdtempSync(join(tmpdir(), 'omx-run-test-files-'));
23
+ try {
24
+ const testsDir = join(wd, '__tests__');
25
+ mkdirSync(testsDir, { recursive: true });
26
+ const testPath = join(testsDir, 'hang.test.js');
27
+ writeFileSync(
28
+ testPath,
29
+ [
30
+ "import { test } from 'node:test';",
31
+ "test('never resolves', async () => { await new Promise(() => setInterval(() => {}, 1_000)); });",
32
+ '',
33
+ ].join('\n'),
34
+ );
35
+
36
+ const result = runCompiledRunner(wd, {
37
+ OMX_NODE_TEST_TIMEOUT_MS: '250',
38
+ OMX_NODE_TEST_RUNNER_TIMEOUT_MS: '750',
39
+ });
40
+
41
+ assert.notEqual(result.status, 0);
42
+ assert.match(result.stderr, /per-test timeout 250ms/);
43
+ assert.match(result.stderr, /node --test did not exit normally|runner timeout 750ms/);
44
+ assert.match(`${result.stdout}\n${result.stderr}`, /hang\.test\.js|never resolves|cancelled/i);
45
+ } finally {
46
+ rmSync(wd, { recursive: true, force: true });
47
+ }
48
+ });
49
+
50
+ it('logs that per-test timeout is disabled by default', () => {
51
+ const wd = mkdtempSync(join(tmpdir(), 'omx-run-test-files-'));
52
+ try {
53
+ const testsDir = join(wd, '__tests__');
54
+ mkdirSync(testsDir, { recursive: true });
55
+ writeFileSync(
56
+ join(testsDir, 'pass.test.js'),
57
+ [
58
+ "import { test } from 'node:test';",
59
+ "test('passes', () => {});",
60
+ '',
61
+ ].join('\n'),
62
+ );
63
+
64
+ const result = runCompiledRunner(wd);
65
+
66
+ assert.equal(result.status, 0, result.stderr || result.stdout);
67
+ assert.match(result.stderr, /per-test timeout disabled/);
68
+ } finally {
69
+ rmSync(wd, { recursive: true, force: true });
70
+ }
71
+ });
72
+ });
@@ -8,6 +8,7 @@ import {
8
8
  ensureRepoDependencies,
9
9
  hasUsableNodeModules,
10
10
  PACKED_INSTALL_SMOKE_CORE_COMMANDS,
11
+ parseNpmPackJsonOutput,
11
12
  resolveGitCommonDir,
12
13
  resolveReusableNodeModulesSource,
13
14
  } from '../smoke-packed-install.js';
@@ -23,6 +24,20 @@ test('packed install smoke stays limited to boot + core commands', () => {
23
24
  );
24
25
  });
25
26
 
27
+ test('parseNpmPackJsonOutput ignores prepack logs before npm pack JSON', () => {
28
+ const parsed = parseNpmPackJsonOutput([
29
+ '[sync-plugin-mirror] synced 29 canonical skill directories and plugin metadata',
30
+ '[',
31
+ ' {',
32
+ ' "filename": "oh-my-codex-0.15.0.tgz"',
33
+ ' }',
34
+ ']',
35
+ '',
36
+ ].join('\n'));
37
+
38
+ assert.deepEqual(parsed, [{ filename: 'oh-my-codex-0.15.0.tgz' }]);
39
+ });
40
+
26
41
  test('resolveGitCommonDir resolves relative git common dir output against the repo root', () => {
27
42
  const commonDir = resolveGitCommonDir('/tmp/worktree', () => ({
28
43
  status: 0,