@skj1724/oh-my-opencode 3.11.8 → 3.17.5

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 (371) hide show
  1. package/README.ja.md +8 -4
  2. package/README.ko.md +8 -4
  3. package/README.md +20 -10
  4. package/README.ru.md +8 -4
  5. package/README.zh-cn.md +8 -4
  6. package/bin/oh-my-opencode.js +11 -0
  7. package/bin/platform.js +13 -13
  8. package/bin/platform.test.ts +15 -0
  9. package/dist/agents/atlas/agent.d.ts +1 -1
  10. package/dist/agents/atlas/default-prompt-sections.d.ts +6 -0
  11. package/dist/agents/atlas/default.d.ts +0 -9
  12. package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -0
  13. package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -0
  14. package/dist/agents/atlas/gpt.d.ts +0 -9
  15. package/dist/agents/atlas/prompt-section-builder.d.ts +2 -3
  16. package/dist/agents/atlas/shared-prompt.d.ts +9 -0
  17. package/dist/agents/dynamic-agent-category-skills-guide.d.ts +2 -0
  18. package/dist/agents/dynamic-agent-core-sections.d.ts +17 -0
  19. package/dist/agents/dynamic-agent-policy-sections.d.ts +6 -0
  20. package/dist/agents/dynamic-agent-prompt-builder.d.ts +5 -35
  21. package/dist/agents/dynamic-agent-prompt-types.d.ts +20 -0
  22. package/dist/agents/dynamic-agent-tool-categorization.d.ts +3 -0
  23. package/dist/agents/gpt-apply-patch-guard.d.ts +2 -0
  24. package/dist/agents/hephaestus/agent.d.ts +1 -1
  25. package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +10 -11
  26. package/dist/agents/hephaestus/gpt-5-4.d.ts +22 -1
  27. package/dist/agents/hephaestus/gpt.d.ts +1 -1
  28. package/dist/agents/metis.d.ts +6 -6
  29. package/dist/agents/momus.d.ts +8 -11
  30. package/dist/agents/prometheus/behavioral-summary.d.ts +3 -3
  31. package/dist/agents/prometheus/gemini.d.ts +7 -7
  32. package/dist/agents/prometheus/gpt.d.ts +6 -6
  33. package/dist/agents/prometheus/identity-constraints.d.ts +2 -2
  34. package/dist/agents/prometheus/plan-generation.d.ts +2 -2
  35. package/dist/agents/prometheus/plan-template.d.ts +4 -4
  36. package/dist/agents/sisyphus/gemini.d.ts +10 -10
  37. package/dist/agents/sisyphus/gpt-5-4.d.ts +17 -17
  38. package/dist/agents/sisyphus/index.d.ts +1 -1
  39. package/dist/agents/sisyphus-junior/gemini.d.ts +6 -6
  40. package/dist/agents/sisyphus-junior/gpt-5-3-codex.d.ts +4 -4
  41. package/dist/agents/sisyphus-junior/gpt-5-4.d.ts +7 -7
  42. package/dist/agents/sisyphus-junior/gpt.d.ts +5 -5
  43. package/dist/agents/sisyphus.d.ts +1 -1
  44. package/dist/agents/types.d.ts +1 -0
  45. package/dist/cli/config-manager/backup-config.d.ts +6 -0
  46. package/dist/cli/config-manager/version-compatibility.d.ts +9 -0
  47. package/dist/cli/config-manager.d.ts +4 -0
  48. package/dist/cli/doctor/checks/system.d.ts +15 -2
  49. package/dist/cli/doctor/constants.d.ts +1 -1
  50. package/dist/cli/doctor/spawn-with-timeout.d.ts +8 -0
  51. package/dist/cli/index.js +27570 -18945
  52. package/dist/cli/install-validators.d.ts +1 -0
  53. package/dist/cli/mcp-oauth/login.d.ts +6 -1
  54. package/dist/cli/minimum-opencode-version.d.ts +1 -0
  55. package/dist/cli/model-fallback-types.d.ts +4 -0
  56. package/dist/cli/provider-model-id-transform.d.ts +1 -1
  57. package/dist/cli/run/continuation-state.d.ts +2 -1
  58. package/dist/cli/run/event-state.d.ts +0 -2
  59. package/dist/cli/run/types.d.ts +0 -1
  60. package/dist/cli/types.d.ts +4 -0
  61. package/dist/config/schema/agent-definitions.d.ts +3 -0
  62. package/dist/config/schema/agent-names.d.ts +2 -0
  63. package/dist/config/schema/agent-overrides.d.ts +330 -15
  64. package/dist/config/schema/background-task.d.ts +2 -1
  65. package/dist/config/schema/categories.d.ts +44 -2
  66. package/dist/config/schema/commands.d.ts +1 -0
  67. package/dist/config/schema/experimental.d.ts +1 -0
  68. package/dist/config/schema/fallback-models.d.ts +67 -1
  69. package/dist/config/schema/hooks.d.ts +3 -0
  70. package/dist/config/schema/oh-my-opencode-config.d.ts +345 -17
  71. package/dist/config/schema/sisyphus-agent.d.ts +1 -0
  72. package/dist/config/schema/tmux.d.ts +11 -0
  73. package/dist/create-hooks.d.ts +8 -0
  74. package/dist/create-managers.d.ts +16 -0
  75. package/dist/create-runtime-tmux-config.d.ts +10 -0
  76. package/dist/create-tools.d.ts +3 -2
  77. package/dist/features/background-agent/abort-with-timeout.d.ts +2 -0
  78. package/dist/features/background-agent/background-task-notification-template.d.ts +10 -4
  79. package/dist/features/background-agent/compaction-aware-message-resolver.d.ts +5 -2
  80. package/dist/features/background-agent/constants.d.ts +1 -0
  81. package/dist/features/background-agent/fallback-retry-handler.d.ts +1 -1
  82. package/dist/features/background-agent/index.d.ts +2 -0
  83. package/dist/features/background-agent/manager.d.ts +10 -0
  84. package/dist/features/background-agent/process-cleanup.d.ts +1 -1
  85. package/dist/features/background-agent/session-existence.d.ts +3 -0
  86. package/dist/features/background-agent/spawner.d.ts +3 -0
  87. package/dist/features/background-agent/subagent-spawn-limits.d.ts +1 -8
  88. package/dist/features/background-agent/task-poller.d.ts +2 -0
  89. package/dist/features/background-agent/types.d.ts +2 -0
  90. package/dist/features/background-agent/wait-for-task-session.d.ts +17 -0
  91. package/dist/features/boulder-state/storage.d.ts +8 -1
  92. package/dist/features/boulder-state/types.d.ts +1 -0
  93. package/dist/features/builtin-commands/commands.d.ts +5 -1
  94. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  95. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  96. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
  97. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -0
  98. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  99. package/dist/features/builtin-commands/types.d.ts +1 -1
  100. package/dist/features/builtin-skills/skills/ai-slop-remover.d.ts +2 -0
  101. package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -0
  102. package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -0
  103. package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -0
  104. package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -0
  105. package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -0
  106. package/dist/features/builtin-skills/skills/index.d.ts +2 -0
  107. package/dist/features/builtin-skills/skills/playwright-cli.d.ts +5 -5
  108. package/dist/features/builtin-skills/skills/review-work.d.ts +2 -0
  109. package/dist/features/claude-code-agent-loader/agent-definitions-loader.d.ts +3 -0
  110. package/dist/features/claude-code-agent-loader/index.d.ts +3 -0
  111. package/dist/features/claude-code-agent-loader/json-agent-loader.d.ts +2 -0
  112. package/dist/features/claude-code-agent-loader/loader.d.ts +2 -0
  113. package/dist/features/claude-code-agent-loader/opencode-config-agents-reader.d.ts +2 -0
  114. package/dist/features/claude-code-agent-loader/types.d.ts +9 -1
  115. package/dist/features/claude-code-mcp-loader/configure-allowed-env-vars.d.ts +5 -0
  116. package/dist/features/claude-code-mcp-loader/env-expander.d.ts +5 -2
  117. package/dist/features/claude-code-mcp-loader/index.d.ts +1 -0
  118. package/dist/features/claude-code-mcp-loader/scope-filter.d.ts +2 -0
  119. package/dist/features/claude-code-mcp-loader/types.d.ts +8 -4
  120. package/dist/features/claude-code-plugin-loader/discovery.d.ts +2 -1
  121. package/dist/features/claude-code-plugin-loader/loader.d.ts +16 -0
  122. package/dist/features/claude-code-plugin-loader/scope-filter.d.ts +2 -0
  123. package/dist/features/claude-code-plugin-loader/types.d.ts +21 -0
  124. package/dist/features/claude-code-session-state/state.d.ts +3 -0
  125. package/dist/features/context-injector/collector.d.ts +1 -0
  126. package/dist/features/mcp-oauth/provider.d.ts +1 -0
  127. package/dist/features/mcp-oauth/refresh-mutex.d.ts +26 -0
  128. package/dist/features/opencode-skill-loader/async-loader.d.ts +2 -2
  129. package/dist/features/skill-mcp-manager/connection.d.ts +3 -4
  130. package/dist/features/skill-mcp-manager/error-redaction.d.ts +10 -0
  131. package/dist/features/skill-mcp-manager/http-client.d.ts +17 -3
  132. package/dist/features/skill-mcp-manager/manager.d.ts +5 -3
  133. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +12 -4
  134. package/dist/features/skill-mcp-manager/stdio-client.d.ts +16 -3
  135. package/dist/features/skill-mcp-manager/types.d.ts +25 -6
  136. package/dist/features/team-mode/index.d.ts +2 -0
  137. package/dist/features/team-mode/team-worktree/cleanup.d.ts +3 -0
  138. package/dist/features/team-mode/team-worktree/index.d.ts +2 -0
  139. package/dist/features/team-mode/team-worktree/manager.d.ts +15 -0
  140. package/dist/features/team-mode/types.d.ts +210 -0
  141. package/dist/features/tmux-subagent/manager.d.ts +16 -13
  142. package/dist/features/tmux-subagent/polling-manager.d.ts +5 -0
  143. package/dist/features/tmux-subagent/types.d.ts +2 -0
  144. package/dist/features/tool-metadata-store/index.d.ts +7 -0
  145. package/dist/features/tool-metadata-store/publish-tool-metadata.d.ts +9 -0
  146. package/dist/features/tool-metadata-store/recover-tool-metadata.d.ts +3 -0
  147. package/dist/features/tool-metadata-store/resolve-tool-call-id.d.ts +6 -0
  148. package/dist/features/tool-metadata-store/task-metadata-contract.d.ts +10 -0
  149. package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
  150. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +4 -1
  151. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +10 -0
  152. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.test-support.d.ts +29 -0
  153. package/dist/hooks/anthropic-context-window-limit-recovery/session-timeout-map.d.ts +2 -0
  154. package/dist/hooks/anthropic-context-window-limit-recovery/state.d.ts +2 -0
  155. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -0
  156. package/dist/hooks/atlas/background-launch-session-tracking.d.ts +11 -0
  157. package/dist/hooks/atlas/boulder-continuation-injector.d.ts +2 -1
  158. package/dist/hooks/atlas/session-last-agent.d.ts +10 -1
  159. package/dist/hooks/atlas/subagent-session-id.d.ts +1 -0
  160. package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
  161. package/dist/hooks/atlas/task-context.d.ts +7 -0
  162. package/dist/hooks/atlas/types.d.ts +2 -0
  163. package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
  164. package/dist/hooks/auto-slash-command/hook.d.ts +1 -0
  165. package/dist/hooks/auto-update-checker/checker/sync-package-json.d.ts +1 -1
  166. package/dist/hooks/auto-update-checker/constants.d.ts +19 -3
  167. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +29 -1
  168. package/dist/hooks/auto-update-checker/hook.d.ts +22 -1
  169. package/dist/hooks/bash-file-read-guard.d.ts +2 -0
  170. package/dist/hooks/claude-code-hooks/claude-code-hooks-hook.d.ts +1 -0
  171. package/dist/hooks/claude-code-hooks/config-loader.d.ts +1 -0
  172. package/dist/hooks/claude-code-hooks/config.d.ts +1 -0
  173. package/dist/hooks/claude-code-hooks/handlers/session-event-handler.d.ts +3 -1
  174. package/dist/hooks/claude-code-hooks/session-hook-state.d.ts +1 -0
  175. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +2 -0
  176. package/dist/hooks/claude-code-hooks/transcript.d.ts +1 -3
  177. package/dist/hooks/comment-checker/cli-runner.d.ts +4 -1
  178. package/dist/hooks/comment-checker/hook.d.ts +1 -0
  179. package/dist/hooks/comment-checker/pending-calls.d.ts +1 -0
  180. package/dist/hooks/directory-agents-injector/hook.d.ts +7 -7
  181. package/dist/hooks/directory-readme-injector/hook.d.ts +7 -7
  182. package/dist/hooks/edit-error-recovery/hook.d.ts +1 -1
  183. package/dist/hooks/index.d.ts +4 -1
  184. package/dist/hooks/json-error-recovery/hook.d.ts +1 -1
  185. package/dist/hooks/keyword-detector/hook.d.ts +2 -1
  186. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +3 -4
  187. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +11 -12
  188. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +4 -5
  189. package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +1 -2
  190. package/dist/hooks/legacy-plugin-toast/auto-migrate-runner.d.ts +2 -0
  191. package/dist/hooks/legacy-plugin-toast/auto-migrate.d.ts +7 -0
  192. package/dist/hooks/legacy-plugin-toast/hook.d.ts +18 -0
  193. package/dist/hooks/legacy-plugin-toast/index.d.ts +1 -0
  194. package/dist/hooks/legacy-plugin-toast/plugin-entry-migrator.d.ts +1 -0
  195. package/dist/hooks/model-fallback/chat-message-fallback-handler.d.ts +23 -0
  196. package/dist/hooks/model-fallback/controller-accessor.d.ts +8 -0
  197. package/dist/hooks/model-fallback/fallback-state-controller.d.ts +26 -0
  198. package/dist/hooks/model-fallback/hook.d.ts +21 -16
  199. package/dist/hooks/model-fallback/index.d.ts +2 -0
  200. package/dist/hooks/model-fallback/next-fallback.d.ts +14 -0
  201. package/dist/hooks/preemptive-compaction-trigger.d.ts +13 -0
  202. package/dist/hooks/preemptive-compaction-types.d.ts +53 -0
  203. package/dist/hooks/preemptive-compaction.d.ts +3 -15
  204. package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +11 -0
  205. package/dist/hooks/ralph-loop/constants.d.ts +1 -0
  206. package/dist/hooks/ralph-loop/oracle-verification-detector.d.ts +8 -0
  207. package/dist/hooks/read-image-resizer/image-resizer.d.ts +3 -1
  208. package/dist/hooks/read-image-resizer/png-fallback-resizer.d.ts +2 -0
  209. package/dist/hooks/rules-injector/constants.d.ts +1 -0
  210. package/dist/hooks/rules-injector/finder.d.ts +1 -1
  211. package/dist/hooks/rules-injector/hook.d.ts +2 -0
  212. package/dist/hooks/rules-injector/injector.d.ts +14 -0
  213. package/dist/hooks/rules-injector/rule-file-finder.d.ts +9 -1
  214. package/dist/hooks/runtime-fallback/auto-retry-signal.d.ts +4 -0
  215. package/dist/hooks/runtime-fallback/error-classifier.d.ts +1 -5
  216. package/dist/hooks/runtime-fallback/fallback-models.d.ts +1 -1
  217. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +5 -1
  218. package/dist/hooks/session-notification-event-properties.d.ts +5 -0
  219. package/dist/hooks/session-recovery/types.d.ts +2 -0
  220. package/dist/hooks/start-work/context-info-builder.d.ts +12 -0
  221. package/dist/hooks/start-work/start-work-hook.d.ts +6 -0
  222. package/dist/hooks/start-work/worktree-block.d.ts +1 -0
  223. package/dist/hooks/todo-continuation-enforcer/pending-question-detection.d.ts +1 -1
  224. package/dist/hooks/todo-continuation-enforcer/resolve-message-info.d.ts +2 -2
  225. package/dist/hooks/todo-continuation-enforcer/session-state.d.ts +4 -3
  226. package/dist/hooks/todo-continuation-enforcer/token-limit-detection.d.ts +4 -0
  227. package/dist/hooks/todo-continuation-enforcer/types.d.ts +14 -0
  228. package/dist/hooks/todo-description-override/description.d.ts +1 -1
  229. package/dist/hooks/tool-pair-validator/hook.d.ts +28 -0
  230. package/dist/hooks/tool-pair-validator/index.d.ts +1 -0
  231. package/dist/hooks/unstable-agent-babysitter/task-message-analyzer.d.ts +1 -0
  232. package/dist/hooks/unstable-agent-babysitter/unstable-agent-babysitter-hook.d.ts +2 -0
  233. package/dist/hooks/write-existing-file-guard/hook.d.ts +12 -0
  234. package/dist/hooks/write-existing-file-guard/session-read-permissions.d.ts +3 -0
  235. package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +15 -0
  236. package/dist/index.d.ts +3 -3
  237. package/dist/index.js +83174 -93787
  238. package/dist/mcp/websearch.d.ts +2 -2
  239. package/dist/oh-my-opencode.schema.json +1059 -8
  240. package/dist/openclaw/config.d.ts +1 -1
  241. package/dist/openclaw/dispatcher.d.ts +9 -13
  242. package/dist/openclaw/gateway-url-validation.d.ts +1 -0
  243. package/dist/openclaw/reply-listener-discord.d.ts +4 -0
  244. package/dist/openclaw/reply-listener-injection.d.ts +10 -0
  245. package/dist/openclaw/reply-listener-log.d.ts +2 -0
  246. package/dist/openclaw/reply-listener-paths.d.ts +7 -0
  247. package/dist/openclaw/reply-listener-process.d.ts +4 -0
  248. package/dist/openclaw/reply-listener-spawn.d.ts +5 -0
  249. package/dist/openclaw/reply-listener-startup.d.ts +12 -0
  250. package/dist/openclaw/reply-listener-state.d.ts +29 -0
  251. package/dist/openclaw/reply-listener-telegram.d.ts +4 -0
  252. package/dist/openclaw/reply-listener.d.ts +5 -18
  253. package/dist/openclaw/runtime-dispatch.d.ts +17 -0
  254. package/dist/openclaw/types.d.ts +4 -0
  255. package/dist/plugin/chat-params.d.ts +1 -0
  256. package/dist/plugin/command-execute-before.d.ts +19 -0
  257. package/dist/plugin/hooks/create-core-hooks.d.ts +5 -0
  258. package/dist/plugin/hooks/create-session-hooks.d.ts +4 -1
  259. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  260. package/dist/plugin/hooks/create-transform-hooks.d.ts +4 -1
  261. package/dist/plugin/tool-registry.d.ts +26 -1
  262. package/dist/plugin/types.d.ts +1 -0
  263. package/dist/plugin-handlers/agent-priority-order.d.ts +11 -0
  264. package/dist/shared/agent-display-names.d.ts +23 -2
  265. package/dist/shared/agent-tool-restrictions.d.ts +0 -5
  266. package/dist/shared/archive-entry-validator.d.ts +6 -0
  267. package/dist/shared/background-output-consumption.d.ts +5 -0
  268. package/dist/shared/compaction-marker.d.ts +13 -0
  269. package/dist/shared/connected-providers-cache.d.ts +2 -1
  270. package/dist/shared/contains-path.d.ts +2 -0
  271. package/dist/shared/external-plugin-detector.d.ts +14 -0
  272. package/dist/shared/index.d.ts +9 -0
  273. package/dist/shared/internal-initiator-marker.d.ts +1 -0
  274. package/dist/shared/is-abort-error.d.ts +1 -0
  275. package/dist/shared/json-file-cache-store.d.ts +16 -0
  276. package/dist/shared/jsonc-parser.d.ts +1 -0
  277. package/dist/shared/legacy-plugin-warning.d.ts +7 -0
  278. package/dist/shared/load-opencode-plugins.d.ts +1 -0
  279. package/dist/shared/log-legacy-plugin-startup-warning.d.ts +10 -0
  280. package/dist/shared/migrate-legacy-config-file.d.ts +1 -0
  281. package/dist/shared/migrate-legacy-plugin-entry.d.ts +1 -0
  282. package/dist/shared/migration/migrations-sidecar.d.ts +41 -0
  283. package/dist/shared/model-capabilities/bundled-snapshot.d.ts +2 -0
  284. package/dist/shared/model-capabilities/get-model-capabilities.d.ts +2 -0
  285. package/dist/shared/model-capabilities/index.d.ts +3 -0
  286. package/dist/shared/model-capabilities/runtime-model-readers.d.ts +11 -0
  287. package/dist/shared/{model-capabilities.d.ts → model-capabilities/types.d.ts} +35 -32
  288. package/dist/shared/model-suggestion-retry.d.ts +0 -9
  289. package/dist/shared/opencode-provider-auth.d.ts +3 -0
  290. package/dist/shared/parse-tools-config.d.ts +6 -0
  291. package/dist/shared/permission-compat.d.ts +1 -1
  292. package/dist/shared/plugin-entry-migrator.d.ts +3 -0
  293. package/dist/shared/plugin-identity.d.ts +6 -3
  294. package/dist/shared/posthog-activity-state.d.ts +8 -0
  295. package/dist/shared/posthog.d.ts +14 -0
  296. package/dist/shared/resolve-agent-definition-paths.d.ts +1 -0
  297. package/dist/shared/ripgrep-cli.d.ts +8 -0
  298. package/dist/shared/session-category-registry.d.ts +0 -24
  299. package/dist/shared/session-cursor.d.ts +6 -0
  300. package/dist/shared/session-prompt-params-state.d.ts +1 -0
  301. package/dist/shared/shell-env.d.ts +6 -2
  302. package/dist/shared/skill-path-resolver.d.ts +0 -8
  303. package/dist/shared/task-system-enabled.d.ts +6 -0
  304. package/dist/shared/tmux/tmux-utils/server-health.d.ts +1 -0
  305. package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +3 -0
  306. package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +3 -0
  307. package/dist/shared/tmux/tmux-utils.d.ts +3 -1
  308. package/dist/shared/write-file-atomically.d.ts +1 -0
  309. package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +4 -0
  310. package/dist/shared/zip-entry-listing/python-zip-entry-listing.d.ts +3 -0
  311. package/dist/shared/zip-entry-listing/read-zip-symlink-target.d.ts +1 -0
  312. package/dist/shared/zip-entry-listing/tar-zip-entry-listing.d.ts +3 -0
  313. package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +4 -0
  314. package/dist/shared/zip-entry-listing.d.ts +4 -0
  315. package/dist/testing/module-mock-lifecycle.d.ts +21 -0
  316. package/dist/tools/background-task/constants.d.ts +3 -3
  317. package/dist/tools/call-omo-agent/agent-resolver.d.ts +17 -0
  318. package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
  319. package/dist/tools/call-omo-agent/constants.d.ts +1 -1
  320. package/dist/tools/call-omo-agent/sync-executor.d.ts +4 -4
  321. package/dist/tools/call-omo-agent/tools.d.ts +2 -1
  322. package/dist/tools/delegate-task/anthropic-categories.d.ts +2 -0
  323. package/dist/tools/delegate-task/builtin-categories.d.ts +4 -0
  324. package/dist/tools/delegate-task/builtin-category-definition.d.ts +7 -0
  325. package/dist/tools/delegate-task/constants.d.ts +3 -14
  326. package/dist/tools/delegate-task/delegated-model-config.d.ts +3 -0
  327. package/dist/tools/delegate-task/executor-types.d.ts +4 -1
  328. package/dist/tools/delegate-task/fallback-entry-resolution.d.ts +12 -0
  329. package/dist/tools/delegate-task/fallback-entry-settings.d.ts +7 -0
  330. package/dist/tools/delegate-task/google-categories.d.ts +2 -0
  331. package/dist/tools/delegate-task/kimi-categories.d.ts +2 -0
  332. package/dist/tools/delegate-task/openai-categories.d.ts +2 -0
  333. package/dist/tools/delegate-task/prompt-builder.d.ts +1 -1
  334. package/dist/tools/delegate-task/resolve-metadata-model.d.ts +8 -0
  335. package/dist/tools/delegate-task/subagent-discovery.d.ts +15 -0
  336. package/dist/tools/delegate-task/sync-continuation.d.ts +2 -2
  337. package/dist/tools/delegate-task/sync-prompt-sender.d.ts +2 -0
  338. package/dist/tools/delegate-task/sync-task-fallback.d.ts +12 -0
  339. package/dist/tools/delegate-task/task-id.d.ts +2 -0
  340. package/dist/tools/delegate-task/tool-argument-preparation.d.ts +2 -0
  341. package/dist/tools/delegate-task/tool-description.d.ts +9 -0
  342. package/dist/tools/delegate-task/types.d.ts +5 -2
  343. package/dist/tools/glob/constants.d.ts +1 -1
  344. package/dist/tools/grep/cli.d.ts +3 -2
  345. package/dist/tools/grep/constants.d.ts +0 -9
  346. package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
  347. package/dist/tools/look-at/constants.d.ts +1 -1
  348. package/dist/tools/look-at/look-at-input-preparer.d.ts +22 -0
  349. package/dist/tools/look-at/look-at-prompt.d.ts +2 -0
  350. package/dist/tools/look-at/look-at-session-runner.d.ts +12 -0
  351. package/dist/tools/lsp/infer-extension.d.ts +1 -0
  352. package/dist/tools/session-manager/file-storage.d.ts +8 -0
  353. package/dist/tools/session-manager/sdk-storage.d.ts +8 -0
  354. package/dist/tools/session-manager/sdk-unavailable.d.ts +1 -0
  355. package/dist/tools/session-manager/storage.d.ts +1 -1
  356. package/dist/tools/session-manager/tools.d.ts +19 -1
  357. package/dist/tools/skill/constants.d.ts +2 -2
  358. package/dist/tools/skill/description-formatter.d.ts +3 -0
  359. package/dist/tools/skill/mcp-capability-formatter.d.ts +3 -0
  360. package/dist/tools/skill/native-skills.d.ts +12 -0
  361. package/dist/tools/skill/scope-priority.d.ts +4 -0
  362. package/dist/tools/skill/skill-body.d.ts +2 -0
  363. package/dist/tools/skill/skill-matcher.d.ts +5 -0
  364. package/dist/tools/skill/types.d.ts +30 -2
  365. package/dist/tools/skill-mcp/parse-skill-mcp-arguments.d.ts +1 -0
  366. package/dist/tools/skill-mcp/tools.d.ts +1 -1
  367. package/package.json +26 -25
  368. package/postinstall.mjs +75 -1
  369. package/dist/hooks/openclaw.d.ts +0 -11
  370. package/dist/plugin-dispose.d.ts +0 -10
  371. /package/dist/{tools/delegate-task → shared}/model-string-parser.d.ts +0 -0
