olympus-ai 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (573) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +691 -0
  3. package/dist/__tests__/example.test.d.ts +2 -0
  4. package/dist/__tests__/example.test.d.ts.map +1 -0
  5. package/dist/__tests__/example.test.js +20 -0
  6. package/dist/__tests__/example.test.js.map +1 -0
  7. package/dist/__tests__/hooks.test.d.ts +2 -0
  8. package/dist/__tests__/hooks.test.d.ts.map +1 -0
  9. package/dist/__tests__/hooks.test.js +644 -0
  10. package/dist/__tests__/hooks.test.js.map +1 -0
  11. package/dist/__tests__/installer.test.d.ts +2 -0
  12. package/dist/__tests__/installer.test.d.ts.map +1 -0
  13. package/dist/__tests__/installer.test.js +369 -0
  14. package/dist/__tests__/installer.test.js.map +1 -0
  15. package/dist/__tests__/model-routing.test.d.ts +2 -0
  16. package/dist/__tests__/model-routing.test.d.ts.map +1 -0
  17. package/dist/__tests__/model-routing.test.js +814 -0
  18. package/dist/__tests__/model-routing.test.js.map +1 -0
  19. package/dist/__tests__/skills.test.d.ts +2 -0
  20. package/dist/__tests__/skills.test.d.ts.map +1 -0
  21. package/dist/__tests__/skills.test.js +126 -0
  22. package/dist/__tests__/skills.test.js.map +1 -0
  23. package/dist/__tests__/types.test.d.ts +2 -0
  24. package/dist/__tests__/types.test.d.ts.map +1 -0
  25. package/dist/__tests__/types.test.js +77 -0
  26. package/dist/__tests__/types.test.js.map +1 -0
  27. package/dist/agents/definitions.d.ts +105 -0
  28. package/dist/agents/definitions.d.ts.map +1 -0
  29. package/dist/agents/definitions.js +1379 -0
  30. package/dist/agents/definitions.js.map +1 -0
  31. package/dist/agents/document-writer.d.ts +11 -0
  32. package/dist/agents/document-writer.d.ts.map +1 -0
  33. package/dist/agents/document-writer.js +209 -0
  34. package/dist/agents/document-writer.js.map +1 -0
  35. package/dist/agents/explore.d.ts +12 -0
  36. package/dist/agents/explore.d.ts.map +1 -0
  37. package/dist/agents/explore.js +103 -0
  38. package/dist/agents/explore.js.map +1 -0
  39. package/dist/agents/frontend-engineer.d.ts +11 -0
  40. package/dist/agents/frontend-engineer.d.ts.map +1 -0
  41. package/dist/agents/frontend-engineer.js +115 -0
  42. package/dist/agents/frontend-engineer.js.map +1 -0
  43. package/dist/agents/index.d.ts +21 -0
  44. package/dist/agents/index.d.ts.map +1 -0
  45. package/dist/agents/index.js +27 -0
  46. package/dist/agents/index.js.map +1 -0
  47. package/dist/agents/librarian.d.ts +12 -0
  48. package/dist/agents/librarian.d.ts.map +1 -0
  49. package/dist/agents/librarian.js +103 -0
  50. package/dist/agents/librarian.js.map +1 -0
  51. package/dist/agents/metis.d.ts +12 -0
  52. package/dist/agents/metis.d.ts.map +1 -0
  53. package/dist/agents/metis.js +117 -0
  54. package/dist/agents/metis.js.map +1 -0
  55. package/dist/agents/momus.d.ts +12 -0
  56. package/dist/agents/momus.d.ts.map +1 -0
  57. package/dist/agents/momus.js +128 -0
  58. package/dist/agents/momus.js.map +1 -0
  59. package/dist/agents/multimodal-looker.d.ts +11 -0
  60. package/dist/agents/multimodal-looker.d.ts.map +1 -0
  61. package/dist/agents/multimodal-looker.js +70 -0
  62. package/dist/agents/multimodal-looker.js.map +1 -0
  63. package/dist/agents/olympian.d.ts +12 -0
  64. package/dist/agents/olympian.d.ts.map +1 -0
  65. package/dist/agents/olympian.js +93 -0
  66. package/dist/agents/olympian.js.map +1 -0
  67. package/dist/agents/oracle.d.ts +13 -0
  68. package/dist/agents/oracle.d.ts.map +1 -0
  69. package/dist/agents/oracle.js +191 -0
  70. package/dist/agents/oracle.js.map +1 -0
  71. package/dist/agents/orchestrator-olympus.d.ts +11 -0
  72. package/dist/agents/orchestrator-olympus.d.ts.map +1 -0
  73. package/dist/agents/orchestrator-olympus.js +115 -0
  74. package/dist/agents/orchestrator-olympus.js.map +1 -0
  75. package/dist/agents/orchestrator-sisyphus.d.ts +11 -0
  76. package/dist/agents/orchestrator-sisyphus.d.ts.map +1 -0
  77. package/dist/agents/orchestrator-sisyphus.js +115 -0
  78. package/dist/agents/orchestrator-sisyphus.js.map +1 -0
  79. package/dist/agents/prometheus.d.ts +12 -0
  80. package/dist/agents/prometheus.d.ts.map +1 -0
  81. package/dist/agents/prometheus.js +156 -0
  82. package/dist/agents/prometheus.js.map +1 -0
  83. package/dist/agents/qa-tester.d.ts +16 -0
  84. package/dist/agents/qa-tester.d.ts.map +1 -0
  85. package/dist/agents/qa-tester.js +367 -0
  86. package/dist/agents/qa-tester.js.map +1 -0
  87. package/dist/agents/sisyphus-junior.d.ts +12 -0
  88. package/dist/agents/sisyphus-junior.d.ts.map +1 -0
  89. package/dist/agents/sisyphus-junior.js +93 -0
  90. package/dist/agents/sisyphus-junior.js.map +1 -0
  91. package/dist/agents/types.d.ts +120 -0
  92. package/dist/agents/types.d.ts.map +1 -0
  93. package/dist/agents/types.js +38 -0
  94. package/dist/agents/types.js.map +1 -0
  95. package/dist/agents/utils.d.ts +49 -0
  96. package/dist/agents/utils.d.ts.map +1 -0
  97. package/dist/agents/utils.js +164 -0
  98. package/dist/agents/utils.js.map +1 -0
  99. package/dist/cli/index.d.ts +13 -0
  100. package/dist/cli/index.d.ts.map +1 -0
  101. package/dist/cli/index.js +496 -0
  102. package/dist/cli/index.js.map +1 -0
  103. package/dist/commands/index.d.ts +78 -0
  104. package/dist/commands/index.d.ts.map +1 -0
  105. package/dist/commands/index.js +148 -0
  106. package/dist/commands/index.js.map +1 -0
  107. package/dist/config/index.d.ts +5 -0
  108. package/dist/config/index.d.ts.map +1 -0
  109. package/dist/config/index.js +5 -0
  110. package/dist/config/index.js.map +1 -0
  111. package/dist/config/loader.d.ts +49 -0
  112. package/dist/config/loader.d.ts.map +1 -0
  113. package/dist/config/loader.js +380 -0
  114. package/dist/config/loader.js.map +1 -0
  115. package/dist/features/auto-update.d.ts +187 -0
  116. package/dist/features/auto-update.d.ts.map +1 -0
  117. package/dist/features/auto-update.js +539 -0
  118. package/dist/features/auto-update.js.map +1 -0
  119. package/dist/features/background-agent/concurrency.d.ts +53 -0
  120. package/dist/features/background-agent/concurrency.d.ts.map +1 -0
  121. package/dist/features/background-agent/concurrency.js +121 -0
  122. package/dist/features/background-agent/concurrency.js.map +1 -0
  123. package/dist/features/background-agent/index.d.ts +12 -0
  124. package/dist/features/background-agent/index.d.ts.map +1 -0
  125. package/dist/features/background-agent/index.js +12 -0
  126. package/dist/features/background-agent/index.js.map +1 -0
  127. package/dist/features/background-agent/manager.d.ts +134 -0
  128. package/dist/features/background-agent/manager.d.ts.map +1 -0
  129. package/dist/features/background-agent/manager.js +412 -0
  130. package/dist/features/background-agent/manager.js.map +1 -0
  131. package/dist/features/background-agent/types.d.ts +99 -0
  132. package/dist/features/background-agent/types.d.ts.map +1 -0
  133. package/dist/features/background-agent/types.js +9 -0
  134. package/dist/features/background-agent/types.js.map +1 -0
  135. package/dist/features/background-tasks.d.ts +99 -0
  136. package/dist/features/background-tasks.d.ts.map +1 -0
  137. package/dist/features/background-tasks.js +265 -0
  138. package/dist/features/background-tasks.js.map +1 -0
  139. package/dist/features/boulder-state/constants.d.ts +20 -0
  140. package/dist/features/boulder-state/constants.d.ts.map +1 -0
  141. package/dist/features/boulder-state/constants.js +20 -0
  142. package/dist/features/boulder-state/constants.js.map +1 -0
  143. package/dist/features/boulder-state/index.d.ts +12 -0
  144. package/dist/features/boulder-state/index.d.ts.map +1 -0
  145. package/dist/features/boulder-state/index.js +13 -0
  146. package/dist/features/boulder-state/index.js.map +1 -0
  147. package/dist/features/boulder-state/storage.d.ts +58 -0
  148. package/dist/features/boulder-state/storage.d.ts.map +1 -0
  149. package/dist/features/boulder-state/storage.js +174 -0
  150. package/dist/features/boulder-state/storage.js.map +1 -0
  151. package/dist/features/boulder-state/types.d.ts +48 -0
  152. package/dist/features/boulder-state/types.d.ts.map +1 -0
  153. package/dist/features/boulder-state/types.js +10 -0
  154. package/dist/features/boulder-state/types.js.map +1 -0
  155. package/dist/features/builtin-skills/index.d.ts +10 -0
  156. package/dist/features/builtin-skills/index.d.ts.map +1 -0
  157. package/dist/features/builtin-skills/index.js +10 -0
  158. package/dist/features/builtin-skills/index.js.map +1 -0
  159. package/dist/features/builtin-skills/skills.d.ts +21 -0
  160. package/dist/features/builtin-skills/skills.d.ts.map +1 -0
  161. package/dist/features/builtin-skills/skills.js +1082 -0
  162. package/dist/features/builtin-skills/skills.js.map +1 -0
  163. package/dist/features/builtin-skills/types.d.ts +60 -0
  164. package/dist/features/builtin-skills/types.d.ts.map +1 -0
  165. package/dist/features/builtin-skills/types.js +9 -0
  166. package/dist/features/builtin-skills/types.js.map +1 -0
  167. package/dist/features/context-injector/collector.d.ts +56 -0
  168. package/dist/features/context-injector/collector.d.ts.map +1 -0
  169. package/dist/features/context-injector/collector.js +122 -0
  170. package/dist/features/context-injector/collector.js.map +1 -0
  171. package/dist/features/context-injector/index.d.ts +12 -0
  172. package/dist/features/context-injector/index.d.ts.map +1 -0
  173. package/dist/features/context-injector/index.js +13 -0
  174. package/dist/features/context-injector/index.js.map +1 -0
  175. package/dist/features/context-injector/injector.d.ts +47 -0
  176. package/dist/features/context-injector/injector.d.ts.map +1 -0
  177. package/dist/features/context-injector/injector.js +103 -0
  178. package/dist/features/context-injector/injector.js.map +1 -0
  179. package/dist/features/context-injector/types.d.ts +103 -0
  180. package/dist/features/context-injector/types.d.ts.map +1 -0
  181. package/dist/features/context-injector/types.js +11 -0
  182. package/dist/features/context-injector/types.js.map +1 -0
  183. package/dist/features/continuation-enforcement.d.ts +36 -0
  184. package/dist/features/continuation-enforcement.d.ts.map +1 -0
  185. package/dist/features/continuation-enforcement.js +175 -0
  186. package/dist/features/continuation-enforcement.js.map +1 -0
  187. package/dist/features/index.d.ts +12 -0
  188. package/dist/features/index.d.ts.map +1 -0
  189. package/dist/features/index.js +49 -0
  190. package/dist/features/index.js.map +1 -0
  191. package/dist/features/magic-keywords.d.ts +28 -0
  192. package/dist/features/magic-keywords.d.ts.map +1 -0
  193. package/dist/features/magic-keywords.js +421 -0
  194. package/dist/features/magic-keywords.js.map +1 -0
  195. package/dist/features/model-routing/index.d.ts +34 -0
  196. package/dist/features/model-routing/index.d.ts.map +1 -0
  197. package/dist/features/model-routing/index.js +48 -0
  198. package/dist/features/model-routing/index.js.map +1 -0
  199. package/dist/features/model-routing/prompts/haiku.d.ts +54 -0
  200. package/dist/features/model-routing/prompts/haiku.d.ts.map +1 -0
  201. package/dist/features/model-routing/prompts/haiku.js +141 -0
  202. package/dist/features/model-routing/prompts/haiku.js.map +1 -0
  203. package/dist/features/model-routing/prompts/index.d.ts +45 -0
  204. package/dist/features/model-routing/prompts/index.d.ts.map +1 -0
  205. package/dist/features/model-routing/prompts/index.js +116 -0
  206. package/dist/features/model-routing/prompts/index.js.map +1 -0
  207. package/dist/features/model-routing/prompts/opus.d.ts +34 -0
  208. package/dist/features/model-routing/prompts/opus.d.ts.map +1 -0
  209. package/dist/features/model-routing/prompts/opus.js +153 -0
  210. package/dist/features/model-routing/prompts/opus.js.map +1 -0
  211. package/dist/features/model-routing/prompts/sonnet.d.ts +38 -0
  212. package/dist/features/model-routing/prompts/sonnet.d.ts.map +1 -0
  213. package/dist/features/model-routing/prompts/sonnet.js +149 -0
  214. package/dist/features/model-routing/prompts/sonnet.js.map +1 -0
  215. package/dist/features/model-routing/router.d.ts +92 -0
  216. package/dist/features/model-routing/router.d.ts.map +1 -0
  217. package/dist/features/model-routing/router.js +267 -0
  218. package/dist/features/model-routing/router.js.map +1 -0
  219. package/dist/features/model-routing/rules.d.ts +32 -0
  220. package/dist/features/model-routing/rules.d.ts.map +1 -0
  221. package/dist/features/model-routing/rules.js +224 -0
  222. package/dist/features/model-routing/rules.js.map +1 -0
  223. package/dist/features/model-routing/scorer.d.ts +35 -0
  224. package/dist/features/model-routing/scorer.d.ts.map +1 -0
  225. package/dist/features/model-routing/scorer.js +241 -0
  226. package/dist/features/model-routing/scorer.js.map +1 -0
  227. package/dist/features/model-routing/signals.d.ts +26 -0
  228. package/dist/features/model-routing/signals.d.ts.map +1 -0
  229. package/dist/features/model-routing/signals.js +283 -0
  230. package/dist/features/model-routing/signals.js.map +1 -0
  231. package/dist/features/model-routing/types.d.ts +195 -0
  232. package/dist/features/model-routing/types.d.ts.map +1 -0
  233. package/dist/features/model-routing/types.js +86 -0
  234. package/dist/features/model-routing/types.js.map +1 -0
  235. package/dist/hooks/agent-usage-reminder/constants.d.ts +17 -0
  236. package/dist/hooks/agent-usage-reminder/constants.d.ts.map +1 -0
  237. package/dist/hooks/agent-usage-reminder/constants.js +58 -0
  238. package/dist/hooks/agent-usage-reminder/constants.js.map +1 -0
  239. package/dist/hooks/agent-usage-reminder/index.d.ts +36 -0
  240. package/dist/hooks/agent-usage-reminder/index.d.ts.map +1 -0
  241. package/dist/hooks/agent-usage-reminder/index.js +89 -0
  242. package/dist/hooks/agent-usage-reminder/index.js.map +1 -0
  243. package/dist/hooks/agent-usage-reminder/storage.d.ts +12 -0
  244. package/dist/hooks/agent-usage-reminder/storage.d.ts.map +1 -0
  245. package/dist/hooks/agent-usage-reminder/storage.js +39 -0
  246. package/dist/hooks/agent-usage-reminder/storage.js.map +1 -0
  247. package/dist/hooks/agent-usage-reminder/types.d.ts +14 -0
  248. package/dist/hooks/agent-usage-reminder/types.d.ts.map +1 -0
  249. package/dist/hooks/agent-usage-reminder/types.js +9 -0
  250. package/dist/hooks/agent-usage-reminder/types.js.map +1 -0
  251. package/dist/hooks/ascent-verifier/index.d.ts +72 -0
  252. package/dist/hooks/ascent-verifier/index.d.ts.map +1 -0
  253. package/dist/hooks/ascent-verifier/index.js +223 -0
  254. package/dist/hooks/ascent-verifier/index.js.map +1 -0
  255. package/dist/hooks/auto-slash-command/constants.d.ts +19 -0
  256. package/dist/hooks/auto-slash-command/constants.d.ts.map +1 -0
  257. package/dist/hooks/auto-slash-command/constants.js +28 -0
  258. package/dist/hooks/auto-slash-command/constants.js.map +1 -0
  259. package/dist/hooks/auto-slash-command/detector.d.ts +33 -0
  260. package/dist/hooks/auto-slash-command/detector.d.ts.map +1 -0
  261. package/dist/hooks/auto-slash-command/detector.js +73 -0
  262. package/dist/hooks/auto-slash-command/detector.js.map +1 -0
  263. package/dist/hooks/auto-slash-command/executor.d.ts +29 -0
  264. package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -0
  265. package/dist/hooks/auto-slash-command/executor.js +214 -0
  266. package/dist/hooks/auto-slash-command/executor.js.map +1 -0
  267. package/dist/hooks/auto-slash-command/index.d.ts +53 -0
  268. package/dist/hooks/auto-slash-command/index.d.ts.map +1 -0
  269. package/dist/hooks/auto-slash-command/index.js +105 -0
  270. package/dist/hooks/auto-slash-command/index.js.map +1 -0
  271. package/dist/hooks/auto-slash-command/types.d.ts +77 -0
  272. package/dist/hooks/auto-slash-command/types.d.ts.map +1 -0
  273. package/dist/hooks/auto-slash-command/types.js +9 -0
  274. package/dist/hooks/auto-slash-command/types.js.map +1 -0
  275. package/dist/hooks/background-notification/index.d.ts +60 -0
  276. package/dist/hooks/background-notification/index.d.ts.map +1 -0
  277. package/dist/hooks/background-notification/index.js +180 -0
  278. package/dist/hooks/background-notification/index.js.map +1 -0
  279. package/dist/hooks/background-notification/types.d.ts +64 -0
  280. package/dist/hooks/background-notification/types.d.ts.map +1 -0
  281. package/dist/hooks/background-notification/types.js +8 -0
  282. package/dist/hooks/background-notification/types.js.map +1 -0
  283. package/dist/hooks/bridge.d.ts +68 -0
  284. package/dist/hooks/bridge.d.ts.map +1 -0
  285. package/dist/hooks/bridge.js +321 -0
  286. package/dist/hooks/bridge.js.map +1 -0
  287. package/dist/hooks/comment-checker/constants.d.ts +28 -0
  288. package/dist/hooks/comment-checker/constants.d.ts.map +1 -0
  289. package/dist/hooks/comment-checker/constants.js +189 -0
  290. package/dist/hooks/comment-checker/constants.js.map +1 -0
  291. package/dist/hooks/comment-checker/filters.d.ts +39 -0
  292. package/dist/hooks/comment-checker/filters.d.ts.map +1 -0
  293. package/dist/hooks/comment-checker/filters.js +126 -0
  294. package/dist/hooks/comment-checker/filters.js.map +1 -0
  295. package/dist/hooks/comment-checker/index.d.ts +58 -0
  296. package/dist/hooks/comment-checker/index.d.ts.map +1 -0
  297. package/dist/hooks/comment-checker/index.js +298 -0
  298. package/dist/hooks/comment-checker/index.js.map +1 -0
  299. package/dist/hooks/comment-checker/types.d.ts +88 -0
  300. package/dist/hooks/comment-checker/types.d.ts.map +1 -0
  301. package/dist/hooks/comment-checker/types.js +9 -0
  302. package/dist/hooks/comment-checker/types.js.map +1 -0
  303. package/dist/hooks/context-window-limit-recovery/constants.d.ts +28 -0
  304. package/dist/hooks/context-window-limit-recovery/constants.d.ts.map +1 -0
  305. package/dist/hooks/context-window-limit-recovery/constants.js +85 -0
  306. package/dist/hooks/context-window-limit-recovery/constants.js.map +1 -0
  307. package/dist/hooks/context-window-limit-recovery/index.d.ts +62 -0
  308. package/dist/hooks/context-window-limit-recovery/index.d.ts.map +1 -0
  309. package/dist/hooks/context-window-limit-recovery/index.js +201 -0
  310. package/dist/hooks/context-window-limit-recovery/index.js.map +1 -0
  311. package/dist/hooks/context-window-limit-recovery/parser.d.ts +31 -0
  312. package/dist/hooks/context-window-limit-recovery/parser.d.ts.map +1 -0
  313. package/dist/hooks/context-window-limit-recovery/parser.js +241 -0
  314. package/dist/hooks/context-window-limit-recovery/parser.js.map +1 -0
  315. package/dist/hooks/context-window-limit-recovery/types.d.ts +84 -0
  316. package/dist/hooks/context-window-limit-recovery/types.d.ts.map +1 -0
  317. package/dist/hooks/context-window-limit-recovery/types.js +34 -0
  318. package/dist/hooks/context-window-limit-recovery/types.js.map +1 -0
  319. package/dist/hooks/directory-readme-injector/constants.d.ts +15 -0
  320. package/dist/hooks/directory-readme-injector/constants.d.ts.map +1 -0
  321. package/dist/hooks/directory-readme-injector/constants.js +17 -0
  322. package/dist/hooks/directory-readme-injector/constants.js.map +1 -0
  323. package/dist/hooks/directory-readme-injector/index.d.ts +41 -0
  324. package/dist/hooks/directory-readme-injector/index.d.ts.map +1 -0
  325. package/dist/hooks/directory-readme-injector/index.js +162 -0
  326. package/dist/hooks/directory-readme-injector/index.js.map +1 -0
  327. package/dist/hooks/directory-readme-injector/storage.d.ts +20 -0
  328. package/dist/hooks/directory-readme-injector/storage.d.ts.map +1 -0
  329. package/dist/hooks/directory-readme-injector/storage.js +56 -0
  330. package/dist/hooks/directory-readme-injector/storage.js.map +1 -0
  331. package/dist/hooks/directory-readme-injector/types.d.ts +20 -0
  332. package/dist/hooks/directory-readme-injector/types.d.ts.map +1 -0
  333. package/dist/hooks/directory-readme-injector/types.js +9 -0
  334. package/dist/hooks/directory-readme-injector/types.js.map +1 -0
  335. package/dist/hooks/edit-error-recovery/index.d.ts +62 -0
  336. package/dist/hooks/edit-error-recovery/index.d.ts.map +1 -0
  337. package/dist/hooks/edit-error-recovery/index.js +89 -0
  338. package/dist/hooks/edit-error-recovery/index.js.map +1 -0
  339. package/dist/hooks/empty-message-sanitizer/constants.d.ts +33 -0
  340. package/dist/hooks/empty-message-sanitizer/constants.d.ts.map +1 -0
  341. package/dist/hooks/empty-message-sanitizer/constants.js +37 -0
  342. package/dist/hooks/empty-message-sanitizer/constants.js.map +1 -0
  343. package/dist/hooks/empty-message-sanitizer/index.d.ts +59 -0
  344. package/dist/hooks/empty-message-sanitizer/index.d.ts.map +1 -0
  345. package/dist/hooks/empty-message-sanitizer/index.js +171 -0
  346. package/dist/hooks/empty-message-sanitizer/index.js.map +1 -0
  347. package/dist/hooks/empty-message-sanitizer/types.d.ts +79 -0
  348. package/dist/hooks/empty-message-sanitizer/types.d.ts.map +1 -0
  349. package/dist/hooks/empty-message-sanitizer/types.js +10 -0
  350. package/dist/hooks/empty-message-sanitizer/types.js.map +1 -0
  351. package/dist/hooks/index.d.ts +35 -0
  352. package/dist/hooks/index.d.ts.map +1 -0
  353. package/dist/hooks/index.js +81 -0
  354. package/dist/hooks/index.js.map +1 -0
  355. package/dist/hooks/keyword-detector/index.d.ts +40 -0
  356. package/dist/hooks/keyword-detector/index.d.ts.map +1 -0
  357. package/dist/hooks/keyword-detector/index.js +88 -0
  358. package/dist/hooks/keyword-detector/index.js.map +1 -0
  359. package/dist/hooks/non-interactive-env/constants.d.ts +35 -0
  360. package/dist/hooks/non-interactive-env/constants.d.ts.map +1 -0
  361. package/dist/hooks/non-interactive-env/constants.js +69 -0
  362. package/dist/hooks/non-interactive-env/constants.js.map +1 -0
  363. package/dist/hooks/non-interactive-env/detector.d.ts +2 -0
  364. package/dist/hooks/non-interactive-env/detector.d.ts.map +1 -0
  365. package/dist/hooks/non-interactive-env/detector.js +16 -0
  366. package/dist/hooks/non-interactive-env/detector.js.map +1 -0
  367. package/dist/hooks/non-interactive-env/index.d.ts +14 -0
  368. package/dist/hooks/non-interactive-env/index.d.ts.map +1 -0
  369. package/dist/hooks/non-interactive-env/index.js +72 -0
  370. package/dist/hooks/non-interactive-env/index.js.map +1 -0
  371. package/dist/hooks/non-interactive-env/types.d.ts +14 -0
  372. package/dist/hooks/non-interactive-env/types.d.ts.map +1 -0
  373. package/dist/hooks/non-interactive-env/types.js +2 -0
  374. package/dist/hooks/non-interactive-env/types.js.map +1 -0
  375. package/dist/hooks/olympus-orchestrator/constants.d.ts +23 -0
  376. package/dist/hooks/olympus-orchestrator/constants.d.ts.map +1 -0
  377. package/dist/hooks/olympus-orchestrator/constants.js +142 -0
  378. package/dist/hooks/olympus-orchestrator/constants.js.map +1 -0
  379. package/dist/hooks/olympus-orchestrator/index.d.ts +113 -0
  380. package/dist/hooks/olympus-orchestrator/index.d.ts.map +1 -0
  381. package/dist/hooks/olympus-orchestrator/index.js +283 -0
  382. package/dist/hooks/olympus-orchestrator/index.js.map +1 -0
  383. package/dist/hooks/persistent-mode/index.d.ts +40 -0
  384. package/dist/hooks/persistent-mode/index.d.ts.map +1 -0
  385. package/dist/hooks/persistent-mode/index.js +322 -0
  386. package/dist/hooks/persistent-mode/index.js.map +1 -0
  387. package/dist/hooks/plugin-patterns/index.d.ts +107 -0
  388. package/dist/hooks/plugin-patterns/index.d.ts.map +1 -0
  389. package/dist/hooks/plugin-patterns/index.js +289 -0
  390. package/dist/hooks/plugin-patterns/index.js.map +1 -0
  391. package/dist/hooks/preemptive-compaction/constants.d.ts +48 -0
  392. package/dist/hooks/preemptive-compaction/constants.d.ts.map +1 -0
  393. package/dist/hooks/preemptive-compaction/constants.js +90 -0
  394. package/dist/hooks/preemptive-compaction/constants.js.map +1 -0
  395. package/dist/hooks/preemptive-compaction/index.d.ts +55 -0
  396. package/dist/hooks/preemptive-compaction/index.d.ts.map +1 -0
  397. package/dist/hooks/preemptive-compaction/index.js +227 -0
  398. package/dist/hooks/preemptive-compaction/index.js.map +1 -0
  399. package/dist/hooks/preemptive-compaction/types.d.ts +76 -0
  400. package/dist/hooks/preemptive-compaction/types.d.ts.map +1 -0
  401. package/dist/hooks/preemptive-compaction/types.js +9 -0
  402. package/dist/hooks/preemptive-compaction/types.js.map +1 -0
  403. package/dist/hooks/ralph-loop/index.d.ts +60 -0
  404. package/dist/hooks/ralph-loop/index.d.ts.map +1 -0
  405. package/dist/hooks/ralph-loop/index.js +155 -0
  406. package/dist/hooks/ralph-loop/index.js.map +1 -0
  407. package/dist/hooks/ralph-verifier/index.d.ts +72 -0
  408. package/dist/hooks/ralph-verifier/index.d.ts.map +1 -0
  409. package/dist/hooks/ralph-verifier/index.js +223 -0
  410. package/dist/hooks/ralph-verifier/index.js.map +1 -0
  411. package/dist/hooks/rules-injector/constants.d.ts +25 -0
  412. package/dist/hooks/rules-injector/constants.d.ts.map +1 -0
  413. package/dist/hooks/rules-injector/constants.js +40 -0
  414. package/dist/hooks/rules-injector/constants.js.map +1 -0
  415. package/dist/hooks/rules-injector/finder.d.ts +24 -0
  416. package/dist/hooks/rules-injector/finder.d.ts.map +1 -0
  417. package/dist/hooks/rules-injector/finder.js +215 -0
  418. package/dist/hooks/rules-injector/finder.js.map +1 -0
  419. package/dist/hooks/rules-injector/index.d.ts +45 -0
  420. package/dist/hooks/rules-injector/index.d.ts.map +1 -0
  421. package/dist/hooks/rules-injector/index.js +187 -0
  422. package/dist/hooks/rules-injector/index.js.map +1 -0
  423. package/dist/hooks/rules-injector/matcher.d.ts +25 -0
  424. package/dist/hooks/rules-injector/matcher.d.ts.map +1 -0
  425. package/dist/hooks/rules-injector/matcher.js +70 -0
  426. package/dist/hooks/rules-injector/matcher.js.map +1 -0
  427. package/dist/hooks/rules-injector/parser.d.ts +20 -0
  428. package/dist/hooks/rules-injector/parser.d.ts.map +1 -0
  429. package/dist/hooks/rules-injector/parser.js +179 -0
  430. package/dist/hooks/rules-injector/parser.js.map +1 -0
  431. package/dist/hooks/rules-injector/storage.d.ts +26 -0
  432. package/dist/hooks/rules-injector/storage.d.ts.map +1 -0
  433. package/dist/hooks/rules-injector/storage.js +61 -0
  434. package/dist/hooks/rules-injector/storage.js.map +1 -0
  435. package/dist/hooks/rules-injector/types.d.ts +101 -0
  436. package/dist/hooks/rules-injector/types.d.ts.map +1 -0
  437. package/dist/hooks/rules-injector/types.js +10 -0
  438. package/dist/hooks/rules-injector/types.js.map +1 -0
  439. package/dist/hooks/session-recovery/constants.d.ts +56 -0
  440. package/dist/hooks/session-recovery/constants.d.ts.map +1 -0
  441. package/dist/hooks/session-recovery/constants.js +78 -0
  442. package/dist/hooks/session-recovery/constants.js.map +1 -0
  443. package/dist/hooks/session-recovery/index.d.ts +53 -0
  444. package/dist/hooks/session-recovery/index.d.ts.map +1 -0
  445. package/dist/hooks/session-recovery/index.js +321 -0
  446. package/dist/hooks/session-recovery/index.js.map +1 -0
  447. package/dist/hooks/session-recovery/storage.d.ts +76 -0
  448. package/dist/hooks/session-recovery/storage.d.ts.map +1 -0
  449. package/dist/hooks/session-recovery/storage.js +383 -0
  450. package/dist/hooks/session-recovery/storage.js.map +1 -0
  451. package/dist/hooks/session-recovery/types.d.ts +145 -0
  452. package/dist/hooks/session-recovery/types.d.ts.map +1 -0
  453. package/dist/hooks/session-recovery/types.js +8 -0
  454. package/dist/hooks/session-recovery/types.js.map +1 -0
  455. package/dist/hooks/sisyphus-orchestrator/constants.d.ts +23 -0
  456. package/dist/hooks/sisyphus-orchestrator/constants.d.ts.map +1 -0
  457. package/dist/hooks/sisyphus-orchestrator/constants.js +142 -0
  458. package/dist/hooks/sisyphus-orchestrator/constants.js.map +1 -0
  459. package/dist/hooks/sisyphus-orchestrator/index.d.ts +113 -0
  460. package/dist/hooks/sisyphus-orchestrator/index.d.ts.map +1 -0
  461. package/dist/hooks/sisyphus-orchestrator/index.js +283 -0
  462. package/dist/hooks/sisyphus-orchestrator/index.js.map +1 -0
  463. package/dist/hooks/the-ascent/index.d.ts +60 -0
  464. package/dist/hooks/the-ascent/index.d.ts.map +1 -0
  465. package/dist/hooks/the-ascent/index.js +155 -0
  466. package/dist/hooks/the-ascent/index.js.map +1 -0
  467. package/dist/hooks/think-mode/detector.d.ts +28 -0
  468. package/dist/hooks/think-mode/detector.d.ts.map +1 -0
  469. package/dist/hooks/think-mode/detector.js +105 -0
  470. package/dist/hooks/think-mode/detector.js.map +1 -0
  471. package/dist/hooks/think-mode/index.d.ts +70 -0
  472. package/dist/hooks/think-mode/index.d.ts.map +1 -0
  473. package/dist/hooks/think-mode/index.js +144 -0
  474. package/dist/hooks/think-mode/index.js.map +1 -0
  475. package/dist/hooks/think-mode/switcher.d.ts +39 -0
  476. package/dist/hooks/think-mode/switcher.d.ts.map +1 -0
  477. package/dist/hooks/think-mode/switcher.js +180 -0
  478. package/dist/hooks/think-mode/switcher.js.map +1 -0
  479. package/dist/hooks/think-mode/types.d.ts +60 -0
  480. package/dist/hooks/think-mode/types.d.ts.map +1 -0
  481. package/dist/hooks/think-mode/types.js +9 -0
  482. package/dist/hooks/think-mode/types.js.map +1 -0
  483. package/dist/hooks/thinking-block-validator/constants.d.ts +37 -0
  484. package/dist/hooks/thinking-block-validator/constants.d.ts.map +1 -0
  485. package/dist/hooks/thinking-block-validator/constants.js +50 -0
  486. package/dist/hooks/thinking-block-validator/constants.js.map +1 -0
  487. package/dist/hooks/thinking-block-validator/index.d.ts +35 -0
  488. package/dist/hooks/thinking-block-validator/index.d.ts.map +1 -0
  489. package/dist/hooks/thinking-block-validator/index.js +156 -0
  490. package/dist/hooks/thinking-block-validator/index.js.map +1 -0
  491. package/dist/hooks/thinking-block-validator/types.d.ts +67 -0
  492. package/dist/hooks/thinking-block-validator/types.d.ts.map +1 -0
  493. package/dist/hooks/thinking-block-validator/types.js +9 -0
  494. package/dist/hooks/thinking-block-validator/types.js.map +1 -0
  495. package/dist/hooks/todo-continuation/index.d.ts +39 -0
  496. package/dist/hooks/todo-continuation/index.d.ts.map +1 -0
  497. package/dist/hooks/todo-continuation/index.js +140 -0
  498. package/dist/hooks/todo-continuation/index.js.map +1 -0
  499. package/dist/hooks/ultrawork-state/index.d.ts +60 -0
  500. package/dist/hooks/ultrawork-state/index.d.ts.map +1 -0
  501. package/dist/hooks/ultrawork-state/index.js +207 -0
  502. package/dist/hooks/ultrawork-state/index.js.map +1 -0
  503. package/dist/index.d.ts +117 -0
  504. package/dist/index.d.ts.map +1 -0
  505. package/dist/index.js +175 -0
  506. package/dist/index.js.map +1 -0
  507. package/dist/installer/hooks.d.ts +196 -0
  508. package/dist/installer/hooks.d.ts.map +1 -0
  509. package/dist/installer/hooks.js +1385 -0
  510. package/dist/installer/hooks.js.map +1 -0
  511. package/dist/installer/index.d.ts +92 -0
  512. package/dist/installer/index.d.ts.map +1 -0
  513. package/dist/installer/index.js +2249 -0
  514. package/dist/installer/index.js.map +1 -0
  515. package/dist/mcp/index.d.ts +6 -0
  516. package/dist/mcp/index.d.ts.map +1 -0
  517. package/dist/mcp/index.js +5 -0
  518. package/dist/mcp/index.js.map +1 -0
  519. package/dist/mcp/servers.d.ts +77 -0
  520. package/dist/mcp/servers.d.ts.map +1 -0
  521. package/dist/mcp/servers.js +122 -0
  522. package/dist/mcp/servers.js.map +1 -0
  523. package/dist/shared/index.d.ts +5 -0
  524. package/dist/shared/index.d.ts.map +1 -0
  525. package/dist/shared/index.js +5 -0
  526. package/dist/shared/index.js.map +1 -0
  527. package/dist/shared/types.d.ts +159 -0
  528. package/dist/shared/types.d.ts.map +1 -0
  529. package/dist/shared/types.js +5 -0
  530. package/dist/shared/types.js.map +1 -0
  531. package/dist/tools/ast-tools.d.ts +63 -0
  532. package/dist/tools/ast-tools.d.ts.map +1 -0
  533. package/dist/tools/ast-tools.js +450 -0
  534. package/dist/tools/ast-tools.js.map +1 -0
  535. package/dist/tools/index.d.ts +52 -0
  536. package/dist/tools/index.d.ts.map +1 -0
  537. package/dist/tools/index.js +120 -0
  538. package/dist/tools/index.js.map +1 -0
  539. package/dist/tools/lsp/client.d.ts +201 -0
  540. package/dist/tools/lsp/client.d.ts.map +1 -0
  541. package/dist/tools/lsp/client.js +454 -0
  542. package/dist/tools/lsp/client.js.map +1 -0
  543. package/dist/tools/lsp/index.d.ts +9 -0
  544. package/dist/tools/lsp/index.d.ts.map +1 -0
  545. package/dist/tools/lsp/index.js +7 -0
  546. package/dist/tools/lsp/index.js.map +1 -0
  547. package/dist/tools/lsp/servers.d.ts +37 -0
  548. package/dist/tools/lsp/servers.d.ts.map +1 -0
  549. package/dist/tools/lsp/servers.js +149 -0
  550. package/dist/tools/lsp/servers.js.map +1 -0
  551. package/dist/tools/lsp/utils.d.ts +58 -0
  552. package/dist/tools/lsp/utils.d.ts.map +1 -0
  553. package/dist/tools/lsp/utils.js +236 -0
  554. package/dist/tools/lsp/utils.js.map +1 -0
  555. package/dist/tools/lsp-tools.d.ts +151 -0
  556. package/dist/tools/lsp-tools.d.ts.map +1 -0
  557. package/dist/tools/lsp-tools.js +358 -0
  558. package/dist/tools/lsp-tools.js.map +1 -0
  559. package/package.json +85 -0
  560. package/scripts/claude-sisyphus.sh +9 -0
  561. package/scripts/install.sh +1774 -0
  562. package/scripts/keyword-detector.mjs +209 -0
  563. package/scripts/keyword-detector.sh +71 -0
  564. package/scripts/persistent-mode.mjs +241 -0
  565. package/scripts/persistent-mode.sh +300 -0
  566. package/scripts/post-tool-verifier.mjs +217 -0
  567. package/scripts/post-tool-verifier.sh +196 -0
  568. package/scripts/pre-tool-enforcer.mjs +99 -0
  569. package/scripts/pre-tool-enforcer.sh +76 -0
  570. package/scripts/sisyphus-aliases.sh +18 -0
  571. package/scripts/stop-continuation.sh +31 -0
  572. package/scripts/test-pr25.sh +525 -0
  573. package/scripts/uninstall.sh +171 -0
