@roo-code/types 1.44.0 → 1.46.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.
package/dist/index.js CHANGED
@@ -1,52 +1,5 @@
1
- // src/cloud.ts
2
- import { z as z13 } from "zod";
3
-
4
- // src/global-settings.ts
5
- import { z as z11 } from "zod";
6
-
7
- // src/provider-settings.ts
8
- import { z as z3 } from "zod";
9
-
10
- // src/model.ts
11
- import { z } from "zod";
12
- var reasoningEfforts = ["low", "medium", "high"];
13
- var reasoningEffortsSchema = z.enum(reasoningEfforts);
14
- var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
15
- var modelParametersSchema = z.enum(modelParameters);
16
- var isModelParameter = (value) => modelParameters.includes(value);
17
- var modelInfoSchema = z.object({
18
- maxTokens: z.number().nullish(),
19
- maxThinkingTokens: z.number().nullish(),
20
- contextWindow: z.number(),
21
- supportsImages: z.boolean().optional(),
22
- supportsComputerUse: z.boolean().optional(),
23
- supportsPromptCache: z.boolean(),
24
- supportsReasoningBudget: z.boolean().optional(),
25
- requiredReasoningBudget: z.boolean().optional(),
26
- supportsReasoningEffort: z.boolean().optional(),
27
- supportedParameters: z.array(modelParametersSchema).optional(),
28
- inputPrice: z.number().optional(),
29
- outputPrice: z.number().optional(),
30
- cacheWritesPrice: z.number().optional(),
31
- cacheReadsPrice: z.number().optional(),
32
- description: z.string().optional(),
33
- reasoningEffort: reasoningEffortsSchema.optional(),
34
- minTokensPerCachePoint: z.number().optional(),
35
- maxCachePoints: z.number().optional(),
36
- cachableFields: z.array(z.string()).optional(),
37
- tiers: z.array(
38
- z.object({
39
- contextWindow: z.number(),
40
- inputPrice: z.number().optional(),
41
- outputPrice: z.number().optional(),
42
- cacheWritesPrice: z.number().optional(),
43
- cacheReadsPrice: z.number().optional()
44
- })
45
- ).optional()
46
- });
47
-
48
1
  // src/codebase-index.ts
