@roo-code/types 1.31.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 +82 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +125 -22
- package/dist/index.d.ts +125 -22
- package/dist/index.js +79 -21
- 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-
|
|
2105
|
+
"grok-4": {
|
|
2071
2106
|
maxTokens: 8192,
|
|
2072
|
-
contextWindow:
|
|
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": {
|
|
2080
|
-
maxTokens: 8192,
|
|
2081
|
-
contextWindow: 32768,
|
|
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,6 +2158,24 @@ 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
|
|
|
@@ -2273,7 +2319,8 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
|
2273
2319
|
anthropicUseAuthToken: z3.boolean().optional()
|
|
2274
2320
|
});
|
|
2275
2321
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
2276
|
-
claudeCodePath: z3.string().optional()
|
|
2322
|
+
claudeCodePath: z3.string().optional(),
|
|
2323
|
+
claudeCodeMaxOutputTokens: z3.number().int().min(1).max(2e5).optional()
|
|
2277
2324
|
});
|
|
2278
2325
|
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
2279
2326
|
glamaModelId: z3.string().optional(),
|
|
@@ -2457,6 +2504,10 @@ var getModelId = (settings) => {
|
|
|
2457
2504
|
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
2458
2505
|
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
2459
2506
|
};
|
|
2507
|
+
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code"];
|
|
2508
|
+
var getApiProtocol = (provider) => {
|
|
2509
|
+
return provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider) ? "anthropic" : "openai";
|
|
2510
|
+
};
|
|
2460
2511
|
|
|
2461
2512
|
// src/history.ts
|
|
2462
2513
|
import { z as z4 } from "zod";
|
|
@@ -2554,7 +2605,8 @@ var clineMessageSchema = z6.object({
|
|
|
2554
2605
|
checkpoint: z6.record(z6.string(), z6.unknown()).optional(),
|
|
2555
2606
|
progressStatus: toolProgressStatusSchema.optional(),
|
|
2556
2607
|
contextCondense: contextCondenseSchema.optional(),
|
|
2557
|
-
isProtected: z6.boolean().optional()
|
|
2608
|
+
isProtected: z6.boolean().optional(),
|
|
2609
|
+
apiProtocol: z6.union([z6.literal("openai"), z6.literal("anthropic")]).optional()
|
|
2558
2610
|
});
|
|
2559
2611
|
var tokenUsageSchema = z6.object({
|
|
2560
2612
|
totalTokensIn: z6.number(),
|
|
@@ -2606,6 +2658,7 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
|
2606
2658
|
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
2607
2659
|
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
2608
2660
|
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
2661
|
+
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
2609
2662
|
return TelemetryEventName2;
|
|
2610
2663
|
})(TelemetryEventName || {});
|
|
2611
2664
|
var appPropertiesSchema = z7.object({
|
|
@@ -2668,6 +2721,7 @@ var rooCodeTelemetryEventSchema = z7.discriminatedUnion("type", [
|
|
|
2668
2721
|
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
2669
2722
|
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
2670
2723
|
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
|
|
2724
|
+
"Code Index Error" /* CODE_INDEX_ERROR */,
|
|
2671
2725
|
"Context Condensed" /* CONTEXT_CONDENSED */,
|
|
2672
2726
|
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
2673
2727
|
"Tab Shown" /* TAB_SHOWN */,
|
|
@@ -2880,6 +2934,7 @@ var globalSettingsSchema = z11.object({
|
|
|
2880
2934
|
followupAutoApproveTimeoutMs: z11.number().optional(),
|
|
2881
2935
|
alwaysAllowUpdateTodoList: z11.boolean().optional(),
|
|
2882
2936
|
allowedCommands: z11.array(z11.string()).optional(),
|
|
2937
|
+
deniedCommands: z11.array(z11.string()).optional(),
|
|
2883
2938
|
allowedMaxRequests: z11.number().nullish(),
|
|
2884
2939
|
autoCondenseContext: z11.boolean().optional(),
|
|
2885
2940
|
autoCondenseContextPercent: z11.number().optional(),
|
|
@@ -2964,7 +3019,7 @@ var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
|
2964
3019
|
var EVALS_SETTINGS = {
|
|
2965
3020
|
apiProvider: "openrouter",
|
|
2966
3021
|
openRouterUseMiddleOutTransform: false,
|
|
2967
|
-
lastShownAnnouncementId: "
|
|
3022
|
+
lastShownAnnouncementId: "jul-09-2025-3-23-0",
|
|
2968
3023
|
pinnedApiConfigs: {},
|
|
2969
3024
|
autoApprovalEnabled: true,
|
|
2970
3025
|
alwaysAllowReadOnly: true,
|
|
@@ -3384,11 +3439,13 @@ var todoItemSchema = z18.object({
|
|
|
3384
3439
|
});
|
|
3385
3440
|
export {
|
|
3386
3441
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
3442
|
+
ANTHROPIC_STYLE_PROVIDERS,
|
|
3387
3443
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
3388
3444
|
BEDROCK_DEFAULT_CONTEXT,
|
|
3389
3445
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
3390
3446
|
BEDROCK_MAX_TOKENS,
|
|
3391
3447
|
BEDROCK_REGIONS,
|
|
3448
|
+
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
3392
3449
|
CODEBASE_INDEX_DEFAULTS,
|
|
3393
3450
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
3394
3451
|
EVALS_SETTINGS,
|
|
@@ -3452,6 +3509,7 @@ export {
|
|
|
3452
3509
|
followUpDataSchema,
|
|
3453
3510
|
geminiDefaultModelId,
|
|
3454
3511
|
geminiModels,
|
|
3512
|
+
getApiProtocol,
|
|
3455
3513
|
getModelId,
|
|
3456
3514
|
gitPropertiesSchema,
|
|
3457
3515
|
glamaDefaultModelId,
|