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
@@ -8,12 +8,12 @@
8
8
 
9
9
  import { appendFile, mkdir, rename, writeFile } from 'fs/promises';
10
10
  import { dirname, join } from 'path';
11
- import { DEFAULT_MARKER } from '../tmux-hook-engine.js';
11
+ import { DEFAULT_MARKER, paneHasActiveTask } from '../tmux-hook-engine.js';
12
12
  import { appendTeamDeliveryLog } from '../../team/delivery-log.js';
13
13
  import { safeString, asNumber } from './utils.js';
14
14
  import { readJsonIfExists } from './state-io.js';
15
15
  import { logTmuxHookEvent } from './log.js';
16
- import { evaluatePaneInjectionReadiness, sendPaneInput } from './team-tmux-guard.js';
16
+ import { evaluatePaneInjectionReadiness, queuePaneInput, sendPaneInput } from './team-tmux-guard.js';
17
17
  import { resolvePaneTarget } from './tmux-injection.js';
18
18
  import { readTeamWorkersForIdleCheck } from './team-worker.js';
19
19
 
@@ -185,17 +185,28 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
185
185
  + DEFAULT_MARKER;
186
186
 
187
187
  try {
188
- const sendResult = await sendPaneInput({
189
- paneTarget: tmuxTarget,
190
- prompt,
191
- submitKeyPresses: 2,
192
- submitDelayMs: 100,
193
- });
194
- if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
188
+ const leaderHasActiveTask = paneHasActiveTask(paneGuard.paneCapture);
189
+ let deliveryMode = 'sent';
190
+ if (leaderHasActiveTask) {
191
+ const sendResult = await queuePaneInput({
192
+ paneTarget: tmuxTarget,
193
+ prompt,
194
+ });
195
+ if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
196
+ deliveryMode = 'queued';
197
+ } else {
198
+ const sendResult = await sendPaneInput({
199
+ paneTarget: tmuxTarget,
200
+ prompt,
201
+ submitKeyPresses: 2,
202
+ submitDelayMs: 100,
203
+ });
204
+ if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
205
+ }
195
206
 
196
207
  await writeStopNudgeState(statePath, {
197
208
  ...nextState,
198
- delivery: 'sent',
209
+ delivery: deliveryMode,
199
210
  leader_pane_id: leaderPaneId || null,
200
211
  tmux_target: tmuxTarget,
201
212
  });
@@ -205,7 +216,7 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
205
216
  type: 'worker_stop_leader_nudge',
206
217
  worker: workerName,
207
218
  to_worker: 'leader-fixed',
208
- delivery: 'sent',
219
+ delivery: deliveryMode,
209
220
  created_at: nowIso,
210
221
  source_type: SOURCE_TYPE,
211
222
  });
@@ -225,10 +236,10 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
225
236
  from_worker: workerName,
226
237
  to_worker: 'leader-fixed',
227
238
  transport: 'send-keys',
228
- result: 'sent',
239
+ result: deliveryMode,
229
240
  reason: 'worker_stop_allowed',
230
241
  }).catch(() => {});
