claudecode-omc 4.4.4 → 4.4.6

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 (842) hide show
  1. package/.mcp.json +2 -6
  2. package/README.es.md +64 -8
  3. package/README.ja.md +64 -8
  4. package/README.ko.md +64 -8
  5. package/README.pt.md +29 -0
  6. package/README.vi.md +29 -0
  7. package/README.zh.md +64 -8
  8. package/agents/architect.md +17 -7
  9. package/agents/code-reviewer.md +6 -7
  10. package/agents/critic.md +14 -1
  11. package/agents/deep-executor.md +6 -7
  12. package/agents/designer.md +6 -8
  13. package/agents/executor.md +6 -7
  14. package/agents/planner.md +21 -0
  15. package/agents/quality-reviewer.md +6 -7
  16. package/agents/security-reviewer.md +6 -7
  17. package/agents/test-engineer.md +6 -7
  18. package/bridge/mcp-server.cjs +517 -202
  19. package/bridge/runtime-cli.cjs +1547 -0
  20. package/bridge/team-bridge.cjs +348 -92
  21. package/bridge/{gemini-server.cjs → team-mcp.cjs} +10914 -10240
  22. package/dist/__tests__/auto-update.test.js +1 -1
  23. package/dist/__tests__/auto-update.test.js.map +1 -1
  24. package/dist/__tests__/cli-win32-warning.test.d.ts +2 -0
  25. package/dist/__tests__/cli-win32-warning.test.d.ts.map +1 -0
  26. package/dist/__tests__/cli-win32-warning.test.js +46 -0
  27. package/dist/__tests__/cli-win32-warning.test.js.map +1 -0
  28. package/dist/__tests__/codex-callsite-normalization.test.js +112 -0
  29. package/dist/__tests__/consensus-execution-handoff.test.d.ts +2 -0
  30. package/dist/__tests__/consensus-execution-handoff.test.d.ts.map +1 -1
  31. package/dist/__tests__/consensus-execution-handoff.test.js +48 -0
  32. package/dist/__tests__/consensus-execution-handoff.test.js.map +1 -1
  33. package/dist/__tests__/context-safety.test.d.ts +2 -0
  34. package/dist/__tests__/context-safety.test.d.ts.map +1 -0
  35. package/dist/__tests__/context-safety.test.js +59 -0
  36. package/dist/__tests__/context-safety.test.js.map +1 -0
  37. package/dist/__tests__/hooks.test.js +15 -0
  38. package/dist/__tests__/hooks.test.js.map +1 -1
  39. package/dist/__tests__/hud/call-counts.test.js +0 -3
  40. package/dist/__tests__/hud/call-counts.test.js.map +1 -1
  41. package/dist/__tests__/hud/defaults.test.js +3 -5
  42. package/dist/__tests__/hud/defaults.test.js.map +1 -1
  43. package/dist/__tests__/hud/prompt-time.test.d.ts +2 -0
  44. package/dist/__tests__/hud/prompt-time.test.d.ts.map +1 -0
  45. package/dist/__tests__/hud/prompt-time.test.js +24 -0
  46. package/dist/__tests__/hud/prompt-time.test.js.map +1 -0
  47. package/dist/__tests__/hud/render.test.js +0 -1
  48. package/dist/__tests__/hud/render.test.js.map +1 -1
  49. package/dist/__tests__/hud/version-display.test.js +1 -0
  50. package/dist/__tests__/hud/version-display.test.js.map +1 -1
  51. package/dist/__tests__/hud/windows-platform.test.js +0 -4
  52. package/dist/__tests__/hud/windows-platform.test.js.map +1 -1
  53. package/dist/__tests__/hud-windows.test.js +5 -3
  54. package/dist/__tests__/hud-windows.test.js.map +1 -1
  55. package/dist/__tests__/installer-hud-skip.test.js +12 -2
  56. package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
  57. package/dist/__tests__/job-management-sqlite.test.js +0 -15
  58. package/dist/__tests__/job-management-sqlite.test.js.map +1 -1
  59. package/dist/__tests__/job-management.test.js +0 -16
  60. package/dist/__tests__/job-management.test.js.map +1 -1
  61. package/dist/__tests__/load-agent-prompt.test.js +0 -23
  62. package/dist/__tests__/load-agent-prompt.test.js.map +1 -1
  63. package/dist/__tests__/model-routing.test.js +3 -2
  64. package/dist/__tests__/model-routing.test.js.map +1 -1
  65. package/dist/__tests__/omc-tools-server-interop.test.js +1 -1
  66. package/dist/__tests__/omc-tools-server-interop.test.js.map +1 -1
  67. package/dist/__tests__/pre-tool-enforcer.test.d.ts +2 -0
  68. package/dist/__tests__/pre-tool-enforcer.test.d.ts.map +1 -0
  69. package/dist/__tests__/pre-tool-enforcer.test.js +194 -0
  70. package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -0
  71. package/dist/__tests__/prompt-injection.test.js +0 -26
  72. package/dist/__tests__/prompt-injection.test.js.map +1 -1
  73. package/dist/__tests__/purge-stale-cache.test.js +3 -2
  74. package/dist/__tests__/purge-stale-cache.test.js.map +1 -1
  75. package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts +2 -0
  76. package/dist/__tests__/run-cjs-graceful-fallback.test.d.ts.map +1 -0
  77. package/dist/__tests__/run-cjs-graceful-fallback.test.js +167 -0
  78. package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -0
  79. package/dist/__tests__/session-start-cache-cleanup.test.d.ts +2 -0
  80. package/dist/__tests__/session-start-cache-cleanup.test.d.ts.map +1 -0
  81. package/dist/__tests__/session-start-cache-cleanup.test.js +150 -0
  82. package/dist/__tests__/session-start-cache-cleanup.test.js.map +1 -0
  83. package/dist/__tests__/skills.test.js +10 -8
  84. package/dist/__tests__/skills.test.js.map +1 -1
  85. package/dist/__tests__/team-server-validation.test.d.ts +2 -0
  86. package/dist/__tests__/team-server-validation.test.d.ts.map +1 -0
  87. package/dist/__tests__/team-server-validation.test.js +122 -0
  88. package/dist/__tests__/team-server-validation.test.js.map +1 -0
  89. package/dist/agents/index.d.ts +0 -1
  90. package/dist/agents/index.d.ts.map +1 -1
  91. package/dist/agents/index.js +0 -2
  92. package/dist/agents/index.js.map +1 -1
  93. package/dist/agents/prompt-helpers.d.ts +74 -0
  94. package/dist/agents/prompt-helpers.d.ts.map +1 -0
  95. package/dist/agents/prompt-helpers.js +187 -0
  96. package/dist/agents/prompt-helpers.js.map +1 -0
  97. package/dist/agents/utils.d.ts +1 -5
  98. package/dist/agents/utils.d.ts.map +1 -1
  99. package/dist/agents/utils.js +1 -34
  100. package/dist/agents/utils.js.map +1 -1
  101. package/dist/cli/__tests__/launch.test.d.ts +1 -2
  102. package/dist/cli/__tests__/launch.test.d.ts.map +1 -1
  103. package/dist/cli/__tests__/launch.test.js +442 -48
  104. package/dist/cli/__tests__/launch.test.js.map +1 -1
  105. package/dist/cli/__tests__/teleport-help.test.d.ts +2 -0
  106. package/dist/cli/__tests__/teleport-help.test.d.ts.map +1 -0
  107. package/dist/cli/__tests__/teleport-help.test.js +17 -0
  108. package/dist/cli/__tests__/teleport-help.test.js.map +1 -0
  109. package/dist/cli/commands/teleport.d.ts +2 -1
  110. package/dist/cli/commands/teleport.d.ts.map +1 -1
  111. package/dist/cli/commands/teleport.js +6 -3
  112. package/dist/cli/commands/teleport.js.map +1 -1
  113. package/dist/cli/index.js +40 -290
  114. package/dist/cli/index.js.map +1 -1
  115. package/dist/cli/launch.d.ts +83 -3
  116. package/dist/cli/launch.d.ts.map +1 -1
  117. package/dist/cli/launch.js +213 -48
  118. package/dist/cli/launch.js.map +1 -1
  119. package/dist/cli/win32-warning.d.ts +6 -0
  120. package/dist/cli/win32-warning.d.ts.map +1 -0
  121. package/dist/cli/win32-warning.js +15 -0
  122. package/dist/cli/win32-warning.js.map +1 -0
  123. package/dist/config/loader.d.ts +9 -1
  124. package/dist/config/loader.d.ts.map +1 -1
  125. package/dist/config/loader.js +29 -19
  126. package/dist/config/loader.js.map +1 -1
  127. package/dist/config/models.d.ts +33 -0
  128. package/dist/config/models.d.ts.map +1 -0
  129. package/dist/config/models.js +49 -0
  130. package/dist/config/models.js.map +1 -0
  131. package/dist/constants/names.d.ts +2 -0
  132. package/dist/constants/names.d.ts.map +1 -1
  133. package/dist/constants/names.js +2 -0
  134. package/dist/constants/names.js.map +1 -1
  135. package/dist/features/auto-update.d.ts.map +1 -1
  136. package/dist/features/auto-update.js +21 -11
  137. package/dist/features/auto-update.js.map +1 -1
  138. package/dist/features/background-agent/manager.d.ts.map +1 -1
  139. package/dist/features/background-agent/manager.js +1 -2
  140. package/dist/features/background-agent/manager.js.map +1 -1
  141. package/dist/features/boulder-state/storage.d.ts.map +1 -1
  142. package/dist/features/boulder-state/storage.js +9 -5
  143. package/dist/features/boulder-state/storage.js.map +1 -1
  144. package/dist/features/boulder-state/types.d.ts +4 -0
  145. package/dist/features/boulder-state/types.d.ts.map +1 -1
  146. package/dist/features/builtin-skills/skills.d.ts.map +1 -1
  147. package/dist/features/builtin-skills/skills.js +25 -78
  148. package/dist/features/builtin-skills/skills.js.map +1 -1
  149. package/dist/features/delegation-enforcer.d.ts.map +1 -1
  150. package/dist/features/delegation-enforcer.js +4 -1
  151. package/dist/features/delegation-enforcer.js.map +1 -1
  152. package/dist/features/delegation-routing/__tests__/resolver.test.js +47 -122
  153. package/dist/features/delegation-routing/__tests__/resolver.test.js.map +1 -1
  154. package/dist/features/delegation-routing/resolver.d.ts.map +1 -1
  155. package/dist/features/delegation-routing/resolver.js +24 -47
  156. package/dist/features/delegation-routing/resolver.js.map +1 -1
  157. package/dist/features/delegation-routing/types.d.ts.map +1 -1
  158. package/dist/features/delegation-routing/types.js +2 -0
  159. package/dist/features/delegation-routing/types.js.map +1 -1
  160. package/dist/features/model-routing/external-model-policy.d.ts.map +1 -1
  161. package/dist/features/model-routing/external-model-policy.js.map +1 -1
  162. package/dist/features/model-routing/router.d.ts.map +1 -1
  163. package/dist/features/model-routing/router.js +12 -2
  164. package/dist/features/model-routing/router.js.map +1 -1
  165. package/dist/features/model-routing/types.d.ts +5 -1
  166. package/dist/features/model-routing/types.d.ts.map +1 -1
  167. package/dist/features/model-routing/types.js +7 -6
  168. package/dist/features/model-routing/types.js.map +1 -1
  169. package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
  170. package/dist/features/rate-limit-wait/daemon.js +40 -4
  171. package/dist/features/rate-limit-wait/daemon.js.map +1 -1
  172. package/dist/features/state-manager/index.js +2 -2
  173. package/dist/features/state-manager/index.js.map +1 -1
  174. package/dist/features/task-decomposer/index.js +14 -4
  175. package/dist/features/task-decomposer/index.js.map +1 -1
  176. package/dist/hooks/__tests__/bridge-openclaw.test.d.ts +2 -0
  177. package/dist/hooks/__tests__/bridge-openclaw.test.d.ts.map +1 -0
  178. package/dist/hooks/__tests__/bridge-openclaw.test.js +124 -0
  179. package/dist/hooks/__tests__/bridge-openclaw.test.js.map +1 -0
  180. package/dist/hooks/__tests__/bridge-security.test.js +1 -1
  181. package/dist/hooks/__tests__/bridge-security.test.js.map +1 -1
  182. package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
  183. package/dist/hooks/auto-slash-command/executor.js +38 -61
  184. package/dist/hooks/auto-slash-command/executor.js.map +1 -1
  185. package/dist/hooks/autopilot/prompts.js +3 -3
  186. package/dist/hooks/bridge.d.ts +11 -0
  187. package/dist/hooks/bridge.d.ts.map +1 -1
  188. package/dist/hooks/bridge.js +154 -82
  189. package/dist/hooks/bridge.js.map +1 -1
  190. package/dist/hooks/comment-checker/index.d.ts.map +1 -1
  191. package/dist/hooks/comment-checker/index.js +3 -1
  192. package/dist/hooks/comment-checker/index.js.map +1 -1
  193. package/dist/hooks/keyword-detector/__tests__/index.test.js +348 -1
  194. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
  195. package/dist/hooks/keyword-detector/index.d.ts +29 -0
  196. package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
  197. package/dist/hooks/keyword-detector/index.js +123 -1
  198. package/dist/hooks/keyword-detector/index.js.map +1 -1
  199. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +40 -0
  200. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +1 -1
  201. package/dist/hooks/mode-registry/index.d.ts.map +1 -1
  202. package/dist/hooks/mode-registry/index.js +135 -52
  203. package/dist/hooks/mode-registry/index.js.map +1 -1
  204. package/dist/hooks/notepad/index.d.ts.map +1 -1
  205. package/dist/hooks/notepad/index.js +5 -3
  206. package/dist/hooks/notepad/index.js.map +1 -1
  207. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts +2 -0
  208. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.d.ts.map +1 -0
  209. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js +73 -0
  210. package/dist/hooks/persistent-mode/__tests__/cancel-race.test.js.map +1 -0
  211. package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js +89 -13
  212. package/dist/hooks/persistent-mode/__tests__/idle-cooldown.test.js.map +1 -1
  213. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts +2 -0
  214. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.d.ts.map +1 -0
  215. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js +156 -0
  216. package/dist/hooks/persistent-mode/__tests__/skill-state-stop.test.js.map +1 -0
  217. package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts +2 -3
  218. package/dist/hooks/persistent-mode/idle-cooldown.test.d.ts.map +1 -1
  219. package/dist/hooks/persistent-mode/idle-cooldown.test.js +19 -4
  220. package/dist/hooks/persistent-mode/idle-cooldown.test.js.map +1 -1
  221. package/dist/hooks/persistent-mode/index.d.ts +2 -2
  222. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  223. package/dist/hooks/persistent-mode/index.js +144 -26
  224. package/dist/hooks/persistent-mode/index.js.map +1 -1
  225. package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
  226. package/dist/hooks/plugin-patterns/index.js +22 -31
  227. package/dist/hooks/plugin-patterns/index.js.map +1 -1
  228. package/dist/hooks/pre-compact/index.js +1 -1
  229. package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -1
  230. package/dist/hooks/preemptive-compaction/index.js +3 -1
  231. package/dist/hooks/preemptive-compaction/index.js.map +1 -1
  232. package/dist/hooks/project-memory/index.d.ts.map +1 -1
  233. package/dist/hooks/project-memory/index.js +9 -0
  234. package/dist/hooks/project-memory/index.js.map +1 -1
  235. package/dist/hooks/project-memory/learner.d.ts.map +1 -1
  236. package/dist/hooks/project-memory/learner.js +107 -85
  237. package/dist/hooks/project-memory/learner.js.map +1 -1
  238. package/dist/hooks/project-memory/storage.d.ts.map +1 -1
  239. package/dist/hooks/project-memory/storage.js +3 -2
  240. package/dist/hooks/project-memory/storage.js.map +1 -1
  241. package/dist/hooks/recovery/context-window.d.ts +4 -0
  242. package/dist/hooks/recovery/context-window.d.ts.map +1 -1
  243. package/dist/hooks/recovery/context-window.js +22 -1
  244. package/dist/hooks/recovery/context-window.js.map +1 -1
  245. package/dist/hooks/recovery/session-recovery.js +1 -1
  246. package/dist/hooks/recovery/session-recovery.js.map +1 -1
  247. package/dist/hooks/session-end/index.d.ts.map +1 -1
  248. package/dist/hooks/session-end/index.js +13 -22
  249. package/dist/hooks/session-end/index.js.map +1 -1
  250. package/dist/hooks/setup/__tests__/windows-patch.test.d.ts +2 -0
  251. package/dist/hooks/setup/__tests__/windows-patch.test.d.ts.map +1 -0
  252. package/dist/hooks/setup/__tests__/windows-patch.test.js +110 -0
  253. package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -0
  254. package/dist/hooks/setup/index.d.ts +18 -0
  255. package/dist/hooks/setup/index.d.ts.map +1 -1
  256. package/dist/hooks/setup/index.js +59 -1
  257. package/dist/hooks/setup/index.js.map +1 -1
  258. package/dist/hooks/skill-bridge.cjs +1 -0
  259. package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts +2 -0
  260. package/dist/hooks/skill-state/__tests__/skill-state.test.d.ts.map +1 -0
  261. package/dist/hooks/skill-state/__tests__/skill-state.test.js +301 -0
  262. package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -0
  263. package/dist/hooks/skill-state/index.d.ts +79 -0
  264. package/dist/hooks/skill-state/index.d.ts.map +1 -0
  265. package/dist/hooks/skill-state/index.js +245 -0
  266. package/dist/hooks/skill-state/index.js.map +1 -0
  267. package/dist/hooks/team-pipeline/state.d.ts.map +1 -1
  268. package/dist/hooks/team-pipeline/state.js +5 -0
  269. package/dist/hooks/team-pipeline/state.js.map +1 -1
  270. package/dist/hooks/todo-continuation/index.d.ts +17 -0
  271. package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
  272. package/dist/hooks/todo-continuation/index.js +44 -2
  273. package/dist/hooks/todo-continuation/index.js.map +1 -1
  274. package/dist/hud/elements/call-counts.d.ts.map +1 -1
  275. package/dist/hud/elements/call-counts.js +6 -4
  276. package/dist/hud/elements/call-counts.js.map +1 -1
  277. package/dist/hud/elements/index.d.ts +1 -0
  278. package/dist/hud/elements/index.d.ts.map +1 -1
  279. package/dist/hud/elements/index.js +1 -0
  280. package/dist/hud/elements/index.js.map +1 -1
  281. package/dist/hud/elements/prompt-time.d.ts +13 -0
  282. package/dist/hud/elements/prompt-time.d.ts.map +1 -0
  283. package/dist/hud/elements/prompt-time.js +21 -0
  284. package/dist/hud/elements/prompt-time.js.map +1 -0
  285. package/dist/hud/index.d.ts +2 -1
  286. package/dist/hud/index.d.ts.map +1 -1
  287. package/dist/hud/index.js +40 -215
  288. package/dist/hud/index.js.map +1 -1
  289. package/dist/hud/render.d.ts.map +1 -1
  290. package/dist/hud/render.js +7 -108
  291. package/dist/hud/render.js.map +1 -1
  292. package/dist/hud/state.d.ts.map +1 -1
  293. package/dist/hud/state.js +4 -3
  294. package/dist/hud/state.js.map +1 -1
  295. package/dist/hud/stdin.d.ts +10 -0
  296. package/dist/hud/stdin.d.ts.map +1 -1
  297. package/dist/hud/stdin.js +43 -0
  298. package/dist/hud/stdin.js.map +1 -1
  299. package/dist/hud/types.d.ts +6 -18
  300. package/dist/hud/types.d.ts.map +1 -1
  301. package/dist/hud/types.js +6 -46
  302. package/dist/hud/types.js.map +1 -1
  303. package/dist/index.d.ts +1 -1
  304. package/dist/index.d.ts.map +1 -1
  305. package/dist/index.js +2 -11
  306. package/dist/index.js.map +1 -1
  307. package/dist/installer/hooks.d.ts +5 -0
  308. package/dist/installer/hooks.d.ts.map +1 -1
  309. package/dist/installer/hooks.js +8 -0
  310. package/dist/installer/hooks.js.map +1 -1
  311. package/dist/installer/index.d.ts.map +1 -1
  312. package/dist/installer/index.js +26 -11
  313. package/dist/installer/index.js.map +1 -1
  314. package/dist/interop/omx-team-state.d.ts.map +1 -1
  315. package/dist/interop/omx-team-state.js +38 -6
  316. package/dist/interop/omx-team-state.js.map +1 -1
  317. package/dist/interop/shared-state.d.ts.map +1 -1
  318. package/dist/interop/shared-state.js +58 -7
  319. package/dist/interop/shared-state.js.map +1 -1
  320. package/dist/lib/__tests__/worktree-paths.test.js +250 -1
  321. package/dist/lib/__tests__/worktree-paths.test.js.map +1 -1
  322. package/dist/lib/job-state-db.d.ts +150 -0
  323. package/dist/lib/job-state-db.d.ts.map +1 -0
  324. package/dist/lib/job-state-db.js +650 -0
  325. package/dist/lib/job-state-db.js.map +1 -0
  326. package/dist/lib/mode-names.d.ts +46 -0
  327. package/dist/lib/mode-names.d.ts.map +1 -0
  328. package/dist/lib/mode-names.js +73 -0
  329. package/dist/lib/mode-names.js.map +1 -0
  330. package/dist/lib/session-isolation.d.ts +32 -0
  331. package/dist/lib/session-isolation.d.ts.map +1 -0
  332. package/dist/lib/session-isolation.js +39 -0
  333. package/dist/lib/session-isolation.js.map +1 -0
  334. package/dist/lib/worktree-paths.d.ts +38 -8
  335. package/dist/lib/worktree-paths.d.ts.map +1 -1
  336. package/dist/lib/worktree-paths.js +124 -56
  337. package/dist/lib/worktree-paths.js.map +1 -1
  338. package/dist/mcp/__tests__/team-cleanup.test.d.ts +11 -0
  339. package/dist/mcp/__tests__/team-cleanup.test.d.ts.map +1 -0
  340. package/dist/mcp/__tests__/team-cleanup.test.js +228 -0
  341. package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -0
  342. package/dist/mcp/cli-detection.d.ts +4 -8
  343. package/dist/mcp/cli-detection.d.ts.map +1 -1
  344. package/dist/mcp/cli-detection.js +5 -8
  345. package/dist/mcp/cli-detection.js.map +1 -1
  346. package/dist/mcp/codex-request-normalizer.js +59 -0
  347. package/dist/mcp/codex-server.js +16 -4
  348. package/dist/mcp/codex-standalone-server.js +13 -4
  349. package/dist/mcp/index.d.ts +2 -4
  350. package/dist/mcp/index.d.ts.map +1 -1
  351. package/dist/mcp/index.js +1 -5
  352. package/dist/mcp/index.js.map +1 -1
  353. package/dist/mcp/job-management.d.ts.map +1 -1
  354. package/dist/mcp/job-management.js +11 -9
  355. package/dist/mcp/job-management.js.map +1 -1
  356. package/dist/mcp/job-state-db.d.ts +1 -149
  357. package/dist/mcp/job-state-db.d.ts.map +1 -1
  358. package/dist/mcp/job-state-db.js +2 -649
  359. package/dist/mcp/job-state-db.js.map +1 -1
  360. package/dist/mcp/mcp-config.d.ts +1 -1
  361. package/dist/mcp/mcp-config.js +1 -1
  362. package/dist/mcp/prompt-injection.d.ts +14 -76
  363. package/dist/mcp/prompt-injection.d.ts.map +1 -1
  364. package/dist/mcp/prompt-injection.js +34 -175
  365. package/dist/mcp/prompt-injection.js.map +1 -1
  366. package/dist/mcp/standalone-server.js +2 -0
  367. package/dist/mcp/standalone-server.js.map +1 -1
  368. package/dist/mcp/team-server.d.ts +16 -0
  369. package/dist/mcp/team-server.d.ts.map +1 -0
  370. package/dist/mcp/team-server.js +356 -0
  371. package/dist/mcp/team-server.js.map +1 -0
  372. package/dist/notifications/__tests__/formatter.test.js +62 -0
  373. package/dist/notifications/__tests__/formatter.test.js.map +1 -1
  374. package/dist/notifications/__tests__/hook-config.test.d.ts +14 -0
  375. package/dist/notifications/__tests__/hook-config.test.d.ts.map +1 -0
  376. package/dist/notifications/__tests__/hook-config.test.js +210 -0
  377. package/dist/notifications/__tests__/hook-config.test.js.map +1 -0
  378. package/dist/notifications/__tests__/platform-gating.test.d.ts +12 -0
  379. package/dist/notifications/__tests__/platform-gating.test.d.ts.map +1 -0
  380. package/dist/notifications/__tests__/platform-gating.test.js +140 -0
  381. package/dist/notifications/__tests__/platform-gating.test.js.map +1 -0
  382. package/dist/notifications/__tests__/template-engine.test.d.ts +13 -0
  383. package/dist/notifications/__tests__/template-engine.test.d.ts.map +1 -0
  384. package/dist/notifications/__tests__/template-engine.test.js +378 -0
  385. package/dist/notifications/__tests__/template-engine.test.js.map +1 -0
  386. package/dist/notifications/config.d.ts.map +1 -1
  387. package/dist/notifications/config.js +54 -18
  388. package/dist/notifications/config.js.map +1 -1
  389. package/dist/notifications/dispatcher.d.ts +2 -2
  390. package/dist/notifications/dispatcher.d.ts.map +1 -1
  391. package/dist/notifications/dispatcher.js +10 -6
  392. package/dist/notifications/dispatcher.js.map +1 -1
  393. package/dist/notifications/formatter.d.ts.map +1 -1
  394. package/dist/notifications/formatter.js +22 -0
  395. package/dist/notifications/formatter.js.map +1 -1
  396. package/dist/notifications/hook-config-types.d.ts +44 -0
  397. package/dist/notifications/hook-config-types.d.ts.map +1 -0
  398. package/dist/notifications/hook-config-types.js +8 -0
  399. package/dist/notifications/hook-config-types.js.map +1 -0
  400. package/dist/notifications/hook-config.d.ts +36 -0
  401. package/dist/notifications/hook-config.d.ts.map +1 -0
  402. package/dist/notifications/hook-config.js +95 -0
  403. package/dist/notifications/hook-config.js.map +1 -0
  404. package/dist/notifications/index.d.ts +3 -0
  405. package/dist/notifications/index.d.ts.map +1 -1
  406. package/dist/notifications/index.js +31 -3
  407. package/dist/notifications/index.js.map +1 -1
  408. package/dist/notifications/reply-listener.d.ts.map +1 -1
  409. package/dist/notifications/reply-listener.js +1 -0
  410. package/dist/notifications/reply-listener.js.map +1 -1
  411. package/dist/notifications/session-registry.d.ts.map +1 -1
  412. package/dist/notifications/session-registry.js +13 -5
  413. package/dist/notifications/session-registry.js.map +1 -1
  414. package/dist/notifications/template-engine.d.ts +34 -0
  415. package/dist/notifications/template-engine.d.ts.map +1 -0
  416. package/dist/notifications/template-engine.js +248 -0
  417. package/dist/notifications/template-engine.js.map +1 -0
  418. package/dist/notifications/types.d.ts +0 -2
  419. package/dist/notifications/types.d.ts.map +1 -1
  420. package/dist/openclaw/__tests__/config.test.d.ts +2 -0
  421. package/dist/openclaw/__tests__/config.test.d.ts.map +1 -0
  422. package/dist/openclaw/__tests__/config.test.js +200 -0
  423. package/dist/openclaw/__tests__/config.test.js.map +1 -0
  424. package/dist/openclaw/__tests__/dispatcher.test.d.ts +2 -0
  425. package/dist/openclaw/__tests__/dispatcher.test.d.ts.map +1 -0
  426. package/dist/openclaw/__tests__/dispatcher.test.js +348 -0
  427. package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -0
  428. package/dist/openclaw/__tests__/index.test.d.ts +2 -0
  429. package/dist/openclaw/__tests__/index.test.d.ts.map +1 -0
  430. package/dist/openclaw/__tests__/index.test.js +235 -0
  431. package/dist/openclaw/__tests__/index.test.js.map +1 -0
  432. package/dist/openclaw/config.d.ts +33 -0
  433. package/dist/openclaw/config.d.ts.map +1 -0
  434. package/dist/openclaw/config.js +83 -0
  435. package/dist/openclaw/config.js.map +1 -0
  436. package/dist/openclaw/dispatcher.d.ts +47 -0
  437. package/dist/openclaw/dispatcher.d.ts.map +1 -0
  438. package/dist/openclaw/dispatcher.js +138 -0
  439. package/dist/openclaw/dispatcher.js.map +1 -0
  440. package/dist/openclaw/index.d.ts +25 -0
  441. package/dist/openclaw/index.d.ts.map +1 -0
  442. package/dist/openclaw/index.js +132 -0
  443. package/dist/openclaw/index.js.map +1 -0
  444. package/dist/openclaw/types.d.ts +102 -0
  445. package/dist/openclaw/types.d.ts.map +1 -0
  446. package/dist/openclaw/types.js +8 -0
  447. package/dist/openclaw/types.js.map +1 -0
  448. package/dist/platform/index.d.ts +5 -0
  449. package/dist/platform/index.d.ts.map +1 -1
  450. package/dist/platform/index.js +17 -0
  451. package/dist/platform/index.js.map +1 -1
  452. package/dist/platform/process-utils.d.ts.map +1 -1
  453. package/dist/platform/process-utils.js +55 -9
  454. package/dist/platform/process-utils.js.map +1 -1
  455. package/dist/shared/types.d.ts +7 -5
  456. package/dist/shared/types.d.ts.map +1 -1
  457. package/dist/team/__tests__/bridge-integration.test.js +10 -8
  458. package/dist/team/__tests__/bridge-integration.test.js.map +1 -1
  459. package/dist/team/__tests__/edge-cases.test.js +40 -29
  460. package/dist/team/__tests__/edge-cases.test.js.map +1 -1
  461. package/dist/team/__tests__/idle-nudge.test.d.ts +11 -0
  462. package/dist/team/__tests__/idle-nudge.test.d.ts.map +1 -0
  463. package/dist/team/__tests__/idle-nudge.test.js +282 -0
  464. package/dist/team/__tests__/idle-nudge.test.js.map +1 -0
  465. package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js +2 -2
  466. package/dist/team/__tests__/mcp-team-bridge.spawn-args.test.js.map +1 -1
  467. package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts +2 -0
  468. package/dist/team/__tests__/mcp-team-bridge.usage.test.d.ts.map +1 -0
  469. package/dist/team/__tests__/mcp-team-bridge.usage.test.js +49 -0
  470. package/dist/team/__tests__/mcp-team-bridge.usage.test.js.map +1 -0
  471. package/dist/team/__tests__/model-contract.test.d.ts +2 -0
  472. package/dist/team/__tests__/model-contract.test.d.ts.map +1 -0
  473. package/dist/team/__tests__/model-contract.test.js +121 -0
  474. package/dist/team/__tests__/model-contract.test.js.map +1 -0
  475. package/dist/team/__tests__/phase-controller.test.d.ts +2 -0
  476. package/dist/team/__tests__/phase-controller.test.d.ts.map +1 -0
  477. package/dist/team/__tests__/phase-controller.test.js +45 -0
  478. package/dist/team/__tests__/phase-controller.test.js.map +1 -0
  479. package/dist/team/__tests__/runtime-assign.test.d.ts +2 -0
  480. package/dist/team/__tests__/runtime-assign.test.d.ts.map +1 -0
  481. package/dist/team/__tests__/runtime-assign.test.js +43 -0
  482. package/dist/team/__tests__/runtime-assign.test.js.map +1 -0
  483. package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts +2 -0
  484. package/dist/team/__tests__/runtime-gemini-prompt.test.d.ts.map +1 -0
  485. package/dist/team/__tests__/runtime-gemini-prompt.test.js +153 -0
  486. package/dist/team/__tests__/runtime-gemini-prompt.test.js.map +1 -0
  487. package/dist/team/__tests__/runtime-prompt-mode.test.d.ts +2 -0
  488. package/dist/team/__tests__/runtime-prompt-mode.test.d.ts.map +1 -0
  489. package/dist/team/__tests__/runtime-prompt-mode.test.js +162 -0
  490. package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -0
  491. package/dist/team/__tests__/runtime.test.d.ts +2 -0
  492. package/dist/team/__tests__/runtime.test.d.ts.map +1 -0
  493. package/dist/team/__tests__/runtime.test.js +37 -0
  494. package/dist/team/__tests__/runtime.test.js.map +1 -0
  495. package/dist/team/__tests__/task-file-ops.test.js +63 -59
  496. package/dist/team/__tests__/task-file-ops.test.js.map +1 -1
  497. package/dist/team/__tests__/team-name.test.d.ts +2 -0
  498. package/dist/team/__tests__/team-name.test.d.ts.map +1 -0
  499. package/dist/team/__tests__/team-name.test.js +18 -0
  500. package/dist/team/__tests__/team-name.test.js.map +1 -0
  501. package/dist/team/__tests__/team-status.test.js +52 -6
  502. package/dist/team/__tests__/team-status.test.js.map +1 -1
  503. package/dist/team/__tests__/tmux-comm.test.d.ts +2 -0
  504. package/dist/team/__tests__/tmux-comm.test.d.ts.map +1 -0
  505. package/dist/team/__tests__/tmux-comm.test.js +26 -0
  506. package/dist/team/__tests__/tmux-comm.test.js.map +1 -0
  507. package/dist/team/__tests__/tmux-session.create-team.test.d.ts +2 -0
  508. package/dist/team/__tests__/tmux-session.create-team.test.d.ts.map +1 -0
  509. package/dist/team/__tests__/tmux-session.create-team.test.js +104 -0
  510. package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -0
  511. package/dist/team/__tests__/tmux-session.spawn.test.d.ts +2 -0
  512. package/dist/team/__tests__/tmux-session.spawn.test.d.ts.map +1 -0
  513. package/dist/team/__tests__/tmux-session.spawn.test.js +61 -0
  514. package/dist/team/__tests__/tmux-session.spawn.test.js.map +1 -0
  515. package/dist/team/__tests__/tmux-session.test.js +161 -2
  516. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  517. package/dist/team/__tests__/worker-bootstrap.test.d.ts +2 -0
  518. package/dist/team/__tests__/worker-bootstrap.test.d.ts.map +1 -0
  519. package/dist/team/__tests__/worker-bootstrap.test.js +58 -0
  520. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -0
  521. package/dist/team/bridge-entry.d.ts.map +1 -1
  522. package/dist/team/bridge-entry.js +4 -0
  523. package/dist/team/bridge-entry.js.map +1 -1
  524. package/dist/team/capabilities.d.ts.map +1 -1
  525. package/dist/team/capabilities.js +3 -0
  526. package/dist/team/capabilities.js.map +1 -1
  527. package/dist/team/cli-detection.d.ts +9 -0
  528. package/dist/team/cli-detection.d.ts.map +1 -0
  529. package/dist/team/cli-detection.js +29 -0
  530. package/dist/team/cli-detection.js.map +1 -0
  531. package/dist/team/idle-nudge.d.ts +53 -0
  532. package/dist/team/idle-nudge.d.ts.map +1 -0
  533. package/dist/team/idle-nudge.js +124 -0
  534. package/dist/team/idle-nudge.js.map +1 -0
  535. package/dist/team/inbox-outbox.d.ts.map +1 -1
  536. package/dist/team/inbox-outbox.js +7 -3
  537. package/dist/team/inbox-outbox.js.map +1 -1
  538. package/dist/team/index.d.ts +14 -1
  539. package/dist/team/index.d.ts.map +1 -1
  540. package/dist/team/index.js +12 -1
  541. package/dist/team/index.js.map +1 -1
  542. package/dist/team/mcp-team-bridge.d.ts +9 -0
  543. package/dist/team/mcp-team-bridge.d.ts.map +1 -1
  544. package/dist/team/mcp-team-bridge.js +82 -3
  545. package/dist/team/mcp-team-bridge.js.map +1 -1
  546. package/dist/team/model-contract.d.ts +37 -0
  547. package/dist/team/model-contract.d.ts.map +1 -0
  548. package/dist/team/model-contract.js +139 -0
  549. package/dist/team/model-contract.js.map +1 -0
  550. package/dist/team/phase-controller.d.ts +33 -0
  551. package/dist/team/phase-controller.d.ts.map +1 -0
  552. package/dist/team/phase-controller.js +79 -0
  553. package/dist/team/phase-controller.js.map +1 -0
  554. package/dist/team/runtime-cli.d.ts +9 -0
  555. package/dist/team/runtime-cli.d.ts.map +1 -0
  556. package/dist/team/runtime-cli.js +188 -0
  557. package/dist/team/runtime-cli.js.map +1 -0
  558. package/dist/team/runtime.d.ts +95 -0
  559. package/dist/team/runtime.d.ts.map +1 -0
  560. package/dist/team/runtime.js +692 -0
  561. package/dist/team/runtime.js.map +1 -0
  562. package/dist/team/state-paths.d.ts +72 -0
  563. package/dist/team/state-paths.d.ts.map +1 -0
  564. package/dist/team/state-paths.js +87 -0
  565. package/dist/team/state-paths.js.map +1 -0
  566. package/dist/team/task-file-ops.d.ts +27 -7
  567. package/dist/team/task-file-ops.d.ts.map +1 -1
  568. package/dist/team/task-file-ops.js +116 -55
  569. package/dist/team/task-file-ops.js.map +1 -1
  570. package/dist/team/team-name.d.ts +2 -0
  571. package/dist/team/team-name.d.ts.map +1 -0
  572. package/dist/team/team-name.js +8 -0
  573. package/dist/team/team-name.js.map +1 -0
  574. package/dist/team/team-registration.d.ts +1 -1
  575. package/dist/team/team-registration.d.ts.map +1 -1
  576. package/dist/team/team-registration.js.map +1 -1
  577. package/dist/team/team-status.d.ts +11 -1
  578. package/dist/team/team-status.d.ts.map +1 -1
  579. package/dist/team/team-status.js +32 -3
  580. package/dist/team/team-status.js.map +1 -1
  581. package/dist/team/tmux-comm.d.ts +36 -0
  582. package/dist/team/tmux-comm.d.ts.map +1 -0
  583. package/dist/team/tmux-comm.js +115 -0
  584. package/dist/team/tmux-comm.js.map +1 -0
  585. package/dist/team/tmux-session.d.ts +92 -0
  586. package/dist/team/tmux-session.d.ts.map +1 -1
  587. package/dist/team/tmux-session.js +533 -2
  588. package/dist/team/tmux-session.js.map +1 -1
  589. package/dist/team/types.d.ts +10 -3
  590. package/dist/team/types.d.ts.map +1 -1
  591. package/dist/team/unified-team.d.ts.map +1 -1
  592. package/dist/team/unified-team.js +13 -3
  593. package/dist/team/unified-team.js.map +1 -1
  594. package/dist/team/worker-bootstrap.d.ts +39 -0
  595. package/dist/team/worker-bootstrap.d.ts.map +1 -0
  596. package/dist/team/worker-bootstrap.js +117 -0
  597. package/dist/team/worker-bootstrap.js.map +1 -0
  598. package/dist/team/worker-health.d.ts.map +1 -1
  599. package/dist/team/worker-health.js +15 -3
  600. package/dist/team/worker-health.js.map +1 -1
  601. package/dist/tools/ast-tools.js +1 -1
  602. package/dist/tools/ast-tools.js.map +1 -1
  603. package/dist/tools/diagnostics/lsp-aggregator.d.ts.map +1 -1
  604. package/dist/tools/diagnostics/lsp-aggregator.js +4 -2
  605. package/dist/tools/diagnostics/lsp-aggregator.js.map +1 -1
  606. package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts +2 -0
  607. package/dist/tools/lsp/__tests__/client-handle-data.test.d.ts.map +1 -0
  608. package/dist/tools/lsp/__tests__/client-handle-data.test.js +138 -0
  609. package/dist/tools/lsp/__tests__/client-handle-data.test.js.map +1 -0
  610. package/dist/tools/lsp/client.d.ts +13 -0
  611. package/dist/tools/lsp/client.d.ts.map +1 -1
  612. package/dist/tools/lsp/client.js +64 -8
  613. package/dist/tools/lsp/client.js.map +1 -1
  614. package/dist/tools/lsp/servers.d.ts.map +1 -1
  615. package/dist/tools/lsp/servers.js +4 -9
  616. package/dist/tools/lsp/servers.js.map +1 -1
  617. package/dist/tools/lsp-tools.d.ts.map +1 -1
  618. package/dist/tools/lsp-tools.js +4 -0
  619. package/dist/tools/lsp-tools.js.map +1 -1
  620. package/dist/tools/python-repl/bridge-manager.d.ts.map +1 -1
  621. package/dist/tools/python-repl/bridge-manager.js +15 -1
  622. package/dist/tools/python-repl/bridge-manager.js.map +1 -1
  623. package/dist/tools/python-repl/session-lock.d.ts.map +1 -1
  624. package/dist/tools/python-repl/session-lock.js +35 -15
  625. package/dist/tools/python-repl/session-lock.js.map +1 -1
  626. package/dist/tools/state-tools.d.ts.map +1 -1
  627. package/dist/tools/state-tools.js +10 -0
  628. package/dist/tools/state-tools.js.map +1 -1
  629. package/dist/utils/__tests__/frontmatter.test.d.ts +2 -0
  630. package/dist/utils/__tests__/frontmatter.test.d.ts.map +1 -0
  631. package/dist/utils/__tests__/frontmatter.test.js +147 -0
  632. package/dist/utils/__tests__/frontmatter.test.js.map +1 -0
  633. package/dist/utils/frontmatter.d.ts +24 -0
  634. package/dist/utils/frontmatter.d.ts.map +1 -0
  635. package/dist/utils/frontmatter.js +62 -0
  636. package/dist/utils/frontmatter.js.map +1 -0
  637. package/dist/utils/paths.d.ts.map +1 -1
  638. package/dist/utils/paths.js +4 -2
  639. package/dist/utils/paths.js.map +1 -1
  640. package/dist/utils/string-width.d.ts.map +1 -1
  641. package/dist/utils/string-width.js +15 -4
  642. package/dist/utils/string-width.js.map +1 -1
  643. package/dist/verification/tier-selector.js +1 -1
  644. package/dist/verification/tier-selector.js.map +1 -1
  645. package/docs/AGENTS.md +4 -2
  646. package/docs/CLAUDE.md +8 -48
  647. package/docs/MIGRATION.md +114 -0
  648. package/docs/REFERENCE.md +35 -102
  649. package/hooks/hooks.json +23 -23
  650. package/package.json +8 -8
  651. package/scripts/build-runtime-cli.mjs +24 -0
  652. package/scripts/build-team-server.mjs +28 -0
  653. package/scripts/cleanup-orphans.mjs +22 -5
  654. package/scripts/context-safety.mjs +5 -1
  655. package/scripts/demo-team.mjs +26 -0
  656. package/scripts/keyword-detector.mjs +6 -76
  657. package/scripts/openclaw-gateway-demo.mjs +168 -0
  658. package/scripts/persistent-mode.cjs +30 -4
  659. package/scripts/persistent-mode.mjs +48 -3
  660. package/scripts/plugin-setup.mjs +66 -3
  661. package/scripts/post-tool-use-failure.mjs +20 -2
  662. package/scripts/post-tool-verifier.mjs +57 -6
  663. package/scripts/pre-tool-enforcer.mjs +125 -5
  664. package/scripts/run.cjs +114 -0
  665. package/scripts/session-start.mjs +56 -7
  666. package/scripts/status.mjs +144 -0
  667. package/scripts/test-codex-gemini-team.mjs +78 -0
  668. package/skills/AGENTS.md +5 -2
  669. package/skills/analyze/SKILL.md +5 -11
  670. package/skills/autopilot/SKILL.md +16 -25
  671. package/skills/ccg/SKILL.md +88 -99
  672. package/skills/configure-notifications/SKILL.md +177 -0
  673. package/skills/configure-openclaw/SKILL.md +320 -0
  674. package/skills/external-context/SKILL.md +7 -83
  675. package/skills/hud/SKILL.md +68 -46
  676. package/skills/omc-setup/SKILL.md +58 -19
  677. package/skills/omc-teams/SKILL.md +178 -0
  678. package/skills/pipeline/SKILL.md +4 -4
  679. package/skills/plan/SKILL.md +28 -16
  680. package/skills/ralph/SKILL.md +3 -4
  681. package/skills/ralph-init/SKILL.md +3 -1
  682. package/skills/ralplan/SKILL.md +93 -8
  683. package/skills/security-review/SKILL.md +5 -6
  684. package/skills/tdd/SKILL.md +5 -6
  685. package/skills/team/SKILL.md +35 -34
  686. package/templates/hooks/keyword-detector.mjs +11 -82
  687. package/templates/hooks/persistent-mode.mjs +120 -3
  688. package/templates/hooks/post-tool-use-failure.mjs +20 -2
  689. package/templates/hooks/session-start.mjs +2 -16
  690. package/dist/__tests__/analytics/backfill-dedup.test.d.ts +0 -2
  691. package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +0 -1
  692. package/dist/__tests__/analytics/backfill-dedup.test.js +0 -179
  693. package/dist/__tests__/analytics/backfill-dedup.test.js.map +0 -1
  694. package/dist/__tests__/analytics/backfill-engine.test.d.ts +0 -2
  695. package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +0 -1
  696. package/dist/__tests__/analytics/backfill-engine.test.js +0 -362
  697. package/dist/__tests__/analytics/backfill-engine.test.js.map +0 -1
  698. package/dist/__tests__/analytics/output-estimator.test.d.ts +0 -2
  699. package/dist/__tests__/analytics/output-estimator.test.d.ts.map +0 -1
  700. package/dist/__tests__/analytics/output-estimator.test.js +0 -124
  701. package/dist/__tests__/analytics/output-estimator.test.js.map +0 -1
  702. package/dist/__tests__/analytics/token-extractor.test.d.ts +0 -2
  703. package/dist/__tests__/analytics/token-extractor.test.d.ts.map +0 -1
  704. package/dist/__tests__/analytics/token-extractor.test.js +0 -165
  705. package/dist/__tests__/analytics/token-extractor.test.js.map +0 -1
  706. package/dist/__tests__/analytics/token-tracker.test.d.ts +0 -2
  707. package/dist/__tests__/analytics/token-tracker.test.d.ts.map +0 -1
  708. package/dist/__tests__/analytics/token-tracker.test.js +0 -189
  709. package/dist/__tests__/analytics/token-tracker.test.js.map +0 -1
  710. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts +0 -2
  711. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts.map +0 -1
  712. package/dist/__tests__/analytics/tokscale-adapter.test.js +0 -79
  713. package/dist/__tests__/analytics/tokscale-adapter.test.js.map +0 -1
  714. package/dist/__tests__/analytics/transcript-parser.test.d.ts +0 -2
  715. package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +0 -1
  716. package/dist/__tests__/analytics/transcript-parser.test.js +0 -285
  717. package/dist/__tests__/analytics/transcript-parser.test.js.map +0 -1
  718. package/dist/__tests__/analytics/transcript-scanner.test.d.ts +0 -2
  719. package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +0 -1
  720. package/dist/__tests__/analytics/transcript-scanner.test.js +0 -443
  721. package/dist/__tests__/analytics/transcript-scanner.test.js.map +0 -1
  722. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +0 -2
  723. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +0 -1
  724. package/dist/__tests__/analytics/transcript-token-extractor.test.js +0 -177
  725. package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +0 -1
  726. package/dist/analytics/analytics-summary.d.ts +0 -47
  727. package/dist/analytics/analytics-summary.d.ts.map +0 -1
  728. package/dist/analytics/analytics-summary.js +0 -171
  729. package/dist/analytics/analytics-summary.js.map +0 -1
  730. package/dist/analytics/backfill-dedup.d.ts +0 -49
  731. package/dist/analytics/backfill-dedup.d.ts.map +0 -1
  732. package/dist/analytics/backfill-dedup.js +0 -115
  733. package/dist/analytics/backfill-dedup.js.map +0 -1
  734. package/dist/analytics/backfill-engine.d.ts +0 -59
  735. package/dist/analytics/backfill-engine.d.ts.map +0 -1
  736. package/dist/analytics/backfill-engine.js +0 -172
  737. package/dist/analytics/backfill-engine.js.map +0 -1
  738. package/dist/analytics/cost-estimator.d.ts +0 -29
  739. package/dist/analytics/cost-estimator.d.ts.map +0 -1
  740. package/dist/analytics/cost-estimator.js +0 -135
  741. package/dist/analytics/cost-estimator.js.map +0 -1
  742. package/dist/analytics/export.d.ts +0 -7
  743. package/dist/analytics/export.d.ts.map +0 -1
  744. package/dist/analytics/export.js +0 -93
  745. package/dist/analytics/export.js.map +0 -1
  746. package/dist/analytics/index.d.ts +0 -24
  747. package/dist/analytics/index.d.ts.map +0 -1
  748. package/dist/analytics/index.js +0 -30
  749. package/dist/analytics/index.js.map +0 -1
  750. package/dist/analytics/metrics-collector.d.ts +0 -30
  751. package/dist/analytics/metrics-collector.d.ts.map +0 -1
  752. package/dist/analytics/metrics-collector.js +0 -96
  753. package/dist/analytics/metrics-collector.js.map +0 -1
  754. package/dist/analytics/output-estimator.d.ts +0 -26
  755. package/dist/analytics/output-estimator.d.ts.map +0 -1
  756. package/dist/analytics/output-estimator.js +0 -65
  757. package/dist/analytics/output-estimator.js.map +0 -1
  758. package/dist/analytics/query-engine.d.ts +0 -35
  759. package/dist/analytics/query-engine.d.ts.map +0 -1
  760. package/dist/analytics/query-engine.js +0 -239
  761. package/dist/analytics/query-engine.js.map +0 -1
  762. package/dist/analytics/session-catalog.d.ts +0 -45
  763. package/dist/analytics/session-catalog.d.ts.map +0 -1
  764. package/dist/analytics/session-catalog.js +0 -153
  765. package/dist/analytics/session-catalog.js.map +0 -1
  766. package/dist/analytics/session-manager.d.ts +0 -58
  767. package/dist/analytics/session-manager.d.ts.map +0 -1
  768. package/dist/analytics/session-manager.js +0 -396
  769. package/dist/analytics/session-manager.js.map +0 -1
  770. package/dist/analytics/session-types.d.ts +0 -37
  771. package/dist/analytics/session-types.d.ts.map +0 -1
  772. package/dist/analytics/session-types.js +0 -2
  773. package/dist/analytics/session-types.js.map +0 -1
  774. package/dist/analytics/token-extractor.d.ts +0 -31
  775. package/dist/analytics/token-extractor.d.ts.map +0 -1
  776. package/dist/analytics/token-extractor.js +0 -57
  777. package/dist/analytics/token-extractor.js.map +0 -1
  778. package/dist/analytics/token-tracker.d.ts +0 -33
  779. package/dist/analytics/token-tracker.d.ts.map +0 -1
  780. package/dist/analytics/token-tracker.js +0 -443
  781. package/dist/analytics/token-tracker.js.map +0 -1
  782. package/dist/analytics/tokscale-adapter.d.ts +0 -71
  783. package/dist/analytics/tokscale-adapter.d.ts.map +0 -1
  784. package/dist/analytics/tokscale-adapter.js +0 -223
  785. package/dist/analytics/tokscale-adapter.js.map +0 -1
  786. package/dist/analytics/transcript-parser.d.ts +0 -42
  787. package/dist/analytics/transcript-parser.d.ts.map +0 -1
  788. package/dist/analytics/transcript-parser.js +0 -90
  789. package/dist/analytics/transcript-parser.js.map +0 -1
  790. package/dist/analytics/transcript-scanner.d.ts +0 -51
  791. package/dist/analytics/transcript-scanner.d.ts.map +0 -1
  792. package/dist/analytics/transcript-scanner.js +0 -279
  793. package/dist/analytics/transcript-scanner.js.map +0 -1
  794. package/dist/analytics/transcript-token-extractor.d.ts +0 -35
  795. package/dist/analytics/transcript-token-extractor.d.ts.map +0 -1
  796. package/dist/analytics/transcript-token-extractor.js +0 -136
  797. package/dist/analytics/transcript-token-extractor.js.map +0 -1
  798. package/dist/analytics/types.d.ts +0 -119
  799. package/dist/analytics/types.d.ts.map +0 -1
  800. package/dist/analytics/types.js +0 -32
  801. package/dist/analytics/types.js.map +0 -1
  802. package/dist/cli/analytics.d.ts +0 -3
  803. package/dist/cli/analytics.d.ts.map +0 -1
  804. package/dist/cli/analytics.js +0 -105
  805. package/dist/cli/analytics.js.map +0 -1
  806. package/dist/cli/commands/agents.d.ts +0 -5
  807. package/dist/cli/commands/agents.d.ts.map +0 -1
  808. package/dist/cli/commands/agents.js +0 -31
  809. package/dist/cli/commands/agents.js.map +0 -1
  810. package/dist/cli/commands/backfill.d.ts +0 -15
  811. package/dist/cli/commands/backfill.d.ts.map +0 -1
  812. package/dist/cli/commands/backfill.js +0 -146
  813. package/dist/cli/commands/backfill.js.map +0 -1
  814. package/dist/cli/commands/cleanup.d.ts +0 -4
  815. package/dist/cli/commands/cleanup.d.ts.map +0 -1
  816. package/dist/cli/commands/cleanup.js +0 -31
  817. package/dist/cli/commands/cleanup.js.map +0 -1
  818. package/dist/cli/commands/cost.d.ts +0 -4
  819. package/dist/cli/commands/cost.d.ts.map +0 -1
  820. package/dist/cli/commands/cost.js +0 -53
  821. package/dist/cli/commands/cost.js.map +0 -1
  822. package/dist/cli/commands/export.d.ts +0 -5
  823. package/dist/cli/commands/export.d.ts.map +0 -1
  824. package/dist/cli/commands/export.js +0 -30
  825. package/dist/cli/commands/export.js.map +0 -1
  826. package/dist/cli/commands/sessions.d.ts +0 -5
  827. package/dist/cli/commands/sessions.d.ts.map +0 -1
  828. package/dist/cli/commands/sessions.js +0 -89
  829. package/dist/cli/commands/sessions.js.map +0 -1
  830. package/dist/cli/commands/stats.d.ts +0 -5
  831. package/dist/cli/commands/stats.d.ts.map +0 -1
  832. package/dist/cli/commands/stats.js +0 -84
  833. package/dist/cli/commands/stats.js.map +0 -1
  834. package/dist/cli/utils/tokscale-launcher.d.ts +0 -25
  835. package/dist/cli/utils/tokscale-launcher.d.ts.map +0 -1
  836. package/dist/cli/utils/tokscale-launcher.js +0 -70
  837. package/dist/cli/utils/tokscale-launcher.js.map +0 -1
  838. package/dist/hud/analytics-display.d.ts +0 -63
  839. package/dist/hud/analytics-display.d.ts.map +0 -1
  840. package/dist/hud/analytics-display.js +0 -190
  841. package/dist/hud/analytics-display.js.map +0 -1
  842. package/scripts/build-codex-server.mjs +0 -95
