oh-my-codex 0.17.3 → 0.18.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 (381) hide show
  1. package/Cargo.lock +13 -5
  2. package/Cargo.toml +2 -1
  3. package/README.md +44 -19
  4. package/crates/omx-api/Cargo.toml +19 -0
  5. package/crates/omx-api/src/lib.rs +2997 -0
  6. package/crates/omx-api/src/main.rs +10 -0
  7. package/crates/omx-api/tests/cli.rs +558 -0
  8. package/crates/omx-explore/src/main.rs +4 -0
  9. package/crates/omx-sparkshell/src/codex_bridge.rs +437 -123
  10. package/crates/omx-sparkshell/src/exec.rs +127 -1
  11. package/crates/omx-sparkshell/src/main.rs +829 -30
  12. package/crates/omx-sparkshell/src/prompt.rs +25 -3
  13. package/crates/omx-sparkshell/src/redaction.rs +241 -0
  14. package/crates/omx-sparkshell/tests/execution.rs +702 -237
  15. package/dist/cli/__tests__/api.test.d.ts +2 -0
  16. package/dist/cli/__tests__/api.test.d.ts.map +1 -0
  17. package/dist/cli/__tests__/api.test.js +175 -0
  18. package/dist/cli/__tests__/api.test.js.map +1 -0
  19. package/dist/cli/__tests__/ask.test.js +72 -5
  20. package/dist/cli/__tests__/ask.test.js.map +1 -1
  21. package/dist/cli/__tests__/autoresearch-goal.test.js +14 -1
  22. package/dist/cli/__tests__/autoresearch-goal.test.js.map +1 -1
  23. package/dist/cli/__tests__/codex-plugin-layout.test.js +15 -7
  24. package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
  25. package/dist/cli/__tests__/doctor-warning-copy.test.js +76 -3
  26. package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
  27. package/dist/cli/__tests__/explore.test.js +23 -0
  28. package/dist/cli/__tests__/explore.test.js.map +1 -1
  29. package/dist/cli/__tests__/index.test.js +171 -5
  30. package/dist/cli/__tests__/index.test.js.map +1 -1
  31. package/dist/cli/__tests__/install-docs-contract.test.d.ts +2 -0
  32. package/dist/cli/__tests__/install-docs-contract.test.d.ts.map +1 -0
  33. package/dist/cli/__tests__/install-docs-contract.test.js +55 -0
  34. package/dist/cli/__tests__/install-docs-contract.test.js.map +1 -0
  35. package/dist/cli/__tests__/launch-fallback.test.js +191 -0
  36. package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
  37. package/dist/cli/__tests__/package-bin-contract.test.js +4 -3
  38. package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
  39. package/dist/cli/__tests__/question.test.js +27 -41
  40. package/dist/cli/__tests__/question.test.js.map +1 -1
  41. package/dist/cli/__tests__/setup-install-mode.test.js +232 -35
  42. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  43. package/dist/cli/__tests__/sparkshell-cli.test.js +25 -1
  44. package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
  45. package/dist/cli/__tests__/sparkshell-packaging.test.js +1 -0
  46. package/dist/cli/__tests__/sparkshell-packaging.test.js.map +1 -1
  47. package/dist/cli/__tests__/ultragoal.test.js +227 -4
  48. package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
  49. package/dist/cli/__tests__/update.test.js +72 -1
  50. package/dist/cli/__tests__/update.test.js.map +1 -1
  51. package/dist/cli/__tests__/version-sync-contract.test.js +4 -0
  52. package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
  53. package/dist/cli/__tests__/windows-popup-loop-contract.test.js +1 -1
  54. package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
  55. package/dist/cli/api.d.ts +26 -0
  56. package/dist/cli/api.d.ts.map +1 -0
  57. package/dist/cli/api.js +153 -0
  58. package/dist/cli/api.js.map +1 -0
  59. package/dist/cli/codex-feature-probe.d.ts +5 -0
  60. package/dist/cli/codex-feature-probe.d.ts.map +1 -1
  61. package/dist/cli/codex-feature-probe.js +13 -7
  62. package/dist/cli/codex-feature-probe.js.map +1 -1
  63. package/dist/cli/doctor.d.ts +7 -0
  64. package/dist/cli/doctor.d.ts.map +1 -1
  65. package/dist/cli/doctor.js +119 -10
  66. package/dist/cli/doctor.js.map +1 -1
  67. package/dist/cli/explore.d.ts +2 -0
  68. package/dist/cli/explore.d.ts.map +1 -1
  69. package/dist/cli/explore.js +43 -1
  70. package/dist/cli/explore.js.map +1 -1
  71. package/dist/cli/index.d.ts +12 -4
  72. package/dist/cli/index.d.ts.map +1 -1
  73. package/dist/cli/index.js +460 -87
  74. package/dist/cli/index.js.map +1 -1
  75. package/dist/cli/native-assets.d.ts +2 -1
  76. package/dist/cli/native-assets.d.ts.map +1 -1
  77. package/dist/cli/native-assets.js +1 -0
  78. package/dist/cli/native-assets.js.map +1 -1
  79. package/dist/cli/plugin-marketplace.d.ts +2 -0
  80. package/dist/cli/plugin-marketplace.d.ts.map +1 -1
  81. package/dist/cli/plugin-marketplace.js +15 -1
  82. package/dist/cli/plugin-marketplace.js.map +1 -1
  83. package/dist/cli/setup.d.ts.map +1 -1
  84. package/dist/cli/setup.js +71 -11
  85. package/dist/cli/setup.js.map +1 -1
  86. package/dist/cli/sparkshell.d.ts +7 -1
  87. package/dist/cli/sparkshell.d.ts.map +1 -1
  88. package/dist/cli/sparkshell.js +31 -4
  89. package/dist/cli/sparkshell.js.map +1 -1
  90. package/dist/cli/ultragoal.d.ts +1 -1
  91. package/dist/cli/ultragoal.d.ts.map +1 -1
  92. package/dist/cli/ultragoal.js +184 -10
  93. package/dist/cli/ultragoal.js.map +1 -1
  94. package/dist/cli/update.d.ts +2 -0
  95. package/dist/cli/update.d.ts.map +1 -1
  96. package/dist/cli/update.js +14 -3
  97. package/dist/cli/update.js.map +1 -1
  98. package/dist/compat/__tests__/doctor-contract.test.js +3 -0
  99. package/dist/compat/__tests__/doctor-contract.test.js.map +1 -1
  100. package/dist/config/__tests__/codex-feature-flags.test.js +11 -1
  101. package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -1
  102. package/dist/config/__tests__/codex-hooks.test.js +19 -8
  103. package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
  104. package/dist/config/__tests__/commit-lore-guard.test.d.ts +2 -0
  105. package/dist/config/__tests__/commit-lore-guard.test.d.ts.map +1 -0
  106. package/dist/config/__tests__/commit-lore-guard.test.js +20 -0
  107. package/dist/config/__tests__/commit-lore-guard.test.js.map +1 -0
  108. package/dist/config/codex-feature-flags.d.ts +4 -0
  109. package/dist/config/codex-feature-flags.d.ts.map +1 -1
  110. package/dist/config/codex-feature-flags.js +4 -0
  111. package/dist/config/codex-feature-flags.js.map +1 -1
  112. package/dist/config/codex-hooks.js +6 -6
  113. package/dist/config/codex-hooks.js.map +1 -1
  114. package/dist/config/commit-lore-guard.d.ts +1 -0
  115. package/dist/config/commit-lore-guard.d.ts.map +1 -1
  116. package/dist/config/commit-lore-guard.js +29 -3
  117. package/dist/config/commit-lore-guard.js.map +1 -1
  118. package/dist/config/generator.d.ts +3 -1
  119. package/dist/config/generator.d.ts.map +1 -1
  120. package/dist/config/generator.js +114 -10
  121. package/dist/config/generator.js.map +1 -1
  122. package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -0
  123. package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
  124. package/dist/goal-workflows/codex-goal-snapshot.js +5 -1
  125. package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
  126. package/dist/hooks/__tests__/autopilot-skill-contract.test.js +10 -6
  127. package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
  128. package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts +2 -0
  129. package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts.map +1 -0
  130. package/dist/hooks/__tests__/best-practice-research-skill.test.js +27 -0
  131. package/dist/hooks/__tests__/best-practice-research-skill.test.js.map +1 -0
  132. package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +1 -1
  133. package/dist/hooks/__tests__/consensus-execution-handoff.test.js +13 -11
  134. package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
  135. package/dist/hooks/__tests__/deep-interview-contract.test.js +4 -3
  136. package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
  137. package/dist/hooks/__tests__/keyword-detector.test.js +15 -3
  138. package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
  139. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +6 -0
  140. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
  141. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +33 -0
  142. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  143. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +4 -0
  144. package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
  145. package/dist/hooks/extensibility/__tests__/dispatcher.test.js +26 -3
  146. package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
  147. package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
  148. package/dist/hooks/extensibility/dispatcher.js +29 -14
  149. package/dist/hooks/extensibility/dispatcher.js.map +1 -1
  150. package/dist/hooks/keyword-detector.d.ts.map +1 -1
  151. package/dist/hooks/keyword-detector.js +8 -3
  152. package/dist/hooks/keyword-detector.js.map +1 -1
  153. package/dist/hooks/keyword-registry.d.ts.map +1 -1
  154. package/dist/hooks/keyword-registry.js +1 -0
  155. package/dist/hooks/keyword-registry.js.map +1 -1
  156. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  157. package/dist/hooks/prompt-guidance-contract.js +3 -2
  158. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  159. package/dist/hud/__tests__/hud-tmux-injection.test.js +14 -8
  160. package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
  161. package/dist/hud/__tests__/reconcile.test.js +4 -4
  162. package/dist/hud/__tests__/reconcile.test.js.map +1 -1
  163. package/dist/hud/__tests__/resource-leak-watch.test.d.ts +2 -0
  164. package/dist/hud/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  165. package/dist/hud/__tests__/resource-leak-watch.test.js +28 -0
  166. package/dist/hud/__tests__/resource-leak-watch.test.js.map +1 -0
  167. package/dist/hud/__tests__/tmux.test.js +23 -18
  168. package/dist/hud/__tests__/tmux.test.js.map +1 -1
  169. package/dist/hud/index.d.ts +1 -1
  170. package/dist/hud/index.d.ts.map +1 -1
  171. package/dist/hud/index.js +10 -4
  172. package/dist/hud/index.js.map +1 -1
  173. package/dist/hud/tmux.d.ts.map +1 -1
  174. package/dist/hud/tmux.js +9 -8
  175. package/dist/hud/tmux.js.map +1 -1
  176. package/dist/mcp/__tests__/bootstrap.test.js +75 -1
  177. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  178. package/dist/mcp/bootstrap.d.ts +3 -1
  179. package/dist/mcp/bootstrap.d.ts.map +1 -1
  180. package/dist/mcp/bootstrap.js +71 -2
  181. package/dist/mcp/bootstrap.js.map +1 -1
  182. package/dist/notifications/__tests__/http-client-resource.test.d.ts +2 -0
  183. package/dist/notifications/__tests__/http-client-resource.test.d.ts.map +1 -0
  184. package/dist/notifications/__tests__/http-client-resource.test.js +41 -0
  185. package/dist/notifications/__tests__/http-client-resource.test.js.map +1 -0
  186. package/dist/notifications/__tests__/verbosity.test.js +20 -0
  187. package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
  188. package/dist/notifications/config.d.ts.map +1 -1
  189. package/dist/notifications/config.js +6 -3
  190. package/dist/notifications/config.js.map +1 -1
  191. package/dist/notifications/http-client.d.ts.map +1 -1
  192. package/dist/notifications/http-client.js +78 -27
  193. package/dist/notifications/http-client.js.map +1 -1
  194. package/dist/notifications/types.d.ts +2 -0
  195. package/dist/notifications/types.d.ts.map +1 -1
  196. package/dist/openclaw/__tests__/dispatcher.test.js +49 -1
  197. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
  198. package/dist/openclaw/dispatcher.d.ts +7 -4
  199. package/dist/openclaw/dispatcher.d.ts.map +1 -1
  200. package/dist/openclaw/dispatcher.js +32 -69
  201. package/dist/openclaw/dispatcher.js.map +1 -1
  202. package/dist/pipeline/__tests__/orchestrator.test.js +65 -3
  203. package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
  204. package/dist/pipeline/__tests__/stages.test.js +50 -5
  205. package/dist/pipeline/__tests__/stages.test.js.map +1 -1
  206. package/dist/pipeline/index.d.ts +8 -2
  207. package/dist/pipeline/index.d.ts.map +1 -1
  208. package/dist/pipeline/index.js +5 -2
  209. package/dist/pipeline/index.js.map +1 -1
  210. package/dist/pipeline/orchestrator.d.ts +5 -4
  211. package/dist/pipeline/orchestrator.d.ts.map +1 -1
  212. package/dist/pipeline/orchestrator.js +56 -15
  213. package/dist/pipeline/orchestrator.js.map +1 -1
  214. package/dist/pipeline/stages/code-review.d.ts +2 -2
  215. package/dist/pipeline/stages/code-review.d.ts.map +1 -1
  216. package/dist/pipeline/stages/code-review.js +5 -3
  217. package/dist/pipeline/stages/code-review.js.map +1 -1
  218. package/dist/pipeline/stages/deep-interview.d.ts +15 -0
  219. package/dist/pipeline/stages/deep-interview.d.ts.map +1 -0
  220. package/dist/pipeline/stages/deep-interview.js +32 -0
  221. package/dist/pipeline/stages/deep-interview.js.map +1 -0
  222. package/dist/pipeline/stages/ralph-verify.d.ts +5 -5
  223. package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
  224. package/dist/pipeline/stages/ralph-verify.js +2 -2
  225. package/dist/pipeline/stages/ralph-verify.js.map +1 -1
  226. package/dist/pipeline/stages/ultragoal.d.ts +19 -0
  227. package/dist/pipeline/stages/ultragoal.d.ts.map +1 -0
  228. package/dist/pipeline/stages/ultragoal.js +38 -0
  229. package/dist/pipeline/stages/ultragoal.js.map +1 -0
  230. package/dist/pipeline/stages/ultraqa.d.ts +30 -0
  231. package/dist/pipeline/stages/ultraqa.d.ts.map +1 -0
  232. package/dist/pipeline/stages/ultraqa.js +46 -0
  233. package/dist/pipeline/stages/ultraqa.js.map +1 -0
  234. package/dist/pipeline/types.d.ts +8 -6
  235. package/dist/pipeline/types.d.ts.map +1 -1
  236. package/dist/pipeline/types.js +2 -2
  237. package/dist/scripts/__tests__/codex-native-hook.test.js +1488 -117
  238. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
  239. package/dist/scripts/__tests__/notify-dispatcher.test.js +183 -1
  240. package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -1
  241. package/dist/scripts/__tests__/smoke-packed-install.test.js +27 -2
  242. package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
  243. package/dist/scripts/__tests__/verify-native-agents.test.js +16 -1
  244. package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -1
  245. package/dist/scripts/build-api.d.ts +2 -0
  246. package/dist/scripts/build-api.d.ts.map +1 -0
  247. package/dist/scripts/build-api.js +44 -0
  248. package/dist/scripts/build-api.js.map +1 -0
  249. package/dist/scripts/cleanup-explore-harness.js +1 -0
  250. package/dist/scripts/cleanup-explore-harness.js.map +1 -1
  251. package/dist/scripts/codex-native-hook.d.ts.map +1 -1
  252. package/dist/scripts/codex-native-hook.js +364 -16
  253. package/dist/scripts/codex-native-hook.js.map +1 -1
  254. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
  255. package/dist/scripts/codex-native-pre-post.js +98 -25
  256. package/dist/scripts/codex-native-pre-post.js.map +1 -1
  257. package/dist/scripts/notify-dispatcher.js +88 -0
  258. package/dist/scripts/notify-dispatcher.js.map +1 -1
  259. package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
  260. package/dist/scripts/notify-hook/process-runner.js +39 -17
  261. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  262. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  263. package/dist/scripts/notify-hook/team-dispatch.js +36 -14
  264. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  265. package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
  266. package/dist/scripts/notify-hook/team-leader-nudge.js +26 -11
  267. package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
  268. package/dist/scripts/notify-hook/team-tmux-guard.d.ts +2 -1
  269. package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
  270. package/dist/scripts/notify-hook/team-tmux-guard.js +45 -1
  271. package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
  272. package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
  273. package/dist/scripts/notify-hook/team-worker-stop.js +27 -14
  274. package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
  275. package/dist/scripts/run-provider-advisor.js +9 -3
  276. package/dist/scripts/run-provider-advisor.js.map +1 -1
  277. package/dist/scripts/smoke-packed-install.d.ts +4 -1
  278. package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
  279. package/dist/scripts/smoke-packed-install.js +101 -1
  280. package/dist/scripts/smoke-packed-install.js.map +1 -1
  281. package/dist/scripts/sync-plugin-mirror.js +2 -2
  282. package/dist/scripts/sync-plugin-mirror.js.map +1 -1
  283. package/dist/scripts/verify-native-agents.js +2 -2
  284. package/dist/scripts/verify-native-agents.js.map +1 -1
  285. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts +2 -0
  286. package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts.map +1 -0
  287. package/dist/sidecar/__tests__/resource-leak-watch.test.js +38 -0
  288. package/dist/sidecar/__tests__/resource-leak-watch.test.js.map +1 -0
  289. package/dist/sidecar/index.d.ts +1 -1
  290. package/dist/sidecar/index.d.ts.map +1 -1
  291. package/dist/sidecar/index.js +29 -12
  292. package/dist/sidecar/index.js.map +1 -1
  293. package/dist/state/__tests__/operations-ralph-phase.test.js +88 -1
  294. package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -1
  295. package/dist/state/operations.d.ts.map +1 -1
  296. package/dist/state/operations.js +11 -0
  297. package/dist/state/operations.js.map +1 -1
  298. package/dist/team/__tests__/runtime.test.js +2 -2
  299. package/dist/team/__tests__/runtime.test.js.map +1 -1
  300. package/dist/team/__tests__/tmux-session.test.js +207 -22
  301. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  302. package/dist/team/tmux-session.d.ts +1 -0
  303. package/dist/team/tmux-session.d.ts.map +1 -1
  304. package/dist/team/tmux-session.js +73 -28
  305. package/dist/team/tmux-session.js.map +1 -1
  306. package/dist/ultragoal/__tests__/artifacts.test.js +714 -10
  307. package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
  308. package/dist/ultragoal/__tests__/docs-contract.test.js +57 -1
  309. package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
  310. package/dist/ultragoal/__tests__/steering-fixtures.d.ts +68 -0
  311. package/dist/ultragoal/__tests__/steering-fixtures.d.ts.map +1 -0
  312. package/dist/ultragoal/__tests__/steering-fixtures.js +259 -0
  313. package/dist/ultragoal/__tests__/steering-fixtures.js.map +1 -0
  314. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts +2 -0
  315. package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts.map +1 -0
  316. package/dist/ultragoal/__tests__/steering-fixtures.test.js +65 -0
  317. package/dist/ultragoal/__tests__/steering-fixtures.test.js.map +1 -0
  318. package/dist/ultragoal/artifacts.d.ts +97 -2
  319. package/dist/ultragoal/artifacts.d.ts.map +1 -1
  320. package/dist/ultragoal/artifacts.js +811 -256
  321. package/dist/ultragoal/artifacts.js.map +1 -1
  322. package/dist/utils/__tests__/sleep-resource.test.d.ts +2 -0
  323. package/dist/utils/__tests__/sleep-resource.test.d.ts.map +1 -0
  324. package/dist/utils/__tests__/sleep-resource.test.js +39 -0
  325. package/dist/utils/__tests__/sleep-resource.test.js.map +1 -0
  326. package/dist/utils/sleep.d.ts.map +1 -1
  327. package/dist/utils/sleep.js +17 -6
  328. package/dist/utils/sleep.js.map +1 -1
  329. package/dist/verification/__tests__/ci-rust-gates.test.js +85 -10
  330. package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
  331. package/dist/verification/__tests__/explore-harness-release-workflow.test.js +1 -0
  332. package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
  333. package/package.json +5 -3
  334. package/plugins/oh-my-codex/.codex-plugin/plugin.json +4 -3
  335. package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +56 -0
  336. package/plugins/oh-my-codex/hooks/hooks.json +77 -0
  337. package/plugins/oh-my-codex/skills/autopilot/SKILL.md +77 -47
  338. package/plugins/oh-my-codex/skills/best-practice-research/SKILL.md +83 -0
  339. package/plugins/oh-my-codex/skills/cancel/SKILL.md +2 -2
  340. package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +9 -8
  341. package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
  342. package/plugins/oh-my-codex/skills/pipeline/SKILL.md +22 -11
  343. package/plugins/oh-my-codex/skills/plan/SKILL.md +8 -8
  344. package/plugins/oh-my-codex/skills/ralph/SKILL.md +7 -0
  345. package/plugins/oh-my-codex/skills/ralplan/SKILL.md +5 -5
  346. package/plugins/oh-my-codex/skills/team/SKILL.md +1 -1
  347. package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +38 -4
  348. package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +1 -1
  349. package/prompts/planner.md +1 -1
  350. package/prompts/researcher.md +15 -10
  351. package/skills/autopilot/SKILL.md +77 -47
  352. package/skills/best-practice-research/SKILL.md +83 -0
  353. package/skills/cancel/SKILL.md +2 -2
  354. package/skills/deep-interview/SKILL.md +9 -8
  355. package/skills/omx-setup/SKILL.md +1 -1
  356. package/skills/pipeline/SKILL.md +22 -11
  357. package/skills/plan/SKILL.md +8 -8
  358. package/skills/ralph/SKILL.md +7 -0
  359. package/skills/ralplan/SKILL.md +5 -5
  360. package/skills/team/SKILL.md +1 -1
  361. package/skills/ultragoal/SKILL.md +38 -4
  362. package/skills/ultrawork/SKILL.md +1 -1
  363. package/src/scripts/__tests__/codex-native-hook.test.ts +1758 -166
  364. package/src/scripts/__tests__/notify-dispatcher.test.ts +223 -1
  365. package/src/scripts/__tests__/smoke-packed-install.test.ts +39 -2
  366. package/src/scripts/__tests__/verify-native-agents.test.ts +21 -1
  367. package/src/scripts/build-api.ts +48 -0
  368. package/src/scripts/cleanup-explore-harness.ts +1 -0
  369. package/src/scripts/codex-native-hook.ts +416 -18
  370. package/src/scripts/codex-native-pre-post.ts +119 -25
  371. package/src/scripts/notify-dispatcher.ts +97 -0
  372. package/src/scripts/notify-hook/process-runner.ts +40 -16
  373. package/src/scripts/notify-hook/team-dispatch.ts +36 -13
  374. package/src/scripts/notify-hook/team-leader-nudge.ts +25 -11
  375. package/src/scripts/notify-hook/team-tmux-guard.ts +49 -0
  376. package/src/scripts/notify-hook/team-worker-stop.ts +24 -13
  377. package/src/scripts/run-provider-advisor.ts +11 -3
  378. package/src/scripts/smoke-packed-install.ts +107 -0
  379. package/src/scripts/sync-plugin-mirror.ts +3 -3
  380. package/src/scripts/verify-native-agents.ts +2 -2
  381. package/templates/catalog-manifest.json +7 -0