231
- return { ok: true, result: 'sent' };
242
+ return { ok: true, result: deliveryMode };
232
243
  } catch (err) {
233
244
  await recordDeferred({
234
245
  stateDir,
@@ -83,6 +83,16 @@ function shouldUseClaudeIssuePermissionsBypass(provider: string, prompt: string)
83
83
  return ISSUE_WORK_PROMPT_PATTERNS.some((pattern) => pattern.test(trimmed));
84
84
  }
85
85
 
86
+ function buildProviderLaunchArgs(provider: string, prompt: string, originalTask: string): string[] {
87
+ const promptArgs = provider === 'claude'
88
+ ? ['-p', '--', prompt]
89
+ : ['-p', prompt];
90
+
91
+ return shouldUseClaudeIssuePermissionsBypass(provider, originalTask)
92
+ ? [CLAUDE_SKIP_PERMISSIONS_FLAG, ...promptArgs]
93
+ : promptArgs;
94
+ }
95
+
86
96
  function buildSummary(exitCode: number, output: string): string {
87
97
  if (exitCode === 0) {
88
98
  return 'Provider completed successfully. Review the raw output for details.';
@@ -165,9 +175,7 @@ async function main(): Promise<void> {
165
175
 
166
176
  ensureBinary(binary);
167
177
 
168
- const launchArgs = shouldUseClaudeIssuePermissionsBypass(provider, originalTask)
169
- ? [CLAUDE_SKIP_PERMISSIONS_FLAG, '-p', prompt]
170
- : ['-p', prompt];
178
+ const launchArgs = buildProviderLaunchArgs(provider, prompt, originalTask);
171
179
 
172
180
  const run = spawnSync(binary, launchArgs, {
173
181
  encoding: 'utf8',
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  mkdtempSync,
3
+ realpathSync,
3
4
  rmSync,
4
5
  } from 'node:fs';
5
6
  import { mkdirSync } from 'node:fs';
@@ -20,6 +21,18 @@ export {
20
21
  export const PACKED_INSTALL_SMOKE_CORE_COMMANDS = [
21
22
  ['--help'],
22
23
  ['version'],
24
+ ['api', '--help'],
25
+ ['sparkshell', '--help'],
26
+ ] as const;
27
+
28
+ export const PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS = [
29
+ 'SessionStart',
30
+ 'PreToolUse',
31
+ 'PostToolUse',
32
+ 'UserPromptSubmit',
33
+ 'PreCompact',
34
+ 'PostCompact',
35
+ 'Stop',
23
36
  ] as const;
24
37
 
25
38
  function usage(): string {
@@ -110,6 +123,99 @@ function npmBinName(name: string): string {
110
123
  return process.platform === 'win32' ? `${name}.cmd` : name;
111
124
  }
112
125
 
126
+ function resolveGlobalNodeModules(prefixDir: string): string {
127
+ const result = run('npm', ['root', '-g', '--prefix', prefixDir], { cwd: prefixDir });
128
+ const root = String(result.stdout || '').trim();
129
+ if (!root) throw new Error('npm root -g did not return a node_modules directory');
130
+ return root;
131
+ }
132
+
133
+ export function validateHookStdout(eventName: string, stdout: string): void {
134
+ const trimmed = stdout.trim();
135
+ if (!trimmed) return;
136
+ try {
137
+ JSON.parse(trimmed);
138
+ } catch (error) {
139
+ throw new Error(
140
+ `native hook ${eventName} emitted invalid JSON stdout: ${error instanceof Error ? error.message : String(error)}`,
141
+ );
142
+ }
143
+ }
144
+
145
+ export function buildNativeHookSmokePayload(
146
+ eventName: typeof PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS[number],
147
+ smokeCwd: string,
148
+ ): Record<string, unknown> {
149
+ const base = {
150
+ hook_event_name: eventName,
151
+ session_id: `packed-install-smoke-${eventName}`,
152
+ cwd: smokeCwd,
153
+ };
154
+ switch (eventName) {
155
+ case 'SessionStart':
156
+ return {
157
+ ...base,
158
+ transcript_path: join(smokeCwd, 'nonexistent-transcript.jsonl'),
159
+ };
160
+ case 'PreToolUse':
161
+ return {
162
+ ...base,
163
+ tool_name: 'Bash',
164
+ tool_use_id: 'packed-install-smoke-tool',
165
+ tool_input: { command: 'echo packed install smoke' },
166
+ };
167
+ case 'PostToolUse':
168
+ return {
169
+ ...base,
170
+ tool_name: 'Bash',
171
+ tool_use_id: 'packed-install-smoke-tool',
172
+ tool_input: { command: 'echo packed install smoke' },
173
+ tool_response: {
174
+ exit_code: 0,
175
+ stdout: 'packed install smoke\n',
176
+ stderr: '',
177
+ },
178
+ };
179
+ case 'UserPromptSubmit':
180
+ return {
181
+ ...base,
182
+ transcript_path: join(smokeCwd, 'nonexistent-transcript.jsonl'),
183
+ prompt: 'packed install native hook smoke test',
184
+ };
185
+ case 'PreCompact':
186
+ case 'PostCompact':
187
+ case 'Stop':
188
+ return base;
189
+ }
190
+ }
191
+
192
+ function smokeInstalledNativeHookDist(prefixDir: string): void {
193
+ const globalNodeModules = resolveGlobalNodeModules(prefixDir);
194
+ const packageRoot = join(globalNodeModules, 'oh-my-codex');
195
+ const hookScript = join(packageRoot, 'dist', 'scripts', 'codex-native-hook.js');
196
+ const smokeCwd = mkdtempSync(join(tmpdir(), 'omx-packed-hook-smoke-'));
197
+ try {
198
+ for (const eventName of PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS) {
199
+ const payload = buildNativeHookSmokePayload(eventName, smokeCwd);
200
+ const result = run(process.execPath, [realpathSync(hookScript)], {
201
+ cwd: smokeCwd,
202
+ env: {
203
+ ...process.env,
204
+ OMX_NATIVE_HOOK_DOCTOR_SMOKE: '1',
205
+ OMX_ROOT: join(smokeCwd, '.omx-packed-hook-root'),
206
+ OMX_SESSION_ID: `packed-install-smoke-${eventName}`,
207
+ OMX_SOURCE_CWD: smokeCwd,
208
+ OMX_STARTUP_CWD: smokeCwd,
209
+ },
210
+ input: JSON.stringify(payload),
211
+ });
212
+ validateHookStdout(eventName, result.stdout as string);
213
+ }
214
+ } finally {
215
+ rmSync(smokeCwd, { recursive: true, force: true });
216
+ }
217
+ }
218
+
113
219
  export function parseNpmPackJsonOutput(stdout: string): Array<{ filename: string }> {
114
220
  const start = stdout.lastIndexOf('\n[');
115
221
  const jsonText = (start >= 0 ? stdout.slice(start + 1) : stdout).trim();
@@ -145,6 +251,7 @@ async function main(): Promise<void> {
145
251
  for (const argv of PACKED_INSTALL_SMOKE_CORE_COMMANDS) {
146
252
  run(omxPath, argv, { cwd: repoRoot });
147
253
  }
254
+ smokeInstalledNativeHookDist(prefixDir);
148
255
 
149
256
  console.log('packed install smoke: PASS');
150
257
  } finally {
@@ -55,7 +55,6 @@ const PLUGIN_NAME = "oh-my-codex";
55
55
  const SETUP_OWNED_PLUGIN_MANIFEST_FIELDS = [
56
56
  "agents",
57
57
  "prompts",
58
- "hooks",
59
58
  ] as const;
60
59
 
61
60
  async function readJsonFile<T>(path: string): Promise<T> {
@@ -199,13 +198,14 @@ async function assertPluginManifestPolicy(
199
198
  const pkg = await readJsonFile<PackageJson>(join(root, "package.json"));
200
199
  const expectedFields: Pick<
201
200
  PluginManifest,
202
- "name" | "version" | "skills" | "mcpServers" | "apps"
201
+ "name" | "version" | "skills" | "mcpServers" | "apps" | "hooks"
203
202
  > = {
204
203
  name: PLUGIN_NAME,
205
204
  version: pkg.version,
206
205
  skills: "./skills/",
207
206
  mcpServers: "./.mcp.json",
208
207
  apps: "./.app.json",
208
+ hooks: "./hooks/hooks.json",
209
209
  };
210
210
 
211
211
  for (const [field, expectedValue] of Object.entries(expectedFields)) {
@@ -229,7 +229,7 @@ async function assertPluginManifestPolicy(
229
229
  "plugin_bundle_metadata_out_of_sync",
230
230
  "kind=plugin-manifest",
231
231
  `field=${field}`,
232
- "message=setup-owned agents/prompts/hooks must not be plugin-scoped",
232
+ "message=setup-owned agents/prompts must not be plugin-scoped",
233
233
  ].join("\n"),
234
234
  );
235
235
  }
@@ -199,11 +199,11 @@ export async function verifyNativeAgents(
199
199
  ? await readPluginManifest(root)
200
200
  : options.pluginManifest;
201
201
  if (pluginManifest) {
202
- for (const field of ["agents", "prompts", "hooks"]) {
202
+ for (const field of ["agents", "prompts"]) {
203
203
  if (pluginManifest[field] !== undefined) {
204
204
  throw errorBlock("native_agent_plugin_boundary_violation", {
205
205
  field,
206
- message: "native agents/prompts/hooks are setup-owned, not plugin-scoped",
206
+ message: "native agents/prompts are setup-owned, not plugin-scoped",
207
207
  });
208
208
  }
209
209
  }
@@ -108,6 +108,13 @@
108
108
  "core": false,
109
109
  "internalRequired": false
110
110
  },
111
+ {
112
+ "name": "best-practice-research",
113
+ "category": "planning",
114
+ "status": "active",
115
+ "core": false,
116
+ "internalRequired": false
117
+ },
111
118
  {
112
119
  "name": "analyze",
113
120
  "category": "shortcut",