@roo-code/types 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +477 -441
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +389 -2
- package/dist/index.d.ts +389 -2
- package/dist/index.js +474 -441
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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/
|
|
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 =
|
|
23
|
-
var experimentsSchema =
|
|
24
|
-
autoCondenseContext:
|
|
25
|
-
powerSteering:
|
|
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
|
|
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
|
|
65
|
+
import { z as z5 } from "zod";
|
|
38
66
|
|
|
39
67
|
// src/model.ts
|
|
40
|
-
import { z as
|
|
68
|
+
import { z as z4 } from "zod";
|
|
41
69
|
var reasoningEfforts = ["low", "medium", "high"];
|
|
42
|
-
var reasoningEffortsSchema =
|
|
70
|
+
var reasoningEffortsSchema = z4.enum(reasoningEfforts);
|
|
43
71
|
var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
|
|
44
|
-
var modelParametersSchema =
|
|
72
|
+
var modelParametersSchema = z4.enum(modelParameters);
|
|
45
73
|
var isModelParameter = (value) => modelParameters.includes(value);
|
|
46
|
-
var modelInfoSchema =
|
|
47
|
-
maxTokens:
|
|
48
|
-
maxThinkingTokens:
|
|
49
|
-
contextWindow:
|
|
50
|
-
supportsImages:
|
|
51
|
-
supportsComputerUse:
|
|
52
|
-
supportsPromptCache:
|
|
53
|
-
supportsReasoningBudget:
|
|
54
|
-
requiredReasoningBudget:
|
|
55
|
-
supportsReasoningEffort:
|
|
56
|
-
supportedParameters:
|
|
57
|
-
inputPrice:
|
|
58
|
-
outputPrice:
|
|
59
|
-
cacheWritesPrice:
|
|
60
|
-
cacheReadsPrice:
|
|
61
|
-
description:
|
|
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:
|
|
64
|
-
maxCachePoints:
|
|
65
|
-
cachableFields:
|
|
66
|
-
tiers:
|
|
67
|
-
|
|
68
|
-
contextWindow:
|
|
69
|
-
inputPrice:
|
|
70
|
-
outputPrice:
|
|
71
|
-
cacheWritesPrice:
|
|
72
|
-
cacheReadsPrice:
|
|
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 =
|
|
102
|
-
var providerSettingsEntrySchema =
|
|
103
|
-
id:
|
|
104
|
-
name:
|
|
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 =
|
|
108
|
-
includeMaxTokens:
|
|
109
|
-
diffEnabled:
|
|
110
|
-
fuzzyMatchThreshold:
|
|
111
|
-
modelTemperature:
|
|
112
|
-
rateLimitSeconds:
|
|
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:
|
|
142
|
+
enableReasoningEffort: z5.boolean().optional(),
|
|
115
143
|
reasoningEffort: reasoningEffortsSchema.optional(),
|
|
116
|
-
modelMaxTokens:
|
|
117
|
-
modelMaxThinkingTokens:
|
|
144
|
+
modelMaxTokens: z5.number().optional(),
|
|
145
|
+
modelMaxThinkingTokens: z5.number().optional()
|
|
118
146
|
});
|
|
119
147
|
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
120
|
-
apiModelId:
|
|
148
|
+
apiModelId: z5.string().optional()
|
|
121
149
|
});
|
|
122
150
|
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
123
|
-
apiKey:
|
|
124
|
-
anthropicBaseUrl:
|
|
125
|
-
anthropicUseAuthToken:
|
|
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:
|
|
129
|
-
glamaApiKey:
|
|
156
|
+
glamaModelId: z5.string().optional(),
|
|
157
|
+
glamaApiKey: z5.string().optional()
|
|
130
158
|
});
|
|
131
159
|
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
132
|
-
openRouterApiKey:
|
|
133
|
-
openRouterModelId:
|
|
134
|
-
openRouterBaseUrl:
|
|
135
|
-
openRouterSpecificProvider:
|
|
136
|
-
openRouterUseMiddleOutTransform:
|
|
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:
|
|
140
|
-
awsSecretKey:
|
|
141
|
-
awsSessionToken:
|
|
142
|
-
awsRegion:
|
|
143
|
-
awsUseCrossRegionInference:
|
|
144
|
-
awsUsePromptCache:
|
|
145
|
-
awsProfile:
|
|
146
|
-
awsUseProfile:
|
|
147
|
-
awsCustomArn:
|
|
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:
|
|
151
|
-
vertexJsonCredentials:
|
|
152
|
-
vertexProjectId:
|
|
153
|
-
vertexRegion:
|
|
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:
|
|
157
|
-
openAiApiKey:
|
|
158
|
-
openAiLegacyFormat:
|
|
159
|
-
openAiR1FormatEnabled:
|
|
160
|
-
openAiModelId:
|
|
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:
|
|
163
|
-
azureApiVersion:
|
|
164
|
-
openAiStreamingEnabled:
|
|
165
|
-
openAiHostHeader:
|
|
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:
|
|
195
|
+
openAiHeaders: z5.record(z5.string(), z5.string()).optional()
|
|
168
196
|
});
|
|
169
197
|
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
170
|
-
ollamaModelId:
|
|
171
|
-
ollamaBaseUrl:
|
|
198
|
+
ollamaModelId: z5.string().optional(),
|
|
199
|
+
ollamaBaseUrl: z5.string().optional()
|
|
172
200
|
});
|
|
173
201
|
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
174
|
-
vsCodeLmModelSelector:
|
|
175
|
-
vendor:
|
|
176
|
-
family:
|
|
177
|
-
version:
|
|
178
|
-
id:
|
|
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:
|
|
183
|
-
lmStudioBaseUrl:
|
|
184
|
-
lmStudioDraftModelId:
|
|
185
|
-
lmStudioSpeculativeDecodingEnabled:
|
|
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:
|
|
189
|
-
googleGeminiBaseUrl:
|
|
216
|
+
geminiApiKey: z5.string().optional(),
|
|
217
|
+
googleGeminiBaseUrl: z5.string().optional()
|
|
190
218
|
});
|
|
191
219
|
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
192
|
-
openAiNativeApiKey:
|
|
193
|
-
openAiNativeBaseUrl:
|
|
220
|
+
openAiNativeApiKey: z5.string().optional(),
|
|
221
|
+
openAiNativeBaseUrl: z5.string().optional()
|
|
194
222
|
});
|
|
195
223
|
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
196
|
-
mistralApiKey:
|
|
197
|
-
mistralCodestralUrl:
|
|
224
|
+
mistralApiKey: z5.string().optional(),
|
|
225
|
+
mistralCodestralUrl: z5.string().optional()
|
|
198
226
|
});
|
|
199
227
|
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
200
|
-
deepSeekBaseUrl:
|
|
201
|
-
deepSeekApiKey:
|
|
228
|
+
deepSeekBaseUrl: z5.string().optional(),
|
|
229
|
+
deepSeekApiKey: z5.string().optional()
|
|
202
230
|
});
|
|
203
231
|
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
204
|
-
unboundApiKey:
|
|
205
|
-
unboundModelId:
|
|
232
|
+
unboundApiKey: z5.string().optional(),
|
|
233
|
+
unboundModelId: z5.string().optional()
|
|
206
234
|
});
|
|
207
235
|
var requestySchema = baseProviderSettingsSchema.extend({
|
|
208
|
-
requestyApiKey:
|
|
209
|
-
requestyModelId:
|
|
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:
|
|
241
|
+
fakeAi: z5.unknown().optional()
|
|
214
242
|
});
|
|
215
243
|
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
216
|
-
xaiApiKey:
|
|
244
|
+
xaiApiKey: z5.string().optional()
|
|
217
245
|
});
|
|
218
246
|
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
219
|
-
groqApiKey:
|
|
247
|
+
groqApiKey: z5.string().optional()
|
|
220
248
|
});
|
|
221
249
|
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
222
|
-
chutesApiKey:
|
|
250
|
+
chutesApiKey: z5.string().optional()
|
|
223
251
|
});
|
|
224
252
|
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
225
|
-
litellmBaseUrl:
|
|
226
|
-
litellmApiKey:
|
|
227
|
-
litellmModelId:
|
|
253
|
+
litellmBaseUrl: z5.string().optional(),
|
|
254
|
+
litellmApiKey: z5.string().optional(),
|
|
255
|
+
litellmModelId: z5.string().optional()
|
|
228
256
|
});
|
|
229
|
-
var defaultSchema =
|
|
230
|
-
apiProvider:
|
|
257
|
+
var defaultSchema = z5.object({
|
|
258
|
+
apiProvider: z5.undefined()
|
|
231
259
|
});
|
|
232
|
-
var providerSettingsSchemaDiscriminated =
|
|
233
|
-
anthropicSchema.merge(
|
|
234
|
-
glamaSchema.merge(
|
|
235
|
-
openRouterSchema.merge(
|
|
236
|
-
bedrockSchema.merge(
|
|
237
|
-
vertexSchema.merge(
|
|
238
|
-
openAiSchema.merge(
|
|
239
|
-
ollamaSchema.merge(
|
|
240
|
-
vsCodeLmSchema.merge(
|
|
241
|
-
lmStudioSchema.merge(
|
|
242
|
-
geminiSchema.merge(
|
|
243
|
-
openAiNativeSchema.merge(
|
|
244
|
-
mistralSchema.merge(
|
|
245
|
-
deepSeekSchema.merge(
|
|
246
|
-
unboundSchema.merge(
|
|
247
|
-
requestySchema.merge(
|
|
248
|
-
humanRelaySchema.merge(
|
|
249
|
-
fakeAiSchema.merge(
|
|
250
|
-
xaiSchema.merge(
|
|
251
|
-
groqSchema.merge(
|
|
252
|
-
chutesSchema.merge(
|
|
253
|
-
litellmSchema.merge(
|
|
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 =
|
|
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
|
|
382
|
-
var historyItemSchema =
|
|
383
|
-
id:
|
|
384
|
-
number:
|
|
385
|
-
ts:
|
|
386
|
-
task:
|
|
387
|
-
tokensIn:
|
|
388
|
-
tokensOut:
|
|
389
|
-
cacheWrites:
|
|
390
|
-
cacheReads:
|
|
391
|
-
totalCost:
|
|
392
|
-
size:
|
|
393
|
-
workspace:
|
|
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 =
|
|
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 =
|
|
424
|
-
appVersion:
|
|
425
|
-
vscodeVersion:
|
|
426
|
-
platform:
|
|
427
|
-
editorName:
|
|
428
|
-
language:
|
|
429
|
-
mode:
|
|
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 =
|
|
432
|
-
taskId:
|
|
433
|
-
apiProvider:
|
|
434
|
-
modelId:
|
|
435
|
-
diffStrategy:
|
|
436
|
-
isSubtask:
|
|
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 =
|
|
545
|
+
var telemetryPropertiesSchema = z8.object({
|
|
439
546
|
...appPropertiesSchema.shape,
|
|
440
547
|
...taskPropertiesSchema.shape
|
|
441
548
|
});
|
|
442
|
-
var
|
|
443
|
-
|
|
444
|
-
|
|
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,35 @@ 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:
|
|
471
|
-
|
|
472
|
-
|
|
570
|
+
properties: telemetryPropertiesSchema
|
|
571
|
+
}),
|
|
572
|
+
z8.object({
|
|
573
|
+
type: z8.literal("Task Message" /* TASK_MESSAGE */),
|
|
574
|
+
properties: z8.object({
|
|
575
|
+
...telemetryPropertiesSchema.shape,
|
|
576
|
+
message: clineMessageSchema
|
|
473
577
|
})
|
|
474
578
|
}),
|
|
475
|
-
|
|
476
|
-
type:
|
|
477
|
-
properties:
|
|
478
|
-
...
|
|
479
|
-
|
|
480
|
-
|
|
579
|
+
z8.object({
|
|
580
|
+
type: z8.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
581
|
+
properties: z8.object({
|
|
582
|
+
...telemetryPropertiesSchema.shape,
|
|
583
|
+
inputTokens: z8.number(),
|
|
584
|
+
outputTokens: z8.number(),
|
|
585
|
+
cacheReadTokens: z8.number().optional(),
|
|
586
|
+
cacheWriteTokens: z8.number().optional(),
|
|
587
|
+
cost: z8.number().optional()
|
|
481
588
|
})
|
|
482
589
|
})
|
|
483
590
|
]);
|
|
484
591
|
|
|
485
592
|
// src/mode.ts
|
|
486
|
-
import { z as
|
|
593
|
+
import { z as z10 } from "zod";
|
|
487
594
|
|
|
488
595
|
// src/tool.ts
|
|
489
|
-
import { z as
|
|
596
|
+
import { z as z9 } from "zod";
|
|
490
597
|
var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
|
|
491
|
-
var toolGroupsSchema =
|
|
598
|
+
var toolGroupsSchema = z9.enum(toolGroups);
|
|
492
599
|
var toolNames = [
|
|
493
600
|
"execute_command",
|
|
494
601
|
"read_file",
|
|
@@ -509,18 +616,18 @@ var toolNames = [
|
|
|
509
616
|
"fetch_instructions",
|
|
510
617
|
"codebase_search"
|
|
511
618
|
];
|
|
512
|
-
var toolNamesSchema =
|
|
513
|
-
var toolUsageSchema =
|
|
619
|
+
var toolNamesSchema = z9.enum(toolNames);
|
|
620
|
+
var toolUsageSchema = z9.record(
|
|
514
621
|
toolNamesSchema,
|
|
515
|
-
|
|
516
|
-
attempts:
|
|
517
|
-
failures:
|
|
622
|
+
z9.object({
|
|
623
|
+
attempts: z9.number(),
|
|
624
|
+
failures: z9.number()
|
|
518
625
|
})
|
|
519
626
|
);
|
|
520
627
|
|
|
521
628
|
// src/mode.ts
|
|
522
|
-
var groupOptionsSchema =
|
|
523
|
-
fileRegex:
|
|
629
|
+
var groupOptionsSchema = z10.object({
|
|
630
|
+
fileRegex: z10.string().optional().refine(
|
|
524
631
|
(pattern) => {
|
|
525
632
|
if (!pattern) {
|
|
526
633
|
return true;
|
|
@@ -534,10 +641,10 @@ var groupOptionsSchema = z8.object({
|
|
|
534
641
|
},
|
|
535
642
|
{ message: "Invalid regular expression pattern" }
|
|
536
643
|
),
|
|
537
|
-
description:
|
|
644
|
+
description: z10.string().optional()
|
|
538
645
|
});
|
|
539
|
-
var groupEntrySchema =
|
|
540
|
-
var groupEntryArraySchema =
|
|
646
|
+
var groupEntrySchema = z10.union([toolGroupsSchema, z10.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
647
|
+
var groupEntryArraySchema = z10.array(groupEntrySchema).refine(
|
|
541
648
|
(groups) => {
|
|
542
649
|
const seen = /* @__PURE__ */ new Set();
|
|
543
650
|
return groups.every((group) => {
|
|
@@ -551,17 +658,17 @@ var groupEntryArraySchema = z8.array(groupEntrySchema).refine(
|
|
|
551
658
|
},
|
|
552
659
|
{ message: "Duplicate groups are not allowed" }
|
|
553
660
|
);
|
|
554
|
-
var modeConfigSchema =
|
|
555
|
-
slug:
|
|
556
|
-
name:
|
|
557
|
-
roleDefinition:
|
|
558
|
-
whenToUse:
|
|
559
|
-
customInstructions:
|
|
661
|
+
var modeConfigSchema = z10.object({
|
|
662
|
+
slug: z10.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
663
|
+
name: z10.string().min(1, "Name is required"),
|
|
664
|
+
roleDefinition: z10.string().min(1, "Role definition is required"),
|
|
665
|
+
whenToUse: z10.string().optional(),
|
|
666
|
+
customInstructions: z10.string().optional(),
|
|
560
667
|
groups: groupEntryArraySchema,
|
|
561
|
-
source:
|
|
668
|
+
source: z10.enum(["global", "project"]).optional()
|
|
562
669
|
});
|
|
563
|
-
var customModesSettingsSchema =
|
|
564
|
-
customModes:
|
|
670
|
+
var customModesSettingsSchema = z10.object({
|
|
671
|
+
customModes: z10.array(modeConfigSchema).refine(
|
|
565
672
|
(modes) => {
|
|
566
673
|
const slugs = /* @__PURE__ */ new Set();
|
|
567
674
|
return modes.every((mode) => {
|
|
@@ -577,16 +684,16 @@ var customModesSettingsSchema = z8.object({
|
|
|
577
684
|
}
|
|
578
685
|
)
|
|
579
686
|
});
|
|
580
|
-
var promptComponentSchema =
|
|
581
|
-
roleDefinition:
|
|
582
|
-
whenToUse:
|
|
583
|
-
customInstructions:
|
|
687
|
+
var promptComponentSchema = z10.object({
|
|
688
|
+
roleDefinition: z10.string().optional(),
|
|
689
|
+
whenToUse: z10.string().optional(),
|
|
690
|
+
customInstructions: z10.string().optional()
|
|
584
691
|
});
|
|
585
|
-
var customModePromptsSchema =
|
|
586
|
-
var customSupportPromptsSchema =
|
|
692
|
+
var customModePromptsSchema = z10.record(z10.string(), promptComponentSchema.optional());
|
|
693
|
+
var customSupportPromptsSchema = z10.record(z10.string(), z10.string().optional());
|
|
587
694
|
|
|
588
695
|
// src/vscode.ts
|
|
589
|
-
import { z as
|
|
696
|
+
import { z as z11 } from "zod";
|
|
590
697
|
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
591
698
|
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
592
699
|
var commandIds = [
|
|
@@ -596,6 +703,7 @@ var commandIds = [
|
|
|
596
703
|
"mcpButtonClicked",
|
|
597
704
|
"historyButtonClicked",
|
|
598
705
|
"popoutButtonClicked",
|
|
706
|
+
"accountButtonClicked",
|
|
599
707
|
"settingsButtonClicked",
|
|
600
708
|
"openInNewTab",
|
|
601
709
|
"showHumanRelayDialog",
|
|
@@ -626,77 +734,77 @@ var languages = [
|
|
|
626
734
|
"zh-CN",
|
|
627
735
|
"zh-TW"
|
|
628
736
|
];
|
|
629
|
-
var languagesSchema =
|
|
737
|
+
var languagesSchema = z11.enum(languages);
|
|
630
738
|
var isLanguage = (value) => languages.includes(value);
|
|
631
739
|
|
|
632
740
|
// src/global-settings.ts
|
|
633
|
-
var globalSettingsSchema =
|
|
634
|
-
currentApiConfigName:
|
|
635
|
-
listApiConfigMeta:
|
|
636
|
-
pinnedApiConfigs:
|
|
637
|
-
lastShownAnnouncementId:
|
|
638
|
-
customInstructions:
|
|
639
|
-
taskHistory:
|
|
640
|
-
condensingApiConfigId:
|
|
641
|
-
customCondensingPrompt:
|
|
642
|
-
autoApprovalEnabled:
|
|
643
|
-
alwaysAllowReadOnly:
|
|
644
|
-
alwaysAllowReadOnlyOutsideWorkspace:
|
|
645
|
-
alwaysAllowWrite:
|
|
646
|
-
alwaysAllowWriteOutsideWorkspace:
|
|
647
|
-
writeDelayMs:
|
|
648
|
-
alwaysAllowBrowser:
|
|
649
|
-
alwaysApproveResubmit:
|
|
650
|
-
requestDelaySeconds:
|
|
651
|
-
alwaysAllowMcp:
|
|
652
|
-
alwaysAllowModeSwitch:
|
|
653
|
-
alwaysAllowSubtasks:
|
|
654
|
-
alwaysAllowExecute:
|
|
655
|
-
allowedCommands:
|
|
656
|
-
allowedMaxRequests:
|
|
657
|
-
autoCondenseContextPercent:
|
|
658
|
-
browserToolEnabled:
|
|
659
|
-
browserViewportSize:
|
|
660
|
-
screenshotQuality:
|
|
661
|
-
remoteBrowserEnabled:
|
|
662
|
-
remoteBrowserHost:
|
|
663
|
-
cachedChromeHostUrl:
|
|
664
|
-
enableCheckpoints:
|
|
665
|
-
ttsEnabled:
|
|
666
|
-
ttsSpeed:
|
|
667
|
-
soundEnabled:
|
|
668
|
-
soundVolume:
|
|
669
|
-
maxOpenTabsContext:
|
|
670
|
-
maxWorkspaceFiles:
|
|
671
|
-
showRooIgnoredFiles:
|
|
672
|
-
maxReadFileLine:
|
|
673
|
-
terminalOutputLineLimit:
|
|
674
|
-
terminalShellIntegrationTimeout:
|
|
675
|
-
terminalShellIntegrationDisabled:
|
|
676
|
-
terminalCommandDelay:
|
|
677
|
-
terminalPowershellCounter:
|
|
678
|
-
terminalZshClearEolMark:
|
|
679
|
-
terminalZshOhMy:
|
|
680
|
-
terminalZshP10k:
|
|
681
|
-
terminalZdotdir:
|
|
682
|
-
terminalCompressProgressBar:
|
|
683
|
-
rateLimitSeconds:
|
|
684
|
-
diffEnabled:
|
|
685
|
-
fuzzyMatchThreshold:
|
|
741
|
+
var globalSettingsSchema = z12.object({
|
|
742
|
+
currentApiConfigName: z12.string().optional(),
|
|
743
|
+
listApiConfigMeta: z12.array(providerSettingsEntrySchema).optional(),
|
|
744
|
+
pinnedApiConfigs: z12.record(z12.string(), z12.boolean()).optional(),
|
|
745
|
+
lastShownAnnouncementId: z12.string().optional(),
|
|
746
|
+
customInstructions: z12.string().optional(),
|
|
747
|
+
taskHistory: z12.array(historyItemSchema).optional(),
|
|
748
|
+
condensingApiConfigId: z12.string().optional(),
|
|
749
|
+
customCondensingPrompt: z12.string().optional(),
|
|
750
|
+
autoApprovalEnabled: z12.boolean().optional(),
|
|
751
|
+
alwaysAllowReadOnly: z12.boolean().optional(),
|
|
752
|
+
alwaysAllowReadOnlyOutsideWorkspace: z12.boolean().optional(),
|
|
753
|
+
alwaysAllowWrite: z12.boolean().optional(),
|
|
754
|
+
alwaysAllowWriteOutsideWorkspace: z12.boolean().optional(),
|
|
755
|
+
writeDelayMs: z12.number().optional(),
|
|
756
|
+
alwaysAllowBrowser: z12.boolean().optional(),
|
|
757
|
+
alwaysApproveResubmit: z12.boolean().optional(),
|
|
758
|
+
requestDelaySeconds: z12.number().optional(),
|
|
759
|
+
alwaysAllowMcp: z12.boolean().optional(),
|
|
760
|
+
alwaysAllowModeSwitch: z12.boolean().optional(),
|
|
761
|
+
alwaysAllowSubtasks: z12.boolean().optional(),
|
|
762
|
+
alwaysAllowExecute: z12.boolean().optional(),
|
|
763
|
+
allowedCommands: z12.array(z12.string()).optional(),
|
|
764
|
+
allowedMaxRequests: z12.number().nullish(),
|
|
765
|
+
autoCondenseContextPercent: z12.number().optional(),
|
|
766
|
+
browserToolEnabled: z12.boolean().optional(),
|
|
767
|
+
browserViewportSize: z12.string().optional(),
|
|
768
|
+
screenshotQuality: z12.number().optional(),
|
|
769
|
+
remoteBrowserEnabled: z12.boolean().optional(),
|
|
770
|
+
remoteBrowserHost: z12.string().optional(),
|
|
771
|
+
cachedChromeHostUrl: z12.string().optional(),
|
|
772
|
+
enableCheckpoints: z12.boolean().optional(),
|
|
773
|
+
ttsEnabled: z12.boolean().optional(),
|
|
774
|
+
ttsSpeed: z12.number().optional(),
|
|
775
|
+
soundEnabled: z12.boolean().optional(),
|
|
776
|
+
soundVolume: z12.number().optional(),
|
|
777
|
+
maxOpenTabsContext: z12.number().optional(),
|
|
778
|
+
maxWorkspaceFiles: z12.number().optional(),
|
|
779
|
+
showRooIgnoredFiles: z12.boolean().optional(),
|
|
780
|
+
maxReadFileLine: z12.number().optional(),
|
|
781
|
+
terminalOutputLineLimit: z12.number().optional(),
|
|
782
|
+
terminalShellIntegrationTimeout: z12.number().optional(),
|
|
783
|
+
terminalShellIntegrationDisabled: z12.boolean().optional(),
|
|
784
|
+
terminalCommandDelay: z12.number().optional(),
|
|
785
|
+
terminalPowershellCounter: z12.boolean().optional(),
|
|
786
|
+
terminalZshClearEolMark: z12.boolean().optional(),
|
|
787
|
+
terminalZshOhMy: z12.boolean().optional(),
|
|
788
|
+
terminalZshP10k: z12.boolean().optional(),
|
|
789
|
+
terminalZdotdir: z12.boolean().optional(),
|
|
790
|
+
terminalCompressProgressBar: z12.boolean().optional(),
|
|
791
|
+
rateLimitSeconds: z12.number().optional(),
|
|
792
|
+
diffEnabled: z12.boolean().optional(),
|
|
793
|
+
fuzzyMatchThreshold: z12.number().optional(),
|
|
686
794
|
experiments: experimentsSchema.optional(),
|
|
687
795
|
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
688
796
|
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
689
797
|
language: languagesSchema.optional(),
|
|
690
798
|
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
691
|
-
mcpEnabled:
|
|
692
|
-
enableMcpServerCreation:
|
|
693
|
-
mode:
|
|
694
|
-
modeApiConfigs:
|
|
695
|
-
customModes:
|
|
799
|
+
mcpEnabled: z12.boolean().optional(),
|
|
800
|
+
enableMcpServerCreation: z12.boolean().optional(),
|
|
801
|
+
mode: z12.string().optional(),
|
|
802
|
+
modeApiConfigs: z12.record(z12.string(), z12.string()).optional(),
|
|
803
|
+
customModes: z12.array(modeConfigSchema).optional(),
|
|
696
804
|
customModePrompts: customModePromptsSchema.optional(),
|
|
697
805
|
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
698
|
-
enhancementApiConfigId:
|
|
699
|
-
historyPreviewCollapsed:
|
|
806
|
+
enhancementApiConfigId: z12.string().optional(),
|
|
807
|
+
historyPreviewCollapsed: z12.boolean().optional()
|
|
700
808
|
});
|
|
701
809
|
var GLOBAL_SETTINGS_KEYS = keysOf()([
|
|
702
810
|
"currentApiConfigName",
|
|
@@ -795,85 +903,7 @@ var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].fil
|
|
|
795
903
|
var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
796
904
|
|
|
797
905
|
// src/ipc.ts
|
|
798
|
-
import { z as
|
|
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
|
|
906
|
+
import { z as z13 } from "zod";
|
|
877
907
|
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
878
908
|
RooCodeEventName2["Message"] = "message";
|
|
879
909
|
RooCodeEventName2["TaskCreated"] = "taskCreated";
|
|
@@ -889,30 +919,30 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
|
889
919
|
RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
|
|
890
920
|
return RooCodeEventName2;
|
|
891
921
|
})(RooCodeEventName || {});
|
|
892
|
-
var rooCodeEventsSchema =
|
|
893
|
-
["message" /* Message */]:
|
|
894
|
-
|
|
895
|
-
taskId:
|
|
896
|
-
action:
|
|
922
|
+
var rooCodeEventsSchema = z13.object({
|
|
923
|
+
["message" /* Message */]: z13.tuple([
|
|
924
|
+
z13.object({
|
|
925
|
+
taskId: z13.string(),
|
|
926
|
+
action: z13.union([z13.literal("created"), z13.literal("updated")]),
|
|
897
927
|
message: clineMessageSchema
|
|
898
928
|
})
|
|
899
929
|
]),
|
|
900
|
-
["taskCreated" /* TaskCreated */]:
|
|
901
|
-
["taskStarted" /* TaskStarted */]:
|
|
902
|
-
["taskModeSwitched" /* TaskModeSwitched */]:
|
|
903
|
-
["taskPaused" /* TaskPaused */]:
|
|
904
|
-
["taskUnpaused" /* TaskUnpaused */]:
|
|
905
|
-
["taskAskResponded" /* TaskAskResponded */]:
|
|
906
|
-
["taskAborted" /* TaskAborted */]:
|
|
907
|
-
["taskSpawned" /* TaskSpawned */]:
|
|
908
|
-
["taskCompleted" /* TaskCompleted */]:
|
|
909
|
-
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]:
|
|
910
|
-
["taskToolFailed" /* TaskToolFailed */]:
|
|
930
|
+
["taskCreated" /* TaskCreated */]: z13.tuple([z13.string()]),
|
|
931
|
+
["taskStarted" /* TaskStarted */]: z13.tuple([z13.string()]),
|
|
932
|
+
["taskModeSwitched" /* TaskModeSwitched */]: z13.tuple([z13.string(), z13.string()]),
|
|
933
|
+
["taskPaused" /* TaskPaused */]: z13.tuple([z13.string()]),
|
|
934
|
+
["taskUnpaused" /* TaskUnpaused */]: z13.tuple([z13.string()]),
|
|
935
|
+
["taskAskResponded" /* TaskAskResponded */]: z13.tuple([z13.string()]),
|
|
936
|
+
["taskAborted" /* TaskAborted */]: z13.tuple([z13.string()]),
|
|
937
|
+
["taskSpawned" /* TaskSpawned */]: z13.tuple([z13.string(), z13.string()]),
|
|
938
|
+
["taskCompleted" /* TaskCompleted */]: z13.tuple([z13.string(), tokenUsageSchema, toolUsageSchema]),
|
|
939
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z13.tuple([z13.string(), tokenUsageSchema]),
|
|
940
|
+
["taskToolFailed" /* TaskToolFailed */]: z13.tuple([z13.string(), toolNamesSchema, z13.string()])
|
|
911
941
|
});
|
|
912
|
-
var ackSchema =
|
|
913
|
-
clientId:
|
|
914
|
-
pid:
|
|
915
|
-
ppid:
|
|
942
|
+
var ackSchema = z13.object({
|
|
943
|
+
clientId: z13.string(),
|
|
944
|
+
pid: z13.number(),
|
|
945
|
+
ppid: z13.number()
|
|
916
946
|
});
|
|
917
947
|
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
918
948
|
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
@@ -920,68 +950,68 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
|
920
950
|
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
921
951
|
return TaskCommandName2;
|
|
922
952
|
})(TaskCommandName || {});
|
|
923
|
-
var taskCommandSchema =
|
|
924
|
-
|
|
925
|
-
commandName:
|
|
926
|
-
data:
|
|
953
|
+
var taskCommandSchema = z13.discriminatedUnion("commandName", [
|
|
954
|
+
z13.object({
|
|
955
|
+
commandName: z13.literal("StartNewTask" /* StartNewTask */),
|
|
956
|
+
data: z13.object({
|
|
927
957
|
configuration: rooCodeSettingsSchema,
|
|
928
|
-
text:
|
|
929
|
-
images:
|
|
930
|
-
newTab:
|
|
958
|
+
text: z13.string(),
|
|
959
|
+
images: z13.array(z13.string()).optional(),
|
|
960
|
+
newTab: z13.boolean().optional()
|
|
931
961
|
})
|
|
932
962
|
}),
|
|
933
|
-
|
|
934
|
-
commandName:
|
|
935
|
-
data:
|
|
963
|
+
z13.object({
|
|
964
|
+
commandName: z13.literal("CancelTask" /* CancelTask */),
|
|
965
|
+
data: z13.string()
|
|
936
966
|
}),
|
|
937
|
-
|
|
938
|
-
commandName:
|
|
939
|
-
data:
|
|
967
|
+
z13.object({
|
|
968
|
+
commandName: z13.literal("CloseTask" /* CloseTask */),
|
|
969
|
+
data: z13.string()
|
|
940
970
|
})
|
|
941
971
|
]);
|
|
942
|
-
var taskEventSchema =
|
|
943
|
-
|
|
944
|
-
eventName:
|
|
972
|
+
var taskEventSchema = z13.discriminatedUnion("eventName", [
|
|
973
|
+
z13.object({
|
|
974
|
+
eventName: z13.literal("message" /* Message */),
|
|
945
975
|
payload: rooCodeEventsSchema.shape["message" /* Message */]
|
|
946
976
|
}),
|
|
947
|
-
|
|
948
|
-
eventName:
|
|
977
|
+
z13.object({
|
|
978
|
+
eventName: z13.literal("taskCreated" /* TaskCreated */),
|
|
949
979
|
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */]
|
|
950
980
|
}),
|
|
951
|
-
|
|
952
|
-
eventName:
|
|
981
|
+
z13.object({
|
|
982
|
+
eventName: z13.literal("taskStarted" /* TaskStarted */),
|
|
953
983
|
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */]
|
|
954
984
|
}),
|
|
955
|
-
|
|
956
|
-
eventName:
|
|
985
|
+
z13.object({
|
|
986
|
+
eventName: z13.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
957
987
|
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */]
|
|
958
988
|
}),
|
|
959
|
-
|
|
960
|
-
eventName:
|
|
989
|
+
z13.object({
|
|
990
|
+
eventName: z13.literal("taskPaused" /* TaskPaused */),
|
|
961
991
|
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */]
|
|
962
992
|
}),
|
|
963
|
-
|
|
964
|
-
eventName:
|
|
993
|
+
z13.object({
|
|
994
|
+
eventName: z13.literal("taskUnpaused" /* TaskUnpaused */),
|
|
965
995
|
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */]
|
|
966
996
|
}),
|
|
967
|
-
|
|
968
|
-
eventName:
|
|
997
|
+
z13.object({
|
|
998
|
+
eventName: z13.literal("taskAskResponded" /* TaskAskResponded */),
|
|
969
999
|
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */]
|
|
970
1000
|
}),
|
|
971
|
-
|
|
972
|
-
eventName:
|
|
1001
|
+
z13.object({
|
|
1002
|
+
eventName: z13.literal("taskAborted" /* TaskAborted */),
|
|
973
1003
|
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */]
|
|
974
1004
|
}),
|
|
975
|
-
|
|
976
|
-
eventName:
|
|
1005
|
+
z13.object({
|
|
1006
|
+
eventName: z13.literal("taskSpawned" /* TaskSpawned */),
|
|
977
1007
|
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */]
|
|
978
1008
|
}),
|
|
979
|
-
|
|
980
|
-
eventName:
|
|
1009
|
+
z13.object({
|
|
1010
|
+
eventName: z13.literal("taskCompleted" /* TaskCompleted */),
|
|
981
1011
|
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */]
|
|
982
1012
|
}),
|
|
983
|
-
|
|
984
|
-
eventName:
|
|
1013
|
+
z13.object({
|
|
1014
|
+
eventName: z13.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
985
1015
|
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]
|
|
986
1016
|
})
|
|
987
1017
|
]);
|
|
@@ -998,48 +1028,48 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
|
998
1028
|
IpcOrigin2["Server"] = "server";
|
|
999
1029
|
return IpcOrigin2;
|
|
1000
1030
|
})(IpcOrigin || {});
|
|
1001
|
-
var ipcMessageSchema =
|
|
1002
|
-
|
|
1003
|
-
type:
|
|
1004
|
-
origin:
|
|
1031
|
+
var ipcMessageSchema = z13.discriminatedUnion("type", [
|
|
1032
|
+
z13.object({
|
|
1033
|
+
type: z13.literal("Ack" /* Ack */),
|
|
1034
|
+
origin: z13.literal("server" /* Server */),
|
|
1005
1035
|
data: ackSchema
|
|
1006
1036
|
}),
|
|
1007
|
-
|
|
1008
|
-
type:
|
|
1009
|
-
origin:
|
|
1010
|
-
clientId:
|
|
1037
|
+
z13.object({
|
|
1038
|
+
type: z13.literal("TaskCommand" /* TaskCommand */),
|
|
1039
|
+
origin: z13.literal("client" /* Client */),
|
|
1040
|
+
clientId: z13.string(),
|
|
1011
1041
|
data: taskCommandSchema
|
|
1012
1042
|
}),
|
|
1013
|
-
|
|
1014
|
-
type:
|
|
1015
|
-
origin:
|
|
1016
|
-
relayClientId:
|
|
1043
|
+
z13.object({
|
|
1044
|
+
type: z13.literal("TaskEvent" /* TaskEvent */),
|
|
1045
|
+
origin: z13.literal("server" /* Server */),
|
|
1046
|
+
relayClientId: z13.string().optional(),
|
|
1017
1047
|
data: taskEventSchema
|
|
1018
1048
|
})
|
|
1019
1049
|
]);
|
|
1020
1050
|
|
|
1021
1051
|
// src/terminal.ts
|
|
1022
|
-
import { z as
|
|
1023
|
-
var commandExecutionStatusSchema =
|
|
1024
|
-
|
|
1025
|
-
executionId:
|
|
1026
|
-
status:
|
|
1027
|
-
pid:
|
|
1028
|
-
command:
|
|
1052
|
+
import { z as z14 } from "zod";
|
|
1053
|
+
var commandExecutionStatusSchema = z14.discriminatedUnion("status", [
|
|
1054
|
+
z14.object({
|
|
1055
|
+
executionId: z14.string(),
|
|
1056
|
+
status: z14.literal("started"),
|
|
1057
|
+
pid: z14.number().optional(),
|
|
1058
|
+
command: z14.string()
|
|
1029
1059
|
}),
|
|
1030
|
-
|
|
1031
|
-
executionId:
|
|
1032
|
-
status:
|
|
1033
|
-
output:
|
|
1060
|
+
z14.object({
|
|
1061
|
+
executionId: z14.string(),
|
|
1062
|
+
status: z14.literal("output"),
|
|
1063
|
+
output: z14.string()
|
|
1034
1064
|
}),
|
|
1035
|
-
|
|
1036
|
-
executionId:
|
|
1037
|
-
status:
|
|
1038
|
-
exitCode:
|
|
1065
|
+
z14.object({
|
|
1066
|
+
executionId: z14.string(),
|
|
1067
|
+
status: z14.literal("exited"),
|
|
1068
|
+
exitCode: z14.number().optional()
|
|
1039
1069
|
}),
|
|
1040
|
-
|
|
1041
|
-
executionId:
|
|
1042
|
-
status:
|
|
1070
|
+
z14.object({
|
|
1071
|
+
executionId: z14.string(),
|
|
1072
|
+
status: z14.literal("fallback")
|
|
1043
1073
|
})
|
|
1044
1074
|
]);
|
|
1045
1075
|
export {
|
|
@@ -1047,6 +1077,7 @@ export {
|
|
|
1047
1077
|
GLOBAL_STATE_KEYS,
|
|
1048
1078
|
IpcMessageType,
|
|
1049
1079
|
IpcOrigin,
|
|
1080
|
+
ORGANIZATION_ALLOW_ALL,
|
|
1050
1081
|
PROVIDER_SETTINGS_KEYS,
|
|
1051
1082
|
RooCodeEventName,
|
|
1052
1083
|
SECRET_STATE_KEYS,
|
|
@@ -1088,6 +1119,8 @@ export {
|
|
|
1088
1119
|
modelInfoSchema,
|
|
1089
1120
|
modelParameters,
|
|
1090
1121
|
modelParametersSchema,
|
|
1122
|
+
organizationAllowListSchema,
|
|
1123
|
+
organizationSettingsSchema,
|
|
1091
1124
|
promptComponentSchema,
|
|
1092
1125
|
providerNames,
|
|
1093
1126
|
providerNamesSchema,
|