@liangjie559567/ultrapower 5.5.13 → 5.5.14

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 (1160) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/LICENSE +21 -21
  4. package/bridge/gyoshu_bridge.py +846 -846
  5. package/dist/hooks/bridge-normalize.d.ts.map +1 -1
  6. package/dist/hooks/bridge-normalize.js +2 -0
  7. package/dist/hooks/bridge-normalize.js.map +1 -1
  8. package/dist/lib/path-validator.d.ts.map +1 -1
  9. package/dist/lib/path-validator.js +7 -0
  10. package/dist/lib/path-validator.js.map +1 -1
  11. package/docs/CLAUDE.md +1 -1
  12. package/docs/guides/v5.5.13-new-features.md +234 -0
  13. package/hooks/run-hook.cmd +0 -0
  14. package/hooks/session-start +0 -0
  15. package/package.json +1 -1
  16. package/scripts/persistent-mode.cjs +605 -605
  17. package/skills/systematic-debugging/find-polluter.sh +0 -0
  18. package/skills/writing-skills/graphviz-conventions.dot +171 -171
  19. package/skills/writing-skills/render-graphs.js +0 -0
  20. package/templates/axiom/scripts/Check-Memory.ps1 +68 -68
  21. package/templates/axiom/scripts/Poll-Memory.ps1 +36 -36
  22. package/templates/axiom/scripts/Watch-Memory.ps1 +149 -149
  23. package/templates/axiom/scripts/agent-runner.ps1 +101 -101
  24. package/templates/axiom/scripts/start-reviews.ps1 +19 -19
  25. package/dist/__tests__/agent-registry.test.d.ts +0 -2
  26. package/dist/__tests__/agent-registry.test.d.ts.map +0 -1
  27. package/dist/__tests__/agent-registry.test.js +0 -45
  28. package/dist/__tests__/agent-registry.test.js.map +0 -1
  29. package/dist/__tests__/analytics/backfill-dedup.test.d.ts +0 -2
  30. package/dist/__tests__/analytics/backfill-dedup.test.d.ts.map +0 -1
  31. package/dist/__tests__/analytics/backfill-dedup.test.js +0 -179
  32. package/dist/__tests__/analytics/backfill-dedup.test.js.map +0 -1
  33. package/dist/__tests__/analytics/backfill-engine.test.d.ts +0 -2
  34. package/dist/__tests__/analytics/backfill-engine.test.d.ts.map +0 -1
  35. package/dist/__tests__/analytics/backfill-engine.test.js +0 -362
  36. package/dist/__tests__/analytics/backfill-engine.test.js.map +0 -1
  37. package/dist/__tests__/analytics/output-estimator.test.d.ts +0 -2
  38. package/dist/__tests__/analytics/output-estimator.test.d.ts.map +0 -1
  39. package/dist/__tests__/analytics/output-estimator.test.js +0 -124
  40. package/dist/__tests__/analytics/output-estimator.test.js.map +0 -1
  41. package/dist/__tests__/analytics/token-extractor.test.d.ts +0 -2
  42. package/dist/__tests__/analytics/token-extractor.test.d.ts.map +0 -1
  43. package/dist/__tests__/analytics/token-extractor.test.js +0 -165
  44. package/dist/__tests__/analytics/token-extractor.test.js.map +0 -1
  45. package/dist/__tests__/analytics/token-tracker.test.d.ts +0 -2
  46. package/dist/__tests__/analytics/token-tracker.test.d.ts.map +0 -1
  47. package/dist/__tests__/analytics/token-tracker.test.js +0 -189
  48. package/dist/__tests__/analytics/token-tracker.test.js.map +0 -1
  49. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts +0 -2
  50. package/dist/__tests__/analytics/tokscale-adapter.test.d.ts.map +0 -1
  51. package/dist/__tests__/analytics/tokscale-adapter.test.js +0 -79
  52. package/dist/__tests__/analytics/tokscale-adapter.test.js.map +0 -1
  53. package/dist/__tests__/analytics/transcript-parser.test.d.ts +0 -2
  54. package/dist/__tests__/analytics/transcript-parser.test.d.ts.map +0 -1
  55. package/dist/__tests__/analytics/transcript-parser.test.js +0 -289
  56. package/dist/__tests__/analytics/transcript-parser.test.js.map +0 -1
  57. package/dist/__tests__/analytics/transcript-scanner.test.d.ts +0 -2
  58. package/dist/__tests__/analytics/transcript-scanner.test.d.ts.map +0 -1
  59. package/dist/__tests__/analytics/transcript-scanner.test.js +0 -443
  60. package/dist/__tests__/analytics/transcript-scanner.test.js.map +0 -1
  61. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts +0 -2
  62. package/dist/__tests__/analytics/transcript-token-extractor.test.d.ts.map +0 -1
  63. package/dist/__tests__/analytics/transcript-token-extractor.test.js +0 -177
  64. package/dist/__tests__/analytics/transcript-token-extractor.test.js.map +0 -1
  65. package/dist/__tests__/auto-update.test.d.ts +0 -2
  66. package/dist/__tests__/auto-update.test.d.ts.map +0 -1
  67. package/dist/__tests__/auto-update.test.js +0 -451
  68. package/dist/__tests__/auto-update.test.js.map +0 -1
  69. package/dist/__tests__/auto-upgrade-prompt.test.d.ts +0 -2
  70. package/dist/__tests__/auto-upgrade-prompt.test.d.ts.map +0 -1
  71. package/dist/__tests__/auto-upgrade-prompt.test.js +0 -81
  72. package/dist/__tests__/auto-upgrade-prompt.test.js.map +0 -1
  73. package/dist/__tests__/bash-history.test.d.ts +0 -5
  74. package/dist/__tests__/bash-history.test.d.ts.map +0 -1
  75. package/dist/__tests__/bash-history.test.js +0 -78
  76. package/dist/__tests__/bash-history.test.js.map +0 -1
  77. package/dist/__tests__/cli-config-stop-callback.test.d.ts +0 -2
  78. package/dist/__tests__/cli-config-stop-callback.test.d.ts.map +0 -1
  79. package/dist/__tests__/cli-config-stop-callback.test.js +0 -102
  80. package/dist/__tests__/cli-config-stop-callback.test.js.map +0 -1
  81. package/dist/__tests__/cli-notify-profile.test.d.ts +0 -2
  82. package/dist/__tests__/cli-notify-profile.test.d.ts.map +0 -1
  83. package/dist/__tests__/cli-notify-profile.test.js +0 -213
  84. package/dist/__tests__/cli-notify-profile.test.js.map +0 -1
  85. package/dist/__tests__/codex-backoff.test.d.ts +0 -2
  86. package/dist/__tests__/codex-backoff.test.d.ts.map +0 -1
  87. package/dist/__tests__/codex-backoff.test.js +0 -143
  88. package/dist/__tests__/codex-backoff.test.js.map +0 -1
  89. package/dist/__tests__/compatibility-security.test.d.ts +0 -13
  90. package/dist/__tests__/compatibility-security.test.d.ts.map +0 -1
  91. package/dist/__tests__/compatibility-security.test.js +0 -403
  92. package/dist/__tests__/compatibility-security.test.js.map +0 -1
  93. package/dist/__tests__/compatibility.test.d.ts +0 -7
  94. package/dist/__tests__/compatibility.test.d.ts.map +0 -1
  95. package/dist/__tests__/compatibility.test.js +0 -484
  96. package/dist/__tests__/compatibility.test.js.map +0 -1
  97. package/dist/__tests__/consensus-execution-handoff.test.d.ts +0 -14
  98. package/dist/__tests__/consensus-execution-handoff.test.d.ts.map +0 -1
  99. package/dist/__tests__/consensus-execution-handoff.test.js +0 -178
  100. package/dist/__tests__/consensus-execution-handoff.test.js.map +0 -1
  101. package/dist/__tests__/delegation-enforcement-levels.test.d.ts +0 -9
  102. package/dist/__tests__/delegation-enforcement-levels.test.d.ts.map +0 -1
  103. package/dist/__tests__/delegation-enforcement-levels.test.js +0 -583
  104. package/dist/__tests__/delegation-enforcement-levels.test.js.map +0 -1
  105. package/dist/__tests__/delegation-enforcer-integration.test.d.ts +0 -6
  106. package/dist/__tests__/delegation-enforcer-integration.test.d.ts.map +0 -1
  107. package/dist/__tests__/delegation-enforcer-integration.test.js +0 -136
  108. package/dist/__tests__/delegation-enforcer-integration.test.js.map +0 -1
  109. package/dist/__tests__/delegation-enforcer.test.d.ts +0 -5
  110. package/dist/__tests__/delegation-enforcer.test.d.ts.map +0 -1
  111. package/dist/__tests__/delegation-enforcer.test.js +0 -209
  112. package/dist/__tests__/delegation-enforcer.test.js.map +0 -1
  113. package/dist/__tests__/directory-context-injector.test.d.ts +0 -2
  114. package/dist/__tests__/directory-context-injector.test.d.ts.map +0 -1
  115. package/dist/__tests__/directory-context-injector.test.js +0 -186
  116. package/dist/__tests__/directory-context-injector.test.js.map +0 -1
  117. package/dist/__tests__/disable-tools.test.d.ts +0 -8
  118. package/dist/__tests__/disable-tools.test.d.ts.map +0 -1
  119. package/dist/__tests__/disable-tools.test.js +0 -182
  120. package/dist/__tests__/disable-tools.test.js.map +0 -1
  121. package/dist/__tests__/doctor-conflicts.test.d.ts +0 -8
  122. package/dist/__tests__/doctor-conflicts.test.d.ts.map +0 -1
  123. package/dist/__tests__/doctor-conflicts.test.js +0 -230
  124. package/dist/__tests__/doctor-conflicts.test.js.map +0 -1
  125. package/dist/__tests__/example.test.d.ts +0 -2
  126. package/dist/__tests__/example.test.d.ts.map +0 -1
  127. package/dist/__tests__/example.test.js +0 -20
  128. package/dist/__tests__/example.test.js.map +0 -1
  129. package/dist/__tests__/helpers/prompt-test-helpers.d.ts +0 -4
  130. package/dist/__tests__/helpers/prompt-test-helpers.d.ts.map +0 -1
  131. package/dist/__tests__/helpers/prompt-test-helpers.js +0 -9
  132. package/dist/__tests__/helpers/prompt-test-helpers.js.map +0 -1
  133. package/dist/__tests__/hooks/learner/bridge.test.d.ts +0 -11
  134. package/dist/__tests__/hooks/learner/bridge.test.d.ts.map +0 -1
  135. package/dist/__tests__/hooks/learner/bridge.test.js +0 -217
  136. package/dist/__tests__/hooks/learner/bridge.test.js.map +0 -1
  137. package/dist/__tests__/hooks/learner/parser.test.d.ts +0 -5
  138. package/dist/__tests__/hooks/learner/parser.test.d.ts.map +0 -1
  139. package/dist/__tests__/hooks/learner/parser.test.js +0 -219
  140. package/dist/__tests__/hooks/learner/parser.test.js.map +0 -1
  141. package/dist/__tests__/hooks-json-paths.test.d.ts +0 -9
  142. package/dist/__tests__/hooks-json-paths.test.d.ts.map +0 -1
  143. package/dist/__tests__/hooks-json-paths.test.js +0 -91
  144. package/dist/__tests__/hooks-json-paths.test.js.map +0 -1
  145. package/dist/__tests__/hooks.test.d.ts +0 -2
  146. package/dist/__tests__/hooks.test.d.ts.map +0 -1
  147. package/dist/__tests__/hooks.test.js +0 -1273
  148. package/dist/__tests__/hooks.test.js.map +0 -1
  149. package/dist/__tests__/hud/analytics-display.test.d.ts +0 -2
  150. package/dist/__tests__/hud/analytics-display.test.d.ts.map +0 -1
  151. package/dist/__tests__/hud/analytics-display.test.js +0 -236
  152. package/dist/__tests__/hud/analytics-display.test.js.map +0 -1
  153. package/dist/__tests__/hud/call-counts.test.d.ts +0 -2
  154. package/dist/__tests__/hud/call-counts.test.d.ts.map +0 -1
  155. package/dist/__tests__/hud/call-counts.test.js +0 -90
  156. package/dist/__tests__/hud/call-counts.test.js.map +0 -1
  157. package/dist/__tests__/hud/context-warning.test.d.ts +0 -2
  158. package/dist/__tests__/hud/context-warning.test.d.ts.map +0 -1
  159. package/dist/__tests__/hud/context-warning.test.js +0 -84
  160. package/dist/__tests__/hud/context-warning.test.js.map +0 -1
  161. package/dist/__tests__/hud/cwd.test.d.ts +0 -2
  162. package/dist/__tests__/hud/cwd.test.d.ts.map +0 -1
  163. package/dist/__tests__/hud/cwd.test.js +0 -62
  164. package/dist/__tests__/hud/cwd.test.js.map +0 -1
  165. package/dist/__tests__/hud/defaults.test.d.ts +0 -2
  166. package/dist/__tests__/hud/defaults.test.d.ts.map +0 -1
  167. package/dist/__tests__/hud/defaults.test.js +0 -55
  168. package/dist/__tests__/hud/defaults.test.js.map +0 -1
  169. package/dist/__tests__/hud/git.test.d.ts +0 -2
  170. package/dist/__tests__/hud/git.test.d.ts.map +0 -1
  171. package/dist/__tests__/hud/git.test.js +0 -110
  172. package/dist/__tests__/hud/git.test.js.map +0 -1
  173. package/dist/__tests__/hud/model.test.d.ts +0 -2
  174. package/dist/__tests__/hud/model.test.d.ts.map +0 -1
  175. package/dist/__tests__/hud/model.test.js +0 -63
  176. package/dist/__tests__/hud/model.test.js.map +0 -1
  177. package/dist/__tests__/hud/render.test.d.ts +0 -2
  178. package/dist/__tests__/hud/render.test.d.ts.map +0 -1
  179. package/dist/__tests__/hud/render.test.js +0 -141
  180. package/dist/__tests__/hud/render.test.js.map +0 -1
  181. package/dist/__tests__/hud/sanitize.test.d.ts +0 -10
  182. package/dist/__tests__/hud/sanitize.test.d.ts.map +0 -1
  183. package/dist/__tests__/hud/sanitize.test.js +0 -138
  184. package/dist/__tests__/hud/sanitize.test.js.map +0 -1
  185. package/dist/__tests__/hud/skills.test.d.ts +0 -2
  186. package/dist/__tests__/hud/skills.test.d.ts.map +0 -1
  187. package/dist/__tests__/hud/skills.test.js +0 -143
  188. package/dist/__tests__/hud/skills.test.js.map +0 -1
  189. package/dist/__tests__/hud/state.test.d.ts +0 -2
  190. package/dist/__tests__/hud/state.test.d.ts.map +0 -1
  191. package/dist/__tests__/hud/state.test.js +0 -162
  192. package/dist/__tests__/hud/state.test.js.map +0 -1
  193. package/dist/__tests__/hud/thinking.test.d.ts +0 -2
  194. package/dist/__tests__/hud/thinking.test.d.ts.map +0 -1
  195. package/dist/__tests__/hud/thinking.test.js +0 -32
  196. package/dist/__tests__/hud/thinking.test.js.map +0 -1
  197. package/dist/__tests__/hud/top-agents.test.d.ts +0 -8
  198. package/dist/__tests__/hud/top-agents.test.d.ts.map +0 -1
  199. package/dist/__tests__/hud/top-agents.test.js +0 -158
  200. package/dist/__tests__/hud/top-agents.test.js.map +0 -1
  201. package/dist/__tests__/hud/usage-api.test.d.ts +0 -5
  202. package/dist/__tests__/hud/usage-api.test.d.ts.map +0 -1
  203. package/dist/__tests__/hud/usage-api.test.js +0 -201
  204. package/dist/__tests__/hud/usage-api.test.js.map +0 -1
  205. package/dist/__tests__/hud/version-display.test.d.ts +0 -2
  206. package/dist/__tests__/hud/version-display.test.d.ts.map +0 -1
  207. package/dist/__tests__/hud/version-display.test.js +0 -107
  208. package/dist/__tests__/hud/version-display.test.js.map +0 -1
  209. package/dist/__tests__/hud/windows-platform.test.d.ts +0 -2
  210. package/dist/__tests__/hud/windows-platform.test.d.ts.map +0 -1
  211. package/dist/__tests__/hud/windows-platform.test.js +0 -193
  212. package/dist/__tests__/hud/windows-platform.test.js.map +0 -1
  213. package/dist/__tests__/hud-agents.test.d.ts +0 -7
  214. package/dist/__tests__/hud-agents.test.d.ts.map +0 -1
  215. package/dist/__tests__/hud-agents.test.js +0 -392
  216. package/dist/__tests__/hud-agents.test.js.map +0 -1
  217. package/dist/__tests__/hud-axiom.test.d.ts +0 -5
  218. package/dist/__tests__/hud-axiom.test.d.ts.map +0 -1
  219. package/dist/__tests__/hud-axiom.test.js +0 -287
  220. package/dist/__tests__/hud-axiom.test.js.map +0 -1
  221. package/dist/__tests__/hud-suggestions.test.d.ts +0 -5
  222. package/dist/__tests__/hud-suggestions.test.d.ts.map +0 -1
  223. package/dist/__tests__/hud-suggestions.test.js +0 -244
  224. package/dist/__tests__/hud-suggestions.test.js.map +0 -1
  225. package/dist/__tests__/hud-windows.test.d.ts +0 -2
  226. package/dist/__tests__/hud-windows.test.d.ts.map +0 -1
  227. package/dist/__tests__/hud-windows.test.js +0 -154
  228. package/dist/__tests__/hud-windows.test.js.map +0 -1
  229. package/dist/__tests__/inline-prompt-integration.test.d.ts +0 -2
  230. package/dist/__tests__/inline-prompt-integration.test.d.ts.map +0 -1
  231. package/dist/__tests__/inline-prompt-integration.test.js +0 -411
  232. package/dist/__tests__/inline-prompt-integration.test.js.map +0 -1
  233. package/dist/__tests__/inline-success-shape.test.d.ts +0 -2
  234. package/dist/__tests__/inline-success-shape.test.d.ts.map +0 -1
  235. package/dist/__tests__/inline-success-shape.test.js +0 -130
  236. package/dist/__tests__/inline-success-shape.test.js.map +0 -1
  237. package/dist/__tests__/installer-hooks-merge.test.d.ts +0 -13
  238. package/dist/__tests__/installer-hooks-merge.test.d.ts.map +0 -1
  239. package/dist/__tests__/installer-hooks-merge.test.js +0 -250
  240. package/dist/__tests__/installer-hooks-merge.test.js.map +0 -1
  241. package/dist/__tests__/installer-hud-skip.test.d.ts +0 -2
  242. package/dist/__tests__/installer-hud-skip.test.d.ts.map +0 -1
  243. package/dist/__tests__/installer-hud-skip.test.js +0 -102
  244. package/dist/__tests__/installer-hud-skip.test.js.map +0 -1
  245. package/dist/__tests__/installer.test.d.ts +0 -2
  246. package/dist/__tests__/installer.test.d.ts.map +0 -1
  247. package/dist/__tests__/installer.test.js +0 -474
  248. package/dist/__tests__/installer.test.js.map +0 -1
  249. package/dist/__tests__/job-management-sqlite.test.d.ts +0 -2
  250. package/dist/__tests__/job-management-sqlite.test.d.ts.map +0 -1
  251. package/dist/__tests__/job-management-sqlite.test.js +0 -284
  252. package/dist/__tests__/job-management-sqlite.test.js.map +0 -1
  253. package/dist/__tests__/job-management.test.d.ts +0 -2
  254. package/dist/__tests__/job-management.test.d.ts.map +0 -1
  255. package/dist/__tests__/job-management.test.js +0 -411
  256. package/dist/__tests__/job-management.test.js.map +0 -1
  257. package/dist/__tests__/job-state-db.test.d.ts +0 -2
  258. package/dist/__tests__/job-state-db.test.d.ts.map +0 -1
  259. package/dist/__tests__/job-state-db.test.js +0 -611
  260. package/dist/__tests__/job-state-db.test.js.map +0 -1
  261. package/dist/__tests__/learner/auto-learner.test.d.ts +0 -7
  262. package/dist/__tests__/learner/auto-learner.test.d.ts.map +0 -1
  263. package/dist/__tests__/learner/auto-learner.test.js +0 -507
  264. package/dist/__tests__/learner/auto-learner.test.js.map +0 -1
  265. package/dist/__tests__/learner/matcher.test.d.ts +0 -2
  266. package/dist/__tests__/learner/matcher.test.d.ts.map +0 -1
  267. package/dist/__tests__/learner/matcher.test.js +0 -330
  268. package/dist/__tests__/learner/matcher.test.js.map +0 -1
  269. package/dist/__tests__/live-data.test.d.ts +0 -2
  270. package/dist/__tests__/live-data.test.d.ts.map +0 -1
  271. package/dist/__tests__/live-data.test.js +0 -331
  272. package/dist/__tests__/live-data.test.js.map +0 -1
  273. package/dist/__tests__/load-agent-prompt.test.d.ts +0 -2
  274. package/dist/__tests__/load-agent-prompt.test.d.ts.map +0 -1
  275. package/dist/__tests__/load-agent-prompt.test.js +0 -91
  276. package/dist/__tests__/load-agent-prompt.test.js.map +0 -1
  277. package/dist/__tests__/lsp-servers.test.d.ts +0 -2
  278. package/dist/__tests__/lsp-servers.test.d.ts.map +0 -1
  279. package/dist/__tests__/lsp-servers.test.js +0 -121
  280. package/dist/__tests__/lsp-servers.test.js.map +0 -1
  281. package/dist/__tests__/mcp-fallback-429.test.d.ts +0 -2
  282. package/dist/__tests__/mcp-fallback-429.test.d.ts.map +0 -1
  283. package/dist/__tests__/mcp-fallback-429.test.js +0 -164
  284. package/dist/__tests__/mcp-fallback-429.test.js.map +0 -1
  285. package/dist/__tests__/mcp-server-workflows.test.d.ts +0 -2
  286. package/dist/__tests__/mcp-server-workflows.test.d.ts.map +0 -1
  287. package/dist/__tests__/mcp-server-workflows.test.js +0 -301
  288. package/dist/__tests__/mcp-server-workflows.test.js.map +0 -1
  289. package/dist/__tests__/mnemosyne/config.test.d.ts +0 -2
  290. package/dist/__tests__/mnemosyne/config.test.d.ts.map +0 -1
  291. package/dist/__tests__/mnemosyne/config.test.js +0 -37
  292. package/dist/__tests__/mnemosyne/config.test.js.map +0 -1
  293. package/dist/__tests__/mnemosyne/detector.test.d.ts +0 -2
  294. package/dist/__tests__/mnemosyne/detector.test.d.ts.map +0 -1
  295. package/dist/__tests__/mnemosyne/detector.test.js +0 -99
  296. package/dist/__tests__/mnemosyne/detector.test.js.map +0 -1
  297. package/dist/__tests__/mnemosyne/finder.test.d.ts +0 -2
  298. package/dist/__tests__/mnemosyne/finder.test.d.ts.map +0 -1
  299. package/dist/__tests__/mnemosyne/finder.test.js +0 -105
  300. package/dist/__tests__/mnemosyne/finder.test.js.map +0 -1
  301. package/dist/__tests__/mnemosyne/loader.test.d.ts +0 -2
  302. package/dist/__tests__/mnemosyne/loader.test.d.ts.map +0 -1
  303. package/dist/__tests__/mnemosyne/loader.test.js +0 -73
  304. package/dist/__tests__/mnemosyne/loader.test.js.map +0 -1
  305. package/dist/__tests__/mnemosyne/parser.test.d.ts +0 -2
  306. package/dist/__tests__/mnemosyne/parser.test.d.ts.map +0 -1
  307. package/dist/__tests__/mnemosyne/parser.test.js +0 -81
  308. package/dist/__tests__/mnemosyne/parser.test.js.map +0 -1
  309. package/dist/__tests__/mnemosyne/validator.test.d.ts +0 -2
  310. package/dist/__tests__/mnemosyne/validator.test.d.ts.map +0 -1
  311. package/dist/__tests__/mnemosyne/validator.test.js +0 -85
  312. package/dist/__tests__/mnemosyne/validator.test.js.map +0 -1
  313. package/dist/__tests__/model-routing.test.d.ts +0 -2
  314. package/dist/__tests__/model-routing.test.d.ts.map +0 -1
  315. package/dist/__tests__/model-routing.test.js +0 -794
  316. package/dist/__tests__/model-routing.test.js.map +0 -1
  317. package/dist/__tests__/multi-model-mcp-integration.test.d.ts +0 -2
  318. package/dist/__tests__/multi-model-mcp-integration.test.d.ts.map +0 -1
  319. package/dist/__tests__/multi-model-mcp-integration.test.js +0 -69
  320. package/dist/__tests__/multi-model-mcp-integration.test.js.map +0 -1
  321. package/dist/__tests__/multi-model-mcp.test.d.ts +0 -2
  322. package/dist/__tests__/multi-model-mcp.test.d.ts.map +0 -1
  323. package/dist/__tests__/multi-model-mcp.test.js +0 -145
  324. package/dist/__tests__/multi-model-mcp.test.js.map +0 -1
  325. package/dist/__tests__/notepad.test.d.ts +0 -2
  326. package/dist/__tests__/notepad.test.d.ts.map +0 -1
  327. package/dist/__tests__/notepad.test.js +0 -374
  328. package/dist/__tests__/notepad.test.js.map +0 -1
  329. package/dist/__tests__/omc-tools-contract.test.d.ts +0 -11
  330. package/dist/__tests__/omc-tools-contract.test.d.ts.map +0 -1
  331. package/dist/__tests__/omc-tools-contract.test.js +0 -172
  332. package/dist/__tests__/omc-tools-contract.test.js.map +0 -1
  333. package/dist/__tests__/omc-tools-server.test.d.ts +0 -2
  334. package/dist/__tests__/omc-tools-server.test.d.ts.map +0 -1
  335. package/dist/__tests__/omc-tools-server.test.js +0 -61
  336. package/dist/__tests__/omc-tools-server.test.js.map +0 -1
  337. package/dist/__tests__/permission-enforcement.test.d.ts +0 -2
  338. package/dist/__tests__/permission-enforcement.test.d.ts.map +0 -1
  339. package/dist/__tests__/permission-enforcement.test.js +0 -194
  340. package/dist/__tests__/permission-enforcement.test.js.map +0 -1
  341. package/dist/__tests__/plugin-registry.test.d.ts +0 -2
  342. package/dist/__tests__/plugin-registry.test.d.ts.map +0 -1
  343. package/dist/__tests__/plugin-registry.test.js +0 -233
  344. package/dist/__tests__/plugin-registry.test.js.map +0 -1
  345. package/dist/__tests__/prompt-file-only.test.d.ts +0 -2
  346. package/dist/__tests__/prompt-file-only.test.d.ts.map +0 -1
  347. package/dist/__tests__/prompt-file-only.test.js +0 -263
  348. package/dist/__tests__/prompt-file-only.test.js.map +0 -1
  349. package/dist/__tests__/prompt-injection.test.d.ts +0 -2
  350. package/dist/__tests__/prompt-injection.test.d.ts.map +0 -1
  351. package/dist/__tests__/prompt-injection.test.js +0 -242
  352. package/dist/__tests__/prompt-injection.test.js.map +0 -1
  353. package/dist/__tests__/providers/azure-devops.test.d.ts +0 -2
  354. package/dist/__tests__/providers/azure-devops.test.d.ts.map +0 -1
  355. package/dist/__tests__/providers/azure-devops.test.js +0 -158
  356. package/dist/__tests__/providers/azure-devops.test.js.map +0 -1
  357. package/dist/__tests__/providers/bitbucket.test.d.ts +0 -2
  358. package/dist/__tests__/providers/bitbucket.test.d.ts.map +0 -1
  359. package/dist/__tests__/providers/bitbucket.test.js +0 -170
  360. package/dist/__tests__/providers/bitbucket.test.js.map +0 -1
  361. package/dist/__tests__/providers/detection.test.d.ts +0 -2
  362. package/dist/__tests__/providers/detection.test.d.ts.map +0 -1
  363. package/dist/__tests__/providers/detection.test.js +0 -181
  364. package/dist/__tests__/providers/detection.test.js.map +0 -1
  365. package/dist/__tests__/providers/gitea.test.d.ts +0 -2
  366. package/dist/__tests__/providers/gitea.test.d.ts.map +0 -1
  367. package/dist/__tests__/providers/gitea.test.js +0 -212
  368. package/dist/__tests__/providers/gitea.test.js.map +0 -1
  369. package/dist/__tests__/providers/github.test.d.ts +0 -2
  370. package/dist/__tests__/providers/github.test.d.ts.map +0 -1
  371. package/dist/__tests__/providers/github.test.js +0 -146
  372. package/dist/__tests__/providers/github.test.js.map +0 -1
  373. package/dist/__tests__/providers/gitlab.test.d.ts +0 -2
  374. package/dist/__tests__/providers/gitlab.test.d.ts.map +0 -1
  375. package/dist/__tests__/providers/gitlab.test.js +0 -149
  376. package/dist/__tests__/providers/gitlab.test.js.map +0 -1
  377. package/dist/__tests__/ralph-prd.test.d.ts +0 -2
  378. package/dist/__tests__/ralph-prd.test.d.ts.map +0 -1
  379. package/dist/__tests__/ralph-prd.test.js +0 -308
  380. package/dist/__tests__/ralph-prd.test.js.map +0 -1
  381. package/dist/__tests__/ralph-progress.test.d.ts +0 -2
  382. package/dist/__tests__/ralph-progress.test.d.ts.map +0 -1
  383. package/dist/__tests__/ralph-progress.test.js +0 -312
  384. package/dist/__tests__/ralph-progress.test.js.map +0 -1
  385. package/dist/__tests__/rate-limit-wait/daemon.test.d.ts +0 -5
  386. package/dist/__tests__/rate-limit-wait/daemon.test.d.ts.map +0 -1
  387. package/dist/__tests__/rate-limit-wait/daemon.test.js +0 -321
  388. package/dist/__tests__/rate-limit-wait/daemon.test.js.map +0 -1
  389. package/dist/__tests__/rate-limit-wait/integration.test.d.ts +0 -8
  390. package/dist/__tests__/rate-limit-wait/integration.test.d.ts.map +0 -1
  391. package/dist/__tests__/rate-limit-wait/integration.test.js +0 -341
  392. package/dist/__tests__/rate-limit-wait/integration.test.js.map +0 -1
  393. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts +0 -5
  394. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.d.ts.map +0 -1
  395. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +0 -183
  396. package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +0 -1
  397. package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts +0 -5
  398. package/dist/__tests__/rate-limit-wait/tmux-detector.test.d.ts.map +0 -1
  399. package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +0 -312
  400. package/dist/__tests__/rate-limit-wait/tmux-detector.test.js.map +0 -1
  401. package/dist/__tests__/release-local.test.d.ts +0 -2
  402. package/dist/__tests__/release-local.test.d.ts.map +0 -1
  403. package/dist/__tests__/release-local.test.js +0 -19
  404. package/dist/__tests__/release-local.test.js.map +0 -1
  405. package/dist/__tests__/release-steps.test.d.ts +0 -2
  406. package/dist/__tests__/release-steps.test.d.ts.map +0 -1
  407. package/dist/__tests__/release-steps.test.js +0 -82
  408. package/dist/__tests__/release-steps.test.js.map +0 -1
  409. package/dist/__tests__/session-catalog.test.d.ts +0 -2
  410. package/dist/__tests__/session-catalog.test.d.ts.map +0 -1
  411. package/dist/__tests__/session-catalog.test.js +0 -195
  412. package/dist/__tests__/session-catalog.test.js.map +0 -1
  413. package/dist/__tests__/session-migration.test.d.ts +0 -2
  414. package/dist/__tests__/session-migration.test.d.ts.map +0 -1
  415. package/dist/__tests__/session-migration.test.js +0 -155
  416. package/dist/__tests__/session-migration.test.js.map +0 -1
  417. package/dist/__tests__/skills.test.d.ts +0 -2
  418. package/dist/__tests__/skills.test.d.ts.map +0 -1
  419. package/dist/__tests__/skills.test.js +0 -207
  420. package/dist/__tests__/skills.test.js.map +0 -1
  421. package/dist/__tests__/standalone-server.test.d.ts +0 -2
  422. package/dist/__tests__/standalone-server.test.d.ts.map +0 -1
  423. package/dist/__tests__/standalone-server.test.js +0 -53
  424. package/dist/__tests__/standalone-server.test.js.map +0 -1
  425. package/dist/__tests__/task-continuation.test.d.ts +0 -2
  426. package/dist/__tests__/task-continuation.test.d.ts.map +0 -1
  427. package/dist/__tests__/task-continuation.test.js +0 -743
  428. package/dist/__tests__/task-continuation.test.js.map +0 -1
  429. package/dist/__tests__/tools/skills-tools.test.d.ts +0 -2
  430. package/dist/__tests__/tools/skills-tools.test.d.ts.map +0 -1
  431. package/dist/__tests__/tools/skills-tools.test.js +0 -63
  432. package/dist/__tests__/tools/skills-tools.test.js.map +0 -1
  433. package/dist/__tests__/tools/trace-tools.test.d.ts +0 -2
  434. package/dist/__tests__/tools/trace-tools.test.d.ts.map +0 -1
  435. package/dist/__tests__/tools/trace-tools.test.js +0 -237
  436. package/dist/__tests__/tools/trace-tools.test.js.map +0 -1
  437. package/dist/__tests__/types.test.d.ts +0 -2
  438. package/dist/__tests__/types.test.d.ts.map +0 -1
  439. package/dist/__tests__/types.test.js +0 -78
  440. package/dist/__tests__/types.test.js.map +0 -1
  441. package/dist/__tests__/validate-and-read-file.test.d.ts +0 -2
  442. package/dist/__tests__/validate-and-read-file.test.d.ts.map +0 -1
  443. package/dist/__tests__/validate-and-read-file.test.js +0 -84
  444. package/dist/__tests__/validate-and-read-file.test.js.map +0 -1
  445. package/dist/__tests__/validateMode.test.d.ts +0 -2
  446. package/dist/__tests__/validateMode.test.d.ts.map +0 -1
  447. package/dist/__tests__/validateMode.test.js +0 -100
  448. package/dist/__tests__/validateMode.test.js.map +0 -1
  449. package/dist/__tests__/version-helper.test.d.ts +0 -2
  450. package/dist/__tests__/version-helper.test.d.ts.map +0 -1
  451. package/dist/__tests__/version-helper.test.js +0 -37
  452. package/dist/__tests__/version-helper.test.js.map +0 -1
  453. package/dist/agents/__tests__/agent-wrapper.test.d.ts +0 -2
  454. package/dist/agents/__tests__/agent-wrapper.test.d.ts.map +0 -1
  455. package/dist/agents/__tests__/agent-wrapper.test.js +0 -37
  456. package/dist/agents/__tests__/agent-wrapper.test.js.map +0 -1
  457. package/dist/agents/__tests__/timeout-config.test.d.ts +0 -2
  458. package/dist/agents/__tests__/timeout-config.test.d.ts.map +0 -1
  459. package/dist/agents/__tests__/timeout-config.test.js +0 -35
  460. package/dist/agents/__tests__/timeout-config.test.js.map +0 -1
  461. package/dist/agents/__tests__/timeout-manager.test.d.ts +0 -2
  462. package/dist/agents/__tests__/timeout-manager.test.d.ts.map +0 -1
  463. package/dist/agents/__tests__/timeout-manager.test.js +0 -37
  464. package/dist/agents/__tests__/timeout-manager.test.js.map +0 -1
  465. package/dist/agents/coordinator-deprecated.d.ts +0 -18
  466. package/dist/agents/coordinator-deprecated.d.ts.map +0 -1
  467. package/dist/agents/coordinator-deprecated.js +0 -38
  468. package/dist/agents/coordinator-deprecated.js.map +0 -1
  469. package/dist/cli/commands/__tests__/cleanup.test.d.ts +0 -2
  470. package/dist/cli/commands/__tests__/cleanup.test.d.ts.map +0 -1
  471. package/dist/cli/commands/__tests__/cleanup.test.js +0 -37
  472. package/dist/cli/commands/__tests__/cleanup.test.js.map +0 -1
  473. package/dist/features/delegation-routing/__tests__/resolver.test.d.ts +0 -2
  474. package/dist/features/delegation-routing/__tests__/resolver.test.d.ts.map +0 -1
  475. package/dist/features/delegation-routing/__tests__/resolver.test.js +0 -419
  476. package/dist/features/delegation-routing/__tests__/resolver.test.js.map +0 -1
  477. package/dist/features/model-routing/__tests__/external-model-policy.test.d.ts +0 -2
  478. package/dist/features/model-routing/__tests__/external-model-policy.test.d.ts.map +0 -1
  479. package/dist/features/model-routing/__tests__/external-model-policy.test.js +0 -475
  480. package/dist/features/model-routing/__tests__/external-model-policy.test.js.map +0 -1
  481. package/dist/features/state-manager/__tests__/cache.test.d.ts +0 -2
  482. package/dist/features/state-manager/__tests__/cache.test.d.ts.map +0 -1
  483. package/dist/features/state-manager/__tests__/cache.test.js +0 -204
  484. package/dist/features/state-manager/__tests__/cache.test.js.map +0 -1
  485. package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts +0 -2
  486. package/dist/features/state-manager/__tests__/encryption-performance.test.d.ts.map +0 -1
  487. package/dist/features/state-manager/__tests__/encryption-performance.test.js +0 -42
  488. package/dist/features/state-manager/__tests__/encryption-performance.test.js.map +0 -1
  489. package/dist/features/state-manager/__tests__/encryption.test.d.ts +0 -2
  490. package/dist/features/state-manager/__tests__/encryption.test.d.ts.map +0 -1
  491. package/dist/features/state-manager/__tests__/encryption.test.js +0 -68
  492. package/dist/features/state-manager/__tests__/encryption.test.js.map +0 -1
  493. package/dist/features/wizard/__tests__/engine.test.d.ts +0 -2
  494. package/dist/features/wizard/__tests__/engine.test.d.ts.map +0 -1
  495. package/dist/features/wizard/__tests__/engine.test.js +0 -78
  496. package/dist/features/wizard/__tests__/engine.test.js.map +0 -1
  497. package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts +0 -2
  498. package/dist/features/wizard/__tests__/recommendation-engine.test.d.ts.map +0 -1
  499. package/dist/features/wizard/__tests__/recommendation-engine.test.js +0 -43
  500. package/dist/features/wizard/__tests__/recommendation-engine.test.js.map +0 -1
  501. package/dist/hooks/__tests__/askuserquestion-lifecycle.test.d.ts +0 -9
  502. package/dist/hooks/__tests__/askuserquestion-lifecycle.test.d.ts.map +0 -1
  503. package/dist/hooks/__tests__/askuserquestion-lifecycle.test.js +0 -110
  504. package/dist/hooks/__tests__/askuserquestion-lifecycle.test.js.map +0 -1
  505. package/dist/hooks/__tests__/background-process-guard.test.d.ts +0 -2
  506. package/dist/hooks/__tests__/background-process-guard.test.d.ts.map +0 -1
  507. package/dist/hooks/__tests__/background-process-guard.test.js +0 -233
  508. package/dist/hooks/__tests__/background-process-guard.test.js.map +0 -1
  509. package/dist/hooks/__tests__/bridge-normalize.test.d.ts +0 -2
  510. package/dist/hooks/__tests__/bridge-normalize.test.d.ts.map +0 -1
  511. package/dist/hooks/__tests__/bridge-normalize.test.js +0 -90
  512. package/dist/hooks/__tests__/bridge-normalize.test.js.map +0 -1
  513. package/dist/hooks/__tests__/bridge-pkill.test.d.ts +0 -8
  514. package/dist/hooks/__tests__/bridge-pkill.test.d.ts.map +0 -1
  515. package/dist/hooks/__tests__/bridge-pkill.test.js +0 -188
  516. package/dist/hooks/__tests__/bridge-pkill.test.js.map +0 -1
  517. package/dist/hooks/__tests__/bridge-routing.test.d.ts +0 -9
  518. package/dist/hooks/__tests__/bridge-routing.test.d.ts.map +0 -1
  519. package/dist/hooks/__tests__/bridge-routing.test.js +0 -516
  520. package/dist/hooks/__tests__/bridge-routing.test.js.map +0 -1
  521. package/dist/hooks/__tests__/bridge-security.test.d.ts +0 -11
  522. package/dist/hooks/__tests__/bridge-security.test.d.ts.map +0 -1
  523. package/dist/hooks/__tests__/bridge-security.test.js +0 -498
  524. package/dist/hooks/__tests__/bridge-security.test.js.map +0 -1
  525. package/dist/hooks/__tests__/bridge.test.d.ts +0 -2
  526. package/dist/hooks/__tests__/bridge.test.d.ts.map +0 -1
  527. package/dist/hooks/__tests__/bridge.test.js +0 -199
  528. package/dist/hooks/__tests__/bridge.test.js.map +0 -1
  529. package/dist/hooks/__tests__/compaction-concurrency.test.d.ts +0 -10
  530. package/dist/hooks/__tests__/compaction-concurrency.test.d.ts.map +0 -1
  531. package/dist/hooks/__tests__/compaction-concurrency.test.js +0 -313
  532. package/dist/hooks/__tests__/compaction-concurrency.test.js.map +0 -1
  533. package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts +0 -2
  534. package/dist/hooks/auto-slash-command/__tests__/detector.test.d.ts.map +0 -1
  535. package/dist/hooks/auto-slash-command/__tests__/detector.test.js +0 -70
  536. package/dist/hooks/auto-slash-command/__tests__/detector.test.js.map +0 -1
  537. package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts +0 -2
  538. package/dist/hooks/auto-slash-command/__tests__/executor.test.d.ts.map +0 -1
  539. package/dist/hooks/auto-slash-command/__tests__/executor.test.js +0 -55
  540. package/dist/hooks/auto-slash-command/__tests__/executor.test.js.map +0 -1
  541. package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts +0 -2
  542. package/dist/hooks/auto-slash-command/__tests__/index.test.d.ts.map +0 -1
  543. package/dist/hooks/auto-slash-command/__tests__/index.test.js +0 -50
  544. package/dist/hooks/auto-slash-command/__tests__/index.test.js.map +0 -1
  545. package/dist/hooks/autopilot/__tests__/cancel.test.d.ts +0 -2
  546. package/dist/hooks/autopilot/__tests__/cancel.test.d.ts.map +0 -1
  547. package/dist/hooks/autopilot/__tests__/cancel.test.js +0 -606
  548. package/dist/hooks/autopilot/__tests__/cancel.test.js.map +0 -1
  549. package/dist/hooks/autopilot/__tests__/prompts.test.d.ts +0 -2
  550. package/dist/hooks/autopilot/__tests__/prompts.test.d.ts.map +0 -1
  551. package/dist/hooks/autopilot/__tests__/prompts.test.js +0 -92
  552. package/dist/hooks/autopilot/__tests__/prompts.test.js.map +0 -1
  553. package/dist/hooks/autopilot/__tests__/state.test.d.ts +0 -2
  554. package/dist/hooks/autopilot/__tests__/state.test.d.ts.map +0 -1
  555. package/dist/hooks/autopilot/__tests__/state.test.js +0 -76
  556. package/dist/hooks/autopilot/__tests__/state.test.js.map +0 -1
  557. package/dist/hooks/autopilot/__tests__/summary.test.d.ts +0 -2
  558. package/dist/hooks/autopilot/__tests__/summary.test.d.ts.map +0 -1
  559. package/dist/hooks/autopilot/__tests__/summary.test.js +0 -324
  560. package/dist/hooks/autopilot/__tests__/summary.test.js.map +0 -1
  561. package/dist/hooks/autopilot/__tests__/transition.test.d.ts +0 -2
  562. package/dist/hooks/autopilot/__tests__/transition.test.d.ts.map +0 -1
  563. package/dist/hooks/autopilot/__tests__/transition.test.js +0 -58
  564. package/dist/hooks/autopilot/__tests__/transition.test.js.map +0 -1
  565. package/dist/hooks/autopilot/__tests__/transitions.test.d.ts +0 -12
  566. package/dist/hooks/autopilot/__tests__/transitions.test.d.ts.map +0 -1
  567. package/dist/hooks/autopilot/__tests__/transitions.test.js +0 -303
  568. package/dist/hooks/autopilot/__tests__/transitions.test.js.map +0 -1
  569. package/dist/hooks/autopilot/__tests__/validation.test.d.ts +0 -2
  570. package/dist/hooks/autopilot/__tests__/validation.test.d.ts.map +0 -1
  571. package/dist/hooks/autopilot/__tests__/validation.test.js +0 -450
  572. package/dist/hooks/autopilot/__tests__/validation.test.js.map +0 -1
  573. package/dist/hooks/beads-context/__tests__/index.test.d.ts +0 -2
  574. package/dist/hooks/beads-context/__tests__/index.test.d.ts.map +0 -1
  575. package/dist/hooks/beads-context/__tests__/index.test.js +0 -150
  576. package/dist/hooks/beads-context/__tests__/index.test.js.map +0 -1
  577. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts +0 -2
  578. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.d.ts.map +0 -1
  579. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js +0 -416
  580. package/dist/hooks/empty-message-sanitizer/__tests__/index.test.js.map +0 -1
  581. package/dist/hooks/keyword-detector/__tests__/index.test.d.ts +0 -2
  582. package/dist/hooks/keyword-detector/__tests__/index.test.d.ts.map +0 -1
  583. package/dist/hooks/keyword-detector/__tests__/index.test.js +0 -868
  584. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +0 -1
  585. package/dist/hooks/learner/__tests__/confidence.test.d.ts +0 -2
  586. package/dist/hooks/learner/__tests__/confidence.test.d.ts.map +0 -1
  587. package/dist/hooks/learner/__tests__/confidence.test.js +0 -42
  588. package/dist/hooks/learner/__tests__/confidence.test.js.map +0 -1
  589. package/dist/hooks/learner/__tests__/detector.test.d.ts +0 -2
  590. package/dist/hooks/learner/__tests__/detector.test.d.ts.map +0 -1
  591. package/dist/hooks/learner/__tests__/detector.test.js +0 -170
  592. package/dist/hooks/learner/__tests__/detector.test.js.map +0 -1
  593. package/dist/hooks/learner/__tests__/index-manager-filter.test.d.ts +0 -14
  594. package/dist/hooks/learner/__tests__/index-manager-filter.test.d.ts.map +0 -1
  595. package/dist/hooks/learner/__tests__/index-manager-filter.test.js +0 -147
  596. package/dist/hooks/learner/__tests__/index-manager-filter.test.js.map +0 -1
  597. package/dist/hooks/learner/__tests__/index-manager-import.test.d.ts +0 -2
  598. package/dist/hooks/learner/__tests__/index-manager-import.test.d.ts.map +0 -1
  599. package/dist/hooks/learner/__tests__/index-manager-import.test.js +0 -43
  600. package/dist/hooks/learner/__tests__/index-manager-import.test.js.map +0 -1
  601. package/dist/hooks/learner/__tests__/index.test.d.ts +0 -2
  602. package/dist/hooks/learner/__tests__/index.test.d.ts.map +0 -1
  603. package/dist/hooks/learner/__tests__/index.test.js +0 -48
  604. package/dist/hooks/learner/__tests__/index.test.js.map +0 -1
  605. package/dist/hooks/learner/__tests__/learning-queue-parser.test.d.ts +0 -10
  606. package/dist/hooks/learner/__tests__/learning-queue-parser.test.d.ts.map +0 -1
  607. package/dist/hooks/learner/__tests__/learning-queue-parser.test.js +0 -131
  608. package/dist/hooks/learner/__tests__/learning-queue-parser.test.js.map +0 -1
  609. package/dist/hooks/learner/__tests__/matcher.test.d.ts +0 -2
  610. package/dist/hooks/learner/__tests__/matcher.test.d.ts.map +0 -1
  611. package/dist/hooks/learner/__tests__/matcher.test.js +0 -114
  612. package/dist/hooks/learner/__tests__/matcher.test.js.map +0 -1
  613. package/dist/hooks/learner/__tests__/promotion.test.d.ts +0 -2
  614. package/dist/hooks/learner/__tests__/promotion.test.d.ts.map +0 -1
  615. package/dist/hooks/learner/__tests__/promotion.test.js +0 -146
  616. package/dist/hooks/learner/__tests__/promotion.test.js.map +0 -1
  617. package/dist/hooks/learner/__tests__/queue-archiver.test.d.ts +0 -13
  618. package/dist/hooks/learner/__tests__/queue-archiver.test.d.ts.map +0 -1
  619. package/dist/hooks/learner/__tests__/queue-archiver.test.js +0 -162
  620. package/dist/hooks/learner/__tests__/queue-archiver.test.js.map +0 -1
  621. package/dist/hooks/learner/__tests__/reflection-archiver.test.d.ts +0 -14
  622. package/dist/hooks/learner/__tests__/reflection-archiver.test.d.ts.map +0 -1
  623. package/dist/hooks/learner/__tests__/reflection-archiver.test.js +0 -159
  624. package/dist/hooks/learner/__tests__/reflection-archiver.test.js.map +0 -1
  625. package/dist/hooks/learner/__tests__/reflection-parser.test.d.ts +0 -14
  626. package/dist/hooks/learner/__tests__/reflection-parser.test.d.ts.map +0 -1
  627. package/dist/hooks/learner/__tests__/reflection-parser.test.js +0 -201
  628. package/dist/hooks/learner/__tests__/reflection-parser.test.js.map +0 -1
  629. package/dist/hooks/learner/__tests__/validator.test.d.ts +0 -2
  630. package/dist/hooks/learner/__tests__/validator.test.d.ts.map +0 -1
  631. package/dist/hooks/learner/__tests__/validator.test.js +0 -123
  632. package/dist/hooks/learner/__tests__/validator.test.js.map +0 -1
  633. package/dist/hooks/learner/__tests__/writer.test.d.ts +0 -2
  634. package/dist/hooks/learner/__tests__/writer.test.d.ts.map +0 -1
  635. package/dist/hooks/learner/__tests__/writer.test.js +0 -141
  636. package/dist/hooks/learner/__tests__/writer.test.js.map +0 -1
  637. package/dist/hooks/mode-registry/__tests__/session-isolation.test.d.ts +0 -2
  638. package/dist/hooks/mode-registry/__tests__/session-isolation.test.d.ts.map +0 -1
  639. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js +0 -236
  640. package/dist/hooks/mode-registry/__tests__/session-isolation.test.js.map +0 -1
  641. package/dist/hooks/nexus/__tests__/config.test.d.ts +0 -2
  642. package/dist/hooks/nexus/__tests__/config.test.d.ts.map +0 -1
  643. package/dist/hooks/nexus/__tests__/config.test.js +0 -38
  644. package/dist/hooks/nexus/__tests__/config.test.js.map +0 -1
  645. package/dist/hooks/nexus/__tests__/consciousness-sync.test.d.ts +0 -2
  646. package/dist/hooks/nexus/__tests__/consciousness-sync.test.d.ts.map +0 -1
  647. package/dist/hooks/nexus/__tests__/consciousness-sync.test.js +0 -28
  648. package/dist/hooks/nexus/__tests__/consciousness-sync.test.js.map +0 -1
  649. package/dist/hooks/nexus/__tests__/data-collector.test.d.ts +0 -2
  650. package/dist/hooks/nexus/__tests__/data-collector.test.d.ts.map +0 -1
  651. package/dist/hooks/nexus/__tests__/data-collector.test.js +0 -61
  652. package/dist/hooks/nexus/__tests__/data-collector.test.js.map +0 -1
  653. package/dist/hooks/nexus/__tests__/improvement-puller.test.d.ts +0 -2
  654. package/dist/hooks/nexus/__tests__/improvement-puller.test.d.ts.map +0 -1
  655. package/dist/hooks/nexus/__tests__/improvement-puller.test.js +0 -49
  656. package/dist/hooks/nexus/__tests__/improvement-puller.test.js.map +0 -1
  657. package/dist/hooks/nexus/__tests__/session-end-hook.test.d.ts +0 -2
  658. package/dist/hooks/nexus/__tests__/session-end-hook.test.d.ts.map +0 -1
  659. package/dist/hooks/nexus/__tests__/session-end-hook.test.js +0 -39
  660. package/dist/hooks/nexus/__tests__/session-end-hook.test.js.map +0 -1
  661. package/dist/hooks/observability/__tests__/observability.test.d.ts +0 -2
  662. package/dist/hooks/observability/__tests__/observability.test.d.ts.map +0 -1
  663. package/dist/hooks/observability/__tests__/observability.test.js +0 -176
  664. package/dist/hooks/observability/__tests__/observability.test.js.map +0 -1
  665. package/dist/hooks/permission-handler/__tests__/index.test.d.ts +0 -2
  666. package/dist/hooks/permission-handler/__tests__/index.test.d.ts.map +0 -1
  667. package/dist/hooks/permission-handler/__tests__/index.test.js +0 -417
  668. package/dist/hooks/permission-handler/__tests__/index.test.js.map +0 -1
  669. package/dist/hooks/persistent-mode/__tests__/error-handling.test.d.ts +0 -6
  670. package/dist/hooks/persistent-mode/__tests__/error-handling.test.d.ts.map +0 -1
  671. package/dist/hooks/persistent-mode/__tests__/error-handling.test.js +0 -71
  672. package/dist/hooks/persistent-mode/__tests__/error-handling.test.js.map +0 -1
  673. package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.d.ts +0 -2
  674. package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.d.ts.map +0 -1
  675. package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.js +0 -38
  676. package/dist/hooks/persistent-mode/__tests__/ralph-max-iteration.test.js.map +0 -1
  677. package/dist/hooks/persistent-mode/__tests__/tool-error.test.d.ts +0 -6
  678. package/dist/hooks/persistent-mode/__tests__/tool-error.test.d.ts.map +0 -1
  679. package/dist/hooks/persistent-mode/__tests__/tool-error.test.js +0 -335
  680. package/dist/hooks/persistent-mode/__tests__/tool-error.test.js.map +0 -1
  681. package/dist/hooks/persistent-mode/session-isolation.test.d.ts +0 -2
  682. package/dist/hooks/persistent-mode/session-isolation.test.d.ts.map +0 -1
  683. package/dist/hooks/persistent-mode/session-isolation.test.js +0 -491
  684. package/dist/hooks/persistent-mode/session-isolation.test.js.map +0 -1
  685. package/dist/hooks/project-memory/__tests__/detector.test.d.ts +0 -5
  686. package/dist/hooks/project-memory/__tests__/detector.test.d.ts.map +0 -1
  687. package/dist/hooks/project-memory/__tests__/detector.test.js +0 -165
  688. package/dist/hooks/project-memory/__tests__/detector.test.js.map +0 -1
  689. package/dist/hooks/project-memory/__tests__/formatter.test.d.ts +0 -5
  690. package/dist/hooks/project-memory/__tests__/formatter.test.d.ts.map +0 -1
  691. package/dist/hooks/project-memory/__tests__/formatter.test.js +0 -262
  692. package/dist/hooks/project-memory/__tests__/formatter.test.js.map +0 -1
  693. package/dist/hooks/project-memory/__tests__/integration.test.d.ts +0 -5
  694. package/dist/hooks/project-memory/__tests__/integration.test.d.ts.map +0 -1
  695. package/dist/hooks/project-memory/__tests__/integration.test.js +0 -154
  696. package/dist/hooks/project-memory/__tests__/integration.test.js.map +0 -1
  697. package/dist/hooks/project-memory/__tests__/learner.test.d.ts +0 -5
  698. package/dist/hooks/project-memory/__tests__/learner.test.d.ts.map +0 -1
  699. package/dist/hooks/project-memory/__tests__/learner.test.js +0 -159
  700. package/dist/hooks/project-memory/__tests__/learner.test.js.map +0 -1
  701. package/dist/hooks/project-memory/__tests__/storage.test.d.ts +0 -5
  702. package/dist/hooks/project-memory/__tests__/storage.test.d.ts.map +0 -1
  703. package/dist/hooks/project-memory/__tests__/storage.test.js +0 -207
  704. package/dist/hooks/project-memory/__tests__/storage.test.js.map +0 -1
  705. package/dist/hooks/ralph/__tests__/loop.test.d.ts +0 -2
  706. package/dist/hooks/ralph/__tests__/loop.test.d.ts.map +0 -1
  707. package/dist/hooks/ralph/__tests__/loop.test.js +0 -268
  708. package/dist/hooks/ralph/__tests__/loop.test.js.map +0 -1
  709. package/dist/hooks/ralph/__tests__/prd.test.d.ts +0 -2
  710. package/dist/hooks/ralph/__tests__/prd.test.d.ts.map +0 -1
  711. package/dist/hooks/ralph/__tests__/prd.test.js +0 -197
  712. package/dist/hooks/ralph/__tests__/prd.test.js.map +0 -1
  713. package/dist/hooks/ralph/__tests__/progress.test.d.ts +0 -2
  714. package/dist/hooks/ralph/__tests__/progress.test.d.ts.map +0 -1
  715. package/dist/hooks/ralph/__tests__/progress.test.js +0 -120
  716. package/dist/hooks/ralph/__tests__/progress.test.js.map +0 -1
  717. package/dist/hooks/ralph/__tests__/verifier.test.d.ts +0 -2
  718. package/dist/hooks/ralph/__tests__/verifier.test.d.ts.map +0 -1
  719. package/dist/hooks/ralph/__tests__/verifier.test.js +0 -75
  720. package/dist/hooks/ralph/__tests__/verifier.test.js.map +0 -1
  721. package/dist/hooks/recovery/__tests__/context-window.test.d.ts +0 -2
  722. package/dist/hooks/recovery/__tests__/context-window.test.d.ts.map +0 -1
  723. package/dist/hooks/recovery/__tests__/context-window.test.js +0 -131
  724. package/dist/hooks/recovery/__tests__/context-window.test.js.map +0 -1
  725. package/dist/hooks/recovery/__tests__/edit-error.test.d.ts +0 -2
  726. package/dist/hooks/recovery/__tests__/edit-error.test.d.ts.map +0 -1
  727. package/dist/hooks/recovery/__tests__/edit-error.test.js +0 -88
  728. package/dist/hooks/recovery/__tests__/edit-error.test.js.map +0 -1
  729. package/dist/hooks/recovery/__tests__/index.test.d.ts +0 -2
  730. package/dist/hooks/recovery/__tests__/index.test.d.ts.map +0 -1
  731. package/dist/hooks/recovery/__tests__/index.test.js +0 -270
  732. package/dist/hooks/recovery/__tests__/index.test.js.map +0 -1
  733. package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts +0 -2
  734. package/dist/hooks/recovery/__tests__/session-recovery.test.d.ts.map +0 -1
  735. package/dist/hooks/recovery/__tests__/session-recovery.test.js +0 -129
  736. package/dist/hooks/recovery/__tests__/session-recovery.test.js.map +0 -1
  737. package/dist/hooks/recovery/__tests__/storage.test.d.ts +0 -2
  738. package/dist/hooks/recovery/__tests__/storage.test.d.ts.map +0 -1
  739. package/dist/hooks/recovery/__tests__/storage.test.js +0 -549
  740. package/dist/hooks/recovery/__tests__/storage.test.js.map +0 -1
  741. package/dist/hooks/rules-injector/__tests__/finder.test.d.ts +0 -2
  742. package/dist/hooks/rules-injector/__tests__/finder.test.d.ts.map +0 -1
  743. package/dist/hooks/rules-injector/__tests__/finder.test.js +0 -68
  744. package/dist/hooks/rules-injector/__tests__/finder.test.js.map +0 -1
  745. package/dist/hooks/rules-injector/__tests__/index.test.d.ts +0 -2
  746. package/dist/hooks/rules-injector/__tests__/index.test.d.ts.map +0 -1
  747. package/dist/hooks/rules-injector/__tests__/index.test.js +0 -58
  748. package/dist/hooks/rules-injector/__tests__/index.test.js.map +0 -1
  749. package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts +0 -2
  750. package/dist/hooks/rules-injector/__tests__/matcher.test.d.ts.map +0 -1
  751. package/dist/hooks/rules-injector/__tests__/matcher.test.js +0 -86
  752. package/dist/hooks/rules-injector/__tests__/matcher.test.js.map +0 -1
  753. package/dist/hooks/rules-injector/__tests__/parser.test.d.ts +0 -2
  754. package/dist/hooks/rules-injector/__tests__/parser.test.d.ts.map +0 -1
  755. package/dist/hooks/rules-injector/__tests__/parser.test.js +0 -86
  756. package/dist/hooks/rules-injector/__tests__/parser.test.js.map +0 -1
  757. package/dist/hooks/session-end/__tests__/callbacks.test.d.ts +0 -2
  758. package/dist/hooks/session-end/__tests__/callbacks.test.d.ts.map +0 -1
  759. package/dist/hooks/session-end/__tests__/callbacks.test.js +0 -382
  760. package/dist/hooks/session-end/__tests__/callbacks.test.js.map +0 -1
  761. package/dist/hooks/session-end/__tests__/index.test.d.ts +0 -2
  762. package/dist/hooks/session-end/__tests__/index.test.d.ts.map +0 -1
  763. package/dist/hooks/session-end/__tests__/index.test.js +0 -77
  764. package/dist/hooks/session-end/__tests__/index.test.js.map +0 -1
  765. package/dist/hooks/session-end/__tests__/nexus-integration.test.d.ts +0 -2
  766. package/dist/hooks/session-end/__tests__/nexus-integration.test.d.ts.map +0 -1
  767. package/dist/hooks/session-end/__tests__/nexus-integration.test.js +0 -30
  768. package/dist/hooks/session-end/__tests__/nexus-integration.test.js.map +0 -1
  769. package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.d.ts +0 -2
  770. package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.d.ts.map +0 -1
  771. package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.js +0 -46
  772. package/dist/hooks/session-end/__tests__/python-repl-cleanup.test.js.map +0 -1
  773. package/dist/hooks/session-end/__tests__/session-duration.test.d.ts +0 -2
  774. package/dist/hooks/session-end/__tests__/session-duration.test.d.ts.map +0 -1
  775. package/dist/hooks/session-end/__tests__/session-duration.test.js +0 -236
  776. package/dist/hooks/session-end/__tests__/session-duration.test.js.map +0 -1
  777. package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.d.ts +0 -2
  778. package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.d.ts.map +0 -1
  779. package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.js +0 -58
  780. package/dist/hooks/session-end/__tests__/session-end-bridge-cleanup.test.js.map +0 -1
  781. package/dist/hooks/setup/__tests__/index.test.d.ts +0 -2
  782. package/dist/hooks/setup/__tests__/index.test.d.ts.map +0 -1
  783. package/dist/hooks/setup/__tests__/index.test.js +0 -68
  784. package/dist/hooks/setup/__tests__/index.test.js.map +0 -1
  785. package/dist/hooks/setup/__tests__/prune.test.d.ts +0 -2
  786. package/dist/hooks/setup/__tests__/prune.test.d.ts.map +0 -1
  787. package/dist/hooks/setup/__tests__/prune.test.js +0 -94
  788. package/dist/hooks/setup/__tests__/prune.test.js.map +0 -1
  789. package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.d.ts +0 -2
  790. package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.d.ts.map +0 -1
  791. package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.js +0 -107
  792. package/dist/hooks/subagent-tracker/__tests__/flow-tracer.test.js.map +0 -1
  793. package/dist/hooks/subagent-tracker/__tests__/flush-race.test.d.ts +0 -2
  794. package/dist/hooks/subagent-tracker/__tests__/flush-race.test.d.ts.map +0 -1
  795. package/dist/hooks/subagent-tracker/__tests__/flush-race.test.js +0 -376
  796. package/dist/hooks/subagent-tracker/__tests__/flush-race.test.js.map +0 -1
  797. package/dist/hooks/subagent-tracker/__tests__/index.test.d.ts +0 -2
  798. package/dist/hooks/subagent-tracker/__tests__/index.test.d.ts.map +0 -1
  799. package/dist/hooks/subagent-tracker/__tests__/index.test.js +0 -818
  800. package/dist/hooks/subagent-tracker/__tests__/index.test.js.map +0 -1
  801. package/dist/hooks/subagent-tracker/__tests__/session-replay.test.d.ts +0 -2
  802. package/dist/hooks/subagent-tracker/__tests__/session-replay.test.d.ts.map +0 -1
  803. package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js +0 -139
  804. package/dist/hooks/subagent-tracker/__tests__/session-replay.test.js.map +0 -1
  805. package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.d.ts +0 -10
  806. package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.d.ts.map +0 -1
  807. package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.js +0 -112
  808. package/dist/hooks/subagent-tracker/__tests__/syncSleep.test.js.map +0 -1
  809. package/dist/hooks/team-pipeline/__tests__/state.test.d.ts +0 -2
  810. package/dist/hooks/team-pipeline/__tests__/state.test.d.ts.map +0 -1
  811. package/dist/hooks/team-pipeline/__tests__/state.test.js +0 -94
  812. package/dist/hooks/team-pipeline/__tests__/state.test.js.map +0 -1
  813. package/dist/hooks/team-pipeline/__tests__/transitions.test.d.ts +0 -2
  814. package/dist/hooks/team-pipeline/__tests__/transitions.test.d.ts.map +0 -1
  815. package/dist/hooks/team-pipeline/__tests__/transitions.test.js +0 -156
  816. package/dist/hooks/team-pipeline/__tests__/transitions.test.js.map +0 -1
  817. package/dist/hooks/think-mode/__tests__/index.test.d.ts +0 -2
  818. package/dist/hooks/think-mode/__tests__/index.test.d.ts.map +0 -1
  819. package/dist/hooks/think-mode/__tests__/index.test.js +0 -556
  820. package/dist/hooks/think-mode/__tests__/index.test.js.map +0 -1
  821. package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.d.ts +0 -2
  822. package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.d.ts.map +0 -1
  823. package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.js +0 -119
  824. package/dist/hooks/todo-continuation/__tests__/isUserAbort.test.js.map +0 -1
  825. package/dist/hooks/ultrawork/session-isolation.test.d.ts +0 -2
  826. package/dist/hooks/ultrawork/session-isolation.test.d.ts.map +0 -1
  827. package/dist/hooks/ultrawork/session-isolation.test.js +0 -333
  828. package/dist/hooks/ultrawork/session-isolation.test.js.map +0 -1
  829. package/dist/installer/__tests__/claude-md-merge.test.d.ts +0 -6
  830. package/dist/installer/__tests__/claude-md-merge.test.d.ts.map +0 -1
  831. package/dist/installer/__tests__/claude-md-merge.test.js +0 -220
  832. package/dist/installer/__tests__/claude-md-merge.test.js.map +0 -1
  833. package/dist/installer/__tests__/hooks.test.d.ts +0 -6
  834. package/dist/installer/__tests__/hooks.test.d.ts.map +0 -1
  835. package/dist/installer/__tests__/hooks.test.js +0 -121
  836. package/dist/installer/__tests__/hooks.test.js.map +0 -1
  837. package/dist/installer/__tests__/safe-installer.test.d.ts +0 -6
  838. package/dist/installer/__tests__/safe-installer.test.d.ts.map +0 -1
  839. package/dist/installer/__tests__/safe-installer.test.js +0 -185
  840. package/dist/installer/__tests__/safe-installer.test.js.map +0 -1
  841. package/dist/lib/__tests__/atomic-write.test.d.ts +0 -2
  842. package/dist/lib/__tests__/atomic-write.test.d.ts.map +0 -1
  843. package/dist/lib/__tests__/atomic-write.test.js +0 -196
  844. package/dist/lib/__tests__/atomic-write.test.js.map +0 -1
  845. package/dist/lib/__tests__/file-lock.test.d.ts +0 -13
  846. package/dist/lib/__tests__/file-lock.test.d.ts.map +0 -1
  847. package/dist/lib/__tests__/file-lock.test.js +0 -122
  848. package/dist/lib/__tests__/file-lock.test.js.map +0 -1
  849. package/dist/lib/__tests__/plugin-deps.test.d.ts +0 -2
  850. package/dist/lib/__tests__/plugin-deps.test.d.ts.map +0 -1
  851. package/dist/lib/__tests__/plugin-deps.test.js +0 -58
  852. package/dist/lib/__tests__/plugin-deps.test.js.map +0 -1
  853. package/dist/lib/__tests__/plugin-marketplace.test.d.ts +0 -2
  854. package/dist/lib/__tests__/plugin-marketplace.test.d.ts.map +0 -1
  855. package/dist/lib/__tests__/plugin-marketplace.test.js +0 -52
  856. package/dist/lib/__tests__/plugin-marketplace.test.js.map +0 -1
  857. package/dist/lib/__tests__/plugin-registry.test.d.ts +0 -2
  858. package/dist/lib/__tests__/plugin-registry.test.d.ts.map +0 -1
  859. package/dist/lib/__tests__/plugin-registry.test.js +0 -241
  860. package/dist/lib/__tests__/plugin-registry.test.js.map +0 -1
  861. package/dist/lib/__tests__/plugin-rollback.test.d.ts +0 -2
  862. package/dist/lib/__tests__/plugin-rollback.test.d.ts.map +0 -1
  863. package/dist/lib/__tests__/plugin-rollback.test.js +0 -60
  864. package/dist/lib/__tests__/plugin-rollback.test.js.map +0 -1
  865. package/dist/lib/__tests__/plugin-security.test.d.ts +0 -2
  866. package/dist/lib/__tests__/plugin-security.test.d.ts.map +0 -1
  867. package/dist/lib/__tests__/plugin-security.test.js +0 -70
  868. package/dist/lib/__tests__/plugin-security.test.js.map +0 -1
  869. package/dist/lib/__tests__/validateMode.test.d.ts +0 -2
  870. package/dist/lib/__tests__/validateMode.test.d.ts.map +0 -1
  871. package/dist/lib/__tests__/validateMode.test.js +0 -61
  872. package/dist/lib/__tests__/validateMode.test.js.map +0 -1
  873. package/dist/lib/__tests__/version.test.d.ts +0 -6
  874. package/dist/lib/__tests__/version.test.d.ts.map +0 -1
  875. package/dist/lib/__tests__/version.test.js +0 -37
  876. package/dist/lib/__tests__/version.test.js.map +0 -1
  877. package/dist/lib/__tests__/worktree-paths.test.d.ts +0 -2
  878. package/dist/lib/__tests__/worktree-paths.test.d.ts.map +0 -1
  879. package/dist/lib/__tests__/worktree-paths.test.js +0 -225
  880. package/dist/lib/__tests__/worktree-paths.test.js.map +0 -1
  881. package/dist/mcp/__tests__/cli-detection.test.d.ts +0 -2
  882. package/dist/mcp/__tests__/cli-detection.test.d.ts.map +0 -1
  883. package/dist/mcp/__tests__/cli-detection.test.js +0 -50
  884. package/dist/mcp/__tests__/cli-detection.test.js.map +0 -1
  885. package/dist/mcp/__tests__/codex-core.test.d.ts +0 -2
  886. package/dist/mcp/__tests__/codex-core.test.d.ts.map +0 -1
  887. package/dist/mcp/__tests__/codex-core.test.js +0 -143
  888. package/dist/mcp/__tests__/codex-core.test.js.map +0 -1
  889. package/dist/mcp/__tests__/codex-integration.test.d.ts +0 -2
  890. package/dist/mcp/__tests__/codex-integration.test.d.ts.map +0 -1
  891. package/dist/mcp/__tests__/codex-integration.test.js +0 -59
  892. package/dist/mcp/__tests__/codex-integration.test.js.map +0 -1
  893. package/dist/mcp/__tests__/codex-reasoning-effort.test.d.ts +0 -2
  894. package/dist/mcp/__tests__/codex-reasoning-effort.test.d.ts.map +0 -1
  895. package/dist/mcp/__tests__/codex-reasoning-effort.test.js +0 -141
  896. package/dist/mcp/__tests__/codex-reasoning-effort.test.js.map +0 -1
  897. package/dist/mcp/__tests__/gemini-core.test.d.ts +0 -2
  898. package/dist/mcp/__tests__/gemini-core.test.d.ts.map +0 -1
  899. package/dist/mcp/__tests__/gemini-core.test.js +0 -53
  900. package/dist/mcp/__tests__/gemini-core.test.js.map +0 -1
  901. package/dist/mcp/__tests__/gemini-integration.test.d.ts +0 -2
  902. package/dist/mcp/__tests__/gemini-integration.test.d.ts.map +0 -1
  903. package/dist/mcp/__tests__/gemini-integration.test.js +0 -50
  904. package/dist/mcp/__tests__/gemini-integration.test.js.map +0 -1
  905. package/dist/mcp/__tests__/gemini-yolo-env.test.d.ts +0 -2
  906. package/dist/mcp/__tests__/gemini-yolo-env.test.d.ts.map +0 -1
  907. package/dist/mcp/__tests__/gemini-yolo-env.test.js +0 -274
  908. package/dist/mcp/__tests__/gemini-yolo-env.test.js.map +0 -1
  909. package/dist/mcp/__tests__/job-state-db-deprecation.test.d.ts +0 -2
  910. package/dist/mcp/__tests__/job-state-db-deprecation.test.d.ts.map +0 -1
  911. package/dist/mcp/__tests__/job-state-db-deprecation.test.js +0 -166
  912. package/dist/mcp/__tests__/job-state-db-deprecation.test.js.map +0 -1
  913. package/dist/mcp/__tests__/omc-tools-server.test.d.ts +0 -2
  914. package/dist/mcp/__tests__/omc-tools-server.test.d.ts.map +0 -1
  915. package/dist/mcp/__tests__/omc-tools-server.test.js +0 -108
  916. package/dist/mcp/__tests__/omc-tools-server.test.js.map +0 -1
  917. package/dist/mcp/__tests__/prompt-injection.test.d.ts +0 -2
  918. package/dist/mcp/__tests__/prompt-injection.test.d.ts.map +0 -1
  919. package/dist/mcp/__tests__/prompt-injection.test.js +0 -86
  920. package/dist/mcp/__tests__/prompt-injection.test.js.map +0 -1
  921. package/dist/mcp/__tests__/shared-exec.test.d.ts +0 -2
  922. package/dist/mcp/__tests__/shared-exec.test.d.ts.map +0 -1
  923. package/dist/mcp/__tests__/shared-exec.test.js +0 -151
  924. package/dist/mcp/__tests__/shared-exec.test.js.map +0 -1
  925. package/dist/notifications/__tests__/config-merge.test.d.ts +0 -2
  926. package/dist/notifications/__tests__/config-merge.test.d.ts.map +0 -1
  927. package/dist/notifications/__tests__/config-merge.test.js +0 -242
  928. package/dist/notifications/__tests__/config-merge.test.js.map +0 -1
  929. package/dist/notifications/__tests__/config.test.d.ts +0 -2
  930. package/dist/notifications/__tests__/config.test.d.ts.map +0 -1
  931. package/dist/notifications/__tests__/config.test.js +0 -227
  932. package/dist/notifications/__tests__/config.test.js.map +0 -1
  933. package/dist/notifications/__tests__/dispatcher.test.d.ts +0 -2
  934. package/dist/notifications/__tests__/dispatcher.test.d.ts.map +0 -1
  935. package/dist/notifications/__tests__/dispatcher.test.js +0 -898
  936. package/dist/notifications/__tests__/dispatcher.test.js.map +0 -1
  937. package/dist/notifications/__tests__/formatter.test.d.ts +0 -2
  938. package/dist/notifications/__tests__/formatter.test.d.ts.map +0 -1
  939. package/dist/notifications/__tests__/formatter.test.js +0 -72
  940. package/dist/notifications/__tests__/formatter.test.js.map +0 -1
  941. package/dist/notifications/__tests__/notify-registry-integration.test.d.ts +0 -2
  942. package/dist/notifications/__tests__/notify-registry-integration.test.d.ts.map +0 -1
  943. package/dist/notifications/__tests__/notify-registry-integration.test.js +0 -349
  944. package/dist/notifications/__tests__/notify-registry-integration.test.js.map +0 -1
  945. package/dist/notifications/__tests__/profiles.test.d.ts +0 -2
  946. package/dist/notifications/__tests__/profiles.test.d.ts.map +0 -1
  947. package/dist/notifications/__tests__/profiles.test.js +0 -253
  948. package/dist/notifications/__tests__/profiles.test.js.map +0 -1
  949. package/dist/notifications/__tests__/reply-config.test.d.ts +0 -2
  950. package/dist/notifications/__tests__/reply-config.test.d.ts.map +0 -1
  951. package/dist/notifications/__tests__/reply-config.test.js +0 -213
  952. package/dist/notifications/__tests__/reply-config.test.js.map +0 -1
  953. package/dist/notifications/__tests__/reply-listener.test.d.ts +0 -2
  954. package/dist/notifications/__tests__/reply-listener.test.d.ts.map +0 -1
  955. package/dist/notifications/__tests__/reply-listener.test.js +0 -431
  956. package/dist/notifications/__tests__/reply-listener.test.js.map +0 -1
  957. package/dist/notifications/__tests__/session-registry.test.d.ts +0 -2
  958. package/dist/notifications/__tests__/session-registry.test.d.ts.map +0 -1
  959. package/dist/notifications/__tests__/session-registry.test.js +0 -465
  960. package/dist/notifications/__tests__/session-registry.test.js.map +0 -1
  961. package/dist/notifications/__tests__/sleepMs.test.d.ts +0 -10
  962. package/dist/notifications/__tests__/sleepMs.test.d.ts.map +0 -1
  963. package/dist/notifications/__tests__/sleepMs.test.js +0 -117
  964. package/dist/notifications/__tests__/sleepMs.test.js.map +0 -1
  965. package/dist/notifications/__tests__/tmux.test.d.ts +0 -2
  966. package/dist/notifications/__tests__/tmux.test.d.ts.map +0 -1
  967. package/dist/notifications/__tests__/tmux.test.js +0 -137
  968. package/dist/notifications/__tests__/tmux.test.js.map +0 -1
  969. package/dist/skills/__tests__/ax-context-init.test.d.ts +0 -2
  970. package/dist/skills/__tests__/ax-context-init.test.d.ts.map +0 -1
  971. package/dist/skills/__tests__/ax-context-init.test.js +0 -36
  972. package/dist/skills/__tests__/ax-context-init.test.js.map +0 -1
  973. package/dist/skills/__tests__/mingw-escape.test.d.ts +0 -9
  974. package/dist/skills/__tests__/mingw-escape.test.d.ts.map +0 -1
  975. package/dist/skills/__tests__/mingw-escape.test.js +0 -105
  976. package/dist/skills/__tests__/mingw-escape.test.js.map +0 -1
  977. package/dist/team/__tests__/activity-log.test.d.ts +0 -2
  978. package/dist/team/__tests__/activity-log.test.d.ts.map +0 -1
  979. package/dist/team/__tests__/activity-log.test.js +0 -141
  980. package/dist/team/__tests__/activity-log.test.js.map +0 -1
  981. package/dist/team/__tests__/audit-log.test.d.ts +0 -2
  982. package/dist/team/__tests__/audit-log.test.d.ts.map +0 -1
  983. package/dist/team/__tests__/audit-log.test.js +0 -305
  984. package/dist/team/__tests__/audit-log.test.js.map +0 -1
  985. package/dist/team/__tests__/bridge-entry.test.d.ts +0 -2
  986. package/dist/team/__tests__/bridge-entry.test.d.ts.map +0 -1
  987. package/dist/team/__tests__/bridge-entry.test.js +0 -152
  988. package/dist/team/__tests__/bridge-entry.test.js.map +0 -1
  989. package/dist/team/__tests__/bridge-integration.test.d.ts +0 -2
  990. package/dist/team/__tests__/bridge-integration.test.d.ts.map +0 -1
  991. package/dist/team/__tests__/bridge-integration.test.js +0 -328
  992. package/dist/team/__tests__/bridge-integration.test.js.map +0 -1
  993. package/dist/team/__tests__/capabilities.test.d.ts +0 -2
  994. package/dist/team/__tests__/capabilities.test.d.ts.map +0 -1
  995. package/dist/team/__tests__/capabilities.test.js +0 -97
  996. package/dist/team/__tests__/capabilities.test.js.map +0 -1
  997. package/dist/team/__tests__/deadlock-detector.test.d.ts +0 -2
  998. package/dist/team/__tests__/deadlock-detector.test.d.ts.map +0 -1
  999. package/dist/team/__tests__/deadlock-detector.test.js +0 -50
  1000. package/dist/team/__tests__/deadlock-detector.test.js.map +0 -1
  1001. package/dist/team/__tests__/dependency-graph.test.d.ts +0 -2
  1002. package/dist/team/__tests__/dependency-graph.test.d.ts.map +0 -1
  1003. package/dist/team/__tests__/dependency-graph.test.js +0 -29
  1004. package/dist/team/__tests__/dependency-graph.test.js.map +0 -1
  1005. package/dist/team/__tests__/edge-cases.test.d.ts +0 -16
  1006. package/dist/team/__tests__/edge-cases.test.d.ts.map +0 -1
  1007. package/dist/team/__tests__/edge-cases.test.js +0 -737
  1008. package/dist/team/__tests__/edge-cases.test.js.map +0 -1
  1009. package/dist/team/__tests__/fs-utils.test.d.ts +0 -2
  1010. package/dist/team/__tests__/fs-utils.test.d.ts.map +0 -1
  1011. package/dist/team/__tests__/fs-utils.test.js +0 -74
  1012. package/dist/team/__tests__/fs-utils.test.js.map +0 -1
  1013. package/dist/team/__tests__/git-worktree.test.d.ts +0 -2
  1014. package/dist/team/__tests__/git-worktree.test.d.ts.map +0 -1
  1015. package/dist/team/__tests__/git-worktree.test.js +0 -90
  1016. package/dist/team/__tests__/git-worktree.test.js.map +0 -1
  1017. package/dist/team/__tests__/heartbeat.test.d.ts +0 -2
  1018. package/dist/team/__tests__/heartbeat.test.d.ts.map +0 -1
  1019. package/dist/team/__tests__/heartbeat.test.js +0 -93
  1020. package/dist/team/__tests__/heartbeat.test.js.map +0 -1
  1021. package/dist/team/__tests__/inbox-outbox.test.d.ts +0 -2
  1022. package/dist/team/__tests__/inbox-outbox.test.d.ts.map +0 -1
  1023. package/dist/team/__tests__/inbox-outbox.test.js +0 -220
  1024. package/dist/team/__tests__/inbox-outbox.test.js.map +0 -1
  1025. package/dist/team/__tests__/mcp-team-bridge.test.d.ts +0 -2
  1026. package/dist/team/__tests__/mcp-team-bridge.test.d.ts.map +0 -1
  1027. package/dist/team/__tests__/mcp-team-bridge.test.js +0 -458
  1028. package/dist/team/__tests__/mcp-team-bridge.test.js.map +0 -1
  1029. package/dist/team/__tests__/merge-coordinator.test.d.ts +0 -2
  1030. package/dist/team/__tests__/merge-coordinator.test.d.ts.map +0 -1
  1031. package/dist/team/__tests__/merge-coordinator.test.js +0 -128
  1032. package/dist/team/__tests__/merge-coordinator.test.js.map +0 -1
  1033. package/dist/team/__tests__/message-router.test.d.ts +0 -2
  1034. package/dist/team/__tests__/message-router.test.d.ts.map +0 -1
  1035. package/dist/team/__tests__/message-router.test.js +0 -78
  1036. package/dist/team/__tests__/message-router.test.js.map +0 -1
  1037. package/dist/team/__tests__/outbox-reader.test.d.ts +0 -2
  1038. package/dist/team/__tests__/outbox-reader.test.d.ts.map +0 -1
  1039. package/dist/team/__tests__/outbox-reader.test.js +0 -134
  1040. package/dist/team/__tests__/outbox-reader.test.js.map +0 -1
  1041. package/dist/team/__tests__/permissions.test.d.ts +0 -2
  1042. package/dist/team/__tests__/permissions.test.d.ts.map +0 -1
  1043. package/dist/team/__tests__/permissions.test.js +0 -255
  1044. package/dist/team/__tests__/permissions.test.js.map +0 -1
  1045. package/dist/team/__tests__/prompt-sanitization.test.d.ts +0 -2
  1046. package/dist/team/__tests__/prompt-sanitization.test.d.ts.map +0 -1
  1047. package/dist/team/__tests__/prompt-sanitization.test.js +0 -150
  1048. package/dist/team/__tests__/prompt-sanitization.test.js.map +0 -1
  1049. package/dist/team/__tests__/summary-report.test.d.ts +0 -2
  1050. package/dist/team/__tests__/summary-report.test.d.ts.map +0 -1
  1051. package/dist/team/__tests__/summary-report.test.js +0 -196
  1052. package/dist/team/__tests__/summary-report.test.js.map +0 -1
  1053. package/dist/team/__tests__/task-file-ops.test.d.ts +0 -2
  1054. package/dist/team/__tests__/task-file-ops.test.d.ts.map +0 -1
  1055. package/dist/team/__tests__/task-file-ops.test.js +0 -392
  1056. package/dist/team/__tests__/task-file-ops.test.js.map +0 -1
  1057. package/dist/team/__tests__/task-router.test.d.ts +0 -2
  1058. package/dist/team/__tests__/task-router.test.d.ts.map +0 -1
  1059. package/dist/team/__tests__/task-router.test.js +0 -118
  1060. package/dist/team/__tests__/task-router.test.js.map +0 -1
  1061. package/dist/team/__tests__/team-registration.test.d.ts +0 -2
  1062. package/dist/team/__tests__/team-registration.test.d.ts.map +0 -1
  1063. package/dist/team/__tests__/team-registration.test.js +0 -90
  1064. package/dist/team/__tests__/team-registration.test.js.map +0 -1
  1065. package/dist/team/__tests__/team-status.test.d.ts +0 -2
  1066. package/dist/team/__tests__/team-status.test.d.ts.map +0 -1
  1067. package/dist/team/__tests__/team-status.test.js +0 -146
  1068. package/dist/team/__tests__/team-status.test.js.map +0 -1
  1069. package/dist/team/__tests__/tmux-session.test.d.ts +0 -2
  1070. package/dist/team/__tests__/tmux-session.test.d.ts.map +0 -1
  1071. package/dist/team/__tests__/tmux-session.test.js +0 -60
  1072. package/dist/team/__tests__/tmux-session.test.js.map +0 -1
  1073. package/dist/team/__tests__/unified-team.test.d.ts +0 -2
  1074. package/dist/team/__tests__/unified-team.test.d.ts.map +0 -1
  1075. package/dist/team/__tests__/unified-team.test.js +0 -77
  1076. package/dist/team/__tests__/unified-team.test.js.map +0 -1
  1077. package/dist/team/__tests__/usage-tracker.test.d.ts +0 -2
  1078. package/dist/team/__tests__/usage-tracker.test.d.ts.map +0 -1
  1079. package/dist/team/__tests__/usage-tracker.test.js +0 -106
  1080. package/dist/team/__tests__/usage-tracker.test.js.map +0 -1
  1081. package/dist/team/__tests__/worker-health.test.d.ts +0 -2
  1082. package/dist/team/__tests__/worker-health.test.d.ts.map +0 -1
  1083. package/dist/team/__tests__/worker-health.test.js +0 -129
  1084. package/dist/team/__tests__/worker-health.test.js.map +0 -1
  1085. package/dist/team/__tests__/worker-restart.test.d.ts +0 -2
  1086. package/dist/team/__tests__/worker-restart.test.d.ts.map +0 -1
  1087. package/dist/team/__tests__/worker-restart.test.js +0 -122
  1088. package/dist/team/__tests__/worker-restart.test.js.map +0 -1
  1089. package/dist/tools/__tests__/ast-tools.test.d.ts +0 -2
  1090. package/dist/tools/__tests__/ast-tools.test.d.ts.map +0 -1
  1091. package/dist/tools/__tests__/ast-tools.test.js +0 -178
  1092. package/dist/tools/__tests__/ast-tools.test.js.map +0 -1
  1093. package/dist/tools/__tests__/lsp-tools.test.d.ts +0 -2
  1094. package/dist/tools/__tests__/lsp-tools.test.d.ts.map +0 -1
  1095. package/dist/tools/__tests__/lsp-tools.test.js +0 -252
  1096. package/dist/tools/__tests__/lsp-tools.test.js.map +0 -1
  1097. package/dist/tools/__tests__/schema-conversion.test.d.ts +0 -11
  1098. package/dist/tools/__tests__/schema-conversion.test.d.ts.map +0 -1
  1099. package/dist/tools/__tests__/schema-conversion.test.js +0 -270
  1100. package/dist/tools/__tests__/schema-conversion.test.js.map +0 -1
  1101. package/dist/tools/__tests__/state-tools.test.d.ts +0 -2
  1102. package/dist/tools/__tests__/state-tools.test.d.ts.map +0 -1
  1103. package/dist/tools/__tests__/state-tools.test.js +0 -444
  1104. package/dist/tools/__tests__/state-tools.test.js.map +0 -1
  1105. package/dist/tools/diagnostics/__tests__/index.test.d.ts +0 -2
  1106. package/dist/tools/diagnostics/__tests__/index.test.d.ts.map +0 -1
  1107. package/dist/tools/diagnostics/__tests__/index.test.js +0 -111
  1108. package/dist/tools/diagnostics/__tests__/index.test.js.map +0 -1
  1109. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts +0 -2
  1110. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.d.ts.map +0 -1
  1111. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js +0 -120
  1112. package/dist/tools/diagnostics/__tests__/lsp-aggregator.test.js.map +0 -1
  1113. package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts +0 -2
  1114. package/dist/tools/diagnostics/__tests__/tsc-runner.test.d.ts.map +0 -1
  1115. package/dist/tools/diagnostics/__tests__/tsc-runner.test.js +0 -86
  1116. package/dist/tools/diagnostics/__tests__/tsc-runner.test.js.map +0 -1
  1117. package/dist/tools/lsp/__tests__/client-eviction.test.d.ts +0 -2
  1118. package/dist/tools/lsp/__tests__/client-eviction.test.d.ts.map +0 -1
  1119. package/dist/tools/lsp/__tests__/client-eviction.test.js +0 -343
  1120. package/dist/tools/lsp/__tests__/client-eviction.test.js.map +0 -1
  1121. package/dist/tools/lsp/__tests__/client-timer-buffer.test.d.ts +0 -11
  1122. package/dist/tools/lsp/__tests__/client-timer-buffer.test.d.ts.map +0 -1
  1123. package/dist/tools/lsp/__tests__/client-timer-buffer.test.js +0 -222
  1124. package/dist/tools/lsp/__tests__/client-timer-buffer.test.js.map +0 -1
  1125. package/dist/tools/lsp/__tests__/client-win32-spawn.test.d.ts +0 -2
  1126. package/dist/tools/lsp/__tests__/client-win32-spawn.test.d.ts.map +0 -1
  1127. package/dist/tools/lsp/__tests__/client-win32-spawn.test.js +0 -84
  1128. package/dist/tools/lsp/__tests__/client-win32-spawn.test.js.map +0 -1
  1129. package/dist/tools/lsp/__tests__/command-exists.test.d.ts +0 -2
  1130. package/dist/tools/lsp/__tests__/command-exists.test.d.ts.map +0 -1
  1131. package/dist/tools/lsp/__tests__/command-exists.test.js +0 -104
  1132. package/dist/tools/lsp/__tests__/command-exists.test.js.map +0 -1
  1133. package/dist/tools/lsp/__tests__/utils.test.d.ts +0 -2
  1134. package/dist/tools/lsp/__tests__/utils.test.d.ts.map +0 -1
  1135. package/dist/tools/lsp/__tests__/utils.test.js +0 -338
  1136. package/dist/tools/lsp/__tests__/utils.test.js.map +0 -1
  1137. package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.d.ts +0 -2
  1138. package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.d.ts.map +0 -1
  1139. package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.js +0 -76
  1140. package/dist/tools/python-repl/__tests__/bridge-manager-cleanup.test.js.map +0 -1
  1141. package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts +0 -2
  1142. package/dist/tools/python-repl/__tests__/bridge-manager.test.d.ts.map +0 -1
  1143. package/dist/tools/python-repl/__tests__/bridge-manager.test.js +0 -338
  1144. package/dist/tools/python-repl/__tests__/bridge-manager.test.js.map +0 -1
  1145. package/dist/tools/python-repl/__tests__/socket-client.test.d.ts +0 -2
  1146. package/dist/tools/python-repl/__tests__/socket-client.test.d.ts.map +0 -1
  1147. package/dist/tools/python-repl/__tests__/socket-client.test.js +0 -155
  1148. package/dist/tools/python-repl/__tests__/socket-client.test.js.map +0 -1
  1149. package/dist/utils/__tests__/paths.test.d.ts +0 -2
  1150. package/dist/utils/__tests__/paths.test.d.ts.map +0 -1
  1151. package/dist/utils/__tests__/paths.test.js +0 -88
  1152. package/dist/utils/__tests__/paths.test.js.map +0 -1
  1153. package/dist/utils/__tests__/string-width.test.d.ts +0 -6
  1154. package/dist/utils/__tests__/string-width.test.d.ts.map +0 -1
  1155. package/dist/utils/__tests__/string-width.test.js +0 -173
  1156. package/dist/utils/__tests__/string-width.test.js.map +0 -1
  1157. package/dist/verification/tier-selector.test.d.ts +0 -2
  1158. package/dist/verification/tier-selector.test.d.ts.map +0 -1
  1159. package/dist/verification/tier-selector.test.js +0 -282
  1160. package/dist/verification/tier-selector.test.js.map +0 -1
