@reinamaccredy/oh-my-opencode 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 (429) hide show
  1. package/LICENSE.md +82 -0
  2. package/README.ja.md +1107 -0
  3. package/README.md +1243 -0
  4. package/README.zh-cn.md +1107 -0
  5. package/dist/agents/build-prompt.d.ts +31 -0
  6. package/dist/agents/document-writer.d.ts +5 -0
  7. package/dist/agents/explore.d.ts +5 -0
  8. package/dist/agents/frontend-ui-ux-engineer.d.ts +5 -0
  9. package/dist/agents/index.d.ts +5 -0
  10. package/dist/agents/librarian.d.ts +5 -0
  11. package/dist/agents/metis.d.ts +18 -0
  12. package/dist/agents/momus.d.ts +6 -0
  13. package/dist/agents/multimodal-looker.d.ts +5 -0
  14. package/dist/agents/oracle.d.ts +5 -0
  15. package/dist/agents/orchestrator-sisyphus.d.ts +19 -0
  16. package/dist/agents/plan-prompt.d.ts +64 -0
  17. package/dist/agents/prometheus-prompt.d.ts +27 -0
  18. package/dist/agents/sisyphus-junior.d.ts +3 -0
  19. package/dist/agents/sisyphus-prompt-builder.d.ts +26 -0
  20. package/dist/agents/sisyphus.d.ts +4 -0
  21. package/dist/agents/types.d.ts +49 -0
  22. package/dist/agents/utils.d.ts +13 -0
  23. package/dist/agents/utils.test.d.ts +1 -0
  24. package/dist/auth/antigravity/accounts.d.ts +40 -0
  25. package/dist/auth/antigravity/accounts.test.d.ts +1 -0
  26. package/dist/auth/antigravity/browser.d.ts +27 -0
  27. package/dist/auth/antigravity/browser.test.d.ts +1 -0
  28. package/dist/auth/antigravity/cli.d.ts +2 -0
  29. package/dist/auth/antigravity/cli.test.d.ts +1 -0
  30. package/dist/auth/antigravity/constants.d.ts +98 -0
  31. package/dist/auth/antigravity/constants.test.d.ts +1 -0
  32. package/dist/auth/antigravity/fetch.d.ts +69 -0
  33. package/dist/auth/antigravity/index.d.ts +13 -0
  34. package/dist/auth/antigravity/integration.test.d.ts +10 -0
  35. package/dist/auth/antigravity/message-converter.d.ts +54 -0
  36. package/dist/auth/antigravity/oauth.d.ts +51 -0
  37. package/dist/auth/antigravity/oauth.test.d.ts +1 -0
  38. package/dist/auth/antigravity/plugin.d.ts +54 -0
  39. package/dist/auth/antigravity/project.d.ts +10 -0
  40. package/dist/auth/antigravity/request.d.ts +116 -0
  41. package/dist/auth/antigravity/request.test.d.ts +1 -0
  42. package/dist/auth/antigravity/response.d.ts +137 -0
  43. package/dist/auth/antigravity/storage.d.ts +5 -0
  44. package/dist/auth/antigravity/storage.test.d.ts +1 -0
  45. package/dist/auth/antigravity/thinking.d.ts +278 -0
  46. package/dist/auth/antigravity/thinking.test.d.ts +10 -0
  47. package/dist/auth/antigravity/thought-signature-store.d.ts +52 -0
  48. package/dist/auth/antigravity/token.d.ts +38 -0
  49. package/dist/auth/antigravity/token.test.d.ts +1 -0
  50. package/dist/auth/antigravity/tools.d.ts +119 -0
  51. package/dist/auth/antigravity/types.d.ts +229 -0
  52. package/dist/cli/commands/auth.d.ts +2 -0
  53. package/dist/cli/config-manager.d.ts +91 -0
  54. package/dist/cli/config-manager.test.d.ts +1 -0
  55. package/dist/cli/doctor/checks/auth.d.ts +7 -0
  56. package/dist/cli/doctor/checks/auth.test.d.ts +1 -0
  57. package/dist/cli/doctor/checks/config.d.ts +8 -0
  58. package/dist/cli/doctor/checks/config.test.d.ts +1 -0
  59. package/dist/cli/doctor/checks/dependencies.d.ts +8 -0
  60. package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
  61. package/dist/cli/doctor/checks/gh.d.ts +13 -0
  62. package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
  63. package/dist/cli/doctor/checks/index.d.ts +11 -0
  64. package/dist/cli/doctor/checks/lsp.d.ts +8 -0
  65. package/dist/cli/doctor/checks/lsp.test.d.ts +1 -0
  66. package/dist/cli/doctor/checks/mcp.d.ts +6 -0
  67. package/dist/cli/doctor/checks/mcp.test.d.ts +1 -0
  68. package/dist/cli/doctor/checks/opencode.d.ts +10 -0
  69. package/dist/cli/doctor/checks/opencode.test.d.ts +1 -0
  70. package/dist/cli/doctor/checks/plugin.d.ts +4 -0
  71. package/dist/cli/doctor/checks/plugin.test.d.ts +1 -0
  72. package/dist/cli/doctor/checks/version.d.ts +4 -0
  73. package/dist/cli/doctor/checks/version.test.d.ts +1 -0
  74. package/dist/cli/doctor/constants.d.ts +40 -0
  75. package/dist/cli/doctor/formatter.d.ts +12 -0
  76. package/dist/cli/doctor/formatter.test.d.ts +1 -0
  77. package/dist/cli/doctor/index.d.ts +5 -0
  78. package/dist/cli/doctor/runner.d.ts +7 -0
  79. package/dist/cli/doctor/runner.test.d.ts +1 -0
  80. package/dist/cli/doctor/types.d.ts +91 -0
  81. package/dist/cli/get-local-version/formatter.d.ts +3 -0
  82. package/dist/cli/get-local-version/index.d.ts +3 -0
  83. package/dist/cli/get-local-version/types.d.ts +13 -0
  84. package/dist/cli/index.d.ts +2 -0
  85. package/dist/cli/index.js +23604 -0
  86. package/dist/cli/install.d.ts +2 -0
  87. package/dist/cli/run/completion.d.ts +2 -0
  88. package/dist/cli/run/completion.test.d.ts +1 -0
  89. package/dist/cli/run/events.d.ts +11 -0
  90. package/dist/cli/run/events.test.d.ts +1 -0
  91. package/dist/cli/run/index.d.ts +2 -0
  92. package/dist/cli/run/runner.d.ts +2 -0
  93. package/dist/cli/run/types.d.ts +71 -0
  94. package/dist/cli/types.d.ts +27 -0
  95. package/dist/config/index.d.ts +2 -0
  96. package/dist/config/schema.d.ts +1914 -0
  97. package/dist/config/schema.test.d.ts +1 -0
  98. package/dist/features/background-agent/concurrency.d.ts +10 -0
  99. package/dist/features/background-agent/concurrency.test.d.ts +1 -0
  100. package/dist/features/background-agent/index.d.ts +3 -0
  101. package/dist/features/background-agent/manager.d.ts +55 -0
  102. package/dist/features/background-agent/manager.test.d.ts +1 -0
  103. package/dist/features/background-agent/types.d.ts +64 -0
  104. package/dist/features/boulder-state/constants.d.ts +10 -0
  105. package/dist/features/boulder-state/index.d.ts +3 -0
  106. package/dist/features/boulder-state/storage.d.ts +28 -0
  107. package/dist/features/boulder-state/storage.test.d.ts +1 -0
  108. package/dist/features/boulder-state/types.d.ts +24 -0
  109. package/dist/features/builtin-commands/commands.d.ts +2 -0
  110. package/dist/features/builtin-commands/index.d.ts +2 -0
  111. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -0
  112. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +2 -0
  113. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
  114. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
  115. package/dist/features/builtin-commands/types.d.ts +6 -0
  116. package/dist/features/builtin-skills/index.d.ts +2 -0
  117. package/dist/features/builtin-skills/skills.d.ts +2 -0
  118. package/dist/features/builtin-skills/types.d.ts +15 -0
  119. package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
  120. package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
  121. package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
  122. package/dist/features/claude-code-command-loader/index.d.ts +2 -0
  123. package/dist/features/claude-code-command-loader/loader.d.ts +6 -0
  124. package/dist/features/claude-code-command-loader/types.d.ts +42 -0
  125. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
  126. package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
  127. package/dist/features/claude-code-mcp-loader/loader.d.ts +4 -0
  128. package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
  129. package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
  130. package/dist/features/claude-code-mcp-loader/types.d.ts +35 -0
  131. package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
  132. package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
  133. package/dist/features/claude-code-plugin-loader/types.d.ts +186 -0
  134. package/dist/features/claude-code-session-state/index.d.ts +1 -0
  135. package/dist/features/claude-code-session-state/state.d.ts +4 -0
  136. package/dist/features/context-injector/collector.d.ts +11 -0
  137. package/dist/features/context-injector/collector.test.d.ts +1 -0
  138. package/dist/features/context-injector/index.d.ts +3 -0
  139. package/dist/features/context-injector/injector.d.ts +39 -0
  140. package/dist/features/context-injector/injector.test.d.ts +1 -0
  141. package/dist/features/context-injector/types.d.ts +83 -0
  142. package/dist/features/hook-message-injector/constants.d.ts +3 -0
  143. package/dist/features/hook-message-injector/index.d.ts +4 -0
  144. package/dist/features/hook-message-injector/injector.d.ts +11 -0
  145. package/dist/features/hook-message-injector/types.d.ts +44 -0
  146. package/dist/features/opencode-skill-loader/async-loader.d.ts +6 -0
  147. package/dist/features/opencode-skill-loader/async-loader.test.d.ts +1 -0
  148. package/dist/features/opencode-skill-loader/blocking.d.ts +2 -0
  149. package/dist/features/opencode-skill-loader/blocking.test.d.ts +1 -0
  150. package/dist/features/opencode-skill-loader/discover-worker.d.ts +1 -0
  151. package/dist/features/opencode-skill-loader/index.d.ts +4 -0
  152. package/dist/features/opencode-skill-loader/loader.d.ts +16 -0
  153. package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
  154. package/dist/features/opencode-skill-loader/merger.d.ts +7 -0
  155. package/dist/features/opencode-skill-loader/skill-content.d.ts +5 -0
  156. package/dist/features/opencode-skill-loader/skill-content.test.d.ts +1 -0
  157. package/dist/features/opencode-skill-loader/types.d.ts +34 -0
  158. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +2 -0
  159. package/dist/features/skill-mcp-manager/env-cleaner.test.d.ts +1 -0
  160. package/dist/features/skill-mcp-manager/index.d.ts +2 -0
  161. package/dist/features/skill-mcp-manager/manager.d.ts +29 -0
  162. package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
  163. package/dist/features/skill-mcp-manager/types.d.ts +11 -0
  164. package/dist/features/task-toast-manager/index.d.ts +2 -0
  165. package/dist/features/task-toast-manager/manager.d.ts +56 -0
  166. package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
  167. package/dist/features/task-toast-manager/types.d.ts +16 -0
  168. package/dist/features/workflow-engine/adapters/index.d.ts +2 -0
  169. package/dist/features/workflow-engine/adapters/maestro/index.d.ts +43 -0
  170. package/dist/features/workflow-engine/adapters/sisyphus/index.d.ts +30 -0
  171. package/dist/features/workflow-engine/contracts/v1/contract.test.d.ts +1 -0
  172. package/dist/features/workflow-engine/contracts/v1/engine.contract.d.ts +27 -0
  173. package/dist/features/workflow-engine/contracts/v1/index.d.ts +2 -0
  174. package/dist/features/workflow-engine/contracts/v1/types.d.ts +337 -0
  175. package/dist/features/workflow-engine/engines/index.d.ts +1 -0
  176. package/dist/features/workflow-engine/engines/maestro-engine.d.ts +40 -0
  177. package/dist/features/workflow-engine/index.d.ts +4 -0
  178. package/dist/features/workflow-engine/service.d.ts +6 -0
  179. package/dist/google-auth.d.ts +3 -0
  180. package/dist/google-auth.js +3871 -0
  181. package/dist/hooks/agent-usage-reminder/constants.d.ts +5 -0
  182. package/dist/hooks/agent-usage-reminder/index.d.ts +22 -0
  183. package/dist/hooks/agent-usage-reminder/storage.d.ts +4 -0
  184. package/dist/hooks/agent-usage-reminder/types.d.ts +6 -0
  185. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +4 -0
  186. package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
  187. package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +17 -0
  188. package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +2 -0
  189. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.d.ts +7 -0
  190. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
  191. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-executor.d.ts +3 -0
  192. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-purge-errors.d.ts +7 -0
  193. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-storage.d.ts +2 -0
  194. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-supersede.d.ts +6 -0
  195. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-types.d.ts +36 -0
  196. package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +28 -0
  197. package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
  198. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +42 -0
  199. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  200. package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
  201. package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
  202. package/dist/hooks/auto-slash-command/executor.d.ts +11 -0
  203. package/dist/hooks/auto-slash-command/index.d.ts +12 -0
  204. package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
  205. package/dist/hooks/auto-slash-command/types.d.ts +27 -0
  206. package/dist/hooks/auto-update-checker/cache.d.ts +3 -0
  207. package/dist/hooks/auto-update-checker/checker.d.ts +20 -0
  208. package/dist/hooks/auto-update-checker/constants.d.ts +13 -0
  209. package/dist/hooks/auto-update-checker/index.d.ts +13 -0
  210. package/dist/hooks/auto-update-checker/types.d.ts +25 -0
  211. package/dist/hooks/background-notification/index.d.ts +12 -0
  212. package/dist/hooks/background-notification/types.d.ts +4 -0
  213. package/dist/hooks/claude-code-hooks/config-loader.d.ts +13 -0
  214. package/dist/hooks/claude-code-hooks/config.d.ts +3 -0
  215. package/dist/hooks/claude-code-hooks/index.d.ts +48 -0
  216. package/dist/hooks/claude-code-hooks/plugin-config.d.ts +8 -0
  217. package/dist/hooks/claude-code-hooks/post-tool-use.d.ts +40 -0
  218. package/dist/hooks/claude-code-hooks/pre-compact.d.ts +16 -0
  219. package/dist/hooks/claude-code-hooks/pre-tool-use.d.ts +25 -0
  220. package/dist/hooks/claude-code-hooks/stop.d.ts +20 -0
  221. package/dist/hooks/claude-code-hooks/todo.d.ts +12 -0
  222. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +5 -0
  223. package/dist/hooks/claude-code-hooks/transcript.d.ts +38 -0
  224. package/dist/hooks/claude-code-hooks/types.d.ts +183 -0
  225. package/dist/hooks/claude-code-hooks/user-prompt-submit.d.ts +22 -0
  226. package/dist/hooks/comment-checker/cli.d.ts +53 -0
  227. package/dist/hooks/comment-checker/constants.d.ts +3 -0
  228. package/dist/hooks/comment-checker/downloader.d.ts +25 -0
  229. package/dist/hooks/comment-checker/filters/bdd.d.ts +2 -0
  230. package/dist/hooks/comment-checker/filters/directive.d.ts +2 -0
  231. package/dist/hooks/comment-checker/filters/docstring.d.ts +2 -0
  232. package/dist/hooks/comment-checker/filters/index.d.ts +7 -0
  233. package/dist/hooks/comment-checker/filters/shebang.d.ts +2 -0
  234. package/dist/hooks/comment-checker/index.d.ts +19 -0
  235. package/dist/hooks/comment-checker/output/formatter.d.ts +2 -0
  236. package/dist/hooks/comment-checker/output/index.d.ts +2 -0
  237. package/dist/hooks/comment-checker/output/xml-builder.d.ts +2 -0
  238. package/dist/hooks/comment-checker/types.d.ts +31 -0
  239. package/dist/hooks/compaction-context-injector/index.d.ts +2 -0
  240. package/dist/hooks/context-window-monitor.d.ts +18 -0
  241. package/dist/hooks/directory-agents-injector/constants.d.ts +3 -0
  242. package/dist/hooks/directory-agents-injector/index.d.ts +26 -0
  243. package/dist/hooks/directory-agents-injector/storage.d.ts +3 -0
  244. package/dist/hooks/directory-agents-injector/types.d.ts +5 -0
  245. package/dist/hooks/directory-readme-injector/constants.d.ts +3 -0
  246. package/dist/hooks/directory-readme-injector/index.d.ts +26 -0
  247. package/dist/hooks/directory-readme-injector/storage.d.ts +3 -0
  248. package/dist/hooks/directory-readme-injector/types.d.ts +5 -0
  249. package/dist/hooks/edit-error-recovery/index.d.ts +31 -0
  250. package/dist/hooks/edit-error-recovery/index.test.d.ts +1 -0
  251. package/dist/hooks/empty-message-sanitizer/index.d.ts +12 -0
  252. package/dist/hooks/empty-task-response-detector.d.ts +12 -0
  253. package/dist/hooks/index.d.ts +30 -0
  254. package/dist/hooks/interactive-bash-session/constants.d.ts +4 -0
  255. package/dist/hooks/interactive-bash-session/index.d.ts +23 -0
  256. package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
  257. package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
  258. package/dist/hooks/keyword-detector/constants.d.ts +12 -0
  259. package/dist/hooks/keyword-detector/detector.d.ts +11 -0
  260. package/dist/hooks/keyword-detector/index.d.ts +22 -0
  261. package/dist/hooks/keyword-detector/index.test.d.ts +1 -0
  262. package/dist/hooks/keyword-detector/types.d.ts +4 -0
  263. package/dist/hooks/non-interactive-env/constants.d.ts +34 -0
  264. package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
  265. package/dist/hooks/non-interactive-env/index.d.ts +14 -0
  266. package/dist/hooks/non-interactive-env/index.test.d.ts +1 -0
  267. package/dist/hooks/non-interactive-env/types.d.ts +3 -0
  268. package/dist/hooks/preemptive-compaction/constants.d.ts +3 -0
  269. package/dist/hooks/preemptive-compaction/index.d.ts +24 -0
  270. package/dist/hooks/preemptive-compaction/types.d.ts +17 -0
  271. package/dist/hooks/prometheus-md-only/constants.d.ts +6 -0
  272. package/dist/hooks/prometheus-md-only/index.d.ts +12 -0
  273. package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
  274. package/dist/hooks/ralph-loop/constants.d.ts +5 -0
  275. package/dist/hooks/ralph-loop/index.d.ts +20 -0
  276. package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
  277. package/dist/hooks/ralph-loop/storage.d.ts +6 -0
  278. package/dist/hooks/ralph-loop/types.d.ts +16 -0
  279. package/dist/hooks/rules-injector/constants.d.ts +8 -0
  280. package/dist/hooks/rules-injector/finder.d.ts +33 -0
  281. package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
  282. package/dist/hooks/rules-injector/index.d.ts +26 -0
  283. package/dist/hooks/rules-injector/matcher.d.ts +21 -0
  284. package/dist/hooks/rules-injector/parser.d.ts +18 -0
  285. package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
  286. package/dist/hooks/rules-injector/storage.d.ts +9 -0
  287. package/dist/hooks/rules-injector/types.d.ts +54 -0
  288. package/dist/hooks/session-notification-utils.d.ts +9 -0
  289. package/dist/hooks/session-notification.d.ts +20 -0
  290. package/dist/hooks/session-notification.test.d.ts +1 -0
  291. package/dist/hooks/session-recovery/constants.d.ts +6 -0
  292. package/dist/hooks/session-recovery/index.d.ts +22 -0
  293. package/dist/hooks/session-recovery/index.test.d.ts +1 -0
  294. package/dist/hooks/session-recovery/storage.d.ts +19 -0
  295. package/dist/hooks/session-recovery/types.d.ts +90 -0
  296. package/dist/hooks/sisyphus-orchestrator/index.d.ts +35 -0
  297. package/dist/hooks/sisyphus-orchestrator/index.test.d.ts +1 -0
  298. package/dist/hooks/start-work/index.d.ts +16 -0
  299. package/dist/hooks/start-work/index.test.d.ts +1 -0
  300. package/dist/hooks/task-resume-info/index.d.ts +11 -0
  301. package/dist/hooks/think-mode/detector.d.ts +5 -0
  302. package/dist/hooks/think-mode/index.d.ts +14 -0
  303. package/dist/hooks/think-mode/index.test.d.ts +1 -0
  304. package/dist/hooks/think-mode/switcher.d.ts +57 -0
  305. package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
  306. package/dist/hooks/think-mode/types.d.ts +21 -0
  307. package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
  308. package/dist/hooks/todo-continuation-enforcer.d.ts +17 -0
  309. package/dist/hooks/todo-continuation-enforcer.test.d.ts +1 -0
  310. package/dist/hooks/tool-output-truncator.d.ts +17 -0
  311. package/dist/hooks/tool-output-truncator.test.d.ts +1 -0
  312. package/dist/index.d.ts +5 -0
  313. package/dist/index.js +56428 -0
  314. package/dist/mcp/context7.d.ts +5 -0
  315. package/dist/mcp/grep-app.d.ts +5 -0
  316. package/dist/mcp/index.d.ts +8 -0
  317. package/dist/mcp/index.test.d.ts +1 -0
  318. package/dist/mcp/types.d.ts +9 -0
  319. package/dist/mcp/websearch.d.ts +8 -0
  320. package/dist/plugin-config.d.ts +4 -0
  321. package/dist/plugin-handlers/config-handler.d.ts +10 -0
  322. package/dist/plugin-handlers/index.d.ts +1 -0
  323. package/dist/plugin-state.d.ts +6 -0
  324. package/dist/shared/claude-config-dir.d.ts +1 -0
  325. package/dist/shared/claude-config-dir.test.d.ts +1 -0
  326. package/dist/shared/command-executor.d.ts +21 -0
  327. package/dist/shared/config-errors.d.ts +7 -0
  328. package/dist/shared/config-path.d.ts +17 -0
  329. package/dist/shared/data-path.d.ts +14 -0
  330. package/dist/shared/deep-merge.d.ts +13 -0
  331. package/dist/shared/dynamic-truncator.d.ts +27 -0
  332. package/dist/shared/external-plugin-detector.d.ts +18 -0
  333. package/dist/shared/external-plugin-detector.test.d.ts +1 -0
  334. package/dist/shared/file-reference-resolver.d.ts +1 -0
  335. package/dist/shared/file-utils.d.ts +7 -0
  336. package/dist/shared/frontmatter.d.ts +7 -0
  337. package/dist/shared/frontmatter.test.d.ts +1 -0
  338. package/dist/shared/hook-disabled.d.ts +2 -0
  339. package/dist/shared/index.d.ts +22 -0
  340. package/dist/shared/jsonc-parser.d.ts +15 -0
  341. package/dist/shared/jsonc-parser.test.d.ts +1 -0
  342. package/dist/shared/logger.d.ts +2 -0
  343. package/dist/shared/migration.d.ts +17 -0
  344. package/dist/shared/migration.test.d.ts +1 -0
  345. package/dist/shared/model-sanitizer.d.ts +3 -0
  346. package/dist/shared/opencode-config-dir.d.ts +19 -0
  347. package/dist/shared/opencode-config-dir.test.d.ts +1 -0
  348. package/dist/shared/opencode-version.d.ts +10 -0
  349. package/dist/shared/opencode-version.test.d.ts +1 -0
  350. package/dist/shared/pattern-matcher.d.ts +3 -0
  351. package/dist/shared/permission-compat.d.ts +12 -0
  352. package/dist/shared/permission-compat.test.d.ts +1 -0
  353. package/dist/shared/snake-case.d.ts +4 -0
  354. package/dist/shared/tool-name.d.ts +1 -0
  355. package/dist/tools/ast-grep/cli.d.ts +15 -0
  356. package/dist/tools/ast-grep/constants.d.ts +29 -0
  357. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  358. package/dist/tools/ast-grep/index.d.ts +8 -0
  359. package/dist/tools/ast-grep/napi.d.ts +13 -0
  360. package/dist/tools/ast-grep/tools.d.ts +3 -0
  361. package/dist/tools/ast-grep/types.d.ts +58 -0
  362. package/dist/tools/ast-grep/utils.d.ts +5 -0
  363. package/dist/tools/background-task/constants.d.ts +3 -0
  364. package/dist/tools/background-task/index.d.ts +3 -0
  365. package/dist/tools/background-task/tools.d.ts +7 -0
  366. package/dist/tools/background-task/types.d.ts +14 -0
  367. package/dist/tools/call-omo-agent/constants.d.ts +2 -0
  368. package/dist/tools/call-omo-agent/index.d.ts +3 -0
  369. package/dist/tools/call-omo-agent/tools.d.ts +3 -0
  370. package/dist/tools/call-omo-agent/types.d.ts +24 -0
  371. package/dist/tools/glob/cli.d.ts +7 -0
  372. package/dist/tools/glob/constants.d.ts +6 -0
  373. package/dist/tools/glob/index.d.ts +2 -0
  374. package/dist/tools/glob/tools.d.ts +2 -0
  375. package/dist/tools/glob/types.d.ts +19 -0
  376. package/dist/tools/glob/utils.d.ts +2 -0
  377. package/dist/tools/grep/cli.d.ts +3 -0
  378. package/dist/tools/grep/constants.d.ts +17 -0
  379. package/dist/tools/grep/downloader.d.ts +3 -0
  380. package/dist/tools/grep/downloader.test.d.ts +1 -0
  381. package/dist/tools/grep/index.d.ts +2 -0
  382. package/dist/tools/grep/tools.d.ts +2 -0
  383. package/dist/tools/grep/types.d.ts +36 -0
  384. package/dist/tools/grep/utils.d.ts +3 -0
  385. package/dist/tools/index.d.ts +14 -0
  386. package/dist/tools/interactive-bash/constants.d.ts +3 -0
  387. package/dist/tools/interactive-bash/index.d.ts +3 -0
  388. package/dist/tools/interactive-bash/tools.d.ts +7 -0
  389. package/dist/tools/interactive-bash/types.d.ts +3 -0
  390. package/dist/tools/interactive-bash/utils.d.ts +3 -0
  391. package/dist/tools/look-at/constants.d.ts +2 -0
  392. package/dist/tools/look-at/index.d.ts +3 -0
  393. package/dist/tools/look-at/tools.d.ts +2 -0
  394. package/dist/tools/look-at/types.d.ts +4 -0
  395. package/dist/tools/lsp/client.d.ts +59 -0
  396. package/dist/tools/lsp/config.d.ts +17 -0
  397. package/dist/tools/lsp/constants.d.ts +9 -0
  398. package/dist/tools/lsp/index.d.ts +6 -0
  399. package/dist/tools/lsp/tools.d.ts +12 -0
  400. package/dist/tools/lsp/types.d.ts +156 -0
  401. package/dist/tools/lsp/utils.d.ts +29 -0
  402. package/dist/tools/session-manager/constants.d.ts +12 -0
  403. package/dist/tools/session-manager/index.d.ts +3 -0
  404. package/dist/tools/session-manager/storage.d.ts +12 -0
  405. package/dist/tools/session-manager/storage.test.d.ts +1 -0
  406. package/dist/tools/session-manager/tools.d.ts +5 -0
  407. package/dist/tools/session-manager/tools.test.d.ts +1 -0
  408. package/dist/tools/session-manager/types.d.ts +89 -0
  409. package/dist/tools/session-manager/utils.d.ts +11 -0
  410. package/dist/tools/session-manager/utils.test.d.ts +1 -0
  411. package/dist/tools/sisyphus-task/constants.d.ts +12 -0
  412. package/dist/tools/sisyphus-task/index.d.ts +3 -0
  413. package/dist/tools/sisyphus-task/tools.d.ts +16 -0
  414. package/dist/tools/sisyphus-task/tools.test.d.ts +1 -0
  415. package/dist/tools/sisyphus-task/types.d.ts +9 -0
  416. package/dist/tools/skill/constants.d.ts +3 -0
  417. package/dist/tools/skill/index.d.ts +3 -0
  418. package/dist/tools/skill/tools.d.ts +10 -0
  419. package/dist/tools/skill/tools.test.d.ts +1 -0
  420. package/dist/tools/skill/types.d.ts +25 -0
  421. package/dist/tools/skill-mcp/constants.d.ts +2 -0
  422. package/dist/tools/skill-mcp/index.d.ts +3 -0
  423. package/dist/tools/skill-mcp/tools.d.ts +11 -0
  424. package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
  425. package/dist/tools/skill-mcp/types.d.ts +8 -0
  426. package/dist/tools/slashcommand/index.d.ts +2 -0
  427. package/dist/tools/slashcommand/tools.d.ts +11 -0
  428. package/dist/tools/slashcommand/types.d.ts +24 -0
  429. package/package.json +83 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { BackgroundTaskConfig } from "../../config/schema";
