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