@roo-code/types 1.5.0 → 1.6.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.d.mts +1100 -0
- package/dist/index.d.ts +1100 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +6 -7
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1100 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { Socket } from 'node:net';
|
|
3
|
+
|
|
4
|
+
type GlobalSettings = {
|
|
5
|
+
currentApiConfigName?: string | undefined;
|
|
6
|
+
listApiConfigMeta?: {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
10
|
+
}[] | undefined;
|
|
11
|
+
pinnedApiConfigs?: {
|
|
12
|
+
[x: string]: boolean;
|
|
13
|
+
} | undefined;
|
|
14
|
+
lastShownAnnouncementId?: string | undefined;
|
|
15
|
+
customInstructions?: string | undefined;
|
|
16
|
+
taskHistory?: {
|
|
17
|
+
id: string;
|
|
18
|
+
number: number;
|
|
19
|
+
ts: number;
|
|
20
|
+
task: string;
|
|
21
|
+
tokensIn: number;
|
|
22
|
+
tokensOut: number;
|
|
23
|
+
cacheWrites?: number | undefined;
|
|
24
|
+
cacheReads?: number | undefined;
|
|
25
|
+
totalCost: number;
|
|
26
|
+
size?: number | undefined;
|
|
27
|
+
workspace?: string | undefined;
|
|
28
|
+
}[] | undefined;
|
|
29
|
+
autoApprovalEnabled?: boolean | undefined;
|
|
30
|
+
alwaysAllowReadOnly?: boolean | undefined;
|
|
31
|
+
alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined;
|
|
32
|
+
alwaysAllowWrite?: boolean | undefined;
|
|
33
|
+
alwaysAllowWriteOutsideWorkspace?: boolean | undefined;
|
|
34
|
+
writeDelayMs?: number | undefined;
|
|
35
|
+
alwaysAllowBrowser?: boolean | undefined;
|
|
36
|
+
alwaysApproveResubmit?: boolean | undefined;
|
|
37
|
+
requestDelaySeconds?: number | undefined;
|
|
38
|
+
alwaysAllowMcp?: boolean | undefined;
|
|
39
|
+
alwaysAllowModeSwitch?: boolean | undefined;
|
|
40
|
+
alwaysAllowSubtasks?: boolean | undefined;
|
|
41
|
+
alwaysAllowExecute?: boolean | undefined;
|
|
42
|
+
allowedCommands?: string[] | undefined;
|
|
43
|
+
browserToolEnabled?: boolean | undefined;
|
|
44
|
+
browserViewportSize?: string | undefined;
|
|
45
|
+
screenshotQuality?: number | undefined;
|
|
46
|
+
remoteBrowserEnabled?: boolean | undefined;
|
|
47
|
+
remoteBrowserHost?: string | undefined;
|
|
48
|
+
cachedChromeHostUrl?: string | undefined;
|
|
49
|
+
enableCheckpoints?: boolean | undefined;
|
|
50
|
+
ttsEnabled?: boolean | undefined;
|
|
51
|
+
ttsSpeed?: number | undefined;
|
|
52
|
+
soundEnabled?: boolean | undefined;
|
|
53
|
+
soundVolume?: number | undefined;
|
|
54
|
+
maxOpenTabsContext?: number | undefined;
|
|
55
|
+
maxWorkspaceFiles?: number | undefined;
|
|
56
|
+
showRooIgnoredFiles?: boolean | undefined;
|
|
57
|
+
maxReadFileLine?: number | undefined;
|
|
58
|
+
terminalOutputLineLimit?: number | undefined;
|
|
59
|
+
terminalShellIntegrationTimeout?: number | undefined;
|
|
60
|
+
terminalShellIntegrationDisabled?: boolean | undefined;
|
|
61
|
+
terminalCommandDelay?: number | undefined;
|
|
62
|
+
terminalPowershellCounter?: boolean | undefined;
|
|
63
|
+
terminalZshClearEolMark?: boolean | undefined;
|
|
64
|
+
terminalZshOhMy?: boolean | undefined;
|
|
65
|
+
terminalZshP10k?: boolean | undefined;
|
|
66
|
+
terminalZdotdir?: boolean | undefined;
|
|
67
|
+
terminalCompressProgressBar?: boolean | undefined;
|
|
68
|
+
rateLimitSeconds?: number | undefined;
|
|
69
|
+
diffEnabled?: boolean | undefined;
|
|
70
|
+
fuzzyMatchThreshold?: number | undefined;
|
|
71
|
+
experiments?: {
|
|
72
|
+
powerSteering: boolean;
|
|
73
|
+
} | undefined;
|
|
74
|
+
language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
|
|
75
|
+
telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined;
|
|
76
|
+
mcpEnabled?: boolean | undefined;
|
|
77
|
+
enableMcpServerCreation?: boolean | undefined;
|
|
78
|
+
mode?: string | undefined;
|
|
79
|
+
modeApiConfigs?: {
|
|
80
|
+
[x: string]: string;
|
|
81
|
+
} | undefined;
|
|
82
|
+
customModes?: {
|
|
83
|
+
slug: string;
|
|
84
|
+
name: string;
|
|
85
|
+
roleDefinition: string;
|
|
86
|
+
customInstructions?: string | undefined;
|
|
87
|
+
groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
|
|
88
|
+
"read" | "edit" | "browser" | "command" | "mcp" | "modes",
|
|
89
|
+
{
|
|
90
|
+
fileRegex?: string | undefined;
|
|
91
|
+
description?: string | undefined;
|
|
92
|
+
}
|
|
93
|
+
])[];
|
|
94
|
+
source?: ("global" | "project") | undefined;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
customModePrompts?: {
|
|
97
|
+
[x: string]: {
|
|
98
|
+
roleDefinition?: string | undefined;
|
|
99
|
+
customInstructions?: string | undefined;
|
|
100
|
+
} | undefined;
|
|
101
|
+
} | undefined;
|
|
102
|
+
customSupportPrompts?: {
|
|
103
|
+
[x: string]: string | undefined;
|
|
104
|
+
} | undefined;
|
|
105
|
+
enhancementApiConfigId?: string | undefined;
|
|
106
|
+
historyPreviewCollapsed?: boolean | undefined;
|
|
107
|
+
};
|
|
108
|
+
type ProviderSettings = {
|
|
109
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
110
|
+
includeMaxTokens?: boolean | undefined;
|
|
111
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
112
|
+
diffEnabled?: boolean | undefined;
|
|
113
|
+
fuzzyMatchThreshold?: number | undefined;
|
|
114
|
+
modelTemperature?: (number | null) | undefined;
|
|
115
|
+
rateLimitSeconds?: number | undefined;
|
|
116
|
+
modelMaxTokens?: number | undefined;
|
|
117
|
+
modelMaxThinkingTokens?: number | undefined;
|
|
118
|
+
apiModelId?: string | undefined;
|
|
119
|
+
apiKey?: string | undefined;
|
|
120
|
+
anthropicBaseUrl?: string | undefined;
|
|
121
|
+
anthropicUseAuthToken?: boolean | undefined;
|
|
122
|
+
glamaModelId?: string | undefined;
|
|
123
|
+
glamaApiKey?: string | undefined;
|
|
124
|
+
openRouterApiKey?: string | undefined;
|
|
125
|
+
openRouterModelId?: string | undefined;
|
|
126
|
+
openRouterBaseUrl?: string | undefined;
|
|
127
|
+
openRouterSpecificProvider?: string | undefined;
|
|
128
|
+
openRouterUseMiddleOutTransform?: boolean | undefined;
|
|
129
|
+
awsAccessKey?: string | undefined;
|
|
130
|
+
awsSecretKey?: string | undefined;
|
|
131
|
+
awsSessionToken?: string | undefined;
|
|
132
|
+
awsRegion?: string | undefined;
|
|
133
|
+
awsUseCrossRegionInference?: boolean | undefined;
|
|
134
|
+
awsUsePromptCache?: boolean | undefined;
|
|
135
|
+
awsProfile?: string | undefined;
|
|
136
|
+
awsUseProfile?: boolean | undefined;
|
|
137
|
+
awsCustomArn?: string | undefined;
|
|
138
|
+
vertexKeyFile?: string | undefined;
|
|
139
|
+
vertexJsonCredentials?: string | undefined;
|
|
140
|
+
vertexProjectId?: string | undefined;
|
|
141
|
+
vertexRegion?: string | undefined;
|
|
142
|
+
openAiBaseUrl?: string | undefined;
|
|
143
|
+
openAiApiKey?: string | undefined;
|
|
144
|
+
openAiLegacyFormat?: boolean | undefined;
|
|
145
|
+
openAiR1FormatEnabled?: boolean | undefined;
|
|
146
|
+
openAiModelId?: string | undefined;
|
|
147
|
+
openAiCustomModelInfo?: ({
|
|
148
|
+
maxTokens?: (number | null) | undefined;
|
|
149
|
+
maxThinkingTokens?: (number | null) | undefined;
|
|
150
|
+
contextWindow: number;
|
|
151
|
+
supportsImages?: boolean | undefined;
|
|
152
|
+
supportsComputerUse?: boolean | undefined;
|
|
153
|
+
supportsPromptCache: boolean;
|
|
154
|
+
inputPrice?: number | undefined;
|
|
155
|
+
outputPrice?: number | undefined;
|
|
156
|
+
cacheWritesPrice?: number | undefined;
|
|
157
|
+
cacheReadsPrice?: number | undefined;
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
160
|
+
thinking?: boolean | undefined;
|
|
161
|
+
minTokensPerCachePoint?: number | undefined;
|
|
162
|
+
maxCachePoints?: number | undefined;
|
|
163
|
+
cachableFields?: string[] | undefined;
|
|
164
|
+
tiers?: {
|
|
165
|
+
contextWindow: number;
|
|
166
|
+
inputPrice?: number | undefined;
|
|
167
|
+
outputPrice?: number | undefined;
|
|
168
|
+
cacheWritesPrice?: number | undefined;
|
|
169
|
+
cacheReadsPrice?: number | undefined;
|
|
170
|
+
}[] | undefined;
|
|
171
|
+
} | null) | undefined;
|
|
172
|
+
openAiUseAzure?: boolean | undefined;
|
|
173
|
+
azureApiVersion?: string | undefined;
|
|
174
|
+
openAiStreamingEnabled?: boolean | undefined;
|
|
175
|
+
enableReasoningEffort?: boolean | undefined;
|
|
176
|
+
openAiHostHeader?: string | undefined;
|
|
177
|
+
openAiHeaders?: {
|
|
178
|
+
[x: string]: string;
|
|
179
|
+
} | undefined;
|
|
180
|
+
ollamaModelId?: string | undefined;
|
|
181
|
+
ollamaBaseUrl?: string | undefined;
|
|
182
|
+
vsCodeLmModelSelector?: {
|
|
183
|
+
vendor?: string | undefined;
|
|
184
|
+
family?: string | undefined;
|
|
185
|
+
version?: string | undefined;
|
|
186
|
+
id?: string | undefined;
|
|
187
|
+
} | undefined;
|
|
188
|
+
lmStudioModelId?: string | undefined;
|
|
189
|
+
lmStudioBaseUrl?: string | undefined;
|
|
190
|
+
lmStudioDraftModelId?: string | undefined;
|
|
191
|
+
lmStudioSpeculativeDecodingEnabled?: boolean | undefined;
|
|
192
|
+
geminiApiKey?: string | undefined;
|
|
193
|
+
googleGeminiBaseUrl?: string | undefined;
|
|
194
|
+
openAiNativeApiKey?: string | undefined;
|
|
195
|
+
openAiNativeBaseUrl?: string | undefined;
|
|
196
|
+
mistralApiKey?: string | undefined;
|
|
197
|
+
mistralCodestralUrl?: string | undefined;
|
|
198
|
+
deepSeekBaseUrl?: string | undefined;
|
|
199
|
+
deepSeekApiKey?: string | undefined;
|
|
200
|
+
unboundApiKey?: string | undefined;
|
|
201
|
+
unboundModelId?: string | undefined;
|
|
202
|
+
requestyApiKey?: string | undefined;
|
|
203
|
+
requestyModelId?: string | undefined;
|
|
204
|
+
fakeAi?: unknown | undefined;
|
|
205
|
+
xaiApiKey?: string | undefined;
|
|
206
|
+
groqApiKey?: string | undefined;
|
|
207
|
+
chutesApiKey?: string | undefined;
|
|
208
|
+
litellmBaseUrl?: string | undefined;
|
|
209
|
+
litellmApiKey?: string | undefined;
|
|
210
|
+
litellmModelId?: string | undefined;
|
|
211
|
+
};
|
|
212
|
+
type ProviderSettingsEntry = {
|
|
213
|
+
id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
216
|
+
};
|
|
217
|
+
type ClineMessage = {
|
|
218
|
+
ts: number;
|
|
219
|
+
type: "ask" | "say";
|
|
220
|
+
ask?: ("followup" | "command" | "command_output" | "completion_result" | "tool" | "api_req_failed" | "resume_task" | "resume_completed_task" | "mistake_limit_reached" | "browser_action_launch" | "use_mcp_server") | undefined;
|
|
221
|
+
say?: ("error" | "api_req_started" | "api_req_finished" | "api_req_retried" | "api_req_retry_delayed" | "api_req_deleted" | "text" | "reasoning" | "completion_result" | "user_feedback" | "user_feedback_diff" | "command_output" | "shell_integration_warning" | "browser_action" | "browser_action_result" | "mcp_server_request_started" | "mcp_server_response" | "subtask_result" | "checkpoint_saved" | "rooignore_error" | "diff_error") | undefined;
|
|
222
|
+
text?: string | undefined;
|
|
223
|
+
images?: string[] | undefined;
|
|
224
|
+
partial?: boolean | undefined;
|
|
225
|
+
reasoning?: string | undefined;
|
|
226
|
+
conversationHistoryIndex?: number | undefined;
|
|
227
|
+
checkpoint?: {
|
|
228
|
+
[x: string]: unknown;
|
|
229
|
+
} | undefined;
|
|
230
|
+
progressStatus?: {
|
|
231
|
+
icon?: string | undefined;
|
|
232
|
+
text?: string | undefined;
|
|
233
|
+
} | undefined;
|
|
234
|
+
};
|
|
235
|
+
type TokenUsage = {
|
|
236
|
+
totalTokensIn: number;
|
|
237
|
+
totalTokensOut: number;
|
|
238
|
+
totalCacheWrites?: number | undefined;
|
|
239
|
+
totalCacheReads?: number | undefined;
|
|
240
|
+
totalCost: number;
|
|
241
|
+
contextTokens: number;
|
|
242
|
+
};
|
|
243
|
+
type RooCodeEvents = {
|
|
244
|
+
message: [
|
|
245
|
+
{
|
|
246
|
+
taskId: string;
|
|
247
|
+
action: "created" | "updated";
|
|
248
|
+
message: {
|
|
249
|
+
ts: number;
|
|
250
|
+
type: "ask" | "say";
|
|
251
|
+
ask?: ("followup" | "command" | "command_output" | "completion_result" | "tool" | "api_req_failed" | "resume_task" | "resume_completed_task" | "mistake_limit_reached" | "browser_action_launch" | "use_mcp_server") | undefined;
|
|
252
|
+
say?: ("error" | "api_req_started" | "api_req_finished" | "api_req_retried" | "api_req_retry_delayed" | "api_req_deleted" | "text" | "reasoning" | "completion_result" | "user_feedback" | "user_feedback_diff" | "command_output" | "shell_integration_warning" | "browser_action" | "browser_action_result" | "mcp_server_request_started" | "mcp_server_response" | "subtask_result" | "checkpoint_saved" | "rooignore_error" | "diff_error") | undefined;
|
|
253
|
+
text?: string | undefined;
|
|
254
|
+
images?: string[] | undefined;
|
|
255
|
+
partial?: boolean | undefined;
|
|
256
|
+
reasoning?: string | undefined;
|
|
257
|
+
conversationHistoryIndex?: number | undefined;
|
|
258
|
+
checkpoint?: {
|
|
259
|
+
[x: string]: unknown;
|
|
260
|
+
} | undefined;
|
|
261
|
+
progressStatus?: {
|
|
262
|
+
icon?: string | undefined;
|
|
263
|
+
text?: string | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
];
|
|
268
|
+
taskCreated: [string];
|
|
269
|
+
taskStarted: [string];
|
|
270
|
+
taskModeSwitched: [string, string];
|
|
271
|
+
taskPaused: [string];
|
|
272
|
+
taskUnpaused: [string];
|
|
273
|
+
taskAskResponded: [string];
|
|
274
|
+
taskAborted: [string];
|
|
275
|
+
taskSpawned: [string, string];
|
|
276
|
+
taskCompleted: [
|
|
277
|
+
string,
|
|
278
|
+
{
|
|
279
|
+
totalTokensIn: number;
|
|
280
|
+
totalTokensOut: number;
|
|
281
|
+
totalCacheWrites?: number | undefined;
|
|
282
|
+
totalCacheReads?: number | undefined;
|
|
283
|
+
totalCost: number;
|
|
284
|
+
contextTokens: number;
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
[x: string]: {
|
|
288
|
+
attempts: number;
|
|
289
|
+
failures: number;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
];
|
|
293
|
+
taskTokenUsageUpdated: [
|
|
294
|
+
string,
|
|
295
|
+
{
|
|
296
|
+
totalTokensIn: number;
|
|
297
|
+
totalTokensOut: number;
|
|
298
|
+
totalCacheWrites?: number | undefined;
|
|
299
|
+
totalCacheReads?: number | undefined;
|
|
300
|
+
totalCost: number;
|
|
301
|
+
contextTokens: number;
|
|
302
|
+
}
|
|
303
|
+
];
|
|
304
|
+
taskToolFailed: [
|
|
305
|
+
string,
|
|
306
|
+
("execute_command" | "read_file" | "write_to_file" | "apply_diff" | "insert_content" | "search_and_replace" | "search_files" | "list_files" | "list_code_definition_names" | "browser_action" | "use_mcp_tool" | "access_mcp_resource" | "ask_followup_question" | "attempt_completion" | "switch_mode" | "new_task" | "fetch_instructions"),
|
|
307
|
+
string
|
|
308
|
+
];
|
|
309
|
+
};
|
|
310
|
+
type IpcMessage = {
|
|
311
|
+
type: "Ack";
|
|
312
|
+
origin: "server";
|
|
313
|
+
data: {
|
|
314
|
+
clientId: string;
|
|
315
|
+
pid: number;
|
|
316
|
+
ppid: number;
|
|
317
|
+
};
|
|
318
|
+
} | {
|
|
319
|
+
type: "TaskCommand";
|
|
320
|
+
origin: "client";
|
|
321
|
+
clientId: string;
|
|
322
|
+
data: {
|
|
323
|
+
commandName: "StartNewTask";
|
|
324
|
+
data: {
|
|
325
|
+
configuration: {
|
|
326
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
327
|
+
includeMaxTokens?: boolean | undefined;
|
|
328
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
329
|
+
diffEnabled?: boolean | undefined;
|
|
330
|
+
fuzzyMatchThreshold?: number | undefined;
|
|
331
|
+
modelTemperature?: (number | null) | undefined;
|
|
332
|
+
rateLimitSeconds?: number | undefined;
|
|
333
|
+
modelMaxTokens?: number | undefined;
|
|
334
|
+
modelMaxThinkingTokens?: number | undefined;
|
|
335
|
+
apiModelId?: string | undefined;
|
|
336
|
+
apiKey?: string | undefined;
|
|
337
|
+
anthropicBaseUrl?: string | undefined;
|
|
338
|
+
anthropicUseAuthToken?: boolean | undefined;
|
|
339
|
+
glamaModelId?: string | undefined;
|
|
340
|
+
glamaApiKey?: string | undefined;
|
|
341
|
+
openRouterApiKey?: string | undefined;
|
|
342
|
+
openRouterModelId?: string | undefined;
|
|
343
|
+
openRouterBaseUrl?: string | undefined;
|
|
344
|
+
openRouterSpecificProvider?: string | undefined;
|
|
345
|
+
openRouterUseMiddleOutTransform?: boolean | undefined;
|
|
346
|
+
awsAccessKey?: string | undefined;
|
|
347
|
+
awsSecretKey?: string | undefined;
|
|
348
|
+
awsSessionToken?: string | undefined;
|
|
349
|
+
awsRegion?: string | undefined;
|
|
350
|
+
awsUseCrossRegionInference?: boolean | undefined;
|
|
351
|
+
awsUsePromptCache?: boolean | undefined;
|
|
352
|
+
awsProfile?: string | undefined;
|
|
353
|
+
awsUseProfile?: boolean | undefined;
|
|
354
|
+
awsCustomArn?: string | undefined;
|
|
355
|
+
vertexKeyFile?: string | undefined;
|
|
356
|
+
vertexJsonCredentials?: string | undefined;
|
|
357
|
+
vertexProjectId?: string | undefined;
|
|
358
|
+
vertexRegion?: string | undefined;
|
|
359
|
+
openAiBaseUrl?: string | undefined;
|
|
360
|
+
openAiApiKey?: string | undefined;
|
|
361
|
+
openAiLegacyFormat?: boolean | undefined;
|
|
362
|
+
openAiR1FormatEnabled?: boolean | undefined;
|
|
363
|
+
openAiModelId?: string | undefined;
|
|
364
|
+
openAiCustomModelInfo?: ({
|
|
365
|
+
maxTokens?: (number | null) | undefined;
|
|
366
|
+
maxThinkingTokens?: (number | null) | undefined;
|
|
367
|
+
contextWindow: number;
|
|
368
|
+
supportsImages?: boolean | undefined;
|
|
369
|
+
supportsComputerUse?: boolean | undefined;
|
|
370
|
+
supportsPromptCache: boolean;
|
|
371
|
+
inputPrice?: number | undefined;
|
|
372
|
+
outputPrice?: number | undefined;
|
|
373
|
+
cacheWritesPrice?: number | undefined;
|
|
374
|
+
cacheReadsPrice?: number | undefined;
|
|
375
|
+
description?: string | undefined;
|
|
376
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
377
|
+
thinking?: boolean | undefined;
|
|
378
|
+
minTokensPerCachePoint?: number | undefined;
|
|
379
|
+
maxCachePoints?: number | undefined;
|
|
380
|
+
cachableFields?: string[] | undefined;
|
|
381
|
+
tiers?: {
|
|
382
|
+
contextWindow: number;
|
|
383
|
+
inputPrice?: number | undefined;
|
|
384
|
+
outputPrice?: number | undefined;
|
|
385
|
+
cacheWritesPrice?: number | undefined;
|
|
386
|
+
cacheReadsPrice?: number | undefined;
|
|
387
|
+
}[] | undefined;
|
|
388
|
+
} | null) | undefined;
|
|
389
|
+
openAiUseAzure?: boolean | undefined;
|
|
390
|
+
azureApiVersion?: string | undefined;
|
|
391
|
+
openAiStreamingEnabled?: boolean | undefined;
|
|
392
|
+
enableReasoningEffort?: boolean | undefined;
|
|
393
|
+
openAiHostHeader?: string | undefined;
|
|
394
|
+
openAiHeaders?: {
|
|
395
|
+
[x: string]: string;
|
|
396
|
+
} | undefined;
|
|
397
|
+
ollamaModelId?: string | undefined;
|
|
398
|
+
ollamaBaseUrl?: string | undefined;
|
|
399
|
+
vsCodeLmModelSelector?: {
|
|
400
|
+
vendor?: string | undefined;
|
|
401
|
+
family?: string | undefined;
|
|
402
|
+
version?: string | undefined;
|
|
403
|
+
id?: string | undefined;
|
|
404
|
+
} | undefined;
|
|
405
|
+
lmStudioModelId?: string | undefined;
|
|
406
|
+
lmStudioBaseUrl?: string | undefined;
|
|
407
|
+
lmStudioDraftModelId?: string | undefined;
|
|
408
|
+
lmStudioSpeculativeDecodingEnabled?: boolean | undefined;
|
|
409
|
+
geminiApiKey?: string | undefined;
|
|
410
|
+
googleGeminiBaseUrl?: string | undefined;
|
|
411
|
+
openAiNativeApiKey?: string | undefined;
|
|
412
|
+
openAiNativeBaseUrl?: string | undefined;
|
|
413
|
+
mistralApiKey?: string | undefined;
|
|
414
|
+
mistralCodestralUrl?: string | undefined;
|
|
415
|
+
deepSeekBaseUrl?: string | undefined;
|
|
416
|
+
deepSeekApiKey?: string | undefined;
|
|
417
|
+
unboundApiKey?: string | undefined;
|
|
418
|
+
unboundModelId?: string | undefined;
|
|
419
|
+
requestyApiKey?: string | undefined;
|
|
420
|
+
requestyModelId?: string | undefined;
|
|
421
|
+
fakeAi?: unknown | undefined;
|
|
422
|
+
xaiApiKey?: string | undefined;
|
|
423
|
+
groqApiKey?: string | undefined;
|
|
424
|
+
chutesApiKey?: string | undefined;
|
|
425
|
+
litellmBaseUrl?: string | undefined;
|
|
426
|
+
litellmApiKey?: string | undefined;
|
|
427
|
+
litellmModelId?: string | undefined;
|
|
428
|
+
currentApiConfigName?: string | undefined;
|
|
429
|
+
listApiConfigMeta?: {
|
|
430
|
+
id: string;
|
|
431
|
+
name: string;
|
|
432
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
433
|
+
}[] | undefined;
|
|
434
|
+
pinnedApiConfigs?: {
|
|
435
|
+
[x: string]: boolean;
|
|
436
|
+
} | undefined;
|
|
437
|
+
lastShownAnnouncementId?: string | undefined;
|
|
438
|
+
customInstructions?: string | undefined;
|
|
439
|
+
taskHistory?: {
|
|
440
|
+
id: string;
|
|
441
|
+
number: number;
|
|
442
|
+
ts: number;
|
|
443
|
+
task: string;
|
|
444
|
+
tokensIn: number;
|
|
445
|
+
tokensOut: number;
|
|
446
|
+
cacheWrites?: number | undefined;
|
|
447
|
+
cacheReads?: number | undefined;
|
|
448
|
+
totalCost: number;
|
|
449
|
+
size?: number | undefined;
|
|
450
|
+
workspace?: string | undefined;
|
|
451
|
+
}[] | undefined;
|
|
452
|
+
autoApprovalEnabled?: boolean | undefined;
|
|
453
|
+
alwaysAllowReadOnly?: boolean | undefined;
|
|
454
|
+
alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined;
|
|
455
|
+
alwaysAllowWrite?: boolean | undefined;
|
|
456
|
+
alwaysAllowWriteOutsideWorkspace?: boolean | undefined;
|
|
457
|
+
writeDelayMs?: number | undefined;
|
|
458
|
+
alwaysAllowBrowser?: boolean | undefined;
|
|
459
|
+
alwaysApproveResubmit?: boolean | undefined;
|
|
460
|
+
requestDelaySeconds?: number | undefined;
|
|
461
|
+
alwaysAllowMcp?: boolean | undefined;
|
|
462
|
+
alwaysAllowModeSwitch?: boolean | undefined;
|
|
463
|
+
alwaysAllowSubtasks?: boolean | undefined;
|
|
464
|
+
alwaysAllowExecute?: boolean | undefined;
|
|
465
|
+
allowedCommands?: string[] | undefined;
|
|
466
|
+
browserToolEnabled?: boolean | undefined;
|
|
467
|
+
browserViewportSize?: string | undefined;
|
|
468
|
+
screenshotQuality?: number | undefined;
|
|
469
|
+
remoteBrowserEnabled?: boolean | undefined;
|
|
470
|
+
remoteBrowserHost?: string | undefined;
|
|
471
|
+
cachedChromeHostUrl?: string | undefined;
|
|
472
|
+
enableCheckpoints?: boolean | undefined;
|
|
473
|
+
ttsEnabled?: boolean | undefined;
|
|
474
|
+
ttsSpeed?: number | undefined;
|
|
475
|
+
soundEnabled?: boolean | undefined;
|
|
476
|
+
soundVolume?: number | undefined;
|
|
477
|
+
maxOpenTabsContext?: number | undefined;
|
|
478
|
+
maxWorkspaceFiles?: number | undefined;
|
|
479
|
+
showRooIgnoredFiles?: boolean | undefined;
|
|
480
|
+
maxReadFileLine?: number | undefined;
|
|
481
|
+
terminalOutputLineLimit?: number | undefined;
|
|
482
|
+
terminalShellIntegrationTimeout?: number | undefined;
|
|
483
|
+
terminalShellIntegrationDisabled?: boolean | undefined;
|
|
484
|
+
terminalCommandDelay?: number | undefined;
|
|
485
|
+
terminalPowershellCounter?: boolean | undefined;
|
|
486
|
+
terminalZshClearEolMark?: boolean | undefined;
|
|
487
|
+
terminalZshOhMy?: boolean | undefined;
|
|
488
|
+
terminalZshP10k?: boolean | undefined;
|
|
489
|
+
terminalZdotdir?: boolean | undefined;
|
|
490
|
+
terminalCompressProgressBar?: boolean | undefined;
|
|
491
|
+
experiments?: {
|
|
492
|
+
powerSteering: boolean;
|
|
493
|
+
} | undefined;
|
|
494
|
+
language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
|
|
495
|
+
telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined;
|
|
496
|
+
mcpEnabled?: boolean | undefined;
|
|
497
|
+
enableMcpServerCreation?: boolean | undefined;
|
|
498
|
+
mode?: string | undefined;
|
|
499
|
+
modeApiConfigs?: {
|
|
500
|
+
[x: string]: string;
|
|
501
|
+
} | undefined;
|
|
502
|
+
customModes?: {
|
|
503
|
+
slug: string;
|
|
504
|
+
name: string;
|
|
505
|
+
roleDefinition: string;
|
|
506
|
+
customInstructions?: string | undefined;
|
|
507
|
+
groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
|
|
508
|
+
"read" | "edit" | "browser" | "command" | "mcp" | "modes",
|
|
509
|
+
{
|
|
510
|
+
fileRegex?: string | undefined;
|
|
511
|
+
description?: string | undefined;
|
|
512
|
+
}
|
|
513
|
+
])[];
|
|
514
|
+
source?: ("global" | "project") | undefined;
|
|
515
|
+
}[] | undefined;
|
|
516
|
+
customModePrompts?: {
|
|
517
|
+
[x: string]: {
|
|
518
|
+
roleDefinition?: string | undefined;
|
|
519
|
+
customInstructions?: string | undefined;
|
|
520
|
+
} | undefined;
|
|
521
|
+
} | undefined;
|
|
522
|
+
customSupportPrompts?: {
|
|
523
|
+
[x: string]: string | undefined;
|
|
524
|
+
} | undefined;
|
|
525
|
+
enhancementApiConfigId?: string | undefined;
|
|
526
|
+
historyPreviewCollapsed?: boolean | undefined;
|
|
527
|
+
};
|
|
528
|
+
text: string;
|
|
529
|
+
images?: string[] | undefined;
|
|
530
|
+
newTab?: boolean | undefined;
|
|
531
|
+
};
|
|
532
|
+
} | {
|
|
533
|
+
commandName: "CancelTask";
|
|
534
|
+
data: string;
|
|
535
|
+
} | {
|
|
536
|
+
commandName: "CloseTask";
|
|
537
|
+
data: string;
|
|
538
|
+
};
|
|
539
|
+
} | {
|
|
540
|
+
type: "TaskEvent";
|
|
541
|
+
origin: "server";
|
|
542
|
+
relayClientId?: string | undefined;
|
|
543
|
+
data: {
|
|
544
|
+
eventName: "message";
|
|
545
|
+
payload: [
|
|
546
|
+
{
|
|
547
|
+
taskId: string;
|
|
548
|
+
action: "created" | "updated";
|
|
549
|
+
message: {
|
|
550
|
+
ts: number;
|
|
551
|
+
type: "ask" | "say";
|
|
552
|
+
ask?: ("followup" | "command" | "command_output" | "completion_result" | "tool" | "api_req_failed" | "resume_task" | "resume_completed_task" | "mistake_limit_reached" | "browser_action_launch" | "use_mcp_server") | undefined;
|
|
553
|
+
say?: ("error" | "api_req_started" | "api_req_finished" | "api_req_retried" | "api_req_retry_delayed" | "api_req_deleted" | "text" | "reasoning" | "completion_result" | "user_feedback" | "user_feedback_diff" | "command_output" | "shell_integration_warning" | "browser_action" | "browser_action_result" | "mcp_server_request_started" | "mcp_server_response" | "subtask_result" | "checkpoint_saved" | "rooignore_error" | "diff_error") | undefined;
|
|
554
|
+
text?: string | undefined;
|
|
555
|
+
images?: string[] | undefined;
|
|
556
|
+
partial?: boolean | undefined;
|
|
557
|
+
reasoning?: string | undefined;
|
|
558
|
+
conversationHistoryIndex?: number | undefined;
|
|
559
|
+
checkpoint?: {
|
|
560
|
+
[x: string]: unknown;
|
|
561
|
+
} | undefined;
|
|
562
|
+
progressStatus?: {
|
|
563
|
+
icon?: string | undefined;
|
|
564
|
+
text?: string | undefined;
|
|
565
|
+
} | undefined;
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
];
|
|
569
|
+
} | {
|
|
570
|
+
eventName: "taskCreated";
|
|
571
|
+
payload: [string];
|
|
572
|
+
} | {
|
|
573
|
+
eventName: "taskStarted";
|
|
574
|
+
payload: [string];
|
|
575
|
+
} | {
|
|
576
|
+
eventName: "taskModeSwitched";
|
|
577
|
+
payload: [string, string];
|
|
578
|
+
} | {
|
|
579
|
+
eventName: "taskPaused";
|
|
580
|
+
payload: [string];
|
|
581
|
+
} | {
|
|
582
|
+
eventName: "taskUnpaused";
|
|
583
|
+
payload: [string];
|
|
584
|
+
} | {
|
|
585
|
+
eventName: "taskAskResponded";
|
|
586
|
+
payload: [string];
|
|
587
|
+
} | {
|
|
588
|
+
eventName: "taskAborted";
|
|
589
|
+
payload: [string];
|
|
590
|
+
} | {
|
|
591
|
+
eventName: "taskSpawned";
|
|
592
|
+
payload: [string, string];
|
|
593
|
+
} | {
|
|
594
|
+
eventName: "taskCompleted";
|
|
595
|
+
payload: [
|
|
596
|
+
string,
|
|
597
|
+
{
|
|
598
|
+
totalTokensIn: number;
|
|
599
|
+
totalTokensOut: number;
|
|
600
|
+
totalCacheWrites?: number | undefined;
|
|
601
|
+
totalCacheReads?: number | undefined;
|
|
602
|
+
totalCost: number;
|
|
603
|
+
contextTokens: number;
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
[x: string]: {
|
|
607
|
+
attempts: number;
|
|
608
|
+
failures: number;
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
];
|
|
612
|
+
} | {
|
|
613
|
+
eventName: "taskTokenUsageUpdated";
|
|
614
|
+
payload: [
|
|
615
|
+
string,
|
|
616
|
+
{
|
|
617
|
+
totalTokensIn: number;
|
|
618
|
+
totalTokensOut: number;
|
|
619
|
+
totalCacheWrites?: number | undefined;
|
|
620
|
+
totalCacheReads?: number | undefined;
|
|
621
|
+
totalCost: number;
|
|
622
|
+
contextTokens: number;
|
|
623
|
+
}
|
|
624
|
+
];
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
type TaskCommand = {
|
|
628
|
+
commandName: "StartNewTask";
|
|
629
|
+
data: {
|
|
630
|
+
configuration: {
|
|
631
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
632
|
+
includeMaxTokens?: boolean | undefined;
|
|
633
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
634
|
+
diffEnabled?: boolean | undefined;
|
|
635
|
+
fuzzyMatchThreshold?: number | undefined;
|
|
636
|
+
modelTemperature?: (number | null) | undefined;
|
|
637
|
+
rateLimitSeconds?: number | undefined;
|
|
638
|
+
modelMaxTokens?: number | undefined;
|
|
639
|
+
modelMaxThinkingTokens?: number | undefined;
|
|
640
|
+
apiModelId?: string | undefined;
|
|
641
|
+
apiKey?: string | undefined;
|
|
642
|
+
anthropicBaseUrl?: string | undefined;
|
|
643
|
+
anthropicUseAuthToken?: boolean | undefined;
|
|
644
|
+
glamaModelId?: string | undefined;
|
|
645
|
+
glamaApiKey?: string | undefined;
|
|
646
|
+
openRouterApiKey?: string | undefined;
|
|
647
|
+
openRouterModelId?: string | undefined;
|
|
648
|
+
openRouterBaseUrl?: string | undefined;
|
|
649
|
+
openRouterSpecificProvider?: string | undefined;
|
|
650
|
+
openRouterUseMiddleOutTransform?: boolean | undefined;
|
|
651
|
+
awsAccessKey?: string | undefined;
|
|
652
|
+
awsSecretKey?: string | undefined;
|
|
653
|
+
awsSessionToken?: string | undefined;
|
|
654
|
+
awsRegion?: string | undefined;
|
|
655
|
+
awsUseCrossRegionInference?: boolean | undefined;
|
|
656
|
+
awsUsePromptCache?: boolean | undefined;
|
|
657
|
+
awsProfile?: string | undefined;
|
|
658
|
+
awsUseProfile?: boolean | undefined;
|
|
659
|
+
awsCustomArn?: string | undefined;
|
|
660
|
+
vertexKeyFile?: string | undefined;
|
|
661
|
+
vertexJsonCredentials?: string | undefined;
|
|
662
|
+
vertexProjectId?: string | undefined;
|
|
663
|
+
vertexRegion?: string | undefined;
|
|
664
|
+
openAiBaseUrl?: string | undefined;
|
|
665
|
+
openAiApiKey?: string | undefined;
|
|
666
|
+
openAiLegacyFormat?: boolean | undefined;
|
|
667
|
+
openAiR1FormatEnabled?: boolean | undefined;
|
|
668
|
+
openAiModelId?: string | undefined;
|
|
669
|
+
openAiCustomModelInfo?: ({
|
|
670
|
+
maxTokens?: (number | null) | undefined;
|
|
671
|
+
maxThinkingTokens?: (number | null) | undefined;
|
|
672
|
+
contextWindow: number;
|
|
673
|
+
supportsImages?: boolean | undefined;
|
|
674
|
+
supportsComputerUse?: boolean | undefined;
|
|
675
|
+
supportsPromptCache: boolean;
|
|
676
|
+
inputPrice?: number | undefined;
|
|
677
|
+
outputPrice?: number | undefined;
|
|
678
|
+
cacheWritesPrice?: number | undefined;
|
|
679
|
+
cacheReadsPrice?: number | undefined;
|
|
680
|
+
description?: string | undefined;
|
|
681
|
+
reasoningEffort?: ("low" | "medium" | "high") | undefined;
|
|
682
|
+
thinking?: boolean | undefined;
|
|
683
|
+
minTokensPerCachePoint?: number | undefined;
|
|
684
|
+
maxCachePoints?: number | undefined;
|
|
685
|
+
cachableFields?: string[] | undefined;
|
|
686
|
+
tiers?: {
|
|
687
|
+
contextWindow: number;
|
|
688
|
+
inputPrice?: number | undefined;
|
|
689
|
+
outputPrice?: number | undefined;
|
|
690
|
+
cacheWritesPrice?: number | undefined;
|
|
691
|
+
cacheReadsPrice?: number | undefined;
|
|
692
|
+
}[] | undefined;
|
|
693
|
+
} | null) | undefined;
|
|
694
|
+
openAiUseAzure?: boolean | undefined;
|
|
695
|
+
azureApiVersion?: string | undefined;
|
|
696
|
+
openAiStreamingEnabled?: boolean | undefined;
|
|
697
|
+
enableReasoningEffort?: boolean | undefined;
|
|
698
|
+
openAiHostHeader?: string | undefined;
|
|
699
|
+
openAiHeaders?: {
|
|
700
|
+
[x: string]: string;
|
|
701
|
+
} | undefined;
|
|
702
|
+
ollamaModelId?: string | undefined;
|
|
703
|
+
ollamaBaseUrl?: string | undefined;
|
|
704
|
+
vsCodeLmModelSelector?: {
|
|
705
|
+
vendor?: string | undefined;
|
|
706
|
+
family?: string | undefined;
|
|
707
|
+
version?: string | undefined;
|
|
708
|
+
id?: string | undefined;
|
|
709
|
+
} | undefined;
|
|
710
|
+
lmStudioModelId?: string | undefined;
|
|
711
|
+
lmStudioBaseUrl?: string | undefined;
|
|
712
|
+
lmStudioDraftModelId?: string | undefined;
|
|
713
|
+
lmStudioSpeculativeDecodingEnabled?: boolean | undefined;
|
|
714
|
+
geminiApiKey?: string | undefined;
|
|
715
|
+
googleGeminiBaseUrl?: string | undefined;
|
|
716
|
+
openAiNativeApiKey?: string | undefined;
|
|
717
|
+
openAiNativeBaseUrl?: string | undefined;
|
|
718
|
+
mistralApiKey?: string | undefined;
|
|
719
|
+
mistralCodestralUrl?: string | undefined;
|
|
720
|
+
deepSeekBaseUrl?: string | undefined;
|
|
721
|
+
deepSeekApiKey?: string | undefined;
|
|
722
|
+
unboundApiKey?: string | undefined;
|
|
723
|
+
unboundModelId?: string | undefined;
|
|
724
|
+
requestyApiKey?: string | undefined;
|
|
725
|
+
requestyModelId?: string | undefined;
|
|
726
|
+
fakeAi?: unknown | undefined;
|
|
727
|
+
xaiApiKey?: string | undefined;
|
|
728
|
+
groqApiKey?: string | undefined;
|
|
729
|
+
chutesApiKey?: string | undefined;
|
|
730
|
+
litellmBaseUrl?: string | undefined;
|
|
731
|
+
litellmApiKey?: string | undefined;
|
|
732
|
+
litellmModelId?: string | undefined;
|
|
733
|
+
currentApiConfigName?: string | undefined;
|
|
734
|
+
listApiConfigMeta?: {
|
|
735
|
+
id: string;
|
|
736
|
+
name: string;
|
|
737
|
+
apiProvider?: ("anthropic" | "glama" | "openrouter" | "bedrock" | "vertex" | "openai" | "ollama" | "vscode-lm" | "lmstudio" | "gemini" | "openai-native" | "mistral" | "deepseek" | "unbound" | "requesty" | "human-relay" | "fake-ai" | "xai" | "groq" | "chutes" | "litellm") | undefined;
|
|
738
|
+
}[] | undefined;
|
|
739
|
+
pinnedApiConfigs?: {
|
|
740
|
+
[x: string]: boolean;
|
|
741
|
+
} | undefined;
|
|
742
|
+
lastShownAnnouncementId?: string | undefined;
|
|
743
|
+
customInstructions?: string | undefined;
|
|
744
|
+
taskHistory?: {
|
|
745
|
+
id: string;
|
|
746
|
+
number: number;
|
|
747
|
+
ts: number;
|
|
748
|
+
task: string;
|
|
749
|
+
tokensIn: number;
|
|
750
|
+
tokensOut: number;
|
|
751
|
+
cacheWrites?: number | undefined;
|
|
752
|
+
cacheReads?: number | undefined;
|
|
753
|
+
totalCost: number;
|
|
754
|
+
size?: number | undefined;
|
|
755
|
+
workspace?: string | undefined;
|
|
756
|
+
}[] | undefined;
|
|
757
|
+
autoApprovalEnabled?: boolean | undefined;
|
|
758
|
+
alwaysAllowReadOnly?: boolean | undefined;
|
|
759
|
+
alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined;
|
|
760
|
+
alwaysAllowWrite?: boolean | undefined;
|
|
761
|
+
alwaysAllowWriteOutsideWorkspace?: boolean | undefined;
|
|
762
|
+
writeDelayMs?: number | undefined;
|
|
763
|
+
alwaysAllowBrowser?: boolean | undefined;
|
|
764
|
+
alwaysApproveResubmit?: boolean | undefined;
|
|
765
|
+
requestDelaySeconds?: number | undefined;
|
|
766
|
+
alwaysAllowMcp?: boolean | undefined;
|
|
767
|
+
alwaysAllowModeSwitch?: boolean | undefined;
|
|
768
|
+
alwaysAllowSubtasks?: boolean | undefined;
|
|
769
|
+
alwaysAllowExecute?: boolean | undefined;
|
|
770
|
+
allowedCommands?: string[] | undefined;
|
|
771
|
+
browserToolEnabled?: boolean | undefined;
|
|
772
|
+
browserViewportSize?: string | undefined;
|
|
773
|
+
screenshotQuality?: number | undefined;
|
|
774
|
+
remoteBrowserEnabled?: boolean | undefined;
|
|
775
|
+
remoteBrowserHost?: string | undefined;
|
|
776
|
+
cachedChromeHostUrl?: string | undefined;
|
|
777
|
+
enableCheckpoints?: boolean | undefined;
|
|
778
|
+
ttsEnabled?: boolean | undefined;
|
|
779
|
+
ttsSpeed?: number | undefined;
|
|
780
|
+
soundEnabled?: boolean | undefined;
|
|
781
|
+
soundVolume?: number | undefined;
|
|
782
|
+
maxOpenTabsContext?: number | undefined;
|
|
783
|
+
maxWorkspaceFiles?: number | undefined;
|
|
784
|
+
showRooIgnoredFiles?: boolean | undefined;
|
|
785
|
+
maxReadFileLine?: number | undefined;
|
|
786
|
+
terminalOutputLineLimit?: number | undefined;
|
|
787
|
+
terminalShellIntegrationTimeout?: number | undefined;
|
|
788
|
+
terminalShellIntegrationDisabled?: boolean | undefined;
|
|
789
|
+
terminalCommandDelay?: number | undefined;
|
|
790
|
+
terminalPowershellCounter?: boolean | undefined;
|
|
791
|
+
terminalZshClearEolMark?: boolean | undefined;
|
|
792
|
+
terminalZshOhMy?: boolean | undefined;
|
|
793
|
+
terminalZshP10k?: boolean | undefined;
|
|
794
|
+
terminalZdotdir?: boolean | undefined;
|
|
795
|
+
terminalCompressProgressBar?: boolean | undefined;
|
|
796
|
+
experiments?: {
|
|
797
|
+
powerSteering: boolean;
|
|
798
|
+
} | undefined;
|
|
799
|
+
language?: ("ca" | "de" | "en" | "es" | "fr" | "hi" | "it" | "ja" | "ko" | "nl" | "pl" | "pt-BR" | "ru" | "tr" | "vi" | "zh-CN" | "zh-TW") | undefined;
|
|
800
|
+
telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined;
|
|
801
|
+
mcpEnabled?: boolean | undefined;
|
|
802
|
+
enableMcpServerCreation?: boolean | undefined;
|
|
803
|
+
mode?: string | undefined;
|
|
804
|
+
modeApiConfigs?: {
|
|
805
|
+
[x: string]: string;
|
|
806
|
+
} | undefined;
|
|
807
|
+
customModes?: {
|
|
808
|
+
slug: string;
|
|
809
|
+
name: string;
|
|
810
|
+
roleDefinition: string;
|
|
811
|
+
customInstructions?: string | undefined;
|
|
812
|
+
groups: (("read" | "edit" | "browser" | "command" | "mcp" | "modes") | [
|
|
813
|
+
"read" | "edit" | "browser" | "command" | "mcp" | "modes",
|
|
814
|
+
{
|
|
815
|
+
fileRegex?: string | undefined;
|
|
816
|
+
description?: string | undefined;
|
|
817
|
+
}
|
|
818
|
+
])[];
|
|
819
|
+
source?: ("global" | "project") | undefined;
|
|
820
|
+
}[] | undefined;
|
|
821
|
+
customModePrompts?: {
|
|
822
|
+
[x: string]: {
|
|
823
|
+
roleDefinition?: string | undefined;
|
|
824
|
+
customInstructions?: string | undefined;
|
|
825
|
+
} | undefined;
|
|
826
|
+
} | undefined;
|
|
827
|
+
customSupportPrompts?: {
|
|
828
|
+
[x: string]: string | undefined;
|
|
829
|
+
} | undefined;
|
|
830
|
+
enhancementApiConfigId?: string | undefined;
|
|
831
|
+
historyPreviewCollapsed?: boolean | undefined;
|
|
832
|
+
};
|
|
833
|
+
text: string;
|
|
834
|
+
images?: string[] | undefined;
|
|
835
|
+
newTab?: boolean | undefined;
|
|
836
|
+
};
|
|
837
|
+
} | {
|
|
838
|
+
commandName: "CancelTask";
|
|
839
|
+
data: string;
|
|
840
|
+
} | {
|
|
841
|
+
commandName: "CloseTask";
|
|
842
|
+
data: string;
|
|
843
|
+
};
|
|
844
|
+
type TaskEvent = {
|
|
845
|
+
eventName: "message";
|
|
846
|
+
payload: [
|
|
847
|
+
{
|
|
848
|
+
taskId: string;
|
|
849
|
+
action: "created" | "updated";
|
|
850
|
+
message: {
|
|
851
|
+
ts: number;
|
|
852
|
+
type: "ask" | "say";
|
|
853
|
+
ask?: ("followup" | "command" | "command_output" | "completion_result" | "tool" | "api_req_failed" | "resume_task" | "resume_completed_task" | "mistake_limit_reached" | "browser_action_launch" | "use_mcp_server") | undefined;
|
|
854
|
+
say?: ("error" | "api_req_started" | "api_req_finished" | "api_req_retried" | "api_req_retry_delayed" | "api_req_deleted" | "text" | "reasoning" | "completion_result" | "user_feedback" | "user_feedback_diff" | "command_output" | "shell_integration_warning" | "browser_action" | "browser_action_result" | "mcp_server_request_started" | "mcp_server_response" | "subtask_result" | "checkpoint_saved" | "rooignore_error" | "diff_error") | undefined;
|
|
855
|
+
text?: string | undefined;
|
|
856
|
+
images?: string[] | undefined;
|
|
857
|
+
partial?: boolean | undefined;
|
|
858
|
+
reasoning?: string | undefined;
|
|
859
|
+
conversationHistoryIndex?: number | undefined;
|
|
860
|
+
checkpoint?: {
|
|
861
|
+
[x: string]: unknown;
|
|
862
|
+
} | undefined;
|
|
863
|
+
progressStatus?: {
|
|
864
|
+
icon?: string | undefined;
|
|
865
|
+
text?: string | undefined;
|
|
866
|
+
} | undefined;
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
];
|
|
870
|
+
} | {
|
|
871
|
+
eventName: "taskCreated";
|
|
872
|
+
payload: [string];
|
|
873
|
+
} | {
|
|
874
|
+
eventName: "taskStarted";
|
|
875
|
+
payload: [string];
|
|
876
|
+
} | {
|
|
877
|
+
eventName: "taskModeSwitched";
|
|
878
|
+
payload: [string, string];
|
|
879
|
+
} | {
|
|
880
|
+
eventName: "taskPaused";
|
|
881
|
+
payload: [string];
|
|
882
|
+
} | {
|
|
883
|
+
eventName: "taskUnpaused";
|
|
884
|
+
payload: [string];
|
|
885
|
+
} | {
|
|
886
|
+
eventName: "taskAskResponded";
|
|
887
|
+
payload: [string];
|
|
888
|
+
} | {
|
|
889
|
+
eventName: "taskAborted";
|
|
890
|
+
payload: [string];
|
|
891
|
+
} | {
|
|
892
|
+
eventName: "taskSpawned";
|
|
893
|
+
payload: [string, string];
|
|
894
|
+
} | {
|
|
895
|
+
eventName: "taskCompleted";
|
|
896
|
+
payload: [
|
|
897
|
+
string,
|
|
898
|
+
{
|
|
899
|
+
totalTokensIn: number;
|
|
900
|
+
totalTokensOut: number;
|
|
901
|
+
totalCacheWrites?: number | undefined;
|
|
902
|
+
totalCacheReads?: number | undefined;
|
|
903
|
+
totalCost: number;
|
|
904
|
+
contextTokens: number;
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
[x: string]: {
|
|
908
|
+
attempts: number;
|
|
909
|
+
failures: number;
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
];
|
|
913
|
+
} | {
|
|
914
|
+
eventName: "taskTokenUsageUpdated";
|
|
915
|
+
payload: [
|
|
916
|
+
string,
|
|
917
|
+
{
|
|
918
|
+
totalTokensIn: number;
|
|
919
|
+
totalTokensOut: number;
|
|
920
|
+
totalCacheWrites?: number | undefined;
|
|
921
|
+
totalCacheReads?: number | undefined;
|
|
922
|
+
totalCost: number;
|
|
923
|
+
contextTokens: number;
|
|
924
|
+
}
|
|
925
|
+
];
|
|
926
|
+
};
|
|
927
|
+
/**
|
|
928
|
+
* RooCodeEvent
|
|
929
|
+
*/
|
|
930
|
+
declare enum RooCodeEventName {
|
|
931
|
+
Message = "message",
|
|
932
|
+
TaskCreated = "taskCreated",
|
|
933
|
+
TaskStarted = "taskStarted",
|
|
934
|
+
TaskModeSwitched = "taskModeSwitched",
|
|
935
|
+
TaskPaused = "taskPaused",
|
|
936
|
+
TaskUnpaused = "taskUnpaused",
|
|
937
|
+
TaskAskResponded = "taskAskResponded",
|
|
938
|
+
TaskAborted = "taskAborted",
|
|
939
|
+
TaskSpawned = "taskSpawned",
|
|
940
|
+
TaskCompleted = "taskCompleted",
|
|
941
|
+
TaskTokenUsageUpdated = "taskTokenUsageUpdated",
|
|
942
|
+
TaskToolFailed = "taskToolFailed"
|
|
943
|
+
}
|
|
944
|
+
/**
|
|
945
|
+
* IpcMessage
|
|
946
|
+
*/
|
|
947
|
+
declare enum IpcMessageType {
|
|
948
|
+
Connect = "Connect",
|
|
949
|
+
Disconnect = "Disconnect",
|
|
950
|
+
Ack = "Ack",
|
|
951
|
+
TaskCommand = "TaskCommand",
|
|
952
|
+
TaskEvent = "TaskEvent"
|
|
953
|
+
}
|
|
954
|
+
declare enum IpcOrigin {
|
|
955
|
+
Client = "client",
|
|
956
|
+
Server = "server"
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* RooCodeAPI
|
|
960
|
+
*/
|
|
961
|
+
type RooCodeSettings = GlobalSettings & ProviderSettings;
|
|
962
|
+
interface RooCodeAPI extends EventEmitter<RooCodeEvents> {
|
|
963
|
+
/**
|
|
964
|
+
* Starts a new task with an optional initial message and images.
|
|
965
|
+
* @param task Optional initial task message.
|
|
966
|
+
* @param images Optional array of image data URIs (e.g., "data:image/webp;base64,...").
|
|
967
|
+
* @returns The ID of the new task.
|
|
968
|
+
*/
|
|
969
|
+
startNewTask({ configuration, text, images, newTab, }: {
|
|
970
|
+
configuration?: RooCodeSettings;
|
|
971
|
+
text?: string;
|
|
972
|
+
images?: string[];
|
|
973
|
+
newTab?: boolean;
|
|
974
|
+
}): Promise<string>;
|
|
975
|
+
/**
|
|
976
|
+
* Resumes a task with the given ID.
|
|
977
|
+
* @param taskId The ID of the task to resume.
|
|
978
|
+
* @throws Error if the task is not found in the task history.
|
|
979
|
+
*/
|
|
980
|
+
resumeTask(taskId: string): Promise<void>;
|
|
981
|
+
/**
|
|
982
|
+
* Checks if a task with the given ID is in the task history.
|
|
983
|
+
* @param taskId The ID of the task to check.
|
|
984
|
+
* @returns True if the task is in the task history, false otherwise.
|
|
985
|
+
*/
|
|
986
|
+
isTaskInHistory(taskId: string): Promise<boolean>;
|
|
987
|
+
/**
|
|
988
|
+
* Returns the current task stack.
|
|
989
|
+
* @returns An array of task IDs.
|
|
990
|
+
*/
|
|
991
|
+
getCurrentTaskStack(): string[];
|
|
992
|
+
/**
|
|
993
|
+
* Clears the current task.
|
|
994
|
+
*/
|
|
995
|
+
clearCurrentTask(lastMessage?: string): Promise<void>;
|
|
996
|
+
/**
|
|
997
|
+
* Cancels the current task.
|
|
998
|
+
*/
|
|
999
|
+
cancelCurrentTask(): Promise<void>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Sends a message to the current task.
|
|
1002
|
+
* @param message Optional message to send.
|
|
1003
|
+
* @param images Optional array of image data URIs (e.g., "data:image/webp;base64,...").
|
|
1004
|
+
*/
|
|
1005
|
+
sendMessage(message?: string, images?: string[]): Promise<void>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Simulates pressing the primary button in the chat interface.
|
|
1008
|
+
*/
|
|
1009
|
+
pressPrimaryButton(): Promise<void>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Simulates pressing the secondary button in the chat interface.
|
|
1012
|
+
*/
|
|
1013
|
+
pressSecondaryButton(): Promise<void>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Returns true if the API is ready to use.
|
|
1016
|
+
*/
|
|
1017
|
+
isReady(): boolean;
|
|
1018
|
+
/**
|
|
1019
|
+
* Returns the current configuration.
|
|
1020
|
+
* @returns The current configuration.
|
|
1021
|
+
*/
|
|
1022
|
+
getConfiguration(): RooCodeSettings;
|
|
1023
|
+
/**
|
|
1024
|
+
* Sets the configuration for the current task.
|
|
1025
|
+
* @param values An object containing key-value pairs to set.
|
|
1026
|
+
*/
|
|
1027
|
+
setConfiguration(values: RooCodeSettings): Promise<void>;
|
|
1028
|
+
/**
|
|
1029
|
+
* Returns a list of all configured profile names
|
|
1030
|
+
* @returns Array of profile names
|
|
1031
|
+
*/
|
|
1032
|
+
getProfiles(): string[];
|
|
1033
|
+
/**
|
|
1034
|
+
* Returns the profile entry for a given name
|
|
1035
|
+
* @param name The name of the profile
|
|
1036
|
+
* @returns The profile entry, or undefined if the profile does not exist
|
|
1037
|
+
*/
|
|
1038
|
+
getProfileEntry(name: string): ProviderSettingsEntry | undefined;
|
|
1039
|
+
/**
|
|
1040
|
+
* Creates a new API configuration profile
|
|
1041
|
+
* @param name The name of the profile
|
|
1042
|
+
* @param profile The profile to create; defaults to an empty object
|
|
1043
|
+
* @param activate Whether to activate the profile after creation; defaults to true
|
|
1044
|
+
* @returns The ID of the created profile
|
|
1045
|
+
* @throws Error if the profile already exists
|
|
1046
|
+
*/
|
|
1047
|
+
createProfile(name: string, profile?: ProviderSettings, activate?: boolean): Promise<string>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Updates an existing API configuration profile
|
|
1050
|
+
* @param name The name of the profile
|
|
1051
|
+
* @param profile The profile to update
|
|
1052
|
+
* @param activate Whether to activate the profile after update; defaults to true
|
|
1053
|
+
* @returns The ID of the updated profile
|
|
1054
|
+
* @throws Error if the profile does not exist
|
|
1055
|
+
*/
|
|
1056
|
+
updateProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise<string | undefined>;
|
|
1057
|
+
/**
|
|
1058
|
+
* Creates a new API configuration profile or updates an existing one
|
|
1059
|
+
* @param name The name of the profile
|
|
1060
|
+
* @param profile The profile to create or update; defaults to an empty object
|
|
1061
|
+
* @param activate Whether to activate the profile after upsert; defaults to true
|
|
1062
|
+
* @returns The ID of the upserted profile
|
|
1063
|
+
*/
|
|
1064
|
+
upsertProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise<string | undefined>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Deletes a profile by name
|
|
1067
|
+
* @param name The name of the profile to delete
|
|
1068
|
+
* @throws Error if the profile does not exist
|
|
1069
|
+
*/
|
|
1070
|
+
deleteProfile(name: string): Promise<void>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Returns the name of the currently active profile
|
|
1073
|
+
* @returns The profile name, or undefined if no profile is active
|
|
1074
|
+
*/
|
|
1075
|
+
getActiveProfile(): string | undefined;
|
|
1076
|
+
/**
|
|
1077
|
+
* Changes the active API configuration profile
|
|
1078
|
+
* @param name The name of the profile to activate
|
|
1079
|
+
* @throws Error if the profile does not exist
|
|
1080
|
+
*/
|
|
1081
|
+
setActiveProfile(name: string): Promise<string | undefined>;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* RooCodeIpcServer
|
|
1085
|
+
*/
|
|
1086
|
+
type IpcServerEvents = {
|
|
1087
|
+
[IpcMessageType.Connect]: [clientId: string];
|
|
1088
|
+
[IpcMessageType.Disconnect]: [clientId: string];
|
|
1089
|
+
[IpcMessageType.TaskCommand]: [clientId: string, data: TaskCommand];
|
|
1090
|
+
[IpcMessageType.TaskEvent]: [relayClientId: string | undefined, data: TaskEvent];
|
|
1091
|
+
};
|
|
1092
|
+
interface RooCodeIpcServer extends EventEmitter<IpcServerEvents> {
|
|
1093
|
+
listen(): void;
|
|
1094
|
+
broadcast(message: IpcMessage): void;
|
|
1095
|
+
send(client: string | Socket, message: IpcMessage): void;
|
|
1096
|
+
get socketPath(): string;
|
|
1097
|
+
get isListening(): boolean;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
export { type ClineMessage, type GlobalSettings, type IpcMessage, IpcMessageType, IpcOrigin, type IpcServerEvents, type ProviderSettings, type ProviderSettingsEntry, type RooCodeAPI, RooCodeEventName, type RooCodeEvents, type RooCodeIpcServer, type RooCodeSettings, type TaskCommand, type TaskEvent, type TokenUsage };
|