@@ -1,6 +1,6 @@
1
1
  import { describe, it } from "node:test";
2
2
  import assert from "node:assert/strict";
3
- import { existsSync } from "node:fs";
3
+ import { chmodSync, existsSync } from "node:fs";
4
4
  import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { tmpdir } from "node:os";
6
6
  import { join } from "node:path";
@@ -91,6 +91,228 @@ describe("notify dispatcher previousNotify guard", () => {
91
91
  }
92
92
  });
93
93
 
94
+ it("skips stale turn-ended wrappers whose previousNotify is an OMX dispatcher", () => {
95
+ const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-wrapper-"));
96
+ try {
97
+ const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
98
+ mkdirSync(oldPkgScripts, { recursive: true });
99
+ const stalePreviousMarker = join(wd, "stale-wrapper-ran");
100
+ const omxMarker = join(wd, "omx-ran");
101
+ const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
102
+ const turnEndedWrapper = join(wd, "SkyComputerUseClient");
103
+ const omxHook = join(wd, "current-notify-hook.js");
104
+ writeFileSync(
105
+ turnEndedWrapper,
106
+ `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
107
+ );
108
+ writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
109
+ const metadataPath = join(wd, "notify-dispatch.json");
110
+ writeFileSync(
111
+ metadataPath,
112
+ JSON.stringify({
113
+ managedBy: "oh-my-codex",
114
+ version: 1,
115
+ previousNotify: [
116
+ process.execPath,
117
+ turnEndedWrapper,
118
+ "turn-ended",
119
+ "--previous-notify",
120
+ JSON.stringify([
121
+ process.execPath,
122
+ staleDispatcher,
123
+ "--metadata",
124
+ metadataPath,
125
+ ]),
126
+ ],
127
+ omxNotify: [process.execPath, omxHook],
128
+ }),
129
+ );
130
+
131
+ runDispatcher(metadataPath);
132
+
133
+ assert.equal(existsSync(stalePreviousMarker), false);
134
+ assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
135
+ } finally {
136
+ rmSync(wd, { recursive: true, force: true });
137
+ }
138
+ });
139
+
140
+ it("skips stale turn-ended wrappers whose previousNotify text is an OMX hook", () => {
141
+ const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-wrapper-text-"));
142
+ try {
143
+ const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
144
+ mkdirSync(oldPkgScripts, { recursive: true });
145
+ const stalePreviousMarker = join(wd, "stale-wrapper-ran");
146
+ const omxMarker = join(wd, "omx-ran");
147
+ const staleHook = join(oldPkgScripts, "notify-hook.js");
148
+ const turnEndedWrapper = join(wd, "SkyComputerUseClient");
149
+ const omxHook = join(wd, "current-notify-hook.js");
150
+ writeFileSync(
151
+ turnEndedWrapper,
152
+ `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
153
+ );
154
+ writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
155
+ const metadataPath = join(wd, "notify-dispatch.json");
156
+ writeFileSync(
157
+ metadataPath,
158
+ JSON.stringify({
159
+ managedBy: "oh-my-codex",
160
+ version: 1,
161
+ previousNotify: [
162
+ process.execPath,
163
+ turnEndedWrapper,
164
+ "turn-ended",
165
+ `--previous-notify=node ${staleHook}`,
166
+ ],
167
+ omxNotify: [process.execPath, omxHook],
168
+ }),
169
+ );
170
+
171
+ runDispatcher(metadataPath);
172
+
173
+ assert.equal(existsSync(stalePreviousMarker), false);
174
+ assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
175
+ } finally {
176
+ rmSync(wd, { recursive: true, force: true });
177
+ }
178
+ });
179
+
180
+ it("skips SkyComputerUseClient wrappers with quoted nested previousNotify self-references", () => {
181
+ const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-nested-wrapper-"));
182
+ try {
183
+ const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
184
+ mkdirSync(oldPkgScripts, { recursive: true });
185
+ const stalePreviousMarker = join(wd, "nested-wrapper-ran");
186
+ const omxMarker = join(wd, "omx-ran");
187
+ const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
188
+ const turnEndedWrapper = join(wd, "SkyComputerUseClient");
189
+ const omxHook = join(wd, "current-notify-hook.js");
190
+ writeFileSync(
191
+ turnEndedWrapper,
192
+ `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
193
+ );
194
+ writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
195
+ const metadataPath = join(wd, "notify-dispatch.json");
196
+ const nestedSelfReference = JSON.stringify([
197
+ process.execPath,
198
+ turnEndedWrapper,
199
+ "turn-ended",
200
+ "--previous-notify",
201
+ JSON.stringify([process.execPath, staleDispatcher, "--metadata", metadataPath]),
202
+ ]);
203
+ writeFileSync(
204
+ metadataPath,
205
+ JSON.stringify({
206
+ managedBy: "oh-my-codex",
207
+ version: 1,
208
+ previousNotify: [
209
+ process.execPath,
210
+ turnEndedWrapper,
211
+ "turn-ended",
212
+ "--previous-notify",
213
+ JSON.stringify(nestedSelfReference),
214
+ ],
215
+ omxNotify: [process.execPath, omxHook],
216
+ }),
217
+ );
218
+
219
+ runDispatcher(metadataPath);
220
+
221
+ assert.equal(existsSync(stalePreviousMarker), false);
222
+ assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
223
+ } finally {
224
+ rmSync(wd, { recursive: true, force: true });
225
+ }
226
+ });
227
+
228
+ it("skips wrapper metadata objects with encoded OMX dispatcher payloads", () => {
229
+ const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-object-wrapper-"));
230
+ try {
231
+ const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
232
+ mkdirSync(oldPkgScripts, { recursive: true });
233
+ const stalePreviousMarker = join(wd, "object-wrapper-ran");
234
+ const omxMarker = join(wd, "omx-ran");
235
+ const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
236
+ const turnEndedWrapper = join(wd, "SkyComputerUseClient");
237
+ const omxHook = join(wd, "current-notify-hook.js");
238
+ writeFileSync(
239
+ turnEndedWrapper,
240
+ `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
241
+ );
242
+ writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
243
+ const metadataPath = join(wd, "notify-dispatch.json");
244
+ writeFileSync(
245
+ metadataPath,
246
+ JSON.stringify({
247
+ managedBy: "oh-my-codex",
248
+ version: 1,
249
+ previousNotify: [
250
+ process.execPath,
251
+ turnEndedWrapper,
252
+ "turn-ended",
253
+ `--previous-notify=${JSON.stringify({ previousNotify: JSON.stringify([process.execPath, staleDispatcher]) })}`,
254
+ ],
255
+ omxNotify: [process.execPath, omxHook],
256
+ }),
257
+ );
258
+
259
+ runDispatcher(metadataPath);
260
+
261
+ assert.equal(existsSync(stalePreviousMarker), false);
262
+ assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
263
+ } finally {
264
+ rmSync(wd, { recursive: true, force: true });
265
+ }
266
+ });
267
+
268
+ it("skips reporter-shaped SkyComputerUseClient previousNotify dispatcher recursion", () => {
269
+ const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-reporter-wrapper-"));
270
+ try {
271
+ const pkgScripts = join(wd, "pkg-without-managed-name", "dist", "scripts");
272
+ mkdirSync(pkgScripts, { recursive: true });
273
+ const stalePreviousMarker = join(wd, "skycomputer-ran");
274
+ const omxMarker = join(wd, "omx-ran");
275
+ const dispatcher = join(pkgScripts, "notify-dispatcher.js");
276
+ const turnEndedWrapper = join(wd, "SkyComputerUseClient");
277
+ const omxHook = join(wd, "current-notify-hook.js");
278
+ writeFileSync(dispatcher, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "dispatcher");\n`);
279
+ writeFileSync(
280
+ turnEndedWrapper,
281
+ `#!/usr/bin/env node\nimport { appendFileSync } from "node:fs"; appendFileSync(${JSON.stringify(stalePreviousMarker)}, "wrapper\\n");\n`,
282
+ );
283
+ chmodSync(turnEndedWrapper, 0o755);
284
+ writeFileSync(omxHook, `import { appendFileSync } from "node:fs"; appendFileSync(${JSON.stringify(omxMarker)}, "omx\\n");\n`);
285
+ const metadataPath = join(wd, "notify-dispatch.json");
286
+ writeFileSync(
287
+ metadataPath,
288
+ JSON.stringify({
289
+ managedBy: "oh-my-codex",
290
+ version: 1,
291
+ previousNotify: [
292
+ turnEndedWrapper,
293
+ "turn-ended",
294
+ "--previous-notify",
295
+ JSON.stringify([
296
+ "node",
297
+ dispatcher,
298
+ "--metadata",
299
+ metadataPath,
300
+ ]),
301
+ ],
302
+ omxNotify: [process.execPath, omxHook],
303
+ dispatcherNotify: ["node", dispatcher, "--metadata", metadataPath],
304
+ }),
305
+ );
306
+
307
+ runDispatcher(metadataPath);
308
+
309
+ assert.equal(existsSync(stalePreviousMarker), false);
310
+ assert.equal(readFileSync(omxMarker, "utf-8"), "omx\n");
311
+ } finally {
312
+ rmSync(wd, { recursive: true, force: true });
313
+ }
314
+ });
315
+
94
316
  it("preserves and runs real user previousNotify entries", () => {
95
317
  const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-user-"));
96
318
  try {
@@ -7,20 +7,57 @@ import { test } from 'node:test';
7
7
  import {
8
8
  ensureRepoDependencies,
9
9
  hasUsableNodeModules,
10
+ buildNativeHookSmokePayload,
11
+ PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS,
10
12
  PACKED_INSTALL_SMOKE_CORE_COMMANDS,
11
13
  parseNpmPackJsonOutput,
12
14
  resolveGitCommonDir,
13
15
  resolveReusableNodeModulesSource,
16
+ validateHookStdout,
14
17
  } from '../smoke-packed-install.js';
15
18
 
16
19
  test('packed install smoke stays limited to boot + core commands', () => {
17
20
  assert.deepEqual(PACKED_INSTALL_SMOKE_CORE_COMMANDS, [
18
21
  ['--help'],
19
22
  ['version'],
23
+ ['api', '--help'],
24
+ ['sparkshell', '--help'],
20
25
  ]);
21
26
  assert.equal(
22
- PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('explore') || argv.includes('sparkshell')),
23
- false,
27
+ PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('api')),
28
+ true,
29
+ );
30
+ assert.equal(
31
+ PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('sparkshell')),
32
+ true,
33
+ );
34
+ });
35
+
36
+ test('packed install smoke covers every installed native hook event with minimal payloads', () => {
37
+ assert.deepEqual(PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS, [
38
+ 'SessionStart',
39
+ 'PreToolUse',
40
+ 'PostToolUse',
41
+ 'UserPromptSubmit',
42
+ 'PreCompact',
43
+ 'PostCompact',
44
+ 'Stop',
45
+ ]);
46
+
47
+ for (const eventName of PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS) {
48
+ const payload = buildNativeHookSmokePayload(eventName, '/tmp/omx-packed-hook-smoke');
49
+ assert.equal(payload.hook_event_name, eventName);
50
+ assert.equal(typeof payload.session_id, 'string');
51
+ assert.equal(payload.cwd, '/tmp/omx-packed-hook-smoke');
52
+ }
53
+ });
54
+
55
+ test('packed install native hook stdout validation allows empty or JSON output only', () => {
56
+ assert.doesNotThrow(() => validateHookStdout('PostCompact', ''));
57
+ assert.doesNotThrow(() => validateHookStdout('Stop', '{}\n'));
58
+ assert.throws(
59
+ () => validateHookStdout('UserPromptSubmit', '{not json'),
60
+ /native hook UserPromptSubmit emitted invalid JSON stdout/,
24
61
  );
25
62
  });