@@ -86,15 +86,15 @@ Output: Security review report with:
86
86
  )
87
87
  ```
88
88
 
89
- ## External Model Consultation (Preferred)
89
+ ## External Consultation (Optional)
90
90
 
91
- The security-reviewer agent SHOULD consult Codex for cross-validation.
91
+ The security-reviewer agent MAY consult a Claude Task agent for cross-validation.
92
92
 
93
93
  ### Protocol
94
94
  1. **Form your OWN security analysis FIRST** - Complete the review independently
95
- 2. **Consult for validation** - Cross-check findings with Codex
95
+ 2. **Consult for validation** - Cross-check findings via a Claude Task agent
96
96
  3. **Critically evaluate** - Never blindly adopt external findings
97
- 4. **Graceful fallback** - Never block if tools unavailable
97
+ 4. **Graceful fallback** - Never block if delegation is unavailable
98
98
 
99
99
  ### When to Consult
100
100
  - Authentication/authorization code
@@ -110,8 +110,7 @@ The security-reviewer agent SHOULD consult Codex for cross-validation.
110
110
  - Code with existing security tests
111
111
 
112
112
  ### Tool Usage
113
- Before first MCP tool use, run the 3-step discovery: (1) `ToolSearch("mcp")`, (2) look for `mcp__x__ask_codex` in the results, (3) fall back to the `security-reviewer` Claude agent only if step 1 returns empty. Never use `ToolSearch("ask_codex")` as the primary search -- it can return false negatives even when MCP tools are present.
114
- Use `mcp__x__ask_codex` with `agent_role: "security-reviewer"`.
113
+ Use `Task(subagent_type="oh-my-claudecode:security-reviewer", ...)` for cross-validation.
115
114
 
116
115
  **Note:** Security second opinions are high-value. Consider consulting for CRITICAL/HIGH findings.
117
116
 
@@ -76,15 +76,15 @@ Changes: [what was cleaned up]
76
76
  Result: [tests still pass]
77
77
  ```
