oh-my-parallel-agent-opencode 0.1.0 → 0.2.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 (532) hide show
  1. package/LICENSE.md +82 -0
  2. package/README.ja.md +392 -0
  3. package/README.ko.md +397 -0
  4. package/README.md +375 -56
  5. package/README.zh-cn.md +402 -0
  6. package/bin/oh-my-parallel-agent-opencode.js +80 -0
  7. package/bin/platform.js +38 -0
  8. package/bin/platform.test.ts +148 -0
  9. package/dist/agents/atlas.d.ts +22 -0
  10. package/dist/agents/dynamic-agent-prompt-builder.d.ts +30 -0
  11. package/dist/agents/explore.d.ts +7 -0
  12. package/dist/agents/hephaestus.d.ts +6 -0
  13. package/dist/agents/index.d.ts +12 -0
  14. package/dist/agents/librarian.d.ts +7 -0
  15. package/dist/agents/metis.d.ts +21 -0
  16. package/dist/agents/momus.d.ts +21 -0
  17. package/dist/agents/momus.test.d.ts +1 -0
  18. package/dist/agents/multimodal-looker.d.ts +7 -0
  19. package/dist/agents/oracle.d.ts +7 -0
  20. package/dist/agents/prometheus/behavioral-summary.d.ts +6 -0
  21. package/dist/agents/prometheus/high-accuracy-mode.d.ts +6 -0
  22. package/dist/agents/prometheus/identity-constraints.d.ts +7 -0
  23. package/dist/agents/prometheus/index.d.ts +39 -0
  24. package/dist/agents/prometheus/interview-mode.d.ts +7 -0
  25. package/dist/agents/prometheus/plan-generation.d.ts +7 -0
  26. package/dist/agents/prometheus/plan-template.d.ts +7 -0
  27. package/dist/agents/prometheus-prompt.test.d.ts +1 -0
  28. package/dist/agents/sisyphus-junior.d.ts +10 -0
  29. package/dist/agents/sisyphus-junior.test.d.ts +1 -0
  30. package/dist/agents/sisyphus.d.ts +8 -0
  31. package/dist/agents/types.d.ts +63 -0
  32. package/dist/agents/utils.d.ts +16 -0
  33. package/dist/agents/utils.test.d.ts +1 -0
  34. package/dist/cli/config-manager.d.ts +162 -0
  35. package/dist/cli/config-manager.test.d.ts +1 -0
  36. package/dist/cli/doctor/checks/auth.d.ts +7 -0
  37. package/dist/cli/doctor/checks/auth.test.d.ts +1 -0
  38. package/dist/cli/doctor/checks/config.d.ts +8 -0
  39. package/dist/cli/doctor/checks/config.test.d.ts +1 -0
  40. package/dist/cli/doctor/checks/dependencies.d.ts +8 -0
  41. package/dist/cli/doctor/checks/dependencies.test.d.ts +1 -0
  42. package/dist/cli/doctor/checks/gh.d.ts +13 -0
  43. package/dist/cli/doctor/checks/gh.test.d.ts +1 -0
  44. package/dist/cli/doctor/checks/index.d.ts +13 -0
  45. package/dist/cli/doctor/checks/lsp.d.ts +8 -0
  46. package/dist/cli/doctor/checks/lsp.test.d.ts +1 -0
  47. package/dist/cli/doctor/checks/mcp-oauth.d.ts +15 -0
  48. package/dist/cli/doctor/checks/mcp-oauth.test.d.ts +1 -0
  49. package/dist/cli/doctor/checks/mcp.d.ts +6 -0
  50. package/dist/cli/doctor/checks/mcp.test.d.ts +1 -0
  51. package/dist/cli/doctor/checks/model-resolution.d.ts +33 -0
  52. package/dist/cli/doctor/checks/model-resolution.test.d.ts +1 -0
  53. package/dist/cli/doctor/checks/opencode.d.ts +19 -0
  54. package/dist/cli/doctor/checks/opencode.test.d.ts +1 -0
  55. package/dist/cli/doctor/checks/plugin.d.ts +4 -0
  56. package/dist/cli/doctor/checks/plugin.test.d.ts +1 -0
  57. package/dist/cli/doctor/checks/version.d.ts +4 -0
  58. package/dist/cli/doctor/checks/version.test.d.ts +1 -0
  59. package/dist/cli/doctor/constants.d.ts +42 -0
  60. package/dist/cli/doctor/formatter.d.ts +12 -0
  61. package/dist/cli/doctor/formatter.test.d.ts +1 -0
  62. package/dist/cli/doctor/index.d.ts +5 -0
  63. package/dist/cli/doctor/runner.d.ts +7 -0
  64. package/dist/cli/doctor/runner.test.d.ts +1 -0
  65. package/dist/cli/doctor/types.d.ts +91 -0
  66. package/dist/cli/get-local-version/formatter.d.ts +3 -0
  67. package/dist/cli/get-local-version/index.d.ts +3 -0
  68. package/dist/cli/get-local-version/types.d.ts +13 -0
  69. package/dist/cli/index.d.ts +2 -0
  70. package/dist/cli/index.js +26903 -0
  71. package/dist/cli/index.test.d.ts +1 -0
  72. package/dist/cli/install.d.ts +2 -0
  73. package/dist/cli/install.test.d.ts +1 -0
  74. package/dist/cli/mcp-oauth/index.d.ts +6 -0
  75. package/dist/cli/mcp-oauth/index.test.d.ts +1 -0
  76. package/dist/cli/mcp-oauth/login.d.ts +6 -0
  77. package/dist/cli/mcp-oauth/login.test.d.ts +1 -0
  78. package/dist/cli/mcp-oauth/logout.d.ts +4 -0
  79. package/dist/cli/mcp-oauth/logout.test.d.ts +1 -0
  80. package/dist/cli/mcp-oauth/status.d.ts +1 -0
  81. package/dist/cli/mcp-oauth/status.test.d.ts +1 -0
  82. package/dist/cli/model-fallback.d.ts +18 -0
  83. package/dist/cli/model-fallback.test.d.ts +1 -0
  84. package/dist/cli/run/completion.d.ts +2 -0
  85. package/dist/cli/run/completion.test.d.ts +1 -0
  86. package/dist/cli/run/events.d.ts +14 -0
  87. package/dist/cli/run/events.test.d.ts +1 -0
  88. package/dist/cli/run/index.d.ts +2 -0
  89. package/dist/cli/run/runner.d.ts +2 -0
  90. package/dist/cli/run/types.d.ts +73 -0
  91. package/dist/cli/types.d.ts +39 -0
  92. package/dist/config/index.d.ts +2 -0
  93. package/dist/config/schema.d.ts +2651 -0
  94. package/dist/config/schema.test.d.ts +1 -0
  95. package/dist/features/background-agent/concurrency.d.ts +27 -0
  96. package/dist/features/background-agent/concurrency.test.d.ts +1 -0
  97. package/dist/features/background-agent/constants.d.ts +44 -0
  98. package/dist/features/background-agent/index.d.ts +4 -0
  99. package/dist/features/background-agent/manager.d.ts +118 -0
  100. package/dist/features/background-agent/manager.test.d.ts +1 -0
  101. package/dist/features/background-agent/result-handler.d.ts +15 -0
  102. package/dist/features/background-agent/spawner.d.ts +14 -0
  103. package/dist/features/background-agent/state.d.ts +35 -0
  104. package/dist/features/background-agent/types.d.ts +79 -0
  105. package/dist/features/boulder-state/constants.d.ts +10 -0
  106. package/dist/features/boulder-state/index.d.ts +3 -0
  107. package/dist/features/boulder-state/storage.d.ts +28 -0
  108. package/dist/features/boulder-state/storage.test.d.ts +1 -0
  109. package/dist/features/boulder-state/types.d.ts +24 -0
  110. package/dist/features/builtin-commands/commands.d.ts +2 -0
  111. package/dist/features/builtin-commands/index.d.ts +2 -0
  112. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -0
  113. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +2 -0
  114. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -0
  115. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -0
  116. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -0
  117. package/dist/features/builtin-commands/templates/stop-continuation.test.d.ts +1 -0
  118. package/dist/features/builtin-commands/types.d.ts +6 -0
  119. package/dist/features/builtin-skills/index.d.ts +2 -0
  120. package/dist/features/builtin-skills/skills/dev-browser.d.ts +2 -0
  121. package/dist/features/builtin-skills/skills/frontend-ui-ux.d.ts +2 -0
  122. package/dist/features/builtin-skills/skills/git-master.d.ts +2 -0
  123. package/dist/features/builtin-skills/skills/index.d.ts +4 -0
  124. package/dist/features/builtin-skills/skills/playwright.d.ts +3 -0
  125. package/dist/features/builtin-skills/skills.d.ts +6 -0
  126. package/dist/features/builtin-skills/skills.test.d.ts +1 -0
  127. package/dist/features/builtin-skills/types.d.ts +15 -0
  128. package/dist/features/claude-code-agent-loader/index.d.ts +2 -0
  129. package/dist/features/claude-code-agent-loader/loader.d.ts +3 -0
  130. package/dist/features/claude-code-agent-loader/types.d.ts +14 -0
  131. package/dist/features/claude-code-command-loader/index.d.ts +2 -0
  132. package/dist/features/claude-code-command-loader/loader.d.ts +6 -0
  133. package/dist/features/claude-code-command-loader/types.d.ts +42 -0
  134. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +2 -0
  135. package/dist/features/claude-code-mcp-loader/index.d.ts +10 -0
  136. package/dist/features/claude-code-mcp-loader/loader.d.ts +4 -0
  137. package/dist/features/claude-code-mcp-loader/loader.test.d.ts +1 -0
  138. package/dist/features/claude-code-mcp-loader/transformer.d.ts +2 -0
  139. package/dist/features/claude-code-mcp-loader/types.d.ts +39 -0
  140. package/dist/features/claude-code-plugin-loader/index.d.ts +3 -0
  141. package/dist/features/claude-code-plugin-loader/loader.d.ts +20 -0
  142. package/dist/features/claude-code-plugin-loader/types.d.ts +186 -0
  143. package/dist/features/claude-code-session-state/index.d.ts +1 -0
  144. package/dist/features/claude-code-session-state/state.d.ts +9 -0
  145. package/dist/features/claude-code-session-state/state.test.d.ts +1 -0
  146. package/dist/features/context-injector/collector.d.ts +11 -0
  147. package/dist/features/context-injector/collector.test.d.ts +1 -0
  148. package/dist/features/context-injector/index.d.ts +3 -0
  149. package/dist/features/context-injector/injector.d.ts +39 -0
  150. package/dist/features/context-injector/injector.test.d.ts +1 -0
  151. package/dist/features/context-injector/types.d.ts +83 -0
  152. package/dist/features/hook-message-injector/constants.d.ts +3 -0
  153. package/dist/features/hook-message-injector/index.d.ts +4 -0
  154. package/dist/features/hook-message-injector/injector.d.ts +19 -0
  155. package/dist/features/hook-message-injector/types.d.ts +46 -0
  156. package/dist/features/mcp-oauth/callback-server.d.ts +11 -0
  157. package/dist/features/mcp-oauth/callback-server.test.d.ts +1 -0
  158. package/dist/features/mcp-oauth/dcr.d.ts +34 -0
  159. package/dist/features/mcp-oauth/dcr.test.d.ts +1 -0
  160. package/dist/features/mcp-oauth/discovery.d.ts +8 -0
  161. package/dist/features/mcp-oauth/discovery.test.d.ts +1 -0
  162. package/dist/features/mcp-oauth/index.d.ts +1 -0
  163. package/dist/features/mcp-oauth/provider.d.ts +41 -0
  164. package/dist/features/mcp-oauth/provider.test.d.ts +1 -0
  165. package/dist/features/mcp-oauth/resource-indicator.d.ts +2 -0
  166. package/dist/features/mcp-oauth/resource-indicator.test.d.ts +1 -0
  167. package/dist/features/mcp-oauth/schema.d.ts +6 -0
  168. package/dist/features/mcp-oauth/schema.test.d.ts +1 -0
  169. package/dist/features/mcp-oauth/step-up.d.ts +8 -0
  170. package/dist/features/mcp-oauth/step-up.test.d.ts +1 -0
  171. package/dist/features/mcp-oauth/storage.d.ts +17 -0
  172. package/dist/features/mcp-oauth/storage.test.d.ts +1 -0
  173. package/dist/features/opencode-skill-loader/async-loader.d.ts +6 -0
  174. package/dist/features/opencode-skill-loader/async-loader.test.d.ts +1 -0
  175. package/dist/features/opencode-skill-loader/blocking.d.ts +2 -0
  176. package/dist/features/opencode-skill-loader/blocking.test.d.ts +1 -0
  177. package/dist/features/opencode-skill-loader/discover-worker.d.ts +1 -0
  178. package/dist/features/opencode-skill-loader/index.d.ts +4 -0
  179. package/dist/features/opencode-skill-loader/loader.d.ts +16 -0
  180. package/dist/features/opencode-skill-loader/loader.test.d.ts +1 -0
  181. package/dist/features/opencode-skill-loader/merger.d.ts +7 -0
  182. package/dist/features/opencode-skill-loader/skill-content.d.ts +21 -0
  183. package/dist/features/opencode-skill-loader/skill-content.test.d.ts +1 -0
  184. package/dist/features/opencode-skill-loader/types.d.ts +34 -0
  185. package/dist/features/sisyphus-swarm/mailbox/types.d.ts +191 -0
  186. package/dist/features/sisyphus-swarm/mailbox/types.test.d.ts +1 -0
  187. package/dist/features/sisyphus-tasks/storage.d.ts +9 -0
  188. package/dist/features/sisyphus-tasks/storage.test.d.ts +1 -0
  189. package/dist/features/sisyphus-tasks/types.d.ts +47 -0
  190. package/dist/features/sisyphus-tasks/types.test.d.ts +1 -0
  191. package/dist/features/skill-mcp-manager/env-cleaner.d.ts +2 -0
  192. package/dist/features/skill-mcp-manager/env-cleaner.test.d.ts +1 -0
  193. package/dist/features/skill-mcp-manager/index.d.ts +2 -0
  194. package/dist/features/skill-mcp-manager/manager.d.ts +50 -0
  195. package/dist/features/skill-mcp-manager/manager.test.d.ts +1 -0
  196. package/dist/features/skill-mcp-manager/types.d.ts +11 -0
  197. package/dist/features/task-toast-manager/index.d.ts +2 -0
  198. package/dist/features/task-toast-manager/manager.d.ts +58 -0
  199. package/dist/features/task-toast-manager/manager.test.d.ts +1 -0
  200. package/dist/features/task-toast-manager/types.d.ts +24 -0
  201. package/dist/features/tmux-subagent/action-executor.d.ts +22 -0
  202. package/dist/features/tmux-subagent/decision-engine.d.ts +38 -0
  203. package/dist/features/tmux-subagent/decision-engine.test.d.ts +1 -0
  204. package/dist/features/tmux-subagent/index.d.ts +5 -0
  205. package/dist/features/tmux-subagent/manager.d.ts +59 -0
  206. package/dist/features/tmux-subagent/manager.test.d.ts +1 -0
  207. package/dist/features/tmux-subagent/pane-state-querier.d.ts +2 -0
  208. package/dist/features/tmux-subagent/types.d.ts +53 -0
  209. package/dist/hooks/agent-usage-reminder/constants.d.ts +5 -0
  210. package/dist/hooks/agent-usage-reminder/index.d.ts +22 -0
  211. package/dist/hooks/agent-usage-reminder/storage.d.ts +4 -0
  212. package/dist/hooks/agent-usage-reminder/types.d.ts +6 -0
  213. package/dist/hooks/anthropic-context-window-limit-recovery/executor.d.ts +4 -0
  214. package/dist/hooks/anthropic-context-window-limit-recovery/executor.test.d.ts +1 -0
  215. package/dist/hooks/anthropic-context-window-limit-recovery/index.d.ts +16 -0
  216. package/dist/hooks/anthropic-context-window-limit-recovery/parser.d.ts +2 -0
  217. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.d.ts +7 -0
  218. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-deduplication.test.d.ts +1 -0
  219. package/dist/hooks/anthropic-context-window-limit-recovery/pruning-types.d.ts +36 -0
  220. package/dist/hooks/anthropic-context-window-limit-recovery/storage.d.ts +28 -0
  221. package/dist/hooks/anthropic-context-window-limit-recovery/storage.test.d.ts +1 -0
  222. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +37 -0
  223. package/dist/hooks/atlas/index.d.ts +35 -0
  224. package/dist/hooks/atlas/index.test.d.ts +1 -0
  225. package/dist/hooks/auto-slash-command/constants.d.ts +5 -0
  226. package/dist/hooks/auto-slash-command/detector.d.ts +9 -0
  227. package/dist/hooks/auto-slash-command/detector.test.d.ts +1 -0
  228. package/dist/hooks/auto-slash-command/executor.d.ts +11 -0
  229. package/dist/hooks/auto-slash-command/index.d.ts +12 -0
  230. package/dist/hooks/auto-slash-command/index.test.d.ts +1 -0
  231. package/dist/hooks/auto-slash-command/types.d.ts +27 -0
  232. package/dist/hooks/auto-update-checker/cache.d.ts +3 -0
  233. package/dist/hooks/auto-update-checker/checker.d.ts +20 -0
  234. package/dist/hooks/auto-update-checker/checker.test.d.ts +1 -0
  235. package/dist/hooks/auto-update-checker/constants.d.ts +10 -0
  236. package/dist/hooks/auto-update-checker/index.d.ts +17 -0
  237. package/dist/hooks/auto-update-checker/index.test.d.ts +1 -0
  238. package/dist/hooks/auto-update-checker/types.d.ts +25 -0
  239. package/dist/hooks/background-notification/index.d.ts +18 -0
  240. package/dist/hooks/background-notification/types.d.ts +4 -0
  241. package/dist/hooks/category-skill-reminder/index.d.ts +22 -0
  242. package/dist/hooks/category-skill-reminder/index.test.d.ts +1 -0
  243. package/dist/hooks/claude-code-hooks/config-loader.d.ts +13 -0
  244. package/dist/hooks/claude-code-hooks/config.d.ts +3 -0
  245. package/dist/hooks/claude-code-hooks/index.d.ts +48 -0
  246. package/dist/hooks/claude-code-hooks/plugin-config.d.ts +8 -0
  247. package/dist/hooks/claude-code-hooks/post-tool-use.d.ts +40 -0
  248. package/dist/hooks/claude-code-hooks/pre-compact.d.ts +16 -0
  249. package/dist/hooks/claude-code-hooks/pre-tool-use.d.ts +25 -0
  250. package/dist/hooks/claude-code-hooks/stop.d.ts +20 -0
  251. package/dist/hooks/claude-code-hooks/todo.d.ts +12 -0
  252. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +5 -0
  253. package/dist/hooks/claude-code-hooks/transcript.d.ts +34 -0
  254. package/dist/hooks/claude-code-hooks/types.d.ts +183 -0
  255. package/dist/hooks/claude-code-hooks/user-prompt-submit.d.ts +22 -0
  256. package/dist/hooks/comment-checker/cli.d.ts +52 -0
  257. package/dist/hooks/comment-checker/cli.test.d.ts +1 -0
  258. package/dist/hooks/comment-checker/downloader.d.ts +25 -0
  259. package/dist/hooks/comment-checker/index.d.ts +19 -0
  260. package/dist/hooks/comment-checker/types.d.ts +31 -0
  261. package/dist/hooks/compaction-context-injector/index.d.ts +8 -0
  262. package/dist/hooks/compaction-context-injector/index.test.d.ts +1 -0
  263. package/dist/hooks/context-window-monitor.d.ts +18 -0
  264. package/dist/hooks/delegate-task-retry/index.d.ts +24 -0
  265. package/dist/hooks/delegate-task-retry/index.test.d.ts +1 -0
  266. package/dist/hooks/directory-agents-injector/constants.d.ts +3 -0
  267. package/dist/hooks/directory-agents-injector/index.d.ts +26 -0
  268. package/dist/hooks/directory-agents-injector/storage.d.ts +1 -0
  269. package/dist/hooks/directory-readme-injector/constants.d.ts +3 -0
  270. package/dist/hooks/directory-readme-injector/index.d.ts +26 -0
  271. package/dist/hooks/directory-readme-injector/storage.d.ts +1 -0
  272. package/dist/hooks/edit-error-recovery/index.d.ts +31 -0
  273. package/dist/hooks/edit-error-recovery/index.test.d.ts +1 -0
  274. package/dist/hooks/empty-task-response-detector.d.ts +12 -0
  275. package/dist/hooks/index.d.ts +35 -0
  276. package/dist/hooks/interactive-bash-session/constants.d.ts +4 -0
  277. package/dist/hooks/interactive-bash-session/index.d.ts +23 -0
  278. package/dist/hooks/interactive-bash-session/storage.d.ts +4 -0
  279. package/dist/hooks/interactive-bash-session/types.d.ts +10 -0
  280. package/dist/hooks/keyword-detector/analyze/default.d.ts +12 -0
  281. package/dist/hooks/keyword-detector/analyze/index.d.ts +1 -0
  282. package/dist/hooks/keyword-detector/constants.d.ts +10 -0
  283. package/dist/hooks/keyword-detector/detector.d.ts +11 -0
  284. package/dist/hooks/keyword-detector/index.d.ts +23 -0
  285. package/dist/hooks/keyword-detector/index.test.d.ts +1 -0
  286. package/dist/hooks/keyword-detector/search/default.d.ts +12 -0
  287. package/dist/hooks/keyword-detector/search/index.d.ts +1 -0
  288. package/dist/hooks/keyword-detector/types.d.ts +4 -0
  289. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +10 -0
  290. package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +16 -0
  291. package/dist/hooks/keyword-detector/ultrawork/index.d.ts +17 -0
  292. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +6 -0
  293. package/dist/hooks/keyword-detector/ultrawork/utils.d.ts +24 -0
  294. package/dist/hooks/non-interactive-env/constants.d.ts +34 -0
  295. package/dist/hooks/non-interactive-env/detector.d.ts +1 -0
  296. package/dist/hooks/non-interactive-env/index.d.ts +14 -0
  297. package/dist/hooks/non-interactive-env/index.test.d.ts +1 -0
  298. package/dist/hooks/non-interactive-env/types.d.ts +3 -0
  299. package/dist/hooks/prometheus-md-only/constants.d.ts +7 -0
  300. package/dist/hooks/prometheus-md-only/index.d.ts +12 -0
  301. package/dist/hooks/prometheus-md-only/index.test.d.ts +1 -0
  302. package/dist/hooks/question-label-truncator/index.d.ts +7 -0
  303. package/dist/hooks/question-label-truncator/index.test.d.ts +1 -0
  304. package/dist/hooks/ralph-loop/constants.d.ts +5 -0
  305. package/dist/hooks/ralph-loop/index.d.ts +21 -0
  306. package/dist/hooks/ralph-loop/index.test.d.ts +1 -0
  307. package/dist/hooks/ralph-loop/storage.d.ts +6 -0
  308. package/dist/hooks/ralph-loop/types.d.ts +17 -0
  309. package/dist/hooks/rules-injector/constants.d.ts +8 -0
  310. package/dist/hooks/rules-injector/finder.d.ts +33 -0
  311. package/dist/hooks/rules-injector/finder.test.d.ts +1 -0
  312. package/dist/hooks/rules-injector/index.d.ts +26 -0
  313. package/dist/hooks/rules-injector/matcher.d.ts +21 -0
  314. package/dist/hooks/rules-injector/output-path.d.ts +5 -0
  315. package/dist/hooks/rules-injector/output-path.test.d.ts +1 -0
  316. package/dist/hooks/rules-injector/parser.d.ts +18 -0
  317. package/dist/hooks/rules-injector/parser.test.d.ts +1 -0
  318. package/dist/hooks/rules-injector/storage.d.ts +9 -0
  319. package/dist/hooks/rules-injector/types.d.ts +54 -0
  320. package/dist/hooks/session-notification-utils.d.ts +9 -0
  321. package/dist/hooks/session-notification.d.ts +20 -0
  322. package/dist/hooks/session-notification.test.d.ts +1 -0
  323. package/dist/hooks/session-recovery/constants.d.ts +6 -0
  324. package/dist/hooks/session-recovery/index.d.ts +22 -0
  325. package/dist/hooks/session-recovery/index.test.d.ts +1 -0
  326. package/dist/hooks/session-recovery/storage.d.ts +19 -0
  327. package/dist/hooks/session-recovery/types.d.ts +90 -0
  328. package/dist/hooks/sisyphus-junior-notepad/constants.d.ts +2 -0
  329. package/dist/hooks/sisyphus-junior-notepad/index.d.ts +12 -0
  330. package/dist/hooks/start-work/index.d.ts +16 -0
  331. package/dist/hooks/start-work/index.test.d.ts +1 -0
  332. package/dist/hooks/stop-continuation-guard/index.d.ts +16 -0
  333. package/dist/hooks/stop-continuation-guard/index.test.d.ts +1 -0
  334. package/dist/hooks/subagent-question-blocker/index.d.ts +2 -0
  335. package/dist/hooks/subagent-question-blocker/index.test.d.ts +1 -0
  336. package/dist/hooks/task-resume-info/index.d.ts +11 -0
  337. package/dist/hooks/think-mode/detector.d.ts +5 -0
  338. package/dist/hooks/think-mode/index.d.ts +14 -0
  339. package/dist/hooks/think-mode/index.test.d.ts +1 -0
  340. package/dist/hooks/think-mode/switcher.d.ts +69 -0
  341. package/dist/hooks/think-mode/switcher.test.d.ts +1 -0
  342. package/dist/hooks/think-mode/types.d.ts +21 -0
  343. package/dist/hooks/thinking-block-validator/index.d.ts +30 -0
  344. package/dist/hooks/todo-continuation-enforcer.d.ts +19 -0
  345. package/dist/hooks/todo-continuation-enforcer.test.d.ts +1 -0
  346. package/dist/hooks/tool-output-truncator.d.ts +17 -0
  347. package/dist/hooks/tool-output-truncator.test.d.ts +1 -0
  348. package/dist/hooks/unstable-agent-babysitter/index.d.ts +50 -0
  349. package/dist/hooks/unstable-agent-babysitter/index.test.d.ts +1 -0
  350. package/dist/index.d.ts +5 -0
  351. package/dist/index.js +76117 -0
  352. package/dist/index.test.d.ts +1 -0
  353. package/dist/mcp/context7.d.ts +9 -0
  354. package/dist/mcp/grep-app.d.ts +6 -0
  355. package/dist/mcp/index.d.ts +9 -0
  356. package/dist/mcp/index.test.d.ts +1 -0
  357. package/dist/mcp/types.d.ts +9 -0
  358. package/dist/mcp/websearch.d.ts +9 -0
  359. package/dist/oh-my-parallel-agent-opencode.schema.json +2182 -0
  360. package/dist/plugin-config.d.ts +4 -0
  361. package/dist/plugin-config.test.d.ts +1 -0
  362. package/dist/plugin-handlers/config-handler.d.ts +13 -0
  363. package/dist/plugin-handlers/config-handler.test.d.ts +1 -0
  364. package/dist/plugin-handlers/index.d.ts +1 -0
  365. package/dist/plugin-state.d.ts +6 -0
  366. package/dist/shared/agent-config-integration.test.d.ts +1 -0
  367. package/dist/shared/agent-display-names.d.ts +12 -0
  368. package/dist/shared/agent-display-names.test.d.ts +1 -0
  369. package/dist/shared/agent-tool-restrictions.d.ts +7 -0
  370. package/dist/shared/agent-variant.d.ts +9 -0
  371. package/dist/shared/agent-variant.test.d.ts +1 -0
  372. package/dist/shared/binary-downloader.d.ts +10 -0
  373. package/dist/shared/claude-config-dir.d.ts +1 -0
  374. package/dist/shared/claude-config-dir.test.d.ts +1 -0
  375. package/dist/shared/command-executor.d.ts +21 -0
  376. package/dist/shared/config-errors.d.ts +7 -0
  377. package/dist/shared/connected-providers-cache.d.ts +52 -0
  378. package/dist/shared/data-path.d.ts +30 -0
  379. package/dist/shared/deep-merge.d.ts +13 -0
  380. package/dist/shared/deep-merge.test.d.ts +1 -0
  381. package/dist/shared/dynamic-truncator.d.ts +27 -0
  382. package/dist/shared/external-plugin-detector.d.ts +18 -0
  383. package/dist/shared/external-plugin-detector.test.d.ts +1 -0
  384. package/dist/shared/file-reference-resolver.d.ts +1 -0
  385. package/dist/shared/file-utils.d.ts +7 -0
  386. package/dist/shared/first-message-variant.d.ts +11 -0
  387. package/dist/shared/first-message-variant.test.d.ts +1 -0
  388. package/dist/shared/frontmatter.d.ts +7 -0
  389. package/dist/shared/frontmatter.test.d.ts +1 -0
  390. package/dist/shared/hook-disabled.d.ts +2 -0
  391. package/dist/shared/index.d.ts +36 -0
  392. package/dist/shared/jsonc-parser.d.ts +15 -0
  393. package/dist/shared/jsonc-parser.test.d.ts +1 -0
  394. package/dist/shared/logger.d.ts +2 -0
  395. package/dist/shared/migration.d.ts +32 -0
  396. package/dist/shared/migration.test.d.ts +1 -0
  397. package/dist/shared/model-availability.d.ts +19 -0
  398. package/dist/shared/model-availability.test.d.ts +1 -0
  399. package/dist/shared/model-requirements.d.ts +13 -0
  400. package/dist/shared/model-requirements.test.d.ts +1 -0
  401. package/dist/shared/model-resolution-pipeline.d.ts +24 -0
  402. package/dist/shared/model-resolver.d.ts +22 -0
  403. package/dist/shared/model-resolver.test.d.ts +1 -0
  404. package/dist/shared/model-sanitizer.d.ts +3 -0
  405. package/dist/shared/model-suggestion-retry.d.ts +24 -0
  406. package/dist/shared/model-suggestion-retry.test.d.ts +1 -0
  407. package/dist/shared/ollama-ndjson-parser.d.ts +108 -0
  408. package/dist/shared/opencode-config-dir.d.ts +19 -0
  409. package/dist/shared/opencode-config-dir.test.d.ts +1 -0
  410. package/dist/shared/opencode-version.d.ts +19 -0
  411. package/dist/shared/opencode-version.test.d.ts +1 -0
  412. package/dist/shared/pattern-matcher.d.ts +3 -0
  413. package/dist/shared/permission-compat.d.ts +27 -0
  414. package/dist/shared/permission-compat.test.d.ts +1 -0
  415. package/dist/shared/session-cursor.d.ts +13 -0
  416. package/dist/shared/session-cursor.test.d.ts +1 -0
  417. package/dist/shared/session-injected-paths.d.ts +10 -0
  418. package/dist/shared/session-utils.d.ts +2 -0
  419. package/dist/shared/shell-env.d.ts +41 -0
  420. package/dist/shared/shell-env.test.d.ts +1 -0
  421. package/dist/shared/snake-case.d.ts +5 -0
  422. package/dist/shared/system-directive.d.ts +45 -0
  423. package/dist/shared/system-directive.test.d.ts +1 -0
  424. package/dist/shared/tmux/constants.d.ts +5 -0
  425. package/dist/shared/tmux/index.d.ts +3 -0
  426. package/dist/shared/tmux/tmux-utils.d.ts +17 -0
  427. package/dist/shared/tmux/tmux-utils.test.d.ts +1 -0
  428. package/dist/shared/tmux/types.d.ts +4 -0
  429. package/dist/shared/tool-name.d.ts +1 -0
  430. package/dist/shared/zip-extractor.d.ts +1 -0
  431. package/dist/tools/ast-grep/cli.d.ts +15 -0
  432. package/dist/tools/ast-grep/constants.d.ts +29 -0
  433. package/dist/tools/ast-grep/downloader.d.ts +5 -0
  434. package/dist/tools/ast-grep/index.d.ts +8 -0
  435. package/dist/tools/ast-grep/tools.d.ts +3 -0
  436. package/dist/tools/ast-grep/types.d.ts +58 -0
  437. package/dist/tools/ast-grep/utils.d.ts +5 -0
  438. package/dist/tools/background-task/constants.d.ts +3 -0
  439. package/dist/tools/background-task/index.d.ts +4 -0
  440. package/dist/tools/background-task/tools.d.ts +47 -0
  441. package/dist/tools/background-task/tools.test.d.ts +1 -0
  442. package/dist/tools/background-task/types.d.ts +20 -0
  443. package/dist/tools/call-omo-agent/constants.d.ts +2 -0
  444. package/dist/tools/call-omo-agent/index.d.ts +3 -0
  445. package/dist/tools/call-omo-agent/tools.d.ts +3 -0
  446. package/dist/tools/call-omo-agent/types.d.ts +24 -0
  447. package/dist/tools/delegate-task/categories.d.ts +17 -0
  448. package/dist/tools/delegate-task/constants.d.ts +30 -0
  449. package/dist/tools/delegate-task/executor.d.ts +75 -0
  450. package/dist/tools/delegate-task/helpers.d.ts +30 -0
  451. package/dist/tools/delegate-task/index.d.ts +4 -0
  452. package/dist/tools/delegate-task/prompt-builder.d.ts +6 -0
  453. package/dist/tools/delegate-task/timing.d.ts +11 -0
  454. package/dist/tools/delegate-task/tools.d.ts +6 -0
  455. package/dist/tools/delegate-task/tools.test.d.ts +1 -0
  456. package/dist/tools/delegate-task/types.d.ts +44 -0
  457. package/dist/tools/glob/cli.d.ts +11 -0
  458. package/dist/tools/glob/cli.test.d.ts +1 -0
  459. package/dist/tools/glob/constants.d.ts +6 -0
  460. package/dist/tools/glob/index.d.ts +2 -0
  461. package/dist/tools/glob/tools.d.ts +2 -0
  462. package/dist/tools/glob/types.d.ts +20 -0
  463. package/dist/tools/glob/utils.d.ts +2 -0
  464. package/dist/tools/grep/cli.d.ts +3 -0
  465. package/dist/tools/grep/constants.d.ts +17 -0
  466. package/dist/tools/grep/downloader.d.ts +3 -0
  467. package/dist/tools/grep/downloader.test.d.ts +1 -0
  468. package/dist/tools/grep/index.d.ts +2 -0
  469. package/dist/tools/grep/tools.d.ts +2 -0
  470. package/dist/tools/grep/types.d.ts +36 -0
  471. package/dist/tools/grep/utils.d.ts +3 -0
  472. package/dist/tools/index.d.ts +15 -0
  473. package/dist/tools/interactive-bash/constants.d.ts +3 -0
  474. package/dist/tools/interactive-bash/index.d.ts +3 -0
  475. package/dist/tools/interactive-bash/tools.d.ts +7 -0
  476. package/dist/tools/interactive-bash/utils.d.ts +3 -0
  477. package/dist/tools/look-at/constants.d.ts +2 -0
  478. package/dist/tools/look-at/index.d.ts +3 -0
  479. package/dist/tools/look-at/tools.d.ts +9 -0
  480. package/dist/tools/look-at/tools.test.d.ts +1 -0
  481. package/dist/tools/look-at/types.d.ts +4 -0
  482. package/dist/tools/lsp/client.d.ts +50 -0
  483. package/dist/tools/lsp/config.d.ts +17 -0
  484. package/dist/tools/lsp/config.test.d.ts +1 -0
  485. package/dist/tools/lsp/constants.d.ts +9 -0
  486. package/dist/tools/lsp/index.d.ts +6 -0
  487. package/dist/tools/lsp/tools.d.ts +7 -0
  488. package/dist/tools/lsp/types.d.ts +123 -0
  489. package/dist/tools/lsp/utils.d.ts +26 -0
  490. package/dist/tools/session-manager/constants.d.ts +12 -0
  491. package/dist/tools/session-manager/index.d.ts +3 -0
  492. package/dist/tools/session-manager/storage.d.ts +12 -0
  493. package/dist/tools/session-manager/storage.test.d.ts +1 -0
  494. package/dist/tools/session-manager/tools.d.ts +5 -0
  495. package/dist/tools/session-manager/tools.test.d.ts +1 -0
  496. package/dist/tools/session-manager/types.d.ts +89 -0
  497. package/dist/tools/session-manager/utils.d.ts +11 -0
  498. package/dist/tools/session-manager/utils.test.d.ts +1 -0
  499. package/dist/tools/skill/constants.d.ts +3 -0
  500. package/dist/tools/skill/index.d.ts +3 -0
  501. package/dist/tools/skill/tools.d.ts +4 -0
  502. package/dist/tools/skill/tools.test.d.ts +1 -0
  503. package/dist/tools/skill/types.d.ts +28 -0
  504. package/dist/tools/skill-mcp/constants.d.ts +2 -0
  505. package/dist/tools/skill-mcp/index.d.ts +3 -0
  506. package/dist/tools/skill-mcp/tools.d.ts +11 -0
  507. package/dist/tools/skill-mcp/tools.test.d.ts +1 -0
  508. package/dist/tools/skill-mcp/types.d.ts +8 -0
  509. package/dist/tools/slashcommand/index.d.ts +2 -0
  510. package/dist/tools/slashcommand/tools.d.ts +5 -0
  511. package/dist/tools/slashcommand/tools.test.d.ts +1 -0
  512. package/dist/tools/slashcommand/types.d.ts +24 -0
  513. package/package.json +77 -6
  514. package/postinstall.mjs +43 -0
  515. package/__tests__/agents.test.ts +0 -107
  516. package/__tests__/config-handler.test.ts +0 -198
  517. package/__tests__/dynamic-agent.test.ts +0 -68
  518. package/__tests__/schema.test.ts +0 -149
  519. package/__tests__/setup.test.ts +0 -16
  520. package/bun.lock +0 -29
  521. package/oh-my-parallel-agent-opencode.example.json +0 -7
  522. package/src/agents/explore.ts +0 -117
  523. package/src/agents/index.ts +0 -69
  524. package/src/agents/librarian.ts +0 -302
  525. package/src/agents/metis.ts +0 -341
  526. package/src/agents/momus.ts +0 -237
  527. package/src/agents/types.ts +0 -95
  528. package/src/config/schema.ts +0 -15
  529. package/src/index.ts +0 -116
  530. package/src/plugin-handlers/config-handler.ts +0 -129
  531. package/src/utils/dynamic-agent.ts +0 -37
  532. package/tsconfig.json +0 -19