@@ -1,1273 +0,0 @@
1
- import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
- import { mkdirSync, writeFileSync, readFileSync, rmSync, existsSync } from 'fs';
3
- import { join } from 'path';
4
- import { tmpdir, homedir } from 'os';
5
- import { execSync } from 'child_process';
6
- // Mock isTeamEnabled so team/ultrapilot/swarm keywords are detected in CI
7
- vi.mock('../features/auto-update.js', async (importOriginal) => {
8
- const actual = await importOriginal();
9
- return {
10
- ...actual,
11
- isTeamEnabled: () => true,
12
- };
13
- });
14
- import { extractPromptText, removeCodeBlocks, detectKeywordsWithType, hasKeyword, getPrimaryKeyword } from '../hooks/keyword-detector/index.js';
15
- import { formatTodoStatus, getNextPendingTodo } from '../hooks/todo-continuation/index.js';
16
- import { resetTodoContinuationAttempts } from '../hooks/persistent-mode/index.js';
17
- import { startUltraQA, clearUltraQAState, isRalphLoopActive } from '../hooks/ultraqa/index.js';
18
- import { createRalphLoopHook, clearRalphState, isUltraQAActive } from '../hooks/ralph/index.js';
19
- import { processHook } from '../hooks/bridge.js';
20
- describe('Keyword Detector', () => {
21
- describe('extractPromptText', () => {
22
- it('should extract text from text parts', () => {
23
- const parts = [
24
- { type: 'text', text: 'Hello world' },
25
- { type: 'text', text: 'How are you?' }
26
- ];
27
- expect(extractPromptText(parts)).toBe('Hello world How are you?');
28
- });
29
- it('should filter out non-text parts', () => {
30
- const parts = [
31
- { type: 'text', text: 'Hello' },
32
- { type: 'image', url: 'test.jpg' },
33
- { type: 'text', text: 'world' }
34
- ];
35
- expect(extractPromptText(parts)).toBe('Hello world');
36
- });
37
- it('should handle empty parts array', () => {
38
- expect(extractPromptText([])).toBe('');
39
- });
40
- it('should handle parts without text', () => {
41
- const parts = [
42
- { type: 'text' },
43
- { type: 'text', text: undefined }
44
- ];
45
- expect(extractPromptText(parts)).toBe('');
46
- });
47
- it('should join multiple text parts with space', () => {
48
- const parts = [
49
- { type: 'text', text: 'analyze' },
50
- { type: 'text', text: 'this' },
51
- { type: 'text', text: 'code' }
52
- ];
53
- expect(extractPromptText(parts)).toBe('analyze this code');
54
- });
55
- });
56
- describe('removeCodeBlocks', () => {
57
- it('should remove triple backtick fenced code blocks', () => {
58
- const text = 'Some text\n```javascript\nconst x = 1;\n```\nMore text';
59
- const result = removeCodeBlocks(text);
60
- expect(result).not.toContain('const x = 1');
61
- expect(result).toContain('Some text');
62
- expect(result).toContain('More text');
63
- });
64
- it('should remove tilde fenced code blocks', () => {
65
- const text = 'Before\n~~~python\nprint("hello")\n~~~\nAfter';
66
- const result = removeCodeBlocks(text);
67
- expect(result).not.toContain('print("hello")');
68
- expect(result).toContain('Before');
69
- expect(result).toContain('After');
70
- });
71
- it('should remove inline code with single backticks', () => {
72
- const text = 'Use `analyze` command here';
73
- const result = removeCodeBlocks(text);
74
- expect(result).not.toContain('`analyze`');
75
- expect(result).toContain('Use');
76
- expect(result).toContain('command here');
77
- });
78
- it('should handle multiple code blocks', () => {
79
- const text = '```js\ncode1\n```\ntext\n```ts\ncode2\n```';
80
- const result = removeCodeBlocks(text);
81
- expect(result).not.toContain('code1');
82
- expect(result).not.toContain('code2');
83
- expect(result).toContain('text');
84
- });
85
- it('should handle text without code blocks', () => {
86
- const text = 'Just plain text here';
87
- expect(removeCodeBlocks(text)).toBe(text);
88
- });
89
- it('should handle empty string', () => {
90
- expect(removeCodeBlocks('')).toBe('');
91
- });
92
- it('should handle nested inline code', () => {
93
- const text = 'Text with `inline` and `another` code';
94
- const result = removeCodeBlocks(text);
95
- expect(result).not.toContain('`');
96
- expect(result).toContain('Text with');
97
- expect(result).toContain('and');
98
- expect(result).toContain('code');
99
- });
100
- });
101
- describe('detectKeywordsWithType', () => {
102
- it('should detect ultrawork keyword', () => {
103
- const detected = detectKeywordsWithType('I need ultrawork mode');
104
- expect(detected).toHaveLength(1);
105
- expect(detected[0].type).toBe('ultrawork');
106
- expect(detected[0].keyword).toBe('ultrawork');
107
- });
108
- it('should detect ulw abbreviation', () => {
109
- const detected = detectKeywordsWithType('Use ulw for this task');
110
- expect(detected).toHaveLength(1);
111
- expect(detected[0].type).toBe('ultrawork');
112
- expect(detected[0].keyword).toBe('ulw');
113
- });
114
- it('should detect ultrathink keyword', () => {
115
- const detected = detectKeywordsWithType('I need to ultrathink this');
116
- expect(detected).toHaveLength(1);
117
- expect(detected[0].type).toBe('ultrathink');
118
- expect(detected[0].keyword).toBe('ultrathink');
119
- });
120
- it('should detect ultrathink keyword directly', () => {
121
- const detected = detectKeywordsWithType('Let me ultrathink about it');
122
- expect(detected).toHaveLength(1);
123
- expect(detected[0].type).toBe('ultrathink');
124
- expect(detected[0].keyword).toBe('ultrathink');
125
- });
126
- it('should detect deepsearch keywords for codebase search', () => {
127
- const patterns = [
128
- 'search the codebase',
129
- 'find in codebase',
130
- 'deepsearch for pattern'
131
- ];
132
- for (const pattern of patterns) {
133
- const detected = detectKeywordsWithType(pattern);
134
- expect(detected.length).toBeGreaterThan(0);
135
- expect(detected[0].type).toBe('deepsearch');
136
- }
137
- });
138
- it('should detect analyze keywords with restricted patterns', () => {
139
- const patterns = [
140
- 'deep analyze this code',
141
- 'deepanalyze this code',
142
- 'deep-analyze the issue'
143
- ];
144
- for (const pattern of patterns) {
145
- const detected = detectKeywordsWithType(pattern);
146
- expect(detected.length).toBeGreaterThan(0);
147
- expect(detected[0].type).toBe('analyze');
148
- }
149
- });
150
- it('should be case insensitive', () => {
151
- const variants = ['ULTRAWORK', 'UltraWork', 'uLtRaWoRk'];
152
- for (const variant of variants) {
153
- const detected = detectKeywordsWithType(variant);
154
- expect(detected).toHaveLength(1);
155
- expect(detected[0].type).toBe('ultrawork');
156
- }
157
- });
158
- it('should respect word boundaries', () => {
159
- // Should not match partial words
160
- const text = 'multiwork is not ultrawork';
161
- const detected = detectKeywordsWithType(text);
162
- expect(detected).toHaveLength(1);
163
- expect(detected[0].keyword).toBe('ultrawork');
164
- });
165
- it('should include position information', () => {
166
- const detected = detectKeywordsWithType('Start search the codebase here');
167
- expect(detected[0].position).toBeGreaterThanOrEqual(0);
168
- });
169
- it('should return empty array for no matches', () => {
170
- const detected = detectKeywordsWithType('Just plain text');
171
- expect(detected).toEqual([]);
172
- });
173
- it('should detect multiple different keyword types', () => {
174
- const text = 'search the codebase and deep analyze the bug';
175
- const detected = detectKeywordsWithType(text);
176
- expect(detected.length).toBeGreaterThanOrEqual(2);
177
- const types = detected.map(d => d.type);
178
- expect(types).toContain('deepsearch');
179
- expect(types).toContain('analyze');
180
- });
181
- // New keyword types tests
182
- it('should detect cancel keyword', () => {
183
- const detected = detectKeywordsWithType('cancelomc this task');
184
- expect(detected).toHaveLength(1);
185
- expect(detected[0].type).toBe('cancel');
186
- expect(detected[0].keyword).toBe('cancelomc');
187
- });
188
- it('should detect cancel keyword variations', () => {
189
- const cancelTerms = ['cancelomc', 'stopomc'];
190
- for (const term of cancelTerms) {
191
- const detected = detectKeywordsWithType(`Please ${term} the process`);
192
- expect(detected).toHaveLength(1);
193
- expect(detected[0].type).toBe('cancel');
194
- expect(detected[0].keyword).toBe(term);
195
- }
196
- });
197
- it('should route legacy ultrapilot keyword to team (with dual-emission)', () => {
198
- const detected = detectKeywordsWithType('use ultrapilot for this');
199
- expect(detected).toHaveLength(2);
200
- expect(detected[0].type).toBe('ultrapilot');
201
- expect(detected[1].type).toBe('team');
202
- expect(detected[0].keyword).toBe('ultrapilot');
203
- });
204
- it('should route legacy ultrapilot patterns to team', () => {
205
- const patterns = [
206
- 'ultrapilot this project',
207
- 'parallel build the app',
208
- 'swarm build the system'
209
- ];
210
- for (const pattern of patterns) {
211
- const detected = detectKeywordsWithType(pattern);
212
- expect(detected.length).toBeGreaterThan(0);
213
- const hasTeam = detected.some(d => d.type === 'team');
214
- expect(hasTeam).toBe(true);
215
- }
216
- });
217
- it('should route legacy swarm keyword to team (with dual-emission)', () => {
218
- const detected = detectKeywordsWithType('swarm 5 agents to fix this');
219
- expect(detected).toHaveLength(2);
220
- expect(detected[0].type).toBe('swarm');
221
- expect(detected[1].type).toBe('team');
222
- expect(detected[0].keyword).toBe('swarm 5 agents');
223
- });
224
- it('should route coordinated agents pattern to team (with dual-emission)', () => {
225
- const detected = detectKeywordsWithType('use coordinated agents');
226
- expect(detected).toHaveLength(2);
227
- expect(detected[0].type).toBe('swarm');
228
- expect(detected[1].type).toBe('team');
229
- expect(detected[0].keyword).toBe('coordinated agents');
230
- });
231
- it('should detect pipeline keyword', () => {
232
- const detected = detectKeywordsWithType('use agent pipeline for this');
233
- expect(detected).toHaveLength(1);
234
- expect(detected[0].type).toBe('pipeline');
235
- expect(detected[0].keyword).toBe('agent pipeline');
236
- });
237
- it('should detect chain agents pattern', () => {
238
- const detected = detectKeywordsWithType('chain agents together');
239
- expect(detected).toHaveLength(1);
240
- expect(detected[0].type).toBe('pipeline');
241
- expect(detected[0].keyword).toBe('chain agents');
242
- });
243
- it('should detect ralplan keyword', () => {
244
- const detected = detectKeywordsWithType('ralplan this feature');
245
- expect(detected).toHaveLength(1);
246
- expect(detected[0].type).toBe('ralplan');
247
- expect(detected[0].keyword).toBe('ralplan');
248
- });
249
- it('should detect plan patterns', () => {
250
- const patterns = [
251
- 'plan this feature',
252
- 'plan the refactoring'
253
- ];
254
- for (const pattern of patterns) {
255
- const detected = detectKeywordsWithType(pattern);
256
- expect(detected.length).toBeGreaterThan(0);
257
- const hasPlan = detected.some(d => d.type === 'plan');
258
- expect(hasPlan).toBe(true);
259
- }
260
- });
261
- it('should detect tdd keyword', () => {
262
- const detected = detectKeywordsWithType('use tdd for this');
263
- expect(detected).toHaveLength(1);
264
- expect(detected[0].type).toBe('tdd');
265
- expect(detected[0].keyword).toBe('tdd');
266
- });
267
- it('should detect tdd patterns', () => {
268
- const patterns = [
269
- 'test first development',
270
- 'use tdd approach'
271
- ];
272
- for (const pattern of patterns) {
273
- const detected = detectKeywordsWithType(pattern);
274
- expect(detected.length).toBeGreaterThan(0);
275
- const hasTDD = detected.some(d => d.type === 'tdd');
276
- expect(hasTDD).toBe(true);
277
- }
278
- });
279
- it('should not detect research keyword', () => {
280
- const detected = detectKeywordsWithType('research this topic');
281
- expect(detected).toHaveLength(0);
282
- });
283
- it('should detect deepsearch keyword', () => {
284
- const detected = detectKeywordsWithType('deepsearch for the pattern');
285
- expect(detected).toHaveLength(1);
286
- expect(detected[0].type).toBe('deepsearch');
287
- expect(detected[0].keyword).toBe('deepsearch');
288
- });
289
- it('should detect deepsearch patterns', () => {
290
- const patterns = [
291
- 'search the codebase for errors',
292
- 'find in codebase',
293
- 'find in the codebase'
294
- ];
295
- for (const pattern of patterns) {
296
- const detected = detectKeywordsWithType(pattern);
297
- expect(detected.length).toBeGreaterThan(0);
298
- const hasDeepsearch = detected.some(d => d.type === 'deepsearch');
299
- expect(hasDeepsearch).toBe(true);
300
- }
301
- });
302
- it('should NOT detect deepsearch for generic find', () => {
303
- const patterns = [
304
- 'find the file',
305
- 'find this function',
306
- 'search for help'
307
- ];
308
- for (const pattern of patterns) {
309
- const detected = detectKeywordsWithType(pattern);
310
- const hasDeepsearch = detected.some(d => d.type === 'deepsearch');
311
- expect(hasDeepsearch).toBe(false);
312
- }
313
- });
314
- it('should detect analyze patterns with restrictions', () => {
315
- const patterns = [
316
- 'deep analyze this code',
317
- 'deepanalyze this issue',
318
- 'deep-analyze the problem'
319
- ];
320
- for (const pattern of patterns) {
321
- const detected = detectKeywordsWithType(pattern);
322
- expect(detected.length).toBeGreaterThan(0);
323
- const hasAnalyze = detected.some(d => d.type === 'analyze');
324
- expect(hasAnalyze).toBe(true);
325
- }
326
- });
327
- it('should NOT detect analyze for generic patterns', () => {
328
- const patterns = [
329
- 'how to do this',
330
- 'understand this code',
331
- 'review this code',
332
- 'analyze without context',
333
- 'investigate the bug',
334
- 'debug the issue'
335
- ];
336
- for (const pattern of patterns) {
337
- const detected = detectKeywordsWithType(pattern);
338
- const hasAnalyze = detected.some(d => d.type === 'analyze');
339
- expect(hasAnalyze).toBe(false);
340
- }
341
- });
342
- });
343
- describe('hasKeyword', () => {
344
- it('should return true when keyword exists', () => {
345
- expect(hasKeyword('use ultrawork mode')).toBe(true);
346
- expect(hasKeyword('search the codebase')).toBe(true);
347
- expect(hasKeyword('deep analyze the bug')).toBe(true);
348
- });
349
- it('should return false when no keyword exists', () => {
350
- expect(hasKeyword('just normal text')).toBe(false);
351
- expect(hasKeyword('hello world')).toBe(false);
352
- });
353
- it('should ignore keywords in code blocks', () => {
354
- const text = 'Normal text\n```\nsearch in code\n```\nMore text';
355
- expect(hasKeyword(text)).toBe(false);
356
- });
357
- it('should detect keywords outside code blocks', () => {
358
- const text = 'Please search the codebase\n```\nsome code\n```\nfor this';
359
- expect(hasKeyword(text)).toBe(true);
360
- });
361
- it('should handle empty string', () => {
362
- expect(hasKeyword('')).toBe(false);
363
- });
364
- });
365
- describe('getPrimaryKeyword', () => {
366
- it('should return highest priority keyword', () => {
367
- // ultrawork has highest priority
368
- const text = 'search and analyze with ultrawork';
369
- const primary = getPrimaryKeyword(text);
370
- expect(primary).not.toBeNull();
371
- expect(primary.type).toBe('ultrawork');
372
- });
373
- it('should return ultrathink when present', () => {
374
- const text = 'ultrathink about this problem';
375
- const primary = getPrimaryKeyword(text);
376
- expect(primary).not.toBeNull();
377
- expect(primary.type).toBe('ultrathink');
378
- });
379
- it('should return deepsearch for codebase search', () => {
380
- const text = 'find in codebase';
381
- const primary = getPrimaryKeyword(text);
382
- expect(primary).not.toBeNull();
383
- expect(primary.type).toBe('deepsearch');
384
- });
385
- it('should return analyze when only analyze keyword', () => {
386
- const text = 'deep analyze the issue';
387
- const primary = getPrimaryKeyword(text);
388
- expect(primary).not.toBeNull();
389
- expect(primary.type).toBe('analyze');
390
- });
391
- it('should return null when no keywords', () => {
392
- const primary = getPrimaryKeyword('just normal text');
393
- expect(primary).toBeNull();
394
- });
395
- it('should ignore code blocks', () => {
396
- const text = '```\nultrawork code\n```\nsearch the codebase';
397
- const primary = getPrimaryKeyword(text);
398
- expect(primary).not.toBeNull();
399
- expect(primary.type).toBe('deepsearch');
400
- });
401
- it('should return first detected when same priority', () => {
402
- // deepsearch has higher priority than analyze in the priority list
403
- const text = 'search the codebase and deep analyze the bug';
404
- const primary = getPrimaryKeyword(text);
405
- expect(primary).not.toBeNull();
406
- // Should return deepsearch as it comes first in priority list
407
- expect(primary.type).toBe('deepsearch');
408
- });
409
- // New priority tests for new keywords
410
- it('should give cancel highest priority', () => {
411
- const primary = getPrimaryKeyword('stopomc searching for files');
412
- expect(primary).not.toBeNull();
413
- expect(primary.type).toBe('cancel');
414
- });
415
- it('should give cancel priority over analyze', () => {
416
- const primary = getPrimaryKeyword('cancelomc this investigation');
417
- expect(primary).not.toBeNull();
418
- expect(primary.type).toBe('cancel');
419
- });
420
- it('should prioritize cancel over all other keywords', () => {
421
- const primary = getPrimaryKeyword('stopomc ultrawork and search');
422
- expect(primary).not.toBeNull();
423
- expect(primary.type).toBe('cancel');
424
- });
425
- it('should prioritize ralph after cancel', () => {
426
- const primary = getPrimaryKeyword('ralph mode for the task');
427
- expect(primary).not.toBeNull();
428
- expect(primary.type).toBe('ralph');
429
- });
430
- it('should prioritize ultrapilot for legacy ultrapilot trigger', () => {
431
- const primary = getPrimaryKeyword('ultrapilot this task');
432
- expect(primary).not.toBeNull();
433
- expect(primary.type).toBe('ultrapilot');
434
- });
435
- it('should prioritize team for legacy swarm trigger', () => {
436
- const primary = getPrimaryKeyword('swarm 5 agents for this');
437
- expect(primary).not.toBeNull();
438
- expect(primary.type).toBe('team');
439
- });
440
- it('should prioritize pipeline correctly', () => {
441
- const primary = getPrimaryKeyword('agent pipeline the task');
442
- expect(primary).not.toBeNull();
443
- expect(primary.type).toBe('pipeline');
444
- });
445
- it('should prioritize ralplan over plan', () => {
446
- const primary = getPrimaryKeyword('ralplan this project');
447
- expect(primary).not.toBeNull();
448
- expect(primary.type).toBe('ralplan');
449
- });
450
- it('should detect plan correctly', () => {
451
- const primary = getPrimaryKeyword('plan this feature');
452
- expect(primary).not.toBeNull();
453
- expect(primary.type).toBe('plan');
454
- });
455
- it('should prioritize tdd correctly', () => {
456
- const primary = getPrimaryKeyword('tdd for this feature');
457
- expect(primary).not.toBeNull();
458
- expect(primary.type).toBe('tdd');
459
- });
460
- it('should return null for removed research keyword', () => {
461
- const primary = getPrimaryKeyword('research this topic');
462
- expect(primary).toBeNull();
463
- });
464
- it('should prioritize deepsearch over generic search', () => {
465
- const primary = getPrimaryKeyword('search the codebase');
466
- expect(primary).not.toBeNull();
467
- expect(primary.type).toBe('deepsearch');
468
- });
469
- it('should prioritize analyze with restricted pattern', () => {
470
- const primary = getPrimaryKeyword('deep analyze the bug');
471
- expect(primary).not.toBeNull();
472
- expect(primary.type).toBe('analyze');
473
- });
474
- });
475
- });
476
- describe('Team staged workflow integration', () => {
477
- let testDir;
478
- const sessionId = 'team-session-test';
479
- beforeEach(() => {
480
- testDir = join(tmpdir(), `omc-team-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
481
- mkdirSync(join(testDir, '.omc', 'state', 'sessions', sessionId), { recursive: true });
482
- execSync('git init', { cwd: testDir });
483
- });
484
- afterEach(() => {
485
- rmSync(testDir, { recursive: true, force: true });
486
- });
487
- it('restores active Team stage on session-start', async () => {
488
- writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
489
- active: true,
490
- session_id: sessionId,
491
- stage: 'team-exec',
492
- team_name: 'delivery-team'
493
- }));
494
- const result = await processHook('session-start', {
495
- sessionId,
496
- directory: testDir,
497
- });
498
- expect(result.continue).toBe(true);
499
- expect(result.message || '').toContain('[TEAM MODE RESTORED]');
500
- expect(result.message || '').toContain('delivery-team');
501
- expect(result.message || '').toContain('team-exec');
502
- });
503
- it('emits terminal Team restore guidance on cancelled stage', async () => {
504
- writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
505
- active: true,
506
- session_id: sessionId,
507
- stage: 'team-fix',
508
- status: 'cancelled',
509
- team_name: 'delivery-team'
510
- }));
511
- const result = await processHook('session-start', {
512
- sessionId,
513
- directory: testDir,
514
- });
515
- expect(result.continue).toBe(true);
516
- expect(result.message || '').toContain('[TEAM MODE TERMINAL STATE DETECTED]');
517
- expect(result.message || '').toContain('cancel');
518
- });
519
- it('enforces verify stage continuation while active and non-terminal', async () => {
520
- writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
521
- active: true,
522
- session_id: sessionId,
523
- stage: 'team-verify',
524
- team_name: 'delivery-team'
525
- }));
526
- const result = await processHook('persistent-mode', {
527
- sessionId,
528
- directory: testDir,
529
- });
530
- expect(result.continue).toBe(true);
531
- expect(result.message).toContain('[TEAM MODE CONTINUATION]');
532
- expect(result.message).toContain('team-verify');
533
- expect(result.message).toContain('Continue verification');
534
- });
535
- it('enforces fix stage continuation while active and non-terminal', async () => {
536
- writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
537
- active: true,
538
- session_id: sessionId,
539
- stage: 'team-fix',
540
- team_name: 'delivery-team'
541
- }));
542
- const result = await processHook('persistent-mode', {
543
- sessionId,
544
- directory: testDir,
545
- });
546
- expect(result.continue).toBe(true);
547
- expect(result.message).toContain('[TEAM MODE CONTINUATION]');
548
- expect(result.message).toContain('team-fix');
549
- expect(result.message).toContain('fix loop');
550
- });
551
- it('allows terminal cleanup when Team stage is cancelled', async () => {
552
- writeFileSync(join(testDir, '.omc', 'state', 'sessions', sessionId, 'team-state.json'), JSON.stringify({
553
- active: true,
554
- session_id: sessionId,
555
- stage: 'team-verify',
556
- status: 'cancelled',
557
- team_name: 'delivery-team'
558
- }));
559
- const result = await processHook('persistent-mode', {
560
- sessionId,
561
- directory: testDir,
562
- });
563
- expect(result.continue).toBe(true);
564
- expect(result.message || '').not.toContain('[TEAM MODE CONTINUATION]');
565
- });
566
- });
567
- describe('Persistent-mode reply cleanup behavior', () => {
568
- const originalHome = process.env.HOME;
569
- const originalUserProfile = process.env.USERPROFILE;
570
- let testDir;
571
- let tempHome;
572
- const sessionId = 'reply-cleanup-session';
573
- beforeEach(() => {
574
- testDir = join(tmpdir(), `omc-reply-cleanup-${Date.now()}-${Math.random().toString(36).slice(2)}`);
575
- tempHome = join(tmpdir(), `omc-reply-home-${Date.now()}-${Math.random().toString(36).slice(2)}`);
576
- mkdirSync(testDir, { recursive: true });
577
- mkdirSync(tempHome, { recursive: true });
578
- execSync('git init', { cwd: testDir });
579
- process.env.HOME = tempHome;
580
- process.env.USERPROFILE = tempHome;
581
- });
582
- afterEach(() => {
583
- process.env.HOME = originalHome;
584
- process.env.USERPROFILE = originalUserProfile;
585
- rmSync(testDir, { recursive: true, force: true });
586
- rmSync(tempHome, { recursive: true, force: true });
587
- });
588
- it('does not remove reply-session registry on idle Stop/persistent-mode', async () => {
589
- const registryPath = join(homedir(), '.omc', 'state', 'reply-session-registry.jsonl');
590
- mkdirSync(join(homedir(), '.omc', 'state'), { recursive: true });
591
- writeFileSync(registryPath, `${JSON.stringify({
592
- platform: 'telegram',
593
- messageId: '123',
594
- sessionId,
595
- tmuxPaneId: '%1',
596
- tmuxSessionName: 'main',
597
- event: 'session-start',
598
- createdAt: new Date().toISOString(),
599
- })}\n`);
600
- const before = readFileSync(registryPath, 'utf-8');
601
- const result = await processHook('persistent-mode', {
602
- sessionId,
603
- directory: testDir,
604
- });
605
- const after = readFileSync(registryPath, 'utf-8');
606
- expect(result.continue).toBe(true);
607
- expect(existsSync(registryPath)).toBe(true);
608
- expect(after).toBe(before);
609
- expect(after).toContain(sessionId);
610
- });
611
- });
612
- describe('Todo Continuation', () => {
613
- describe('formatTodoStatus', () => {
614
- it('should format when all tasks complete', () => {
615
- const result = {
616
- count: 0,
617
- todos: [],
618
- total: 5,
619
- source: 'todo'
620
- };
621
- expect(formatTodoStatus(result)).toBe('All tasks complete (5 total)');
622
- });
623
- it('should format with incomplete tasks', () => {
624
- const result = {
625
- count: 3,
626
- todos: [],
627
- total: 10,
628
- source: 'todo'
629
- };
630
- expect(formatTodoStatus(result)).toBe('7/10 completed, 3 remaining');
631
- });
632
- it('should handle zero total tasks', () => {
633
- const result = {
634
- count: 0,
635
- todos: [],
636
- total: 0,
637
- source: 'none'
638
- };
639
- expect(formatTodoStatus(result)).toBe('All tasks complete (0 total)');
640
- });
641
- it('should handle all tasks incomplete', () => {
642
- const result = {
643
- count: 5,
644
- todos: [],
645
- total: 5,
646
- source: 'todo'
647
- };
648
- expect(formatTodoStatus(result)).toBe('0/5 completed, 5 remaining');
649
- });
650
- it('should handle single task remaining', () => {
651
- const result = {
652
- count: 1,
653
- todos: [],
654
- total: 10,
655
- source: 'todo'
656
- };
657
- expect(formatTodoStatus(result)).toBe('9/10 completed, 1 remaining');
658
- });
659
- });
660
- describe('getNextPendingTodo', () => {
661
- it('should return in_progress todo first', () => {
662
- const todos = [
663
- { content: 'Task 1', status: 'pending' },
664
- { content: 'Task 2', status: 'in_progress' },
665
- { content: 'Task 3', status: 'pending' }
666
- ];
667
- const result = {
668
- count: 3,
669
- todos,
670
- total: 3,
671
- source: 'todo'
672
- };
673
- const next = getNextPendingTodo(result);
674
- expect(next).not.toBeNull();
675
- expect(next.content).toBe('Task 2');
676
- expect(next.status).toBe('in_progress');
677
- });
678
- it('should return first pending when no in_progress', () => {
679
- const todos = [
680
- { content: 'Task 1', status: 'pending' },
681
- { content: 'Task 2', status: 'pending' },
682
- { content: 'Task 3', status: 'completed' }
683
- ];
684
- const result = {
685
- count: 2,
686
- todos: todos.filter(t => t.status !== 'completed'),
687
- total: 3,
688
- source: 'todo'
689
- };
690
- const next = getNextPendingTodo(result);
691
- expect(next).not.toBeNull();
692
- expect(next.content).toBe('Task 1');
693
- expect(next.status).toBe('pending');
694
- });
695
- it('should return null when no todos', () => {
696
- const result = {
697
- count: 0,
698
- todos: [],
699
- total: 0,
700
- source: 'none'
701
- };
702
- const next = getNextPendingTodo(result);
703
- expect(next).toBeNull();
704
- });
705
- it('should return null when all completed', () => {
706
- const result = {
707
- count: 0,
708
- todos: [],
709
- total: 3,
710
- source: 'todo'
711
- };
712
- const next = getNextPendingTodo(result);
713
- expect(next).toBeNull();
714
- });
715
- it('should handle todos with priority field', () => {
716
- const todos = [
717
- { content: 'Task 1', status: 'pending', priority: 'low' },
718
- { content: 'Task 2', status: 'in_progress', priority: 'high' }
719
- ];
720
- const result = {
721
- count: 2,
722
- todos,
723
- total: 2,
724
- source: 'todo'
725
- };
726
- const next = getNextPendingTodo(result);
727
- expect(next).not.toBeNull();
728
- expect(next.content).toBe('Task 2');
729
- });
730
- it('should handle todos with id field', () => {
731
- const todos = [
732
- { content: 'Task 1', status: 'pending', id: 'todo-1' },
733
- { content: 'Task 2', status: 'pending', id: 'todo-2' }
734
- ];
735
- const result = {
736
- count: 2,
737
- todos,
738
- total: 2,
739
- source: 'todo'
740
- };
741
- const next = getNextPendingTodo(result);
742
- expect(next).not.toBeNull();
743
- expect(next.id).toBe('todo-1');
744
- });
745
- it('should ignore cancelled todos', () => {
746
- const todos = [
747
- { content: 'Task 1', status: 'cancelled' },
748
- { content: 'Task 2', status: 'pending' }
749
- ];
750
- const result = {
751
- count: 1,
752
- todos: [todos[1]],
753
- total: 2,
754
- source: 'todo'
755
- };
756
- const next = getNextPendingTodo(result);
757
- expect(next).not.toBeNull();
758
- expect(next.content).toBe('Task 2');
759
- });
760
- it('should prefer in_progress over multiple pending', () => {
761
- const todos = [
762
- { content: 'Task 1', status: 'pending' },
763
- { content: 'Task 2', status: 'pending' },
764
- { content: 'Task 3', status: 'pending' },
765
- { content: 'Task 4', status: 'in_progress' }
766
- ];
767
- const result = {
768
- count: 4,
769
- todos,
770
- total: 4,
771
- source: 'todo'
772
- };
773
- const next = getNextPendingTodo(result);
774
- expect(next).not.toBeNull();
775
- expect(next.content).toBe('Task 4');
776
- expect(next.status).toBe('in_progress');
777
- });
778
- });
779
- describe('Todo type validation', () => {
780
- it('should handle all valid status values', () => {
781
- const statuses = ['pending', 'in_progress', 'completed', 'cancelled'];
782
- const todos = statuses.map((status, i) => ({
783
- content: `Task ${i + 1}`,
784
- status
785
- }));
786
- expect(todos).toHaveLength(4);
787
- todos.forEach(todo => {
788
- expect(todo.content).toBeTruthy();
789
- expect(statuses).toContain(todo.status);
790
- });
791
- });
792
- it('should handle optional fields', () => {
793
- const todo = {
794
- content: 'Test task',
795
- status: 'pending',
796
- priority: 'high',
797
- id: 'test-123'
798
- };
799
- expect(todo.content).toBe('Test task');
800
- expect(todo.status).toBe('pending');
801
- expect(todo.priority).toBe('high');
802
- expect(todo.id).toBe('test-123');
803
- });
804
- it('should handle minimal todo object', () => {
805
- const todo = {
806
- content: 'Minimal task',
807
- status: 'pending'
808
- };
809
- expect(todo.content).toBe('Minimal task');
810
- expect(todo.status).toBe('pending');
811
- expect(todo.priority).toBeUndefined();
812
- expect(todo.id).toBeUndefined();
813
- });
814
- });
815
- describe('IncompleteTodosResult validation', () => {
816
- it('should maintain consistency between count and todos length', () => {
817
- const todos = [
818
- { content: 'Task 1', status: 'pending' },
819
- { content: 'Task 2', status: 'in_progress' }
820
- ];
821
- const result = {
822
- count: todos.length,
823
- todos,
824
- total: 5,
825
- source: 'todo'
826
- };
827
- expect(result.count).toBe(result.todos.length);
828
- expect(result.total).toBeGreaterThanOrEqual(result.count);
829
- });
830
- it('should handle edge case of more completed than total', () => {
831
- // This shouldn't happen in practice, but test the type structure
832
- const result = {
833
- count: 0,
834
- todos: [],
835
- total: 3,
836
- source: 'todo'
837
- };
838
- expect(result.count).toBeLessThanOrEqual(result.total);
839
- });
840
- });
841
- });
842
- describe('Hook Output Structure', () => {
843
- describe('JSON output format', () => {
844
- it('should create valid hook output with continue flag', () => {
845
- const output = {
846
- continue: true,
847
- message: 'Test message'
848
- };
849
- expect(output).toHaveProperty('continue');
850
- expect(output).toHaveProperty('message');
851
- expect(typeof output.continue).toBe('boolean');
852
- expect(typeof output.message).toBe('string');
853
- });
854
- it('should create valid hook output without message', () => {
855
- const output = {
856
- continue: false
857
- };
858
- expect(output).toHaveProperty('continue');
859
- expect(output.continue).toBe(false);
860
- });
861
- it('should serialize to valid JSON', () => {
862
- const output = {
863
- continue: true,
864
- message: 'ULTRAWORK MODE ACTIVATED'
865
- };
866
- const json = JSON.stringify(output);
867
- const parsed = JSON.parse(json);
868
- expect(parsed.continue).toBe(true);
869
- expect(parsed.message).toBe('ULTRAWORK MODE ACTIVATED');
870
- });
871
- it('should handle multiline messages', () => {
872
- const output = {
873
- continue: true,
874
- message: 'Line 1\nLine 2\nLine 3'
875
- };
876
- const json = JSON.stringify(output);
877
- const parsed = JSON.parse(json);
878
- expect(parsed.message).toContain('\n');
879
- expect(parsed.message.split('\n')).toHaveLength(3);
880
- });
881
- it('should handle empty message', () => {
882
- const output = {
883
- continue: true,
884
- message: ''
885
- };
886
- expect(output.message).toBe('');
887
- });
888
- it('should handle special characters in message', () => {
889
- const output = {
890
- continue: true,
891
- message: 'Message with "quotes" and \'apostrophes\' and \\ backslashes'
892
- };
893
- const json = JSON.stringify(output);
894
- const parsed = JSON.parse(json);
895
- expect(parsed.message).toBe(output.message);
896
- });
897
- });
898
- describe('Hook message formatting', () => {
899
- it('should format continuation message', () => {
900
- const message = '[SYSTEM REMINDER - TODO CONTINUATION] Incomplete tasks remain. Continue working.';
901
- expect(message).toContain('[SYSTEM REMINDER');
902
- expect(message).toContain('TODO CONTINUATION');
903
- expect(message).toContain('Continue working');
904
- });
905
- it('should format keyword detection message', () => {
906
- const keyword = {
907
- type: 'ultrawork',
908
- keyword: 'ultrawork',
909
- position: 0
910
- };
911
- const message = `ULTRAWORK MODE ACTIVATED - Detected keyword: ${keyword.keyword}`;
912
- expect(message).toContain('ULTRAWORK MODE');
913
- expect(message).toContain(keyword.keyword);
914
- });
915
- it('should format todo status message', () => {
916
- const result = {
917
- count: 2,
918
- todos: [],
919
- total: 5,
920
- source: 'todo'
921
- };
922
- const status = formatTodoStatus(result);
923
- const message = `Todo Status: ${status}`;
924
- expect(message).toContain('3/5 completed');
925
- expect(message).toContain('2 remaining');
926
- });
927
- });
928
- });
929
- describe('Integration: Keyword Detection with Code Blocks', () => {
930
- it('should detect keywords outside code and ignore inside', () => {
931
- const text = `
932
- Please search the codebase
933
-
934
- \`\`\`javascript
935
- // This search should be ignored
936
- function search() {
937
- return analyze();
938
- }
939
- \`\`\`
940
-
941
- Now deep analyze the bug
942
- `;
943
- const detected = detectKeywordsWithType(removeCodeBlocks(text));
944
- const types = detected.map(d => d.type);
945
- expect(types).toContain('deepsearch');
946
- expect(types).toContain('analyze');
947
- // Should only detect the ones outside code blocks
948
- expect(detected.filter(d => d.type === 'deepsearch')).toHaveLength(1);
949
- expect(detected.filter(d => d.type === 'analyze')).toHaveLength(1);
950
- });
951
- it('should handle inline code with keywords', () => {
952
- const text = 'Use the `deepsearch` command to find in codebase';
953
- const cleanText = removeCodeBlocks(text);
954
- const detected = detectKeywordsWithType(cleanText);
955
- // The phrase 'find in codebase' should still be detected
956
- expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
957
- });
958
- it('should prioritize ultrawork even with other keywords', () => {
959
- const text = 'search the codebase, deep analyze the bug, and use ultrawork mode';
960
- const primary = getPrimaryKeyword(text);
961
- expect(primary).not.toBeNull();
962
- expect(primary.type).toBe('ultrawork');
963
- expect(primary.keyword).toBe('ultrawork');
964
- });
965
- });
966
- describe('Edge Cases', () => {
967
- describe('Empty and null inputs', () => {
968
- it('should handle empty prompt parts', () => {
969
- expect(extractPromptText([])).toBe('');
970
- });
971
- it('should handle empty text in removeCodeBlocks', () => {
972
- expect(removeCodeBlocks('')).toBe('');
973
- });
974
- it('should handle empty text in detectKeywordsWithType', () => {
975
- expect(detectKeywordsWithType('')).toEqual([]);
976
- });
977
- it('should handle empty text in hasKeyword', () => {
978
- expect(hasKeyword('')).toBe(false);
979
- });
980
- it('should handle empty text in getPrimaryKeyword', () => {
981
- expect(getPrimaryKeyword('')).toBeNull();
982
- });
983
- });
984
- describe('Whitespace handling', () => {
985
- it('should detect keywords with extra whitespace', () => {
986
- const text = ' search the codebase ';
987
- expect(hasKeyword(text)).toBe(true);
988
- });
989
- it('should handle newlines and tabs', () => {
990
- const text = 'search\n\tthe\r\ncodebase';
991
- const detected = detectKeywordsWithType(text);
992
- expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
993
- });
994
- });
995
- describe('Unicode and special characters', () => {
996
- it('should handle unicode characters', () => {
997
- const text = 'search the codebase with émojis 🔍';
998
- expect(hasKeyword(text)).toBe(true);
999
- });
1000
- it('should handle mixed scripts', () => {
1001
- const text = 'Please search the codebase 搜索 искать';
1002
- const detected = detectKeywordsWithType(text);
1003
- expect(detected.some(d => d.type === 'deepsearch')).toBe(true);
1004
- });
1005
- });
1006
- describe('Very long inputs', () => {
1007
- it('should handle long text efficiently', () => {
1008
- const longText = 'plain text '.repeat(1000) + ' search the codebase';
1009
- expect(hasKeyword(longText)).toBe(true);
1010
- });
1011
- it('should handle many code blocks', () => {
1012
- const manyBlocks = '```code```\n'.repeat(100) + 'search the codebase';
1013
- const cleaned = removeCodeBlocks(manyBlocks);
1014
- expect(hasKeyword(cleaned)).toBe(true);
1015
- });
1016
- });
1017
- });
1018
- describe('UltraQA Loop', () => {
1019
- describe('State Management', () => {
1020
- it('should define valid UltraQA goal types', () => {
1021
- const validGoalTypes = ['tests', 'build', 'lint', 'typecheck', 'custom'];
1022
- validGoalTypes.forEach(goalType => {
1023
- expect(typeof goalType).toBe('string');
1024
- });
1025
- });
1026
- it('should have valid state structure', () => {
1027
- const state = {
1028
- active: true,
1029
- goal_type: 'tests',
1030
- goal_pattern: null,
1031
- cycle: 1,
1032
- max_cycles: 5,
1033
- failures: [],
1034
- started_at: new Date().toISOString(),
1035
- session_id: 'test-session'
1036
- };
1037
- expect(state.active).toBe(true);
1038
- expect(state.goal_type).toBe('tests');
1039
- expect(state.cycle).toBe(1);
1040
- expect(state.max_cycles).toBe(5);
1041
- expect(Array.isArray(state.failures)).toBe(true);
1042
- });
1043
- it('should track failure history', () => {
1044
- const failures = ['Error 1', 'Error 2', 'Error 1'];
1045
- expect(failures).toHaveLength(3);
1046
- expect(failures.filter(f => f === 'Error 1')).toHaveLength(2);
1047
- });
1048
- });
1049
- describe('Cycle Limits', () => {
1050
- it('should respect max cycles limit', () => {
1051
- const state = {
1052
- cycle: 5,
1053
- max_cycles: 5
1054
- };
1055
- expect(state.cycle).toBe(state.max_cycles);
1056
- expect(state.cycle <= state.max_cycles).toBe(true);
1057
- });
1058
- it('should allow incrementing cycles within limit', () => {
1059
- let cycle = 1;
1060
- const maxCycles = 5;
1061
- while (cycle < maxCycles) {
1062
- cycle++;
1063
- expect(cycle <= maxCycles).toBe(true);
1064
- }
1065
- expect(cycle).toBe(maxCycles);
1066
- });
1067
- });
1068
- describe('Result Types', () => {
1069
- it('should have valid success result', () => {
1070
- const result = {
1071
- success: true,
1072
- cycles: 3,
1073
- reason: 'goal_met'
1074
- };
1075
- expect(result.success).toBe(true);
1076
- expect(result.reason).toBe('goal_met');
1077
- });
1078
- it('should have valid failure result', () => {
1079
- const result = {
1080
- success: false,
1081
- cycles: 5,
1082
- reason: 'max_cycles',
1083
- diagnosis: 'Unable to fix recurring issue'
1084
- };
1085
- expect(result.success).toBe(false);
1086
- expect(result.reason).toBe('max_cycles');
1087
- expect(result.diagnosis).toBeDefined();
1088
- });
1089
- it('should detect same failure pattern', () => {
1090
- const failures = ['Error A', 'Error A', 'Error A'];
1091
- const allSame = failures.every(f => f === failures[0]);
1092
- expect(allSame).toBe(true);
1093
- });
1094
- });
1095
- describe('Goal Commands', () => {
1096
- it('should map goal types to commands', () => {
1097
- const goalCommands = {
1098
- tests: 'npm test',
1099
- build: 'npm run build',
1100
- lint: 'npm run lint',
1101
- typecheck: 'npm run typecheck || tsc --noEmit'
1102
- };
1103
- expect(goalCommands.tests).toBe('npm test');
1104
- expect(goalCommands.build).toBe('npm run build');
1105
- expect(goalCommands.lint).toBe('npm run lint');
1106
- });
1107
- });
1108
- describe('Progress Formatting', () => {
1109
- it('should format progress message', () => {
1110
- const cycle = 2;
1111
- const maxCycles = 5;
1112
- const status = 'Running tests...';
1113
- const message = `[ULTRAQA Cycle ${cycle}/${maxCycles}] ${status}`;
1114
- expect(message).toBe('[ULTRAQA Cycle 2/5] Running tests...');
1115
- expect(message).toContain('ULTRAQA');
1116
- expect(message).toContain(`${cycle}/${maxCycles}`);
1117
- });
1118
- });
1119
- });
1120
- describe('Persistent Mode - Max Attempts Counter', () => {
1121
- const testSessionId = 'test-session-123';
1122
- beforeEach(() => {
1123
- // Reset the counter before each test
1124
- resetTodoContinuationAttempts(testSessionId);
1125
- });
1126
- afterEach(() => {
1127
- // Clean up after each test
1128
- resetTodoContinuationAttempts(testSessionId);
1129
- });
1130
- it('should export resetTodoContinuationAttempts function', () => {
1131
- expect(typeof resetTodoContinuationAttempts).toBe('function');
1132
- });
1133
- it('should not throw when resetting non-existent session', () => {
1134
- expect(() => resetTodoContinuationAttempts('non-existent')).not.toThrow();
1135
- });
1136
- it('should allow resetting attempts multiple times', () => {
1137
- resetTodoContinuationAttempts(testSessionId);
1138
- resetTodoContinuationAttempts(testSessionId);
1139
- resetTodoContinuationAttempts(testSessionId);
1140
- // Should not throw
1141
- expect(true).toBe(true);
1142
- });
1143
- });
1144
- describe('Mutual Exclusion - UltraQA and Ralph', () => {
1145
- let testDir;
1146
- beforeEach(() => {
1147
- // Create a unique temp directory for each test
1148
- testDir = join(tmpdir(), `omc-test-${Date.now()}-${Math.random().toString(36).slice(2)}`);
1149
- mkdirSync(testDir, { recursive: true });
1150
- mkdirSync(join(testDir, '.omc'), { recursive: true });
1151
- mkdirSync(join(testDir, '.omc', 'state'), { recursive: true });
1152
- });
1153
- afterEach(() => {
1154
- // Clean up temp directory
1155
- try {
1156
- rmSync(testDir, { recursive: true, force: true });
1157
- }
1158
- catch {
1159
- // Ignore cleanup errors
1160
- }
1161
- });
1162
- describe('isUltraQAActive', () => {
1163
- it('should return false when no ultraqa state exists', () => {
1164
- expect(isUltraQAActive(testDir)).toBe(false);
1165
- });
1166
- it('should return true when ultraqa is active', () => {
1167
- const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
1168
- writeFileSync(stateFile, JSON.stringify({ active: true }));
1169
- expect(isUltraQAActive(testDir)).toBe(true);
1170
- });
1171
- it('should return false when ultraqa is not active', () => {
1172
- const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
1173
- writeFileSync(stateFile, JSON.stringify({ active: false }));
1174
- expect(isUltraQAActive(testDir)).toBe(false);
1175
- });
1176
- it('should return false for invalid JSON', () => {
1177
- const stateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
1178
- writeFileSync(stateFile, 'invalid json');
1179
- expect(isUltraQAActive(testDir)).toBe(false);
1180
- });
1181
- });
1182
- describe('isRalphLoopActive', () => {
1183
- it('should return false when no ralph state exists', () => {
1184
- expect(isRalphLoopActive(testDir)).toBe(false);
1185
- });
1186
- it('should return true when ralph is active', () => {
1187
- const stateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
1188
- writeFileSync(stateFile, JSON.stringify({ active: true }));
1189
- expect(isRalphLoopActive(testDir)).toBe(true);
1190
- });
1191
- it('should return false when ralph is not active', () => {
1192
- const stateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
1193
- writeFileSync(stateFile, JSON.stringify({ active: false }));
1194
- expect(isRalphLoopActive(testDir)).toBe(false);
1195
- });
1196
- });
1197
- describe('UltraQA mutual exclusion', () => {
1198
- it('should fail to start UltraQA when Ralph is active', () => {
1199
- // Activate Ralph first - write to session-scoped path since startUltraQA
1200
- // passes sessionId which makes readRalphState check session path only
1201
- const sessionDir = join(testDir, '.omc', 'state', 'sessions', 'test-session');
1202
- mkdirSync(sessionDir, { recursive: true });
1203
- const ralphStateFile = join(sessionDir, 'ralph-state.json');
1204
- writeFileSync(ralphStateFile, JSON.stringify({ active: true }));
1205
- // Try to start UltraQA
1206
- const result = startUltraQA(testDir, 'tests', 'test-session');
1207
- expect(result.success).toBe(false);
1208
- expect(result.error).toContain('Cannot start UltraQA while Ralph Loop is active');
1209
- });
1210
- it('should succeed starting UltraQA when Ralph is not active', () => {
1211
- const result = startUltraQA(testDir, 'tests', 'test-session');
1212
- expect(result.success).toBe(true);
1213
- expect(result.error).toBeUndefined();
1214
- // Clean up
1215
- clearUltraQAState(testDir);
1216
- });
1217
- it('should succeed starting UltraQA when ralph state exists but inactive', () => {
1218
- const ralphStateFile = join(testDir, '.omc', 'state', 'ralph-state.json');
1219
- writeFileSync(ralphStateFile, JSON.stringify({ active: false }));
1220
- const result = startUltraQA(testDir, 'tests', 'test-session');
1221
- expect(result.success).toBe(true);
1222
- // Clean up
1223
- clearUltraQAState(testDir);
1224
- });
1225
- });
1226
- describe('Ralph mutual exclusion', () => {
1227
- it('should fail to start Ralph when UltraQA is active', () => {
1228
- // Activate UltraQA first - write to session-scoped path since startLoop
1229
- // passes sessionId which makes isUltraQAActive check session path only
1230
- const sessionDir = join(testDir, '.omc', 'state', 'sessions', 'test-session');
1231
- mkdirSync(sessionDir, { recursive: true });
1232
- const ultraqaStateFile = join(sessionDir, 'ultraqa-state.json');
1233
- writeFileSync(ultraqaStateFile, JSON.stringify({ active: true }));
1234
- // Try to start Ralph
1235
- const hook = createRalphLoopHook(testDir);
1236
- const result = hook.startLoop('test-session', 'test prompt');
1237
- expect(result).toBe(false);
1238
- });
1239
- it('should succeed starting Ralph when UltraQA is not active', () => {
1240
- const hook = createRalphLoopHook(testDir);
1241
- const result = hook.startLoop('test-session', 'test prompt');
1242
- expect(result).toBe(true);
1243
- // Clean up
1244
- clearRalphState(testDir);
1245
- });
1246
- it('should succeed starting Ralph when ultraqa state exists but inactive', () => {
1247
- const ultraqaStateFile = join(testDir, '.omc', 'state', 'ultraqa-state.json');
1248
- writeFileSync(ultraqaStateFile, JSON.stringify({ active: false }));
1249
- const hook = createRalphLoopHook(testDir);
1250
- const result = hook.startLoop('test-session', 'test prompt');
1251
- expect(result).toBe(true);
1252
- // Clean up
1253
- clearRalphState(testDir);
1254
- });
1255
- });
1256
- describe('State cleanup', () => {
1257
- it('should clear UltraQA state properly', () => {
1258
- const result = startUltraQA(testDir, 'tests', 'test-session');
1259
- expect(result.success).toBe(true);
1260
- const cleared = clearUltraQAState(testDir);
1261
- expect(cleared).toBe(true);
1262
- expect(isRalphLoopActive(testDir)).toBe(false);
1263
- });
1264
- it('should clear Ralph state properly', () => {
1265
- const hook = createRalphLoopHook(testDir);
1266
- hook.startLoop('test-session', 'test prompt');
1267
- const cleared = clearRalphState(testDir);
1268
- expect(cleared).toBe(true);
1269
- expect(isUltraQAActive(testDir)).toBe(false);
1270
- });
1271
- });
1272
- });
1273
- //# sourceMappingURL=hooks.test.js.map