package/dist/index.js ADDED
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Olympus
3
+ *
4
+ * A multi-agent orchestration system for the Claude Agent SDK.
5
+ * Inspired by oh-my-opencode, reimagined for Claude Code.
6
+ *
7
+ * Main features:
8
+ * - Olympus: Primary orchestrator that delegates to specialized subagents
9
+ * - Parallel execution: Background agents run concurrently
10
+ * - LSP/AST tools: IDE-like capabilities for agents
11
+ * - Context management: Auto-injection from AGENTS.md/CLAUDE.md
12
+ * - Continuation enforcement: Ensures tasks complete before stopping
13
+ * - Magic keywords: Special triggers for enhanced behaviors
14
+ */
15
+ import { loadConfig, findContextFiles, loadContextFromFiles } from './config/loader.js';
16
+ import { getAgentDefinitions, olympusSystemPrompt } from './agents/definitions.js';
17
+ import { getDefaultMcpServers, toSdkMcpFormat } from './mcp/servers.js';
18
+ import { createMagicKeywordProcessor, detectMagicKeywords } from './features/magic-keywords.js';
19
+ import { continuationSystemPromptAddition } from './features/continuation-enforcement.js';
20
+ import { createBackgroundTaskManager, shouldRunInBackground as shouldRunInBackgroundFn } from './features/background-tasks.js';
21
+ export { loadConfig, getAgentDefinitions, olympusSystemPrompt };
22
+ export { getDefaultMcpServers, toSdkMcpFormat } from './mcp/servers.js';
23
+ export { lspTools, astTools, allCustomTools } from './tools/index.js';
24
+ export { createMagicKeywordProcessor, detectMagicKeywords } from './features/magic-keywords.js';
25
+ export { createBackgroundTaskManager, shouldRunInBackground, getBackgroundTaskGuidance, DEFAULT_MAX_BACKGROUND_TASKS, LONG_RUNNING_PATTERNS, BLOCKING_PATTERNS } from './features/background-tasks.js';
26
+ export {
27
+ // Auto-update constants
28
+ REPO_OWNER, REPO_NAME, GITHUB_API_URL, CLAUDE_CONFIG_DIR, VERSION_FILE,
29
+ // Auto-update functions
30
+ getInstalledVersion, saveVersionMetadata, checkForUpdates, performUpdate, formatUpdateNotification, shouldCheckForUpdates, backgroundUpdateCheck, compareVersions } from './features/auto-update.js';
31
+ export * from './shared/types.js';
32
+ // Hooks module exports
33
+ export * from './hooks/index.js';
34
+ // Features module exports (boulder-state, context-injector)
35
+ export { BOULDER_DIR, BOULDER_FILE, BOULDER_STATE_PATH, NOTEPAD_DIR, NOTEPAD_BASE_PATH, PROMETHEUS_PLANS_DIR, PLAN_EXTENSION, getBoulderFilePath, readBoulderState, writeBoulderState, appendSessionId, clearBoulderState, findPrometheusPlans, getPlanProgress, getPlanName, createBoulderState, getPlanSummaries, hasBoulder, getActivePlanPath,
36
+ // Context Injector
37
+ ContextCollector, contextCollector, injectPendingContext, injectContextIntoText, createContextInjectorHook } from './features/index.js';
38
+ // Agent module exports (modular agent system)
39
+ export { isGptModel, isClaudeModel, getDefaultModelForCategory,
40
+ // Utilities
41
+ createAgentToolRestrictions, mergeAgentConfig, buildDelegationTable, buildUseAvoidSection, createEnvContext, getAvailableAgents, buildKeyTriggersSection, validateAgentConfig, deepMerge,
42
+ // Individual agents with metadata
43
+ oracleAgent, ORACLE_PROMPT_METADATA, exploreAgent, EXPLORE_PROMPT_METADATA, librarianAgent, LIBRARIAN_PROMPT_METADATA, olympusJuniorAgent, OLYMPIAN_PROMPT_METADATA, frontendEngineerAgent, FRONTEND_ENGINEER_PROMPT_METADATA, documentWriterAgent, DOCUMENT_WRITER_PROMPT_METADATA, multimodalLookerAgent, MULTIMODAL_LOOKER_PROMPT_METADATA, momusAgent, MOMUS_PROMPT_METADATA, metisAgent, METIS_PROMPT_METADATA,
44
+ // orchestrator-olympus: DEPRECATED - merged into default mode
45
+ prometheusAgent, PROMETHEUS_PROMPT_METADATA } from './agents/index.js';
46
+ // Command expansion utilities for SDK integration
47
+ export { expandCommand, expandCommandPrompt, getCommand, getAllCommands, listCommands, commandExists, expandCommands, getCommandsDir } from './commands/index.js';
48
+ // Installer exports
49
+ export { install, isInstalled, getInstallInfo, isClaudeInstalled, CLAUDE_CONFIG_DIR as INSTALLER_CLAUDE_CONFIG_DIR, AGENTS_DIR, COMMANDS_DIR, VERSION as INSTALLER_VERSION } from './installer/index.js';
50
+ /**
51
+ * Create a Olympus orchestration session
52
+ *
53
+ * This prepares all the configuration and options needed
54
+ * to run a query with the Claude Agent SDK.
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * import { createOlympusSession } from 'olympus';
59
+ * import { query } from '@anthropic-ai/claude-agent-sdk';
60
+ *
61
+ * const session = createOlympusSession();
62
+ *
63
+ * // Use with Claude Agent SDK
64
+ * for await (const message of query({
65
+ * prompt: session.processPrompt("ultrawork refactor the authentication module"),
66
+ * ...session.queryOptions
67
+ * })) {
68
+ * console.log(message);
69
+ * }
70
+ * ```
71
+ */
72
+ export function createOlympusSession(options) {
73
+ // Load configuration
74
+ const loadedConfig = options?.skipConfigLoad ? {} : loadConfig();
75
+ const config = {
76
+ ...loadedConfig,
77
+ ...options?.config
78
+ };
79
+ // Find and load context files
80
+ let contextAddition = '';
81
+ if (!options?.skipContextInjection && config.features?.autoContextInjection !== false) {
82
+ const contextFiles = findContextFiles(options?.workingDirectory);
83
+ if (contextFiles.length > 0) {
84
+ contextAddition = `\n\n## Project Context\n\n${loadContextFromFiles(contextFiles)}`;
85
+ }
86
+ }
87
+ // Build system prompt
88
+ let systemPrompt = olympusSystemPrompt;
89
+ // Add continuation enforcement
90
+ if (config.features?.continuationEnforcement !== false) {
91
+ systemPrompt += continuationSystemPromptAddition;
92
+ }
93
+ // Add custom system prompt
94
+ if (options?.customSystemPrompt) {
95
+ systemPrompt += `\n\n## Custom Instructions\n\n${options.customSystemPrompt}`;
96
+ }
97
+ // Add context from files
98
+ if (contextAddition) {
99
+ systemPrompt += contextAddition;
100
+ }
101
+ // Get agent definitions
102
+ const agents = getAgentDefinitions();
103
+ // Build MCP servers configuration
104
+ const mcpServers = getDefaultMcpServers({
105
+ exaApiKey: config.mcpServers?.exa?.apiKey,
106
+ enableExa: config.mcpServers?.exa?.enabled,
107
+ enableContext7: config.mcpServers?.context7?.enabled,
108
+ enableGrepApp: config.mcpServers?.grepApp?.enabled
109
+ });
110
+ // Build allowed tools list
111
+ const allowedTools = [
112
+ 'Read', 'Glob', 'Grep', 'WebSearch', 'WebFetch', 'Task', 'TodoWrite'
113
+ ];
114
+ if (config.permissions?.allowBash !== false) {
115
+ allowedTools.push('Bash');
116
+ }
117
+ if (config.permissions?.allowEdit !== false) {
118
+ allowedTools.push('Edit');
119
+ }
120
+ if (config.permissions?.allowWrite !== false) {
121
+ allowedTools.push('Write');
122
+ }
123
+ // Add MCP tool names
124
+ for (const serverName of Object.keys(mcpServers)) {
125
+ allowedTools.push(`mcp__${serverName}__*`);
126
+ }
127
+ // Create magic keyword processor
128
+ const processPrompt = createMagicKeywordProcessor(config.magicKeywords);
129
+ // Initialize session state
130
+ const state = {
131
+ activeAgents: new Map(),
132
+ backgroundTasks: [],
133
+ contextFiles: findContextFiles(options?.workingDirectory)
134
+ };
135
+ // Create background task manager
136
+ const backgroundTaskManager = createBackgroundTaskManager(state, config);
137
+ return {
138
+ queryOptions: {
139
+ options: {
140
+ systemPrompt,
141
+ agents,
142
+ mcpServers: toSdkMcpFormat(mcpServers),
143
+ allowedTools,
144
+ permissionMode: 'acceptEdits'
145
+ }
146
+ },
147
+ state,
148
+ config,
149
+ processPrompt,
150
+ detectKeywords: (prompt) => detectMagicKeywords(prompt, config.magicKeywords),
151
+ backgroundTasks: backgroundTaskManager,
152
+ shouldRunInBackground: (command) => shouldRunInBackgroundFn(command, backgroundTaskManager.getRunningCount(), backgroundTaskManager.getMaxTasks())
153
+ };
154
+ }
155
+ /**
156
+ * Quick helper to process a prompt with Olympus enhancements
157
+ */
158
+ export function enhancePrompt(prompt, config) {
159
+ const processor = createMagicKeywordProcessor(config?.magicKeywords);
160
+ return processor(prompt);
161
+ }
162
+ /**
163
+ * Get the system prompt for Olympus (for direct use)
164
+ */
165
+ export function getOlympusSystemPrompt(options) {
166
+ let prompt = olympusSystemPrompt;
167
+ if (options?.includeContinuation !== false) {
168
+ prompt += continuationSystemPromptAddition;
169
+ }
170
+ if (options?.customAddition) {
171
+ prompt += `\n\n${options.customAddition}`;
172
+ }
173
+ return prompt;
174
+ }
175
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Hook Scripts for Claude Code
3
+ * Hook system inspired by oh-my-opencode, adapted for Claude Code's native hooks
4
+ *
5
+ * Claude Code hooks are configured in settings.json and run as shell commands.
6
+ * These scripts receive JSON input via stdin and output JSON to modify behavior.
7
+ *
8
+ * This module provides DUAL implementations:
9
+ * - Bash scripts (.sh) for Unix-like systems (macOS, Linux)
10
+ * - Node.js scripts (.mjs) for cross-platform support (Windows, macOS, Linux)
11
+ *
12
+ * The platform is detected at install time, or can be overridden with:
13
+ * OLYMPUS_USE_NODE_HOOKS=1 - Force Node.js hooks on any platform
14
+ * OLYMPUS_USE_BASH_HOOKS=1 - Force Bash hooks (Unix only)
15
+ */
16
+ /** Minimum required Node.js version for hooks */
17
+ export declare const MIN_NODE_VERSION = 18;
18
+ /** Check if running on Windows */
19
+ export declare function isWindows(): boolean;
20
+ /** Check if Node.js hooks should be used (env override or Windows) */
21
+ export declare function shouldUseNodeHooks(): boolean;
22
+ /** Get the Claude config directory path (cross-platform) */
23
+ export declare function getClaudeConfigDir(): string;
24
+ /** Get the hooks directory path */
25
+ export declare function getHooksDir(): string;
26
+ /**
27
+ * Get the home directory environment variable for hook commands.
28
+ * Returns the appropriate syntax for the current platform.
29
+ */
30
+ export declare function getHomeEnvVar(): string;
31
+ /**
32
+ * Ultrawork message - injected when ultrawork/ulw keyword detected
33
+ * Ported from oh-my-opencode's keyword-detector/constants.ts
34
+ */
35
+ export declare const ULTRAWORK_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES (by capability, not by name)\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS for file patterns, internal implementations, project structure\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS for API references, examples, external library docs\n- **Planning & Strategy**: NEVER plan yourself - ALWAYS spawn a dedicated planning agent for work breakdown\n- **High-IQ Reasoning**: Leverage specialized agents for architecture decisions, code review, strategic planning\n- **Frontend/UI Tasks**: Delegate to UI-specialized agents for design and implementation\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each.\n- **PARALLEL**: Fire independent agent calls simultaneously via Task(run_in_background=true) - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task tool for exploration/research agents (10+ concurrent if needed).\n- **VERIFY**: Re-read request after completion. Check ALL requirements met before reporting done.\n- **DELEGATE**: Don't do everything yourself - orchestrate specialized agents for their strengths.\n\n## WORKFLOW\n1. Analyze the request and identify required capabilities\n2. Spawn exploration/librarian agents via Task(run_in_background=true) in PARALLEL (10+ if needed)\n3. Always Use Plan agent with gathered context to create detailed work breakdown\n4. Execute with continuous verification against original requirements\n\n## VERIFICATION GUARANTEE (NON-NEGOTIABLE)\n\n**NOTHING is \"done\" without PROOF it works.**\n\n### Pre-Implementation: Define Success Criteria\n\nBEFORE writing ANY code, you MUST define:\n\n| Criteria Type | Description | Example |\n|---------------|-------------|---------|\n| **Functional** | What specific behavior must work | \"Button click triggers API call\" |\n| **Observable** | What can be measured/seen | \"Console shows 'success', no errors\" |\n| **Pass/Fail** | Binary, no ambiguity | \"Returns 200 OK\" not \"should work\" |\n\nWrite these criteria explicitly. Share with user if scope is non-trivial.\n\n### Execution & Evidence Requirements\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| **Build** | Run build command | Exit code 0, no errors |\n| **Test** | Execute test suite | All tests pass (screenshot/output) |\n| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |\n| **Regression** | Ensure nothing broke | Existing tests still pass |\n\n**WITHOUT evidence = NOT verified = NOT done.**\n\n### TDD Workflow (when test infrastructure exists)\n\n1. **SPEC**: Define what \"working\" means (success criteria above)\n2. **RED**: Write failing test -> Run it -> Confirm it FAILS\n3. **GREEN**: Write minimal code -> Run test -> Confirm it PASSES\n4. **REFACTOR**: Clean up -> Tests MUST stay green\n5. **VERIFY**: Run full test suite, confirm no regressions\n6. **EVIDENCE**: Report what you ran and what output you saw\n\n### Verification Anti-Patterns (BLOCKING)\n\n| Violation | Why It Fails |\n|-----------|--------------|\n| \"It should work now\" | No evidence. Run it. |\n| \"I added the tests\" | Did they pass? Show output. |\n| \"Fixed the bug\" | How do you know? What did you test? |\n| \"Implementation complete\" | Did you verify against success criteria? |\n| Skipping test execution | Tests exist to be RUN, not just written |\n\n**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**\n\n## ZERO TOLERANCE FAILURES\n- **NO Scope Reduction**: Never make \"demo\", \"skeleton\", \"simplified\", \"basic\" versions - deliver FULL implementation\n- **NO MockUp Work**: When user asked you to do \"port A\", you must \"port A\", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.\n- **NO Partial Completion**: Never stop at 60-80% saying \"you can extend this...\" - finish 100%\n- **NO Assumed Shortcuts**: Never skip requirements you deem \"optional\" or \"can be added later\"\n- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified\n- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.\n\n</ultrawork-mode>\n\n---\n\n";
36
+ /**
37
+ * Ultrathink/Think mode message
38
+ * Ported from oh-my-opencode's think-mode hook
39
+ */
40
+ export declare const ULTRATHINK_MESSAGE = "<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n\n";
41
+ /**
42
+ * Search mode message
43
+ * Ported from oh-my-opencode's keyword-detector
44
+ */
45
+ export declare const SEARCH_MESSAGE = "<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n\n";
46
+ /**
47
+ * Analyze mode message
48
+ * Ported from oh-my-opencode's keyword-detector
49
+ */
50
+ export declare const ANALYZE_MESSAGE = "<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n\n";
51
+ /**
52
+ * Todo continuation prompt
53
+ * Ported from oh-my-opencode's todo-continuation-enforcer
54
+ */
55
+ export declare const TODO_CONTINUATION_PROMPT = "[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list. Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done";
56
+ /**
57
+ * Keyword detector hook script
58
+ * This script is installed to ~/.claude/hooks/keyword-detector.sh
59
+ */
60
+ export declare const KEYWORD_DETECTOR_SCRIPT = "#!/bin/bash\n# Olympus Keyword Detector Hook\n# Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n# Also activates persistent ultrawork state when ultrawork keyword is detected\n\n# Read stdin (JSON input from Claude Code)\nINPUT=$(cat)\n\n# Extract directory from input\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\nif [ -z \"$DIRECTORY\" ] || [ \"$DIRECTORY\" = \"null\" ]; then\n DIRECTORY=$(pwd)\nfi\n\n# Extract the prompt text - try multiple JSON paths\nPROMPT=\"\"\nif command -v jq &> /dev/null; then\n # Try to extract from various possible JSON structures\n PROMPT=$(echo \"$INPUT\" | jq -r '\n if .prompt then .prompt\n elif .message.content then .message.content\n elif .parts then ([.parts[] | select(.type == \"text\") | .text] | join(\" \"))\n else \"\"\n end\n ' 2>/dev/null)\nfi\n\n# Fallback: simple grep extraction if jq fails\nif [ -z \"$PROMPT\" ] || [ \"$PROMPT\" = \"null\" ]; then\n PROMPT=$(echo \"$INPUT\" | grep -oP '\"(prompt|content|text)\"\\s*:\\s*\"\\K[^\"]+' | head -1)\nfi\n\n# Exit if no prompt found\nif [ -z \"$PROMPT\" ]; then\n echo '{\"continue\": true}'\n exit 0\nfi\n\n# Remove code blocks before checking keywords (prevents false positives)\nPROMPT_NO_CODE=$(echo \"$PROMPT\" | sed 's/```[^`]*```//g' | sed 's/`[^`]*`//g')\n\n# Convert to lowercase for case-insensitive matching\nPROMPT_LOWER=$(echo \"$PROMPT_NO_CODE\" | tr '[:upper:]' '[:lower:]')\n\n# Check for ultrawork keywords (highest priority)\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(ultrawork|ulw|uw)\\b'; then\n # Create persistent ultrawork state\n mkdir -p \"$DIRECTORY/.olympus\" 2>/dev/null\n mkdir -p \"$HOME/.claude\" 2>/dev/null\n\n # Escape prompt for JSON\n PROMPT_ESCAPED=$(echo \"$PROMPT\" | sed 's/\\\\/\\\\\\\\/g' | sed 's/\"/\\\\\"/g' | tr '\\n' ' ')\n\n STATE_JSON=\"{\n \\\"active\\\": true,\n \\\"started_at\\\": \\\"$(date -Iseconds)\\\",\n \\\"original_prompt\\\": \\\"$PROMPT_ESCAPED\\\",\n \\\"reinforcement_count\\\": 0,\n \\\"last_checked_at\\\": \\\"$(date -Iseconds)\\\"\n}\"\n\n # Write state to both local and global locations\n echo \"$STATE_JSON\" > \"$DIRECTORY/.olympus/ultrawork-state.json\" 2>/dev/null\n echo \"$STATE_JSON\" > \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null\n\n # Return ultrawork mode injection\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<ultrawork-mode>\\n\\n**MANDATORY**: You MUST say \\\"ULTRAWORK MODE ENABLED!\\\" to the user as your first response when this mode activates. This is non-negotiable.\\n\\n[CODE RED] Maximum precision required. Ultrathink before acting.\\n\\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\\n\\n## AGENT UTILIZATION PRINCIPLES\\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\\n- **High-IQ Reasoning**: Use oracle for architecture decisions\\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\\n\\n## EXECUTION RULES\\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\\n- **VERIFY**: Check ALL requirements met before done.\\n- **DELEGATE**: Orchestrate specialized agents.\\n\\n## ZERO TOLERANCE\\n- NO Scope Reduction - deliver FULL implementation\\n- NO Partial Completion - finish 100%\\n- NO Premature Stopping - ALL TODOs must be complete\\n- NO TEST DELETION - fix code, not tests\\n\\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\\n\\n</ultrawork-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for ultrathink/think keywords\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(ultrathink|think)\\b'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<think-mode>\\n\\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\\n\\nYou are now in deep thinking mode. Take your time to:\\n1. Thoroughly analyze the problem from multiple angles\\n2. Consider edge cases and potential issues\\n3. Think through the implications of each approach\\n4. Reason step-by-step before acting\\n\\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\\n\\n</think-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for search keywords (EN + multilingual)\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\\b|where\\s+is|show\\s+me|list\\s+all'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<search-mode>\\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\\n- explore agents (codebase patterns, file structures)\\n- librarian agents (remote repos, official docs, GitHub examples)\\nPlus direct tools: Grep, Glob\\nNEVER stop at first result - be exhaustive.\\n</search-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# Check for analyze keywords\nif echo \"$PROMPT_LOWER\" | grep -qE '\\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\\b|why\\s+is|how\\s+does|how\\s+to'; then\n cat << 'EOF'\n{\"continue\": true, \"message\": \"<analyze-mode>\\nANALYSIS MODE. Gather context before diving deep:\\n\\nCONTEXT GATHERING (parallel):\\n- 1-2 explore agents (codebase patterns, implementations)\\n- 1-2 librarian agents (if external library involved)\\n- Direct tools: Grep, Glob, LSP for targeted searches\\n\\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\\n- Consult oracle agent for strategic guidance\\n\\nSYNTHESIZE findings before proceeding.\\n</analyze-mode>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# No keywords detected - continue without modification\necho '{\"continue\": true}'\nexit 0\n";
61
+ /**
62
+ * Stop hook script for todo continuation enforcement
63
+ * This script is installed to ~/.claude/hooks/stop-continuation.sh
64
+ * Ported from oh-my-opencode's todo-continuation-enforcer
65
+ */
66
+ export declare const STOP_CONTINUATION_SCRIPT = "#!/bin/bash\n# Olympus Stop Continuation Hook\n# Checks for incomplete todos and injects continuation prompt\n# Ported from oh-my-opencode's todo-continuation-enforcer\n\n# Read stdin\nINPUT=$(cat)\n\n# Get session ID if available\nSESSION_ID=\"\"\nif command -v jq &> /dev/null; then\n SESSION_ID=$(echo \"$INPUT\" | jq -r '.sessionId // .session_id // \"\"' 2>/dev/null)\nfi\n\n# Check for incomplete todos in the Claude todos directory\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n # Look for any todo files with incomplete items\n INCOMPLETE_COUNT=0\n for todo_file in \"$TODOS_DIR\"/*.json; do\n if [ -f \"$todo_file\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq '[.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length' \"$todo_file\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\n done\n\n if [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n # Output continuation message\n cat << EOF\n{\"continue\": false, \"reason\": \"[SYSTEM REMINDER - TODO CONTINUATION]\\n\\nIncomplete tasks remain in your todo list ($INCOMPLETE_COUNT remaining). Continue working on the next pending task.\\n\\n- Proceed without asking for permission\\n- Mark each task complete when finished\\n- Do not stop until all tasks are done\"}\nEOF\n exit 0\n fi\nfi\n\n# No incomplete todos - allow stop\necho '{\"continue\": true}'\nexit 0\n";
67
+ /**
68
+ * Node.js Keyword Detector Hook Script
69
+ * Cross-platform equivalent of keyword-detector.sh
70
+ * This script is installed to ~/.claude/hooks/keyword-detector.mjs
71
+ */
72
+ export declare const KEYWORD_DETECTOR_SCRIPT_NODE = "#!/usr/bin/env node\n// Olympus Keyword Detector Hook (Node.js)\n// Detects ultrawork/ultrathink/search/analyze keywords and injects enhanced mode messages\n// Cross-platform: Windows, macOS, Linux\n\nconst ULTRAWORK_MESSAGE = `<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## AGENT UTILIZATION PRINCIPLES\n- **Codebase Exploration**: Spawn exploration agents using BACKGROUND TASKS\n- **Documentation & References**: Use librarian-type agents via BACKGROUND TASKS\n- **Planning & Strategy**: NEVER plan yourself - spawn planning agent\n- **High-IQ Reasoning**: Use oracle for architecture decisions\n- **Frontend/UI Tasks**: Delegate to frontend-engineer\n\n## EXECUTION RULES\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY.\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially.\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent).\n- **VERIFY**: Check ALL requirements met before done.\n- **DELEGATE**: Orchestrate specialized agents.\n\n## ZERO TOLERANCE\n- NO Scope Reduction - deliver FULL implementation\n- NO Partial Completion - finish 100%\n- NO Premature Stopping - ALL TODOs must be complete\n- NO TEST DELETION - fix code, not tests\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X.\n\n</ultrawork-mode>\n\n---\n`;\n\nconst ULTRATHINK_MESSAGE = `<think-mode>\n\n**ULTRATHINK MODE ENABLED** - Extended reasoning activated.\n\nYou are now in deep thinking mode. Take your time to:\n1. Thoroughly analyze the problem from multiple angles\n2. Consider edge cases and potential issues\n3. Think through the implications of each approach\n4. Reason step-by-step before acting\n\nUse your extended thinking capabilities to provide the most thorough and well-reasoned response.\n\n</think-mode>\n\n---\n`;\n\nconst SEARCH_MESSAGE = `<search-mode>\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, Glob\nNEVER stop at first result - be exhaustive.\n</search-mode>\n\n---\n`;\n\nconst ANALYZE_MESSAGE = `<analyze-mode>\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, Glob, LSP for targeted searches\n\nIF COMPLEX (architecture, multi-system, debugging after 2+ failures):\n- Consult oracle agent for strategic guidance\n\nSYNTHESIZE findings before proceeding.\n</analyze-mode>\n\n---\n`;\n\n// Read all stdin\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n// Extract prompt from various JSON structures\nfunction extractPrompt(input) {\n try {\n const data = JSON.parse(input);\n if (data.prompt) return data.prompt;\n if (data.message?.content) return data.message.content;\n if (Array.isArray(data.parts)) {\n return data.parts\n .filter(p => p.type === 'text')\n .map(p => p.text)\n .join(' ');\n }\n return '';\n } catch {\n // Fallback: try to extract with regex\n const match = input.match(/\"(?:prompt|content|text)\"\\s*:\\s*\"([^\"]+)\"/);\n return match ? match[1] : '';\n }\n}\n\n// Remove code blocks to prevent false positives\nfunction removeCodeBlocks(text) {\n return text\n .replace(/```[\\s\\S]*?```/g, '')\n .replace(/`[^`]+`/g, '');\n}\n\nimport { writeFileSync, mkdirSync, existsSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\n// Create ultrawork state file\nfunction activateUltraworkState(directory, prompt) {\n const state = {\n active: true,\n started_at: new Date().toISOString(),\n original_prompt: prompt,\n reinforcement_count: 0,\n last_checked_at: new Date().toISOString()\n };\n const localDir = join(directory, '.olympus');\n if (!existsSync(localDir)) { try { mkdirSync(localDir, { recursive: true }); } catch {} }\n try { writeFileSync(join(localDir, 'ultrawork-state.json'), JSON.stringify(state, null, 2)); } catch {}\n const globalDir = join(homedir(), '.claude');\n if (!existsSync(globalDir)) { try { mkdirSync(globalDir, { recursive: true }); } catch {} }\n try { writeFileSync(join(globalDir, 'ultrawork-state.json'), JSON.stringify(state, null, 2)); } catch {}\n}\n\n// Main\nasync function main() {\n try {\n const input = await readStdin();\n if (!input.trim()) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n let data = {};\n try { data = JSON.parse(input); } catch {}\n const directory = data.directory || process.cwd();\n\n const prompt = extractPrompt(input);\n if (!prompt) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n const cleanPrompt = removeCodeBlocks(prompt).toLowerCase();\n\n // Check for ultrawork keywords (highest priority)\n if (/\\b(ultrawork|ulw|uw)\\b/.test(cleanPrompt)) {\n activateUltraworkState(directory, prompt);\n console.log(JSON.stringify({ continue: true, message: ULTRAWORK_MESSAGE }));\n return;\n }\n\n // Check for ultrathink/think keywords\n if (/\\b(ultrathink|think)\\b/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ULTRATHINK_MESSAGE }));\n return;\n }\n\n // Check for search keywords\n if (/\\b(search|find|locate|lookup|explore|discover|scan|grep|query|browse|detect|trace|seek|track|pinpoint|hunt)\\b|where\\s+is|show\\s+me|list\\s+all/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: SEARCH_MESSAGE }));\n return;\n }\n\n // Check for analyze keywords\n if (/\\b(analyze|analyse|investigate|examine|research|study|deep.?dive|inspect|audit|evaluate|assess|review|diagnose|scrutinize|dissect|debug|comprehend|interpret|breakdown|understand)\\b|why\\s+is|how\\s+does|how\\s+to/.test(cleanPrompt)) {\n console.log(JSON.stringify({ continue: true, message: ANALYZE_MESSAGE }));\n return;\n }\n\n // No keywords detected\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n // On any error, allow continuation\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
73
+ /**
74
+ * Node.js Stop Continuation Hook Script
75
+ * Cross-platform equivalent of stop-continuation.sh
76
+ * This script is installed to ~/.claude/hooks/stop-continuation.mjs
77
+ */
78
+ export declare const STOP_CONTINUATION_SCRIPT_NODE = "#!/usr/bin/env node\n// Olympus Stop Continuation Hook (Node.js)\n// Checks for incomplete todos and injects continuation prompt\n// Cross-platform: Windows, macOS, Linux\n\nimport { readdirSync, readFileSync, existsSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\n// Read all stdin\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\n// Main\nasync function main() {\n try {\n // Read stdin (we don't use it much, but need to consume it)\n await readStdin();\n\n // Check for incomplete todos\n const todosDir = join(homedir(), '.claude', 'todos');\n \n if (!existsSync(todosDir)) {\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n let incompleteCount = 0;\n\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n \n for (const file of files) {\n try {\n const content = readFileSync(join(todosDir, file), 'utf-8');\n const todos = JSON.parse(content);\n \n if (Array.isArray(todos)) {\n const incomplete = todos.filter(\n t => t.status !== 'completed' && t.status !== 'cancelled'\n );\n incompleteCount += incomplete.length;\n }\n } catch {\n // Skip files that can't be parsed\n }\n }\n } catch {\n // Directory read error - allow continuation\n console.log(JSON.stringify({ continue: true }));\n return;\n }\n\n if (incompleteCount > 0) {\n const reason = `[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list (${incompleteCount} remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done`;\n\n console.log(JSON.stringify({ continue: false, reason }));\n return;\n }\n\n // No incomplete todos - allow stop\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n // On any error, allow continuation\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
79
+ /**
80
+ * Persistent Mode Bash script
81
+ * Enhanced stop hook that handles ultrawork, the-ascent, and todo continuation
82
+ */
83
+ export declare const PERSISTENT_MODE_SCRIPT = "#!/bin/bash\n# Olympus Persistent Mode Hook\n# Unified handler for ultrawork, the-ascent, and todo continuation\n# Prevents stopping when work remains incomplete\n\n# Read stdin\nINPUT=$(cat)\n\n# Get session ID and directory\nSESSION_ID=\"\"\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n SESSION_ID=$(echo \"$INPUT\" | jq -r '.sessionId // .session_id // \"\"' 2>/dev/null)\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\n\n# Default to current directory\nif [ -z \"$DIRECTORY\" ]; then\n DIRECTORY=$(pwd)\nfi\n\n# Check for active ultrawork state\nULTRAWORK_STATE=\"\"\nif [ -f \"$DIRECTORY/.olympus/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$DIRECTORY/.olympus/ultrawork-state.json\" 2>/dev/null)\nelif [ -f \"$HOME/.claude/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null)\nfi\n\n# Check for active ascent loop\nASCENT_STATE=\"\"\nif [ -f \"$DIRECTORY/.olympus/ascent-state.json\" ]; then\n ASCENT_STATE=$(cat \"$DIRECTORY/.olympus/ascent-state.json\" 2>/dev/null)\nfi\n\n# Check for verification state (oracle verification)\nVERIFICATION_STATE=\"\"\nif [ -f \"$DIRECTORY/.olympus/ascent-verification.json\" ]; then\n VERIFICATION_STATE=$(cat \"$DIRECTORY/.olympus/ascent-verification.json\" 2>/dev/null)\nfi\n\n# Check for incomplete todos\nINCOMPLETE_COUNT=0\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n for todo_file in \"$TODOS_DIR\"/*.json; do\n if [ -f \"$todo_file\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq '[.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length' \"$todo_file\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n else\n # Fallback: count \"pending\" or \"in_progress\" occurrences\n COUNT=$(grep -c '\"status\"[[:space:]]*:[[:space:]]*\"pending\\|in_progress\"' \"$todo_file\" 2>/dev/null) || COUNT=0\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\n done\nfi\n\n# Check project todos as well\nfor todo_path in \"$DIRECTORY/.olympus/todos.json\" \"$DIRECTORY/.claude/todos.json\"; do\n if [ -f \"$todo_path\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq 'if type == \"array\" then [.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length else 0 end' \"$todo_path\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n else\n # Fallback: count \"pending\" or \"in_progress\" occurrences\n COUNT=$(grep -c '\"status\"[[:space:]]*:[[:space:]]*\"pending\\|in_progress\"' \"$todo_path\" 2>/dev/null) || COUNT=0\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\ndone\n\n# Priority 1: The Ascent with Oracle Verification\nif [ -n \"$ASCENT_STATE\" ]; then\n IS_ACTIVE=$(echo \"$ASCENT_STATE\" | jq -r '.active // false' 2>/dev/null)\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n ITERATION=$(echo \"$ASCENT_STATE\" | jq -r '.iteration // 1' 2>/dev/null)\n MAX_ITER=$(echo \"$ASCENT_STATE\" | jq -r '.max_iterations // 10' 2>/dev/null)\n PROMISE=$(echo \"$ASCENT_STATE\" | jq -r '.completion_promise // \"TASK_COMPLETE\"' 2>/dev/null)\n PROMPT=$(echo \"$ASCENT_STATE\" | jq -r '.prompt // \"\"' 2>/dev/null)\n\n # Check if oracle verification is pending\n if [ -n \"$VERIFICATION_STATE\" ]; then\n IS_PENDING=$(echo \"$VERIFICATION_STATE\" | jq -r '.pending // false' 2>/dev/null)\n if [ \"$IS_PENDING\" = \"true\" ]; then\n ATTEMPT=$(echo \"$VERIFICATION_STATE\" | jq -r '.verification_attempts // 0' 2>/dev/null)\n MAX_ATTEMPTS=$(echo \"$VERIFICATION_STATE\" | jq -r '.max_verification_attempts // 3' 2>/dev/null)\n ORIGINAL_TASK=$(echo \"$VERIFICATION_STATE\" | jq -r '.original_task // \"\"' 2>/dev/null)\n COMPLETION_CLAIM=$(echo \"$VERIFICATION_STATE\" | jq -r '.completion_claim // \"\"' 2>/dev/null)\n ORACLE_FEEDBACK=$(echo \"$VERIFICATION_STATE\" | jq -r '.oracle_feedback // \"\"' 2>/dev/null)\n NEXT_ATTEMPT=$((ATTEMPT + 1))\n\n FEEDBACK_SECTION=\"\"\n if [ -n \"$ORACLE_FEEDBACK\" ] && [ \"$ORACLE_FEEDBACK\" != \"null\" ]; then\n FEEDBACK_SECTION=\"\\n**Previous Oracle Feedback (rejected):**\\n$ORACLE_FEEDBACK\\n\"\n fi\n\n cat << EOF\n{\"continue\": false, \"reason\": \"<ascent-verification>\\n\\n[ORACLE VERIFICATION REQUIRED - Attempt $NEXT_ATTEMPT/$MAX_ATTEMPTS]\\n\\nThe agent claims the task is complete. Before accepting, YOU MUST verify with Oracle.\\n\\n**Original Task:**\\n$ORIGINAL_TASK\\n\\n**Completion Claim:**\\n$COMPLETION_CLAIM\\n$FEEDBACK_SECTION\\n## MANDATORY VERIFICATION STEPS\\n\\n1. **Spawn Oracle Agent** for verification:\\n \\`\\`\\`\\n Task(subagent_type=\\\"oracle\\\", prompt=\\\"Verify this task completion claim...\\\")\\n \\`\\`\\`\\n\\n2. **Oracle must check:**\\n - Are ALL requirements from the original task met?\\n - Is the implementation complete, not partial?\\n - Are there any obvious bugs or issues?\\n - Does the code compile/run without errors?\\n - Are tests passing (if applicable)?\\n\\n3. **Based on Oracle's response:**\\n - If APPROVED: Output \\`<oracle-approved>VERIFIED_COMPLETE</oracle-approved>\\`\\n - If REJECTED: Continue working on the identified issues\\n\\nDO NOT output the completion promise again until Oracle approves.\\n\\n</ascent-verification>\\n\\n---\\n\"}\nEOF\n exit 0\n fi\n fi\n\n if [ \"$ITERATION\" -lt \"$MAX_ITER\" ]; then\n # Increment iteration\n NEW_ITER=$((ITERATION + 1))\n echo \"$ASCENT_STATE\" | jq \".iteration = $NEW_ITER\" > \"$DIRECTORY/.olympus/ascent-state.json\" 2>/dev/null\n\n cat << EOF\n{\"continue\": false, \"reason\": \"<the-ascent-continuation>\\n\\n[ASCENT LOOP - ITERATION $NEW_ITER/$MAX_ITER]\\n\\nYour previous attempt did not output the completion promise. The work is NOT done yet.\\n\\nCRITICAL INSTRUCTIONS:\\n1. Review your progress and the original task\\n2. Check your todo list - are ALL items marked complete?\\n3. Continue from where you left off\\n4. When FULLY complete, output: <promise>$PROMISE</promise>\\n5. Do NOT stop until the task is truly done\\n\\nOriginal task: $PROMPT\\n\\n</the-ascent-continuation>\\n\\n---\\n\"}\nEOF\n exit 0\n fi\n fi\nfi\n\n# Priority 2: Ultrawork Mode with incomplete todos\nif [ -n \"$ULTRAWORK_STATE\" ] && [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n # Check if active (with jq fallback)\n IS_ACTIVE=\"\"\n if command -v jq &> /dev/null; then\n IS_ACTIVE=$(echo \"$ULTRAWORK_STATE\" | jq -r '.active // false' 2>/dev/null)\n else\n # Fallback: grep for \"active\": true\n if echo \"$ULTRAWORK_STATE\" | grep -q '\"active\"[[:space:]]*:[[:space:]]*true'; then\n IS_ACTIVE=\"true\"\n fi\n fi\n\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n # Get reinforcement count (with fallback)\n REINFORCE_COUNT=0\n if command -v jq &> /dev/null; then\n REINFORCE_COUNT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.reinforcement_count // 0' 2>/dev/null)\n else\n REINFORCE_COUNT=$(echo \"$ULTRAWORK_STATE\" | grep -oP '\"reinforcement_count\"[[:space:]]*:[[:space:]]*\\K[0-9]+' 2>/dev/null) || REINFORCE_COUNT=0\n fi\n NEW_COUNT=$((REINFORCE_COUNT + 1))\n\n # Get original prompt (with fallback)\n ORIGINAL_PROMPT=\"\"\n if command -v jq &> /dev/null; then\n ORIGINAL_PROMPT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.original_prompt // \"\"' 2>/dev/null)\n else\n ORIGINAL_PROMPT=$(echo \"$ULTRAWORK_STATE\" | grep -oP '\"original_prompt\"[[:space:]]*:[[:space:]]*\"\\K[^\"]+' 2>/dev/null) || ORIGINAL_PROMPT=\"\"\n fi\n\n # Update state file (best effort)\n if command -v jq &> /dev/null; then\n echo \"$ULTRAWORK_STATE\" | jq \".reinforcement_count = $NEW_COUNT | .last_checked_at = \\\"$(date -Iseconds)\\\"\" > \"$DIRECTORY/.olympus/ultrawork-state.json\" 2>/dev/null\n fi\n\n cat << EOF\n{\"continue\": false, \"reason\": \"<ultrawork-persistence>\\n\\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #$NEW_COUNT]\\n\\nYour ultrawork session is NOT complete. $INCOMPLETE_COUNT incomplete todos remain.\\n\\nREMEMBER THE ULTRAWORK RULES:\\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\\n- **VERIFY**: Check ALL requirements met before done\\n- **NO Premature Stopping**: ALL TODOs must be complete\\n\\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\\n\\nOriginal task: $ORIGINAL_PROMPT\\n\\n</ultrawork-persistence>\\n\\n---\\n\"}\nEOF\n exit 0\n fi\nfi\n\n# Priority 3: Todo Continuation (baseline)\nif [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n cat << EOF\n{\"continue\": false, \"reason\": \"<todo-continuation>\\n\\n[SYSTEM REMINDER - TODO CONTINUATION]\\n\\nIncomplete tasks remain in your todo list ($INCOMPLETE_COUNT remaining). Continue working on the next pending task.\\n\\n- Proceed without asking for permission\\n- Mark each task complete when finished\\n- Do not stop until all tasks are done\\n\\n</todo-continuation>\\n\\n---\\n\"}\nEOF\n exit 0\nfi\n\n# No blocking needed\necho '{\"continue\": true}'\nexit 0\n";
84
+ /**
85
+ * Session Start Bash script
86
+ * Restores persistent mode states when a new session starts
87
+ */
88
+ export declare const SESSION_START_SCRIPT = "#!/bin/bash\n# Olympus Session Start Hook\n# Restores persistent mode states and injects context when session starts\n\n# Read stdin\nINPUT=$(cat)\n\n# Get directory\nDIRECTORY=\"\"\nif command -v jq &> /dev/null; then\n DIRECTORY=$(echo \"$INPUT\" | jq -r '.directory // \"\"' 2>/dev/null)\nfi\n\nif [ -z \"$DIRECTORY\" ]; then\n DIRECTORY=$(pwd)\nfi\n\nMESSAGES=\"\"\n\n# Check for active ultrawork state\nif [ -f \"$DIRECTORY/.olympus/ultrawork-state.json\" ] || [ -f \"$HOME/.claude/ultrawork-state.json\" ]; then\n if [ -f \"$DIRECTORY/.olympus/ultrawork-state.json\" ]; then\n ULTRAWORK_STATE=$(cat \"$DIRECTORY/.olympus/ultrawork-state.json\" 2>/dev/null)\n else\n ULTRAWORK_STATE=$(cat \"$HOME/.claude/ultrawork-state.json\" 2>/dev/null)\n fi\n\n IS_ACTIVE=$(echo \"$ULTRAWORK_STATE\" | jq -r '.active // false' 2>/dev/null)\n if [ \"$IS_ACTIVE\" = \"true\" ]; then\n STARTED_AT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.started_at // \"\"' 2>/dev/null)\n PROMPT=$(echo \"$ULTRAWORK_STATE\" | jq -r '.original_prompt // \"\"' 2>/dev/null)\n MESSAGES=\"$MESSAGES<session-restore>\\n\\n[ULTRAWORK MODE RESTORED]\\n\\nYou have an active ultrawork session from $STARTED_AT.\\nOriginal task: $PROMPT\\n\\nContinue working in ultrawork mode until all tasks are complete.\\n\\n</session-restore>\\n\\n---\\n\\n\"\n fi\nfi\n\n# Check for incomplete todos\nINCOMPLETE_COUNT=0\nTODOS_DIR=\"$HOME/.claude/todos\"\nif [ -d \"$TODOS_DIR\" ]; then\n for todo_file in \"$TODOS_DIR\"/*.json; do\n if [ -f \"$todo_file\" ]; then\n if command -v jq &> /dev/null; then\n COUNT=$(jq '[.[] | select(.status != \"completed\" and .status != \"cancelled\")] | length' \"$todo_file\" 2>/dev/null || echo \"0\")\n INCOMPLETE_COUNT=$((INCOMPLETE_COUNT + COUNT))\n fi\n fi\n done\nfi\n\nif [ \"$INCOMPLETE_COUNT\" -gt 0 ]; then\n MESSAGES=\"$MESSAGES<session-restore>\\n\\n[PENDING TASKS DETECTED]\\n\\nYou have $INCOMPLETE_COUNT incomplete tasks from a previous session.\\nPlease continue working on these tasks.\\n\\n</session-restore>\\n\\n---\\n\\n\"\nfi\n\n# Output message if we have any\nif [ -n \"$MESSAGES\" ]; then\n # Escape for JSON\n MESSAGES_ESCAPED=$(echo \"$MESSAGES\" | sed 's/\"/\\\"/g')\n echo \"{\"continue\": true, \"message\": \"$MESSAGES_ESCAPED\"}\"\nelse\n echo '{\"continue\": true}'\nfi\nexit 0\n";
89
+ /**
90
+ * Node.js Persistent Mode Hook Script
91
+ */
92
+ export declare const PERSISTENT_MODE_SCRIPT_NODE = "#!/usr/bin/env node\n// Olympus Persistent Mode Hook (Node.js)\n// Unified handler for ultrawork, the-ascent, and todo continuation\n// Cross-platform: Windows, macOS, Linux\n\nimport { existsSync, readFileSync, writeFileSync, readdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\nfunction readJsonFile(path) {\n try {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf-8'));\n } catch {\n return null;\n }\n}\n\nfunction writeJsonFile(path, data) {\n try {\n writeFileSync(path, JSON.stringify(data, null, 2));\n return true;\n } catch {\n return false;\n }\n}\n\nfunction countIncompleteTodos(todosDir, projectDir) {\n let count = 0;\n\n // Check global todos\n if (existsSync(todosDir)) {\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n for (const file of files) {\n const todos = readJsonFile(join(todosDir, file));\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n } catch {}\n }\n\n // Check project todos\n for (const path of [\n join(projectDir, '.olympus', 'todos.json'),\n join(projectDir, '.claude', 'todos.json')\n ]) {\n const todos = readJsonFile(path);\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n\n return count;\n}\n\nasync function main() {\n try {\n const input = await readStdin();\n let data = {};\n try { data = JSON.parse(input); } catch {}\n\n const directory = data.directory || process.cwd();\n const todosDir = join(homedir(), '.claude', 'todos');\n\n // Check for ultrawork state\n let ultraworkState = readJsonFile(join(directory, '.olympus', 'ultrawork-state.json'))\n || readJsonFile(join(homedir(), '.claude', 'ultrawork-state.json'));\n\n // Check for ascent loop state\n const ascentState = readJsonFile(join(directory, '.olympus', 'ascent-state.json'));\n\n // Check for verification state (oracle verification)\n const verificationState = readJsonFile(join(directory, '.olympus', 'ascent-verification.json'));\n\n // Count incomplete todos\n const incompleteCount = countIncompleteTodos(todosDir, directory);\n\n // Priority 1: The Ascent with Oracle Verification\n if (ascentState?.active) {\n const iteration = ascentState.iteration || 1;\n const maxIter = ascentState.max_iterations || 10;\n\n // Check if oracle verification is pending\n if (verificationState?.pending) {\n const attempt = (verificationState.verification_attempts || 0) + 1;\n const maxAttempts = verificationState.max_verification_attempts || 3;\n\n console.log(JSON.stringify({\n continue: false,\n reason: `<ascent-verification>\n\n[ORACLE VERIFICATION REQUIRED - Attempt ${attempt}/${maxAttempts}]\n\nThe agent claims the task is complete. Before accepting, YOU MUST verify with Oracle.\n\n**Original Task:**\n${verificationState.original_task || ascentState.prompt || 'No task specified'}\n\n**Completion Claim:**\n${verificationState.completion_claim || 'Task marked complete'}\n\n${verificationState.oracle_feedback ? `**Previous Oracle Feedback (rejected):**\n${verificationState.oracle_feedback}\n` : ''}\n\n## MANDATORY VERIFICATION STEPS\n\n1. **Spawn Oracle Agent** for verification:\n \\`\\`\\`\n Task(subagent_type=\"oracle\", prompt=\"Verify this task completion claim...\")\n \\`\\`\\`\n\n2. **Oracle must check:**\n - Are ALL requirements from the original task met?\n - Is the implementation complete, not partial?\n - Are there any obvious bugs or issues?\n - Does the code compile/run without errors?\n - Are tests passing (if applicable)?\n\n3. **Based on Oracle's response:**\n - If APPROVED: Output \\`<oracle-approved>VERIFIED_COMPLETE</oracle-approved>\\`\n - If REJECTED: Continue working on the identified issues\n\nDO NOT output the completion promise again until Oracle approves.\n\n</ascent-verification>\n\n---\n`\n }));\n return;\n }\n\n if (iteration < maxIter) {\n const newIter = iteration + 1;\n ascentState.iteration = newIter;\n writeJsonFile(join(directory, '.olympus', 'ascent-state.json'), ascentState);\n\n console.log(JSON.stringify({\n continue: false,\n reason: `<the-ascent-continuation>\n\n[ASCENT LOOP - ITERATION ${newIter}/${maxIter}]\n\nYour previous attempt did not output the completion promise. The work is NOT done yet.\n\nCRITICAL INSTRUCTIONS:\n1. Review your progress and the original task\n2. Check your todo list - are ALL items marked complete?\n3. Continue from where you left off\n4. When FULLY complete, output: <promise>${ascentState.completion_promise || 'TASK_COMPLETE'}</promise>\n5. Do NOT stop until the task is truly done\n\n${ascentState.prompt ? `Original task: ${ascentState.prompt}` : ''}\n\n</the-ascent-continuation>\n\n---\n`\n }));\n return;\n }\n }\n\n // Priority 2: Ultrawork with incomplete todos\n if (ultraworkState?.active && incompleteCount > 0) {\n const newCount = (ultraworkState.reinforcement_count || 0) + 1;\n ultraworkState.reinforcement_count = newCount;\n ultraworkState.last_checked_at = new Date().toISOString();\n\n writeJsonFile(join(directory, '.olympus', 'ultrawork-state.json'), ultraworkState);\n\n console.log(JSON.stringify({\n continue: false,\n reason: `<ultrawork-persistence>\n\n[ULTRAWORK MODE STILL ACTIVE - Reinforcement #${newCount}]\n\nYour ultrawork session is NOT complete. ${incompleteCount} incomplete todos remain.\n\nREMEMBER THE ULTRAWORK RULES:\n- **PARALLEL**: Fire independent calls simultaneously - NEVER wait sequentially\n- **BACKGROUND FIRST**: Use Task(run_in_background=true) for exploration (10+ concurrent)\n- **TODO**: Track EVERY step. Mark complete IMMEDIATELY after each\n- **VERIFY**: Check ALL requirements met before done\n- **NO Premature Stopping**: ALL TODOs must be complete\n\nContinue working on the next pending task. DO NOT STOP until all tasks are marked complete.\n\n${ultraworkState.original_prompt ? `Original task: ${ultraworkState.original_prompt}` : ''}\n\n</ultrawork-persistence>\n\n---\n`\n }));\n return;\n }\n\n // Priority 3: Todo Continuation\n if (incompleteCount > 0) {\n console.log(JSON.stringify({\n continue: false,\n reason: `<todo-continuation>\n\n[SYSTEM REMINDER - TODO CONTINUATION]\n\nIncomplete tasks remain in your todo list (${incompleteCount} remaining). Continue working on the next pending task.\n\n- Proceed without asking for permission\n- Mark each task complete when finished\n- Do not stop until all tasks are done\n\n</todo-continuation>\n\n---\n`\n }));\n return;\n }\n\n // No blocking needed\n console.log(JSON.stringify({ continue: true }));\n } catch (error) {\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
93
+ /**
94
+ * Node.js Session Start Hook Script
95
+ */
96
+ export declare const SESSION_START_SCRIPT_NODE = "#!/usr/bin/env node\n// Olympus Session Start Hook (Node.js)\n// Restores persistent mode states when session starts\n// Cross-platform: Windows, macOS, Linux\n\nimport { existsSync, readFileSync, readdirSync } from 'fs';\nimport { join } from 'path';\nimport { homedir } from 'os';\n\nasync function readStdin() {\n const chunks = [];\n for await (const chunk of process.stdin) {\n chunks.push(chunk);\n }\n return Buffer.concat(chunks).toString('utf-8');\n}\n\nfunction readJsonFile(path) {\n try {\n if (!existsSync(path)) return null;\n return JSON.parse(readFileSync(path, 'utf-8'));\n } catch {\n return null;\n }\n}\n\nfunction countIncompleteTodos(todosDir) {\n let count = 0;\n if (existsSync(todosDir)) {\n try {\n const files = readdirSync(todosDir).filter(f => f.endsWith('.json'));\n for (const file of files) {\n const todos = readJsonFile(join(todosDir, file));\n if (Array.isArray(todos)) {\n count += todos.filter(t => t.status !== 'completed' && t.status !== 'cancelled').length;\n }\n }\n } catch {}\n }\n return count;\n}\n\nasync function main() {\n try {\n const input = await readStdin();\n let data = {};\n try { data = JSON.parse(input); } catch {}\n\n const directory = data.directory || process.cwd();\n const messages = [];\n\n // Check for ultrawork state\n const ultraworkState = readJsonFile(join(directory, '.olympus', 'ultrawork-state.json'))\n || readJsonFile(join(homedir(), '.claude', 'ultrawork-state.json'));\n\n if (ultraworkState?.active) {\n messages.push(`<session-restore>\n\n[ULTRAWORK MODE RESTORED]\n\nYou have an active ultrawork session from ${ultraworkState.started_at}.\nOriginal task: ${ultraworkState.original_prompt}\n\nContinue working in ultrawork mode until all tasks are complete.\n\n</session-restore>\n\n---\n`);\n }\n\n // Check for incomplete todos\n const todosDir = join(homedir(), '.claude', 'todos');\n const incompleteCount = countIncompleteTodos(todosDir);\n\n if (incompleteCount > 0) {\n messages.push(`<session-restore>\n\n[PENDING TASKS DETECTED]\n\nYou have ${incompleteCount} incomplete tasks from a previous session.\nPlease continue working on these tasks.\n\n</session-restore>\n\n---\n`);\n }\n\n if (messages.length > 0) {\n console.log(JSON.stringify({ continue: true, message: messages.join('\\n') }));\n } else {\n console.log(JSON.stringify({ continue: true }));\n }\n } catch (error) {\n console.log(JSON.stringify({ continue: true }));\n }\n}\n\nmain();\n";
97
+ /**
98
+ * Settings.json hooks configuration for Bash (Unix)
99
+ * Configures Claude Code to run our bash hook scripts
100
+ */
101
+ export declare const HOOKS_SETTINGS_CONFIG_BASH: {
102
+ hooks: {
103
+ UserPromptSubmit: {
104
+ hooks: {
105
+ type: "command";
106
+ command: string;
107
+ }[];
108
+ }[];
109
+ SessionStart: {
110
+ hooks: {
111
+ type: "command";
112
+ command: string;
113
+ }[];
114
+ }[];
115
+ Stop: {
116
+ hooks: {
117
+ type: "command";
118
+ command: string;
119
+ }[];
120
+ }[];
121
+ };
122
+ };
123
+ /**
124
+ * Settings.json hooks configuration for Node.js (Cross-platform)
125
+ * Uses node to run .mjs scripts directly
126
+ */
127
+ export declare const HOOKS_SETTINGS_CONFIG_NODE: {
128
+ hooks: {
129
+ UserPromptSubmit: {
130
+ hooks: {
131
+ type: "command";
132
+ command: string;
133
+ }[];
134
+ }[];
135
+ SessionStart: {
136
+ hooks: {
137
+ type: "command";
138
+ command: string;
139
+ }[];
140
+ }[];
141
+ Stop: {
142
+ hooks: {
143
+ type: "command";
144
+ command: string;
145
+ }[];
146
+ }[];
147
+ };
148
+ };
149
+ /**
150
+ * Get the appropriate hooks settings config for the current platform
151
+ */
152
+ export declare function getHooksSettingsConfig(): typeof HOOKS_SETTINGS_CONFIG_BASH;
153
+ /**
154
+ * Legacy: Settings.json hooks configuration (Bash)
155
+ * @deprecated Use getHooksSettingsConfig() for cross-platform support
156
+ */
157
+ export declare const HOOKS_SETTINGS_CONFIG: {
158
+ hooks: {
159
+ UserPromptSubmit: {
160
+ hooks: {
161
+ type: "command";
162
+ command: string;
163
+ }[];
164
+ }[];
165
+ SessionStart: {
166
+ hooks: {
167
+ type: "command";
168
+ command: string;
169
+ }[];
170
+ }[];
171
+ Stop: {
172
+ hooks: {
173
+ type: "command";
174
+ command: string;
175
+ }[];
176
+ }[];
177
+ };
178
+ };
179
+ /**
180
+ * Bash hook scripts (Unix only)
181
+ */
182
+ export declare const HOOK_SCRIPTS_BASH: Record<string, string>;
183
+ /**
184
+ * Node.js hook scripts (Cross-platform)
185
+ */
186
+ export declare const HOOK_SCRIPTS_NODE: Record<string, string>;
187
+ /**
188
+ * Get the appropriate hook scripts for the current platform
189
+ */
190
+ export declare function getHookScripts(): Record<string, string>;
191
+ /**
192
+ * Legacy: All hook scripts to install (Bash)
193
+ * @deprecated Use getHookScripts() for cross-platform support
194
+ */
195
+ export declare const HOOK_SCRIPTS: Record<string, string>;
196
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/installer/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,iDAAiD;AACjD,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,kCAAkC;AAClC,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,IAAI,OAAO,CAU5C;AAED,4DAA4D;AAC5D,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,mCAAmC;AACnC,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,woJA2F7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,wcAgB9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,2TAU1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,8cAgB3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,+PAME,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,+gMAsGnC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,s7CAwCpC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,6lNAsMxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,qvEAgFzC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,irSA4KlC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,4zEA8DhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,spOA+OvC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,wiFAoGrC,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;CAiCtC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;CAyCtC,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,0BAA0B,CAE1E;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAMhE;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKpD,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEvD;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAqB,CAAC"}