78
78
 
79
- ## External Model Consultation (Preferred)
79
+ ## External Consultation (Optional)
80
80
 
81
- The test-engineer agent SHOULD consult Codex for test strategy validation.
81
+ The test-engineer agent MAY consult a Claude Task agent for test strategy validation.
82
82
 
83
83
  ### Protocol
84
84
  1. **Form your OWN test strategy FIRST** - Design tests independently
85
- 2. **Consult for validation** - Cross-check test coverage strategy
85
+ 2. **Consult for validation** - Cross-check test coverage strategy via a Claude Task agent
86
86
  3. **Critically evaluate** - Never blindly adopt external suggestions
87
- 4. **Graceful fallback** - Never block if tools unavailable
87
+ 4. **Graceful fallback** - Never block if delegation is unavailable
88
88
 
89
89
  ### When to Consult
90
90
  - Complex domain logic requiring comprehensive test coverage
@@ -99,7 +99,6 @@ The test-engineer agent SHOULD consult Codex for test strategy validation.
99
99
  - Small, isolated functionality
100
100
 
101
101
  ### Tool Usage
102
- Before first MCP tool use, run the 3-step discovery: (1) `ToolSearch("mcp")`, (2) look for `mcp__x__ask_codex` in the results, (3) fall back to the `test-engineer` Claude agent only if step 1 returns empty. Never use `ToolSearch("ask_codex")` as the primary search -- it can return false negatives even when MCP tools are present.
103
- Use `mcp__x__ask_codex` with `agent_role: "test-engineer"`.
102
+ Use `Task(subagent_type="oh-my-claudecode:test-engineer", ...)` for test strategy cross-validation.
104
103
 