@@ -0,0 +1,3 @@
1
+ export declare const OPENCODE_STORAGE: string;
2
+ export declare const README_INJECTOR_STORAGE: string;
3
+ export declare const README_FILENAME = "README.md";
@@ -0,0 +1,26 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ interface ToolExecuteInput {
3
+ tool: string;
4
+ sessionID: string;
5
+ callID: string;
6
+ }
7
+ interface ToolExecuteOutput {
8
+ title: string;
9
+ output: string;
10
+ metadata: unknown;
11
+ }
12
+ interface ToolExecuteBeforeOutput {
13
+ args: unknown;
14
+ }
15
+ interface EventInput {
16
+ event: {
17
+ type: string;
18
+ properties?: unknown;
19
+ };
20
+ }
21
+ export declare function createDirectoryReadmeInjectorHook(ctx: PluginInput): {
22
+ "tool.execute.before": (input: ToolExecuteInput, output: ToolExecuteBeforeOutput) => Promise<void>;
23
+ "tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
24
+ event: ({ event }: EventInput) => Promise<void>;
25
+ };
26
+ export {};
@@ -0,0 +1 @@
1
+ export declare const loadInjectedPaths: (sessionID: string) => Set<string>, saveInjectedPaths: (sessionID: string, paths: Set<string>) => void, clearInjectedPaths: (sessionID: string) => void;
@@ -0,0 +1,31 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ /**
3
+ * Known Edit tool error patterns that indicate the AI made a mistake
4
+ */
5
+ export declare const EDIT_ERROR_PATTERNS: readonly ["oldString and newString must be different", "oldString not found", "oldString found multiple times"];
6
+ /**
7
+ * System reminder injected when Edit tool fails due to AI mistake
8
+ * Short, direct, and commanding - forces immediate corrective action
9
+ */
10
+ export declare const EDIT_ERROR_REMINDER = "\n[EDIT ERROR - IMMEDIATE ACTION REQUIRED]\n\nYou made an Edit mistake. STOP and do this NOW:\n\n1. READ the file immediately to see its ACTUAL current state\n2. VERIFY what the content really looks like (your assumption was wrong)\n3. APOLOGIZE briefly to the user for the error\n4. CONTINUE with corrected action based on the real file content\n\nDO NOT attempt another edit until you've read and verified the file state.\n";
11
+ /**
12
+ * Detects Edit tool errors caused by AI mistakes and injects a recovery reminder
13
+ *
14
+ * This hook catches common Edit tool failures:
15
+ * - oldString and newString must be different (trying to "edit" to same content)
16
+ * - oldString not found (wrong assumption about file content)
17
+ * - oldString found multiple times (ambiguous match, need more context)
18
+ *
19
+ * @see https://github.com/sst/opencode/issues/4718
20
+ */
21
+ export declare function createEditErrorRecoveryHook(_ctx: PluginInput): {
22
+ "tool.execute.after": (input: {
23
+ tool: string;
24
+ sessionID: string;
25
+ callID: string;
26
+ }, output: {
27
+ title: string;
28
+ output: string;
29
+ metadata: unknown;
30
+ }) => Promise<void>;
31
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function createEmptyTaskResponseDetectorHook(_ctx: PluginInput): {
3
+ "tool.execute.after": (input: {
4
+ tool: string;
5
+ sessionID: string;
6
+ callID: string;
7
+ }, output: {
8
+ title: string;
9
+ output: string;
10
+ metadata: unknown;
11
+ }) => Promise<void>;
12
+ };
@@ -0,0 +1,35 @@
1
+ export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
2
+ export { createContextWindowMonitorHook } from "./context-window-monitor";
3
+ export { createSessionNotification } from "./session-notification";
4
+ export { createSessionRecoveryHook, type SessionRecoveryHook, type SessionRecoveryOptions } from "./session-recovery";
5
+ export { createCommentCheckerHooks } from "./comment-checker";
6
+ export { createToolOutputTruncatorHook } from "./tool-output-truncator";
7
+ export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
8
+ export { createDirectoryReadmeInjectorHook } from "./directory-readme-injector";
9
+ export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detector";
10
+ export { createAnthropicContextWindowLimitRecoveryHook, type AnthropicContextWindowLimitRecoveryOptions } from "./anthropic-context-window-limit-recovery";
11
+ export { createThinkModeHook } from "./think-mode";
12
+ export { createClaudeCodeHooksHook } from "./claude-code-hooks";
13
+ export { createRulesInjectorHook } from "./rules-injector";
14
+ export { createBackgroundNotificationHook } from "./background-notification";
15
+ export { createAutoUpdateCheckerHook } from "./auto-update-checker";
16
+ export { createAgentUsageReminderHook } from "./agent-usage-reminder";
17
+ export { createKeywordDetectorHook } from "./keyword-detector";
18
+ export { createNonInteractiveEnvHook } from "./non-interactive-env";
19
+ export { createInteractiveBashSessionHook } from "./interactive-bash-session";
20
+ export { createThinkingBlockValidatorHook } from "./thinking-block-validator";
21
+ export { createCategorySkillReminderHook } from "./category-skill-reminder";
22
+ export { createRalphLoopHook, type RalphLoopHook } from "./ralph-loop";
23
+ export { createAutoSlashCommandHook } from "./auto-slash-command";
24
+ export { createEditErrorRecoveryHook } from "./edit-error-recovery";
25
+ export { createPrometheusMdOnlyHook } from "./prometheus-md-only";
26
+ export { createSisyphusJuniorNotepadHook } from "./sisyphus-junior-notepad";
27
+ export { createTaskResumeInfoHook } from "./task-resume-info";
28
+ export { createStartWorkHook } from "./start-work";
29
+ export { createAtlasHook } from "./atlas";
30
+ export { createDelegateTaskRetryHook } from "./delegate-task-retry";
31
+ export { createQuestionLabelTruncatorHook } from "./question-label-truncator";
32
+ export { createSubagentQuestionBlockerHook } from "./subagent-question-blocker";
33
+ export { createStopContinuationGuardHook, type StopContinuationGuard } from "./stop-continuation-guard";
34
+ export { createCompactionContextInjector, type SummarizeContext } from "./compaction-context-injector";
35
+ export { createUnstableAgentBabysitterHook } from "./unstable-agent-babysitter";
@@ -0,0 +1,4 @@
1
+ export declare const OPENCODE_STORAGE: string;
2
+ export declare const INTERACTIVE_BASH_SESSION_STORAGE: string;
3
+ export declare const OMO_SESSION_PREFIX = "omo-";
4
+ export declare function buildSessionReminderMessage(sessions: string[]): string;
@@ -0,0 +1,23 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ interface ToolExecuteInput {
3
+ tool: string;
4
+ sessionID: string;
5
+ callID: string;
6
+ args?: Record<string, unknown>;
7
+ }
8
+ interface ToolExecuteOutput {
9
+ title: string;
10
+ output: string;
11
+ metadata: unknown;
12
+ }
13
+ interface EventInput {
14
+ event: {
15
+ type: string;
16
+ properties?: unknown;
17
+ };
18
+ }
19
+ export declare function createInteractiveBashSessionHook(ctx: PluginInput): {
20
+ "tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
21
+ event: ({ event }: EventInput) => Promise<void>;
22
+ };
23
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { InteractiveBashSessionState } from "./types";
2
+ export declare function loadInteractiveBashSessionState(sessionID: string): InteractiveBashSessionState | null;
3
+ export declare function saveInteractiveBashSessionState(state: InteractiveBashSessionState): void;
4
+ export declare function clearInteractiveBashSessionState(sessionID: string): void;
@@ -0,0 +1,10 @@
1
+ export interface InteractiveBashSessionState {
2
+ sessionID: string;
3
+ tmuxSessions: Set<string>;
4
+ updatedAt: number;
5
+ }
6
+ export interface SerializedInteractiveBashSessionState {
7
+ sessionID: string;
8
+ tmuxSessions: string[];
9
+ updatedAt: number;
10
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Analyze mode keyword detector.
3
+ *
4
+ * Triggers on analysis-related keywords across multiple languages:
5
+ * - English: analyze, analyse, investigate, examine, research, study, deep-dive, inspect, audit, evaluate, assess, review, diagnose, scrutinize, dissect, debug, comprehend, interpret, breakdown, understand, why is, how does, how to
6
+ * - Korean: 분석, 조사, 파악, 연구, 검토, 진단, 이해, 설명, 원인, 이유, 뜯어봐, 따져봐, 평가, 해석, 디버깅, 디버그, 어떻게, 왜, 살펴
7
+ * - Japanese: 分析, 調査, 解析, 検討, 研究, 診断, 理解, 説明, 検証, 精査, 究明, デバッグ, なぜ, どう, 仕組み
8
+ * - Chinese: 调查, 检查, 剖析, 深入, 诊断, 解释, 调试, 为什么, 原理, 搞清楚, 弄明白
9
+ * - Vietnamese: phân tích, điều tra, nghiên cứu, kiểm tra, xem xét, chẩn đoán, giải thích, tìm hiểu, gỡ lỗi, tại sao
10
+ */
11
+ export declare const ANALYZE_PATTERN: RegExp;
12
+ export declare const ANALYZE_MESSAGE = "[analyze-mode]\nANALYSIS MODE. Gather context before diving deep:\n\nCONTEXT GATHERING (parallel):\n- 1-2 explore agents (codebase patterns, implementations)\n- 1-2 librarian agents (if external library involved)\n- Direct tools: Grep, AST-grep, LSP for targeted searches\n\nIF COMPLEX - DO NOT STRUGGLE ALONE. Consult specialists:\n- **Oracle**: Conventional problems (architecture, debugging, complex logic)\n- **Artistry**: Non-conventional problems (different approach needed)\n\nSYNTHESIZE findings before proceeding.";
@@ -0,0 +1 @@
1
+ export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./default";
@@ -0,0 +1,10 @@
1
+ export declare const CODE_BLOCK_PATTERN: RegExp;
2
+ export declare const INLINE_CODE_PATTERN: RegExp;
3
+ export { isPlannerAgent, getUltraworkMessage } from "./ultrawork";
4
+ export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./search";
5
+ export { ANALYZE_PATTERN, ANALYZE_MESSAGE } from "./analyze";
6
+ export type KeywordDetector = {
7
+ pattern: RegExp;
8
+ message: string | ((agentName?: string, modelID?: string) => string);
9
+ };
10
+ export declare const KEYWORD_DETECTORS: KeywordDetector[];
@@ -0,0 +1,11 @@
1
+ export interface DetectedKeyword {
2
+ type: "ultrawork" | "search" | "analyze";
3
+ message: string;
4
+ }
5
+ export declare function removeCodeBlocks(text: string): string;
6
+ export declare function detectKeywords(text: string, agentName?: string, modelID?: string): string[];
7
+ export declare function detectKeywordsWithType(text: string, agentName?: string, modelID?: string): DetectedKeyword[];
8
+ export declare function extractPromptText(parts: Array<{
9
+ type: string;
10
+ text?: string;
11
+ }>): string;
@@ -0,0 +1,23 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { ContextCollector } from "../../features/context-injector";
3
+ export * from "./detector";
4
+ export * from "./constants";
5
+ export * from "./types";
6
+ export declare function createKeywordDetectorHook(ctx: PluginInput, collector?: ContextCollector): {
7
+ "chat.message": (input: {
8
+ sessionID: string;
9
+ agent?: string;
10
+ model?: {
11
+ providerID: string;
12
+ modelID: string;
13
+ };
14
+ messageID?: string;
15
+ }, output: {
16
+ message: Record<string, unknown>;
17
+ parts: Array<{
18
+ type: string;
19
+ text?: string;
20
+ [key: string]: unknown;
21
+ }>;
22
+ }) => Promise<void>;
23
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Search mode keyword detector.
3
+ *
4
+ * Triggers on search-related keywords across multiple languages:
5
+ * - English: search, find, locate, lookup, explore, discover, scan, grep, query, browse, detect, trace, seek, track, pinpoint, hunt, where is, show me, list all
6
+ * - Korean: 검색, 찾아, 탐색, 조회, 스캔, 서치, 뒤져, 찾기, 어디, 추적, 탐지, 찾아봐, 찾아내, 보여줘, 목록
7
+ * - Japanese: 検索, 探して, 見つけて, サーチ, 探索, スキャン, どこ, 発見, 捜索, 見つけ出す, 一覧
8
+ * - Chinese: 搜索, 查找, 寻找, 查询, 检索, 定位, 扫描, 发现, 在哪里, 找出来, 列出
9
+ * - Vietnamese: tìm kiếm, tra cứu, định vị, quét, phát hiện, truy tìm, tìm ra, ở đâu, liệt kê
10
+ */
11
+ export declare const SEARCH_PATTERN: RegExp;
12
+ export declare const SEARCH_MESSAGE = "[search-mode]\nMAXIMIZE SEARCH EFFORT. Launch multiple background agents IN PARALLEL:\n- explore agents (codebase patterns, file structures, ast-grep)\n- librarian agents (remote repos, official docs, GitHub examples)\nPlus direct tools: Grep, ripgrep (rg), ast-grep (sg)\nNEVER stop at first result - be exhaustive.";
@@ -0,0 +1 @@
1
+ export { SEARCH_PATTERN, SEARCH_MESSAGE } from "./default";
@@ -0,0 +1,4 @@
1
+ export interface KeywordDetectorState {
2
+ detected: boolean;
3
+ injected: boolean;
4
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Default ultrawork message optimized for Claude series models.
3
+ *
4
+ * Key characteristics:
5
+ * - Optimized for Claude's tendency to be "helpful" by forcing explicit delegation
6
+ * - "DELEGATE. ALWAYS." instruction counters Claude's natural inclination to do everything
7
+ * - Strong emphasis on parallel agent usage and category+skills delegation
8
+ */
9
+ export declare const ULTRAWORK_DEFAULT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\n## **ABSOLUTE CERTAINTY REQUIRED - DO NOT SKIP THIS**\n\n**YOU MUST NOT START ANY IMPLEMENTATION UNTIL YOU ARE 100% CERTAIN.**\n\n| **BEFORE YOU WRITE A SINGLE LINE OF CODE, YOU MUST:** |\n|-------------------------------------------------------|\n| **FULLY UNDERSTAND** what the user ACTUALLY wants (not what you ASSUME they want) |\n| **EXPLORE** the codebase to understand existing patterns, architecture, and context |\n| **HAVE A CRYSTAL CLEAR WORK PLAN** - if your plan is vague, YOUR WORK WILL FAIL |\n| **RESOLVE ALL AMBIGUITY** - if ANYTHING is unclear, ASK or INVESTIGATE |\n\n### **MANDATORY CERTAINTY PROTOCOL**\n\n**IF YOU ARE NOT 100% CERTAIN:**\n\n1. **THINK DEEPLY** - What is the user's TRUE intent? What problem are they REALLY trying to solve?\n2. **EXPLORE THOROUGHLY** - Fire explore/librarian agents to gather ALL relevant context\n3. **CONSULT SPECIALISTS** - For hard/complex tasks, DO NOT struggle alone. Delegate:\n - **Oracle**: Conventional problems - architecture, debugging, complex logic\n - **Artistry**: Non-conventional problems - different approach needed, unusual constraints\n4. **ASK THE USER** - If ambiguity remains after exploration, ASK. Don't guess.\n\n**SIGNS YOU ARE NOT READY TO IMPLEMENT:**\n- You're making assumptions about requirements\n- You're unsure which files to modify\n- You don't understand how existing code works\n- Your plan has \"probably\" or \"maybe\" in it\n- You can't explain the exact steps you'll take\n\n**WHEN IN DOUBT:**\n```\ndelegate_task(subagent_type=\"explore\", load_skills=[], prompt=\"Find [X] patterns in codebase\", run_in_background=true)\ndelegate_task(subagent_type=\"librarian\", load_skills=[], prompt=\"Find docs/examples for [Y]\", run_in_background=true)\n\n// Hard problem? DON'T struggle alone:\ndelegate_task(subagent_type=\"oracle\", load_skills=[], prompt=\"...\") // conventional: architecture, debugging\ndelegate_task(category=\"artistry\", load_skills=[], prompt=\"...\") // non-conventional: needs different approach\n```\n\n**ONLY AFTER YOU HAVE:**\n- Gathered sufficient context via agents\n- Resolved all ambiguities\n- Created a precise, step-by-step work plan\n- Achieved 100% confidence in your understanding\n\n**...THEN AND ONLY THEN MAY YOU BEGIN IMPLEMENTATION.**\n\n---\n\n## **NO EXCUSES. NO COMPROMISES. DELIVER WHAT WAS ASKED.**\n\n**THE USER'S ORIGINAL REQUEST IS SACRED. YOU MUST FULFILL IT EXACTLY.**\n\n| VIOLATION | CONSEQUENCE |\n|-----------|-------------|\n| \"I couldn't because...\" | **UNACCEPTABLE.** Find a way or ask for help. |\n| \"This is a simplified version...\" | **UNACCEPTABLE.** Deliver the FULL implementation. |\n| \"You can extend this later...\" | **UNACCEPTABLE.** Finish it NOW. |\n| \"Due to limitations...\" | **UNACCEPTABLE.** Use agents, tools, whatever it takes. |\n| \"I made some assumptions...\" | **UNACCEPTABLE.** You should have asked FIRST. |\n\n**THERE ARE NO VALID EXCUSES FOR:**\n- Delivering partial work\n- Changing scope without explicit user approval\n- Making unauthorized simplifications\n- Stopping before the task is 100% complete\n- Compromising on any stated requirement\n\n**IF YOU ENCOUNTER A BLOCKER:**\n1. **DO NOT** give up\n2. **DO NOT** deliver a compromised version\n3. **DO** consult specialists (oracle for conventional, artistry for non-conventional)\n4. **DO** ask the user for guidance\n5. **DO** explore alternative approaches\n\n**THE USER ASKED FOR X. DELIVER EXACTLY X. PERIOD.**\n\n---\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS / **CATEGORY + SKILLS** TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## MANDATORY: PLAN AGENT INVOCATION (NON-NEGOTIABLE)\n\n**YOU MUST ALWAYS INVOKE THE PLAN AGENT FOR ANY NON-TRIVIAL TASK.**\n\n| Condition | Action |\n|-----------|--------|\n| Task has 2+ steps | MUST call plan agent |\n| Task scope unclear | MUST call plan agent |\n| Implementation required | MUST call plan agent |\n| Architecture decision needed | MUST call plan agent |\n\n```\ndelegate_task(subagent_type=\"plan\", prompt=\"<gathered context + user request>\")\n```\n\n**WHY PLAN AGENT IS MANDATORY:**\n- Plan agent analyzes dependencies and parallel execution opportunities\n- Plan agent outputs a **parallel task graph** with waves and dependencies\n- Plan agent provides structured TODO list with category + skills per task\n- YOU are an orchestrator, NOT an implementer\n\n### SESSION CONTINUITY WITH PLAN AGENT (CRITICAL)\n\n**Plan agent returns a session_id. USE IT for follow-up interactions.**\n\n| Scenario | Action |\n|----------|--------|\n| Plan agent asks clarifying questions | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"<your answer>\")` |\n| Need to refine the plan | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"Please adjust: <feedback>\")` |\n| Plan needs more detail | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"Add more detail to Task N\")` |\n\n**WHY SESSION_ID IS CRITICAL:**\n- Plan agent retains FULL conversation context\n- No repeated exploration or context gathering\n- Saves 70%+ tokens on follow-ups\n- Maintains interview continuity until plan is finalized\n\n```\n// WRONG: Starting fresh loses all context\ndelegate_task(subagent_type=\"plan\", prompt=\"Here's more info...\")\n\n// CORRECT: Resume preserves everything\ndelegate_task(session_id=\"ses_abc123\", prompt=\"Here's my answer to your question: ...\")\n```\n\n**FAILURE TO CALL PLAN AGENT = INCOMPLETE WORK.**\n\n---\n\n## AGENTS / **CATEGORY + SKILLS** UTILIZATION PRINCIPLES\n\n**DEFAULT BEHAVIOR: DELEGATE. DO NOT WORK YOURSELF.**\n\n| Task Type | Action | Why |\n|-----------|--------|-----|\n| Codebase exploration | delegate_task(subagent_type=\"explore\", run_in_background=true) | Parallel, context-efficient |\n| Documentation lookup | delegate_task(subagent_type=\"librarian\", run_in_background=true) | Specialized knowledge |\n| Planning | delegate_task(subagent_type=\"plan\") | Parallel task graph + structured TODO list |\n| Hard problem (conventional) | delegate_task(subagent_type=\"oracle\") | Architecture, debugging, complex logic |\n| Hard problem (non-conventional) | delegate_task(category=\"artistry\", load_skills=[...]) | Different approach needed |\n| Implementation | delegate_task(category=\"...\", load_skills=[...]) | Domain-optimized models |\n\n**CATEGORY + SKILL DELEGATION:**\n```\n// Frontend work\ndelegate_task(category=\"visual-engineering\", load_skills=[\"frontend-ui-ux\"])\n\n// Complex logic\ndelegate_task(category=\"ultrabrain\", load_skills=[\"typescript-programmer\"])\n\n// Quick fixes\ndelegate_task(category=\"quick\", load_skills=[\"git-master\"])\n```\n\n**YOU SHOULD ONLY DO IT YOURSELF WHEN:**\n- Task is trivially simple (1-2 lines, obvious change)\n- You have ALL context already loaded\n- Delegation overhead exceeds task complexity\n\n**OTHERWISE: DELEGATE. ALWAYS.**\n\n---\n\n## EXECUTION RULES (PARALLELIZATION)\n\n| Rule | Implementation |\n|------|----------------|\n| **PARALLEL FIRST** | Fire ALL **truly independent** agents simultaneously via delegate_task(run_in_background=true) |\n| **DATA DEPENDENCY CHECK** | If task B requires output FROM task A, B MUST wait for A to complete |\n| **10+ CONCURRENT** | Use 10+ background agents if needed for comprehensive exploration |\n| **COLLECT BEFORE DEPENDENT** | Collect results with background_output() BEFORE invoking dependent tasks |\n\n### DEPENDENCY EXCEPTIONS (OVERRIDES PARALLEL FIRST)\n\n| Agent | Dependency | Must Wait For |\n|-------|------------|---------------|\n| plan | explore/librarian results | Collect explore outputs FIRST |\n| execute | plan output | Finalized work plan |\n\n**CRITICAL: Plan agent REQUIRES explore results as input. This is a DATA DEPENDENCY, not parallelizable.**\n\n```\n// WRONG: Launching plan without explore results\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\")\ndelegate_task(subagent_type=\"plan\", prompt=\"...\") // BAD - no context yet!\n\n// CORRECT: Collect explore results BEFORE plan\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\") // task_id_1\n// ... wait or continue other work ...\ncontext = background_output(task_id=\"task_id_1\") // COLLECT FIRST\ndelegate_task(subagent_type=\"plan\", prompt=\"<collected context + request>\") // NOW plan has context\n```\n\n---\n\n## WORKFLOW (MANDATORY SEQUENCE - STEPS HAVE DATA DEPENDENCIES)\n\n**CRITICAL: Steps 1\u21922\u21923 have DATA DEPENDENCIES. Each step REQUIRES output from the previous step.**\n\n```\n[Step 1: EXPLORE] \u2192 output: context\n \u2193 (data dependency)\n[Step 2: COLLECT] \u2192 input: task_ids, output: gathered_context \n \u2193 (data dependency)\n[Step 3: PLAN] \u2192 input: gathered_context + request\n```\n\n1. **GATHER CONTEXT** (parallel background agents):\n ```\n task_id_1 = delegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\")\n task_id_2 = delegate_task(subagent_type=\"librarian\", run_in_background=true, prompt=\"...\")\n ```\n\n2. **COLLECT EXPLORE RESULTS** (REQUIRED before step 3):\n ```\n // You MUST collect results before invoking plan agent\n explore_result = background_output(task_id=task_id_1)\n librarian_result = background_output(task_id=task_id_2)\n gathered_context = explore_result + librarian_result\n ```\n\n3. **INVOKE PLAN AGENT** (input: gathered_context from step 2):\n ```\n result = delegate_task(subagent_type=\"plan\", prompt=\"<gathered_context from step 2> + <user request>\")\n // STORE the session_id for follow-ups!\n plan_session_id = result.session_id\n ```\n\n4. **ITERATE WITH PLAN AGENT** (if clarification needed):\n ```\n // Use session_id to continue the conversation\n delegate_task(session_id=plan_session_id, prompt=\"<answer to plan agent's question>\")\n ```\n\n5. **EXECUTE VIA DELEGATION** (category + skills from plan agent's output):\n ```\n delegate_task(category=\"...\", load_skills=[...], prompt=\"<task from plan>\")\n ```\n\n6. **VERIFY** against original requirements\n\n## VERIFICATION GUARANTEE (NON-NEGOTIABLE)\n\n**NOTHING is \"done\" without PROOF it works.**\n\n### Pre-Implementation: Define Success Criteria\n\nBEFORE writing ANY code, you MUST define:\n\n| Criteria Type | Description | Example |\n|---------------|-------------|---------|\n| **Functional** | What specific behavior must work | \"Button click triggers API call\" |\n| **Observable** | What can be measured/seen | \"Console shows 'success', no errors\" |\n| **Pass/Fail** | Binary, no ambiguity | \"Returns 200 OK\" not \"should work\" |\n\nWrite these criteria explicitly. Share with user if scope is non-trivial.\n\n### Test Plan Template (MANDATORY for non-trivial tasks)\n\n```\n## Test Plan\n### Objective: [What we're verifying]\n### Prerequisites: [Setup needed]\n### Test Cases:\n1. [Test Name]: [Input] \u2192 [Expected Output] \u2192 [How to verify]\n2. ...\n### Success Criteria: ALL test cases pass\n### How to Execute: [Exact commands/steps]\n```\n\n### Execution & Evidence Requirements\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| **Build** | Run build command | Exit code 0, no errors |\n| **Test** | Execute test suite | All tests pass (screenshot/output) |\n| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |\n| **Regression** | Ensure nothing broke | Existing tests still pass |\n\n**WITHOUT evidence = NOT verified = NOT done.**\n\n### TDD Workflow (when test infrastructure exists)\n\n1. **SPEC**: Define what \"working\" means (success criteria above)\n2. **RED**: Write failing test \u2192 Run it \u2192 Confirm it FAILS\n3. **GREEN**: Write minimal code \u2192 Run test \u2192 Confirm it PASSES\n4. **REFACTOR**: Clean up \u2192 Tests MUST stay green\n5. **VERIFY**: Run full test suite, confirm no regressions\n6. **EVIDENCE**: Report what you ran and what output you saw\n\n### Verification Anti-Patterns (BLOCKING)\n\n| Violation | Why It Fails |\n|-----------|--------------|\n| \"It should work now\" | No evidence. Run it. |\n| \"I added the tests\" | Did they pass? Show output. |\n| \"Fixed the bug\" | How do you know? What did you test? |\n| \"Implementation complete\" | Did you verify against success criteria? |\n| Skipping test execution | Tests exist to be RUN, not just written |\n\n**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**\n\n## ZERO TOLERANCE FAILURES\n- **NO Scope Reduction**: Never make \"demo\", \"skeleton\", \"simplified\", \"basic\" versions - deliver FULL implementation\n- **NO MockUp Work**: When user asked you to do \"port A\", you must \"port A\", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.\n- **NO Partial Completion**: Never stop at 60-80% saying \"you can extend this...\" - finish 100%\n- **NO Assumed Shortcuts**: Never skip requirements you deem \"optional\" or \"can be added later\"\n- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified\n- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.\n\n1. EXPLORES + LIBRARIANS (background) \u2192 get task_ids\n2. COLLECT explore results via background_output() \u2192 gathered_context\n3. INVOKE PLAN with gathered_context: delegate_task(subagent_type=\"plan\", prompt=\"<gathered_context + request>\")\n4. ITERATE WITH PLAN AGENT (session_id resume) UNTIL PLAN IS FINALIZED\n5. WORK BY DELEGATING TO CATEGORY + SKILLS AGENTS (following plan agent's parallel task graph)\n\nNOW.\n\n</ultrawork-mode>\n\n---\n\n";
10
+ export declare function getDefaultUltraworkMessage(): string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Ultrawork message optimized for GPT 5.2 series models.
3
+ *
4
+ * Key characteristics (from GPT 5.2 Prompting Guide):
5
+ * - "Stronger instruction adherence" - follows instructions more literally
6
+ * - "Conservative grounding bias" - prefers correctness over speed
7
+ * - "More deliberate scaffolding" - builds clearer plans by default
8
+ * - Explicit decision criteria needed (model won't infer)
9
+ *
10
+ * Design principles:
11
+ * - Provide explicit complexity-based decision criteria
12
+ * - Use conditional logic, not absolute commands
13
+ * - Enable autonomous judgment with clear guidelines
14
+ */
15
+ export declare const ULTRAWORK_GPT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Think deeply before acting.\n\n<output_verbosity_spec>\n- Default: 3-6 sentences or \u22645 bullets for typical answers\n- Simple yes/no questions: \u22642 sentences\n- Complex multi-file tasks: 1 short overview paragraph + \u22645 bullets (What, Where, Risks, Next, Open)\n- Avoid long narrative paragraphs; prefer compact bullets\n- Do not rephrase the user's request unless it changes semantics\n</output_verbosity_spec>\n\n<scope_constraints>\n- Implement EXACTLY and ONLY what the user requests\n- No extra features, no added components, no embellishments\n- If any instruction is ambiguous, choose the simplest valid interpretation\n- Do NOT expand the task beyond what was asked\n</scope_constraints>\n\n## CERTAINTY PROTOCOL\n\n**Before implementation, ensure you have:**\n- Full understanding of the user's actual intent\n- Explored the codebase to understand existing patterns\n- A clear work plan (mental or written)\n- Resolved any ambiguities through exploration (not questions)\n\n<uncertainty_handling>\n- If the question is ambiguous or underspecified:\n - EXPLORE FIRST using tools (grep, file reads, explore agents)\n - If still unclear, state your interpretation and proceed\n - Ask clarifying questions ONLY as last resort\n- Never fabricate exact figures, line numbers, or references when uncertain\n- Prefer \"Based on the provided context...\" over absolute claims when unsure\n</uncertainty_handling>\n\n## DECISION FRAMEWORK: Self vs Delegate\n\n**Evaluate each task against these criteria to decide:**\n\n| Complexity | Criteria | Decision |\n|------------|----------|----------|\n| **Trivial** | <10 lines, single file, obvious pattern | **DO IT YOURSELF** |\n| **Moderate** | Single domain, clear pattern, <100 lines | **DO IT YOURSELF** (faster than delegation overhead) |\n| **Complex** | Multi-file, unfamiliar domain, >100 lines, needs specialized expertise | **DELEGATE** to appropriate category+skills |\n| **Research** | Need broad codebase context or external docs | **DELEGATE** to explore/librarian (background, parallel) |\n\n**Decision Factors:**\n- Delegation overhead \u2248 10-15 seconds. If task takes less, do it yourself.\n- If you already have full context loaded, do it yourself.\n- If task requires specialized expertise (frontend-ui-ux, git operations), delegate.\n- If you need information from multiple sources, fire parallel background agents.\n\n## AVAILABLE RESOURCES\n\nUse these when they provide clear value based on the decision framework above:\n\n| Resource | When to Use | How to Use |\n|----------|-------------|------------|\n| explore agent | Need codebase patterns you don't have | `delegate_task(subagent_type=\"explore\", run_in_background=true, ...)` |\n| librarian agent | External library docs, OSS examples | `delegate_task(subagent_type=\"librarian\", run_in_background=true, ...)` |\n| oracle agent | Stuck on architecture/debugging after 2+ attempts | `delegate_task(subagent_type=\"oracle\", ...)` |\n| plan agent | Complex multi-step with dependencies (5+ steps) | `delegate_task(subagent_type=\"plan\", ...)` |\n| delegate_task category | Specialized work matching a category | `delegate_task(category=\"...\", load_skills=[...])` |\n\n<tool_usage_rules>\n- Prefer tools over internal knowledge for fresh/user-specific data\n- Parallelize independent reads (explore, librarian) when gathering context\n- After any write/update, briefly restate: What changed, Where, Any follow-up needed\n</tool_usage_rules>\n\n## EXECUTION APPROACH\n\n### Step 1: Assess Complexity\nBefore starting, classify the task using the decision framework above.\n\n### Step 2: Gather Context (if needed)\nFor non-trivial tasks, fire explore/librarian in parallel as background:\n```\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"Find patterns for X...\")\ndelegate_task(subagent_type=\"librarian\", run_in_background=true, prompt=\"Find docs for Y...\")\n// Continue working - collect results when needed with background_output()\n```\n\n### Step 3: Plan (for complex tasks only)\nOnly invoke plan agent if task has 5+ interdependent steps:\n```\n// Collect context first\ncontext = background_output(task_id=task_id)\n// Then plan with context\ndelegate_task(subagent_type=\"plan\", prompt=\"<context> + <request>\")\n```\n\n### Step 4: Execute\n- If doing yourself: make surgical, minimal changes matching existing patterns\n- If delegating: provide exhaustive context and success criteria\n\n### Step 5: Verify\n- Run `lsp_diagnostics` on modified files\n- Run tests if available\n- Confirm all success criteria met\n\n## QUALITY STANDARDS\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| Build | Run build command | Exit code 0 |\n| Test | Execute test suite | All tests pass |\n| Lint | Run lsp_diagnostics | Zero new errors |\n\n## COMPLETION CRITERIA\n\nA task is complete when:\n1. Requested functionality is fully implemented (not partial, not simplified)\n2. lsp_diagnostics shows zero errors on modified files\n3. Tests pass (or pre-existing failures documented)\n4. Code matches existing codebase patterns\n\n**Deliver exactly what was asked. No more, no less.**\n\n</ultrawork-mode>\n\n---\n\n";
16
+ export declare function getGptUltraworkMessage(): string;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Ultrawork message module - routes to appropriate message based on agent/model.
3
+ *
4
+ * Routing:
5
+ * 1. Planner agents (prometheus, plan) → planner.ts
6
+ * 2. GPT 5.2 models → gpt5.2.ts
7
+ * 3. Default (Claude, etc.) → default.ts (optimized for Claude series)
8
+ */
9
+ export { isPlannerAgent, isGptModel, getUltraworkSource } from "./utils";
10
+ export type { UltraworkSource } from "./utils";
11
+ export { ULTRAWORK_PLANNER_SECTION, getPlannerUltraworkMessage } from "./planner";
12
+ export { ULTRAWORK_GPT_MESSAGE, getGptUltraworkMessage } from "./gpt5.2";
13
+ export { ULTRAWORK_DEFAULT_MESSAGE, getDefaultUltraworkMessage } from "./default";
14
+ /**
15
+ * Gets the appropriate ultrawork message based on agent and model context.
16
+ */
17
+ export declare function getUltraworkMessage(agentName?: string, modelID?: string): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Ultrawork message section for planner agents (Prometheus).
3
+ * Planner agents should NOT be told to call plan agent - they ARE the planner.
4
+ */
5
+ export declare const ULTRAWORK_PLANNER_SECTION = "## CRITICAL: YOU ARE A PLANNER, NOT AN IMPLEMENTER\n\n**IDENTITY CONSTRAINT (NON-NEGOTIABLE):**\nYou ARE the planner. You ARE NOT an implementer. You DO NOT write code. You DO NOT execute tasks.\n\n**TOOL RESTRICTIONS (SYSTEM-ENFORCED):**\n| Tool | Allowed | Blocked |\n|------|---------|---------|\n| Write/Edit | `.sisyphus/**/*.md` ONLY | Everything else |\n| Read | All files | - |\n| Bash | Research commands only | Implementation commands |\n| delegate_task | explore, librarian | - |\n\n**IF YOU TRY TO WRITE/EDIT OUTSIDE `.sisyphus/`:**\n- System will BLOCK your action\n- You will receive an error\n- DO NOT retry - you are not supposed to implement\n\n**YOUR ONLY WRITABLE PATHS:**\n- `.sisyphus/plans/*.md` - Final work plans\n- `.sisyphus/drafts/*.md` - Working drafts during interview\n\n**WHEN USER ASKS YOU TO IMPLEMENT:**\nREFUSE. Say: \"I'm a planner. I create work plans, not implementations. Run `/start-work` after I finish planning.\"\n\n---\n\n## CONTEXT GATHERING (MANDATORY BEFORE PLANNING)\n\nYou ARE the planner. Your job: create bulletproof work plans.\n**Before drafting ANY plan, gather context via explore/librarian agents.**\n\n### Research Protocol\n1. **Fire parallel background agents** for comprehensive context:\n ```\n delegate_task(agent=\"explore\", prompt=\"Find existing patterns for [topic] in codebase\", background=true)\n delegate_task(agent=\"explore\", prompt=\"Find test infrastructure and conventions\", background=true)\n delegate_task(agent=\"librarian\", prompt=\"Find official docs and best practices for [technology]\", background=true)\n ```\n2. **Wait for results** before planning - rushed plans fail\n3. **Synthesize findings** into informed requirements\n\n### What to Research\n- Existing codebase patterns and conventions\n- Test infrastructure (TDD possible?)\n- External library APIs and constraints\n- Similar implementations in OSS (via librarian)\n\n**NEVER plan blind. Context first, plan second.**\n\n---\n\n## MANDATORY OUTPUT: PARALLEL TASK GRAPH + TODO LIST\n\n**YOUR PRIMARY OUTPUT IS A PARALLEL EXECUTION TASK GRAPH.**\n\nWhen you finalize a plan, you MUST structure it for maximum parallel execution:\n\n### 1. Parallel Execution Waves (REQUIRED)\n\nAnalyze task dependencies and group independent tasks into parallel waves:\n\n```\nWave 1 (Start Immediately - No Dependencies):\n\u251C\u2500\u2500 Task 1: [description] \u2192 category: X, skills: [a, b]\n\u2514\u2500\u2500 Task 4: [description] \u2192 category: Y, skills: [c]\n\nWave 2 (After Wave 1 Completes):\n\u251C\u2500\u2500 Task 2: [depends: 1] \u2192 category: X, skills: [a]\n\u251C\u2500\u2500 Task 3: [depends: 1] \u2192 category: Z, skills: [d]\n\u2514\u2500\u2500 Task 5: [depends: 4] \u2192 category: Y, skills: [c]\n\nWave 3 (After Wave 2 Completes):\n\u2514\u2500\u2500 Task 6: [depends: 2, 3] \u2192 category: X, skills: [a, b]\n\nCritical Path: Task 1 \u2192 Task 2 \u2192 Task 6\nEstimated Parallel Speedup: ~40% faster than sequential\n```\n\n### 2. Dependency Matrix (REQUIRED)\n\n| Task | Depends On | Blocks | Can Parallelize With |\n|------|------------|--------|---------------------|\n| 1 | None | 2, 3 | 4 |\n| 2 | 1 | 6 | 3, 5 |\n| 3 | 1 | 6 | 2, 5 |\n| 4 | None | 5 | 1 |\n| 5 | 4 | None | 2, 3 |\n| 6 | 2, 3 | None | None (final) |\n\n### 3. TODO List Structure (REQUIRED)\n\nEach TODO item MUST include:\n\n```markdown\n- [ ] N. [Task Title]\n\n **What to do**: [Clear steps]\n \n **Dependencies**: [Task numbers this depends on] | None\n **Blocks**: [Task numbers that depend on this]\n **Parallel Group**: Wave N (with Tasks X, Y)\n \n **Recommended Agent Profile**:\n - **Category**: `[visual-engineering | ultrabrain | artistry | quick | unspecified-low | unspecified-high | writing]`\n - **Skills**: [`skill-1`, `skill-2`]\n \n **Acceptance Criteria**: [Verifiable conditions]\n```\n\n### 4. Agent Dispatch Summary (REQUIRED)\n\n| Wave | Tasks | Dispatch Command |\n|------|-------|------------------|\n| 1 | 1, 4 | `delegate_task(category=\"...\", load_skills=[...], run_in_background=true)` \u00D7 2 |\n| 2 | 2, 3, 5 | `delegate_task(...)` \u00D7 3 after Wave 1 completes |\n| 3 | 6 | `delegate_task(...)` final integration |\n\n**WHY PARALLEL TASK GRAPH IS MANDATORY:**\n- Orchestrator (Sisyphus) executes tasks in parallel waves\n- Independent tasks run simultaneously via background agents\n- Proper dependency tracking prevents race conditions\n- Category + skills ensure optimal model routing per task";
6
+ export declare function getPlannerUltraworkMessage(): string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Agent/model detection utilities for ultrawork message routing.
3
+ *
4
+ * Routing logic:
5
+ * 1. Planner agents (prometheus, plan) → planner.ts
6
+ * 2. GPT 5.2 models → gpt5.2.ts
7
+ * 3. Everything else (Claude, etc.) → default.ts
8
+ */
9
+ /**
10
+ * Checks if agent is a planner-type agent.
11
+ * Planners don't need ultrawork injection (they ARE the planner).
12
+ */
13
+ export declare function isPlannerAgent(agentName?: string): boolean;
14
+ /**
15
+ * Checks if model is GPT 5.2 series.
16
+ * GPT models benefit from specific prompting patterns.
17
+ */
18
+ export declare function isGptModel(modelID?: string): boolean;
19
+ /** Ultrawork message source type */
20
+ export type UltraworkSource = "planner" | "gpt" | "default";
21
+ /**
22
+ * Determines which ultrawork message source to use.
23
+ */
24
+ export declare function getUltraworkSource(agentName?: string, modelID?: string): UltraworkSource;
@@ -0,0 +1,34 @@
1
+ export declare const HOOK_NAME = "non-interactive-env";
2
+ export declare const NON_INTERACTIVE_ENV: Record<string, string>;
3
+ /**
4
+ * Shell command guidance for non-interactive environments.
5
+ * These patterns should be followed to avoid hanging on user input.
6
+ */
7
+ export declare const SHELL_COMMAND_PATTERNS: {
8
+ readonly npm: {
9
+ readonly bad: readonly ["npm init", "npm install (prompts)"];
10
+ readonly good: readonly ["npm init -y", "npm install --yes"];
11
+ };
12
+ readonly apt: {
13
+ readonly bad: readonly ["apt-get install pkg"];
14
+ readonly good: readonly ["apt-get install -y pkg", "DEBIAN_FRONTEND=noninteractive apt-get install pkg"];
15
+ };
16
+ readonly pip: {
17
+ readonly bad: readonly ["pip install pkg (with prompts)"];
18
+ readonly good: readonly ["pip install --no-input pkg", "PIP_NO_INPUT=1 pip install pkg"];
19
+ };
20
+ readonly git: {
21
+ readonly bad: readonly ["git commit", "git merge branch", "git add -p", "git rebase -i"];
22
+ readonly good: readonly ["git commit -m 'msg'", "git merge --no-edit branch", "git add .", "git rebase --no-edit"];
23
+ };
24
+ readonly system: {
25
+ readonly bad: readonly ["rm file (prompts)", "cp a b (prompts)", "ssh host"];
26
+ readonly good: readonly ["rm -f file", "cp -f a b", "ssh -o BatchMode=yes host", "unzip -o file.zip"];
27
+ };
28
+ readonly banned: readonly ["vim", "nano", "vi", "emacs", "less", "more", "man", "python (REPL)", "node (REPL)", "git add -p", "git rebase -i"];
29
+ readonly workarounds: {
30
+ readonly yesPipe: "yes | ./script.sh";
31
+ readonly heredoc: "./script.sh <<EOF\noption1\noption2\nEOF";
32
+ readonly expectAlternative: "Use environment variables or config files instead of expect";
33
+ };
34
+ };
@@ -0,0 +1 @@
1
+ export declare function isNonInteractive(): boolean;
@@ -0,0 +1,14 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export * from "./constants";
3
+ export * from "./detector";
4
+ export * from "./types";
5
+ export declare function createNonInteractiveEnvHook(_ctx: PluginInput): {
6
+ "tool.execute.before": (input: {
7
+ tool: string;
8
+ sessionID: string;
9
+ callID: string;
10
+ }, output: {
11
+ args: Record<string, unknown>;
12
+ message?: string;
13
+ }) => Promise<void>;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface NonInteractiveEnvConfig {
2
+ disabled?: boolean;
3
+ }
@@ -0,0 +1,7 @@
1
+ export declare const HOOK_NAME = "prometheus-md-only";
2
+ export declare const PROMETHEUS_AGENTS: string[];
3
+ export declare const ALLOWED_EXTENSIONS: string[];
4
+ export declare const ALLOWED_PATH_PREFIX = ".sisyphus";
5
+ export declare const BLOCKED_TOOLS: string[];
6
+ export declare const PLANNING_CONSULT_WARNING: string;
7
+ export declare const PROMETHEUS_WORKFLOW_REMINDER: string;
@@ -0,0 +1,12 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export * from "./constants";
3
+ export declare function createPrometheusMdOnlyHook(ctx: PluginInput): {
4
+ "tool.execute.before": (input: {
5
+ tool: string;
6
+ sessionID: string;
7
+ callID: string;
8
+ }, output: {
9
+ args: Record<string, unknown>;
10
+ message?: string;
11
+ }) => Promise<void>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export declare function createQuestionLabelTruncatorHook(): {
2
+ "tool.execute.before": (input: {
3
+ tool: string;
4
+ }, output: {
5
+ args: Record<string, unknown>;
6
+ }) => Promise<void>;
7
+ };
@@ -0,0 +1,5 @@
1
+ export declare const HOOK_NAME = "ralph-loop";
2
+ export declare const DEFAULT_STATE_FILE = ".sisyphus/ralph-loop.local.md";
3
+ export declare const COMPLETION_TAG_PATTERN: RegExp;
4
+ export declare const DEFAULT_MAX_ITERATIONS = 100;
5
+ export declare const DEFAULT_COMPLETION_PROMISE = "DONE";
@@ -0,0 +1,21 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { RalphLoopState, RalphLoopOptions } from "./types";
3
+ export * from "./types";
4
+ export * from "./constants";
5
+ export { readState, writeState, clearState, incrementIteration } from "./storage";
6
+ export interface RalphLoopHook {
7
+ event: (input: {
8
+ event: {
9
+ type: string;
10
+ properties?: unknown;
11
+ };
12
+ }) => Promise<void>;
13
+ startLoop: (sessionID: string, prompt: string, options?: {
14
+ maxIterations?: number;
15
+ completionPromise?: string;
16
+ ultrawork?: boolean;
17
+ }) => boolean;
18
+ cancelLoop: (sessionID: string) => boolean;
19
+ getState: () => RalphLoopState | null;
20
+ }
21
+ export declare function createRalphLoopHook(ctx: PluginInput, options?: RalphLoopOptions): RalphLoopHook;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { RalphLoopState } from "./types";
2
+ export declare function getStateFilePath(directory: string, customPath?: string): string;
3
+ export declare function readState(directory: string, customPath?: string): RalphLoopState | null;
4
+ export declare function writeState(directory: string, state: RalphLoopState, customPath?: string): boolean;
5
+ export declare function clearState(directory: string, customPath?: string): boolean;
6
+ export declare function incrementIteration(directory: string, customPath?: string): RalphLoopState | null;
@@ -0,0 +1,17 @@
1
+ import type { RalphLoopConfig } from "../../config";
2
+ export interface RalphLoopState {
3
+ active: boolean;
4
+ iteration: number;
5
+ max_iterations: number;
6
+ completion_promise: string;
7
+ started_at: string;
8
+ prompt: string;
9
+ session_id?: string;
10
+ ultrawork?: boolean;
11
+ }
12
+ export interface RalphLoopOptions {
13
+ config?: RalphLoopConfig;
14
+ getTranscriptPath?: (sessionId: string) => string;
15
+ apiTimeout?: number;
16
+ checkSessionExists?: (sessionId: string) => Promise<boolean>;
17
+ }
@@ -0,0 +1,8 @@
1
+ export declare const OPENCODE_STORAGE: string;
2
+ export declare const RULES_INJECTOR_STORAGE: string;
3
+ export declare const PROJECT_MARKERS: string[];
4
+ export declare const PROJECT_RULE_SUBDIRS: [string, string][];
5
+ export declare const PROJECT_RULE_FILES: string[];
6
+ export declare const GITHUB_INSTRUCTIONS_PATTERN: RegExp;
7
+ export declare const USER_RULE_DIR = ".claude/rules";
8
+ export declare const RULE_EXTENSIONS: string[];
@@ -0,0 +1,33 @@
1
+ import type { RuleFileCandidate } from "./types";
2
+ /**
3
+ * Find project root by walking up from startPath.
4
+ * Checks for PROJECT_MARKERS (.git, pyproject.toml, package.json, etc.)
5
+ *
6
+ * @param startPath - Starting path to search from (file or directory)
7
+ * @returns Project root path or null if not found
8
+ */
9
+ export declare function findProjectRoot(startPath: string): string | null;
10
+ /**
11
+ * Calculate directory distance between a rule file and current file.
12
+ * Distance is based on common ancestor within project root.
13
+ *
14
+ * @param rulePath - Path to the rule file
15
+ * @param currentFile - Path to the current file being edited
16
+ * @param projectRoot - Project root for relative path calculation
17
+ * @returns Distance (0 = same directory, higher = further)
18
+ */
19
+ export declare function calculateDistance(rulePath: string, currentFile: string, projectRoot: string | null): number;
20
+ /**
21
+ * Find all rule files for a given context.
22
+ * Searches from currentFile upward to projectRoot for rule directories,
23
+ * then user-level directory (~/.claude/rules).
24
+ *
25
+ * IMPORTANT: This searches EVERY directory from file to project root.
26
+ * Not just the project root itself.
27
+ *
28
+ * @param projectRoot - Project root path (or null if outside any project)
29
+ * @param homeDir - User home directory
30
+ * @param currentFile - Current file being edited (for distance calculation)
31
+ * @returns Array of rule file candidates sorted by distance
32
+ */
33
+ export declare function findRuleFiles(projectRoot: string | null, homeDir: string, currentFile: string): RuleFileCandidate[];
@@ -0,0 +1 @@
1
+ export {};