oh-my-codex 0.11.13 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/Cargo.lock +5 -5
  2. package/Cargo.toml +1 -1
  3. package/README.md +27 -17
  4. package/crates/omx-runtime/src/main.rs +6 -2
  5. package/dist/agents/native-config.js +1 -1
  6. package/dist/agents/native-config.js.map +1 -1
  7. package/dist/cli/__tests__/autoresearch-guided.test.js +74 -2
  8. package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
  9. package/dist/cli/__tests__/cleanup.test.js +22 -30
  10. package/dist/cli/__tests__/cleanup.test.js.map +1 -1
  11. package/dist/cli/__tests__/error-handling-warnings.test.js +3 -1
  12. package/dist/cli/__tests__/error-handling-warnings.test.js.map +1 -1
  13. package/dist/cli/__tests__/index.test.js +217 -4
  14. package/dist/cli/__tests__/index.test.js.map +1 -1
  15. package/dist/cli/__tests__/setup-refresh.test.js +49 -9
  16. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  17. package/dist/cli/__tests__/setup-scope.test.js +9 -0
  18. package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
  19. package/dist/cli/__tests__/team.test.js +136 -11
  20. package/dist/cli/__tests__/team.test.js.map +1 -1
  21. package/dist/cli/__tests__/uninstall.test.js +10 -0
  22. package/dist/cli/__tests__/uninstall.test.js.map +1 -1
  23. package/dist/cli/__tests__/windows-popup-loop-contract.test.js +1 -0
  24. package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
  25. package/dist/cli/autoresearch-guided.d.ts.map +1 -1
  26. package/dist/cli/autoresearch-guided.js +2 -1
  27. package/dist/cli/autoresearch-guided.js.map +1 -1
  28. package/dist/cli/autoresearch.d.ts.map +1 -1
  29. package/dist/cli/autoresearch.js +2 -1
  30. package/dist/cli/autoresearch.js.map +1 -1
  31. package/dist/cli/cleanup.d.ts.map +1 -1
  32. package/dist/cli/cleanup.js +4 -2
  33. package/dist/cli/cleanup.js.map +1 -1
  34. package/dist/cli/index.d.ts +12 -0
  35. package/dist/cli/index.d.ts.map +1 -1
  36. package/dist/cli/index.js +238 -30
  37. package/dist/cli/index.js.map +1 -1
  38. package/dist/cli/omx.js +2 -0
  39. package/dist/cli/omx.js.map +1 -1
  40. package/dist/cli/setup.d.ts +1 -0
  41. package/dist/cli/setup.d.ts.map +1 -1
  42. package/dist/cli/setup.js +41 -7
  43. package/dist/cli/setup.js.map +1 -1
  44. package/dist/cli/team.d.ts.map +1 -1
  45. package/dist/cli/team.js +16 -557
  46. package/dist/cli/team.js.map +1 -1
  47. package/dist/cli/uninstall.d.ts.map +1 -1
  48. package/dist/cli/uninstall.js +34 -9
  49. package/dist/cli/uninstall.js.map +1 -1
  50. package/dist/config/__tests__/generator-idempotent.test.js +79 -2
  51. package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
  52. package/dist/config/__tests__/generator-notify.test.js +2 -0
  53. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  54. package/dist/config/codex-hooks.d.ts +11 -0
  55. package/dist/config/codex-hooks.d.ts.map +1 -0
  56. package/dist/config/codex-hooks.js +50 -0
  57. package/dist/config/codex-hooks.js.map +1 -0
  58. package/dist/config/generator.d.ts +5 -3
  59. package/dist/config/generator.d.ts.map +1 -1
  60. package/dist/config/generator.js +24 -14
  61. package/dist/config/generator.js.map +1 -1
  62. package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts +2 -0
  63. package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts.map +1 -0
  64. package/dist/hooks/__tests__/debugger-log-recency-contract.test.js +20 -0
  65. package/dist/hooks/__tests__/debugger-log-recency-contract.test.js.map +1 -0
  66. package/dist/hooks/__tests__/notify-fallback-watcher.test.js +236 -2
  67. package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
  68. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +86 -0
  69. package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
  70. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +40 -0
  71. package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
  72. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts +2 -0
  73. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts.map +1 -0
  74. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +54 -0
  75. package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -0
  76. package/dist/hooks/__tests__/notify-hook-modules.test.js +31 -0
  77. package/dist/hooks/__tests__/notify-hook-modules.test.js.map +1 -1
  78. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +51 -0
  79. package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
  80. package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts +2 -0
  81. package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts.map +1 -0
  82. package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js +136 -0
  83. package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js.map +1 -0
  84. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +120 -0
  85. package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
  86. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +145 -20
  87. package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js.map +1 -1
  88. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +116 -0
  89. package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
  90. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +86 -0
  91. package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
  92. package/dist/hooks/__tests__/pre-context-gate-skills.test.js +1 -0
  93. package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
  94. package/dist/hooks/extensibility/__tests__/runtime.test.js +49 -0
  95. package/dist/hooks/extensibility/__tests__/runtime.test.js.map +1 -1
  96. package/dist/hooks/extensibility/runtime.d.ts.map +1 -1
  97. package/dist/hooks/extensibility/runtime.js +10 -0
  98. package/dist/hooks/extensibility/runtime.js.map +1 -1
  99. package/dist/hooks/extensibility/types.d.ts +1 -1
  100. package/dist/hooks/extensibility/types.d.ts.map +1 -1
  101. package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
  102. package/dist/hooks/prompt-guidance-contract.js +12 -8
  103. package/dist/hooks/prompt-guidance-contract.js.map +1 -1
  104. package/dist/hooks/session.d.ts +5 -1
  105. package/dist/hooks/session.d.ts.map +1 -1
  106. package/dist/hooks/session.js +10 -6
  107. package/dist/hooks/session.js.map +1 -1
  108. package/dist/hud/index.d.ts.map +1 -1
  109. package/dist/hud/index.js +6 -1
  110. package/dist/hud/index.js.map +1 -1
  111. package/dist/mcp/__tests__/bootstrap.test.js +0 -3
  112. package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
  113. package/dist/mcp/__tests__/code-intel-server.test.js +27 -1
  114. package/dist/mcp/__tests__/code-intel-server.test.js.map +1 -1
  115. package/dist/mcp/__tests__/server-lifecycle.test.js +0 -5
  116. package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
  117. package/dist/mcp/bootstrap.d.ts +1 -1
  118. package/dist/mcp/bootstrap.d.ts.map +1 -1
  119. package/dist/mcp/bootstrap.js +0 -1
  120. package/dist/mcp/bootstrap.js.map +1 -1
  121. package/dist/mcp/code-intel-server.d.ts +20 -0
  122. package/dist/mcp/code-intel-server.d.ts.map +1 -1
  123. package/dist/mcp/code-intel-server.js +6 -5
  124. package/dist/mcp/code-intel-server.js.map +1 -1
  125. package/dist/notifications/__tests__/idle-cooldown.test.js +24 -1
  126. package/dist/notifications/__tests__/idle-cooldown.test.js.map +1 -1
  127. package/dist/notifications/__tests__/reply-listener.test.js +20 -1
  128. package/dist/notifications/__tests__/reply-listener.test.js.map +1 -1
  129. package/dist/notifications/__tests__/tmux.test.js +41 -0
  130. package/dist/notifications/__tests__/tmux.test.js.map +1 -1
  131. package/dist/notifications/idle-cooldown.d.ts +13 -0
  132. package/dist/notifications/idle-cooldown.d.ts.map +1 -1
  133. package/dist/notifications/idle-cooldown.js +50 -16
  134. package/dist/notifications/idle-cooldown.js.map +1 -1
  135. package/dist/notifications/reply-listener.d.ts.map +1 -1
  136. package/dist/notifications/reply-listener.js +2 -0
  137. package/dist/notifications/reply-listener.js.map +1 -1
  138. package/dist/notifications/tmux.d.ts.map +1 -1
  139. package/dist/notifications/tmux.js +4 -0
  140. package/dist/notifications/tmux.js.map +1 -1
  141. package/dist/scripts/__tests__/codex-native-hook.test.d.ts +2 -0
  142. package/dist/scripts/__tests__/codex-native-hook.test.d.ts.map +1 -0
  143. package/dist/scripts/__tests__/codex-native-hook.test.js +720 -0
  144. package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -0
  145. package/dist/scripts/codex-native-hook.d.ts +22 -0
  146. package/dist/scripts/codex-native-hook.d.ts.map +1 -0
  147. package/dist/scripts/codex-native-hook.js +594 -0
  148. package/dist/scripts/codex-native-hook.js.map +1 -0
  149. package/dist/scripts/codex-native-pre-post.d.ts +26 -0
  150. package/dist/scripts/codex-native-pre-post.d.ts.map +1 -0
  151. package/dist/scripts/codex-native-pre-post.js +118 -0
  152. package/dist/scripts/codex-native-pre-post.js.map +1 -0
  153. package/dist/scripts/notify-fallback-watcher.js +262 -18
  154. package/dist/scripts/notify-fallback-watcher.js.map +1 -1
  155. package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
  156. package/dist/scripts/notify-hook/auto-nudge.js +5 -6
  157. package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
  158. package/dist/scripts/notify-hook/log.d.ts +2 -2
  159. package/dist/scripts/notify-hook/log.d.ts.map +1 -1
  160. package/dist/scripts/notify-hook/log.js +10 -2
  161. package/dist/scripts/notify-hook/log.js.map +1 -1
  162. package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
  163. package/dist/scripts/notify-hook/managed-tmux.js +2 -0
  164. package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
  165. package/dist/scripts/notify-hook/orchestration-intent.d.ts +18 -0
  166. package/dist/scripts/notify-hook/orchestration-intent.d.ts.map +1 -0
  167. package/dist/scripts/notify-hook/orchestration-intent.js +72 -0
  168. package/dist/scripts/notify-hook/orchestration-intent.js.map +1 -0
  169. package/dist/scripts/notify-hook/process-runner.js.map +1 -1
  170. package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +1 -1
  171. package/dist/scripts/notify-hook/ralph-session-resume.js +7 -0
  172. package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -1
  173. package/dist/scripts/notify-hook/team-dispatch.d.ts +15 -6
  174. package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
  175. package/dist/scripts/notify-hook/team-dispatch.js +125 -6
  176. package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
  177. package/dist/scripts/notify-hook/team-leader-nudge.d.ts +3 -2
  178. package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
  179. package/dist/scripts/notify-hook/team-leader-nudge.js +165 -37
  180. package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
  181. package/dist/scripts/notify-hook/team-tmux-guard.d.ts +4 -1
  182. package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
  183. package/dist/scripts/notify-hook/team-tmux-guard.js +33 -44
  184. package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
  185. package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
  186. package/dist/scripts/notify-hook/team-worker.js +68 -5
  187. package/dist/scripts/notify-hook/team-worker.js.map +1 -1
  188. package/dist/scripts/notify-hook/utils.d.ts +1 -1
  189. package/dist/scripts/notify-hook/utils.d.ts.map +1 -1
  190. package/dist/scripts/notify-hook/utils.js.map +1 -1
  191. package/dist/scripts/notify-hook.js +55 -32
  192. package/dist/scripts/notify-hook.js.map +1 -1
  193. package/dist/team/__tests__/api-interop.test.js +344 -18
  194. package/dist/team/__tests__/api-interop.test.js.map +1 -1
  195. package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts +2 -0
  196. package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts.map +1 -0
  197. package/dist/team/__tests__/delivery-e2e-smoke.test.js +671 -0
  198. package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -0
  199. package/dist/team/__tests__/mcp-comm.test.js +5 -0
  200. package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
  201. package/dist/team/__tests__/runtime.test.js +422 -12
  202. package/dist/team/__tests__/runtime.test.js.map +1 -1
  203. package/dist/team/__tests__/state.test.js +126 -8
  204. package/dist/team/__tests__/state.test.js.map +1 -1
  205. package/dist/team/__tests__/team-ops-contract.test.js +4 -0
  206. package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
  207. package/dist/team/__tests__/tmux-session.test.js +160 -0
  208. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  209. package/dist/team/__tests__/worker-bootstrap.test.js +19 -1
  210. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  211. package/dist/team/api-interop.d.ts.map +1 -1
  212. package/dist/team/api-interop.js +95 -23
  213. package/dist/team/api-interop.js.map +1 -1
  214. package/dist/team/contracts.d.ts +11 -1
  215. package/dist/team/contracts.d.ts.map +1 -1
  216. package/dist/team/contracts.js +29 -0
  217. package/dist/team/contracts.js.map +1 -1
  218. package/dist/team/delivery-log.d.ts +14 -0
  219. package/dist/team/delivery-log.d.ts.map +1 -0
  220. package/dist/team/delivery-log.js +35 -0
  221. package/dist/team/delivery-log.js.map +1 -0
  222. package/dist/team/idle-nudge.d.ts +2 -2
  223. package/dist/team/idle-nudge.js +2 -2
  224. package/dist/team/mcp-comm.d.ts +4 -0
  225. package/dist/team/mcp-comm.d.ts.map +1 -1
  226. package/dist/team/mcp-comm.js +84 -1
  227. package/dist/team/mcp-comm.js.map +1 -1
  228. package/dist/team/pane-status.d.ts +149 -0
  229. package/dist/team/pane-status.d.ts.map +1 -0
  230. package/dist/team/pane-status.js +558 -0
  231. package/dist/team/pane-status.js.map +1 -0
  232. package/dist/team/reminder-intents.d.ts +11 -0
  233. package/dist/team/reminder-intents.d.ts.map +1 -0
  234. package/dist/team/reminder-intents.js +40 -0
  235. package/dist/team/reminder-intents.js.map +1 -0
  236. package/dist/team/runtime-cli.d.ts +1 -1
  237. package/dist/team/runtime-cli.js +2 -2
  238. package/dist/team/runtime-cli.js.map +1 -1
  239. package/dist/team/runtime.d.ts +2 -1
  240. package/dist/team/runtime.d.ts.map +1 -1
  241. package/dist/team/runtime.js +407 -190
  242. package/dist/team/runtime.js.map +1 -1
  243. package/dist/team/scaling.d.ts.map +1 -1
  244. package/dist/team/scaling.js +6 -5
  245. package/dist/team/scaling.js.map +1 -1
  246. package/dist/team/state/dispatch.d.ts +4 -1
  247. package/dist/team/state/dispatch.d.ts.map +1 -1
  248. package/dist/team/state/dispatch.js +59 -18
  249. package/dist/team/state/dispatch.js.map +1 -1
  250. package/dist/team/state/mailbox.d.ts.map +1 -1
  251. package/dist/team/state/mailbox.js +39 -2
  252. package/dist/team/state/mailbox.js.map +1 -1
  253. package/dist/team/state/monitor.d.ts +2 -1
  254. package/dist/team/state/monitor.d.ts.map +1 -1
  255. package/dist/team/state/monitor.js +30 -1
  256. package/dist/team/state/monitor.js.map +1 -1
  257. package/dist/team/state/types.d.ts +5 -2
  258. package/dist/team/state/types.d.ts.map +1 -1
  259. package/dist/team/state/types.js.map +1 -1
  260. package/dist/team/state.d.ts +30 -3
  261. package/dist/team/state.d.ts.map +1 -1
  262. package/dist/team/state.js +170 -2
  263. package/dist/team/state.js.map +1 -1
  264. package/dist/team/team-ops.d.ts +5 -1
  265. package/dist/team/team-ops.d.ts.map +1 -1
  266. package/dist/team/team-ops.js +4 -0
  267. package/dist/team/team-ops.js.map +1 -1
  268. package/dist/team/tmux-session.d.ts +2 -0
  269. package/dist/team/tmux-session.d.ts.map +1 -1
  270. package/dist/team/tmux-session.js +19 -3
  271. package/dist/team/tmux-session.js.map +1 -1
  272. package/dist/team/worker-bootstrap.d.ts +4 -0
  273. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  274. package/dist/team/worker-bootstrap.js +33 -6
  275. package/dist/team/worker-bootstrap.js.map +1 -1
  276. package/dist/utils/__tests__/paths.test.js +63 -1
  277. package/dist/utils/__tests__/paths.test.js.map +1 -1
  278. package/dist/utils/__tests__/platform-command.test.js +50 -4
  279. package/dist/utils/__tests__/platform-command.test.js.map +1 -1
  280. package/dist/utils/paths.d.ts +12 -0
  281. package/dist/utils/paths.d.ts.map +1 -1
  282. package/dist/utils/paths.js +44 -2
  283. package/dist/utils/paths.js.map +1 -1
  284. package/dist/utils/platform-command.d.ts.map +1 -1
  285. package/dist/utils/platform-command.js +13 -5
  286. package/dist/utils/platform-command.js.map +1 -1
  287. package/dist/utils/sleep.d.ts.map +1 -1
  288. package/dist/utils/sleep.js +10 -1
  289. package/dist/utils/sleep.js.map +1 -1
  290. package/package.json +1 -1
  291. package/prompts/analyst.md +2 -2
  292. package/prompts/api-reviewer.md +2 -2
  293. package/prompts/architect.md +2 -2
  294. package/prompts/build-fixer.md +2 -2
  295. package/prompts/code-reviewer.md +2 -2
  296. package/prompts/code-simplifier.md +1 -1
  297. package/prompts/critic.md +2 -2
  298. package/prompts/debugger.md +3 -2
  299. package/prompts/dependency-expert.md +2 -2
  300. package/prompts/designer.md +2 -2
  301. package/prompts/executor.md +3 -2
  302. package/prompts/explore.md +2 -2
  303. package/prompts/git-master.md +2 -2
  304. package/prompts/information-architect.md +2 -2
  305. package/prompts/performance-reviewer.md +2 -2
  306. package/prompts/planner.md +3 -2
  307. package/prompts/product-analyst.md +2 -2
  308. package/prompts/product-manager.md +2 -2
  309. package/prompts/qa-tester.md +2 -2
  310. package/prompts/quality-reviewer.md +2 -2
  311. package/prompts/quality-strategist.md +2 -2
  312. package/prompts/researcher.md +2 -2
  313. package/prompts/security-reviewer.md +2 -2
  314. package/prompts/sisyphus-lite.md +2 -2
  315. package/prompts/style-reviewer.md +2 -2
  316. package/prompts/team-executor.md +2 -2
  317. package/prompts/test-engineer.md +2 -2
  318. package/prompts/ux-researcher.md +2 -2
  319. package/prompts/verifier.md +3 -2
  320. package/prompts/vision.md +2 -2
  321. package/prompts/writer.md +2 -2
  322. package/skills/team/SKILL.md +18 -33
  323. package/src/scripts/__tests__/codex-native-hook.test.ts +931 -0
  324. package/src/scripts/codex-native-hook.ts +721 -0
  325. package/src/scripts/codex-native-pre-post.ts +161 -0
  326. package/src/scripts/notify-fallback-watcher.ts +318 -26
  327. package/src/scripts/notify-hook/auto-nudge.ts +5 -10
  328. package/src/scripts/notify-hook/log.ts +18 -4
  329. package/src/scripts/notify-hook/managed-tmux.ts +1 -0
  330. package/src/scripts/notify-hook/orchestration-intent.ts +82 -0
  331. package/src/scripts/notify-hook/process-runner.ts +4 -4
  332. package/src/scripts/notify-hook/ralph-session-resume.ts +9 -0
  333. package/src/scripts/notify-hook/team-dispatch.ts +134 -6
  334. package/src/scripts/notify-hook/team-leader-nudge.ts +183 -37
  335. package/src/scripts/notify-hook/team-tmux-guard.ts +35 -43
  336. package/src/scripts/notify-hook/team-worker.ts +73 -4
  337. package/src/scripts/notify-hook/utils.ts +1 -1
  338. package/src/scripts/notify-hook.ts +64 -32
  339. package/templates/AGENTS.md +21 -11
  340. package/README.de.md +0 -263
  341. package/README.el.md +0 -223
  342. package/README.es.md +0 -263
  343. package/README.fr.md +0 -263
  344. package/README.it.md +0 -263
  345. package/README.ja.md +0 -264
  346. package/README.ko.md +0 -264
  347. package/README.pl.md +0 -216
  348. package/README.pt.md +0 -263
  349. package/README.ru.md +0 -263
  350. package/README.tr.md +0 -263
  351. package/README.vi.md +0 -223
  352. package/README.zh-TW.md +0 -293
  353. package/README.zh.md +0 -264
  354. package/dist/mcp/__tests__/team-server-cleanup.test.d.ts +0 -2
  355. package/dist/mcp/__tests__/team-server-cleanup.test.d.ts.map +0 -1
  356. package/dist/mcp/__tests__/team-server-cleanup.test.js +0 -219
  357. package/dist/mcp/__tests__/team-server-cleanup.test.js.map +0 -1
  358. package/dist/mcp/__tests__/team-server-runtime-deps.test.d.ts +0 -2
  359. package/dist/mcp/__tests__/team-server-runtime-deps.test.d.ts.map +0 -1
  360. package/dist/mcp/__tests__/team-server-runtime-deps.test.js +0 -13
  361. package/dist/mcp/__tests__/team-server-runtime-deps.test.js.map +0 -1
  362. package/dist/mcp/__tests__/team-server-wait.test.d.ts +0 -2
  363. package/dist/mcp/__tests__/team-server-wait.test.d.ts.map +0 -1
  364. package/dist/mcp/__tests__/team-server-wait.test.js +0 -155
  365. package/dist/mcp/__tests__/team-server-wait.test.js.map +0 -1
  366. package/dist/mcp/team-server.d.ts +0 -24
  367. package/dist/mcp/team-server.d.ts.map +0 -1
  368. package/dist/mcp/team-server.js +0 -482
  369. package/dist/mcp/team-server.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=debugger-log-recency-contract.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugger-log-recency-contract.test.d.ts","sourceRoot":"","sources":["../../../src/hooks/__tests__/debugger-log-recency-contract.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { describe, it } from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import { loadSurface } from './prompt-guidance-test-helpers.js';