2
+ export declare class ConcurrencyManager {
3
+ private config?;
4
+ private counts;
5
+ private queues;
6
+ constructor(config?: BackgroundTaskConfig);
7
+ getConcurrencyLimit(model: string): number;
8
+ acquire(model: string): Promise<void>;
9
+ release(model: string): void;
10
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export { BackgroundManager } from "./manager";
3
+ export { ConcurrencyManager } from "./concurrency";
@@ -0,0 +1,55 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { BackgroundTask, LaunchInput, ResumeInput } from "./types";
3
+ import type { BackgroundTaskConfig } from "../../config/schema";
4
+ interface EventProperties {
5
+ sessionID?: string;
6
+ info?: {
7
+ id?: string;
8
+ };
9
+ [key: string]: unknown;
10
+ }
11
+ interface Event {
12
+ type: string;
13
+ properties?: EventProperties;
14
+ }
15
+ export declare class BackgroundManager {
16
+ private tasks;
17
+ private notifications;
18
+ private client;
19
+ private directory;
20
+ private pollingInterval?;
21
+ private concurrencyManager;
22
+ constructor(ctx: PluginInput, config?: BackgroundTaskConfig);
23
+ launch(input: LaunchInput): Promise<BackgroundTask>;
24
+ getTask(id: string): BackgroundTask | undefined;
25
+ getTasksByParentSession(sessionID: string): BackgroundTask[];
26
+ getAllDescendantTasks(sessionID: string): BackgroundTask[];
27
+ findBySession(sessionID: string): BackgroundTask | undefined;
28
+ /**
29
+ * Register an external task (e.g., from sisyphus_task) for notification tracking.
30
+ * This allows tasks created by external tools to receive the same toast/prompt notifications.
31
+ */
32
+ registerExternalTask(input: {
33
+ taskId: string;
34
+ sessionID: string;
35
+ parentSessionID: string;
36
+ description: string;
37
+ agent?: string;
38
+ }): BackgroundTask;
39
+ resume(input: ResumeInput): Promise<BackgroundTask>;
40
+ private checkSessionTodos;
41
+ handleEvent(event: Event): void;
42
+ markForNotification(task: BackgroundTask): void;
43
+ getPendingNotifications(sessionID: string): BackgroundTask[];
44
+ clearNotifications(sessionID: string): void;
45
+ private clearNotificationsForTask;
46
+ private startPolling;
47
+ private stopPolling;
48
+ cleanup(): void;
49
+ private notifyParentSession;
50
+ private formatDuration;
51
+ private hasRunningTasks;
52
+ private pruneStaleTasksAndNotifications;
53
+ private pollRunningTasks;
54
+ }
55
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,64 @@
1
+ export type BackgroundTaskStatus = "running" | "completed" | "error" | "cancelled";
2
+ export interface TaskProgress {
3
+ toolCalls: number;
4
+ lastTool?: string;
5
+ lastUpdate: Date;
6
+ lastMessage?: string;
7
+ lastMessageAt?: Date;
8
+ }
9
+ export interface BackgroundTask {
10
+ id: string;
11
+ sessionID: string;
12
+ parentSessionID: string;
13
+ parentMessageID: string;
14
+ description: string;
15
+ prompt: string;
16
+ agent: string;
17
+ status: BackgroundTaskStatus;
18
+ startedAt: Date;
19
+ completedAt?: Date;
20
+ result?: string;
21
+ error?: string;
22
+ progress?: TaskProgress;
23
+ parentModel?: {
24
+ providerID: string;
25
+ modelID: string;
26
+ };
27
+ model?: {
28
+ providerID: string;
29
+ modelID: string;
30
+ };
31
+ /** Agent name used for concurrency tracking */
32
+ concurrencyKey?: string;
33
+ /** Parent session's agent name for notification */
34
+ parentAgent?: string;
35
+ }
36
+ export interface LaunchInput {
37
+ description: string;
38
+ prompt: string;
39
+ agent: string;
40
+ parentSessionID: string;
41
+ parentMessageID: string;
42
+ parentModel?: {
43
+ providerID: string;
44
+ modelID: string;
45
+ };
46
+ parentAgent?: string;
47
+ model?: {
48
+ providerID: string;
49
+ modelID: string;
50
+ };
51
+ skills?: string[];
52
+ skillContent?: string;
53
+ }
54
+ export interface ResumeInput {
55
+ sessionId: string;
56
+ prompt: string;
57
+ parentSessionID: string;
58
+ parentMessageID: string;
59
+ parentModel?: {
60
+ providerID: string;
61
+ modelID: string;
62
+ };
63
+ parentAgent?: string;
64
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Boulder State Constants
3
+ */
4
+ export declare const BOULDER_DIR = ".sisyphus";
5
+ export declare const BOULDER_FILE = "boulder.json";
6
+ export declare const BOULDER_STATE_PATH = ".sisyphus/boulder.json";
7
+ export declare const NOTEPAD_DIR = "notepads";
8
+ export declare const NOTEPAD_BASE_PATH = ".sisyphus/notepads";
9
+ /** Prometheus plan directory pattern */
10
+ export declare const PROMETHEUS_PLANS_DIR = ".sisyphus/plans";
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./constants";
3
+ export * from "./storage";
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Boulder State Storage
3
+ *
4
+ * Handles reading/writing boulder.json for active plan tracking.
5
+ */
6
+ import type { BoulderState, PlanProgress } from "./types";
7
+ export declare function getBoulderFilePath(directory: string): string;
8
+ export declare function readBoulderState(directory: string): BoulderState | null;
9
+ export declare function writeBoulderState(directory: string, state: BoulderState): boolean;
10
+ export declare function appendSessionId(directory: string, sessionId: string): BoulderState | null;
11
+ export declare function clearBoulderState(directory: string): boolean;
12
+ /**
13
+ * Find Prometheus plan files for this project.
14
+ * Prometheus stores plans at: {project}/.sisyphus/plans/{name}.md
15
+ */
16
+ export declare function findPrometheusPlans(directory: string): string[];
17
+ /**
18
+ * Parse a plan file and count checkbox progress.
19
+ */
20
+ export declare function getPlanProgress(planPath: string): PlanProgress;
21
+ /**
22
+ * Extract plan name from file path.
23
+ */
24
+ export declare function getPlanName(planPath: string): string;
25
+ /**
26
+ * Create a new boulder state for a plan.
27
+ */
28
+ export declare function createBoulderState(planPath: string, sessionId: string): BoulderState;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Boulder State Types
3
+ *
4
+ * Manages the active work plan state for Sisyphus orchestrator.
5
+ * Named after Sisyphus's boulder - the eternal task that must be rolled.
6
+ */
7
+ export interface BoulderState {
8
+ /** Absolute path to the active plan file */
9
+ active_plan: string;
10
+ /** ISO timestamp when work started */
11
+ started_at: string;
12
+ /** Session IDs that have worked on this plan */
13
+ session_ids: string[];
14
+ /** Plan name derived from filename */
15
+ plan_name: string;
16
+ }
17
+ export interface PlanProgress {
18
+ /** Total number of checkboxes */
19
+ total: number;
20
+ /** Number of completed checkboxes */
21
+ completed: number;
22
+ /** Whether all tasks are done */
23
+ isComplete: boolean;
24
+ }
@@ -0,0 +1,2 @@
1
+ import type { BuiltinCommandName, BuiltinCommands } from "./types";
2
+ export declare function loadBuiltinCommands(disabledCommands?: BuiltinCommandName[]): BuiltinCommands;
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./commands";
@@ -0,0 +1 @@
1
+ export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n/init-deep # Update mode: modify existing + create new where warranted\n/init-deep --create-new # Read existing \u2192 remove all \u2192 regenerate from scratch\n/init-deep --max-depth=2 # Limit directory depth (default: 3)\n```\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n - Fire background explore agents immediately\n - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n<critical>\n**TodoWrite ALL phases. Mark in_progress \u2192 completed in real-time.**\n```\nTodoWrite([\n { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Fire Background Explore Agents IMMEDIATELY\n\nDon't wait\u2014these run async while main session works.\n\n```\n// Fire all at once, collect results later\nsisyphus_task(agent=\"explore\", prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\nsisyphus_task(agent=\"explore\", prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\nsisyphus_task(agent=\"explore\", prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\nsisyphus_task(agent=\"explore\", prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\nsisyphus_task(agent=\"explore\", prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\nsisyphus_task(agent=\"explore\", prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor | Threshold | Additional Agents |\n|--------|-----------|-------------------|\n| **Total files** | >100 | +1 per 100 files |\n| **Total lines** | >10k | +1 per 10k lines |\n| **Directory depth** | \u22654 | +2 for deep exploration |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo** | detected | +1 per package/workspace |\n| **Multiple languages** | >1 | +1 per language |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\nsisyphus_task(agent=\"explore\", prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\nsisyphus_task(agent=\"explore\", prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\nsisyphus_task(agent=\"explore\", prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... more based on calculation\n```\n</dynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While background agents run**, main session does:\n\n#### 1. Bash Structural Analysis\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. Read Existing AGENTS.md\n```\nFor each existing file found:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns\n Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) \u2192 then delete all \u2192 regenerate.\n\n#### 3. LSP Codemap (if available)\n```\nlsp_servers() # Check availability\n\n# Entry points (parallel)\nlsp_document_symbols(filePath=\"src/index.ts\")\nlsp_document_symbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nlsp_workspace_symbols(filePath=\".\", query=\"class\")\nlsp_workspace_symbols(filePath=\".\", query=\"interface\")\nlsp_workspace_symbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nlsp_find_references(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n### Collect Background Results\n\n```\n// After main session analysis done, collect all task results\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**Merge: bash + LSP + existing + explore findings. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor | Weight | High Threshold | Source |\n|--------|--------|----------------|--------|\n| File count | 3x | >20 | bash |\n| Subdir count | 2x | >5 | bash |\n| Code ratio | 2x | >70% | bash |\n| Unique patterns | 1x | Has own config | explore |\n| Module boundary | 2x | Has index.ts/__init__.py | bash |\n| Symbol density | 2x | >30 symbols | LSP |\n| Export count | 2x | >10 exports | LSP |\n| Reference centrality | 3x | >20 refs | LSP |\n\n### Decision Rules\n\n| Score | Action |\n|-------|--------|\n| **Root (.)** | ALWAYS create |\n| **>15** | Create AGENTS.md |\n| **8-15** | Create if distinct domain |\n| **<8** | Skip (parent covers) |\n\n### Output\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch document-writer agents for each location:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n sisyphus_task(agent=\"document-writer\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**Wait for all. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n \u2713 ./AGENTS.md (root, {N} lines)\n \u2713 ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size/depth\n- **Sequential execution**: MUST parallel (explore + LSP concurrent)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die";
@@ -0,0 +1,2 @@
1
+ export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output `<promise>DONE</promise>` (or custom promise text) when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
2
+ export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
@@ -0,0 +1 @@
1
+ export declare const REFACTOR_TEMPLATE = "# Intelligent Refactor Command\n\n## Usage\n```\n/refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>]\n\nArguments:\n refactoring-target: What to refactor. Can be:\n - File path: src/auth/handler.ts\n - Symbol name: \"AuthService class\"\n - Pattern: \"all functions using deprecated API\"\n - Description: \"extract validation logic into separate module\"\n\nOptions:\n --scope: Refactoring scope (default: module)\n - file: Single file only\n - module: Module/directory scope\n - project: Entire codebase\n\n --strategy: Risk tolerance (default: safe)\n - safe: Conservative, maximum test coverage required\n - aggressive: Allow broader changes with adequate coverage\n```\n\n## What This Command Does\n\nPerforms intelligent, deterministic refactoring with full codebase awareness. Unlike blind search-and-replace, this command:\n\n1. **Understands your intent** - Analyzes what you actually want to achieve\n2. **Maps the codebase** - Builds a definitive codemap before touching anything\n3. **Assesses risk** - Evaluates test coverage and determines verification strategy\n4. **Plans meticulously** - Creates a detailed plan with Plan agent\n5. **Executes precisely** - Step-by-step refactoring with LSP and AST-grep\n6. **Verifies constantly** - Runs tests after each change to ensure zero regression\n\n---\n\n# PHASE 0: INTENT GATE (MANDATORY FIRST STEP)\n\n**BEFORE ANY ACTION, classify and validate the request.**\n\n## Step 0.1: Parse Request Type\n\n| Signal | Classification | Action |\n|--------|----------------|--------|\n| Specific file/symbol | Explicit | Proceed to codebase analysis |\n| \"Refactor X to Y\" | Clear transformation | Proceed to codebase analysis |\n| \"Improve\", \"Clean up\" | Open-ended | **MUST ask**: \"What specific improvement?\" |\n| Ambiguous scope | Uncertain | **MUST ask**: \"Which modules/files?\" |\n| Missing context | Incomplete | **MUST ask**: \"What's the desired outcome?\" |\n\n## Step 0.2: Validate Understanding\n\nBefore proceeding, confirm:\n- [ ] Target is clearly identified\n- [ ] Desired outcome is understood\n- [ ] Scope is defined (file/module/project)\n- [ ] Success criteria can be articulated\n\n**If ANY of above is unclear, ASK CLARIFYING QUESTION:**\n\n```\nI want to make sure I understand the refactoring goal correctly.\n\n**What I understood**: [interpretation]\n**What I'm unsure about**: [specific ambiguity]\n\nOptions I see:\n1. [Option A] - [implications]\n2. [Option B] - [implications]\n\n**My recommendation**: [suggestion with reasoning]\n\nShould I proceed with [recommendation], or would you prefer differently?\n```\n\n## Step 0.3: Create Initial Todos\n\n**IMMEDIATELY after understanding the request, create todos:**\n\n```\nTodoWrite([\n {\"id\": \"phase-1\", \"content\": \"PHASE 1: Codebase Analysis - launch parallel explore agents\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-2\", \"content\": \"PHASE 2: Build Codemap - map dependencies and impact zones\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-3\", \"content\": \"PHASE 3: Test Assessment - analyze test coverage and verification strategy\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-4\", \"content\": \"PHASE 4: Plan Generation - invoke Plan agent for detailed refactoring plan\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-5\", \"content\": \"PHASE 5: Execute Refactoring - step-by-step with continuous verification\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-6\", \"content\": \"PHASE 6: Final Verification - full test suite and regression check\", \"status\": \"pending\", \"priority\": \"high\"}\n])\n```\n\n---\n\n# PHASE 1: CODEBASE ANALYSIS (PARALLEL EXPLORATION)\n\n**Mark phase-1 as in_progress.**\n\n## 1.1: Launch Parallel Explore Agents (BACKGROUND)\n\nFire ALL of these simultaneously using `call_omo_agent`:\n\n```\n// Agent 1: Find the refactoring target\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all occurrences and definitions of [TARGET]. \n Report: file paths, line numbers, usage patterns.\"\n)\n\n// Agent 2: Find related code\ncall_omo_agent(\n subagent_type=\"explore\", \n run_in_background=true,\n prompt=\"Find all code that imports, uses, or depends on [TARGET].\n Report: dependency chains, import graphs.\"\n)\n\n// Agent 3: Find similar patterns\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find similar code patterns to [TARGET] in the codebase.\n Report: analogous implementations, established conventions.\"\n)\n\n// Agent 4: Find tests\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all test files related to [TARGET].\n Report: test file paths, test case names, coverage indicators.\"\n)\n\n// Agent 5: Architecture context\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find architectural patterns and module organization around [TARGET].\n Report: module boundaries, layer structure, design patterns in use.\"\n)\n```\n\n## 1.2: Direct Tool Exploration (WHILE AGENTS RUN)\n\nWhile background agents are running, use direct tools:\n\n### LSP Tools for Precise Analysis:\n\n```typescript\n// Get symbol information at target location\nlsp_hover(filePath, line, character) // Type info, docs, signatures\n\n// Find definition(s)\nlsp_goto_definition(filePath, line, character) // Where is it defined?\n\n// Find ALL usages across workspace\nlsp_find_references(filePath, line, character, includeDeclaration=true)\n\n// Get file structure\nlsp_document_symbols(filePath) // Hierarchical outline\n\n// Search symbols by name\nlsp_workspace_symbols(filePath, query=\"[target_symbol]\")\n\n// Get current diagnostics\nlsp_diagnostics(filePath) // Errors, warnings before we start\n```\n\n### AST-Grep for Pattern Analysis:\n\n```typescript\n// Find structural patterns\nast_grep_search(\n pattern=\"function $NAME($$$) { $$$ }\", // or relevant pattern\n lang=\"typescript\", // or relevant language\n paths=[\"src/\"]\n)\n\n// Preview refactoring (DRY RUN)\nast_grep_replace(\n pattern=\"[old_pattern]\",\n rewrite=\"[new_pattern]\",\n lang=\"[language]\",\n dryRun=true // ALWAYS preview first\n)\n```\n\n### Grep for Text Patterns:\n\n```\ngrep(pattern=\"[search_term]\", path=\"src/\", include=\"*.ts\")\n```\n\n## 1.3: Collect Background Results\n\n```\nbackground_output(task_id=\"[agent_1_id]\")\nbackground_output(task_id=\"[agent_2_id]\")\n...\n```\n\n**Mark phase-1 as completed after all results collected.**\n\n---\n\n# PHASE 2: BUILD CODEMAP (DEPENDENCY MAPPING)\n\n**Mark phase-2 as in_progress.**\n\n## 2.1: Construct Definitive Codemap\n\nBased on Phase 1 results, build:\n\n```\n## CODEMAP: [TARGET]\n\n### Core Files (Direct Impact)\n- `path/to/file.ts:L10-L50` - Primary definition\n- `path/to/file2.ts:L25` - Key usage\n\n### Dependency Graph\n```\n[TARGET] \n\u251C\u2500\u2500 imports from: \n\u2502 \u251C\u2500\u2500 module-a (types)\n\u2502 \u2514\u2500\u2500 module-b (utils)\n\u251C\u2500\u2500 imported by:\n\u2502 \u251C\u2500\u2500 consumer-1.ts\n\u2502 \u251C\u2500\u2500 consumer-2.ts\n\u2502 \u2514\u2500\u2500 consumer-3.ts\n\u2514\u2500\u2500 used by:\n \u251C\u2500\u2500 handler.ts (direct call)\n \u2514\u2500\u2500 service.ts (dependency injection)\n```\n\n### Impact Zones\n| Zone | Risk Level | Files Affected | Test Coverage |\n|------|------------|----------------|---------------|\n| Core | HIGH | 3 files | 85% covered |\n| Consumers | MEDIUM | 8 files | 70% covered |\n| Edge | LOW | 2 files | 50% covered |\n\n### Established Patterns\n- Pattern A: [description] - used in N places\n- Pattern B: [description] - established convention\n```\n\n## 2.2: Identify Refactoring Constraints\n\nBased on codemap:\n- **MUST follow**: [existing patterns identified]\n- **MUST NOT break**: [critical dependencies]\n- **Safe to change**: [isolated code zones]\n- **Requires migration**: [breaking changes impact]\n\n**Mark phase-2 as completed.**\n\n---\n\n# PHASE 3: TEST ASSESSMENT (VERIFICATION STRATEGY)\n\n**Mark phase-3 as in_progress.**\n\n## 3.1: Detect Test Infrastructure\n\n```bash\n# Check for test commands\ncat package.json | jq '.scripts | keys[] | select(test(\"test\"))'\n\n# Or for Python\nls -la pytest.ini pyproject.toml setup.cfg\n\n# Or for Go\nls -la *_test.go\n```\n\n## 3.2: Analyze Test Coverage\n\n```\n// Find all tests related to target\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=false, // Need this synchronously\n prompt=\"Analyze test coverage for [TARGET]:\n 1. Which test files cover this code?\n 2. What test cases exist?\n 3. Are there integration tests?\n 4. What edge cases are tested?\n 5. Estimated coverage percentage?\"\n)\n```\n\n## 3.3: Determine Verification Strategy\n\nBased on test analysis:\n\n| Coverage Level | Strategy |\n|----------------|----------|\n| HIGH (>80%) | Run existing tests after each step |\n| MEDIUM (50-80%) | Run tests + add safety assertions |\n| LOW (<50%) | **PAUSE**: Propose adding tests first |\n| NONE | **BLOCK**: Refuse aggressive refactoring |\n\n**If coverage is LOW or NONE, ask user:**\n\n```\nTest coverage for [TARGET] is [LEVEL].\n\n**Risk Assessment**: Refactoring without adequate tests is dangerous.\n\nOptions:\n1. Add tests first, then refactor (RECOMMENDED)\n2. Proceed with extra caution, manual verification required\n3. Abort refactoring\n\nWhich approach do you prefer?\n```\n\n## 3.4: Document Verification Plan\n\n```\n## VERIFICATION PLAN\n\n### Test Commands\n- Unit: `bun test` / `npm test` / `pytest` / etc.\n- Integration: [command if exists]\n- Type check: `tsc --noEmit` / `pyright` / etc.\n\n### Verification Checkpoints\nAfter each refactoring step:\n1. lsp_diagnostics \u2192 zero new errors\n2. Run test command \u2192 all pass\n3. Type check \u2192 clean\n\n### Regression Indicators\n- [Specific test that must pass]\n- [Behavior that must be preserved]\n- [API contract that must not change]\n```\n\n**Mark phase-3 as completed.**\n\n---\n\n# PHASE 4: PLAN GENERATION (PLAN AGENT)\n\n**Mark phase-4 as in_progress.**\n\n## 4.1: Invoke Plan Agent\n\n```\nTask(\n subagent_type=\"plan\",\n prompt=\"Create a detailed refactoring plan:\n\n ## Refactoring Goal\n [User's original request]\n\n ## Codemap (from Phase 2)\n [Insert codemap here]\n\n ## Test Coverage (from Phase 3)\n [Insert verification plan here]\n\n ## Constraints\n - MUST follow existing patterns: [list]\n - MUST NOT break: [critical paths]\n - MUST run tests after each step\n\n ## Requirements\n 1. Break down into atomic refactoring steps\n 2. Each step must be independently verifiable\n 3. Order steps by dependency (what must happen first)\n 4. Specify exact files and line ranges for each step\n 5. Include rollback strategy for each step\n 6. Define commit checkpoints\"\n)\n```\n\n## 4.2: Review and Validate Plan\n\nAfter receiving plan from Plan agent:\n\n1. **Verify completeness**: All identified files addressed?\n2. **Verify safety**: Each step reversible?\n3. **Verify order**: Dependencies respected?\n4. **Verify verification**: Test commands specified?\n\n## 4.3: Register Detailed Todos\n\nConvert Plan agent output into granular todos:\n\n```\nTodoWrite([\n // Each step from the plan becomes a todo\n {\"id\": \"refactor-1\", \"content\": \"Step 1: [description]\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"verify-1\", \"content\": \"Verify Step 1: run tests\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"refactor-2\", \"content\": \"Step 2: [description]\", \"status\": \"pending\", \"priority\": \"medium\"},\n {\"id\": \"verify-2\", \"content\": \"Verify Step 2: run tests\", \"status\": \"pending\", \"priority\": \"medium\"},\n // ... continue for all steps\n])\n```\n\n**Mark phase-4 as completed.**\n\n---\n\n# PHASE 5: EXECUTE REFACTORING (DETERMINISTIC EXECUTION)\n\n**Mark phase-5 as in_progress.**\n\n## 5.1: Execution Protocol\n\nFor EACH refactoring step:\n\n### Pre-Step\n1. Mark step todo as `in_progress`\n2. Read current file state\n3. Verify lsp_diagnostics is baseline\n\n### Execute Step\nUse appropriate tool:\n\n**For Symbol Renames:**\n```typescript\nlsp_prepare_rename(filePath, line, character) // Validate rename is possible\nlsp_rename(filePath, line, character, newName) // Execute rename\n```\n\n**For Pattern Transformations:**\n```typescript\n// Preview first\nast_grep_replace(pattern, rewrite, lang, dryRun=true)\n\n// If preview looks good, execute\nast_grep_replace(pattern, rewrite, lang, dryRun=false)\n```\n\n**For Structural Changes:**\n```typescript\n// Use Edit tool for precise changes\nedit(filePath, oldString, newString)\n```\n\n### Post-Step Verification (MANDATORY)\n\n```typescript\n// 1. Check diagnostics\nlsp_diagnostics(filePath) // Must be clean or same as baseline\n\n// 2. Run tests\nbash(\"bun test\") // Or appropriate test command\n\n// 3. Type check\nbash(\"tsc --noEmit\") // Or appropriate type check\n```\n\n### Step Completion\n1. If verification passes \u2192 Mark step todo as `completed`\n2. If verification fails \u2192 **STOP AND FIX**\n\n## 5.2: Failure Recovery Protocol\n\nIf ANY verification fails:\n\n1. **STOP** immediately\n2. **REVERT** the failed change\n3. **DIAGNOSE** what went wrong\n4. **OPTIONS**:\n - Fix the issue and retry\n - Skip this step (if optional)\n - Consult oracle agent for help\n - Ask user for guidance\n\n**NEVER proceed to next step with broken tests.**\n\n## 5.3: Commit Checkpoints\n\nAfter each logical group of changes:\n\n```bash\ngit add [changed-files]\ngit commit -m \"refactor(scope): description\n\n[details of what was changed and why]\"\n```\n\n**Mark phase-5 as completed when all refactoring steps done.**\n\n---\n\n# PHASE 6: FINAL VERIFICATION (REGRESSION CHECK)\n\n**Mark phase-6 as in_progress.**\n\n## 6.1: Full Test Suite\n\n```bash\n# Run complete test suite\nbun test # or npm test, pytest, go test, etc.\n```\n\n## 6.2: Type Check\n\n```bash\n# Full type check\ntsc --noEmit # or equivalent\n```\n\n## 6.3: Lint Check\n\n```bash\n# Run linter\neslint . # or equivalent\n```\n\n## 6.4: Build Verification (if applicable)\n\n```bash\n# Ensure build still works\nbun run build # or npm run build, etc.\n```\n\n## 6.5: Final Diagnostics\n\n```typescript\n// Check all changed files\nfor (file of changedFiles) {\n lsp_diagnostics(file) // Must all be clean\n}\n```\n\n## 6.6: Generate Summary\n\n```markdown\n## Refactoring Complete\n\n### What Changed\n- [List of changes made]\n\n### Files Modified\n- `path/to/file.ts` - [what changed]\n- `path/to/file2.ts` - [what changed]\n\n### Verification Results\n- Tests: PASSED (X/Y passing)\n- Type Check: CLEAN\n- Lint: CLEAN\n- Build: SUCCESS\n\n### No Regressions Detected\nAll existing tests pass. No new errors introduced.\n```\n\n**Mark phase-6 as completed.**\n\n---\n\n# CRITICAL RULES\n\n## NEVER DO\n- Skip lsp_diagnostics check after changes\n- Proceed with failing tests\n- Make changes without understanding impact\n- Use `as any`, `@ts-ignore`, `@ts-expect-error`\n- Delete tests to make them pass\n- Commit broken code\n- Refactor without understanding existing patterns\n\n## ALWAYS DO\n- Understand before changing\n- Preview before applying (ast_grep dryRun=true)\n- Verify after every change\n- Follow existing codebase patterns\n- Keep todos updated in real-time\n- Commit at logical checkpoints\n- Report issues immediately\n\n## ABORT CONDITIONS\nIf any of these occur, **STOP and consult user**:\n- Test coverage is zero for target code\n- Changes would break public API\n- Refactoring scope is unclear\n- 3 consecutive verification failures\n- User-defined constraints violated\n\n---\n\n# Tool Usage Philosophy\n\nYou already know these tools. Use them intelligently:\n\n## LSP Tools\nLeverage the full LSP toolset (`lsp_*`) for precision analysis. Key patterns:\n- **Understand before changing**: `lsp_hover`, `lsp_goto_definition` to grasp context\n- **Impact analysis**: `lsp_find_references` to map all usages before modification\n- **Safe refactoring**: `lsp_prepare_rename` \u2192 `lsp_rename` for symbol renames\n- **Continuous verification**: `lsp_diagnostics` after every change\n\n## AST-Grep\nUse `ast_grep_search` and `ast_grep_replace` for structural transformations.\n**Critical**: Always `dryRun=true` first, review, then execute.\n\n## Agents\n- `explore`: Parallel codebase pattern discovery\n- `plan`: Detailed refactoring plan generation\n- `oracle`: Read-only consultation for complex architectural decisions and debugging\n- `librarian`: **Use proactively** when encountering deprecated methods or library migration tasks. Query official docs and OSS examples for modern replacements.\n\n## Deprecated Code & Library Migration\nWhen you encounter deprecated methods/APIs during refactoring:\n1. Fire `librarian` to find the recommended modern alternative\n2. **DO NOT auto-upgrade to latest version** unless user explicitly requests migration\n3. If user requests library migration, use `librarian` to fetch latest API docs before making changes\n\n---\n\n**Remember: Refactoring without tests is reckless. Refactoring without understanding is destructive. This command ensures you do neither.**\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -0,0 +1 @@
1
+ export declare const START_WORK_TEMPLATE = "You are starting a Sisyphus work session.\n\n## WHAT TO DO\n\n1. **Find available plans**: Search for Prometheus-generated plan files at `.sisyphus/plans/`\n\n2. **Check for active boulder state**: Read `.sisyphus/boulder.json` if it exists\n\n3. **Decision logic**:\n - If `.sisyphus/boulder.json` exists AND plan is NOT complete (has unchecked boxes):\n - **APPEND** current session to session_ids\n - Continue work on existing plan\n - If no active plan OR plan is complete:\n - List available plan files\n - If ONE plan: auto-select it\n - If MULTIPLE plans: show list with timestamps, ask user to select\n\n4. **Create/Update boulder.json**:\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\"\n }\n ```\n\n5. **Read the plan file** and start executing tasks according to Orchestrator Sisyphus workflow\n\n## OUTPUT FORMAT\n\nWhen listing plans for selection:\n```\n\uD83D\uDCCB Available Work Plans\n\nCurrent Time: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified: {date} - Progress: 3/10 tasks\n2. [plan-name-2.md] - Modified: {date} - Progress: 0/5 tasks\n\nWhich plan would you like to work on? (Enter number or plan name)\n```\n\nWhen resuming existing work:\n```\n\uD83D\uDD04 Resuming Work Session\n\nActive Plan: {plan-name}\nProgress: {completed}/{total} tasks\nSessions: {count} (appending current session)\n\nReading plan and continuing from last incomplete task...\n```\n\nWhen auto-selecting single plan:\n```\n\uD83D\uDE80 Starting Work Session\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted: {timestamp}\n\nReading plan and beginning execution...\n```\n\n## CRITICAL\n\n- The session_id is injected by the hook - use it directly\n- Always update boulder.json BEFORE starting work\n- Read the FULL plan file before delegating any tasks\n- Follow Orchestrator Sisyphus delegation protocols (7-section format)";
@@ -0,0 +1,6 @@
1
+ import type { CommandDefinition } from "../claude-code-command-loader";
2
+ export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "refactor" | "start-work";
3
+ export interface BuiltinCommandConfig {
4
+ disabled_commands?: BuiltinCommandName[];
5
+ }
6
+ export type BuiltinCommands = Record<string, CommandDefinition>;
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export { createBuiltinSkills } from "./skills";
@@ -0,0 +1,2 @@
1
+ import type { BuiltinSkill } from "./types";
2
+ export declare function createBuiltinSkills(): BuiltinSkill[];
@@ -0,0 +1,15 @@
1
+ import type { SkillMcpConfig } from "../skill-mcp-manager/types";
2
+ export interface BuiltinSkill {
3
+ name: string;
4
+ description: string;
5
+ template: string;
6
+ license?: string;
7
+ compatibility?: string;
8
+ metadata?: Record<string, unknown>;
9
+ allowedTools?: string[];
10
+ agent?: string;
11
+ model?: string;
12
+ subtask?: boolean;
13
+ argumentHint?: string;
14
+ mcpConfig?: SkillMcpConfig;
15
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./loader";
@@ -0,0 +1,3 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export declare function loadUserAgents(): Record<string, AgentConfig>;
3
+ export declare function loadProjectAgents(): Record<string, AgentConfig>;
@@ -0,0 +1,14 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ export type AgentScope = "user" | "project";
3
+ export interface AgentFrontmatter {
4
+ name?: string;
5
+ description?: string;
6
+ model?: string;
7
+ tools?: string;
8
+ }
9
+ export interface LoadedAgent {
10
+ name: string;
11
+ path: string;
12
+ config: AgentConfig;
13
+ scope: AgentScope;
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./loader";
@@ -0,0 +1,6 @@
1
+ import type { CommandDefinition } from "./types";
2
+ export declare function loadUserCommands(): Promise<Record<string, CommandDefinition>>;
3
+ export declare function loadProjectCommands(): Promise<Record<string, CommandDefinition>>;
4
+ export declare function loadOpencodeGlobalCommands(): Promise<Record<string, CommandDefinition>>;
5
+ export declare function loadOpencodeProjectCommands(): Promise<Record<string, CommandDefinition>>;
6
+ export declare function loadAllCommands(): Promise<Record<string, CommandDefinition>>;
@@ -0,0 +1,42 @@
1
+ export type CommandScope = "user" | "project" | "opencode" | "opencode-project";
2
+ /**
3
+ * Handoff definition for command workflows.
4
+ * Based on speckit's handoff pattern for multi-agent orchestration.
5
+ * @see https://github.com/github/spec-kit
6
+ */
7
+ export interface HandoffDefinition {
8
+ /** Human-readable label for the handoff action */
9
+ label: string;
10
+ /** Target agent/command identifier (e.g., "speckit.tasks") */
11
+ agent: string;
12
+ /** Pre-filled prompt text for the handoff */
13
+ prompt: string;
14
+ /** If true, automatically executes after command completion; if false, shows as suggestion */
15
+ send?: boolean;
16
+ }
17
+ export interface CommandDefinition {
18
+ name: string;
19
+ description?: string;
20
+ template: string;
21
+ agent?: string;
22
+ model?: string;
23
+ subtask?: boolean;
24
+ argumentHint?: string;
25
+ /** Handoff definitions for workflow transitions */
26
+ handoffs?: HandoffDefinition[];
27
+ }
28
+ export interface CommandFrontmatter {
29
+ description?: string;
30
+ "argument-hint"?: string;
31
+ agent?: string;
32
+ model?: string;
33
+ subtask?: boolean;
34
+ /** Handoff definitions for workflow transitions */
35
+ handoffs?: HandoffDefinition[];
36
+ }
37
+ export interface LoadedCommand {
38
+ name: string;
39
+ path: string;
40
+ definition: CommandDefinition;
41
+ scope: CommandScope;
42
+ }
@@ -0,0 +1,2 @@
1
+ export declare function expandEnvVars(value: string): string;
2
+ export declare function expandEnvVarsInObject<T>(obj: T): T;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * MCP Configuration Loader
3
+ *
4
+ * Loads Claude Code .mcp.json format configurations from multiple scopes
5
+ * and transforms them to OpenCode SDK format
6
+ */
7
+ export * from "./types";
8
+ export * from "./loader";
9
+ export * from "./transformer";
10
+ export * from "./env-expander";
@@ -0,0 +1,4 @@
1
+ import type { LoadedMcpServer, McpLoadResult } from "./types";
2
+ export declare function getSystemMcpServerNames(): Set<string>;
3
+ export declare function loadMcpConfigs(): Promise<McpLoadResult>;
4
+ export declare function formatLoadedServersForToast(loadedServers: LoadedMcpServer[]): string;
@@ -0,0 +1,2 @@
1
+ import type { ClaudeCodeMcpServer, McpServerConfig } from "./types";
2
+ export declare function transformMcpServer(name: string, server: ClaudeCodeMcpServer): McpServerConfig;
@@ -0,0 +1,35 @@
1
+ export type McpScope = "user" | "project" | "local";
2
+ export interface ClaudeCodeMcpServer {
3
+ type?: "http" | "sse" | "stdio";
4
+ url?: string;
5
+ command?: string;
6
+ args?: string[];
7
+ env?: Record<string, string>;
8
+ headers?: Record<string, string>;
9
+ disabled?: boolean;
10
+ }
11
+ export interface ClaudeCodeMcpConfig {
12
+ mcpServers?: Record<string, ClaudeCodeMcpServer>;
13
+ }
14
+ export interface McpLocalConfig {
15
+ type: "local";
16
+ command: string[];
17
+ environment?: Record<string, string>;
18
+ enabled?: boolean;
19
+ }
20
+ export interface McpRemoteConfig {
21
+ type: "remote";
22
+ url: string;
23
+ headers?: Record<string, string>;
24
+ enabled?: boolean;
25
+ }
26
+ export type McpServerConfig = McpLocalConfig | McpRemoteConfig;
27
+ export interface LoadedMcpServer {
28
+ name: string;
29
+ scope: McpScope;
30
+ config: McpServerConfig;
31
+ }
32
+ export interface McpLoadResult {
33
+ servers: Record<string, McpServerConfig>;
34
+ loadedServers: LoadedMcpServer[];
35
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./types";
2
+ export * from "./loader";
3
+ export type { PluginLoaderOptions, ClaudeSettings } from "./types";
@@ -0,0 +1,20 @@
1
+ import type { AgentConfig } from "@opencode-ai/sdk";
2
+ import type { CommandDefinition } from "../claude-code-command-loader/types";
3
+ import type { McpServerConfig } from "../claude-code-mcp-loader/types";
4
+ import type { LoadedPlugin, PluginLoadResult, PluginLoadError, HooksConfig, PluginLoaderOptions } from "./types";
5
+ export declare function discoverInstalledPlugins(options?: PluginLoaderOptions): PluginLoadResult;
6
+ export declare function loadPluginCommands(plugins: LoadedPlugin[]): Record<string, CommandDefinition>;
7
+ export declare function loadPluginSkillsAsCommands(plugins: LoadedPlugin[]): Record<string, CommandDefinition>;
8
+ export declare function loadPluginAgents(plugins: LoadedPlugin[]): Record<string, AgentConfig>;
9
+ export declare function loadPluginMcpServers(plugins: LoadedPlugin[]): Promise<Record<string, McpServerConfig>>;
10
+ export declare function loadPluginHooksConfigs(plugins: LoadedPlugin[]): HooksConfig[];
11
+ export interface PluginComponentsResult {
12
+ commands: Record<string, CommandDefinition>;
13
+ skills: Record<string, CommandDefinition>;
14
+ agents: Record<string, AgentConfig>;
15
+ mcpServers: Record<string, McpServerConfig>;
16
+ hooksConfigs: HooksConfig[];
17
+ plugins: LoadedPlugin[];
18
+ errors: PluginLoadError[];
19
+ }
20
+ export declare function loadAllPluginComponents(options?: PluginLoaderOptions): Promise<PluginComponentsResult>;