oh-my-opencode 3.13.1 → 3.15.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 (256) hide show
  1. package/README.ja.md +2 -2
  2. package/README.ko.md +2 -2
  3. package/README.md +16 -8
  4. package/README.ru.md +2 -2
  5. package/README.zh-cn.md +2 -2
  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/gemini.d.ts +0 -9
  14. package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -0
  15. package/dist/agents/atlas/gpt.d.ts +0 -9
  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 +10 -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/hephaestus/agent.d.ts +1 -1
  24. package/dist/agents/hephaestus/gpt-5-3-codex.d.ts +1 -1
  25. package/dist/agents/hephaestus/gpt.d.ts +1 -1
  26. package/dist/agents/momus.d.ts +2 -2
  27. package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
  28. package/dist/agents/prometheus/identity-constraints.d.ts +1 -1
  29. package/dist/agents/prometheus/plan-generation.d.ts +1 -1
  30. package/dist/agents/prometheus/plan-template.d.ts +1 -1
  31. package/dist/agents/sisyphus/gpt-5-4.d.ts +14 -14
  32. package/dist/agents/sisyphus/index.d.ts +1 -1
  33. package/dist/agents/sisyphus.d.ts +1 -1
  34. package/dist/agents/types.d.ts +3 -1
  35. package/dist/cli/doctor/checks/model-resolution-types.d.ts +3 -0
  36. package/dist/cli/doctor/checks/model-resolution.d.ts +2 -1
  37. package/dist/cli/doctor/constants.d.ts +1 -1
  38. package/dist/cli/index.js +42241 -390
  39. package/dist/cli/mcp-oauth/login.d.ts +6 -1
  40. package/dist/cli/refresh-model-capabilities.d.ts +15 -0
  41. package/dist/cli/run/event-state.d.ts +0 -2
  42. package/dist/cli/run/types.d.ts +0 -1
  43. package/dist/config/index.d.ts +1 -1
  44. package/dist/config/schema/agent-names.d.ts +2 -0
  45. package/dist/config/schema/agent-overrides.d.ts +675 -15
  46. package/dist/config/schema/background-task.d.ts +2 -0
  47. package/dist/config/schema/categories.d.ts +90 -2
  48. package/dist/config/schema/commands.d.ts +1 -0
  49. package/dist/config/schema/dynamic-context-pruning.d.ts +1 -1
  50. package/dist/config/schema/experimental.d.ts +2 -1
  51. package/dist/config/schema/fallback-models.d.ts +111 -1
  52. package/dist/config/schema/hooks.d.ts +3 -0
  53. package/dist/config/schema/model-capabilities.d.ts +8 -0
  54. package/dist/config/schema/oh-my-opencode-config.d.ts +696 -17
  55. package/dist/config/schema/sisyphus-agent.d.ts +1 -0
  56. package/dist/config/schema/tmux.d.ts +11 -0
  57. package/dist/config/schema.d.ts +1 -0
  58. package/dist/create-hooks.d.ts +6 -0
  59. package/dist/create-runtime-tmux-config.d.ts +9 -0
  60. package/dist/features/background-agent/abort-with-timeout.d.ts +2 -0
  61. package/dist/features/background-agent/background-task-notification-template.d.ts +10 -4
  62. package/dist/features/background-agent/constants.d.ts +1 -0
  63. package/dist/features/background-agent/fallback-retry-handler.d.ts +1 -1
  64. package/dist/features/background-agent/manager.d.ts +10 -0
  65. package/dist/features/background-agent/process-cleanup.d.ts +1 -1
  66. package/dist/features/background-agent/session-existence.d.ts +3 -0
  67. package/dist/features/background-agent/task-poller.d.ts +1 -0
  68. package/dist/features/background-agent/types.d.ts +5 -10
  69. package/dist/features/builtin-commands/commands.d.ts +4 -1
  70. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  71. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  72. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -0
  73. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  74. package/dist/features/builtin-commands/types.d.ts +1 -1
  75. package/dist/features/builtin-skills/skills/ai-slop-remover.d.ts +2 -0
  76. package/dist/features/builtin-skills/skills/git-master-sections/commit-workflow.d.ts +1 -0
  77. package/dist/features/builtin-skills/skills/git-master-sections/history-search-workflow.d.ts +1 -0
  78. package/dist/features/builtin-skills/skills/git-master-sections/overview.d.ts +1 -0
  79. package/dist/features/builtin-skills/skills/git-master-sections/quick-reference.d.ts +1 -0
  80. package/dist/features/builtin-skills/skills/git-master-sections/rebase-workflow.d.ts +1 -0
  81. package/dist/features/builtin-skills/skills/index.d.ts +2 -0
  82. package/dist/features/builtin-skills/skills/playwright-cli.d.ts +1 -1
  83. package/dist/features/builtin-skills/skills/review-work.d.ts +2 -0
  84. package/dist/features/claude-code-mcp-loader/configure-allowed-env-vars.d.ts +5 -0
  85. package/dist/features/claude-code-mcp-loader/index.d.ts +1 -0
  86. package/dist/features/claude-code-mcp-loader/scope-filter.d.ts +2 -0
  87. package/dist/features/claude-code-mcp-loader/types.d.ts +8 -4
  88. package/dist/features/claude-code-session-state/state.d.ts +2 -0
  89. package/dist/features/context-injector/collector.d.ts +1 -0
  90. package/dist/features/opencode-skill-loader/async-loader.d.ts +2 -2
  91. package/dist/features/opencode-skill-loader/loader.d.ts +2 -0
  92. package/dist/features/skill-mcp-manager/manager.d.ts +4 -1
  93. package/dist/features/skill-mcp-manager/oauth-handler.d.ts +5 -4
  94. package/dist/features/skill-mcp-manager/types.d.ts +7 -0
  95. package/dist/features/tmux-subagent/manager.d.ts +15 -13
  96. package/dist/features/tmux-subagent/polling-manager.d.ts +5 -0
  97. package/dist/features/tmux-subagent/types.d.ts +2 -0
  98. package/dist/hooks/agent-usage-reminder/constants.d.ts +1 -1
  99. package/dist/hooks/anthropic-context-window-limit-recovery/message-builder.d.ts +4 -1
  100. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.d.ts +10 -0
  101. package/dist/hooks/anthropic-context-window-limit-recovery/recovery-hook.test-support.d.ts +29 -0
  102. package/dist/hooks/anthropic-context-window-limit-recovery/session-timeout-map.d.ts +2 -0
  103. package/dist/hooks/anthropic-context-window-limit-recovery/state.d.ts +2 -0
  104. package/dist/hooks/anthropic-context-window-limit-recovery/types.d.ts +1 -0
  105. package/dist/hooks/atlas/subagent-session-id.d.ts +1 -0
  106. package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
  107. package/dist/hooks/auto-slash-command/executor.d.ts +1 -0
  108. package/dist/hooks/auto-slash-command/hook.d.ts +1 -0
  109. package/dist/hooks/auto-update-checker/hook/background-update-check.d.ts +29 -1
  110. package/dist/hooks/auto-update-checker/hook/model-capabilities-status.d.ts +2 -0
  111. package/dist/hooks/auto-update-checker/types.d.ts +2 -0
  112. package/dist/hooks/bash-file-read-guard.d.ts +2 -0
  113. package/dist/hooks/claude-code-hooks/claude-code-hooks-hook.d.ts +1 -0
  114. package/dist/hooks/claude-code-hooks/config-loader.d.ts +1 -0
  115. package/dist/hooks/claude-code-hooks/config.d.ts +1 -0
  116. package/dist/hooks/claude-code-hooks/handlers/session-event-handler.d.ts +3 -1
  117. package/dist/hooks/claude-code-hooks/session-hook-state.d.ts +1 -0
  118. package/dist/hooks/claude-code-hooks/tool-input-cache.d.ts +2 -0
  119. package/dist/hooks/claude-code-hooks/transcript.d.ts +1 -3
  120. package/dist/hooks/comment-checker/hook.d.ts +1 -0
  121. package/dist/hooks/comment-checker/pending-calls.d.ts +1 -0
  122. package/dist/hooks/index.d.ts +3 -0
  123. package/dist/hooks/keyword-detector/ultrawork/default.d.ts +1 -1
  124. package/dist/hooks/keyword-detector/ultrawork/gemini.d.ts +1 -1
  125. package/dist/hooks/keyword-detector/ultrawork/gpt.d.ts +1 -1
  126. package/dist/hooks/legacy-plugin-toast/auto-migrate-runner.d.ts +2 -0
  127. package/dist/hooks/legacy-plugin-toast/auto-migrate.d.ts +7 -0
  128. package/dist/hooks/legacy-plugin-toast/hook.d.ts +18 -0
  129. package/dist/hooks/legacy-plugin-toast/index.d.ts +1 -0
  130. package/dist/hooks/legacy-plugin-toast/plugin-entry-migrator.d.ts +1 -0
  131. package/dist/hooks/model-fallback/chat-message-fallback-handler.d.ts +23 -0
  132. package/dist/hooks/model-fallback/hook.d.ts +5 -0
  133. package/dist/hooks/model-fallback/next-fallback.d.ts +6 -0
  134. package/dist/hooks/ralph-loop/completion-promise-detector-test-input.d.ts +11 -0
  135. package/dist/hooks/rules-injector/constants.d.ts +1 -0
  136. package/dist/hooks/rules-injector/finder.d.ts +1 -1
  137. package/dist/hooks/rules-injector/hook.d.ts +2 -0
  138. package/dist/hooks/rules-injector/injector.d.ts +2 -0
  139. package/dist/hooks/rules-injector/rule-file-finder.d.ts +9 -1
  140. package/dist/hooks/runtime-fallback/fallback-models.d.ts +12 -0
  141. package/dist/hooks/runtime-fallback/retry-model-payload.d.ts +5 -1
  142. package/dist/hooks/start-work/context-info-builder.d.ts +12 -0
  143. package/dist/hooks/start-work/start-work-hook.d.ts +7 -0
  144. package/dist/hooks/start-work/worktree-block.d.ts +1 -0
  145. package/dist/hooks/todo-continuation-enforcer/resolve-message-info.d.ts +2 -2
  146. package/dist/hooks/todo-continuation-enforcer/types.d.ts +4 -0
  147. package/dist/hooks/todo-description-override/description.d.ts +1 -1
  148. package/dist/hooks/tool-pair-validator/hook.d.ts +28 -0
  149. package/dist/hooks/tool-pair-validator/index.d.ts +1 -0
  150. package/dist/hooks/write-existing-file-guard/hook.d.ts +12 -0
  151. package/dist/hooks/write-existing-file-guard/session-read-permissions.d.ts +3 -0
  152. package/dist/hooks/write-existing-file-guard/tool-execute-before-handler.d.ts +15 -0
  153. package/dist/index.js +112232 -65637
  154. package/dist/mcp/websearch.d.ts +2 -2
  155. package/dist/oh-my-opencode.schema.json +2034 -4
  156. package/dist/openclaw/dispatcher.d.ts +6 -0
  157. package/dist/plugin/chat-params.d.ts +1 -0
  158. package/dist/plugin/command-execute-before.d.ts +17 -0
  159. package/dist/plugin/hooks/create-core-hooks.d.ts +3 -0
  160. package/dist/plugin/hooks/create-session-hooks.d.ts +2 -1
  161. package/dist/plugin/hooks/create-tool-guard-hooks.d.ts +2 -1
  162. package/dist/plugin/hooks/create-transform-hooks.d.ts +2 -1
  163. package/dist/plugin/tool-registry.d.ts +1 -0
  164. package/dist/plugin/types.d.ts +1 -0
  165. package/dist/plugin-dispose.d.ts +3 -0
  166. package/dist/shared/agent-display-names.d.ts +8 -0
  167. package/dist/shared/archive-entry-validator.d.ts +6 -0
  168. package/dist/shared/background-output-consumption.d.ts +5 -0
  169. package/dist/shared/connected-providers-cache.d.ts +22 -6
  170. package/dist/shared/contains-path.d.ts +2 -0
  171. package/dist/shared/external-plugin-detector.d.ts +14 -0
  172. package/dist/shared/fallback-chain-from-models.d.ts +10 -1
  173. package/dist/shared/index.d.ts +10 -1
  174. package/dist/shared/is-abort-error.d.ts +1 -0
  175. package/dist/shared/json-file-cache-store.d.ts +16 -0
  176. package/dist/shared/jsonc-parser.d.ts +1 -0
  177. package/dist/shared/known-variants.d.ts +6 -0
  178. package/dist/shared/legacy-plugin-warning.d.ts +7 -0
  179. package/dist/shared/load-opencode-plugins.d.ts +1 -0
  180. package/dist/shared/log-legacy-plugin-startup-warning.d.ts +10 -0
  181. package/dist/shared/migrate-legacy-config-file.d.ts +1 -0
  182. package/dist/shared/migrate-legacy-plugin-entry.d.ts +1 -0
  183. package/dist/shared/model-capabilities/bundled-snapshot.d.ts +2 -0
  184. package/dist/shared/model-capabilities/get-model-capabilities.d.ts +2 -0
  185. package/dist/shared/model-capabilities/index.d.ts +3 -0
  186. package/dist/shared/model-capabilities/runtime-model-readers.d.ts +11 -0
  187. package/dist/shared/model-capabilities/types.d.ts +94 -0
  188. package/dist/shared/model-capabilities-cache.d.ts +20 -0
  189. package/dist/shared/model-capability-aliases.d.ts +21 -0
  190. package/dist/shared/model-capability-guardrails.d.ts +38 -0
  191. package/dist/shared/model-capability-heuristics.d.ts +10 -0
  192. package/dist/shared/model-requirements.d.ts +8 -0
  193. package/dist/shared/model-resolution-types.d.ts +13 -0
  194. package/dist/shared/model-resolver.d.ts +10 -3
  195. package/dist/shared/model-settings-compatibility.d.ts +40 -0
  196. package/dist/shared/model-suggestion-retry.d.ts +0 -9
  197. package/dist/shared/plugin-entry-migrator.d.ts +3 -0
  198. package/dist/shared/plugin-identity.d.ts +4 -3
  199. package/dist/shared/project-discovery-dirs.d.ts +4 -0
  200. package/dist/shared/session-category-registry.d.ts +0 -24
  201. package/dist/shared/session-cursor.d.ts +6 -0
  202. package/dist/shared/session-prompt-params-helpers.d.ts +12 -0
  203. package/dist/shared/session-prompt-params-state.d.ts +9 -0
  204. package/dist/shared/skill-path-resolver.d.ts +0 -8
  205. package/dist/shared/task-system-enabled.d.ts +6 -0
  206. package/dist/shared/tmux/tmux-utils/server-health.d.ts +1 -0
  207. package/dist/shared/tmux/tmux-utils/session-spawn.d.ts +3 -0
  208. package/dist/shared/tmux/tmux-utils/window-spawn.d.ts +3 -0
  209. package/dist/shared/tmux/tmux-utils.d.ts +3 -1
  210. package/dist/shared/write-file-atomically.d.ts +1 -0
  211. package/dist/shared/zip-entry-listing/powershell-zip-entry-listing.d.ts +4 -0
  212. package/dist/shared/zip-entry-listing/python-zip-entry-listing.d.ts +3 -0
  213. package/dist/shared/zip-entry-listing/read-zip-symlink-target.d.ts +1 -0
  214. package/dist/shared/zip-entry-listing/tar-zip-entry-listing.d.ts +3 -0
  215. package/dist/shared/zip-entry-listing/zipinfo-zip-entry-listing.d.ts +4 -0
  216. package/dist/shared/zip-entry-listing.d.ts +4 -0
  217. package/dist/tools/call-omo-agent/background-executor.d.ts +2 -1
  218. package/dist/tools/call-omo-agent/sync-executor.d.ts +2 -1
  219. package/dist/tools/delegate-task/anthropic-categories.d.ts +2 -0
  220. package/dist/tools/delegate-task/background-task.d.ts +2 -6
  221. package/dist/tools/delegate-task/builtin-categories.d.ts +4 -0
  222. package/dist/tools/delegate-task/builtin-category-definition.d.ts +7 -0
  223. package/dist/tools/delegate-task/category-resolver.d.ts +2 -5
  224. package/dist/tools/delegate-task/constants.d.ts +1 -12
  225. package/dist/tools/delegate-task/executor-types.d.ts +2 -1
  226. package/dist/tools/delegate-task/google-categories.d.ts +2 -0
  227. package/dist/tools/delegate-task/kimi-categories.d.ts +2 -0
  228. package/dist/tools/delegate-task/model-selection.d.ts +2 -0
  229. package/dist/tools/delegate-task/openai-categories.d.ts +2 -0
  230. package/dist/tools/delegate-task/prompt-builder.d.ts +1 -1
  231. package/dist/tools/delegate-task/subagent-resolver.d.ts +3 -6
  232. package/dist/tools/delegate-task/sync-prompt-sender.d.ts +4 -6
  233. package/dist/tools/delegate-task/sync-session-poller.d.ts +1 -0
  234. package/dist/tools/delegate-task/sync-task.d.ts +2 -6
  235. package/dist/tools/delegate-task/types.d.ts +5 -6
  236. package/dist/tools/delegate-task/unstable-agent-task.d.ts +2 -6
  237. package/dist/tools/grep/cli.d.ts +3 -2
  238. package/dist/tools/grep/constants.d.ts +1 -2
  239. package/dist/tools/hashline-edit/tool-description.d.ts +1 -1
  240. package/dist/tools/look-at/constants.d.ts +1 -1
  241. package/dist/tools/lsp/infer-extension.d.ts +1 -0
  242. package/dist/tools/session-manager/file-storage.d.ts +8 -0
  243. package/dist/tools/session-manager/sdk-storage.d.ts +8 -0
  244. package/dist/tools/session-manager/sdk-unavailable.d.ts +1 -0
  245. package/dist/tools/session-manager/storage.d.ts +1 -1
  246. package/dist/tools/skill/description-formatter.d.ts +3 -0
  247. package/dist/tools/skill/mcp-capability-formatter.d.ts +3 -0
  248. package/dist/tools/skill/native-skills.d.ts +12 -0
  249. package/dist/tools/skill/scope-priority.d.ts +4 -0
  250. package/dist/tools/skill/skill-body.d.ts +2 -0
  251. package/dist/tools/skill/skill-matcher.d.ts +5 -0
  252. package/dist/tools/skill/types.d.ts +30 -2
  253. package/dist/tools/skill-mcp/tools.d.ts +1 -1
  254. package/package.json +16 -14
  255. package/postinstall.mjs +12 -0
  256. package/dist/hooks/openclaw.d.ts +0 -11