4
+ describe('debugger log recency guidance contract', () => {
5
+ it('root guidance prioritizes newer same-thread evidence over stale context', () => {
6
+ for (const surface of ['AGENTS.md', 'templates/AGENTS.md']) {
7
+ const content = loadSurface(surface);
8
+ assert.match(content, /newer same-thread evidence/i);
9
+ assert.match(content, /current source of truth/i);
10
+ assert.match(content, /do not anchor on older evidence unless the user reaffirms it/i);
11
+ }
12
+ });
13
+ it('debugger guidance prioritizes the latest logs in the current turn', () => {
14
+ const content = loadSurface('prompts/debugger.md');
15
+ assert.match(content, /newly provided logs, stack traces, and diagnostics in the current turn/i);
16
+ assert.match(content, /primary evidence/i);
17
+ assert.match(content, /instead of anchoring on older logs/i);
18
+ });
19
+ });
20
+ //# sourceMappingURL=debugger-log-recency-contract.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugger-log-recency-contract.test.js","sourceRoot":"","sources":["../../../src/hooks/__tests__/debugger-log-recency-contract.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,QAAQ,CAAC,wCAAwC,EAAE,GAAG,EAAE;IACtD,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;QACjF,KAAK,MAAM,OAAO,IAAI,CAAC,WAAW,EAAE,qBAAqB,CAAC,EAAE,CAAC;YAC3D,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;YACrC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC;YACrD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,0BAA0B,CAAC,CAAC;YAClD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,+DAA+D,CAAC,CAAC;QACzF,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,MAAM,OAAO,GAAG,WAAW,CAAC,qBAAqB,CAAC,CAAC;QACnD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,yEAAyE,CAAC,CAAC;QACjG,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,qCAAqC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -22,6 +22,14 @@ async function readLines(path) {
22
22
  const content = await readFile(path, 'utf-8').catch(() => '');
