ocmm 0.5.3 → 0.6.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 (202) hide show
  1. package/.codex/agents/dw-builder.toml +3 -3
  2. package/.codex/agents/dw-clarifier.toml +2 -2
  3. package/.codex/agents/dw-code-search.toml +2 -2
  4. package/.codex/agents/dw-coding.toml +2 -2
  5. package/.codex/agents/dw-complex.toml +2 -2
  6. package/.codex/agents/dw-creative.toml +2 -2
  7. package/.codex/agents/dw-deep.toml +3 -3
  8. package/.codex/agents/dw-doc-search.toml +2 -2
  9. package/.codex/agents/dw-documenting.toml +2 -2
  10. package/.codex/agents/dw-explore.toml +2 -2
  11. package/.codex/agents/dw-frontend.toml +2 -2
  12. package/.codex/agents/dw-hard-reasoning.toml +2 -2
  13. package/.codex/agents/dw-media-reader.toml +2 -2
  14. package/.codex/agents/dw-normal-task.toml +2 -2
  15. package/.codex/agents/dw-oracle-2nd.toml +8 -0
  16. package/.codex/agents/dw-oracle.toml +3 -3
  17. package/.codex/agents/dw-orchestrator.toml +2 -2
  18. package/.codex/agents/dw-plan-critic.toml +2 -2
  19. package/.codex/agents/dw-planner.toml +3 -3
  20. package/.codex/agents/dw-quick.toml +2 -2
  21. package/.codex/agents/dw-research.toml +2 -2
  22. package/.codex/agents/dw-reviewer.toml +2 -2
  23. package/README.md +193 -46
  24. package/dist/cli/shim.d.ts +4 -2
  25. package/dist/cli/shim.js +26 -11
  26. package/dist/cli/shim.js.map +1 -1
  27. package/dist/codex/plugin-generator.js +121 -96
  28. package/dist/codex/plugin-generator.js.map +1 -1
  29. package/dist/config/load.d.ts +32 -23
  30. package/dist/config/load.js +384 -90
  31. package/dist/config/load.js.map +1 -1
  32. package/dist/config/merge.d.ts +18 -0
  33. package/dist/config/merge.js +46 -0
  34. package/dist/config/merge.js.map +1 -0
  35. package/dist/config/normalize.d.ts +1 -0
  36. package/dist/config/normalize.js +22 -16
  37. package/dist/config/normalize.js.map +1 -1
  38. package/dist/config/profile-aliases.d.ts +12 -0
  39. package/dist/config/profile-aliases.js +127 -0
  40. package/dist/config/profile-aliases.js.map +1 -0
  41. package/dist/config/profile-types.d.ts +13 -0
  42. package/dist/config/profile-types.js +2 -0
  43. package/dist/config/profile-types.js.map +1 -0
  44. package/dist/config/review-agent-migration.d.ts +89 -0
  45. package/dist/config/review-agent-migration.js +237 -0
  46. package/dist/config/review-agent-migration.js.map +1 -0
  47. package/dist/config/schema.d.ts +1364 -219
  48. package/dist/config/schema.js +169 -36
  49. package/dist/config/schema.js.map +1 -1
  50. package/dist/config/tolerant-parse.d.ts +41 -0
  51. package/dist/config/tolerant-parse.js +164 -0
  52. package/dist/config/tolerant-parse.js.map +1 -0
  53. package/dist/data/agents.d.ts +2 -1
  54. package/dist/data/agents.js +25 -10
  55. package/dist/data/agents.js.map +1 -1
  56. package/dist/data/categories.js +2 -1
  57. package/dist/data/categories.js.map +1 -1
  58. package/dist/hooks/chat-params.d.ts +2 -0
  59. package/dist/hooks/chat-params.js +182 -16
  60. package/dist/hooks/chat-params.js.map +1 -1
  61. package/dist/hooks/config.d.ts +14 -2
  62. package/dist/hooks/config.js +538 -60
  63. package/dist/hooks/config.js.map +1 -1
  64. package/dist/hooks/event.d.ts +3 -11
  65. package/dist/hooks/event.js +5 -9
  66. package/dist/hooks/event.js.map +1 -1
  67. package/dist/index.js +21 -14
  68. package/dist/index.js.map +1 -1
  69. package/dist/intent/model-family.d.ts +2 -0
  70. package/dist/intent/model-family.js +11 -0
  71. package/dist/intent/model-family.js.map +1 -1
  72. package/dist/intent/prompt-loader.d.ts +3 -3
  73. package/dist/intent/prompt-loader.js +3 -3
  74. package/dist/permissions/index.d.ts +3 -0
  75. package/dist/permissions/index.js +43 -28
  76. package/dist/permissions/index.js.map +1 -1
  77. package/dist/review-agents/expand.d.ts +36 -0
  78. package/dist/review-agents/expand.js +157 -0
  79. package/dist/review-agents/expand.js.map +1 -0
  80. package/dist/review-agents/names.d.ts +16 -0
  81. package/dist/review-agents/names.js +55 -0
  82. package/dist/review-agents/names.js.map +1 -0
  83. package/dist/routing/effective-route.d.ts +19 -0
  84. package/dist/routing/effective-route.js +133 -0
  85. package/dist/routing/effective-route.js.map +1 -0
  86. package/dist/routing/model-upgrades.d.ts +5 -0
  87. package/dist/routing/model-upgrades.js +59 -11
  88. package/dist/routing/model-upgrades.js.map +1 -1
  89. package/dist/routing/resolver.d.ts +8 -1
  90. package/dist/routing/resolver.js +29 -9
  91. package/dist/routing/resolver.js.map +1 -1
  92. package/dist/routing/route-registry.d.ts +13 -0
  93. package/dist/routing/route-registry.js +84 -0
  94. package/dist/routing/route-registry.js.map +1 -0
  95. package/dist/routing/variant-translator.js +7 -4
  96. package/dist/routing/variant-translator.js.map +1 -1
  97. package/dist/runtime-fallback/dispatcher.d.ts +1 -0
  98. package/dist/runtime-fallback/dispatcher.js +7 -5
  99. package/dist/runtime-fallback/dispatcher.js.map +1 -1
  100. package/dist/runtime-fallback/error-classifier.d.ts +3 -1
  101. package/dist/runtime-fallback/error-classifier.js +135 -1
  102. package/dist/runtime-fallback/error-classifier.js.map +1 -1
  103. package/dist/runtime-fallback/event-handler-generic-fallback.d.ts +26 -0
  104. package/dist/runtime-fallback/event-handler-generic-fallback.js +54 -0
  105. package/dist/runtime-fallback/event-handler-generic-fallback.js.map +1 -0
  106. package/dist/runtime-fallback/event-handler-idle-continuation.d.ts +9 -0
  107. package/dist/runtime-fallback/event-handler-idle-continuation.js +48 -0
  108. package/dist/runtime-fallback/event-handler-idle-continuation.js.map +1 -0
  109. package/dist/runtime-fallback/event-handler-support.d.ts +39 -0
  110. package/dist/runtime-fallback/event-handler-support.js +194 -0
  111. package/dist/runtime-fallback/event-handler-support.js.map +1 -0
  112. package/dist/runtime-fallback/event-handler-test-fixtures.d.ts +874 -0
  113. package/dist/runtime-fallback/event-handler-test-fixtures.js +150 -0
  114. package/dist/runtime-fallback/event-handler-test-fixtures.js.map +1 -0
  115. package/dist/runtime-fallback/event-handler.d.ts +13 -1
  116. package/dist/runtime-fallback/event-handler.js +334 -192
  117. package/dist/runtime-fallback/event-handler.js.map +1 -1
  118. package/dist/runtime-fallback/fallback-state.d.ts +8 -5
  119. package/dist/runtime-fallback/fallback-state.js +9 -6
  120. package/dist/runtime-fallback/fallback-state.js.map +1 -1
  121. package/dist/runtime-fallback/index.d.ts +21 -1
  122. package/dist/runtime-fallback/index.js +7 -1
  123. package/dist/runtime-fallback/index.js.map +1 -1
  124. package/dist/runtime-fallback/interruption-output-adapter.d.ts +7 -0
  125. package/dist/runtime-fallback/interruption-output-adapter.js +91 -0
  126. package/dist/runtime-fallback/interruption-output-adapter.js.map +1 -0
  127. package/dist/runtime-fallback/subagent-429-controller-fixture.d.ts +105 -0
  128. package/dist/runtime-fallback/subagent-429-controller-fixture.js +116 -0
  129. package/dist/runtime-fallback/subagent-429-controller-fixture.js.map +1 -0
  130. package/dist/runtime-fallback/subagent-429-controller.d.ts +167 -0
  131. package/dist/runtime-fallback/subagent-429-controller.js +334 -0
  132. package/dist/runtime-fallback/subagent-429-controller.js.map +1 -0
  133. package/dist/runtime-fallback/subagent-429-policy.d.ts +13 -0
  134. package/dist/runtime-fallback/subagent-429-policy.js +37 -0
  135. package/dist/runtime-fallback/subagent-429-policy.js.map +1 -0
  136. package/dist/runtime-fallback/subagent-429-session.d.ts +48 -0
  137. package/dist/runtime-fallback/subagent-429-session.js +316 -0
  138. package/dist/runtime-fallback/subagent-429-session.js.map +1 -0
  139. package/dist/shared/opencode-events.d.ts +22 -0
  140. package/dist/shared/opencode-events.js +75 -0
  141. package/dist/shared/opencode-events.js.map +1 -0
  142. package/dist/shared/types.d.ts +12 -1
  143. package/package.json +1 -1
  144. package/plugins/deepwork/.codex-plugin/plugin.json +1 -1
  145. package/plugins/deepwork/README.md +3 -2
  146. package/plugins/deepwork/agents/dw-builder.toml +3 -3
  147. package/plugins/deepwork/agents/dw-clarifier.toml +2 -2
  148. package/plugins/deepwork/agents/dw-code-search.toml +2 -2
  149. package/plugins/deepwork/agents/dw-coding.toml +2 -2
  150. package/plugins/deepwork/agents/dw-complex.toml +2 -2
  151. package/plugins/deepwork/agents/dw-creative.toml +2 -2
  152. package/plugins/deepwork/agents/dw-deep.toml +3 -3
  153. package/plugins/deepwork/agents/dw-doc-search.toml +2 -2
  154. package/plugins/deepwork/agents/dw-documenting.toml +2 -2
  155. package/plugins/deepwork/agents/dw-explore.toml +2 -2
  156. package/plugins/deepwork/agents/dw-frontend.toml +2 -2
  157. package/plugins/deepwork/agents/dw-hard-reasoning.toml +2 -2
  158. package/plugins/deepwork/agents/dw-media-reader.toml +2 -2
  159. package/plugins/deepwork/agents/dw-normal-task.toml +2 -2
  160. package/plugins/deepwork/agents/dw-oracle-2nd.toml +8 -0
  161. package/plugins/deepwork/agents/dw-oracle.toml +3 -3
  162. package/plugins/deepwork/agents/dw-orchestrator.toml +2 -2
  163. package/plugins/deepwork/agents/dw-plan-critic.toml +2 -2
  164. package/plugins/deepwork/agents/dw-planner.toml +3 -3
  165. package/plugins/deepwork/agents/dw-quick.toml +2 -2
  166. package/plugins/deepwork/agents/dw-research.toml +2 -2
  167. package/plugins/deepwork/agents/dw-reviewer.toml +2 -2
  168. package/plugins/deepwork/dist/cli/shim.d.ts +4 -2
  169. package/plugins/deepwork/dist/cli/shim.js +26 -11
  170. package/plugins/deepwork/dist/cli/shim.js.map +1 -1
  171. package/plugins/deepwork/dist/shared/opencode-events.d.ts +22 -0
  172. package/plugins/deepwork/dist/shared/opencode-events.js +75 -0
  173. package/plugins/deepwork/dist/shared/opencode-events.js.map +1 -0
  174. package/plugins/deepwork/dist/shared/types.d.ts +12 -1
  175. package/plugins/deepwork/package.json +1 -1
  176. package/plugins/deepwork/skills/deepwork/SKILL.md +74 -58
  177. package/plugins/deepwork/skills/deepwork-requesting-code-review/SKILL.md +53 -27
  178. package/plugins/deepwork/skills/deepwork-requesting-code-review/code-reviewer.md +11 -7
  179. package/plugins/deepwork/skills/deepwork-subagent-driven-development/SKILL.md +34 -21
  180. package/plugins/deepwork/skills/deepwork-subagent-driven-development/implementer-prompt.md +10 -3
  181. package/prompts/codex/agents/clarifier.md +4 -0
  182. package/prompts/codex/agents/orchestrator.md +12 -2
  183. package/prompts/codex/agents/plan-critic.md +4 -0
  184. package/prompts/codex/agents/planner.md +15 -10
  185. package/prompts/codex/agents/reviewer.md +8 -2
  186. package/prompts/codex/deepwork/gpt-5.6.md +20 -37
  187. package/prompts/omo/agents/clarifier.md +4 -0
  188. package/prompts/omo/agents/orchestrator.md +11 -0
  189. package/prompts/omo/agents/plan-critic.md +4 -0
  190. package/prompts/omo/agents/planner.md +15 -3
  191. package/prompts/omo/agents/reviewer.md +8 -2
  192. package/prompts/omo/deepwork/gpt-5.6.md +20 -37
  193. package/prompts/v1/agents/clarifier.md +4 -0
  194. package/prompts/v1/agents/orchestrator.md +12 -2
  195. package/prompts/v1/agents/plan-critic.md +4 -0
  196. package/prompts/v1/agents/planner.md +15 -10
  197. package/prompts/v1/agents/reviewer.md +8 -2
  198. package/prompts/v1/deepwork/gpt-5.6.md +20 -37
  199. package/skills/v1/requesting-code-review/SKILL.md +53 -27
  200. package/skills/v1/requesting-code-review/code-reviewer.md +11 -7
  201. package/skills/v1/subagent-driven-development/SKILL.md +34 -21
  202. package/skills/v1/subagent-driven-development/implementer-prompt.md +10 -3