26
63
 
@@ -53,7 +53,7 @@ describe("verify-native-agents", () => {
53
53
  ]),
54
54
  definitions: { executor: definition, "style-reviewer": { ...definition, name: "style-reviewer" } },
55
55
  promptNames: new Set(["executor", "style-reviewer", "explore-harness"]),
56
- pluginManifest: { skills: "./skills/" },
56
+ pluginManifest: { skills: "./skills/", hooks: "./hooks/hooks.json" },
57
57
  });
58
58
 
59
59
  assert.deepEqual(result.installableAgentNames, ["executor"]);
@@ -183,6 +183,26 @@ describe("verify-native-agents", () => {
183
183
  pluginManifest: { agents: "./agents/" },
184
184
  }),
185
185
  );
186
+
187
+ await rejectsWithCode("native_agent_plugin_boundary_violation", () =>
188
+ verifyNativeAgents({
189
+ manifest: manifest([{ name: "executor", category: "build", status: "active" }]),
190
+ definitions: { executor: definition },
191
+ promptNames: new Set(["executor"]),
192
+ pluginManifest: { prompts: "./prompts/" },
193
+ }),
194
+ );
195
+ });
196
+
197
+ it("allows plugin-scoped lifecycle hooks without treating them as native agents", async () => {
198
+ const result = await verifyNativeAgents({
199
+ manifest: manifest([{ name: "executor", category: "build", status: "active" }]),
200
+ definitions: { executor: definition },
201
+ promptNames: new Set(["executor"]),
202
+ pluginManifest: { hooks: "./hooks/hooks.json" },
203
+ });
204
+
205
+ assert.deepEqual(result.installableAgentNames, ["executor"]);
186
206
  });