49
- import { z as z2 } from "zod";
2
+ import { z } from "zod";
50
3
  var CODEBASE_INDEX_DEFAULTS = {
51
4
  MIN_SEARCH_RESULTS: 10,
52
5
  MAX_SEARCH_RESULTS: 200,
@@ -57,37 +10,397 @@ var CODEBASE_INDEX_DEFAULTS = {
57
10
  DEFAULT_SEARCH_MIN_SCORE: 0.4,
58
11
  SEARCH_SCORE_STEP: 0.05
59
12
  };
60
- var codebaseIndexConfigSchema = z2.object({
61
- codebaseIndexEnabled: z2.boolean().optional(),
62
- codebaseIndexQdrantUrl: z2.string().optional(),
63
- codebaseIndexEmbedderProvider: z2.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral"]).optional(),
64
- codebaseIndexEmbedderBaseUrl: z2.string().optional(),
65
- codebaseIndexEmbedderModelId: z2.string().optional(),
66
- codebaseIndexEmbedderModelDimension: z2.number().optional(),
67
- codebaseIndexSearchMinScore: z2.number().min(0).max(1).optional(),
68
- codebaseIndexSearchMaxResults: z2.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
13
+ var codebaseIndexConfigSchema = z.object({
14
+ codebaseIndexEnabled: z.boolean().optional(),
15
+ codebaseIndexQdrantUrl: z.string().optional(),
16
+ codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral"]).optional(),
17
+ codebaseIndexEmbedderBaseUrl: z.string().optional(),
18
+ codebaseIndexEmbedderModelId: z.string().optional(),
19
+ codebaseIndexEmbedderModelDimension: z.number().optional(),
20
+ codebaseIndexSearchMinScore: z.number().min(0).max(1).optional(),
21
+ codebaseIndexSearchMaxResults: z.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
69
22
  // OpenAI Compatible specific fields
70
- codebaseIndexOpenAiCompatibleBaseUrl: z2.string().optional(),
71
- codebaseIndexOpenAiCompatibleModelDimension: z2.number().optional()
23
+ codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
24
+ codebaseIndexOpenAiCompatibleModelDimension: z.number().optional()
25
+ });
26
+ var codebaseIndexModelsSchema = z.object({
27
+ openai: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
28
+ ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
29
+ "openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
30
+ gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
31
+ mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional()
32
+ });
33
+ var codebaseIndexProviderSchema = z.object({
34
+ codeIndexOpenAiKey: z.string().optional(),
35
+ codeIndexQdrantApiKey: z.string().optional(),
36
+ codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
37
+ codebaseIndexOpenAiCompatibleApiKey: z.string().optional(),
38
+ codebaseIndexOpenAiCompatibleModelDimension: z.number().optional(),
39
+ codebaseIndexGeminiApiKey: z.string().optional(),
40
+ codebaseIndexMistralApiKey: z.string().optional()
41
+ });
42
+
43
+ // src/events.ts
44
+ import { z as z4 } from "zod";
45
+
46
+ // src/message.ts
47
+ import { z as z2 } from "zod";
48
+ var clineAsks = [
49
+ "followup",
50
+ "command",
51
+ "command_output",
52
+ "completion_result",
53
+ "tool",
54
+ "api_req_failed",
55
+ "resume_task",
56
+ "resume_completed_task",
57
+ "mistake_limit_reached",
58
+ "browser_action_launch",
59
+ "use_mcp_server",
60
+ "auto_approval_max_req_reached"
61
+ ];
62
+ var clineAskSchema = z2.enum(clineAsks);
63
+ var blockingAsks = [
64
+ "api_req_failed",
65
+ "mistake_limit_reached",
66
+ "completion_result",
67
+ "resume_task",
68
+ "resume_completed_task",
69
+ "command_output",
70
+ "auto_approval_max_req_reached"
71
+ ];
72
+ function isBlockingAsk(ask) {
73
+ return blockingAsks.includes(ask);
74
+ }
75
+ var clineSays = [
76
+ "error",
77
+ "api_req_started",
78
+ "api_req_finished",
79
+ "api_req_retried",
80
+ "api_req_retry_delayed",
81
+ "api_req_deleted",
82
+ "text",
83
+ "reasoning",
84
+ "completion_result",
85
+ "user_feedback",
86
+ "user_feedback_diff",
87
+ "command_output",
88
+ "shell_integration_warning",
89
+ "browser_action",
90
+ "browser_action_result",
91
+ "mcp_server_request_started",
92
+ "mcp_server_response",
93
+ "subtask_result",
94
+ "checkpoint_saved",
95
+ "rooignore_error",
96
+ "diff_error",
97
+ "condense_context",
98
+ "condense_context_error",
99
+ "codebase_search_result",
100
+ "user_edit_todos"
101
+ ];
102
+ var clineSaySchema = z2.enum(clineSays);
103
+ var toolProgressStatusSchema = z2.object({
104
+ icon: z2.string().optional(),
105
+ text: z2.string().optional()
106
+ });
107
+ var contextCondenseSchema = z2.object({
108
+ cost: z2.number(),
109
+ prevContextTokens: z2.number(),
110
+ newContextTokens: z2.number(),
111
+ summary: z2.string()
112
+ });
113
+ var clineMessageSchema = z2.object({
114
+ ts: z2.number(),
115
+ type: z2.union([z2.literal("ask"), z2.literal("say")]),
116
+ ask: clineAskSchema.optional(),
117
+ say: clineSaySchema.optional(),
118
+ text: z2.string().optional(),
119
+ images: z2.array(z2.string()).optional(),
120
+ partial: z2.boolean().optional(),
121
+ reasoning: z2.string().optional(),
122
+ conversationHistoryIndex: z2.number().optional(),
123
+ checkpoint: z2.record(z2.string(), z2.unknown()).optional(),
124
+ progressStatus: toolProgressStatusSchema.optional(),
125
+ contextCondense: contextCondenseSchema.optional(),
126
+ isProtected: z2.boolean().optional(),
127
+ apiProtocol: z2.union([z2.literal("openai"), z2.literal("anthropic")]).optional(),
128
+ metadata: z2.object({
129
+ gpt5: z2.object({
130
+ previous_response_id: z2.string().optional(),
131
+ instructions: z2.string().optional(),
132
+ reasoning_summary: z2.string().optional()
133
+ }).optional()
134
+ }).optional()
135
+ });
136
+ var tokenUsageSchema = z2.object({
137
+ totalTokensIn: z2.number(),
138
+ totalTokensOut: z2.number(),
139
+ totalCacheWrites: z2.number().optional(),
140
+ totalCacheReads: z2.number().optional(),
141
+ totalCost: z2.number(),
142
+ contextTokens: z2.number()
143
+ });
144
+
145
+ // src/tool.ts
146
+ import { z as z3 } from "zod";
147
+ var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
148
+ var toolGroupsSchema = z3.enum(toolGroups);
149
+ var toolNames = [
150
+ "execute_command",
151
+ "read_file",
152
+ "write_to_file",
153
+ "apply_diff",
154
+ "insert_content",
155
+ "search_and_replace",
156
+ "search_files",
157
+ "list_files",
158
+ "list_code_definition_names",
159
+ "browser_action",
160
+ "use_mcp_tool",
161
+ "access_mcp_resource",
162
+ "ask_followup_question",
163
+ "attempt_completion",
164
+ "switch_mode",
165
+ "new_task",
166
+ "fetch_instructions",
167
+ "codebase_search",
168
+ "update_todo_list"
169
+ ];
170
+ var toolNamesSchema = z3.enum(toolNames);
171
+ var toolUsageSchema = z3.record(
172
+ toolNamesSchema,
173
+ z3.object({
174
+ attempts: z3.number(),
175
+ failures: z3.number()
176
+ })
177
+ );
178
+
179
+ // src/events.ts
180
+ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
181
+ RooCodeEventName2["TaskCreated"] = "taskCreated";
182
+ RooCodeEventName2["TaskStarted"] = "taskStarted";
183
+ RooCodeEventName2["TaskCompleted"] = "taskCompleted";
184
+ RooCodeEventName2["TaskAborted"] = "taskAborted";
185
+ RooCodeEventName2["TaskFocused"] = "taskFocused";
186
+ RooCodeEventName2["TaskUnfocused"] = "taskUnfocused";
187
+ RooCodeEventName2["TaskActive"] = "taskActive";
188
+ RooCodeEventName2["TaskIdle"] = "taskIdle";
189
+ RooCodeEventName2["TaskPaused"] = "taskPaused";
190
+ RooCodeEventName2["TaskUnpaused"] = "taskUnpaused";
191
+ RooCodeEventName2["TaskSpawned"] = "taskSpawned";
192
+ RooCodeEventName2["Message"] = "message";
193
+ RooCodeEventName2["TaskModeSwitched"] = "taskModeSwitched";
194
+ RooCodeEventName2["TaskAskResponded"] = "taskAskResponded";
195
+ RooCodeEventName2["TaskTokenUsageUpdated"] = "taskTokenUsageUpdated";
196
+ RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
197
+ RooCodeEventName2["EvalPass"] = "evalPass";
198
+ RooCodeEventName2["EvalFail"] = "evalFail";
199
+ return RooCodeEventName2;
200
+ })(RooCodeEventName || {});
201
+ var rooCodeEventsSchema = z4.object({
202
+ ["taskCreated" /* TaskCreated */]: z4.tuple([z4.string()]),
203
+ ["taskStarted" /* TaskStarted */]: z4.tuple([z4.string()]),
204
+ ["taskCompleted" /* TaskCompleted */]: z4.tuple([
205
+ z4.string(),
206
+ tokenUsageSchema,
207
+ toolUsageSchema,
208
+ z4.object({
209
+ isSubtask: z4.boolean()
210
+ })
211
+ ]),
212
+ ["taskAborted" /* TaskAborted */]: z4.tuple([z4.string()]),
213
+ ["taskFocused" /* TaskFocused */]: z4.tuple([z4.string()]),
214
+ ["taskUnfocused" /* TaskUnfocused */]: z4.tuple([z4.string()]),
215
+ ["taskActive" /* TaskActive */]: z4.tuple([z4.string()]),
216
+ ["taskIdle" /* TaskIdle */]: z4.tuple([z4.string()]),
217
+ ["taskPaused" /* TaskPaused */]: z4.tuple([z4.string()]),
218
+ ["taskUnpaused" /* TaskUnpaused */]: z4.tuple([z4.string()]),
219
+ ["taskSpawned" /* TaskSpawned */]: z4.tuple([z4.string(), z4.string()]),
220
+ ["message" /* Message */]: z4.tuple([
221
+ z4.object({
222
+ taskId: z4.string(),
223
+ action: z4.union([z4.literal("created"), z4.literal("updated")]),
224
+ message: clineMessageSchema
225
+ })
226
+ ]),
227
+ ["taskModeSwitched" /* TaskModeSwitched */]: z4.tuple([z4.string(), z4.string()]),
228
+ ["taskAskResponded" /* TaskAskResponded */]: z4.tuple([z4.string()]),
229
+ ["taskToolFailed" /* TaskToolFailed */]: z4.tuple([z4.string(), toolNamesSchema, z4.string()]),
230
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z4.tuple([z4.string(), tokenUsageSchema])
72
231
  });
73
- var codebaseIndexModelsSchema = z2.object({
74
- openai: z2.record(z2.string(), z2.object({ dimension: z2.number() })).optional(),
75
- ollama: z2.record(z2.string(), z2.object({ dimension: z2.number() })).optional(),
76
- "openai-compatible": z2.record(z2.string(), z2.object({ dimension: z2.number() })).optional(),
77
- gemini: z2.record(z2.string(), z2.object({ dimension: z2.number() })).optional(),
78
- mistral: z2.record(z2.string(), z2.object({ dimension: z2.number() })).optional()
232
+ var taskEventSchema = z4.discriminatedUnion("eventName", [
233
+ // Task Provider Lifecycle
234
+ z4.object({
235
+ eventName: z4.literal("taskCreated" /* TaskCreated */),
236
+ payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
237
+ taskId: z4.number().optional()
238
+ }),
239
+ // Task Lifecycle
240
+ z4.object({
241
+ eventName: z4.literal("taskStarted" /* TaskStarted */),
242
+ payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
243
+ taskId: z4.number().optional()
244
+ }),
245
+ z4.object({
246
+ eventName: z4.literal("taskCompleted" /* TaskCompleted */),
247
+ payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
248
+ taskId: z4.number().optional()
249
+ }),
250
+ z4.object({
251
+ eventName: z4.literal("taskAborted" /* TaskAborted */),
252
+ payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
253
+ taskId: z4.number().optional()
254
+ }),
255
+ z4.object({
256
+ eventName: z4.literal("taskFocused" /* TaskFocused */),
257
+ payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
258
+ taskId: z4.number().optional()
259
+ }),
260
+ z4.object({
261
+ eventName: z4.literal("taskUnfocused" /* TaskUnfocused */),
262
+ payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
263
+ taskId: z4.number().optional()
264
+ }),
265
+ z4.object({
266
+ eventName: z4.literal("taskActive" /* TaskActive */),
267
+ payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
268
+ taskId: z4.number().optional()
269
+ }),
270
+ z4.object({
271
+ eventName: z4.literal("taskIdle" /* TaskIdle */),
272
+ payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
273
+ taskId: z4.number().optional()
274
+ }),
275
+ // Subtask Lifecycle
276
+ z4.object({
277
+ eventName: z4.literal("taskPaused" /* TaskPaused */),
278
+ payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
279
+ taskId: z4.number().optional()
280
+ }),
281
+ z4.object({
282
+ eventName: z4.literal("taskUnpaused" /* TaskUnpaused */),
283
+ payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
284
+ taskId: z4.number().optional()
285
+ }),
286
+ z4.object({
287
+ eventName: z4.literal("taskSpawned" /* TaskSpawned */),
288
+ payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
289
+ taskId: z4.number().optional()
290
+ }),
291
+ // Task Execution
292
+ z4.object({
293
+ eventName: z4.literal("message" /* Message */),
294
+ payload: rooCodeEventsSchema.shape["message" /* Message */],
295
+ taskId: z4.number().optional()
296
+ }),
297
+ z4.object({
298
+ eventName: z4.literal("taskModeSwitched" /* TaskModeSwitched */),
299
+ payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
300
+ taskId: z4.number().optional()
301
+ }),
302
+ z4.object({
303
+ eventName: z4.literal("taskAskResponded" /* TaskAskResponded */),
304
+ payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
305
+ taskId: z4.number().optional()
306
+ }),
307
+ // Task Analytics
308
+ z4.object({
309
+ eventName: z4.literal("taskToolFailed" /* TaskToolFailed */),
310
+ payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
311
+ taskId: z4.number().optional()
312
+ }),
313
+ z4.object({
314
+ eventName: z4.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
315
+ payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
316
+ taskId: z4.number().optional()
317
+ }),
318
+ // Evals
319
+ z4.object({
320
+ eventName: z4.literal("evalPass" /* EvalPass */),
321
+ payload: z4.undefined(),
322
+ taskId: z4.number()
323
+ }),
324
+ z4.object({
325
+ eventName: z4.literal("evalFail" /* EvalFail */),
326
+ payload: z4.undefined(),
327
+ taskId: z4.number()
328
+ })
329
+ ]);
330
+
331
+ // src/experiment.ts
332
+ import { z as z5 } from "zod";
333
+ var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
334
+ var experimentIdsSchema = z5.enum(experimentIds);
335
+ var experimentsSchema = z5.object({
336
+ powerSteering: z5.boolean().optional(),
337
+ multiFileApplyDiff: z5.boolean().optional(),
338
+ preventFocusDisruption: z5.boolean().optional(),
339
+ assistantMessageParser: z5.boolean().optional()
79
340
  });
80
- var codebaseIndexProviderSchema = z2.object({
81
- codeIndexOpenAiKey: z2.string().optional(),
82
- codeIndexQdrantApiKey: z2.string().optional(),
83
- codebaseIndexOpenAiCompatibleBaseUrl: z2.string().optional(),
84
- codebaseIndexOpenAiCompatibleApiKey: z2.string().optional(),
85
- codebaseIndexOpenAiCompatibleModelDimension: z2.number().optional(),
86
- codebaseIndexGeminiApiKey: z2.string().optional(),
87
- codebaseIndexMistralApiKey: z2.string().optional()
341
+
342
+ // src/followup.ts
343
+ import { z as z6 } from "zod";
344
+ var suggestionItemSchema = z6.object({
345
+ answer: z6.string(),
346
+ mode: z6.string().optional()
347
+ });
348
+ var followUpDataSchema = z6.object({
349
+ question: z6.string().optional(),
350
+ suggest: z6.array(suggestionItemSchema).optional()
88
351
  });
89
352
 
353
+ // src/global-settings.ts
354
+ import { z as z13 } from "zod";
355
+
90
356
  // src/provider-settings.ts
357
+ import { z as z8 } from "zod";
358
+
359
+ // src/model.ts
360
+ import { z as z7 } from "zod";
361
+ var reasoningEfforts = ["low", "medium", "high"];
362
+ var reasoningEffortsSchema = z7.enum(reasoningEfforts);
363
+ var verbosityLevels = ["low", "medium", "high"];
364
+ var verbosityLevelsSchema = z7.enum(verbosityLevels);
365
+ var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
366
+ var modelParametersSchema = z7.enum(modelParameters);
367
+ var isModelParameter = (value) => modelParameters.includes(value);
368
+ var modelInfoSchema = z7.object({
369
+ maxTokens: z7.number().nullish(),
370
+ maxThinkingTokens: z7.number().nullish(),
371
+ contextWindow: z7.number(),
372
+ supportsImages: z7.boolean().optional(),
373
+ supportsComputerUse: z7.boolean().optional(),
374
+ supportsPromptCache: z7.boolean(),
375
+ // Capability flag to indicate whether the model supports an output verbosity parameter
376
+ supportsVerbosity: z7.boolean().optional(),
377
+ supportsReasoningBudget: z7.boolean().optional(),
378
+ requiredReasoningBudget: z7.boolean().optional(),
379
+ supportsReasoningEffort: z7.boolean().optional(),
380
+ supportedParameters: z7.array(modelParametersSchema).optional(),
381
+ inputPrice: z7.number().optional(),
382
+ outputPrice: z7.number().optional(),
383
+ cacheWritesPrice: z7.number().optional(),
384
+ cacheReadsPrice: z7.number().optional(),
385
+ description: z7.string().optional(),
386
+ reasoningEffort: reasoningEffortsSchema.optional(),
387
+ minTokensPerCachePoint: z7.number().optional(),
388
+ maxCachePoints: z7.number().optional(),
389
+ cachableFields: z7.array(z7.string()).optional(),
390
+ tiers: z7.array(
391
+ z7.object({
392
+ contextWindow: z7.number(),
393
+ inputPrice: z7.number().optional(),
394
+ outputPrice: z7.number().optional(),
395
+ cacheWritesPrice: z7.number().optional(),
396
+ cacheReadsPrice: z7.number().optional()
397
+ })
398
+ ).optional()
399
+ });
400
+
401
+ // src/provider-settings.ts
402
+ var BEDROCK_CLAUDE_SONNET_4_MODEL_ID = "anthropic.claude-sonnet-4-20250514-v1:0";
403
+ var extendedReasoningEffortsSchema = z8.union([reasoningEffortsSchema, z8.literal("minimal")]);
91
404
  var providerNames = [
92
405
  "anthropic",
93
406
  "claude-code",
@@ -117,214 +430,232 @@ var providerNames = [
117
430
  "huggingface",
118
431
  "cerebras",
119
432
  "sambanova",
120
- "zai"
433
+ "zai",
434
+ "fireworks",
435
+ "io-intelligence"
121
436
  ];
122
- var providerNamesSchema = z3.enum(providerNames);
123
- var providerSettingsEntrySchema = z3.object({
124
- id: z3.string(),
125
- name: z3.string(),
437
+ var providerNamesSchema = z8.enum(providerNames);
438
+ var providerSettingsEntrySchema = z8.object({
439
+ id: z8.string(),
440
+ name: z8.string(),
126
441
  apiProvider: providerNamesSchema.optional()
127
442
  });
128
443
  var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
129
- var baseProviderSettingsSchema = z3.object({
130
- includeMaxTokens: z3.boolean().optional(),
131
- diffEnabled: z3.boolean().optional(),
132
- todoListEnabled: z3.boolean().optional(),
133
- fuzzyMatchThreshold: z3.number().optional(),
134
- modelTemperature: z3.number().nullish(),
135
- rateLimitSeconds: z3.number().optional(),
136
- consecutiveMistakeLimit: z3.number().min(0).optional(),
444
+ var baseProviderSettingsSchema = z8.object({
445
+ includeMaxTokens: z8.boolean().optional(),
446
+ diffEnabled: z8.boolean().optional(),
447
+ todoListEnabled: z8.boolean().optional(),
448
+ fuzzyMatchThreshold: z8.number().optional(),
449
+ modelTemperature: z8.number().nullish(),
450
+ rateLimitSeconds: z8.number().optional(),
451
+ consecutiveMistakeLimit: z8.number().min(0).optional(),
137
452
  // Model reasoning.
138
- enableReasoningEffort: z3.boolean().optional(),
139
- reasoningEffort: reasoningEffortsSchema.optional(),
140
- modelMaxTokens: z3.number().optional(),
141
- modelMaxThinkingTokens: z3.number().optional()
453
+ enableReasoningEffort: z8.boolean().optional(),
454
+ reasoningEffort: extendedReasoningEffortsSchema.optional(),
455
+ modelMaxTokens: z8.number().optional(),
456
+ modelMaxThinkingTokens: z8.number().optional(),
457
+ // Model verbosity.
458
+ verbosity: verbosityLevelsSchema.optional()
142
459
  });
143
460
  var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
144
- apiModelId: z3.string().optional()
461
+ apiModelId: z8.string().optional()
145
462
  });
146
463
  var anthropicSchema = apiModelIdProviderModelSchema.extend({
147
- apiKey: z3.string().optional(),
148
- anthropicBaseUrl: z3.string().optional(),
149
- anthropicUseAuthToken: z3.boolean().optional()
464
+ apiKey: z8.string().optional(),
465
+ anthropicBaseUrl: z8.string().optional(),
466
+ anthropicUseAuthToken: z8.boolean().optional(),
467
+ anthropicBeta1MContext: z8.boolean().optional()
468
+ // Enable 'context-1m-2025-08-07' beta for 1M context window
150
469
  });
151
470
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
152
- claudeCodePath: z3.string().optional(),
153
- claudeCodeMaxOutputTokens: z3.number().int().min(1).max(2e5).optional()
471
+ claudeCodePath: z8.string().optional(),
472
+ claudeCodeMaxOutputTokens: z8.number().int().min(1).max(2e5).optional()
154
473
  });
155
474
  var glamaSchema = baseProviderSettingsSchema.extend({
156
- glamaModelId: z3.string().optional(),
157
- glamaApiKey: z3.string().optional()
475
+ glamaModelId: z8.string().optional(),
476
+ glamaApiKey: z8.string().optional()
158
477
  });
159
478
  var openRouterSchema = baseProviderSettingsSchema.extend({
160
- openRouterApiKey: z3.string().optional(),
161
- openRouterModelId: z3.string().optional(),
162
- openRouterBaseUrl: z3.string().optional(),
163
- openRouterSpecificProvider: z3.string().optional(),
164
- openRouterUseMiddleOutTransform: z3.boolean().optional()
479
+ openRouterApiKey: z8.string().optional(),
480
+ openRouterModelId: z8.string().optional(),
481
+ openRouterBaseUrl: z8.string().optional(),
482
+ openRouterSpecificProvider: z8.string().optional(),
483
+ openRouterUseMiddleOutTransform: z8.boolean().optional()
165
484
  });
166
485
  var bedrockSchema = apiModelIdProviderModelSchema.extend({
167
- awsAccessKey: z3.string().optional(),
168
- awsSecretKey: z3.string().optional(),
169
- awsSessionToken: z3.string().optional(),
170
- awsRegion: z3.string().optional(),
171
- awsUseCrossRegionInference: z3.boolean().optional(),
172
- awsUsePromptCache: z3.boolean().optional(),
173
- awsProfile: z3.string().optional(),
174
- awsUseProfile: z3.boolean().optional(),
175
- awsApiKey: z3.string().optional(),
176
- awsUseApiKey: z3.boolean().optional(),
177
- awsCustomArn: z3.string().optional(),
178
- awsModelContextWindow: z3.number().optional(),
179
- awsBedrockEndpointEnabled: z3.boolean().optional(),
180
- awsBedrockEndpoint: z3.string().optional()
486
+ awsAccessKey: z8.string().optional(),
487
+ awsSecretKey: z8.string().optional(),
488
+ awsSessionToken: z8.string().optional(),
489
+ awsRegion: z8.string().optional(),
490
+ awsUseCrossRegionInference: z8.boolean().optional(),
491
+ awsUsePromptCache: z8.boolean().optional(),
492
+ awsProfile: z8.string().optional(),
493
+ awsUseProfile: z8.boolean().optional(),
494
+ awsApiKey: z8.string().optional(),
495
+ awsUseApiKey: z8.boolean().optional(),
496
+ awsCustomArn: z8.string().optional(),
497
+ awsModelContextWindow: z8.number().optional(),
498
+ awsBedrockEndpointEnabled: z8.boolean().optional(),
499
+ awsBedrockEndpoint: z8.string().optional(),
500
+ awsBedrock1MContext: z8.boolean().optional()
501
+ // Enable 'context-1m-2025-08-07' beta for 1M context window
181
502
  });
182
503
  var vertexSchema = apiModelIdProviderModelSchema.extend({
183
- vertexKeyFile: z3.string().optional(),
184
- vertexJsonCredentials: z3.string().optional(),
185
- vertexProjectId: z3.string().optional(),
186
- vertexRegion: z3.string().optional()
504
+ vertexKeyFile: z8.string().optional(),
505
+ vertexJsonCredentials: z8.string().optional(),
506
+ vertexProjectId: z8.string().optional(),
507
+ vertexRegion: z8.string().optional()
187
508
  });
188
509
  var openAiSchema = baseProviderSettingsSchema.extend({
189
- openAiBaseUrl: z3.string().optional(),
190
- openAiApiKey: z3.string().optional(),
191
- openAiLegacyFormat: z3.boolean().optional(),
192
- openAiR1FormatEnabled: z3.boolean().optional(),
193
- openAiModelId: z3.string().optional(),
510
+ openAiBaseUrl: z8.string().optional(),
511
+ openAiApiKey: z8.string().optional(),
512
+ openAiLegacyFormat: z8.boolean().optional(),
513
+ openAiR1FormatEnabled: z8.boolean().optional(),
514
+ openAiModelId: z8.string().optional(),
194
515
  openAiCustomModelInfo: modelInfoSchema.nullish(),
195
- openAiUseAzure: z3.boolean().optional(),
196
- azureApiVersion: z3.string().optional(),
197
- openAiStreamingEnabled: z3.boolean().optional(),
198
- openAiHostHeader: z3.string().optional(),
516
+ openAiUseAzure: z8.boolean().optional(),
517
+ azureApiVersion: z8.string().optional(),
518
+ openAiStreamingEnabled: z8.boolean().optional(),
519
+ openAiHostHeader: z8.string().optional(),
199
520
  // Keep temporarily for backward compatibility during migration.
200
- openAiHeaders: z3.record(z3.string(), z3.string()).optional()
521
+ openAiHeaders: z8.record(z8.string(), z8.string()).optional()
201
522
  });
202
523
  var ollamaSchema = baseProviderSettingsSchema.extend({
203
- ollamaModelId: z3.string().optional(),
204
- ollamaBaseUrl: z3.string().optional()
524
+ ollamaModelId: z8.string().optional(),
525
+ ollamaBaseUrl: z8.string().optional()
205
526
  });
206
527
  var vsCodeLmSchema = baseProviderSettingsSchema.extend({
207
- vsCodeLmModelSelector: z3.object({
208
- vendor: z3.string().optional(),
209
- family: z3.string().optional(),
210
- version: z3.string().optional(),
211
- id: z3.string().optional()
528
+ vsCodeLmModelSelector: z8.object({
529
+ vendor: z8.string().optional(),
530
+ family: z8.string().optional(),
531
+ version: z8.string().optional(),
532
+ id: z8.string().optional()
212
533
  }).optional()
213
534
  });
214
535
  var lmStudioSchema = baseProviderSettingsSchema.extend({
215
- lmStudioModelId: z3.string().optional(),
216
- lmStudioBaseUrl: z3.string().optional(),
217
- lmStudioDraftModelId: z3.string().optional(),
218
- lmStudioSpeculativeDecodingEnabled: z3.boolean().optional()
536
+ lmStudioModelId: z8.string().optional(),
537
+ lmStudioBaseUrl: z8.string().optional(),
538
+ lmStudioDraftModelId: z8.string().optional(),
539
+ lmStudioSpeculativeDecodingEnabled: z8.boolean().optional()
219
540
  });
220
541
  var geminiSchema = apiModelIdProviderModelSchema.extend({
221
- geminiApiKey: z3.string().optional(),
222
- googleGeminiBaseUrl: z3.string().optional(),
223
- enableUrlContext: z3.boolean().optional(),
224
- enableGrounding: z3.boolean().optional()
542
+ geminiApiKey: z8.string().optional(),
543
+ googleGeminiBaseUrl: z8.string().optional(),
544
+ enableUrlContext: z8.boolean().optional(),
545
+ enableGrounding: z8.boolean().optional()
225
546
  });
226
547
  var geminiCliSchema = apiModelIdProviderModelSchema.extend({
227
- geminiCliOAuthPath: z3.string().optional(),
228
- geminiCliProjectId: z3.string().optional()
548
+ geminiCliOAuthPath: z8.string().optional(),
549
+ geminiCliProjectId: z8.string().optional()
229
550
  });
230
551
  var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
231
- openAiNativeApiKey: z3.string().optional(),
232
- openAiNativeBaseUrl: z3.string().optional()
552
+ openAiNativeApiKey: z8.string().optional(),
553
+ openAiNativeBaseUrl: z8.string().optional()
233
554
  });
234
555
  var mistralSchema = apiModelIdProviderModelSchema.extend({
235
- mistralApiKey: z3.string().optional(),
236
- mistralCodestralUrl: z3.string().optional()
556
+ mistralApiKey: z8.string().optional(),
557
+ mistralCodestralUrl: z8.string().optional()
237
558
  });
238
559
  var deepSeekSchema = apiModelIdProviderModelSchema.extend({
239
- deepSeekBaseUrl: z3.string().optional(),
240
- deepSeekApiKey: z3.string().optional()
560
+ deepSeekBaseUrl: z8.string().optional(),
561
+ deepSeekApiKey: z8.string().optional()
241
562
  });
242
563
  var doubaoSchema = apiModelIdProviderModelSchema.extend({
243
- doubaoBaseUrl: z3.string().optional(),
244
- doubaoApiKey: z3.string().optional()
564
+ doubaoBaseUrl: z8.string().optional(),
565
+ doubaoApiKey: z8.string().optional()
245
566
  });
246
567
  var moonshotSchema = apiModelIdProviderModelSchema.extend({
247
- moonshotBaseUrl: z3.union([z3.literal("https://api.moonshot.ai/v1"), z3.literal("https://api.moonshot.cn/v1")]).optional(),
248
- moonshotApiKey: z3.string().optional()
568
+ moonshotBaseUrl: z8.union([z8.literal("https://api.moonshot.ai/v1"), z8.literal("https://api.moonshot.cn/v1")]).optional(),
569
+ moonshotApiKey: z8.string().optional()
249
570
  });
250
571
  var unboundSchema = baseProviderSettingsSchema.extend({
251
- unboundApiKey: z3.string().optional(),
252
- unboundModelId: z3.string().optional()
572
+ unboundApiKey: z8.string().optional(),
573
+ unboundModelId: z8.string().optional()
253
574
  });
254
575
  var requestySchema = baseProviderSettingsSchema.extend({
255
- requestyApiKey: z3.string().optional(),
256
- requestyModelId: z3.string().optional()
576
+ requestyBaseUrl: z8.string().optional(),
577
+ requestyApiKey: z8.string().optional(),
578
+ requestyModelId: z8.string().optional()
257
579
  });
258
580
  var humanRelaySchema = baseProviderSettingsSchema;
259
581
  var fakeAiSchema = baseProviderSettingsSchema.extend({
260
- fakeAi: z3.unknown().optional()
582
+ fakeAi: z8.unknown().optional()
261
583
  });
262
584
  var xaiSchema = apiModelIdProviderModelSchema.extend({
263
- xaiApiKey: z3.string().optional()
585
+ xaiApiKey: z8.string().optional()
264
586
  });
265
587
  var groqSchema = apiModelIdProviderModelSchema.extend({
266
- groqApiKey: z3.string().optional()
588
+ groqApiKey: z8.string().optional()
267
589
  });
268
590
  var huggingFaceSchema = baseProviderSettingsSchema.extend({
269
- huggingFaceApiKey: z3.string().optional(),
270
- huggingFaceModelId: z3.string().optional(),
271
- huggingFaceInferenceProvider: z3.string().optional()
591
+ huggingFaceApiKey: z8.string().optional(),
592
+ huggingFaceModelId: z8.string().optional(),
593
+ huggingFaceInferenceProvider: z8.string().optional()
272
594
  });
273
595
  var chutesSchema = apiModelIdProviderModelSchema.extend({
274
- chutesApiKey: z3.string().optional()
596
+ chutesApiKey: z8.string().optional()
275
597
  });
276
598
  var litellmSchema = baseProviderSettingsSchema.extend({
277
- litellmBaseUrl: z3.string().optional(),
278
- litellmApiKey: z3.string().optional(),
279
- litellmModelId: z3.string().optional(),
280
- litellmUsePromptCache: z3.boolean().optional()
599
+ litellmBaseUrl: z8.string().optional(),
600
+ litellmApiKey: z8.string().optional(),
601
+ litellmModelId: z8.string().optional(),
602
+ litellmUsePromptCache: z8.boolean().optional()
281
603
  });
282
604
  var cerebrasSchema = apiModelIdProviderModelSchema.extend({
283
- cerebrasApiKey: z3.string().optional()
605
+ cerebrasApiKey: z8.string().optional()
284
606
  });
285
607
  var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
286
- sambaNovaApiKey: z3.string().optional()
608
+ sambaNovaApiKey: z8.string().optional()
287
609
  });
288
610
  var zaiSchema = apiModelIdProviderModelSchema.extend({
289
- zaiApiKey: z3.string().optional(),
290
- zaiApiLine: z3.union([z3.literal("china"), z3.literal("international")]).optional()
611
+ zaiApiKey: z8.string().optional(),
612
+ zaiApiLine: z8.union([z8.literal("china"), z8.literal("international")]).optional()
291
613
  });
292
- var defaultSchema = z3.object({
293
- apiProvider: z3.undefined()
614
+ var fireworksSchema = apiModelIdProviderModelSchema.extend({
615
+ fireworksApiKey: z8.string().optional()
294
616
  });
295
- var providerSettingsSchemaDiscriminated = z3.discriminatedUnion("apiProvider", [
296
- anthropicSchema.merge(z3.object({ apiProvider: z3.literal("anthropic") })),
297
- claudeCodeSchema.merge(z3.object({ apiProvider: z3.literal("claude-code") })),
298
- glamaSchema.merge(z3.object({ apiProvider: z3.literal("glama") })),
299
- openRouterSchema.merge(z3.object({ apiProvider: z3.literal("openrouter") })),
300
- bedrockSchema.merge(z3.object({ apiProvider: z3.literal("bedrock") })),
301
- vertexSchema.merge(z3.object({ apiProvider: z3.literal("vertex") })),
302
- openAiSchema.merge(z3.object({ apiProvider: z3.literal("openai") })),
303
- ollamaSchema.merge(z3.object({ apiProvider: z3.literal("ollama") })),
304
- vsCodeLmSchema.merge(z3.object({ apiProvider: z3.literal("vscode-lm") })),
305
- lmStudioSchema.merge(z3.object({ apiProvider: z3.literal("lmstudio") })),
306
- geminiSchema.merge(z3.object({ apiProvider: z3.literal("gemini") })),
307
- geminiCliSchema.merge(z3.object({ apiProvider: z3.literal("gemini-cli") })),
308
- openAiNativeSchema.merge(z3.object({ apiProvider: z3.literal("openai-native") })),
309
- mistralSchema.merge(z3.object({ apiProvider: z3.literal("mistral") })),
310
- deepSeekSchema.merge(z3.object({ apiProvider: z3.literal("deepseek") })),
311
- doubaoSchema.merge(z3.object({ apiProvider: z3.literal("doubao") })),
312
- moonshotSchema.merge(z3.object({ apiProvider: z3.literal("moonshot") })),
313
- unboundSchema.merge(z3.object({ apiProvider: z3.literal("unbound") })),
314
- requestySchema.merge(z3.object({ apiProvider: z3.literal("requesty") })),
315
- humanRelaySchema.merge(z3.object({ apiProvider: z3.literal("human-relay") })),
316
- fakeAiSchema.merge(z3.object({ apiProvider: z3.literal("fake-ai") })),
317
- xaiSchema.merge(z3.object({ apiProvider: z3.literal("xai") })),
318
- groqSchema.merge(z3.object({ apiProvider: z3.literal("groq") })),
319
- huggingFaceSchema.merge(z3.object({ apiProvider: z3.literal("huggingface") })),
320
- chutesSchema.merge(z3.object({ apiProvider: z3.literal("chutes") })),
321
- litellmSchema.merge(z3.object({ apiProvider: z3.literal("litellm") })),
322
- cerebrasSchema.merge(z3.object({ apiProvider: z3.literal("cerebras") })),
323
- sambaNovaSchema.merge(z3.object({ apiProvider: z3.literal("sambanova") })),
324
- zaiSchema.merge(z3.object({ apiProvider: z3.literal("zai") })),
617
+ var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
618
+ ioIntelligenceModelId: z8.string().optional(),
619
+ ioIntelligenceApiKey: z8.string().optional()
620
+ });
621
+ var defaultSchema = z8.object({
622
+ apiProvider: z8.undefined()
623
+ });
624
+ var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
625
+ anthropicSchema.merge(z8.object({ apiProvider: z8.literal("anthropic") })),
626
+ claudeCodeSchema.merge(z8.object({ apiProvider: z8.literal("claude-code") })),
627
+ glamaSchema.merge(z8.object({ apiProvider: z8.literal("glama") })),
628
+ openRouterSchema.merge(z8.object({ apiProvider: z8.literal("openrouter") })),
629
+ bedrockSchema.merge(z8.object({ apiProvider: z8.literal("bedrock") })),
630
+ vertexSchema.merge(z8.object({ apiProvider: z8.literal("vertex") })),
631
+ openAiSchema.merge(z8.object({ apiProvider: z8.literal("openai") })),
632
+ ollamaSchema.merge(z8.object({ apiProvider: z8.literal("ollama") })),
633
+ vsCodeLmSchema.merge(z8.object({ apiProvider: z8.literal("vscode-lm") })),
634
+ lmStudioSchema.merge(z8.object({ apiProvider: z8.literal("lmstudio") })),
635
+ geminiSchema.merge(z8.object({ apiProvider: z8.literal("gemini") })),
636
+ geminiCliSchema.merge(z8.object({ apiProvider: z8.literal("gemini-cli") })),
637
+ openAiNativeSchema.merge(z8.object({ apiProvider: z8.literal("openai-native") })),
638
+ mistralSchema.merge(z8.object({ apiProvider: z8.literal("mistral") })),
639
+ deepSeekSchema.merge(z8.object({ apiProvider: z8.literal("deepseek") })),
640
+ doubaoSchema.merge(z8.object({ apiProvider: z8.literal("doubao") })),
641
+ moonshotSchema.merge(z8.object({ apiProvider: z8.literal("moonshot") })),
642
+ unboundSchema.merge(z8.object({ apiProvider: z8.literal("unbound") })),
643
+ requestySchema.merge(z8.object({ apiProvider: z8.literal("requesty") })),
644
+ humanRelaySchema.merge(z8.object({ apiProvider: z8.literal("human-relay") })),
645
+ fakeAiSchema.merge(z8.object({ apiProvider: z8.literal("fake-ai") })),
646
+ xaiSchema.merge(z8.object({ apiProvider: z8.literal("xai") })),
647
+ groqSchema.merge(z8.object({ apiProvider: z8.literal("groq") })),
648
+ huggingFaceSchema.merge(z8.object({ apiProvider: z8.literal("huggingface") })),
649
+ chutesSchema.merge(z8.object({ apiProvider: z8.literal("chutes") })),
650
+ litellmSchema.merge(z8.object({ apiProvider: z8.literal("litellm") })),
651
+ cerebrasSchema.merge(z8.object({ apiProvider: z8.literal("cerebras") })),
652
+ sambaNovaSchema.merge(z8.object({ apiProvider: z8.literal("sambanova") })),
653
+ zaiSchema.merge(z8.object({ apiProvider: z8.literal("zai") })),
654
+ fireworksSchema.merge(z8.object({ apiProvider: z8.literal("fireworks") })),
655
+ ioIntelligenceSchema.merge(z8.object({ apiProvider: z8.literal("io-intelligence") })),
325
656
  defaultSchema
326
657
  ]);
327
- var providerSettingsSchema = z3.object({
658
+ var providerSettingsSchema = z8.object({
328
659
  apiProvider: providerNamesSchema.optional(),
329
660
  ...anthropicSchema.shape,
330
661
  ...claudeCodeSchema.shape,
@@ -355,11 +686,13 @@ var providerSettingsSchema = z3.object({
355
686
  ...cerebrasSchema.shape,
356
687
  ...sambaNovaSchema.shape,
357
688
  ...zaiSchema.shape,
689
+ ...fireworksSchema.shape,
690
+ ...ioIntelligenceSchema.shape,
358
691
  ...codebaseIndexProviderSchema.shape
359
692
  });
360
- var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z3.string().optional() });
693
+ var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z8.string().optional() });
361
694
  var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
362
- z3.object({ id: z3.string().optional() })
695
+ z8.object({ id: z8.string().optional() })
363
696
  );
364
697
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
365
698
  var MODEL_ID_KEYS = [
@@ -373,7 +706,8 @@ var MODEL_ID_KEYS = [
373
706
  "unboundModelId",
374
707
  "requestyModelId",
375
708
  "litellmModelId",
376
- "huggingFaceModelId"
709
+ "huggingFaceModelId",
710
+ "ioIntelligenceModelId"
377
711
  ];
378
712
  var getModelId = (settings) => {
379
713
  const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
@@ -391,131 +725,26 @@ var getApiProtocol = (provider, modelId) => {
391
725
  };
392
726
 
393
727
  // src/history.ts
394
- import { z as z4 } from "zod";
395
- var historyItemSchema = z4.object({
396
- id: z4.string(),
397
- number: z4.number(),
398
- ts: z4.number(),
399
- task: z4.string(),
400
- tokensIn: z4.number(),
401
- tokensOut: z4.number(),
402
- cacheWrites: z4.number().optional(),
403
- cacheReads: z4.number().optional(),
404
- totalCost: z4.number(),
405
- size: z4.number().optional(),
406
- workspace: z4.string().optional(),
407
- mode: z4.string().optional()
408
- });
409
-
410
- // src/experiment.ts
411
- import { z as z5 } from "zod";
412
- var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
413
- var experimentIdsSchema = z5.enum(experimentIds);
414
- var experimentsSchema = z5.object({
415
- powerSteering: z5.boolean().optional(),
416
- multiFileApplyDiff: z5.boolean().optional(),
417
- preventFocusDisruption: z5.boolean().optional(),
418
- assistantMessageParser: z5.boolean().optional()
419
- });
420
-
421
- // src/telemetry.ts
422
- import { z as z7 } from "zod";
423
-
424
- // src/message.ts
425
- import { z as z6 } from "zod";
426
- var clineAsks = [
427
- "followup",
428
- "command",
429
- "command_output",
430
- "completion_result",
431
- "tool",
432
- "api_req_failed",
433
- "resume_task",
434
- "resume_completed_task",
435
- "mistake_limit_reached",
436
- "browser_action_launch",
437
- "use_mcp_server",
438
- "auto_approval_max_req_reached"
439
- ];
440
- var clineAskSchema = z6.enum(clineAsks);
441
- var blockingAsks = [
442
- "api_req_failed",
443
- "mistake_limit_reached",
444
- "completion_result",
445
- "resume_task",
446
- "resume_completed_task",
447
- "command_output",
448
- "auto_approval_max_req_reached"
449
- ];
450
- function isBlockingAsk(ask) {
451
- return blockingAsks.includes(ask);
452
- }
453
- var clineSays = [
454
- "error",
455
- "api_req_started",
456
- "api_req_finished",
457
- "api_req_retried",
458
- "api_req_retry_delayed",
459
- "api_req_deleted",
460
- "text",
461
- "reasoning",
462
- "completion_result",
463
- "user_feedback",
464
- "user_feedback_diff",
465
- "command_output",
466
- "shell_integration_warning",
467
- "browser_action",
468
- "browser_action_result",
469
- "mcp_server_request_started",
470
- "mcp_server_response",
471
- "subtask_result",
472
- "checkpoint_saved",
473
- "rooignore_error",
474
- "diff_error",
475
- "condense_context",
476
- "condense_context_error",
477
- "codebase_search_result",
478
- "user_edit_todos"
479
- ];
480
- var clineSaySchema = z6.enum(clineSays);
481
- var toolProgressStatusSchema = z6.object({
482
- icon: z6.string().optional(),
483
- text: z6.string().optional()
484
- });
485
- var contextCondenseSchema = z6.object({
486
- cost: z6.number(),
487
- prevContextTokens: z6.number(),
488
- newContextTokens: z6.number(),
489
- summary: z6.string()
490
- });
491
- var clineMessageSchema = z6.object({
492
- ts: z6.number(),
493
- type: z6.union([z6.literal("ask"), z6.literal("say")]),
494
- ask: clineAskSchema.optional(),
495
- say: clineSaySchema.optional(),
496
- text: z6.string().optional(),
497
- images: z6.array(z6.string()).optional(),
498
- partial: z6.boolean().optional(),
499
- reasoning: z6.string().optional(),
500
- conversationHistoryIndex: z6.number().optional(),
501
- checkpoint: z6.record(z6.string(), z6.unknown()).optional(),
502
- progressStatus: toolProgressStatusSchema.optional(),
503
- contextCondense: contextCondenseSchema.optional(),
504
- isProtected: z6.boolean().optional(),
505
- apiProtocol: z6.union([z6.literal("openai"), z6.literal("anthropic")]).optional()
506
- });
507
- var tokenUsageSchema = z6.object({
508
- totalTokensIn: z6.number(),
509
- totalTokensOut: z6.number(),
510
- totalCacheWrites: z6.number().optional(),
511
- totalCacheReads: z6.number().optional(),
512
- totalCost: z6.number(),
513
- contextTokens: z6.number()
728
+ import { z as z9 } from "zod";
729
+ var historyItemSchema = z9.object({
730
+ id: z9.string(),
731
+ number: z9.number(),
732
+ ts: z9.number(),
733
+ task: z9.string(),
734
+ tokensIn: z9.number(),
735
+ tokensOut: z9.number(),
736
+ cacheWrites: z9.number().optional(),
737
+ cacheReads: z9.number().optional(),
738
+ totalCost: z9.number(),
739
+ size: z9.number().optional(),
740
+ workspace: z9.string().optional(),
741
+ mode: z9.string().optional()
514
742
  });
515
743
 
516
744
  // src/telemetry.ts
745
+ import { z as z10 } from "zod";
517
746
  var telemetrySettings = ["unset", "enabled", "disabled"];
518
- var telemetrySettingsSchema = z7.enum(telemetrySettings);
747
+ var telemetrySettingsSchema = z10.enum(telemetrySettings);
519
748
  var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
520
749
  TelemetryEventName2["TASK_CREATED"] = "Task Created";
521
750
  TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
@@ -557,42 +786,42 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
557
786
  TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
558
787
  return TelemetryEventName2;
559
788
  })(TelemetryEventName || {});
560
- var appPropertiesSchema = z7.object({
561
- appName: z7.string(),
562
- appVersion: z7.string(),
563
- vscodeVersion: z7.string(),
564
- platform: z7.string(),
565
- editorName: z7.string(),
566
- language: z7.string(),
567
- mode: z7.string(),
568
- cloudIsAuthenticated: z7.boolean().optional()
789
+ var appPropertiesSchema = z10.object({
790
+ appName: z10.string(),
791
+ appVersion: z10.string(),
792
+ vscodeVersion: z10.string(),
793
+ platform: z10.string(),
794
+ editorName: z10.string(),
795
+ language: z10.string(),
796
+ mode: z10.string(),
797
+ cloudIsAuthenticated: z10.boolean().optional()
569
798
  });
570
- var taskPropertiesSchema = z7.object({
571
- taskId: z7.string().optional(),
572
- apiProvider: z7.enum(providerNames).optional(),
573
- modelId: z7.string().optional(),
574
- diffStrategy: z7.string().optional(),
575
- isSubtask: z7.boolean().optional(),
576
- todos: z7.object({
577
- total: z7.number(),
578
- completed: z7.number(),
579
- inProgress: z7.number(),
580
- pending: z7.number()
799
+ var taskPropertiesSchema = z10.object({
800
+ taskId: z10.string().optional(),
801
+ apiProvider: z10.enum(providerNames).optional(),
802
+ modelId: z10.string().optional(),
803
+ diffStrategy: z10.string().optional(),
804
+ isSubtask: z10.boolean().optional(),
805
+ todos: z10.object({
806
+ total: z10.number(),
807
+ completed: z10.number(),
808
+ inProgress: z10.number(),
809
+ pending: z10.number()
581
810
  }).optional()
582
811
  });
583
- var gitPropertiesSchema = z7.object({
584
- repositoryUrl: z7.string().optional(),
585
- repositoryName: z7.string().optional(),
586
- defaultBranch: z7.string().optional()
812
+ var gitPropertiesSchema = z10.object({
813
+ repositoryUrl: z10.string().optional(),
814
+ repositoryName: z10.string().optional(),
815
+ defaultBranch: z10.string().optional()
587
816
  });
588
- var telemetryPropertiesSchema = z7.object({
817
+ var telemetryPropertiesSchema = z10.object({
589
818
  ...appPropertiesSchema.shape,
590
819
  ...taskPropertiesSchema.shape,
591
820
  ...gitPropertiesSchema.shape
592
821
  });
593
- var rooCodeTelemetryEventSchema = z7.discriminatedUnion("type", [
594
- z7.object({
595
- type: z7.enum([
822
+ var rooCodeTelemetryEventSchema = z10.discriminatedUnion("type", [
823
+ z10.object({
824
+ type: z10.enum([
596
825
  "Task Created" /* TASK_CREATED */,
597
826
  "Task Reopened" /* TASK_RESTARTED */,
598
827
  "Task Completed" /* TASK_COMPLETED */,
@@ -632,67 +861,31 @@ var rooCodeTelemetryEventSchema = z7.discriminatedUnion("type", [
632
861
  ]),
633
862
  properties: telemetryPropertiesSchema
634
863
  }),
635
- z7.object({
636
- type: z7.literal("Task Message" /* TASK_MESSAGE */),
637
- properties: z7.object({
864
+ z10.object({
865
+ type: z10.literal("Task Message" /* TASK_MESSAGE */),
866
+ properties: z10.object({
638
867
  ...telemetryPropertiesSchema.shape,
639
- taskId: z7.string(),
868
+ taskId: z10.string(),
640
869
  message: clineMessageSchema
641
870
  })
642
871
  }),
643
- z7.object({
644
- type: z7.literal("LLM Completion" /* LLM_COMPLETION */),
645
- properties: z7.object({
872
+ z10.object({
873
+ type: z10.literal("LLM Completion" /* LLM_COMPLETION */),
874
+ properties: z10.object({
646
875
  ...telemetryPropertiesSchema.shape,
647
- inputTokens: z7.number(),
648
- outputTokens: z7.number(),
649
- cacheReadTokens: z7.number().optional(),
650
- cacheWriteTokens: z7.number().optional(),
651
- cost: z7.number().optional()
876
+ inputTokens: z10.number(),
877
+ outputTokens: z10.number(),
878
+ cacheReadTokens: z10.number().optional(),
879
+ cacheWriteTokens: z10.number().optional(),
880
+ cost: z10.number().optional()
652
881
  })
653
882
  })
654
883
  ]);
655
884
 
656
885
  // src/mode.ts
657
- import { z as z9 } from "zod";
658
-
659
- // src/tool.ts
660
- import { z as z8 } from "zod";
661
- var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
662
- var toolGroupsSchema = z8.enum(toolGroups);
663
- var toolNames = [
664
- "execute_command",
665
- "read_file",
666
- "write_to_file",
667
- "apply_diff",
668
- "insert_content",
669
- "search_and_replace",
670
- "search_files",
671
- "list_files",
672
- "list_code_definition_names",
673
- "browser_action",
674
- "use_mcp_tool",
675
- "access_mcp_resource",
676
- "ask_followup_question",
677
- "attempt_completion",
678
- "switch_mode",
679
- "new_task",
680
- "fetch_instructions",
681
- "codebase_search",
682
- "update_todo_list"
683
- ];
684
- var toolNamesSchema = z8.enum(toolNames);
685
- var toolUsageSchema = z8.record(
686
- toolNamesSchema,
687
- z8.object({
688
- attempts: z8.number(),
689
- failures: z8.number()
690
- })
691
- );
692
-
693
- // src/mode.ts
694
- var groupOptionsSchema = z9.object({
695
- fileRegex: z9.string().optional().refine(
886
+ import { z as z11 } from "zod";
887
+ var groupOptionsSchema = z11.object({
888
+ fileRegex: z11.string().optional().refine(
696
889
  (pattern) => {
697
890
  if (!pattern) {
698
891
  return true;
@@ -706,10 +899,10 @@ var groupOptionsSchema = z9.object({
706
899
  },
707
900
  { message: "Invalid regular expression pattern" }
708
901
  ),
709
- description: z9.string().optional()
902
+ description: z11.string().optional()
710
903
  });
711
- var groupEntrySchema = z9.union([toolGroupsSchema, z9.tuple([toolGroupsSchema, groupOptionsSchema])]);
712
- var groupEntryArraySchema = z9.array(groupEntrySchema).refine(
904
+ var groupEntrySchema = z11.union([toolGroupsSchema, z11.tuple([toolGroupsSchema, groupOptionsSchema])]);
905
+ var groupEntryArraySchema = z11.array(groupEntrySchema).refine(
713
906
  (groups) => {
714
907
  const seen = /* @__PURE__ */ new Set();
715
908
  return groups.every((group) => {
@@ -723,18 +916,18 @@ var groupEntryArraySchema = z9.array(groupEntrySchema).refine(
723
916
  },
724
917
  { message: "Duplicate groups are not allowed" }
725
918
  );
726
- var modeConfigSchema = z9.object({
727
- slug: z9.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
728
- name: z9.string().min(1, "Name is required"),
729
- roleDefinition: z9.string().min(1, "Role definition is required"),
730
- whenToUse: z9.string().optional(),
731
- description: z9.string().optional(),
732
- customInstructions: z9.string().optional(),
919
+ var modeConfigSchema = z11.object({
920
+ slug: z11.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
921
+ name: z11.string().min(1, "Name is required"),
922
+ roleDefinition: z11.string().min(1, "Role definition is required"),
923
+ whenToUse: z11.string().optional(),
924
+ description: z11.string().optional(),
925
+ customInstructions: z11.string().optional(),
733
926
  groups: groupEntryArraySchema,
734
- source: z9.enum(["global", "project"]).optional()
927
+ source: z11.enum(["global", "project"]).optional()
735
928
  });
736
- var customModesSettingsSchema = z9.object({
737
- customModes: z9.array(modeConfigSchema).refine(
929
+ var customModesSettingsSchema = z11.object({
930
+ customModes: z11.array(modeConfigSchema).refine(
738
931
  (modes) => {
739
932
  const slugs = /* @__PURE__ */ new Set();
740
933
  return modes.every((mode) => {
@@ -750,14 +943,14 @@ var customModesSettingsSchema = z9.object({
750
943
  }
751
944
  )
752
945
  });
753
- var promptComponentSchema = z9.object({
754
- roleDefinition: z9.string().optional(),
755
- whenToUse: z9.string().optional(),
756
- description: z9.string().optional(),
757
- customInstructions: z9.string().optional()
946
+ var promptComponentSchema = z11.object({
947
+ roleDefinition: z11.string().optional(),
948
+ whenToUse: z11.string().optional(),
949
+ description: z11.string().optional(),
950
+ customInstructions: z11.string().optional()
758
951
  });
759
- var customModePromptsSchema = z9.record(z9.string(), promptComponentSchema.optional());
760
- var customSupportPromptsSchema = z9.record(z9.string(), z9.string().optional());
952
+ var customModePromptsSchema = z11.record(z11.string(), promptComponentSchema.optional());
953
+ var customSupportPromptsSchema = z11.record(z11.string(), z11.string().optional());
761
954
  var DEFAULT_MODES = [
762
955
  {
763
956
  slug: "architect",
@@ -806,7 +999,7 @@ var DEFAULT_MODES = [
806
999
  ];
807
1000
 
808
1001
  // src/vscode.ts
809
- import { z as z10 } from "zod";
1002
+ import { z as z12 } from "zod";
810
1003
  var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
811
1004
  var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
812
1005
  var commandIds = [
@@ -851,110 +1044,111 @@ var languages = [
851
1044
  "zh-CN",
852
1045
  "zh-TW"
853
1046
  ];
854
- var languagesSchema = z10.enum(languages);
1047
+ var languagesSchema = z12.enum(languages);
855
1048
  var isLanguage = (value) => languages.includes(value);
856
1049
 
857
1050
  // src/global-settings.ts
858
1051
  var DEFAULT_WRITE_DELAY_MS = 1e3;
859
1052
  var DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 5e4;
860
- var globalSettingsSchema = z11.object({
861
- currentApiConfigName: z11.string().optional(),
862
- listApiConfigMeta: z11.array(providerSettingsEntrySchema).optional(),
863
- pinnedApiConfigs: z11.record(z11.string(), z11.boolean()).optional(),
864
- lastShownAnnouncementId: z11.string().optional(),
865
- customInstructions: z11.string().optional(),
866
- taskHistory: z11.array(historyItemSchema).optional(),
867
- condensingApiConfigId: z11.string().optional(),
868
- customCondensingPrompt: z11.string().optional(),
869
- autoApprovalEnabled: z11.boolean().optional(),
870
- alwaysAllowReadOnly: z11.boolean().optional(),
871
- alwaysAllowReadOnlyOutsideWorkspace: z11.boolean().optional(),
872
- alwaysAllowWrite: z11.boolean().optional(),
873
- alwaysAllowWriteOutsideWorkspace: z11.boolean().optional(),
874
- alwaysAllowWriteProtected: z11.boolean().optional(),
875
- writeDelayMs: z11.number().min(0).optional(),
876
- alwaysAllowBrowser: z11.boolean().optional(),
877
- alwaysApproveResubmit: z11.boolean().optional(),
878
- requestDelaySeconds: z11.number().optional(),
879
- alwaysAllowMcp: z11.boolean().optional(),
880
- alwaysAllowModeSwitch: z11.boolean().optional(),
881
- alwaysAllowSubtasks: z11.boolean().optional(),
882
- alwaysAllowExecute: z11.boolean().optional(),
883
- alwaysAllowFollowupQuestions: z11.boolean().optional(),
884
- followupAutoApproveTimeoutMs: z11.number().optional(),
885
- alwaysAllowUpdateTodoList: z11.boolean().optional(),
886
- allowedCommands: z11.array(z11.string()).optional(),
887
- deniedCommands: z11.array(z11.string()).optional(),
888
- commandExecutionTimeout: z11.number().optional(),
889
- commandTimeoutAllowlist: z11.array(z11.string()).optional(),
890
- preventCompletionWithOpenTodos: z11.boolean().optional(),
891
- allowedMaxRequests: z11.number().nullish(),
892
- allowedMaxCost: z11.number().nullish(),
893
- autoCondenseContext: z11.boolean().optional(),
894
- autoCondenseContextPercent: z11.number().optional(),
895
- maxConcurrentFileReads: z11.number().optional(),
1053
+ var DEFAULT_USAGE_COLLECTION_TIMEOUT_MS = 3e4;
1054
+ var globalSettingsSchema = z13.object({
1055
+ currentApiConfigName: z13.string().optional(),
1056
+ listApiConfigMeta: z13.array(providerSettingsEntrySchema).optional(),
1057
+ pinnedApiConfigs: z13.record(z13.string(), z13.boolean()).optional(),
1058
+ lastShownAnnouncementId: z13.string().optional(),
1059
+ customInstructions: z13.string().optional(),
1060
+ taskHistory: z13.array(historyItemSchema).optional(),
1061
+ condensingApiConfigId: z13.string().optional(),
1062
+ customCondensingPrompt: z13.string().optional(),
1063
+ autoApprovalEnabled: z13.boolean().optional(),
1064
+ alwaysAllowReadOnly: z13.boolean().optional(),
1065
+ alwaysAllowReadOnlyOutsideWorkspace: z13.boolean().optional(),
1066
+ alwaysAllowWrite: z13.boolean().optional(),
1067
+ alwaysAllowWriteOutsideWorkspace: z13.boolean().optional(),
1068
+ alwaysAllowWriteProtected: z13.boolean().optional(),
1069
+ writeDelayMs: z13.number().min(0).optional(),
1070
+ alwaysAllowBrowser: z13.boolean().optional(),
1071
+ alwaysApproveResubmit: z13.boolean().optional(),
1072
+ requestDelaySeconds: z13.number().optional(),
1073
+ alwaysAllowMcp: z13.boolean().optional(),
1074
+ alwaysAllowModeSwitch: z13.boolean().optional(),
1075
+ alwaysAllowSubtasks: z13.boolean().optional(),
1076
+ alwaysAllowExecute: z13.boolean().optional(),
1077
+ alwaysAllowFollowupQuestions: z13.boolean().optional(),
1078
+ followupAutoApproveTimeoutMs: z13.number().optional(),
1079
+ alwaysAllowUpdateTodoList: z13.boolean().optional(),
1080
+ allowedCommands: z13.array(z13.string()).optional(),
1081
+ deniedCommands: z13.array(z13.string()).optional(),
1082
+ commandExecutionTimeout: z13.number().optional(),
1083
+ commandTimeoutAllowlist: z13.array(z13.string()).optional(),
1084
+ preventCompletionWithOpenTodos: z13.boolean().optional(),
1085
+ allowedMaxRequests: z13.number().nullish(),
1086
+ allowedMaxCost: z13.number().nullish(),
1087
+ autoCondenseContext: z13.boolean().optional(),
1088
+ autoCondenseContextPercent: z13.number().optional(),
1089
+ maxConcurrentFileReads: z13.number().optional(),
896
1090
  /**
897
1091
  * Whether to include diagnostic messages (errors, warnings) in tool outputs
898
1092
  * @default true
899
1093
  */
900
- includeDiagnosticMessages: z11.boolean().optional(),
1094
+ includeDiagnosticMessages: z13.boolean().optional(),
901
1095
  /**
902
1096
  * Maximum number of diagnostic messages to include in tool outputs
903
1097
  * @default 50
904
1098
  */
905
- maxDiagnosticMessages: z11.number().optional(),
906
- browserToolEnabled: z11.boolean().optional(),
907
- browserViewportSize: z11.string().optional(),
908
- screenshotQuality: z11.number().optional(),
909
- remoteBrowserEnabled: z11.boolean().optional(),
910
- remoteBrowserHost: z11.string().optional(),
911
- cachedChromeHostUrl: z11.string().optional(),
912
- enableCheckpoints: z11.boolean().optional(),
913
- ttsEnabled: z11.boolean().optional(),
914
- ttsSpeed: z11.number().optional(),
915
- soundEnabled: z11.boolean().optional(),
916
- soundVolume: z11.number().optional(),
917
- maxOpenTabsContext: z11.number().optional(),
918
- maxWorkspaceFiles: z11.number().optional(),
919
- showRooIgnoredFiles: z11.boolean().optional(),
920
- maxReadFileLine: z11.number().optional(),
921
- maxImageFileSize: z11.number().optional(),
922
- maxTotalImageSize: z11.number().optional(),
923
- terminalOutputLineLimit: z11.number().optional(),
924
- terminalOutputCharacterLimit: z11.number().optional(),
925
- terminalShellIntegrationTimeout: z11.number().optional(),
926
- terminalShellIntegrationDisabled: z11.boolean().optional(),
927
- terminalCommandDelay: z11.number().optional(),
928
- terminalPowershellCounter: z11.boolean().optional(),
929
- terminalZshClearEolMark: z11.boolean().optional(),
930
- terminalZshOhMy: z11.boolean().optional(),
931
- terminalZshP10k: z11.boolean().optional(),
932
- terminalZdotdir: z11.boolean().optional(),
933
- terminalCompressProgressBar: z11.boolean().optional(),
934
- diagnosticsEnabled: z11.boolean().optional(),
935
- rateLimitSeconds: z11.number().optional(),
936
- diffEnabled: z11.boolean().optional(),
937
- fuzzyMatchThreshold: z11.number().optional(),
1099
+ maxDiagnosticMessages: z13.number().optional(),
1100
+ browserToolEnabled: z13.boolean().optional(),
1101
+ browserViewportSize: z13.string().optional(),
1102
+ screenshotQuality: z13.number().optional(),
1103
+ remoteBrowserEnabled: z13.boolean().optional(),
1104
+ remoteBrowserHost: z13.string().optional(),
1105
+ cachedChromeHostUrl: z13.string().optional(),
1106
+ enableCheckpoints: z13.boolean().optional(),
1107
+ ttsEnabled: z13.boolean().optional(),
1108
+ ttsSpeed: z13.number().optional(),
1109
+ soundEnabled: z13.boolean().optional(),
1110
+ soundVolume: z13.number().optional(),
1111
+ maxOpenTabsContext: z13.number().optional(),
1112
+ maxWorkspaceFiles: z13.number().optional(),
1113
+ showRooIgnoredFiles: z13.boolean().optional(),
1114
+ maxReadFileLine: z13.number().optional(),
1115
+ maxImageFileSize: z13.number().optional(),
1116
+ maxTotalImageSize: z13.number().optional(),
1117
+ terminalOutputLineLimit: z13.number().optional(),
1118
+ terminalOutputCharacterLimit: z13.number().optional(),
1119
+ terminalShellIntegrationTimeout: z13.number().optional(),
1120
+ terminalShellIntegrationDisabled: z13.boolean().optional(),
1121
+ terminalCommandDelay: z13.number().optional(),
1122
+ terminalPowershellCounter: z13.boolean().optional(),
1123
+ terminalZshClearEolMark: z13.boolean().optional(),
1124
+ terminalZshOhMy: z13.boolean().optional(),
1125
+ terminalZshP10k: z13.boolean().optional(),
1126
+ terminalZdotdir: z13.boolean().optional(),
1127
+ terminalCompressProgressBar: z13.boolean().optional(),
1128
+ diagnosticsEnabled: z13.boolean().optional(),
1129
+ rateLimitSeconds: z13.number().optional(),
1130
+ diffEnabled: z13.boolean().optional(),
1131
+ fuzzyMatchThreshold: z13.number().optional(),
938
1132
  experiments: experimentsSchema.optional(),
939
1133
  codebaseIndexModels: codebaseIndexModelsSchema.optional(),
940
1134
  codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
941
1135
  language: languagesSchema.optional(),
942
1136
  telemetrySetting: telemetrySettingsSchema.optional(),
943
- mcpEnabled: z11.boolean().optional(),
944
- enableMcpServerCreation: z11.boolean().optional(),
945
- remoteControlEnabled: z11.boolean().optional(),
946
- mode: z11.string().optional(),
947
- modeApiConfigs: z11.record(z11.string(), z11.string()).optional(),
948
- customModes: z11.array(modeConfigSchema).optional(),
1137
+ mcpEnabled: z13.boolean().optional(),
1138
+ enableMcpServerCreation: z13.boolean().optional(),
1139
+ remoteControlEnabled: z13.boolean().optional(),
1140
+ mode: z13.string().optional(),
1141
+ modeApiConfigs: z13.record(z13.string(), z13.string()).optional(),
1142
+ customModes: z13.array(modeConfigSchema).optional(),
949
1143
  customModePrompts: customModePromptsSchema.optional(),
950
1144
  customSupportPrompts: customSupportPromptsSchema.optional(),
951
- enhancementApiConfigId: z11.string().optional(),
952
- includeTaskHistoryInEnhance: z11.boolean().optional(),
953
- historyPreviewCollapsed: z11.boolean().optional(),
954
- profileThresholds: z11.record(z11.string(), z11.number()).optional(),
955
- hasOpenedModeSelector: z11.boolean().optional(),
956
- lastModeExportPath: z11.string().optional(),
957
- lastModeImportPath: z11.string().optional()
1145
+ enhancementApiConfigId: z13.string().optional(),
1146
+ includeTaskHistoryInEnhance: z13.boolean().optional(),
1147
+ historyPreviewCollapsed: z13.boolean().optional(),
1148
+ profileThresholds: z13.record(z13.string(), z13.number()).optional(),
1149
+ hasOpenedModeSelector: z13.boolean().optional(),
1150
+ lastModeExportPath: z13.string().optional(),
1151
+ lastModeImportPath: z13.string().optional()
958
1152
  });
959
1153
  var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
960
1154
  var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
@@ -985,7 +1179,9 @@ var SECRET_STATE_KEYS = [
985
1179
  "codebaseIndexGeminiApiKey",
986
1180
  "codebaseIndexMistralApiKey",
987
1181
  "huggingFaceApiKey",
988
- "sambaNovaApiKey"
1182
+ "sambaNovaApiKey",
1183
+ "fireworksApiKey",
1184
+ "ioIntelligenceApiKey"
989
1185
  ];
990
1186
  var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
991
1187
  var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
@@ -1053,300 +1249,14 @@ var EVALS_SETTINGS = {
1053
1249
  telemetrySetting: "enabled",
1054
1250
  mcpEnabled: false,
1055
1251
  remoteControlEnabled: false,
1056
- mode: "code",
1057
- // "architect",
1058
- customModes: []
1059
- };
1060
- var EVALS_TIMEOUT = 5 * 60 * 1e3;
1061
-
1062
- // src/marketplace.ts
1063
- import { z as z12 } from "zod";
1064
- var mcpParameterSchema = z12.object({
1065
- name: z12.string().min(1),
1066
- key: z12.string().min(1),
1067
- placeholder: z12.string().optional(),
1068
- optional: z12.boolean().optional().default(false)
1069
- });
1070
- var mcpInstallationMethodSchema = z12.object({
1071
- name: z12.string().min(1),
1072
- content: z12.string().min(1),
1073
- parameters: z12.array(mcpParameterSchema).optional(),
1074
- prerequisites: z12.array(z12.string()).optional()
1075
- });
1076
- var marketplaceItemTypeSchema = z12.enum(["mode", "mcp"]);
1077
- var baseMarketplaceItemSchema = z12.object({
1078
- id: z12.string().min(1),
1079
- name: z12.string().min(1, "Name is required"),
1080
- description: z12.string(),
1081
- author: z12.string().optional(),
1082
- authorUrl: z12.string().url("Author URL must be a valid URL").optional(),
1083
- tags: z12.array(z12.string()).optional(),
1084
- prerequisites: z12.array(z12.string()).optional()
1085
- });
1086
- var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
1087
- content: z12.string().min(1)
1088
- // YAML content for modes
1089
- });
1090
- var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
1091
- url: z12.string().url(),
1092
- // Required url field
1093
- content: z12.union([z12.string().min(1), z12.array(mcpInstallationMethodSchema)]),
1094
- // Single config or array of methods
1095
- parameters: z12.array(mcpParameterSchema).optional()
1096
- });
1097
- var marketplaceItemSchema = z12.discriminatedUnion("type", [
1098
- // Mode marketplace item
1099
- modeMarketplaceItemSchema.extend({
1100
- type: z12.literal("mode")
1101
- }),
1102
- // MCP marketplace item
1103
- mcpMarketplaceItemSchema.extend({
1104
- type: z12.literal("mcp")
1105
- })
1106
- ]);
1107
- var installMarketplaceItemOptionsSchema = z12.object({
1108
- target: z12.enum(["global", "project"]).optional().default("project"),
1109
- parameters: z12.record(z12.string(), z12.any()).optional()
1110
- });
1111
-
1112
- // src/cloud.ts
1113
- var organizationAllowListSchema = z13.object({
1114
- allowAll: z13.boolean(),
1115
- providers: z13.record(
1116
- z13.object({
1117
- allowAll: z13.boolean(),
1118
- models: z13.array(z13.string()).optional()
1119
- })
1120
- )
1121
- });
1122
- var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
1123
- enableCheckpoints: true,
1124
- fuzzyMatchThreshold: true,
1125
- maxOpenTabsContext: true,
1126
- maxReadFileLine: true,
1127
- maxWorkspaceFiles: true,
1128
- showRooIgnoredFiles: true,
1129
- terminalCommandDelay: true,
1130
- terminalCompressProgressBar: true,
1131
- terminalOutputLineLimit: true,
1132
- terminalShellIntegrationDisabled: true,
1133
- terminalShellIntegrationTimeout: true,
1134
- terminalZshClearEolMark: true
1135
- }).merge(
1136
- z13.object({
1137
- maxOpenTabsContext: z13.number().int().nonnegative().optional(),
1138
- maxReadFileLine: z13.number().int().gte(-1).optional(),
1139
- maxWorkspaceFiles: z13.number().int().nonnegative().optional(),
1140
- terminalCommandDelay: z13.number().int().nonnegative().optional(),
1141
- terminalOutputLineLimit: z13.number().int().nonnegative().optional(),
1142
- terminalShellIntegrationTimeout: z13.number().int().nonnegative().optional()
1143
- })
1144
- );
1145
- var organizationCloudSettingsSchema = z13.object({
1146
- recordTaskMessages: z13.boolean().optional(),
1147
- enableTaskSharing: z13.boolean().optional(),
1148
- taskShareExpirationDays: z13.number().int().positive().optional(),
1149
- allowMembersViewAllTasks: z13.boolean().optional()
1150
- });
1151
- var organizationSettingsSchema = z13.object({
1152
- version: z13.number(),
1153
- cloudSettings: organizationCloudSettingsSchema.optional(),
1154
- defaultSettings: organizationDefaultSettingsSchema,
1155
- allowList: organizationAllowListSchema,
1156
- hiddenMcps: z13.array(z13.string()).optional(),
1157
- hideMarketplaceMcps: z13.boolean().optional(),
1158
- mcps: z13.array(mcpMarketplaceItemSchema).optional(),
1159
- providerProfiles: z13.record(z13.string(), discriminatedProviderSettingsWithIdSchema).optional()
1160
- });
1161
- var ORGANIZATION_ALLOW_ALL = {
1162
- allowAll: true,
1163
- providers: {}
1164
- };
1165
- var ORGANIZATION_DEFAULT = {
1166
- version: 0,
1167
- cloudSettings: {
1168
- recordTaskMessages: true,
1169
- enableTaskSharing: true,
1170
- taskShareExpirationDays: 30,
1171
- allowMembersViewAllTasks: true
1172
- },
1173
- defaultSettings: {},
1174
- allowList: ORGANIZATION_ALLOW_ALL
1175
- };
1176
- var shareResponseSchema = z13.object({
1177
- success: z13.boolean(),
1178
- shareUrl: z13.string().optional(),
1179
- error: z13.string().optional(),
1180
- isNewShare: z13.boolean().optional(),
1181
- manageUrl: z13.string().optional()
1182
- });
1183
-
1184
- // src/events.ts
1185
- import { z as z14 } from "zod";
1186
- var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
1187
- RooCodeEventName2["TaskCreated"] = "taskCreated";
1188
- RooCodeEventName2["TaskStarted"] = "taskStarted";
1189
- RooCodeEventName2["TaskCompleted"] = "taskCompleted";
1190
- RooCodeEventName2["TaskAborted"] = "taskAborted";
1191
- RooCodeEventName2["TaskFocused"] = "taskFocused";
1192
- RooCodeEventName2["TaskUnfocused"] = "taskUnfocused";
1193
- RooCodeEventName2["TaskActive"] = "taskActive";
1194
- RooCodeEventName2["TaskIdle"] = "taskIdle";
1195
- RooCodeEventName2["TaskPaused"] = "taskPaused";
1196
- RooCodeEventName2["TaskUnpaused"] = "taskUnpaused";
1197
- RooCodeEventName2["TaskSpawned"] = "taskSpawned";
1198
- RooCodeEventName2["Message"] = "message";
1199
- RooCodeEventName2["TaskModeSwitched"] = "taskModeSwitched";
1200
- RooCodeEventName2["TaskAskResponded"] = "taskAskResponded";
1201
- RooCodeEventName2["TaskTokenUsageUpdated"] = "taskTokenUsageUpdated";
1202
- RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
1203
- RooCodeEventName2["EvalPass"] = "evalPass";
1204
- RooCodeEventName2["EvalFail"] = "evalFail";
1205
- return RooCodeEventName2;
1206
- })(RooCodeEventName || {});
1207
- var rooCodeEventsSchema = z14.object({
1208
- ["taskCreated" /* TaskCreated */]: z14.tuple([z14.string()]),
1209
- ["taskStarted" /* TaskStarted */]: z14.tuple([z14.string()]),
1210
- ["taskCompleted" /* TaskCompleted */]: z14.tuple([
1211
- z14.string(),
1212
- tokenUsageSchema,
1213
- toolUsageSchema,
1214
- z14.object({
1215
- isSubtask: z14.boolean()
1216
- })
1217
- ]),
1218
- ["taskAborted" /* TaskAborted */]: z14.tuple([z14.string()]),
1219
- ["taskFocused" /* TaskFocused */]: z14.tuple([z14.string()]),
1220
- ["taskUnfocused" /* TaskUnfocused */]: z14.tuple([z14.string()]),
1221
- ["taskActive" /* TaskActive */]: z14.tuple([z14.string()]),
1222
- ["taskIdle" /* TaskIdle */]: z14.tuple([z14.string()]),
1223
- ["taskPaused" /* TaskPaused */]: z14.tuple([z14.string()]),
1224
- ["taskUnpaused" /* TaskUnpaused */]: z14.tuple([z14.string()]),
1225
- ["taskSpawned" /* TaskSpawned */]: z14.tuple([z14.string(), z14.string()]),
1226
- ["message" /* Message */]: z14.tuple([
1227
- z14.object({
1228
- taskId: z14.string(),
1229
- action: z14.union([z14.literal("created"), z14.literal("updated")]),
1230
- message: clineMessageSchema
1231
- })
1232
- ]),
1233
- ["taskModeSwitched" /* TaskModeSwitched */]: z14.tuple([z14.string(), z14.string()]),
1234
- ["taskAskResponded" /* TaskAskResponded */]: z14.tuple([z14.string()]),
1235
- ["taskToolFailed" /* TaskToolFailed */]: z14.tuple([z14.string(), toolNamesSchema, z14.string()]),
1236
- ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z14.tuple([z14.string(), tokenUsageSchema])
1237
- });
1238
- var taskEventSchema = z14.discriminatedUnion("eventName", [
1239
- // Task Provider Lifecycle
1240
- z14.object({
1241
- eventName: z14.literal("taskCreated" /* TaskCreated */),
1242
- payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
1243
- taskId: z14.number().optional()
1244
- }),
1245
- // Task Lifecycle
1246
- z14.object({
1247
- eventName: z14.literal("taskStarted" /* TaskStarted */),
1248
- payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
1249
- taskId: z14.number().optional()
1250
- }),
1251
- z14.object({
1252
- eventName: z14.literal("taskCompleted" /* TaskCompleted */),
1253
- payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
1254
- taskId: z14.number().optional()
1255
- }),
1256
- z14.object({
1257
- eventName: z14.literal("taskAborted" /* TaskAborted */),
1258
- payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
1259
- taskId: z14.number().optional()
1260
- }),
1261
- z14.object({
1262
- eventName: z14.literal("taskFocused" /* TaskFocused */),
1263
- payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
1264
- taskId: z14.number().optional()
1265
- }),
1266
- z14.object({
1267
- eventName: z14.literal("taskUnfocused" /* TaskUnfocused */),
1268
- payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
1269
- taskId: z14.number().optional()
1270
- }),
1271
- z14.object({
1272
- eventName: z14.literal("taskActive" /* TaskActive */),
1273
- payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
1274
- taskId: z14.number().optional()
1275
- }),
1276
- z14.object({
1277
- eventName: z14.literal("taskIdle" /* TaskIdle */),
1278
- payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
1279
- taskId: z14.number().optional()
1280
- }),
1281
- // Subtask Lifecycle
1282
- z14.object({
1283
- eventName: z14.literal("taskPaused" /* TaskPaused */),
1284
- payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
1285
- taskId: z14.number().optional()
1286
- }),
1287
- z14.object({
1288
- eventName: z14.literal("taskUnpaused" /* TaskUnpaused */),
1289
- payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
1290
- taskId: z14.number().optional()
1291
- }),
1292
- z14.object({
1293
- eventName: z14.literal("taskSpawned" /* TaskSpawned */),
1294
- payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
1295
- taskId: z14.number().optional()
1296
- }),
1297
- // Task Execution
1298
- z14.object({
1299
- eventName: z14.literal("message" /* Message */),
1300
- payload: rooCodeEventsSchema.shape["message" /* Message */],
1301
- taskId: z14.number().optional()
1302
- }),
1303
- z14.object({
1304
- eventName: z14.literal("taskModeSwitched" /* TaskModeSwitched */),
1305
- payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
1306
- taskId: z14.number().optional()
1307
- }),
1308
- z14.object({
1309
- eventName: z14.literal("taskAskResponded" /* TaskAskResponded */),
1310
- payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
1311
- taskId: z14.number().optional()
1312
- }),
1313
- // Task Analytics
1314
- z14.object({
1315
- eventName: z14.literal("taskToolFailed" /* TaskToolFailed */),
1316
- payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
1317
- taskId: z14.number().optional()
1318
- }),
1319
- z14.object({
1320
- eventName: z14.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
1321
- payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
1322
- taskId: z14.number().optional()
1323
- }),
1324
- // Evals
1325
- z14.object({
1326
- eventName: z14.literal("evalPass" /* EvalPass */),
1327
- payload: z14.undefined(),
1328
- taskId: z14.number()
1329
- }),
1330
- z14.object({
1331
- eventName: z14.literal("evalFail" /* EvalFail */),
1332
- payload: z14.undefined(),
1333
- taskId: z14.number()
1334
- })
1335
- ]);
1336
-
1337
- // src/followup.ts
1338
- import { z as z15 } from "zod";
1339
- var suggestionItemSchema = z15.object({
1340
- answer: z15.string(),
1341
- mode: z15.string().optional()
1342
- });
1343
- var followUpDataSchema = z15.object({
1344
- question: z15.string().optional(),
1345
- suggest: z15.array(suggestionItemSchema).optional()
1346
- });
1252
+ mode: "code",
1253
+ // "architect",
1254
+ customModes: []
1255
+ };
1256
+ var EVALS_TIMEOUT = 5 * 60 * 1e3;
1347
1257
 
1348
1258
  // src/ipc.ts
1349
- import { z as z16 } from "zod";
1259
+ import { z as z14 } from "zod";
1350
1260
  var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
1351
1261
  IpcMessageType2["Connect"] = "Connect";
1352
1262
  IpcMessageType2["Disconnect"] = "Disconnect";
@@ -1360,10 +1270,10 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
1360
1270
  IpcOrigin2["Server"] = "server";
1361
1271
  return IpcOrigin2;
1362
1272
  })(IpcOrigin || {});
1363
- var ackSchema = z16.object({
1364
- clientId: z16.string(),
1365
- pid: z16.number(),
1366
- ppid: z16.number()
1273
+ var ackSchema = z14.object({
1274
+ clientId: z14.string(),
1275
+ pid: z14.number(),
1276
+ ppid: z14.number()
1367
1277
  });
1368
1278
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
1369
1279
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -1371,106 +1281,156 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
1371
1281
  TaskCommandName2["CloseTask"] = "CloseTask";
1372
1282
  return TaskCommandName2;
1373
1283
  })(TaskCommandName || {});
1374
- var taskCommandSchema = z16.discriminatedUnion("commandName", [
1375
- z16.object({
1376
- commandName: z16.literal("StartNewTask" /* StartNewTask */),
1377
- data: z16.object({
1284
+ var taskCommandSchema = z14.discriminatedUnion("commandName", [
1285
+ z14.object({
1286
+ commandName: z14.literal("StartNewTask" /* StartNewTask */),
1287
+ data: z14.object({
1378
1288
  configuration: rooCodeSettingsSchema,
1379
- text: z16.string(),
1380
- images: z16.array(z16.string()).optional(),
1381
- newTab: z16.boolean().optional()
1289
+ text: z14.string(),
1290
+ images: z14.array(z14.string()).optional(),
1291
+ newTab: z14.boolean().optional()
1382
1292
  })
1383
1293
  }),
1384
- z16.object({
1385
- commandName: z16.literal("CancelTask" /* CancelTask */),
1386
- data: z16.string()
1294
+ z14.object({
1295
+ commandName: z14.literal("CancelTask" /* CancelTask */),
1296
+ data: z14.string()
1387
1297
  }),
1388
- z16.object({
1389
- commandName: z16.literal("CloseTask" /* CloseTask */),
1390
- data: z16.string()
1298
+ z14.object({
1299
+ commandName: z14.literal("CloseTask" /* CloseTask */),
1300
+ data: z14.string()
1391
1301
  })
1392
1302
  ]);
1393
- var ipcMessageSchema = z16.discriminatedUnion("type", [
1394
- z16.object({
1395
- type: z16.literal("Ack" /* Ack */),
1396
- origin: z16.literal("server" /* Server */),
1303
+ var ipcMessageSchema = z14.discriminatedUnion("type", [
1304
+ z14.object({
1305
+ type: z14.literal("Ack" /* Ack */),
1306
+ origin: z14.literal("server" /* Server */),
1397
1307
  data: ackSchema
1398
1308
  }),
1399
- z16.object({
1400
- type: z16.literal("TaskCommand" /* TaskCommand */),
1401
- origin: z16.literal("client" /* Client */),
1402
- clientId: z16.string(),
1309
+ z14.object({
1310
+ type: z14.literal("TaskCommand" /* TaskCommand */),
1311
+ origin: z14.literal("client" /* Client */),
1312
+ clientId: z14.string(),
1403
1313
  data: taskCommandSchema
1404
1314
  }),
1405
- z16.object({
1406
- type: z16.literal("TaskEvent" /* TaskEvent */),
1407
- origin: z16.literal("server" /* Server */),
1408
- relayClientId: z16.string().optional(),
1315
+ z14.object({
1316
+ type: z14.literal("TaskEvent" /* TaskEvent */),
1317
+ origin: z14.literal("server" /* Server */),
1318
+ relayClientId: z14.string().optional(),
1409
1319
  data: taskEventSchema
1410
1320
  })
1411
1321
  ]);
1412
1322
 
1323
+ // src/marketplace.ts
1324
+ import { z as z15 } from "zod";
1325
+ var mcpParameterSchema = z15.object({
1326
+ name: z15.string().min(1),
1327
+ key: z15.string().min(1),
1328
+ placeholder: z15.string().optional(),
1329
+ optional: z15.boolean().optional().default(false)
1330
+ });
1331
+ var mcpInstallationMethodSchema = z15.object({
1332
+ name: z15.string().min(1),
1333
+ content: z15.string().min(1),
1334
+ parameters: z15.array(mcpParameterSchema).optional(),
1335
+ prerequisites: z15.array(z15.string()).optional()
1336
+ });
1337
+ var marketplaceItemTypeSchema = z15.enum(["mode", "mcp"]);
1338
+ var baseMarketplaceItemSchema = z15.object({
1339
+ id: z15.string().min(1),
1340
+ name: z15.string().min(1, "Name is required"),
1341
+ description: z15.string(),
1342
+ author: z15.string().optional(),
1343
+ authorUrl: z15.string().url("Author URL must be a valid URL").optional(),
1344
+ tags: z15.array(z15.string()).optional(),
1345
+ prerequisites: z15.array(z15.string()).optional()
1346
+ });
1347
+ var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
1348
+ content: z15.string().min(1)
1349
+ // YAML content for modes
1350
+ });
1351
+ var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
1352
+ url: z15.string().url(),
1353
+ // Required url field
1354
+ content: z15.union([z15.string().min(1), z15.array(mcpInstallationMethodSchema)]),
1355
+ // Single config or array of methods
1356
+ parameters: z15.array(mcpParameterSchema).optional()
1357
+ });
1358
+ var marketplaceItemSchema = z15.discriminatedUnion("type", [
1359
+ // Mode marketplace item
1360
+ modeMarketplaceItemSchema.extend({
1361
+ type: z15.literal("mode")
1362
+ }),
1363
+ // MCP marketplace item
1364
+ mcpMarketplaceItemSchema.extend({
1365
+ type: z15.literal("mcp")
1366
+ })
1367
+ ]);
1368
+ var installMarketplaceItemOptionsSchema = z15.object({
1369
+ target: z15.enum(["global", "project"]).optional().default("project"),
1370
+ parameters: z15.record(z15.string(), z15.any()).optional()
1371
+ });
1372
+
1413
1373
  // src/mcp.ts
1414
- import { z as z17 } from "zod";
1415
- var mcpExecutionStatusSchema = z17.discriminatedUnion("status", [
1416
- z17.object({
1417
- executionId: z17.string(),
1418
- status: z17.literal("started"),
1419
- serverName: z17.string(),
1420
- toolName: z17.string()
1374
+ import { z as z16 } from "zod";
1375
+ var mcpExecutionStatusSchema = z16.discriminatedUnion("status", [
1376
+ z16.object({
1377
+ executionId: z16.string(),
1378
+ status: z16.literal("started"),
1379
+ serverName: z16.string(),
1380
+ toolName: z16.string()
1421
1381
  }),
1422
- z17.object({
1423
- executionId: z17.string(),
1424
- status: z17.literal("output"),
1425
- response: z17.string()
1382
+ z16.object({
1383
+ executionId: z16.string(),
1384
+ status: z16.literal("output"),
1385
+ response: z16.string()
1426
1386
  }),
1427
- z17.object({
1428
- executionId: z17.string(),
1429
- status: z17.literal("completed"),
1430
- response: z17.string().optional()
1387
+ z16.object({
1388
+ executionId: z16.string(),
1389
+ status: z16.literal("completed"),
1390
+ response: z16.string().optional()
1431
1391
  }),
1432
- z17.object({
1433
- executionId: z17.string(),
1434
- status: z17.literal("error"),
1435
- error: z17.string().optional()
1392
+ z16.object({
1393
+ executionId: z16.string(),
1394
+ status: z16.literal("error"),
1395
+ error: z16.string().optional()
1436
1396
  })
1437
1397
  ]);
1438
1398
 
1439
1399
  // src/todo.ts
1440
- import { z as z18 } from "zod";
1441
- var todoStatusSchema = z18.enum(["pending", "in_progress", "completed"]);
1442
- var todoItemSchema = z18.object({
1443
- id: z18.string(),
1444
- content: z18.string(),
1400
+ import { z as z17 } from "zod";
1401
+ var todoStatusSchema = z17.enum(["pending", "in_progress", "completed"]);
1402
+ var todoItemSchema = z17.object({
1403
+ id: z17.string(),
1404
+ content: z17.string(),
1445
1405
  status: todoStatusSchema
1446
1406
  });
1447
1407
 
1448
1408
  // src/terminal.ts
1449
- import { z as z19 } from "zod";
1450
- var commandExecutionStatusSchema = z19.discriminatedUnion("status", [
1451
- z19.object({
1452
- executionId: z19.string(),
1453
- status: z19.literal("started"),
1454
- pid: z19.number().optional(),
1455
- command: z19.string()
1409
+ import { z as z18 } from "zod";
1410
+ var commandExecutionStatusSchema = z18.discriminatedUnion("status", [
1411
+ z18.object({
1412
+ executionId: z18.string(),
1413
+ status: z18.literal("started"),
1414
+ pid: z18.number().optional(),
1415
+ command: z18.string()
1456
1416
  }),
1457
- z19.object({
1458
- executionId: z19.string(),
1459
- status: z19.literal("output"),
1460
- output: z19.string()
1417
+ z18.object({
1418
+ executionId: z18.string(),
1419
+ status: z18.literal("output"),
1420
+ output: z18.string()
1461
1421
  }),
1462
- z19.object({
1463
- executionId: z19.string(),
1464
- status: z19.literal("exited"),
1465
- exitCode: z19.number().optional()
1422
+ z18.object({
1423
+ executionId: z18.string(),
1424
+ status: z18.literal("exited"),
1425
+ exitCode: z18.number().optional()
1466
1426
  }),
1467
- z19.object({
1468
- executionId: z19.string(),
1469
- status: z19.literal("fallback")
1427
+ z18.object({
1428
+ executionId: z18.string(),
1429
+ status: z18.literal("fallback")
1470
1430
  }),
1471
- z19.object({
1472
- executionId: z19.string(),
1473
- status: z19.literal("timeout")
1431
+ z18.object({
1432
+ executionId: z18.string(),
1433
+ status: z18.literal("timeout")
1474
1434
  })
1475
1435
  ]);
1476
1436
 
@@ -1481,17 +1441,49 @@ var anthropicModels = {
1481
1441
  maxTokens: 64e3,
1482
1442
  // Overridden to 8k if `enableReasoningEffort` is false.
1483
1443
  contextWindow: 2e5,
1444
+ // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
1484
1445
  supportsImages: true,
1485
1446
  supportsComputerUse: true,
1486
1447
  supportsPromptCache: true,
1487
1448
  inputPrice: 3,
1488
- // $3 per million input tokens
1449
+ // $3 per million input tokens (≤200K context)
1489
1450
  outputPrice: 15,
1490
- // $15 per million output tokens
1451
+ // $15 per million output tokens (≤200K context)
1491
1452
  cacheWritesPrice: 3.75,
1492
1453
  // $3.75 per million tokens
1493
1454
  cacheReadsPrice: 0.3,
1494
1455
  // $0.30 per million tokens
1456
+ supportsReasoningBudget: true,
1457
+ // Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
1458
+ tiers: [
1459
+ {
1460
+ contextWindow: 1e6,
1461
+ // 1M tokens with beta flag
1462
+ inputPrice: 6,
1463
+ // $6 per million input tokens (>200K context)
1464
+ outputPrice: 22.5,
1465
+ // $22.50 per million output tokens (>200K context)
1466
+ cacheWritesPrice: 7.5,
1467
+ // $7.50 per million tokens (>200K context)
1468
+ cacheReadsPrice: 0.6
1469
+ // $0.60 per million tokens (>200K context)
1470
+ }
1471
+ ]
1472
+ },
1473
+ "claude-opus-4-1-20250805": {
1474
+ maxTokens: 8192,
1475
+ contextWindow: 2e5,
1476
+ supportsImages: true,
1477
+ supportsComputerUse: true,
1478
+ supportsPromptCache: true,
1479
+ inputPrice: 15,
1480
+ // $15 per million input tokens
1481
+ outputPrice: 75,
1482
+ // $75 per million output tokens
1483
+ cacheWritesPrice: 18.75,
1484
+ // $18.75 per million tokens
1485
+ cacheReadsPrice: 1.5,
1486
+ // $1.50 per million tokens
1495
1487
  supportsReasoningBudget: true
1496
1488
  },
1497
1489
  "claude-opus-4-20250514": {
@@ -1674,6 +1666,21 @@ var bedrockModels = {
1674
1666
  maxCachePoints: 4,
1675
1667
  cachableFields: ["system", "messages", "tools"]
1676
1668
  },
1669
+ "anthropic.claude-opus-4-1-20250805-v1:0": {
1670
+ maxTokens: 8192,
1671
+ contextWindow: 2e5,
1672
+ supportsImages: true,
1673
+ supportsComputerUse: true,
1674
+ supportsPromptCache: true,
1675
+ supportsReasoningBudget: true,
1676
+ inputPrice: 15,
1677
+ outputPrice: 75,
1678
+ cacheWritesPrice: 18.75,
1679
+ cacheReadsPrice: 1.5,
1680
+ minTokensPerCachePoint: 1024,
1681
+ maxCachePoints: 4,
1682
+ cachableFields: ["system", "messages", "tools"]
1683
+ },
1677
1684
  "anthropic.claude-opus-4-20250514-v1:0": {
1678
1685
  maxTokens: 8192,
1679
1686
  contextWindow: 2e5,
@@ -1798,6 +1805,26 @@ var bedrockModels = {
1798
1805
  inputPrice: 1.35,
1799
1806
  outputPrice: 5.4
1800
1807
  },
1808
+ "openai.gpt-oss-20b-1:0": {
1809
+ maxTokens: 8192,
1810
+ contextWindow: 128e3,
1811
+ supportsImages: false,
1812
+ supportsComputerUse: false,
1813
+ supportsPromptCache: false,
1814
+ inputPrice: 0.5,
1815
+ outputPrice: 1.5,
1816
+ description: "GPT-OSS 20B - Optimized for low latency and local/specialized use cases"
1817
+ },
1818
+ "openai.gpt-oss-120b-1:0": {
1819
+ maxTokens: 8192,
1820
+ contextWindow: 128e3,
1821
+ supportsImages: false,
1822
+ supportsComputerUse: false,
1823
+ supportsPromptCache: false,
1824
+ inputPrice: 2,
1825
+ outputPrice: 6,
1826
+ description: "GPT-OSS 120B - Production-ready, general-purpose, high-reasoning model"
1827
+ },
1801
1828
  "meta.llama3-3-70b-instruct-v1:0": {
1802
1829
  maxTokens: 8192,
1803
1830
  contextWindow: 128e3,
@@ -2046,6 +2073,15 @@ var cerebrasModels = {
2046
2073
  outputPrice: 0,
2047
2074
  description: "SOTA performance with ~1500 tokens/s",
2048
2075
  supportsReasoningEffort: true
2076
+ },
2077
+ "gpt-oss-120b": {
2078
+ maxTokens: 8e3,
2079
+ contextWindow: 64e3,
2080
+ supportsImages: false,
2081
+ supportsPromptCache: false,
2082
+ inputPrice: 0,
2083
+ outputPrice: 0,
2084
+ description: "OpenAI GPT OSS model with ~2800 tokens/s\n\n\u2022 64K context window\n\u2022 Excels at efficient reasoning across science, math, and coding"
2049
2085
  }
2050
2086
  };
2051
2087
 
@@ -2278,6 +2314,24 @@ var chutesModels = {
2278
2314
  inputPrice: 0,
2279
2315
  outputPrice: 0,
2280
2316
  description: "GLM-4.5-FP8 model with 128k token context window, optimized for agent-based applications with MoE architecture."
2317
+ },
2318
+ "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": {
2319
+ maxTokens: 32768,
2320
+ contextWindow: 262144,
2321
+ supportsImages: false,
2322
+ supportsPromptCache: false,
2323
+ inputPrice: 0,
2324
+ outputPrice: 0,
2325
+ description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks."
2326
+ },
2327
+ "moonshotai/Kimi-K2-Instruct-75k": {
2328
+ maxTokens: 32768,
2329
+ contextWindow: 75e3,
2330
+ supportsImages: false,
2331
+ supportsPromptCache: false,
2332
+ inputPrice: 0.1481,
2333
+ outputPrice: 0.5926,
2334
+ description: "Moonshot AI Kimi K2 Instruct model with 75k context window."
2281
2335
  }
2282
2336
  };
2283
2337
 
@@ -2301,6 +2355,15 @@ var claudeCodeModels = {
2301
2355
  supportsReasoningBudget: false,
2302
2356
  requiredReasoningBudget: false
2303
2357
  },
2358
+ "claude-opus-4-1-20250805": {
2359
+ ...anthropicModels["claude-opus-4-1-20250805"],
2360
+ supportsImages: false,
2361
+ supportsPromptCache: true,
2362
+ // Claude Code does report cache tokens
2363
+ supportsReasoningEffort: false,
2364
+ supportsReasoningBudget: false,
2365
+ requiredReasoningBudget: false
2366
+ },
2304
2367
  "claude-opus-4-20250514": {
2305
2368
  ...anthropicModels["claude-opus-4-20250514"],
2306
2369
  supportsImages: false,
@@ -2774,6 +2837,24 @@ var groqModels = {
2774
2837
  inputPrice: 1,
2775
2838
  outputPrice: 3,
2776
2839
  description: "Moonshot AI Kimi K2 Instruct 1T model, 128K context."
2840
+ },
2841
+ "openai/gpt-oss-120b": {
2842
+ maxTokens: 32766,
2843
+ contextWindow: 131072,
2844
+ supportsImages: false,
2845
+ supportsPromptCache: false,
2846
+ inputPrice: 0.15,
2847
+ outputPrice: 0.75,
2848
+ description: "GPT-OSS 120B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with 20 billion parameters and 128 experts."
2849
+ },
2850
+ "openai/gpt-oss-20b": {
2851
+ maxTokens: 32768,
2852
+ contextWindow: 131072,
2853
+ supportsImages: false,
2854
+ supportsPromptCache: false,
2855
+ inputPrice: 0.1,
2856
+ outputPrice: 0.5,
2857
+ description: "GPT-OSS 20B is OpenAI's flagship open source model, built on a Mixture-of-Experts (MoE) architecture with 20 billion parameters and 32 experts."
2777
2858
  }
2778
2859
  };
2779
2860
 
@@ -2787,6 +2868,41 @@ var HUGGINGFACE_TEMPERATURE_MAX_VALUE = 2;
2787
2868
  var HUGGINGFACE_API_URL = "https://router.huggingface.co/v1/models?collection=roocode";
2788
2869
  var HUGGINGFACE_CACHE_DURATION = 1e3 * 60 * 60;
2789
2870
 
2871
+ // src/providers/io-intelligence.ts
2872
+ var ioIntelligenceDefaultModelId = "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8";
2873
+ var ioIntelligenceDefaultBaseUrl = "https://api.intelligence.io.solutions/api/v1";
2874
+ var IO_INTELLIGENCE_CACHE_DURATION = 1e3 * 60 * 60;
2875
+ var ioIntelligenceModels = {
2876
+ "deepseek-ai/DeepSeek-R1-0528": {
2877
+ maxTokens: 8192,
2878
+ contextWindow: 128e3,
2879
+ supportsImages: false,
2880
+ supportsPromptCache: false,
2881
+ description: "DeepSeek R1 reasoning model"
2882
+ },
2883
+ "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
2884
+ maxTokens: 8192,
2885
+ contextWindow: 43e4,
2886
+ supportsImages: true,
2887
+ supportsPromptCache: false,
2888
+ description: "Llama 4 Maverick 17B model"
2889
+ },
2890
+ "Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar": {
2891
+ maxTokens: 8192,
2892
+ contextWindow: 106e3,
2893
+ supportsImages: false,
2894
+ supportsPromptCache: false,
2895
+ description: "Qwen3 Coder 480B specialized for coding"
2896
+ },
2897
+ "openai/gpt-oss-120b": {
2898
+ maxTokens: 8192,
2899
+ contextWindow: 131072,
2900
+ supportsImages: false,
2901
+ supportsPromptCache: false,
2902
+ description: "OpenAI GPT-OSS 120B model"
2903
+ }
2904
+ };
2905
+
2790
2906
  // src/providers/lite-llm.ts
2791
2907
  var litellmDefaultModelId = "claude-3-7-sonnet-20250219";
2792
2908
  var litellmDefaultModelInfo = {
@@ -2802,6 +2918,7 @@ var litellmDefaultModelInfo = {
2802
2918
  };
2803
2919
  var LITELLM_COMPUTER_USE_MODELS = /* @__PURE__ */ new Set([
2804
2920
  "claude-3-5-sonnet-latest",
2921
+ "claude-opus-4-1-20250805",
2805
2922
  "claude-opus-4-20250514",
2806
2923
  "claude-sonnet-4-20250514",
2807
2924
  "claude-3-7-sonnet-latest",
@@ -2811,22 +2928,26 @@ var LITELLM_COMPUTER_USE_MODELS = /* @__PURE__ */ new Set([
2811
2928
  "vertex_ai/claude-3-5-sonnet-v2",
2812
2929
  "vertex_ai/claude-3-5-sonnet-v2@20241022",
2813
2930
  "vertex_ai/claude-3-7-sonnet@20250219",
2931
+ "vertex_ai/claude-opus-4-1@20250805",
2814
2932
  "vertex_ai/claude-opus-4@20250514",
2815
2933
  "vertex_ai/claude-sonnet-4@20250514",
2816
2934
  "openrouter/anthropic/claude-3.5-sonnet",
2817
2935
  "openrouter/anthropic/claude-3.5-sonnet:beta",
2818
2936
  "openrouter/anthropic/claude-3.7-sonnet",
2819
2937
  "openrouter/anthropic/claude-3.7-sonnet:beta",
2938
+ "anthropic.claude-opus-4-1-20250805-v1:0",
2820
2939
  "anthropic.claude-opus-4-20250514-v1:0",
2821
2940
  "anthropic.claude-sonnet-4-20250514-v1:0",
2822
2941
  "anthropic.claude-3-7-sonnet-20250219-v1:0",
2823
2942
  "anthropic.claude-3-5-sonnet-20241022-v2:0",
2824
2943
  "us.anthropic.claude-3-5-sonnet-20241022-v2:0",
2825
2944
  "us.anthropic.claude-3-7-sonnet-20250219-v1:0",
2945
+ "us.anthropic.claude-opus-4-1-20250805-v1:0",
2826
2946
  "us.anthropic.claude-opus-4-20250514-v1:0",
2827
2947
  "us.anthropic.claude-sonnet-4-20250514-v1:0",
2828
2948
  "eu.anthropic.claude-3-5-sonnet-20241022-v2:0",
2829
2949
  "eu.anthropic.claude-3-7-sonnet-20250219-v1:0",
2950
+ "eu.anthropic.claude-opus-4-1-20250805-v1:0",
2830
2951
  "eu.anthropic.claude-opus-4-20250514-v1:0",
2831
2952
  "eu.anthropic.claude-sonnet-4-20250514-v1:0",
2832
2953
  "snowflake/claude-3-5-sonnet"
@@ -2963,8 +3084,48 @@ var ollamaDefaultModelInfo = {
2963
3084
  };
2964
3085
 
2965
3086
  // src/providers/openai.ts
2966
- var openAiNativeDefaultModelId = "gpt-4.1";
3087
+ var openAiNativeDefaultModelId = "gpt-5-2025-08-07";
2967
3088
  var openAiNativeModels = {
3089
+ "gpt-5-2025-08-07": {
3090
+ maxTokens: 128e3,
3091
+ contextWindow: 4e5,
3092
+ supportsImages: true,
3093
+ supportsPromptCache: true,
3094
+ supportsReasoningEffort: true,
3095
+ reasoningEffort: "medium",
3096
+ inputPrice: 1.25,
3097
+ outputPrice: 10,
3098
+ cacheReadsPrice: 0.13,
3099
+ description: "GPT-5: The best model for coding and agentic tasks across domains",
3100
+ // supportsVerbosity is a new capability; ensure ModelInfo includes it
3101
+ supportsVerbosity: true
3102
+ },
3103
+ "gpt-5-mini-2025-08-07": {
3104
+ maxTokens: 128e3,
3105
+ contextWindow: 4e5,
3106
+ supportsImages: true,
3107
+ supportsPromptCache: true,
3108
+ supportsReasoningEffort: true,
3109
+ reasoningEffort: "medium",
3110
+ inputPrice: 0.25,
3111
+ outputPrice: 2,
3112
+ cacheReadsPrice: 0.03,
3113
+ description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks",
3114
+ supportsVerbosity: true
3115
+ },
3116
+ "gpt-5-nano-2025-08-07": {
3117
+ maxTokens: 128e3,
3118
+ contextWindow: 4e5,
3119
+ supportsImages: true,
3120
+ supportsPromptCache: true,
3121
+ supportsReasoningEffort: true,
3122
+ reasoningEffort: "medium",
3123
+ inputPrice: 0.05,
3124
+ outputPrice: 0.4,
3125
+ cacheReadsPrice: 0.01,
3126
+ description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5",
3127
+ supportsVerbosity: true
3128
+ },
2968
3129
  "gpt-4.1": {
2969
3130
  maxTokens: 32768,
2970
3131
  contextWindow: 1047576,
@@ -3112,15 +3273,6 @@ var openAiNativeModels = {
3112
3273
  outputPrice: 4.4,
3113
3274
  cacheReadsPrice: 0.55
3114
3275
  },
3115
- "gpt-4.5-preview": {
3116
- maxTokens: 16384,
3117
- contextWindow: 128e3,
3118
- supportsImages: true,
3119
- supportsPromptCache: true,
3120
- inputPrice: 75,
3121
- outputPrice: 150,
3122
- cacheReadsPrice: 37.5
3123
- },
3124
3276
  "gpt-4o": {
3125
3277
  maxTokens: 16384,
3126
3278
  contextWindow: 128e3,
@@ -3138,6 +3290,16 @@ var openAiNativeModels = {
3138
3290
  inputPrice: 0.15,
3139
3291
  outputPrice: 0.6,
3140
3292
  cacheReadsPrice: 0.075
3293
+ },
3294
+ "codex-mini-latest": {
3295
+ maxTokens: 16384,
3296
+ contextWindow: 2e5,
3297
+ supportsImages: false,
3298
+ supportsPromptCache: false,
3299
+ inputPrice: 1.5,
3300
+ outputPrice: 6,
3301
+ cacheReadsPrice: 0,
3302
+ description: "Codex Mini: Cloud-based software engineering agent powered by codex-1, a version of o3 optimized for coding tasks. Trained with reinforcement learning to generate human-style code, adhere to instructions, and iteratively run tests."
3141
3303
  }
3142
3304
  };
3143
3305
  var openAiModelInfoSaneDefaults = {
@@ -3150,6 +3312,7 @@ var openAiModelInfoSaneDefaults = {
3150
3312
  };
3151
3313
  var azureOpenAiDefaultApiVersion = "2024-08-01-preview";
3152
3314
  var OPENAI_NATIVE_DEFAULT_TEMPERATURE = 0;
3315
+ var GPT5_DEFAULT_TEMPERATURE = 1;
3153
3316
  var OPENAI_AZURE_AI_INFERENCE_PATH = "/models/chat/completions";
3154
3317
 
3155
3318
  // src/providers/openrouter.ts
@@ -3187,6 +3350,7 @@ var OPEN_ROUTER_PROMPT_CACHING_MODELS = /* @__PURE__ */ new Set([
3187
3350
  "anthropic/claude-3.7-sonnet:thinking",
3188
3351
  "anthropic/claude-sonnet-4",
3189
3352
  "anthropic/claude-opus-4",
3353
+ "anthropic/claude-opus-4.1",
3190
3354
  "google/gemini-2.5-flash-preview",
3191
3355
  "google/gemini-2.5-flash-preview:thinking",
3192
3356
  "google/gemini-2.5-flash-preview-05-20",
@@ -3204,7 +3368,8 @@ var OPEN_ROUTER_COMPUTER_USE_MODELS = /* @__PURE__ */ new Set([
3204
3368
  "anthropic/claude-3.7-sonnet:beta",
3205
3369
  "anthropic/claude-3.7-sonnet:thinking",
3206
3370
  "anthropic/claude-sonnet-4",
3207
- "anthropic/claude-opus-4"
3371
+ "anthropic/claude-opus-4",
3372
+ "anthropic/claude-opus-4.1"
3208
3373
  ]);
3209
3374
  var OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
3210
3375
  "anthropic/claude-3.7-sonnet:thinking",
@@ -3214,6 +3379,7 @@ var OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
3214
3379
  var OPEN_ROUTER_REASONING_BUDGET_MODELS = /* @__PURE__ */ new Set([
3215
3380
  "anthropic/claude-3.7-sonnet:beta",
3216
3381
  "anthropic/claude-opus-4",
3382
+ "anthropic/claude-opus-4.1",
3217
3383
  "anthropic/claude-sonnet-4",
3218
3384
  "google/gemini-2.5-pro-preview",
3219
3385
  "google/gemini-2.5-pro",
@@ -3504,6 +3670,18 @@ var vertexModels = {
3504
3670
  cacheReadsPrice: 0.3,
3505
3671
  supportsReasoningBudget: true
3506
3672
  },
3673
+ "claude-opus-4-1@20250805": {
3674
+ maxTokens: 8192,
3675
+ contextWindow: 2e5,
3676
+ supportsImages: true,
3677
+ supportsComputerUse: true,
3678
+ supportsPromptCache: true,
3679
+ inputPrice: 15,
3680
+ outputPrice: 75,
3681
+ cacheWritesPrice: 18.75,
3682
+ cacheReadsPrice: 1.5,
3683
+ supportsReasoningBudget: true
3684
+ },
3507
3685
  "claude-opus-4@20250514": {
3508
3686
  maxTokens: 8192,
3509
3687
  contextWindow: 2e5,
@@ -4021,10 +4199,97 @@ var mainlandZAiModels = {
4021
4199
  }
4022
4200
  };
4023
4201
  var ZAI_DEFAULT_TEMPERATURE = 0;
4202
+
4203
+ // src/providers/fireworks.ts
4204
+ var fireworksDefaultModelId = "accounts/fireworks/models/kimi-k2-instruct";
4205
+ var fireworksModels = {
4206
+ "accounts/fireworks/models/kimi-k2-instruct": {
4207
+ maxTokens: 16384,
4208
+ contextWindow: 128e3,
4209
+ supportsImages: false,
4210
+ supportsPromptCache: false,
4211
+ inputPrice: 0.6,
4212
+ outputPrice: 2.5,
4213
+ description: "Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities."
4214
+ },
4215
+ "accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
4216
+ maxTokens: 32768,
4217
+ contextWindow: 256e3,
4218
+ supportsImages: false,
4219
+ supportsPromptCache: false,
4220
+ inputPrice: 0.22,
4221
+ outputPrice: 0.88,
4222
+ description: "Latest Qwen3 thinking model, competitive against the best closed source models in Jul 2025."
4223
+ },
4224
+ "accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": {
4225
+ maxTokens: 32768,
4226
+ contextWindow: 256e3,
4227
+ supportsImages: false,
4228
+ supportsPromptCache: false,
4229
+ inputPrice: 0.45,
4230
+ outputPrice: 1.8,
4231
+ description: "Qwen3's most agentic code model to date."
4232
+ },
4233
+ "accounts/fireworks/models/deepseek-r1-0528": {
4234
+ maxTokens: 20480,
4235
+ contextWindow: 16e4,
4236
+ supportsImages: false,
4237
+ supportsPromptCache: false,
4238
+ inputPrice: 3,
4239
+ outputPrice: 8,
4240
+ description: "05/28 updated checkpoint of Deepseek R1. Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. Compared to the previous version, the upgraded model shows significant improvements in handling complex reasoning tasks, and this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
4241
+ },
4242
+ "accounts/fireworks/models/deepseek-v3": {
4243
+ maxTokens: 16384,
4244
+ contextWindow: 128e3,
4245
+ supportsImages: false,
4246
+ supportsPromptCache: false,
4247
+ inputPrice: 0.9,
4248
+ outputPrice: 0.9,
4249
+ description: "A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
4250
+ },
4251
+ "accounts/fireworks/models/glm-4p5": {
4252
+ maxTokens: 16384,
4253
+ contextWindow: 128e3,
4254
+ supportsImages: false,
4255
+ supportsPromptCache: false,
4256
+ inputPrice: 0.55,
4257
+ outputPrice: 2.19,
4258
+ description: "Z.ai GLM-4.5 with 355B total parameters and 32B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
4259
+ },
4260
+ "accounts/fireworks/models/glm-4p5-air": {
4261
+ maxTokens: 16384,
4262
+ contextWindow: 128e3,
4263
+ supportsImages: false,
4264
+ supportsPromptCache: false,
4265
+ inputPrice: 0.55,
4266
+ outputPrice: 2.19,
4267
+ description: "Z.ai GLM-4.5-Air with 106B total parameters and 12B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
4268
+ },
4269
+ "accounts/fireworks/models/gpt-oss-20b": {
4270
+ maxTokens: 16384,
4271
+ contextWindow: 128e3,
4272
+ supportsImages: false,
4273
+ supportsPromptCache: false,
4274
+ inputPrice: 0.07,
4275
+ outputPrice: 0.3,
4276
+ description: "OpenAI gpt-oss-20b: Compact model for local/edge deployments. Optimized for low-latency and resource-constrained environments with chain-of-thought output, adjustable reasoning, and agentic workflows."
4277
+ },
4278
+ "accounts/fireworks/models/gpt-oss-120b": {
4279
+ maxTokens: 16384,
4280
+ contextWindow: 128e3,
4281
+ supportsImages: false,
4282
+ supportsPromptCache: false,
4283
+ inputPrice: 0.15,
4284
+ outputPrice: 0.6,
4285
+ description: "OpenAI gpt-oss-120b: Production-grade, general-purpose model that fits on a single H100 GPU. Features complex reasoning, configurable effort, full chain-of-thought transparency, and supports function calling, tool use, and structured outputs."
4286
+ }
4287
+ };
4024
4288
  export {
4025
4289
  ANTHROPIC_DEFAULT_MAX_TOKENS,
4026
4290
  ANTHROPIC_STYLE_PROVIDERS,
4027
4291
  AWS_INFERENCE_PROFILE_MAPPING,
4292
+ BEDROCK_CLAUDE_SONNET_4_MODEL_ID,
4028
4293
  BEDROCK_DEFAULT_CONTEXT,
4029
4294
  BEDROCK_DEFAULT_TEMPERATURE,
4030
4295
  BEDROCK_MAX_TOKENS,
@@ -4035,6 +4300,7 @@ export {
4035
4300
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
4036
4301
  DEFAULT_MODES,
4037
4302
  DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
4303
+ DEFAULT_USAGE_COLLECTION_TIMEOUT_MS,
4038
4304
  DEFAULT_WRITE_DELAY_MS,
4039
4305
  DOUBAO_API_BASE_URL,
4040
4306
  DOUBAO_API_CHAT_PATH,
@@ -4043,6 +4309,7 @@ export {
4043
4309
  GLAMA_DEFAULT_TEMPERATURE,
4044
4310
  GLOBAL_SETTINGS_KEYS,
4045
4311
  GLOBAL_STATE_KEYS,
4312
+ GPT5_DEFAULT_TEMPERATURE,
4046
4313
  HUGGINGFACE_API_URL,
4047
4314
  HUGGINGFACE_CACHE_DURATION,
4048
4315
  HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
@@ -4051,6 +4318,7 @@ export {
4051
4318
  HUGGINGFACE_SLIDER_MIN,
4052
4319
  HUGGINGFACE_SLIDER_STEP,
4053
4320
  HUGGINGFACE_TEMPERATURE_MAX_VALUE,
4321
+ IO_INTELLIGENCE_CACHE_DURATION,
4054
4322
  IpcMessageType,
4055
4323
  IpcOrigin,
4056
4324
  LITELLM_COMPUTER_USE_MODELS,
@@ -4065,8 +4333,6 @@ export {
4065
4333
  OPEN_ROUTER_PROMPT_CACHING_MODELS,
4066
4334
  OPEN_ROUTER_REASONING_BUDGET_MODELS,
4067
4335
  OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
4068
- ORGANIZATION_ALLOW_ALL,
4069
- ORGANIZATION_DEFAULT,
4070
4336
  PROVIDER_SETTINGS_KEYS,
4071
4337
  RooCodeEventName,
4072
4338
  SECRET_STATE_KEYS,
@@ -4114,6 +4380,9 @@ export {
4114
4380
  experimentIds,
4115
4381
  experimentIdsSchema,
4116
4382
  experimentsSchema,
4383
+ extendedReasoningEffortsSchema,
4384
+ fireworksDefaultModelId,
4385
+ fireworksModels,
4117
4386
  followUpDataSchema,
4118
4387
  geminiDefaultModelId,
4119
4388
  geminiModels,
@@ -4132,6 +4401,9 @@ export {
4132
4401
  installMarketplaceItemOptionsSchema,
4133
4402
  internationalZAiDefaultModelId,
4134
4403
  internationalZAiModels,
4404
+ ioIntelligenceDefaultBaseUrl,
4405
+ ioIntelligenceDefaultModelId,
4406
+ ioIntelligenceModels,
4135
4407
  ipcMessageSchema,
4136
4408
  isBlockingAsk,
4137
4409
  isGlobalStateKey,
@@ -4168,10 +4440,6 @@ export {
4168
4440
  openAiNativeModels,
4169
4441
  openRouterDefaultModelId,
4170
4442
  openRouterDefaultModelInfo,
4171
- organizationAllowListSchema,
4172
- organizationCloudSettingsSchema,
4173
- organizationDefaultSettingsSchema,
4174
- organizationSettingsSchema,
4175
4443
  promptComponentSchema,
4176
4444
  providerNames,
4177
4445
  providerNamesSchema,
@@ -4188,7 +4456,6 @@ export {
4188
4456
  rooCodeTelemetryEventSchema,
4189
4457
  sambaNovaDefaultModelId,
4190
4458
  sambaNovaModels,
4191
- shareResponseSchema,
4192
4459
  suggestionItemSchema,
4193
4460
  taskCommandSchema,
4194
4461
  taskEventSchema,
@@ -4208,6 +4475,8 @@ export {
4208
4475
  toolUsageSchema,
4209
4476
  unboundDefaultModelId,
4210
4477
  unboundDefaultModelInfo,
4478
+ verbosityLevels,
4479
+ verbosityLevelsSchema,
4211
4480
  vertexDefaultModelId,
4212
4481
  vertexModels,
4213
4482
  vscodeLlmDefaultModelId,