@roo-code/types 1.19.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +476 -441
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +334 -2
- package/dist/index.d.ts +334 -2
- package/dist/index.js +473 -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,34 @@ var rooCodeTelemetryEventSchema = z6.discriminatedUnion("type", [
|
|
|
467
567
|
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
468
568
|
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */
|
|
469
569
|
]),
|
|
470
|
-
properties:
|
|
471
|
-
|
|
472
|
-
|
|
570
|
+
properties: telemetryPropertiesSchema
|
|
571
|
+
}),
|
|
572
|
+
z8.object({
|
|
573
|
+
type: z8.literal("Task Message" /* TASK_MESSAGE */),
|
|
574
|
+
properties: z8.object({
|
|
575
|
+
message: clineMessageSchema
|
|
473
576
|
})
|
|
474
577
|
}),
|
|
475
|
-
|
|
476
|
-
type:
|
|
477
|
-
properties:
|
|
478
|
-
...
|
|
479
|
-
|
|
480
|
-
|
|
578
|
+
z8.object({
|
|
579
|
+
type: z8.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
580
|
+
properties: z8.object({
|
|
581
|
+
...telemetryPropertiesSchema.shape,
|
|
582
|
+
inputTokens: z8.number(),
|
|
583
|
+
outputTokens: z8.number(),
|
|
584
|
+
cacheReadTokens: z8.number().optional(),
|
|
585
|
+
cacheWriteTokens: z8.number().optional(),
|
|
586
|
+
cost: z8.number().optional()
|
|
481
587
|
})
|
|
482
588
|
})
|
|
483
589
|
]);
|
|
484
590
|
|
|
485
591
|
// src/mode.ts
|
|
486
|
-
import { z as
|
|
592
|
+
import { z as z10 } from "zod";
|
|
487
593
|
|
|
488
594
|
// src/tool.ts
|
|
489
|
-
import { z as
|
|
595
|
+
import { z as z9 } from "zod";
|
|
490
596
|
var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
|
|
491
|
-
var toolGroupsSchema =
|
|
597
|
+
var toolGroupsSchema = z9.enum(toolGroups);
|
|
492
598
|
var toolNames = [
|
|
493
599
|
"execute_command",
|
|
494
600
|
"read_file",
|
|
@@ -509,18 +615,18 @@ var toolNames = [
|
|
|
509
615
|
"fetch_instructions",
|
|
510
616
|
"codebase_search"
|
|
511
617
|
];
|
|
512
|
-
var toolNamesSchema =
|
|
513
|
-
var toolUsageSchema =
|
|
618
|
+
var toolNamesSchema = z9.enum(toolNames);
|
|
619
|
+
var toolUsageSchema = z9.record(
|
|
514
620
|
toolNamesSchema,
|
|
515
|
-
|
|
516
|
-
attempts:
|
|
517
|
-
failures:
|
|
621
|
+
z9.object({
|
|
622
|
+
attempts: z9.number(),
|
|
623
|
+
failures: z9.number()
|
|
518
624
|
})
|
|
519
625
|
);
|
|
520
626
|
|
|
521
627
|
// src/mode.ts
|
|
522
|
-
var groupOptionsSchema =
|
|
523
|
-
fileRegex:
|
|
628
|
+
var groupOptionsSchema = z10.object({
|
|
629
|
+
fileRegex: z10.string().optional().refine(
|
|
524
630
|
(pattern) => {
|
|
525
631
|
if (!pattern) {
|
|
526
632
|
return true;
|
|
@@ -534,10 +640,10 @@ var groupOptionsSchema = z8.object({
|
|
|
534
640
|
},
|
|
535
641
|
{ message: "Invalid regular expression pattern" }
|
|
536
642
|
),
|
|
537
|
-
description:
|
|
643
|
+
description: z10.string().optional()
|
|
538
644
|
});
|
|
539
|
-
var groupEntrySchema =
|
|
540
|
-
var groupEntryArraySchema =
|
|
645
|
+
var groupEntrySchema = z10.union([toolGroupsSchema, z10.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
646
|
+
var groupEntryArraySchema = z10.array(groupEntrySchema).refine(
|
|
541
647
|
(groups) => {
|
|
542
648
|
const seen = /* @__PURE__ */ new Set();
|
|
543
649
|
return groups.every((group) => {
|
|
@@ -551,17 +657,17 @@ var groupEntryArraySchema = z8.array(groupEntrySchema).refine(
|
|
|
551
657
|
},
|
|
552
658
|
{ message: "Duplicate groups are not allowed" }
|
|
553
659
|
);
|
|
554
|
-
var modeConfigSchema =
|
|
555
|
-
slug:
|
|
556
|
-
name:
|
|
557
|
-
roleDefinition:
|
|
558
|
-
whenToUse:
|
|
559
|
-
customInstructions:
|
|
660
|
+
var modeConfigSchema = z10.object({
|
|
661
|
+
slug: z10.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
662
|
+
name: z10.string().min(1, "Name is required"),
|
|
663
|
+
roleDefinition: z10.string().min(1, "Role definition is required"),
|
|
664
|
+
whenToUse: z10.string().optional(),
|
|
665
|
+
customInstructions: z10.string().optional(),
|
|
560
666
|
groups: groupEntryArraySchema,
|
|
561
|
-
source:
|
|
667
|
+
source: z10.enum(["global", "project"]).optional()
|
|
562
668
|
});
|
|
563
|
-
var customModesSettingsSchema =
|
|
564
|
-
customModes:
|
|
669
|
+
var customModesSettingsSchema = z10.object({
|
|
670
|
+
customModes: z10.array(modeConfigSchema).refine(
|
|
565
671
|
(modes) => {
|
|
566
672
|
const slugs = /* @__PURE__ */ new Set();
|
|
567
673
|
return modes.every((mode) => {
|
|
@@ -577,16 +683,16 @@ var customModesSettingsSchema = z8.object({
|
|
|
577
683
|
}
|
|
578
684
|
)
|
|
579
685
|
});
|
|
580
|
-
var promptComponentSchema =
|
|
581
|
-
roleDefinition:
|
|
582
|
-
whenToUse:
|
|
583
|
-
customInstructions:
|
|
686
|
+
var promptComponentSchema = z10.object({
|
|
687
|
+
roleDefinition: z10.string().optional(),
|
|
688
|
+
whenToUse: z10.string().optional(),
|
|
689
|
+
customInstructions: z10.string().optional()
|
|
584
690
|
});
|
|
585
|
-
var customModePromptsSchema =
|
|
586
|
-
var customSupportPromptsSchema =
|
|
691
|
+
var customModePromptsSchema = z10.record(z10.string(), promptComponentSchema.optional());
|
|
692
|
+
var customSupportPromptsSchema = z10.record(z10.string(), z10.string().optional());
|
|
587
693
|
|
|
588
694
|
// src/vscode.ts
|
|
589
|
-
import { z as
|
|
695
|
+
import { z as z11 } from "zod";
|
|
590
696
|
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
591
697
|
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
592
698
|
var commandIds = [
|
|
@@ -596,6 +702,7 @@ var commandIds = [
|
|
|
596
702
|
"mcpButtonClicked",
|
|
597
703
|
"historyButtonClicked",
|
|
598
704
|
"popoutButtonClicked",
|
|
705
|
+
"accountButtonClicked",
|
|
599
706
|
"settingsButtonClicked",
|
|
600
707
|
"openInNewTab",
|
|
601
708
|
"showHumanRelayDialog",
|
|
@@ -626,77 +733,77 @@ var languages = [
|
|
|
626
733
|
"zh-CN",
|
|
627
734
|
"zh-TW"
|
|
628
735
|
];
|
|
629
|
-
var languagesSchema =
|
|
736
|
+
var languagesSchema = z11.enum(languages);
|
|
630
737
|
var isLanguage = (value) => languages.includes(value);
|
|
631
738
|
|
|
632
739
|
// src/global-settings.ts
|
|
633
|
-
var globalSettingsSchema =
|
|
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:
|
|
740
|
+
var globalSettingsSchema = z12.object({
|
|
741
|
+
currentApiConfigName: z12.string().optional(),
|
|
742
|
+
listApiConfigMeta: z12.array(providerSettingsEntrySchema).optional(),
|
|
743
|
+
pinnedApiConfigs: z12.record(z12.string(), z12.boolean()).optional(),
|
|
744
|
+
lastShownAnnouncementId: z12.string().optional(),
|
|
745
|
+
customInstructions: z12.string().optional(),
|
|
746
|
+
taskHistory: z12.array(historyItemSchema).optional(),
|
|
747
|
+
condensingApiConfigId: z12.string().optional(),
|
|
748
|
+
customCondensingPrompt: z12.string().optional(),
|
|
749
|
+
autoApprovalEnabled: z12.boolean().optional(),
|
|
750
|
+
alwaysAllowReadOnly: z12.boolean().optional(),
|
|
751
|
+
alwaysAllowReadOnlyOutsideWorkspace: z12.boolean().optional(),
|
|
752
|
+
alwaysAllowWrite: z12.boolean().optional(),
|
|
753
|
+
alwaysAllowWriteOutsideWorkspace: z12.boolean().optional(),
|
|
754
|
+
writeDelayMs: z12.number().optional(),
|
|
755
|
+
alwaysAllowBrowser: z12.boolean().optional(),
|
|
756
|
+
alwaysApproveResubmit: z12.boolean().optional(),
|
|
757
|
+
requestDelaySeconds: z12.number().optional(),
|
|
758
|
+
alwaysAllowMcp: z12.boolean().optional(),
|
|
759
|
+
alwaysAllowModeSwitch: z12.boolean().optional(),
|
|
760
|
+
alwaysAllowSubtasks: z12.boolean().optional(),
|
|
761
|
+
alwaysAllowExecute: z12.boolean().optional(),
|
|
762
|
+
allowedCommands: z12.array(z12.string()).optional(),
|
|
763
|
+
allowedMaxRequests: z12.number().nullish(),
|
|
764
|
+
autoCondenseContextPercent: z12.number().optional(),
|
|
765
|
+
browserToolEnabled: z12.boolean().optional(),
|
|
766
|
+
browserViewportSize: z12.string().optional(),
|
|
767
|
+
screenshotQuality: z12.number().optional(),
|
|
768
|
+
remoteBrowserEnabled: z12.boolean().optional(),
|
|
769
|
+
remoteBrowserHost: z12.string().optional(),
|
|
770
|
+
cachedChromeHostUrl: z12.string().optional(),
|
|
771
|
+
enableCheckpoints: z12.boolean().optional(),
|
|
772
|
+
ttsEnabled: z12.boolean().optional(),
|
|
773
|
+
ttsSpeed: z12.number().optional(),
|
|
774
|
+
soundEnabled: z12.boolean().optional(),
|
|
775
|
+
soundVolume: z12.number().optional(),
|
|
776
|
+
maxOpenTabsContext: z12.number().optional(),
|
|
777
|
+
maxWorkspaceFiles: z12.number().optional(),
|
|
778
|
+
showRooIgnoredFiles: z12.boolean().optional(),
|
|
779
|
+
maxReadFileLine: z12.number().optional(),
|
|
780
|
+
terminalOutputLineLimit: z12.number().optional(),
|
|
781
|
+
terminalShellIntegrationTimeout: z12.number().optional(),
|
|
782
|
+
terminalShellIntegrationDisabled: z12.boolean().optional(),
|
|
783
|
+
terminalCommandDelay: z12.number().optional(),
|
|
784
|
+
terminalPowershellCounter: z12.boolean().optional(),
|
|
785
|
+
terminalZshClearEolMark: z12.boolean().optional(),
|
|
786
|
+
terminalZshOhMy: z12.boolean().optional(),
|
|
787
|
+
terminalZshP10k: z12.boolean().optional(),
|
|
788
|
+
terminalZdotdir: z12.boolean().optional(),
|
|
789
|
+
terminalCompressProgressBar: z12.boolean().optional(),
|
|
790
|
+
rateLimitSeconds: z12.number().optional(),
|
|
791
|
+
diffEnabled: z12.boolean().optional(),
|
|
792
|
+
fuzzyMatchThreshold: z12.number().optional(),
|
|
686
793
|
experiments: experimentsSchema.optional(),
|
|
687
794
|
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
688
795
|
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
689
796
|
language: languagesSchema.optional(),
|
|
690
797
|
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
691
|
-
mcpEnabled:
|
|
692
|
-
enableMcpServerCreation:
|
|
693
|
-
mode:
|
|
694
|
-
modeApiConfigs:
|
|
695
|
-
customModes:
|
|
798
|
+
mcpEnabled: z12.boolean().optional(),
|
|
799
|
+
enableMcpServerCreation: z12.boolean().optional(),
|
|
800
|
+
mode: z12.string().optional(),
|
|
801
|
+
modeApiConfigs: z12.record(z12.string(), z12.string()).optional(),
|
|
802
|
+
customModes: z12.array(modeConfigSchema).optional(),
|
|
696
803
|
customModePrompts: customModePromptsSchema.optional(),
|
|
697
804
|
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
698
|
-
enhancementApiConfigId:
|
|
699
|
-
historyPreviewCollapsed:
|
|
805
|
+
enhancementApiConfigId: z12.string().optional(),
|
|
806
|
+
historyPreviewCollapsed: z12.boolean().optional()
|
|
700
807
|
});
|
|
701
808
|
var GLOBAL_SETTINGS_KEYS = keysOf()([
|
|
702
809
|
"currentApiConfigName",
|
|
@@ -795,85 +902,7 @@ var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].fil
|
|
|
795
902
|
var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
796
903
|
|
|
797
904
|
// src/ipc.ts
|
|
798
|
-
import { z as
|
|
799
|
-
|
|
800
|
-
// src/message.ts
|
|
801
|
-
import { z as z11 } from "zod";
|
|
802
|
-
var clineAsks = [
|
|
803
|
-
"followup",
|
|
804
|
-
"command",
|
|
805
|
-
"command_output",
|
|
806
|
-
"completion_result",
|
|
807
|
-
"tool",
|
|
808
|
-
"api_req_failed",
|
|
809
|
-
"resume_task",
|
|
810
|
-
"resume_completed_task",
|
|
811
|
-
"mistake_limit_reached",
|
|
812
|
-
"browser_action_launch",
|
|
813
|
-
"use_mcp_server",
|
|
814
|
-
"auto_approval_max_req_reached"
|
|
815
|
-
];
|
|
816
|
-
var clineAskSchema = z11.enum(clineAsks);
|
|
817
|
-
var clineSays = [
|
|
818
|
-
"error",
|
|
819
|
-
"api_req_started",
|
|
820
|
-
"api_req_finished",
|
|
821
|
-
"api_req_retried",
|
|
822
|
-
"api_req_retry_delayed",
|
|
823
|
-
"api_req_deleted",
|
|
824
|
-
"text",
|
|
825
|
-
"reasoning",
|
|
826
|
-
"completion_result",
|
|
827
|
-
"user_feedback",
|
|
828
|
-
"user_feedback_diff",
|
|
829
|
-
"command_output",
|
|
830
|
-
"shell_integration_warning",
|
|
831
|
-
"browser_action",
|
|
832
|
-
"browser_action_result",
|
|
833
|
-
"mcp_server_request_started",
|
|
834
|
-
"mcp_server_response",
|
|
835
|
-
"subtask_result",
|
|
836
|
-
"checkpoint_saved",
|
|
837
|
-
"rooignore_error",
|
|
838
|
-
"diff_error",
|
|
839
|
-
"condense_context",
|
|
840
|
-
"codebase_search_result"
|
|
841
|
-
];
|
|
842
|
-
var clineSaySchema = z11.enum(clineSays);
|
|
843
|
-
var toolProgressStatusSchema = z11.object({
|
|
844
|
-
icon: z11.string().optional(),
|
|
845
|
-
text: z11.string().optional()
|
|
846
|
-
});
|
|
847
|
-
var contextCondenseSchema = z11.object({
|
|
848
|
-
cost: z11.number(),
|
|
849
|
-
prevContextTokens: z11.number(),
|
|
850
|
-
newContextTokens: z11.number(),
|
|
851
|
-
summary: z11.string()
|
|
852
|
-
});
|
|
853
|
-
var clineMessageSchema = z11.object({
|
|
854
|
-
ts: z11.number(),
|
|
855
|
-
type: z11.union([z11.literal("ask"), z11.literal("say")]),
|
|
856
|
-
ask: clineAskSchema.optional(),
|
|
857
|
-
say: clineSaySchema.optional(),
|
|
858
|
-
text: z11.string().optional(),
|
|
859
|
-
images: z11.array(z11.string()).optional(),
|
|
860
|
-
partial: z11.boolean().optional(),
|
|
861
|
-
reasoning: z11.string().optional(),
|
|
862
|
-
conversationHistoryIndex: z11.number().optional(),
|
|
863
|
-
checkpoint: z11.record(z11.string(), z11.unknown()).optional(),
|
|
864
|
-
progressStatus: toolProgressStatusSchema.optional(),
|
|
865
|
-
contextCondense: contextCondenseSchema.optional()
|
|
866
|
-
});
|
|
867
|
-
var tokenUsageSchema = z11.object({
|
|
868
|
-
totalTokensIn: z11.number(),
|
|
869
|
-
totalTokensOut: z11.number(),
|
|
870
|
-
totalCacheWrites: z11.number().optional(),
|
|
871
|
-
totalCacheReads: z11.number().optional(),
|
|
872
|
-
totalCost: z11.number(),
|
|
873
|
-
contextTokens: z11.number()
|
|
874
|
-
});
|
|
875
|
-
|
|
876
|
-
// src/ipc.ts
|
|
905
|
+
import { z as z13 } from "zod";
|
|
877
906
|
var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
878
907
|
RooCodeEventName2["Message"] = "message";
|
|
879
908
|
RooCodeEventName2["TaskCreated"] = "taskCreated";
|
|
@@ -889,30 +918,30 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
|
|
|
889
918
|
RooCodeEventName2["TaskToolFailed"] = "taskToolFailed";
|
|
890
919
|
return RooCodeEventName2;
|
|
891
920
|
})(RooCodeEventName || {});
|
|
892
|
-
var rooCodeEventsSchema =
|
|
893
|
-
["message" /* Message */]:
|
|
894
|
-
|
|
895
|
-
taskId:
|
|
896
|
-
action:
|
|
921
|
+
var rooCodeEventsSchema = z13.object({
|
|
922
|
+
["message" /* Message */]: z13.tuple([
|
|
923
|
+
z13.object({
|
|
924
|
+
taskId: z13.string(),
|
|
925
|
+
action: z13.union([z13.literal("created"), z13.literal("updated")]),
|
|
897
926
|
message: clineMessageSchema
|
|
898
927
|
})
|
|
899
928
|
]),
|
|
900
|
-
["taskCreated" /* TaskCreated */]:
|
|
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 */]:
|
|
929
|
+
["taskCreated" /* TaskCreated */]: z13.tuple([z13.string()]),
|
|
930
|
+
["taskStarted" /* TaskStarted */]: z13.tuple([z13.string()]),
|
|
931
|
+
["taskModeSwitched" /* TaskModeSwitched */]: z13.tuple([z13.string(), z13.string()]),
|
|
932
|
+
["taskPaused" /* TaskPaused */]: z13.tuple([z13.string()]),
|
|
933
|
+
["taskUnpaused" /* TaskUnpaused */]: z13.tuple([z13.string()]),
|
|
934
|
+
["taskAskResponded" /* TaskAskResponded */]: z13.tuple([z13.string()]),
|
|
935
|
+
["taskAborted" /* TaskAborted */]: z13.tuple([z13.string()]),
|
|
936
|
+
["taskSpawned" /* TaskSpawned */]: z13.tuple([z13.string(), z13.string()]),
|
|
937
|
+
["taskCompleted" /* TaskCompleted */]: z13.tuple([z13.string(), tokenUsageSchema, toolUsageSchema]),
|
|
938
|
+
["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z13.tuple([z13.string(), tokenUsageSchema]),
|
|
939
|
+
["taskToolFailed" /* TaskToolFailed */]: z13.tuple([z13.string(), toolNamesSchema, z13.string()])
|
|
911
940
|
});
|
|
912
|
-
var ackSchema =
|
|
913
|
-
clientId:
|
|
914
|
-
pid:
|
|
915
|
-
ppid:
|
|
941
|
+
var ackSchema = z13.object({
|
|
942
|
+
clientId: z13.string(),
|
|
943
|
+
pid: z13.number(),
|
|
944
|
+
ppid: z13.number()
|
|
916
945
|
});
|
|
917
946
|
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
918
947
|
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
@@ -920,68 +949,68 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
|
920
949
|
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
921
950
|
return TaskCommandName2;
|
|
922
951
|
})(TaskCommandName || {});
|
|
923
|
-
var taskCommandSchema =
|
|
924
|
-
|
|
925
|
-
commandName:
|
|
926
|
-
data:
|
|
952
|
+
var taskCommandSchema = z13.discriminatedUnion("commandName", [
|
|
953
|
+
z13.object({
|
|
954
|
+
commandName: z13.literal("StartNewTask" /* StartNewTask */),
|
|
955
|
+
data: z13.object({
|
|
927
956
|
configuration: rooCodeSettingsSchema,
|
|
928
|
-
text:
|
|
929
|
-
images:
|
|
930
|
-
newTab:
|
|
957
|
+
text: z13.string(),
|
|
958
|
+
images: z13.array(z13.string()).optional(),
|
|
959
|
+
newTab: z13.boolean().optional()
|
|
931
960
|
})
|
|
932
961
|
}),
|
|
933
|
-
|
|
934
|
-
commandName:
|
|
935
|
-
data:
|
|
962
|
+
z13.object({
|
|
963
|
+
commandName: z13.literal("CancelTask" /* CancelTask */),
|
|
964
|
+
data: z13.string()
|
|
936
965
|
}),
|
|
937
|
-
|
|
938
|
-
commandName:
|
|
939
|
-
data:
|
|
966
|
+
z13.object({
|
|
967
|
+
commandName: z13.literal("CloseTask" /* CloseTask */),
|
|
968
|
+
data: z13.string()
|
|
940
969
|
})
|
|
941
970
|
]);
|
|
942
|
-
var taskEventSchema =
|
|
943
|
-
|
|
944
|
-
eventName:
|
|
971
|
+
var taskEventSchema = z13.discriminatedUnion("eventName", [
|
|
972
|
+
z13.object({
|
|
973
|
+
eventName: z13.literal("message" /* Message */),
|
|
945
974
|
payload: rooCodeEventsSchema.shape["message" /* Message */]
|
|
946
975
|
}),
|
|
947
|
-
|
|
948
|
-
eventName:
|
|
976
|
+
z13.object({
|
|
977
|
+
eventName: z13.literal("taskCreated" /* TaskCreated */),
|
|
949
978
|
payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */]
|
|
950
979
|
}),
|
|
951
|
-
|
|
952
|
-
eventName:
|
|
980
|
+
z13.object({
|
|
981
|
+
eventName: z13.literal("taskStarted" /* TaskStarted */),
|
|
953
982
|
payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */]
|
|
954
983
|
}),
|
|
955
|
-
|
|
956
|
-
eventName:
|
|
984
|
+
z13.object({
|
|
985
|
+
eventName: z13.literal("taskModeSwitched" /* TaskModeSwitched */),
|
|
957
986
|
payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */]
|
|
958
987
|
}),
|
|
959
|
-
|
|
960
|
-
eventName:
|
|
988
|
+
z13.object({
|
|
989
|
+
eventName: z13.literal("taskPaused" /* TaskPaused */),
|
|
961
990
|
payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */]
|
|
962
991
|
}),
|
|
963
|
-
|
|
964
|
-
eventName:
|
|
992
|
+
z13.object({
|
|
993
|
+
eventName: z13.literal("taskUnpaused" /* TaskUnpaused */),
|
|
965
994
|
payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */]
|
|
966
995
|
}),
|
|
967
|
-
|
|
968
|
-
eventName:
|
|
996
|
+
z13.object({
|
|
997
|
+
eventName: z13.literal("taskAskResponded" /* TaskAskResponded */),
|
|
969
998
|
payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */]
|
|
970
999
|
}),
|
|
971
|
-
|
|
972
|
-
eventName:
|
|
1000
|
+
z13.object({
|
|
1001
|
+
eventName: z13.literal("taskAborted" /* TaskAborted */),
|
|
973
1002
|
payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */]
|
|
974
1003
|
}),
|
|
975
|
-
|
|
976
|
-
eventName:
|
|
1004
|
+
z13.object({
|
|
1005
|
+
eventName: z13.literal("taskSpawned" /* TaskSpawned */),
|
|
977
1006
|
payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */]
|
|
978
1007
|
}),
|
|
979
|
-
|
|
980
|
-
eventName:
|
|
1008
|
+
z13.object({
|
|
1009
|
+
eventName: z13.literal("taskCompleted" /* TaskCompleted */),
|
|
981
1010
|
payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */]
|
|
982
1011
|
}),
|
|
983
|
-
|
|
984
|
-
eventName:
|
|
1012
|
+
z13.object({
|
|
1013
|
+
eventName: z13.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
|
|
985
1014
|
payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]
|
|
986
1015
|
})
|
|
987
1016
|
]);
|
|
@@ -998,48 +1027,48 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
|
998
1027
|
IpcOrigin2["Server"] = "server";
|
|
999
1028
|
return IpcOrigin2;
|
|
1000
1029
|
})(IpcOrigin || {});
|
|
1001
|
-
var ipcMessageSchema =
|
|
1002
|
-
|
|
1003
|
-
type:
|
|
1004
|
-
origin:
|
|
1030
|
+
var ipcMessageSchema = z13.discriminatedUnion("type", [
|
|
1031
|
+
z13.object({
|
|
1032
|
+
type: z13.literal("Ack" /* Ack */),
|
|
1033
|
+
origin: z13.literal("server" /* Server */),
|
|
1005
1034
|
data: ackSchema
|
|
1006
1035
|
}),
|
|
1007
|
-
|
|
1008
|
-
type:
|
|
1009
|
-
origin:
|
|
1010
|
-
clientId:
|
|
1036
|
+
z13.object({
|
|
1037
|
+
type: z13.literal("TaskCommand" /* TaskCommand */),
|
|
1038
|
+
origin: z13.literal("client" /* Client */),
|
|
1039
|
+
clientId: z13.string(),
|
|
1011
1040
|
data: taskCommandSchema
|
|
1012
1041
|
}),
|
|
1013
|
-
|
|
1014
|
-
type:
|
|
1015
|
-
origin:
|
|
1016
|
-
relayClientId:
|
|
1042
|
+
z13.object({
|
|
1043
|
+
type: z13.literal("TaskEvent" /* TaskEvent */),
|
|
1044
|
+
origin: z13.literal("server" /* Server */),
|
|
1045
|
+
relayClientId: z13.string().optional(),
|
|
1017
1046
|
data: taskEventSchema
|
|
1018
1047
|
})
|
|
1019
1048
|
]);
|
|
1020
1049
|
|
|
1021
1050
|
// src/terminal.ts
|
|
1022
|
-
import { z as
|
|
1023
|
-
var commandExecutionStatusSchema =
|
|
1024
|
-
|
|
1025
|
-
executionId:
|
|
1026
|
-
status:
|
|
1027
|
-
pid:
|
|
1028
|
-
command:
|
|
1051
|
+
import { z as z14 } from "zod";
|
|
1052
|
+
var commandExecutionStatusSchema = z14.discriminatedUnion("status", [
|
|
1053
|
+
z14.object({
|
|
1054
|
+
executionId: z14.string(),
|
|
1055
|
+
status: z14.literal("started"),
|
|
1056
|
+
pid: z14.number().optional(),
|
|
1057
|
+
command: z14.string()
|
|
1029
1058
|
}),
|
|
1030
|
-
|
|
1031
|
-
executionId:
|
|
1032
|
-
status:
|
|
1033
|
-
output:
|
|
1059
|
+
z14.object({
|
|
1060
|
+
executionId: z14.string(),
|
|
1061
|
+
status: z14.literal("output"),
|
|
1062
|
+
output: z14.string()
|
|
1034
1063
|
}),
|
|
1035
|
-
|
|
1036
|
-
executionId:
|
|
1037
|
-
status:
|
|
1038
|
-
exitCode:
|
|
1064
|
+
z14.object({
|
|
1065
|
+
executionId: z14.string(),
|
|
1066
|
+
status: z14.literal("exited"),
|
|
1067
|
+
exitCode: z14.number().optional()
|
|
1039
1068
|
}),
|
|
1040
|
-
|
|
1041
|
-
executionId:
|
|
1042
|
-
status:
|
|
1069
|
+
z14.object({
|
|
1070
|
+
executionId: z14.string(),
|
|
1071
|
+
status: z14.literal("fallback")
|
|
1043
1072
|
})
|
|
1044
1073
|
]);
|
|
1045
1074
|
export {
|
|
@@ -1047,6 +1076,7 @@ export {
|
|
|
1047
1076
|
GLOBAL_STATE_KEYS,
|
|
1048
1077
|
IpcMessageType,
|
|
1049
1078
|
IpcOrigin,
|
|
1079
|
+
ORGANIZATION_ALLOW_ALL,
|
|
1050
1080
|
PROVIDER_SETTINGS_KEYS,
|
|
1051
1081
|
RooCodeEventName,
|
|
1052
1082
|
SECRET_STATE_KEYS,
|
|
@@ -1088,6 +1118,8 @@ export {
|
|
|
1088
1118
|
modelInfoSchema,
|
|
1089
1119
|
modelParameters,
|
|
1090
1120
|
modelParametersSchema,
|
|
1121
|
+
organizationAllowListSchema,
|
|
1122
|
+
organizationSettingsSchema,
|
|
1091
1123
|
promptComponentSchema,
|
|
1092
1124
|
providerNames,
|
|
1093
1125
|
providerNamesSchema,
|