@roo-code/types 1.38.0 → 1.40.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
@@ -31,6 +31,7 @@ __export(index_exports, {
31
31
  CODEBASE_INDEX_DEFAULTS: () => CODEBASE_INDEX_DEFAULTS,
32
32
  DEEP_SEEK_DEFAULT_TEMPERATURE: () => DEEP_SEEK_DEFAULT_TEMPERATURE,
33
33
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT: () => DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
34
+ DEFAULT_MODES: () => DEFAULT_MODES,
34
35
  DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT: () => DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
35
36
  DEFAULT_WRITE_DELAY_MS: () => DEFAULT_WRITE_DELAY_MS,
36
37
  EVALS_SETTINGS: () => EVALS_SETTINGS,
@@ -38,6 +39,14 @@ __export(index_exports, {
38
39
  GLAMA_DEFAULT_TEMPERATURE: () => GLAMA_DEFAULT_TEMPERATURE,
39
40
  GLOBAL_SETTINGS_KEYS: () => GLOBAL_SETTINGS_KEYS,
40
41
  GLOBAL_STATE_KEYS: () => GLOBAL_STATE_KEYS,
42
+ HUGGINGFACE_API_URL: () => HUGGINGFACE_API_URL,
43
+ HUGGINGFACE_CACHE_DURATION: () => HUGGINGFACE_CACHE_DURATION,
44
+ HUGGINGFACE_DEFAULT_CONTEXT_WINDOW: () => HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
45
+ HUGGINGFACE_DEFAULT_MAX_TOKENS: () => HUGGINGFACE_DEFAULT_MAX_TOKENS,
46
+ HUGGINGFACE_MAX_TOKENS_FALLBACK: () => HUGGINGFACE_MAX_TOKENS_FALLBACK,
47
+ HUGGINGFACE_SLIDER_MIN: () => HUGGINGFACE_SLIDER_MIN,
48
+ HUGGINGFACE_SLIDER_STEP: () => HUGGINGFACE_SLIDER_STEP,
49
+ HUGGINGFACE_TEMPERATURE_MAX_VALUE: () => HUGGINGFACE_TEMPERATURE_MAX_VALUE,
41
50
  IpcMessageType: () => IpcMessageType,
42
51
  IpcOrigin: () => IpcOrigin,
43
52
  LITELLM_COMPUTER_USE_MODELS: () => LITELLM_COMPUTER_USE_MODELS,
@@ -915,6 +924,15 @@ var chutesModels = {
915
924
  inputPrice: 0,
916
925
  outputPrice: 0,
917
926
  description: "TNGTech DeepSeek R1T Chimera model."
927
+ },
928
+ "zai-org/GLM-4.5-Air": {
929
+ maxTokens: 32768,
930
+ contextWindow: 151329,
931
+ supportsImages: false,
932
+ supportsPromptCache: false,
933
+ inputPrice: 0,
934
+ outputPrice: 0,
935
+ description: "GLM-4.5-Air model with 151,329 token context window and 106B total parameters with 12B activated."
918
936
  }
919
937
  };
920
938
 
@@ -1414,6 +1432,16 @@ var groqModels = {
1414
1432
  }
1415
1433
  };
1416
1434
 
1435
+ // src/providers/huggingface.ts
1436
+ var HUGGINGFACE_DEFAULT_MAX_TOKENS = 2048;
1437
+ var HUGGINGFACE_MAX_TOKENS_FALLBACK = 8192;
1438
+ var HUGGINGFACE_DEFAULT_CONTEXT_WINDOW = 128e3;
1439
+ var HUGGINGFACE_SLIDER_STEP = 256;
1440
+ var HUGGINGFACE_SLIDER_MIN = 1;
1441
+ var HUGGINGFACE_TEMPERATURE_MAX_VALUE = 2;
1442
+ var HUGGINGFACE_API_URL = "https://router.huggingface.co/v1/models?collection=roocode";
1443
+ var HUGGINGFACE_CACHE_DURATION = 1e3 * 60 * 60;
1444
+
1417
1445
  // src/providers/lite-llm.ts
1418
1446
  var litellmDefaultModelId = "claude-3-7-sonnet-20250219";
1419
1447
  var litellmDefaultModelInfo = {
@@ -2468,7 +2496,7 @@ var codebaseIndexProviderSchema = import_zod.z.object({
2468
2496
  });
2469
2497
 
2470
2498
  // src/cloud.ts
2471
- var import_zod12 = require("zod");
2499
+ var import_zod13 = require("zod");
2472
2500
 
2473
2501
  // src/global-settings.ts
2474
2502
  var import_zod11 = require("zod");
@@ -2595,6 +2623,8 @@ var bedrockSchema = apiModelIdProviderModelSchema.extend({
2595
2623
  awsUsePromptCache: import_zod3.z.boolean().optional(),
2596
2624
  awsProfile: import_zod3.z.string().optional(),
2597
2625
  awsUseProfile: import_zod3.z.boolean().optional(),
2626
+ awsApiKey: import_zod3.z.string().optional(),
2627
+ awsUseApiKey: import_zod3.z.boolean().optional(),
2598
2628
  awsCustomArn: import_zod3.z.string().optional(),
2599
2629
  awsModelContextWindow: import_zod3.z.number().optional(),
2600
2630
  awsBedrockEndpointEnabled: import_zod3.z.boolean().optional(),
@@ -2640,7 +2670,9 @@ var lmStudioSchema = baseProviderSettingsSchema.extend({
2640
2670
  });
2641
2671
  var geminiSchema = apiModelIdProviderModelSchema.extend({
2642
2672
  geminiApiKey: import_zod3.z.string().optional(),
2643
- googleGeminiBaseUrl: import_zod3.z.string().optional()
2673
+ googleGeminiBaseUrl: import_zod3.z.string().optional(),
2674
+ enableUrlContext: import_zod3.z.boolean().optional(),
2675
+ enableGrounding: import_zod3.z.boolean().optional()
2644
2676
  });
2645
2677
  var geminiCliSchema = apiModelIdProviderModelSchema.extend({
2646
2678
  geminiCliOAuthPath: import_zod3.z.string().optional(),
@@ -2691,7 +2723,8 @@ var chutesSchema = apiModelIdProviderModelSchema.extend({
2691
2723
  var litellmSchema = baseProviderSettingsSchema.extend({
2692
2724
  litellmBaseUrl: import_zod3.z.string().optional(),
2693
2725
  litellmApiKey: import_zod3.z.string().optional(),
2694
- litellmModelId: import_zod3.z.string().optional()
2726
+ litellmModelId: import_zod3.z.string().optional(),
2727
+ litellmUsePromptCache: import_zod3.z.boolean().optional()
2695
2728
  });
2696
2729
  var defaultSchema = import_zod3.z.object({
2697
2730
  apiProvider: import_zod3.z.undefined()
@@ -2795,16 +2828,18 @@ var historyItemSchema = import_zod4.z.object({
2795
2828
  cacheReads: import_zod4.z.number().optional(),
2796
2829
  totalCost: import_zod4.z.number(),
2797
2830
  size: import_zod4.z.number().optional(),
2798
- workspace: import_zod4.z.string().optional()
2831
+ workspace: import_zod4.z.string().optional(),
2832
+ mode: import_zod4.z.string().optional()
2799
2833
  });
2800
2834
 
2801
2835
  // src/experiment.ts
2802
2836
  var import_zod5 = require("zod");
2803
- var experimentIds = ["powerSteering", "multiFileApplyDiff"];
2837
+ var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
2804
2838
  var experimentIdsSchema = import_zod5.z.enum(experimentIds);
2805
2839
  var experimentsSchema = import_zod5.z.object({
2806
2840
  powerSteering: import_zod5.z.boolean().optional(),
2807
- multiFileApplyDiff: import_zod5.z.boolean().optional()
2841
+ multiFileApplyDiff: import_zod5.z.boolean().optional(),
2842
+ preventFocusDisruption: import_zod5.z.boolean().optional()
2808
2843
  });
2809
2844
 
2810
2845
  // src/telemetry.ts
@@ -3135,6 +3170,52 @@ var promptComponentSchema = import_zod9.z.object({
3135
3170
  });
3136
3171
  var customModePromptsSchema = import_zod9.z.record(import_zod9.z.string(), promptComponentSchema.optional());
3137
3172
  var customSupportPromptsSchema = import_zod9.z.record(import_zod9.z.string(), import_zod9.z.string().optional());
3173
+ var DEFAULT_MODES = [
3174
+ {
3175
+ slug: "architect",
3176
+ name: "\u{1F3D7}\uFE0F Architect",
3177
+ roleDefinition: "You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
3178
+ whenToUse: "Use this mode when you need to plan, design, or strategize before implementation. Perfect for breaking down complex problems, creating technical specifications, designing system architecture, or brainstorming solutions before coding.",
3179
+ description: "Plan and design before implementation",
3180
+ groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
3181
+ customInstructions: "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n **Note:** If the `update_todo_list` tool is not available, write the plan to a markdown file (e.g., `plan.md` or `todo.md`) instead.\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**"
3182
+ },
3183
+ {
3184
+ slug: "code",
3185
+ name: "\u{1F4BB} Code",
3186
+ roleDefinition: "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
3187
+ whenToUse: "Use this mode when you need to write, modify, or refactor code. Ideal for implementing features, fixing bugs, creating new files, or making code improvements across any programming language or framework.",
3188
+ description: "Write, modify, and refactor code",
3189
+ groups: ["read", "edit", "browser", "command", "mcp"]
3190
+ },
3191
+ {
3192
+ slug: "ask",
3193
+ name: "\u2753 Ask",
3194
+ roleDefinition: "You are Roo, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics.",
3195
+ whenToUse: "Use this mode when you need explanations, documentation, or answers to technical questions. Best for understanding concepts, analyzing existing code, getting recommendations, or learning about technologies without making changes.",
3196
+ description: "Get answers and explanations",
3197
+ groups: ["read", "browser", "mcp"],
3198
+ customInstructions: "You can analyze code, explain concepts, and access external resources. Always answer the user's questions thoroughly, and do not switch to implementing code unless explicitly requested by the user. Include Mermaid diagrams when they clarify your response."
3199
+ },
3200
+ {
3201
+ slug: "debug",
3202
+ name: "\u{1FAB2} Debug",
3203
+ roleDefinition: "You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
3204
+ whenToUse: "Use this mode when you're troubleshooting issues, investigating errors, or diagnosing problems. Specialized in systematic debugging, adding logging, analyzing stack traces, and identifying root causes before applying fixes.",
3205
+ description: "Diagnose and fix software issues",
3206
+ groups: ["read", "edit", "browser", "command", "mcp"],
3207
+ customInstructions: "Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions. Explicitly ask the user to confirm the diagnosis before fixing the problem."
3208
+ },
3209
+ {
3210
+ slug: "orchestrator",
3211
+ name: "\u{1FA83} Orchestrator",
3212
+ roleDefinition: "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.",
3213
+ whenToUse: "Use this mode for complex, multi-step projects that require coordination across different specialties. Ideal when you need to break down large tasks into subtasks, manage workflows, or coordinate work that spans multiple domains or expertise areas.",
3214
+ description: "Coordinate tasks across multiple modes",
3215
+ groups: [],
3216
+ customInstructions: "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. These instructions must include:\n * All necessary context from the parent task or previous subtasks required to complete the work.\n * A clearly defined scope, specifying exactly what the subtask should accomplish.\n * An explicit statement that the subtask should *only* perform the work outlined in these instructions and not deviate.\n * An instruction for the subtask to signal completion by using the `attempt_completion` tool, providing a concise yet thorough summary of the outcome in the `result` parameter, keeping in mind that this summary will be the source of truth used to keep track of what was completed on this project.\n * A statement that these specific instructions supersede any conflicting general instructions the subtask's mode might have.\n\n3. Track and manage the progress of all subtasks. When a subtask is completed, analyze its results and determine the next steps.\n\n4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\n\n5. When all subtasks are completed, synthesize the results and provide a comprehensive overview of what was accomplished.\n\n6. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively.\n\n7. Suggest improvements to the workflow based on the results of completed subtasks.\n\nUse subtasks to maintain clarity. If a request significantly shifts focus or requires a different expertise (mode), consider creating a subtask rather than overloading the current one."
3217
+ }
3218
+ ];
3138
3219
 
3139
3220
  // src/vscode.ts
3140
3221
  var import_zod10 = require("zod");
@@ -3248,6 +3329,8 @@ var globalSettingsSchema = import_zod11.z.object({
3248
3329
  maxWorkspaceFiles: import_zod11.z.number().optional(),
3249
3330
  showRooIgnoredFiles: import_zod11.z.boolean().optional(),
3250
3331
  maxReadFileLine: import_zod11.z.number().optional(),
3332
+ maxImageFileSize: import_zod11.z.number().optional(),
3333
+ maxTotalImageSize: import_zod11.z.number().optional(),
3251
3334
  terminalOutputLineLimit: import_zod11.z.number().optional(),
3252
3335
  terminalOutputCharacterLimit: import_zod11.z.number().optional(),
3253
3336
  terminalShellIntegrationTimeout: import_zod11.z.number().optional(),
@@ -3289,6 +3372,7 @@ var SECRET_STATE_KEYS = [
3289
3372
  "glamaApiKey",
3290
3373
  "openRouterApiKey",
3291
3374
  "awsAccessKey",
3375
+ "awsApiKey",
3292
3376
  "awsSecretKey",
3293
3377
  "awsSessionToken",
3294
3378
  "openAiApiKey",
@@ -3381,13 +3465,63 @@ var EVALS_SETTINGS = {
3381
3465
  };
3382
3466
  var EVALS_TIMEOUT = 5 * 60 * 1e3;
3383
3467
 
3468
+ // src/marketplace.ts
3469
+ var import_zod12 = require("zod");
3470
+ var mcpParameterSchema = import_zod12.z.object({
3471
+ name: import_zod12.z.string().min(1),
3472
+ key: import_zod12.z.string().min(1),
3473
+ placeholder: import_zod12.z.string().optional(),
3474
+ optional: import_zod12.z.boolean().optional().default(false)
3475
+ });
3476
+ var mcpInstallationMethodSchema = import_zod12.z.object({
3477
+ name: import_zod12.z.string().min(1),
3478
+ content: import_zod12.z.string().min(1),
3479
+ parameters: import_zod12.z.array(mcpParameterSchema).optional(),
3480
+ prerequisites: import_zod12.z.array(import_zod12.z.string()).optional()
3481
+ });
3482
+ var marketplaceItemTypeSchema = import_zod12.z.enum(["mode", "mcp"]);
3483
+ var baseMarketplaceItemSchema = import_zod12.z.object({
3484
+ id: import_zod12.z.string().min(1),
3485
+ name: import_zod12.z.string().min(1, "Name is required"),
3486
+ description: import_zod12.z.string(),
3487
+ author: import_zod12.z.string().optional(),
3488
+ authorUrl: import_zod12.z.string().url("Author URL must be a valid URL").optional(),
3489
+ tags: import_zod12.z.array(import_zod12.z.string()).optional(),
3490
+ prerequisites: import_zod12.z.array(import_zod12.z.string()).optional()
3491
+ });
3492
+ var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3493
+ content: import_zod12.z.string().min(1)
3494
+ // YAML content for modes
3495
+ });
3496
+ var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3497
+ url: import_zod12.z.string().url(),
3498
+ // Required url field
3499
+ content: import_zod12.z.union([import_zod12.z.string().min(1), import_zod12.z.array(mcpInstallationMethodSchema)]),
3500
+ // Single config or array of methods
3501
+ parameters: import_zod12.z.array(mcpParameterSchema).optional()
3502
+ });
3503
+ var marketplaceItemSchema = import_zod12.z.discriminatedUnion("type", [
3504
+ // Mode marketplace item
3505
+ modeMarketplaceItemSchema.extend({
3506
+ type: import_zod12.z.literal("mode")
3507
+ }),
3508
+ // MCP marketplace item
3509
+ mcpMarketplaceItemSchema.extend({
3510
+ type: import_zod12.z.literal("mcp")
3511
+ })
3512
+ ]);
3513
+ var installMarketplaceItemOptionsSchema = import_zod12.z.object({
3514
+ target: import_zod12.z.enum(["global", "project"]).optional().default("project"),
3515
+ parameters: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.any()).optional()
3516
+ });
3517
+
3384
3518
  // src/cloud.ts
3385
- var organizationAllowListSchema = import_zod12.z.object({
3386
- allowAll: import_zod12.z.boolean(),
3387
- providers: import_zod12.z.record(
3388
- import_zod12.z.object({
3389
- allowAll: import_zod12.z.boolean(),
3390
- models: import_zod12.z.array(import_zod12.z.string()).optional()
3519
+ var organizationAllowListSchema = import_zod13.z.object({
3520
+ allowAll: import_zod13.z.boolean(),
3521
+ providers: import_zod13.z.record(
3522
+ import_zod13.z.object({
3523
+ allowAll: import_zod13.z.boolean(),
3524
+ models: import_zod13.z.array(import_zod13.z.string()).optional()
3391
3525
  })
3392
3526
  )
3393
3527
  });
@@ -3405,26 +3539,29 @@ var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
3405
3539
  terminalShellIntegrationTimeout: true,
3406
3540
  terminalZshClearEolMark: true
3407
3541
  }).merge(
3408
- import_zod12.z.object({
3409
- maxOpenTabsContext: import_zod12.z.number().int().nonnegative().optional(),
3410
- maxReadFileLine: import_zod12.z.number().int().gte(-1).optional(),
3411
- maxWorkspaceFiles: import_zod12.z.number().int().nonnegative().optional(),
3412
- terminalCommandDelay: import_zod12.z.number().int().nonnegative().optional(),
3413
- terminalOutputLineLimit: import_zod12.z.number().int().nonnegative().optional(),
3414
- terminalShellIntegrationTimeout: import_zod12.z.number().int().nonnegative().optional()
3542
+ import_zod13.z.object({
3543
+ maxOpenTabsContext: import_zod13.z.number().int().nonnegative().optional(),
3544
+ maxReadFileLine: import_zod13.z.number().int().gte(-1).optional(),
3545
+ maxWorkspaceFiles: import_zod13.z.number().int().nonnegative().optional(),
3546
+ terminalCommandDelay: import_zod13.z.number().int().nonnegative().optional(),
3547
+ terminalOutputLineLimit: import_zod13.z.number().int().nonnegative().optional(),
3548
+ terminalShellIntegrationTimeout: import_zod13.z.number().int().nonnegative().optional()
3415
3549
  })
3416
3550
  );
3417
- var organizationCloudSettingsSchema = import_zod12.z.object({
3418
- recordTaskMessages: import_zod12.z.boolean().optional(),
3419
- enableTaskSharing: import_zod12.z.boolean().optional(),
3420
- taskShareExpirationDays: import_zod12.z.number().int().positive().optional(),
3421
- allowMembersViewAllTasks: import_zod12.z.boolean().optional()
3422
- });
3423
- var organizationSettingsSchema = import_zod12.z.object({
3424
- version: import_zod12.z.number(),
3551
+ var organizationCloudSettingsSchema = import_zod13.z.object({
3552
+ recordTaskMessages: import_zod13.z.boolean().optional(),
3553
+ enableTaskSharing: import_zod13.z.boolean().optional(),
3554
+ taskShareExpirationDays: import_zod13.z.number().int().positive().optional(),
3555
+ allowMembersViewAllTasks: import_zod13.z.boolean().optional()
3556
+ });
3557
+ var organizationSettingsSchema = import_zod13.z.object({
3558
+ version: import_zod13.z.number(),
3425
3559
  cloudSettings: organizationCloudSettingsSchema.optional(),
3426
3560
  defaultSettings: organizationDefaultSettingsSchema,
3427
- allowList: organizationAllowListSchema
3561
+ allowList: organizationAllowListSchema,
3562
+ hiddenMcps: import_zod13.z.array(import_zod13.z.string()).optional(),
3563
+ hideMarketplaceMcps: import_zod13.z.boolean().optional(),
3564
+ mcps: import_zod13.z.array(mcpMarketplaceItemSchema).optional()
3428
3565
  });
3429
3566
  var ORGANIZATION_ALLOW_ALL = {
3430
3567
  allowAll: true,
@@ -3441,29 +3578,29 @@ var ORGANIZATION_DEFAULT = {
3441
3578
  defaultSettings: {},
3442
3579
  allowList: ORGANIZATION_ALLOW_ALL
3443
3580
  };
3444
- var shareResponseSchema = import_zod12.z.object({
3445
- success: import_zod12.z.boolean(),
3446
- shareUrl: import_zod12.z.string().optional(),
3447
- error: import_zod12.z.string().optional(),
3448
- isNewShare: import_zod12.z.boolean().optional(),
3449
- manageUrl: import_zod12.z.string().optional()
3581
+ var shareResponseSchema = import_zod13.z.object({
3582
+ success: import_zod13.z.boolean(),
3583
+ shareUrl: import_zod13.z.string().optional(),
3584
+ error: import_zod13.z.string().optional(),
3585
+ isNewShare: import_zod13.z.boolean().optional(),
3586
+ manageUrl: import_zod13.z.string().optional()
3450
3587
  });
3451
3588
 
3452
3589
  // src/followup.ts
3453
- var import_zod13 = require("zod");
3454
- var suggestionItemSchema = import_zod13.z.object({
3455
- answer: import_zod13.z.string(),
3456
- mode: import_zod13.z.string().optional()
3590
+ var import_zod14 = require("zod");
3591
+ var suggestionItemSchema = import_zod14.z.object({
3592
+ answer: import_zod14.z.string(),
3593
+ mode: import_zod14.z.string().optional()
3457
3594
  });
3458
- var followUpDataSchema = import_zod13.z.object({
3459
- question: import_zod13.z.string().optional(),
3460
- suggest: import_zod13.z.array(suggestionItemSchema).optional()
3595
+ var followUpDataSchema = import_zod14.z.object({
3596
+ question: import_zod14.z.string().optional(),
3597
+ suggest: import_zod14.z.array(suggestionItemSchema).optional()
3461
3598
  });
3462
3599
 
3463
3600
  // src/ipc.ts
3464
- var import_zod14 = require("zod");
3465
- var isSubtaskSchema = import_zod14.z.object({
3466
- isSubtask: import_zod14.z.boolean()
3601
+ var import_zod15 = require("zod");
3602
+ var isSubtaskSchema = import_zod15.z.object({
3603
+ isSubtask: import_zod15.z.boolean()
3467
3604
  });
3468
3605
  var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
3469
3606
  RooCodeEventName2["Message"] = "message";
@@ -3482,30 +3619,30 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
3482
3619
  RooCodeEventName2["EvalFail"] = "evalFail";
3483
3620
  return RooCodeEventName2;
3484
3621
  })(RooCodeEventName || {});
3485
- var rooCodeEventsSchema = import_zod14.z.object({
3486
- ["message" /* Message */]: import_zod14.z.tuple([
3487
- import_zod14.z.object({
3488
- taskId: import_zod14.z.string(),
3489
- action: import_zod14.z.union([import_zod14.z.literal("created"), import_zod14.z.literal("updated")]),
3622
+ var rooCodeEventsSchema = import_zod15.z.object({
3623
+ ["message" /* Message */]: import_zod15.z.tuple([
3624
+ import_zod15.z.object({
3625
+ taskId: import_zod15.z.string(),
3626
+ action: import_zod15.z.union([import_zod15.z.literal("created"), import_zod15.z.literal("updated")]),
3490
3627
  message: clineMessageSchema
3491
3628
  })
3492
3629
  ]),
3493
- ["taskCreated" /* TaskCreated */]: import_zod14.z.tuple([import_zod14.z.string()]),
3494
- ["taskStarted" /* TaskStarted */]: import_zod14.z.tuple([import_zod14.z.string()]),
3495
- ["taskModeSwitched" /* TaskModeSwitched */]: import_zod14.z.tuple([import_zod14.z.string(), import_zod14.z.string()]),
3496
- ["taskPaused" /* TaskPaused */]: import_zod14.z.tuple([import_zod14.z.string()]),
3497
- ["taskUnpaused" /* TaskUnpaused */]: import_zod14.z.tuple([import_zod14.z.string()]),
3498
- ["taskAskResponded" /* TaskAskResponded */]: import_zod14.z.tuple([import_zod14.z.string()]),
3499
- ["taskAborted" /* TaskAborted */]: import_zod14.z.tuple([import_zod14.z.string()]),
3500
- ["taskSpawned" /* TaskSpawned */]: import_zod14.z.tuple([import_zod14.z.string(), import_zod14.z.string()]),
3501
- ["taskCompleted" /* TaskCompleted */]: import_zod14.z.tuple([import_zod14.z.string(), tokenUsageSchema, toolUsageSchema, isSubtaskSchema]),
3502
- ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod14.z.tuple([import_zod14.z.string(), tokenUsageSchema]),
3503
- ["taskToolFailed" /* TaskToolFailed */]: import_zod14.z.tuple([import_zod14.z.string(), toolNamesSchema, import_zod14.z.string()])
3504
- });
3505
- var ackSchema = import_zod14.z.object({
3506
- clientId: import_zod14.z.string(),
3507
- pid: import_zod14.z.number(),
3508
- ppid: import_zod14.z.number()
3630
+ ["taskCreated" /* TaskCreated */]: import_zod15.z.tuple([import_zod15.z.string()]),
3631
+ ["taskStarted" /* TaskStarted */]: import_zod15.z.tuple([import_zod15.z.string()]),
3632
+ ["taskModeSwitched" /* TaskModeSwitched */]: import_zod15.z.tuple([import_zod15.z.string(), import_zod15.z.string()]),
3633
+ ["taskPaused" /* TaskPaused */]: import_zod15.z.tuple([import_zod15.z.string()]),
3634
+ ["taskUnpaused" /* TaskUnpaused */]: import_zod15.z.tuple([import_zod15.z.string()]),
3635
+ ["taskAskResponded" /* TaskAskResponded */]: import_zod15.z.tuple([import_zod15.z.string()]),
3636
+ ["taskAborted" /* TaskAborted */]: import_zod15.z.tuple([import_zod15.z.string()]),
3637
+ ["taskSpawned" /* TaskSpawned */]: import_zod15.z.tuple([import_zod15.z.string(), import_zod15.z.string()]),
3638
+ ["taskCompleted" /* TaskCompleted */]: import_zod15.z.tuple([import_zod15.z.string(), tokenUsageSchema, toolUsageSchema, isSubtaskSchema]),
3639
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod15.z.tuple([import_zod15.z.string(), tokenUsageSchema]),
3640
+ ["taskToolFailed" /* TaskToolFailed */]: import_zod15.z.tuple([import_zod15.z.string(), toolNamesSchema, import_zod15.z.string()])
3641
+ });
3642
+ var ackSchema = import_zod15.z.object({
3643
+ clientId: import_zod15.z.string(),
3644
+ pid: import_zod15.z.number(),
3645
+ ppid: import_zod15.z.number()
3509
3646
  });
3510
3647
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
3511
3648
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -3513,95 +3650,95 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
3513
3650
  TaskCommandName2["CloseTask"] = "CloseTask";
3514
3651
  return TaskCommandName2;
3515
3652
  })(TaskCommandName || {});
3516
- var taskCommandSchema = import_zod14.z.discriminatedUnion("commandName", [
3517
- import_zod14.z.object({
3518
- commandName: import_zod14.z.literal("StartNewTask" /* StartNewTask */),
3519
- data: import_zod14.z.object({
3653
+ var taskCommandSchema = import_zod15.z.discriminatedUnion("commandName", [
3654
+ import_zod15.z.object({
3655
+ commandName: import_zod15.z.literal("StartNewTask" /* StartNewTask */),
3656
+ data: import_zod15.z.object({
3520
3657
  configuration: rooCodeSettingsSchema,
3521
- text: import_zod14.z.string(),
3522
- images: import_zod14.z.array(import_zod14.z.string()).optional(),
3523
- newTab: import_zod14.z.boolean().optional()
3658
+ text: import_zod15.z.string(),
3659
+ images: import_zod15.z.array(import_zod15.z.string()).optional(),
3660
+ newTab: import_zod15.z.boolean().optional()
3524
3661
  })
3525
3662
  }),
3526
- import_zod14.z.object({
3527
- commandName: import_zod14.z.literal("CancelTask" /* CancelTask */),
3528
- data: import_zod14.z.string()
3663
+ import_zod15.z.object({
3664
+ commandName: import_zod15.z.literal("CancelTask" /* CancelTask */),
3665
+ data: import_zod15.z.string()
3529
3666
  }),
3530
- import_zod14.z.object({
3531
- commandName: import_zod14.z.literal("CloseTask" /* CloseTask */),
3532
- data: import_zod14.z.string()
3667
+ import_zod15.z.object({
3668
+ commandName: import_zod15.z.literal("CloseTask" /* CloseTask */),
3669
+ data: import_zod15.z.string()
3533
3670
  })
3534
3671
  ]);
3535
- var taskEventSchema = import_zod14.z.discriminatedUnion("eventName", [
3536
- import_zod14.z.object({
3537
- eventName: import_zod14.z.literal("message" /* Message */),
3672
+ var taskEventSchema = import_zod15.z.discriminatedUnion("eventName", [
3673
+ import_zod15.z.object({
3674
+ eventName: import_zod15.z.literal("message" /* Message */),
3538
3675
  payload: rooCodeEventsSchema.shape["message" /* Message */],
3539
- taskId: import_zod14.z.number().optional()
3676
+ taskId: import_zod15.z.number().optional()
3540
3677
  }),
3541
- import_zod14.z.object({
3542
- eventName: import_zod14.z.literal("taskCreated" /* TaskCreated */),
3678
+ import_zod15.z.object({
3679
+ eventName: import_zod15.z.literal("taskCreated" /* TaskCreated */),
3543
3680
  payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
3544
- taskId: import_zod14.z.number().optional()
3681
+ taskId: import_zod15.z.number().optional()
3545
3682
  }),
3546
- import_zod14.z.object({
3547
- eventName: import_zod14.z.literal("taskStarted" /* TaskStarted */),
3683
+ import_zod15.z.object({
3684
+ eventName: import_zod15.z.literal("taskStarted" /* TaskStarted */),
3548
3685
  payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
3549
- taskId: import_zod14.z.number().optional()
3686
+ taskId: import_zod15.z.number().optional()
3550
3687
  }),
3551
- import_zod14.z.object({
3552
- eventName: import_zod14.z.literal("taskModeSwitched" /* TaskModeSwitched */),
3688
+ import_zod15.z.object({
3689
+ eventName: import_zod15.z.literal("taskModeSwitched" /* TaskModeSwitched */),
3553
3690
  payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
3554
- taskId: import_zod14.z.number().optional()
3691
+ taskId: import_zod15.z.number().optional()
3555
3692
  }),
3556
- import_zod14.z.object({
3557
- eventName: import_zod14.z.literal("taskPaused" /* TaskPaused */),
3693
+ import_zod15.z.object({
3694
+ eventName: import_zod15.z.literal("taskPaused" /* TaskPaused */),
3558
3695
  payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
3559
- taskId: import_zod14.z.number().optional()
3696
+ taskId: import_zod15.z.number().optional()
3560
3697
  }),
3561
- import_zod14.z.object({
3562
- eventName: import_zod14.z.literal("taskUnpaused" /* TaskUnpaused */),
3698
+ import_zod15.z.object({
3699
+ eventName: import_zod15.z.literal("taskUnpaused" /* TaskUnpaused */),
3563
3700
  payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
3564
- taskId: import_zod14.z.number().optional()
3701
+ taskId: import_zod15.z.number().optional()
3565
3702
  }),
3566
- import_zod14.z.object({
3567
- eventName: import_zod14.z.literal("taskAskResponded" /* TaskAskResponded */),
3703
+ import_zod15.z.object({
3704
+ eventName: import_zod15.z.literal("taskAskResponded" /* TaskAskResponded */),
3568
3705
  payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
3569
- taskId: import_zod14.z.number().optional()
3706
+ taskId: import_zod15.z.number().optional()
3570
3707
  }),
3571
- import_zod14.z.object({
3572
- eventName: import_zod14.z.literal("taskAborted" /* TaskAborted */),
3708
+ import_zod15.z.object({
3709
+ eventName: import_zod15.z.literal("taskAborted" /* TaskAborted */),
3573
3710
  payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
3574
- taskId: import_zod14.z.number().optional()
3711
+ taskId: import_zod15.z.number().optional()
3575
3712
  }),
3576
- import_zod14.z.object({
3577
- eventName: import_zod14.z.literal("taskSpawned" /* TaskSpawned */),
3713
+ import_zod15.z.object({
3714
+ eventName: import_zod15.z.literal("taskSpawned" /* TaskSpawned */),
3578
3715
  payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
3579
- taskId: import_zod14.z.number().optional()
3716
+ taskId: import_zod15.z.number().optional()
3580
3717
  }),
3581
- import_zod14.z.object({
3582
- eventName: import_zod14.z.literal("taskCompleted" /* TaskCompleted */),
3718
+ import_zod15.z.object({
3719
+ eventName: import_zod15.z.literal("taskCompleted" /* TaskCompleted */),
3583
3720
  payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
3584
- taskId: import_zod14.z.number().optional()
3721
+ taskId: import_zod15.z.number().optional()
3585
3722
  }),
3586
- import_zod14.z.object({
3587
- eventName: import_zod14.z.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
3723
+ import_zod15.z.object({
3724
+ eventName: import_zod15.z.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
3588
3725
  payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
3589
- taskId: import_zod14.z.number().optional()
3726
+ taskId: import_zod15.z.number().optional()
3590
3727
  }),
3591
- import_zod14.z.object({
3592
- eventName: import_zod14.z.literal("taskToolFailed" /* TaskToolFailed */),
3728
+ import_zod15.z.object({
3729
+ eventName: import_zod15.z.literal("taskToolFailed" /* TaskToolFailed */),
3593
3730
  payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
3594
- taskId: import_zod14.z.number().optional()
3731
+ taskId: import_zod15.z.number().optional()
3595
3732
  }),
3596
- import_zod14.z.object({
3597
- eventName: import_zod14.z.literal("evalPass" /* EvalPass */),
3598
- payload: import_zod14.z.undefined(),
3599
- taskId: import_zod14.z.number()
3733
+ import_zod15.z.object({
3734
+ eventName: import_zod15.z.literal("evalPass" /* EvalPass */),
3735
+ payload: import_zod15.z.undefined(),
3736
+ taskId: import_zod15.z.number()
3600
3737
  }),
3601
- import_zod14.z.object({
3602
- eventName: import_zod14.z.literal("evalFail" /* EvalFail */),
3603
- payload: import_zod14.z.undefined(),
3604
- taskId: import_zod14.z.number()
3738
+ import_zod15.z.object({
3739
+ eventName: import_zod15.z.literal("evalFail" /* EvalFail */),
3740
+ payload: import_zod15.z.undefined(),
3741
+ taskId: import_zod15.z.number()
3605
3742
  })
3606
3743
  ]);
3607
3744
  var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
@@ -3617,76 +3754,26 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
3617
3754
  IpcOrigin2["Server"] = "server";
3618
3755
  return IpcOrigin2;
3619
3756
  })(IpcOrigin || {});
3620
- var ipcMessageSchema = import_zod14.z.discriminatedUnion("type", [
3621
- import_zod14.z.object({
3622
- type: import_zod14.z.literal("Ack" /* Ack */),
3623
- origin: import_zod14.z.literal("server" /* Server */),
3757
+ var ipcMessageSchema = import_zod15.z.discriminatedUnion("type", [
3758
+ import_zod15.z.object({
3759
+ type: import_zod15.z.literal("Ack" /* Ack */),
3760
+ origin: import_zod15.z.literal("server" /* Server */),
3624
3761
  data: ackSchema
3625
3762
  }),
3626
- import_zod14.z.object({
3627
- type: import_zod14.z.literal("TaskCommand" /* TaskCommand */),
3628
- origin: import_zod14.z.literal("client" /* Client */),
3629
- clientId: import_zod14.z.string(),
3763
+ import_zod15.z.object({
3764
+ type: import_zod15.z.literal("TaskCommand" /* TaskCommand */),
3765
+ origin: import_zod15.z.literal("client" /* Client */),
3766
+ clientId: import_zod15.z.string(),
3630
3767
  data: taskCommandSchema
3631
3768
  }),
3632
- import_zod14.z.object({
3633
- type: import_zod14.z.literal("TaskEvent" /* TaskEvent */),
3634
- origin: import_zod14.z.literal("server" /* Server */),
3635
- relayClientId: import_zod14.z.string().optional(),
3769
+ import_zod15.z.object({
3770
+ type: import_zod15.z.literal("TaskEvent" /* TaskEvent */),
3771
+ origin: import_zod15.z.literal("server" /* Server */),
3772
+ relayClientId: import_zod15.z.string().optional(),
3636
3773
  data: taskEventSchema
3637
3774
  })
3638
3775
  ]);
3639
3776
 
3640
- // src/marketplace.ts
3641
- var import_zod15 = require("zod");
3642
- var mcpParameterSchema = import_zod15.z.object({
3643
- name: import_zod15.z.string().min(1),
3644
- key: import_zod15.z.string().min(1),
3645
- placeholder: import_zod15.z.string().optional(),
3646
- optional: import_zod15.z.boolean().optional().default(false)
3647
- });
3648
- var mcpInstallationMethodSchema = import_zod15.z.object({
3649
- name: import_zod15.z.string().min(1),
3650
- content: import_zod15.z.string().min(1),
3651
- parameters: import_zod15.z.array(mcpParameterSchema).optional(),
3652
- prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
3653
- });
3654
- var marketplaceItemTypeSchema = import_zod15.z.enum(["mode", "mcp"]);
3655
- var baseMarketplaceItemSchema = import_zod15.z.object({
3656
- id: import_zod15.z.string().min(1),
3657
- name: import_zod15.z.string().min(1, "Name is required"),
3658
- description: import_zod15.z.string(),
3659
- author: import_zod15.z.string().optional(),
3660
- authorUrl: import_zod15.z.string().url("Author URL must be a valid URL").optional(),
3661
- tags: import_zod15.z.array(import_zod15.z.string()).optional(),
3662
- prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
3663
- });
3664
- var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3665
- content: import_zod15.z.string().min(1)
3666
- // YAML content for modes
3667
- });
3668
- var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3669
- url: import_zod15.z.string().url(),
3670
- // Required url field
3671
- content: import_zod15.z.union([import_zod15.z.string().min(1), import_zod15.z.array(mcpInstallationMethodSchema)]),
3672
- // Single config or array of methods
3673
- parameters: import_zod15.z.array(mcpParameterSchema).optional()
3674
- });
3675
- var marketplaceItemSchema = import_zod15.z.discriminatedUnion("type", [
3676
- // Mode marketplace item
3677
- modeMarketplaceItemSchema.extend({
3678
- type: import_zod15.z.literal("mode")
3679
- }),
3680
- // MCP marketplace item
3681
- mcpMarketplaceItemSchema.extend({
3682
- type: import_zod15.z.literal("mcp")
3683
- })
3684
- ]);
3685
- var installMarketplaceItemOptionsSchema = import_zod15.z.object({
3686
- target: import_zod15.z.enum(["global", "project"]).optional().default("project"),
3687
- parameters: import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any()).optional()
3688
- });
3689
-
3690
3777
  // src/mcp.ts
3691
3778
  var import_zod16 = require("zod");
3692
3779
  var mcpExecutionStatusSchema = import_zod16.z.discriminatedUnion("status", [
@@ -3763,6 +3850,7 @@ var todoItemSchema = import_zod18.z.object({
3763
3850
  CODEBASE_INDEX_DEFAULTS,
3764
3851
  DEEP_SEEK_DEFAULT_TEMPERATURE,
3765
3852
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
3853
+ DEFAULT_MODES,
3766
3854
  DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
3767
3855
  DEFAULT_WRITE_DELAY_MS,
3768
3856
  EVALS_SETTINGS,
@@ -3770,6 +3858,14 @@ var todoItemSchema = import_zod18.z.object({
3770
3858
  GLAMA_DEFAULT_TEMPERATURE,
3771
3859
  GLOBAL_SETTINGS_KEYS,
3772
3860
  GLOBAL_STATE_KEYS,
3861
+ HUGGINGFACE_API_URL,
3862
+ HUGGINGFACE_CACHE_DURATION,
3863
+ HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
3864
+ HUGGINGFACE_DEFAULT_MAX_TOKENS,
3865
+ HUGGINGFACE_MAX_TOKENS_FALLBACK,
3866
+ HUGGINGFACE_SLIDER_MIN,
3867
+ HUGGINGFACE_SLIDER_STEP,
3868
+ HUGGINGFACE_TEMPERATURE_MAX_VALUE,
3773
3869
  IpcMessageType,
3774
3870
  IpcOrigin,
3775
3871
  LITELLM_COMPUTER_USE_MODELS,