@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,5 @@
1
+ export declare const OPENCODE_STORAGE: string;
2
+ export declare const AGENT_USAGE_REMINDER_STORAGE: string;
3
+ export declare const TARGET_TOOLS: Set<string>;
4
+ export declare const AGENT_TOOLS: Set<string>;
5
+ export declare const REMINDER_MESSAGE = "\n[Agent Usage Reminder]\n\nYou called a search/fetch tool directly without leveraging specialized agents.\n\nRECOMMENDED: Use sisyphus_task with explore/librarian agents for better results:\n\n```\n// Parallel exploration - fire multiple agents simultaneously\nsisyphus_task(agent=\"explore\", prompt=\"Find all files matching pattern X\")\nsisyphus_task(agent=\"explore\", prompt=\"Search for implementation of Y\") \nsisyphus_task(agent=\"librarian\", prompt=\"Lookup documentation for Z\")\n\n// Then continue your work while they run in background\n// System will notify you when each completes\n```\n\nWHY:\n- Agents can perform deeper, more thorough searches\n- Background tasks run in parallel, saving time\n- Specialized agents have domain expertise\n- Reduces context window usage in main session\n\nALWAYS prefer: Multiple parallel sisyphus_task calls > Direct tool calls\n";
@@ -0,0 +1,22 @@
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 EventInput {
13
+ event: {
14
+ type: string;
15
+ properties?: unknown;
16
+ };
17
+ }
18
+ export declare function createAgentUsageReminderHook(_ctx: PluginInput): {
19
+ "tool.execute.after": (input: ToolExecuteInput, output: ToolExecuteOutput) => Promise<void>;
20
+ event: ({ event }: EventInput) => Promise<void>;
21
+ };
22
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { AgentUsageState } from "./types";
2
+ export declare function loadAgentUsageState(sessionID: string): AgentUsageState | null;
3
+ export declare function saveAgentUsageState(state: AgentUsageState): void;
4
+ export declare function clearAgentUsageState(sessionID: string): void;
@@ -0,0 +1,6 @@
1
+ export interface AgentUsageState {
2
+ sessionID: string;
3
+ agentUsed: boolean;
4
+ reminderCount: number;
5
+ updatedAt: number;
6
+ }
@@ -0,0 +1,4 @@
1
+ import type { AutoCompactState } from "./types";
2
+ import type { ExperimentalConfig } from "../../config";
3
+ export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<Record<string, unknown> | null>;
4
+ export declare function executeCompact(sessionID: string, msg: Record<string, unknown>, autoCompactState: AutoCompactState, client: any, directory: string, experimental?: ExperimentalConfig, dcpForCompaction?: boolean): Promise<void>;
@@ -0,0 +1,17 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { ExperimentalConfig } from "../../config";
3
+ export interface AnthropicContextWindowLimitRecoveryOptions {
4
+ experimental?: ExperimentalConfig;
5
+ dcpForCompaction?: boolean;
6
+ }
7
+ export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: PluginInput, options?: AnthropicContextWindowLimitRecoveryOptions): {
8
+ event: ({ event }: {
9
+ event: {
10
+ type: string;
11
+ properties?: unknown;
12
+ };
13
+ }) => Promise<void>;
14
+ };
15
+ export type { AutoCompactState, DcpState, ParsedTokenLimitError, TruncateState } from "./types";
16
+ export { parseAnthropicTokenLimitError } from "./parser";
17
+ export { executeCompact, getLastAssistant } from "./executor";
@@ -0,0 +1,2 @@
1
+ import type { ParsedTokenLimitError } from "./types";
2
+ export declare function parseAnthropicTokenLimitError(err: unknown): ParsedTokenLimitError | null;
@@ -0,0 +1,7 @@
1
+ import type { PruningState } from "./pruning-types";
2
+ export interface DeduplicationConfig {
3
+ enabled: boolean;
4
+ protectedTools?: string[];
5
+ }
6
+ export declare function createToolSignature(toolName: string, input: unknown): string;
7
+ export declare function executeDeduplication(sessionID: string, state: PruningState, config: DeduplicationConfig, protectedTools: Set<string>): number;
@@ -0,0 +1,3 @@
1
+ import type { DynamicContextPruningConfig } from "../../config";
2
+ import type { PruningResult } from "./pruning-types";
3
+ export declare function executeDynamicContextPruning(sessionID: string, config: DynamicContextPruningConfig, client: any): Promise<PruningResult>;
@@ -0,0 +1,7 @@
1
+ import type { PruningState } from "./pruning-types";
2
+ export interface PurgeErrorsConfig {
3
+ enabled: boolean;
4
+ turns: number;
5
+ protectedTools?: string[];
6
+ }
7
+ export declare function executePurgeErrors(sessionID: string, state: PruningState, config: PurgeErrorsConfig, protectedTools: Set<string>): number;
@@ -0,0 +1,2 @@
1
+ import type { PruningState } from "./pruning-types";
2
+ export declare function applyPruning(sessionID: string, state: PruningState): Promise<number>;
@@ -0,0 +1,6 @@
1
+ import type { PruningState } from "./pruning-types";
2
+ export interface SupersedeWritesConfig {
3
+ enabled: boolean;
4
+ aggressive: boolean;
5
+ }
6
+ export declare function executeSupersedeWrites(sessionID: string, state: PruningState, config: SupersedeWritesConfig, protectedTools: Set<string>): number;
@@ -0,0 +1,36 @@
1
+ export interface ToolCallSignature {
2
+ toolName: string;
3
+ signature: string;
4
+ callID: string;
5
+ turn: number;
6
+ }
7
+ export interface FileOperation {
8
+ callID: string;
9
+ tool: string;
10
+ filePath: string;
11
+ turn: number;
12
+ }
13
+ export interface ErroredToolCall {
14
+ callID: string;
15
+ toolName: string;
16
+ turn: number;
17
+ errorAge: number;
18
+ }
19
+ export interface PruningResult {
20
+ itemsPruned: number;
21
+ totalTokensSaved: number;
22
+ strategies: {
23
+ deduplication: number;
24
+ supersedeWrites: number;
25
+ purgeErrors: number;
26
+ };
27
+ }
28
+ export interface PruningState {
29
+ toolIdsToPrune: Set<string>;
30
+ currentTurn: number;
31
+ fileOperations: Map<string, FileOperation[]>;
32
+ toolSignatures: Map<string, ToolCallSignature[]>;
33
+ erroredTools: Map<string, ErroredToolCall>;
34
+ }
35
+ export declare const CHARS_PER_TOKEN = 4;
36
+ export declare function estimateTokens(text: string): number;
@@ -0,0 +1,28 @@
1
+ export interface ToolResultInfo {
2
+ partPath: string;
3
+ partId: string;
4
+ messageID: string;
5
+ toolName: string;
6
+ outputSize: number;
7
+ }
8
+ export declare function findToolResultsBySize(sessionID: string): ToolResultInfo[];
9
+ export declare function findLargestToolResult(sessionID: string): ToolResultInfo | null;
10
+ export declare function truncateToolResult(partPath: string): {
11
+ success: boolean;
12
+ toolName?: string;
13
+ originalSize?: number;
14
+ };
15
+ export declare function getTotalToolOutputSize(sessionID: string): number;
16
+ export declare function countTruncatedResults(sessionID: string): number;
17
+ export interface AggressiveTruncateResult {
18
+ success: boolean;
19
+ sufficient: boolean;
20
+ truncatedCount: number;
21
+ totalBytesRemoved: number;
22
+ targetBytesToRemove: number;
23
+ truncatedTools: Array<{
24
+ toolName: string;
25
+ originalSize: number;
26
+ }>;
27
+ }
28
+ export declare function truncateUntilTargetTokens(sessionID: string, currentTokens: number, maxTokens: number, targetRatio?: number, charsPerToken?: number): AggressiveTruncateResult;
@@ -0,0 +1,42 @@
1
+ export interface ParsedTokenLimitError {
2
+ currentTokens: number;
3
+ maxTokens: number;
4
+ requestId?: string;
5
+ errorType: string;
6
+ providerID?: string;
7
+ modelID?: string;
8
+ messageIndex?: number;
9
+ }
10
+ export interface RetryState {
11
+ attempt: number;
12
+ lastAttemptTime: number;
13
+ }
14
+ export interface TruncateState {
15
+ truncateAttempt: number;
16
+ lastTruncatedPartId?: string;
17
+ }
18
+ export interface DcpState {
19
+ attempted: boolean;
20
+ itemsPruned: number;
21
+ }
22
+ export interface AutoCompactState {
23
+ pendingCompact: Set<string>;
24
+ errorDataBySession: Map<string, ParsedTokenLimitError>;
25
+ retryStateBySession: Map<string, RetryState>;
26
+ truncateStateBySession: Map<string, TruncateState>;
27
+ dcpStateBySession: Map<string, DcpState>;
28
+ emptyContentAttemptBySession: Map<string, number>;
29
+ compactionInProgress: Set<string>;
30
+ }
31
+ export declare const RETRY_CONFIG: {
32
+ readonly maxAttempts: 2;
33
+ readonly initialDelayMs: 2000;
34
+ readonly backoffFactor: 2;
35
+ readonly maxDelayMs: 30000;
36
+ };
37
+ export declare const TRUNCATE_CONFIG: {
38
+ readonly maxTruncateAttempts: 20;
39
+ readonly minOutputSizeToTruncate: 500;
40
+ readonly targetTokenRatio: 0.5;
41
+ readonly charsPerToken: 4;
42
+ };
@@ -0,0 +1,5 @@
1
+ export declare const HOOK_NAME: "auto-slash-command";
2
+ export declare const AUTO_SLASH_COMMAND_TAG_OPEN = "<auto-slash-command>";
3
+ export declare const AUTO_SLASH_COMMAND_TAG_CLOSE = "</auto-slash-command>";
4
+ export declare const SLASH_COMMAND_PATTERN: RegExp;
5
+ export declare const EXCLUDED_COMMANDS: Set<string>;
@@ -0,0 +1,9 @@
1
+ import type { ParsedSlashCommand } from "./types";
2
+ export declare function removeCodeBlocks(text: string): string;
3
+ export declare function parseSlashCommand(text: string): ParsedSlashCommand | null;
4
+ export declare function isExcludedCommand(command: string): boolean;
5
+ export declare function detectSlashCommand(text: string): ParsedSlashCommand | null;
6
+ export declare function extractPromptText(parts: Array<{
7
+ type: string;
8
+ text?: string;
9
+ }>): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { type LoadedSkill } from "../../features/opencode-skill-loader";
2
+ import type { ParsedSlashCommand } from "./types";
3
+ export interface ExecutorOptions {
4
+ skills?: LoadedSkill[];
5
+ }
6
+ export interface ExecuteResult {
7
+ success: boolean;
8
+ replacementText?: string;
9
+ error?: string;
10
+ }
11
+ export declare function executeSlashCommand(parsed: ParsedSlashCommand, options?: ExecutorOptions): Promise<ExecuteResult>;
@@ -0,0 +1,12 @@
1
+ import type { AutoSlashCommandHookInput, AutoSlashCommandHookOutput } from "./types";
2
+ import type { LoadedSkill } from "../../features/opencode-skill-loader";
3
+ export * from "./detector";
4
+ export * from "./executor";
5
+ export * from "./constants";
6
+ export * from "./types";
7
+ export interface AutoSlashCommandHookOptions {
8
+ skills?: LoadedSkill[];
9
+ }
10
+ export declare function createAutoSlashCommandHook(options?: AutoSlashCommandHookOptions): {
11
+ "chat.message": (input: AutoSlashCommandHookInput, output: AutoSlashCommandHookOutput) => Promise<void>;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ export interface AutoSlashCommandHookInput {
2
+ sessionID: string;
3
+ agent?: string;
4
+ model?: {
5
+ providerID: string;
6
+ modelID: string;
7
+ };
8
+ messageID?: string;
9
+ }
10
+ export interface AutoSlashCommandHookOutput {
11
+ message: Record<string, unknown>;
12
+ parts: Array<{
13
+ type: string;
14
+ text?: string;
15
+ [key: string]: unknown;
16
+ }>;
17
+ }
18
+ export interface ParsedSlashCommand {
19
+ command: string;
20
+ args: string;
21
+ raw: string;
22
+ }
23
+ export interface AutoSlashCommandResult {
24
+ detected: boolean;
25
+ parsedCommand?: ParsedSlashCommand;
26
+ injectedMessage?: string;
27
+ }
@@ -0,0 +1,3 @@
1
+ export declare function invalidatePackage(packageName?: string): boolean;
2
+ /** @deprecated Use invalidatePackage instead - this nukes ALL plugins */
3
+ export declare function invalidateCache(): boolean;
@@ -0,0 +1,20 @@
1
+ import type { UpdateCheckResult } from "./types";
2
+ export declare function isLocalDevMode(directory: string): boolean;
3
+ export declare function getLocalDevPath(directory: string): string | null;
4
+ export declare function getLocalDevVersion(directory: string): string | null;
5
+ export interface PluginEntryInfo {
6
+ entry: string;
7
+ isPinned: boolean;
8
+ pinnedVersion: string | null;
9
+ configPath: string;
10
+ }
11
+ export declare function findPluginEntry(directory: string): PluginEntryInfo | null;
12
+ export declare function getCachedVersion(): string | null;
13
+ /**
14
+ * Updates a pinned version entry in the config file.
15
+ * Only replaces within the "plugin" array to avoid unintended edits.
16
+ * Preserves JSONC comments and formatting via string replacement.
17
+ */
18
+ export declare function updatePinnedVersion(configPath: string, oldEntry: string, newVersion: string): boolean;
19
+ export declare function getLatestVersion(): Promise<string | null>;
20
+ export declare function checkForUpdate(directory: string): Promise<UpdateCheckResult>;
@@ -0,0 +1,13 @@
1
+ export declare const PACKAGE_NAME = "oh-my-opencode";
2
+ export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode/dist-tags";
3
+ export declare const NPM_FETCH_TIMEOUT = 5000;
4
+ export declare const CACHE_DIR: string;
5
+ export declare const VERSION_FILE: string;
6
+ export declare const INSTALLED_PACKAGE_JSON: string;
7
+ /**
8
+ * Get the Windows-specific APPDATA directory (for fallback checks)
9
+ */
10
+ export declare function getWindowsAppdataDir(): string | null;
11
+ export declare const USER_CONFIG_DIR: string;
12
+ export declare const USER_OPENCODE_CONFIG: string;
13
+ export declare const USER_OPENCODE_CONFIG_JSONC: string;
@@ -0,0 +1,13 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { AutoUpdateCheckerOptions } from "./types";
3
+ export declare function createAutoUpdateCheckerHook(ctx: PluginInput, options?: AutoUpdateCheckerOptions): {
4
+ event: ({ event }: {
5
+ event: {
6
+ type: string;
7
+ properties?: unknown;
8
+ };
9
+ }) => void;
10
+ };
11
+ export type { UpdateCheckResult, AutoUpdateCheckerOptions } from "./types";
12
+ export { checkForUpdate } from "./checker";
13
+ export { invalidatePackage, invalidateCache } from "./cache";
@@ -0,0 +1,25 @@
1
+ export interface NpmDistTags {
2
+ latest: string;
3
+ [key: string]: string;
4
+ }
5
+ export interface OpencodeConfig {
6
+ plugin?: string[];
7
+ [key: string]: unknown;
8
+ }
9
+ export interface PackageJson {
10
+ version: string;
11
+ name?: string;
12
+ [key: string]: unknown;
13
+ }
14
+ export interface UpdateCheckResult {
15
+ needsUpdate: boolean;
16
+ currentVersion: string | null;
17
+ latestVersion: string | null;
18
+ isLocalDev: boolean;
19
+ isPinned: boolean;
20
+ }
21
+ export interface AutoUpdateCheckerOptions {
22
+ showStartupToast?: boolean;
23
+ isSisyphusEnabled?: boolean;
24
+ autoUpdate?: boolean;
25
+ }
@@ -0,0 +1,12 @@
1
+ import type { BackgroundManager } from "../../features/background-agent";
2
+ interface Event {
3
+ type: string;
4
+ properties?: Record<string, unknown>;
5
+ }
6
+ interface EventInput {
7
+ event: Event;
8
+ }
9
+ export declare function createBackgroundNotificationHook(manager: BackgroundManager): {
10
+ event: ({ event }: EventInput) => Promise<void>;
11
+ };
12
+ export type { BackgroundNotificationHookConfig } from "./types";
@@ -0,0 +1,4 @@
1
+ import type { BackgroundTask } from "../../features/background-agent";
2
+ export interface BackgroundNotificationHookConfig {
3
+ formatNotification?: (tasks: BackgroundTask[]) => string;
4
+ }
@@ -0,0 +1,13 @@
1
+ import type { ClaudeHookEvent } from "./types";
2
+ export interface DisabledHooksConfig {
3
+ Stop?: string[];
4
+ PreToolUse?: string[];
5
+ PostToolUse?: string[];
6
+ UserPromptSubmit?: string[];
7
+ PreCompact?: string[];
8
+ }
9
+ export interface PluginExtendedConfig {
10
+ disabledHooks?: DisabledHooksConfig;
11
+ }
12
+ export declare function loadPluginExtendedConfig(): Promise<PluginExtendedConfig>;
13
+ export declare function isHookCommandDisabled(eventType: ClaudeHookEvent, command: string, config: PluginExtendedConfig | null): boolean;
@@ -0,0 +1,3 @@
1
+ import type { ClaudeHooksConfig } from "./types";
2
+ export declare function getClaudeSettingsPaths(customPath?: string): string[];
3
+ export declare function loadClaudeHooksConfig(customSettingsPath?: string): Promise<ClaudeHooksConfig | null>;
@@ -0,0 +1,48 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import type { PluginConfig } from "./types";
3
+ import type { ContextCollector } from "../../features/context-injector";
4
+ export declare function createClaudeCodeHooksHook(ctx: PluginInput, config?: PluginConfig, contextCollector?: ContextCollector): {
5
+ "experimental.session.compacting": (input: {
6
+ sessionID: string;
7
+ }, output: {
8
+ context: string[];
9
+ }) => Promise<void>;
10
+ "chat.message": (input: {
11
+ sessionID: string;
12
+ agent?: string;
13
+ model?: {
14
+ providerID: string;
15
+ modelID: string;
16
+ };
17
+ messageID?: string;
18
+ }, output: {
19
+ message: Record<string, unknown>;
20
+ parts: Array<{
21
+ type: string;
22
+ text?: string;
23
+ [key: string]: unknown;
24
+ }>;
25
+ }) => Promise<void>;
26
+ "tool.execute.before": (input: {
27
+ tool: string;
28
+ sessionID: string;
29
+ callID: string;
30
+ }, output: {
31
+ args: Record<string, unknown>;
32
+ }) => Promise<void>;
33
+ "tool.execute.after": (input: {
34
+ tool: string;
35
+ sessionID: string;
36
+ callID: string;
37
+ }, output: {
38
+ title: string;
39
+ output: string;
40
+ metadata: unknown;
41
+ }) => Promise<void>;
42
+ event: (input: {
43
+ event: {
44
+ type: string;
45
+ properties?: unknown;
46
+ };
47
+ }) => Promise<void>;
48
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Plugin configuration for Claude Code hooks execution
3
+ * Contains settings for hook command execution (zsh, etc.)
4
+ */
5
+ export declare const DEFAULT_CONFIG: {
6
+ forceZsh: boolean;
7
+ zshPath: string;
8
+ };
@@ -0,0 +1,40 @@
1
+ import type { ClaudeHooksConfig } from "./types";
2
+ import { type PluginExtendedConfig } from "./config-loader";
3
+ export interface PostToolUseClient {
4
+ session: {
5
+ messages: (opts: {
6
+ path: {
7
+ id: string;
8
+ };
9
+ query?: {
10
+ directory: string;
11
+ };
12
+ }) => Promise<unknown>;
13
+ };
14
+ }
15
+ export interface PostToolUseContext {
16
+ sessionId: string;
17
+ toolName: string;
18
+ toolInput: Record<string, unknown>;
19
+ toolOutput: Record<string, unknown>;
20
+ cwd: string;
21
+ transcriptPath?: string;
22
+ toolUseId?: string;
23
+ client?: PostToolUseClient;
24
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions";
25
+ }
26
+ export interface PostToolUseResult {
27
+ block: boolean;
28
+ reason?: string;
29
+ message?: string;
30
+ warnings?: string[];
31
+ elapsedMs?: number;
32
+ hookName?: string;
33
+ toolName?: string;
34
+ additionalContext?: string;
35
+ continue?: boolean;
36
+ stopReason?: string;
37
+ suppressOutput?: boolean;
38
+ systemMessage?: string;
39
+ }
40
+ export declare function executePostToolUseHooks(ctx: PostToolUseContext, config: ClaudeHooksConfig | null, extendedConfig?: PluginExtendedConfig | null): Promise<PostToolUseResult>;
@@ -0,0 +1,16 @@
1
+ import type { ClaudeHooksConfig } from "./types";
2
+ import { type PluginExtendedConfig } from "./config-loader";
3
+ export interface PreCompactContext {
4
+ sessionId: string;
5
+ cwd: string;
6
+ }
7
+ export interface PreCompactResult {
8
+ context: string[];
9
+ elapsedMs?: number;
10
+ hookName?: string;
11
+ continue?: boolean;
12
+ stopReason?: string;
13
+ suppressOutput?: boolean;
14
+ systemMessage?: string;
15
+ }
16
+ export declare function executePreCompactHooks(ctx: PreCompactContext, config: ClaudeHooksConfig | null, extendedConfig?: PluginExtendedConfig | null): Promise<PreCompactResult>;
@@ -0,0 +1,25 @@
1
+ import type { PermissionDecision, ClaudeHooksConfig } from "./types";
2
+ import { type PluginExtendedConfig } from "./config-loader";
3
+ export interface PreToolUseContext {
4
+ sessionId: string;
5
+ toolName: string;
6
+ toolInput: Record<string, unknown>;
7
+ cwd: string;
8
+ transcriptPath?: string;
9
+ toolUseId?: string;
10
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions";
11
+ }
12
+ export interface PreToolUseResult {
13
+ decision: PermissionDecision;
14
+ reason?: string;
15
+ modifiedInput?: Record<string, unknown>;
16
+ elapsedMs?: number;
17
+ hookName?: string;
18
+ toolName?: string;
19
+ inputLines?: string;
20
+ continue?: boolean;
21
+ stopReason?: string;
22
+ suppressOutput?: boolean;
23
+ systemMessage?: string;
24
+ }
25
+ export declare function executePreToolUseHooks(ctx: PreToolUseContext, config: ClaudeHooksConfig | null, extendedConfig?: PluginExtendedConfig | null): Promise<PreToolUseResult>;
@@ -0,0 +1,20 @@
1
+ import type { ClaudeHooksConfig } from "./types";
2
+ import { type PluginExtendedConfig } from "./config-loader";
3
+ export declare function setStopHookActive(sessionId: string, active: boolean): void;
4
+ export declare function getStopHookActive(sessionId: string): boolean;
5
+ export interface StopContext {
6
+ sessionId: string;
7
+ parentSessionId?: string;
8
+ cwd: string;
9
+ transcriptPath?: string;
10
+ permissionMode?: "default" | "acceptEdits" | "bypassPermissions";
11
+ stopHookActive?: boolean;
12
+ }
13
+ export interface StopResult {
14
+ block: boolean;
15
+ reason?: string;
16
+ stopHookActive?: boolean;
17
+ permissionMode?: "default" | "plan" | "acceptEdits" | "bypassPermissions";
18
+ injectPrompt?: string;
19
+ }
20
+ export declare function executeStopHooks(ctx: StopContext, config: ClaudeHooksConfig | null, extendedConfig?: PluginExtendedConfig | null): Promise<StopResult>;
@@ -0,0 +1,12 @@
1
+ import type { TodoFile } from "./types";
2
+ export declare function getTodoPath(sessionId: string): string;
3
+ export interface OpenCodeTodo {
4
+ content: string;
5
+ status: string;
6
+ priority: string;
7
+ id: string;
8
+ }
9
+ export declare function loadTodoFile(sessionId: string): TodoFile | null;
10
+ export declare function saveTodoFile(sessionId: string, file: TodoFile): void;
11
+ export declare function saveOpenCodeTodos(sessionId: string, todos: OpenCodeTodo[]): void;
12
+ export declare function deleteTodoFile(sessionId: string): void;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Caches tool_input from PreToolUse for PostToolUse
3
+ */
4
+ export declare function cacheToolInput(sessionId: string, toolName: string, invocationId: string, toolInput: Record<string, unknown>): void;
5
+ export declare function getToolInput(sessionId: string, toolName: string, invocationId: string): Record<string, unknown> | null;