@roo-code/types 1.77.0 → 1.79.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
@@ -3781,52 +3781,63 @@ var deepInfraDefaultModelInfo = {
3781
3781
  };
3782
3782
 
3783
3783
  // src/provider-settings.ts
3784
+ var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
3785
+ var dynamicProviders = [
3786
+ "openrouter",
3787
+ "vercel-ai-gateway",
3788
+ "huggingface",
3789
+ "litellm",
3790
+ "deepinfra",
3791
+ "io-intelligence",
3792
+ "requesty",
3793
+ "unbound",
3794
+ "glama"
3795
+ ];
3796
+ var isDynamicProvider = (key) => dynamicProviders.includes(key);
3797
+ var localProviders = ["ollama", "lmstudio"];
3798
+ var isLocalProvider = (key) => localProviders.includes(key);
3799
+ var internalProviders = ["vscode-lm"];
3800
+ var isInternalProvider = (key) => internalProviders.includes(key);
3801
+ var customProviders = ["openai"];
3802
+ var isCustomProvider = (key) => customProviders.includes(key);
3803
+ var fauxProviders = ["fake-ai", "human-relay"];
3804
+ var isFauxProvider = (key) => fauxProviders.includes(key);
3784
3805
  var providerNames = [
3806
+ ...dynamicProviders,
3807
+ ...localProviders,
3808
+ ...internalProviders,
3809
+ ...customProviders,
3810
+ ...fauxProviders,
3785
3811
  "anthropic",
3786
- "claude-code",
3787
- "glama",
3788
- "openrouter",
3789
3812
  "bedrock",
3790
- "vertex",
3791
- "openai",
3792
- "ollama",
3793
- "vscode-lm",
3794
- "lmstudio",
3813
+ "cerebras",
3814
+ "chutes",
3815
+ "claude-code",
3816
+ "doubao",
3817
+ "deepseek",
3818
+ "featherless",
3819
+ "fireworks",
3795
3820
  "gemini",
3796
3821
  "gemini-cli",
3797
- "openai-native",
3822
+ "groq",
3798
3823
  "mistral",
3799
3824
  "moonshot",
3800
- "deepseek",
3801
- "deepinfra",
3802
- "doubao",
3825
+ "openai-native",
3803
3826
  "qwen-code",
3804
- "unbound",
3805
- "requesty",
3806
- "human-relay",
3807
- "fake-ai",
3808
- "xai",
3809
- "groq",
3810
- "chutes",
3811
- "litellm",
3812
- "huggingface",
3813
- "cerebras",
3814
- "sambanova",
3815
- "zai",
3816
- "fireworks",
3817
- "featherless",
3818
- "io-intelligence",
3819
3827
  "roo",
3820
- "vercel-ai-gateway"
3828
+ "sambanova",
3829
+ "vertex",
3830
+ "xai",
3831
+ "zai"
3821
3832
  ];
3822
3833
  var providerNamesSchema = z7.enum(providerNames);
3834
+ var isProviderName = (key) => typeof key === "string" && providerNames.includes(key);
3823
3835
  var providerSettingsEntrySchema = z7.object({
3824
3836
  id: z7.string(),
3825
3837
  name: z7.string(),
3826
3838
  apiProvider: providerNamesSchema.optional(),
3827
3839
  modelId: z7.string().optional()
3828
3840
  });