105
104
  **Remember:** The discipline IS the value. Shortcuts destroy the benefit.
@@ -21,7 +21,7 @@ Spawn N coordinated agents working on a shared task list using Claude Code's nat
21
21
  ### Parameters
22
22
 
23
23
  - **N** - Number of teammate agents (1-20). Optional; defaults to auto-sizing based on task decomposition.
24
- - **agent-type** - OMC agent to spawn for the `team-exec` stage (e.g., executor, build-fixer, designer). Optional; defaults to stage-aware routing (see Stage Agent Routing below).
24
+ - **agent-type** - OMC agent to spawn for the `team-exec` stage (e.g., executor, build-fixer, designer, codex, gemini). Optional; defaults to stage-aware routing. Use `codex` to spawn Codex CLI workers or `gemini` for Gemini CLI workers (requires respective CLIs installed). See Stage Agent Routing below.
25
25
  - **task** - High-level task to decompose and distribute among teammates
26
26
  - **ralph** - Optional modifier. When present, wraps the team pipeline in Ralph's persistence loop (retry on failure, architect verification before completion). See Team + Ralph Composition below.
27
27
 
@@ -33,6 +33,11 @@ Spawn N coordinated agents working on a shared task list using Claude Code's nat
33
33
  /team 4:designer "implement responsive layouts for all page components"
