@roo-code/types 1.93.0 → 1.94.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 CHANGED
@@ -37,6 +37,7 @@ __export(index_exports, {
37
37
  CONTEXT_MANAGEMENT_EVENTS: () => CONTEXT_MANAGEMENT_EVENTS,
38
38
  COOKIE_CONSENT_EVENTS: () => COOKIE_CONSENT_EVENTS,
39
39
  ConnectionState: () => ConnectionState,
40
+ ConsecutiveMistakeError: () => ConsecutiveMistakeError,
40
41
  DEEP_SEEK_DEFAULT_TEMPERATURE: () => DEEP_SEEK_DEFAULT_TEMPERATURE,
41
42
  DEFAULT_CHECKPOINT_TIMEOUT_SECONDS: () => DEFAULT_CHECKPOINT_TIMEOUT_SECONDS,
42
43
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT: () => DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
@@ -77,6 +78,7 @@ __export(index_exports, {
77
78
  MISTRAL_DEFAULT_TEMPERATURE: () => MISTRAL_DEFAULT_TEMPERATURE,
78
79
  MODELS_BY_PROVIDER: () => MODELS_BY_PROVIDER,
79
80
  MOONSHOT_DEFAULT_TEMPERATURE: () => MOONSHOT_DEFAULT_TEMPERATURE,
81
+ NATIVE_TOOL_DEFAULTS: () => NATIVE_TOOL_DEFAULTS,
80
82
  OPENAI_AZURE_AI_INFERENCE_PATH: () => OPENAI_AZURE_AI_INFERENCE_PATH,
81
83
  OPENAI_NATIVE_DEFAULT_TEMPERATURE: () => OPENAI_NATIVE_DEFAULT_TEMPERATURE,
82
84
  OPENROUTER_DEFAULT_PROVIDER_NAME: () => OPENROUTER_DEFAULT_PROVIDER_NAME,
@@ -102,6 +104,7 @@ __export(index_exports, {
102
104
  VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS: () => VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS,
103
105
  VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS: () => VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS,
104
106
  VERCEL_AI_GATEWAY_VISION_ONLY_MODELS: () => VERCEL_AI_GATEWAY_VISION_ONLY_MODELS,
107
+ VERTEX_1M_CONTEXT_MODEL_IDS: () => VERTEX_1M_CONTEXT_MODEL_IDS,
105
108
  VERTEX_REGIONS: () => VERTEX_REGIONS,
106
109
  ZAI_DEFAULT_TEMPERATURE: () => ZAI_DEFAULT_TEMPERATURE,
107
110
  ackSchema: () => ackSchema,
@@ -144,6 +147,7 @@ __export(index_exports, {
144
147
  deepInfraDefaultModelInfo: () => deepInfraDefaultModelInfo,
145
148
  deepSeekDefaultModelId: () => deepSeekDefaultModelId,
146
149
  deepSeekModels: () => deepSeekModels,
150
+ defineCustomTool: () => defineCustomTool,
147
151
  discriminatedProviderSettingsWithIdSchema: () => discriminatedProviderSettingsWithIdSchema,
148
152
  doubaoDefaultModelId: () => doubaoDefaultModelId,
149
153
  doubaoDefaultModelInfo: () => doubaoDefaultModelInfo,
@@ -157,6 +161,7 @@ __export(index_exports, {
157
161
  extensionBridgeEventSchema: () => extensionBridgeEventSchema,
158
162
  extensionInstanceSchema: () => extensionInstanceSchema,
159
163
  extractApiProviderErrorProperties: () => extractApiProviderErrorProperties,
164
+ extractConsecutiveMistakeErrorProperties: () => extractConsecutiveMistakeErrorProperties,
160
165
  extractMessageFromJsonPayload: () => extractMessageFromJsonPayload,
161
166
  fauxProviders: () => fauxProviders,
162
167
  featherlessDefaultModelId: () => featherlessDefaultModelId,
@@ -191,6 +196,7 @@ __export(index_exports, {
191
196
  ioIntelligenceModels: () => ioIntelligenceModels,
192
197
  ipcMessageSchema: () => ipcMessageSchema,
193
198
  isApiProviderError: () => isApiProviderError,
199
+ isConsecutiveMistakeError: () => isConsecutiveMistakeError,
194
200
  isContextManagementEvent: () => isContextManagementEvent,
195
201
  isCustomProvider: () => isCustomProvider,
196
202
  isDynamicProvider: () => isDynamicProvider,
@@ -251,6 +257,7 @@ __export(index_exports, {
251
257
  organizationDefaultSettingsSchema: () => organizationDefaultSettingsSchema,
252
258
  organizationFeaturesSchema: () => organizationFeaturesSchema,
253
259
  organizationSettingsSchema: () => organizationSettingsSchema,
260
+ parametersSchema: () => import_v4.z,
254
261
  promptComponentSchema: () => promptComponentSchema,
255
262
  providerNames: () => providerNames,
256
263
  providerNamesSchema: () => providerNamesSchema,
@@ -476,6 +483,7 @@ var toolNames = [
476
483
  "apply_diff",
477
484
  "search_and_replace",
478
485
  "search_replace",
486
+ "edit_file",
479
487
  "apply_patch",
480
488
  "search_files",
481
489
  "list_files",
@@ -504,6 +512,10 @@ var TOOL_PROTOCOL = {
504
512
  XML: "xml",
505
513
  NATIVE: "native"
506
514
  };
515
+ var NATIVE_TOOL_DEFAULTS = {
516
+ supportsNativeTools: true,
517
+ defaultToolProtocol: TOOL_PROTOCOL.NATIVE
518
+ };
507
519
  function isNativeProtocol(protocol) {
508
520
  return protocol === TOOL_PROTOCOL.NATIVE;
509
521
  }
@@ -2746,6 +2758,7 @@ var geminiModels = {
2746
2758
  supportsReasoningEffort: ["low", "high"],
2747
2759
  reasoningEffort: "low",
2748
2760
  includedTools: ["write_file", "edit_file"],
2761
+ excludedTools: ["apply_diff"],
2749
2762
  supportsTemperature: true,
2750
2763
  defaultTemperature: 1,
2751
2764
  inputPrice: 4,
@@ -2773,6 +2786,7 @@ var geminiModels = {
2773
2786
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
2774
2787
  reasoningEffort: "medium",
2775
2788
  includedTools: ["write_file", "edit_file"],
2789
+ excludedTools: ["apply_diff"],
2776
2790
  supportsTemperature: true,
2777
2791
  defaultTemperature: 1,
2778
2792
  inputPrice: 0.3,
@@ -2789,6 +2803,7 @@ var geminiModels = {
2789
2803
  defaultToolProtocol: "native",
2790
2804
  supportsPromptCache: true,
2791
2805
  includedTools: ["write_file", "edit_file"],
2806
+ excludedTools: ["apply_diff"],
2792
2807
  inputPrice: 2.5,
2793
2808
  // This is the pricing for prompts above 200k tokens.
2794
2809
  outputPrice: 15,
@@ -2820,6 +2835,7 @@ var geminiModels = {
2820
2835
  defaultToolProtocol: "native",
2821
2836
  supportsPromptCache: true,
2822
2837
  includedTools: ["write_file", "edit_file"],
2838
+ excludedTools: ["apply_diff"],
2823
2839
  inputPrice: 2.5,
2824
2840
  // This is the pricing for prompts above 200k tokens.
2825
2841
  outputPrice: 15,
@@ -2850,6 +2866,7 @@ var geminiModels = {
2850
2866
  defaultToolProtocol: "native",
2851
2867
  supportsPromptCache: true,
2852
2868
  includedTools: ["write_file", "edit_file"],
2869
+ excludedTools: ["apply_diff"],
2853
2870
  inputPrice: 2.5,
2854
2871
  // This is the pricing for prompts above 200k tokens.
2855
2872
  outputPrice: 15,
@@ -2878,6 +2895,7 @@ var geminiModels = {
2878
2895
  defaultToolProtocol: "native",
2879
2896
  supportsPromptCache: true,
2880
2897
  includedTools: ["write_file", "edit_file"],
2898
+ excludedTools: ["apply_diff"],
2881
2899
  inputPrice: 2.5,
2882
2900
  // This is the pricing for prompts above 200k tokens.
2883
2901
  outputPrice: 15,
@@ -2909,6 +2927,7 @@ var geminiModels = {
2909
2927
  defaultToolProtocol: "native",
2910
2928
  supportsPromptCache: true,
2911
2929
  includedTools: ["write_file", "edit_file"],
2930
+ excludedTools: ["apply_diff"],
2912
2931
  inputPrice: 0.3,
2913
2932
  outputPrice: 2.5,
2914
2933
  cacheReadsPrice: 0.075,
@@ -2924,6 +2943,7 @@ var geminiModels = {
2924
2943
  defaultToolProtocol: "native",
2925
2944
  supportsPromptCache: true,
2926
2945
  includedTools: ["write_file", "edit_file"],
2946
+ excludedTools: ["apply_diff"],
2927
2947
  inputPrice: 0.3,
2928
2948
  outputPrice: 2.5,
2929
2949
  cacheReadsPrice: 0.075,
@@ -2939,6 +2959,7 @@ var geminiModels = {
2939
2959
  defaultToolProtocol: "native",
2940
2960
  supportsPromptCache: true,
2941
2961
  includedTools: ["write_file", "edit_file"],
2962
+ excludedTools: ["apply_diff"],
2942
2963
  inputPrice: 0.3,
2943
2964
  outputPrice: 2.5,
2944
2965
  cacheReadsPrice: 0.075,
@@ -2955,6 +2976,7 @@ var geminiModels = {
2955
2976
  defaultToolProtocol: "native",
2956
2977
  supportsPromptCache: true,
2957
2978
  includedTools: ["write_file", "edit_file"],
2979
+ excludedTools: ["apply_diff"],
2958
2980
  inputPrice: 0.1,
2959
2981
  outputPrice: 0.4,
2960
2982
  cacheReadsPrice: 0.025,
@@ -2970,6 +2992,7 @@ var geminiModels = {
2970
2992
  defaultToolProtocol: "native",
2971
2993
  supportsPromptCache: true,
2972
2994
  includedTools: ["write_file", "edit_file"],
2995
+ excludedTools: ["apply_diff"],
2973
2996
  inputPrice: 0.1,
2974
2997
  outputPrice: 0.4,
2975
2998
  cacheReadsPrice: 0.025,
@@ -3182,6 +3205,8 @@ var lMStudioDefaultModelInfo = {
3182
3205
  contextWindow: 2e5,
3183
3206
  supportsImages: true,
3184
3207
  supportsPromptCache: true,
3208
+ supportsNativeTools: true,
3209
+ defaultToolProtocol: "native",
3185
3210
  inputPrice: 0,
3186
3211
  outputPrice: 0,
3187
3212
  cacheWritesPrice: 0,
@@ -4008,6 +4033,8 @@ var qwenCodeModels = {
4008
4033
  contextWindow: 1e6,
4009
4034
  supportsImages: false,
4010
4035
  supportsPromptCache: false,
4036
+ supportsNativeTools: true,
4037
+ defaultToolProtocol: "native",
4011
4038
  inputPrice: 0,
4012
4039
  outputPrice: 0,
4013
4040
  cacheWritesPrice: 0,
@@ -4019,6 +4046,8 @@ var qwenCodeModels = {
4019
4046
  contextWindow: 1e6,
4020
4047
  supportsImages: false,
4021
4048
  supportsPromptCache: false,
4049
+ supportsNativeTools: true,
4050
+ defaultToolProtocol: "native",
4022
4051
  inputPrice: 0,
4023
4052
  outputPrice: 0,
4024
4053
  cacheWritesPrice: 0,
@@ -4222,6 +4251,7 @@ var vertexModels = {
4222
4251
  supportsReasoningEffort: ["low", "high"],
4223
4252
  reasoningEffort: "low",
4224
4253
  includedTools: ["write_file", "edit_file"],
4254
+ excludedTools: ["apply_diff"],
4225
4255
  supportsTemperature: true,
4226
4256
  defaultTemperature: 1,
4227
4257
  inputPrice: 4,
@@ -4249,6 +4279,7 @@ var vertexModels = {
4249
4279
  supportsReasoningEffort: ["minimal", "low", "medium", "high"],
4250
4280
  reasoningEffort: "medium",
4251
4281
  includedTools: ["write_file", "edit_file"],
4282
+ excludedTools: ["apply_diff"],
4252
4283
  supportsTemperature: true,
4253
4284
  defaultTemperature: 1,
4254
4285
  inputPrice: 0.3,
@@ -4264,6 +4295,7 @@ var vertexModels = {
4264
4295
  defaultToolProtocol: "native",
4265
4296
  supportsPromptCache: true,
4266
4297
  includedTools: ["write_file", "edit_file"],
4298
+ excludedTools: ["apply_diff"],
4267
4299
  inputPrice: 0.15,
4268
4300
  outputPrice: 3.5,
4269
4301
  maxThinkingTokens: 24576,
@@ -4278,6 +4310,7 @@ var vertexModels = {
4278
4310
  defaultToolProtocol: "native",
4279
4311
  supportsPromptCache: true,
4280
4312
  includedTools: ["write_file", "edit_file"],
4313
+ excludedTools: ["apply_diff"],
4281
4314
  inputPrice: 0.15,
4282
4315
  outputPrice: 0.6
4283
4316
  },
@@ -4289,6 +4322,7 @@ var vertexModels = {
4289
4322
  defaultToolProtocol: "native",
4290
4323
  supportsPromptCache: true,
4291
4324
  includedTools: ["write_file", "edit_file"],
4325
+ excludedTools: ["apply_diff"],
4292
4326
  inputPrice: 0.3,
4293
4327
  outputPrice: 2.5,
4294
4328
  cacheReadsPrice: 0.075,
@@ -4304,6 +4338,7 @@ var vertexModels = {
4304
4338
  defaultToolProtocol: "native",
4305
4339
  supportsPromptCache: false,
4306
4340
  includedTools: ["write_file", "edit_file"],
4341
+ excludedTools: ["apply_diff"],
4307
4342
  inputPrice: 0.15,
4308
4343
  outputPrice: 3.5,
4309
4344
  maxThinkingTokens: 24576,
@@ -4318,6 +4353,7 @@ var vertexModels = {
4318
4353
  defaultToolProtocol: "native",
4319
4354
  supportsPromptCache: false,
4320
4355
  includedTools: ["write_file", "edit_file"],
4356
+ excludedTools: ["apply_diff"],
4321
4357
  inputPrice: 0.15,
4322
4358
  outputPrice: 0.6
4323
4359
  },
@@ -4329,6 +4365,7 @@ var vertexModels = {
4329
4365
  defaultToolProtocol: "native",
4330
4366
  supportsPromptCache: true,
4331
4367
  includedTools: ["write_file", "edit_file"],
4368
+ excludedTools: ["apply_diff"],
4332
4369
  inputPrice: 2.5,
4333
4370
  outputPrice: 15
4334
4371
  },
@@ -4340,6 +4377,7 @@ var vertexModels = {
4340
4377
  defaultToolProtocol: "native",
4341
4378
  supportsPromptCache: true,
4342
4379
  includedTools: ["write_file", "edit_file"],
4380
+ excludedTools: ["apply_diff"],
4343
4381
  inputPrice: 2.5,
4344
4382
  outputPrice: 15
4345
4383
  },
@@ -4351,6 +4389,7 @@ var vertexModels = {
4351
4389
  defaultToolProtocol: "native",
4352
4390
  supportsPromptCache: true,
4353
4391
  includedTools: ["write_file", "edit_file"],
4392
+ excludedTools: ["apply_diff"],
4354
4393
  inputPrice: 2.5,
4355
4394
  outputPrice: 15,
4356
4395
  maxThinkingTokens: 32768,
@@ -4364,6 +4403,7 @@ var vertexModels = {
4364
4403
  defaultToolProtocol: "native",
4365
4404
  supportsPromptCache: true,
4366
4405
  includedTools: ["write_file", "edit_file"],
4406
+ excludedTools: ["apply_diff"],
4367
4407
  inputPrice: 2.5,
4368
4408
  outputPrice: 15,
4369
4409
  maxThinkingTokens: 32768,
@@ -4392,6 +4432,7 @@ var vertexModels = {
4392
4432
  defaultToolProtocol: "native",
4393
4433
  supportsPromptCache: false,
4394
4434
  includedTools: ["write_file", "edit_file"],
4435
+ excludedTools: ["apply_diff"],
4395
4436
  inputPrice: 0,
4396
4437
  outputPrice: 0
4397
4438
  },
@@ -4403,6 +4444,7 @@ var vertexModels = {
4403
4444
  defaultToolProtocol: "native",
4404
4445
  supportsPromptCache: false,
4405
4446
  includedTools: ["write_file", "edit_file"],
4447
+ excludedTools: ["apply_diff"],
4406
4448
  inputPrice: 0,
4407
4449
  outputPrice: 0
4408
4450
  },
@@ -4414,6 +4456,7 @@ var vertexModels = {
4414
4456
  defaultToolProtocol: "native",
4415
4457
  supportsPromptCache: true,
4416
4458
  includedTools: ["write_file", "edit_file"],
4459
+ excludedTools: ["apply_diff"],
4417
4460
  inputPrice: 0.15,
4418
4461
  outputPrice: 0.6
4419
4462
  },
@@ -4425,6 +4468,7 @@ var vertexModels = {
4425
4468
  defaultToolProtocol: "native",
4426
4469
  supportsPromptCache: false,
4427
4470
  includedTools: ["write_file", "edit_file"],
4471
+ excludedTools: ["apply_diff"],
4428
4472
  inputPrice: 0.075,
4429
4473
  outputPrice: 0.3
4430
4474
  },
@@ -4436,6 +4480,7 @@ var vertexModels = {
4436
4480
  defaultToolProtocol: "native",
4437
4481
  supportsPromptCache: false,
4438
4482
  includedTools: ["write_file", "edit_file"],
4483
+ excludedTools: ["apply_diff"],
4439
4484
  inputPrice: 0,
4440
4485
  outputPrice: 0
4441
4486
  },
@@ -4447,6 +4492,7 @@ var vertexModels = {
4447
4492
  defaultToolProtocol: "native",
4448
4493
  supportsPromptCache: true,
4449
4494
  includedTools: ["write_file", "edit_file"],
4495
+ excludedTools: ["apply_diff"],
4450
4496
  inputPrice: 0.075,
4451
4497
  outputPrice: 0.3
4452
4498
  },
@@ -4458,36 +4504,83 @@ var vertexModels = {
4458
4504
  defaultToolProtocol: "native",
4459
4505
  supportsPromptCache: false,
4460
4506
  includedTools: ["write_file", "edit_file"],
4507
+ excludedTools: ["apply_diff"],
4461
4508
  inputPrice: 1.25,
4462
4509
  outputPrice: 5
4463
4510
  },
4464
4511
  "claude-sonnet-4@20250514": {
4465
4512
  maxTokens: 8192,
4466
4513
  contextWindow: 2e5,
4514
+ // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
4467
4515
  supportsImages: true,
4468
4516
  supportsPromptCache: true,
4517
+ supportsNativeTools: true,
4518
+ defaultToolProtocol: "native",
4469
4519
  inputPrice: 3,
4520
+ // $3 per million input tokens (≤200K context)
4470
4521
  outputPrice: 15,
4522
+ // $15 per million output tokens (≤200K context)
4471
4523
  cacheWritesPrice: 3.75,
4524
+ // $3.75 per million tokens
4472
4525
  cacheReadsPrice: 0.3,
4473
- supportsReasoningBudget: true
4526
+ // $0.30 per million tokens
4527
+ supportsReasoningBudget: true,
4528
+ // Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
4529
+ tiers: [
4530
+ {
4531
+ contextWindow: 1e6,
4532
+ // 1M tokens with beta flag
4533
+ inputPrice: 6,
4534
+ // $6 per million input tokens (>200K context)
4535
+ outputPrice: 22.5,
4536
+ // $22.50 per million output tokens (>200K context)
4537
+ cacheWritesPrice: 7.5,
4538
+ // $7.50 per million tokens (>200K context)
4539
+ cacheReadsPrice: 0.6
4540
+ // $0.60 per million tokens (>200K context)
4541
+ }
4542
+ ]
4474
4543
  },
4475
4544
  "claude-sonnet-4-5@20250929": {
4476
4545
  maxTokens: 8192,
4477
4546
  contextWindow: 2e5,
4547
+ // Default 200K, extendable to 1M with beta flag 'context-1m-2025-08-07'
4478
4548
  supportsImages: true,
4479
4549
  supportsPromptCache: true,
4550
+ supportsNativeTools: true,
4551
+ defaultToolProtocol: "native",
4480
4552
  inputPrice: 3,
4553
+ // $3 per million input tokens (≤200K context)
4481
4554
  outputPrice: 15,
4555
+ // $15 per million output tokens (≤200K context)
4482
4556
  cacheWritesPrice: 3.75,
4557
+ // $3.75 per million tokens
4483
4558
  cacheReadsPrice: 0.3,
4484
- supportsReasoningBudget: true
4559
+ // $0.30 per million tokens
4560
+ supportsReasoningBudget: true,
4561
+ // Tiered pricing for extended context (requires beta flag 'context-1m-2025-08-07')
4562
+ tiers: [
4563
+ {
4564
+ contextWindow: 1e6,
4565
+ // 1M tokens with beta flag
4566
+ inputPrice: 6,
4567
+ // $6 per million input tokens (>200K context)
4568
+ outputPrice: 22.5,
4569
+ // $22.50 per million output tokens (>200K context)
4570
+ cacheWritesPrice: 7.5,
4571
+ // $7.50 per million tokens (>200K context)
4572
+ cacheReadsPrice: 0.6
4573
+ // $0.60 per million tokens (>200K context)
4574
+ }
4575
+ ]
4485
4576
  },
4486
4577
  "claude-haiku-4-5@20251001": {
4487
4578
  maxTokens: 8192,
4488
4579
  contextWindow: 2e5,
4489
4580
  supportsImages: true,
4490
4581
  supportsPromptCache: true,
4582
+ supportsNativeTools: true,
4583
+ defaultToolProtocol: "native",
4491
4584
  inputPrice: 1,
4492
4585
  outputPrice: 5,
4493
4586
  cacheWritesPrice: 1.25,
@@ -4499,6 +4592,8 @@ var vertexModels = {
4499
4592
  contextWindow: 2e5,
4500
4593
  supportsImages: true,
4501
4594
  supportsPromptCache: true,
4595
+ supportsNativeTools: true,
4596
+ defaultToolProtocol: "native",
4502
4597
  inputPrice: 5,
4503
4598
  outputPrice: 25,
4504
4599
  cacheWritesPrice: 6.25,
@@ -4510,6 +4605,8 @@ var vertexModels = {
4510
4605
  contextWindow: 2e5,
4511
4606
  supportsImages: true,
4512
4607
  supportsPromptCache: true,
4608
+ supportsNativeTools: true,
4609
+ defaultToolProtocol: "native",
4513
4610
  inputPrice: 15,
4514
4611
  outputPrice: 75,
4515
4612
  cacheWritesPrice: 18.75,
@@ -4521,6 +4618,8 @@ var vertexModels = {
4521
4618
  contextWindow: 2e5,
4522
4619
  supportsImages: true,
4523
4620
  supportsPromptCache: true,
4621
+ supportsNativeTools: true,
4622
+ defaultToolProtocol: "native",
4524
4623
  inputPrice: 15,
4525
4624
  outputPrice: 75,
4526
4625
  cacheWritesPrice: 18.75,
@@ -4531,6 +4630,8 @@ var vertexModels = {
4531
4630
  contextWindow: 2e5,
4532
4631
  supportsImages: true,
4533
4632
  supportsPromptCache: true,
4633
+ supportsNativeTools: true,
4634
+ defaultToolProtocol: "native",
4534
4635
  inputPrice: 3,
4535
4636
  outputPrice: 15,
4536
4637
  cacheWritesPrice: 3.75,
@@ -4543,6 +4644,8 @@ var vertexModels = {
4543
4644
  contextWindow: 2e5,
4544
4645
  supportsImages: true,
4545
4646
  supportsPromptCache: true,
4647
+ supportsNativeTools: true,
4648
+ defaultToolProtocol: "native",
4546
4649
  inputPrice: 3,
4547
4650
  outputPrice: 15,
4548
4651
  cacheWritesPrice: 3.75,
@@ -4553,6 +4656,8 @@ var vertexModels = {
4553
4656
  contextWindow: 2e5,
4554
4657
  supportsImages: true,
4555
4658
  supportsPromptCache: true,
4659
+ supportsNativeTools: true,
4660
+ defaultToolProtocol: "native",
4556
4661
  inputPrice: 3,
4557
4662
  outputPrice: 15,
4558
4663
  cacheWritesPrice: 3.75,
@@ -4563,6 +4668,8 @@ var vertexModels = {
4563
4668
  contextWindow: 2e5,
4564
4669
  supportsImages: true,
4565
4670
  supportsPromptCache: true,
4671
+ supportsNativeTools: true,
4672
+ defaultToolProtocol: "native",
4566
4673
  inputPrice: 3,
4567
4674
  outputPrice: 15,
4568
4675
  cacheWritesPrice: 3.75,
@@ -4573,6 +4680,8 @@ var vertexModels = {
4573
4680
  contextWindow: 2e5,
4574
4681
  supportsImages: false,
4575
4682
  supportsPromptCache: true,
4683
+ supportsNativeTools: true,
4684
+ defaultToolProtocol: "native",
4576
4685
  inputPrice: 1,
4577
4686
  outputPrice: 5,
4578
4687
  cacheWritesPrice: 1.25,
@@ -4583,6 +4692,8 @@ var vertexModels = {
4583
4692
  contextWindow: 2e5,
4584
4693
  supportsImages: true,
4585
4694
  supportsPromptCache: true,
4695
+ supportsNativeTools: true,
4696
+ defaultToolProtocol: "native",
4586
4697
  inputPrice: 15,
4587
4698
  outputPrice: 75,
4588
4699
  cacheWritesPrice: 18.75,
@@ -4593,6 +4704,8 @@ var vertexModels = {
4593
4704
  contextWindow: 2e5,
4594
4705
  supportsImages: true,
4595
4706
  supportsPromptCache: true,
4707
+ supportsNativeTools: true,
4708
+ defaultToolProtocol: "native",
4596
4709
  inputPrice: 0.25,
4597
4710
  outputPrice: 1.25,
4598
4711
  cacheWritesPrice: 0.3,
@@ -4606,6 +4719,7 @@ var vertexModels = {
4606
4719
  defaultToolProtocol: "native",
4607
4720
  supportsPromptCache: true,
4608
4721
  includedTools: ["write_file", "edit_file"],
4722
+ excludedTools: ["apply_diff"],
4609
4723
  inputPrice: 0.1,
4610
4724
  outputPrice: 0.4,
4611
4725
  cacheReadsPrice: 0.025,
@@ -4677,6 +4791,7 @@ var vertexModels = {
4677
4791
  description: "Qwen3 235B A22B Instruct. Available in us-south1"
4678
4792
  }
4679
4793
  };
4794
+ var VERTEX_1M_CONTEXT_MODEL_IDS = ["claude-sonnet-4@20250514", "claude-sonnet-4-5@20250929"];
4680
4795
  var VERTEX_REGIONS = [
4681
4796
  { value: "global", label: "global" },
4682
4797
  { value: "us-central1", label: "us-central1" },
@@ -5600,7 +5715,9 @@ var vertexSchema = apiModelIdProviderModelSchema.extend({
5600
5715
  vertexProjectId: import_zod8.z.string().optional(),
5601
5716
  vertexRegion: import_zod8.z.string().optional(),
5602
5717
  enableUrlContext: import_zod8.z.boolean().optional(),
5603
- enableGrounding: import_zod8.z.boolean().optional()
5718
+ enableGrounding: import_zod8.z.boolean().optional(),
5719
+ vertex1MContext: import_zod8.z.boolean().optional()
5720
+ // Enable 'context-1m-2025-08-07' beta for 1M context window.
5604
5721
  });
5605
5722
  var openAiSchema = baseProviderSettingsSchema.extend({
5606
5723
  openAiBaseUrl: import_zod8.z.string().optional(),
@@ -6017,6 +6134,16 @@ var historyItemSchema = import_zod9.z.object({
6017
6134
  size: import_zod9.z.number().optional(),
6018
6135
  workspace: import_zod9.z.string().optional(),
6019
6136
  mode: import_zod9.z.string().optional(),
6137
+ /**
6138
+ * The tool protocol used by this task. Once a task uses tools with a specific
6139
+ * protocol (XML or Native), it is permanently locked to that protocol.
6140
+ *
6141
+ * - "xml": Tool calls are parsed from XML text (no tool IDs)
6142
+ * - "native": Tool calls come as tool_call chunks with IDs
6143
+ *
6144
+ * This ensures task resumption works correctly even when NTC settings change.
6145
+ */
6146
+ toolProtocol: import_zod9.z.enum(["xml", "native"]).optional(),
6020
6147
  status: import_zod9.z.enum(["active", "completed", "delegated"]).optional(),
6021
6148
  delegatedToId: import_zod9.z.string().optional(),
6022
6149
  // Last child this parent delegated to
@@ -6312,6 +6439,31 @@ function extractApiProviderErrorProperties(error) {
6312
6439
  ...error.errorCode !== void 0 && { errorCode: error.errorCode }
6313
6440
  };
6314
6441
  }
6442
+ var ConsecutiveMistakeError = class extends Error {
6443
+ constructor(message, taskId, consecutiveMistakeCount, consecutiveMistakeLimit, reason = "unknown", provider, modelId) {
6444
+ super(message);
6445
+ this.taskId = taskId;
6446
+ this.consecutiveMistakeCount = consecutiveMistakeCount;
6447
+ this.consecutiveMistakeLimit = consecutiveMistakeLimit;
6448
+ this.reason = reason;
6449
+ this.provider = provider;
6450
+ this.modelId = modelId;
6451
+ this.name = "ConsecutiveMistakeError";
6452
+ }
6453
+ };
6454
+ function isConsecutiveMistakeError(error) {
6455
+ return error instanceof Error && error.name === "ConsecutiveMistakeError" && "taskId" in error && "consecutiveMistakeCount" in error && "consecutiveMistakeLimit" in error;
6456
+ }
6457
+ function extractConsecutiveMistakeErrorProperties(error) {
6458
+ return {
6459
+ taskId: error.taskId,
6460
+ consecutiveMistakeCount: error.consecutiveMistakeCount,
6461
+ consecutiveMistakeLimit: error.consecutiveMistakeLimit,
6462
+ reason: error.reason,
6463
+ ...error.provider !== void 0 && { provider: error.provider },
6464
+ ...error.modelId !== void 0 && { modelId: error.modelId }
6465
+ };
6466
+ }
6315
6467
 
6316
6468
  // src/mode.ts
6317
6469
  var import_zod12 = require("zod");
@@ -7196,6 +7348,12 @@ var COOKIE_CONSENT_EVENTS = {
7196
7348
  CHANGED: "cookieConsentChanged"
7197
7349
  };
7198
7350
 
7351
+ // src/custom-tool.ts
7352
+ var import_v4 = require("zod/v4");
7353
+ function defineCustomTool(definition) {
7354
+ return definition;
7355
+ }
7356
+
7199
7357
  // src/followup.ts
7200
7358
  var import_zod17 = require("zod");
7201
7359
  var suggestionItemSchema = import_zod17.z.object({
@@ -7396,6 +7554,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7396
7554
  CONTEXT_MANAGEMENT_EVENTS,
7397
7555
  COOKIE_CONSENT_EVENTS,
7398
7556
  ConnectionState,
7557
+ ConsecutiveMistakeError,
7399
7558
  DEEP_SEEK_DEFAULT_TEMPERATURE,
7400
7559
  DEFAULT_CHECKPOINT_TIMEOUT_SECONDS,
7401
7560
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
@@ -7436,6 +7595,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7436
7595
  MISTRAL_DEFAULT_TEMPERATURE,
7437
7596
  MODELS_BY_PROVIDER,
7438
7597
  MOONSHOT_DEFAULT_TEMPERATURE,
7598
+ NATIVE_TOOL_DEFAULTS,
7439
7599
  OPENAI_AZURE_AI_INFERENCE_PATH,
7440
7600
  OPENAI_NATIVE_DEFAULT_TEMPERATURE,
7441
7601
  OPENROUTER_DEFAULT_PROVIDER_NAME,
@@ -7461,6 +7621,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7461
7621
  VERCEL_AI_GATEWAY_PROMPT_CACHING_MODELS,
7462
7622
  VERCEL_AI_GATEWAY_VISION_AND_TOOLS_MODELS,
7463
7623
  VERCEL_AI_GATEWAY_VISION_ONLY_MODELS,
7624
+ VERTEX_1M_CONTEXT_MODEL_IDS,
7464
7625
  VERTEX_REGIONS,
7465
7626
  ZAI_DEFAULT_TEMPERATURE,
7466
7627
  ackSchema,
@@ -7503,6 +7664,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7503
7664
  deepInfraDefaultModelInfo,
7504
7665
  deepSeekDefaultModelId,
7505
7666
  deepSeekModels,
7667
+ defineCustomTool,
7506
7668
  discriminatedProviderSettingsWithIdSchema,
7507
7669
  doubaoDefaultModelId,
7508
7670
  doubaoDefaultModelInfo,
@@ -7516,6 +7678,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7516
7678
  extensionBridgeEventSchema,
7517
7679
  extensionInstanceSchema,
7518
7680
  extractApiProviderErrorProperties,
7681
+ extractConsecutiveMistakeErrorProperties,
7519
7682
  extractMessageFromJsonPayload,
7520
7683
  fauxProviders,
7521
7684
  featherlessDefaultModelId,
@@ -7550,6 +7713,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7550
7713
  ioIntelligenceModels,
7551
7714
  ipcMessageSchema,
7552
7715
  isApiProviderError,
7716
+ isConsecutiveMistakeError,
7553
7717
  isContextManagementEvent,
7554
7718
  isCustomProvider,
7555
7719
  isDynamicProvider,
@@ -7610,6 +7774,7 @@ var commandExecutionStatusSchema = import_zod21.z.discriminatedUnion("status", [
7610
7774
  organizationDefaultSettingsSchema,
7611
7775
  organizationFeaturesSchema,
7612
7776
  organizationSettingsSchema,
7777
+ parametersSchema,
7613
7778
  promptComponentSchema,
7614
7779
  providerNames,
7615
7780
  providerNamesSchema,