@@ -0,0 +1,210 @@
1
+ import { z } from "zod";
2
+ export declare const MESSAGE_KINDS: readonly ["message", "shutdown_request", "shutdown_approved", "shutdown_rejected", "announcement"];
3
+ export declare const MEMBER_KINDS: readonly ["category", "subagent_type"];
4
+ export declare const TASK_STATUSES: readonly ["pending", "claimed", "in_progress", "completed", "deleted"];
5
+ export declare const RUNTIME_STATUSES: readonly ["creating", "active", "shutdown_requested", "deleting", "deleted", "failed", "orphaned"];
6
+ export declare const CategoryMemberSchema: z.ZodObject<{
7
+ name: z.ZodString;
8
+ cwd: z.ZodOptional<z.ZodString>;
9
+ worktreePath: z.ZodOptional<z.ZodString>;
10
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
11
+ backendType: z.ZodDefault<z.ZodEnum<{
12
+ tmux: "tmux";
13
+ "in-process": "in-process";
14
+ }>>;
15
+ color: z.ZodOptional<z.ZodString>;
16
+ isActive: z.ZodDefault<z.ZodBoolean>;
17
+ kind: z.ZodLiteral<"category">;
18
+ category: z.ZodString;
19
+ prompt: z.ZodString;
20
+ }, z.core.$strict>;
21
+ export declare const SubagentMemberSchema: z.ZodObject<{
22
+ name: z.ZodString;
23
+ cwd: z.ZodOptional<z.ZodString>;
24
+ worktreePath: z.ZodOptional<z.ZodString>;
25
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ backendType: z.ZodDefault<z.ZodEnum<{
27
+ tmux: "tmux";
28
+ "in-process": "in-process";
29
+ }>>;
30
+ color: z.ZodOptional<z.ZodString>;
31
+ isActive: z.ZodDefault<z.ZodBoolean>;
32
+ kind: z.ZodLiteral<"subagent_type">;
33
+ subagent_type: z.ZodString;
34
+ prompt: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strict>;
36
+ export declare const MemberSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ name: z.ZodString;
38
+ cwd: z.ZodOptional<z.ZodString>;
39
+ worktreePath: z.ZodOptional<z.ZodString>;
40
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ backendType: z.ZodDefault<z.ZodEnum<{
42
+ tmux: "tmux";
43
+ "in-process": "in-process";
44
+ }>>;
45
+ color: z.ZodOptional<z.ZodString>;
46
+ isActive: z.ZodDefault<z.ZodBoolean>;
47
+ kind: z.ZodLiteral<"category">;
48
+ category: z.ZodString;
49
+ prompt: z.ZodString;
50
+ }, z.core.$strict>, z.ZodObject<{
51
+ name: z.ZodString;
52
+ cwd: z.ZodOptional<z.ZodString>;
53
+ worktreePath: z.ZodOptional<z.ZodString>;
54
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ backendType: z.ZodDefault<z.ZodEnum<{
56
+ tmux: "tmux";
57
+ "in-process": "in-process";
58
+ }>>;
59
+ color: z.ZodOptional<z.ZodString>;
60
+ isActive: z.ZodDefault<z.ZodBoolean>;
61
+ kind: z.ZodLiteral<"subagent_type">;
62
+ subagent_type: z.ZodString;
63
+ prompt: z.ZodOptional<z.ZodString>;
64
+ }, z.core.$strict>], "kind">;
65
+ export declare const TeamSpecSchema: z.ZodObject<{
66
+ version: z.ZodLiteral<1>;
67
+ name: z.ZodString;
68
+ description: z.ZodOptional<z.ZodString>;
69
+ createdAt: z.ZodNumber;
70
+ leadAgentId: z.ZodString;
71
+ teamAllowedPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ sessionPermission: z.ZodOptional<z.ZodString>;
73
+ members: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
74
+ name: z.ZodString;
75
+ cwd: z.ZodOptional<z.ZodString>;
76
+ worktreePath: z.ZodOptional<z.ZodString>;
77
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
78
+ backendType: z.ZodDefault<z.ZodEnum<{
79
+ tmux: "tmux";
80
+ "in-process": "in-process";
81
+ }>>;
82
+ color: z.ZodOptional<z.ZodString>;
83
+ isActive: z.ZodDefault<z.ZodBoolean>;
84
+ kind: z.ZodLiteral<"category">;
85
+ category: z.ZodString;
86
+ prompt: z.ZodString;
87
+ }, z.core.$strict>, z.ZodObject<{
88
+ name: z.ZodString;
89
+ cwd: z.ZodOptional<z.ZodString>;
90
+ worktreePath: z.ZodOptional<z.ZodString>;
91
+ subscriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
+ backendType: z.ZodDefault<z.ZodEnum<{
93
+ tmux: "tmux";
94
+ "in-process": "in-process";
95
+ }>>;
96
+ color: z.ZodOptional<z.ZodString>;
97
+ isActive: z.ZodDefault<z.ZodBoolean>;
98
+ kind: z.ZodLiteral<"subagent_type">;
99
+ subagent_type: z.ZodString;
100
+ prompt: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$strict>], "kind">>;
102
+ }, z.core.$strip>;
103
+ export declare const MessageSchema: z.ZodObject<{
104
+ version: z.ZodLiteral<1>;
105
+ messageId: z.ZodString;
106
+ from: z.ZodString;
107
+ to: z.ZodString;
108
+ kind: z.ZodEnum<{
109
+ message: "message";
110
+ shutdown_request: "shutdown_request";
111
+ shutdown_approved: "shutdown_approved";
112
+ shutdown_rejected: "shutdown_rejected";
113
+ announcement: "announcement";
114
+ }>;
115
+ body: z.ZodString;
116
+ summary: z.ZodOptional<z.ZodString>;
117
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
118
+ path: z.ZodString;
119
+ description: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strict>>>;
121
+ timestamp: z.ZodNumber;
122
+ correlationId: z.ZodOptional<z.ZodString>;
123
+ color: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strip>;
125
+ export declare const TaskSchema: z.ZodObject<{
126
+ version: z.ZodLiteral<1>;
127
+ id: z.ZodString;
128
+ subject: z.ZodString;
129
+ description: z.ZodString;
130
+ activeForm: z.ZodOptional<z.ZodString>;
131
+ status: z.ZodEnum<{
132
+ pending: "pending";
133
+ in_progress: "in_progress";
134
+ completed: "completed";
135
+ deleted: "deleted";
136
+ claimed: "claimed";
137
+ }>;
138
+ owner: z.ZodOptional<z.ZodString>;
139
+ blocks: z.ZodDefault<z.ZodArray<z.ZodString>>;
140
+ blockedBy: z.ZodDefault<z.ZodArray<z.ZodString>>;
141
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
142
+ createdAt: z.ZodNumber;
143
+ updatedAt: z.ZodNumber;
144
+ claimedAt: z.ZodOptional<z.ZodNumber>;
145
+ }, z.core.$strip>;
146
+ export declare const RuntimeStateSchema: z.ZodObject<{
147
+ version: z.ZodLiteral<1>;
148
+ teamRunId: z.ZodString;
149
+ teamName: z.ZodString;
150
+ specSource: z.ZodEnum<{
151
+ user: "user";
152
+ project: "project";
153
+ }>;
154
+ createdAt: z.ZodNumber;
155
+ status: z.ZodEnum<{
156
+ deleted: "deleted";
157
+ failed: "failed";
158
+ active: "active";
159
+ creating: "creating";
160
+ shutdown_requested: "shutdown_requested";
161
+ deleting: "deleting";
162
+ orphaned: "orphaned";
163
+ }>;
164
+ leadSessionId: z.ZodOptional<z.ZodString>;
165
+ members: z.ZodArray<z.ZodObject<{
166
+ name: z.ZodString;
167
+ sessionId: z.ZodOptional<z.ZodString>;
168
+ tmuxPaneId: z.ZodOptional<z.ZodString>;
169
+ agentType: z.ZodEnum<{
170
+ leader: "leader";
171
+ "general-purpose": "general-purpose";
172
+ }>;
173
+ status: z.ZodEnum<{
174
+ pending: "pending";
175
+ completed: "completed";
176
+ running: "running";
177
+ idle: "idle";
178
+ errored: "errored";
179
+ shutdown_approved: "shutdown_approved";
180
+ }>;
181
+ color: z.ZodOptional<z.ZodString>;
182
+ worktreePath: z.ZodOptional<z.ZodString>;
183
+ lastInjectedTurnMarker: z.ZodOptional<z.ZodString>;
184
+ pendingInjectedMessageIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
185
+ }, z.core.$strict>>;
186
+ shutdownRequests: z.ZodDefault<z.ZodArray<z.ZodObject<{
187
+ memberId: z.ZodString;
188
+ requestedAt: z.ZodNumber;
189
+ approvedAt: z.ZodOptional<z.ZodNumber>;
190
+ rejectedReason: z.ZodOptional<z.ZodString>;
191
+ }, z.core.$strict>>>;
192
+ bounds: z.ZodObject<{
193
+ maxMembers: z.ZodDefault<z.ZodNumber>;
194
+ maxParallelMembers: z.ZodDefault<z.ZodNumber>;
195
+ maxMessagesPerRun: z.ZodDefault<z.ZodNumber>;
196
+ maxWallClockMinutes: z.ZodDefault<z.ZodNumber>;
197
+ maxMemberTurns: z.ZodDefault<z.ZodNumber>;
198
+ }, z.core.$strict>;
199
+ }, z.core.$strip>;
200
+ export declare const AGENT_ELIGIBILITY_REGISTRY: Readonly<Record<string, {
201
+ verdict: "eligible" | "conditional" | "hard-reject";
202
+ rejectionMessage?: string;
203
+ }>>;
204
+ export type TeamSpec = z.infer<typeof TeamSpecSchema>;
205
+ export type Member = z.infer<typeof MemberSchema>;
206
+ export type CategoryMember = z.infer<typeof CategoryMemberSchema>;
207
+ export type SubagentMember = z.infer<typeof SubagentMemberSchema>;
208
+ export type Message = z.infer<typeof MessageSchema>;
209
+ export type Task = z.infer<typeof TaskSchema>;
210
+ export type RuntimeState = z.infer<typeof RuntimeStateSchema>;
@@ -14,18 +14,6 @@ export interface TmuxUtilDeps {
14
14
  isInsideTmux: () => boolean;
15
15
  getCurrentPaneId: () => string | undefined;
16
16
  }
17
- /**
18
- * State-first Tmux Session Manager
19
- *
20
- * Architecture:
21
- * 1. QUERY: Get actual tmux pane state (source of truth)
22
- * 2. DECIDE: Pure function determines actions based on state
23
- * 3. EXECUTE: Execute actions with verification
24
- * 4. UPDATE: Update internal cache only after tmux confirms success
25
- *
26
- * The internal `sessions` Map is just a cache for sessionId<->paneId mapping.
27
- * The REAL source of truth is always queried from tmux.
28
- */
29
17
  export declare class TmuxSessionManager {
30
18
  private client;
31
19
  private tmuxConfig;
@@ -41,14 +29,25 @@ export declare class TmuxSessionManager {
41
29
  private nullStateCount;
42
30
  private deps;
43
31
  private pollingManager;
32
+ private isolatedContainerPaneId;
33
+ private isolatedWindowPaneId;
34
+ private isolatedContainerNullStateCount;
44
35
  constructor(ctx: PluginInput, tmuxConfig: TmuxConfig, deps?: TmuxUtilDeps);
45
36
  private isEnabled;
37
+ private isIsolated;
38
+ private getEffectiveSourcePaneId;
39
+ private spawnInIsolatedContainer;
46
40
  private getCapacityConfig;
47
41
  private getSessionMappings;
42
+ getTrackedPaneId(sessionId: string): string | undefined;
48
43
  private removeTrackedSession;
44
+ private reassignIsolatedContainerAnchor;
45
+ private cleanupIsolatedContainerAfterSessionDeletion;
49
46
  private markSessionClosePending;
50
47
  private queryWindowStateSafely;
51
- private tryCloseTrackedSession;
48
+ private closeTrackedSessionPane;
49
+ private finalizeTrackedSessionClose;
50
+ private closeTrackedSession;
52
51
  private retryPendingCloses;
53
52
  private enqueueDeferredSession;
54
53
  private removeDeferredSession;
@@ -62,6 +61,10 @@ export declare class TmuxSessionManager {
62
61
  sessionID: string;
63
62
  }): Promise<void>;
64
63
  private closeSessionById;
64
+ onEvent(event: {
65
+ type: string;
66
+ properties?: Record<string, unknown>;
67
+ }): void;
65
68
  createEventHandler(): (input: {
66
69
  event: {
67
70
  type: string;
@@ -7,7 +7,12 @@ export declare class TmuxPollingManager {
7
7
  private pollInterval?;
8
8
  private pollingInFlight;
9
9
  constructor(client: OpencodeClient, sessions: Map<string, TrackedSession>, closeSessionById: (sessionId: string) => Promise<void>);
10
+ handleEvent(event: {
11
+ type: string;
12
+ properties?: Record<string, unknown>;
13
+ }): void;
10
14
  startPolling(): void;
11
15
  stopPolling(): void;
12
16
  private pollSessions;
17
+ private getEventSessionId;
13
18
  }
@@ -8,6 +8,8 @@ export interface TrackedSession {
8
8
  closeRetryCount: number;
9
9
  lastMessageCount?: number;
10
10
  stableIdlePolls?: number;
11
+ activityVersion?: number;
12
+ observedIdleActivityVersion?: number;
11
13
  }
12
14
  export declare const MIN_PANE_WIDTH = 52;
13
15
  export declare const MIN_PANE_HEIGHT = 11;
@@ -1,2 +1,9 @@
1
1
  export { clearPendingStore, consumeToolMetadata, getPendingStoreSize, storeToolMetadata, } from "./store";
2
2
  export type { PendingToolMetadata } from "./store";
3
+ export { resolveToolCallID } from "./resolve-tool-call-id";
4
+ export type { ToolCallIDCarrier } from "./resolve-tool-call-id";
5
+ export { buildTaskMetadataBlock, extractTaskLink, parseTaskMetadataBlock } from "./task-metadata-contract";
6
+ export type { TaskLink } from "./task-metadata-contract";
7
+ export { publishToolMetadata } from "./publish-tool-metadata";
8
+ export { recoverToolMetadata } from "./recover-tool-metadata";
9
+ export type { ToolMetadataPublisherContext } from "./publish-tool-metadata";
@@ -0,0 +1,9 @@
1
+ import { type ToolCallIDCarrier } from "./resolve-tool-call-id";
2
+ import { type PendingToolMetadata } from "./store";
3
+ export interface ToolMetadataPublisherContext extends ToolCallIDCarrier {
4
+ sessionID: string;
5
+ metadata?: (input: PendingToolMetadata) => void | Promise<void>;
6
+ }
7
+ export declare function publishToolMetadata(ctx: ToolMetadataPublisherContext, payload: PendingToolMetadata): Promise<{
8
+ stored: boolean;
9
+ }>;
@@ -0,0 +1,3 @@
1
+ import { type PendingToolMetadata } from "./store";
2
+ import { type ToolCallIDCarrier } from "./resolve-tool-call-id";
3
+ export declare function recoverToolMetadata(sessionID: string, source: ToolCallIDCarrier | string | undefined): PendingToolMetadata | undefined;
@@ -0,0 +1,6 @@
1
+ export interface ToolCallIDCarrier {
2
+ callID?: string;
3
+ callId?: string;
4
+ call_id?: string;
5
+ }
6
+ export declare function resolveToolCallID(ctx: ToolCallIDCarrier): string | undefined;
@@ -0,0 +1,10 @@
1
+ export interface TaskLink {
2
+ sessionId?: string;
3
+ taskId?: string;
4
+ backgroundTaskId?: string;
5
+ agent?: string;
6
+ category?: string;
7
+ }
8
+ export declare function buildTaskMetadataBlock(link: TaskLink): string;
9
+ export declare function parseTaskMetadataBlock(text: string): TaskLink;
10
+ export declare function extractTaskLink(metadata: unknown, outputText: string): TaskLink;
@@ -1,4 +1,4 @@
1
1
  export declare const AGENT_USAGE_REMINDER_STORAGE: string;
2
2
  export declare const TARGET_TOOLS: Set<string>;
3
3
  export declare const AGENT_TOOLS: Set<string>;
4
- export declare const REMINDER_MESSAGE = "\n[\u4EE3\u7406\u4F7F\u7528\u63D0\u9192]\n\n\u4F60\u76F4\u63A5\u8C03\u7528\u4E86\u641C\u7D22/\u83B7\u53D6\u5DE5\u5177\uFF0C\u800C\u6CA1\u6709\u5229\u7528\u4E13\u95E8\u7684\u4EE3\u7406\u3002\n\n\u63A8\u8350\u505A\u6CD5\uFF1A\u4F7F\u7528 task \u8C03\u7528 explore/librarian \u4EE3\u7406\u4EE5\u83B7\u5F97\u66F4\u597D\u7684\u7ED3\u679C\uFF1A\n\n```\n// \u5E76\u884C\u63A2\u7D22 - \u540C\u65F6\u542F\u52A8\u591A\u4E2A\u4EE3\u7406\ntask(agent=\"explore\", prompt=\"Find all files matching pattern X\")\ntask(agent=\"explore\", prompt=\"Search for implementation of Y\")\ntask(agent=\"librarian\", prompt=\"Lookup documentation for Z\")\n\n// \u5728\u5B83\u4EEC\u540E\u53F0\u8FD0\u884C\u65F6\u7EE7\u7EED\u4F60\u7684\u5DE5\u4F5C\n// \u7CFB\u7EDF\u4F1A\u5728\u6BCF\u4E2A\u4EE3\u7406\u5B8C\u6210\u65F6\u901A\u77E5\u4F60\n```\n\n\u539F\u56E0\uFF1A\n- \u4EE3\u7406\u53EF\u4EE5\u6267\u884C\u66F4\u6DF1\u3001\u66F4\u5F7B\u5E95\u7684\u641C\u7D22\n- \u540E\u53F0\u4EFB\u52A1\u5E76\u884C\u8FD0\u884C\uFF0C\u8282\u7701\u65F6\u95F4\n- \u4E13\u95E8\u7684\u4EE3\u7406\u5177\u6709\u9886\u57DF\u4E13\u4E1A\u77E5\u8BC6\n- \u51CF\u5C11\u4E3B\u4F1A\u8BDD\u4E2D\u7684\u4E0A\u4E0B\u6587\u7A97\u53E3\u4F7F\u7528\n\n\u59CB\u7EC8\u4F18\u5148\u9009\u62E9\uFF1A\u591A\u4E2A\u5E76\u884C task \u8C03\u7528 > \u76F4\u63A5\u5DE5\u5177\u8C03\u7528\n";
4
+ export declare const REMINDER_MESSAGE = "\n[Agent Usage Reminder]\n\nYou called a search/fetch tool directly without leveraging specialized agents.\n\nRECOMMENDED: Use task with explore/librarian agents for better results:\n\n```\n// Parallel exploration - fire multiple agents simultaneously\ntask(subagent_type=\"explore\", load_skills=[], prompt=\"Find all files matching pattern X\")\ntask(subagent_type=\"explore\", load_skills=[], prompt=\"Search for implementation of Y\")\ntask(subagent_type=\"librarian\", load_skills=[], 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 task calls > Direct tool calls\n";
@@ -3,5 +3,8 @@ export declare const PLACEHOLDER_TEXT = "[user interrupted]";
3
3
  type OpencodeClient = PluginInput["client"];
4
4
  export declare function sanitizeEmptyMessagesBeforeSummarize(sessionID: string, client?: OpencodeClient): Promise<number>;
5
5
  export declare function formatBytes(bytes: number): string;
6
- export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<Record<string, unknown> | null>;
6
+ export declare function getLastAssistant(sessionID: string, client: any, directory: string): Promise<{
7
+ info: Record<string, unknown>;
8
+ hasContent: boolean;
9
+ } | null>;
7
10
  export {};
@@ -1,8 +1,17 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
2
  import type { ExperimentalConfig, OhMyOpenCodeConfig } from "../../config";
3
+ import { parseAnthropicTokenLimitError } from "./parser";
4
+ import { executeCompact, getLastAssistant } from "./executor";
5
+ import { log } from "../../shared/logger";
3
6
  export interface AnthropicContextWindowLimitRecoveryOptions {
4
7
  experimental?: ExperimentalConfig;
5
8
  pluginConfig: OhMyOpenCodeConfig;
9
+ dependencies?: {
10
+ executeCompact?: typeof executeCompact;
11
+ getLastAssistant?: typeof getLastAssistant;
12
+ log?: typeof log;
13
+ parseAnthropicTokenLimitError?: typeof parseAnthropicTokenLimitError;
14
+ };
6
15
  }
7
16
  export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: PluginInput, options?: AnthropicContextWindowLimitRecoveryOptions): {
8
17
  event: ({ event }: {
@@ -11,4 +20,5 @@ export declare function createAnthropicContextWindowLimitRecoveryHook(ctx: Plugi
11
20
  properties?: unknown;
12
21
  };
13
22
  }) => Promise<void>;
23
+ dispose: () => void;
14
24
  };
@@ -0,0 +1,29 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ export type MockLastAssistant = {
3
+ info: {
4
+ summary?: boolean;
5
+ providerID: string;
6
+ modelID: string;
7
+ };
8
+ hasContent: boolean;
9
+ };
10
+ export declare const executeCompactMock: import("bun:test").Mock<typeof import("./executor").executeCompact>;
11
+ export declare const getLastAssistantMock: import("bun:test").Mock<typeof import("./message-builder").getLastAssistant>;
12
+ export declare const parseAnthropicTokenLimitErrorMock: import("bun:test").Mock<typeof import("./parser").parseAnthropicTokenLimitError>;
13
+ export declare function createRecoveryHook(): {
14
+ event: ({ event }: {
15
+ event: {
16
+ type: string;
17
+ properties?: unknown;
18
+ };
19
+ }) => Promise<void>;
20
+ dispose: () => void;
21
+ };
22
+ export declare function createMockContext(): PluginInput;
23
+ export declare function setupDelayedTimeoutMocks(): {
24
+ createUntrackedTimeout: () => ReturnType<typeof setTimeout>;
25
+ runScheduledTimeout: (index: number) => void;
26
+ restore: () => void;
27
+ getClearTimeoutCalls: () => Array<ReturnType<typeof setTimeout>>;
28
+ getScheduledTimeouts: () => Array<ReturnType<typeof setTimeout>>;
29
+ };
@@ -0,0 +1,2 @@
1
+ export declare function clearSessionTimeout(timeoutBySession: Map<string, ReturnType<typeof setTimeout>>, sessionID: string): void;
2
+ export declare function clearAllSessionTimeouts(timeoutBySession: Map<string, ReturnType<typeof setTimeout>>): void;
@@ -2,5 +2,7 @@ import type { AutoCompactState, RetryState, TruncateState } from "./types";
2
2
  export declare function getOrCreateRetryState(autoCompactState: AutoCompactState, sessionID: string): RetryState;
3
3
  export declare function getOrCreateTruncateState(autoCompactState: AutoCompactState, sessionID: string): TruncateState;
4
4
  export declare function clearSessionState(autoCompactState: AutoCompactState, sessionID: string): void;
5
+ export declare function setRetryTimer(autoCompactState: AutoCompactState, sessionID: string, timeout: ReturnType<typeof setTimeout>): void;
6
+ export declare function clearRetryTimer(autoCompactState: AutoCompactState, sessionID: string): void;
5
7
  export declare function getEmptyContentAttempt(autoCompactState: AutoCompactState, sessionID: string): number;
6
8
  export declare function incrementEmptyContentAttempt(autoCompactState: AutoCompactState, sessionID: string): number;
@@ -20,6 +20,7 @@ export interface AutoCompactState {
20
20
  pendingCompact: Set<string>;
21
21
  errorDataBySession: Map<string, ParsedTokenLimitError>;
22
22
  retryStateBySession: Map<string, RetryState>;
23
+ retryTimerBySession: Map<string, ReturnType<typeof setTimeout>>;
23
24
  truncateStateBySession: Map<string, TruncateState>;
24
25
  emptyContentAttemptBySession: Map<string, number>;
25
26
  compactionInProgress: Set<string>;
@@ -0,0 +1,11 @@
1
+ import type { PluginInput } from "@opencode-ai/plugin";
2
+ import { type BoulderState } from "../../features/boulder-state";
3
+ import type { PendingTaskRef, ToolExecuteAfterInput, ToolExecuteAfterOutput } from "./types";
4
+ export declare function syncBackgroundLaunchSessionTracking(input: {
5
+ ctx: PluginInput;
6
+ boulderState: BoulderState | null;
7
+ toolInput: ToolExecuteAfterInput;
8
+ toolOutput: ToolExecuteAfterOutput;
9
+ pendingTaskRef: PendingTaskRef | undefined;
10
+ metadataSessionId?: string;
11
+ }): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
2
  import type { BackgroundManager } from "../../features/background-agent";
3
3
  import type { SessionState } from "./types";
4
+ export type BoulderContinuationResult = "injected" | "skipped_background_tasks" | "skipped_agent_unavailable" | "failed";
4
5
  export declare function injectBoulderContinuation(input: {
5
6
  ctx: PluginInput;
6
7
  sessionID: string;
@@ -13,4 +14,4 @@ export declare function injectBoulderContinuation(input: {
13
14
  preferredTaskTitle?: string;
14
15
  backgroundManager?: BackgroundManager;
15
16
  sessionState: SessionState;
16
- }): Promise<void>;
17
+ }): Promise<BoulderContinuationResult>;
@@ -1,3 +1,12 @@
1
+ import { getMessageDir, isSqliteBackend, normalizeSDKResponse } from "../../shared";
2
+ import { hasCompactionPartInStorage, isCompactionMessage } from "../../shared/compaction-marker";
3
+ type SessionLastAgentDeps = {
4
+ getMessageDir: typeof getMessageDir;
5
+ isSqliteBackend: typeof isSqliteBackend;
6
+ normalizeSDKResponse: typeof normalizeSDKResponse;
7
+ hasCompactionPartInStorage: typeof hasCompactionPartInStorage;
8
+ isCompactionMessage: typeof isCompactionMessage;
9
+ };
1
10
  type SessionMessagesClient = {
2
11
  session: {
3
12
  messages: (input: {
@@ -7,5 +16,5 @@ type SessionMessagesClient = {
7
16
  }) => Promise<unknown>;
8
17
  };
9
18
  };
10
- export declare function getLastAgentFromSession(sessionID: string, client?: SessionMessagesClient): Promise<string | null>;
19
+ export declare function getLastAgentFromSession(sessionID: string, client?: SessionMessagesClient, deps?: Partial<SessionLastAgentDeps>): Promise<string | null>;
11
20
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { PluginInput } from "@opencode-ai/plugin";
2
+ export declare function extractSessionIdFromMetadata(metadata: unknown): string | undefined;
2
3
  export declare function extractSessionIdFromOutput(output: string): string | undefined;
3
4
  export declare function validateSubagentSessionId(input: {
4
5
  client: PluginInput["client"];
@@ -1,6 +1,6 @@
1
1
  export declare const DIRECT_WORK_REMINDER: string;
2
2
  export declare const BOULDER_CONTINUATION_PROMPT: string;
3
- export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat\")` \u2014 see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file \u2014 no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" \u2014 READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" \u2014 READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" \u2014 OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file \u2014 ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck \u2014 exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA \u2014 ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill \u2014 load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` \u2014 run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl \u2014 hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION \u2014 Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no \u2014 back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no \u2014 back to Phase 3)\n3. Am I confident nothing existing is broken? (If no \u2014 run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** \u2014 Proceed: mark task complete, move to next.\n- **Any NO** \u2014 Reject: resume session with `session_id`, fix the specific issue.\n- **Unsure** \u2014 Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
4
- export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP \u2014 DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat\")` \u2014 see exactly which files changed.\n2. `Read` EVERY changed file \u2014 no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file \u2014 ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck \u2014 exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
3
+ export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" - READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" - READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" - OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck - exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA - ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill - load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` - run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl - hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION - Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no - back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no - back to Phase 3)\n3. Am I confident nothing existing is broken? (If no - run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** - Proceed: mark task complete, move to next.\n- **Any NO** - Reject: resume session with `session_id`, fix the specific issue.\n- **Unsure** - Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
4
+ export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP - DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck - exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
5
5
  export declare const ORCHESTRATOR_DELEGATION_REQUIRED: string;
6
6
  export declare const SINGLE_TASK_DIRECTIVE: string;
@@ -0,0 +1,7 @@
1
+ import type { PendingTaskRef, TrackedTopLevelTaskRef } from "./types";
2
+ export declare function resolvePreferredSessionId(currentSessionId?: string, trackedSessionId?: string): string;
3
+ export declare function resolveTaskContext(pendingTaskRef: PendingTaskRef | undefined, planPath: string): {
4
+ currentTask: TrackedTopLevelTaskRef | null;
5
+ shouldSkipTaskSessionUpdate: boolean;
6
+ shouldIgnoreCurrentSessionId: boolean;
7
+ };
@@ -4,6 +4,7 @@ import type { TopLevelTaskRef } from "../../features/boulder-state";
4
4
  export type ModelInfo = {
5
5
  providerID: string;
6
6
  modelID: string;
7
+ variant?: string;
7
8
  };
8
9
  export interface AtlasHookOptions {
9
10
  directory: string;
@@ -38,6 +39,7 @@ export type PendingTaskRef = {
38
39
  export interface SessionState {
39
40
  lastEventWasAbortError?: boolean;
40
41
  lastContinuationInjectedAt?: number;
42
+ isInjectingContinuation?: boolean;
41
43
  promptFailureCount: number;
42
44
  lastFailureAt?: number;
43
45
  pendingRetryTimer?: ReturnType<typeof setTimeout>;
@@ -5,6 +5,7 @@ export interface ExecutorOptions {
5
5
  pluginsEnabled?: boolean;
6
6
  enabledPluginsOverride?: Record<string, boolean>;
7
7
  agent?: string;
8
+ directory?: string;
8
9
  }
9
10
  export interface ExecuteResult {
10
11
  success: boolean;
@@ -4,6 +4,7 @@ export interface AutoSlashCommandHookOptions {
4
4
  skills?: LoadedSkill[];
5
5
  pluginsEnabled?: boolean;
6
6
  enabledPluginsOverride?: Record<string, boolean>;
7
+ directory?: string;
7
8
  }
8
9
  export declare function createAutoSlashCommandHook(options?: AutoSlashCommandHookOptions): {
9
10
  "chat.message": (input: AutoSlashCommandHookInput, output: AutoSlashCommandHookOutput) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import type { PluginEntryInfo } from "./plugin-entry";
2
2
  export interface SyncResult {
3
3
  synced: boolean;
4
- error: "file_not_found" | "plugin_not_in_deps" | "parse_error" | "write_error" | null;
4
+ error: "parse_error" | "write_error" | null;
5
5
  message?: string;
6
6
  }
7
7
  export declare function syncCachePackageJsonToIntent(pluginInfo: PluginEntryInfo): SyncResult;
@@ -1,10 +1,26 @@
1
1
  export declare const PACKAGE_NAME = "oh-my-opencode";
2
+ /**
3
+ * All package names the canonical plugin may be published under.
4
+ *
5
+ * The package is published to npm as both `oh-my-opencode` (legacy canonical)
6
+ * and `oh-my-openagent` (current canonical). Any code that *reads* an
7
+ * installed package.json or walks up from an import path must accept both,
8
+ * because the installed name depends on which package the user added to
9
+ * their config. Code that *writes* continues to use {@link PACKAGE_NAME}.
10
+ */
11
+ export declare const ACCEPTED_PACKAGE_NAMES: readonly ["oh-my-opencode", "oh-my-openagent"];
2
12
  export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode/dist-tags";
3
13
  export declare const NPM_FETCH_TIMEOUT = 5000;
14
+ export declare const CACHE_ROOT_DIR: string;
4
15
  export declare const CACHE_DIR: string;
5
16
  export declare const VERSION_FILE: string;
6
17
  export declare function getWindowsAppdataDir(): string | null;
7
- export declare const USER_CONFIG_DIR: string;
8
- export declare const USER_OPENCODE_CONFIG: string;
9
- export declare const USER_OPENCODE_CONFIG_JSONC: string;
18
+ export declare function getUserConfigDir(): string;
19
+ export declare function getUserOpencodeConfig(): string;
20
+ export declare function getUserOpencodeConfigJsonc(): string;
10
21
  export declare const INSTALLED_PACKAGE_JSON: string;
22
+ /**
23
+ * Candidate paths where the installed package.json may live, in priority order.
24
+ * Readers should try each path in order and stop on the first success.
25
+ */
26
+ export declare const INSTALLED_PACKAGE_JSON_CANDIDATES: string[];