@roo-code/types 1.19.0 → 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16,17 +16,45 @@ var codebaseIndexProviderSchema = z.object({
16
16
  codeIndexQdrantApiKey: z.string().optional()
17
17
  });
18
18
 
19
- // src/experiment.ts
19
+ // src/cloud.ts
20
20
  import { z as z2 } from "zod";
21
+ var organizationAllowListSchema = z2.object({
22
+ allowAll: z2.boolean(),
23
+ providers: z2.record(
24
+ z2.object({
25
+ allowAll: z2.boolean(),
26
+ models: z2.array(z2.string()).optional()
27
+ })
28
+ )
29
+ });
30
+ var ORGANIZATION_ALLOW_ALL = {
31
+ allowAll: true,
32
+ providers: {}
33
+ };
34
+ var organizationSettingsSchema = z2.object({
35
+ version: z2.number(),
36
+ defaultSettings: z2.object({
37
+ enableCheckpoints: z2.boolean().optional(),
38
+ maxOpenTabsContext: z2.number().optional(),
39
+ maxWorkspaceFiles: z2.number().optional(),
40
+ showRooIgnoredFiles: z2.boolean().optional(),
41
+ maxReadFileLine: z2.number().optional(),
42
+ fuzzyMatchThreshold: z2.number().optional()
43
+ }).optional(),
44
+ allowList: organizationAllowListSchema
45
+ });
46
+
47
+ // src/experiment.ts
48
+ import { z as z3 } from "zod";
21
49
  var experimentIds = ["autoCondenseContext", "powerSteering"];
