@roo-code/types 1.45.0 → 1.47.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.cjs +954 -930
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +503 -3602
- package/dist/index.d.ts +503 -3602
- package/dist/index.js +949 -923
- package/dist/index.js.map +1 -1
- package/package.json +42 -42
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(index_exports, {
|
|
|
23
23
|
ANTHROPIC_DEFAULT_MAX_TOKENS: () => ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
24
24
|
ANTHROPIC_STYLE_PROVIDERS: () => ANTHROPIC_STYLE_PROVIDERS,
|
|
25
25
|
AWS_INFERENCE_PROFILE_MAPPING: () => AWS_INFERENCE_PROFILE_MAPPING,
|
|
26
|
+
BEDROCK_CLAUDE_SONNET_4_MODEL_ID: () => BEDROCK_CLAUDE_SONNET_4_MODEL_ID,
|
|
26
27
|
BEDROCK_DEFAULT_CONTEXT: () => BEDROCK_DEFAULT_CONTEXT,
|
|
27
28
|
BEDROCK_DEFAULT_TEMPERATURE: () => BEDROCK_DEFAULT_TEMPERATURE,
|
|
28
29
|
BEDROCK_MAX_TOKENS: () => BEDROCK_MAX_TOKENS,
|
|
@@ -50,6 +51,7 @@ __export(index_exports, {
|
|
|
50
51
|
HUGGINGFACE_SLIDER_MIN: () => HUGGINGFACE_SLIDER_MIN,
|
|
51
52
|
HUGGINGFACE_SLIDER_STEP: () => HUGGINGFACE_SLIDER_STEP,
|
|
52
53
|
HUGGINGFACE_TEMPERATURE_MAX_VALUE: () => HUGGINGFACE_TEMPERATURE_MAX_VALUE,
|
|
54
|
+
IO_INTELLIGENCE_CACHE_DURATION: () => IO_INTELLIGENCE_CACHE_DURATION,
|
|
53
55
|
IpcMessageType: () => IpcMessageType,
|
|
54
56
|
IpcOrigin: () => IpcOrigin,
|
|
55
57
|
LITELLM_COMPUTER_USE_MODELS: () => LITELLM_COMPUTER_USE_MODELS,
|
|
@@ -64,8 +66,6 @@ __export(index_exports, {
|
|
|
64
66
|
OPEN_ROUTER_PROMPT_CACHING_MODELS: () => OPEN_ROUTER_PROMPT_CACHING_MODELS,
|
|
65
67
|
OPEN_ROUTER_REASONING_BUDGET_MODELS: () => OPEN_ROUTER_REASONING_BUDGET_MODELS,
|
|
66
68
|
OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS: () => OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
|
|
67
|
-
ORGANIZATION_ALLOW_ALL: () => ORGANIZATION_ALLOW_ALL,
|
|
68
|
-
ORGANIZATION_DEFAULT: () => ORGANIZATION_DEFAULT,
|
|
69
69
|
PROVIDER_SETTINGS_KEYS: () => PROVIDER_SETTINGS_KEYS,
|
|
70
70
|
RooCodeEventName: () => RooCodeEventName,
|
|
71
71
|
SECRET_STATE_KEYS: () => SECRET_STATE_KEYS,
|
|
@@ -134,6 +134,9 @@ __export(index_exports, {
|
|
|
134
134
|
installMarketplaceItemOptionsSchema: () => installMarketplaceItemOptionsSchema,
|
|
135
135
|
internationalZAiDefaultModelId: () => internationalZAiDefaultModelId,
|
|
136
136
|
internationalZAiModels: () => internationalZAiModels,
|
|
137
|
+
ioIntelligenceDefaultBaseUrl: () => ioIntelligenceDefaultBaseUrl,
|
|
138
|
+
ioIntelligenceDefaultModelId: () => ioIntelligenceDefaultModelId,
|
|
139
|
+
ioIntelligenceModels: () => ioIntelligenceModels,
|
|
137
140
|
ipcMessageSchema: () => ipcMessageSchema,
|
|
138
141
|
isBlockingAsk: () => isBlockingAsk,
|
|
139
142
|
isGlobalStateKey: () => isGlobalStateKey,
|
|
@@ -170,10 +173,6 @@ __export(index_exports, {
|
|
|
170
173
|
openAiNativeModels: () => openAiNativeModels,
|
|
171
174
|
openRouterDefaultModelId: () => openRouterDefaultModelId,
|
|
172
175
|
openRouterDefaultModelInfo: () => openRouterDefaultModelInfo,
|
|
173
|
-
organizationAllowListSchema: () => organizationAllowListSchema,
|
|
174
|
-
organizationCloudSettingsSchema: () => organizationCloudSettingsSchema,
|
|
175
|
-
organizationDefaultSettingsSchema: () => organizationDefaultSettingsSchema,
|
|
176
|
-
organizationSettingsSchema: () => organizationSettingsSchema,
|
|
177
176
|
promptComponentSchema: () => promptComponentSchema,
|
|
178
177
|
providerNames: () => providerNames,
|
|
179
178
|
providerNamesSchema: () => providerNamesSchema,
|
|
@@ -190,7 +189,6 @@ __export(index_exports, {
|
|
|
190
189
|
rooCodeTelemetryEventSchema: () => rooCodeTelemetryEventSchema,
|
|
191
190
|
sambaNovaDefaultModelId: () => sambaNovaDefaultModelId,
|
|
192
191
|
sambaNovaModels: () => sambaNovaModels,
|
|
193
|
-
shareResponseSchema: () => shareResponseSchema,
|
|
194
192
|
suggestionItemSchema: () => suggestionItemSchema,
|
|
195
193
|
taskCommandSchema: () => taskCommandSchema,
|
|
196
194
|
taskEventSchema: () => taskEventSchema,
|
|
@@ -221,59 +219,8 @@ __export(index_exports, {
|
|
|
221
219
|
});
|
|
222
220
|
module.exports = __toCommonJS(index_exports);
|
|
223
221
|
|
|
224
|
-
// src/cloud.ts
|
|
225
|
-
var import_zod13 = require("zod");
|
|
226
|
-
|
|
227
|
-
// src/global-settings.ts
|
|
228
|
-
var import_zod11 = require("zod");
|
|
229
|
-
|
|
230
|
-
// src/provider-settings.ts
|
|
231
|
-
var import_zod3 = require("zod");
|
|
232
|
-
|
|
233
|
-
// src/model.ts
|
|
234
|
-
var import_zod = require("zod");
|
|
235
|
-
var reasoningEfforts = ["low", "medium", "high"];
|
|
236
|
-
var reasoningEffortsSchema = import_zod.z.enum(reasoningEfforts);
|
|
237
|
-
var verbosityLevels = ["low", "medium", "high"];
|
|
238
|
-
var verbosityLevelsSchema = import_zod.z.enum(verbosityLevels);
|
|
239
|
-
var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
|
|
240
|
-
var modelParametersSchema = import_zod.z.enum(modelParameters);
|
|
241
|
-
var isModelParameter = (value) => modelParameters.includes(value);
|
|
242
|
-
var modelInfoSchema = import_zod.z.object({
|
|
243
|
-
maxTokens: import_zod.z.number().nullish(),
|
|
244
|
-
maxThinkingTokens: import_zod.z.number().nullish(),
|
|
245
|
-
contextWindow: import_zod.z.number(),
|
|
246
|
-
supportsImages: import_zod.z.boolean().optional(),
|
|
247
|
-
supportsComputerUse: import_zod.z.boolean().optional(),
|
|
248
|
-
supportsPromptCache: import_zod.z.boolean(),
|
|
249
|
-
// Capability flag to indicate whether the model supports an output verbosity parameter
|
|
250
|
-
supportsVerbosity: import_zod.z.boolean().optional(),
|
|
251
|
-
supportsReasoningBudget: import_zod.z.boolean().optional(),
|
|
252
|
-
requiredReasoningBudget: import_zod.z.boolean().optional(),
|
|
253
|
-
supportsReasoningEffort: import_zod.z.boolean().optional(),
|
|
254
|
-
supportedParameters: import_zod.z.array(modelParametersSchema).optional(),
|
|
255
|
-
inputPrice: import_zod.z.number().optional(),
|
|
256
|
-
outputPrice: import_zod.z.number().optional(),
|
|
257
|
-
cacheWritesPrice: import_zod.z.number().optional(),
|
|
258
|
-
cacheReadsPrice: import_zod.z.number().optional(),
|
|
259
|
-
description: import_zod.z.string().optional(),
|
|
260
|
-
reasoningEffort: reasoningEffortsSchema.optional(),
|
|
261
|
-
minTokensPerCachePoint: import_zod.z.number().optional(),
|
|
262
|
-
maxCachePoints: import_zod.z.number().optional(),
|
|
263
|
-
cachableFields: import_zod.z.array(import_zod.z.string()).optional(),
|
|
264
|
-
tiers: import_zod.z.array(
|
|
265
|
-
import_zod.z.object({
|
|
266
|
-
contextWindow: import_zod.z.number(),
|
|
267
|
-
inputPrice: import_zod.z.number().optional(),
|
|
268
|
-
outputPrice: import_zod.z.number().optional(),
|
|
269
|
-
cacheWritesPrice: import_zod.z.number().optional(),
|
|
270
|
-
cacheReadsPrice: import_zod.z.number().optional()
|
|
271
|
-
})
|
|
272
|
-
).optional()
|
|
273
|
-
});
|
|
274
|
-
|
|
275
222
|
// src/codebase-index.ts
|
|
276
|
-
var
|
|
223
|
+
var import_zod = require("zod");
|
|
277
224
|
var CODEBASE_INDEX_DEFAULTS = {
|
|
278
225
|
MIN_SEARCH_RESULTS: 10,
|
|
279
226
|
MAX_SEARCH_RESULTS: 200,
|
|
@@ -284,38 +231,397 @@ var CODEBASE_INDEX_DEFAULTS = {
|
|
|
284
231
|
DEFAULT_SEARCH_MIN_SCORE: 0.4,
|
|
285
232
|
SEARCH_SCORE_STEP: 0.05
|
|
286
233
|
};
|
|
287
|
-
var codebaseIndexConfigSchema =
|
|
288
|
-
codebaseIndexEnabled:
|
|
289
|
-
codebaseIndexQdrantUrl:
|
|
290
|
-
codebaseIndexEmbedderProvider:
|
|
291
|
-
codebaseIndexEmbedderBaseUrl:
|
|
292
|
-
codebaseIndexEmbedderModelId:
|
|
293
|
-
codebaseIndexEmbedderModelDimension:
|
|
294
|
-
codebaseIndexSearchMinScore:
|
|
295
|
-
codebaseIndexSearchMaxResults:
|
|
234
|
+
var codebaseIndexConfigSchema = import_zod.z.object({
|
|
235
|
+
codebaseIndexEnabled: import_zod.z.boolean().optional(),
|
|
236
|
+
codebaseIndexQdrantUrl: import_zod.z.string().optional(),
|
|
237
|
+
codebaseIndexEmbedderProvider: import_zod.z.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral"]).optional(),
|
|
238
|
+
codebaseIndexEmbedderBaseUrl: import_zod.z.string().optional(),
|
|
239
|
+
codebaseIndexEmbedderModelId: import_zod.z.string().optional(),
|
|
240
|
+
codebaseIndexEmbedderModelDimension: import_zod.z.number().optional(),
|
|
241
|
+
codebaseIndexSearchMinScore: import_zod.z.number().min(0).max(1).optional(),
|
|
242
|
+
codebaseIndexSearchMaxResults: import_zod.z.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
|
|
296
243
|
// OpenAI Compatible specific fields
|
|
297
|
-
codebaseIndexOpenAiCompatibleBaseUrl:
|
|
298
|
-
codebaseIndexOpenAiCompatibleModelDimension:
|
|
244
|
+
codebaseIndexOpenAiCompatibleBaseUrl: import_zod.z.string().optional(),
|
|
245
|
+
codebaseIndexOpenAiCompatibleModelDimension: import_zod.z.number().optional()
|
|
246
|
+
});
|
|
247
|
+
var codebaseIndexModelsSchema = import_zod.z.object({
|
|
248
|
+
openai: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional(),
|
|
249
|
+
ollama: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional(),
|
|
250
|
+
"openai-compatible": import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional(),
|
|
251
|
+
gemini: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional(),
|
|
252
|
+
mistral: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional()
|
|
253
|
+
});
|
|
254
|
+
var codebaseIndexProviderSchema = import_zod.z.object({
|
|
255
|
+
codeIndexOpenAiKey: import_zod.z.string().optional(),
|
|
256
|
+
codeIndexQdrantApiKey: import_zod.z.string().optional(),
|
|
257
|
+
codebaseIndexOpenAiCompatibleBaseUrl: import_zod.z.string().optional(),
|
|
258
|
+
codebaseIndexOpenAiCompatibleApiKey: import_zod.z.string().optional(),
|
|
259
|
+
codebaseIndexOpenAiCompatibleModelDimension: import_zod.z.number().optional(),
|
|
260
|
+
codebaseIndexGeminiApiKey: import_zod.z.string().optional(),
|
|
261
|
+
codebaseIndexMistralApiKey: import_zod.z.string().optional()
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
// src/events.ts
|
|
265
|
+
var import_zod4 = require("zod");
|
|
266
|
+
|
|
267
|
+
// src/message.ts
|
|
268
|
+
var import_zod2 = require("zod");
|
|
269
|
+
var clineAsks = [
|
|
270
|
+
"followup",
|
|
271
|
+
"command",
|
|
272
|
+
"command_output",
|
|
273
|
+
"completion_result",
|
|
274
|
+
"tool",
|
|
275
|
+
"api_req_failed",
|
|
276
|
+
"resume_task",
|
|
277
|
+
"resume_completed_task",
|
|
278
|
+
"mistake_limit_reached",
|
|
279
|
+
"browser_action_launch",
|
|
280
|
+
"use_mcp_server",
|
|
281
|
+
"auto_approval_max_req_reached"
|
|
282
|
+
];
|
|
283
|
+
var clineAskSchema = import_zod2.z.enum(clineAsks);
|
|
284
|
+
var blockingAsks = [
|
|
285
|
+
"api_req_failed",
|
|
286
|
+
"mistake_limit_reached",
|
|
287
|
+
"completion_result",
|
|
288
|
+
"resume_task",
|
|
289
|
+
"resume_completed_task",
|
|
290
|
+
"command_output",
|
|
291
|
+
"auto_approval_max_req_reached"
|
|
292
|
+
];
|
|
293
|
+
function isBlockingAsk(ask) {
|
|
294
|
+
return blockingAsks.includes(ask);
|
|
295
|
+
}
|
|
296
|
+
var clineSays = [
|
|
297
|
+
"error",
|
|
298
|
+
"api_req_started",
|
|
299
|
+
"api_req_finished",
|
|
300
|
+
"api_req_retried",
|
|
301
|
+
"api_req_retry_delayed",
|
|
302
|
+
"api_req_deleted",
|
|
303
|
+
"text",
|
|
304
|
+
"reasoning",
|
|
305
|
+
"completion_result",
|
|
306
|
+
"user_feedback",
|
|
307
|
+
"user_feedback_diff",
|
|
308
|
+
"command_output",
|
|
309
|
+
"shell_integration_warning",
|
|
310
|
+
"browser_action",
|
|
311
|
+
"browser_action_result",
|
|
312
|
+
"mcp_server_request_started",
|
|
313
|
+
"mcp_server_response",
|
|
314
|
+
"subtask_result",
|
|
315
|
+
"checkpoint_saved",
|
|
316
|
+
"rooignore_error",
|
|
317
|
+
"diff_error",
|
|
318
|
+
"condense_context",
|
|
319
|
+
"condense_context_error",
|
|
320
|
+
"codebase_search_result",
|
|
321
|
+
"user_edit_todos"
|
|
322
|
+
];
|
|
323
|
+
var clineSaySchema = import_zod2.z.enum(clineSays);
|
|
324
|
+
var toolProgressStatusSchema = import_zod2.z.object({
|
|
325
|
+
icon: import_zod2.z.string().optional(),
|
|
326
|
+
text: import_zod2.z.string().optional()
|
|
327
|
+
});
|
|
328
|
+
var contextCondenseSchema = import_zod2.z.object({
|
|
329
|
+
cost: import_zod2.z.number(),
|
|
330
|
+
prevContextTokens: import_zod2.z.number(),
|
|
331
|
+
newContextTokens: import_zod2.z.number(),
|
|
332
|
+
summary: import_zod2.z.string()
|
|
333
|
+
});
|
|
334
|
+
var clineMessageSchema = import_zod2.z.object({
|
|
335
|
+
ts: import_zod2.z.number(),
|
|
336
|
+
type: import_zod2.z.union([import_zod2.z.literal("ask"), import_zod2.z.literal("say")]),
|
|
337
|
+
ask: clineAskSchema.optional(),
|
|
338
|
+
say: clineSaySchema.optional(),
|
|
339
|
+
text: import_zod2.z.string().optional(),
|
|
340
|
+
images: import_zod2.z.array(import_zod2.z.string()).optional(),
|
|
341
|
+
partial: import_zod2.z.boolean().optional(),
|
|
342
|
+
reasoning: import_zod2.z.string().optional(),
|
|
343
|
+
conversationHistoryIndex: import_zod2.z.number().optional(),
|
|
344
|
+
checkpoint: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.unknown()).optional(),
|
|
345
|
+
progressStatus: toolProgressStatusSchema.optional(),
|
|
346
|
+
contextCondense: contextCondenseSchema.optional(),
|
|
347
|
+
isProtected: import_zod2.z.boolean().optional(),
|
|
348
|
+
apiProtocol: import_zod2.z.union([import_zod2.z.literal("openai"), import_zod2.z.literal("anthropic")]).optional(),
|
|
349
|
+
metadata: import_zod2.z.object({
|
|
350
|
+
gpt5: import_zod2.z.object({
|
|
351
|
+
previous_response_id: import_zod2.z.string().optional(),
|
|
352
|
+
instructions: import_zod2.z.string().optional(),
|
|
353
|
+
reasoning_summary: import_zod2.z.string().optional()
|
|
354
|
+
}).optional()
|
|
355
|
+
}).optional()
|
|
356
|
+
});
|
|
357
|
+
var tokenUsageSchema = import_zod2.z.object({
|
|
358
|
+
totalTokensIn: import_zod2.z.number(),
|
|
359
|
+
totalTokensOut: import_zod2.z.number(),
|
|
360
|
+
totalCacheWrites: import_zod2.z.number().optional(),
|
|
361
|
+
totalCacheReads: import_zod2.z.number().optional(),
|
|
362
|
+
totalCost: import_zod2.z.number(),
|
|
363
|
+
contextTokens: import_zod2.z.number()
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
// src/tool.ts
|
|
367
|
+
var import_zod3 = require("zod");
|
|
368
|
+
var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
|
|
369
|
+
var toolGroupsSchema = import_zod3.z.enum(toolGroups);
|
|
370
|
+
var toolNames = [
|
|
371
|
+
"execute_command",
|
|
372
|
+
"read_file",
|
|
373
|
+
"write_to_file",
|
|
374
|
+
"apply_diff",
|
|
375
|
+
"insert_content",
|
|
376
|
+
"search_and_replace",
|
|
377
|
+
"search_files",
|
|
378
|
+
"list_files",
|
|
379
|
+
"list_code_definition_names",
|
|
380
|
+
"browser_action",
|
|
381
|
+
"use_mcp_tool",
|
|
382
|
+
"access_mcp_resource",
|
|
383
|
+
"ask_followup_question",
|
|
384
|
+
"attempt_completion",
|
|
385
|
+
"switch_mode",
|
|
386
|
+
"new_task",
|
|
387
|
+
"fetch_instructions",
|
|
388
|
+
"codebase_search",
|
|
389
|
+
"update_todo_list"
|
|
390
|
+
];
|
|
391
|
+
var toolNamesSchema = import_zod3.z.enum(toolNames);
|
|
392
|
+
var toolUsageSchema = import_zod3.z.record(
|
|
393
|
+
toolNamesSchema,
|
|
394
|
+
import_zod3.z.object({
|
|
395
|
+
attempts: import_zod3.z.number(),
|
|
396
|
+
failures: import_zod3.z.number()
|
|
397
|
+
})
|
|
398
|
+
);
|
|
399
|
+
|
|
400
|
+
// src/events.ts
|
|
401
|
+
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
402
|
+
RooCodeEventName2["TaskCreated"] = "taskCreated";
|
|
403
|
+
RooCodeEventName2["TaskStarted"] = "taskStarted";
|
|
404
|
+
RooCodeEventName2["TaskCompleted"] = "taskCompleted";
|
|
405
|
+
RooCodeEventName2["TaskAborted"] = "taskAborted";
|
|
406
|
+
RooCodeEventName2["TaskFocused"] = "taskFocused";
|
|
407
|
+
RooCodeEventName2["TaskUnfocused"] = "taskUnfocused";
|
|
408
|
+
RooCodeEventName2["TaskActive"] = "taskActive";
|
|
409
|
+
RooCodeEventName2["TaskIdle"] = "taskIdle";
|
|
410
|
+
RooCodeEventName2["TaskPaused"] = "taskPaused";
|
|
411
|
+
RooCodeEventName2["TaskUnpaused"] = "taskUnpaused";
|
|
412
|
+
RooCodeEventName2["TaskSpawned"] = "taskSpawned";
|
|
413
|
+
RooCodeEventName2["Message"] = "message";
|
|
414
|
+
RooCodeEventName2["TaskModeSwitched"] = "taskModeSwitched";
|
|
415
|
+
RooCodeEventName2["TaskAskResponded"] = "taskAskResponded";
|
|
416
|
+
RooCodeEventName2["TaskTokenUsageUpdated"] = "taskTokenUsageUpdated";
|
|
417
|
+
RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
|
|
418
|
+
RooCodeEventName2["EvalPass"] = "evalPass";
|
|
419
|
+
RooCodeEventName2["EvalFail"] = "evalFail";
|
|
420
|
+
return RooCodeEventName2;
|
|
421
|
+
})(RooCodeEventName || {});
|
|
422
|
+
var rooCodeEventsSchema = import_zod4.z.object({
|
|
423
|
+
["taskCreated" /* TaskCreated */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
424
|
+
["taskStarted" /* TaskStarted */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
425
|
+
["taskCompleted" /* TaskCompleted */]: import_zod4.z.tuple([
|
|
426
|
+
import_zod4.z.string(),
|
|
427
|
+
tokenUsageSchema,
|
|
428
|
+
toolUsageSchema,
|
|
429
|
+
import_zod4.z.object({
|
|
430
|
+
isSubtask: import_zod4.z.boolean()
|
|
431
|
+
})
|
|
432
|
+
]),
|
|
433
|
+
["taskAborted" /* TaskAborted */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
434
|
+
["taskFocused" /* TaskFocused */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
435
|
+
["taskUnfocused" /* TaskUnfocused */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
436
|
+
["taskActive" /* TaskActive */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
437
|
+
["taskIdle" /* TaskIdle */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
438
|
+
["taskPaused" /* TaskPaused */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
439
|
+
["taskUnpaused" /* TaskUnpaused */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
440
|
+
["taskSpawned" /* TaskSpawned */]: import_zod4.z.tuple([import_zod4.z.string(), import_zod4.z.string()]),
|
|
441
|
+
["message" /* Message */]: import_zod4.z.tuple([
|
|
442
|
+
import_zod4.z.object({
|
|
443
|
+
taskId: import_zod4.z.string(),
|
|
444
|
+
action: import_zod4.z.union([import_zod4.z.literal("created"), import_zod4.z.literal("updated")]),
|
|
445
|
+
message: clineMessageSchema
|
|
446
|
+
})
|
|
447
|
+
]),
|
|
448
|
+
["taskModeSwitched" /* TaskModeSwitched */]: import_zod4.z.tuple([import_zod4.z.string(), import_zod4.z.string()]),
|
|
449
|
+
["taskAskResponded" /* TaskAskResponded */]: import_zod4.z.tuple([import_zod4.z.string()]),
|
|
450
|
+
["taskToolFailed" /* TaskToolFailed */]: import_zod4.z.tuple([import_zod4.z.string(), toolNamesSchema, import_zod4.z.string()]),
|
|
451
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod4.z.tuple([import_zod4.z.string(), tokenUsageSchema])
|
|
452
|
+
});
|
|
453
|
+
var taskEventSchema = import_zod4.z.discriminatedUnion("eventName", [
|
|
454
|
+
// Task Provider Lifecycle
|
|
455
|
+
import_zod4.z.object({
|
|
456
|
+
eventName: import_zod4.z.literal("taskCreated" /* TaskCreated */),
|
|
457
|
+
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
|
|
458
|
+
taskId: import_zod4.z.number().optional()
|
|
459
|
+
}),
|
|
460
|
+
// Task Lifecycle
|
|
461
|
+
import_zod4.z.object({
|
|
462
|
+
eventName: import_zod4.z.literal("taskStarted" /* TaskStarted */),
|
|
463
|
+
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
|
|
464
|
+
taskId: import_zod4.z.number().optional()
|
|
465
|
+
}),
|
|
466
|
+
import_zod4.z.object({
|
|
467
|
+
eventName: import_zod4.z.literal("taskCompleted" /* TaskCompleted */),
|
|
468
|
+
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
|
|
469
|
+
taskId: import_zod4.z.number().optional()
|
|
470
|
+
}),
|
|
471
|
+
import_zod4.z.object({
|
|
472
|
+
eventName: import_zod4.z.literal("taskAborted" /* TaskAborted */),
|
|
473
|
+
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
|
|
474
|
+
taskId: import_zod4.z.number().optional()
|
|
475
|
+
}),
|
|
476
|
+
import_zod4.z.object({
|
|
477
|
+
eventName: import_zod4.z.literal("taskFocused" /* TaskFocused */),
|
|
478
|
+
payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
|
|
479
|
+
taskId: import_zod4.z.number().optional()
|
|
480
|
+
}),
|
|
481
|
+
import_zod4.z.object({
|
|
482
|
+
eventName: import_zod4.z.literal("taskUnfocused" /* TaskUnfocused */),
|
|
483
|
+
payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
|
|
484
|
+
taskId: import_zod4.z.number().optional()
|
|
485
|
+
}),
|
|
486
|
+
import_zod4.z.object({
|
|
487
|
+
eventName: import_zod4.z.literal("taskActive" /* TaskActive */),
|
|
488
|
+
payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
|
|
489
|
+
taskId: import_zod4.z.number().optional()
|
|
490
|
+
}),
|
|
491
|
+
import_zod4.z.object({
|
|
492
|
+
eventName: import_zod4.z.literal("taskIdle" /* TaskIdle */),
|
|
493
|
+
payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
|
|
494
|
+
taskId: import_zod4.z.number().optional()
|
|
495
|
+
}),
|
|
496
|
+
// Subtask Lifecycle
|
|
497
|
+
import_zod4.z.object({
|
|
498
|
+
eventName: import_zod4.z.literal("taskPaused" /* TaskPaused */),
|
|
499
|
+
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
|
|
500
|
+
taskId: import_zod4.z.number().optional()
|
|
501
|
+
}),
|
|
502
|
+
import_zod4.z.object({
|
|
503
|
+
eventName: import_zod4.z.literal("taskUnpaused" /* TaskUnpaused */),
|
|
504
|
+
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
|
|
505
|
+
taskId: import_zod4.z.number().optional()
|
|
506
|
+
}),
|
|
507
|
+
import_zod4.z.object({
|
|
508
|
+
eventName: import_zod4.z.literal("taskSpawned" /* TaskSpawned */),
|
|
509
|
+
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
|
|
510
|
+
taskId: import_zod4.z.number().optional()
|
|
511
|
+
}),
|
|
512
|
+
// Task Execution
|
|
513
|
+
import_zod4.z.object({
|
|
514
|
+
eventName: import_zod4.z.literal("message" /* Message */),
|
|
515
|
+
payload: rooCodeEventsSchema.shape["message" /* Message */],
|
|
516
|
+
taskId: import_zod4.z.number().optional()
|
|
517
|
+
}),
|
|
518
|
+
import_zod4.z.object({
|
|
519
|
+
eventName: import_zod4.z.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
520
|
+
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
|
|
521
|
+
taskId: import_zod4.z.number().optional()
|
|
522
|
+
}),
|
|
523
|
+
import_zod4.z.object({
|
|
524
|
+
eventName: import_zod4.z.literal("taskAskResponded" /* TaskAskResponded */),
|
|
525
|
+
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
|
|
526
|
+
taskId: import_zod4.z.number().optional()
|
|
527
|
+
}),
|
|
528
|
+
// Task Analytics
|
|
529
|
+
import_zod4.z.object({
|
|
530
|
+
eventName: import_zod4.z.literal("taskToolFailed" /* TaskToolFailed */),
|
|
531
|
+
payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
|
|
532
|
+
taskId: import_zod4.z.number().optional()
|
|
533
|
+
}),
|
|
534
|
+
import_zod4.z.object({
|
|
535
|
+
eventName: import_zod4.z.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
536
|
+
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
|
|
537
|
+
taskId: import_zod4.z.number().optional()
|
|
538
|
+
}),
|
|
539
|
+
// Evals
|
|
540
|
+
import_zod4.z.object({
|
|
541
|
+
eventName: import_zod4.z.literal("evalPass" /* EvalPass */),
|
|
542
|
+
payload: import_zod4.z.undefined(),
|
|
543
|
+
taskId: import_zod4.z.number()
|
|
544
|
+
}),
|
|
545
|
+
import_zod4.z.object({
|
|
546
|
+
eventName: import_zod4.z.literal("evalFail" /* EvalFail */),
|
|
547
|
+
payload: import_zod4.z.undefined(),
|
|
548
|
+
taskId: import_zod4.z.number()
|
|
549
|
+
})
|
|
550
|
+
]);
|
|
551
|
+
|
|
552
|
+
// src/experiment.ts
|
|
553
|
+
var import_zod5 = require("zod");
|
|
554
|
+
var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
|
|
555
|
+
var experimentIdsSchema = import_zod5.z.enum(experimentIds);
|
|
556
|
+
var experimentsSchema = import_zod5.z.object({
|
|
557
|
+
powerSteering: import_zod5.z.boolean().optional(),
|
|
558
|
+
multiFileApplyDiff: import_zod5.z.boolean().optional(),
|
|
559
|
+
preventFocusDisruption: import_zod5.z.boolean().optional(),
|
|
560
|
+
assistantMessageParser: import_zod5.z.boolean().optional()
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
// src/followup.ts
|
|
564
|
+
var import_zod6 = require("zod");
|
|
565
|
+
var suggestionItemSchema = import_zod6.z.object({
|
|
566
|
+
answer: import_zod6.z.string(),
|
|
567
|
+
mode: import_zod6.z.string().optional()
|
|
299
568
|
});
|
|
300
|
-
var
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"openai-compatible": import_zod2.z.record(import_zod2.z.string(), import_zod2.z.object({ dimension: import_zod2.z.number() })).optional(),
|
|
304
|
-
gemini: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.object({ dimension: import_zod2.z.number() })).optional(),
|
|
305
|
-
mistral: import_zod2.z.record(import_zod2.z.string(), import_zod2.z.object({ dimension: import_zod2.z.number() })).optional()
|
|
569
|
+
var followUpDataSchema = import_zod6.z.object({
|
|
570
|
+
question: import_zod6.z.string().optional(),
|
|
571
|
+
suggest: import_zod6.z.array(suggestionItemSchema).optional()
|
|
306
572
|
});
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
573
|
+
|
|
574
|
+
// src/global-settings.ts
|
|
575
|
+
var import_zod13 = require("zod");
|
|
576
|
+
|
|
577
|
+
// src/provider-settings.ts
|
|
578
|
+
var import_zod8 = require("zod");
|
|
579
|
+
|
|
580
|
+
// src/model.ts
|
|
581
|
+
var import_zod7 = require("zod");
|
|
582
|
+
var reasoningEfforts = ["low", "medium", "high"];
|
|
583
|
+
var reasoningEffortsSchema = import_zod7.z.enum(reasoningEfforts);
|
|
584
|
+
var verbosityLevels = ["low", "medium", "high"];
|
|
585
|
+
var verbosityLevelsSchema = import_zod7.z.enum(verbosityLevels);
|
|
586
|
+
var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
|
|
587
|
+
var modelParametersSchema = import_zod7.z.enum(modelParameters);
|
|
588
|
+
var isModelParameter = (value) => modelParameters.includes(value);
|
|
589
|
+
var modelInfoSchema = import_zod7.z.object({
|
|
590
|
+
maxTokens: import_zod7.z.number().nullish(),
|
|
591
|
+
maxThinkingTokens: import_zod7.z.number().nullish(),
|
|
592
|
+
contextWindow: import_zod7.z.number(),
|
|
593
|
+
supportsImages: import_zod7.z.boolean().optional(),
|
|
594
|
+
supportsComputerUse: import_zod7.z.boolean().optional(),
|
|
595
|
+
supportsPromptCache: import_zod7.z.boolean(),
|
|
596
|
+
// Capability flag to indicate whether the model supports an output verbosity parameter
|
|
597
|
+
supportsVerbosity: import_zod7.z.boolean().optional(),
|
|
598
|
+
supportsReasoningBudget: import_zod7.z.boolean().optional(),
|
|
599
|
+
requiredReasoningBudget: import_zod7.z.boolean().optional(),
|
|
600
|
+
supportsReasoningEffort: import_zod7.z.boolean().optional(),
|
|
601
|
+
supportedParameters: import_zod7.z.array(modelParametersSchema).optional(),
|
|
602
|
+
inputPrice: import_zod7.z.number().optional(),
|
|
603
|
+
outputPrice: import_zod7.z.number().optional(),
|
|
604
|
+
cacheWritesPrice: import_zod7.z.number().optional(),
|
|
605
|
+
cacheReadsPrice: import_zod7.z.number().optional(),
|
|
606
|
+
description: import_zod7.z.string().optional(),
|
|
607
|
+
reasoningEffort: reasoningEffortsSchema.optional(),
|
|
608
|
+
minTokensPerCachePoint: import_zod7.z.number().optional(),
|
|
609
|
+
maxCachePoints: import_zod7.z.number().optional(),
|
|
610
|
+
cachableFields: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
611
|
+
tiers: import_zod7.z.array(
|
|
612
|
+
import_zod7.z.object({
|
|
613
|
+
contextWindow: import_zod7.z.number(),
|
|
614
|
+
inputPrice: import_zod7.z.number().optional(),
|
|
615
|
+
outputPrice: import_zod7.z.number().optional(),
|
|
616
|
+
cacheWritesPrice: import_zod7.z.number().optional(),
|
|
617
|
+
cacheReadsPrice: import_zod7.z.number().optional()
|
|
618
|
+
})
|
|
619
|
+
).optional()
|
|
315
620
|
});
|
|
316
621
|
|
|
317
622
|
// src/provider-settings.ts
|
|
318
|
-
var
|
|
623
|
+
var BEDROCK_CLAUDE_SONNET_4_MODEL_ID = "anthropic.claude-sonnet-4-20250514-v1:0";
|
|
624
|
+
var extendedReasoningEffortsSchema = import_zod8.z.union([reasoningEffortsSchema, import_zod8.z.literal("minimal")]);
|
|
319
625
|
var providerNames = [
|
|
320
626
|
"anthropic",
|
|
321
627
|
"claude-code",
|
|
@@ -346,220 +652,231 @@ var providerNames = [
|
|
|
346
652
|
"cerebras",
|
|
347
653
|
"sambanova",
|
|
348
654
|
"zai",
|
|
349
|
-
"fireworks"
|
|
655
|
+
"fireworks",
|
|
656
|
+
"io-intelligence"
|
|
350
657
|
];
|
|
351
|
-
var providerNamesSchema =
|
|
352
|
-
var providerSettingsEntrySchema =
|
|
353
|
-
id:
|
|
354
|
-
name:
|
|
658
|
+
var providerNamesSchema = import_zod8.z.enum(providerNames);
|
|
659
|
+
var providerSettingsEntrySchema = import_zod8.z.object({
|
|
660
|
+
id: import_zod8.z.string(),
|
|
661
|
+
name: import_zod8.z.string(),
|
|
355
662
|
apiProvider: providerNamesSchema.optional()
|
|
356
663
|
});
|
|
357
664
|
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
358
|
-
var baseProviderSettingsSchema =
|
|
359
|
-
includeMaxTokens:
|
|
360
|
-
diffEnabled:
|
|
361
|
-
todoListEnabled:
|
|
362
|
-
fuzzyMatchThreshold:
|
|
363
|
-
modelTemperature:
|
|
364
|
-
rateLimitSeconds:
|
|
365
|
-
consecutiveMistakeLimit:
|
|
665
|
+
var baseProviderSettingsSchema = import_zod8.z.object({
|
|
666
|
+
includeMaxTokens: import_zod8.z.boolean().optional(),
|
|
667
|
+
diffEnabled: import_zod8.z.boolean().optional(),
|
|
668
|
+
todoListEnabled: import_zod8.z.boolean().optional(),
|
|
669
|
+
fuzzyMatchThreshold: import_zod8.z.number().optional(),
|
|
670
|
+
modelTemperature: import_zod8.z.number().nullish(),
|
|
671
|
+
rateLimitSeconds: import_zod8.z.number().optional(),
|
|
672
|
+
consecutiveMistakeLimit: import_zod8.z.number().min(0).optional(),
|
|
366
673
|
// Model reasoning.
|
|
367
|
-
enableReasoningEffort:
|
|
674
|
+
enableReasoningEffort: import_zod8.z.boolean().optional(),
|
|
368
675
|
reasoningEffort: extendedReasoningEffortsSchema.optional(),
|
|
369
|
-
modelMaxTokens:
|
|
370
|
-
modelMaxThinkingTokens:
|
|
676
|
+
modelMaxTokens: import_zod8.z.number().optional(),
|
|
677
|
+
modelMaxThinkingTokens: import_zod8.z.number().optional(),
|
|
371
678
|
// Model verbosity.
|
|
372
679
|
verbosity: verbosityLevelsSchema.optional()
|
|
373
680
|
});
|
|
374
681
|
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
375
|
-
apiModelId:
|
|
682
|
+
apiModelId: import_zod8.z.string().optional()
|
|
376
683
|
});
|
|
377
684
|
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
378
|
-
apiKey:
|
|
379
|
-
anthropicBaseUrl:
|
|
380
|
-
anthropicUseAuthToken:
|
|
685
|
+
apiKey: import_zod8.z.string().optional(),
|
|
686
|
+
anthropicBaseUrl: import_zod8.z.string().optional(),
|
|
687
|
+
anthropicUseAuthToken: import_zod8.z.boolean().optional(),
|
|
688
|
+
anthropicBeta1MContext: import_zod8.z.boolean().optional()
|
|
689
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
381
690
|
});
|
|
382
691
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
383
|
-
claudeCodePath:
|
|
384
|
-
claudeCodeMaxOutputTokens:
|
|
692
|
+
claudeCodePath: import_zod8.z.string().optional(),
|
|
693
|
+
claudeCodeMaxOutputTokens: import_zod8.z.number().int().min(1).max(2e5).optional()
|
|
385
694
|
});
|
|
386
695
|
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
387
|
-
glamaModelId:
|
|
388
|
-
glamaApiKey:
|
|
696
|
+
glamaModelId: import_zod8.z.string().optional(),
|
|
697
|
+
glamaApiKey: import_zod8.z.string().optional()
|
|
389
698
|
});
|
|
390
699
|
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
391
|
-
openRouterApiKey:
|
|
392
|
-
openRouterModelId:
|
|
393
|
-
openRouterBaseUrl:
|
|
394
|
-
openRouterSpecificProvider:
|
|
395
|
-
openRouterUseMiddleOutTransform:
|
|
700
|
+
openRouterApiKey: import_zod8.z.string().optional(),
|
|
701
|
+
openRouterModelId: import_zod8.z.string().optional(),
|
|
702
|
+
openRouterBaseUrl: import_zod8.z.string().optional(),
|
|
703
|
+
openRouterSpecificProvider: import_zod8.z.string().optional(),
|
|
704
|
+
openRouterUseMiddleOutTransform: import_zod8.z.boolean().optional()
|
|
396
705
|
});
|
|
397
706
|
var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
398
|
-
awsAccessKey:
|
|
399
|
-
awsSecretKey:
|
|
400
|
-
awsSessionToken:
|
|
401
|
-
awsRegion:
|
|
402
|
-
awsUseCrossRegionInference:
|
|
403
|
-
awsUsePromptCache:
|
|
404
|
-
awsProfile:
|
|
405
|
-
awsUseProfile:
|
|
406
|
-
awsApiKey:
|
|
407
|
-
awsUseApiKey:
|
|
408
|
-
awsCustomArn:
|
|
409
|
-
awsModelContextWindow:
|
|
410
|
-
awsBedrockEndpointEnabled:
|
|
411
|
-
awsBedrockEndpoint:
|
|
707
|
+
awsAccessKey: import_zod8.z.string().optional(),
|
|
708
|
+
awsSecretKey: import_zod8.z.string().optional(),
|
|
709
|
+
awsSessionToken: import_zod8.z.string().optional(),
|
|
710
|
+
awsRegion: import_zod8.z.string().optional(),
|
|
711
|
+
awsUseCrossRegionInference: import_zod8.z.boolean().optional(),
|
|
712
|
+
awsUsePromptCache: import_zod8.z.boolean().optional(),
|
|
713
|
+
awsProfile: import_zod8.z.string().optional(),
|
|
714
|
+
awsUseProfile: import_zod8.z.boolean().optional(),
|
|
715
|
+
awsApiKey: import_zod8.z.string().optional(),
|
|
716
|
+
awsUseApiKey: import_zod8.z.boolean().optional(),
|
|
717
|
+
awsCustomArn: import_zod8.z.string().optional(),
|
|
718
|
+
awsModelContextWindow: import_zod8.z.number().optional(),
|
|
719
|
+
awsBedrockEndpointEnabled: import_zod8.z.boolean().optional(),
|
|
720
|
+
awsBedrockEndpoint: import_zod8.z.string().optional(),
|
|
721
|
+
awsBedrock1MContext: import_zod8.z.boolean().optional()
|
|
722
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
412
723
|
});
|
|
413
724
|
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
414
|
-
vertexKeyFile:
|
|
415
|
-
vertexJsonCredentials:
|
|
416
|
-
vertexProjectId:
|
|
417
|
-
vertexRegion:
|
|
725
|
+
vertexKeyFile: import_zod8.z.string().optional(),
|
|
726
|
+
vertexJsonCredentials: import_zod8.z.string().optional(),
|
|
727
|
+
vertexProjectId: import_zod8.z.string().optional(),
|
|
728
|
+
vertexRegion: import_zod8.z.string().optional()
|
|
418
729
|
});
|
|
419
730
|
var openAiSchema = baseProviderSettingsSchema.extend({
|
|
420
|
-
openAiBaseUrl:
|
|
421
|
-
openAiApiKey:
|
|
422
|
-
openAiLegacyFormat:
|
|
423
|
-
openAiR1FormatEnabled:
|
|
424
|
-
openAiModelId:
|
|
731
|
+
openAiBaseUrl: import_zod8.z.string().optional(),
|
|
732
|
+
openAiApiKey: import_zod8.z.string().optional(),
|
|
733
|
+
openAiLegacyFormat: import_zod8.z.boolean().optional(),
|
|
734
|
+
openAiR1FormatEnabled: import_zod8.z.boolean().optional(),
|
|
735
|
+
openAiModelId: import_zod8.z.string().optional(),
|
|
425
736
|
openAiCustomModelInfo: modelInfoSchema.nullish(),
|
|
426
|
-
openAiUseAzure:
|
|
427
|
-
azureApiVersion:
|
|
428
|
-
openAiStreamingEnabled:
|
|
429
|
-
openAiHostHeader:
|
|
737
|
+
openAiUseAzure: import_zod8.z.boolean().optional(),
|
|
738
|
+
azureApiVersion: import_zod8.z.string().optional(),
|
|
739
|
+
openAiStreamingEnabled: import_zod8.z.boolean().optional(),
|
|
740
|
+
openAiHostHeader: import_zod8.z.string().optional(),
|
|
430
741
|
// Keep temporarily for backward compatibility during migration.
|
|
431
|
-
openAiHeaders:
|
|
742
|
+
openAiHeaders: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional()
|
|
432
743
|
});
|
|
433
744
|
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
434
|
-
ollamaModelId:
|
|
435
|
-
ollamaBaseUrl:
|
|
745
|
+
ollamaModelId: import_zod8.z.string().optional(),
|
|
746
|
+
ollamaBaseUrl: import_zod8.z.string().optional()
|
|
436
747
|
});
|
|
437
748
|
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
438
|
-
vsCodeLmModelSelector:
|
|
439
|
-
vendor:
|
|
440
|
-
family:
|
|
441
|
-
version:
|
|
442
|
-
id:
|
|
749
|
+
vsCodeLmModelSelector: import_zod8.z.object({
|
|
750
|
+
vendor: import_zod8.z.string().optional(),
|
|
751
|
+
family: import_zod8.z.string().optional(),
|
|
752
|
+
version: import_zod8.z.string().optional(),
|
|
753
|
+
id: import_zod8.z.string().optional()
|
|
443
754
|
}).optional()
|
|
444
755
|
});
|
|
445
756
|
var lmStudioSchema = baseProviderSettingsSchema.extend({
|
|
446
|
-
lmStudioModelId:
|
|
447
|
-
lmStudioBaseUrl:
|
|
448
|
-
lmStudioDraftModelId:
|
|
449
|
-
lmStudioSpeculativeDecodingEnabled:
|
|
757
|
+
lmStudioModelId: import_zod8.z.string().optional(),
|
|
758
|
+
lmStudioBaseUrl: import_zod8.z.string().optional(),
|
|
759
|
+
lmStudioDraftModelId: import_zod8.z.string().optional(),
|
|
760
|
+
lmStudioSpeculativeDecodingEnabled: import_zod8.z.boolean().optional()
|
|
450
761
|
});
|
|
451
762
|
var geminiSchema = apiModelIdProviderModelSchema.extend({
|
|
452
|
-
geminiApiKey:
|
|
453
|
-
googleGeminiBaseUrl:
|
|
454
|
-
enableUrlContext:
|
|
455
|
-
enableGrounding:
|
|
763
|
+
geminiApiKey: import_zod8.z.string().optional(),
|
|
764
|
+
googleGeminiBaseUrl: import_zod8.z.string().optional(),
|
|
765
|
+
enableUrlContext: import_zod8.z.boolean().optional(),
|
|
766
|
+
enableGrounding: import_zod8.z.boolean().optional()
|
|
456
767
|
});
|
|
457
768
|
var geminiCliSchema = apiModelIdProviderModelSchema.extend({
|
|
458
|
-
geminiCliOAuthPath:
|
|
459
|
-
geminiCliProjectId:
|
|
769
|
+
geminiCliOAuthPath: import_zod8.z.string().optional(),
|
|
770
|
+
geminiCliProjectId: import_zod8.z.string().optional()
|
|
460
771
|
});
|
|
461
772
|
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
462
|
-
openAiNativeApiKey:
|
|
463
|
-
openAiNativeBaseUrl:
|
|
773
|
+
openAiNativeApiKey: import_zod8.z.string().optional(),
|
|
774
|
+
openAiNativeBaseUrl: import_zod8.z.string().optional()
|
|
464
775
|
});
|
|
465
776
|
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
466
|
-
mistralApiKey:
|
|
467
|
-
mistralCodestralUrl:
|
|
777
|
+
mistralApiKey: import_zod8.z.string().optional(),
|
|
778
|
+
mistralCodestralUrl: import_zod8.z.string().optional()
|
|
468
779
|
});
|
|
469
780
|
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
470
|
-
deepSeekBaseUrl:
|
|
471
|
-
deepSeekApiKey:
|
|
781
|
+
deepSeekBaseUrl: import_zod8.z.string().optional(),
|
|
782
|
+
deepSeekApiKey: import_zod8.z.string().optional()
|
|
472
783
|
});
|
|
473
784
|
var doubaoSchema = apiModelIdProviderModelSchema.extend({
|
|
474
|
-
doubaoBaseUrl:
|
|
475
|
-
doubaoApiKey:
|
|
785
|
+
doubaoBaseUrl: import_zod8.z.string().optional(),
|
|
786
|
+
doubaoApiKey: import_zod8.z.string().optional()
|
|
476
787
|
});
|
|
477
788
|
var moonshotSchema = apiModelIdProviderModelSchema.extend({
|
|
478
|
-
moonshotBaseUrl:
|
|
479
|
-
moonshotApiKey:
|
|
789
|
+
moonshotBaseUrl: import_zod8.z.union([import_zod8.z.literal("https://api.moonshot.ai/v1"), import_zod8.z.literal("https://api.moonshot.cn/v1")]).optional(),
|
|
790
|
+
moonshotApiKey: import_zod8.z.string().optional()
|
|
480
791
|
});
|
|
481
792
|
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
482
|
-
unboundApiKey:
|
|
483
|
-
unboundModelId:
|
|
793
|
+
unboundApiKey: import_zod8.z.string().optional(),
|
|
794
|
+
unboundModelId: import_zod8.z.string().optional()
|
|
484
795
|
});
|
|
485
796
|
var requestySchema = baseProviderSettingsSchema.extend({
|
|
486
|
-
|
|
487
|
-
|
|
797
|
+
requestyBaseUrl: import_zod8.z.string().optional(),
|
|
798
|
+
requestyApiKey: import_zod8.z.string().optional(),
|
|
799
|
+
requestyModelId: import_zod8.z.string().optional()
|
|
488
800
|
});
|
|
489
801
|
var humanRelaySchema = baseProviderSettingsSchema;
|
|
490
802
|
var fakeAiSchema = baseProviderSettingsSchema.extend({
|
|
491
|
-
fakeAi:
|
|
803
|
+
fakeAi: import_zod8.z.unknown().optional()
|
|
492
804
|
});
|
|
493
805
|
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
494
|
-
xaiApiKey:
|
|
806
|
+
xaiApiKey: import_zod8.z.string().optional()
|
|
495
807
|
});
|
|
496
808
|
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
497
|
-
groqApiKey:
|
|
809
|
+
groqApiKey: import_zod8.z.string().optional()
|
|
498
810
|
});
|
|
499
811
|
var huggingFaceSchema = baseProviderSettingsSchema.extend({
|
|
500
|
-
huggingFaceApiKey:
|
|
501
|
-
huggingFaceModelId:
|
|
502
|
-
huggingFaceInferenceProvider:
|
|
812
|
+
huggingFaceApiKey: import_zod8.z.string().optional(),
|
|
813
|
+
huggingFaceModelId: import_zod8.z.string().optional(),
|
|
814
|
+
huggingFaceInferenceProvider: import_zod8.z.string().optional()
|
|
503
815
|
});
|
|
504
816
|
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
505
|
-
chutesApiKey:
|
|
817
|
+
chutesApiKey: import_zod8.z.string().optional()
|
|
506
818
|
});
|
|
507
819
|
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
508
|
-
litellmBaseUrl:
|
|
509
|
-
litellmApiKey:
|
|
510
|
-
litellmModelId:
|
|
511
|
-
litellmUsePromptCache:
|
|
820
|
+
litellmBaseUrl: import_zod8.z.string().optional(),
|
|
821
|
+
litellmApiKey: import_zod8.z.string().optional(),
|
|
822
|
+
litellmModelId: import_zod8.z.string().optional(),
|
|
823
|
+
litellmUsePromptCache: import_zod8.z.boolean().optional()
|
|
512
824
|
});
|
|
513
825
|
var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
514
|
-
cerebrasApiKey:
|
|
826
|
+
cerebrasApiKey: import_zod8.z.string().optional()
|
|
515
827
|
});
|
|
516
828
|
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
517
|
-
sambaNovaApiKey:
|
|
829
|
+
sambaNovaApiKey: import_zod8.z.string().optional()
|
|
518
830
|
});
|
|
519
831
|
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
520
|
-
zaiApiKey:
|
|
521
|
-
zaiApiLine:
|
|
832
|
+
zaiApiKey: import_zod8.z.string().optional(),
|
|
833
|
+
zaiApiLine: import_zod8.z.union([import_zod8.z.literal("china"), import_zod8.z.literal("international")]).optional()
|
|
522
834
|
});
|
|
523
835
|
var fireworksSchema = apiModelIdProviderModelSchema.extend({
|
|
524
|
-
fireworksApiKey:
|
|
836
|
+
fireworksApiKey: import_zod8.z.string().optional()
|
|
525
837
|
});
|
|
526
|
-
var
|
|
527
|
-
|
|
838
|
+
var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
|
|
839
|
+
ioIntelligenceModelId: import_zod8.z.string().optional(),
|
|
840
|
+
ioIntelligenceApiKey: import_zod8.z.string().optional()
|
|
528
841
|
});
|
|
529
|
-
var
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
842
|
+
var defaultSchema = import_zod8.z.object({
|
|
843
|
+
apiProvider: import_zod8.z.undefined()
|
|
844
|
+
});
|
|
845
|
+
var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiProvider", [
|
|
846
|
+
anthropicSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("anthropic") })),
|
|
847
|
+
claudeCodeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("claude-code") })),
|
|
848
|
+
glamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("glama") })),
|
|
849
|
+
openRouterSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openrouter") })),
|
|
850
|
+
bedrockSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("bedrock") })),
|
|
851
|
+
vertexSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vertex") })),
|
|
852
|
+
openAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai") })),
|
|
853
|
+
ollamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("ollama") })),
|
|
854
|
+
vsCodeLmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vscode-lm") })),
|
|
855
|
+
lmStudioSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("lmstudio") })),
|
|
856
|
+
geminiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini") })),
|
|
857
|
+
geminiCliSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini-cli") })),
|
|
858
|
+
openAiNativeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai-native") })),
|
|
859
|
+
mistralSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("mistral") })),
|
|
860
|
+
deepSeekSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("deepseek") })),
|
|
861
|
+
doubaoSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("doubao") })),
|
|
862
|
+
moonshotSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("moonshot") })),
|
|
863
|
+
unboundSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("unbound") })),
|
|
864
|
+
requestySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("requesty") })),
|
|
865
|
+
humanRelaySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("human-relay") })),
|
|
866
|
+
fakeAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fake-ai") })),
|
|
867
|
+
xaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("xai") })),
|
|
868
|
+
groqSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("groq") })),
|
|
869
|
+
huggingFaceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("huggingface") })),
|
|
870
|
+
chutesSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("chutes") })),
|
|
871
|
+
litellmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("litellm") })),
|
|
872
|
+
cerebrasSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("cerebras") })),
|
|
873
|
+
sambaNovaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("sambanova") })),
|
|
874
|
+
zaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("zai") })),
|
|
875
|
+
fireworksSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fireworks") })),
|
|
876
|
+
ioIntelligenceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("io-intelligence") })),
|
|
560
877
|
defaultSchema
|
|
561
878
|
]);
|
|
562
|
-
var providerSettingsSchema =
|
|
879
|
+
var providerSettingsSchema = import_zod8.z.object({
|
|
563
880
|
apiProvider: providerNamesSchema.optional(),
|
|
564
881
|
...anthropicSchema.shape,
|
|
565
882
|
...claudeCodeSchema.shape,
|
|
@@ -591,11 +908,12 @@ var providerSettingsSchema = import_zod3.z.object({
|
|
|
591
908
|
...sambaNovaSchema.shape,
|
|
592
909
|
...zaiSchema.shape,
|
|
593
910
|
...fireworksSchema.shape,
|
|
911
|
+
...ioIntelligenceSchema.shape,
|
|
594
912
|
...codebaseIndexProviderSchema.shape
|
|
595
913
|
});
|
|
596
|
-
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id:
|
|
914
|
+
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: import_zod8.z.string().optional() });
|
|
597
915
|
var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
|
|
598
|
-
|
|
916
|
+
import_zod8.z.object({ id: import_zod8.z.string().optional() })
|
|
599
917
|
);
|
|
600
918
|
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
601
919
|
var MODEL_ID_KEYS = [
|
|
@@ -609,7 +927,8 @@ var MODEL_ID_KEYS = [
|
|
|
609
927
|
"unboundModelId",
|
|
610
928
|
"requestyModelId",
|
|
611
929
|
"litellmModelId",
|
|
612
|
-
"huggingFaceModelId"
|
|
930
|
+
"huggingFaceModelId",
|
|
931
|
+
"ioIntelligenceModelId"
|
|
613
932
|
];
|
|
614
933
|
var getModelId = (settings) => {
|
|
615
934
|
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
@@ -627,138 +946,26 @@ var getApiProtocol = (provider, modelId) => {
|
|
|
627
946
|
};
|
|
628
947
|
|
|
629
948
|
// src/history.ts
|
|
630
|
-
var
|
|
631
|
-
var historyItemSchema =
|
|
632
|
-
id:
|
|
633
|
-
number:
|
|
634
|
-
ts:
|
|
635
|
-
task:
|
|
636
|
-
tokensIn:
|
|
637
|
-
tokensOut:
|
|
638
|
-
cacheWrites:
|
|
639
|
-
cacheReads:
|
|
640
|
-
totalCost:
|
|
641
|
-
size:
|
|
642
|
-
workspace:
|
|
643
|
-
mode:
|
|
644
|
-
});
|
|
645
|
-
|
|
646
|
-
// src/experiment.ts
|
|
647
|
-
var import_zod5 = require("zod");
|
|
648
|
-
var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
|
|
649
|
-
var experimentIdsSchema = import_zod5.z.enum(experimentIds);
|
|
650
|
-
var experimentsSchema = import_zod5.z.object({
|
|
651
|
-
powerSteering: import_zod5.z.boolean().optional(),
|
|
652
|
-
multiFileApplyDiff: import_zod5.z.boolean().optional(),
|
|
653
|
-
preventFocusDisruption: import_zod5.z.boolean().optional(),
|
|
654
|
-
assistantMessageParser: import_zod5.z.boolean().optional()
|
|
655
|
-
});
|
|
656
|
-
|
|
657
|
-
// src/telemetry.ts
|
|
658
|
-
var import_zod7 = require("zod");
|
|
659
|
-
|
|
660
|
-
// src/message.ts
|
|
661
|
-
var import_zod6 = require("zod");
|
|
662
|
-
var clineAsks = [
|
|
663
|
-
"followup",
|
|
664
|
-
"command",
|
|
665
|
-
"command_output",
|
|
666
|
-
"completion_result",
|
|
667
|
-
"tool",
|
|
668
|
-
"api_req_failed",
|
|
669
|
-
"resume_task",
|
|
670
|
-
"resume_completed_task",
|
|
671
|
-
"mistake_limit_reached",
|
|
672
|
-
"browser_action_launch",
|
|
673
|
-
"use_mcp_server",
|
|
674
|
-
"auto_approval_max_req_reached"
|
|
675
|
-
];
|
|
676
|
-
var clineAskSchema = import_zod6.z.enum(clineAsks);
|
|
677
|
-
var blockingAsks = [
|
|
678
|
-
"api_req_failed",
|
|
679
|
-
"mistake_limit_reached",
|
|
680
|
-
"completion_result",
|
|
681
|
-
"resume_task",
|
|
682
|
-
"resume_completed_task",
|
|
683
|
-
"command_output",
|
|
684
|
-
"auto_approval_max_req_reached"
|
|
685
|
-
];
|
|
686
|
-
function isBlockingAsk(ask) {
|
|
687
|
-
return blockingAsks.includes(ask);
|
|
688
|
-
}
|
|
689
|
-
var clineSays = [
|
|
690
|
-
"error",
|
|
691
|
-
"api_req_started",
|
|
692
|
-
"api_req_finished",
|
|
693
|
-
"api_req_retried",
|
|
694
|
-
"api_req_retry_delayed",
|
|
695
|
-
"api_req_deleted",
|
|
696
|
-
"text",
|
|
697
|
-
"reasoning",
|
|
698
|
-
"completion_result",
|
|
699
|
-
"user_feedback",
|
|
700
|
-
"user_feedback_diff",
|
|
701
|
-
"command_output",
|
|
702
|
-
"shell_integration_warning",
|
|
703
|
-
"browser_action",
|
|
704
|
-
"browser_action_result",
|
|
705
|
-
"mcp_server_request_started",
|
|
706
|
-
"mcp_server_response",
|
|
707
|
-
"subtask_result",
|
|
708
|
-
"checkpoint_saved",
|
|
709
|
-
"rooignore_error",
|
|
710
|
-
"diff_error",
|
|
711
|
-
"condense_context",
|
|
712
|
-
"condense_context_error",
|
|
713
|
-
"codebase_search_result",
|
|
714
|
-
"user_edit_todos"
|
|
715
|
-
];
|
|
716
|
-
var clineSaySchema = import_zod6.z.enum(clineSays);
|
|
717
|
-
var toolProgressStatusSchema = import_zod6.z.object({
|
|
718
|
-
icon: import_zod6.z.string().optional(),
|
|
719
|
-
text: import_zod6.z.string().optional()
|
|
720
|
-
});
|
|
721
|
-
var contextCondenseSchema = import_zod6.z.object({
|
|
722
|
-
cost: import_zod6.z.number(),
|
|
723
|
-
prevContextTokens: import_zod6.z.number(),
|
|
724
|
-
newContextTokens: import_zod6.z.number(),
|
|
725
|
-
summary: import_zod6.z.string()
|
|
726
|
-
});
|
|
727
|
-
var clineMessageSchema = import_zod6.z.object({
|
|
728
|
-
ts: import_zod6.z.number(),
|
|
729
|
-
type: import_zod6.z.union([import_zod6.z.literal("ask"), import_zod6.z.literal("say")]),
|
|
730
|
-
ask: clineAskSchema.optional(),
|
|
731
|
-
say: clineSaySchema.optional(),
|
|
732
|
-
text: import_zod6.z.string().optional(),
|
|
733
|
-
images: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
734
|
-
partial: import_zod6.z.boolean().optional(),
|
|
735
|
-
reasoning: import_zod6.z.string().optional(),
|
|
736
|
-
conversationHistoryIndex: import_zod6.z.number().optional(),
|
|
737
|
-
checkpoint: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.unknown()).optional(),
|
|
738
|
-
progressStatus: toolProgressStatusSchema.optional(),
|
|
739
|
-
contextCondense: contextCondenseSchema.optional(),
|
|
740
|
-
isProtected: import_zod6.z.boolean().optional(),
|
|
741
|
-
apiProtocol: import_zod6.z.union([import_zod6.z.literal("openai"), import_zod6.z.literal("anthropic")]).optional(),
|
|
742
|
-
metadata: import_zod6.z.object({
|
|
743
|
-
gpt5: import_zod6.z.object({
|
|
744
|
-
previous_response_id: import_zod6.z.string().optional(),
|
|
745
|
-
instructions: import_zod6.z.string().optional(),
|
|
746
|
-
reasoning_summary: import_zod6.z.string().optional()
|
|
747
|
-
}).optional()
|
|
748
|
-
}).optional()
|
|
749
|
-
});
|
|
750
|
-
var tokenUsageSchema = import_zod6.z.object({
|
|
751
|
-
totalTokensIn: import_zod6.z.number(),
|
|
752
|
-
totalTokensOut: import_zod6.z.number(),
|
|
753
|
-
totalCacheWrites: import_zod6.z.number().optional(),
|
|
754
|
-
totalCacheReads: import_zod6.z.number().optional(),
|
|
755
|
-
totalCost: import_zod6.z.number(),
|
|
756
|
-
contextTokens: import_zod6.z.number()
|
|
949
|
+
var import_zod9 = require("zod");
|
|
950
|
+
var historyItemSchema = import_zod9.z.object({
|
|
951
|
+
id: import_zod9.z.string(),
|
|
952
|
+
number: import_zod9.z.number(),
|
|
953
|
+
ts: import_zod9.z.number(),
|
|
954
|
+
task: import_zod9.z.string(),
|
|
955
|
+
tokensIn: import_zod9.z.number(),
|
|
956
|
+
tokensOut: import_zod9.z.number(),
|
|
957
|
+
cacheWrites: import_zod9.z.number().optional(),
|
|
958
|
+
cacheReads: import_zod9.z.number().optional(),
|
|
959
|
+
totalCost: import_zod9.z.number(),
|
|
960
|
+
size: import_zod9.z.number().optional(),
|
|
961
|
+
workspace: import_zod9.z.string().optional(),
|
|
962
|
+
mode: import_zod9.z.string().optional()
|
|
757
963
|
});
|
|
758
964
|
|
|
759
965
|
// src/telemetry.ts
|
|
966
|
+
var import_zod10 = require("zod");
|
|
760
967
|
var telemetrySettings = ["unset", "enabled", "disabled"];
|
|
761
|
-
var telemetrySettingsSchema =
|
|
968
|
+
var telemetrySettingsSchema = import_zod10.z.enum(telemetrySettings);
|
|
762
969
|
var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
763
970
|
TelemetryEventName2["TASK_CREATED"] = "Task Created";
|
|
764
971
|
TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
|
|
@@ -800,42 +1007,42 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
|
800
1007
|
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
801
1008
|
return TelemetryEventName2;
|
|
802
1009
|
})(TelemetryEventName || {});
|
|
803
|
-
var appPropertiesSchema =
|
|
804
|
-
appName:
|
|
805
|
-
appVersion:
|
|
806
|
-
vscodeVersion:
|
|
807
|
-
platform:
|
|
808
|
-
editorName:
|
|
809
|
-
language:
|
|
810
|
-
mode:
|
|
811
|
-
cloudIsAuthenticated:
|
|
1010
|
+
var appPropertiesSchema = import_zod10.z.object({
|
|
1011
|
+
appName: import_zod10.z.string(),
|
|
1012
|
+
appVersion: import_zod10.z.string(),
|
|
1013
|
+
vscodeVersion: import_zod10.z.string(),
|
|
1014
|
+
platform: import_zod10.z.string(),
|
|
1015
|
+
editorName: import_zod10.z.string(),
|
|
1016
|
+
language: import_zod10.z.string(),
|
|
1017
|
+
mode: import_zod10.z.string(),
|
|
1018
|
+
cloudIsAuthenticated: import_zod10.z.boolean().optional()
|
|
812
1019
|
});
|
|
813
|
-
var taskPropertiesSchema =
|
|
814
|
-
taskId:
|
|
815
|
-
apiProvider:
|
|
816
|
-
modelId:
|
|
817
|
-
diffStrategy:
|
|
818
|
-
isSubtask:
|
|
819
|
-
todos:
|
|
820
|
-
total:
|
|
821
|
-
completed:
|
|
822
|
-
inProgress:
|
|
823
|
-
pending:
|
|
1020
|
+
var taskPropertiesSchema = import_zod10.z.object({
|
|
1021
|
+
taskId: import_zod10.z.string().optional(),
|
|
1022
|
+
apiProvider: import_zod10.z.enum(providerNames).optional(),
|
|
1023
|
+
modelId: import_zod10.z.string().optional(),
|
|
1024
|
+
diffStrategy: import_zod10.z.string().optional(),
|
|
1025
|
+
isSubtask: import_zod10.z.boolean().optional(),
|
|
1026
|
+
todos: import_zod10.z.object({
|
|
1027
|
+
total: import_zod10.z.number(),
|
|
1028
|
+
completed: import_zod10.z.number(),
|
|
1029
|
+
inProgress: import_zod10.z.number(),
|
|
1030
|
+
pending: import_zod10.z.number()
|
|
824
1031
|
}).optional()
|
|
825
1032
|
});
|
|
826
|
-
var gitPropertiesSchema =
|
|
827
|
-
repositoryUrl:
|
|
828
|
-
repositoryName:
|
|
829
|
-
defaultBranch:
|
|
1033
|
+
var gitPropertiesSchema = import_zod10.z.object({
|
|
1034
|
+
repositoryUrl: import_zod10.z.string().optional(),
|
|
1035
|
+
repositoryName: import_zod10.z.string().optional(),
|
|
1036
|
+
defaultBranch: import_zod10.z.string().optional()
|
|
830
1037
|
});
|
|
831
|
-
var telemetryPropertiesSchema =
|
|
1038
|
+
var telemetryPropertiesSchema = import_zod10.z.object({
|
|
832
1039
|
...appPropertiesSchema.shape,
|
|
833
1040
|
...taskPropertiesSchema.shape,
|
|
834
1041
|
...gitPropertiesSchema.shape
|
|
835
1042
|
});
|
|
836
|
-
var rooCodeTelemetryEventSchema =
|
|
837
|
-
|
|
838
|
-
type:
|
|
1043
|
+
var rooCodeTelemetryEventSchema = import_zod10.z.discriminatedUnion("type", [
|
|
1044
|
+
import_zod10.z.object({
|
|
1045
|
+
type: import_zod10.z.enum([
|
|
839
1046
|
"Task Created" /* TASK_CREATED */,
|
|
840
1047
|
"Task Reopened" /* TASK_RESTARTED */,
|
|
841
1048
|
"Task Completed" /* TASK_COMPLETED */,
|
|
@@ -871,71 +1078,35 @@ var rooCodeTelemetryEventSchema = import_zod7.z.discriminatedUnion("type", [
|
|
|
871
1078
|
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
872
1079
|
"Tab Shown" /* TAB_SHOWN */,
|
|
873
1080
|
"Mode Setting Changed" /* MODE_SETTINGS_CHANGED */,
|
|
874
|
-
"Custom Mode Created" /* CUSTOM_MODE_CREATED */
|
|
875
|
-
]),
|
|
876
|
-
properties: telemetryPropertiesSchema
|
|
877
|
-
}),
|
|
878
|
-
|
|
879
|
-
type:
|
|
880
|
-
properties:
|
|
881
|
-
...telemetryPropertiesSchema.shape,
|
|
882
|
-
taskId:
|
|
883
|
-
message: clineMessageSchema
|
|
884
|
-
})
|
|
885
|
-
}),
|
|
886
|
-
|
|
887
|
-
type:
|
|
888
|
-
properties:
|
|
889
|
-
...telemetryPropertiesSchema.shape,
|
|
890
|
-
inputTokens:
|
|
891
|
-
outputTokens:
|
|
892
|
-
cacheReadTokens:
|
|
893
|
-
cacheWriteTokens:
|
|
894
|
-
cost:
|
|
895
|
-
})
|
|
896
|
-
})
|
|
897
|
-
]);
|
|
898
|
-
|
|
899
|
-
// src/mode.ts
|
|
900
|
-
var import_zod9 = require("zod");
|
|
901
|
-
|
|
902
|
-
// src/tool.ts
|
|
903
|
-
var import_zod8 = require("zod");
|
|
904
|
-
var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
|
|
905
|
-
var toolGroupsSchema = import_zod8.z.enum(toolGroups);
|
|
906
|
-
var toolNames = [
|
|
907
|
-
"execute_command",
|
|
908
|
-
"read_file",
|
|
909
|
-
"write_to_file",
|
|
910
|
-
"apply_diff",
|
|
911
|
-
"insert_content",
|
|
912
|
-
"search_and_replace",
|
|
913
|
-
"search_files",
|
|
914
|
-
"list_files",
|
|
915
|
-
"list_code_definition_names",
|
|
916
|
-
"browser_action",
|
|
917
|
-
"use_mcp_tool",
|
|
918
|
-
"access_mcp_resource",
|
|
919
|
-
"ask_followup_question",
|
|
920
|
-
"attempt_completion",
|
|
921
|
-
"switch_mode",
|
|
922
|
-
"new_task",
|
|
923
|
-
"fetch_instructions",
|
|
924
|
-
"codebase_search",
|
|
925
|
-
"update_todo_list"
|
|
926
|
-
];
|
|
927
|
-
var toolNamesSchema = import_zod8.z.enum(toolNames);
|
|
928
|
-
var toolUsageSchema = import_zod8.z.record(
|
|
929
|
-
toolNamesSchema,
|
|
930
|
-
import_zod8.z.object({
|
|
931
|
-
attempts: import_zod8.z.number(),
|
|
932
|
-
failures: import_zod8.z.number()
|
|
1081
|
+
"Custom Mode Created" /* CUSTOM_MODE_CREATED */
|
|
1082
|
+
]),
|
|
1083
|
+
properties: telemetryPropertiesSchema
|
|
1084
|
+
}),
|
|
1085
|
+
import_zod10.z.object({
|
|
1086
|
+
type: import_zod10.z.literal("Task Message" /* TASK_MESSAGE */),
|
|
1087
|
+
properties: import_zod10.z.object({
|
|
1088
|
+
...telemetryPropertiesSchema.shape,
|
|
1089
|
+
taskId: import_zod10.z.string(),
|
|
1090
|
+
message: clineMessageSchema
|
|
1091
|
+
})
|
|
1092
|
+
}),
|
|
1093
|
+
import_zod10.z.object({
|
|
1094
|
+
type: import_zod10.z.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
1095
|
+
properties: import_zod10.z.object({
|
|
1096
|
+
...telemetryPropertiesSchema.shape,
|
|
1097
|
+
inputTokens: import_zod10.z.number(),
|
|
1098
|
+
outputTokens: import_zod10.z.number(),
|
|
1099
|
+
cacheReadTokens: import_zod10.z.number().optional(),
|
|
1100
|
+
cacheWriteTokens: import_zod10.z.number().optional(),
|
|
1101
|
+
cost: import_zod10.z.number().optional()
|
|
1102
|
+
})
|
|
933
1103
|
})
|
|
934
|
-
);
|
|
1104
|
+
]);
|
|
935
1105
|
|
|
936
1106
|
// src/mode.ts
|
|
937
|
-
var
|
|
938
|
-
|
|
1107
|
+
var import_zod11 = require("zod");
|
|
1108
|
+
var groupOptionsSchema = import_zod11.z.object({
|
|
1109
|
+
fileRegex: import_zod11.z.string().optional().refine(
|
|
939
1110
|
(pattern) => {
|
|
940
1111
|
if (!pattern) {
|
|
941
1112
|
return true;
|
|
@@ -949,10 +1120,10 @@ var groupOptionsSchema = import_zod9.z.object({
|
|
|
949
1120
|
},
|
|
950
1121
|
{ message: "Invalid regular expression pattern" }
|
|
951
1122
|
),
|
|
952
|
-
description:
|
|
1123
|
+
description: import_zod11.z.string().optional()
|
|
953
1124
|
});
|
|
954
|
-
var groupEntrySchema =
|
|
955
|
-
var groupEntryArraySchema =
|
|
1125
|
+
var groupEntrySchema = import_zod11.z.union([toolGroupsSchema, import_zod11.z.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
1126
|
+
var groupEntryArraySchema = import_zod11.z.array(groupEntrySchema).refine(
|
|
956
1127
|
(groups) => {
|
|
957
1128
|
const seen = /* @__PURE__ */ new Set();
|
|
958
1129
|
return groups.every((group) => {
|
|
@@ -966,18 +1137,18 @@ var groupEntryArraySchema = import_zod9.z.array(groupEntrySchema).refine(
|
|
|
966
1137
|
},
|
|
967
1138
|
{ message: "Duplicate groups are not allowed" }
|
|
968
1139
|
);
|
|
969
|
-
var modeConfigSchema =
|
|
970
|
-
slug:
|
|
971
|
-
name:
|
|
972
|
-
roleDefinition:
|
|
973
|
-
whenToUse:
|
|
974
|
-
description:
|
|
975
|
-
customInstructions:
|
|
1140
|
+
var modeConfigSchema = import_zod11.z.object({
|
|
1141
|
+
slug: import_zod11.z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
1142
|
+
name: import_zod11.z.string().min(1, "Name is required"),
|
|
1143
|
+
roleDefinition: import_zod11.z.string().min(1, "Role definition is required"),
|
|
1144
|
+
whenToUse: import_zod11.z.string().optional(),
|
|
1145
|
+
description: import_zod11.z.string().optional(),
|
|
1146
|
+
customInstructions: import_zod11.z.string().optional(),
|
|
976
1147
|
groups: groupEntryArraySchema,
|
|
977
|
-
source:
|
|
1148
|
+
source: import_zod11.z.enum(["global", "project"]).optional()
|
|
978
1149
|
});
|
|
979
|
-
var customModesSettingsSchema =
|
|
980
|
-
customModes:
|
|
1150
|
+
var customModesSettingsSchema = import_zod11.z.object({
|
|
1151
|
+
customModes: import_zod11.z.array(modeConfigSchema).refine(
|
|
981
1152
|
(modes) => {
|
|
982
1153
|
const slugs = /* @__PURE__ */ new Set();
|
|
983
1154
|
return modes.every((mode) => {
|
|
@@ -993,14 +1164,14 @@ var customModesSettingsSchema = import_zod9.z.object({
|
|
|
993
1164
|
}
|
|
994
1165
|
)
|
|
995
1166
|
});
|
|
996
|
-
var promptComponentSchema =
|
|
997
|
-
roleDefinition:
|
|
998
|
-
whenToUse:
|
|
999
|
-
description:
|
|
1000
|
-
customInstructions:
|
|
1167
|
+
var promptComponentSchema = import_zod11.z.object({
|
|
1168
|
+
roleDefinition: import_zod11.z.string().optional(),
|
|
1169
|
+
whenToUse: import_zod11.z.string().optional(),
|
|
1170
|
+
description: import_zod11.z.string().optional(),
|
|
1171
|
+
customInstructions: import_zod11.z.string().optional()
|
|
1001
1172
|
});
|
|
1002
|
-
var customModePromptsSchema =
|
|
1003
|
-
var customSupportPromptsSchema =
|
|
1173
|
+
var customModePromptsSchema = import_zod11.z.record(import_zod11.z.string(), promptComponentSchema.optional());
|
|
1174
|
+
var customSupportPromptsSchema = import_zod11.z.record(import_zod11.z.string(), import_zod11.z.string().optional());
|
|
1004
1175
|
var DEFAULT_MODES = [
|
|
1005
1176
|
{
|
|
1006
1177
|
slug: "architect",
|
|
@@ -1049,7 +1220,7 @@ var DEFAULT_MODES = [
|
|
|
1049
1220
|
];
|
|
1050
1221
|
|
|
1051
1222
|
// src/vscode.ts
|
|
1052
|
-
var
|
|
1223
|
+
var import_zod12 = require("zod");
|
|
1053
1224
|
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
1054
1225
|
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
1055
1226
|
var commandIds = [
|
|
@@ -1094,110 +1265,110 @@ var languages = [
|
|
|
1094
1265
|
"zh-CN",
|
|
1095
1266
|
"zh-TW"
|
|
1096
1267
|
];
|
|
1097
|
-
var languagesSchema =
|
|
1268
|
+
var languagesSchema = import_zod12.z.enum(languages);
|
|
1098
1269
|
var isLanguage = (value) => languages.includes(value);
|
|
1099
1270
|
|
|
1100
1271
|
// src/global-settings.ts
|
|
1101
1272
|
var DEFAULT_WRITE_DELAY_MS = 1e3;
|
|
1102
1273
|
var DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 5e4;
|
|
1103
|
-
var globalSettingsSchema =
|
|
1104
|
-
currentApiConfigName:
|
|
1105
|
-
listApiConfigMeta:
|
|
1106
|
-
pinnedApiConfigs:
|
|
1107
|
-
lastShownAnnouncementId:
|
|
1108
|
-
customInstructions:
|
|
1109
|
-
taskHistory:
|
|
1110
|
-
condensingApiConfigId:
|
|
1111
|
-
customCondensingPrompt:
|
|
1112
|
-
autoApprovalEnabled:
|
|
1113
|
-
alwaysAllowReadOnly:
|
|
1114
|
-
alwaysAllowReadOnlyOutsideWorkspace:
|
|
1115
|
-
alwaysAllowWrite:
|
|
1116
|
-
alwaysAllowWriteOutsideWorkspace:
|
|
1117
|
-
alwaysAllowWriteProtected:
|
|
1118
|
-
writeDelayMs:
|
|
1119
|
-
alwaysAllowBrowser:
|
|
1120
|
-
alwaysApproveResubmit:
|
|
1121
|
-
requestDelaySeconds:
|
|
1122
|
-
alwaysAllowMcp:
|
|
1123
|
-
alwaysAllowModeSwitch:
|
|
1124
|
-
alwaysAllowSubtasks:
|
|
1125
|
-
alwaysAllowExecute:
|
|
1126
|
-
alwaysAllowFollowupQuestions:
|
|
1127
|
-
followupAutoApproveTimeoutMs:
|
|
1128
|
-
alwaysAllowUpdateTodoList:
|
|
1129
|
-
allowedCommands:
|
|
1130
|
-
deniedCommands:
|
|
1131
|
-
commandExecutionTimeout:
|
|
1132
|
-
commandTimeoutAllowlist:
|
|
1133
|
-
preventCompletionWithOpenTodos:
|
|
1134
|
-
allowedMaxRequests:
|
|
1135
|
-
allowedMaxCost:
|
|
1136
|
-
autoCondenseContext:
|
|
1137
|
-
autoCondenseContextPercent:
|
|
1138
|
-
maxConcurrentFileReads:
|
|
1274
|
+
var globalSettingsSchema = import_zod13.z.object({
|
|
1275
|
+
currentApiConfigName: import_zod13.z.string().optional(),
|
|
1276
|
+
listApiConfigMeta: import_zod13.z.array(providerSettingsEntrySchema).optional(),
|
|
1277
|
+
pinnedApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.boolean()).optional(),
|
|
1278
|
+
lastShownAnnouncementId: import_zod13.z.string().optional(),
|
|
1279
|
+
customInstructions: import_zod13.z.string().optional(),
|
|
1280
|
+
taskHistory: import_zod13.z.array(historyItemSchema).optional(),
|
|
1281
|
+
condensingApiConfigId: import_zod13.z.string().optional(),
|
|
1282
|
+
customCondensingPrompt: import_zod13.z.string().optional(),
|
|
1283
|
+
autoApprovalEnabled: import_zod13.z.boolean().optional(),
|
|
1284
|
+
alwaysAllowReadOnly: import_zod13.z.boolean().optional(),
|
|
1285
|
+
alwaysAllowReadOnlyOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
1286
|
+
alwaysAllowWrite: import_zod13.z.boolean().optional(),
|
|
1287
|
+
alwaysAllowWriteOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
1288
|
+
alwaysAllowWriteProtected: import_zod13.z.boolean().optional(),
|
|
1289
|
+
writeDelayMs: import_zod13.z.number().min(0).optional(),
|
|
1290
|
+
alwaysAllowBrowser: import_zod13.z.boolean().optional(),
|
|
1291
|
+
alwaysApproveResubmit: import_zod13.z.boolean().optional(),
|
|
1292
|
+
requestDelaySeconds: import_zod13.z.number().optional(),
|
|
1293
|
+
alwaysAllowMcp: import_zod13.z.boolean().optional(),
|
|
1294
|
+
alwaysAllowModeSwitch: import_zod13.z.boolean().optional(),
|
|
1295
|
+
alwaysAllowSubtasks: import_zod13.z.boolean().optional(),
|
|
1296
|
+
alwaysAllowExecute: import_zod13.z.boolean().optional(),
|
|
1297
|
+
alwaysAllowFollowupQuestions: import_zod13.z.boolean().optional(),
|
|
1298
|
+
followupAutoApproveTimeoutMs: import_zod13.z.number().optional(),
|
|
1299
|
+
alwaysAllowUpdateTodoList: import_zod13.z.boolean().optional(),
|
|
1300
|
+
allowedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1301
|
+
deniedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1302
|
+
commandExecutionTimeout: import_zod13.z.number().optional(),
|
|
1303
|
+
commandTimeoutAllowlist: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1304
|
+
preventCompletionWithOpenTodos: import_zod13.z.boolean().optional(),
|
|
1305
|
+
allowedMaxRequests: import_zod13.z.number().nullish(),
|
|
1306
|
+
allowedMaxCost: import_zod13.z.number().nullish(),
|
|
1307
|
+
autoCondenseContext: import_zod13.z.boolean().optional(),
|
|
1308
|
+
autoCondenseContextPercent: import_zod13.z.number().optional(),
|
|
1309
|
+
maxConcurrentFileReads: import_zod13.z.number().optional(),
|
|
1139
1310
|
/**
|
|
1140
1311
|
* Whether to include diagnostic messages (errors, warnings) in tool outputs
|
|
1141
1312
|
* @default true
|
|
1142
1313
|
*/
|
|
1143
|
-
includeDiagnosticMessages:
|
|
1314
|
+
includeDiagnosticMessages: import_zod13.z.boolean().optional(),
|
|
1144
1315
|
/**
|
|
1145
1316
|
* Maximum number of diagnostic messages to include in tool outputs
|
|
1146
1317
|
* @default 50
|
|
1147
1318
|
*/
|
|
1148
|
-
maxDiagnosticMessages:
|
|
1149
|
-
browserToolEnabled:
|
|
1150
|
-
browserViewportSize:
|
|
1151
|
-
screenshotQuality:
|
|
1152
|
-
remoteBrowserEnabled:
|
|
1153
|
-
remoteBrowserHost:
|
|
1154
|
-
cachedChromeHostUrl:
|
|
1155
|
-
enableCheckpoints:
|
|
1156
|
-
ttsEnabled:
|
|
1157
|
-
ttsSpeed:
|
|
1158
|
-
soundEnabled:
|
|
1159
|
-
soundVolume:
|
|
1160
|
-
maxOpenTabsContext:
|
|
1161
|
-
maxWorkspaceFiles:
|
|
1162
|
-
showRooIgnoredFiles:
|
|
1163
|
-
maxReadFileLine:
|
|
1164
|
-
maxImageFileSize:
|
|
1165
|
-
maxTotalImageSize:
|
|
1166
|
-
terminalOutputLineLimit:
|
|
1167
|
-
terminalOutputCharacterLimit:
|
|
1168
|
-
terminalShellIntegrationTimeout:
|
|
1169
|
-
terminalShellIntegrationDisabled:
|
|
1170
|
-
terminalCommandDelay:
|
|
1171
|
-
terminalPowershellCounter:
|
|
1172
|
-
terminalZshClearEolMark:
|
|
1173
|
-
terminalZshOhMy:
|
|
1174
|
-
terminalZshP10k:
|
|
1175
|
-
terminalZdotdir:
|
|
1176
|
-
terminalCompressProgressBar:
|
|
1177
|
-
diagnosticsEnabled:
|
|
1178
|
-
rateLimitSeconds:
|
|
1179
|
-
diffEnabled:
|
|
1180
|
-
fuzzyMatchThreshold:
|
|
1319
|
+
maxDiagnosticMessages: import_zod13.z.number().optional(),
|
|
1320
|
+
browserToolEnabled: import_zod13.z.boolean().optional(),
|
|
1321
|
+
browserViewportSize: import_zod13.z.string().optional(),
|
|
1322
|
+
screenshotQuality: import_zod13.z.number().optional(),
|
|
1323
|
+
remoteBrowserEnabled: import_zod13.z.boolean().optional(),
|
|
1324
|
+
remoteBrowserHost: import_zod13.z.string().optional(),
|
|
1325
|
+
cachedChromeHostUrl: import_zod13.z.string().optional(),
|
|
1326
|
+
enableCheckpoints: import_zod13.z.boolean().optional(),
|
|
1327
|
+
ttsEnabled: import_zod13.z.boolean().optional(),
|
|
1328
|
+
ttsSpeed: import_zod13.z.number().optional(),
|
|
1329
|
+
soundEnabled: import_zod13.z.boolean().optional(),
|
|
1330
|
+
soundVolume: import_zod13.z.number().optional(),
|
|
1331
|
+
maxOpenTabsContext: import_zod13.z.number().optional(),
|
|
1332
|
+
maxWorkspaceFiles: import_zod13.z.number().optional(),
|
|
1333
|
+
showRooIgnoredFiles: import_zod13.z.boolean().optional(),
|
|
1334
|
+
maxReadFileLine: import_zod13.z.number().optional(),
|
|
1335
|
+
maxImageFileSize: import_zod13.z.number().optional(),
|
|
1336
|
+
maxTotalImageSize: import_zod13.z.number().optional(),
|
|
1337
|
+
terminalOutputLineLimit: import_zod13.z.number().optional(),
|
|
1338
|
+
terminalOutputCharacterLimit: import_zod13.z.number().optional(),
|
|
1339
|
+
terminalShellIntegrationTimeout: import_zod13.z.number().optional(),
|
|
1340
|
+
terminalShellIntegrationDisabled: import_zod13.z.boolean().optional(),
|
|
1341
|
+
terminalCommandDelay: import_zod13.z.number().optional(),
|
|
1342
|
+
terminalPowershellCounter: import_zod13.z.boolean().optional(),
|
|
1343
|
+
terminalZshClearEolMark: import_zod13.z.boolean().optional(),
|
|
1344
|
+
terminalZshOhMy: import_zod13.z.boolean().optional(),
|
|
1345
|
+
terminalZshP10k: import_zod13.z.boolean().optional(),
|
|
1346
|
+
terminalZdotdir: import_zod13.z.boolean().optional(),
|
|
1347
|
+
terminalCompressProgressBar: import_zod13.z.boolean().optional(),
|
|
1348
|
+
diagnosticsEnabled: import_zod13.z.boolean().optional(),
|
|
1349
|
+
rateLimitSeconds: import_zod13.z.number().optional(),
|
|
1350
|
+
diffEnabled: import_zod13.z.boolean().optional(),
|
|
1351
|
+
fuzzyMatchThreshold: import_zod13.z.number().optional(),
|
|
1181
1352
|
experiments: experimentsSchema.optional(),
|
|
1182
1353
|
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
1183
1354
|
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
1184
1355
|
language: languagesSchema.optional(),
|
|
1185
1356
|
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
1186
|
-
mcpEnabled:
|
|
1187
|
-
enableMcpServerCreation:
|
|
1188
|
-
remoteControlEnabled:
|
|
1189
|
-
mode:
|
|
1190
|
-
modeApiConfigs:
|
|
1191
|
-
customModes:
|
|
1357
|
+
mcpEnabled: import_zod13.z.boolean().optional(),
|
|
1358
|
+
enableMcpServerCreation: import_zod13.z.boolean().optional(),
|
|
1359
|
+
remoteControlEnabled: import_zod13.z.boolean().optional(),
|
|
1360
|
+
mode: import_zod13.z.string().optional(),
|
|
1361
|
+
modeApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.string()).optional(),
|
|
1362
|
+
customModes: import_zod13.z.array(modeConfigSchema).optional(),
|
|
1192
1363
|
customModePrompts: customModePromptsSchema.optional(),
|
|
1193
1364
|
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
1194
|
-
enhancementApiConfigId:
|
|
1195
|
-
includeTaskHistoryInEnhance:
|
|
1196
|
-
historyPreviewCollapsed:
|
|
1197
|
-
profileThresholds:
|
|
1198
|
-
hasOpenedModeSelector:
|
|
1199
|
-
lastModeExportPath:
|
|
1200
|
-
lastModeImportPath:
|
|
1365
|
+
enhancementApiConfigId: import_zod13.z.string().optional(),
|
|
1366
|
+
includeTaskHistoryInEnhance: import_zod13.z.boolean().optional(),
|
|
1367
|
+
historyPreviewCollapsed: import_zod13.z.boolean().optional(),
|
|
1368
|
+
profileThresholds: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.number()).optional(),
|
|
1369
|
+
hasOpenedModeSelector: import_zod13.z.boolean().optional(),
|
|
1370
|
+
lastModeExportPath: import_zod13.z.string().optional(),
|
|
1371
|
+
lastModeImportPath: import_zod13.z.string().optional()
|
|
1201
1372
|
});
|
|
1202
1373
|
var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
1203
1374
|
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
@@ -1229,7 +1400,8 @@ var SECRET_STATE_KEYS = [
|
|
|
1229
1400
|
"codebaseIndexMistralApiKey",
|
|
1230
1401
|
"huggingFaceApiKey",
|
|
1231
1402
|
"sambaNovaApiKey",
|
|
1232
|
-
"fireworksApiKey"
|
|
1403
|
+
"fireworksApiKey",
|
|
1404
|
+
"ioIntelligenceApiKey"
|
|
1233
1405
|
];
|
|
1234
1406
|
var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
|
|
1235
1407
|
var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
|
|
@@ -1303,294 +1475,8 @@ var EVALS_SETTINGS = {
|
|
|
1303
1475
|
};
|
|
1304
1476
|
var EVALS_TIMEOUT = 5 * 60 * 1e3;
|
|
1305
1477
|
|
|
1306
|
-
// src/marketplace.ts
|
|
1307
|
-
var import_zod12 = require("zod");
|
|
1308
|
-
var mcpParameterSchema = import_zod12.z.object({
|
|
1309
|
-
name: import_zod12.z.string().min(1),
|
|
1310
|
-
key: import_zod12.z.string().min(1),
|
|
1311
|
-
placeholder: import_zod12.z.string().optional(),
|
|
1312
|
-
optional: import_zod12.z.boolean().optional().default(false)
|
|
1313
|
-
});
|
|
1314
|
-
var mcpInstallationMethodSchema = import_zod12.z.object({
|
|
1315
|
-
name: import_zod12.z.string().min(1),
|
|
1316
|
-
content: import_zod12.z.string().min(1),
|
|
1317
|
-
parameters: import_zod12.z.array(mcpParameterSchema).optional(),
|
|
1318
|
-
prerequisites: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
1319
|
-
});
|
|
1320
|
-
var marketplaceItemTypeSchema = import_zod12.z.enum(["mode", "mcp"]);
|
|
1321
|
-
var baseMarketplaceItemSchema = import_zod12.z.object({
|
|
1322
|
-
id: import_zod12.z.string().min(1),
|
|
1323
|
-
name: import_zod12.z.string().min(1, "Name is required"),
|
|
1324
|
-
description: import_zod12.z.string(),
|
|
1325
|
-
author: import_zod12.z.string().optional(),
|
|
1326
|
-
authorUrl: import_zod12.z.string().url("Author URL must be a valid URL").optional(),
|
|
1327
|
-
tags: import_zod12.z.array(import_zod12.z.string()).optional(),
|
|
1328
|
-
prerequisites: import_zod12.z.array(import_zod12.z.string()).optional()
|
|
1329
|
-
});
|
|
1330
|
-
var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1331
|
-
content: import_zod12.z.string().min(1)
|
|
1332
|
-
// YAML content for modes
|
|
1333
|
-
});
|
|
1334
|
-
var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1335
|
-
url: import_zod12.z.string().url(),
|
|
1336
|
-
// Required url field
|
|
1337
|
-
content: import_zod12.z.union([import_zod12.z.string().min(1), import_zod12.z.array(mcpInstallationMethodSchema)]),
|
|
1338
|
-
// Single config or array of methods
|
|
1339
|
-
parameters: import_zod12.z.array(mcpParameterSchema).optional()
|
|
1340
|
-
});
|
|
1341
|
-
var marketplaceItemSchema = import_zod12.z.discriminatedUnion("type", [
|
|
1342
|
-
// Mode marketplace item
|
|
1343
|
-
modeMarketplaceItemSchema.extend({
|
|
1344
|
-
type: import_zod12.z.literal("mode")
|
|
1345
|
-
}),
|
|
1346
|
-
// MCP marketplace item
|
|
1347
|
-
mcpMarketplaceItemSchema.extend({
|
|
1348
|
-
type: import_zod12.z.literal("mcp")
|
|
1349
|
-
})
|
|
1350
|
-
]);
|
|
1351
|
-
var installMarketplaceItemOptionsSchema = import_zod12.z.object({
|
|
1352
|
-
target: import_zod12.z.enum(["global", "project"]).optional().default("project"),
|
|
1353
|
-
parameters: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.any()).optional()
|
|
1354
|
-
});
|
|
1355
|
-
|
|
1356
|
-
// src/cloud.ts
|
|
1357
|
-
var organizationAllowListSchema = import_zod13.z.object({
|
|
1358
|
-
allowAll: import_zod13.z.boolean(),
|
|
1359
|
-
providers: import_zod13.z.record(
|
|
1360
|
-
import_zod13.z.object({
|
|
1361
|
-
allowAll: import_zod13.z.boolean(),
|
|
1362
|
-
models: import_zod13.z.array(import_zod13.z.string()).optional()
|
|
1363
|
-
})
|
|
1364
|
-
)
|
|
1365
|
-
});
|
|
1366
|
-
var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
|
|
1367
|
-
enableCheckpoints: true,
|
|
1368
|
-
fuzzyMatchThreshold: true,
|
|
1369
|
-
maxOpenTabsContext: true,
|
|
1370
|
-
maxReadFileLine: true,
|
|
1371
|
-
maxWorkspaceFiles: true,
|
|
1372
|
-
showRooIgnoredFiles: true,
|
|
1373
|
-
terminalCommandDelay: true,
|
|
1374
|
-
terminalCompressProgressBar: true,
|
|
1375
|
-
terminalOutputLineLimit: true,
|
|
1376
|
-
terminalShellIntegrationDisabled: true,
|
|
1377
|
-
terminalShellIntegrationTimeout: true,
|
|
1378
|
-
terminalZshClearEolMark: true
|
|
1379
|
-
}).merge(
|
|
1380
|
-
import_zod13.z.object({
|
|
1381
|
-
maxOpenTabsContext: import_zod13.z.number().int().nonnegative().optional(),
|
|
1382
|
-
maxReadFileLine: import_zod13.z.number().int().gte(-1).optional(),
|
|
1383
|
-
maxWorkspaceFiles: import_zod13.z.number().int().nonnegative().optional(),
|
|
1384
|
-
terminalCommandDelay: import_zod13.z.number().int().nonnegative().optional(),
|
|
1385
|
-
terminalOutputLineLimit: import_zod13.z.number().int().nonnegative().optional(),
|
|
1386
|
-
terminalShellIntegrationTimeout: import_zod13.z.number().int().nonnegative().optional()
|
|
1387
|
-
})
|
|
1388
|
-
);
|
|
1389
|
-
var organizationCloudSettingsSchema = import_zod13.z.object({
|
|
1390
|
-
recordTaskMessages: import_zod13.z.boolean().optional(),
|
|
1391
|
-
enableTaskSharing: import_zod13.z.boolean().optional(),
|
|
1392
|
-
taskShareExpirationDays: import_zod13.z.number().int().positive().optional(),
|
|
1393
|
-
allowMembersViewAllTasks: import_zod13.z.boolean().optional()
|
|
1394
|
-
});
|
|
1395
|
-
var organizationSettingsSchema = import_zod13.z.object({
|
|
1396
|
-
version: import_zod13.z.number(),
|
|
1397
|
-
cloudSettings: organizationCloudSettingsSchema.optional(),
|
|
1398
|
-
defaultSettings: organizationDefaultSettingsSchema,
|
|
1399
|
-
allowList: organizationAllowListSchema,
|
|
1400
|
-
hiddenMcps: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1401
|
-
hideMarketplaceMcps: import_zod13.z.boolean().optional(),
|
|
1402
|
-
mcps: import_zod13.z.array(mcpMarketplaceItemSchema).optional(),
|
|
1403
|
-
providerProfiles: import_zod13.z.record(import_zod13.z.string(), discriminatedProviderSettingsWithIdSchema).optional()
|
|
1404
|
-
});
|
|
1405
|
-
var ORGANIZATION_ALLOW_ALL = {
|
|
1406
|
-
allowAll: true,
|
|
1407
|
-
providers: {}
|
|
1408
|
-
};
|
|
1409
|
-
var ORGANIZATION_DEFAULT = {
|
|
1410
|
-
version: 0,
|
|
1411
|
-
cloudSettings: {
|
|
1412
|
-
recordTaskMessages: true,
|
|
1413
|
-
enableTaskSharing: true,
|
|
1414
|
-
taskShareExpirationDays: 30,
|
|
1415
|
-
allowMembersViewAllTasks: true
|
|
1416
|
-
},
|
|
1417
|
-
defaultSettings: {},
|
|
1418
|
-
allowList: ORGANIZATION_ALLOW_ALL
|
|
1419
|
-
};
|
|
1420
|
-
var shareResponseSchema = import_zod13.z.object({
|
|
1421
|
-
success: import_zod13.z.boolean(),
|
|
1422
|
-
shareUrl: import_zod13.z.string().optional(),
|
|
1423
|
-
error: import_zod13.z.string().optional(),
|
|
1424
|
-
isNewShare: import_zod13.z.boolean().optional(),
|
|
1425
|
-
manageUrl: import_zod13.z.string().optional()
|
|
1426
|
-
});
|
|
1427
|
-
|
|
1428
|
-
// src/events.ts
|
|
1429
|
-
var import_zod14 = require("zod");
|
|
1430
|
-
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
1431
|
-
RooCodeEventName2["TaskCreated"] = "taskCreated";
|
|
1432
|
-
RooCodeEventName2["TaskStarted"] = "taskStarted";
|
|
1433
|
-
RooCodeEventName2["TaskCompleted"] = "taskCompleted";
|
|
1434
|
-
RooCodeEventName2["TaskAborted"] = "taskAborted";
|
|
1435
|
-
RooCodeEventName2["TaskFocused"] = "taskFocused";
|
|
1436
|
-
RooCodeEventName2["TaskUnfocused"] = "taskUnfocused";
|
|
1437
|
-
RooCodeEventName2["TaskActive"] = "taskActive";
|
|
1438
|
-
RooCodeEventName2["TaskIdle"] = "taskIdle";
|
|
1439
|
-
RooCodeEventName2["TaskPaused"] = "taskPaused";
|
|
1440
|
-
RooCodeEventName2["TaskUnpaused"] = "taskUnpaused";
|
|
1441
|
-
RooCodeEventName2["TaskSpawned"] = "taskSpawned";
|
|
1442
|
-
RooCodeEventName2["Message"] = "message";
|
|
1443
|
-
RooCodeEventName2["TaskModeSwitched"] = "taskModeSwitched";
|
|
1444
|
-
RooCodeEventName2["TaskAskResponded"] = "taskAskResponded";
|
|
1445
|
-
RooCodeEventName2["TaskTokenUsageUpdated"] = "taskTokenUsageUpdated";
|
|
1446
|
-
RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
|
|
1447
|
-
RooCodeEventName2["EvalPass"] = "evalPass";
|
|
1448
|
-
RooCodeEventName2["EvalFail"] = "evalFail";
|
|
1449
|
-
return RooCodeEventName2;
|
|
1450
|
-
})(RooCodeEventName || {});
|
|
1451
|
-
var rooCodeEventsSchema = import_zod14.z.object({
|
|
1452
|
-
["taskCreated" /* TaskCreated */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1453
|
-
["taskStarted" /* TaskStarted */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1454
|
-
["taskCompleted" /* TaskCompleted */]: import_zod14.z.tuple([
|
|
1455
|
-
import_zod14.z.string(),
|
|
1456
|
-
tokenUsageSchema,
|
|
1457
|
-
toolUsageSchema,
|
|
1458
|
-
import_zod14.z.object({
|
|
1459
|
-
isSubtask: import_zod14.z.boolean()
|
|
1460
|
-
})
|
|
1461
|
-
]),
|
|
1462
|
-
["taskAborted" /* TaskAborted */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1463
|
-
["taskFocused" /* TaskFocused */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1464
|
-
["taskUnfocused" /* TaskUnfocused */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1465
|
-
["taskActive" /* TaskActive */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1466
|
-
["taskIdle" /* TaskIdle */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1467
|
-
["taskPaused" /* TaskPaused */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1468
|
-
["taskUnpaused" /* TaskUnpaused */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1469
|
-
["taskSpawned" /* TaskSpawned */]: import_zod14.z.tuple([import_zod14.z.string(), import_zod14.z.string()]),
|
|
1470
|
-
["message" /* Message */]: import_zod14.z.tuple([
|
|
1471
|
-
import_zod14.z.object({
|
|
1472
|
-
taskId: import_zod14.z.string(),
|
|
1473
|
-
action: import_zod14.z.union([import_zod14.z.literal("created"), import_zod14.z.literal("updated")]),
|
|
1474
|
-
message: clineMessageSchema
|
|
1475
|
-
})
|
|
1476
|
-
]),
|
|
1477
|
-
["taskModeSwitched" /* TaskModeSwitched */]: import_zod14.z.tuple([import_zod14.z.string(), import_zod14.z.string()]),
|
|
1478
|
-
["taskAskResponded" /* TaskAskResponded */]: import_zod14.z.tuple([import_zod14.z.string()]),
|
|
1479
|
-
["taskToolFailed" /* TaskToolFailed */]: import_zod14.z.tuple([import_zod14.z.string(), toolNamesSchema, import_zod14.z.string()]),
|
|
1480
|
-
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod14.z.tuple([import_zod14.z.string(), tokenUsageSchema])
|
|
1481
|
-
});
|
|
1482
|
-
var taskEventSchema = import_zod14.z.discriminatedUnion("eventName", [
|
|
1483
|
-
// Task Provider Lifecycle
|
|
1484
|
-
import_zod14.z.object({
|
|
1485
|
-
eventName: import_zod14.z.literal("taskCreated" /* TaskCreated */),
|
|
1486
|
-
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
|
|
1487
|
-
taskId: import_zod14.z.number().optional()
|
|
1488
|
-
}),
|
|
1489
|
-
// Task Lifecycle
|
|
1490
|
-
import_zod14.z.object({
|
|
1491
|
-
eventName: import_zod14.z.literal("taskStarted" /* TaskStarted */),
|
|
1492
|
-
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
|
|
1493
|
-
taskId: import_zod14.z.number().optional()
|
|
1494
|
-
}),
|
|
1495
|
-
import_zod14.z.object({
|
|
1496
|
-
eventName: import_zod14.z.literal("taskCompleted" /* TaskCompleted */),
|
|
1497
|
-
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
|
|
1498
|
-
taskId: import_zod14.z.number().optional()
|
|
1499
|
-
}),
|
|
1500
|
-
import_zod14.z.object({
|
|
1501
|
-
eventName: import_zod14.z.literal("taskAborted" /* TaskAborted */),
|
|
1502
|
-
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
|
|
1503
|
-
taskId: import_zod14.z.number().optional()
|
|
1504
|
-
}),
|
|
1505
|
-
import_zod14.z.object({
|
|
1506
|
-
eventName: import_zod14.z.literal("taskFocused" /* TaskFocused */),
|
|
1507
|
-
payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
|
|
1508
|
-
taskId: import_zod14.z.number().optional()
|
|
1509
|
-
}),
|
|
1510
|
-
import_zod14.z.object({
|
|
1511
|
-
eventName: import_zod14.z.literal("taskUnfocused" /* TaskUnfocused */),
|
|
1512
|
-
payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
|
|
1513
|
-
taskId: import_zod14.z.number().optional()
|
|
1514
|
-
}),
|
|
1515
|
-
import_zod14.z.object({
|
|
1516
|
-
eventName: import_zod14.z.literal("taskActive" /* TaskActive */),
|
|
1517
|
-
payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
|
|
1518
|
-
taskId: import_zod14.z.number().optional()
|
|
1519
|
-
}),
|
|
1520
|
-
import_zod14.z.object({
|
|
1521
|
-
eventName: import_zod14.z.literal("taskIdle" /* TaskIdle */),
|
|
1522
|
-
payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
|
|
1523
|
-
taskId: import_zod14.z.number().optional()
|
|
1524
|
-
}),
|
|
1525
|
-
// Subtask Lifecycle
|
|
1526
|
-
import_zod14.z.object({
|
|
1527
|
-
eventName: import_zod14.z.literal("taskPaused" /* TaskPaused */),
|
|
1528
|
-
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
|
|
1529
|
-
taskId: import_zod14.z.number().optional()
|
|
1530
|
-
}),
|
|
1531
|
-
import_zod14.z.object({
|
|
1532
|
-
eventName: import_zod14.z.literal("taskUnpaused" /* TaskUnpaused */),
|
|
1533
|
-
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
|
|
1534
|
-
taskId: import_zod14.z.number().optional()
|
|
1535
|
-
}),
|
|
1536
|
-
import_zod14.z.object({
|
|
1537
|
-
eventName: import_zod14.z.literal("taskSpawned" /* TaskSpawned */),
|
|
1538
|
-
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
|
|
1539
|
-
taskId: import_zod14.z.number().optional()
|
|
1540
|
-
}),
|
|
1541
|
-
// Task Execution
|
|
1542
|
-
import_zod14.z.object({
|
|
1543
|
-
eventName: import_zod14.z.literal("message" /* Message */),
|
|
1544
|
-
payload: rooCodeEventsSchema.shape["message" /* Message */],
|
|
1545
|
-
taskId: import_zod14.z.number().optional()
|
|
1546
|
-
}),
|
|
1547
|
-
import_zod14.z.object({
|
|
1548
|
-
eventName: import_zod14.z.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
1549
|
-
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
|
|
1550
|
-
taskId: import_zod14.z.number().optional()
|
|
1551
|
-
}),
|
|
1552
|
-
import_zod14.z.object({
|
|
1553
|
-
eventName: import_zod14.z.literal("taskAskResponded" /* TaskAskResponded */),
|
|
1554
|
-
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
|
|
1555
|
-
taskId: import_zod14.z.number().optional()
|
|
1556
|
-
}),
|
|
1557
|
-
// Task Analytics
|
|
1558
|
-
import_zod14.z.object({
|
|
1559
|
-
eventName: import_zod14.z.literal("taskToolFailed" /* TaskToolFailed */),
|
|
1560
|
-
payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
|
|
1561
|
-
taskId: import_zod14.z.number().optional()
|
|
1562
|
-
}),
|
|
1563
|
-
import_zod14.z.object({
|
|
1564
|
-
eventName: import_zod14.z.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
1565
|
-
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
|
|
1566
|
-
taskId: import_zod14.z.number().optional()
|
|
1567
|
-
}),
|
|
1568
|
-
// Evals
|
|
1569
|
-
import_zod14.z.object({
|
|
1570
|
-
eventName: import_zod14.z.literal("evalPass" /* EvalPass */),
|
|
1571
|
-
payload: import_zod14.z.undefined(),
|
|
1572
|
-
taskId: import_zod14.z.number()
|
|
1573
|
-
}),
|
|
1574
|
-
import_zod14.z.object({
|
|
1575
|
-
eventName: import_zod14.z.literal("evalFail" /* EvalFail */),
|
|
1576
|
-
payload: import_zod14.z.undefined(),
|
|
1577
|
-
taskId: import_zod14.z.number()
|
|
1578
|
-
})
|
|
1579
|
-
]);
|
|
1580
|
-
|
|
1581
|
-
// src/followup.ts
|
|
1582
|
-
var import_zod15 = require("zod");
|
|
1583
|
-
var suggestionItemSchema = import_zod15.z.object({
|
|
1584
|
-
answer: import_zod15.z.string(),
|
|
1585
|
-
mode: import_zod15.z.string().optional()
|
|
1586
|
-
});
|
|
1587
|
-
var followUpDataSchema = import_zod15.z.object({
|
|
1588
|
-
question: import_zod15.z.string().optional(),
|
|
1589
|
-
suggest: import_zod15.z.array(suggestionItemSchema).optional()
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
1478
|
// src/ipc.ts
|
|
1593
|
-
var
|
|
1479
|
+
var import_zod14 = require("zod");
|
|
1594
1480
|
var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
|
|
1595
1481
|
IpcMessageType2["Connect"] = "Connect";
|
|
1596
1482
|
IpcMessageType2["Disconnect"] = "Disconnect";
|
|
@@ -1604,10 +1490,10 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
|
1604
1490
|
IpcOrigin2["Server"] = "server";
|
|
1605
1491
|
return IpcOrigin2;
|
|
1606
1492
|
})(IpcOrigin || {});
|
|
1607
|
-
var ackSchema =
|
|
1608
|
-
clientId:
|
|
1609
|
-
pid:
|
|
1610
|
-
ppid:
|
|
1493
|
+
var ackSchema = import_zod14.z.object({
|
|
1494
|
+
clientId: import_zod14.z.string(),
|
|
1495
|
+
pid: import_zod14.z.number(),
|
|
1496
|
+
ppid: import_zod14.z.number()
|
|
1611
1497
|
});
|
|
1612
1498
|
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
1613
1499
|
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
@@ -1615,106 +1501,156 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
|
1615
1501
|
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
1616
1502
|
return TaskCommandName2;
|
|
1617
1503
|
})(TaskCommandName || {});
|
|
1618
|
-
var taskCommandSchema =
|
|
1619
|
-
|
|
1620
|
-
commandName:
|
|
1621
|
-
data:
|
|
1504
|
+
var taskCommandSchema = import_zod14.z.discriminatedUnion("commandName", [
|
|
1505
|
+
import_zod14.z.object({
|
|
1506
|
+
commandName: import_zod14.z.literal("StartNewTask" /* StartNewTask */),
|
|
1507
|
+
data: import_zod14.z.object({
|
|
1622
1508
|
configuration: rooCodeSettingsSchema,
|
|
1623
|
-
text:
|
|
1624
|
-
images:
|
|
1625
|
-
newTab:
|
|
1509
|
+
text: import_zod14.z.string(),
|
|
1510
|
+
images: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
1511
|
+
newTab: import_zod14.z.boolean().optional()
|
|
1626
1512
|
})
|
|
1627
1513
|
}),
|
|
1628
|
-
|
|
1629
|
-
commandName:
|
|
1630
|
-
data:
|
|
1514
|
+
import_zod14.z.object({
|
|
1515
|
+
commandName: import_zod14.z.literal("CancelTask" /* CancelTask */),
|
|
1516
|
+
data: import_zod14.z.string()
|
|
1631
1517
|
}),
|
|
1632
|
-
|
|
1633
|
-
commandName:
|
|
1634
|
-
data:
|
|
1518
|
+
import_zod14.z.object({
|
|
1519
|
+
commandName: import_zod14.z.literal("CloseTask" /* CloseTask */),
|
|
1520
|
+
data: import_zod14.z.string()
|
|
1635
1521
|
})
|
|
1636
1522
|
]);
|
|
1637
|
-
var ipcMessageSchema =
|
|
1638
|
-
|
|
1639
|
-
type:
|
|
1640
|
-
origin:
|
|
1523
|
+
var ipcMessageSchema = import_zod14.z.discriminatedUnion("type", [
|
|
1524
|
+
import_zod14.z.object({
|
|
1525
|
+
type: import_zod14.z.literal("Ack" /* Ack */),
|
|
1526
|
+
origin: import_zod14.z.literal("server" /* Server */),
|
|
1641
1527
|
data: ackSchema
|
|
1642
1528
|
}),
|
|
1643
|
-
|
|
1644
|
-
type:
|
|
1645
|
-
origin:
|
|
1646
|
-
clientId:
|
|
1529
|
+
import_zod14.z.object({
|
|
1530
|
+
type: import_zod14.z.literal("TaskCommand" /* TaskCommand */),
|
|
1531
|
+
origin: import_zod14.z.literal("client" /* Client */),
|
|
1532
|
+
clientId: import_zod14.z.string(),
|
|
1647
1533
|
data: taskCommandSchema
|
|
1648
1534
|
}),
|
|
1649
|
-
|
|
1650
|
-
type:
|
|
1651
|
-
origin:
|
|
1652
|
-
relayClientId:
|
|
1535
|
+
import_zod14.z.object({
|
|
1536
|
+
type: import_zod14.z.literal("TaskEvent" /* TaskEvent */),
|
|
1537
|
+
origin: import_zod14.z.literal("server" /* Server */),
|
|
1538
|
+
relayClientId: import_zod14.z.string().optional(),
|
|
1653
1539
|
data: taskEventSchema
|
|
1654
1540
|
})
|
|
1655
1541
|
]);
|
|
1656
1542
|
|
|
1543
|
+
// src/marketplace.ts
|
|
1544
|
+
var import_zod15 = require("zod");
|
|
1545
|
+
var mcpParameterSchema = import_zod15.z.object({
|
|
1546
|
+
name: import_zod15.z.string().min(1),
|
|
1547
|
+
key: import_zod15.z.string().min(1),
|
|
1548
|
+
placeholder: import_zod15.z.string().optional(),
|
|
1549
|
+
optional: import_zod15.z.boolean().optional().default(false)
|
|
1550
|
+
});
|
|
1551
|
+
var mcpInstallationMethodSchema = import_zod15.z.object({
|
|
1552
|
+
name: import_zod15.z.string().min(1),
|
|
1553
|
+
content: import_zod15.z.string().min(1),
|
|
1554
|
+
parameters: import_zod15.z.array(mcpParameterSchema).optional(),
|
|
1555
|
+
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
1556
|
+
});
|
|
1557
|
+
var marketplaceItemTypeSchema = import_zod15.z.enum(["mode", "mcp"]);
|
|
1558
|
+
var baseMarketplaceItemSchema = import_zod15.z.object({
|
|
1559
|
+
id: import_zod15.z.string().min(1),
|
|
1560
|
+
name: import_zod15.z.string().min(1, "Name is required"),
|
|
1561
|
+
description: import_zod15.z.string(),
|
|
1562
|
+
author: import_zod15.z.string().optional(),
|
|
1563
|
+
authorUrl: import_zod15.z.string().url("Author URL must be a valid URL").optional(),
|
|
1564
|
+
tags: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
1565
|
+
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
1566
|
+
});
|
|
1567
|
+
var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1568
|
+
content: import_zod15.z.string().min(1)
|
|
1569
|
+
// YAML content for modes
|
|
1570
|
+
});
|
|
1571
|
+
var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1572
|
+
url: import_zod15.z.string().url(),
|
|
1573
|
+
// Required url field
|
|
1574
|
+
content: import_zod15.z.union([import_zod15.z.string().min(1), import_zod15.z.array(mcpInstallationMethodSchema)]),
|
|
1575
|
+
// Single config or array of methods
|
|
1576
|
+
parameters: import_zod15.z.array(mcpParameterSchema).optional()
|
|
1577
|
+
});
|
|
1578
|
+
var marketplaceItemSchema = import_zod15.z.discriminatedUnion("type", [
|
|
1579
|
+
// Mode marketplace item
|
|
1580
|
+
modeMarketplaceItemSchema.extend({
|
|
1581
|
+
type: import_zod15.z.literal("mode")
|
|
1582
|
+
}),
|
|
1583
|
+
// MCP marketplace item
|
|
1584
|
+
mcpMarketplaceItemSchema.extend({
|
|
1585
|
+
type: import_zod15.z.literal("mcp")
|
|
1586
|
+
})
|
|
1587
|
+
]);
|
|
1588
|
+
var installMarketplaceItemOptionsSchema = import_zod15.z.object({
|
|
1589
|
+
target: import_zod15.z.enum(["global", "project"]).optional().default("project"),
|
|
1590
|
+
parameters: import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any()).optional()
|
|
1591
|
+
});
|
|
1592
|
+
|
|
1657
1593
|
// src/mcp.ts
|
|
1658
|
-
var
|
|
1659
|
-
var mcpExecutionStatusSchema =
|
|
1660
|
-
|
|
1661
|
-
executionId:
|
|
1662
|
-
status:
|
|
1663
|
-
serverName:
|
|
1664
|
-
toolName:
|
|
1594
|
+
var import_zod16 = require("zod");
|
|
1595
|
+
var mcpExecutionStatusSchema = import_zod16.z.discriminatedUnion("status", [
|
|
1596
|
+
import_zod16.z.object({
|
|
1597
|
+
executionId: import_zod16.z.string(),
|
|
1598
|
+
status: import_zod16.z.literal("started"),
|
|
1599
|
+
serverName: import_zod16.z.string(),
|
|
1600
|
+
toolName: import_zod16.z.string()
|
|
1665
1601
|
}),
|
|
1666
|
-
|
|
1667
|
-
executionId:
|
|
1668
|
-
status:
|
|
1669
|
-
response:
|
|
1602
|
+
import_zod16.z.object({
|
|
1603
|
+
executionId: import_zod16.z.string(),
|
|
1604
|
+
status: import_zod16.z.literal("output"),
|
|
1605
|
+
response: import_zod16.z.string()
|
|
1670
1606
|
}),
|
|
1671
|
-
|
|
1672
|
-
executionId:
|
|
1673
|
-
status:
|
|
1674
|
-
response:
|
|
1607
|
+
import_zod16.z.object({
|
|
1608
|
+
executionId: import_zod16.z.string(),
|
|
1609
|
+
status: import_zod16.z.literal("completed"),
|
|
1610
|
+
response: import_zod16.z.string().optional()
|
|
1675
1611
|
}),
|
|
1676
|
-
|
|
1677
|
-
executionId:
|
|
1678
|
-
status:
|
|
1679
|
-
error:
|
|
1612
|
+
import_zod16.z.object({
|
|
1613
|
+
executionId: import_zod16.z.string(),
|
|
1614
|
+
status: import_zod16.z.literal("error"),
|
|
1615
|
+
error: import_zod16.z.string().optional()
|
|
1680
1616
|
})
|
|
1681
1617
|
]);
|
|
1682
1618
|
|
|
1683
1619
|
// src/todo.ts
|
|
1684
|
-
var
|
|
1685
|
-
var todoStatusSchema =
|
|
1686
|
-
var todoItemSchema =
|
|
1687
|
-
id:
|
|
1688
|
-
content:
|
|
1620
|
+
var import_zod17 = require("zod");
|
|
1621
|
+
var todoStatusSchema = import_zod17.z.enum(["pending", "in_progress", "completed"]);
|
|
1622
|
+
var todoItemSchema = import_zod17.z.object({
|
|
1623
|
+
id: import_zod17.z.string(),
|
|
1624
|
+
content: import_zod17.z.string(),
|
|
1689
1625
|
status: todoStatusSchema
|
|
1690
1626
|
});
|
|
1691
1627
|
|
|
1692
1628
|
// src/terminal.ts
|
|
1693
|
-
var
|
|
1694
|
-
var commandExecutionStatusSchema =
|
|
1695
|
-
|
|
1696
|
-
executionId:
|
|
1697
|
-
status:
|
|
1698
|
-
pid:
|
|
1699
|
-
command:
|
|
1629
|
+
var import_zod18 = require("zod");
|
|
1630
|
+
var commandExecutionStatusSchema = import_zod18.z.discriminatedUnion("status", [
|
|
1631
|
+
import_zod18.z.object({
|
|
1632
|
+
executionId: import_zod18.z.string(),
|
|
1633
|
+
status: import_zod18.z.literal("started"),
|
|
1634
|
+
pid: import_zod18.z.number().optional(),
|
|
1635
|
+
command: import_zod18.z.string()
|
|
1700
1636
|
}),
|
|
1701
|
-
|
|
1702
|
-
executionId:
|
|
1703
|
-
status:
|
|
1704
|
-
output:
|
|
1637
|
+
import_zod18.z.object({
|
|
1638
|
+
executionId: import_zod18.z.string(),
|
|
1639
|
+
status: import_zod18.z.literal("output"),
|
|
1640
|
+
output: import_zod18.z.string()
|
|
1705
1641
|
}),
|
|
1706
|
-
|
|
1707
|
-
executionId:
|
|
1708
|
-
status:
|
|
1709
|
-
exitCode:
|
|
1642
|
+
import_zod18.z.object({
|
|
1643
|
+
executionId: import_zod18.z.string(),
|
|
1644
|
+
status: import_zod18.z.literal("exited"),
|
|
1645
|
+
exitCode: import_zod18.z.number().optional()
|
|
1710
1646
|
}),
|
|
1711
|
-
|
|
1712
|
-
executionId:
|
|
1713
|
-
status:
|
|
1647
|
+
import_zod18.z.object({
|
|
1648
|
+
executionId: import_zod18.z.string(),
|
|
1649
|
+
status: import_zod18.z.literal("fallback")
|
|
1714
1650
|
}),
|
|
1715
|
-
|
|
1716
|
-
executionId:
|
|
1717
|
-
status:
|
|
1651
|
+
import_zod18.z.object({
|
|
1652
|
+
executionId: import_zod18.z.string(),
|
|
1653
|
+
status: import_zod18.z.literal("timeout")
|
|
1718
1654
|
})
|
|
1719
1655
|
]);
|
|
1720
1656
|
|
|
@@ -1725,18 +1661,34 @@ var anthropicModels = {
|
|
|
1725
1661
|
maxTokens: 64e3,
|
|
1726
1662
|
// Overridden to 8k if `enableReasoningEffort` is false.
|
|
1727
1663
|
contextWindow: 2e5,
|
|
1664
|
+
// Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
|
|
1728
1665
|
supportsImages: true,
|
|
1729
1666
|
supportsComputerUse: true,
|
|
1730
1667
|
supportsPromptCache: true,
|
|
1731
1668
|
inputPrice: 3,
|
|
1732
|
-
// $3 per million input tokens
|
|
1669
|
+
// $3 per million input tokens (≤200K context)
|
|
1733
1670
|
outputPrice: 15,
|
|
1734
|
-
// $15 per million output tokens
|
|
1671
|
+
// $15 per million output tokens (≤200K context)
|
|
1735
1672
|
cacheWritesPrice: 3.75,
|
|
1736
1673
|
// $3.75 per million tokens
|
|
1737
1674
|
cacheReadsPrice: 0.3,
|
|
1738
1675
|
// $0.30 per million tokens
|
|
1739
|
-
supportsReasoningBudget: true
|
|
1676
|
+
supportsReasoningBudget: true,
|
|
1677
|
+
// Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
|
|
1678
|
+
tiers: [
|
|
1679
|
+
{
|
|
1680
|
+
contextWindow: 1e6,
|
|
1681
|
+
// 1M tokens with beta flag
|
|
1682
|
+
inputPrice: 6,
|
|
1683
|
+
// $6 per million input tokens (>200K context)
|
|
1684
|
+
outputPrice: 22.5,
|
|
1685
|
+
// $22.50 per million output tokens (>200K context)
|
|
1686
|
+
cacheWritesPrice: 7.5,
|
|
1687
|
+
// $7.50 per million tokens (>200K context)
|
|
1688
|
+
cacheReadsPrice: 0.6
|
|
1689
|
+
// $0.60 per million tokens (>200K context)
|
|
1690
|
+
}
|
|
1691
|
+
]
|
|
1740
1692
|
},
|
|
1741
1693
|
"claude-opus-4-1-20250805": {
|
|
1742
1694
|
maxTokens: 8192,
|
|
@@ -2073,6 +2025,26 @@ var bedrockModels = {
|
|
|
2073
2025
|
inputPrice: 1.35,
|
|
2074
2026
|
outputPrice: 5.4
|
|
2075
2027
|
},
|
|
2028
|
+
"openai.gpt-oss-20b-1:0": {
|
|
2029
|
+
maxTokens: 8192,
|
|
2030
|
+
contextWindow: 128e3,
|
|
2031
|
+
supportsImages: false,
|
|
2032
|
+
supportsComputerUse: false,
|
|
2033
|
+
supportsPromptCache: false,
|
|
2034
|
+
inputPrice: 0.5,
|
|
2035
|
+
outputPrice: 1.5,
|
|
2036
|
+
description: "GPT-OSS 20B - Optimized for low latency and local/specialized use cases"
|
|
2037
|
+
},
|
|
2038
|
+
"openai.gpt-oss-120b-1:0": {
|
|
2039
|
+
maxTokens: 8192,
|
|
2040
|
+
contextWindow: 128e3,
|
|
2041
|
+
supportsImages: false,
|
|
2042
|
+
supportsComputerUse: false,
|
|
2043
|
+
supportsPromptCache: false,
|
|
2044
|
+
inputPrice: 2,
|
|
2045
|
+
outputPrice: 6,
|
|
2046
|
+
description: "GPT-OSS 120B - Production-ready, general-purpose, high-reasoning model"
|
|
2047
|
+
},
|
|
2076
2048
|
"meta.llama3-3-70b-instruct-v1:0": {
|
|
2077
2049
|
maxTokens: 8192,
|
|
2078
2050
|
contextWindow: 128e3,
|
|
@@ -2562,6 +2534,24 @@ var chutesModels = {
|
|
|
2562
2534
|
inputPrice: 0,
|
|
2563
2535
|
outputPrice: 0,
|
|
2564
2536
|
description: "GLM-4.5-FP8 model with 128k token context window, optimized for agent-based applications with MoE architecture."
|
|
2537
|
+
},
|
|
2538
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8": {
|
|
2539
|
+
maxTokens: 32768,
|
|
2540
|
+
contextWindow: 262144,
|
|
2541
|
+
supportsImages: false,
|
|
2542
|
+
supportsPromptCache: false,
|
|
2543
|
+
inputPrice: 0,
|
|
2544
|
+
outputPrice: 0,
|
|
2545
|
+
description: "Qwen3 Coder 480B A35B Instruct FP8 model, optimized for coding tasks."
|
|
2546
|
+
},
|
|
2547
|
+
"moonshotai/Kimi-K2-Instruct-75k": {
|
|
2548
|
+
maxTokens: 32768,
|
|
2549
|
+
contextWindow: 75e3,
|
|
2550
|
+
supportsImages: false,
|
|
2551
|
+
supportsPromptCache: false,
|
|
2552
|
+
inputPrice: 0.1481,
|
|
2553
|
+
outputPrice: 0.5926,
|
|
2554
|
+
description: "Moonshot AI Kimi K2 Instruct model with 75k context window."
|
|
2565
2555
|
}
|
|
2566
2556
|
};
|
|
2567
2557
|
|
|
@@ -3098,6 +3088,41 @@ var HUGGINGFACE_TEMPERATURE_MAX_VALUE = 2;
|
|
|
3098
3088
|
var HUGGINGFACE_API_URL = "https://router.huggingface.co/v1/models?collection=roocode";
|
|
3099
3089
|
var HUGGINGFACE_CACHE_DURATION = 1e3 * 60 * 60;
|
|
3100
3090
|
|
|
3091
|
+
// src/providers/io-intelligence.ts
|
|
3092
|
+
var ioIntelligenceDefaultModelId = "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8";
|
|
3093
|
+
var ioIntelligenceDefaultBaseUrl = "https://api.intelligence.io.solutions/api/v1";
|
|
3094
|
+
var IO_INTELLIGENCE_CACHE_DURATION = 1e3 * 60 * 60;
|
|
3095
|
+
var ioIntelligenceModels = {
|
|
3096
|
+
"deepseek-ai/DeepSeek-R1-0528": {
|
|
3097
|
+
maxTokens: 8192,
|
|
3098
|
+
contextWindow: 128e3,
|
|
3099
|
+
supportsImages: false,
|
|
3100
|
+
supportsPromptCache: false,
|
|
3101
|
+
description: "DeepSeek R1 reasoning model"
|
|
3102
|
+
},
|
|
3103
|
+
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
|
|
3104
|
+
maxTokens: 8192,
|
|
3105
|
+
contextWindow: 43e4,
|
|
3106
|
+
supportsImages: true,
|
|
3107
|
+
supportsPromptCache: false,
|
|
3108
|
+
description: "Llama 4 Maverick 17B model"
|
|
3109
|
+
},
|
|
3110
|
+
"Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar": {
|
|
3111
|
+
maxTokens: 8192,
|
|
3112
|
+
contextWindow: 106e3,
|
|
3113
|
+
supportsImages: false,
|
|
3114
|
+
supportsPromptCache: false,
|
|
3115
|
+
description: "Qwen3 Coder 480B specialized for coding"
|
|
3116
|
+
},
|
|
3117
|
+
"openai/gpt-oss-120b": {
|
|
3118
|
+
maxTokens: 8192,
|
|
3119
|
+
contextWindow: 131072,
|
|
3120
|
+
supportsImages: false,
|
|
3121
|
+
supportsPromptCache: false,
|
|
3122
|
+
description: "OpenAI GPT-OSS 120B model"
|
|
3123
|
+
}
|
|
3124
|
+
};
|
|
3125
|
+
|
|
3101
3126
|
// src/providers/lite-llm.ts
|
|
3102
3127
|
var litellmDefaultModelId = "claude-3-7-sonnet-20250219";
|
|
3103
3128
|
var litellmDefaultModelInfo = {
|
|
@@ -3468,15 +3493,6 @@ var openAiNativeModels = {
|
|
|
3468
3493
|
outputPrice: 4.4,
|
|
3469
3494
|
cacheReadsPrice: 0.55
|
|
3470
3495
|
},
|
|
3471
|
-
"gpt-4.5-preview": {
|
|
3472
|
-
maxTokens: 16384,
|
|
3473
|
-
contextWindow: 128e3,
|
|
3474
|
-
supportsImages: true,
|
|
3475
|
-
supportsPromptCache: true,
|
|
3476
|
-
inputPrice: 75,
|
|
3477
|
-
outputPrice: 150,
|
|
3478
|
-
cacheReadsPrice: 37.5
|
|
3479
|
-
},
|
|
3480
3496
|
"gpt-4o": {
|
|
3481
3497
|
maxTokens: 16384,
|
|
3482
3498
|
contextWindow: 128e3,
|
|
@@ -3494,6 +3510,16 @@ var openAiNativeModels = {
|
|
|
3494
3510
|
inputPrice: 0.15,
|
|
3495
3511
|
outputPrice: 0.6,
|
|
3496
3512
|
cacheReadsPrice: 0.075
|
|
3513
|
+
},
|
|
3514
|
+
"codex-mini-latest": {
|
|
3515
|
+
maxTokens: 16384,
|
|
3516
|
+
contextWindow: 2e5,
|
|
3517
|
+
supportsImages: false,
|
|
3518
|
+
supportsPromptCache: false,
|
|
3519
|
+
inputPrice: 1.5,
|
|
3520
|
+
outputPrice: 6,
|
|
3521
|
+
cacheReadsPrice: 0,
|
|
3522
|
+
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."
|
|
3497
3523
|
}
|
|
3498
3524
|
};
|
|
3499
3525
|
var openAiModelInfoSaneDefaults = {
|
|
@@ -4484,6 +4510,7 @@ var fireworksModels = {
|
|
|
4484
4510
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
4485
4511
|
ANTHROPIC_STYLE_PROVIDERS,
|
|
4486
4512
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
4513
|
+
BEDROCK_CLAUDE_SONNET_4_MODEL_ID,
|
|
4487
4514
|
BEDROCK_DEFAULT_CONTEXT,
|
|
4488
4515
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
4489
4516
|
BEDROCK_MAX_TOKENS,
|
|
@@ -4511,6 +4538,7 @@ var fireworksModels = {
|
|
|
4511
4538
|
HUGGINGFACE_SLIDER_MIN,
|
|
4512
4539
|
HUGGINGFACE_SLIDER_STEP,
|
|
4513
4540
|
HUGGINGFACE_TEMPERATURE_MAX_VALUE,
|
|
4541
|
+
IO_INTELLIGENCE_CACHE_DURATION,
|
|
4514
4542
|
IpcMessageType,
|
|
4515
4543
|
IpcOrigin,
|
|
4516
4544
|
LITELLM_COMPUTER_USE_MODELS,
|
|
@@ -4525,8 +4553,6 @@ var fireworksModels = {
|
|
|
4525
4553
|
OPEN_ROUTER_PROMPT_CACHING_MODELS,
|
|
4526
4554
|
OPEN_ROUTER_REASONING_BUDGET_MODELS,
|
|
4527
4555
|
OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
|
|
4528
|
-
ORGANIZATION_ALLOW_ALL,
|
|
4529
|
-
ORGANIZATION_DEFAULT,
|
|
4530
4556
|
PROVIDER_SETTINGS_KEYS,
|
|
4531
4557
|
RooCodeEventName,
|
|
4532
4558
|
SECRET_STATE_KEYS,
|
|
@@ -4595,6 +4621,9 @@ var fireworksModels = {
|
|
|
4595
4621
|
installMarketplaceItemOptionsSchema,
|
|
4596
4622
|
internationalZAiDefaultModelId,
|
|
4597
4623
|
internationalZAiModels,
|
|
4624
|
+
ioIntelligenceDefaultBaseUrl,
|
|
4625
|
+
ioIntelligenceDefaultModelId,
|
|
4626
|
+
ioIntelligenceModels,
|
|
4598
4627
|
ipcMessageSchema,
|
|
4599
4628
|
isBlockingAsk,
|
|
4600
4629
|
isGlobalStateKey,
|
|
@@ -4631,10 +4660,6 @@ var fireworksModels = {
|
|
|
4631
4660
|
openAiNativeModels,
|
|
4632
4661
|
openRouterDefaultModelId,
|
|
4633
4662
|
openRouterDefaultModelInfo,
|
|
4634
|
-
organizationAllowListSchema,
|
|
4635
|
-
organizationCloudSettingsSchema,
|
|
4636
|
-
organizationDefaultSettingsSchema,
|
|
4637
|
-
organizationSettingsSchema,
|
|
4638
4663
|
promptComponentSchema,
|
|
4639
4664
|
providerNames,
|
|
4640
4665
|
providerNamesSchema,
|
|
@@ -4651,7 +4676,6 @@ var fireworksModels = {
|
|
|
4651
4676
|
rooCodeTelemetryEventSchema,
|
|
4652
4677
|
sambaNovaDefaultModelId,
|
|
4653
4678
|
sambaNovaModels,
|
|
4654
|
-
shareResponseSchema,
|
|
4655
4679
|
suggestionItemSchema,
|
|
4656
4680
|
taskCommandSchema,
|
|
4657
4681
|
taskEventSchema,
|