@@ -14,3 +14,9 @@ export declare function wakeCommandGateway(gatewayName: string, gatewayConfig: O
14
14
  success: boolean;
15
15
  error?: string;
16
16
  }>;
17
+ type KillableProcess = {
18
+ pid?: number;
19
+ kill: (signal?: NodeJS.Signals) => void;
20
+ };
21
+ export declare function terminateCommandProcess(proc: KillableProcess, signal: NodeJS.Signals): void;
22
+ export {};
@@ -27,5 +27,6 @@ export declare function createChatParamsHandler(args: {
27
27
  anthropicEffort: {
28
28
  "chat.params"?: (input: ChatParamsHookInput, output: ChatParamsOutput) => Promise<void>;
29
29
  } | null;
30
+ client?: unknown;
30
31
  }): (input: unknown, output: unknown) => Promise<void>;
31
32
  export {};
@@ -0,0 +1,17 @@
1
+ import type { CreatedHooks } from "../create-hooks";
2
+ type CommandExecuteBeforeInput = {
3
+ command: string;
4
+ sessionID: string;
5
+ arguments: string;
6
+ };
7
+ type CommandExecuteBeforeOutput = {
8
+ parts: Array<{
9
+ type: string;
10
+ text?: string;
11
+ [key: string]: unknown;
12
+ }>;
13
+ };
14
+ export declare function createCommandExecuteBeforeHandler(args: {
15
+ hooks: CreatedHooks;
16
+ }): (input: CommandExecuteBeforeInput, output: CommandExecuteBeforeOutput) => Promise<void>;
17
+ export {};
@@ -12,6 +12,7 @@ export declare function createCoreHooks(args: {
12
12
  keywordDetector: ReturnType<typeof import("../../hooks").createKeywordDetectorHook> | null;
13
13
  contextInjectorMessagesTransform: ReturnType<typeof import("../../features/context-injector").createContextInjectorMessagesTransformHook>;
14
14
  thinkingBlockValidator: ReturnType<typeof import("../../hooks").createThinkingBlockValidatorHook> | null;
15
+ toolPairValidator: ReturnType<typeof import("../../hooks").createToolPairValidatorHook> | null;
15
16
  commentChecker: ReturnType<typeof import("../../hooks").createCommentCheckerHooks> | null;
16
17
  toolOutputTruncator: ReturnType<typeof import("../../hooks").createToolOutputTruncatorHook> | null;
17
18
  directoryAgentsInjector: ReturnType<typeof import("../../hooks").createDirectoryAgentsInjectorHook> | null;
@@ -20,6 +21,7 @@ export declare function createCoreHooks(args: {
20
21
  rulesInjector: ReturnType<typeof import("../../hooks").createRulesInjectorHook> | null;
21
22
  tasksTodowriteDisabler: ReturnType<typeof import("../../hooks").createTasksTodowriteDisablerHook> | null;
22
23
  writeExistingFileGuard: ReturnType<typeof import("../../hooks").createWriteExistingFileGuardHook> | null;
24
+ bashFileReadGuard: ReturnType<typeof import("../../hooks").createBashFileReadGuardHook> | null;
23
25
  hashlineReadEnhancer: ReturnType<typeof import("../../hooks").createHashlineReadEnhancerHook> | null;
24
26
  jsonErrorRecovery: ReturnType<typeof import("../../hooks").createJsonErrorRecoveryHook> | null;
25
27
  readImageResizer: ReturnType<typeof import("../../hooks").createReadImageResizerHook> | null;
@@ -48,4 +50,5 @@ export declare function createCoreHooks(args: {
48
50
  taskResumeInfo: ReturnType<typeof import("../../hooks").createTaskResumeInfoHook> | null;
49
51
  anthropicEffort: ReturnType<typeof import("../../hooks/anthropic-effort").createAnthropicEffortHook> | null;
50
52
  runtimeFallback: ReturnType<typeof import("../../hooks").createRuntimeFallbackHook> | null;
53
+ legacyPluginToast: ReturnType<typeof import("../../hooks").createLegacyPluginToastHook> | null;
51
54
  };
@@ -1,7 +1,7 @@
1
1
  import type { OhMyOpenCodeConfig, HookName } from "../../config";
2
2
  import type { ModelCacheState } from "../../plugin-state";
3
3
  import type { PluginContext } from "../types";
4
- import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook } from "../../hooks";
4
+ import { createContextWindowMonitorHook, createSessionRecoveryHook, createSessionNotification, createThinkModeHook, createModelFallbackHook, createAnthropicContextWindowLimitRecoveryHook, createAutoUpdateCheckerHook, createAgentUsageReminderHook, createNonInteractiveEnvHook, createInteractiveBashSessionHook, createRalphLoopHook, createEditErrorRecoveryHook, createDelegateTaskRetryHook, createTaskResumeInfoHook, createStartWorkHook, createPrometheusMdOnlyHook, createSisyphusJuniorNotepadHook, createNoSisyphusGptHook, createNoHephaestusNonGptHook, createQuestionLabelTruncatorHook, createPreemptiveCompactionHook, createRuntimeFallbackHook, createLegacyPluginToastHook } from "../../hooks";
5
5
  import { createAnthropicEffortHook } from "../../hooks/anthropic-effort";
6
6
  export type SessionHooks = {
7
7
  contextWindowMonitor: ReturnType<typeof createContextWindowMonitorHook> | null;
@@ -27,6 +27,7 @@ export type SessionHooks = {
27
27
  taskResumeInfo: ReturnType<typeof createTaskResumeInfoHook> | null;
28
28
  anthropicEffort: ReturnType<typeof createAnthropicEffortHook> | null;
29
29
  runtimeFallback: ReturnType<typeof createRuntimeFallbackHook> | null;
30
+ legacyPluginToast: ReturnType<typeof createLegacyPluginToastHook> | null;
30
31
  };
31
32
  export declare function createSessionHooks(args: {
32
33
  ctx: PluginContext;
@@ -1,7 +1,7 @@
1
1
  import type { HookName, OhMyOpenCodeConfig } from "../../config";
2
2
  import type { ModelCacheState } from "../../plugin-state";
3
3
  import type { PluginContext } from "../types";
4
- import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook, createWebFetchRedirectGuardHook } from "../../hooks";
4
+ import { createCommentCheckerHooks, createToolOutputTruncatorHook, createDirectoryAgentsInjectorHook, createDirectoryReadmeInjectorHook, createEmptyTaskResponseDetectorHook, createRulesInjectorHook, createTasksTodowriteDisablerHook, createWriteExistingFileGuardHook, createBashFileReadGuardHook, createHashlineReadEnhancerHook, createReadImageResizerHook, createJsonErrorRecoveryHook, createTodoDescriptionOverrideHook, createWebFetchRedirectGuardHook } from "../../hooks";
5
5
  export type ToolGuardHooks = {
6
6
  commentChecker: ReturnType<typeof createCommentCheckerHooks> | null;
7
7
  toolOutputTruncator: ReturnType<typeof createToolOutputTruncatorHook> | null;
@@ -11,6 +11,7 @@ export type ToolGuardHooks = {
11
11
  rulesInjector: ReturnType<typeof createRulesInjectorHook> | null;
12
12
  tasksTodowriteDisabler: ReturnType<typeof createTasksTodowriteDisablerHook> | null;
13
13
  writeExistingFileGuard: ReturnType<typeof createWriteExistingFileGuardHook> | null;
14
+ bashFileReadGuard: ReturnType<typeof createBashFileReadGuardHook> | null;
14
15
  hashlineReadEnhancer: ReturnType<typeof createHashlineReadEnhancerHook> | null;
15
16
  jsonErrorRecovery: ReturnType<typeof createJsonErrorRecoveryHook> | null;
16
17
  readImageResizer: ReturnType<typeof createReadImageResizerHook> | null;
@@ -1,12 +1,13 @@
1
1
  import type { OhMyOpenCodeConfig } from "../../config";
2
2
  import type { PluginContext } from "../types";
3
- import { createClaudeCodeHooksHook, createKeywordDetectorHook, createThinkingBlockValidatorHook } from "../../hooks";
3
+ import { createClaudeCodeHooksHook, createKeywordDetectorHook, createThinkingBlockValidatorHook, createToolPairValidatorHook } from "../../hooks";
4
4
  import { createContextInjectorMessagesTransformHook } from "../../features/context-injector";
5
5
  export type TransformHooks = {
6
6
  claudeCodeHooks: ReturnType<typeof createClaudeCodeHooksHook> | null;
7
7
  keywordDetector: ReturnType<typeof createKeywordDetectorHook> | null;
8
8
  contextInjectorMessagesTransform: ReturnType<typeof createContextInjectorMessagesTransformHook>;
9
9
  thinkingBlockValidator: ReturnType<typeof createThinkingBlockValidatorHook> | null;
10
+ toolPairValidator: ReturnType<typeof createToolPairValidatorHook> | null;
10
11
  };
11
12
  export declare function createTransformHooks(args: {
12
13
  ctx: PluginContext;
@@ -7,6 +7,7 @@ export type ToolRegistryResult = {
7
7
  filteredTools: ToolsRecord;
8
8
  taskSystemEnabled: boolean;
9
9
  };
10
+ export declare function trimToolsToCap(filteredTools: ToolsRecord, maxTools: number): void;
10
11
  export declare function createToolRegistry(args: {
11
12
  ctx: PluginContext;
12
13
  pluginConfig: OhMyOpenCodeConfig;
@@ -14,5 +14,6 @@ export type TmuxConfig = {
14
14
  main_pane_size: number;
15
15
  main_pane_min_width: number;
16
16
  agent_pane_min_width: number;
17
+ isolation: "inline" | "window" | "session";
17
18
  };
18
19
  export {};
@@ -6,5 +6,8 @@ export declare function createPluginDispose(args: {
6
6
  skillMcpManager: {
7
7
  disconnectAll: () => Promise<void>;
8
8
  };
9
+ lspManager: {
10
+ stopAll: () => Promise<void>;
11
+ };
9
12
  disposeHooks: () => void;
10
13
  }): PluginDispose;
@@ -10,8 +10,16 @@ export declare const AGENT_DISPLAY_NAMES: Record<string, string>;
10
10
  * Returns original key if not found.
11
11
  */
12
12
  export declare function getAgentDisplayName(configKey: string): string;
13
+ export declare function getAgentListDisplayName(configKey: string): string;
13
14
  /**
14
15
  * Resolve an agent name (display name or config key) to its lowercase config key.
15
16
  * "Atlas (Plan Executor)" → "atlas", "atlas" → "atlas", "unknown" → "unknown"
16
17
  */
17
18
  export declare function getAgentConfigKey(agentName: string): string;
19
+ /**
20
+ * Normalize an agent name for prompt APIs.
21
+ * - Known display names -> canonical display names
22
+ * - Known config keys (any case) -> canonical display names
23
+ * - Unknown/custom names -> preserved as-is (trimmed)
24
+ */
25
+ export declare function normalizeAgentForPrompt(agentName: string | undefined): string | undefined;
@@ -0,0 +1,6 @@
1
+ export type ArchiveEntry = {
2
+ path: string;
3
+ type: "file" | "directory" | "symlink" | "hardlink";
4
+ linkPath?: string;
5
+ };
6
+ export declare function validateArchiveEntries(entries: ArchiveEntry[], destDir: string): void;
@@ -0,0 +1,5 @@
1
+ export declare function recordBackgroundOutputConsumption(parentSessionID: string | undefined, parentMessageID: string | undefined, taskSessionID: string | undefined): void;
2
+ export declare function restoreBackgroundOutputConsumption(parentSessionID: string | undefined, parentMessageID: string | undefined): void;
3
+ export declare function clearBackgroundOutputConsumptionsForParentSession(sessionID: string | undefined): void;
4
+ export declare function clearBackgroundOutputConsumptionsForTaskSession(taskSessionID: string | undefined): void;
5
+ export declare function clearBackgroundOutputConsumptionState(): void;
@@ -1,11 +1,26 @@
1
- interface ModelMetadata {
1
+ export interface ModelMetadata {
2
2
  id: string;
3
3
  provider?: string;
4
4
  context?: number;
5
5
  output?: number;
6
6
  name?: string;
7
+ variants?: Record<string, unknown>;
8
+ limit?: {
9
+ context?: number;
10
+ input?: number;
11
+ output?: number;
12
+ };
13
+ modalities?: {
14
+ input?: string[];
15
+ output?: string[];
16
+ };
17
+ capabilities?: Record<string, unknown>;
18
+ reasoning?: boolean;
19
+ temperature?: boolean;
20
+ tool_call?: boolean;
21
+ [key: string]: unknown;
7
22
  }
8
- interface ProviderModelsCache {
23
+ export interface ProviderModelsCache {
9
24
  models: Record<string, string[] | ModelMetadata[]>;
10
25
  connected: string[];
11
26
  updatedAt: string;
@@ -16,7 +31,7 @@ export declare function createConnectedProvidersCacheStore(getCacheDir?: () => s
16
31
  readProviderModelsCache: () => ProviderModelsCache | null;
17
32
  hasProviderModelsCache: () => boolean;
18
33
  writeProviderModelsCache: (data: {
19
- models: Record<string, string[]>;
34
+ models: Record<string, string[] | ModelMetadata[]>;
20
35
  connected: string[];
21
36
  }) => void;
22
37
  updateConnectedProvidersCache: (client: {
@@ -32,9 +47,11 @@ export declare function createConnectedProvidersCacheStore(getCacheDir?: () => s
32
47
  }>;
33
48
  };
34
49
  }) => Promise<void>;
50
+ _resetMemCacheForTesting: () => void;
35
51
  };
52
+ export declare function findProviderModelMetadata(providerID: string, modelID: string, cache?: ProviderModelsCache | null): ModelMetadata | undefined;
36
53
  export declare const readConnectedProvidersCache: () => string[] | null, hasConnectedProvidersCache: () => boolean, readProviderModelsCache: () => ProviderModelsCache | null, hasProviderModelsCache: () => boolean, writeProviderModelsCache: (data: {
37
- models: Record<string, string[]>;
54
+ models: Record<string, string[] | ModelMetadata[]>;
38
55
  connected: string[];
39
56
  }) => void, updateConnectedProvidersCache: (client: {
40
57
  provider?: {
@@ -48,5 +65,4 @@ export declare const readConnectedProvidersCache: () => string[] | null, hasConn
48
65
  };
49
66
  }>;
50
67
  };
51
- }) => Promise<void>;
52
- export {};
68
+ }) => Promise<void>, _resetMemCacheForTesting: () => void;
@@ -0,0 +1,2 @@
1
+ export declare function containsPath(rootPath: string, candidatePath: string): boolean;
2
+ export declare function isWithinProject(candidatePath: string, projectRoot: string): boolean;
@@ -7,12 +7,26 @@ export interface ExternalNotifierResult {
7
7
  pluginName: string | null;
8
8
  allPlugins: string[];
9
9
  }
10
+ export interface ExternalSkillPluginResult {
11
+ detected: boolean;
12
+ pluginName: string | null;
13
+ allPlugins: string[];
14
+ }
10
15
  /**
11
16
  * Detect if any external notification plugin is configured.
12
17
  * Returns information about detected plugins for logging/warning.
13
18
  */
14
19
  export declare function detectExternalNotificationPlugin(directory: string): ExternalNotifierResult;
20
+ /**
21
+ * Detect if any external skill plugin is configured.
22
+ * Returns information about detected plugins for logging/warning.
23
+ */
24
+ export declare function detectExternalSkillPlugin(directory: string): ExternalSkillPluginResult;
15
25
  /**
16
26
  * Generate a warning message for users with conflicting notification plugins.
17
27
  */
18
28
  export declare function getNotificationConflictWarning(pluginName: string): string;
29
+ /**
30
+ * Generate a warning message for users with conflicting skill plugins.
31
+ */
32
+ export declare function getSkillPluginConflictWarning(pluginName: string): string;
@@ -1,3 +1,12 @@
1
1
  import type { FallbackEntry } from "./model-requirements";
2
+ import type { FallbackModelObject } from "../config/schema/fallback-models";
2
3
  export declare function parseFallbackModelEntry(model: string, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry | undefined;
3
- export declare function buildFallbackChainFromModels(fallbackModels: string | string[] | undefined, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry[] | undefined;
4
+ export declare function parseFallbackModelObjectEntry(obj: FallbackModelObject, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry | undefined;
5
+ /**
6
+ * Find the most specific FallbackEntry whose `provider/model` is a prefix of
7
+ * the resolved `provider/modelID`. Longest match wins so that e.g.
8
+ * `openai/gpt-5.4-preview` picks the entry for `openai/gpt-5.4-preview` over
9
+ * the shorter `openai/gpt-5.4`.
10
+ */
11
+ export declare function findMostSpecificFallbackEntry(providerID: string, modelID: string, chain: FallbackEntry[]): FallbackEntry | undefined;
12
+ export declare function buildFallbackChainFromModels(fallbackModels: string | (string | FallbackModelObject)[] | undefined, contextProviderID: string | undefined, defaultProviderID?: string): FallbackEntry[] | undefined;
@@ -1,5 +1,6 @@
1
1
  export * from "./frontmatter";
2
2
  export * from "./command-executor";
3
+ export * from "./contains-path";
3
4
  export * from "./file-reference-resolver";
4
5
  export * from "./model-sanitizer";
5
6
  export * from "./logger";
@@ -23,6 +24,7 @@ export * from "./permission-compat";
23
24
  export * from "./external-plugin-detector";
24
25
  export * from "./zip-extractor";
25
26
  export * from "./binary-downloader";
27
+ export * from "./write-file-atomically";
26
28
  export * from "./agent-variant";
27
29
  export * from "./session-cursor";
28
30
  export * from "./shell-env";
@@ -31,10 +33,14 @@ export * from "./agent-tool-restrictions";
31
33
  export * from "./model-requirements";
32
34
  export * from "./model-resolver";
33
35
  export { normalizeModel, normalizeModelID } from "./model-normalization";
34
- export { normalizeFallbackModels } from "./model-resolver";
36
+ export { normalizeFallbackModels, flattenToFallbackModelStrings } from "./model-resolver";
35
37
  export { resolveModelPipeline } from "./model-resolution-pipeline";
36
38
  export type { ModelResolutionRequest, ModelResolutionProvenance, ModelResolutionResult, } from "./model-resolution-types";
37
39
  export * from "./model-availability";
40
+ export * from "./model-capabilities";
41
+ export * from "./model-capabilities-cache";
42
+ export * from "./model-capability-heuristics";
43
+ export * from "./model-settings-compatibility";
38
44
  export * from "./fallback-model-availability";
39
45
  export * from "./connected-providers-cache";
40
46
  export * from "./context-limit-resolver";
@@ -50,6 +56,7 @@ export * from "./truncate-description";
50
56
  export * from "./opencode-storage-paths";
51
57
  export * from "./opencode-message-dir";
52
58
  export * from "./opencode-command-dirs";
59
+ export * from "./project-discovery-dirs";
53
60
  export * from "./normalize-sdk-response";
54
61
  export * from "./session-directory-resolver";
55
62
  export * from "./prompt-tools";
@@ -57,3 +64,5 @@ export * from "./internal-initiator-marker";
57
64
  export * from "./plugin-command-discovery";
58
65
  export { SessionCategoryRegistry } from "./session-category-registry";
59
66
  export * from "./plugin-identity";
67
+ export * from "./log-legacy-plugin-startup-warning";
68
+ export * from "./task-system-enabled";
@@ -0,0 +1 @@
1
+ export declare function isAbortError(error: unknown): boolean;
@@ -0,0 +1,16 @@
1
+ type JsonFileCacheStoreOptions<TValue> = {
2
+ getCacheDir: () => string;
3
+ filename: string;
4
+ logPrefix: string;
5
+ cacheLabel: string;
6
+ describe: (value: TValue) => Record<string, unknown>;
7
+ serialize?: (value: TValue) => string;
8
+ };
9
+ type JsonFileCacheStore<TValue> = {
10
+ read: () => TValue | null;
11
+ has: () => boolean;
12
+ write: (value: TValue) => void;
13
+ resetMemory: () => void;
14
+ };
15
+ export declare function createJsonFileCacheStore<TValue>(options: JsonFileCacheStoreOptions<TValue>): JsonFileCacheStore<TValue>;
16
+ export {};
@@ -16,4 +16,5 @@ export declare function detectConfigFile(basePath: string): {
16
16
  export declare function detectPluginConfigFile(dir: string): {
17
17
  format: "json" | "jsonc" | "none";
18
18
  path: string;
19
+ legacyPath?: string;
19
20
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Canonical set of recognised variant / effort tokens.
3
+ * Used by parseFallbackModelEntry (space-suffix detection) and
4
+ * flattenToFallbackModelStrings (inline-variant stripping).
5
+ */
6
+ export declare const KNOWN_VARIANTS: Set<string>;
@@ -0,0 +1,7 @@
1
+ export interface LegacyPluginCheckResult {
2
+ hasLegacyEntry: boolean;
3
+ hasCanonicalEntry: boolean;
4
+ legacyEntries: string[];
5
+ configPath: string | null;
6
+ }
7
+ export declare function checkForLegacyPluginEntry(overrideConfigDir?: string): LegacyPluginCheckResult;
@@ -0,0 +1 @@
1
+ export declare function loadOpencodePlugins(directory: string): string[];
@@ -0,0 +1,10 @@
1
+ import { checkForLegacyPluginEntry } from "./legacy-plugin-warning";
2
+ import { log } from "./logger";
3
+ import { migrateLegacyPluginEntry } from "./migrate-legacy-plugin-entry";
4
+ type LogLegacyPluginStartupWarningDeps = {
5
+ checkForLegacyPluginEntry?: typeof checkForLegacyPluginEntry;
6
+ log?: typeof log;
7
+ migrateLegacyPluginEntry?: typeof migrateLegacyPluginEntry;
8
+ };
9
+ export declare function logLegacyPluginStartupWarning(deps?: LogLegacyPluginStartupWarningDeps): void;
10
+ export {};
@@ -0,0 +1 @@
1
+ export declare function migrateLegacyConfigFile(legacyPath: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function migrateLegacyPluginEntry(configPath: string): boolean;
@@ -0,0 +1,2 @@
1
+ import type { ModelCapabilitiesSnapshot } from "./types";
2
+ export declare function getBundledModelCapabilitiesSnapshot(): ModelCapabilitiesSnapshot;
@@ -0,0 +1,2 @@
1
+ import type { GetModelCapabilitiesInput, ModelCapabilities } from "./types";
2
+ export declare function getModelCapabilities(input: GetModelCapabilitiesInput): ModelCapabilities;
@@ -0,0 +1,3 @@
1
+ export { getBundledModelCapabilitiesSnapshot } from "./bundled-snapshot";
2
+ export { getModelCapabilities } from "./get-model-capabilities";
3
+ export type { GetModelCapabilitiesInput, ModelCapabilities, ModelCapabilitiesDiagnostics, ModelCapabilitiesSnapshot, ModelCapabilitiesSnapshotEntry, } from "./types";
@@ -0,0 +1,11 @@
1
+ import type { ModelMetadata } from "../connected-providers-cache";
2
+ import type { ModelCapabilities } from "./types";
3
+ export declare function readRuntimeModel(runtimeModel: ModelMetadata | Record<string, unknown> | undefined): Record<string, unknown> | undefined;
4
+ export declare function readRuntimeModelVariants(runtimeModel: Record<string, unknown> | undefined): string[] | undefined;
5
+ export declare function readRuntimeModelModalities(runtimeModel: Record<string, unknown> | undefined): ModelCapabilities["modalities"] | undefined;
6
+ export declare function readRuntimeModelReasoningSupport(runtimeModel: Record<string, unknown> | undefined): boolean | undefined;
7
+ export declare function readRuntimeModelThinkingSupport(runtimeModel: Record<string, unknown> | undefined): boolean | undefined;
8
+ export declare function readRuntimeModelTemperatureSupport(runtimeModel: Record<string, unknown> | undefined): boolean | undefined;
9
+ export declare function readRuntimeModelTopPSupport(runtimeModel: Record<string, unknown> | undefined): boolean | undefined;
10
+ export declare function readRuntimeModelToolCallSupport(runtimeModel: Record<string, unknown> | undefined): boolean | undefined;
11
+ export declare function readRuntimeModelLimitOutput(runtimeModel: Record<string, unknown> | undefined): number | undefined;
@@ -0,0 +1,94 @@
1
+ import type { ModelMetadata } from "../connected-providers-cache";
2
+ export type ModelCapabilitiesSnapshotEntry = {
3
+ id: string;
4
+ family?: string;
5
+ reasoning?: boolean;
6
+ temperature?: boolean;
7
+ toolCall?: boolean;
8
+ modalities?: {
9
+ input?: string[];
10
+ output?: string[];
11
+ };
12
+ limit?: {
13
+ context?: number;
14
+ input?: number;
15
+ output?: number;
16
+ };
17
+ };
18
+ export type ModelCapabilitiesSnapshot = {
19
+ generatedAt: string;
20
+ sourceUrl: string;
21
+ models: Record<string, ModelCapabilitiesSnapshotEntry>;
22
+ };
23
+ export type ModelCapabilitiesDiagnostics = {
24
+ resolutionMode: "snapshot-backed" | "alias-backed" | "heuristic-backed" | "unknown";
25
+ canonicalization: {
26
+ source: "canonical" | "exact-alias" | "pattern-alias";
27
+ ruleID?: string;
28
+ };
29
+ snapshot: {
30
+ source: "runtime-snapshot" | "bundled-snapshot" | "none";
31
+ };
32
+ family: {
33
+ source: "snapshot" | "heuristic" | "none";
34
+ };
35
+ variants: {
36
+ source: "none" | "runtime" | "override" | "heuristic" | "canonical";
37
+ };
38
+ reasoningEfforts: {
39
+ source: "none" | "override" | "heuristic";
40
+ };
41
+ reasoning: {
42
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
43
+ };
44
+ supportsThinking: {
45
+ source: "runtime" | "override" | "heuristic" | "runtime-snapshot" | "bundled-snapshot" | "none";
46
+ };
47
+ supportsTemperature: {
48
+ source: "runtime" | "override" | "runtime-snapshot" | "bundled-snapshot" | "none";
49
+ };
50
+ supportsTopP: {
51
+ source: "runtime" | "override" | "none";
52
+ };
53
+ maxOutputTokens: {
54
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
55
+ };
56
+ toolCall: {
57
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
58
+ };
59
+ modalities: {
60
+ source: "runtime" | "runtime-snapshot" | "bundled-snapshot" | "none";
61
+ };
62
+ };
63
+ export type ModelCapabilities = {
64
+ requestedModelID: string;
65
+ canonicalModelID: string;
66
+ family?: string;
67
+ variants?: string[];
68
+ reasoningEfforts?: string[];
69
+ reasoning?: boolean;
70
+ supportsThinking?: boolean;
71
+ supportsTemperature?: boolean;
72
+ supportsTopP?: boolean;
73
+ maxOutputTokens?: number;
74
+ toolCall?: boolean;
75
+ modalities?: {
76
+ input?: string[];
77
+ output?: string[];
78
+ };
79
+ diagnostics: ModelCapabilitiesDiagnostics;
80
+ };
81
+ export type GetModelCapabilitiesInput = {
82
+ providerID: string;
83
+ modelID: string;
84
+ runtimeModel?: ModelMetadata | Record<string, unknown>;
85
+ runtimeSnapshot?: ModelCapabilitiesSnapshot;
86
+ bundledSnapshot?: ModelCapabilitiesSnapshot;
87
+ };
88
+ export type ModelCapabilityOverride = {
89
+ variants?: string[];
90
+ reasoningEfforts?: string[];
91
+ supportsThinking?: boolean;
92
+ supportsTemperature?: boolean;
93
+ supportsTopP?: boolean;
94
+ };
@@ -0,0 +1,20 @@
1
+ import type { ModelCapabilitiesSnapshot } from "./model-capabilities";
2
+ export declare const MODELS_DEV_SOURCE_URL = "https://models.dev/api.json";
3
+ export declare function buildModelCapabilitiesSnapshotFromModelsDev(raw: unknown): ModelCapabilitiesSnapshot;
4
+ export declare function fetchModelCapabilitiesSnapshot(args?: {
5
+ sourceUrl?: string;
6
+ fetchImpl?: typeof fetch;
7
+ }): Promise<ModelCapabilitiesSnapshot>;
8
+ export declare function createModelCapabilitiesCacheStore(getCacheDir?: () => string): {
9
+ readModelCapabilitiesCache: () => ModelCapabilitiesSnapshot | null;
10
+ hasModelCapabilitiesCache: () => boolean;
11
+ writeModelCapabilitiesCache: (snapshot: ModelCapabilitiesSnapshot) => void;
12
+ refreshModelCapabilitiesCache: (args?: {
13
+ sourceUrl?: string;
14
+ fetchImpl?: typeof fetch;
15
+ }) => Promise<ModelCapabilitiesSnapshot>;
16
+ };
17
+ export declare const readModelCapabilitiesCache: () => ModelCapabilitiesSnapshot | null, hasModelCapabilitiesCache: () => boolean, writeModelCapabilitiesCache: (snapshot: ModelCapabilitiesSnapshot) => void, refreshModelCapabilitiesCache: (args?: {
18
+ sourceUrl?: string;
19
+ fetchImpl?: typeof fetch;
20
+ }) => Promise<ModelCapabilitiesSnapshot>;
@@ -0,0 +1,21 @@
1
+ export type ExactAliasRule = {
2
+ aliasModelID: string;
3
+ ruleID: string;
4
+ canonicalModelID: string;
5
+ rationale: string;
6
+ };
7
+ export type PatternAliasRule = {
8
+ ruleID: string;
9
+ description: string;
10
+ match: (normalizedModelID: string) => boolean;
11
+ canonicalize: (normalizedModelID: string) => string;
12
+ };
13
+ export type ModelIDAliasResolution = {
14
+ requestedModelID: string;
15
+ canonicalModelID: string;
16
+ source: "canonical" | "exact-alias" | "pattern-alias";
17
+ ruleID?: string;
18
+ };
19
+ export declare function resolveModelIDAlias(modelID: string): ModelIDAliasResolution;
20
+ export declare function getExactModelIDAliasRules(): ReadonlyArray<ExactAliasRule>;
21
+ export declare function getPatternModelIDAliasRules(): ReadonlyArray<PatternAliasRule>;
@@ -0,0 +1,38 @@
1
+ import type { ModelCapabilitiesSnapshot } from "./model-capabilities";
2
+ export type ModelCapabilityGuardrailIssue = {
3
+ kind: "alias-target-missing-from-snapshot";
4
+ ruleID: string;
5
+ aliasModelID: string;
6
+ canonicalModelID: string;
7
+ message: string;
8
+ } | {
9
+ kind: "exact-alias-collides-with-snapshot";
10
+ ruleID: string;
11
+ aliasModelID: string;
12
+ canonicalModelID: string;
13
+ message: string;
14
+ } | {
15
+ kind: "pattern-alias-collides-with-snapshot";
16
+ ruleID: string;
17
+ modelID: string;
18
+ canonicalModelID: string;
19
+ message: string;
20
+ } | {
21
+ kind: "built-in-model-relies-on-alias";
22
+ modelID: string;
23
+ canonicalModelID: string;
24
+ ruleID: string;
25
+ message: string;
26
+ } | {
27
+ kind: "built-in-model-missing-from-snapshot";
28
+ modelID: string;
29
+ canonicalModelID: string;
30
+ message: string;
31
+ };
32
+ type CollectModelCapabilityGuardrailIssuesInput = {
33
+ snapshot?: ModelCapabilitiesSnapshot;
34
+ requirementModelIDs?: Iterable<string>;
35
+ };
36
+ export declare function getBuiltInRequirementModelIDs(): string[];
37
+ export declare function collectModelCapabilityGuardrailIssues(input?: CollectModelCapabilityGuardrailIssuesInput): ModelCapabilityGuardrailIssue[];
38
+ export {};
@@ -0,0 +1,10 @@
1
+ export type HeuristicModelFamilyDefinition = {
2
+ family: string;
3
+ includes?: string[];
4
+ pattern?: RegExp;
5
+ variants?: string[];
6
+ reasoningEfforts?: string[];
7
+ supportsThinking?: boolean;
8
+ };
9
+ export declare const HEURISTIC_MODEL_FAMILY_REGISTRY: ReadonlyArray<HeuristicModelFamilyDefinition>;
10
+ export declare function detectHeuristicModelFamily(modelID: string): HeuristicModelFamilyDefinition | undefined;
@@ -2,6 +2,14 @@ export type FallbackEntry = {
2
2
  providers: string[];
3
3
  model: string;
4
4
  variant?: string;
5
+ reasoningEffort?: string;
6
+ temperature?: number;
7
+ top_p?: number;
8
+ maxTokens?: number;
9
+ thinking?: {
10
+ type: "enabled" | "disabled";
11
+ budgetTokens?: number;
12
+ };
5
13
  };
6
14
  export type ModelRequirement = {
7
15
  fallbackChain: FallbackEntry[];
@@ -1,4 +1,17 @@
1
1
  import type { FallbackEntry } from "./model-requirements";
2
+ export interface DelegatedModelConfig {
3
+ providerID: string;
4
+ modelID: string;
5
+ variant?: string;
6
+ reasoningEffort?: string;
7
+ temperature?: number;
8
+ top_p?: number;
9
+ maxTokens?: number;
10
+ thinking?: {
11
+ type: "enabled" | "disabled";
12
+ budgetTokens?: number;
13
+ };
14
+ }
2
15
  export type ModelResolutionRequest = {
3
16
  intent?: {
4
17
  uiSelectedModel?: string;