@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.cjs
CHANGED
|
@@ -21,11 +21,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
ANTHROPIC_DEFAULT_MAX_TOKENS: () => ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
24
|
+
ANTHROPIC_STYLE_PROVIDERS: () => ANTHROPIC_STYLE_PROVIDERS,
|
|
24
25
|
AWS_INFERENCE_PROFILE_MAPPING: () => AWS_INFERENCE_PROFILE_MAPPING,
|
|
25
26
|
BEDROCK_DEFAULT_CONTEXT: () => BEDROCK_DEFAULT_CONTEXT,
|
|
26
27
|
BEDROCK_DEFAULT_TEMPERATURE: () => BEDROCK_DEFAULT_TEMPERATURE,
|
|
27
28
|
BEDROCK_MAX_TOKENS: () => BEDROCK_MAX_TOKENS,
|
|
28
29
|
BEDROCK_REGIONS: () => BEDROCK_REGIONS,
|
|
30
|
+
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS: () => CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
29
31
|
CODEBASE_INDEX_DEFAULTS: () => CODEBASE_INDEX_DEFAULTS,
|
|
30
32
|
DEEP_SEEK_DEFAULT_TEMPERATURE: () => DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
31
33
|
EVALS_SETTINGS: () => EVALS_SETTINGS,
|
|
@@ -89,6 +91,7 @@ __export(index_exports, {
|
|
|
89
91
|
followUpDataSchema: () => followUpDataSchema,
|
|
90
92
|
geminiDefaultModelId: () => geminiDefaultModelId,
|
|
91
93
|
geminiModels: () => geminiModels,
|
|
94
|
+
getApiProtocol: () => getApiProtocol,
|
|
92
95
|
getModelId: () => getModelId,
|
|
93
96
|
gitPropertiesSchema: () => gitPropertiesSchema,
|
|
94
97
|
glamaDefaultModelId: () => glamaDefaultModelId,
|
|
@@ -900,6 +903,7 @@ var chutesModels = {
|
|
|
900
903
|
|
|
901
904
|
// src/providers/claude-code.ts
|
|
902
905
|
var claudeCodeDefaultModelId = "claude-sonnet-4-20250514";
|
|
906
|
+
var CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS = 8e3;
|
|
903
907
|
var claudeCodeModels = {
|
|
904
908
|
"claude-sonnet-4-20250514": {
|
|
905
909
|
...anthropicModels["claude-sonnet-4-20250514"],
|
|
@@ -1449,6 +1453,14 @@ var mistralModels = {
|
|
|
1449
1453
|
inputPrice: 2,
|
|
1450
1454
|
outputPrice: 5
|
|
1451
1455
|
},
|
|
1456
|
+
"devstral-medium-latest": {
|
|
1457
|
+
maxTokens: 131e3,
|
|
1458
|
+
contextWindow: 131e3,
|
|
1459
|
+
supportsImages: true,
|
|
1460
|
+
supportsPromptCache: false,
|
|
1461
|
+
inputPrice: 0.4,
|
|
1462
|
+
outputPrice: 2
|
|
1463
|
+
},
|
|
1452
1464
|
"mistral-medium-latest": {
|
|
1453
1465
|
maxTokens: 131e3,
|
|
1454
1466
|
contextWindow: 131e3,
|
|
@@ -2088,11 +2100,37 @@ var vertexModels = {
|
|
|
2088
2100
|
};
|
|
2089
2101
|
var VERTEX_REGIONS = [
|
|
2090
2102
|
{ value: "global", label: "global" },
|
|
2091
|
-
{ value: "us-east5", label: "us-east5" },
|
|
2092
2103
|
{ value: "us-central1", label: "us-central1" },
|
|
2104
|
+
{ value: "us-east1", label: "us-east1" },
|
|
2105
|
+
{ value: "us-east4", label: "us-east4" },
|
|
2106
|
+
{ value: "us-east5", label: "us-east5" },
|
|
2107
|
+
{ value: "us-west1", label: "us-west1" },
|
|
2108
|
+
{ value: "us-west2", label: "us-west2" },
|
|
2109
|
+
{ value: "us-west3", label: "us-west3" },
|
|
2110
|
+
{ value: "us-west4", label: "us-west4" },
|
|
2111
|
+
{ value: "northamerica-northeast1", label: "northamerica-northeast1" },
|
|
2112
|
+
{ value: "northamerica-northeast2", label: "northamerica-northeast2" },
|
|
2113
|
+
{ value: "southamerica-east1", label: "southamerica-east1" },
|
|
2093
2114
|
{ value: "europe-west1", label: "europe-west1" },
|
|
2115
|
+
{ value: "europe-west2", label: "europe-west2" },
|
|
2116
|
+
{ value: "europe-west3", label: "europe-west3" },
|
|
2094
2117
|
{ value: "europe-west4", label: "europe-west4" },
|
|
2095
|
-
{ value: "
|
|
2118
|
+
{ value: "europe-west6", label: "europe-west6" },
|
|
2119
|
+
{ value: "europe-central2", label: "europe-central2" },
|
|
2120
|
+
{ value: "asia-east1", label: "asia-east1" },
|
|
2121
|
+
{ value: "asia-east2", label: "asia-east2" },
|
|
2122
|
+
{ value: "asia-northeast1", label: "asia-northeast1" },
|
|
2123
|
+
{ value: "asia-northeast2", label: "asia-northeast2" },
|
|
2124
|
+
{ value: "asia-northeast3", label: "asia-northeast3" },
|
|
2125
|
+
{ value: "asia-south1", label: "asia-south1" },
|
|
2126
|
+
{ value: "asia-south2", label: "asia-south2" },
|
|
2127
|
+
{ value: "asia-southeast1", label: "asia-southeast1" },
|
|
2128
|
+
{ value: "asia-southeast2", label: "asia-southeast2" },
|
|
2129
|
+
{ value: "australia-southeast1", label: "australia-southeast1" },
|
|
2130
|
+
{ value: "australia-southeast2", label: "australia-southeast2" },
|
|
2131
|
+
{ value: "me-west1", label: "me-west1" },
|
|
2132
|
+
{ value: "me-central1", label: "me-central1" },
|
|
2133
|
+
{ value: "africa-south1", label: "africa-south1" }
|
|
2096
2134
|
];
|
|
2097
2135
|
|
|
2098
2136
|
// src/providers/vscode-llm.ts
|
|
@@ -2245,25 +2283,18 @@ var vscodeLlmModels = {
|
|
|
2245
2283
|
};
|
|
2246
2284
|
|
|
2247
2285
|
// src/providers/xai.ts
|
|
2248
|
-
var xaiDefaultModelId = "grok-
|
|
2286
|
+
var xaiDefaultModelId = "grok-4";
|
|
2249
2287
|
var xaiModels = {
|
|
2250
|
-
"grok-
|
|
2288
|
+
"grok-4": {
|
|
2251
2289
|
maxTokens: 8192,
|
|
2252
|
-
contextWindow:
|
|
2253
|
-
supportsImages: false,
|
|
2254
|
-
supportsPromptCache: false,
|
|
2255
|
-
inputPrice: 2,
|
|
2256
|
-
outputPrice: 10,
|
|
2257
|
-
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
2258
|
-
},
|
|
2259
|
-
"grok-2-vision-1212": {
|
|
2260
|
-
maxTokens: 8192,
|
|
2261
|
-
contextWindow: 32768,
|
|
2290
|
+
contextWindow: 256e3,
|
|
2262
2291
|
supportsImages: true,
|
|
2263
|
-
supportsPromptCache:
|
|
2264
|
-
inputPrice:
|
|
2265
|
-
outputPrice:
|
|
2266
|
-
|
|
2292
|
+
supportsPromptCache: true,
|
|
2293
|
+
inputPrice: 3,
|
|
2294
|
+
outputPrice: 15,
|
|
2295
|
+
cacheWritesPrice: 0.75,
|
|
2296
|
+
cacheReadsPrice: 0.75,
|
|
2297
|
+
description: "xAI's Grok-4 model with 256K context window"
|
|
2267
2298
|
},
|
|
2268
2299
|
"grok-3": {
|
|
2269
2300
|
maxTokens: 8192,
|
|
@@ -2310,6 +2341,24 @@ var xaiModels = {
|
|
|
2310
2341
|
cacheReadsPrice: 0.15,
|
|
2311
2342
|
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
2312
2343
|
supportsReasoningEffort: true
|
|
2344
|
+
},
|
|
2345
|
+
"grok-2-1212": {
|
|
2346
|
+
maxTokens: 8192,
|
|
2347
|
+
contextWindow: 131072,
|
|
2348
|
+
supportsImages: false,
|
|
2349
|
+
supportsPromptCache: false,
|
|
2350
|
+
inputPrice: 2,
|
|
2351
|
+
outputPrice: 10,
|
|
2352
|
+
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
2353
|
+
},
|
|
2354
|
+
"grok-2-vision-1212": {
|
|
2355
|
+
maxTokens: 8192,
|
|
2356
|
+
contextWindow: 32768,
|
|
2357
|
+
supportsImages: true,
|
|
2358
|
+
supportsPromptCache: false,
|
|
2359
|
+
inputPrice: 2,
|
|
2360
|
+
outputPrice: 10,
|
|
2361
|
+
description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
|
|
2313
2362
|
}
|
|
2314
2363
|
};
|
|
2315
2364
|
|
|
@@ -2453,7 +2502,8 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
|
2453
2502
|
anthropicUseAuthToken: import_zod3.z.boolean().optional()
|
|
2454
2503
|
});
|
|
2455
2504
|
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
2456
|
-
claudeCodePath: import_zod3.z.string().optional()
|
|
2505
|
+
claudeCodePath: import_zod3.z.string().optional(),
|
|
2506
|
+
claudeCodeMaxOutputTokens: import_zod3.z.number().int().min(1).max(2e5).optional()
|
|
2457
2507
|
});
|
|
2458
2508
|
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
2459
2509
|
glamaModelId: import_zod3.z.string().optional(),
|
|
@@ -2637,6 +2687,10 @@ var getModelId = (settings) => {
|
|
|
2637
2687
|
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
2638
2688
|
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
2639
2689
|
};
|
|
2690
|
+
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code"];
|
|
2691
|
+
var getApiProtocol = (provider) => {
|
|
2692
|
+
return provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider) ? "anthropic" : "openai";
|
|
2693
|
+
};
|
|
2640
2694
|
|
|
2641
2695
|
// src/history.ts
|
|
2642
2696
|
var import_zod4 = require("zod");
|
|
@@ -2734,7 +2788,8 @@ var clineMessageSchema = import_zod6.z.object({
|
|
|
2734
2788
|
checkpoint: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.unknown()).optional(),
|
|
2735
2789
|
progressStatus: toolProgressStatusSchema.optional(),
|
|
2736
2790
|
contextCondense: contextCondenseSchema.optional(),
|
|
2737
|
-
isProtected: import_zod6.z.boolean().optional()
|
|
2791
|
+
isProtected: import_zod6.z.boolean().optional(),
|
|
2792
|
+
apiProtocol: import_zod6.z.union([import_zod6.z.literal("openai"), import_zod6.z.literal("anthropic")]).optional()
|
|
2738
2793
|
});
|
|
2739
2794
|
var tokenUsageSchema = import_zod6.z.object({
|
|
2740
2795
|
totalTokensIn: import_zod6.z.number(),
|
|
@@ -2786,6 +2841,7 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
|
2786
2841
|
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
2787
2842
|
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
2788
2843
|
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
2844
|
+
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
2789
2845
|
return TelemetryEventName2;
|
|
2790
2846
|
})(TelemetryEventName || {});
|
|
2791
2847
|
var appPropertiesSchema = import_zod7.z.object({
|
|
@@ -2848,6 +2904,7 @@ var rooCodeTelemetryEventSchema = import_zod7.z.discriminatedUnion("type", [
|
|
|
2848
2904
|
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
2849
2905
|
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
2850
2906
|
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
|
|
2907
|
+
"Code Index Error" /* CODE_INDEX_ERROR */,
|
|
2851
2908
|
"Context Condensed" /* CONTEXT_CONDENSED */,
|
|
2852
2909
|
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
2853
2910
|
"Tab Shown" /* TAB_SHOWN */,
|
|
@@ -3060,6 +3117,7 @@ var globalSettingsSchema = import_zod11.z.object({
|
|
|
3060
3117
|
followupAutoApproveTimeoutMs: import_zod11.z.number().optional(),
|
|
3061
3118
|
alwaysAllowUpdateTodoList: import_zod11.z.boolean().optional(),
|
|
3062
3119
|
allowedCommands: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
3120
|
+
deniedCommands: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
3063
3121
|
allowedMaxRequests: import_zod11.z.number().nullish(),
|
|
3064
3122
|
autoCondenseContext: import_zod11.z.boolean().optional(),
|
|
3065
3123
|
autoCondenseContextPercent: import_zod11.z.number().optional(),
|
|
@@ -3144,7 +3202,7 @@ var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
|
3144
3202
|
var EVALS_SETTINGS = {
|
|
3145
3203
|
apiProvider: "openrouter",
|
|
3146
3204
|
openRouterUseMiddleOutTransform: false,
|
|
3147
|
-
lastShownAnnouncementId: "
|
|
3205
|
+
lastShownAnnouncementId: "jul-09-2025-3-23-0",
|
|
3148
3206
|
pinnedApiConfigs: {},
|
|
3149
3207
|
autoApprovalEnabled: true,
|
|
3150
3208
|
alwaysAllowReadOnly: true,
|
|
@@ -3565,11 +3623,13 @@ var todoItemSchema = import_zod18.z.object({
|
|
|
3565
3623
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3566
3624
|
0 && (module.exports = {
|
|
3567
3625
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
3626
|
+
ANTHROPIC_STYLE_PROVIDERS,
|
|
3568
3627
|
AWS_INFERENCE_PROFILE_MAPPING,
|
|
3569
3628
|
BEDROCK_DEFAULT_CONTEXT,
|
|
3570
3629
|
BEDROCK_DEFAULT_TEMPERATURE,
|
|
3571
3630
|
BEDROCK_MAX_TOKENS,
|
|
3572
3631
|
BEDROCK_REGIONS,
|
|
3632
|
+
CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
|
|
3573
3633
|
CODEBASE_INDEX_DEFAULTS,
|
|
3574
3634
|
DEEP_SEEK_DEFAULT_TEMPERATURE,
|
|
3575
3635
|
EVALS_SETTINGS,
|
|
@@ -3633,6 +3693,7 @@ var todoItemSchema = import_zod18.z.object({
|
|
|
3633
3693
|
followUpDataSchema,
|
|
3634
3694
|
geminiDefaultModelId,
|
|
3635
3695
|
geminiModels,
|
|
3696
|
+
getApiProtocol,
|
|
3636
3697
|
getModelId,
|
|
3637
3698
|
gitPropertiesSchema,
|
|
3638
3699
|
glamaDefaultModelId,
|