@roo-code/types 1.30.0 → 1.32.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 +126 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +655 -218
- package/dist/index.d.ts +655 -218
- package/dist/index.js +120 -28
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -720,6 +720,7 @@ var chutesModels = {
|
|
|
720
720
|
|
|
721
721
|
// src/providers/claude-code.ts
|
|
722
722
|
var claudeCodeDefaultModelId = "claude-sonnet-4-20250514";
|
|
723
|
+
var CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS = 8e3;
|
|
723
724
|
var claudeCodeModels = {
|
|
724
725
|
"claude-sonnet-4-20250514": {
|
|
725
726
|
...anthropicModels["claude-sonnet-4-20250514"],
|
|
@@ -1269,6 +1270,14 @@ var mistralModels = {
|
|
|
1269
1270
|
inputPrice: 2,
|
|
1270
1271
|
outputPrice: 5
|
|
1271
1272
|
},
|
|
1273
|
+
"devstral-medium-latest": {
|
|
1274
|
+
maxTokens: 131e3,
|
|
1275
|
+
contextWindow: 131e3,
|
|
1276
|
+
supportsImages: true,
|
|
1277
|
+
supportsPromptCache: false,
|
|
1278
|
+
inputPrice: 0.4,
|
|
1279
|
+
outputPrice: 2
|
|
1280
|
+
},
|
|
1272
1281
|
"mistral-medium-latest": {
|
|
1273
1282
|
maxTokens: 131e3,
|
|
1274
1283
|
contextWindow: 131e3,
|
|
@@ -1908,11 +1917,37 @@ var vertexModels = {
|
|
|
1908
1917
|
};
|
|
1909
1918
|
var VERTEX_REGIONS = [
|
|
1910
1919
|
{ value: "global", label: "global" },
|
|
1911
|
-
{ value: "us-east5", label: "us-east5" },
|
|
1912
1920
|
{ value: "us-central1", label: "us-central1" },
|
|
1921
|
+
{ value: "us-east1", label: "us-east1" },
|
|
1922
|
+
{ value: "us-east4", label: "us-east4" },
|
|
1923
|
+
{ value: "us-east5", label: "us-east5" },
|
|
1924
|
+
{ value: "us-west1", label: "us-west1" },
|
|
1925
|
+
{ value: "us-west2", label: "us-west2" },
|
|
1926
|
+
{ value: "us-west3", label: "us-west3" },
|
|
1927
|
+
{ value: "us-west4", label: "us-west4" },
|
|
1928
|
+
{ value: "northamerica-northeast1", label: "northamerica-northeast1" },
|
|
1929
|
+
{ value: "northamerica-northeast2", label: "northamerica-northeast2" },
|
|
1930
|
+
{ value: "southamerica-east1", label: "southamerica-east1" },
|
|
1913
1931
|
{ value: "europe-west1", label: "europe-west1" },
|
|
1932
|
+
{ value: "europe-west2", label: "europe-west2" },
|
|
1933
|
+
{ value: "europe-west3", label: "europe-west3" },
|
|
1914
1934
|
{ value: "europe-west4", label: "europe-west4" },
|
|
1915
|
-
{ value: "
|
|
1935
|
+
{ value: "europe-west6", label: "europe-west6" },
|
|
1936
|
+
{ value: "europe-central2", label: "europe-central2" },
|
|
1937
|
+
{ value: "asia-east1", label: "asia-east1" },
|
|
1938
|
+
{ value: "asia-east2", label: "asia-east2" },
|
|
1939
|
+
{ value: "asia-northeast1", label: "asia-northeast1" },
|
|
1940
|
+
{ value: "asia-northeast2", label: "asia-northeast2" },
|
|
1941
|
+
{ value: "asia-northeast3", label: "asia-northeast3" },
|
|
1942
|
+
{ value: "asia-south1", label: "asia-south1" },
|
|
1943
|
+
{ value: "asia-south2", label: "asia-south2" },
|
|
1944
|
+
{ value: "asia-southeast1", label: "asia-southeast1" },
|
|
1945
|
+
{ value: "asia-southeast2", label: "asia-southeast2" },
|
|
1946
|
+
{ value: "australia-southeast1", label: "australia-southeast1" },
|
|
1947
|
+
{ value: "australia-southeast2", label: "australia-southeast2" },
|
|
1948
|
+
{ value: "me-west1", label: "me-west1" },
|
|
1949
|
+
{ value: "me-central1", label: "me-central1" },
|
|
1950
|
+
{ value: "africa-south1", label: "africa-south1" }
|
|
1916
1951
|
];
|
|
1917
1952
|
|
|
1918
1953
|
// src/providers/vscode-llm.ts
|
|
@@ -2065,25 +2100,18 @@ var vscodeLlmModels = {
|
|
|
2065
2100
|
};
|
|
2066
2101
|
|
|
2067
2102
|
// src/providers/xai.ts
|
|
2068
|
-
var xaiDefaultModelId = "grok-
|
|
2103
|
+
var xaiDefaultModelId = "grok-4";
|
|
2069
2104
|
var xaiModels = {
|
|
2070
|
-
"grok-
|
|
2071
|
-
maxTokens: 8192,
|
|
2072
|
-
contextWindow: 131072,
|
|
2073
|
-
supportsImages: false,
|
|
2074
|
-
supportsPromptCache: false,
|
|
2075
|
-
inputPrice: 2,
|
|
2076
|
-
outputPrice: 10,
|
|
2077
|
-
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
2078
|
-
},
|
|
2079
|
-
"grok-2-vision-1212": {
|
|
2105
|
+
"grok-4": {
|
|
2080
2106
|
maxTokens: 8192,
|
|
2081
|
-
contextWindow:
|
|
2107
|
+
contextWindow: 256e3,
|
|
2082
2108
|
supportsImages: true,
|
|
2083
|
-
supportsPromptCache:
|
|
2084
|
-
inputPrice:
|
|
2085
|
-
outputPrice:
|
|
2086
|
-
|
|
2109
|
+
supportsPromptCache: true,
|
|
2110
|
+
inputPrice: 3,
|
|
2111
|
+
outputPrice: 15,
|
|
2112
|
+
cacheWritesPrice: 0.75,
|
|
2113
|
+
cacheReadsPrice: 0.75,
|
|
2114
|
+
description: "xAI's Grok-4 model with 256K context window"
|
|
2087
2115
|
},
|
|
2088
2116
|
"grok-3": {
|
|
2089
2117
|
maxTokens: 8192,
|
|
@@ -2130,30 +2158,65 @@ var xaiModels = {
|
|
|
2130
2158
|
cacheReadsPrice: 0.15,
|
|
2131
2159
|
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
2132
2160
|
supportsReasoningEffort: true
|
|
2161
|
+
},
|
|
2162
|
+
"grok-2-1212": {
|
|
2163
|
+
maxTokens: 8192,
|
|
2164
|
+
contextWindow: 131072,
|
|
2165
|
+
supportsImages: false,
|
|
2166
|
+
supportsPromptCache: false,
|
|
2167
|
+
inputPrice: 2,
|
|
2168
|
+
outputPrice: 10,
|
|
2169
|
+
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
2170
|
+
},
|
|
2171
|
+
"grok-2-vision-1212": {
|
|
2172
|
+
maxTokens: 8192,
|
|
2173
|
+
contextWindow: 32768,
|
|
2174
|
+
supportsImages: true,
|
|
2175
|
+
supportsPromptCache: false,
|
|
2176
|
+
inputPrice: 2,
|
|
2177
|
+
outputPrice: 10,
|
|
2178
|
+
description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
|
|
2133
2179
|
}
|
|
2134
2180
|
};
|
|
2135
2181
|
|
|
2136
2182
|
// src/codebase-index.ts
|
|
2137
2183
|
import { z } from "zod";
|
|
2184
|
+
var CODEBASE_INDEX_DEFAULTS = {
|
|
2185
|
+
MIN_SEARCH_RESULTS: 10,
|
|
2186
|
+
MAX_SEARCH_RESULTS: 200,
|
|
2187
|
+
DEFAULT_SEARCH_RESULTS: 50,
|
|
2188
|
+
SEARCH_RESULTS_STEP: 10,
|
|
2189
|
+
MIN_SEARCH_SCORE: 0,
|
|
2190
|
+
MAX_SEARCH_SCORE: 1,
|
|
2191
|
+
DEFAULT_SEARCH_MIN_SCORE: 0.4,
|
|
2192
|
+
SEARCH_SCORE_STEP: 0.05
|
|
2193
|
+
};
|
|
2138
2194
|
var codebaseIndexConfigSchema = z.object({
|
|
2139
2195
|
codebaseIndexEnabled: z.boolean().optional(),
|
|
2140
2196
|
codebaseIndexQdrantUrl: z.string().optional(),
|
|
2141
|
-
codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible"]).optional(),
|
|
2197
|
+
codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible", "gemini"]).optional(),
|
|
2142
2198
|
codebaseIndexEmbedderBaseUrl: z.string().optional(),
|
|
2143
2199
|
codebaseIndexEmbedderModelId: z.string().optional(),
|
|
2144
|
-
|
|
2200
|
+
codebaseIndexEmbedderModelDimension: z.number().optional(),
|
|
2201
|
+
codebaseIndexSearchMinScore: z.number().min(0).max(1).optional(),
|
|
2202
|
+
codebaseIndexSearchMaxResults: z.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
|
|
2203
|
+
// OpenAI Compatible specific fields
|
|
2204
|
+
codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
|
|
2205
|
+
codebaseIndexOpenAiCompatibleModelDimension: z.number().optional()
|
|
2145
2206
|
});
|
|
2146
2207
|
var codebaseIndexModelsSchema = z.object({
|
|
2147
2208
|
openai: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
|
|
2148
2209
|
ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
|
|
2149
|
-
"openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional()
|
|
2210
|
+
"openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
|
|
2211
|
+
gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional()
|
|
2150
2212
|
});
|
|
2151
2213
|
var codebaseIndexProviderSchema = z.object({
|
|
2152
2214
|
codeIndexOpenAiKey: z.string().optional(),
|
|
2153
2215
|
codeIndexQdrantApiKey: z.string().optional(),
|
|
2154
2216
|
codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
|
|
2155
2217
|
codebaseIndexOpenAiCompatibleApiKey: z.string().optional(),
|
|
2156
|
-
codebaseIndexOpenAiCompatibleModelDimension: z.number().optional()
|
|
2218
|
+
codebaseIndexOpenAiCompatibleModelDimension: z.number().optional(),
|
|
2219
|
+
codebaseIndexGeminiApiKey: z.string().optional()
|
|
2157
2220
|
});
|
|
2158
2221
|
|
|
2159
2222
|
// src/cloud.ts
|
|
@@ -2256,7 +2319,8 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
|
2256
2319
|
anthropicUseAuthToken: z3.boolean().optional()
|
|
2257
2320
|
});
|
|
2258
2321
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
2259
|
-
claudeCodePath: z3.string().optional()
|
|
2322
|
+
claudeCodePath: z3.string().optional(),
|
|
2323
|
+
claudeCodeMaxOutputTokens: z3.number().int().min(1).max(2e5).optional()
|
|
2260
2324
|
});
|
|
2261
2325
|
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
2262
2326
|
glamaModelId: z3.string().optional(),
|
|
@@ -2440,6 +2504,10 @@ var getModelId = (settings) => {
|
|
|
2440
2504
|
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
2441
2505
|
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
2442
2506
|
};
|
|
2507
|
+
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code"];
|
|
2508
|
+
var getApiProtocol = (provider) => {
|
|
2509
|
+
return provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider) ? "anthropic" : "openai";
|
|
2510
|
+
};
|
|
2443
2511
|
|
|
2444
2512
|
// src/history.ts
|
|
2445
2513
|
import { z as z4 } from "zod";
|
|
@@ -2510,7 +2578,8 @@ var clineSays = [
|
|
|
2510
2578
|
"diff_error",
|
|
2511
2579
|
"condense_context",
|
|
2512
2580
|
"condense_context_error",
|
|
2513
|
-
"codebase_search_result"
|
|
2581
|
+
"codebase_search_result",
|
|
2582
|
+
"user_edit_todos"
|
|
2514
2583
|
];
|
|
2515
2584
|
var clineSaySchema = z6.enum(clineSays);
|
|
2516
2585
|
var toolProgressStatusSchema = z6.object({
|
|
@@ -2536,7 +2605,8 @@ var clineMessageSchema = z6.object({
|
|
|
2536
2605
|
checkpoint: z6.record(z6.string(), z6.unknown()).optional(),
|
|
2537
2606
|
progressStatus: toolProgressStatusSchema.optional(),
|
|
2538
2607
|
contextCondense: contextCondenseSchema.optional(),
|
|
2539
|
-
isProtected: z6.boolean().optional()
|
|
2608
|
+
isProtected: z6.boolean().optional(),
|
|
2609
|
+
apiProtocol: z6.union([z6.literal("openai"), z6.literal("anthropic")]).optional()
|
|
2540
2610
|
});
|
|
2541
2611
|
var tokenUsageSchema = z6.object({
|
|
2542
2612
|
totalTokensIn: z6.number(),
|
|
@@ -2588,6 +2658,7 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
|
2588
2658
|
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
2589
2659
|
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
2590
2660
|
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
2661
|
+
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
2591
2662
|
return TelemetryEventName2;
|
|
2592
2663
|
})(TelemetryEventName || {});
|
|
2593
2664
|
var appPropertiesSchema = z7.object({
|
|
@@ -2650,6 +2721,7 @@ var rooCodeTelemetryEventSchema = z7.discriminatedUnion("type", [
|
|
|
2650
2721
|
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
2651
2722
|
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
2652
2723
|
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
|
|
2724
|
+
"Code Index Error" /* CODE_INDEX_ERROR */,
|
|
2653
2725
|
"Context Condensed" /* CONTEXT_CONDENSED */,
|
|
2654
2726
|
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
2655
2727
|
"Tab Shown" /* TAB_SHOWN */,
|
|
@@ -2704,7 +2776,8 @@ var toolNames = [
|
|
|
2704
2776
|
"switch_mode",
|
|
2705
2777
|
"new_task",
|
|
2706
2778
|
"fetch_instructions",
|
|
2707
|
-
"codebase_search"
|
|
2779
|
+
"codebase_search",
|
|
2780
|
+
"update_todo_list"
|
|
2708
2781
|
];
|
|
2709
2782
|
var toolNamesSchema = z8.enum(toolNames);
|
|
2710
2783
|
var toolUsageSchema = z8.record(
|
|
@@ -2859,7 +2932,9 @@ var globalSettingsSchema = z11.object({
|
|
|
2859
2932
|
alwaysAllowExecute: z11.boolean().optional(),
|
|
2860
2933
|
alwaysAllowFollowupQuestions: z11.boolean().optional(),
|
|
2861
2934
|
followupAutoApproveTimeoutMs: z11.number().optional(),
|
|
2935
|
+
alwaysAllowUpdateTodoList: z11.boolean().optional(),
|
|
2862
2936
|
allowedCommands: z11.array(z11.string()).optional(),
|
|
2937
|
+
deniedCommands: z11.array(z11.string()).optional(),
|
|
2863
2938
|
allowedMaxRequests: z11.number().nullish(),
|
|
2864
2939
|
autoCondenseContext: z11.boolean().optional(),
|
|
2865
2940
|
autoCondenseContextPercent: z11.number().optional(),
|
|
@@ -2933,7 +3008,8 @@ var SECRET_STATE_KEYS = [
|
|
|
2933
3008
|
"litellmApiKey",
|
|
2934
3009
|
"codeIndexOpenAiKey",
|
|
2935
3010
|
"codeIndexQdrantApiKey",
|
|
2936
|
-
"codebaseIndexOpenAiCompatibleApiKey"
|
|
3011
|
+
"codebaseIndexOpenAiCompatibleApiKey",
|
|
3012
|
+
"codebaseIndexGeminiApiKey"
|
|
2937
3013
|
];
|
|
2938
3014
|
var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
|
|
2939
3015
|
var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
|
|
@@ -2943,7 +3019,7 @@ var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
|
2943
3019
|
var EVALS_SETTINGS = {
|
|
2944
3020
|
apiProvider: "openrouter",
|
|
2945
3021
|
openRouterUseMiddleOutTransform: false,
|
|
2946
|
-
lastShownAnnouncementId: "
|
|
3022
|
+
lastShownAnnouncementId: "jul-09-2025-3-23-0",
|
|
2947
3023
|
pinnedApiConfigs: {},
|
|
2948
3024
|
autoApprovalEnabled: true,
|
|
2949
3025
|
alwaysAllowReadOnly: true,
|
|
@@ -2960,6 +3036,7 @@ var EVALS_SETTINGS = {
|
|
|
2960
3036
|
alwaysAllowSubtasks: true,
|
|
2961
3037
|
alwaysAllowExecute: true,
|
|
2962
3038
|
alwaysAllowFollowupQuestions: true,
|
|
3039
|
+
alwaysAllowUpdateTodoList: true,
|
|
2963
3040
|
followupAutoApproveTimeoutMs: 0,
|
|
2964
3041
|
allowedCommands: ["*"],
|
|
2965
3042
|
browserToolEnabled: false,
|
|
@@ -3351,13 +3428,25 @@ var commandExecutionStatusSchema = z17.discriminatedUnion("status", [
|
|
|
3351
3428
|
status: z17.literal("fallback")
|
|
3352
3429
|
})
|
|
3353
3430
|
]);
|
|
3431
|
+
|
|
3432
|
+
// src/todo.ts
|
|
3433
|
+
import { z as z18 } from "zod";
|
|
3434
|
+
var todoStatusSchema = z18.enum(["pending", "in_progress", "completed"]);
|
|
3435
|
+
var todoItemSchema = z18.object({
|
|
3436
|
+
id: z18.string(),
|
|
3437
|
+
content: z18.string(),
|
|
3438
|
+
status: todoStatusSchema
|
|
3439
|
+
});
|
|
3354
3440
|
export {
|
|
3355
3441
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
3442
|
+
ANTHROPIC_STYLE_PROVIDERS,
|
|
3356
3443
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
3357
3444
|
BEDROCK_DEFAULT_CONTEXT,
|
|
3358
3445
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
3359
3446
|
BEDROCK_MAX_TOKENS,
|
|
3360
3447
|
BEDROCK_REGIONS,
|
|
3448
|
+
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
3449
|
+
CODEBASE_INDEX_DEFAULTS,
|
|
3361
3450
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
3362
3451
|
EVALS_SETTINGS,
|
|
3363
3452
|
EVALS_TIMEOUT,
|
|
@@ -3420,6 +3509,7 @@ export {
|
|
|
3420
3509
|
followUpDataSchema,
|
|
3421
3510
|
geminiDefaultModelId,
|
|
3422
3511
|
geminiModels,
|
|
3512
|
+
getApiProtocol,
|
|
3423
3513
|
getModelId,
|
|
3424
3514
|
gitPropertiesSchema,
|
|
3425
3515
|
glamaDefaultModelId,
|
|
@@ -3489,6 +3579,8 @@ export {
|
|
|
3489
3579
|
telemetrySettings,
|
|
3490
3580
|
telemetrySettingsSchema,
|
|
3491
3581
|
terminalActionIds,
|
|
3582
|
+
todoItemSchema,
|
|
3583
|
+
todoStatusSchema,
|
|
3492
3584
|
tokenUsageSchema,
|
|
3493
3585
|
toolGroups,
|
|
3494
3586
|
toolGroupsSchema,
|