@roo-code/types 1.31.0 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -719,7 +719,15 @@ var chutesModels = {
719
719
  };
720
720
 
721
721
  // src/providers/claude-code.ts
722
+ var VERTEX_DATE_PATTERN = /-(\d{8})$/;
723
+ function convertModelNameForVertex(modelName) {
724
+ return modelName.replace(VERTEX_DATE_PATTERN, "@$1");
725
+ }
722
726
  var claudeCodeDefaultModelId = "claude-sonnet-4-20250514";
727
+ var CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS = 8e3;
728
+ function getClaudeCodeModelId(baseModelId, useVertex = false) {
729
+ return useVertex ? convertModelNameForVertex(baseModelId) : baseModelId;
730
+ }
723
731
  var claudeCodeModels = {
724
732
  "claude-sonnet-4-20250514": {
725
733
  ...anthropicModels["claude-sonnet-4-20250514"],
@@ -1124,7 +1132,7 @@ var groqDefaultModelId = "llama-3.3-70b-versatile";
1124
1132
  var groqModels = {
1125
1133
  // Models based on API response: https://api.groq.com/openai/v1/models
1126
1134
  "llama-3.1-8b-instant": {
1127
- maxTokens: 131072,
1135
+ maxTokens: 8192,
1128
1136
  contextWindow: 131072,
1129
1137
  supportsImages: false,
1130
1138
  supportsPromptCache: false,
@@ -1133,7 +1141,7 @@ var groqModels = {
1133
1141
  description: "Meta Llama 3.1 8B Instant model, 128K context."
1134
1142
  },
1135
1143
  "llama-3.3-70b-versatile": {
1136
- maxTokens: 32768,
1144
+ maxTokens: 8192,
1137
1145
  contextWindow: 131072,
1138
1146
  supportsImages: false,
1139
1147
  supportsPromptCache: false,
@@ -1160,7 +1168,7 @@ var groqModels = {
1160
1168
  description: "Meta Llama 4 Maverick 17B Instruct model, 128K context."
1161
1169
  },
1162
1170
  "mistral-saba-24b": {
1163
- maxTokens: 32768,
1171
+ maxTokens: 8192,
1164
1172
  contextWindow: 32768,
1165
1173
  supportsImages: false,
1166
1174
  supportsPromptCache: false,
@@ -1169,7 +1177,7 @@ var groqModels = {
1169
1177
  description: "Mistral Saba 24B model, 32K context."
1170
1178
  },
1171
1179
  "qwen-qwq-32b": {
1172
- maxTokens: 131072,
1180
+ maxTokens: 8192,
1173
1181
  contextWindow: 131072,
1174
1182
  supportsImages: false,
1175
1183
  supportsPromptCache: false,
@@ -1178,7 +1186,7 @@ var groqModels = {
1178
1186
  description: "Alibaba Qwen QwQ 32B model, 128K context."
1179
1187
  },
1180
1188
  "qwen/qwen3-32b": {
1181
- maxTokens: 40960,
1189
+ maxTokens: 8192,
1182
1190
  contextWindow: 131072,
1183
1191
  supportsImages: false,
1184
1192
  supportsPromptCache: false,
@@ -1187,13 +1195,22 @@ var groqModels = {
1187
1195
  description: "Alibaba Qwen 3 32B model, 128K context."
1188
1196
  },
1189
1197
  "deepseek-r1-distill-llama-70b": {
1190
- maxTokens: 131072,
1198
+ maxTokens: 8192,
1191
1199
  contextWindow: 131072,
1192
1200
  supportsImages: false,
1193
1201
  supportsPromptCache: false,
1194
1202
  inputPrice: 0.75,
1195
1203
  outputPrice: 0.99,
1196
1204
  description: "DeepSeek R1 Distill Llama 70B model, 128K context."
1205
+ },
1206
+ "moonshotai/kimi-k2-instruct": {
1207
+ maxTokens: 16384,
1208
+ contextWindow: 131072,
1209
+ supportsImages: false,
1210
+ supportsPromptCache: false,
1211
+ inputPrice: 1,
1212
+ outputPrice: 3,
1213
+ description: "Moonshot AI Kimi K2 Instruct 1T model, 128K context."
1197
1214
  }
1198
1215
  };
1199
1216
 
@@ -1269,6 +1286,14 @@ var mistralModels = {
1269
1286
  inputPrice: 2,
1270
1287
  outputPrice: 5
1271
1288
  },
1289
+ "devstral-medium-latest": {
1290
+ maxTokens: 131e3,
1291
+ contextWindow: 131e3,
1292
+ supportsImages: true,
1293
+ supportsPromptCache: false,
1294
+ inputPrice: 0.4,
1295
+ outputPrice: 2
1296
+ },
1272
1297
  "mistral-medium-latest": {
1273
1298
  maxTokens: 131e3,
1274
1299
  contextWindow: 131e3,
@@ -1908,11 +1933,37 @@ var vertexModels = {
1908
1933
  };
1909
1934
  var VERTEX_REGIONS = [
1910
1935
  { value: "global", label: "global" },
1911
- { value: "us-east5", label: "us-east5" },
1912
1936
  { value: "us-central1", label: "us-central1" },
1937
+ { value: "us-east1", label: "us-east1" },
1938
+ { value: "us-east4", label: "us-east4" },
1939
+ { value: "us-east5", label: "us-east5" },
1940
+ { value: "us-west1", label: "us-west1" },
1941
+ { value: "us-west2", label: "us-west2" },
1942
+ { value: "us-west3", label: "us-west3" },
1943
+ { value: "us-west4", label: "us-west4" },
1944
+ { value: "northamerica-northeast1", label: "northamerica-northeast1" },
1945
+ { value: "northamerica-northeast2", label: "northamerica-northeast2" },
1946
+ { value: "southamerica-east1", label: "southamerica-east1" },
1913
1947
  { value: "europe-west1", label: "europe-west1" },
1948
+ { value: "europe-west2", label: "europe-west2" },
1949
+ { value: "europe-west3", label: "europe-west3" },
1914
1950
  { value: "europe-west4", label: "europe-west4" },
1915
- { value: "asia-southeast1", label: "asia-southeast1" }
1951
+ { value: "europe-west6", label: "europe-west6" },
1952
+ { value: "europe-central2", label: "europe-central2" },
1953
+ { value: "asia-east1", label: "asia-east1" },
1954
+ { value: "asia-east2", label: "asia-east2" },
1955
+ { value: "asia-northeast1", label: "asia-northeast1" },
1956
+ { value: "asia-northeast2", label: "asia-northeast2" },
1957
+ { value: "asia-northeast3", label: "asia-northeast3" },
1958
+ { value: "asia-south1", label: "asia-south1" },
1959
+ { value: "asia-south2", label: "asia-south2" },
1960
+ { value: "asia-southeast1", label: "asia-southeast1" },
1961
+ { value: "asia-southeast2", label: "asia-southeast2" },
1962
+ { value: "australia-southeast1", label: "australia-southeast1" },
1963
+ { value: "australia-southeast2", label: "australia-southeast2" },
1964
+ { value: "me-west1", label: "me-west1" },
1965
+ { value: "me-central1", label: "me-central1" },
1966
+ { value: "africa-south1", label: "africa-south1" }
1916
1967
  ];
1917
1968
 
1918
1969
  // src/providers/vscode-llm.ts
@@ -2065,25 +2116,18 @@ var vscodeLlmModels = {
2065
2116
  };
2066
2117
 
2067
2118
  // src/providers/xai.ts
2068
- var xaiDefaultModelId = "grok-3";
2119
+ var xaiDefaultModelId = "grok-4";
2069
2120
  var xaiModels = {
2070
- "grok-2-1212": {
2121
+ "grok-4": {
2071
2122
  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": {
2080
- maxTokens: 8192,
2081
- contextWindow: 32768,
2123
+ contextWindow: 256e3,
2082
2124
  supportsImages: true,
2083
- supportsPromptCache: false,
2084
- inputPrice: 2,
2085
- outputPrice: 10,
2086
- description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
2125
+ supportsPromptCache: true,
2126
+ inputPrice: 3,
2127
+ outputPrice: 15,
2128
+ cacheWritesPrice: 0.75,
2129
+ cacheReadsPrice: 0.75,
2130
+ description: "xAI's Grok-4 model with 256K context window"
2087
2131
  },
2088
2132
  "grok-3": {
2089
2133
  maxTokens: 8192,
@@ -2130,6 +2174,24 @@ var xaiModels = {
2130
2174
  cacheReadsPrice: 0.15,
2131
2175
  description: "xAI's Grok-3 mini fast model with 128K context window",
2132
2176
  supportsReasoningEffort: true
2177
+ },
2178
+ "grok-2-1212": {
2179
+ maxTokens: 8192,
2180
+ contextWindow: 131072,
2181
+ supportsImages: false,
2182
+ supportsPromptCache: false,
2183
+ inputPrice: 2,
2184
+ outputPrice: 10,
2185
+ description: "xAI's Grok-2 model (version 1212) with 128K context window"
2186
+ },
2187
+ "grok-2-vision-1212": {
2188
+ maxTokens: 8192,
2189
+ contextWindow: 32768,
2190
+ supportsImages: true,
2191
+ supportsPromptCache: false,
2192
+ inputPrice: 2,
2193
+ outputPrice: 10,
2194
+ description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
2133
2195
  }
2134
2196
  };
2135
2197
 
@@ -2252,12 +2314,14 @@ var providerSettingsEntrySchema = z3.object({
2252
2314
  name: z3.string(),
2253
2315
  apiProvider: providerNamesSchema.optional()
2254
2316
  });
2317
+ var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
2255
2318
  var baseProviderSettingsSchema = z3.object({
2256
2319
  includeMaxTokens: z3.boolean().optional(),
2257
2320
  diffEnabled: z3.boolean().optional(),
2258
2321
  fuzzyMatchThreshold: z3.number().optional(),
2259
2322
  modelTemperature: z3.number().nullish(),
2260
2323
  rateLimitSeconds: z3.number().optional(),
2324
+ consecutiveMistakeLimit: z3.number().min(0).optional(),
2261
2325
  // Model reasoning.
2262
2326
  enableReasoningEffort: z3.boolean().optional(),
2263
2327
  reasoningEffort: reasoningEffortsSchema.optional(),
@@ -2273,7 +2337,8 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
2273
2337
  anthropicUseAuthToken: z3.boolean().optional()
2274
2338
  });
2275
2339
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
2276
- claudeCodePath: z3.string().optional()
2340
+ claudeCodePath: z3.string().optional(),
2341
+ claudeCodeMaxOutputTokens: z3.number().int().min(1).max(2e5).optional()
2277
2342
  });
2278
2343
  var glamaSchema = baseProviderSettingsSchema.extend({
2279
2344
  glamaModelId: z3.string().optional(),
@@ -2457,6 +2522,10 @@ var getModelId = (settings) => {
2457
2522
  const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
2458
2523
  return modelIdKey ? settings[modelIdKey] : void 0;
2459
2524
  };
2525
+ var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code"];
2526
+ var getApiProtocol = (provider) => {
2527
+ return provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider) ? "anthropic" : "openai";
2528
+ };
2460
2529
 
2461
2530
  // src/history.ts
2462
2531
  import { z as z4 } from "zod";
@@ -2554,7 +2623,8 @@ var clineMessageSchema = z6.object({
2554
2623
  checkpoint: z6.record(z6.string(), z6.unknown()).optional(),
2555
2624
  progressStatus: toolProgressStatusSchema.optional(),
2556
2625
  contextCondense: contextCondenseSchema.optional(),
2557
- isProtected: z6.boolean().optional()
2626
+ isProtected: z6.boolean().optional(),
2627
+ apiProtocol: z6.union([z6.literal("openai"), z6.literal("anthropic")]).optional()
2558
2628
  });
2559
2629
  var tokenUsageSchema = z6.object({
2560
2630
  totalTokensIn: z6.number(),
@@ -2606,6 +2676,7 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
2606
2676
  TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
2607
2677
  TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
2608
2678
  TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
2679
+ TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
2609
2680
  return TelemetryEventName2;
2610
2681
  })(TelemetryEventName || {});
2611
2682
  var appPropertiesSchema = z7.object({
@@ -2623,7 +2694,13 @@ var taskPropertiesSchema = z7.object({
2623
2694
  apiProvider: z7.enum(providerNames).optional(),
2624
2695
  modelId: z7.string().optional(),
2625
2696
  diffStrategy: z7.string().optional(),
2626
- isSubtask: z7.boolean().optional()
2697
+ isSubtask: z7.boolean().optional(),
2698
+ todos: z7.object({
2699
+ total: z7.number(),
2700
+ completed: z7.number(),
2701
+ inProgress: z7.number(),
2702
+ pending: z7.number()
2703
+ }).optional()
2627
2704
  });
2628
2705
  var gitPropertiesSchema = z7.object({
2629
2706
  repositoryUrl: z7.string().optional(),
@@ -2668,6 +2745,7 @@ var rooCodeTelemetryEventSchema = z7.discriminatedUnion("type", [
2668
2745
  "Diff Application Error" /* DIFF_APPLICATION_ERROR */,
2669
2746
  "Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
2670
2747
  "Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
2748
+ "Code Index Error" /* CODE_INDEX_ERROR */,
2671
2749
  "Context Condensed" /* CONTEXT_CONDENSED */,
2672
2750
  "Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
2673
2751
  "Tab Shown" /* TAB_SHOWN */,
@@ -2880,6 +2958,7 @@ var globalSettingsSchema = z11.object({
2880
2958
  followupAutoApproveTimeoutMs: z11.number().optional(),
2881
2959
  alwaysAllowUpdateTodoList: z11.boolean().optional(),
2882
2960
  allowedCommands: z11.array(z11.string()).optional(),
2961
+ deniedCommands: z11.array(z11.string()).optional(),
2883
2962
  allowedMaxRequests: z11.number().nullish(),
2884
2963
  autoCondenseContext: z11.boolean().optional(),
2885
2964
  autoCondenseContextPercent: z11.number().optional(),
@@ -2964,7 +3043,7 @@ var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
2964
3043
  var EVALS_SETTINGS = {
2965
3044
  apiProvider: "openrouter",
2966
3045
  openRouterUseMiddleOutTransform: false,
2967
- lastShownAnnouncementId: "may-29-2025-3-19",
3046
+ lastShownAnnouncementId: "jul-09-2025-3-23-0",
2968
3047
  pinnedApiConfigs: {},
2969
3048
  autoApprovalEnabled: true,
2970
3049
  alwaysAllowReadOnly: true,
@@ -3371,6 +3450,10 @@ var commandExecutionStatusSchema = z17.discriminatedUnion("status", [
3371
3450
  z17.object({
3372
3451
  executionId: z17.string(),
3373
3452
  status: z17.literal("fallback")
3453
+ }),
3454
+ z17.object({
3455
+ executionId: z17.string(),
3456
+ status: z17.literal("timeout")
3374
3457
  })
3375
3458
  ]);
3376
3459
 
@@ -3384,13 +3467,16 @@ var todoItemSchema = z18.object({
3384
3467
  });
3385
3468
  export {
3386
3469
  ANTHROPIC_DEFAULT_MAX_TOKENS,
3470
+ ANTHROPIC_STYLE_PROVIDERS,
3387
3471
  AWS_INFERENCE_PROFILE_MAPPING,
3388
3472
  BEDROCK_DEFAULT_CONTEXT,
3389
3473
  BEDROCK_DEFAULT_TEMPERATURE,
3390
3474
  BEDROCK_MAX_TOKENS,
3391
3475
  BEDROCK_REGIONS,
3476
+ CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
3392
3477
  CODEBASE_INDEX_DEFAULTS,
3393
3478
  DEEP_SEEK_DEFAULT_TEMPERATURE,
3479
+ DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
3394
3480
  EVALS_SETTINGS,
3395
3481
  EVALS_TIMEOUT,
3396
3482
  GLAMA_DEFAULT_TEMPERATURE,
@@ -3441,6 +3527,7 @@ export {
3441
3527
  commandExecutionStatusSchema,
3442
3528
  commandIds,
3443
3529
  contextCondenseSchema,
3530
+ convertModelNameForVertex,
3444
3531
  customModePromptsSchema,
3445
3532
  customModesSettingsSchema,
3446
3533
  customSupportPromptsSchema,
@@ -3452,6 +3539,8 @@ export {
3452
3539
  followUpDataSchema,
3453
3540
  geminiDefaultModelId,
3454
3541
  geminiModels,
3542
+ getApiProtocol,
3543
+ getClaudeCodeModelId,
3455
3544
  getModelId,
3456
3545
  gitPropertiesSchema,
3457
3546
  glamaDefaultModelId,