oh-my-claude-sisyphus 3.7.0 → 3.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +24 -1
  2. package/commands/hud.md +37 -5
  3. package/commands/omc-setup.md +105 -0
  4. package/dist/__tests__/compatibility-security.test.d.ts +13 -0
  5. package/dist/__tests__/compatibility-security.test.d.ts.map +1 -0
  6. package/dist/__tests__/compatibility-security.test.js +403 -0
  7. package/dist/__tests__/compatibility-security.test.js.map +1 -0
  8. package/dist/__tests__/compatibility.test.d.ts +7 -0
  9. package/dist/__tests__/compatibility.test.d.ts.map +1 -0
  10. package/dist/__tests__/compatibility.test.js +484 -0
  11. package/dist/__tests__/compatibility.test.js.map +1 -0
  12. package/dist/__tests__/hud/analytics-display.test.js +141 -1
  13. package/dist/__tests__/hud/analytics-display.test.js.map +1 -1
  14. package/dist/__tests__/hud-windows.test.d.ts +2 -0
  15. package/dist/__tests__/hud-windows.test.d.ts.map +1 -0
  16. package/dist/__tests__/hud-windows.test.js +91 -0
  17. package/dist/__tests__/hud-windows.test.js.map +1 -0
  18. package/dist/cli/analytics.js +0 -0
  19. package/dist/cli/index.js +0 -0
  20. package/dist/compatibility/discovery.d.ts +58 -0
  21. package/dist/compatibility/discovery.d.ts.map +1 -0
  22. package/dist/compatibility/discovery.js +619 -0
  23. package/dist/compatibility/discovery.js.map +1 -0
  24. package/dist/compatibility/index.d.ts +51 -0
  25. package/dist/compatibility/index.d.ts.map +1 -0
  26. package/dist/compatibility/index.js +72 -0
  27. package/dist/compatibility/index.js.map +1 -0
  28. package/dist/compatibility/mcp-bridge.d.ts +138 -0
  29. package/dist/compatibility/mcp-bridge.d.ts.map +1 -0
  30. package/dist/compatibility/mcp-bridge.js +524 -0
  31. package/dist/compatibility/mcp-bridge.js.map +1 -0
  32. package/dist/compatibility/permission-adapter.d.ts +79 -0
  33. package/dist/compatibility/permission-adapter.d.ts.map +1 -0
  34. package/dist/compatibility/permission-adapter.js +369 -0
  35. package/dist/compatibility/permission-adapter.js.map +1 -0
  36. package/dist/compatibility/registry.d.ts +161 -0
  37. package/dist/compatibility/registry.d.ts.map +1 -0
  38. package/dist/compatibility/registry.js +389 -0
  39. package/dist/compatibility/registry.js.map +1 -0
  40. package/dist/compatibility/types.d.ts +249 -0
  41. package/dist/compatibility/types.d.ts.map +1 -0
  42. package/dist/compatibility/types.js +8 -0
  43. package/dist/compatibility/types.js.map +1 -0
  44. package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
  45. package/dist/features/rate-limit-wait/daemon.js +44 -1
  46. package/dist/features/rate-limit-wait/daemon.js.map +1 -1
  47. package/dist/features/state-manager/index.d.ts.map +1 -1
  48. package/dist/features/state-manager/index.js +4 -1
  49. package/dist/features/state-manager/index.js.map +1 -1
  50. package/dist/hooks/permission-handler/__tests__/index.test.js +47 -0
  51. package/dist/hooks/permission-handler/__tests__/index.test.js.map +1 -1
  52. package/dist/hooks/permission-handler/index.d.ts +1 -1
  53. package/dist/hooks/permission-handler/index.d.ts.map +1 -1
  54. package/dist/hooks/permission-handler/index.js +11 -15
  55. package/dist/hooks/permission-handler/index.js.map +1 -1
  56. package/dist/hooks/plugin-patterns/index.d.ts +5 -0
  57. package/dist/hooks/plugin-patterns/index.d.ts.map +1 -1
  58. package/dist/hooks/plugin-patterns/index.js +26 -1
  59. package/dist/hooks/plugin-patterns/index.js.map +1 -1
  60. package/dist/hooks/session-end/index.d.ts +0 -8
  61. package/dist/hooks/session-end/index.d.ts.map +1 -1
  62. package/dist/hooks/session-end/index.js +5 -12
  63. package/dist/hooks/session-end/index.js.map +1 -1
  64. package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
  65. package/dist/hooks/subagent-tracker/index.js +32 -17
  66. package/dist/hooks/subagent-tracker/index.js.map +1 -1
  67. package/dist/hud/analytics-display.d.ts +17 -1
  68. package/dist/hud/analytics-display.d.ts.map +1 -1
  69. package/dist/hud/analytics-display.js +55 -12
  70. package/dist/hud/analytics-display.js.map +1 -1
  71. package/dist/hud/render.d.ts.map +1 -1
  72. package/dist/hud/render.js +49 -18
  73. package/dist/hud/render.js.map +1 -1
  74. package/dist/hud/types.d.ts +2 -0
  75. package/dist/hud/types.d.ts.map +1 -1
  76. package/dist/hud/types.js +14 -0
  77. package/dist/hud/types.js.map +1 -1
  78. package/dist/installer/index.d.ts.map +1 -1
  79. package/dist/installer/index.js +3 -2
  80. package/dist/installer/index.js.map +1 -1
  81. package/docs/COMPATIBILITY.md +1051 -0
  82. package/hooks/keyword-detector.sh +4 -4
  83. package/hooks/persistent-mode.sh +10 -10
  84. package/hooks/session-start.sh +4 -4
  85. package/package.json +3 -1
  86. package/scripts/keyword-detector.mjs +4 -4
  87. package/scripts/persistent-mode.mjs +6 -6
  88. package/scripts/persistent-mode.sh +10 -10
  89. package/scripts/session-start.mjs +4 -4
  90. package/skills/hud/SKILL.md +37 -5
  91. package/skills/omc-setup/SKILL.md +162 -4
  92. package/skills/writer-memory/SKILL.md +443 -0
  93. package/skills/writer-memory/lib/character-tracker.ts +338 -0
  94. package/skills/writer-memory/lib/memory-manager.ts +804 -0
  95. package/skills/writer-memory/lib/relationship-graph.ts +400 -0
  96. package/skills/writer-memory/lib/scene-organizer.ts +544 -0
  97. package/skills/writer-memory/lib/synopsis-builder.ts +339 -0
  98. package/skills/writer-memory/templates/synopsis-template.md +46 -0
  99. package/templates/hooks/keyword-detector.sh +4 -4
  100. package/templates/hooks/persistent-mode.sh +10 -10
  101. package/templates/hooks/session-start.sh +4 -4
  102. package/dist/__tests__/analytics/analytics-summary.test.d.ts +0 -2
  103. package/dist/__tests__/analytics/analytics-summary.test.d.ts.map +0 -1
  104. package/dist/__tests__/analytics/analytics-summary.test.js +0 -267
  105. package/dist/__tests__/analytics/analytics-summary.test.js.map +0 -1
  106. package/dist/__tests__/analytics/cost-estimator.test.d.ts +0 -2
  107. package/dist/__tests__/analytics/cost-estimator.test.d.ts.map +0 -1
  108. package/dist/__tests__/analytics/cost-estimator.test.js +0 -212
  109. package/dist/__tests__/analytics/cost-estimator.test.js.map +0 -1
  110. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts +0 -7
  111. package/dist/__tests__/hooks/auto-slash-command/executor.test.d.ts.map +0 -1
  112. package/dist/__tests__/hooks/auto-slash-command/executor.test.js +0 -374
  113. package/dist/__tests__/hooks/auto-slash-command/executor.test.js.map +0 -1
  114. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts +0 -2
  115. package/dist/__tests__/hud/auto-tracking.integration.test.d.ts.map +0 -1
  116. package/dist/__tests__/hud/auto-tracking.integration.test.js +0 -12
  117. package/dist/__tests__/hud/auto-tracking.integration.test.js.map +0 -1
  118. package/dist/__tests__/learned-skills/config.test.d.ts +0 -2
  119. package/dist/__tests__/learned-skills/config.test.d.ts.map +0 -1
  120. package/dist/__tests__/learned-skills/config.test.js +0 -37
  121. package/dist/__tests__/learned-skills/config.test.js.map +0 -1
  122. package/dist/__tests__/learned-skills/detector.test.d.ts +0 -2
  123. package/dist/__tests__/learned-skills/detector.test.d.ts.map +0 -1
  124. package/dist/__tests__/learned-skills/detector.test.js +0 -99
  125. package/dist/__tests__/learned-skills/detector.test.js.map +0 -1
  126. package/dist/__tests__/learned-skills/finder.test.d.ts +0 -2
  127. package/dist/__tests__/learned-skills/finder.test.d.ts.map +0 -1
  128. package/dist/__tests__/learned-skills/finder.test.js +0 -59
  129. package/dist/__tests__/learned-skills/finder.test.js.map +0 -1
  130. package/dist/__tests__/learned-skills/loader.test.d.ts +0 -2
  131. package/dist/__tests__/learned-skills/loader.test.d.ts.map +0 -1
  132. package/dist/__tests__/learned-skills/loader.test.js +0 -69
  133. package/dist/__tests__/learned-skills/loader.test.js.map +0 -1
  134. package/dist/__tests__/learned-skills/parser.test.d.ts +0 -2
  135. package/dist/__tests__/learned-skills/parser.test.d.ts.map +0 -1
  136. package/dist/__tests__/learned-skills/parser.test.js +0 -81
  137. package/dist/__tests__/learned-skills/parser.test.js.map +0 -1
  138. package/dist/__tests__/learned-skills/validator.test.d.ts +0 -2
  139. package/dist/__tests__/learned-skills/validator.test.d.ts.map +0 -1
  140. package/dist/__tests__/learned-skills/validator.test.js +0 -85
  141. package/dist/__tests__/learned-skills/validator.test.js.map +0 -1
  142. package/dist/agents/codex-agents.d.ts +0 -20
  143. package/dist/agents/codex-agents.d.ts.map +0 -1
  144. package/dist/agents/codex-agents.js +0 -36
  145. package/dist/agents/codex-agents.js.map +0 -1
  146. package/dist/agents/document-writer.d.ts +0 -11
  147. package/dist/agents/document-writer.d.ts.map +0 -1
  148. package/dist/agents/document-writer.js +0 -209
  149. package/dist/agents/document-writer.js.map +0 -1
  150. package/dist/agents/frontend-engineer.d.ts +0 -11
  151. package/dist/agents/frontend-engineer.d.ts.map +0 -1
  152. package/dist/agents/frontend-engineer.js +0 -115
  153. package/dist/agents/frontend-engineer.js.map +0 -1
  154. package/dist/agents/librarian.d.ts +0 -12
  155. package/dist/agents/librarian.d.ts.map +0 -1
  156. package/dist/agents/librarian.js +0 -103
  157. package/dist/agents/librarian.js.map +0 -1
  158. package/dist/agents/metis.d.ts +0 -12
  159. package/dist/agents/metis.d.ts.map +0 -1
  160. package/dist/agents/metis.js +0 -117
  161. package/dist/agents/metis.js.map +0 -1
  162. package/dist/agents/momus.d.ts +0 -12
  163. package/dist/agents/momus.d.ts.map +0 -1
  164. package/dist/agents/momus.js +0 -128
  165. package/dist/agents/momus.js.map +0 -1
  166. package/dist/agents/multimodal-looker.d.ts +0 -11
  167. package/dist/agents/multimodal-looker.d.ts.map +0 -1
  168. package/dist/agents/multimodal-looker.js +0 -70
  169. package/dist/agents/multimodal-looker.js.map +0 -1
  170. package/dist/agents/oracle.d.ts +0 -13
  171. package/dist/agents/oracle.d.ts.map +0 -1
  172. package/dist/agents/oracle.js +0 -191
  173. package/dist/agents/oracle.js.map +0 -1
  174. package/dist/agents/orchestrator-sisyphus.d.ts +0 -11
  175. package/dist/agents/orchestrator-sisyphus.d.ts.map +0 -1
  176. package/dist/agents/orchestrator-sisyphus.js +0 -115
  177. package/dist/agents/orchestrator-sisyphus.js.map +0 -1
  178. package/dist/agents/prometheus.d.ts +0 -12
  179. package/dist/agents/prometheus.d.ts.map +0 -1
  180. package/dist/agents/prometheus.js +0 -195
  181. package/dist/agents/prometheus.js.map +0 -1
  182. package/dist/agents/sisyphus-junior.d.ts +0 -12
  183. package/dist/agents/sisyphus-junior.d.ts.map +0 -1
  184. package/dist/agents/sisyphus-junior.js +0 -93
  185. package/dist/agents/sisyphus-junior.js.map +0 -1
  186. package/dist/cli/components/CostDashboard.d.ts +0 -15
  187. package/dist/cli/components/CostDashboard.d.ts.map +0 -1
  188. package/dist/cli/components/CostDashboard.js +0 -15
  189. package/dist/cli/components/CostDashboard.js.map +0 -1
  190. package/dist/cli/components/LiveStats.d.ts +0 -16
  191. package/dist/cli/components/LiveStats.d.ts.map +0 -1
  192. package/dist/cli/components/LiveStats.js +0 -16
  193. package/dist/cli/components/LiveStats.js.map +0 -1
  194. package/dist/cli/components/SessionBrowser.d.ts +0 -14
  195. package/dist/cli/components/SessionBrowser.d.ts.map +0 -1
  196. package/dist/cli/components/SessionBrowser.js +0 -14
  197. package/dist/cli/components/SessionBrowser.js.map +0 -1
  198. package/dist/cli/tui.d.ts +0 -21
  199. package/dist/cli/tui.d.ts.map +0 -1
  200. package/dist/cli/tui.js +0 -21
  201. package/dist/cli/tui.js.map +0 -1
  202. package/dist/hooks/autopilot/signals.d.ts +0 -20
  203. package/dist/hooks/autopilot/signals.d.ts.map +0 -1
  204. package/dist/hooks/autopilot/signals.js +0 -75
  205. package/dist/hooks/autopilot/signals.js.map +0 -1
  206. package/dist/hooks/autopilot/summary.d.ts +0 -27
  207. package/dist/hooks/autopilot/summary.d.ts.map +0 -1
  208. package/dist/hooks/autopilot/summary.js +0 -160
  209. package/dist/hooks/autopilot/summary.js.map +0 -1
  210. package/dist/hooks/autopilot/transition.d.ts +0 -39
  211. package/dist/hooks/autopilot/transition.d.ts.map +0 -1
  212. package/dist/hooks/autopilot/transition.js +0 -216
  213. package/dist/hooks/autopilot/transition.js.map +0 -1
  214. package/dist/hooks/context-window-limit-recovery/constants.d.ts +0 -28
  215. package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +0 -1
  216. package/dist/hooks/context-window-limit-recovery/constants.js +0 -85
  217. package/dist/hooks/context-window-limit-recovery/constants.js.map +0 -1
  218. package/dist/hooks/context-window-limit-recovery/index.d.ts +0 -62
  219. package/dist/hooks/context-window-limit-recovery/index.d.ts.map +0 -1
  220. package/dist/hooks/context-window-limit-recovery/index.js +0 -201
  221. package/dist/hooks/context-window-limit-recovery/index.js.map +0 -1
  222. package/dist/hooks/context-window-limit-recovery/parser.d.ts +0 -31
  223. package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +0 -1
  224. package/dist/hooks/context-window-limit-recovery/parser.js +0 -241
  225. package/dist/hooks/context-window-limit-recovery/parser.js.map +0 -1
  226. package/dist/hooks/context-window-limit-recovery/types.d.ts +0 -84
  227. package/dist/hooks/context-window-limit-recovery/types.d.ts.map +0 -1
  228. package/dist/hooks/context-window-limit-recovery/types.js +0 -34
  229. package/dist/hooks/context-window-limit-recovery/types.js.map +0 -1
  230. package/dist/hooks/edit-error-recovery/index.d.ts +0 -62
  231. package/dist/hooks/edit-error-recovery/index.d.ts.map +0 -1
  232. package/dist/hooks/edit-error-recovery/index.js +0 -89
  233. package/dist/hooks/edit-error-recovery/index.js.map +0 -1
  234. package/dist/hooks/learned-skills/config.d.ts +0 -53
  235. package/dist/hooks/learned-skills/config.d.ts.map +0 -1
  236. package/dist/hooks/learned-skills/config.js +0 -103
  237. package/dist/hooks/learned-skills/config.js.map +0 -1
  238. package/dist/hooks/learned-skills/constants.d.ts +0 -24
  239. package/dist/hooks/learned-skills/constants.d.ts.map +0 -1
  240. package/dist/hooks/learned-skills/constants.js +0 -26
  241. package/dist/hooks/learned-skills/constants.js.map +0 -1
  242. package/dist/hooks/learned-skills/detection-hook.d.ts +0 -39
  243. package/dist/hooks/learned-skills/detection-hook.d.ts.map +0 -1
  244. package/dist/hooks/learned-skills/detection-hook.js +0 -83
  245. package/dist/hooks/learned-skills/detection-hook.js.map +0 -1
  246. package/dist/hooks/learned-skills/detector.d.ts +0 -30
  247. package/dist/hooks/learned-skills/detector.d.ts.map +0 -1
  248. package/dist/hooks/learned-skills/detector.js +0 -150
  249. package/dist/hooks/learned-skills/detector.js.map +0 -1
  250. package/dist/hooks/learned-skills/finder.d.ts +0 -21
  251. package/dist/hooks/learned-skills/finder.d.ts.map +0 -1
  252. package/dist/hooks/learned-skills/finder.js +0 -117
  253. package/dist/hooks/learned-skills/finder.js.map +0 -1
  254. package/dist/hooks/learned-skills/index.d.ts +0 -62
  255. package/dist/hooks/learned-skills/index.d.ts.map +0 -1
  256. package/dist/hooks/learned-skills/index.js +0 -137
  257. package/dist/hooks/learned-skills/index.js.map +0 -1
  258. package/dist/hooks/learned-skills/loader.d.ts +0 -20
  259. package/dist/hooks/learned-skills/loader.d.ts.map +0 -1
  260. package/dist/hooks/learned-skills/loader.js +0 -107
  261. package/dist/hooks/learned-skills/loader.js.map +0 -1
  262. package/dist/hooks/learned-skills/parser.d.ts +0 -21
  263. package/dist/hooks/learned-skills/parser.d.ts.map +0 -1
  264. package/dist/hooks/learned-skills/parser.js +0 -190
  265. package/dist/hooks/learned-skills/parser.js.map +0 -1
  266. package/dist/hooks/learned-skills/promotion.d.ts +0 -29
  267. package/dist/hooks/learned-skills/promotion.d.ts.map +0 -1
  268. package/dist/hooks/learned-skills/promotion.js +0 -87
  269. package/dist/hooks/learned-skills/promotion.js.map +0 -1
  270. package/dist/hooks/learned-skills/types.d.ts +0 -109
  271. package/dist/hooks/learned-skills/types.d.ts.map +0 -1
  272. package/dist/hooks/learned-skills/types.js +0 -8
  273. package/dist/hooks/learned-skills/types.js.map +0 -1
  274. package/dist/hooks/learned-skills/validator.d.ts +0 -15
  275. package/dist/hooks/learned-skills/validator.d.ts.map +0 -1
  276. package/dist/hooks/learned-skills/validator.js +0 -87
  277. package/dist/hooks/learned-skills/validator.js.map +0 -1
  278. package/dist/hooks/learned-skills/writer.d.ts +0 -27
  279. package/dist/hooks/learned-skills/writer.d.ts.map +0 -1
  280. package/dist/hooks/learned-skills/writer.js +0 -126
  281. package/dist/hooks/learned-skills/writer.js.map +0 -1
  282. package/dist/hooks/mnemosyne/config.d.ts +0 -53
  283. package/dist/hooks/mnemosyne/config.d.ts.map +0 -1
  284. package/dist/hooks/mnemosyne/config.js +0 -103
  285. package/dist/hooks/mnemosyne/config.js.map +0 -1
  286. package/dist/hooks/mnemosyne/constants.d.ts +0 -24
  287. package/dist/hooks/mnemosyne/constants.d.ts.map +0 -1
  288. package/dist/hooks/mnemosyne/constants.js +0 -26
  289. package/dist/hooks/mnemosyne/constants.js.map +0 -1
  290. package/dist/hooks/mnemosyne/detection-hook.d.ts +0 -39
  291. package/dist/hooks/mnemosyne/detection-hook.d.ts.map +0 -1
  292. package/dist/hooks/mnemosyne/detection-hook.js +0 -83
  293. package/dist/hooks/mnemosyne/detection-hook.js.map +0 -1
  294. package/dist/hooks/mnemosyne/detector.d.ts +0 -30
  295. package/dist/hooks/mnemosyne/detector.d.ts.map +0 -1
  296. package/dist/hooks/mnemosyne/detector.js +0 -150
  297. package/dist/hooks/mnemosyne/detector.js.map +0 -1
  298. package/dist/hooks/mnemosyne/finder.d.ts +0 -21
  299. package/dist/hooks/mnemosyne/finder.d.ts.map +0 -1
  300. package/dist/hooks/mnemosyne/finder.js +0 -117
  301. package/dist/hooks/mnemosyne/finder.js.map +0 -1
  302. package/dist/hooks/mnemosyne/index.d.ts +0 -62
  303. package/dist/hooks/mnemosyne/index.d.ts.map +0 -1
  304. package/dist/hooks/mnemosyne/index.js +0 -137
  305. package/dist/hooks/mnemosyne/index.js.map +0 -1
  306. package/dist/hooks/mnemosyne/loader.d.ts +0 -20
  307. package/dist/hooks/mnemosyne/loader.d.ts.map +0 -1
  308. package/dist/hooks/mnemosyne/loader.js +0 -113
  309. package/dist/hooks/mnemosyne/loader.js.map +0 -1
  310. package/dist/hooks/mnemosyne/parser.d.ts +0 -21
  311. package/dist/hooks/mnemosyne/parser.d.ts.map +0 -1
  312. package/dist/hooks/mnemosyne/parser.js +0 -190
  313. package/dist/hooks/mnemosyne/parser.js.map +0 -1
  314. package/dist/hooks/mnemosyne/promotion.d.ts +0 -29
  315. package/dist/hooks/mnemosyne/promotion.d.ts.map +0 -1
  316. package/dist/hooks/mnemosyne/promotion.js +0 -87
  317. package/dist/hooks/mnemosyne/promotion.js.map +0 -1
  318. package/dist/hooks/mnemosyne/types.d.ts +0 -109
  319. package/dist/hooks/mnemosyne/types.d.ts.map +0 -1
  320. package/dist/hooks/mnemosyne/types.js +0 -8
  321. package/dist/hooks/mnemosyne/types.js.map +0 -1
  322. package/dist/hooks/mnemosyne/validator.d.ts +0 -15
  323. package/dist/hooks/mnemosyne/validator.d.ts.map +0 -1
  324. package/dist/hooks/mnemosyne/validator.js +0 -87
  325. package/dist/hooks/mnemosyne/validator.js.map +0 -1
  326. package/dist/hooks/mnemosyne/writer.d.ts +0 -27
  327. package/dist/hooks/mnemosyne/writer.d.ts.map +0 -1
  328. package/dist/hooks/mnemosyne/writer.js +0 -126
  329. package/dist/hooks/mnemosyne/writer.js.map +0 -1
  330. package/dist/hooks/ralph-loop/index.d.ts +0 -116
  331. package/dist/hooks/ralph-loop/index.d.ts.map +0 -1
  332. package/dist/hooks/ralph-loop/index.js +0 -322
  333. package/dist/hooks/ralph-loop/index.js.map +0 -1
  334. package/dist/hooks/ralph-prd/index.d.ts +0 -130
  335. package/dist/hooks/ralph-prd/index.d.ts.map +0 -1
  336. package/dist/hooks/ralph-prd/index.js +0 -310
  337. package/dist/hooks/ralph-prd/index.js.map +0 -1
  338. package/dist/hooks/ralph-progress/index.d.ts +0 -102
  339. package/dist/hooks/ralph-progress/index.d.ts.map +0 -1
  340. package/dist/hooks/ralph-progress/index.js +0 -408
  341. package/dist/hooks/ralph-progress/index.js.map +0 -1
  342. package/dist/hooks/ralph-verifier/index.d.ts +0 -72
  343. package/dist/hooks/ralph-verifier/index.d.ts.map +0 -1
  344. package/dist/hooks/ralph-verifier/index.js +0 -223
  345. package/dist/hooks/ralph-verifier/index.js.map +0 -1
  346. package/dist/hooks/session-recovery/constants.d.ts +0 -56
  347. package/dist/hooks/session-recovery/constants.d.ts.map +0 -1
  348. package/dist/hooks/session-recovery/constants.js +0 -78
  349. package/dist/hooks/session-recovery/constants.js.map +0 -1
  350. package/dist/hooks/session-recovery/index.d.ts +0 -53
  351. package/dist/hooks/session-recovery/index.d.ts.map +0 -1
  352. package/dist/hooks/session-recovery/index.js +0 -321
  353. package/dist/hooks/session-recovery/index.js.map +0 -1
  354. package/dist/hooks/session-recovery/storage.d.ts +0 -76
  355. package/dist/hooks/session-recovery/storage.d.ts.map +0 -1
  356. package/dist/hooks/session-recovery/storage.js +0 -383
  357. package/dist/hooks/session-recovery/storage.js.map +0 -1
  358. package/dist/hooks/session-recovery/types.d.ts +0 -145
  359. package/dist/hooks/session-recovery/types.d.ts.map +0 -1
  360. package/dist/hooks/session-recovery/types.js +0 -8
  361. package/dist/hooks/session-recovery/types.js.map +0 -1
  362. package/dist/hooks/sisyphus-orchestrator/constants.d.ts +0 -23
  363. package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +0 -1
  364. package/dist/hooks/sisyphus-orchestrator/constants.js +0 -142
  365. package/dist/hooks/sisyphus-orchestrator/constants.js.map +0 -1
  366. package/dist/hooks/sisyphus-orchestrator/index.d.ts +0 -113
  367. package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +0 -1
  368. package/dist/hooks/sisyphus-orchestrator/index.js +0 -309
  369. package/dist/hooks/sisyphus-orchestrator/index.js.map +0 -1
  370. package/dist/hooks/ultraqa-loop/index.d.ts +0 -94
  371. package/dist/hooks/ultraqa-loop/index.d.ts.map +0 -1
  372. package/dist/hooks/ultraqa-loop/index.js +0 -216
  373. package/dist/hooks/ultraqa-loop/index.js.map +0 -1
  374. package/dist/hooks/ultrawork-state/index.d.ts +0 -62
  375. package/dist/hooks/ultrawork-state/index.d.ts.map +0 -1
  376. package/dist/hooks/ultrawork-state/index.js +0 -208
  377. package/dist/hooks/ultrawork-state/index.js.map +0 -1
  378. package/dist/hud/sisyphus-state.d.ts +0 -31
  379. package/dist/hud/sisyphus-state.d.ts.map +0 -1
  380. package/dist/hud/sisyphus-state.js +0 -163
  381. package/dist/hud/sisyphus-state.js.map +0 -1