187
207
 
188
208
  it("keeps merged prompt-backed agents out of the installable set", () => {
@@ -0,0 +1,48 @@
1
+ import { chmodSync, copyFileSync, existsSync, mkdirSync } from 'node:fs';
2
+ import { arch, platform } from 'node:os';
3
+ import { dirname, join } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { spawnSync } from 'node:child_process';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = dirname(__filename);
9
+ const projectRoot = join(__dirname, '..', '..');
10
+ const nativeRoot = join(projectRoot, 'crates', 'omx-api');
11
+ const manifestPath = process.env.OMX_API_MANIFEST ?? join(nativeRoot, 'Cargo.toml');
12
+ const binaryName = platform() === 'win32' ? 'omx-api.exe' : 'omx-api';
13
+ const releaseBinaryPath = join(projectRoot, 'target', 'release', binaryName);
14
+ const stagedBinaryRoot = process.env.OMX_API_STAGE_DIR
15
+ ? join(process.env.OMX_API_STAGE_DIR, `${platform()}-${arch()}`)
16
+ : join(projectRoot, 'bin', 'native', `${platform()}-${arch()}`);
17
+ const packagedBinaryDir = stagedBinaryRoot;
18
+ const packagedBinaryPath = join(packagedBinaryDir, binaryName);
19
+ const extraArgs = process.argv.slice(2);
20
+ const args = ['build', '--manifest-path', manifestPath, '--release', ...extraArgs];
21
+
22
+ if (!existsSync(manifestPath)) {
23
+ console.error(`omx api build: missing Rust manifest at ${manifestPath}`);
24
+ process.exit(1);
25
+ }
26
+
27
+ const result = spawnSync('cargo', args, {
28
+ cwd: projectRoot,
29
+ stdio: 'inherit',
30
+ env: process.env,
31
+ });
32
+
33
+ if (result.error) {
34
+ console.error(`omx api build: failed to launch cargo: ${result.error.message}`);
35
+ process.exit(1);
36
+ }
37
+
38
+ if ((result.status ?? 1) !== 0) process.exit(result.status ?? 1);
39
+
40
+ if (!existsSync(releaseBinaryPath)) {
41
+ console.error(`omx api build: expected release binary at ${releaseBinaryPath}`);
42
+ process.exit(1);
43
+ }
44
+
45
+ mkdirSync(packagedBinaryDir, { recursive: true });
46
+ copyFileSync(releaseBinaryPath, packagedBinaryPath);
47
+ if (platform() !== 'win32') chmodSync(packagedBinaryPath, 0o755);
48
+ console.log(`omx api build: staged native binary at ${packagedBinaryPath}`);
@@ -12,6 +12,7 @@ for (const path of [
12
12
  join(root, 'bin', 'omx-explore-harness.exe'),
13
13
  join(root, 'bin', 'omx-explore-harness.meta.json'),
14
14
  join(root, 'bin', 'native'),
15
+ join(root, 'crates', 'omx-sparkshell', '.omx'),
15
16
  ]) {
16
17
  await rm(path, { recursive: true, force: true });
17
18
  }