34
34
  /team "refactor the auth module with security review"
35
35
  /team ralph "build a complete REST API for user management"
36
+ # With Codex CLI workers (requires: npm install -g @openai/codex)
37
+ /team 2:codex "review architecture and suggest improvements"
38
+ # With Gemini CLI workers (requires: npm install -g @google/gemini-cli)
39
+ /team 2:gemini "redesign the UI components"
40
+ # Mixed: Codex for backend analysis, Gemini for frontend (use /ccg instead for this)
36
41
  ```
37
42
 
38
43
  ## Architecture
@@ -104,7 +109,7 @@ Each pipeline stage uses **specialized agents** -- not just executors. The lead
104
109
  **Routing rules:**
105
110
 
106
111
  1. **The lead picks agents per stage, not the user.** The user's `N:agent-type` parameter only overrides the `team-exec` stage worker type. All other stages use stage-appropriate specialists.
107
- 2. **MCP providers complement Claude agents.** Route analysis/review to Codex (`ask_codex`) and UI/large-context work to Gemini (`ask_gemini`) when available. MCP workers are one-shot and don't participate in team communication.
112
+ 2. **Specialist agents complement executor agents.** Route analysis/review to architect/critic Claude agents and UI work to designer agents. Tmux CLI workers are one-shot and don't participate in team communication.
108
113
  3. **Cost mode affects model tier.** In downgrade: `opus` agents to `sonnet`, `sonnet` to `haiku` where quality permits. `team-verify` always uses at least `sonnet`.
109
114
  4. **Risk level escalates review.** Security-sensitive or >20 file changes must include `security-reviewer` + `code-reviewer` (opus) in `team-verify`.
110
115
 
@@ -567,9 +572,9 @@ This scans for processes matching the team name whose config no longer exists, a
567
572
 
568
573
  **IMPORTANT:** The `request_id` is provided in the shutdown request message that the teammate receives. The teammate must extract it and pass it back. Do NOT fabricate request IDs.
569
574
 
570
- ## MCP Workers (Hybrid Roles)
575
+ ## CLI Workers (Codex and Gemini)
571
576
 
572
- The team skill supports **hybrid execution** combining Claude agent teammates with external MCP workers (Codex and Gemini CLIs). Both types can make code changes -- they differ in capabilities and cost.
577
+ The team skill supports **hybrid execution** combining Claude agent teammates with external CLI workers (Codex CLI and Gemini CLI). Both types can make code changes -- they differ in capabilities and cost. These are standalone CLI tools, not MCP servers.
573
578
 
574
579
  ### Execution Modes
575
580
 
@@ -578,21 +583,21 @@ Tasks are tagged with an execution mode during decomposition:
578
583
  | Execution Mode | Provider | Capabilities |
579
584
  |---------------|----------|-------------|
580
585
  | `claude_worker` | Claude agent | Full Claude Code tool access (Read/Write/Edit/Bash/Task). Best for tasks needing Claude's reasoning + iterative tool use. |
581
- | `mcp_codex` | Codex CLI (`ask_codex`) | Full filesystem access in working_directory. Runs autonomously. Best for code review, security analysis, refactoring, architecture. |
582
- | `mcp_gemini` | Gemini CLI (`ask_gemini`) | Full filesystem access + 1M token context. Runs autonomously. Best for UI/frontend work, large-scale changes, documentation. |
586
+ | `codex_worker` | Codex CLI (tmux pane) | Full filesystem access in working_directory. Runs autonomously via tmux pane. Best for code review, security analysis, refactoring, architecture. Requires `npm install -g @openai/codex`. |
587
+ | `gemini_worker` | Gemini CLI (tmux pane) | Full filesystem access in working_directory. Runs autonomously via tmux pane. Best for UI/design work, documentation, large-context tasks. Requires `npm install -g @google/gemini-cli`. |
583
588
 
584
- ### How MCP Workers Operate
589
+ ### How CLI Workers Operate
585
590
 
586
- Codex and Gemini CLIs run in full-auto mode with filesystem access. They are **autonomous executors**, not just analysts:
591
+ Tmux CLI workers run in dedicated tmux panes with filesystem access. They are **autonomous executors**, not just analysts:
587
592
 
588
- 1. Lead writes task instructions to a `prompt_file`
589
- 2. Lead calls `ask_codex` or `ask_gemini` with `working_directory` set to the project root
590
- 3. The CLI reads files, makes changes, runs commands -- all within the working directory
591
- 4. Results/summary are written to `output_file`
593
+ 1. Lead writes task instructions to a prompt file
594
+ 2. Lead spawns a tmux CLI worker with `working_directory` set to the project root
595
+ 3. The worker reads files, makes changes, runs commands -- all within the working directory
596
+ 4. Results/summary are written to an output file
592
597
  5. Lead reads the output, marks the task complete, and feeds results to dependent tasks
593
598
 
594
599
  **Key difference from Claude teammates:**
595
- - MCP workers operate via CLI, not Claude Code's tool system
600
+ - CLI workers operate via tmux, not Claude Code's tool system
596
601
  - They cannot use TaskList/TaskUpdate/SendMessage (no team awareness)
597
602
  - They run as one-shot autonomous jobs, not persistent teammates
598
603
  - The lead manages their lifecycle (spawn, monitor, collect results)
@@ -602,46 +607,42 @@ Codex and Gemini CLIs run in full-auto mode with filesystem access. They are **a
602
607
  | Task Type | Best Route | Why |
603
608
  |-----------|-----------|-----|
604
609
  | Iterative multi-step work | Claude teammate | Needs tool-mediated iteration + team communication |
605
- | Code review / security audit | Codex MCP | Specialized, cheaper than Claude opus |
606
- | Architecture analysis / planning | Codex MCP | External perspective, strong analytical reasoning |
607
- | Refactoring (well-scoped) | Codex MCP | Autonomous execution, good at structured transforms |
608
- | UI/frontend implementation | Gemini MCP | 1M context window, design expertise, can edit many files |
609
- | Large-scale documentation | Gemini MCP | Writing expertise + large context for consistency |
610
- | Visual/image analysis | Gemini MCP | Multimodal capability |
610
+ | Code review / security audit | CLI worker or specialist agent | Autonomous execution, good at structured analysis |
611
+ | Architecture analysis / planning | architect Claude agent | Strong analytical reasoning with codebase access |
612
+ | Refactoring (well-scoped) | CLI worker or executor agent | Autonomous execution, good at structured transforms |
613
+ | UI/frontend implementation | designer Claude agent | Design expertise, framework idioms |
614
+ | Large-scale documentation | writer Claude agent | Writing expertise + large context for consistency |
611
615
  | Build/test iteration loops | Claude teammate | Needs Bash tool + iterative fix cycles |
612
616
  | Tasks needing team coordination | Claude teammate | Needs SendMessage for status updates |
613
617
 
614
- ### Example: Hybrid Team with MCP Executors
618
+ ### Example: Hybrid Team with CLI Workers
615
619
 
616
620
  ```