@@ -1,322 +0,0 @@
1
- /**
2
- * Ralph Hook
3
- *
4
- * Self-referential work loop that continues until a completion promise is detected.
5
- * Named after the character who keeps working until the job is done.
6
- *
7
- * Enhanced with PRD (Product Requirements Document) support for structured task tracking.
8
- * When a prd.json exists, completion is based on all stories having passes: true.
9
- *
10
- * Ported from oh-my-opencode's ralph hook.
11
- */
12
- import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync } from 'fs';
13
- import { join } from 'path';
14
- import { homedir } from 'os';
15
- import { readPrd, getPrdStatus, formatNextStoryPrompt, formatPrdStatus } from '../ralph-prd/index.js';
16
- import { getProgressContext, appendProgress, initProgress, addPattern } from '../ralph-progress/index.js';
17
- import { readUltraworkState as readUltraworkStateFromModule, writeUltraworkState as writeUltraworkStateFromModule } from '../ultrawork-state/index.js';
18
- // Forward declaration to avoid circular import - check ultraqa state file directly
19
- export function isUltraQAActive(directory) {
20
- const omcDir = join(directory, '.omc');
21
- const stateFile = join(omcDir, 'ultraqa-state.json');
22
- if (!existsSync(stateFile)) {
23
- return false;
24
- }
25
- try {
26
- const content = readFileSync(stateFile, 'utf-8');
27
- const state = JSON.parse(content);
28
- return state && state.active === true;
29
- }
30
- catch {
31
- return false;
32
- }
33
- }
34
- const DEFAULT_MAX_ITERATIONS = 10;
35
- const DEFAULT_COMPLETION_PROMISE = 'TASK_COMPLETE';
36
- /**
37
- * Get the state file path for Ralph Loop
38
- */
39
- function getStateFilePath(directory) {
40
- const omcDir = join(directory, '.omc');
41
- return join(omcDir, 'ralph-state.json');
42
- }
43
- /**
44
- * Ensure the .omc directory exists
45
- */
46
- function ensureStateDir(directory) {
47
- const omcDir = join(directory, '.omc');
48
- if (!existsSync(omcDir)) {
49
- mkdirSync(omcDir, { recursive: true });
50
- }
51
- }
52
- /**
53
- * Read Ralph Loop state from disk
54
- */
55
- export function readRalphState(directory) {
56
- const stateFile = getStateFilePath(directory);
57
- if (!existsSync(stateFile)) {
58
- return null;
59
- }
60
- try {
61
- const content = readFileSync(stateFile, 'utf-8');
62
- return JSON.parse(content);
63
- }
64
- catch {
65
- return null;
66
- }
67
- }
68
- /**
69
- * Write Ralph Loop state to disk
70
- */
71
- export function writeRalphState(directory, state) {
72
- try {
73
- ensureStateDir(directory);
74
- const stateFile = getStateFilePath(directory);
75
- writeFileSync(stateFile, JSON.stringify(state, null, 2));
76
- return true;
77
- }
78
- catch {
79
- return false;
80
- }
81
- }
82
- /**
83
- * Clear Ralph Loop state
84
- */
85
- export function clearRalphState(directory) {
86
- const stateFile = getStateFilePath(directory);
87
- if (!existsSync(stateFile)) {
88
- return true;
89
- }
90
- try {
91
- unlinkSync(stateFile);
92
- return true;
93
- }
94
- catch {
95
- return false;
96
- }
97
- }
98
- /**
99
- * Clear ultrawork state (only if linked to ralph)
100
- */
101
- export function clearLinkedUltraworkState(directory) {
102
- const state = readUltraworkStateFromModule(directory);
103
- // Only clear if it was linked to ralph (auto-activated)
104
- if (!state || !state.linked_to_ralph) {
105
- return true;
106
- }
107
- const omcDir = join(directory, '.omc');
108
- const stateFile = join(omcDir, 'ultrawork-state.json');
109
- try {
110
- unlinkSync(stateFile);
111
- return true;
112
- }
113
- catch {
114
- return false;
115
- }
116
- }
117
- /**
118
- * Increment Ralph Loop iteration
119
- */
120
- export function incrementRalphIteration(directory) {
121
- const state = readRalphState(directory);
122
- if (!state || !state.active) {
123
- return null;
124
- }
125
- state.iteration += 1;
126
- if (writeRalphState(directory, state)) {
127
- return state;
128
- }
129
- return null;
130
- }
131
- /**
132
- * Detect completion promise in session transcript
133
- */
134
- export function detectCompletionPromise(sessionId, promise) {
135
- // Try to find transcript in Claude's session directory
136
- const claudeDir = join(homedir(), '.claude');
137
- const possiblePaths = [
138
- join(claudeDir, 'sessions', sessionId, 'transcript.md'),
139
- join(claudeDir, 'sessions', sessionId, 'messages.json'),
140
- join(claudeDir, 'transcripts', `${sessionId}.md`)
141
- ];
142
- for (const transcriptPath of possiblePaths) {
143
- if (existsSync(transcriptPath)) {
144
- try {
145
- const content = readFileSync(transcriptPath, 'utf-8');
146
- const pattern = new RegExp(`<promise>\\s*${escapeRegex(promise)}\\s*</promise>`, 'is');
147
- if (pattern.test(content)) {
148
- return true;
149
- }
150
- }
151
- catch {
152
- continue;
153
- }
154
- }
155
- }
156
- return false;
157
- }
158
- /**
159
- * Escape regex special characters
160
- */
161
- function escapeRegex(str) {
162
- return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
163
- }
164
- /**
165
- * Create a Ralph Loop hook instance
166
- */
167
- export function createRalphLoopHook(directory) {
168
- const startLoop = (sessionId, prompt, options) => {
169
- // Mutual exclusion check: cannot start Ralph Loop if UltraQA is active
170
- if (isUltraQAActive(directory)) {
171
- console.error('Cannot start Ralph Loop while UltraQA is active. Cancel UltraQA first with /oh-my-claudecode:cancel-ultraqa.');
172
- return false;
173
- }
174
- const enableUltrawork = !options?.disableUltrawork;
175
- const now = new Date().toISOString();
176
- const state = {
177
- active: true,
178
- iteration: 1,
179
- max_iterations: options?.maxIterations ?? DEFAULT_MAX_ITERATIONS,
180
- completion_promise: options?.completionPromise ?? DEFAULT_COMPLETION_PROMISE,
181
- started_at: now,
182
- prompt,
183
- session_id: sessionId,
184
- linked_ultrawork: enableUltrawork
185
- };
186
- const ralphSuccess = writeRalphState(directory, state);
187
- // Auto-activate ultrawork (linked to ralph) by default
188
- if (ralphSuccess && enableUltrawork) {
189
- const ultraworkState = {
190
- active: true,
191
- reinforcement_count: 0,
192
- original_prompt: prompt,
193
- started_at: now,
194
- last_checked_at: now,
195
- linked_to_ralph: true
196
- };
197
- writeUltraworkStateFromModule(ultraworkState, directory);
198
- }
199
- return ralphSuccess;
200
- };
201
- const cancelLoop = (sessionId) => {
202
- const state = readRalphState(directory);
203
- if (!state || state.session_id !== sessionId) {
204
- return false;
205
- }
206
- // Also clear linked ultrawork state if it was auto-activated
207
- if (state.linked_ultrawork) {
208
- clearLinkedUltraworkState(directory);
209
- }
210
- return clearRalphState(directory);
211
- };
212
- const getState = () => {
213
- return readRalphState(directory);
214
- };
215
- return {
216
- startLoop,
217
- cancelLoop,
218
- getState
219
- };
220
- }
221
- // ============================================================================
222
- // PRD Integration
223
- // ============================================================================
224
- /**
225
- * Check if PRD mode is available (prd.json exists)
226
- */
227
- export function hasPrd(directory) {
228
- const prd = readPrd(directory);
229
- return prd !== null;
230
- }
231
- /**
232
- * Get PRD completion status for ralph
233
- */
234
- export function getPrdCompletionStatus(directory) {
235
- const prd = readPrd(directory);
236
- if (!prd) {
237
- return {
238
- hasPrd: false,
239
- allComplete: false,
240
- status: null,
241
- nextStory: null
242
- };
243
- }
244
- const status = getPrdStatus(prd);
245
- return {
246
- hasPrd: true,
247
- allComplete: status.allComplete,
248
- status,
249
- nextStory: status.nextStory
250
- };
251
- }
252
- /**
253
- * Get context injection for ralph continuation
254
- * Includes PRD current story and progress memory
255
- */
256
- export function getRalphContext(directory) {
257
- const parts = [];
258
- // Add progress context (patterns, learnings)
259
- const progressContext = getProgressContext(directory);
260
- if (progressContext) {
261
- parts.push(progressContext);
262
- }
263
- // Add current story from PRD
264
- const prdStatus = getPrdCompletionStatus(directory);
265
- if (prdStatus.hasPrd && prdStatus.nextStory) {
266
- parts.push(formatNextStoryPrompt(prdStatus.nextStory));
267
- }
268
- // Add PRD status summary
269
- if (prdStatus.status) {
270
- parts.push(`<prd-status>\n${formatPrdStatus(prdStatus.status)}\n</prd-status>\n`);
271
- }
272
- return parts.join('\n');
273
- }
274
- /**
275
- * Update ralph state with current story
276
- */
277
- export function setCurrentStory(directory, storyId) {
278
- const state = readRalphState(directory);
279
- if (!state) {
280
- return false;
281
- }
282
- state.current_story_id = storyId;
283
- return writeRalphState(directory, state);
284
- }
285
- /**
286
- * Enable PRD mode in ralph state
287
- */
288
- export function enablePrdMode(directory) {
289
- const state = readRalphState(directory);
290
- if (!state) {
291
- return false;
292
- }
293
- state.prd_mode = true;
294
- // Initialize progress.txt if it doesn't exist
295
- initProgress(directory);
296
- return writeRalphState(directory, state);
297
- }
298
- /**
299
- * Record progress after completing a story
300
- */
301
- export function recordStoryProgress(directory, storyId, implementation, filesChanged, learnings) {
302
- return appendProgress(directory, {
303
- storyId,
304
- implementation,
305
- filesChanged,
306
- learnings
307
- });
308
- }
309
- /**
310
- * Add a codebase pattern discovered during work
311
- */
312
- export function recordPattern(directory, pattern) {
313
- return addPattern(directory, pattern);
314
- }
315
- /**
316
- * Check if ralph should complete based on PRD status
317
- */
318
- export function shouldCompleteByPrd(directory) {
319
- const status = getPrdCompletionStatus(directory);
320
- return status.hasPrd && status.allComplete;
321
- }
322
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/ralph-loop/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,EACL,OAAO,EACP,YAAY,EACZ,qBAAqB,EACrB,eAAe,EAGhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,kBAAkB,IAAI,4BAA4B,EAClD,mBAAmB,IAAI,6BAA6B,EACr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SAAS,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB;IAC7C,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IACxC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEtB,8CAA8C;IAC9C,YAAY,CAAC,SAAS,CAAC,CAAC;IAExB,OAAO,eAAe,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,SAAiB,EACjB,OAAe,EACf,cAAwB,EACxB,YAAsB,EACtB,SAAmB;IAEnB,OAAO,cAAc,CAAC,SAAS,EAAE;QAC/B,OAAO;QACP,cAAc;QACd,YAAY;QACZ,SAAS;KACV,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,OAAe;IAC9D,OAAO,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACnD,MAAM,MAAM,GAAG,sBAAsB,CAAC,SAAS,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,CAAC;AAC7C,CAAC"}
@@ -1,130 +0,0 @@
1
- /**
2
- * Ralph PRD (Product Requirements Document) Support
3
- *
4
- * Implements structured task tracking using prd.json format from the original Ralph.
5
- * Each user story has:
6
- * - id: Unique identifier (e.g., "US-001")
7
- * - title: Short description
8
- * - description: User story format
9
- * - acceptanceCriteria: List of criteria to pass
10
- * - priority: Execution order (1 = highest)
11
- * - passes: Boolean indicating completion
12
- * - notes: Optional notes from implementation
13
- */
14
- export interface UserStory {
15
- /** Unique identifier (e.g., "US-001") */
16
- id: string;
17
- /** Short title for the story */
18
- title: string;
19
- /** Full user story description */
20
- description: string;
21
- /** List of acceptance criteria that must be met */
22
- acceptanceCriteria: string[];
23
- /** Execution priority (1 = highest) */
24
- priority: number;
25
- /** Whether this story passes (complete and verified) */
26
- passes: boolean;
27
- /** Optional notes from implementation */
28
- notes?: string;
29
- }
30
- export interface PRD {
31
- /** Project name */
32
- project: string;
33
- /** Git branch name for this work */
34
- branchName: string;
35
- /** Overall description of the feature/task */
36
- description: string;
37
- /** List of user stories */
38
- userStories: UserStory[];
39
- }
40
- export interface PRDStatus {
41
- /** Total number of stories */
42
- total: number;
43
- /** Number of completed (passes: true) stories */
44
- completed: number;
45
- /** Number of pending (passes: false) stories */
46
- pending: number;
47
- /** Whether all stories are complete */
48
- allComplete: boolean;
49
- /** The highest priority incomplete story, if any */
50
- nextStory: UserStory | null;
51
- /** List of incomplete story IDs */
52
- incompleteIds: string[];
53
- }
54
- export declare const PRD_FILENAME = "prd.json";
55
- export declare const PRD_EXAMPLE_FILENAME = "prd.example.json";
56
- /**
57
- * Get the path to the prd.json file in a directory
58
- */
59
- export declare function getPrdPath(directory: string): string;
60
- /**
61
- * Get the path to the prd.json in .omc subdirectory
62
- */
63
- export declare function getOmcPrdPath(directory: string): string;
64
- /**
65
- * Find prd.json in a directory (checks both root and .omc)
66
- */
67
- export declare function findPrdPath(directory: string): string | null;
68
- /**
69
- * Read PRD from disk
70
- */
71
- export declare function readPrd(directory: string): PRD | null;
72
- /**
73
- * Write PRD to disk
74
- */
75
- export declare function writePrd(directory: string, prd: PRD): boolean;
76
- /**
77
- * Get the status of a PRD
78
- */
79
- export declare function getPrdStatus(prd: PRD): PRDStatus;
80
- /**
81
- * Mark a story as complete (passes: true)
82
- */
83
- export declare function markStoryComplete(directory: string, storyId: string, notes?: string): boolean;
84
- /**
85
- * Mark a story as incomplete (passes: false)
86
- */
87
- export declare function markStoryIncomplete(directory: string, storyId: string, notes?: string): boolean;
88
- /**
89
- * Get a specific story by ID
90
- */
91
- export declare function getStory(directory: string, storyId: string): UserStory | null;
92
- /**
93
- * Get the next incomplete story (highest priority)
94
- */
95
- export declare function getNextStory(directory: string): UserStory | null;
96
- /**
97
- * Input type for creating user stories (priority is optional)
98
- */
99
- export type UserStoryInput = Omit<UserStory, 'passes' | 'priority'> & {
100
- priority?: number;
101
- };
102
- /**
103
- * Create a new PRD with user stories from a task description
104
- */
105
- export declare function createPrd(project: string, branchName: string, description: string, stories: UserStoryInput[]): PRD;
106
- /**
107
- * Create a simple PRD from a task description (single story)
108
- */
109
- export declare function createSimplePrd(project: string, branchName: string, taskDescription: string): PRD;
110
- /**
111
- * Initialize a PRD in a directory
112
- */
113
- export declare function initPrd(directory: string, project: string, branchName: string, description: string, stories?: UserStoryInput[]): boolean;
114
- /**
115
- * Format PRD status as a string for display
116
- */
117
- export declare function formatPrdStatus(status: PRDStatus): string;
118
- /**
119
- * Format a story for display
120
- */
121
- export declare function formatStory(story: UserStory): string;
122
- /**
123
- * Format entire PRD for display
124
- */
125
- export declare function formatPrd(prd: PRD): string;
126
- /**
127
- * Format next story prompt for injection into ralph
128
- */
129
- export declare function formatNextStoryPrompt(story: UserStory): string;
130
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/ralph-prd/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,MAAM,WAAW,SAAS;IACxB,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,MAAM,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,GA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