@roo-code/types 1.12.0 → 1.14.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/README.md +38 -15
- package/dist/index.d.mts +9347 -0
- package/dist/index.d.ts +9347 -0
- package/dist/index.js +1213 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1117 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +55 -44
- package/LICENSE +0 -21
- package/src/index.d.ts +0 -1211
- package/src/index.js +0 -875
package/dist/index.js
ADDED
|
@@ -0,0 +1,1213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
GLOBAL_SETTINGS_KEYS: () => GLOBAL_SETTINGS_KEYS,
|
|
24
|
+
GLOBAL_STATE_KEYS: () => GLOBAL_STATE_KEYS,
|
|
25
|
+
IpcMessageType: () => IpcMessageType,
|
|
26
|
+
IpcOrigin: () => IpcOrigin,
|
|
27
|
+
PROVIDER_SETTINGS_KEYS: () => PROVIDER_SETTINGS_KEYS,
|
|
28
|
+
RooCodeEventName: () => RooCodeEventName,
|
|
29
|
+
SECRET_STATE_KEYS: () => SECRET_STATE_KEYS,
|
|
30
|
+
TaskCommandName: () => TaskCommandName,
|
|
31
|
+
TelemetryEventName: () => TelemetryEventName,
|
|
32
|
+
ackSchema: () => ackSchema,
|
|
33
|
+
appPropertiesSchema: () => appPropertiesSchema,
|
|
34
|
+
clineAskSchema: () => clineAskSchema,
|
|
35
|
+
clineAsks: () => clineAsks,
|
|
36
|
+
clineMessageSchema: () => clineMessageSchema,
|
|
37
|
+
clineSaySchema: () => clineSaySchema,
|
|
38
|
+
clineSays: () => clineSays,
|
|
39
|
+
codeActionIds: () => codeActionIds,
|
|
40
|
+
codebaseIndexConfigSchema: () => codebaseIndexConfigSchema,
|
|
41
|
+
codebaseIndexModelsSchema: () => codebaseIndexModelsSchema,
|
|
42
|
+
codebaseIndexProviderSchema: () => codebaseIndexProviderSchema,
|
|
43
|
+
commandExecutionStatusSchema: () => commandExecutionStatusSchema,
|
|
44
|
+
commandIds: () => commandIds,
|
|
45
|
+
contextCondenseSchema: () => contextCondenseSchema,
|
|
46
|
+
customModePromptsSchema: () => customModePromptsSchema,
|
|
47
|
+
customModesSettingsSchema: () => customModesSettingsSchema,
|
|
48
|
+
customSupportPromptsSchema: () => customSupportPromptsSchema,
|
|
49
|
+
experimentIds: () => experimentIds,
|
|
50
|
+
experimentIdsSchema: () => experimentIdsSchema,
|
|
51
|
+
experimentsSchema: () => experimentsSchema,
|
|
52
|
+
globalSettingsSchema: () => globalSettingsSchema,
|
|
53
|
+
groupEntrySchema: () => groupEntrySchema,
|
|
54
|
+
groupOptionsSchema: () => groupOptionsSchema,
|
|
55
|
+
historyItemSchema: () => historyItemSchema,
|
|
56
|
+
ipcMessageSchema: () => ipcMessageSchema,
|
|
57
|
+
isGlobalStateKey: () => isGlobalStateKey,
|
|
58
|
+
isLanguage: () => isLanguage,
|
|
59
|
+
isModelParameter: () => isModelParameter,
|
|
60
|
+
isSecretStateKey: () => isSecretStateKey,
|
|
61
|
+
keysOf: () => keysOf,
|
|
62
|
+
languages: () => languages,
|
|
63
|
+
languagesSchema: () => languagesSchema,
|
|
64
|
+
modeConfigSchema: () => modeConfigSchema,
|
|
65
|
+
modelInfoSchema: () => modelInfoSchema,
|
|
66
|
+
modelParameters: () => modelParameters,
|
|
67
|
+
modelParametersSchema: () => modelParametersSchema,
|
|
68
|
+
promptComponentSchema: () => promptComponentSchema,
|
|
69
|
+
providerNames: () => providerNames,
|
|
70
|
+
providerNamesSchema: () => providerNamesSchema,
|
|
71
|
+
providerSettingsEntrySchema: () => providerSettingsEntrySchema,
|
|
72
|
+
providerSettingsSchema: () => providerSettingsSchema,
|
|
73
|
+
providerSettingsSchemaDiscriminated: () => providerSettingsSchemaDiscriminated,
|
|
74
|
+
reasoningEfforts: () => reasoningEfforts,
|
|
75
|
+
reasoningEffortsSchema: () => reasoningEffortsSchema,
|
|
76
|
+
rooCodeEventsSchema: () => rooCodeEventsSchema,
|
|
77
|
+
rooCodeSettingsSchema: () => rooCodeSettingsSchema,
|
|
78
|
+
rooCodeTelemetryEventSchema: () => rooCodeTelemetryEventSchema,
|
|
79
|
+
taskCommandSchema: () => taskCommandSchema,
|
|
80
|
+
taskEventSchema: () => taskEventSchema,
|
|
81
|
+
taskPropertiesSchema: () => taskPropertiesSchema,
|
|
82
|
+
telemetryPropertiesSchema: () => telemetryPropertiesSchema,
|
|
83
|
+
telemetrySettings: () => telemetrySettings,
|
|
84
|
+
telemetrySettingsSchema: () => telemetrySettingsSchema,
|
|
85
|
+
terminalActionIds: () => terminalActionIds,
|
|
86
|
+
tokenUsageSchema: () => tokenUsageSchema,
|
|
87
|
+
toolGroups: () => toolGroups,
|
|
88
|
+
toolGroupsSchema: () => toolGroupsSchema,
|
|
89
|
+
toolNames: () => toolNames,
|
|
90
|
+
toolNamesSchema: () => toolNamesSchema,
|
|
91
|
+
toolProgressStatusSchema: () => toolProgressStatusSchema,
|
|
92
|
+
toolUsageSchema: () => toolUsageSchema
|
|
93
|
+
});
|
|
94
|
+
module.exports = __toCommonJS(index_exports);
|
|
95
|
+
|
|
96
|
+
// src/codebase-index.ts
|
|
97
|
+
var import_zod = require("zod");
|
|
98
|
+
var codebaseIndexConfigSchema = import_zod.z.object({
|
|
99
|
+
codebaseIndexEnabled: import_zod.z.boolean().optional(),
|
|
100
|
+
codebaseIndexQdrantUrl: import_zod.z.string().optional(),
|
|
101
|
+
codebaseIndexEmbedderProvider: import_zod.z.enum(["openai", "ollama"]).optional(),
|
|
102
|
+
codebaseIndexEmbedderBaseUrl: import_zod.z.string().optional(),
|
|
103
|
+
codebaseIndexEmbedderModelId: import_zod.z.string().optional()
|
|
104
|
+
});
|
|
105
|
+
var codebaseIndexModelsSchema = import_zod.z.object({
|
|
106
|
+
openai: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional(),
|
|
107
|
+
ollama: import_zod.z.record(import_zod.z.string(), import_zod.z.object({ dimension: import_zod.z.number() })).optional()
|
|
108
|
+
});
|
|
109
|
+
var codebaseIndexProviderSchema = import_zod.z.object({
|
|
110
|
+
codeIndexOpenAiKey: import_zod.z.string().optional(),
|
|
111
|
+
codeIndexQdrantApiKey: import_zod.z.string().optional()
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// src/experiment.ts
|
|
115
|
+
var import_zod2 = require("zod");
|
|
116
|
+
var experimentIds = ["autoCondenseContext", "powerSteering"];
|
|
117
|
+
var experimentIdsSchema = import_zod2.z.enum(experimentIds);
|
|
118
|
+
var experimentsSchema = import_zod2.z.object({
|
|
119
|
+
autoCondenseContext: import_zod2.z.boolean(),
|
|
120
|
+
powerSteering: import_zod2.z.boolean()
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
// src/global-settings.ts
|
|
124
|
+
var import_zod10 = require("zod");
|
|
125
|
+
|
|
126
|
+
// src/type-fu.ts
|
|
127
|
+
function keysOf() {
|
|
128
|
+
return (keys) => keys;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// src/provider-settings.ts
|
|
132
|
+
var import_zod4 = require("zod");
|
|
133
|
+
|
|
134
|
+
// src/model.ts
|
|
135
|
+
var import_zod3 = require("zod");
|
|
136
|
+
var reasoningEfforts = ["low", "medium", "high"];
|
|
137
|
+
var reasoningEffortsSchema = import_zod3.z.enum(reasoningEfforts);
|
|
138
|
+
var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
|
|
139
|
+
var modelParametersSchema = import_zod3.z.enum(modelParameters);
|
|
140
|
+
var isModelParameter = (value) => modelParameters.includes(value);
|
|
141
|
+
var modelInfoSchema = import_zod3.z.object({
|
|
142
|
+
maxTokens: import_zod3.z.number().nullish(),
|
|
143
|
+
maxThinkingTokens: import_zod3.z.number().nullish(),
|
|
144
|
+
contextWindow: import_zod3.z.number(),
|
|
145
|
+
supportsImages: import_zod3.z.boolean().optional(),
|
|
146
|
+
supportsComputerUse: import_zod3.z.boolean().optional(),
|
|
147
|
+
supportsPromptCache: import_zod3.z.boolean(),
|
|
148
|
+
supportsReasoningBudget: import_zod3.z.boolean().optional(),
|
|
149
|
+
requiredReasoningBudget: import_zod3.z.boolean().optional(),
|
|
150
|
+
supportsReasoningEffort: import_zod3.z.boolean().optional(),
|
|
151
|
+
supportedParameters: import_zod3.z.array(modelParametersSchema).optional(),
|
|
152
|
+
inputPrice: import_zod3.z.number().optional(),
|
|
153
|
+
outputPrice: import_zod3.z.number().optional(),
|
|
154
|
+
cacheWritesPrice: import_zod3.z.number().optional(),
|
|
155
|
+
cacheReadsPrice: import_zod3.z.number().optional(),
|
|
156
|
+
description: import_zod3.z.string().optional(),
|
|
157
|
+
reasoningEffort: reasoningEffortsSchema.optional(),
|
|
158
|
+
minTokensPerCachePoint: import_zod3.z.number().optional(),
|
|
159
|
+
maxCachePoints: import_zod3.z.number().optional(),
|
|
160
|
+
cachableFields: import_zod3.z.array(import_zod3.z.string()).optional(),
|
|
161
|
+
tiers: import_zod3.z.array(
|
|
162
|
+
import_zod3.z.object({
|
|
163
|
+
contextWindow: import_zod3.z.number(),
|
|
164
|
+
inputPrice: import_zod3.z.number().optional(),
|
|
165
|
+
outputPrice: import_zod3.z.number().optional(),
|
|
166
|
+
cacheWritesPrice: import_zod3.z.number().optional(),
|
|
167
|
+
cacheReadsPrice: import_zod3.z.number().optional()
|
|
168
|
+
})
|
|
169
|
+
).optional()
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// src/provider-settings.ts
|
|
173
|
+
var providerNames = [
|
|
174
|
+
"anthropic",
|
|
175
|
+
"glama",
|
|
176
|
+
"openrouter",
|
|
177
|
+
"bedrock",
|
|
178
|
+
"vertex",
|
|
179
|
+
"openai",
|
|
180
|
+
"ollama",
|
|
181
|
+
"vscode-lm",
|
|
182
|
+
"lmstudio",
|
|
183
|
+
"gemini",
|
|
184
|
+
"openai-native",
|
|
185
|
+
"mistral",
|
|
186
|
+
"deepseek",
|
|
187
|
+
"unbound",
|
|
188
|
+
"requesty",
|
|
189
|
+
"human-relay",
|
|
190
|
+
"fake-ai",
|
|
191
|
+
"xai",
|
|
192
|
+
"groq",
|
|
193
|
+
"chutes",
|
|
194
|
+
"litellm"
|
|
195
|
+
];
|
|
196
|
+
var providerNamesSchema = import_zod4.z.enum(providerNames);
|
|
197
|
+
var providerSettingsEntrySchema = import_zod4.z.object({
|
|
198
|
+
id: import_zod4.z.string(),
|
|
199
|
+
name: import_zod4.z.string(),
|
|
200
|
+
apiProvider: providerNamesSchema.optional()
|
|
201
|
+
});
|
|
202
|
+
var baseProviderSettingsSchema = import_zod4.z.object({
|
|
203
|
+
includeMaxTokens: import_zod4.z.boolean().optional(),
|
|
204
|
+
diffEnabled: import_zod4.z.boolean().optional(),
|
|
205
|
+
fuzzyMatchThreshold: import_zod4.z.number().optional(),
|
|
206
|
+
modelTemperature: import_zod4.z.number().nullish(),
|
|
207
|
+
rateLimitSeconds: import_zod4.z.number().optional(),
|
|
208
|
+
// Model reasoning.
|
|
209
|
+
enableReasoningEffort: import_zod4.z.boolean().optional(),
|
|
210
|
+
reasoningEffort: reasoningEffortsSchema.optional(),
|
|
211
|
+
modelMaxTokens: import_zod4.z.number().optional(),
|
|
212
|
+
modelMaxThinkingTokens: import_zod4.z.number().optional()
|
|
213
|
+
});
|
|
214
|
+
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
215
|
+
apiModelId: import_zod4.z.string().optional()
|
|
216
|
+
});
|
|
217
|
+
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
218
|
+
apiKey: import_zod4.z.string().optional(),
|
|
219
|
+
anthropicBaseUrl: import_zod4.z.string().optional(),
|
|
220
|
+
anthropicUseAuthToken: import_zod4.z.boolean().optional()
|
|
221
|
+
});
|
|
222
|
+
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
223
|
+
glamaModelId: import_zod4.z.string().optional(),
|
|
224
|
+
glamaApiKey: import_zod4.z.string().optional()
|
|
225
|
+
});
|
|
226
|
+
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
227
|
+
openRouterApiKey: import_zod4.z.string().optional(),
|
|
228
|
+
openRouterModelId: import_zod4.z.string().optional(),
|
|
229
|
+
openRouterBaseUrl: import_zod4.z.string().optional(),
|
|
230
|
+
openRouterSpecificProvider: import_zod4.z.string().optional(),
|
|
231
|
+
openRouterUseMiddleOutTransform: import_zod4.z.boolean().optional()
|
|
232
|
+
});
|
|
233
|
+
var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
234
|
+
awsAccessKey: import_zod4.z.string().optional(),
|
|
235
|
+
awsSecretKey: import_zod4.z.string().optional(),
|
|
236
|
+
awsSessionToken: import_zod4.z.string().optional(),
|
|
237
|
+
awsRegion: import_zod4.z.string().optional(),
|
|
238
|
+
awsUseCrossRegionInference: import_zod4.z.boolean().optional(),
|
|
239
|
+
awsUsePromptCache: import_zod4.z.boolean().optional(),
|
|
240
|
+
awsProfile: import_zod4.z.string().optional(),
|
|
241
|
+
awsUseProfile: import_zod4.z.boolean().optional(),
|
|
242
|
+
awsCustomArn: import_zod4.z.string().optional()
|
|
243
|
+
});
|
|
244
|
+
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
245
|
+
vertexKeyFile: import_zod4.z.string().optional(),
|
|
246
|
+
vertexJsonCredentials: import_zod4.z.string().optional(),
|
|
247
|
+
vertexProjectId: import_zod4.z.string().optional(),
|
|
248
|
+
vertexRegion: import_zod4.z.string().optional()
|
|
249
|
+
});
|
|
250
|
+
var openAiSchema = baseProviderSettingsSchema.extend({
|
|
251
|
+
openAiBaseUrl: import_zod4.z.string().optional(),
|
|
252
|
+
openAiApiKey: import_zod4.z.string().optional(),
|
|
253
|
+
openAiLegacyFormat: import_zod4.z.boolean().optional(),
|
|
254
|
+
openAiR1FormatEnabled: import_zod4.z.boolean().optional(),
|
|
255
|
+
openAiModelId: import_zod4.z.string().optional(),
|
|
256
|
+
openAiCustomModelInfo: modelInfoSchema.nullish(),
|
|
257
|
+
openAiUseAzure: import_zod4.z.boolean().optional(),
|
|
258
|
+
azureApiVersion: import_zod4.z.string().optional(),
|
|
259
|
+
openAiStreamingEnabled: import_zod4.z.boolean().optional(),
|
|
260
|
+
openAiHostHeader: import_zod4.z.string().optional(),
|
|
261
|
+
// Keep temporarily for backward compatibility during migration.
|
|
262
|
+
openAiHeaders: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.string()).optional()
|
|
263
|
+
});
|
|
264
|
+
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
265
|
+
ollamaModelId: import_zod4.z.string().optional(),
|
|
266
|
+
ollamaBaseUrl: import_zod4.z.string().optional()
|
|
267
|
+
});
|
|
268
|
+
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
269
|
+
vsCodeLmModelSelector: import_zod4.z.object({
|
|
270
|
+
vendor: import_zod4.z.string().optional(),
|
|
271
|
+
family: import_zod4.z.string().optional(),
|
|
272
|
+
version: import_zod4.z.string().optional(),
|
|
273
|
+
id: import_zod4.z.string().optional()
|
|
274
|
+
}).optional()
|
|
275
|
+
});
|
|
276
|
+
var lmStudioSchema = baseProviderSettingsSchema.extend({
|
|
277
|
+
lmStudioModelId: import_zod4.z.string().optional(),
|
|
278
|
+
lmStudioBaseUrl: import_zod4.z.string().optional(),
|
|
279
|
+
lmStudioDraftModelId: import_zod4.z.string().optional(),
|
|
280
|
+
lmStudioSpeculativeDecodingEnabled: import_zod4.z.boolean().optional()
|
|
281
|
+
});
|
|
282
|
+
var geminiSchema = apiModelIdProviderModelSchema.extend({
|
|
283
|
+
geminiApiKey: import_zod4.z.string().optional(),
|
|
284
|
+
googleGeminiBaseUrl: import_zod4.z.string().optional()
|
|
285
|
+
});
|
|
286
|
+
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
287
|
+
openAiNativeApiKey: import_zod4.z.string().optional(),
|
|
288
|
+
openAiNativeBaseUrl: import_zod4.z.string().optional()
|
|
289
|
+
});
|
|
290
|
+
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
291
|
+
mistralApiKey: import_zod4.z.string().optional(),
|
|
292
|
+
mistralCodestralUrl: import_zod4.z.string().optional()
|
|
293
|
+
});
|
|
294
|
+
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
295
|
+
deepSeekBaseUrl: import_zod4.z.string().optional(),
|
|
296
|
+
deepSeekApiKey: import_zod4.z.string().optional()
|
|
297
|
+
});
|
|
298
|
+
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
299
|
+
unboundApiKey: import_zod4.z.string().optional(),
|
|
300
|
+
unboundModelId: import_zod4.z.string().optional()
|
|
301
|
+
});
|
|
302
|
+
var requestySchema = baseProviderSettingsSchema.extend({
|
|
303
|
+
requestyApiKey: import_zod4.z.string().optional(),
|
|
304
|
+
requestyModelId: import_zod4.z.string().optional()
|
|
305
|
+
});
|
|
306
|
+
var humanRelaySchema = baseProviderSettingsSchema;
|
|
307
|
+
var fakeAiSchema = baseProviderSettingsSchema.extend({
|
|
308
|
+
fakeAi: import_zod4.z.unknown().optional()
|
|
309
|
+
});
|
|
310
|
+
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
311
|
+
xaiApiKey: import_zod4.z.string().optional()
|
|
312
|
+
});
|
|
313
|
+
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
314
|
+
groqApiKey: import_zod4.z.string().optional()
|
|
315
|
+
});
|
|
316
|
+
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
317
|
+
chutesApiKey: import_zod4.z.string().optional()
|
|
318
|
+
});
|
|
319
|
+
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
320
|
+
litellmBaseUrl: import_zod4.z.string().optional(),
|
|
321
|
+
litellmApiKey: import_zod4.z.string().optional(),
|
|
322
|
+
litellmModelId: import_zod4.z.string().optional()
|
|
323
|
+
});
|
|
324
|
+
var defaultSchema = import_zod4.z.object({
|
|
325
|
+
apiProvider: import_zod4.z.undefined()
|
|
326
|
+
});
|
|
327
|
+
var providerSettingsSchemaDiscriminated = import_zod4.z.discriminatedUnion("apiProvider", [
|
|
328
|
+
anthropicSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("anthropic") })),
|
|
329
|
+
glamaSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("glama") })),
|
|
330
|
+
openRouterSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("openrouter") })),
|
|
331
|
+
bedrockSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("bedrock") })),
|
|
332
|
+
vertexSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("vertex") })),
|
|
333
|
+
openAiSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("openai") })),
|
|
334
|
+
ollamaSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("ollama") })),
|
|
335
|
+
vsCodeLmSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("vscode-lm") })),
|
|
336
|
+
lmStudioSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("lmstudio") })),
|
|
337
|
+
geminiSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("gemini") })),
|
|
338
|
+
openAiNativeSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("openai-native") })),
|
|
339
|
+
mistralSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("mistral") })),
|
|
340
|
+
deepSeekSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("deepseek") })),
|
|
341
|
+
unboundSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("unbound") })),
|
|
342
|
+
requestySchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("requesty") })),
|
|
343
|
+
humanRelaySchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("human-relay") })),
|
|
344
|
+
fakeAiSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("fake-ai") })),
|
|
345
|
+
xaiSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("xai") })),
|
|
346
|
+
groqSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("groq") })),
|
|
347
|
+
chutesSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("chutes") })),
|
|
348
|
+
litellmSchema.merge(import_zod4.z.object({ apiProvider: import_zod4.z.literal("litellm") })),
|
|
349
|
+
defaultSchema
|
|
350
|
+
]);
|
|
351
|
+
var providerSettingsSchema = import_zod4.z.object({
|
|
352
|
+
apiProvider: providerNamesSchema.optional(),
|
|
353
|
+
...anthropicSchema.shape,
|
|
354
|
+
...glamaSchema.shape,
|
|
355
|
+
...openRouterSchema.shape,
|
|
356
|
+
...bedrockSchema.shape,
|
|
357
|
+
...vertexSchema.shape,
|
|
358
|
+
...openAiSchema.shape,
|
|
359
|
+
...ollamaSchema.shape,
|
|
360
|
+
...vsCodeLmSchema.shape,
|
|
361
|
+
...lmStudioSchema.shape,
|
|
362
|
+
...geminiSchema.shape,
|
|
363
|
+
...openAiNativeSchema.shape,
|
|
364
|
+
...mistralSchema.shape,
|
|
365
|
+
...deepSeekSchema.shape,
|
|
366
|
+
...unboundSchema.shape,
|
|
367
|
+
...requestySchema.shape,
|
|
368
|
+
...humanRelaySchema.shape,
|
|
369
|
+
...fakeAiSchema.shape,
|
|
370
|
+
...xaiSchema.shape,
|
|
371
|
+
...groqSchema.shape,
|
|
372
|
+
...chutesSchema.shape,
|
|
373
|
+
...litellmSchema.shape,
|
|
374
|
+
...codebaseIndexProviderSchema.shape
|
|
375
|
+
});
|
|
376
|
+
var PROVIDER_SETTINGS_KEYS = keysOf()([
|
|
377
|
+
"apiProvider",
|
|
378
|
+
// Anthropic
|
|
379
|
+
"apiModelId",
|
|
380
|
+
"apiKey",
|
|
381
|
+
"anthropicBaseUrl",
|
|
382
|
+
"anthropicUseAuthToken",
|
|
383
|
+
// Glama
|
|
384
|
+
"glamaModelId",
|
|
385
|
+
"glamaApiKey",
|
|
386
|
+
// OpenRouter
|
|
387
|
+
"openRouterApiKey",
|
|
388
|
+
"openRouterModelId",
|
|
389
|
+
"openRouterBaseUrl",
|
|
390
|
+
"openRouterSpecificProvider",
|
|
391
|
+
"openRouterUseMiddleOutTransform",
|
|
392
|
+
// Amazon Bedrock
|
|
393
|
+
"awsAccessKey",
|
|
394
|
+
"awsSecretKey",
|
|
395
|
+
"awsSessionToken",
|
|
396
|
+
"awsRegion",
|
|
397
|
+
"awsUseCrossRegionInference",
|
|
398
|
+
"awsUsePromptCache",
|
|
399
|
+
"awsProfile",
|
|
400
|
+
"awsUseProfile",
|
|
401
|
+
"awsCustomArn",
|
|
402
|
+
// Google Vertex
|
|
403
|
+
"vertexKeyFile",
|
|
404
|
+
"vertexJsonCredentials",
|
|
405
|
+
"vertexProjectId",
|
|
406
|
+
"vertexRegion",
|
|
407
|
+
// OpenAI
|
|
408
|
+
"openAiBaseUrl",
|
|
409
|
+
"openAiApiKey",
|
|
410
|
+
"openAiLegacyFormat",
|
|
411
|
+
"openAiR1FormatEnabled",
|
|
412
|
+
"openAiModelId",
|
|
413
|
+
"openAiCustomModelInfo",
|
|
414
|
+
"openAiUseAzure",
|
|
415
|
+
"azureApiVersion",
|
|
416
|
+
"openAiStreamingEnabled",
|
|
417
|
+
"openAiHostHeader",
|
|
418
|
+
// Keep temporarily for backward compatibility during migration.
|
|
419
|
+
"openAiHeaders",
|
|
420
|
+
// Ollama
|
|
421
|
+
"ollamaModelId",
|
|
422
|
+
"ollamaBaseUrl",
|
|
423
|
+
// VS Code LM
|
|
424
|
+
"vsCodeLmModelSelector",
|
|
425
|
+
"lmStudioModelId",
|
|
426
|
+
"lmStudioBaseUrl",
|
|
427
|
+
"lmStudioDraftModelId",
|
|
428
|
+
"lmStudioSpeculativeDecodingEnabled",
|
|
429
|
+
// Gemini
|
|
430
|
+
"geminiApiKey",
|
|
431
|
+
"googleGeminiBaseUrl",
|
|
432
|
+
// OpenAI Native
|
|
433
|
+
"openAiNativeApiKey",
|
|
434
|
+
"openAiNativeBaseUrl",
|
|
435
|
+
// Mistral
|
|
436
|
+
"mistralApiKey",
|
|
437
|
+
"mistralCodestralUrl",
|
|
438
|
+
// DeepSeek
|
|
439
|
+
"deepSeekBaseUrl",
|
|
440
|
+
"deepSeekApiKey",
|
|
441
|
+
// Unbound
|
|
442
|
+
"unboundApiKey",
|
|
443
|
+
"unboundModelId",
|
|
444
|
+
// Requesty
|
|
445
|
+
"requestyApiKey",
|
|
446
|
+
"requestyModelId",
|
|
447
|
+
// Code Index
|
|
448
|
+
"codeIndexOpenAiKey",
|
|
449
|
+
"codeIndexQdrantApiKey",
|
|
450
|
+
// Reasoning
|
|
451
|
+
"enableReasoningEffort",
|
|
452
|
+
"reasoningEffort",
|
|
453
|
+
"modelMaxTokens",
|
|
454
|
+
"modelMaxThinkingTokens",
|
|
455
|
+
// Generic
|
|
456
|
+
"includeMaxTokens",
|
|
457
|
+
"diffEnabled",
|
|
458
|
+
"fuzzyMatchThreshold",
|
|
459
|
+
"modelTemperature",
|
|
460
|
+
"rateLimitSeconds",
|
|
461
|
+
// Fake AI
|
|
462
|
+
"fakeAi",
|
|
463
|
+
// X.AI (Grok)
|
|
464
|
+
"xaiApiKey",
|
|
465
|
+
// Groq
|
|
466
|
+
"groqApiKey",
|
|
467
|
+
// Chutes AI
|
|
468
|
+
"chutesApiKey",
|
|
469
|
+
// LiteLLM
|
|
470
|
+
"litellmBaseUrl",
|
|
471
|
+
"litellmApiKey",
|
|
472
|
+
"litellmModelId"
|
|
473
|
+
]);
|
|
474
|
+
|
|
475
|
+
// src/history.ts
|
|
476
|
+
var import_zod5 = require("zod");
|
|
477
|
+
var historyItemSchema = import_zod5.z.object({
|
|
478
|
+
id: import_zod5.z.string(),
|
|
479
|
+
number: import_zod5.z.number(),
|
|
480
|
+
ts: import_zod5.z.number(),
|
|
481
|
+
task: import_zod5.z.string(),
|
|
482
|
+
tokensIn: import_zod5.z.number(),
|
|
483
|
+
tokensOut: import_zod5.z.number(),
|
|
484
|
+
cacheWrites: import_zod5.z.number().optional(),
|
|
485
|
+
cacheReads: import_zod5.z.number().optional(),
|
|
486
|
+
totalCost: import_zod5.z.number(),
|
|
487
|
+
size: import_zod5.z.number().optional(),
|
|
488
|
+
workspace: import_zod5.z.string().optional()
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
// src/telemetry.ts
|
|
492
|
+
var import_zod6 = require("zod");
|
|
493
|
+
var telemetrySettings = ["unset", "enabled", "disabled"];
|
|
494
|
+
var telemetrySettingsSchema = import_zod6.z.enum(telemetrySettings);
|
|
495
|
+
var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
496
|
+
TelemetryEventName2["TASK_CREATED"] = "Task Created";
|
|
497
|
+
TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
|
|
498
|
+
TelemetryEventName2["TASK_COMPLETED"] = "Task Completed";
|
|
499
|
+
TelemetryEventName2["TASK_CONVERSATION_MESSAGE"] = "Conversation Message";
|
|
500
|
+
TelemetryEventName2["LLM_COMPLETION"] = "LLM Completion";
|
|
501
|
+
TelemetryEventName2["MODE_SWITCH"] = "Mode Switched";
|
|
502
|
+
TelemetryEventName2["TOOL_USED"] = "Tool Used";
|
|
503
|
+
TelemetryEventName2["CHECKPOINT_CREATED"] = "Checkpoint Created";
|
|
504
|
+
TelemetryEventName2["CHECKPOINT_RESTORED"] = "Checkpoint Restored";
|
|
505
|
+
TelemetryEventName2["CHECKPOINT_DIFFED"] = "Checkpoint Diffed";
|
|
506
|
+
TelemetryEventName2["CONTEXT_CONDENSED"] = "Context Condensed";
|
|
507
|
+
TelemetryEventName2["SLIDING_WINDOW_TRUNCATION"] = "Sliding Window Truncation";
|
|
508
|
+
TelemetryEventName2["CODE_ACTION_USED"] = "Code Action Used";
|
|
509
|
+
TelemetryEventName2["PROMPT_ENHANCED"] = "Prompt Enhanced";
|
|
510
|
+
TelemetryEventName2["TITLE_BUTTON_CLICKED"] = "Title Button Clicked";
|
|
511
|
+
TelemetryEventName2["AUTHENTICATION_INITIATED"] = "Authentication Initiated";
|
|
512
|
+
TelemetryEventName2["SCHEMA_VALIDATION_ERROR"] = "Schema Validation Error";
|
|
513
|
+
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
514
|
+
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
515
|
+
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
516
|
+
return TelemetryEventName2;
|
|
517
|
+
})(TelemetryEventName || {});
|
|
518
|
+
var appPropertiesSchema = import_zod6.z.object({
|
|
519
|
+
appVersion: import_zod6.z.string(),
|
|
520
|
+
vscodeVersion: import_zod6.z.string(),
|
|
521
|
+
platform: import_zod6.z.string(),
|
|
522
|
+
editorName: import_zod6.z.string(),
|
|
523
|
+
language: import_zod6.z.string(),
|
|
524
|
+
mode: import_zod6.z.string()
|
|
525
|
+
});
|
|
526
|
+
var taskPropertiesSchema = import_zod6.z.object({
|
|
527
|
+
taskId: import_zod6.z.string().optional(),
|
|
528
|
+
apiProvider: import_zod6.z.enum(providerNames).optional(),
|
|
529
|
+
modelId: import_zod6.z.string().optional(),
|
|
530
|
+
diffStrategy: import_zod6.z.string().optional(),
|
|
531
|
+
isSubtask: import_zod6.z.boolean().optional()
|
|
532
|
+
});
|
|
533
|
+
var telemetryPropertiesSchema = import_zod6.z.object({
|
|
534
|
+
...appPropertiesSchema.shape,
|
|
535
|
+
...taskPropertiesSchema.shape
|
|
536
|
+
});
|
|
537
|
+
var completionPropertiesSchema = import_zod6.z.object({
|
|
538
|
+
inputTokens: import_zod6.z.number(),
|
|
539
|
+
outputTokens: import_zod6.z.number(),
|
|
540
|
+
cacheReadTokens: import_zod6.z.number().optional(),
|
|
541
|
+
cacheWriteTokens: import_zod6.z.number().optional(),
|
|
542
|
+
cost: import_zod6.z.number().optional()
|
|
543
|
+
});
|
|
544
|
+
var rooCodeTelemetryEventSchema = import_zod6.z.discriminatedUnion("type", [
|
|
545
|
+
import_zod6.z.object({
|
|
546
|
+
type: import_zod6.z.enum([
|
|
547
|
+
"Task Created" /* TASK_CREATED */,
|
|
548
|
+
"Task Reopened" /* TASK_RESTARTED */,
|
|
549
|
+
"Task Completed" /* TASK_COMPLETED */,
|
|
550
|
+
"Conversation Message" /* TASK_CONVERSATION_MESSAGE */,
|
|
551
|
+
"Mode Switched" /* MODE_SWITCH */,
|
|
552
|
+
"Tool Used" /* TOOL_USED */,
|
|
553
|
+
"Checkpoint Created" /* CHECKPOINT_CREATED */,
|
|
554
|
+
"Checkpoint Restored" /* CHECKPOINT_RESTORED */,
|
|
555
|
+
"Checkpoint Diffed" /* CHECKPOINT_DIFFED */,
|
|
556
|
+
"Code Action Used" /* CODE_ACTION_USED */,
|
|
557
|
+
"Prompt Enhanced" /* PROMPT_ENHANCED */,
|
|
558
|
+
"Title Button Clicked" /* TITLE_BUTTON_CLICKED */,
|
|
559
|
+
"Authentication Initiated" /* AUTHENTICATION_INITIATED */,
|
|
560
|
+
"Schema Validation Error" /* SCHEMA_VALIDATION_ERROR */,
|
|
561
|
+
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
562
|
+
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
563
|
+
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */
|
|
564
|
+
]),
|
|
565
|
+
properties: import_zod6.z.object({
|
|
566
|
+
...appPropertiesSchema.shape,
|
|
567
|
+
...taskPropertiesSchema.shape
|
|
568
|
+
})
|
|
569
|
+
}),
|
|
570
|
+
import_zod6.z.object({
|
|
571
|
+
type: import_zod6.z.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
572
|
+
properties: import_zod6.z.object({
|
|
573
|
+
...appPropertiesSchema.shape,
|
|
574
|
+
...taskPropertiesSchema.shape,
|
|
575
|
+
...completionPropertiesSchema.shape
|
|
576
|
+
})
|
|
577
|
+
})
|
|
578
|
+
]);
|
|
579
|
+
|
|
580
|
+
// src/mode.ts
|
|
581
|
+
var import_zod8 = require("zod");
|
|
582
|
+
|
|
583
|
+
// src/tool.ts
|
|
584
|
+
var import_zod7 = require("zod");
|
|
585
|
+
var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
|
|
586
|
+
var toolGroupsSchema = import_zod7.z.enum(toolGroups);
|
|
587
|
+
var toolNames = [
|
|
588
|
+
"execute_command",
|
|
589
|
+
"read_file",
|
|
590
|
+
"write_to_file",
|
|
591
|
+
"apply_diff",
|
|
592
|
+
"insert_content",
|
|
593
|
+
"search_and_replace",
|
|
594
|
+
"search_files",
|
|
595
|
+
"list_files",
|
|
596
|
+
"list_code_definition_names",
|
|
597
|
+
"browser_action",
|
|
598
|
+
"use_mcp_tool",
|
|
599
|
+
"access_mcp_resource",
|
|
600
|
+
"ask_followup_question",
|
|
601
|
+
"attempt_completion",
|
|
602
|
+
"switch_mode",
|
|
603
|
+
"new_task",
|
|
604
|
+
"fetch_instructions",
|
|
605
|
+
"codebase_search"
|
|
606
|
+
];
|
|
607
|
+
var toolNamesSchema = import_zod7.z.enum(toolNames);
|
|
608
|
+
var toolUsageSchema = import_zod7.z.record(
|
|
609
|
+
toolNamesSchema,
|
|
610
|
+
import_zod7.z.object({
|
|
611
|
+
attempts: import_zod7.z.number(),
|
|
612
|
+
failures: import_zod7.z.number()
|
|
613
|
+
})
|
|
614
|
+
);
|
|
615
|
+
|
|
616
|
+
// src/mode.ts
|
|
617
|
+
var groupOptionsSchema = import_zod8.z.object({
|
|
618
|
+
fileRegex: import_zod8.z.string().optional().refine(
|
|
619
|
+
(pattern) => {
|
|
620
|
+
if (!pattern) {
|
|
621
|
+
return true;
|
|
622
|
+
}
|
|
623
|
+
try {
|
|
624
|
+
new RegExp(pattern);
|
|
625
|
+
return true;
|
|
626
|
+
} catch {
|
|
627
|
+
return false;
|
|
628
|
+
}
|
|
629
|
+
},
|
|
630
|
+
{ message: "Invalid regular expression pattern" }
|
|
631
|
+
),
|
|
632
|
+
description: import_zod8.z.string().optional()
|
|
633
|
+
});
|
|
634
|
+
var groupEntrySchema = import_zod8.z.union([toolGroupsSchema, import_zod8.z.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
635
|
+
var groupEntryArraySchema = import_zod8.z.array(groupEntrySchema).refine(
|
|
636
|
+
(groups) => {
|
|
637
|
+
const seen = /* @__PURE__ */ new Set();
|
|
638
|
+
return groups.every((group) => {
|
|
639
|
+
const groupName = Array.isArray(group) ? group[0] : group;
|
|
640
|
+
if (seen.has(groupName)) {
|
|
641
|
+
return false;
|
|
642
|
+
}
|
|
643
|
+
seen.add(groupName);
|
|
644
|
+
return true;
|
|
645
|
+
});
|
|
646
|
+
},
|
|
647
|
+
{ message: "Duplicate groups are not allowed" }
|
|
648
|
+
);
|
|
649
|
+
var modeConfigSchema = import_zod8.z.object({
|
|
650
|
+
slug: import_zod8.z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
651
|
+
name: import_zod8.z.string().min(1, "Name is required"),
|
|
652
|
+
roleDefinition: import_zod8.z.string().min(1, "Role definition is required"),
|
|
653
|
+
whenToUse: import_zod8.z.string().optional(),
|
|
654
|
+
customInstructions: import_zod8.z.string().optional(),
|
|
655
|
+
groups: groupEntryArraySchema,
|
|
656
|
+
source: import_zod8.z.enum(["global", "project"]).optional()
|
|
657
|
+
});
|
|
658
|
+
var customModesSettingsSchema = import_zod8.z.object({
|
|
659
|
+
customModes: import_zod8.z.array(modeConfigSchema).refine(
|
|
660
|
+
(modes) => {
|
|
661
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
662
|
+
return modes.every((mode) => {
|
|
663
|
+
if (slugs.has(mode.slug)) {
|
|
664
|
+
return false;
|
|
665
|
+
}
|
|
666
|
+
slugs.add(mode.slug);
|
|
667
|
+
return true;
|
|
668
|
+
});
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
message: "Duplicate mode slugs are not allowed"
|
|
672
|
+
}
|
|
673
|
+
)
|
|
674
|
+
});
|
|
675
|
+
var promptComponentSchema = import_zod8.z.object({
|
|
676
|
+
roleDefinition: import_zod8.z.string().optional(),
|
|
677
|
+
whenToUse: import_zod8.z.string().optional(),
|
|
678
|
+
customInstructions: import_zod8.z.string().optional()
|
|
679
|
+
});
|
|
680
|
+
var customModePromptsSchema = import_zod8.z.record(import_zod8.z.string(), promptComponentSchema.optional());
|
|
681
|
+
var customSupportPromptsSchema = import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string().optional());
|
|
682
|
+
|
|
683
|
+
// src/vscode.ts
|
|
684
|
+
var import_zod9 = require("zod");
|
|
685
|
+
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
686
|
+
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
687
|
+
var commandIds = [
|
|
688
|
+
"activationCompleted",
|
|
689
|
+
"plusButtonClicked",
|
|
690
|
+
"promptsButtonClicked",
|
|
691
|
+
"mcpButtonClicked",
|
|
692
|
+
"historyButtonClicked",
|
|
693
|
+
"popoutButtonClicked",
|
|
694
|
+
"settingsButtonClicked",
|
|
695
|
+
"openInNewTab",
|
|
696
|
+
"showHumanRelayDialog",
|
|
697
|
+
"registerHumanRelayCallback",
|
|
698
|
+
"unregisterHumanRelayCallback",
|
|
699
|
+
"handleHumanRelayResponse",
|
|
700
|
+
"newTask",
|
|
701
|
+
"setCustomStoragePath",
|
|
702
|
+
"focusInput",
|
|
703
|
+
"acceptInput"
|
|
704
|
+
];
|
|
705
|
+
var languages = [
|
|
706
|
+
"ca",
|
|
707
|
+
"de",
|
|
708
|
+
"en",
|
|
709
|
+
"es",
|
|
710
|
+
"fr",
|
|
711
|
+
"hi",
|
|
712
|
+
"it",
|
|
713
|
+
"ja",
|
|
714
|
+
"ko",
|
|
715
|
+
"nl",
|
|
716
|
+
"pl",
|
|
717
|
+
"pt-BR",
|
|
718
|
+
"ru",
|
|
719
|
+
"tr",
|
|
720
|
+
"vi",
|
|
721
|
+
"zh-CN",
|
|
722
|
+
"zh-TW"
|
|
723
|
+
];
|
|
724
|
+
var languagesSchema = import_zod9.z.enum(languages);
|
|
725
|
+
var isLanguage = (value) => languages.includes(value);
|
|
726
|
+
|
|
727
|
+
// src/global-settings.ts
|
|
728
|
+
var globalSettingsSchema = import_zod10.z.object({
|
|
729
|
+
currentApiConfigName: import_zod10.z.string().optional(),
|
|
730
|
+
listApiConfigMeta: import_zod10.z.array(providerSettingsEntrySchema).optional(),
|
|
731
|
+
pinnedApiConfigs: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.boolean()).optional(),
|
|
732
|
+
lastShownAnnouncementId: import_zod10.z.string().optional(),
|
|
733
|
+
customInstructions: import_zod10.z.string().optional(),
|
|
734
|
+
taskHistory: import_zod10.z.array(historyItemSchema).optional(),
|
|
735
|
+
condensingApiConfigId: import_zod10.z.string().optional(),
|
|
736
|
+
customCondensingPrompt: import_zod10.z.string().optional(),
|
|
737
|
+
autoApprovalEnabled: import_zod10.z.boolean().optional(),
|
|
738
|
+
alwaysAllowReadOnly: import_zod10.z.boolean().optional(),
|
|
739
|
+
alwaysAllowReadOnlyOutsideWorkspace: import_zod10.z.boolean().optional(),
|
|
740
|
+
alwaysAllowWrite: import_zod10.z.boolean().optional(),
|
|
741
|
+
alwaysAllowWriteOutsideWorkspace: import_zod10.z.boolean().optional(),
|
|
742
|
+
writeDelayMs: import_zod10.z.number().optional(),
|
|
743
|
+
alwaysAllowBrowser: import_zod10.z.boolean().optional(),
|
|
744
|
+
alwaysApproveResubmit: import_zod10.z.boolean().optional(),
|
|
745
|
+
requestDelaySeconds: import_zod10.z.number().optional(),
|
|
746
|
+
alwaysAllowMcp: import_zod10.z.boolean().optional(),
|
|
747
|
+
alwaysAllowModeSwitch: import_zod10.z.boolean().optional(),
|
|
748
|
+
alwaysAllowSubtasks: import_zod10.z.boolean().optional(),
|
|
749
|
+
alwaysAllowExecute: import_zod10.z.boolean().optional(),
|
|
750
|
+
allowedCommands: import_zod10.z.array(import_zod10.z.string()).optional(),
|
|
751
|
+
allowedMaxRequests: import_zod10.z.number().nullish(),
|
|
752
|
+
autoCondenseContextPercent: import_zod10.z.number().optional(),
|
|
753
|
+
browserToolEnabled: import_zod10.z.boolean().optional(),
|
|
754
|
+
browserViewportSize: import_zod10.z.string().optional(),
|
|
755
|
+
screenshotQuality: import_zod10.z.number().optional(),
|
|
756
|
+
remoteBrowserEnabled: import_zod10.z.boolean().optional(),
|
|
757
|
+
remoteBrowserHost: import_zod10.z.string().optional(),
|
|
758
|
+
cachedChromeHostUrl: import_zod10.z.string().optional(),
|
|
759
|
+
enableCheckpoints: import_zod10.z.boolean().optional(),
|
|
760
|
+
ttsEnabled: import_zod10.z.boolean().optional(),
|
|
761
|
+
ttsSpeed: import_zod10.z.number().optional(),
|
|
762
|
+
soundEnabled: import_zod10.z.boolean().optional(),
|
|
763
|
+
soundVolume: import_zod10.z.number().optional(),
|
|
764
|
+
maxOpenTabsContext: import_zod10.z.number().optional(),
|
|
765
|
+
maxWorkspaceFiles: import_zod10.z.number().optional(),
|
|
766
|
+
showRooIgnoredFiles: import_zod10.z.boolean().optional(),
|
|
767
|
+
maxReadFileLine: import_zod10.z.number().optional(),
|
|
768
|
+
terminalOutputLineLimit: import_zod10.z.number().optional(),
|
|
769
|
+
terminalShellIntegrationTimeout: import_zod10.z.number().optional(),
|
|
770
|
+
terminalShellIntegrationDisabled: import_zod10.z.boolean().optional(),
|
|
771
|
+
terminalCommandDelay: import_zod10.z.number().optional(),
|
|
772
|
+
terminalPowershellCounter: import_zod10.z.boolean().optional(),
|
|
773
|
+
terminalZshClearEolMark: import_zod10.z.boolean().optional(),
|
|
774
|
+
terminalZshOhMy: import_zod10.z.boolean().optional(),
|
|
775
|
+
terminalZshP10k: import_zod10.z.boolean().optional(),
|
|
776
|
+
terminalZdotdir: import_zod10.z.boolean().optional(),
|
|
777
|
+
terminalCompressProgressBar: import_zod10.z.boolean().optional(),
|
|
778
|
+
rateLimitSeconds: import_zod10.z.number().optional(),
|
|
779
|
+
diffEnabled: import_zod10.z.boolean().optional(),
|
|
780
|
+
fuzzyMatchThreshold: import_zod10.z.number().optional(),
|
|
781
|
+
experiments: experimentsSchema.optional(),
|
|
782
|
+
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
783
|
+
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
784
|
+
language: languagesSchema.optional(),
|
|
785
|
+
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
786
|
+
mcpEnabled: import_zod10.z.boolean().optional(),
|
|
787
|
+
enableMcpServerCreation: import_zod10.z.boolean().optional(),
|
|
788
|
+
mode: import_zod10.z.string().optional(),
|
|
789
|
+
modeApiConfigs: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.string()).optional(),
|
|
790
|
+
customModes: import_zod10.z.array(modeConfigSchema).optional(),
|
|
791
|
+
customModePrompts: customModePromptsSchema.optional(),
|
|
792
|
+
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
793
|
+
enhancementApiConfigId: import_zod10.z.string().optional(),
|
|
794
|
+
historyPreviewCollapsed: import_zod10.z.boolean().optional()
|
|
795
|
+
});
|
|
796
|
+
var GLOBAL_SETTINGS_KEYS = keysOf()([
|
|
797
|
+
"currentApiConfigName",
|
|
798
|
+
"listApiConfigMeta",
|
|
799
|
+
"pinnedApiConfigs",
|
|
800
|
+
"lastShownAnnouncementId",
|
|
801
|
+
"customInstructions",
|
|
802
|
+
"taskHistory",
|
|
803
|
+
"condensingApiConfigId",
|
|
804
|
+
"customCondensingPrompt",
|
|
805
|
+
"autoApprovalEnabled",
|
|
806
|
+
"alwaysAllowReadOnly",
|
|
807
|
+
"alwaysAllowReadOnlyOutsideWorkspace",
|
|
808
|
+
"alwaysAllowWrite",
|
|
809
|
+
"alwaysAllowWriteOutsideWorkspace",
|
|
810
|
+
"writeDelayMs",
|
|
811
|
+
"alwaysAllowBrowser",
|
|
812
|
+
"alwaysApproveResubmit",
|
|
813
|
+
"requestDelaySeconds",
|
|
814
|
+
"alwaysAllowMcp",
|
|
815
|
+
"alwaysAllowModeSwitch",
|
|
816
|
+
"alwaysAllowSubtasks",
|
|
817
|
+
"alwaysAllowExecute",
|
|
818
|
+
"allowedCommands",
|
|
819
|
+
"allowedMaxRequests",
|
|
820
|
+
"autoCondenseContextPercent",
|
|
821
|
+
"browserToolEnabled",
|
|
822
|
+
"browserViewportSize",
|
|
823
|
+
"screenshotQuality",
|
|
824
|
+
"remoteBrowserEnabled",
|
|
825
|
+
"remoteBrowserHost",
|
|
826
|
+
"enableCheckpoints",
|
|
827
|
+
"ttsEnabled",
|
|
828
|
+
"ttsSpeed",
|
|
829
|
+
"soundEnabled",
|
|
830
|
+
"soundVolume",
|
|
831
|
+
"maxOpenTabsContext",
|
|
832
|
+
"maxWorkspaceFiles",
|
|
833
|
+
"showRooIgnoredFiles",
|
|
834
|
+
"maxReadFileLine",
|
|
835
|
+
"terminalOutputLineLimit",
|
|
836
|
+
"terminalShellIntegrationTimeout",
|
|
837
|
+
"terminalShellIntegrationDisabled",
|
|
838
|
+
"terminalCommandDelay",
|
|
839
|
+
"terminalPowershellCounter",
|
|
840
|
+
"terminalZshClearEolMark",
|
|
841
|
+
"terminalZshOhMy",
|
|
842
|
+
"terminalZshP10k",
|
|
843
|
+
"terminalZdotdir",
|
|
844
|
+
"terminalCompressProgressBar",
|
|
845
|
+
"rateLimitSeconds",
|
|
846
|
+
"diffEnabled",
|
|
847
|
+
"fuzzyMatchThreshold",
|
|
848
|
+
"experiments",
|
|
849
|
+
"codebaseIndexModels",
|
|
850
|
+
"codebaseIndexConfig",
|
|
851
|
+
"language",
|
|
852
|
+
"telemetrySetting",
|
|
853
|
+
"mcpEnabled",
|
|
854
|
+
"enableMcpServerCreation",
|
|
855
|
+
"mode",
|
|
856
|
+
"modeApiConfigs",
|
|
857
|
+
"customModes",
|
|
858
|
+
"customModePrompts",
|
|
859
|
+
"customSupportPrompts",
|
|
860
|
+
"enhancementApiConfigId",
|
|
861
|
+
"cachedChromeHostUrl",
|
|
862
|
+
"historyPreviewCollapsed"
|
|
863
|
+
]);
|
|
864
|
+
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
865
|
+
var SECRET_STATE_KEYS = keysOf()([
|
|
866
|
+
"apiKey",
|
|
867
|
+
"glamaApiKey",
|
|
868
|
+
"openRouterApiKey",
|
|
869
|
+
"awsAccessKey",
|
|
870
|
+
"awsSecretKey",
|
|
871
|
+
"awsSessionToken",
|
|
872
|
+
"openAiApiKey",
|
|
873
|
+
"geminiApiKey",
|
|
874
|
+
"openAiNativeApiKey",
|
|
875
|
+
"deepSeekApiKey",
|
|
876
|
+
"mistralApiKey",
|
|
877
|
+
"unboundApiKey",
|
|
878
|
+
"requestyApiKey",
|
|
879
|
+
"xaiApiKey",
|
|
880
|
+
"groqApiKey",
|
|
881
|
+
"chutesApiKey",
|
|
882
|
+
"litellmApiKey",
|
|
883
|
+
"codeIndexOpenAiKey",
|
|
884
|
+
"codeIndexQdrantApiKey"
|
|
885
|
+
]);
|
|
886
|
+
var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
|
|
887
|
+
var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
|
|
888
|
+
(key) => !SECRET_STATE_KEYS.includes(key)
|
|
889
|
+
);
|
|
890
|
+
var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
891
|
+
|
|
892
|
+
// src/ipc.ts
|
|
893
|
+
var import_zod12 = require("zod");
|
|
894
|
+
|
|
895
|
+
// src/message.ts
|
|
896
|
+
var import_zod11 = require("zod");
|
|
897
|
+
var clineAsks = [
|
|
898
|
+
"followup",
|
|
899
|
+
"command",
|
|
900
|
+
"command_output",
|
|
901
|
+
"completion_result",
|
|
902
|
+
"tool",
|
|
903
|
+
"api_req_failed",
|
|
904
|
+
"resume_task",
|
|
905
|
+
"resume_completed_task",
|
|
906
|
+
"mistake_limit_reached",
|
|
907
|
+
"browser_action_launch",
|
|
908
|
+
"use_mcp_server",
|
|
909
|
+
"auto_approval_max_req_reached"
|
|
910
|
+
];
|
|
911
|
+
var clineAskSchema = import_zod11.z.enum(clineAsks);
|
|
912
|
+
var clineSays = [
|
|
913
|
+
"error",
|
|
914
|
+
"api_req_started",
|
|
915
|
+
"api_req_finished",
|
|
916
|
+
"api_req_retried",
|
|
917
|
+
"api_req_retry_delayed",
|
|
918
|
+
"api_req_deleted",
|
|
919
|
+
"text",
|
|
920
|
+
"reasoning",
|
|
921
|
+
"completion_result",
|
|
922
|
+
"user_feedback",
|
|
923
|
+
"user_feedback_diff",
|
|
924
|
+
"command_output",
|
|
925
|
+
"shell_integration_warning",
|
|
926
|
+
"browser_action",
|
|
927
|
+
"browser_action_result",
|
|
928
|
+
"mcp_server_request_started",
|
|
929
|
+
"mcp_server_response",
|
|
930
|
+
"subtask_result",
|
|
931
|
+
"checkpoint_saved",
|
|
932
|
+
"rooignore_error",
|
|
933
|
+
"diff_error",
|
|
934
|
+
"condense_context",
|
|
935
|
+
"codebase_search_result"
|
|
936
|
+
];
|
|
937
|
+
var clineSaySchema = import_zod11.z.enum(clineSays);
|
|
938
|
+
var toolProgressStatusSchema = import_zod11.z.object({
|
|
939
|
+
icon: import_zod11.z.string().optional(),
|
|
940
|
+
text: import_zod11.z.string().optional()
|
|
941
|
+
});
|
|
942
|
+
var contextCondenseSchema = import_zod11.z.object({
|
|
943
|
+
cost: import_zod11.z.number(),
|
|
944
|
+
prevContextTokens: import_zod11.z.number(),
|
|
945
|
+
newContextTokens: import_zod11.z.number(),
|
|
946
|
+
summary: import_zod11.z.string()
|
|
947
|
+
});
|
|
948
|
+
var clineMessageSchema = import_zod11.z.object({
|
|
949
|
+
ts: import_zod11.z.number(),
|
|
950
|
+
type: import_zod11.z.union([import_zod11.z.literal("ask"), import_zod11.z.literal("say")]),
|
|
951
|
+
ask: clineAskSchema.optional(),
|
|
952
|
+
say: clineSaySchema.optional(),
|
|
953
|
+
text: import_zod11.z.string().optional(),
|
|
954
|
+
images: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
955
|
+
partial: import_zod11.z.boolean().optional(),
|
|
956
|
+
reasoning: import_zod11.z.string().optional(),
|
|
957
|
+
conversationHistoryIndex: import_zod11.z.number().optional(),
|
|
958
|
+
checkpoint: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.unknown()).optional(),
|
|
959
|
+
progressStatus: toolProgressStatusSchema.optional(),
|
|
960
|
+
contextCondense: contextCondenseSchema.optional()
|
|
961
|
+
});
|
|
962
|
+
var tokenUsageSchema = import_zod11.z.object({
|
|
963
|
+
totalTokensIn: import_zod11.z.number(),
|
|
964
|
+
totalTokensOut: import_zod11.z.number(),
|
|
965
|
+
totalCacheWrites: import_zod11.z.number().optional(),
|
|
966
|
+
totalCacheReads: import_zod11.z.number().optional(),
|
|
967
|
+
totalCost: import_zod11.z.number(),
|
|
968
|
+
contextTokens: import_zod11.z.number()
|
|
969
|
+
});
|
|
970
|
+
|
|
971
|
+
// src/ipc.ts
|
|
972
|
+
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
973
|
+
RooCodeEventName2["Message"] = "message";
|
|
974
|
+
RooCodeEventName2["TaskCreated"] = "taskCreated";
|
|
975
|
+
RooCodeEventName2["TaskStarted"] = "taskStarted";
|
|
976
|
+
RooCodeEventName2["TaskModeSwitched"] = "taskModeSwitched";
|
|
977
|
+
RooCodeEventName2["TaskPaused"] = "taskPaused";
|
|
978
|
+
RooCodeEventName2["TaskUnpaused"] = "taskUnpaused";
|
|
979
|
+
RooCodeEventName2["TaskAskResponded"] = "taskAskResponded";
|
|
980
|
+
RooCodeEventName2["TaskAborted"] = "taskAborted";
|
|
981
|
+
RooCodeEventName2["TaskSpawned"] = "taskSpawned";
|
|
982
|
+
RooCodeEventName2["TaskCompleted"] = "taskCompleted";
|
|
983
|
+
RooCodeEventName2["TaskTokenUsageUpdated"] = "taskTokenUsageUpdated";
|
|
984
|
+
RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
|
|
985
|
+
return RooCodeEventName2;
|
|
986
|
+
})(RooCodeEventName || {});
|
|
987
|
+
var rooCodeEventsSchema = import_zod12.z.object({
|
|
988
|
+
["message" /* Message */]: import_zod12.z.tuple([
|
|
989
|
+
import_zod12.z.object({
|
|
990
|
+
taskId: import_zod12.z.string(),
|
|
991
|
+
action: import_zod12.z.union([import_zod12.z.literal("created"), import_zod12.z.literal("updated")]),
|
|
992
|
+
message: clineMessageSchema
|
|
993
|
+
})
|
|
994
|
+
]),
|
|
995
|
+
["taskCreated" /* TaskCreated */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
996
|
+
["taskStarted" /* TaskStarted */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
997
|
+
["taskModeSwitched" /* TaskModeSwitched */]: import_zod12.z.tuple([import_zod12.z.string(), import_zod12.z.string()]),
|
|
998
|
+
["taskPaused" /* TaskPaused */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
999
|
+
["taskUnpaused" /* TaskUnpaused */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
1000
|
+
["taskAskResponded" /* TaskAskResponded */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
1001
|
+
["taskAborted" /* TaskAborted */]: import_zod12.z.tuple([import_zod12.z.string()]),
|
|
1002
|
+
["taskSpawned" /* TaskSpawned */]: import_zod12.z.tuple([import_zod12.z.string(), import_zod12.z.string()]),
|
|
1003
|
+
["taskCompleted" /* TaskCompleted */]: import_zod12.z.tuple([import_zod12.z.string(), tokenUsageSchema, toolUsageSchema]),
|
|
1004
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: import_zod12.z.tuple([import_zod12.z.string(), tokenUsageSchema]),
|
|
1005
|
+
["taskToolFailed" /* TaskToolFailed */]: import_zod12.z.tuple([import_zod12.z.string(), toolNamesSchema, import_zod12.z.string()])
|
|
1006
|
+
});
|
|
1007
|
+
var ackSchema = import_zod12.z.object({
|
|
1008
|
+
clientId: import_zod12.z.string(),
|
|
1009
|
+
pid: import_zod12.z.number(),
|
|
1010
|
+
ppid: import_zod12.z.number()
|
|
1011
|
+
});
|
|
1012
|
+
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
1013
|
+
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
1014
|
+
TaskCommandName2["CancelTask"] = "CancelTask";
|
|
1015
|
+
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
1016
|
+
return TaskCommandName2;
|
|
1017
|
+
})(TaskCommandName || {});
|
|
1018
|
+
var taskCommandSchema = import_zod12.z.discriminatedUnion("commandName", [
|
|
1019
|
+
import_zod12.z.object({
|
|
1020
|
+
commandName: import_zod12.z.literal("StartNewTask" /* StartNewTask */),
|
|
1021
|
+
data: import_zod12.z.object({
|
|
1022
|
+
configuration: rooCodeSettingsSchema,
|
|
1023
|
+
text: import_zod12.z.string(),
|
|
1024
|
+
images: import_zod12.z.array(import_zod12.z.string()).optional(),
|
|
1025
|
+
newTab: import_zod12.z.boolean().optional()
|
|
1026
|
+
})
|
|
1027
|
+
}),
|
|
1028
|
+
import_zod12.z.object({
|
|
1029
|
+
commandName: import_zod12.z.literal("CancelTask" /* CancelTask */),
|
|
1030
|
+
data: import_zod12.z.string()
|
|
1031
|
+
}),
|
|
1032
|
+
import_zod12.z.object({
|
|
1033
|
+
commandName: import_zod12.z.literal("CloseTask" /* CloseTask */),
|
|
1034
|
+
data: import_zod12.z.string()
|
|
1035
|
+
})
|
|
1036
|
+
]);
|
|
1037
|
+
var taskEventSchema = import_zod12.z.discriminatedUnion("eventName", [
|
|
1038
|
+
import_zod12.z.object({
|
|
1039
|
+
eventName: import_zod12.z.literal("message" /* Message */),
|
|
1040
|
+
payload: rooCodeEventsSchema.shape["message" /* Message */]
|
|
1041
|
+
}),
|
|
1042
|
+
import_zod12.z.object({
|
|
1043
|
+
eventName: import_zod12.z.literal("taskCreated" /* TaskCreated */),
|
|
1044
|
+
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */]
|
|
1045
|
+
}),
|
|
1046
|
+
import_zod12.z.object({
|
|
1047
|
+
eventName: import_zod12.z.literal("taskStarted" /* TaskStarted */),
|
|
1048
|
+
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */]
|
|
1049
|
+
}),
|
|
1050
|
+
import_zod12.z.object({
|
|
1051
|
+
eventName: import_zod12.z.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
1052
|
+
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */]
|
|
1053
|
+
}),
|
|
1054
|
+
import_zod12.z.object({
|
|
1055
|
+
eventName: import_zod12.z.literal("taskPaused" /* TaskPaused */),
|
|
1056
|
+
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */]
|
|
1057
|
+
}),
|
|
1058
|
+
import_zod12.z.object({
|
|
1059
|
+
eventName: import_zod12.z.literal("taskUnpaused" /* TaskUnpaused */),
|
|
1060
|
+
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */]
|
|
1061
|
+
}),
|
|
1062
|
+
import_zod12.z.object({
|
|
1063
|
+
eventName: import_zod12.z.literal("taskAskResponded" /* TaskAskResponded */),
|
|
1064
|
+
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */]
|
|
1065
|
+
}),
|
|
1066
|
+
import_zod12.z.object({
|
|
1067
|
+
eventName: import_zod12.z.literal("taskAborted" /* TaskAborted */),
|
|
1068
|
+
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */]
|
|
1069
|
+
}),
|
|
1070
|
+
import_zod12.z.object({
|
|
1071
|
+
eventName: import_zod12.z.literal("taskSpawned" /* TaskSpawned */),
|
|
1072
|
+
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */]
|
|
1073
|
+
}),
|
|
1074
|
+
import_zod12.z.object({
|
|
1075
|
+
eventName: import_zod12.z.literal("taskCompleted" /* TaskCompleted */),
|
|
1076
|
+
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */]
|
|
1077
|
+
}),
|
|
1078
|
+
import_zod12.z.object({
|
|
1079
|
+
eventName: import_zod12.z.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
1080
|
+
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]
|
|
1081
|
+
})
|
|
1082
|
+
]);
|
|
1083
|
+
var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
|
|
1084
|
+
IpcMessageType2["Connect"] = "Connect";
|
|
1085
|
+
IpcMessageType2["Disconnect"] = "Disconnect";
|
|
1086
|
+
IpcMessageType2["Ack"] = "Ack";
|
|
1087
|
+
IpcMessageType2["TaskCommand"] = "TaskCommand";
|
|
1088
|
+
IpcMessageType2["TaskEvent"] = "TaskEvent";
|
|
1089
|
+
return IpcMessageType2;
|
|
1090
|
+
})(IpcMessageType || {});
|
|
1091
|
+
var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
1092
|
+
IpcOrigin2["Client"] = "client";
|
|
1093
|
+
IpcOrigin2["Server"] = "server";
|
|
1094
|
+
return IpcOrigin2;
|
|
1095
|
+
})(IpcOrigin || {});
|
|
1096
|
+
var ipcMessageSchema = import_zod12.z.discriminatedUnion("type", [
|
|
1097
|
+
import_zod12.z.object({
|
|
1098
|
+
type: import_zod12.z.literal("Ack" /* Ack */),
|
|
1099
|
+
origin: import_zod12.z.literal("server" /* Server */),
|
|
1100
|
+
data: ackSchema
|
|
1101
|
+
}),
|
|
1102
|
+
import_zod12.z.object({
|
|
1103
|
+
type: import_zod12.z.literal("TaskCommand" /* TaskCommand */),
|
|
1104
|
+
origin: import_zod12.z.literal("client" /* Client */),
|
|
1105
|
+
clientId: import_zod12.z.string(),
|
|
1106
|
+
data: taskCommandSchema
|
|
1107
|
+
}),
|
|
1108
|
+
import_zod12.z.object({
|
|
1109
|
+
type: import_zod12.z.literal("TaskEvent" /* TaskEvent */),
|
|
1110
|
+
origin: import_zod12.z.literal("server" /* Server */),
|
|
1111
|
+
relayClientId: import_zod12.z.string().optional(),
|
|
1112
|
+
data: taskEventSchema
|
|
1113
|
+
})
|
|
1114
|
+
]);
|
|
1115
|
+
|
|
1116
|
+
// src/terminal.ts
|
|
1117
|
+
var import_zod13 = require("zod");
|
|
1118
|
+
var commandExecutionStatusSchema = import_zod13.z.discriminatedUnion("status", [
|
|
1119
|
+
import_zod13.z.object({
|
|
1120
|
+
executionId: import_zod13.z.string(),
|
|
1121
|
+
status: import_zod13.z.literal("started"),
|
|
1122
|
+
pid: import_zod13.z.number().optional(),
|
|
1123
|
+
command: import_zod13.z.string()
|
|
1124
|
+
}),
|
|
1125
|
+
import_zod13.z.object({
|
|
1126
|
+
executionId: import_zod13.z.string(),
|
|
1127
|
+
status: import_zod13.z.literal("output"),
|
|
1128
|
+
output: import_zod13.z.string()
|
|
1129
|
+
}),
|
|
1130
|
+
import_zod13.z.object({
|
|
1131
|
+
executionId: import_zod13.z.string(),
|
|
1132
|
+
status: import_zod13.z.literal("exited"),
|
|
1133
|
+
exitCode: import_zod13.z.number().optional()
|
|
1134
|
+
}),
|
|
1135
|
+
import_zod13.z.object({
|
|
1136
|
+
executionId: import_zod13.z.string(),
|
|
1137
|
+
status: import_zod13.z.literal("fallback")
|
|
1138
|
+
})
|
|
1139
|
+
]);
|
|
1140
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1141
|
+
0 && (module.exports = {
|
|
1142
|
+
GLOBAL_SETTINGS_KEYS,
|
|
1143
|
+
GLOBAL_STATE_KEYS,
|
|
1144
|
+
IpcMessageType,
|
|
1145
|
+
IpcOrigin,
|
|
1146
|
+
PROVIDER_SETTINGS_KEYS,
|
|
1147
|
+
RooCodeEventName,
|
|
1148
|
+
SECRET_STATE_KEYS,
|
|
1149
|
+
TaskCommandName,
|
|
1150
|
+
TelemetryEventName,
|
|
1151
|
+
ackSchema,
|
|
1152
|
+
appPropertiesSchema,
|
|
1153
|
+
clineAskSchema,
|
|
1154
|
+
clineAsks,
|
|
1155
|
+
clineMessageSchema,
|
|
1156
|
+
clineSaySchema,
|
|
1157
|
+
clineSays,
|
|
1158
|
+
codeActionIds,
|
|
1159
|
+
codebaseIndexConfigSchema,
|
|
1160
|
+
codebaseIndexModelsSchema,
|
|
1161
|
+
codebaseIndexProviderSchema,
|
|
1162
|
+
commandExecutionStatusSchema,
|
|
1163
|
+
commandIds,
|
|
1164
|
+
contextCondenseSchema,
|
|
1165
|
+
customModePromptsSchema,
|
|
1166
|
+
customModesSettingsSchema,
|
|
1167
|
+
customSupportPromptsSchema,
|
|
1168
|
+
experimentIds,
|
|
1169
|
+
experimentIdsSchema,
|
|
1170
|
+
experimentsSchema,
|
|
1171
|
+
globalSettingsSchema,
|
|
1172
|
+
groupEntrySchema,
|
|
1173
|
+
groupOptionsSchema,
|
|
1174
|
+
historyItemSchema,
|
|
1175
|
+
ipcMessageSchema,
|
|
1176
|
+
isGlobalStateKey,
|
|
1177
|
+
isLanguage,
|
|
1178
|
+
isModelParameter,
|
|
1179
|
+
isSecretStateKey,
|
|
1180
|
+
keysOf,
|
|
1181
|
+
languages,
|
|
1182
|
+
languagesSchema,
|
|
1183
|
+
modeConfigSchema,
|
|
1184
|
+
modelInfoSchema,
|
|
1185
|
+
modelParameters,
|
|
1186
|
+
modelParametersSchema,
|
|
1187
|
+
promptComponentSchema,
|
|
1188
|
+
providerNames,
|
|
1189
|
+
providerNamesSchema,
|
|
1190
|
+
providerSettingsEntrySchema,
|
|
1191
|
+
providerSettingsSchema,
|
|
1192
|
+
providerSettingsSchemaDiscriminated,
|
|
1193
|
+
reasoningEfforts,
|
|
1194
|
+
reasoningEffortsSchema,
|
|
1195
|
+
rooCodeEventsSchema,
|
|
1196
|
+
rooCodeSettingsSchema,
|
|
1197
|
+
rooCodeTelemetryEventSchema,
|
|
1198
|
+
taskCommandSchema,
|
|
1199
|
+
taskEventSchema,
|
|
1200
|
+
taskPropertiesSchema,
|
|
1201
|
+
telemetryPropertiesSchema,
|
|
1202
|
+
telemetrySettings,
|
|
1203
|
+
telemetrySettingsSchema,
|
|
1204
|
+
terminalActionIds,
|
|
1205
|
+
tokenUsageSchema,
|
|
1206
|
+
toolGroups,
|
|
1207
|
+
toolGroupsSchema,
|
|
1208
|
+
toolNames,
|
|
1209
|
+
toolNamesSchema,
|
|
1210
|
+
toolProgressStatusSchema,
|
|
1211
|
+
toolUsageSchema
|
|
1212
|
+
});
|
|
1213
|
+
//# sourceMappingURL=index.js.map
|