@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.js CHANGED
@@ -724,6 +724,15 @@ var chutesModels = {
724
724
  inputPrice: 0,
725
725
  outputPrice: 0,
726
726
  description: "TNGTech DeepSeek R1T Chimera model."
727
+ },
728
+ "zai-org/GLM-4.5-Air": {
729
+ maxTokens: 32768,
730
+ contextWindow: 151329,
731
+ supportsImages: false,
732
+ supportsPromptCache: false,
733
+ inputPrice: 0,
734
+ outputPrice: 0,
735
+ description: "GLM-4.5-Air model with 151,329 token context window and 106B total parameters with 12B activated."
727
736
  }
728
737
  };
729
738
 
@@ -1223,6 +1232,16 @@ var groqModels = {
1223
1232
  }
1224
1233
  };
1225
1234
 
1235
+ // src/providers/huggingface.ts
1236
+ var HUGGINGFACE_DEFAULT_MAX_TOKENS = 2048;
1237
+ var HUGGINGFACE_MAX_TOKENS_FALLBACK = 8192;
1238
+ var HUGGINGFACE_DEFAULT_CONTEXT_WINDOW = 128e3;
1239
+ var HUGGINGFACE_SLIDER_STEP = 256;
1240
+ var HUGGINGFACE_SLIDER_MIN = 1;
1241
+ var HUGGINGFACE_TEMPERATURE_MAX_VALUE = 2;
1242
+ var HUGGINGFACE_API_URL = "https://router.huggingface.co/v1/models?collection=roocode";
1243
+ var HUGGINGFACE_CACHE_DURATION = 1e3 * 60 * 60;
1244
+
1226
1245
  // src/providers/lite-llm.ts
1227
1246
  var litellmDefaultModelId = "claude-3-7-sonnet-20250219";