23
23
  return content.split('\n').map(s => s.trim()).filter(Boolean);
24
24
  }
25
+ async function readJsonLines(path) {
26
+ const content = await readFile(path, 'utf-8').catch(() => '');
27
+ return content
28
+ .split('\n')
29
+ .map((line) => line.trim())
30
+ .filter(Boolean)
31
+ .map((line) => JSON.parse(line));
32
+ }
25
33
  async function sleep(ms) {
26
34
  await new Promise(resolve => setTimeout(resolve, ms));
27
35
  }
@@ -452,6 +460,70 @@ describe('notify-fallback watcher', () => {
452
460
  await rm(wd, { recursive: true, force: true });
453
461
  }
454
462
  });
463
+ it('backs off authority-only nudge ticks when the primary watcher is healthy', async () => {
464
+ const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-authority-backed-off-'));
465
+ const fakeBinDir = join(wd, 'fake-bin');
466
+ const tmuxLogPath = join(wd, 'tmux.log');
467
+ const codexHome = join(wd, 'codex-home');
468
+ try {
469
+ await mkdir(join(wd, '.omx', 'logs'), { recursive: true });
470
+ await mkdir(join(wd, '.omx', 'state'), { recursive: true });
471
+ await mkdir(fakeBinDir, { recursive: true });
472
+ await mkdir(codexHome, { recursive: true });
473
+ await writeFile(join(fakeBinDir, 'tmux'), buildFakeTmux(tmuxLogPath));
474
+ await chmod(join(fakeBinDir, 'tmux'), 0o755);
475
+ await writeFile(join(codexHome, '.omx-config.json'), JSON.stringify({
476
+ autoNudge: { enabled: true, delaySec: 0, ttlMs: 30_000 },
477
+ }, null, 2));
478
+ await writeSessionStart(wd, 'sess-managed-fallback');
479
+ await writeFile(join(wd, '.omx', 'state', 'hud-state.json'), JSON.stringify({
480
+ last_turn_at: new Date(Date.now() - 6_000).toISOString(),
481
+ turn_count: 7,
482
+ last_agent_output: 'If you want, I can keep going from here.',
483
+ }, null, 2));
484
+ await writeFile(join(wd, '.omx', 'state', 'notify-fallback.pid'), JSON.stringify({
485
+ pid: process.pid,
486
+ cwd: wd,
487
+ started_at: new Date().toISOString(),
488
+ }, null, 2));
489
+ await writeFile(join(wd, '.omx', 'state', 'notify-fallback-state.json'), JSON.stringify({
490
+ pid: process.pid,
491
+ cwd: wd,
492
+ authority_only: false,
493
+ poll_ms: 250,
494
+ dispatch_drain: { last_tick_at: new Date().toISOString() },
495
+ }, null, 2));
496
+ const watcherScript = new URL('../../../dist/scripts/notify-fallback-watcher.js', import.meta.url).pathname;
497
+ const notifyHook = new URL('../../../dist/scripts/notify-hook.js', import.meta.url).pathname;
498
+ const result = spawnSync(process.execPath, [watcherScript, '--once', '--authority-only', '--cwd', wd, '--notify-script', notifyHook, '--poll-ms', '50'], {
499
+ encoding: 'utf-8',
500
+ env: buildCleanNotifyEnv({
501
+ PATH: `${fakeBinDir}:${process.env.PATH || ''}`,
502
+ CODEX_HOME: codexHome,
503
+ OMX_SESSION_ID: 'sess-managed-fallback',
504
+ TMUX: '1',
505
+ TMUX_PANE: '%42',
506
+ OMX_NOTIFY_FALLBACK_AUTO_NUDGE_STALL_MS: '5000',
507
+ }),
508
+ });
509
+ assert.equal(result.status, 0, result.stderr || result.stdout);
510
+ const tmuxLog = await readFile(tmuxLogPath, 'utf8').catch(() => '');
511
+ assert.doesNotMatch(tmuxLog, /send-keys -t %42 -l yes, proceed \[OMX_TMUX_INJECT\]/);
512
+ const watcherState = JSON.parse(await readFile(join(wd, '.omx', 'state', 'notify-fallback-state.json'), 'utf-8'));
513
+ assert.equal(watcherState.pid, process.pid, 'authority backoff should preserve the primary watcher state owner');
514
+ assert.equal(watcherState.authority_only, false, 'authority backoff should not overwrite primary watcher ownership');
515
+ assert.equal(watcherState.authority_backoff?.active, true);
516
+ assert.equal(watcherState.authority_backoff?.reason, 'primary_watcher_healthy');
517
+ assert.equal(watcherState.authority_backoff?.primary_pid, process.pid);
518
+ assert.match(watcherState.dispatch_drain?.last_tick_at ?? '', /^\d{4}-\d{2}-\d{2}T/);
519
+ const logPath = join(wd, '.omx', 'logs', `notify-fallback-${new Date().toISOString().split('T')[0]}.jsonl`);
520
+ const logContent = await readFile(logPath, 'utf-8').catch(() => '');
521
+ assert.equal(logContent.trim(), '');
522
+ }
523
+ finally {
524
+ await rm(wd, { recursive: true, force: true });
525
+ }
526
+ });
455
527
  it('disables fallback watcher nudges when deep-interview state is active', async () => {
456
528
  const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-deep-interview-suppressed-'));
457
529
  const fakeBinDir = join(wd, 'fake-bin');
@@ -600,7 +672,7 @@ describe('notify-fallback watcher', () => {
600
672
  });
601
673
  assert.equal(result.status, 0, result.stderr || result.stdout);
602
674
  const tmuxLog = await readFile(tmuxLogPath, 'utf8');
603
- assert.match(tmuxLog, /send-keys -t %42 -l Team dispatch-team: leader stale/);
675
+ assert.match(tmuxLog, /send-keys -t %42 -l Team dispatch-team: leader stale, \d+ worker pane\(s\) still active\./);
604
676
  const watcherStatePath = join(wd, '.omx', 'state', 'notify-fallback-state.json');
605
677
  const watcherState = JSON.parse(await readFile(watcherStatePath, 'utf-8'));
606
678
  assert.equal(watcherState.poll_ms, 250);
@@ -614,6 +686,12 @@ describe('notify-fallback watcher', () => {
614
686
  assert.ok(nudgeEvent, 'expected leader_nudge_tick log event');
615
687
  assert.equal(nudgeEvent.leader_only, true);
616
688
  assert.equal(nudgeEvent.precomputed_leader_stale, true);
689
+ const deliveryLogPath = join(wd, '.omx', 'logs', `team-delivery-${new Date().toISOString().slice(0, 10)}.jsonl`);
690
+ const deliveryEntries = await readJsonLines(deliveryLogPath);
691
+ assert.ok(deliveryEntries.some((entry) => entry.event === 'nudge_triggered'
692
+ && entry.source === 'notify_fallback_watcher'
693
+ && entry.transport === 'send-keys'
694
+ && entry.result === 'sent'));
617
695
  }
618
696
  finally {
619
697
  await rm(wd, { recursive: true, force: true });
@@ -842,7 +920,7 @@ exit 0
842
920
  });
843
921
  assert.equal(result.status, 0, result.stderr || result.stdout);
844
922
  const tmuxLog = await readFile(tmuxLogPath, 'utf8');
845
- assert.match(tmuxLog, /send-keys -t %42 -l Team dispatch-team: worker panes stalled, no progress 3m/);
923
+ assert.match(tmuxLog, /send-keys -t %42 -l Team dispatch-team: worker panes stalled, no progress 3m\./);
846
924
  assert.doesNotMatch(tmuxLog, /leader stale/);
847
925
  const watcherStatePath = join(wd, '.omx', 'state', 'notify-fallback-state.json');
848
926
  const watcherState = JSON.parse(await readFile(watcherStatePath, 'utf-8'));
@@ -1398,6 +1476,83 @@ exit 0
1398
1476
  await rm(wd, { recursive: true, force: true });
1399
1477
  }
1400
1478
  });