@@ -0,0 +1,874 @@
1
+ import type { OcmmClient } from "./dispatcher.ts";
2
+ import type { Subagent429Scheduler } from "./subagent-429-controller.ts";
3
+ import type { EffectiveRouteRegistry } from "../routing/route-registry.ts";
4
+ import type { EffectiveModelRoute } from "../shared/types.ts";
5
+ export type PromptCall = {
6
+ sessionID: string;
7
+ body: Record<string, unknown>;
8
+ directory?: string;
9
+ };
10
+ export declare function makeMockClient(): {
11
+ client: OcmmClient;
12
+ calls: PromptCall[];
13
+ messagesResp: unknown;
14
+ };
15
+ export declare function makeConfig(overrides?: Record<string, unknown>): {
16
+ skills: {
17
+ sources: (string | {
18
+ path: string;
19
+ recursive: boolean;
20
+ glob?: string | undefined;
21
+ })[];
22
+ enable: string[];
23
+ disable: string[];
24
+ };
25
+ workflow: "omo" | "v1" | "codex";
26
+ intent: {
27
+ enabled: boolean;
28
+ skipAgents: string[];
29
+ };
30
+ runtimeFallback: {
31
+ enabled: boolean;
32
+ dispatch: boolean;
33
+ maxAttempts: number;
34
+ cooldownSeconds: number;
35
+ retryOnStatusCodes: number[];
36
+ retryOnPatterns: string[];
37
+ subagent429: {
38
+ enabled: boolean;
39
+ maxRetries: number;
40
+ providerScopes: Record<string, "model" | "provider">;
41
+ };
42
+ };
43
+ idleContinuation: {
44
+ enabled: boolean;
45
+ maxContinuations: number;
46
+ prompt?: string | undefined;
47
+ };
48
+ hashline: {
49
+ enabled: boolean;
50
+ };
51
+ rules: {
52
+ enabled: boolean;
53
+ skipClaudeUserRules: boolean;
54
+ };
55
+ mcp: {
56
+ enabled: boolean;
57
+ envAllowlist: string[];
58
+ websearch: {
59
+ provider: "exa" | "tavily";
60
+ };
61
+ servers: Record<string, {
62
+ type: "local";
63
+ command: string | string[];
64
+ enabled: boolean;
65
+ args?: string[] | undefined;
66
+ env?: Record<string, string> | undefined;
67
+ environment?: Record<string, string> | undefined;
68
+ } | {
69
+ type: "remote";
70
+ url: string;
71
+ enabled: boolean;
72
+ headers?: Record<string, string> | undefined;
73
+ oauth?: boolean | undefined;
74
+ }>;
75
+ };
76
+ subagent: {
77
+ maxDepth: number;
78
+ };
79
+ fastModels: {
80
+ providers: string[];
81
+ mappings: Record<string, string>;
82
+ };
83
+ profiles: Record<string, {
84
+ disabledHooks: string[];
85
+ skills?: {
86
+ sources?: (string | {
87
+ path: string;
88
+ recursive: boolean;
89
+ glob?: string | undefined;
90
+ })[] | undefined;
91
+ enable?: string[] | undefined;
92
+ disable?: string[] | undefined;
93
+ } | undefined;
94
+ fallbackModels?: string[] | undefined;
95
+ systemDefaultModel?: string | undefined;
96
+ locale?: string | undefined;
97
+ intent?: {
98
+ enabled?: boolean | undefined;
99
+ skipAgents?: string[] | undefined;
100
+ } | undefined;
101
+ runtimeFallback?: {
102
+ enabled?: boolean | undefined;
103
+ dispatch?: boolean | undefined;
104
+ maxAttempts?: number | undefined;
105
+ cooldownSeconds?: number | undefined;
106
+ retryOnStatusCodes?: number[] | undefined;
107
+ retryOnPatterns?: string[] | undefined;
108
+ subagent429?: {
109
+ enabled?: boolean | undefined;
110
+ maxRetries?: number | undefined;
111
+ providerScopes?: Record<string, "model" | "provider"> | undefined;
112
+ } | undefined;
113
+ } | undefined;
114
+ idleContinuation?: {
115
+ enabled?: boolean | undefined;
116
+ maxContinuations?: number | undefined;
117
+ prompt?: string | undefined;
118
+ } | undefined;
119
+ hashline?: {
120
+ enabled?: boolean | undefined;
121
+ } | undefined;
122
+ rules?: {
123
+ enabled?: boolean | undefined;
124
+ skipClaudeUserRules?: boolean | undefined;
125
+ } | undefined;
126
+ mcp?: {
127
+ enabled?: boolean | undefined;
128
+ envAllowlist?: string[] | undefined;
129
+ websearch?: {
130
+ provider?: "exa" | "tavily" | undefined;
131
+ } | undefined;
132
+ servers?: Record<string, {
133
+ type: "local";
134
+ command: string | string[];
135
+ enabled: boolean;
136
+ args?: string[] | undefined;
137
+ env?: Record<string, string> | undefined;
138
+ environment?: Record<string, string> | undefined;
139
+ } | {
140
+ type: "remote";
141
+ url: string;
142
+ enabled: boolean;
143
+ headers?: Record<string, string> | undefined;
144
+ oauth?: boolean | undefined;
145
+ }> | undefined;
146
+ } | undefined;
147
+ subagent?: {
148
+ maxDepth?: number | undefined;
149
+ } | undefined;
150
+ fastModels?: {
151
+ providers?: string[] | undefined;
152
+ mappings?: Record<string, string> | undefined;
153
+ } | undefined;
154
+ registerBuiltinAgents?: boolean | undefined;
155
+ promptsRoot?: string | undefined;
156
+ debug?: boolean | undefined;
157
+ disabledTools?: string[] | undefined;
158
+ disabledSkills?: string[] | undefined;
159
+ disabledCommands?: string[] | undefined;
160
+ disabledMcps?: string[] | undefined;
161
+ categories?: Record<string, {
162
+ description?: string | undefined;
163
+ alias?: string | undefined;
164
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
165
+ model?: string | undefined;
166
+ fallbackModels?: (string | {
167
+ providers: string[];
168
+ model: string;
169
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
170
+ reasoningEffort?: string | undefined;
171
+ temperature?: number | undefined;
172
+ topP?: number | undefined;
173
+ maxTokens?: number | undefined;
174
+ thinking?: {
175
+ type: "enabled" | "disabled";
176
+ budgetTokens?: number | undefined;
177
+ } | undefined;
178
+ })[] | undefined;
179
+ requirement?: {
180
+ fallbackChain: {
181
+ providers: string[];
182
+ model: string;
183
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
184
+ reasoningEffort?: string | undefined;
185
+ temperature?: number | undefined;
186
+ topP?: number | undefined;
187
+ maxTokens?: number | undefined;
188
+ thinking?: {
189
+ type: "enabled" | "disabled";
190
+ budgetTokens?: number | undefined;
191
+ } | undefined;
192
+ }[];
193
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
194
+ requiresModel?: string | undefined;
195
+ requiresAnyModel?: boolean | undefined;
196
+ requiresProvider?: string[] | undefined;
197
+ } | undefined;
198
+ }> | undefined;
199
+ agents?: Record<string, {
200
+ variants?: {
201
+ low?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
202
+ model: string;
203
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
204
+ } | {
205
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
206
+ } | undefined;
207
+ high?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
208
+ model: string;
209
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
210
+ } | {
211
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
212
+ } | undefined;
213
+ max?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
214
+ model: string;
215
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
216
+ } | {
217
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
218
+ } | undefined;
219
+ } | undefined;
220
+ disabled?: boolean | undefined;
221
+ tools?: Record<string, boolean> | undefined;
222
+ permission?: Record<string, "ask" | "allow" | "deny"> | undefined;
223
+ skills?: string[] | undefined;
224
+ promptAppend?: string | undefined;
225
+ temperature?: number | undefined;
226
+ topP?: number | undefined;
227
+ maxTokens?: number | undefined;
228
+ thinking?: {
229
+ type: "enabled" | "disabled";
230
+ budgetTokens?: number | undefined;
231
+ } | undefined;
232
+ reasoningEffort?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | undefined;
233
+ description?: string | undefined;
234
+ alias?: string | undefined;
235
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
236
+ model?: string | undefined;
237
+ fallbackModels?: (string | {
238
+ providers: string[];
239
+ model: string;
240
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
241
+ reasoningEffort?: string | undefined;
242
+ temperature?: number | undefined;
243
+ topP?: number | undefined;
244
+ maxTokens?: number | undefined;
245
+ thinking?: {
246
+ type: "enabled" | "disabled";
247
+ budgetTokens?: number | undefined;
248
+ } | undefined;
249
+ })[] | undefined;
250
+ requirement?: {
251
+ fallbackChain: {
252
+ providers: string[];
253
+ model: string;
254
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
255
+ reasoningEffort?: string | undefined;
256
+ temperature?: number | undefined;
257
+ topP?: number | undefined;
258
+ maxTokens?: number | undefined;
259
+ thinking?: {
260
+ type: "enabled" | "disabled";
261
+ budgetTokens?: number | undefined;
262
+ } | undefined;
263
+ }[];
264
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
265
+ requiresModel?: string | undefined;
266
+ requiresAnyModel?: boolean | undefined;
267
+ requiresProvider?: string[] | undefined;
268
+ } | undefined;
269
+ }> | undefined;
270
+ disabledAgents?: string[] | undefined;
271
+ }>;
272
+ registerBuiltinAgents: boolean;
273
+ defaultAgent: string | boolean;
274
+ disableOpenCodeBuiltinAgents: boolean;
275
+ debug: boolean;
276
+ disabledHooks: string[];
277
+ fallbackModels?: string[] | undefined;
278
+ systemDefaultModel?: string | undefined;
279
+ locale?: string | undefined;
280
+ activeProfile?: string | undefined;
281
+ promptsRoot?: string | undefined;
282
+ shim?: {
283
+ mode: "none" | "inline" | "config-file" | "config-dir" | "xdg";
284
+ configDir?: string | undefined;
285
+ configFile?: string | undefined;
286
+ opencode?: string | undefined;
287
+ keepOmo?: boolean | undefined;
288
+ noProviders?: boolean | undefined;
289
+ noPlugins?: boolean | undefined;
290
+ } | undefined;
291
+ disabledTools?: string[] | undefined;
292
+ disabledSkills?: string[] | undefined;
293
+ disabledCommands?: string[] | undefined;
294
+ disabledMcps?: string[] | undefined;
295
+ $schema?: string | undefined;
296
+ categories?: Record<string, {
297
+ description?: string | undefined;
298
+ alias?: string | undefined;
299
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
300
+ model?: string | undefined;
301
+ fallbackModels?: (string | {
302
+ providers: string[];
303
+ model: string;
304
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
305
+ reasoningEffort?: string | undefined;
306
+ temperature?: number | undefined;
307
+ topP?: number | undefined;
308
+ maxTokens?: number | undefined;
309
+ thinking?: {
310
+ type: "enabled" | "disabled";
311
+ budgetTokens?: number | undefined;
312
+ } | undefined;
313
+ })[] | undefined;
314
+ requirement?: {
315
+ fallbackChain: {
316
+ providers: string[];
317
+ model: string;
318
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
319
+ reasoningEffort?: string | undefined;
320
+ temperature?: number | undefined;
321
+ topP?: number | undefined;
322
+ maxTokens?: number | undefined;
323
+ thinking?: {
324
+ type: "enabled" | "disabled";
325
+ budgetTokens?: number | undefined;
326
+ } | undefined;
327
+ }[];
328
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
329
+ requiresModel?: string | undefined;
330
+ requiresAnyModel?: boolean | undefined;
331
+ requiresProvider?: string[] | undefined;
332
+ } | undefined;
333
+ }> | undefined;
334
+ agents?: Record<string, {
335
+ variants?: {
336
+ low?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
337
+ model: string;
338
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
339
+ } | {
340
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
341
+ } | undefined;
342
+ high?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
343
+ model: string;
344
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
345
+ } | {
346
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
347
+ } | undefined;
348
+ max?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
349
+ model: string;
350
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
351
+ } | {
352
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
353
+ } | undefined;
354
+ } | undefined;
355
+ disabled?: boolean | undefined;
356
+ tools?: Record<string, boolean> | undefined;
357
+ permission?: Record<string, "ask" | "allow" | "deny"> | undefined;
358
+ skills?: string[] | undefined;
359
+ promptAppend?: string | undefined;
360
+ temperature?: number | undefined;
361
+ topP?: number | undefined;
362
+ maxTokens?: number | undefined;
363
+ thinking?: {
364
+ type: "enabled" | "disabled";
365
+ budgetTokens?: number | undefined;
366
+ } | undefined;
367
+ reasoningEffort?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | undefined;
368
+ description?: string | undefined;
369
+ alias?: string | undefined;
370
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
371
+ model?: string | undefined;
372
+ fallbackModels?: (string | {
373
+ providers: string[];
374
+ model: string;
375
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
376
+ reasoningEffort?: string | undefined;
377
+ temperature?: number | undefined;
378
+ topP?: number | undefined;
379
+ maxTokens?: number | undefined;
380
+ thinking?: {
381
+ type: "enabled" | "disabled";
382
+ budgetTokens?: number | undefined;
383
+ } | undefined;
384
+ })[] | undefined;
385
+ requirement?: {
386
+ fallbackChain: {
387
+ providers: string[];
388
+ model: string;
389
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
390
+ reasoningEffort?: string | undefined;
391
+ temperature?: number | undefined;
392
+ topP?: number | undefined;
393
+ maxTokens?: number | undefined;
394
+ thinking?: {
395
+ type: "enabled" | "disabled";
396
+ budgetTokens?: number | undefined;
397
+ } | undefined;
398
+ }[];
399
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
400
+ requiresModel?: string | undefined;
401
+ requiresAnyModel?: boolean | undefined;
402
+ requiresProvider?: string[] | undefined;
403
+ } | undefined;
404
+ }> | undefined;
405
+ disabledAgents?: string[] | undefined;
406
+ };
407
+ export declare function makeErrorEvent(sessionID: string, error: unknown, extras?: Record<string, unknown>): {
408
+ event: {
409
+ type: string;
410
+ properties: {
411
+ sessionID: string;
412
+ error: unknown;
413
+ };
414
+ };
415
+ };
416
+ export declare function makeIdleEvent(sessionID: string): {
417
+ event: {
418
+ type: string;
419
+ properties: {
420
+ sessionID: string;
421
+ };
422
+ };
423
+ };
424
+ export type ScheduledHandlerTask = {
425
+ delayMs: number;
426
+ run: () => Promise<void>;
427
+ cancelled: boolean;
428
+ };
429
+ export declare class FakeHandlerScheduler implements Subagent429Scheduler {
430
+ readonly tasks: ScheduledHandlerTask[];
431
+ schedule(delayMs: number, run: () => Promise<void>): () => void;
432
+ run(index: number): Promise<void>;
433
+ }
434
+ export declare function deferred<T>(): {
435
+ promise: Promise<T>;
436
+ resolve: (value: T) => void;
437
+ reject: (reason?: unknown) => void;
438
+ };
439
+ export declare function flushHandler(): Promise<void>;
440
+ export declare function makeHandlerConfig(chain: Array<{
441
+ providers: string[];
442
+ model: string;
443
+ variant?: "low" | "medium" | "high";
444
+ }>, runtimeFallback?: Record<string, unknown>, requirementOptions?: Record<string, unknown>): {
445
+ skills: {
446
+ sources: (string | {
447
+ path: string;
448
+ recursive: boolean;
449
+ glob?: string | undefined;
450
+ })[];
451
+ enable: string[];
452
+ disable: string[];
453
+ };
454
+ workflow: "omo" | "v1" | "codex";
455
+ intent: {
456
+ enabled: boolean;
457
+ skipAgents: string[];
458
+ };
459
+ runtimeFallback: {
460
+ enabled: boolean;
461
+ dispatch: boolean;
462
+ maxAttempts: number;
463
+ cooldownSeconds: number;
464
+ retryOnStatusCodes: number[];
465
+ retryOnPatterns: string[];
466
+ subagent429: {
467
+ enabled: boolean;
468
+ maxRetries: number;
469
+ providerScopes: Record<string, "model" | "provider">;
470
+ };
471
+ };
472
+ idleContinuation: {
473
+ enabled: boolean;
474
+ maxContinuations: number;
475
+ prompt?: string | undefined;
476
+ };
477
+ hashline: {
478
+ enabled: boolean;
479
+ };
480
+ rules: {
481
+ enabled: boolean;
482
+ skipClaudeUserRules: boolean;
483
+ };
484
+ mcp: {
485
+ enabled: boolean;
486
+ envAllowlist: string[];
487
+ websearch: {
488
+ provider: "exa" | "tavily";
489
+ };
490
+ servers: Record<string, {
491
+ type: "local";
492
+ command: string | string[];
493
+ enabled: boolean;
494
+ args?: string[] | undefined;
495
+ env?: Record<string, string> | undefined;
496
+ environment?: Record<string, string> | undefined;
497
+ } | {
498
+ type: "remote";
499
+ url: string;
500
+ enabled: boolean;
501
+ headers?: Record<string, string> | undefined;
502
+ oauth?: boolean | undefined;
503
+ }>;
504
+ };
505
+ subagent: {
506
+ maxDepth: number;
507
+ };
508
+ fastModels: {
509
+ providers: string[];
510
+ mappings: Record<string, string>;
511
+ };
512
+ profiles: Record<string, {
513
+ disabledHooks: string[];
514
+ skills?: {
515
+ sources?: (string | {
516
+ path: string;
517
+ recursive: boolean;
518
+ glob?: string | undefined;
519
+ })[] | undefined;
520
+ enable?: string[] | undefined;
521
+ disable?: string[] | undefined;
522
+ } | undefined;
523
+ fallbackModels?: string[] | undefined;
524
+ systemDefaultModel?: string | undefined;
525
+ locale?: string | undefined;
526
+ intent?: {
527
+ enabled?: boolean | undefined;
528
+ skipAgents?: string[] | undefined;
529
+ } | undefined;
530
+ runtimeFallback?: {
531
+ enabled?: boolean | undefined;
532
+ dispatch?: boolean | undefined;
533
+ maxAttempts?: number | undefined;
534
+ cooldownSeconds?: number | undefined;
535
+ retryOnStatusCodes?: number[] | undefined;
536
+ retryOnPatterns?: string[] | undefined;
537
+ subagent429?: {
538
+ enabled?: boolean | undefined;
539
+ maxRetries?: number | undefined;
540
+ providerScopes?: Record<string, "model" | "provider"> | undefined;
541
+ } | undefined;
542
+ } | undefined;
543
+ idleContinuation?: {
544
+ enabled?: boolean | undefined;
545
+ maxContinuations?: number | undefined;
546
+ prompt?: string | undefined;
547
+ } | undefined;
548
+ hashline?: {
549
+ enabled?: boolean | undefined;
550
+ } | undefined;
551
+ rules?: {
552
+ enabled?: boolean | undefined;
553
+ skipClaudeUserRules?: boolean | undefined;
554
+ } | undefined;
555
+ mcp?: {
556
+ enabled?: boolean | undefined;
557
+ envAllowlist?: string[] | undefined;
558
+ websearch?: {
559
+ provider?: "exa" | "tavily" | undefined;
560
+ } | undefined;
561
+ servers?: Record<string, {
562
+ type: "local";
563
+ command: string | string[];
564
+ enabled: boolean;
565
+ args?: string[] | undefined;
566
+ env?: Record<string, string> | undefined;
567
+ environment?: Record<string, string> | undefined;
568
+ } | {
569
+ type: "remote";
570
+ url: string;
571
+ enabled: boolean;
572
+ headers?: Record<string, string> | undefined;
573
+ oauth?: boolean | undefined;
574
+ }> | undefined;
575
+ } | undefined;
576
+ subagent?: {
577
+ maxDepth?: number | undefined;
578
+ } | undefined;
579
+ fastModels?: {
580
+ providers?: string[] | undefined;
581
+ mappings?: Record<string, string> | undefined;
582
+ } | undefined;
583
+ registerBuiltinAgents?: boolean | undefined;
584
+ promptsRoot?: string | undefined;
585
+ debug?: boolean | undefined;
586
+ disabledTools?: string[] | undefined;
587
+ disabledSkills?: string[] | undefined;
588
+ disabledCommands?: string[] | undefined;
589
+ disabledMcps?: string[] | undefined;
590
+ categories?: Record<string, {
591
+ description?: string | undefined;
592
+ alias?: string | undefined;
593
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
594
+ model?: string | undefined;
595
+ fallbackModels?: (string | {
596
+ providers: string[];
597
+ model: string;
598
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
599
+ reasoningEffort?: string | undefined;
600
+ temperature?: number | undefined;
601
+ topP?: number | undefined;
602
+ maxTokens?: number | undefined;
603
+ thinking?: {
604
+ type: "enabled" | "disabled";
605
+ budgetTokens?: number | undefined;
606
+ } | undefined;
607
+ })[] | undefined;
608
+ requirement?: {
609
+ fallbackChain: {
610
+ providers: string[];
611
+ model: string;
612
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
613
+ reasoningEffort?: string | undefined;
614
+ temperature?: number | undefined;
615
+ topP?: number | undefined;
616
+ maxTokens?: number | undefined;
617
+ thinking?: {
618
+ type: "enabled" | "disabled";
619
+ budgetTokens?: number | undefined;
620
+ } | undefined;
621
+ }[];
622
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
623
+ requiresModel?: string | undefined;
624
+ requiresAnyModel?: boolean | undefined;
625
+ requiresProvider?: string[] | undefined;
626
+ } | undefined;
627
+ }> | undefined;
628
+ agents?: Record<string, {
629
+ variants?: {
630
+ low?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
631
+ model: string;
632
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
633
+ } | {
634
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
635
+ } | undefined;
636
+ high?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
637
+ model: string;
638
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
639
+ } | {
640
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
641
+ } | undefined;
642
+ max?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
643
+ model: string;
644
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
645
+ } | {
646
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
647
+ } | undefined;
648
+ } | undefined;
649
+ disabled?: boolean | undefined;
650
+ tools?: Record<string, boolean> | undefined;
651
+ permission?: Record<string, "ask" | "allow" | "deny"> | undefined;
652
+ skills?: string[] | undefined;
653
+ promptAppend?: string | undefined;
654
+ temperature?: number | undefined;
655
+ topP?: number | undefined;
656
+ maxTokens?: number | undefined;
657
+ thinking?: {
658
+ type: "enabled" | "disabled";
659
+ budgetTokens?: number | undefined;
660
+ } | undefined;
661
+ reasoningEffort?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | undefined;
662
+ description?: string | undefined;
663
+ alias?: string | undefined;
664
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
665
+ model?: string | undefined;
666
+ fallbackModels?: (string | {
667
+ providers: string[];
668
+ model: string;
669
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
670
+ reasoningEffort?: string | undefined;
671
+ temperature?: number | undefined;
672
+ topP?: number | undefined;
673
+ maxTokens?: number | undefined;
674
+ thinking?: {
675
+ type: "enabled" | "disabled";
676
+ budgetTokens?: number | undefined;
677
+ } | undefined;
678
+ })[] | undefined;
679
+ requirement?: {
680
+ fallbackChain: {
681
+ providers: string[];
682
+ model: string;
683
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
684
+ reasoningEffort?: string | undefined;
685
+ temperature?: number | undefined;
686
+ topP?: number | undefined;
687
+ maxTokens?: number | undefined;
688
+ thinking?: {
689
+ type: "enabled" | "disabled";
690
+ budgetTokens?: number | undefined;
691
+ } | undefined;
692
+ }[];
693
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
694
+ requiresModel?: string | undefined;
695
+ requiresAnyModel?: boolean | undefined;
696
+ requiresProvider?: string[] | undefined;
697
+ } | undefined;
698
+ }> | undefined;
699
+ disabledAgents?: string[] | undefined;
700
+ }>;
701
+ registerBuiltinAgents: boolean;
702
+ defaultAgent: string | boolean;
703
+ disableOpenCodeBuiltinAgents: boolean;
704
+ debug: boolean;
705
+ disabledHooks: string[];
706
+ fallbackModels?: string[] | undefined;
707
+ systemDefaultModel?: string | undefined;
708
+ locale?: string | undefined;
709
+ activeProfile?: string | undefined;
710
+ promptsRoot?: string | undefined;
711
+ shim?: {
712
+ mode: "none" | "inline" | "config-file" | "config-dir" | "xdg";
713
+ configDir?: string | undefined;
714
+ configFile?: string | undefined;
715
+ opencode?: string | undefined;
716
+ keepOmo?: boolean | undefined;
717
+ noProviders?: boolean | undefined;
718
+ noPlugins?: boolean | undefined;
719
+ } | undefined;
720
+ disabledTools?: string[] | undefined;
721
+ disabledSkills?: string[] | undefined;
722
+ disabledCommands?: string[] | undefined;
723
+ disabledMcps?: string[] | undefined;
724
+ $schema?: string | undefined;
725
+ categories?: Record<string, {
726
+ description?: string | undefined;
727
+ alias?: string | undefined;
728
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
729
+ model?: string | undefined;
730
+ fallbackModels?: (string | {
731
+ providers: string[];
732
+ model: string;
733
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
734
+ reasoningEffort?: string | undefined;
735
+ temperature?: number | undefined;
736
+ topP?: number | undefined;
737
+ maxTokens?: number | undefined;
738
+ thinking?: {
739
+ type: "enabled" | "disabled";
740
+ budgetTokens?: number | undefined;
741
+ } | undefined;
742
+ })[] | undefined;
743
+ requirement?: {
744
+ fallbackChain: {
745
+ providers: string[];
746
+ model: string;
747
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
748
+ reasoningEffort?: string | undefined;
749
+ temperature?: number | undefined;
750
+ topP?: number | undefined;
751
+ maxTokens?: number | undefined;
752
+ thinking?: {
753
+ type: "enabled" | "disabled";
754
+ budgetTokens?: number | undefined;
755
+ } | undefined;
756
+ }[];
757
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
758
+ requiresModel?: string | undefined;
759
+ requiresAnyModel?: boolean | undefined;
760
+ requiresProvider?: string[] | undefined;
761
+ } | undefined;
762
+ }> | undefined;
763
+ agents?: Record<string, {
764
+ variants?: {
765
+ low?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
766
+ model: string;
767
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
768
+ } | {
769
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
770
+ } | undefined;
771
+ high?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
772
+ model: string;
773
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
774
+ } | {
775
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
776
+ } | undefined;
777
+ max?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | {
778
+ model: string;
779
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
780
+ } | {
781
+ variant: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking";
782
+ } | undefined;
783
+ } | undefined;
784
+ disabled?: boolean | undefined;
785
+ tools?: Record<string, boolean> | undefined;
786
+ permission?: Record<string, "ask" | "allow" | "deny"> | undefined;
787
+ skills?: string[] | undefined;
788
+ promptAppend?: string | undefined;
789
+ temperature?: number | undefined;
790
+ topP?: number | undefined;
791
+ maxTokens?: number | undefined;
792
+ thinking?: {
793
+ type: "enabled" | "disabled";
794
+ budgetTokens?: number | undefined;
795
+ } | undefined;
796
+ reasoningEffort?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | undefined;
797
+ description?: string | undefined;
798
+ alias?: string | undefined;
799
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
800
+ model?: string | undefined;
801
+ fallbackModels?: (string | {
802
+ providers: string[];
803
+ model: string;
804
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
805
+ reasoningEffort?: string | undefined;
806
+ temperature?: number | undefined;
807
+ topP?: number | undefined;
808
+ maxTokens?: number | undefined;
809
+ thinking?: {
810
+ type: "enabled" | "disabled";
811
+ budgetTokens?: number | undefined;
812
+ } | undefined;
813
+ })[] | undefined;
814
+ requirement?: {
815
+ fallbackChain: {
816
+ providers: string[];
817
+ model: string;
818
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
819
+ reasoningEffort?: string | undefined;
820
+ temperature?: number | undefined;
821
+ topP?: number | undefined;
822
+ maxTokens?: number | undefined;
823
+ thinking?: {
824
+ type: "enabled" | "disabled";
825
+ budgetTokens?: number | undefined;
826
+ } | undefined;
827
+ }[];
828
+ variant?: "low" | "high" | "max" | "medium" | "xhigh" | "minimal" | "none" | "auto" | "thinking" | undefined;
829
+ requiresModel?: string | undefined;
830
+ requiresAnyModel?: boolean | undefined;
831
+ requiresProvider?: string[] | undefined;
832
+ } | undefined;
833
+ }> | undefined;
834
+ disabledAgents?: string[] | undefined;
835
+ };
836
+ export declare function standardHandlerChain(): ({
837
+ providers: string[];
838
+ model: string;
839
+ variant: "high";
840
+ } | {
841
+ providers: string[];
842
+ model: string;
843
+ variant: "medium";
844
+ } | {
845
+ providers: string[];
846
+ model: string;
847
+ variant: "low";
848
+ })[];
849
+ export declare function publishWorkerRouteSnapshot(registry: EffectiveRouteRegistry, chain?: EffectiveModelRoute["requirement"]["fallbackChain"]): number;
850
+ export type ControlledClientPhases = {
851
+ abortResults?: Array<Promise<unknown>>;
852
+ messagesResults?: Array<Promise<unknown>>;
853
+ onMessagesResolved?: () => void;
854
+ };
855
+ export declare function makeControlledClient(promptResults?: Array<Promise<unknown>>, phases?: ControlledClientPhases): {
856
+ client: OcmmClient;
857
+ calls: PromptCall[];
858
+ readonly aborts: number;
859
+ readonly messages: number;
860
+ setMessages(response: unknown): void;
861
+ };
862
+ export declare function makeCreatedEvent(sessionID: string, parent?: Record<string, string>): {
863
+ event: {
864
+ type: string;
865
+ properties: {
866
+ sessionID: string;
867
+ };
868
+ };
869
+ };
870
+ export declare function modelFor(modelID: string, providerID?: string): {
871
+ providerID: string;
872
+ modelID: string;
873
+ };
874
+ export declare function dispatchedModels(calls: PromptCall[]): string[];