3829
- var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
3830
3841
  var baseProviderSettingsSchema = z7.object({
3831
3842
  includeMaxTokens: z7.boolean().optional(),
3832
3843
  diffEnabled: z7.boolean().optional(),
@@ -3851,7 +3862,7 @@ var anthropicSchema = apiModelIdProviderModelSchema.extend({
3851
3862
  anthropicBaseUrl: z7.string().optional(),
3852
3863
  anthropicUseAuthToken: z7.boolean().optional(),
3853
3864
  anthropicBeta1MContext: z7.boolean().optional()
3854
- // Enable 'context-1m-2025-08-07' beta for 1M context window
3865
+ // Enable 'context-1m-2025-08-07' beta for 1M context window.
3855
3866
  });
3856
3867
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
3857
3868
  claudeCodePath: z7.string().optional(),
@@ -3884,7 +3895,7 @@ var bedrockSchema = apiModelIdProviderModelSchema.extend({
3884
3895
  awsBedrockEndpointEnabled: z7.boolean().optional(),
3885
3896
  awsBedrockEndpoint: z7.string().optional(),
3886
3897
  awsBedrock1MContext: z7.boolean().optional()
3887
- // Enable 'context-1m-2025-08-07' beta for 1M context window
3898
+ // Enable 'context-1m-2025-08-07' beta for 1M context window.
3888
3899
  });
3889
3900
  var vertexSchema = apiModelIdProviderModelSchema.extend({
3890
3901
  vertexKeyFile: z7.string().optional(),
@@ -4023,7 +4034,7 @@ var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
4023
4034
  qwenCodeOauthPath: z7.string().optional()
4024
4035
  });
4025
4036
  var rooSchema = apiModelIdProviderModelSchema.extend({
4026
- // No additional fields needed - uses cloud authentication
4037
+ // No additional fields needed - uses cloud authentication.
4027
4038
  });
4028
4039
  var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
4029
4040
  vercelAiGatewayApiKey: z7.string().optional(),
@@ -4116,7 +4127,7 @@ var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscrimina
4116
4127
  z7.object({ id: z7.string().optional() })
4117
4128
  );
4118
4129
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
4119
- var MODEL_ID_KEYS = [
4130
+ var modelIdKeys = [
4120
4131
  "apiModelId",
4121
4132
  "glamaModelId",
4122
4133
  "openRouterModelId",
@@ -4133,9 +4144,44 @@ var MODEL_ID_KEYS = [
4133
4144
  "deepInfraModelId"
4134
4145
  ];
4135
4146
  var getModelId = (settings) => {
4136
- const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
4147
+ const modelIdKey = modelIdKeys.find((key) => settings[key]);
4137
4148
  return modelIdKey ? settings[modelIdKey] : void 0;
4138
4149
  };
4150
+ var isTypicalProvider = (key) => isProviderName(key) && !isInternalProvider(key) && !isCustomProvider(key) && !isFauxProvider(key);
4151
+ var modelIdKeysByProvider = {
4152
+ anthropic: "apiModelId",
4153
+ "claude-code": "apiModelId",
4154
+ glama: "glamaModelId",
4155
+ openrouter: "openRouterModelId",
4156
+ bedrock: "apiModelId",
4157
+ vertex: "apiModelId",
4158
+ "openai-native": "openAiModelId",
4159
+ ollama: "ollamaModelId",
4160
+ lmstudio: "lmStudioModelId",
4161
+ gemini: "apiModelId",
4162
+ "gemini-cli": "apiModelId",
4163
+ mistral: "apiModelId",
4164
+ moonshot: "apiModelId",
4165
+ deepseek: "apiModelId",
4166
+ deepinfra: "deepInfraModelId",
4167
+ doubao: "apiModelId",
4168
+ "qwen-code": "apiModelId",
4169
+ unbound: "unboundModelId",
4170
+ requesty: "requestyModelId",
4171
+ xai: "apiModelId",
4172
+ groq: "apiModelId",
4173
+ chutes: "apiModelId",
4174
+ litellm: "litellmModelId",
4175
+ huggingface: "huggingFaceModelId",
4176
+ cerebras: "apiModelId",
4177
+ sambanova: "apiModelId",
4178
+ zai: "apiModelId",
4179
+ fireworks: "apiModelId",
4180
+ featherless: "apiModelId",
4181
+ "io-intelligence": "ioIntelligenceModelId",
4182
+ roo: "apiModelId",
4183
+ "vercel-ai-gateway": "vercelAiGatewayModelId"
4184
+ };
4139
4185
  var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code", "bedrock"];
4140
4186
  var getApiProtocol = (provider, modelId) => {
4141
4187
  if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
@@ -4242,17 +4288,6 @@ var MODELS_BY_PROVIDER = {
4242
4288
  deepinfra: { id: "deepinfra", label: "DeepInfra", models: [] },
4243
4289
  "vercel-ai-gateway": { id: "vercel-ai-gateway", label: "Vercel AI Gateway", models: [] }
4244
4290
  };
4245
- var dynamicProviders = [
4246
- "glama",
4247
- "huggingface",
4248
- "litellm",
4249
- "openrouter",
4250
- "requesty",
4251
- "unbound",
4252
- "deepinfra",
4253
- "vercel-ai-gateway"
4254
- ];
4255
- var isDynamicProvider = (key) => dynamicProviders.includes(key);
4256
4291
 
4257
4292
  // src/history.ts
4258
4293
  import { z as z8 } from "zod";
@@ -4916,11 +4951,15 @@ var organizationCloudSettingsSchema = z15.object({
4916
4951
  taskShareExpirationDays: z15.number().int().positive().optional(),
4917
4952
  allowMembersViewAllTasks: z15.boolean().optional()
4918
4953
  });
4954
+ var organizationFeaturesSchema = z15.object({
4955
+ roomoteControlEnabled: z15.boolean().optional()
4956
+ });
4919
4957
  var organizationSettingsSchema = z15.object({
4920
4958
  version: z15.number(),
4921
4959
  cloudSettings: organizationCloudSettingsSchema.optional(),
4922
4960
  defaultSettings: organizationDefaultSettingsSchema,
4923
4961
  allowList: organizationAllowListSchema,
4962
+ features: organizationFeaturesSchema.optional(),
4924
4963
  hiddenMcps: z15.array(z15.string()).optional(),
4925
4964
  hideMarketplaceMcps: z15.boolean().optional(),
4926
4965
  mcps: z15.array(mcpMarketplaceItemSchema).optional(),
@@ -5437,7 +5476,6 @@ export {
5437
5476
  LMSTUDIO_DEFAULT_TEMPERATURE,
5438
5477
  MISTRAL_DEFAULT_TEMPERATURE,
5439
5478
  MODELS_BY_PROVIDER,
5440
- MODEL_ID_KEYS,
5441
5479
  MOONSHOT_DEFAULT_TEMPERATURE,
5442
5480
  OPENAI_AZURE_AI_INFERENCE_PATH,
5443
5481
  OPENAI_NATIVE_DEFAULT_TEMPERATURE,
@@ -5493,6 +5531,7 @@ export {
5493
5531
  convertModelNameForVertex,
5494
5532
  customModePromptsSchema,
5495
5533
  customModesSettingsSchema,
5534
+ customProviders,
5496
5535
  customSupportPromptsSchema,
5497
5536
  deepInfraDefaultModelId,
5498
5537
  deepInfraDefaultModelInfo,
@@ -5510,6 +5549,7 @@ export {
5510
5549
  extensionBridgeCommandSchema,
5511
5550
  extensionBridgeEventSchema,
5512
5551
  extensionInstanceSchema,
5552
+ fauxProviders,
5513
5553
  featherlessDefaultModelId,
5514
5554
  featherlessModels,
5515
5555
  fireworksDefaultModelId,
@@ -5532,26 +5572,34 @@ export {
5532
5572
  idleAsks,
5533
5573
  installMarketplaceItemOptionsSchema,
5534
5574
  interactiveAsks,
5575
+ internalProviders,
5535
5576
  internationalZAiDefaultModelId,
5536
5577
  internationalZAiModels,
5537
5578
  ioIntelligenceDefaultBaseUrl,
5538
5579
  ioIntelligenceDefaultModelId,
5539
5580
  ioIntelligenceModels,
5540
5581
  ipcMessageSchema,
5582
+ isCustomProvider,
5541
5583
  isDynamicProvider,
5584
+ isFauxProvider,
5542
5585
  isGlobalStateKey,
5543
5586
  isIdleAsk,
5544
5587
  isInteractiveAsk,
5588
+ isInternalProvider,
5545
5589
  isLanguage,
5590
+ isLocalProvider,
5546
5591
  isModelParameter,
5592
+ isProviderName,
5547
5593
  isResumableAsk,
5548
5594
  isSecretStateKey,
5595
+ isTypicalProvider,
5549
5596
  lMStudioDefaultModelId,
5550
5597
  lMStudioDefaultModelInfo,
5551
5598
  languages,
5552
5599
  languagesSchema,
5553
5600
  litellmDefaultModelId,
5554
5601
  litellmDefaultModelInfo,
5602
+ localProviders,
5555
5603
  mainlandZAiDefaultModelId,
5556
5604
  mainlandZAiModels,
5557
5605
  marketplaceItemSchema,
@@ -5564,6 +5612,8 @@ export {
5564
5612
  mistralModels,
5565
5613
  modeConfigSchema,
5566
5614
  modeMarketplaceItemSchema,
5615
+ modelIdKeys,
5616
+ modelIdKeysByProvider,
5567
5617
  modelInfoSchema,
5568
5618
  modelParameters,
5569
5619
  modelParametersSchema,
@@ -5579,6 +5629,7 @@ export {
5579
5629
  organizationAllowListSchema,
5580
5630
  organizationCloudSettingsSchema,
5581
5631
  organizationDefaultSettingsSchema,
5632
+ organizationFeaturesSchema,
5582
5633
  organizationSettingsSchema,
5583
5634
  promptComponentSchema,
5584
5635
  providerNames,