1479
+ it('suppresses Ralph continue steer while tracked native subagents are still active', async () => {
1480
+ const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-ralph-subagents-active-'));
1481
+ const fakeBinDir = join(wd, 'fake-bin');
1482
+ const stateDir = join(wd, '.omx', 'state');
1483
+ const tmuxLogPath = join(wd, 'tmux.log');
1484
+ const statePath = join(stateDir, 'notify-fallback-state.json');
1485
+ const omxSessionId = 'sess-current';
1486
+ const codexSessionId = 'codex-session-1';
1487
+ try {
1488
+ await mkdir(join(stateDir, 'sessions', omxSessionId), { recursive: true });
1489
+ await mkdir(fakeBinDir, { recursive: true });
1490
+ await writeFile(join(fakeBinDir, 'tmux'), buildFakeTmux(tmuxLogPath));
1491
+ await chmod(join(fakeBinDir, 'tmux'), 0o755);
1492
+ await writeSessionStart(wd, omxSessionId);
1493
+ await writeFile(join(stateDir, 'sessions', omxSessionId, 'ralph-state.json'), JSON.stringify({
1494
+ active: true,
1495
+ current_phase: 'executing',
1496
+ tmux_pane_id: '%42',
1497
+ owner_omx_session_id: omxSessionId,
1498
+ owner_codex_session_id: codexSessionId,
1499
+ }, null, 2));
1500
+ await writeFile(join(stateDir, 'hud-state.json'), JSON.stringify({
1501
+ last_progress_at: new Date(Date.now() - 61_000).toISOString(),
1502
+ }, null, 2));
1503
+ await writeFile(statePath, JSON.stringify({
1504
+ ralph_continue_steer: {
1505
+ last_sent_at: new Date(Date.now() - 61_000).toISOString(),
1506
+ },
1507
+ }, null, 2));
1508
+ await writeFile(join(stateDir, 'subagent-tracking.json'), JSON.stringify({
1509
+ schemaVersion: 1,
1510
+ sessions: {
1511
+ [codexSessionId]: {
1512
+ session_id: codexSessionId,
1513
+ leader_thread_id: 'leader-thread',
1514
+ updated_at: new Date(Date.now() - 15_000).toISOString(),
1515
+ threads: {
1516
+ 'leader-thread': {
1517
+ thread_id: 'leader-thread',
1518
+ kind: 'leader',
1519
+ first_seen_at: new Date(Date.now() - 30_000).toISOString(),
1520
+ last_seen_at: new Date(Date.now() - 15_000).toISOString(),
1521
+ turn_count: 1,
1522
+ mode: 'ralph',
1523
+ },
1524
+ 'sub-thread-1': {
1525
+ thread_id: 'sub-thread-1',
1526
+ kind: 'subagent',
1527
+ first_seen_at: new Date(Date.now() - 30_000).toISOString(),
1528
+ last_seen_at: new Date(Date.now() - 15_000).toISOString(),
1529
+ turn_count: 1,
1530
+ mode: 'ralph',
1531
+ },
1532
+ },
1533
+ },
1534
+ },
1535
+ }, null, 2));
1536
+ const watcherScript = new URL('../../../dist/scripts/notify-fallback-watcher.js', import.meta.url).pathname;
1537
+ const notifyHook = new URL('../../../dist/scripts/notify-hook.js', import.meta.url).pathname;
1538
+ const env = {
1539
+ ...buildCleanNotifyEnv(),
1540
+ PATH: `${fakeBinDir}:${process.env.PATH || ''}`,
1541
+ };
1542
+ const run = spawnSync(process.execPath, [watcherScript, '--once', '--cwd', wd, '--notify-script', notifyHook, '--poll-ms', '50'], { encoding: 'utf-8', env });
1543
+ assert.equal(run.status, 0, run.stderr || run.stdout);
1544
+ const tmuxLog = await readFile(tmuxLogPath, 'utf8').catch(() => '');
1545
+ const sends = tmuxLog.match(/send-keys -t %42 -l Ralph loop active continue \[OMX_TMUX_INJECT\]/g) || [];
1546
+ assert.equal(sends.length, 0, 'active native subagents should block fallback continue steer');
1547
+ const watcherState = JSON.parse(await readFile(statePath, 'utf-8'));
1548
+ assert.equal(watcherState.ralph_continue_steer?.last_reason, 'subagents_active');
1549
+ assert.equal(watcherState.ralph_continue_steer?.subagent_session_id, codexSessionId);
1550
+ assert.deepEqual(watcherState.ralph_continue_steer?.active_subagent_thread_ids, ['sub-thread-1']);
1551
+ }
1552
+ finally {
1553
+ await rm(wd, { recursive: true, force: true });
1554
+ }
1555
+ });
1401
1556
  it('fails closed when Ralph hud progress is missing or invalid', async () => {
1402
1557
  const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-ralph-progress-guard-'));
1403
1558
  const fakeBinDir = join(wd, 'fake-bin');
@@ -2263,6 +2418,85 @@ exit 0
2263
2418
  await rm(tempHome, { recursive: true, force: true });
2264
2419
  }
2265
2420
  });
