@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 +281 -185
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +495 -41
- package/dist/index.d.ts +495 -41
- package/dist/index.js +272 -185
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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 =
|
|
3195
|
-
allowAll:
|
|
3196
|
-
providers:
|
|
3197
|
-
|
|
3198
|
-
allowAll:
|
|
3199
|
-
models:
|
|
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
|
-
|
|
3218
|
-
maxOpenTabsContext:
|
|
3219
|
-
maxReadFileLine:
|
|
3220
|
-
maxWorkspaceFiles:
|
|
3221
|
-
terminalCommandDelay:
|
|
3222
|
-
terminalOutputLineLimit:
|
|
3223
|
-
terminalShellIntegrationTimeout:
|
|
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 =
|
|
3227
|
-
recordTaskMessages:
|
|
3228
|
-
enableTaskSharing:
|
|
3229
|
-
taskShareExpirationDays:
|
|
3230
|
-
allowMembersViewAllTasks:
|
|
3231
|
-
});
|
|
3232
|
-
var organizationSettingsSchema =
|
|
3233
|
-
version:
|
|
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 =
|
|
3254
|
-
success:
|
|
3255
|
-
shareUrl:
|
|
3256
|
-
error:
|
|
3257
|
-
isNewShare:
|
|
3258
|
-
manageUrl:
|
|
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
|
|
3263
|
-
var suggestionItemSchema =
|
|
3264
|
-
answer:
|
|
3265
|
-
mode:
|
|
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 =
|
|
3268
|
-
question:
|
|
3269
|
-
suggest:
|
|
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
|
|
3274
|
-
var isSubtaskSchema =
|
|
3275
|
-
isSubtask:
|
|
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 =
|
|
3295
|
-
["message" /* Message */]:
|
|
3296
|
-
|
|
3297
|
-
taskId:
|
|
3298
|
-
action:
|
|
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 */]:
|
|
3303
|
-
["taskStarted" /* TaskStarted */]:
|
|
3304
|
-
["taskModeSwitched" /* TaskModeSwitched */]:
|
|
3305
|
-
["taskPaused" /* TaskPaused */]:
|
|
3306
|
-
["taskUnpaused" /* TaskUnpaused */]:
|
|
3307
|
-
["taskAskResponded" /* TaskAskResponded */]:
|
|
3308
|
-
["taskAborted" /* TaskAborted */]:
|
|
3309
|
-
["taskSpawned" /* TaskSpawned */]:
|
|
3310
|
-
["taskCompleted" /* TaskCompleted */]:
|
|
3311
|
-
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]:
|
|
3312
|
-
["taskToolFailed" /* TaskToolFailed */]:
|
|
3313
|
-
});
|
|
3314
|
-
var ackSchema =
|
|
3315
|
-
clientId:
|
|
3316
|
-
pid:
|
|
3317
|
-
ppid:
|
|
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 =
|
|
3326
|
-
|
|
3327
|
-
commandName:
|
|
3328
|
-
data:
|
|
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:
|
|
3331
|
-
images:
|
|
3332
|
-
newTab:
|
|
3458
|
+
text: z15.string(),
|
|
3459
|
+
images: z15.array(z15.string()).optional(),
|
|
3460
|
+
newTab: z15.boolean().optional()
|
|
3333
3461
|
})
|
|
3334
3462
|
}),
|
|
3335
|
-
|
|
3336
|
-
commandName:
|
|
3337
|
-
data:
|
|
3463
|
+
z15.object({
|
|
3464
|
+
commandName: z15.literal("CancelTask" /* CancelTask */),
|
|
3465
|
+
data: z15.string()
|
|
3338
3466
|
}),
|
|
3339
|
-
|
|
3340
|
-
commandName:
|
|
3341
|
-
data:
|
|
3467
|
+
z15.object({
|
|
3468
|
+
commandName: z15.literal("CloseTask" /* CloseTask */),
|
|
3469
|
+
data: z15.string()
|
|
3342
3470
|
})
|
|
3343
3471
|
]);
|
|
3344
|
-
var taskEventSchema =
|
|
3345
|
-
|
|
3346
|
-
eventName:
|
|
3472
|
+
var taskEventSchema = z15.discriminatedUnion("eventName", [
|
|
3473
|
+
z15.object({
|
|
3474
|
+
eventName: z15.literal("message" /* Message */),
|
|
3347
3475
|
payload: rooCodeEventsSchema.shape["message" /* Message */],
|
|
3348
|
-
taskId:
|
|
3476
|
+
taskId: z15.number().optional()
|
|
3349
3477
|
}),
|
|
3350
|
-
|
|
3351
|
-
eventName:
|
|
3478
|
+
z15.object({
|
|
3479
|
+
eventName: z15.literal("taskCreated" /* TaskCreated */),
|
|
3352
3480
|
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
|
|
3353
|
-
taskId:
|
|
3481
|
+
taskId: z15.number().optional()
|
|
3354
3482
|
}),
|
|
3355
|
-
|
|
3356
|
-
eventName:
|
|
3483
|
+
z15.object({
|
|
3484
|
+
eventName: z15.literal("taskStarted" /* TaskStarted */),
|
|
3357
3485
|
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
|
|
3358
|
-
taskId:
|
|
3486
|
+
taskId: z15.number().optional()
|
|
3359
3487
|
}),
|
|
3360
|
-
|
|
3361
|
-
eventName:
|
|
3488
|
+
z15.object({
|
|
3489
|
+
eventName: z15.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
3362
3490
|
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
|
|
3363
|
-
taskId:
|
|
3491
|
+
taskId: z15.number().optional()
|
|
3364
3492
|
}),
|
|
3365
|
-
|
|
3366
|
-
eventName:
|
|
3493
|
+
z15.object({
|
|
3494
|
+
eventName: z15.literal("taskPaused" /* TaskPaused */),
|
|
3367
3495
|
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
|
|
3368
|
-
taskId:
|
|
3496
|
+
taskId: z15.number().optional()
|
|
3369
3497
|
}),
|
|
3370
|
-
|
|
3371
|
-
eventName:
|
|
3498
|
+
z15.object({
|
|
3499
|
+
eventName: z15.literal("taskUnpaused" /* TaskUnpaused */),
|
|
3372
3500
|
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
|
|
3373
|
-
taskId:
|
|
3501
|
+
taskId: z15.number().optional()
|
|
3374
3502
|
}),
|
|
3375
|
-
|
|
3376
|
-
eventName:
|
|
3503
|
+
z15.object({
|
|
3504
|
+
eventName: z15.literal("taskAskResponded" /* TaskAskResponded */),
|
|
3377
3505
|
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
|
|
3378
|
-
taskId:
|
|
3506
|
+
taskId: z15.number().optional()
|
|
3379
3507
|
}),
|
|
3380
|
-
|
|
3381
|
-
eventName:
|
|
3508
|
+
z15.object({
|
|
3509
|
+
eventName: z15.literal("taskAborted" /* TaskAborted */),
|
|
3382
3510
|
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
|
|
3383
|
-
taskId:
|
|
3511
|
+
taskId: z15.number().optional()
|
|
3384
3512
|
}),
|
|
3385
|
-
|
|
3386
|
-
eventName:
|
|
3513
|
+
z15.object({
|
|
3514
|
+
eventName: z15.literal("taskSpawned" /* TaskSpawned */),
|
|
3387
3515
|
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
|
|
3388
|
-
taskId:
|
|
3516
|
+
taskId: z15.number().optional()
|
|
3389
3517
|
}),
|
|
3390
|
-
|
|
3391
|
-
eventName:
|
|
3518
|
+
z15.object({
|
|
3519
|
+
eventName: z15.literal("taskCompleted" /* TaskCompleted */),
|
|
3392
3520
|
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
|
|
3393
|
-
taskId:
|
|
3521
|
+
taskId: z15.number().optional()
|
|
3394
3522
|
}),
|
|
3395
|
-
|
|
3396
|
-
eventName:
|
|
3523
|
+
z15.object({
|
|
3524
|
+
eventName: z15.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
3397
3525
|
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
|
|
3398
|
-
taskId:
|
|
3526
|
+
taskId: z15.number().optional()
|
|
3399
3527
|
}),
|
|
3400
|
-
|
|
3401
|
-
eventName:
|
|
3528
|
+
z15.object({
|
|
3529
|
+
eventName: z15.literal("taskToolFailed" /* TaskToolFailed */),
|
|
3402
3530
|
payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
|
|
3403
|
-
taskId:
|
|
3531
|
+
taskId: z15.number().optional()
|
|
3404
3532
|
}),
|
|
3405
|
-
|
|
3406
|
-
eventName:
|
|
3407
|
-
payload:
|
|
3408
|
-
taskId:
|
|
3533
|
+
z15.object({
|
|
3534
|
+
eventName: z15.literal("evalPass" /* EvalPass */),
|
|
3535
|
+
payload: z15.undefined(),
|
|
3536
|
+
taskId: z15.number()
|
|
3409
3537
|
}),
|
|
3410
|
-
|
|
3411
|
-
eventName:
|
|
3412
|
-
payload:
|
|
3413
|
-
taskId:
|
|
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 =
|
|
3430
|
-
|
|
3431
|
-
type:
|
|
3432
|
-
origin:
|
|
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
|
-
|
|
3436
|
-
type:
|
|
3437
|
-
origin:
|
|
3438
|
-
clientId:
|
|
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
|
-
|
|
3442
|
-
type:
|
|
3443
|
-
origin:
|
|
3444
|
-
relayClientId:
|
|
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,
|