617
621
  /team 3:executor "refactor auth module with security review"
618
622
 
619
623
  Task decomposition:
620
- #1 [mcp_codex] Security review of current auth code -> output to .omc/research/auth-security.md
621
- #2 [mcp_codex] Refactor auth/login.ts and auth/session.ts (uses #1 findings)
622
- #3 [mcp_gemini] Redesign auth UI components (login form, session indicator)
624
+ #1 [codex_worker] Security review of current auth code -> output to .omc/research/auth-security.md
625
+ #2 [codex_worker] Refactor auth/login.ts and auth/session.ts (uses #1 findings)
626
+ #3 [claude_worker:designer] Redesign auth UI components (login form, session indicator)
623
627
  #4 [claude_worker] Update auth tests + fix integration issues
624
- #5 [mcp_codex] Final code review of all changes
628
+ #5 [gemini_worker] Final code review of all changes
625
629
  ```
626
630
 
627
- The lead runs #1 (Codex analysis), then #2 and #3 in parallel (Codex refactors backend, Gemini redesigns frontend), then #4 (Claude teammate handles test iteration), then #5 (final Codex review).
631
+ The lead runs #1 (Codex security analysis), then #2 and #3 in parallel (Codex refactors backend, designer agent redesigns frontend), then #4 (Claude teammate handles test iteration), then #5 (Gemini final review).
628
632
 
629
- ### MCP Pre-flight Analysis (Optional)
633
+ ### Pre-flight Analysis (Optional)
630
634
 
631
635
  For large ambiguous tasks, run analysis before team creation:
632
636
 
633
- 1. Call `ToolSearch("mcp")` to discover deferred MCP tools; from the results, confirm `mcp__x__ask_codex` is present before proceeding. Never use `ToolSearch("ask_codex")` as the primary search -- it can return false negatives even when MCP tools are present.
634
- 2. Call `ask_codex` (planner role) with task description + codebase context
635
- 3. Use the analysis to produce better task decomposition
636
- 4. Create team and tasks with enriched context
637
-
638
- If ToolSearch finds no MCP tools, skip MCP pre-flight and use Claude agents instead.
637
+ 1. Spawn `Task(subagent_type="oh-my-claudecode:planner", ...)` with task description + codebase context
638
+ 2. Use the analysis to produce better task decomposition
639
+ 3. Create team and tasks with enriched context
639
640
 
640
641
  This is especially useful when the task scope is unclear and benefits from external reasoning before committing to a specific decomposition.
641
642
 
642
643
  ## Monitor Enhancement: Outbox Auto-Ingestion
643
644
 
644
- The lead can proactively ingest outbox messages from MCP workers using the outbox reader utilities, enabling event-driven monitoring without relying solely on `SendMessage` delivery.
645
+ The lead can proactively ingest outbox messages from CLI workers using the outbox reader utilities, enabling event-driven monitoring without relying solely on `SendMessage` delivery.
645
646
 
646
647
  ### Outbox Reader Functions
647
648
 
@@ -929,4 +930,4 @@ MCP workers can operate in isolated git worktrees to prevent file conflicts betw
929
930
 
930
931
  10. **Broadcast is expensive** -- Each broadcast sends a separate message to every teammate. Use `message` (DM) by default. Only broadcast for truly team-wide critical alerts.
931
932
 
932
- 11. **MCP workers are one-shot, not persistent** -- Codex and Gemini CLIs have full filesystem access and CAN make code changes. However, they run as autonomous one-shot jobs -- they cannot use TaskList/TaskUpdate/SendMessage. The lead must manage their lifecycle: write prompt_file, call MCP, read output_file, mark task complete. They don't participate in team communication like Claude teammates do.
933
+ 11. **CLI workers are one-shot, not persistent** -- Tmux CLI workers have full filesystem access and CAN make code changes. However, they run as autonomous one-shot jobs -- they cannot use TaskList/TaskUpdate/SendMessage. The lead must manage their lifecycle: write prompt_file, spawn CLI worker, read output_file, mark task complete. They don't participate in team communication like Claude teammates do.
@@ -18,9 +18,7 @@
18
18
  * 10. ultrathink: Extended reasoning
19
19
  * 11. deepsearch: Codebase search (restricted patterns)
20
20
  * 12. analyze: Analysis mode (restricted patterns)
21
- * 13. codex/gpt: Delegate to Codex MCP (ask_codex)
22
- * 14. gemini: Delegate to Gemini MCP (ask_gemini)
23
- * 8. ccg: Claude-Codex-Gemini tri-model orchestration
21
+ * 13. ccg: Claude-Codex-Gemini tri-model orchestration
24
22
  */
25
23
 
26
24
  import { writeFileSync, mkdirSync, existsSync, unlinkSync, readFileSync } from 'fs';
@@ -204,62 +202,14 @@ IMPORTANT: Invoke ALL skills listed above. Start with the first skill IMMEDIATEL
204
202
  }
205
203
 
206
204
  /**
207
- * Create MCP delegation message (NOT a skill invocation)
205
+ * Create combined output for multiple skill matches
208
206
  */
209
- function createMcpDelegation(provider, originalPrompt) {
210
- const configs = {
211
- codex: {
212
- tool: 'ask_codex',
213
- roles: 'architect, planner, critic, analyst, code-reviewer, security-reviewer, tdd-guide',
214
- defaultRole: 'architect',
215
- },
216
- gemini: {
217
- tool: 'ask_gemini',
218
- roles: 'designer, writer, vision',
219
- defaultRole: 'designer',
220
- },
221
- };
222
- const config = configs[provider];
223
- if (!config) return '';
224
-
225
- return `[MAGIC KEYWORD: ${provider.toUpperCase()}]
226
-
227
- You MUST delegate this task to the ${provider === 'codex' ? 'Codex' : 'Gemini'} MCP tool.
228
-
229
- Steps:
230
- 1. Call ToolSearch("mcp") to discover available MCP tools (required -- they are deferred and not in your tool list by default)
231
- 2. Write a prompt file to \`.omc/prompts/${provider}-{purpose}-{timestamp}.md\` containing clear task instructions derived from the user's request
232
- 3. Determine the appropriate agent_role from: ${config.roles}
233
- 4. Call the \`${config.tool}\` MCP tool with:
234
- - agent_role: <detected or default "${config.defaultRole}">
235
- - prompt_file: <path you wrote>
236
- - output_file: <corresponding -summary.md path>
237
- - context_files: <relevant files from user's request>
238
-
239
- If ToolSearch returns no MCP tools, the MCP server is not configured. Fall back to the equivalent Claude agent instead.
240
-
241
- User request:
242
- ${originalPrompt}
243
-
244
- IMPORTANT: Do NOT invoke a skill. Discover MCP tools via ToolSearch first, then delegate IMMEDIATELY.`;
245
- }
246
-
247
- /**
248
- * Create combined output for skills + MCP delegations
249
- */
250
- function createCombinedOutput(skillMatches, delegationMatches, originalPrompt) {
207
+ function createCombinedOutput(skillMatches, originalPrompt) {
251
208
  const parts = [];
252
-
253
209
  if (skillMatches.length > 0) {
254
210
  parts.push('## Section 1: Skill Invocations\n\n' + createMultiSkillInvocation(skillMatches, originalPrompt));
255
211
  }
256
-
257
- if (delegationMatches.length > 0) {
258
- const delegationParts = delegationMatches.map(d => createMcpDelegation(d.name, originalPrompt));
259
- parts.push('## Section ' + (skillMatches.length > 0 ? '2' : '1') + ': MCP Delegations\n\n' + delegationParts.join('\n\n---\n\n'));
260
- }
261
-
262
- const allNames = [...skillMatches, ...delegationMatches].map(m => m.name.toUpperCase());
212
+ const allNames = skillMatches.map(m => m.name.toUpperCase());
263
213
  return `[MAGIC KEYWORDS DETECTED: ${allNames.join(', ')}]\n\n${parts.join('\n\n---\n\n')}\n\nIMPORTANT: Complete ALL sections above in order.`;
264
214
  }
265
215
 
@@ -291,9 +241,7 @@ function resolveConflicts(matches) {
291
241
 
292
242
  // Sort by priority order
293
243
  const priorityOrder = ['cancel','ralph','autopilot','team','ultrawork',
294
- 'pipeline','ralplan','plan','tdd','ultrathink','deepsearch','analyze',
295
- 'pipeline','ccg','ralplan','plan','tdd','research','ultrathink','deepsearch','analyze',
296
- 'codex','gemini'];
244
+ 'pipeline','ccg','ralplan','plan','tdd','research','ultrathink','deepsearch','analyze'];
297
245
  resolved.sort((a, b) => priorityOrder.indexOf(a.name) - priorityOrder.indexOf(b.name));
298
246
 
299
247
  return resolved;
@@ -320,7 +268,9 @@ function createHookOutput(additionalContext) {
320
268
  */
321
269
  function isTeamEnabled() {
322
270
  try {
323
- const settingsPath = join(homedir(), '.claude', 'settings.json');
271
+ // Check settings.json first (authoritative, user-controlled)
272
+ const cfgDir = process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude');
273
+ const settingsPath = join(cfgDir, 'settings.json');
324
274
  if (existsSync(settingsPath)) {
325
275
  const settings = JSON.parse(readFileSync(settingsPath, 'utf-8'));
326
276
  if (settings.env?.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS === '1' ||
@@ -328,6 +278,7 @@ function isTeamEnabled() {
328
278
  return true;
329
279
  }
330
280
  }
281
+ // Fallback: check env var (for dev/CI environments)
331
282
  if (process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS === '1' ||
332
283
  process.env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS === 'true') {
333
284
  return true;
@@ -426,16 +377,6 @@ async function main() {
426
377
  matches.push({ name: 'analyze', args: '' });
427
378
  }
428
379
 
429
- // Codex keywords (intent-phrase only)
430
- if (/\b(ask|use|delegate\s+to)\s+(codex|gpt)\b/i.test(cleanPrompt)) {
431
- matches.push({ name: 'codex', args: '' });
432
- }
433
-
434
- // Gemini keywords (intent-phrase only)
435
- if (/\b(ask|use|delegate\s+to)\s+gemini\b/i.test(cleanPrompt)) {
436
- matches.push({ name: 'gemini', args: '' });
437
- }
438
-
439
380
  // No matches - pass through
440
381
  if (matches.length === 0) {
441
382
  console.log(JSON.stringify({ continue: true, suppressOutput: true }));
@@ -500,20 +441,8 @@ async function main() {
500
441
  return;
501
442
  }
502
443
 
503
- // Split resolved into skills vs MCP delegations
504
- const MCP_KEYWORDS = ['codex', 'gemini'];
505
- const skillMatches = resolved.filter(m => !MCP_KEYWORDS.includes(m.name));
506
- const delegationMatches = resolved.filter(m => MCP_KEYWORDS.includes(m.name));
507
-
508
- if (skillMatches.length > 0 && delegationMatches.length > 0) {
509
- // Combined: skills + MCP delegations
510
- console.log(JSON.stringify(createHookOutput(createCombinedOutput(skillMatches, delegationMatches, prompt))));
511
- } else if (delegationMatches.length > 0) {
512
- // MCP delegation only
513
- const delegationParts = delegationMatches.map(d => createMcpDelegation(d.name, prompt));
514
- console.log(JSON.stringify(createHookOutput(delegationParts.join('\n\n---\n\n'))));
515
- } else {
516
- // Skills only (existing behavior)
444
+ const skillMatches = resolved;
445
+ if (skillMatches.length > 0) {
517
446
  console.log(JSON.stringify(createHookOutput(createMultiSkillInvocation(skillMatches, prompt))));
518
447
  }
519
448
  } catch (error) {
@@ -5,7 +5,7 @@
5
5
  * Minimal continuation enforcer for all OMC modes.
6
6
  * Stripped down for reliability — no optional imports, no PRD, no notepad pruning.
7
7
  *
8
- * Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline
8
+ * Supported modes: ralph, autopilot, ultrapilot, swarm, ultrawork, ultraqa, pipeline, team
9
9
  */
10
10
 
11
11
  import {
@@ -153,6 +153,28 @@ function isStaleState(state) {
153
153
  return age > STALE_STATE_THRESHOLD_MS;
154
154
  }
155
155
 
156
+ /**
157
+ * Check if a skill active state is stale based on its per-skill TTL.
158
+ * Unlike mode states (which use the global 2-hour threshold), skill states
159
+ * carry their own stale_ttl_ms value set when the skill was activated.
160
+ */
161
+ function isStaleSkillState(state) {
162
+ if (!state) return true;
163
+ if (!state.active) return true;
164
+
165
+ const lastChecked = state.last_checked_at
166
+ ? new Date(state.last_checked_at).getTime()
167
+ : 0;
168
+ const startedAt = state.started_at ? new Date(state.started_at).getTime() : 0;
169
+ const mostRecent = Math.max(lastChecked, startedAt);
170
+
171
+ if (mostRecent === 0) return true;
172
+
173
+ const ttl = state.stale_ttl_ms || 5 * 60 * 1000; // Default 5 min
174
+ const age = Date.now() - mostRecent;
175
+ return age > ttl;
176
+ }
177
+
156
178
  /**
157
179
  * Normalize a path for comparison.
158
180
  * Uses path.resolve() + path.normalize() for proper handling of:
@@ -467,8 +489,15 @@ async function main() {
467
489
  "pipeline-state.json",
468
490
  sessionId,
469
491
  );
492
+ const team = readStateFileWithSession(
493
+ stateDir,
494
+ globalStateDir,
495
+ "team-state.json",
496
+ sessionId,
497
+ );
470
498
 
471
499
  // Swarm uses swarm-summary.json (not swarm-state.json) + marker file
500
+ // Note: Swarm only reads from local stateDir, never global fallback
472
501
  const swarmMarker = existsSync(join(stateDir, "swarm-active.marker"));
473
502
  const swarmSummary = readJsonFile(join(stateDir, "swarm-summary.json"));
474
503
 
@@ -679,7 +708,46 @@ async function main() {
679
708
  }
680
709
  }
681
710
 
682
- // Priority 6: UltraQA (QA cycling)
711
+ // Priority 6: Team (omc-teams / staged pipeline)
712
+ if (
713
+ team.state?.active &&
714
+ !isStaleState(team.state) &&
715
+ isStateForCurrentProject(team.state, directory, team.isGlobal)
716
+ ) {
717
+ const sessionMatches = hasValidSessionId
718
+ ? team.state.session_id === sessionId
719
+ : !team.state.session_id || team.state.session_id === sessionId;
720
+ if (sessionMatches) {
721
+ const phase = team.state.current_phase || "executing";
722
+ const terminalPhases = ["completed", "complete", "failed", "cancelled"];
723
+ if (!terminalPhases.includes(phase)) {
724
+ const newCount = (team.state.reinforcement_count || 0) + 1;
725
+ if (newCount <= 20) {
726
+ const toolError = readLastToolError(stateDir);
727
+ const errorGuidance = getToolErrorRetryGuidance(toolError);
728
+
729
+ team.state.reinforcement_count = newCount;
730
+ team.state.last_checked_at = new Date().toISOString();
731
+ writeJsonFile(team.path, team.state);
732
+
733
+ let reason = `[TEAM - Phase: ${phase}] Team mode active. Continue working. When all team tasks complete, run /oh-my-claudecode:cancel to cleanly exit. If cancel fails, retry with /oh-my-claudecode:cancel --force.`;
734
+ if (errorGuidance) {
735
+ reason = errorGuidance + reason;
736
+ }
737
+
738
+ console.log(
739
+ JSON.stringify({
740
+ decision: "block",
741
+ reason,
742
+ }),
743
+ );
744
+ return;
745
+ }
746
+ }
747
+ }
748
+ }
749
+
750
+ // Priority 7: UltraQA (QA cycling)
683
751
  if (
684
752
  ultraqa.state?.active &&
685
753
  !isStaleState(ultraqa.state) &&
@@ -713,7 +781,7 @@ async function main() {
713
781
  }
714
782
  }
715
783
 
716
- // Priority 7: Ultrawork - ALWAYS continue while active (not just when tasks exist)
784
+ // Priority 8: Ultrawork - ALWAYS continue while active (not just when tasks exist)
717
785
  // This prevents false stops from bash errors, transient failures, etc.
718
786
  // Session isolation: only block if state belongs to this session (issue #311)
719
787
  // If state has session_id, it must match. If no session_id (legacy), allow.
@@ -766,6 +834,55 @@ async function main() {
766
834
  return;
767
835
  }
768
836
 
837
+ // Priority 9: Skill Active State (issue #1033)
838
+ // Skills like code-review, plan, tdd, etc. write skill-active-state.json
839
+ // when invoked via the Skill tool. This prevents premature stops mid-skill.
840
+ const skillState = readStateFileWithSession(
841
+ stateDir,
842
+ globalStateDir,
843
+ "skill-active-state.json",
844
+ sessionId,
845
+ );
846
+ if (
847
+ skillState.state?.active &&
848
+ !isStaleSkillState(skillState.state)
849
+ ) {
850
+ const sessionMatches = hasValidSessionId
851
+ ? skillState.state.session_id === sessionId
852
+ : !skillState.state.session_id || skillState.state.session_id === sessionId;
853
+ if (sessionMatches) {
854
+ const count = skillState.state.reinforcement_count || 0;
855
+ const maxReinforcements = skillState.state.max_reinforcements || 3;
856
+
857
+ if (count < maxReinforcements) {
858
+ const toolError = readLastToolError(stateDir);
859
+ const errorGuidance = getToolErrorRetryGuidance(toolError);
860
+
861
+ skillState.state.reinforcement_count = count + 1;
862
+ skillState.state.last_checked_at = new Date().toISOString();
863
+ writeJsonFile(skillState.path, skillState.state);
864
+
865
+ const skillName = skillState.state.skill_name || "unknown";
866
+ let reason = `[SKILL ACTIVE: ${skillName}] The "${skillName}" skill is still executing (reinforcement ${count + 1}/${maxReinforcements}). Continue working on the skill's instructions. Do not stop until the skill completes its workflow.`;
867
+ if (errorGuidance) {
868
+ reason = errorGuidance + reason;
869
+ }
870
+
871
+ console.log(JSON.stringify({ decision: "block", reason }));
872
+ return;
873
+ } else {
874
+ // Reinforcement limit reached - clear state and allow stop
875
+ try {
876
+ if (existsSync(skillState.path)) {
877
+ unlinkSync(skillState.path);
878
+ }
879
+ } catch {
880
+ // Ignore cleanup errors
881
+ }
882
+ }
883
+ }
884
+ }
885
+
769
886
  // No blocking needed
770
887
  console.log(JSON.stringify({ continue: true, suppressOutput: true }));
771
888
  } catch (error) {
@@ -155,10 +155,28 @@ async function main() {
155
155
  // Write error state
156
156
  writeErrorState(stateDir, toolName, inputPreview, error, retryCount);
157
157
 
158
- console.log(JSON.stringify({ continue: true, suppressOutput: true }));
158
+ // Inject continuation guidance so the model analyzes the error instead of stopping.
159
+ // Without this, PostToolUseFailure returns silently and the model may end its turn.
160
+ // The PostToolUse hook (post-tool-verifier.mjs) provides similar guidance for
161
+ // successful Bash calls with error patterns, but PostToolUseFailure is a separate
162
+ // event that needs its own guidance injection.
163
+ let guidance;
164
+ if (retryCount >= 5) {
165
+ guidance = `Tool "${toolName}" has failed ${retryCount} times. Stop retrying the same approach — try a different command, check dependencies, or ask the user for guidance.`;
166
+ } else {
167
+ guidance = `Tool "${toolName}" failed. Analyze the error, fix the issue, and continue working.`;
168
+ }
169
+
170
+ console.log(JSON.stringify({
171
+ continue: true,
172
+ hookSpecificOutput: {
173
+ hookEventName: 'PostToolUseFailure',
174
+ additionalContext: guidance,
175
+ },
176
+ }));
159
177
  } catch (error) {
160
178
  // Never block on hook errors
161
- console.log(JSON.stringify({ continue: true, suppressOutput: true }));
179
+ console.log(JSON.stringify({ continue: true }));
162
180
  }
163
181
  }
164
182
 
@@ -69,7 +69,7 @@ async function checkForUpdates(currentVersion) {
69
69
  const controller = new AbortController();
70
70
  const timeoutId = setTimeout(() => controller.abort(), 2000);
71
71
 
72
- const response = await fetch('https://registry.npmjs.org/oh-my-claudecode/latest', {
72
+ const response = await fetch('https://registry.npmjs.org/oh-my-claude-sisyphus/latest', {
73
73
  signal: controller.signal
74
74
  });
75
75
  clearTimeout(timeoutId);
@@ -221,7 +221,7 @@ async function main() {
221
221
  oh-my-claudecode v${updateInfo.latestVersion} is available (current: v${updateInfo.currentVersion}).
222
222
 
223
223
  ACTION: Use AskUserQuestion to ask the user if they want to upgrade now. Offer these options:
224
- - "Upgrade now" (Recommended): Run \`npm install -g oh-my-claudecode@latest\` via Bash, then run \`omc install --force --skip-claude-check --refresh-hooks\` to reconcile hooks and CLAUDE.md
224
+ - "Upgrade now" (Recommended): Run \`npm install -g oh-my-claude-sisyphus@latest\` via Bash, then run \`omc install --force --skip-claude-check --refresh-hooks\` to reconcile hooks and CLAUDE.md
225
225
  - "Skip this time": Continue the session without upgrading
226
226
  - "Don't ask again": Tell the user to set "autoUpgradePrompt": false in ~/.claude/.omc-config.json to disable future prompts
227
227
 
@@ -347,20 +347,6 @@ ${agentsContent}${truncationNotice}
347
347
  }
348
348
  }
349
349
 
350
- // MCP tool discovery reminder (deferred tools need ToolSearch before use)
351
- messages.push(`<session-restore>
352
-
353
- [MCP TOOL DISCOVERY REQUIRED]
354
-
355
- MCP tools (ask_codex, ask_gemini) are deferred and NOT in your tool list yet.
356
- Before first use, call ToolSearch("mcp") to discover all available MCP tools.
357
- If ToolSearch returns no results, MCP servers are not configured -- use Claude agent fallbacks instead.
358
-
359
- </session-restore>
360
-
361
- ---
362
- `);
363
-
364
350
  if (messages.length > 0) {
365
351
  console.log(JSON.stringify({
366
352
  continue: true,
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=backfill-dedup.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"backfill-dedup.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/analytics/backfill-dedup.test.ts"],"names":[],"mappings":""}