2421
+ it('backs off idle polling and resets to the base cadence after fresh rollout activity', async () => {
2422
+ const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-idle-backoff-'));
2423
+ const tempHome = await mkdtemp(join(tmpdir(), 'omx-fallback-idle-backoff-home-'));
2424
+ const sid = randomUUID();
2425
+ const sessionDir = todaySessionDir(tempHome);
2426
+ const rolloutPath = join(sessionDir, `rollout-test-fallback-idle-backoff-${sid}.jsonl`);
2427
+ const watcherScript = new URL('../../../dist/scripts/notify-fallback-watcher.js', import.meta.url).pathname;
2428
+ const notifyHook = new URL('../../../dist/scripts/notify-hook.js', import.meta.url).pathname;
2429
+ const watcherStatePath = join(wd, '.omx', 'state', 'notify-fallback-state.json');
2430
+ const turnLogPath = join(wd, '.omx', 'logs', `turns-${new Date().toISOString().split('T')[0]}.jsonl`);
2431
+ let child;
2432
+ try {
2433
+ await mkdir(join(wd, '.omx', 'logs'), { recursive: true });
2434
+ await mkdir(join(wd, '.omx', 'state'), { recursive: true });
2435
+ await mkdir(sessionDir, { recursive: true });
2436
+ await writeFile(rolloutPath, `${JSON.stringify({
2437
+ timestamp: new Date().toISOString(),
2438
+ type: 'session_meta',
2439
+ payload: { id: `thread-${sid}`, cwd: wd },
2440
+ })}
2441
+ `);
2442
+ child = spawn(process.execPath, [
2443
+ watcherScript,
2444
+ '--cwd',
2445
+ wd,
2446
+ '--notify-script',
2447
+ notifyHook,
2448
+ '--poll-ms',
2449
+ '50',
2450
+ '--idle-max-poll-ms',
2451
+ '200',
2452
+ '--parent-pid',
2453
+ String(process.pid),
2454
+ '--max-lifetime-ms',
2455
+ '5000',
2456
+ ], {
2457
+ cwd: wd,
2458
+ stdio: 'ignore',
2459
+ env: buildCleanNotifyEnv({ HOME: tempHome, OMX_NOTIFY_FALLBACK_IDLE_MAX_POLL_MS: '200' }),
2460
+ });
2461
+ await waitFor(async () => {
2462
+ try {
2463
+ const watcherState = JSON.parse(await readFile(watcherStatePath, 'utf-8'));
2464
+ return watcherState.adaptive_poll?.current_ms === 200 && watcherState.adaptive_poll?.idle_streak >= 2;
2465
+ }
2466
+ catch {
2467
+ return false;
2468
+ }
2469
+ }, 4000, 50);
2470
+ const freshTurnId = `turn-fresh-${sid}`;
2471
+ await appendLine(rolloutPath, {
2472
+ timestamp: new Date().toISOString(),
2473
+ type: 'event_msg',
2474
+ payload: {
2475
+ type: 'task_complete',
2476
+ turn_id: freshTurnId,
2477
+ last_agent_message: 'fresh message after idle backoff',
2478
+ },
2479
+ });
2480
+ await waitFor(async () => {
2481
+ const turnLines = await readLines(turnLogPath);
2482
+ if (!turnLines.some((line) => line.includes(freshTurnId)))
2483
+ return false;
2484
+ const watcherState = JSON.parse(await readFile(watcherStatePath, 'utf-8'));
2485
+ return watcherState.adaptive_poll?.current_ms === 50
2486
+ && watcherState.adaptive_poll?.idle_streak === 0
2487
+ && watcherState.adaptive_poll?.last_activity_reason === 'rollout_event';
2488
+ }, 4000, 50);
2489
+ }
2490
+ finally {
2491
+ if (child && isPidAlive(child.pid)) {
2492
+ child.kill('SIGTERM');
2493
+ await waitForExit(child, 4000).catch(() => { });
2494
+ }
2495
+ await rm(wd, { recursive: true, force: true });
2496
+ await rm(tempHome, { recursive: true, force: true });
2497
+ await rm(rolloutPath, { force: true });
2498
+ }
2499
+ });
2266
2500
  it('exits after the configured max lifetime', async () => {
2267
2501
  const wd = await mkdtemp(join(tmpdir(), 'omx-fallback-max-life-'));
2268
2502
  const tempHome = await mkdtemp(join(tmpdir(), 'omx-fallback-max-home-'));