22
- var experimentIdsSchema = z2.enum(experimentIds);
23
- var experimentsSchema = z2.object({
24
- autoCondenseContext: z2.boolean(),
25
- powerSteering: z2.boolean()
50
+ var experimentIdsSchema = z3.enum(experimentIds);
51
+ var experimentsSchema = z3.object({
52
+ autoCondenseContext: z3.boolean(),
53
+ powerSteering: z3.boolean()
26
54
  });
27
55
 
28
56
  // src/global-settings.ts
29
- import { z as z10 } from "zod";
57
+ import { z as z12 } from "zod";
30
58
 
31
59
  // src/type-fu.ts
32
60
  function keysOf() {
@@ -34,42 +62,42 @@ function keysOf() {
34
62
  }
35
63
 
36
64
  // src/provider-settings.ts
37
- import { z as z4 } from "zod";
65
+ import { z as z5 } from "zod";
38
66
 
39
67
  // src/model.ts
40
- import { z as z3 } from "zod";
68
+ import { z as z4 } from "zod";
41
69
  var reasoningEfforts = ["low", "medium", "high"];
42
- var reasoningEffortsSchema = z3.enum(reasoningEfforts);
70
+ var reasoningEffortsSchema = z4.enum(reasoningEfforts);
43
71
  var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
44
- var modelParametersSchema = z3.enum(modelParameters);
72
+ var modelParametersSchema = z4.enum(modelParameters);
45
73
  var isModelParameter = (value) => modelParameters.includes(value);
46
- var modelInfoSchema = z3.object({
47
- maxTokens: z3.number().nullish(),
48
- maxThinkingTokens: z3.number().nullish(),
49
- contextWindow: z3.number(),
50
- supportsImages: z3.boolean().optional(),
51
- supportsComputerUse: z3.boolean().optional(),
52
- supportsPromptCache: z3.boolean(),
53
- supportsReasoningBudget: z3.boolean().optional(),
54
- requiredReasoningBudget: z3.boolean().optional(),
55
- supportsReasoningEffort: z3.boolean().optional(),
56
- supportedParameters: z3.array(modelParametersSchema).optional(),
57
- inputPrice: z3.number().optional(),
58
- outputPrice: z3.number().optional(),
59
- cacheWritesPrice: z3.number().optional(),
60
- cacheReadsPrice: z3.number().optional(),
61
- description: z3.string().optional(),
74
+ var modelInfoSchema = z4.object({
75
+ maxTokens: z4.number().nullish(),
76
+ maxThinkingTokens: z4.number().nullish(),
77
+ contextWindow: z4.number(),
78
+ supportsImages: z4.boolean().optional(),
79
+ supportsComputerUse: z4.boolean().optional(),
80
+ supportsPromptCache: z4.boolean(),
81
+ supportsReasoningBudget: z4.boolean().optional(),
82
+ requiredReasoningBudget: z4.boolean().optional(),
83
+ supportsReasoningEffort: z4.boolean().optional(),
84
+ supportedParameters: z4.array(modelParametersSchema).optional(),
85
+ inputPrice: z4.number().optional(),
86
+ outputPrice: z4.number().optional(),
87
+ cacheWritesPrice: z4.number().optional(),
88
+ cacheReadsPrice: z4.number().optional(),
89
+ description: z4.string().optional(),
62
90
  reasoningEffort: reasoningEffortsSchema.optional(),
63
- minTokensPerCachePoint: z3.number().optional(),
64
- maxCachePoints: z3.number().optional(),
65
- cachableFields: z3.array(z3.string()).optional(),
66
- tiers: z3.array(
67
- z3.object({
68
- contextWindow: z3.number(),
69
- inputPrice: z3.number().optional(),
70
- outputPrice: z3.number().optional(),
71
- cacheWritesPrice: z3.number().optional(),
72
- cacheReadsPrice: z3.number().optional()
91
+ minTokensPerCachePoint: z4.number().optional(),
92
+ maxCachePoints: z4.number().optional(),
93
+ cachableFields: z4.array(z4.string()).optional(),
94
+ tiers: z4.array(
95
+ z4.object({
96
+ contextWindow: z4.number(),
97
+ inputPrice: z4.number().optional(),
98
+ outputPrice: z4.number().optional(),
99
+ cacheWritesPrice: z4.number().optional(),
100
+ cacheReadsPrice: z4.number().optional()
73
101
  })
74
102
  ).optional()
75
103
  });
@@ -98,162 +126,162 @@ var providerNames = [
98
126
  "chutes",
99
127
  "litellm"
100
128
  ];
101
- var providerNamesSchema = z4.enum(providerNames);
102
- var providerSettingsEntrySchema = z4.object({
103
- id: z4.string(),
104
- name: z4.string(),
129
+ var providerNamesSchema = z5.enum(providerNames);
130
+ var providerSettingsEntrySchema = z5.object({
131
+ id: z5.string(),
132
+ name: z5.string(),
105
133
  apiProvider: providerNamesSchema.optional()
106
134
  });
107
- var baseProviderSettingsSchema = z4.object({
108
- includeMaxTokens: z4.boolean().optional(),
109
- diffEnabled: z4.boolean().optional(),
110
- fuzzyMatchThreshold: z4.number().optional(),
111
- modelTemperature: z4.number().nullish(),
112
- rateLimitSeconds: z4.number().optional(),
135
+ var baseProviderSettingsSchema = z5.object({
136
+ includeMaxTokens: z5.boolean().optional(),
137
+ diffEnabled: z5.boolean().optional(),
138
+ fuzzyMatchThreshold: z5.number().optional(),
139
+ modelTemperature: z5.number().nullish(),
140
+ rateLimitSeconds: z5.number().optional(),
113
141
  // Model reasoning.
114
- enableReasoningEffort: z4.boolean().optional(),
142
+ enableReasoningEffort: z5.boolean().optional(),
115
143
  reasoningEffort: reasoningEffortsSchema.optional(),
116
- modelMaxTokens: z4.number().optional(),
117
- modelMaxThinkingTokens: z4.number().optional()
144
+ modelMaxTokens: z5.number().optional(),
145
+ modelMaxThinkingTokens: z5.number().optional()
118
146
  });
119
147
  var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
120
- apiModelId: z4.string().optional()
148
+ apiModelId: z5.string().optional()
121
149
  });
122
150
  var anthropicSchema = apiModelIdProviderModelSchema.extend({
123
- apiKey: z4.string().optional(),
124
- anthropicBaseUrl: z4.string().optional(),
125
- anthropicUseAuthToken: z4.boolean().optional()
151
+ apiKey: z5.string().optional(),
152
+ anthropicBaseUrl: z5.string().optional(),
153
+ anthropicUseAuthToken: z5.boolean().optional()
126
154
  });
127
155
  var glamaSchema = baseProviderSettingsSchema.extend({
128
- glamaModelId: z4.string().optional(),
129
- glamaApiKey: z4.string().optional()
156
+ glamaModelId: z5.string().optional(),
157
+ glamaApiKey: z5.string().optional()
130
158
  });
131
159
  var openRouterSchema = baseProviderSettingsSchema.extend({
132
- openRouterApiKey: z4.string().optional(),
133
- openRouterModelId: z4.string().optional(),
134
- openRouterBaseUrl: z4.string().optional(),
135
- openRouterSpecificProvider: z4.string().optional(),
136
- openRouterUseMiddleOutTransform: z4.boolean().optional()
160
+ openRouterApiKey: z5.string().optional(),
161
+ openRouterModelId: z5.string().optional(),
162
+ openRouterBaseUrl: z5.string().optional(),
163
+ openRouterSpecificProvider: z5.string().optional(),
164
+ openRouterUseMiddleOutTransform: z5.boolean().optional()
137
165
  });
138
166
  var bedrockSchema = apiModelIdProviderModelSchema.extend({
139
- awsAccessKey: z4.string().optional(),
140
- awsSecretKey: z4.string().optional(),
141
- awsSessionToken: z4.string().optional(),
142
- awsRegion: z4.string().optional(),
143
- awsUseCrossRegionInference: z4.boolean().optional(),
144
- awsUsePromptCache: z4.boolean().optional(),
145
- awsProfile: z4.string().optional(),
146
- awsUseProfile: z4.boolean().optional(),
147
- awsCustomArn: z4.string().optional()
167
+ awsAccessKey: z5.string().optional(),
168
+ awsSecretKey: z5.string().optional(),
169
+ awsSessionToken: z5.string().optional(),
170
+ awsRegion: z5.string().optional(),
171
+ awsUseCrossRegionInference: z5.boolean().optional(),
172
+ awsUsePromptCache: z5.boolean().optional(),
173
+ awsProfile: z5.string().optional(),
174
+ awsUseProfile: z5.boolean().optional(),
175
+ awsCustomArn: z5.string().optional()
148
176
  });
149
177
  var vertexSchema = apiModelIdProviderModelSchema.extend({
150
- vertexKeyFile: z4.string().optional(),
151
- vertexJsonCredentials: z4.string().optional(),
152
- vertexProjectId: z4.string().optional(),
153
- vertexRegion: z4.string().optional()
178
+ vertexKeyFile: z5.string().optional(),
179
+ vertexJsonCredentials: z5.string().optional(),
180
+ vertexProjectId: z5.string().optional(),
181
+ vertexRegion: z5.string().optional()
154
182
  });
155
183
  var openAiSchema = baseProviderSettingsSchema.extend({
156
- openAiBaseUrl: z4.string().optional(),
157
- openAiApiKey: z4.string().optional(),
158
- openAiLegacyFormat: z4.boolean().optional(),
159
- openAiR1FormatEnabled: z4.boolean().optional(),
160
- openAiModelId: z4.string().optional(),
184
+ openAiBaseUrl: z5.string().optional(),
185
+ openAiApiKey: z5.string().optional(),
186
+ openAiLegacyFormat: z5.boolean().optional(),
187
+ openAiR1FormatEnabled: z5.boolean().optional(),
188
+ openAiModelId: z5.string().optional(),
161
189
  openAiCustomModelInfo: modelInfoSchema.nullish(),
162
- openAiUseAzure: z4.boolean().optional(),
163
- azureApiVersion: z4.string().optional(),
164
- openAiStreamingEnabled: z4.boolean().optional(),
165
- openAiHostHeader: z4.string().optional(),
190
+ openAiUseAzure: z5.boolean().optional(),
191
+ azureApiVersion: z5.string().optional(),
192
+ openAiStreamingEnabled: z5.boolean().optional(),
193
+ openAiHostHeader: z5.string().optional(),
166
194
  // Keep temporarily for backward compatibility during migration.
167
- openAiHeaders: z4.record(z4.string(), z4.string()).optional()
195
+ openAiHeaders: z5.record(z5.string(), z5.string()).optional()
168
196
  });
169
197
  var ollamaSchema = baseProviderSettingsSchema.extend({
170
- ollamaModelId: z4.string().optional(),
171
- ollamaBaseUrl: z4.string().optional()
198
+ ollamaModelId: z5.string().optional(),
199
+ ollamaBaseUrl: z5.string().optional()
172
200
  });
173
201
  var vsCodeLmSchema = baseProviderSettingsSchema.extend({
174
- vsCodeLmModelSelector: z4.object({
175
- vendor: z4.string().optional(),
176
- family: z4.string().optional(),
177
- version: z4.string().optional(),
178
- id: z4.string().optional()
202
+ vsCodeLmModelSelector: z5.object({
203
+ vendor: z5.string().optional(),
204
+ family: z5.string().optional(),
205
+ version: z5.string().optional(),
206
+ id: z5.string().optional()
179
207
  }).optional()
180
208
  });
181
209
  var lmStudioSchema = baseProviderSettingsSchema.extend({
182
- lmStudioModelId: z4.string().optional(),
183
- lmStudioBaseUrl: z4.string().optional(),
184
- lmStudioDraftModelId: z4.string().optional(),
185
- lmStudioSpeculativeDecodingEnabled: z4.boolean().optional()
210
+ lmStudioModelId: z5.string().optional(),
211
+ lmStudioBaseUrl: z5.string().optional(),
212
+ lmStudioDraftModelId: z5.string().optional(),
213
+ lmStudioSpeculativeDecodingEnabled: z5.boolean().optional()
186
214
  });
187
215
  var geminiSchema = apiModelIdProviderModelSchema.extend({
188
- geminiApiKey: z4.string().optional(),
189
- googleGeminiBaseUrl: z4.string().optional()
216
+ geminiApiKey: z5.string().optional(),
217
+ googleGeminiBaseUrl: z5.string().optional()
190
218
  });
191
219
  var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
192
- openAiNativeApiKey: z4.string().optional(),
193
- openAiNativeBaseUrl: z4.string().optional()
220
+ openAiNativeApiKey: z5.string().optional(),
221
+ openAiNativeBaseUrl: z5.string().optional()
194
222
  });
195
223
  var mistralSchema = apiModelIdProviderModelSchema.extend({
196
- mistralApiKey: z4.string().optional(),
197
- mistralCodestralUrl: z4.string().optional()
224
+ mistralApiKey: z5.string().optional(),
225
+ mistralCodestralUrl: z5.string().optional()
198
226
  });
199
227
  var deepSeekSchema = apiModelIdProviderModelSchema.extend({
200
- deepSeekBaseUrl: z4.string().optional(),
201
- deepSeekApiKey: z4.string().optional()
228
+ deepSeekBaseUrl: z5.string().optional(),
229
+ deepSeekApiKey: z5.string().optional()
202
230
  });
203
231
  var unboundSchema = baseProviderSettingsSchema.extend({
204
- unboundApiKey: z4.string().optional(),
205
- unboundModelId: z4.string().optional()
232
+ unboundApiKey: z5.string().optional(),
233
+ unboundModelId: z5.string().optional()
206
234
  });
207
235
  var requestySchema = baseProviderSettingsSchema.extend({
208
- requestyApiKey: z4.string().optional(),
209
- requestyModelId: z4.string().optional()
236
+ requestyApiKey: z5.string().optional(),
237
+ requestyModelId: z5.string().optional()
210
238
  });
211
239
  var humanRelaySchema = baseProviderSettingsSchema;
212
240
  var fakeAiSchema = baseProviderSettingsSchema.extend({
213
- fakeAi: z4.unknown().optional()
241
+ fakeAi: z5.unknown().optional()
214
242
  });
215
243
  var xaiSchema = apiModelIdProviderModelSchema.extend({
216
- xaiApiKey: z4.string().optional()
244
+ xaiApiKey: z5.string().optional()
217
245
  });
218
246
  var groqSchema = apiModelIdProviderModelSchema.extend({
219
- groqApiKey: z4.string().optional()
247
+ groqApiKey: z5.string().optional()
220
248
  });
221
249
  var chutesSchema = apiModelIdProviderModelSchema.extend({
222
- chutesApiKey: z4.string().optional()
250
+ chutesApiKey: z5.string().optional()
223
251
  });
224
252
  var litellmSchema = baseProviderSettingsSchema.extend({
225
- litellmBaseUrl: z4.string().optional(),
226
- litellmApiKey: z4.string().optional(),
227
- litellmModelId: z4.string().optional()
253
+ litellmBaseUrl: z5.string().optional(),
254
+ litellmApiKey: z5.string().optional(),
255
+ litellmModelId: z5.string().optional()
228
256
  });
229
- var defaultSchema = z4.object({
230
- apiProvider: z4.undefined()
257
+ var defaultSchema = z5.object({
258
+ apiProvider: z5.undefined()
231
259
  });
232
- var providerSettingsSchemaDiscriminated = z4.discriminatedUnion("apiProvider", [
233
- anthropicSchema.merge(z4.object({ apiProvider: z4.literal("anthropic") })),
234
- glamaSchema.merge(z4.object({ apiProvider: z4.literal("glama") })),
235
- openRouterSchema.merge(z4.object({ apiProvider: z4.literal("openrouter") })),
236
- bedrockSchema.merge(z4.object({ apiProvider: z4.literal("bedrock") })),
237
- vertexSchema.merge(z4.object({ apiProvider: z4.literal("vertex") })),
238
- openAiSchema.merge(z4.object({ apiProvider: z4.literal("openai") })),
239
- ollamaSchema.merge(z4.object({ apiProvider: z4.literal("ollama") })),
240
- vsCodeLmSchema.merge(z4.object({ apiProvider: z4.literal("vscode-lm") })),
241
- lmStudioSchema.merge(z4.object({ apiProvider: z4.literal("lmstudio") })),
242
- geminiSchema.merge(z4.object({ apiProvider: z4.literal("gemini") })),
243
- openAiNativeSchema.merge(z4.object({ apiProvider: z4.literal("openai-native") })),
244
- mistralSchema.merge(z4.object({ apiProvider: z4.literal("mistral") })),
245
- deepSeekSchema.merge(z4.object({ apiProvider: z4.literal("deepseek") })),
246
- unboundSchema.merge(z4.object({ apiProvider: z4.literal("unbound") })),
247
- requestySchema.merge(z4.object({ apiProvider: z4.literal("requesty") })),
248
- humanRelaySchema.merge(z4.object({ apiProvider: z4.literal("human-relay") })),
249
- fakeAiSchema.merge(z4.object({ apiProvider: z4.literal("fake-ai") })),
250
- xaiSchema.merge(z4.object({ apiProvider: z4.literal("xai") })),
251
- groqSchema.merge(z4.object({ apiProvider: z4.literal("groq") })),
252
- chutesSchema.merge(z4.object({ apiProvider: z4.literal("chutes") })),
253
- litellmSchema.merge(z4.object({ apiProvider: z4.literal("litellm") })),
260
+ var providerSettingsSchemaDiscriminated = z5.discriminatedUnion("apiProvider", [
261
+ anthropicSchema.merge(z5.object({ apiProvider: z5.literal("anthropic") })),
262
+ glamaSchema.merge(z5.object({ apiProvider: z5.literal("glama") })),
263
+ openRouterSchema.merge(z5.object({ apiProvider: z5.literal("openrouter") })),
264
+ bedrockSchema.merge(z5.object({ apiProvider: z5.literal("bedrock") })),
265
+ vertexSchema.merge(z5.object({ apiProvider: z5.literal("vertex") })),
266
+ openAiSchema.merge(z5.object({ apiProvider: z5.literal("openai") })),
267
+ ollamaSchema.merge(z5.object({ apiProvider: z5.literal("ollama") })),
268
+ vsCodeLmSchema.merge(z5.object({ apiProvider: z5.literal("vscode-lm") })),
269
+ lmStudioSchema.merge(z5.object({ apiProvider: z5.literal("lmstudio") })),
270
+ geminiSchema.merge(z5.object({ apiProvider: z5.literal("gemini") })),
271
+ openAiNativeSchema.merge(z5.object({ apiProvider: z5.literal("openai-native") })),
272
+ mistralSchema.merge(z5.object({ apiProvider: z5.literal("mistral") })),
273
+ deepSeekSchema.merge(z5.object({ apiProvider: z5.literal("deepseek") })),
274
+ unboundSchema.merge(z5.object({ apiProvider: z5.literal("unbound") })),
275
+ requestySchema.merge(z5.object({ apiProvider: z5.literal("requesty") })),
276
+ humanRelaySchema.merge(z5.object({ apiProvider: z5.literal("human-relay") })),
277
+ fakeAiSchema.merge(z5.object({ apiProvider: z5.literal("fake-ai") })),
278
+ xaiSchema.merge(z5.object({ apiProvider: z5.literal("xai") })),
279
+ groqSchema.merge(z5.object({ apiProvider: z5.literal("groq") })),
280
+ chutesSchema.merge(z5.object({ apiProvider: z5.literal("chutes") })),
281
+ litellmSchema.merge(z5.object({ apiProvider: z5.literal("litellm") })),
254
282
  defaultSchema
255
283
  ]);
256
- var providerSettingsSchema = z4.object({
284
+ var providerSettingsSchema = z5.object({
257
285
  apiProvider: providerNamesSchema.optional(),
258
286
  ...anthropicSchema.shape,
259
287
  ...glamaSchema.shape,
@@ -378,29 +406,108 @@ var PROVIDER_SETTINGS_KEYS = keysOf()([
378
406
  ]);
379
407
 
380
408
  // src/history.ts
381
- import { z as z5 } from "zod";
382
- var historyItemSchema = z5.object({
383
- id: z5.string(),
384
- number: z5.number(),
385
- ts: z5.number(),
386
- task: z5.string(),
387
- tokensIn: z5.number(),
388
- tokensOut: z5.number(),
389
- cacheWrites: z5.number().optional(),
390
- cacheReads: z5.number().optional(),
391
- totalCost: z5.number(),
392
- size: z5.number().optional(),
393
- workspace: z5.string().optional()
409
+ import { z as z6 } from "zod";
410
+ var historyItemSchema = z6.object({
411
+ id: z6.string(),
412
+ number: z6.number(),
413
+ ts: z6.number(),
414
+ task: z6.string(),
415
+ tokensIn: z6.number(),
416
+ tokensOut: z6.number(),
417
+ cacheWrites: z6.number().optional(),
418
+ cacheReads: z6.number().optional(),
419
+ totalCost: z6.number(),
420
+ size: z6.number().optional(),
421
+ workspace: z6.string().optional()
422
+ });
423
+
424
+ // src/telemetry.ts
425
+ import { z as z8 } from "zod";
426
+
427
+ // src/message.ts
428
+ import { z as z7 } from "zod";
429
+ var clineAsks = [
430
+ "followup",
431
+ "command",
432
+ "command_output",
433
+ "completion_result",
434
+ "tool",
435
+ "api_req_failed",
436
+ "resume_task",
437
+ "resume_completed_task",
438
+ "mistake_limit_reached",
439
+ "browser_action_launch",
440
+ "use_mcp_server",
441
+ "auto_approval_max_req_reached"
442
+ ];
443
+ var clineAskSchema = z7.enum(clineAsks);
444
+ var clineSays = [
445
+ "error",
446
+ "api_req_started",
447
+ "api_req_finished",
448
+ "api_req_retried",
449
+ "api_req_retry_delayed",
450
+ "api_req_deleted",
451
+ "text",
452
+ "reasoning",
453
+ "completion_result",
454
+ "user_feedback",
455
+ "user_feedback_diff",
456
+ "command_output",
457
+ "shell_integration_warning",
458
+ "browser_action",
459
+ "browser_action_result",
460
+ "mcp_server_request_started",
461
+ "mcp_server_response",
462
+ "subtask_result",
463
+ "checkpoint_saved",
464
+ "rooignore_error",
465
+ "diff_error",
466
+ "condense_context",
467
+ "codebase_search_result"
468
+ ];
469
+ var clineSaySchema = z7.enum(clineSays);
470
+ var toolProgressStatusSchema = z7.object({
471
+ icon: z7.string().optional(),
472
+ text: z7.string().optional()
473
+ });
474
+ var contextCondenseSchema = z7.object({
475
+ cost: z7.number(),
476
+ prevContextTokens: z7.number(),
477
+ newContextTokens: z7.number(),
478
+ summary: z7.string()
479
+ });
480
+ var clineMessageSchema = z7.object({
481
+ ts: z7.number(),
482
+ type: z7.union([z7.literal("ask"), z7.literal("say")]),
483
+ ask: clineAskSchema.optional(),
484
+ say: clineSaySchema.optional(),
485
+ text: z7.string().optional(),
486
+ images: z7.array(z7.string()).optional(),
487
+ partial: z7.boolean().optional(),
488
+ reasoning: z7.string().optional(),
489
+ conversationHistoryIndex: z7.number().optional(),
490
+ checkpoint: z7.record(z7.string(), z7.unknown()).optional(),
491
+ progressStatus: toolProgressStatusSchema.optional(),
492
+ contextCondense: contextCondenseSchema.optional()
493
+ });
494
+ var tokenUsageSchema = z7.object({
495
+ totalTokensIn: z7.number(),
496
+ totalTokensOut: z7.number(),
497
+ totalCacheWrites: z7.number().optional(),
498
+ totalCacheReads: z7.number().optional(),
499
+ totalCost: z7.number(),
500
+ contextTokens: z7.number()
394
501
  });
395
502
 
396
503
  // src/telemetry.ts
397
- import { z as z6 } from "zod";
398
504
  var telemetrySettings = ["unset", "enabled", "disabled"];
399
- var telemetrySettingsSchema = z6.enum(telemetrySettings);
505
+ var telemetrySettingsSchema = z8.enum(telemetrySettings);
400
506
  var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
401
507
  TelemetryEventName2["TASK_CREATED"] = "Task Created";
402
508
  TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
403
509
  TelemetryEventName2["TASK_COMPLETED"] = "Task Completed";
510
+ TelemetryEventName2["TASK_MESSAGE"] = "Task Message";
404
511
  TelemetryEventName2["TASK_CONVERSATION_MESSAGE"] = "Conversation Message";
405
512
  TelemetryEventName2["LLM_COMPLETION"] = "LLM Completion";
406
513
  TelemetryEventName2["MODE_SWITCH"] = "Mode Switched";
@@ -420,35 +527,28 @@ var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
420
527
  TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
421
528
  return TelemetryEventName2;
422
529
  })(TelemetryEventName || {});
423
- var appPropertiesSchema = z6.object({
424
- appVersion: z6.string(),
425
- vscodeVersion: z6.string(),
426
- platform: z6.string(),
427
- editorName: z6.string(),
428
- language: z6.string(),
429
- mode: z6.string()
530
+ var appPropertiesSchema = z8.object({
531
+ appVersion: z8.string(),
532
+ vscodeVersion: z8.string(),
533
+ platform: z8.string(),
534
+ editorName: z8.string(),
535
+ language: z8.string(),
536
+ mode: z8.string()
430
537
  });
431
- var taskPropertiesSchema = z6.object({
432
- taskId: z6.string().optional(),
433
- apiProvider: z6.enum(providerNames).optional(),
434
- modelId: z6.string().optional(),
435
- diffStrategy: z6.string().optional(),
436
- isSubtask: z6.boolean().optional()
538
+ var taskPropertiesSchema = z8.object({
539
+ taskId: z8.string().optional(),
540
+ apiProvider: z8.enum(providerNames).optional(),
541
+ modelId: z8.string().optional(),
542
+ diffStrategy: z8.string().optional(),
543
+ isSubtask: z8.boolean().optional()
437
544
  });
438
- var telemetryPropertiesSchema = z6.object({
545
+ var telemetryPropertiesSchema = z8.object({
439
546
  ...appPropertiesSchema.shape,
440
547
  ...taskPropertiesSchema.shape
441
548
  });
442
- var completionPropertiesSchema = z6.object({
443
- inputTokens: z6.number(),
444
- outputTokens: z6.number(),
445
- cacheReadTokens: z6.number().optional(),
446
- cacheWriteTokens: z6.number().optional(),
447
- cost: z6.number().optional()
448
- });
449
- var rooCodeTelemetryEventSchema = z6.discriminatedUnion("type", [
450
- z6.object({
451
- type: z6.enum([
549
+ var rooCodeTelemetryEventSchema = z8.discriminatedUnion("type", [
550
+ z8.object({
551
+ type: z8.enum([
452
552
  "Task Created" /* TASK_CREATED */,
453
553
  "Task Reopened" /* TASK_RESTARTED */,
454
554
  "Task Completed" /* TASK_COMPLETED */,
@@ -467,28 +567,34 @@ var rooCodeTelemetryEventSchema = z6.discriminatedUnion("type", [
467
567
  "Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
468
568
  "Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */
469
569
  ]),
470
- properties: z6.object({
471
- ...appPropertiesSchema.shape,
472
- ...taskPropertiesSchema.shape
570
+ properties: telemetryPropertiesSchema
571
+ }),
572
+ z8.object({
573
+ type: z8.literal("Task Message" /* TASK_MESSAGE */),
574
+ properties: z8.object({
575
+ message: clineMessageSchema
473
576
  })
474
577
  }),
475
- z6.object({
476
- type: z6.literal("LLM Completion" /* LLM_COMPLETION */),
477
- properties: z6.object({
478
- ...appPropertiesSchema.shape,
479
- ...taskPropertiesSchema.shape,
480
- ...completionPropertiesSchema.shape
578
+ z8.object({
579
+ type: z8.literal("LLM Completion" /* LLM_COMPLETION */),
580
+ properties: z8.object({
581
+ ...telemetryPropertiesSchema.shape,
582
+ inputTokens: z8.number(),
583
+ outputTokens: z8.number(),
584
+ cacheReadTokens: z8.number().optional(),
585
+ cacheWriteTokens: z8.number().optional(),
586
+ cost: z8.number().optional()
481
587
  })
482
588
  })
483
589
  ]);
484
590
 
485
591
  // src/mode.ts
486
- import { z as z8 } from "zod";
592
+ import { z as z10 } from "zod";
487
593
 
488
594
  // src/tool.ts
489
- import { z as z7 } from "zod";
595
+ import { z as z9 } from "zod";
490
596
  var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
491
- var toolGroupsSchema = z7.enum(toolGroups);
597
+ var toolGroupsSchema = z9.enum(toolGroups);
492
598
  var toolNames = [
493
599
  "execute_command",
494
600
  "read_file",
@@ -509,18 +615,18 @@ var toolNames = [
509
615
  "fetch_instructions",
510
616
  "codebase_search"
511
617
  ];
512
- var toolNamesSchema = z7.enum(toolNames);
513
- var toolUsageSchema = z7.record(
618
+ var toolNamesSchema = z9.enum(toolNames);
619
+ var toolUsageSchema = z9.record(
514
620
  toolNamesSchema,
515
- z7.object({
516
- attempts: z7.number(),
517
- failures: z7.number()
621
+ z9.object({
622
+ attempts: z9.number(),
623
+ failures: z9.number()
518
624
  })
519
625
  );
520
626
 
521
627
  // src/mode.ts
522
- var groupOptionsSchema = z8.object({
523
- fileRegex: z8.string().optional().refine(
628
+ var groupOptionsSchema = z10.object({
629
+ fileRegex: z10.string().optional().refine(
524
630
  (pattern) => {
525
631
  if (!pattern) {
526
632
  return true;
@@ -534,10 +640,10 @@ var groupOptionsSchema = z8.object({
534
640
  },
535
641
  { message: "Invalid regular expression pattern" }
536
642
  ),
537
- description: z8.string().optional()
643
+ description: z10.string().optional()
538
644
  });
539
- var groupEntrySchema = z8.union([toolGroupsSchema, z8.tuple([toolGroupsSchema, groupOptionsSchema])]);
540
- var groupEntryArraySchema = z8.array(groupEntrySchema).refine(
645
+ var groupEntrySchema = z10.union([toolGroupsSchema, z10.tuple([toolGroupsSchema, groupOptionsSchema])]);
646
+ var groupEntryArraySchema = z10.array(groupEntrySchema).refine(
541
647
  (groups) => {
542
648
  const seen = /* @__PURE__ */ new Set();
543
649
  return groups.every((group) => {
@@ -551,17 +657,17 @@ var groupEntryArraySchema = z8.array(groupEntrySchema).refine(
551
657
  },
552
658
  { message: "Duplicate groups are not allowed" }
553
659
  );
554
- var modeConfigSchema = z8.object({
555
- slug: z8.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
556
- name: z8.string().min(1, "Name is required"),
557
- roleDefinition: z8.string().min(1, "Role definition is required"),
558
- whenToUse: z8.string().optional(),
559
- customInstructions: z8.string().optional(),
660
+ var modeConfigSchema = z10.object({
661
+ slug: z10.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
662
+ name: z10.string().min(1, "Name is required"),
663
+ roleDefinition: z10.string().min(1, "Role definition is required"),
664
+ whenToUse: z10.string().optional(),
665
+ customInstructions: z10.string().optional(),
560
666
  groups: groupEntryArraySchema,
561
- source: z8.enum(["global", "project"]).optional()
667
+ source: z10.enum(["global", "project"]).optional()
562
668
  });
563
- var customModesSettingsSchema = z8.object({
564
- customModes: z8.array(modeConfigSchema).refine(
669
+ var customModesSettingsSchema = z10.object({
670
+ customModes: z10.array(modeConfigSchema).refine(
565
671
  (modes) => {
566
672
  const slugs = /* @__PURE__ */ new Set();
567
673
  return modes.every((mode) => {
@@ -577,16 +683,16 @@ var customModesSettingsSchema = z8.object({
577
683
  }
578
684
  )
579
685
  });
580
- var promptComponentSchema = z8.object({
581
- roleDefinition: z8.string().optional(),
582
- whenToUse: z8.string().optional(),
583
- customInstructions: z8.string().optional()
686
+ var promptComponentSchema = z10.object({
687
+ roleDefinition: z10.string().optional(),
688
+ whenToUse: z10.string().optional(),
689
+ customInstructions: z10.string().optional()
584
690
  });
585
- var customModePromptsSchema = z8.record(z8.string(), promptComponentSchema.optional());
586
- var customSupportPromptsSchema = z8.record(z8.string(), z8.string().optional());
691
+ var customModePromptsSchema = z10.record(z10.string(), promptComponentSchema.optional());
692
+ var customSupportPromptsSchema = z10.record(z10.string(), z10.string().optional());
587
693
 
588
694
  // src/vscode.ts
589
- import { z as z9 } from "zod";
695
+ import { z as z11 } from "zod";
590
696
  var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
591
697
  var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
592
698
  var commandIds = [
@@ -596,6 +702,7 @@ var commandIds = [
596
702
  "mcpButtonClicked",
597
703
  "historyButtonClicked",
598
704
  "popoutButtonClicked",
705
+ "accountButtonClicked",
599
706
  "settingsButtonClicked",
600
707
  "openInNewTab",
601
708
  "showHumanRelayDialog",
@@ -626,77 +733,77 @@ var languages = [
626
733
  "zh-CN",
627
734
  "zh-TW"
628
735
  ];
629
- var languagesSchema = z9.enum(languages);
736
+ var languagesSchema = z11.enum(languages);
630
737
  var isLanguage = (value) => languages.includes(value);
631
738
 
632
739
  // src/global-settings.ts
633
- var globalSettingsSchema = z10.object({
634
- currentApiConfigName: z10.string().optional(),
635
- listApiConfigMeta: z10.array(providerSettingsEntrySchema).optional(),
636
- pinnedApiConfigs: z10.record(z10.string(), z10.boolean()).optional(),
637
- lastShownAnnouncementId: z10.string().optional(),
638
- customInstructions: z10.string().optional(),
639
- taskHistory: z10.array(historyItemSchema).optional(),
640
- condensingApiConfigId: z10.string().optional(),
641
- customCondensingPrompt: z10.string().optional(),
642
- autoApprovalEnabled: z10.boolean().optional(),
643
- alwaysAllowReadOnly: z10.boolean().optional(),
644
- alwaysAllowReadOnlyOutsideWorkspace: z10.boolean().optional(),
645
- alwaysAllowWrite: z10.boolean().optional(),
646
- alwaysAllowWriteOutsideWorkspace: z10.boolean().optional(),
647
- writeDelayMs: z10.number().optional(),
648
- alwaysAllowBrowser: z10.boolean().optional(),
649
- alwaysApproveResubmit: z10.boolean().optional(),
650
- requestDelaySeconds: z10.number().optional(),
651
- alwaysAllowMcp: z10.boolean().optional(),
652
- alwaysAllowModeSwitch: z10.boolean().optional(),
653
- alwaysAllowSubtasks: z10.boolean().optional(),
654
- alwaysAllowExecute: z10.boolean().optional(),
655
- allowedCommands: z10.array(z10.string()).optional(),
656
- allowedMaxRequests: z10.number().nullish(),
657
- autoCondenseContextPercent: z10.number().optional(),
658
- browserToolEnabled: z10.boolean().optional(),
659
- browserViewportSize: z10.string().optional(),
660
- screenshotQuality: z10.number().optional(),
661
- remoteBrowserEnabled: z10.boolean().optional(),
662
- remoteBrowserHost: z10.string().optional(),
663
- cachedChromeHostUrl: z10.string().optional(),
664
- enableCheckpoints: z10.boolean().optional(),
665
- ttsEnabled: z10.boolean().optional(),
666
- ttsSpeed: z10.number().optional(),
667
- soundEnabled: z10.boolean().optional(),
668
- soundVolume: z10.number().optional(),
669
- maxOpenTabsContext: z10.number().optional(),
670
- maxWorkspaceFiles: z10.number().optional(),
671
- showRooIgnoredFiles: z10.boolean().optional(),
672
- maxReadFileLine: z10.number().optional(),
673
- terminalOutputLineLimit: z10.number().optional(),
674
- terminalShellIntegrationTimeout: z10.number().optional(),
675
- terminalShellIntegrationDisabled: z10.boolean().optional(),
676
- terminalCommandDelay: z10.number().optional(),
677
- terminalPowershellCounter: z10.boolean().optional(),
678
- terminalZshClearEolMark: z10.boolean().optional(),
679
- terminalZshOhMy: z10.boolean().optional(),
680
- terminalZshP10k: z10.boolean().optional(),
681
- terminalZdotdir: z10.boolean().optional(),
682
- terminalCompressProgressBar: z10.boolean().optional(),
683
- rateLimitSeconds: z10.number().optional(),
684
- diffEnabled: z10.boolean().optional(),
685
- fuzzyMatchThreshold: z10.number().optional(),
740
+ var globalSettingsSchema = z12.object({
741
+ currentApiConfigName: z12.string().optional(),
742
+ listApiConfigMeta: z12.array(providerSettingsEntrySchema).optional(),
743
+ pinnedApiConfigs: z12.record(z12.string(), z12.boolean()).optional(),
744
+ lastShownAnnouncementId: z12.string().optional(),
745
+ customInstructions: z12.string().optional(),
746
+ taskHistory: z12.array(historyItemSchema).optional(),
747
+ condensingApiConfigId: z12.string().optional(),
748
+ customCondensingPrompt: z12.string().optional(),
749
+ autoApprovalEnabled: z12.boolean().optional(),
750
+ alwaysAllowReadOnly: z12.boolean().optional(),
751
+ alwaysAllowReadOnlyOutsideWorkspace: z12.boolean().optional(),
752
+ alwaysAllowWrite: z12.boolean().optional(),
753
+ alwaysAllowWriteOutsideWorkspace: z12.boolean().optional(),
754
+ writeDelayMs: z12.number().optional(),
755
+ alwaysAllowBrowser: z12.boolean().optional(),
756
+ alwaysApproveResubmit: z12.boolean().optional(),
757
+ requestDelaySeconds: z12.number().optional(),
758
+ alwaysAllowMcp: z12.boolean().optional(),
759
+ alwaysAllowModeSwitch: z12.boolean().optional(),
760
+ alwaysAllowSubtasks: z12.boolean().optional(),
761
+ alwaysAllowExecute: z12.boolean().optional(),
762
+ allowedCommands: z12.array(z12.string()).optional(),
763
+ allowedMaxRequests: z12.number().nullish(),
764
+ autoCondenseContextPercent: z12.number().optional(),
765
+ browserToolEnabled: z12.boolean().optional(),
766
+ browserViewportSize: z12.string().optional(),
767
+ screenshotQuality: z12.number().optional(),
768
+ remoteBrowserEnabled: z12.boolean().optional(),
769
+ remoteBrowserHost: z12.string().optional(),
770
+ cachedChromeHostUrl: z12.string().optional(),
771
+ enableCheckpoints: z12.boolean().optional(),
772
+ ttsEnabled: z12.boolean().optional(),
773
+ ttsSpeed: z12.number().optional(),
774
+ soundEnabled: z12.boolean().optional(),
775
+ soundVolume: z12.number().optional(),
776
+ maxOpenTabsContext: z12.number().optional(),
777
+ maxWorkspaceFiles: z12.number().optional(),
778
+ showRooIgnoredFiles: z12.boolean().optional(),
779
+ maxReadFileLine: z12.number().optional(),
780
+ terminalOutputLineLimit: z12.number().optional(),
781
+ terminalShellIntegrationTimeout: z12.number().optional(),
782
+ terminalShellIntegrationDisabled: z12.boolean().optional(),
783
+ terminalCommandDelay: z12.number().optional(),
784
+ terminalPowershellCounter: z12.boolean().optional(),
785
+ terminalZshClearEolMark: z12.boolean().optional(),
786
+ terminalZshOhMy: z12.boolean().optional(),
787
+ terminalZshP10k: z12.boolean().optional(),
788
+ terminalZdotdir: z12.boolean().optional(),
789
+ terminalCompressProgressBar: z12.boolean().optional(),
790
+ rateLimitSeconds: z12.number().optional(),
791
+ diffEnabled: z12.boolean().optional(),
792
+ fuzzyMatchThreshold: z12.number().optional(),
686
793
  experiments: experimentsSchema.optional(),
687
794
  codebaseIndexModels: codebaseIndexModelsSchema.optional(),
688
795
  codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
689
796
  language: languagesSchema.optional(),
690
797
  telemetrySetting: telemetrySettingsSchema.optional(),
691
- mcpEnabled: z10.boolean().optional(),
692
- enableMcpServerCreation: z10.boolean().optional(),
693
- mode: z10.string().optional(),
694
- modeApiConfigs: z10.record(z10.string(), z10.string()).optional(),
695
- customModes: z10.array(modeConfigSchema).optional(),
798
+ mcpEnabled: z12.boolean().optional(),
799
+ enableMcpServerCreation: z12.boolean().optional(),
800
+ mode: z12.string().optional(),
801
+ modeApiConfigs: z12.record(z12.string(), z12.string()).optional(),
802
+ customModes: z12.array(modeConfigSchema).optional(),
696
803
  customModePrompts: customModePromptsSchema.optional(),
697
804
  customSupportPrompts: customSupportPromptsSchema.optional(),
698
- enhancementApiConfigId: z10.string().optional(),
699
- historyPreviewCollapsed: z10.boolean().optional()
805
+ enhancementApiConfigId: z12.string().optional(),
806
+ historyPreviewCollapsed: z12.boolean().optional()
700
807
  });
701
808
  var GLOBAL_SETTINGS_KEYS = keysOf()([
702
809
  "currentApiConfigName",
@@ -795,85 +902,7 @@ var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].fil
795
902
  var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
796
903
 
797
904
  // src/ipc.ts
798
- import { z as z12 } from "zod";
799
-
800
- // src/message.ts
801
- import { z as z11 } from "zod";
802
- var clineAsks = [
803
- "followup",
804
- "command",
805
- "command_output",
806
- "completion_result",
807
- "tool",
808
- "api_req_failed",
809
- "resume_task",
810
- "resume_completed_task",
811
- "mistake_limit_reached",
812
- "browser_action_launch",
813
- "use_mcp_server",
814
- "auto_approval_max_req_reached"
815
- ];
816
- var clineAskSchema = z11.enum(clineAsks);
817
- var clineSays = [
818
- "error",
819
- "api_req_started",
820
- "api_req_finished",
821
- "api_req_retried",
822
- "api_req_retry_delayed",
823
- "api_req_deleted",
824
- "text",
825
- "reasoning",
826
- "completion_result",
827
- "user_feedback",
828
- "user_feedback_diff",
829
- "command_output",
830
- "shell_integration_warning",
831
- "browser_action",
832
- "browser_action_result",
833
- "mcp_server_request_started",
834
- "mcp_server_response",
835
- "subtask_result",
836
- "checkpoint_saved",
837
- "rooignore_error",
838
- "diff_error",
839
- "condense_context",
840
- "codebase_search_result"
841
- ];
842
- var clineSaySchema = z11.enum(clineSays);
843
- var toolProgressStatusSchema = z11.object({
844
- icon: z11.string().optional(),
845
- text: z11.string().optional()
846
- });
847
- var contextCondenseSchema = z11.object({
848
- cost: z11.number(),
849
- prevContextTokens: z11.number(),
850
- newContextTokens: z11.number(),
851
- summary: z11.string()
852
- });
853
- var clineMessageSchema = z11.object({
854
- ts: z11.number(),
855
- type: z11.union([z11.literal("ask"), z11.literal("say")]),
856
- ask: clineAskSchema.optional(),
857
- say: clineSaySchema.optional(),
858
- text: z11.string().optional(),
859
- images: z11.array(z11.string()).optional(),
860
- partial: z11.boolean().optional(),
861
- reasoning: z11.string().optional(),
862
- conversationHistoryIndex: z11.number().optional(),
863
- checkpoint: z11.record(z11.string(), z11.unknown()).optional(),
864
- progressStatus: toolProgressStatusSchema.optional(),
865
- contextCondense: contextCondenseSchema.optional()
866
- });
867
- var tokenUsageSchema = z11.object({
868
- totalTokensIn: z11.number(),
869
- totalTokensOut: z11.number(),
870
- totalCacheWrites: z11.number().optional(),
871
- totalCacheReads: z11.number().optional(),
872
- totalCost: z11.number(),
873
- contextTokens: z11.number()
874
- });
875
-
876
- // src/ipc.ts
905
+ import { z as z13 } from "zod";
877
906
  var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
878
907
  RooCodeEventName2["Message"] = "message";
879
908
  RooCodeEventName2["TaskCreated"] = "taskCreated";
@@ -889,30 +918,30 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
889
918
  RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
890
919
  return RooCodeEventName2;
891
920
  })(RooCodeEventName || {});
892
- var rooCodeEventsSchema = z12.object({
893
- ["message" /* Message */]: z12.tuple([
894
- z12.object({
895
- taskId: z12.string(),
896
- action: z12.union([z12.literal("created"), z12.literal("updated")]),
921
+ var rooCodeEventsSchema = z13.object({
922
+ ["message" /* Message */]: z13.tuple([
923
+ z13.object({
924
+ taskId: z13.string(),
925
+ action: z13.union([z13.literal("created"), z13.literal("updated")]),
897
926
  message: clineMessageSchema
898
927
  })
899
928
  ]),
900
- ["taskCreated" /* TaskCreated */]: z12.tuple([z12.string()]),
901
- ["taskStarted" /* TaskStarted */]: z12.tuple([z12.string()]),
902
- ["taskModeSwitched" /* TaskModeSwitched */]: z12.tuple([z12.string(), z12.string()]),
903
- ["taskPaused" /* TaskPaused */]: z12.tuple([z12.string()]),
904
- ["taskUnpaused" /* TaskUnpaused */]: z12.tuple([z12.string()]),
905
- ["taskAskResponded" /* TaskAskResponded */]: z12.tuple([z12.string()]),
906
- ["taskAborted" /* TaskAborted */]: z12.tuple([z12.string()]),
907
- ["taskSpawned" /* TaskSpawned */]: z12.tuple([z12.string(), z12.string()]),
908
- ["taskCompleted" /* TaskCompleted */]: z12.tuple([z12.string(), tokenUsageSchema, toolUsageSchema]),
909
- ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z12.tuple([z12.string(), tokenUsageSchema]),
910
- ["taskToolFailed" /* TaskToolFailed */]: z12.tuple([z12.string(), toolNamesSchema, z12.string()])
929
+ ["taskCreated" /* TaskCreated */]: z13.tuple([z13.string()]),
930
+ ["taskStarted" /* TaskStarted */]: z13.tuple([z13.string()]),
931
+ ["taskModeSwitched" /* TaskModeSwitched */]: z13.tuple([z13.string(), z13.string()]),
932
+ ["taskPaused" /* TaskPaused */]: z13.tuple([z13.string()]),
933
+ ["taskUnpaused" /* TaskUnpaused */]: z13.tuple([z13.string()]),
934
+ ["taskAskResponded" /* TaskAskResponded */]: z13.tuple([z13.string()]),
935
+ ["taskAborted" /* TaskAborted */]: z13.tuple([z13.string()]),
936
+ ["taskSpawned" /* TaskSpawned */]: z13.tuple([z13.string(), z13.string()]),
937
+ ["taskCompleted" /* TaskCompleted */]: z13.tuple([z13.string(), tokenUsageSchema, toolUsageSchema]),
938
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z13.tuple([z13.string(), tokenUsageSchema]),
939
+ ["taskToolFailed" /* TaskToolFailed */]: z13.tuple([z13.string(), toolNamesSchema, z13.string()])
911
940
  });
912
- var ackSchema = z12.object({
913
- clientId: z12.string(),
914
- pid: z12.number(),
915
- ppid: z12.number()
941
+ var ackSchema = z13.object({
942
+ clientId: z13.string(),
943
+ pid: z13.number(),
944
+ ppid: z13.number()
916
945
  });
917
946
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
918
947
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -920,68 +949,68 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
920
949
  TaskCommandName2["CloseTask"] = "CloseTask";
921
950
  return TaskCommandName2;
922
951
  })(TaskCommandName || {});
923
- var taskCommandSchema = z12.discriminatedUnion("commandName", [
924
- z12.object({
925
- commandName: z12.literal("StartNewTask" /* StartNewTask */),
926
- data: z12.object({
952
+ var taskCommandSchema = z13.discriminatedUnion("commandName", [
953
+ z13.object({
954
+ commandName: z13.literal("StartNewTask" /* StartNewTask */),
955
+ data: z13.object({
927
956
  configuration: rooCodeSettingsSchema,
928
- text: z12.string(),
929
- images: z12.array(z12.string()).optional(),
930
- newTab: z12.boolean().optional()
957
+ text: z13.string(),
958
+ images: z13.array(z13.string()).optional(),
959
+ newTab: z13.boolean().optional()
931
960
  })
932
961
  }),
933
- z12.object({
934
- commandName: z12.literal("CancelTask" /* CancelTask */),
935
- data: z12.string()
962
+ z13.object({
963
+ commandName: z13.literal("CancelTask" /* CancelTask */),
964
+ data: z13.string()
936
965
  }),
937
- z12.object({
938
- commandName: z12.literal("CloseTask" /* CloseTask */),
939
- data: z12.string()
966
+ z13.object({
967
+ commandName: z13.literal("CloseTask" /* CloseTask */),
968
+ data: z13.string()
940
969
  })
941
970
  ]);
942
- var taskEventSchema = z12.discriminatedUnion("eventName", [
943
- z12.object({
944
- eventName: z12.literal("message" /* Message */),
971
+ var taskEventSchema = z13.discriminatedUnion("eventName", [
972
+ z13.object({
973
+ eventName: z13.literal("message" /* Message */),
945
974
  payload: rooCodeEventsSchema.shape["message" /* Message */]
946
975
  }),
947
- z12.object({
948
- eventName: z12.literal("taskCreated" /* TaskCreated */),
976
+ z13.object({
977
+ eventName: z13.literal("taskCreated" /* TaskCreated */),
949
978
  payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */]
950
979
  }),
951
- z12.object({
952
- eventName: z12.literal("taskStarted" /* TaskStarted */),
980
+ z13.object({
981
+ eventName: z13.literal("taskStarted" /* TaskStarted */),
953
982
  payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */]
954
983
  }),
955
- z12.object({
956
- eventName: z12.literal("taskModeSwitched" /* TaskModeSwitched */),
984
+ z13.object({
985
+ eventName: z13.literal("taskModeSwitched" /* TaskModeSwitched */),
957
986
  payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */]
958
987
  }),
959
- z12.object({
960
- eventName: z12.literal("taskPaused" /* TaskPaused */),
988
+ z13.object({
989
+ eventName: z13.literal("taskPaused" /* TaskPaused */),
961
990
  payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */]
962
991
  }),
963
- z12.object({
964
- eventName: z12.literal("taskUnpaused" /* TaskUnpaused */),
992
+ z13.object({
993
+ eventName: z13.literal("taskUnpaused" /* TaskUnpaused */),
965
994
  payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */]
966
995
  }),
967
- z12.object({
968
- eventName: z12.literal("taskAskResponded" /* TaskAskResponded */),
996
+ z13.object({
997
+ eventName: z13.literal("taskAskResponded" /* TaskAskResponded */),
969
998
  payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */]
970
999
  }),
971
- z12.object({
972
- eventName: z12.literal("taskAborted" /* TaskAborted */),
1000
+ z13.object({
1001
+ eventName: z13.literal("taskAborted" /* TaskAborted */),
973
1002
  payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */]
974
1003
  }),
975
- z12.object({
976
- eventName: z12.literal("taskSpawned" /* TaskSpawned */),
1004
+ z13.object({
1005
+ eventName: z13.literal("taskSpawned" /* TaskSpawned */),
977
1006
  payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */]
978
1007
  }),
979
- z12.object({
980
- eventName: z12.literal("taskCompleted" /* TaskCompleted */),
1008
+ z13.object({
1009
+ eventName: z13.literal("taskCompleted" /* TaskCompleted */),
981
1010
  payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */]
982
1011
  }),
983
- z12.object({
984
- eventName: z12.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
1012
+ z13.object({
1013
+ eventName: z13.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
985
1014
  payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]
986
1015
  })
987
1016
  ]);
@@ -998,48 +1027,48 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
998
1027
  IpcOrigin2["Server"] = "server";
999
1028
  return IpcOrigin2;
1000
1029
  })(IpcOrigin || {});
1001
- var ipcMessageSchema = z12.discriminatedUnion("type", [
1002
- z12.object({
1003
- type: z12.literal("Ack" /* Ack */),
1004
- origin: z12.literal("server" /* Server */),
1030
+ var ipcMessageSchema = z13.discriminatedUnion("type", [
1031
+ z13.object({
1032
+ type: z13.literal("Ack" /* Ack */),
1033
+ origin: z13.literal("server" /* Server */),
1005
1034
  data: ackSchema
1006
1035
  }),
1007
- z12.object({
1008
- type: z12.literal("TaskCommand" /* TaskCommand */),
1009
- origin: z12.literal("client" /* Client */),
1010
- clientId: z12.string(),
1036
+ z13.object({
1037
+ type: z13.literal("TaskCommand" /* TaskCommand */),
1038
+ origin: z13.literal("client" /* Client */),
1039
+ clientId: z13.string(),
1011
1040
  data: taskCommandSchema
1012
1041
  }),
1013
- z12.object({
1014
- type: z12.literal("TaskEvent" /* TaskEvent */),
1015
- origin: z12.literal("server" /* Server */),
1016
- relayClientId: z12.string().optional(),
1042
+ z13.object({
1043
+ type: z13.literal("TaskEvent" /* TaskEvent */),
1044
+ origin: z13.literal("server" /* Server */),
1045
+ relayClientId: z13.string().optional(),
1017
1046
  data: taskEventSchema
1018
1047
  })
1019
1048
  ]);
1020
1049
 
1021
1050
  // src/terminal.ts
1022
- import { z as z13 } from "zod";
1023
- var commandExecutionStatusSchema = z13.discriminatedUnion("status", [
1024
- z13.object({
1025
- executionId: z13.string(),
1026
- status: z13.literal("started"),
1027
- pid: z13.number().optional(),
1028
- command: z13.string()
1051
+ import { z as z14 } from "zod";
1052
+ var commandExecutionStatusSchema = z14.discriminatedUnion("status", [
1053
+ z14.object({
1054
+ executionId: z14.string(),
1055
+ status: z14.literal("started"),
1056
+ pid: z14.number().optional(),
1057
+ command: z14.string()
1029
1058
  }),
1030
- z13.object({
1031
- executionId: z13.string(),
1032
- status: z13.literal("output"),
1033
- output: z13.string()
1059
+ z14.object({
1060
+ executionId: z14.string(),
1061
+ status: z14.literal("output"),
1062
+ output: z14.string()
1034
1063
  }),
1035
- z13.object({
1036
- executionId: z13.string(),
1037
- status: z13.literal("exited"),
1038
- exitCode: z13.number().optional()
1064
+ z14.object({
1065
+ executionId: z14.string(),
1066
+ status: z14.literal("exited"),
1067
+ exitCode: z14.number().optional()
1039
1068
  }),
1040
- z13.object({
1041
- executionId: z13.string(),
1042
- status: z13.literal("fallback")
1069
+ z14.object({
1070
+ executionId: z14.string(),
1071
+ status: z14.literal("fallback")
1043
1072
  })
1044
1073
  ]);
1045
1074
  export {
@@ -1047,6 +1076,7 @@ export {
1047
1076
  GLOBAL_STATE_KEYS,
1048
1077
  IpcMessageType,
1049
1078
  IpcOrigin,
1079
+ ORGANIZATION_ALLOW_ALL,
1050
1080
  PROVIDER_SETTINGS_KEYS,
1051
1081
  RooCodeEventName,
1052
1082
  SECRET_STATE_KEYS,
@@ -1088,6 +1118,8 @@ export {
1088
1118
  modelInfoSchema,
1089
1119
  modelParameters,
1090
1120
  modelParametersSchema,
1121
+ organizationAllowListSchema,
1122
+ organizationSettingsSchema,
1091
1123
  promptComponentSchema,
1092
1124
  providerNames,
1093
1125
  providerNamesSchema,