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
@@ -0,0 +1,69 @@
1
+ export const HOOK_NAME = "non-interactive-env";
2
+ export const NON_INTERACTIVE_ENV = {
3
+ CI: "true",
4
+ DEBIAN_FRONTEND: "noninteractive",
5
+ GIT_TERMINAL_PROMPT: "0",
6
+ GCM_INTERACTIVE: "never",
7
+ HOMEBREW_NO_AUTO_UPDATE: "1",
8
+ // Block interactive editors - git rebase, commit, etc.
9
+ GIT_EDITOR: ":",
10
+ EDITOR: ":",
11
+ VISUAL: "",
12
+ GIT_SEQUENCE_EDITOR: ":",
13
+ GIT_MERGE_AUTOEDIT: "no",
14
+ // Block pagers
15
+ GIT_PAGER: "cat",
16
+ PAGER: "cat",
17
+ // NPM non-interactive
18
+ npm_config_yes: "true",
19
+ // Pip non-interactive
20
+ PIP_NO_INPUT: "1",
21
+ // Yarn non-interactive
22
+ YARN_ENABLE_IMMUTABLE_INSTALLS: "false",
23
+ };
24
+ /**
25
+ * Shell command guidance for non-interactive environments.
26
+ * These patterns should be followed to avoid hanging on user input.
27
+ */
28
+ export const SHELL_COMMAND_PATTERNS = {
29
+ // Package managers - always use non-interactive flags
30
+ npm: {
31
+ bad: ["npm init", "npm install (prompts)"],
32
+ good: ["npm init -y", "npm install --yes"],
33
+ },
34
+ apt: {
35
+ bad: ["apt-get install pkg"],
36
+ good: ["apt-get install -y pkg", "DEBIAN_FRONTEND=noninteractive apt-get install pkg"],
37
+ },
38
+ pip: {
39
+ bad: ["pip install pkg (with prompts)"],
40
+ good: ["pip install --no-input pkg", "PIP_NO_INPUT=1 pip install pkg"],
41
+ },
42
+ // Git operations - always provide messages/flags
43
+ git: {
44
+ bad: ["git commit", "git merge branch", "git add -p", "git rebase -i"],
45
+ good: ["git commit -m 'msg'", "git merge --no-edit branch", "git add .", "git rebase --no-edit"],
46
+ },
47
+ // System commands - force flags
48
+ system: {
49
+ bad: ["rm file (prompts)", "cp a b (prompts)", "ssh host"],
50
+ good: ["rm -f file", "cp -f a b", "ssh -o BatchMode=yes host", "unzip -o file.zip"],
51
+ },
52
+ // Banned commands - will always hang
53
+ banned: [
54
+ "vim", "nano", "vi", "emacs", // Editors
55
+ "less", "more", "man", // Pagers
56
+ "python (REPL)", "node (REPL)", // REPLs without -c/-e
57
+ "git add -p", "git rebase -i", // Interactive git modes
58
+ ],
59
+ // Workarounds for scripts that require input
60
+ workarounds: {
61
+ yesPipe: "yes | ./script.sh",
62
+ heredoc: `./script.sh <<EOF
63
+ option1
64
+ option2
65
+ EOF`,
66
+ expectAlternative: "Use environment variables or config files instead of expect",
67
+ },
68
+ };
69
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG,qBAAqB,CAAA;AAE9C,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACzD,EAAE,EAAE,MAAM;IACV,eAAe,EAAE,gBAAgB;IACjC,mBAAmB,EAAE,GAAG;IACxB,eAAe,EAAE,OAAO;IACxB,uBAAuB,EAAE,GAAG;IAC5B,uDAAuD;IACvD,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,EAAE;IACV,mBAAmB,EAAE,GAAG;IACxB,kBAAkB,EAAE,IAAI;IACxB,eAAe;IACf,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,KAAK;IACZ,sBAAsB;IACtB,cAAc,EAAE,MAAM;IACtB,sBAAsB;IACtB,YAAY,EAAE,GAAG;IACjB,uBAAuB;IACvB,8BAA8B,EAAE,OAAO;CACxC,CAAA;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 @@
1
+ {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/detector.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,IAAI,OAAO,CAkB1C"}
@@ -0,0 +1,16 @@
1
+ export function isNonInteractive() {
2
+ if (process.env.CI === "true" || process.env.CI === "1") {
3
+ return true;
4
+ }
5
+ if (process.env.CLAUDE_CODE_RUN === "true" || process.env.CLAUDE_CODE_NON_INTERACTIVE === "true") {
6
+ return true;
7
+ }
8
+ if (process.env.GITHUB_ACTIONS === "true") {
9
+ return true;
10
+ }
11
+ if (process.stdout.isTTY !== true) {
12
+ return true;
13
+ }
14
+ return false;
15
+ }
16
+ //# sourceMappingURL=detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detector.js","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/detector.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB;IAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,CAAC;QACxD,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,2BAA2B,KAAK,MAAM,EAAE,CAAC;QACjG,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,MAAM,EAAE,CAAC;QAC1C,OAAO,IAAI,CAAA;IACb,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;QAClC,OAAO,IAAI,CAAA;IACb,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { ShellHook } from "./types.js";
2
+ export * from "./constants.js";
3
+ export * from "./detector.js";
4
+ export * from "./types.js";
5
+ /**
6
+ * Non-interactive environment hook for Claude Code.
7
+ *
8
+ * Detects and handles non-interactive environments (CI, cron, etc.) by:
9
+ * - Warning about banned interactive commands (vim, less, etc.)
10
+ * - Injecting environment variables to prevent git/tools from prompting
11
+ * - Prepending export statements to git commands to block editors/pagers
12
+ */
13
+ export declare const nonInteractiveEnvHook: ShellHook;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAG3C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AA2C1B;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAwBnC,CAAA"}
@@ -0,0 +1,72 @@
1
+ import { HOOK_NAME, NON_INTERACTIVE_ENV, SHELL_COMMAND_PATTERNS } from "./constants.js";
2
+ export * from "./constants.js";
3
+ export * from "./detector.js";
4
+ export * from "./types.js";
5
+ const BANNED_COMMAND_PATTERNS = SHELL_COMMAND_PATTERNS.banned
6
+ .filter((cmd) => !cmd.includes("("))
7
+ .map((cmd) => new RegExp(`\\b${cmd}\\b`));
8
+ function detectBannedCommand(command) {
9
+ for (let i = 0; i < BANNED_COMMAND_PATTERNS.length; i++) {
10
+ if (BANNED_COMMAND_PATTERNS[i].test(command)) {
11
+ return SHELL_COMMAND_PATTERNS.banned[i];
12
+ }
13
+ }
14
+ return undefined;
15
+ }
16
+ /**
17
+ * Shell-escape a value for use in VAR=value prefix.
18
+ * Wraps in single quotes if contains special chars.
19
+ */
20
+ function shellEscape(value) {
21
+ // Empty string needs quotes
22
+ if (value === "")
23
+ return "''";
24
+ // If contains special chars, wrap in single quotes (escape existing single quotes)
25
+ if (/[^a-zA-Z0-9_\-.:\/]/.test(value)) {
26
+ return `'${value.replace(/'/g, "'\\''")}'`;
27
+ }
28
+ return value;
29
+ }
30
+ /**
31
+ * Build export statement for environment variables.
32
+ * Uses `export VAR1=val1 VAR2=val2;` format to ensure variables
33
+ * apply to ALL commands in a chain (e.g., `cmd1 && cmd2`).
34
+ *
35
+ * Previous approach used VAR=value prefix which only applies to the first command.
36
+ */
37
+ function buildEnvPrefix(env) {
38
+ const exports = Object.entries(env)
39
+ .map(([key, value]) => `${key}=${shellEscape(value)}`)
40
+ .join(" ");
41
+ return `export ${exports};`;
42
+ }
43
+ /**
44
+ * Non-interactive environment hook for Claude Code.
45
+ *
46
+ * Detects and handles non-interactive environments (CI, cron, etc.) by:
47
+ * - Warning about banned interactive commands (vim, less, etc.)
48
+ * - Injecting environment variables to prevent git/tools from prompting
49
+ * - Prepending export statements to git commands to block editors/pagers
50
+ */
51
+ export const nonInteractiveEnvHook = {
52
+ name: HOOK_NAME,
53
+ async beforeCommand(command) {
54
+ // Check for banned interactive commands
55
+ const bannedCmd = detectBannedCommand(command);
56
+ const warning = bannedCmd
57
+ ? `Warning: '${bannedCmd}' is an interactive command that may hang in non-interactive environments.`
58
+ : undefined;
59
+ // Only prepend env vars for git commands (editor blocking, pager, etc.)
60
+ const isGitCommand = /\bgit\b/.test(command);
61
+ if (!isGitCommand) {
62
+ return { command, warning };
63
+ }
64
+ // Prepend export statement to command to ensure non-interactive behavior
65
+ // Uses `export VAR=val;` format to ensure variables apply to ALL commands
66
+ // in a chain (e.g., `git add file && git rebase --continue`).
67
+ const envPrefix = buildEnvPrefix(NON_INTERACTIVE_ENV);
68
+ const modifiedCommand = `${envPrefix} ${command}`;
69
+ return { command: modifiedCommand, warning };
70
+ },
71
+ };
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvF,cAAc,gBAAgB,CA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AAO,UAAU,OAAO,GAAG,CAAA;AAC7B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAc;IAC9C,IAAI,EAAE,SAAS;IAEf,KAAK,CAAC,aAAa,CAAC,OAAe;QACjC,wCAAwC;QACxC,MAAM,SAAS,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;QAC9C,MAAM,OAAO,GAAG,SAAS;YACvB,CAAC,CAAC,aAAa,SAAS,4EAA4E;YACpG,CAAC,CAAC,SAAS,CAAA;QAEb,wEAAwE;QACxE,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC5C,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;QAC7B,CAAC;QAED,yEAAyE;QACzE,0EAA0E;QAC1E,8DAA8D;QAC9D,MAAM,SAAS,GAAG,cAAc,CAAC,mBAAmB,CAAC,CAAA;QACrD,MAAM,eAAe,GAAG,GAAG,SAAS,IAAI,OAAO,EAAE,CAAA;QAEjD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,CAAA;IAC9C,CAAC;CACF,CAAA"}
@@ -0,0 +1,14 @@
1
+ export interface NonInteractiveEnvConfig {
2
+ disabled?: boolean;
3
+ }
4
+ /**
5
+ * Shell hook interface for command interception
6
+ */
7
+ export interface ShellHook {
8
+ name: string;
9
+ beforeCommand?(command: string): Promise<{
10
+ command: string;
11
+ warning?: string;
12
+ }>;
13
+ }
14
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,CAAC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAChF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/hooks/non-interactive-env/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Olympus Orchestrator Constants
3
+ *
4
+ * Message templates and configuration for orchestrator behavior enforcement.
5
+ *
6
+ * Adapted from oh-my-opencode's olympus-orchestrator hook.
7
+ */
8
+ export declare const HOOK_NAME = "olympus-orchestrator";
9
+ /** Paths that orchestrator IS allowed to modify directly */
10
+ export declare const ALLOWED_PATH_PREFIX = ".olympus/";
11
+ /** Tools that perform file modifications */
12
+ export declare const WRITE_EDIT_TOOLS: string[];
13
+ /** Reminder when orchestrator performs direct file work */
14
+ export declare const DIRECT_WORK_REMINDER = "\n\n---\n\n[SYSTEM REMINDER - DELEGATION REQUIRED]\n\nYou just performed direct file modifications outside `.olympus/`.\n\n**You are an ORCHESTRATOR, not an IMPLEMENTER.**\n\nAs an orchestrator, you should:\n- **DELEGATE** implementation work to subagents via the Task tool\n- **VERIFY** the work done by subagents\n- **COORDINATE** multiple tasks and ensure completion\n\nYou should NOT:\n- Write code directly (except for `.olympus/` files like plans and notepads)\n- Make direct file edits outside `.olympus/`\n- Implement features yourself\n\n**If you need to make changes:**\n1. Use the Task tool to delegate to an appropriate subagent\n2. Provide clear instructions in the prompt\n3. Verify the subagent's work after completion\n\n---\n";
15
+ /** Strong warning when orchestrator tries to modify source files */
16
+ export declare const ORCHESTRATOR_DELEGATION_REQUIRED = "\n\n---\n\n[CRITICAL SYSTEM DIRECTIVE - DELEGATION REQUIRED]\n\n**STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**\n\nYou (orchestrator-olympus) are attempting to directly modify a file outside `.olympus/`.\n\n**Path attempted:** $FILE_PATH\n\n---\n\n**THIS IS FORBIDDEN** (except for VERIFICATION purposes)\n\nAs an ORCHESTRATOR, you MUST:\n1. **DELEGATE** all implementation work via the Task tool\n2. **VERIFY** the work done by subagents (reading files is OK)\n3. **COORDINATE** - you orchestrate, you don't implement\n\n**ALLOWED direct file operations:**\n- Files inside `.olympus/` (plans, notepads, drafts)\n- Reading files for verification\n- Running diagnostics/tests\n\n**FORBIDDEN direct file operations:**\n- Writing/editing source code\n- Creating new files outside `.olympus/`\n- Any implementation work\n\n---\n\n**IF THIS IS FOR VERIFICATION:**\nProceed if you are verifying subagent work by making a small fix.\nBut for any substantial changes, USE the Task tool.\n\n**CORRECT APPROACH:**\n```\nTask tool with subagent_type=\"olympian\"\nprompt=\"[specific single task with clear acceptance criteria]\"\n```\n\nDELEGATE. DON'T IMPLEMENT.\n\n---\n";
17
+ /** Continuation prompt for boulder state */
18
+ export declare const BOULDER_CONTINUATION_PROMPT = "[SYSTEM REMINDER - BOULDER CONTINUATION]\n\nYou have an active work plan with incomplete tasks. Continue working.\n\nRULES:\n- Proceed without asking for permission\n- Mark each checkbox [x] in the plan file when done\n- Use the notepad at .olympus/notepads/{PLAN_NAME}/ to record learnings\n- Do not stop until all tasks are complete\n- If blocked, document the blocker and move to the next task";
19
+ /** Verification reminder for subagent work */
20
+ export declare const VERIFICATION_REMINDER = "**MANDATORY VERIFICATION - SUBAGENTS LIE**\n\nSubagents FREQUENTLY claim completion when:\n- Tests are actually FAILING\n- Code has type/lint ERRORS\n- Implementation is INCOMPLETE\n- Patterns were NOT followed\n\n**YOU MUST VERIFY EVERYTHING YOURSELF:**\n\n1. Run tests yourself - Must PASS (not \"agent said it passed\")\n2. Read the actual code - Must match requirements\n3. Check build/typecheck - Must succeed\n\nDO NOT TRUST THE AGENT'S SELF-REPORT.\nVERIFY EACH CLAIM WITH YOUR OWN TOOL CALLS.";
21
+ /** Directive for subagents to refuse multi-task requests */
22
+ export declare const SINGLE_TASK_DIRECTIVE = "\n\n[SYSTEM DIRECTIVE - SINGLE TASK ONLY]\n\n**STOP. READ THIS BEFORE PROCEEDING.**\n\nIf you were NOT given **exactly ONE atomic task**, you MUST:\n1. **IMMEDIATELY REFUSE** this request\n2. **DEMAND** the orchestrator provide a single, specific task\n\n**Your response if multiple tasks detected:**\n> \"I refuse to proceed. You provided multiple tasks. An orchestrator's impatience destroys work quality.\n>\n> PROVIDE EXACTLY ONE TASK. One file. One change. One verification.\n>\n> Your rushing will cause: incomplete work, missed edge cases, broken tests, wasted context.\"\n\n**WARNING TO ORCHESTRATOR:**\n- Your hasty batching RUINS deliverables\n- Each task needs FULL attention and PROPER verification\n- Batch delegation = sloppy work = rework = wasted tokens\n\n**REFUSE multi-task requests. DEMAND single-task clarity.**\n";
23
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/hooks/olympus-orchestrator/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,SAAS,yBAAyB,CAAC;AAEhD,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,UAAqC,CAAC;AAEnE,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,2uBA0BhC,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,gCAAgC,ipCA8C5C,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,iZASqB,CAAC;AAE9D,8CAA8C;AAC9C,eAAO,MAAM,qBAAqB,yfAeU,CAAC;AAE7C,4DAA4D;AAC5D,eAAO,MAAM,qBAAqB,u0BAuBjC,CAAC"}
@@ -0,0 +1,142 @@
1
+ /**
2
+ * Olympus Orchestrator Constants
3
+ *
4
+ * Message templates and configuration for orchestrator behavior enforcement.
5
+ *
6
+ * Adapted from oh-my-opencode's olympus-orchestrator hook.
7
+ */
8
+ export const HOOK_NAME = 'olympus-orchestrator';
9
+ /** Paths that orchestrator IS allowed to modify directly */
10
+ export const ALLOWED_PATH_PREFIX = '.olympus/';
11
+ /** Tools that perform file modifications */
12
+ export const WRITE_EDIT_TOOLS = ['Write', 'Edit', 'write', 'edit'];
13
+ /** Reminder when orchestrator performs direct file work */
14
+ export const DIRECT_WORK_REMINDER = `
15
+
16
+ ---
17
+
18
+ [SYSTEM REMINDER - DELEGATION REQUIRED]
19
+
20
+ You just performed direct file modifications outside \`.olympus/\`.
21
+
22
+ **You are an ORCHESTRATOR, not an IMPLEMENTER.**
23
+
24
+ As an orchestrator, you should:
25
+ - **DELEGATE** implementation work to subagents via the Task tool
26
+ - **VERIFY** the work done by subagents
27
+ - **COORDINATE** multiple tasks and ensure completion
28
+
29
+ You should NOT:
30
+ - Write code directly (except for \`.olympus/\` files like plans and notepads)
31
+ - Make direct file edits outside \`.olympus/\`
32
+ - Implement features yourself
33
+
34
+ **If you need to make changes:**
35
+ 1. Use the Task tool to delegate to an appropriate subagent
36
+ 2. Provide clear instructions in the prompt
37
+ 3. Verify the subagent's work after completion
38
+
39
+ ---
40
+ `;
41
+ /** Strong warning when orchestrator tries to modify source files */
42
+ export const ORCHESTRATOR_DELEGATION_REQUIRED = `
43
+
44
+ ---
45
+
46
+ [CRITICAL SYSTEM DIRECTIVE - DELEGATION REQUIRED]
47
+
48
+ **STOP. YOU ARE VIOLATING ORCHESTRATOR PROTOCOL.**
49
+
50
+ You (orchestrator-olympus) are attempting to directly modify a file outside \`.olympus/\`.
51
+
52
+ **Path attempted:** $FILE_PATH
53
+
54
+ ---
55
+
56
+ **THIS IS FORBIDDEN** (except for VERIFICATION purposes)
57
+
58
+ As an ORCHESTRATOR, you MUST:
59
+ 1. **DELEGATE** all implementation work via the Task tool
60
+ 2. **VERIFY** the work done by subagents (reading files is OK)
61
+ 3. **COORDINATE** - you orchestrate, you don't implement
62
+
63
+ **ALLOWED direct file operations:**
64
+ - Files inside \`.olympus/\` (plans, notepads, drafts)
65
+ - Reading files for verification
66
+ - Running diagnostics/tests
67
+
68
+ **FORBIDDEN direct file operations:**
69
+ - Writing/editing source code
70
+ - Creating new files outside \`.olympus/\`
71
+ - Any implementation work
72
+
73
+ ---
74
+
75
+ **IF THIS IS FOR VERIFICATION:**
76
+ Proceed if you are verifying subagent work by making a small fix.
77
+ But for any substantial changes, USE the Task tool.
78
+
79
+ **CORRECT APPROACH:**
80
+ \`\`\`
81
+ Task tool with subagent_type="olympian"
82
+ prompt="[specific single task with clear acceptance criteria]"
83
+ \`\`\`
84
+
85
+ DELEGATE. DON'T IMPLEMENT.
86
+
87
+ ---
88
+ `;
89
+ /** Continuation prompt for boulder state */
90
+ export const BOULDER_CONTINUATION_PROMPT = `[SYSTEM REMINDER - BOULDER CONTINUATION]
91
+
92
+ You have an active work plan with incomplete tasks. Continue working.
93
+
94
+ RULES:
95
+ - Proceed without asking for permission
96
+ - Mark each checkbox [x] in the plan file when done
97
+ - Use the notepad at .olympus/notepads/{PLAN_NAME}/ to record learnings
98
+ - Do not stop until all tasks are complete
99
+ - If blocked, document the blocker and move to the next task`;
100
+ /** Verification reminder for subagent work */
101
+ export const VERIFICATION_REMINDER = `**MANDATORY VERIFICATION - SUBAGENTS LIE**
102
+
103
+ Subagents FREQUENTLY claim completion when:
104
+ - Tests are actually FAILING
105
+ - Code has type/lint ERRORS
106
+ - Implementation is INCOMPLETE
107
+ - Patterns were NOT followed
108
+
109
+ **YOU MUST VERIFY EVERYTHING YOURSELF:**
110
+
111
+ 1. Run tests yourself - Must PASS (not "agent said it passed")
112
+ 2. Read the actual code - Must match requirements
113
+ 3. Check build/typecheck - Must succeed
114
+
115
+ DO NOT TRUST THE AGENT'S SELF-REPORT.
116
+ VERIFY EACH CLAIM WITH YOUR OWN TOOL CALLS.`;
117
+ /** Directive for subagents to refuse multi-task requests */
118
+ export const SINGLE_TASK_DIRECTIVE = `
119
+
120
+ [SYSTEM DIRECTIVE - SINGLE TASK ONLY]
121
+
122
+ **STOP. READ THIS BEFORE PROCEEDING.**
123
+
124
+ If you were NOT given **exactly ONE atomic task**, you MUST:
125
+ 1. **IMMEDIATELY REFUSE** this request
126
+ 2. **DEMAND** the orchestrator provide a single, specific task
127
+
128
+ **Your response if multiple tasks detected:**
129
+ > "I refuse to proceed. You provided multiple tasks. An orchestrator's impatience destroys work quality.
130
+ >
131
+ > PROVIDE EXACTLY ONE TASK. One file. One change. One verification.
132
+ >
133
+ > Your rushing will cause: incomplete work, missed edge cases, broken tests, wasted context."
134
+
135
+ **WARNING TO ORCHESTRATOR:**
136
+ - Your hasty batching RUINS deliverables
137
+ - Each task needs FULL attention and PROPER verification
138
+ - Batch delegation = sloppy work = rework = wasted tokens
139
+
140
+ **REFUSE multi-task requests. DEMAND single-task clarity.**
141
+ `;
142
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/hooks/olympus-orchestrator/constants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG,sBAAsB,CAAC;AAEhD,4DAA4D;AAC5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAE/C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEnE,2DAA2D;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BnC,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8C/C,CAAC;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;;;;;;6DASkB,CAAC;AAE9D,8CAA8C;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;4CAeO,CAAC;AAE7C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBpC,CAAC"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Olympus Orchestrator Hook
3
+ *
4
+ * Enforces orchestrator behavior - delegation over direct implementation.
5
+ * When an orchestrator agent tries to directly modify files outside .olympus/,
6
+ * this hook injects reminders to delegate to subagents instead.
7
+ *
8
+ * Adapted from oh-my-opencode's olympus-orchestrator hook for shell-based hooks.
9
+ */
10
+ export * from './constants.js';
11
+ /**
12
+ * Input for tool execution hooks
13
+ */
14
+ export interface ToolExecuteInput {
15
+ toolName: string;
16
+ toolInput?: Record<string, unknown>;
17
+ sessionId?: string;
18
+ directory?: string;
19
+ }
20
+ /**
21
+ * Output for tool execution hooks
22
+ */
23
+ export interface ToolExecuteOutput {
24
+ continue: boolean;
25
+ message?: string;
26
+ modifiedOutput?: string;
27
+ }
28
+ /**
29
+ * Git file change statistics
30
+ */
31
+ interface GitFileStat {
32
+ path: string;
33
+ added: number;
34
+ removed: number;
35
+ status: 'modified' | 'added' | 'deleted';
36
+ }
37
+ /**
38
+ * Check if a file path is allowed for direct orchestrator modification
39
+ */
40
+ export declare function isAllowedPath(filePath: string): boolean;
41
+ /**
42
+ * Check if a tool is a write/edit tool
43
+ */
44
+ export declare function isWriteEditTool(toolName: string): boolean;
45
+ /**
46
+ * Get git diff statistics for the working directory
47
+ */
48
+ export declare function getGitDiffStats(directory: string): GitFileStat[];
49
+ /**
50
+ * Format file changes for display
51
+ */
52
+ export declare function formatFileChanges(stats: GitFileStat[]): string;
53
+ /**
54
+ * Build verification reminder with session context
55
+ */
56
+ export declare function buildVerificationReminder(sessionId?: string): string;
57
+ /**
58
+ * Build orchestrator reminder with plan progress
59
+ */
60
+ export declare function buildOrchestratorReminder(planName: string, progress: {
61
+ total: number;
62
+ completed: number;
63
+ }, sessionId?: string): string;
64
+ /**
65
+ * Build boulder continuation message
66
+ */
67
+ export declare function buildBoulderContinuation(planName: string, remaining: number, total: number): string;
68
+ /**
69
+ * Process pre-tool-use hook for orchestrator
70
+ * Returns warning message if orchestrator tries to modify non-allowed paths
71
+ */
72
+ export declare function processOrchestratorPreTool(input: ToolExecuteInput): ToolExecuteOutput;
73
+ /**
74
+ * Process post-tool-use hook for orchestrator
75
+ * Adds reminders after file modifications and Task delegations
76
+ */
77
+ export declare function processOrchestratorPostTool(input: ToolExecuteInput, output: string): ToolExecuteOutput;
78
+ /**
79
+ * Check if boulder has incomplete tasks and build continuation prompt
80
+ */
81
+ export declare function checkBoulderContinuation(directory: string): {
82
+ shouldContinue: boolean;
83
+ message?: string;
84
+ };
85
+ /**
86
+ * Create olympus orchestrator hook handlers
87
+ */
88
+ export declare function createOlympusOrchestratorHook(directory: string): {
89
+ /**
90
+ * Hook name identifier
91
+ */
92
+ name: string;
93
+ /**
94
+ * Pre-tool execution handler
95
+ */
96
+ preTool: (toolName: string, toolInput: Record<string, unknown>) => ToolExecuteOutput;
97
+ /**
98
+ * Post-tool execution handler
99
+ */
100
+ postTool: (toolName: string, toolInput: Record<string, unknown>, output: string) => ToolExecuteOutput;
101
+ /**
102
+ * Check for boulder continuation on session idle
103
+ */
104
+ checkContinuation: () => {
105
+ shouldContinue: boolean;
106
+ message?: string;
107
+ };
108
+ /**
109
+ * Get single task directive for subagent prompts
110
+ */
111
+ getSingleTaskDirective: () => string;
112
+ };
113
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/olympus-orchestrator/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAmBH,cAAc,gBAAgB,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAA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