1228
1247
  var litellmDefaultModelInfo = {
@@ -2277,7 +2296,7 @@ var codebaseIndexProviderSchema = z.object({
2277
2296
  });
2278
2297
 
2279
2298
  // src/cloud.ts
2280
- import { z as z12 } from "zod";
2299
+ import { z as z13 } from "zod";
2281
2300
 
2282
2301
  // src/global-settings.ts
2283
2302
  import { z as z11 } from "zod";
@@ -2404,6 +2423,8 @@ var bedrockSchema = apiModelIdProviderModelSchema.extend({
2404
2423
  awsUsePromptCache: z3.boolean().optional(),
2405
2424
  awsProfile: z3.string().optional(),
2406
2425
  awsUseProfile: z3.boolean().optional(),
2426
+ awsApiKey: z3.string().optional(),
2427
+ awsUseApiKey: z3.boolean().optional(),
2407
2428
  awsCustomArn: z3.string().optional(),
2408
2429
  awsModelContextWindow: z3.number().optional(),
2409
2430
  awsBedrockEndpointEnabled: z3.boolean().optional(),
@@ -2449,7 +2470,9 @@ var lmStudioSchema = baseProviderSettingsSchema.extend({
2449
2470
  });
2450
2471
  var geminiSchema = apiModelIdProviderModelSchema.extend({
2451
2472
  geminiApiKey: z3.string().optional(),
2452
- googleGeminiBaseUrl: z3.string().optional()
2473
+ googleGeminiBaseUrl: z3.string().optional(),
2474
+ enableUrlContext: z3.boolean().optional(),
2475
+ enableGrounding: z3.boolean().optional()
2453
2476
  });
2454
2477
  var geminiCliSchema = apiModelIdProviderModelSchema.extend({
2455
2478
  geminiCliOAuthPath: z3.string().optional(),
@@ -2500,7 +2523,8 @@ var chutesSchema = apiModelIdProviderModelSchema.extend({
2500
2523
  var litellmSchema = baseProviderSettingsSchema.extend({
2501
2524
  litellmBaseUrl: z3.string().optional(),
2502
2525
  litellmApiKey: z3.string().optional(),
2503
- litellmModelId: z3.string().optional()
2526
+ litellmModelId: z3.string().optional(),
2527
+ litellmUsePromptCache: z3.boolean().optional()
2504
2528
  });
2505
2529
  var defaultSchema = z3.object({
2506
2530
  apiProvider: z3.undefined()
@@ -2604,16 +2628,18 @@ var historyItemSchema = z4.object({
2604
2628
  cacheReads: z4.number().optional(),
2605
2629
  totalCost: z4.number(),
2606
2630
  size: z4.number().optional(),
2607
- workspace: z4.string().optional()
2631
+ workspace: z4.string().optional(),
2632
+ mode: z4.string().optional()
2608
2633
  });
2609
2634
 
2610
2635
  // src/experiment.ts
2611
2636
  import { z as z5 } from "zod";
2612
- var experimentIds = ["powerSteering", "multiFileApplyDiff"];
2637
+ var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
2613
2638
  var experimentIdsSchema = z5.enum(experimentIds);
2614
2639
  var experimentsSchema = z5.object({
2615
2640
  powerSteering: z5.boolean().optional(),
2616
- multiFileApplyDiff: z5.boolean().optional()
2641
+ multiFileApplyDiff: z5.boolean().optional(),
2642
+ preventFocusDisruption: z5.boolean().optional()
2617
2643
  });
2618
2644
 
2619
2645
  // src/telemetry.ts
@@ -2944,6 +2970,52 @@ var promptComponentSchema = z9.object({
2944
2970
  });
2945
2971
  var customModePromptsSchema = z9.record(z9.string(), promptComponentSchema.optional());
2946
2972
  var customSupportPromptsSchema = z9.record(z9.string(), z9.string().optional());
2973
+ var DEFAULT_MODES = [
2974
+ {
2975
+ slug: "architect",
2976
+ name: "\u{1F3D7}\uFE0F Architect",
2977
+ 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.",
2978
+ 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.",
2979
+ description: "Plan and design before implementation",
2980
+ groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
2981
+ 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.**"
2982
+ },
2983
+ {
2984
+ slug: "code",
2985
+ name: "\u{1F4BB} Code",
2986
+ roleDefinition: "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
2987
+ 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.",
2988
+ description: "Write, modify, and refactor code",
2989
+ groups: ["read", "edit", "browser", "command", "mcp"]
2990
+ },
2991
+ {
2992
+ slug: "ask",
2993
+ name: "\u2753 Ask",
2994
+ roleDefinition: "You are Roo, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics.",
2995
+ 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.",
2996
+ description: "Get answers and explanations",
2997
+ groups: ["read", "browser", "mcp"],
2998
+ 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."
2999
+ },
3000
+ {
3001
+ slug: "debug",
3002
+ name: "\u{1FAB2} Debug",
3003
+ roleDefinition: "You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
3004
+ 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.",
3005
+ description: "Diagnose and fix software issues",
3006
+ groups: ["read", "edit", "browser", "command", "mcp"],
3007
+ 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."
3008
+ },
3009
+ {
3010
+ slug: "orchestrator",
3011
+ name: "\u{1FA83} Orchestrator",
3012
+ 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.",
3013
+ 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.",
3014
+ description: "Coordinate tasks across multiple modes",
3015
+ groups: [],
3016
+ 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."
3017
+ }
3018
+ ];
2947
3019
 
2948
3020
  // src/vscode.ts
2949
3021
  import { z as z10 } from "zod";
@@ -3057,6 +3129,8 @@ var globalSettingsSchema = z11.object({
3057
3129
  maxWorkspaceFiles: z11.number().optional(),
3058
3130
  showRooIgnoredFiles: z11.boolean().optional(),
3059
3131
  maxReadFileLine: z11.number().optional(),
3132
+ maxImageFileSize: z11.number().optional(),
3133
+ maxTotalImageSize: z11.number().optional(),
3060
3134
  terminalOutputLineLimit: z11.number().optional(),
3061
3135
  terminalOutputCharacterLimit: z11.number().optional(),
3062
3136
  terminalShellIntegrationTimeout: z11.number().optional(),
@@ -3098,6 +3172,7 @@ var SECRET_STATE_KEYS = [
3098
3172
  "glamaApiKey",
3099
3173
  "openRouterApiKey",
3100
3174
  "awsAccessKey",
3175
+ "awsApiKey",
3101
3176
  "awsSecretKey",
3102
3177
  "awsSessionToken",
3103
3178
  "openAiApiKey",
@@ -3190,13 +3265,63 @@ var EVALS_SETTINGS = {
3190
3265
  };
3191
3266
  var EVALS_TIMEOUT = 5 * 60 * 1e3;
3192
3267
 
3268
+ // src/marketplace.ts
3269
+ import { z as z12 } from "zod";
3270
+ var mcpParameterSchema = z12.object({
3271
+ name: z12.string().min(1),
3272
+ key: z12.string().min(1),
3273
+ placeholder: z12.string().optional(),
3274
+ optional: z12.boolean().optional().default(false)
3275
+ });
3276
+ var mcpInstallationMethodSchema = z12.object({
3277
+ name: z12.string().min(1),
3278
+ content: z12.string().min(1),
3279
+ parameters: z12.array(mcpParameterSchema).optional(),
3280
+ prerequisites: z12.array(z12.string()).optional()
3281
+ });
3282
+ var marketplaceItemTypeSchema = z12.enum(["mode", "mcp"]);
3283
+ var baseMarketplaceItemSchema = z12.object({
3284
+ id: z12.string().min(1),
3285
+ name: z12.string().min(1, "Name is required"),
3286
+ description: z12.string(),
3287
+ author: z12.string().optional(),
3288
+ authorUrl: z12.string().url("Author URL must be a valid URL").optional(),
3289
+ tags: z12.array(z12.string()).optional(),
3290
+ prerequisites: z12.array(z12.string()).optional()
3291
+ });
3292
+ var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3293
+ content: z12.string().min(1)
3294
+ // YAML content for modes
3295
+ });
3296
+ var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3297
+ url: z12.string().url(),
3298
+ // Required url field
3299
+ content: z12.union([z12.string().min(1), z12.array(mcpInstallationMethodSchema)]),
3300
+ // Single config or array of methods
3301
+ parameters: z12.array(mcpParameterSchema).optional()
3302
+ });
3303
+ var marketplaceItemSchema = z12.discriminatedUnion("type", [
3304
+ // Mode marketplace item
3305
+ modeMarketplaceItemSchema.extend({
3306
+ type: z12.literal("mode")
3307
+ }),
3308
+ // MCP marketplace item
3309
+ mcpMarketplaceItemSchema.extend({
3310
+ type: z12.literal("mcp")
3311
+ })
3312
+ ]);
3313
+ var installMarketplaceItemOptionsSchema = z12.object({
3314
+ target: z12.enum(["global", "project"]).optional().default("project"),
3315
+ parameters: z12.record(z12.string(), z12.any()).optional()
3316
+ });
3317
+
3193
3318
  // src/cloud.ts
3194
- var organizationAllowListSchema = z12.object({
3195
- allowAll: z12.boolean(),
3196
- providers: z12.record(
3197
- z12.object({
3198
- allowAll: z12.boolean(),
3199
- models: z12.array(z12.string()).optional()
3319
+ var organizationAllowListSchema = z13.object({
3320
+ allowAll: z13.boolean(),
3321
+ providers: z13.record(
3322
+ z13.object({
3323
+ allowAll: z13.boolean(),
3324
+ models: z13.array(z13.string()).optional()
3200
3325
  })
3201
3326
  )
3202
3327
  });
@@ -3214,26 +3339,29 @@ var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
3214
3339
  terminalShellIntegrationTimeout: true,
3215
3340
  terminalZshClearEolMark: true
3216
3341
  }).merge(
3217
- z12.object({
3218
- maxOpenTabsContext: z12.number().int().nonnegative().optional(),
3219
- maxReadFileLine: z12.number().int().gte(-1).optional(),
3220
- maxWorkspaceFiles: z12.number().int().nonnegative().optional(),
3221
- terminalCommandDelay: z12.number().int().nonnegative().optional(),
3222
- terminalOutputLineLimit: z12.number().int().nonnegative().optional(),
3223
- terminalShellIntegrationTimeout: z12.number().int().nonnegative().optional()
3342
+ z13.object({
3343
+ maxOpenTabsContext: z13.number().int().nonnegative().optional(),
3344
+ maxReadFileLine: z13.number().int().gte(-1).optional(),
3345
+ maxWorkspaceFiles: z13.number().int().nonnegative().optional(),
3346
+ terminalCommandDelay: z13.number().int().nonnegative().optional(),
3347
+ terminalOutputLineLimit: z13.number().int().nonnegative().optional(),
3348
+ terminalShellIntegrationTimeout: z13.number().int().nonnegative().optional()
3224
3349
  })
3225
3350
  );
3226
- var organizationCloudSettingsSchema = z12.object({
3227
- recordTaskMessages: z12.boolean().optional(),
3228
- enableTaskSharing: z12.boolean().optional(),
3229
- taskShareExpirationDays: z12.number().int().positive().optional(),
3230
- allowMembersViewAllTasks: z12.boolean().optional()
3231
- });
3232
- var organizationSettingsSchema = z12.object({
3233
- version: z12.number(),
3351
+ var organizationCloudSettingsSchema = z13.object({
3352
+ recordTaskMessages: z13.boolean().optional(),
3353
+ enableTaskSharing: z13.boolean().optional(),
3354
+ taskShareExpirationDays: z13.number().int().positive().optional(),
3355
+ allowMembersViewAllTasks: z13.boolean().optional()
3356
+ });
3357
+ var organizationSettingsSchema = z13.object({
3358
+ version: z13.number(),
3234
3359
  cloudSettings: organizationCloudSettingsSchema.optional(),
3235
3360
  defaultSettings: organizationDefaultSettingsSchema,
3236
- allowList: organizationAllowListSchema
3361
+ allowList: organizationAllowListSchema,
3362
+ hiddenMcps: z13.array(z13.string()).optional(),
3363
+ hideMarketplaceMcps: z13.boolean().optional(),
3364
+ mcps: z13.array(mcpMarketplaceItemSchema).optional()
3237
3365
  });
3238
3366
  var ORGANIZATION_ALLOW_ALL = {
3239
3367
  allowAll: true,
@@ -3250,29 +3378,29 @@ var ORGANIZATION_DEFAULT = {
3250
3378
  defaultSettings: {},
3251
3379
  allowList: ORGANIZATION_ALLOW_ALL
3252
3380
  };
3253
- var shareResponseSchema = z12.object({
3254
- success: z12.boolean(),
3255
- shareUrl: z12.string().optional(),
3256
- error: z12.string().optional(),
3257
- isNewShare: z12.boolean().optional(),
3258
- manageUrl: z12.string().optional()
3381
+ var shareResponseSchema = z13.object({
3382
+ success: z13.boolean(),
3383
+ shareUrl: z13.string().optional(),
3384
+ error: z13.string().optional(),
3385
+ isNewShare: z13.boolean().optional(),
3386
+ manageUrl: z13.string().optional()
3259
3387
  });
3260
3388
 
3261
3389
  // src/followup.ts
3262
- import { z as z13 } from "zod";
3263
- var suggestionItemSchema = z13.object({
3264
- answer: z13.string(),
3265
- mode: z13.string().optional()
3390
+ import { z as z14 } from "zod";
3391
+ var suggestionItemSchema = z14.object({
3392
+ answer: z14.string(),
3393
+ mode: z14.string().optional()
3266
3394
  });
3267
- var followUpDataSchema = z13.object({
3268
- question: z13.string().optional(),
3269
- suggest: z13.array(suggestionItemSchema).optional()
3395
+ var followUpDataSchema = z14.object({
3396
+ question: z14.string().optional(),
3397
+ suggest: z14.array(suggestionItemSchema).optional()
3270
3398
  });
3271
3399
 
3272
3400
  // src/ipc.ts
3273
- import { z as z14 } from "zod";
3274
- var isSubtaskSchema = z14.object({
3275
- isSubtask: z14.boolean()
3401
+ import { z as z15 } from "zod";
3402
+ var isSubtaskSchema = z15.object({
3403
+ isSubtask: z15.boolean()
3276
3404
  });
3277
3405
  var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
3278
3406
  RooCodeEventName2["Message"] = "message";
@@ -3291,30 +3419,30 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
3291
3419
  RooCodeEventName2["EvalFail"] = "evalFail";
3292
3420
  return RooCodeEventName2;
3293
3421
  })(RooCodeEventName || {});
3294
- var rooCodeEventsSchema = z14.object({
3295
- ["message" /* Message */]: z14.tuple([
3296
- z14.object({
3297
- taskId: z14.string(),
3298
- action: z14.union([z14.literal("created"), z14.literal("updated")]),
3422
+ var rooCodeEventsSchema = z15.object({
3423
+ ["message" /* Message */]: z15.tuple([
3424
+ z15.object({
3425
+ taskId: z15.string(),
3426
+ action: z15.union([z15.literal("created"), z15.literal("updated")]),
3299
3427
  message: clineMessageSchema
3300
3428
  })
3301
3429
  ]),
3302
- ["taskCreated" /* TaskCreated */]: z14.tuple([z14.string()]),
3303
- ["taskStarted" /* TaskStarted */]: z14.tuple([z14.string()]),
3304
- ["taskModeSwitched" /* TaskModeSwitched */]: z14.tuple([z14.string(), z14.string()]),
3305
- ["taskPaused" /* TaskPaused */]: z14.tuple([z14.string()]),
3306
- ["taskUnpaused" /* TaskUnpaused */]: z14.tuple([z14.string()]),
3307
- ["taskAskResponded" /* TaskAskResponded */]: z14.tuple([z14.string()]),
3308
- ["taskAborted" /* TaskAborted */]: z14.tuple([z14.string()]),
3309
- ["taskSpawned" /* TaskSpawned */]: z14.tuple([z14.string(), z14.string()]),
3310
- ["taskCompleted" /* TaskCompleted */]: z14.tuple([z14.string(), tokenUsageSchema, toolUsageSchema, isSubtaskSchema]),
3311
- ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z14.tuple([z14.string(), tokenUsageSchema]),
3312
- ["taskToolFailed" /* TaskToolFailed */]: z14.tuple([z14.string(), toolNamesSchema, z14.string()])
3313
- });
3314
- var ackSchema = z14.object({
3315
- clientId: z14.string(),
3316
- pid: z14.number(),
3317
- ppid: z14.number()
3430
+ ["taskCreated" /* TaskCreated */]: z15.tuple([z15.string()]),
3431
+ ["taskStarted" /* TaskStarted */]: z15.tuple([z15.string()]),
3432
+ ["taskModeSwitched" /* TaskModeSwitched */]: z15.tuple([z15.string(), z15.string()]),
3433
+ ["taskPaused" /* TaskPaused */]: z15.tuple([z15.string()]),
3434
+ ["taskUnpaused" /* TaskUnpaused */]: z15.tuple([z15.string()]),
3435
+ ["taskAskResponded" /* TaskAskResponded */]: z15.tuple([z15.string()]),
3436
+ ["taskAborted" /* TaskAborted */]: z15.tuple([z15.string()]),
3437
+ ["taskSpawned" /* TaskSpawned */]: z15.tuple([z15.string(), z15.string()]),
3438
+ ["taskCompleted" /* TaskCompleted */]: z15.tuple([z15.string(), tokenUsageSchema, toolUsageSchema, isSubtaskSchema]),
3439
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z15.tuple([z15.string(), tokenUsageSchema]),
3440
+ ["taskToolFailed" /* TaskToolFailed */]: z15.tuple([z15.string(), toolNamesSchema, z15.string()])
3441
+ });
3442
+ var ackSchema = z15.object({
3443
+ clientId: z15.string(),
3444
+ pid: z15.number(),
3445
+ ppid: z15.number()
3318
3446
  });
3319
3447
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
3320
3448
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -3322,95 +3450,95 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
3322
3450
  TaskCommandName2["CloseTask"] = "CloseTask";
3323
3451
  return TaskCommandName2;
3324
3452
  })(TaskCommandName || {});
3325
- var taskCommandSchema = z14.discriminatedUnion("commandName", [
3326
- z14.object({
3327
- commandName: z14.literal("StartNewTask" /* StartNewTask */),
3328
- data: z14.object({
3453
+ var taskCommandSchema = z15.discriminatedUnion("commandName", [
3454
+ z15.object({
3455
+ commandName: z15.literal("StartNewTask" /* StartNewTask */),
3456
+ data: z15.object({
3329
3457
  configuration: rooCodeSettingsSchema,
3330
- text: z14.string(),
3331
- images: z14.array(z14.string()).optional(),
3332
- newTab: z14.boolean().optional()
3458
+ text: z15.string(),
3459
+ images: z15.array(z15.string()).optional(),
3460
+ newTab: z15.boolean().optional()
3333
3461
  })
3334
3462
  }),
3335
- z14.object({
3336
- commandName: z14.literal("CancelTask" /* CancelTask */),
3337
- data: z14.string()
3463
+ z15.object({
3464
+ commandName: z15.literal("CancelTask" /* CancelTask */),
3465
+ data: z15.string()
3338
3466
  }),
3339
- z14.object({
3340
- commandName: z14.literal("CloseTask" /* CloseTask */),
3341
- data: z14.string()
3467
+ z15.object({
3468
+ commandName: z15.literal("CloseTask" /* CloseTask */),
3469
+ data: z15.string()
3342
3470
  })
3343
3471
  ]);
3344
- var taskEventSchema = z14.discriminatedUnion("eventName", [
3345
- z14.object({
3346
- eventName: z14.literal("message" /* Message */),
3472
+ var taskEventSchema = z15.discriminatedUnion("eventName", [
3473
+ z15.object({
3474
+ eventName: z15.literal("message" /* Message */),
3347
3475
  payload: rooCodeEventsSchema.shape["message" /* Message */],
3348
- taskId: z14.number().optional()
3476
+ taskId: z15.number().optional()
3349
3477
  }),
3350
- z14.object({
3351
- eventName: z14.literal("taskCreated" /* TaskCreated */),
3478
+ z15.object({
3479
+ eventName: z15.literal("taskCreated" /* TaskCreated */),
3352
3480
  payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
3353
- taskId: z14.number().optional()
3481
+ taskId: z15.number().optional()
3354
3482
  }),
3355
- z14.object({
3356
- eventName: z14.literal("taskStarted" /* TaskStarted */),
3483
+ z15.object({
3484
+ eventName: z15.literal("taskStarted" /* TaskStarted */),
3357
3485
  payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
3358
- taskId: z14.number().optional()
3486
+ taskId: z15.number().optional()
3359
3487
  }),
3360
- z14.object({
3361
- eventName: z14.literal("taskModeSwitched" /* TaskModeSwitched */),
3488
+ z15.object({
3489
+ eventName: z15.literal("taskModeSwitched" /* TaskModeSwitched */),
3362
3490
  payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
3363
- taskId: z14.number().optional()
3491
+ taskId: z15.number().optional()
3364
3492
  }),
3365
- z14.object({
3366
- eventName: z14.literal("taskPaused" /* TaskPaused */),
3493
+ z15.object({
3494
+ eventName: z15.literal("taskPaused" /* TaskPaused */),
3367
3495
  payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
3368
- taskId: z14.number().optional()
3496
+ taskId: z15.number().optional()
3369
3497
  }),
3370
- z14.object({
3371
- eventName: z14.literal("taskUnpaused" /* TaskUnpaused */),
3498
+ z15.object({
3499
+ eventName: z15.literal("taskUnpaused" /* TaskUnpaused */),
3372
3500
  payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
3373
- taskId: z14.number().optional()
3501
+ taskId: z15.number().optional()
3374
3502
  }),
3375
- z14.object({
3376
- eventName: z14.literal("taskAskResponded" /* TaskAskResponded */),
3503
+ z15.object({
3504
+ eventName: z15.literal("taskAskResponded" /* TaskAskResponded */),
3377
3505
  payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
3378
- taskId: z14.number().optional()
3506
+ taskId: z15.number().optional()
3379
3507
  }),
3380
- z14.object({
3381
- eventName: z14.literal("taskAborted" /* TaskAborted */),
3508
+ z15.object({
3509
+ eventName: z15.literal("taskAborted" /* TaskAborted */),
3382
3510
  payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
3383
- taskId: z14.number().optional()
3511
+ taskId: z15.number().optional()
3384
3512
  }),
3385
- z14.object({
3386
- eventName: z14.literal("taskSpawned" /* TaskSpawned */),
3513
+ z15.object({
3514
+ eventName: z15.literal("taskSpawned" /* TaskSpawned */),
3387
3515
  payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
3388
- taskId: z14.number().optional()
3516
+ taskId: z15.number().optional()
3389
3517
  }),
3390
- z14.object({
3391
- eventName: z14.literal("taskCompleted" /* TaskCompleted */),
3518
+ z15.object({
3519
+ eventName: z15.literal("taskCompleted" /* TaskCompleted */),
3392
3520
  payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
3393
- taskId: z14.number().optional()
3521
+ taskId: z15.number().optional()
3394
3522
  }),
3395
- z14.object({
3396
- eventName: z14.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
3523
+ z15.object({
3524
+ eventName: z15.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
3397
3525
  payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
3398
- taskId: z14.number().optional()
3526
+ taskId: z15.number().optional()
3399
3527
  }),
3400
- z14.object({
3401
- eventName: z14.literal("taskToolFailed" /* TaskToolFailed */),
3528
+ z15.object({
3529
+ eventName: z15.literal("taskToolFailed" /* TaskToolFailed */),
3402
3530
  payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
3403
- taskId: z14.number().optional()
3531
+ taskId: z15.number().optional()
3404
3532
  }),
3405
- z14.object({
3406
- eventName: z14.literal("evalPass" /* EvalPass */),
3407
- payload: z14.undefined(),
3408
- taskId: z14.number()
3533
+ z15.object({
3534
+ eventName: z15.literal("evalPass" /* EvalPass */),
3535
+ payload: z15.undefined(),
3536
+ taskId: z15.number()
3409
3537
  }),
3410
- z14.object({
3411
- eventName: z14.literal("evalFail" /* EvalFail */),
3412
- payload: z14.undefined(),
3413
- taskId: z14.number()
3538
+ z15.object({
3539
+ eventName: z15.literal("evalFail" /* EvalFail */),
3540
+ payload: z15.undefined(),
3541
+ taskId: z15.number()
3414
3542
  })
3415
3543
  ]);
3416
3544
  var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
@@ -3426,76 +3554,26 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
3426
3554
  IpcOrigin2["Server"] = "server";
3427
3555
  return IpcOrigin2;
3428
3556
  })(IpcOrigin || {});
3429
- var ipcMessageSchema = z14.discriminatedUnion("type", [
3430
- z14.object({
3431
- type: z14.literal("Ack" /* Ack */),
3432
- origin: z14.literal("server" /* Server */),
3557
+ var ipcMessageSchema = z15.discriminatedUnion("type", [
3558
+ z15.object({
3559
+ type: z15.literal("Ack" /* Ack */),
3560
+ origin: z15.literal("server" /* Server */),
3433
3561
  data: ackSchema
3434
3562
  }),
3435
- z14.object({
3436
- type: z14.literal("TaskCommand" /* TaskCommand */),
3437
- origin: z14.literal("client" /* Client */),
3438
- clientId: z14.string(),
3563
+ z15.object({
3564
+ type: z15.literal("TaskCommand" /* TaskCommand */),
3565
+ origin: z15.literal("client" /* Client */),
3566
+ clientId: z15.string(),
3439
3567
  data: taskCommandSchema
3440
3568
  }),
3441
- z14.object({
3442
- type: z14.literal("TaskEvent" /* TaskEvent */),
3443
- origin: z14.literal("server" /* Server */),
3444
- relayClientId: z14.string().optional(),
3569
+ z15.object({
3570
+ type: z15.literal("TaskEvent" /* TaskEvent */),
3571
+ origin: z15.literal("server" /* Server */),
3572
+ relayClientId: z15.string().optional(),
3445
3573
  data: taskEventSchema
3446
3574
  })
3447
3575
  ]);
3448
3576
 
3449
- // src/marketplace.ts
3450
- import { z as z15 } from "zod";
3451
- var mcpParameterSchema = z15.object({
3452
- name: z15.string().min(1),
3453
- key: z15.string().min(1),
3454
- placeholder: z15.string().optional(),
3455
- optional: z15.boolean().optional().default(false)
3456
- });
3457
- var mcpInstallationMethodSchema = z15.object({
3458
- name: z15.string().min(1),
3459
- content: z15.string().min(1),
3460
- parameters: z15.array(mcpParameterSchema).optional(),
3461
- prerequisites: z15.array(z15.string()).optional()
3462
- });
3463
- var marketplaceItemTypeSchema = z15.enum(["mode", "mcp"]);
3464
- var baseMarketplaceItemSchema = z15.object({
3465
- id: z15.string().min(1),
3466
- name: z15.string().min(1, "Name is required"),
3467
- description: z15.string(),
3468
- author: z15.string().optional(),
3469
- authorUrl: z15.string().url("Author URL must be a valid URL").optional(),
3470
- tags: z15.array(z15.string()).optional(),
3471
- prerequisites: z15.array(z15.string()).optional()
3472
- });
3473
- var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3474
- content: z15.string().min(1)
3475
- // YAML content for modes
3476
- });
3477
- var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
3478
- url: z15.string().url(),
3479
- // Required url field
3480
- content: z15.union([z15.string().min(1), z15.array(mcpInstallationMethodSchema)]),
3481
- // Single config or array of methods
3482
- parameters: z15.array(mcpParameterSchema).optional()
3483
- });
3484
- var marketplaceItemSchema = z15.discriminatedUnion("type", [
3485
- // Mode marketplace item
3486
- modeMarketplaceItemSchema.extend({
3487
- type: z15.literal("mode")
3488
- }),
3489
- // MCP marketplace item
3490
- mcpMarketplaceItemSchema.extend({
3491
- type: z15.literal("mcp")
3492
- })
3493
- ]);
3494
- var installMarketplaceItemOptionsSchema = z15.object({
3495
- target: z15.enum(["global", "project"]).optional().default("project"),
3496
- parameters: z15.record(z15.string(), z15.any()).optional()
3497
- });
3498
-
3499
3577
  // src/mcp.ts
3500
3578
  import { z as z16 } from "zod";
3501
3579
  var mcpExecutionStatusSchema = z16.discriminatedUnion("status", [
@@ -3571,6 +3649,7 @@ export {
3571
3649
  CODEBASE_INDEX_DEFAULTS,
3572
3650
  DEEP_SEEK_DEFAULT_TEMPERATURE,
3573
3651
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
3652
+ DEFAULT_MODES,
3574
3653
  DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
3575
3654
  DEFAULT_WRITE_DELAY_MS,
3576
3655
  EVALS_SETTINGS,
@@ -3578,6 +3657,14 @@ export {
3578
3657
  GLAMA_DEFAULT_TEMPERATURE,
3579
3658
  GLOBAL_SETTINGS_KEYS,
3580
3659
  GLOBAL_STATE_KEYS,
3660
+ HUGGINGFACE_API_URL,
3661
+ HUGGINGFACE_CACHE_DURATION,
3662
+ HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
3663
+ HUGGINGFACE_DEFAULT_MAX_TOKENS,
3664
+ HUGGINGFACE_MAX_TOKENS_FALLBACK,
3665
+ HUGGINGFACE_SLIDER_MIN,
3666
+ HUGGINGFACE_SLIDER_STEP,
3667
+ HUGGINGFACE_TEMPERATURE_MAX_VALUE,
3581
3668
  IpcMessageType,
3582
3669
  IpcOrigin,
3583
3670
  LITELLM_COMPUTER_USE_MODELS,