@roo-code/types 1.63.0 → 1.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,52 +1,11 @@
1
- // src/codebase-index.ts
2
- import { z } from "zod";
3
- var CODEBASE_INDEX_DEFAULTS = {
4
- MIN_SEARCH_RESULTS: 10,
5
- MAX_SEARCH_RESULTS: 200,
6
- DEFAULT_SEARCH_RESULTS: 50,
7
- SEARCH_RESULTS_STEP: 10,
8
- MIN_SEARCH_SCORE: 0,
9
- MAX_SEARCH_SCORE: 1,
10
- DEFAULT_SEARCH_MIN_SCORE: 0.4,
11
- SEARCH_SCORE_STEP: 0.05
12
- };
13
- var codebaseIndexConfigSchema = z.object({
14
- codebaseIndexEnabled: z.boolean().optional(),
15
- codebaseIndexQdrantUrl: z.string().optional(),
16
- codebaseIndexEmbedderProvider: z.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"]).optional(),
17
- codebaseIndexEmbedderBaseUrl: z.string().optional(),
18
- codebaseIndexEmbedderModelId: z.string().optional(),
19
- codebaseIndexEmbedderModelDimension: z.number().optional(),
20
- codebaseIndexSearchMinScore: z.number().min(0).max(1).optional(),
21
- codebaseIndexSearchMaxResults: z.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
22
- // OpenAI Compatible specific fields
23
- codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
24
- codebaseIndexOpenAiCompatibleModelDimension: z.number().optional()
25
- });
26
- var codebaseIndexModelsSchema = z.object({
27
- openai: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
28
- ollama: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
29
- "openai-compatible": z.record(z.string(), z.object({ dimension: z.number() })).optional(),
30
- gemini: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
31
- mistral: z.record(z.string(), z.object({ dimension: z.number() })).optional(),
32
- "vercel-ai-gateway": z.record(z.string(), z.object({ dimension: z.number() })).optional()
33
- });
34
- var codebaseIndexProviderSchema = z.object({
35
- codeIndexOpenAiKey: z.string().optional(),
36
- codeIndexQdrantApiKey: z.string().optional(),
37
- codebaseIndexOpenAiCompatibleBaseUrl: z.string().optional(),
38
- codebaseIndexOpenAiCompatibleApiKey: z.string().optional(),
39
- codebaseIndexOpenAiCompatibleModelDimension: z.number().optional(),
40
- codebaseIndexGeminiApiKey: z.string().optional(),
41
- codebaseIndexMistralApiKey: z.string().optional(),
42
- codebaseIndexVercelAiGatewayApiKey: z.string().optional()
43
- });
1
+ // src/cloud.ts
2
+ import { z as z15 } from "zod";
44
3
 
45
4
  // src/events.ts
46
- import { z as z4 } from "zod";
5
+ import { z as z3 } from "zod";
47
6
 
48
7
  // src/message.ts
49
- import { z as z2 } from "zod";
8
+ import { z } from "zod";
50
9
  var clineAsks = [
51
10
  "followup",
52
11
  "command",
@@ -61,7 +20,7 @@ var clineAsks = [
61
20
  "use_mcp_server",
62
21
  "auto_approval_max_req_reached"
63
22
  ];
64
- var clineAskSchema = z2.enum(clineAsks);
23
+ var clineAskSchema = z.enum(clineAsks);
65
24
  var idleAsks = [
66
25
  "completion_result",
67
26
  "api_req_failed",
@@ -112,53 +71,53 @@ var clineSays = [
112
71
  "codebase_search_result",
113
72
  "user_edit_todos"
114
73
  ];
115
- var clineSaySchema = z2.enum(clineSays);
116
- var toolProgressStatusSchema = z2.object({
117
- icon: z2.string().optional(),
118
- text: z2.string().optional()
74
+ var clineSaySchema = z.enum(clineSays);
75
+ var toolProgressStatusSchema = z.object({
76
+ icon: z.string().optional(),
77
+ text: z.string().optional()
119
78
  });
120
- var contextCondenseSchema = z2.object({
121
- cost: z2.number(),
122
- prevContextTokens: z2.number(),
123
- newContextTokens: z2.number(),
124
- summary: z2.string()
79
+ var contextCondenseSchema = z.object({
80
+ cost: z.number(),
81
+ prevContextTokens: z.number(),
82
+ newContextTokens: z.number(),
83
+ summary: z.string()
125
84
  });
126
- var clineMessageSchema = z2.object({
127
- ts: z2.number(),
128
- type: z2.union([z2.literal("ask"), z2.literal("say")]),
85
+ var clineMessageSchema = z.object({
86
+ ts: z.number(),
87
+ type: z.union([z.literal("ask"), z.literal("say")]),
129
88
  ask: clineAskSchema.optional(),
130
89
  say: clineSaySchema.optional(),
131
- text: z2.string().optional(),
132
- images: z2.array(z2.string()).optional(),
133
- partial: z2.boolean().optional(),
134
- reasoning: z2.string().optional(),
135
- conversationHistoryIndex: z2.number().optional(),
136
- checkpoint: z2.record(z2.string(), z2.unknown()).optional(),
90
+ text: z.string().optional(),
91
+ images: z.array(z.string()).optional(),
92
+ partial: z.boolean().optional(),
93
+ reasoning: z.string().optional(),
94
+ conversationHistoryIndex: z.number().optional(),
95
+ checkpoint: z.record(z.string(), z.unknown()).optional(),
137
96
  progressStatus: toolProgressStatusSchema.optional(),
138
97
  contextCondense: contextCondenseSchema.optional(),
139
- isProtected: z2.boolean().optional(),
140
- apiProtocol: z2.union([z2.literal("openai"), z2.literal("anthropic")]).optional(),
141
- metadata: z2.object({
142
- gpt5: z2.object({
143
- previous_response_id: z2.string().optional(),
144
- instructions: z2.string().optional(),
145
- reasoning_summary: z2.string().optional()
98
+ isProtected: z.boolean().optional(),
99
+ apiProtocol: z.union([z.literal("openai"), z.literal("anthropic")]).optional(),
100
+ metadata: z.object({
101
+ gpt5: z.object({
102
+ previous_response_id: z.string().optional(),
103
+ instructions: z.string().optional(),
104
+ reasoning_summary: z.string().optional()
146
105
  }).optional()
147
106
  }).optional()
148
107
  });
149
- var tokenUsageSchema = z2.object({
150
- totalTokensIn: z2.number(),
151
- totalTokensOut: z2.number(),
152
- totalCacheWrites: z2.number().optional(),
153
- totalCacheReads: z2.number().optional(),
154
- totalCost: z2.number(),
155
- contextTokens: z2.number()
108
+ var tokenUsageSchema = z.object({
109
+ totalTokensIn: z.number(),
110
+ totalTokensOut: z.number(),
111
+ totalCacheWrites: z.number().optional(),
112
+ totalCacheReads: z.number().optional(),
113
+ totalCost: z.number(),
114
+ contextTokens: z.number()
156
115
  });
157
116
 
158
117
  // src/tool.ts
159
- import { z as z3 } from "zod";
118
+ import { z as z2 } from "zod";
160
119
  var toolGroups = ["read", "edit", "browser", "command", "mcp", "modes"];
161
- var toolGroupsSchema = z3.enum(toolGroups);
120
+ var toolGroupsSchema = z2.enum(toolGroups);
162
121
  var toolNames = [
163
122
  "execute_command",
164
123
  "read_file",
@@ -181,12 +140,12 @@ var toolNames = [
181
140
  "update_todo_list",
182
141
  "generate_image"
183
142
  ];
184
- var toolNamesSchema = z3.enum(toolNames);
185
- var toolUsageSchema = z3.record(
143
+ var toolNamesSchema = z2.enum(toolNames);
144
+ var toolUsageSchema = z2.record(
186
145
  toolNamesSchema,
187
- z3.object({
188
- attempts: z3.number(),
189
- failures: z3.number()
146
+ z2.object({
147
+ attempts: z2.number(),
148
+ failures: z2.number()
190
149
  })
191
150
  );
192
151
 
@@ -214,226 +173,258 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
214
173
  RooCodeEventName2["EvalFail"] = "evalFail";
215
174
  return RooCodeEventName2;
216
175
  })(RooCodeEventName || {});
217
- var rooCodeEventsSchema = z4.object({
218
- ["taskCreated" /* TaskCreated */]: z4.tuple([z4.string()]),
219
- ["taskStarted" /* TaskStarted */]: z4.tuple([z4.string()]),
220
- ["taskCompleted" /* TaskCompleted */]: z4.tuple([
221
- z4.string(),
176
+ var rooCodeEventsSchema = z3.object({
177
+ ["taskCreated" /* TaskCreated */]: z3.tuple([z3.string()]),
178
+ ["taskStarted" /* TaskStarted */]: z3.tuple([z3.string()]),
179
+ ["taskCompleted" /* TaskCompleted */]: z3.tuple([
180
+ z3.string(),
222
181
  tokenUsageSchema,
223
182
  toolUsageSchema,
224
- z4.object({
225
- isSubtask: z4.boolean()
183
+ z3.object({
184
+ isSubtask: z3.boolean()
226
185
  })
227
186
  ]),
228
- ["taskAborted" /* TaskAborted */]: z4.tuple([z4.string()]),
229
- ["taskFocused" /* TaskFocused */]: z4.tuple([z4.string()]),
230
- ["taskUnfocused" /* TaskUnfocused */]: z4.tuple([z4.string()]),
231
- ["taskActive" /* TaskActive */]: z4.tuple([z4.string()]),
232
- ["taskInteractive" /* TaskInteractive */]: z4.tuple([z4.string()]),
233
- ["taskResumable" /* TaskResumable */]: z4.tuple([z4.string()]),
234
- ["taskIdle" /* TaskIdle */]: z4.tuple([z4.string()]),
235
- ["taskPaused" /* TaskPaused */]: z4.tuple([z4.string()]),
236
- ["taskUnpaused" /* TaskUnpaused */]: z4.tuple([z4.string()]),
237
- ["taskSpawned" /* TaskSpawned */]: z4.tuple([z4.string(), z4.string()]),
238
- ["message" /* Message */]: z4.tuple([
239
- z4.object({
240
- taskId: z4.string(),
241
- action: z4.union([z4.literal("created"), z4.literal("updated")]),
187
+ ["taskAborted" /* TaskAborted */]: z3.tuple([z3.string()]),
188
+ ["taskFocused" /* TaskFocused */]: z3.tuple([z3.string()]),
189
+ ["taskUnfocused" /* TaskUnfocused */]: z3.tuple([z3.string()]),
190
+ ["taskActive" /* TaskActive */]: z3.tuple([z3.string()]),
191
+ ["taskInteractive" /* TaskInteractive */]: z3.tuple([z3.string()]),
192
+ ["taskResumable" /* TaskResumable */]: z3.tuple([z3.string()]),
193
+ ["taskIdle" /* TaskIdle */]: z3.tuple([z3.string()]),
194
+ ["taskPaused" /* TaskPaused */]: z3.tuple([z3.string()]),
195
+ ["taskUnpaused" /* TaskUnpaused */]: z3.tuple([z3.string()]),
196
+ ["taskSpawned" /* TaskSpawned */]: z3.tuple([z3.string(), z3.string()]),
197
+ ["message" /* Message */]: z3.tuple([
198
+ z3.object({
199
+ taskId: z3.string(),
200
+ action: z3.union([z3.literal("created"), z3.literal("updated")]),
242
201
  message: clineMessageSchema
243
202
  })
244
203
  ]),
245
- ["taskModeSwitched" /* TaskModeSwitched */]: z4.tuple([z4.string(), z4.string()]),
246
- ["taskAskResponded" /* TaskAskResponded */]: z4.tuple([z4.string()]),
247
- ["taskToolFailed" /* TaskToolFailed */]: z4.tuple([z4.string(), toolNamesSchema, z4.string()]),
248
- ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z4.tuple([z4.string(), tokenUsageSchema])
204
+ ["taskModeSwitched" /* TaskModeSwitched */]: z3.tuple([z3.string(), z3.string()]),
205
+ ["taskAskResponded" /* TaskAskResponded */]: z3.tuple([z3.string()]),
206
+ ["taskToolFailed" /* TaskToolFailed */]: z3.tuple([z3.string(), toolNamesSchema, z3.string()]),
207
+ ["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */]: z3.tuple([z3.string(), tokenUsageSchema])
249
208
  });
250
- var taskEventSchema = z4.discriminatedUnion("eventName", [
209
+ var taskEventSchema = z3.discriminatedUnion("eventName", [
251
210
  // Task Provider Lifecycle
252
- z4.object({
253
- eventName: z4.literal("taskCreated" /* TaskCreated */),
211
+ z3.object({
212
+ eventName: z3.literal("taskCreated" /* TaskCreated */),
254
213
  payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
255
- taskId: z4.number().optional()
214
+ taskId: z3.number().optional()
256
215
  }),
257
216
  // Task Lifecycle
258
- z4.object({
259
- eventName: z4.literal("taskStarted" /* TaskStarted */),
217
+ z3.object({
218
+ eventName: z3.literal("taskStarted" /* TaskStarted */),
260
219
  payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
261
- taskId: z4.number().optional()
220
+ taskId: z3.number().optional()
262
221
  }),
263
- z4.object({
264
- eventName: z4.literal("taskCompleted" /* TaskCompleted */),
222
+ z3.object({
223
+ eventName: z3.literal("taskCompleted" /* TaskCompleted */),
265
224
  payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
266
- taskId: z4.number().optional()
225
+ taskId: z3.number().optional()
267
226
  }),
268
- z4.object({
269
- eventName: z4.literal("taskAborted" /* TaskAborted */),
227
+ z3.object({
228
+ eventName: z3.literal("taskAborted" /* TaskAborted */),
270
229
  payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
271
- taskId: z4.number().optional()
230
+ taskId: z3.number().optional()
272
231
  }),
273
- z4.object({
274
- eventName: z4.literal("taskFocused" /* TaskFocused */),
232
+ z3.object({
233
+ eventName: z3.literal("taskFocused" /* TaskFocused */),
275
234
  payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
276
- taskId: z4.number().optional()
235
+ taskId: z3.number().optional()
277
236
  }),
278
- z4.object({
279
- eventName: z4.literal("taskUnfocused" /* TaskUnfocused */),
237
+ z3.object({
238
+ eventName: z3.literal("taskUnfocused" /* TaskUnfocused */),
280
239
  payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
281
- taskId: z4.number().optional()
240
+ taskId: z3.number().optional()
282
241
  }),
283
- z4.object({
284
- eventName: z4.literal("taskActive" /* TaskActive */),
242
+ z3.object({
243
+ eventName: z3.literal("taskActive" /* TaskActive */),
285
244
  payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
286
- taskId: z4.number().optional()
245
+ taskId: z3.number().optional()
287
246
  }),
288
- z4.object({
289
- eventName: z4.literal("taskInteractive" /* TaskInteractive */),
247
+ z3.object({
248
+ eventName: z3.literal("taskInteractive" /* TaskInteractive */),
290
249
  payload: rooCodeEventsSchema.shape["taskInteractive" /* TaskInteractive */],
291
- taskId: z4.number().optional()
250
+ taskId: z3.number().optional()
292
251
  }),
293
- z4.object({
294
- eventName: z4.literal("taskResumable" /* TaskResumable */),
252
+ z3.object({
253
+ eventName: z3.literal("taskResumable" /* TaskResumable */),
295
254
  payload: rooCodeEventsSchema.shape["taskResumable" /* TaskResumable */],
296
- taskId: z4.number().optional()
255
+ taskId: z3.number().optional()
297
256
  }),
298
- z4.object({
299
- eventName: z4.literal("taskIdle" /* TaskIdle */),
257
+ z3.object({
258
+ eventName: z3.literal("taskIdle" /* TaskIdle */),
300
259
  payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
301
- taskId: z4.number().optional()
260
+ taskId: z3.number().optional()
302
261
  }),
303
262
  // Subtask Lifecycle
304
- z4.object({
305
- eventName: z4.literal("taskPaused" /* TaskPaused */),
263
+ z3.object({
264
+ eventName: z3.literal("taskPaused" /* TaskPaused */),
306
265
  payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
307
- taskId: z4.number().optional()
266
+ taskId: z3.number().optional()
308
267
  }),
309
- z4.object({
310
- eventName: z4.literal("taskUnpaused" /* TaskUnpaused */),
268
+ z3.object({
269
+ eventName: z3.literal("taskUnpaused" /* TaskUnpaused */),
311
270
  payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
312
- taskId: z4.number().optional()
271
+ taskId: z3.number().optional()
313
272
  }),
314
- z4.object({
315
- eventName: z4.literal("taskSpawned" /* TaskSpawned */),
273
+ z3.object({
274
+ eventName: z3.literal("taskSpawned" /* TaskSpawned */),
316
275
  payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
317
- taskId: z4.number().optional()
276
+ taskId: z3.number().optional()
318
277
  }),
319
278
  // Task Execution
320
- z4.object({
321
- eventName: z4.literal("message" /* Message */),
279
+ z3.object({
280
+ eventName: z3.literal("message" /* Message */),
322
281
  payload: rooCodeEventsSchema.shape["message" /* Message */],
323
- taskId: z4.number().optional()
282
+ taskId: z3.number().optional()
324
283
  }),
325
- z4.object({
326
- eventName: z4.literal("taskModeSwitched" /* TaskModeSwitched */),
284
+ z3.object({
285
+ eventName: z3.literal("taskModeSwitched" /* TaskModeSwitched */),
327
286
  payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
328
- taskId: z4.number().optional()
287
+ taskId: z3.number().optional()
329
288
  }),
330
- z4.object({
331
- eventName: z4.literal("taskAskResponded" /* TaskAskResponded */),
289
+ z3.object({
290
+ eventName: z3.literal("taskAskResponded" /* TaskAskResponded */),
332
291
  payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
333
- taskId: z4.number().optional()
292
+ taskId: z3.number().optional()
334
293
  }),
335
294
  // Task Analytics
336
- z4.object({
337
- eventName: z4.literal("taskToolFailed" /* TaskToolFailed */),
295
+ z3.object({
296
+ eventName: z3.literal("taskToolFailed" /* TaskToolFailed */),
338
297
  payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
339
- taskId: z4.number().optional()
298
+ taskId: z3.number().optional()
340
299
  }),
341
- z4.object({
342
- eventName: z4.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
300
+ z3.object({
301
+ eventName: z3.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
343
302
  payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
344
- taskId: z4.number().optional()
303
+ taskId: z3.number().optional()
345
304
  }),
346
305
  // Evals
347
- z4.object({
348
- eventName: z4.literal("evalPass" /* EvalPass */),
349
- payload: z4.undefined(),
350
- taskId: z4.number()
306
+ z3.object({
307
+ eventName: z3.literal("evalPass" /* EvalPass */),
308
+ payload: z3.undefined(),
309
+ taskId: z3.number()
351
310
  }),
352
- z4.object({
353
- eventName: z4.literal("evalFail" /* EvalFail */),
354
- payload: z4.undefined(),
355
- taskId: z4.number()
311
+ z3.object({
312
+ eventName: z3.literal("evalFail" /* EvalFail */),
313
+ payload: z3.undefined(),
314
+ taskId: z3.number()
356
315
  })
357
316
  ]);
358
317
 
359
- // src/experiment.ts
360
- import { z as z5 } from "zod";
361
- var experimentIds = [
362
- "powerSteering",
363
- "multiFileApplyDiff",
364
- "preventFocusDisruption",
365
- "imageGeneration"
366
- ];
367
- var experimentIdsSchema = z5.enum(experimentIds);
368
- var experimentsSchema = z5.object({
369
- powerSteering: z5.boolean().optional(),
370
- multiFileApplyDiff: z5.boolean().optional(),
371
- preventFocusDisruption: z5.boolean().optional(),
372
- imageGeneration: z5.boolean().optional()
373
- });
374
-
375
- // src/followup.ts
376
- import { z as z6 } from "zod";
377
- var suggestionItemSchema = z6.object({
378
- answer: z6.string(),
379
- mode: z6.string().optional()
380
- });
381
- var followUpDataSchema = z6.object({
382
- question: z6.string().optional(),
383
- suggest: z6.array(suggestionItemSchema).optional()
318
+ // src/task.ts
319
+ import { z as z4 } from "zod";
320
+ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
321
+ TaskStatus2["Running"] = "running";
322
+ TaskStatus2["Interactive"] = "interactive";
323
+ TaskStatus2["Resumable"] = "resumable";
324
+ TaskStatus2["Idle"] = "idle";
325
+ TaskStatus2["None"] = "none";
326
+ return TaskStatus2;
327
+ })(TaskStatus || {});
328
+ var taskMetadataSchema = z4.object({
329
+ task: z4.string().optional(),
330
+ images: z4.array(z4.string()).optional()
384
331
  });
385
332
 
386
333
  // src/global-settings.ts
387
334
  import { z as z13 } from "zod";
388
335
 
389
336
  // src/provider-settings.ts
390
- import { z as z8 } from "zod";
337
+ import { z as z7 } from "zod";
391
338
 
392
339
  // src/model.ts
393
- import { z as z7 } from "zod";
340
+ import { z as z5 } from "zod";
394
341
  var reasoningEfforts = ["low", "medium", "high"];
395
- var reasoningEffortsSchema = z7.enum(reasoningEfforts);
396
- var reasoningEffortWithMinimalSchema = z7.union([reasoningEffortsSchema, z7.literal("minimal")]);
342
+ var reasoningEffortsSchema = z5.enum(reasoningEfforts);
343
+ var reasoningEffortWithMinimalSchema = z5.union([reasoningEffortsSchema, z5.literal("minimal")]);
397
344
  var verbosityLevels = ["low", "medium", "high"];
398
- var verbosityLevelsSchema = z7.enum(verbosityLevels);
345
+ var verbosityLevelsSchema = z5.enum(verbosityLevels);
399
346
  var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
400
- var modelParametersSchema = z7.enum(modelParameters);
347
+ var modelParametersSchema = z5.enum(modelParameters);
401
348
  var isModelParameter = (value) => modelParameters.includes(value);
402
- var modelInfoSchema = z7.object({
403
- maxTokens: z7.number().nullish(),
404
- maxThinkingTokens: z7.number().nullish(),
405
- contextWindow: z7.number(),
406
- supportsImages: z7.boolean().optional(),
407
- supportsComputerUse: z7.boolean().optional(),
408
- supportsPromptCache: z7.boolean(),
349
+ var modelInfoSchema = z5.object({
350
+ maxTokens: z5.number().nullish(),
351
+ maxThinkingTokens: z5.number().nullish(),
352
+ contextWindow: z5.number(),
353
+ supportsImages: z5.boolean().optional(),
354
+ supportsComputerUse: z5.boolean().optional(),
355
+ supportsPromptCache: z5.boolean(),
409
356
  // Capability flag to indicate whether the model supports an output verbosity parameter
410
- supportsVerbosity: z7.boolean().optional(),
411
- supportsReasoningBudget: z7.boolean().optional(),
357
+ supportsVerbosity: z5.boolean().optional(),
358
+ supportsReasoningBudget: z5.boolean().optional(),
412
359
  // Capability flag to indicate whether the model supports temperature parameter
413
- supportsTemperature: z7.boolean().optional(),
414
- requiredReasoningBudget: z7.boolean().optional(),
415
- supportsReasoningEffort: z7.boolean().optional(),
416
- supportedParameters: z7.array(modelParametersSchema).optional(),
417
- inputPrice: z7.number().optional(),
418
- outputPrice: z7.number().optional(),
419
- cacheWritesPrice: z7.number().optional(),
420
- cacheReadsPrice: z7.number().optional(),
421
- description: z7.string().optional(),
360
+ supportsTemperature: z5.boolean().optional(),
361
+ requiredReasoningBudget: z5.boolean().optional(),
362
+ supportsReasoningEffort: z5.boolean().optional(),
363
+ supportedParameters: z5.array(modelParametersSchema).optional(),
364
+ inputPrice: z5.number().optional(),
365
+ outputPrice: z5.number().optional(),
366
+ cacheWritesPrice: z5.number().optional(),
367
+ cacheReadsPrice: z5.number().optional(),
368
+ description: z5.string().optional(),
422
369
  reasoningEffort: reasoningEffortsSchema.optional(),
423
- minTokensPerCachePoint: z7.number().optional(),
424
- maxCachePoints: z7.number().optional(),
425
- cachableFields: z7.array(z7.string()).optional(),
426
- tiers: z7.array(
427
- z7.object({
428
- contextWindow: z7.number(),
429
- inputPrice: z7.number().optional(),
430
- outputPrice: z7.number().optional(),
431
- cacheWritesPrice: z7.number().optional(),
432
- cacheReadsPrice: z7.number().optional()
370
+ minTokensPerCachePoint: z5.number().optional(),
371
+ maxCachePoints: z5.number().optional(),
372
+ cachableFields: z5.array(z5.string()).optional(),
373
+ tiers: z5.array(
374
+ z5.object({
375
+ contextWindow: z5.number(),
376
+ inputPrice: z5.number().optional(),
377
+ outputPrice: z5.number().optional(),
378
+ cacheWritesPrice: z5.number().optional(),
379
+ cacheReadsPrice: z5.number().optional()
433
380
  })
434
381
  ).optional()
435
382
  });
436
383
 
384
+ // src/codebase-index.ts
385
+ import { z as z6 } from "zod";
386
+ var CODEBASE_INDEX_DEFAULTS = {
387
+ MIN_SEARCH_RESULTS: 10,
388
+ MAX_SEARCH_RESULTS: 200,
389
+ DEFAULT_SEARCH_RESULTS: 50,
390
+ SEARCH_RESULTS_STEP: 10,
391
+ MIN_SEARCH_SCORE: 0,
392
+ MAX_SEARCH_SCORE: 1,
393
+ DEFAULT_SEARCH_MIN_SCORE: 0.4,
394
+ SEARCH_SCORE_STEP: 0.05
395
+ };
396
+ var codebaseIndexConfigSchema = z6.object({
397
+ codebaseIndexEnabled: z6.boolean().optional(),
398
+ codebaseIndexQdrantUrl: z6.string().optional(),
399
+ codebaseIndexEmbedderProvider: z6.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"]).optional(),
400
+ codebaseIndexEmbedderBaseUrl: z6.string().optional(),
401
+ codebaseIndexEmbedderModelId: z6.string().optional(),
402
+ codebaseIndexEmbedderModelDimension: z6.number().optional(),
403
+ codebaseIndexSearchMinScore: z6.number().min(0).max(1).optional(),
404
+ codebaseIndexSearchMaxResults: z6.number().min(CODEBASE_INDEX_DEFAULTS.MIN_SEARCH_RESULTS).max(CODEBASE_INDEX_DEFAULTS.MAX_SEARCH_RESULTS).optional(),
405
+ // OpenAI Compatible specific fields
406
+ codebaseIndexOpenAiCompatibleBaseUrl: z6.string().optional(),
407
+ codebaseIndexOpenAiCompatibleModelDimension: z6.number().optional()
408
+ });
409
+ var codebaseIndexModelsSchema = z6.object({
410
+ openai: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
411
+ ollama: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
412
+ "openai-compatible": z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
413
+ gemini: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
414
+ mistral: z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional(),
415
+ "vercel-ai-gateway": z6.record(z6.string(), z6.object({ dimension: z6.number() })).optional()
416
+ });
417
+ var codebaseIndexProviderSchema = z6.object({
418
+ codeIndexOpenAiKey: z6.string().optional(),
419
+ codeIndexQdrantApiKey: z6.string().optional(),
420
+ codebaseIndexOpenAiCompatibleBaseUrl: z6.string().optional(),
421
+ codebaseIndexOpenAiCompatibleApiKey: z6.string().optional(),
422
+ codebaseIndexOpenAiCompatibleModelDimension: z6.number().optional(),
423
+ codebaseIndexGeminiApiKey: z6.string().optional(),
424
+ codebaseIndexMistralApiKey: z6.string().optional(),
425
+ codebaseIndexVercelAiGatewayApiKey: z6.string().optional()
426
+ });
427
+
437
428
  // src/providers/anthropic.ts
438
429
  var anthropicDefaultModelId = "claude-sonnet-4-20250514";
439
430
  var anthropicModels = {
@@ -3613,253 +3604,253 @@ var providerNames = [
3613
3604
  "roo",
3614
3605
  "vercel-ai-gateway"
3615
3606
  ];
3616
- var providerNamesSchema = z8.enum(providerNames);
3617
- var providerSettingsEntrySchema = z8.object({
3618
- id: z8.string(),
3619
- name: z8.string(),
3607
+ var providerNamesSchema = z7.enum(providerNames);
3608
+ var providerSettingsEntrySchema = z7.object({
3609
+ id: z7.string(),
3610
+ name: z7.string(),
3620
3611
  apiProvider: providerNamesSchema.optional(),
3621
- modelId: z8.string().optional()
3612
+ modelId: z7.string().optional()
3622
3613
  });
3623
3614
  var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
3624
- var baseProviderSettingsSchema = z8.object({
3625
- includeMaxTokens: z8.boolean().optional(),
3626
- diffEnabled: z8.boolean().optional(),
3627
- todoListEnabled: z8.boolean().optional(),
3628
- fuzzyMatchThreshold: z8.number().optional(),
3629
- modelTemperature: z8.number().nullish(),
3630
- rateLimitSeconds: z8.number().optional(),
3631
- consecutiveMistakeLimit: z8.number().min(0).optional(),
3615
+ var baseProviderSettingsSchema = z7.object({
3616
+ includeMaxTokens: z7.boolean().optional(),
3617
+ diffEnabled: z7.boolean().optional(),
3618
+ todoListEnabled: z7.boolean().optional(),
3619
+ fuzzyMatchThreshold: z7.number().optional(),
3620
+ modelTemperature: z7.number().nullish(),
3621
+ rateLimitSeconds: z7.number().optional(),
3622
+ consecutiveMistakeLimit: z7.number().min(0).optional(),
3632
3623
  // Model reasoning.
3633
- enableReasoningEffort: z8.boolean().optional(),
3624
+ enableReasoningEffort: z7.boolean().optional(),
3634
3625
  reasoningEffort: reasoningEffortWithMinimalSchema.optional(),
3635
- modelMaxTokens: z8.number().optional(),
3636
- modelMaxThinkingTokens: z8.number().optional(),
3626
+ modelMaxTokens: z7.number().optional(),
3627
+ modelMaxThinkingTokens: z7.number().optional(),
3637
3628
  // Model verbosity.
3638
3629
  verbosity: verbosityLevelsSchema.optional()
3639
3630
  });
3640
3631
  var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
3641
- apiModelId: z8.string().optional()
3632
+ apiModelId: z7.string().optional()
3642
3633
  });
3643
3634
  var anthropicSchema = apiModelIdProviderModelSchema.extend({
3644
- apiKey: z8.string().optional(),
3645
- anthropicBaseUrl: z8.string().optional(),
3646
- anthropicUseAuthToken: z8.boolean().optional(),
3647
- anthropicBeta1MContext: z8.boolean().optional()
3635
+ apiKey: z7.string().optional(),
3636
+ anthropicBaseUrl: z7.string().optional(),
3637
+ anthropicUseAuthToken: z7.boolean().optional(),
3638
+ anthropicBeta1MContext: z7.boolean().optional()
3648
3639
  // Enable 'context-1m-2025-08-07' beta for 1M context window
3649
3640
  });
3650
3641
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
3651
- claudeCodePath: z8.string().optional(),
3652
- claudeCodeMaxOutputTokens: z8.number().int().min(1).max(2e5).optional()
3642
+ claudeCodePath: z7.string().optional(),
3643
+ claudeCodeMaxOutputTokens: z7.number().int().min(1).max(2e5).optional()
3653
3644
  });
3654
3645
  var glamaSchema = baseProviderSettingsSchema.extend({
3655
- glamaModelId: z8.string().optional(),
3656
- glamaApiKey: z8.string().optional()
3646
+ glamaModelId: z7.string().optional(),
3647
+ glamaApiKey: z7.string().optional()
3657
3648
  });
3658
3649
  var openRouterSchema = baseProviderSettingsSchema.extend({
3659
- openRouterApiKey: z8.string().optional(),
3660
- openRouterModelId: z8.string().optional(),
3661
- openRouterBaseUrl: z8.string().optional(),
3662
- openRouterSpecificProvider: z8.string().optional(),
3663
- openRouterUseMiddleOutTransform: z8.boolean().optional(),
3650
+ openRouterApiKey: z7.string().optional(),
3651
+ openRouterModelId: z7.string().optional(),
3652
+ openRouterBaseUrl: z7.string().optional(),
3653
+ openRouterSpecificProvider: z7.string().optional(),
3654
+ openRouterUseMiddleOutTransform: z7.boolean().optional(),
3664
3655
  // Image generation settings (experimental)
3665
- openRouterImageGenerationSettings: z8.object({
3666
- openRouterApiKey: z8.string().optional(),
3667
- selectedModel: z8.string().optional()
3656
+ openRouterImageGenerationSettings: z7.object({
3657
+ openRouterApiKey: z7.string().optional(),
3658
+ selectedModel: z7.string().optional()
3668
3659
  }).optional()
3669
3660
  });
3670
3661
  var bedrockSchema = apiModelIdProviderModelSchema.extend({
3671
- awsAccessKey: z8.string().optional(),
3672
- awsSecretKey: z8.string().optional(),
3673
- awsSessionToken: z8.string().optional(),
3674
- awsRegion: z8.string().optional(),
3675
- awsUseCrossRegionInference: z8.boolean().optional(),
3676
- awsUsePromptCache: z8.boolean().optional(),
3677
- awsProfile: z8.string().optional(),
3678
- awsUseProfile: z8.boolean().optional(),
3679
- awsApiKey: z8.string().optional(),
3680
- awsUseApiKey: z8.boolean().optional(),
3681
- awsCustomArn: z8.string().optional(),
3682
- awsModelContextWindow: z8.number().optional(),
3683
- awsBedrockEndpointEnabled: z8.boolean().optional(),
3684
- awsBedrockEndpoint: z8.string().optional(),
3685
- awsBedrock1MContext: z8.boolean().optional()
3662
+ awsAccessKey: z7.string().optional(),
3663
+ awsSecretKey: z7.string().optional(),
3664
+ awsSessionToken: z7.string().optional(),
3665
+ awsRegion: z7.string().optional(),
3666
+ awsUseCrossRegionInference: z7.boolean().optional(),
3667
+ awsUsePromptCache: z7.boolean().optional(),
3668
+ awsProfile: z7.string().optional(),
3669
+ awsUseProfile: z7.boolean().optional(),
3670
+ awsApiKey: z7.string().optional(),
3671
+ awsUseApiKey: z7.boolean().optional(),
3672
+ awsCustomArn: z7.string().optional(),
3673
+ awsModelContextWindow: z7.number().optional(),
3674
+ awsBedrockEndpointEnabled: z7.boolean().optional(),
3675
+ awsBedrockEndpoint: z7.string().optional(),
3676
+ awsBedrock1MContext: z7.boolean().optional()
3686
3677
  // Enable 'context-1m-2025-08-07' beta for 1M context window
3687
3678
  });
3688
3679
  var vertexSchema = apiModelIdProviderModelSchema.extend({
3689
- vertexKeyFile: z8.string().optional(),
3690
- vertexJsonCredentials: z8.string().optional(),
3691
- vertexProjectId: z8.string().optional(),
3692
- vertexRegion: z8.string().optional(),
3693
- enableUrlContext: z8.boolean().optional(),
3694
- enableGrounding: z8.boolean().optional()
3680
+ vertexKeyFile: z7.string().optional(),
3681
+ vertexJsonCredentials: z7.string().optional(),
3682
+ vertexProjectId: z7.string().optional(),
3683
+ vertexRegion: z7.string().optional(),
3684
+ enableUrlContext: z7.boolean().optional(),
3685
+ enableGrounding: z7.boolean().optional()
3695
3686
  });
3696
3687
  var openAiSchema = baseProviderSettingsSchema.extend({
3697
- openAiBaseUrl: z8.string().optional(),
3698
- openAiApiKey: z8.string().optional(),
3699
- openAiLegacyFormat: z8.boolean().optional(),
3700
- openAiR1FormatEnabled: z8.boolean().optional(),
3701
- openAiModelId: z8.string().optional(),
3688
+ openAiBaseUrl: z7.string().optional(),
3689
+ openAiApiKey: z7.string().optional(),
3690
+ openAiLegacyFormat: z7.boolean().optional(),
3691
+ openAiR1FormatEnabled: z7.boolean().optional(),
3692
+ openAiModelId: z7.string().optional(),
3702
3693
  openAiCustomModelInfo: modelInfoSchema.nullish(),
3703
- openAiUseAzure: z8.boolean().optional(),
3704
- azureApiVersion: z8.string().optional(),
3705
- openAiStreamingEnabled: z8.boolean().optional(),
3706
- openAiHostHeader: z8.string().optional(),
3694
+ openAiUseAzure: z7.boolean().optional(),
3695
+ azureApiVersion: z7.string().optional(),
3696
+ openAiStreamingEnabled: z7.boolean().optional(),
3697
+ openAiHostHeader: z7.string().optional(),
3707
3698
  // Keep temporarily for backward compatibility during migration.
3708
- openAiHeaders: z8.record(z8.string(), z8.string()).optional()
3699
+ openAiHeaders: z7.record(z7.string(), z7.string()).optional()
3709
3700
  });
3710
3701
  var ollamaSchema = baseProviderSettingsSchema.extend({
3711
- ollamaModelId: z8.string().optional(),
3712
- ollamaBaseUrl: z8.string().optional()
3702
+ ollamaModelId: z7.string().optional(),
3703
+ ollamaBaseUrl: z7.string().optional()
3713
3704
  });
3714
3705
  var vsCodeLmSchema = baseProviderSettingsSchema.extend({
3715
- vsCodeLmModelSelector: z8.object({
3716
- vendor: z8.string().optional(),
3717
- family: z8.string().optional(),
3718
- version: z8.string().optional(),
3719
- id: z8.string().optional()
3706
+ vsCodeLmModelSelector: z7.object({
3707
+ vendor: z7.string().optional(),
3708
+ family: z7.string().optional(),
3709
+ version: z7.string().optional(),
3710
+ id: z7.string().optional()
3720
3711
  }).optional()
3721
3712
  });
3722
3713
  var lmStudioSchema = baseProviderSettingsSchema.extend({
3723
- lmStudioModelId: z8.string().optional(),
3724
- lmStudioBaseUrl: z8.string().optional(),
3725
- lmStudioDraftModelId: z8.string().optional(),
3726
- lmStudioSpeculativeDecodingEnabled: z8.boolean().optional()
3714
+ lmStudioModelId: z7.string().optional(),
3715
+ lmStudioBaseUrl: z7.string().optional(),
3716
+ lmStudioDraftModelId: z7.string().optional(),
3717
+ lmStudioSpeculativeDecodingEnabled: z7.boolean().optional()
3727
3718
  });
3728
3719
  var geminiSchema = apiModelIdProviderModelSchema.extend({
3729
- geminiApiKey: z8.string().optional(),
3730
- googleGeminiBaseUrl: z8.string().optional(),
3731
- enableUrlContext: z8.boolean().optional(),
3732
- enableGrounding: z8.boolean().optional()
3720
+ geminiApiKey: z7.string().optional(),
3721
+ googleGeminiBaseUrl: z7.string().optional(),
3722
+ enableUrlContext: z7.boolean().optional(),
3723
+ enableGrounding: z7.boolean().optional()
3733
3724
  });
3734
3725
  var geminiCliSchema = apiModelIdProviderModelSchema.extend({
3735
- geminiCliOAuthPath: z8.string().optional(),
3736
- geminiCliProjectId: z8.string().optional()
3726
+ geminiCliOAuthPath: z7.string().optional(),
3727
+ geminiCliProjectId: z7.string().optional()
3737
3728
  });
3738
3729
  var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
3739
- openAiNativeApiKey: z8.string().optional(),
3740
- openAiNativeBaseUrl: z8.string().optional()
3730
+ openAiNativeApiKey: z7.string().optional(),
3731
+ openAiNativeBaseUrl: z7.string().optional()
3741
3732
  });
3742
3733
  var mistralSchema = apiModelIdProviderModelSchema.extend({
3743
- mistralApiKey: z8.string().optional(),
3744
- mistralCodestralUrl: z8.string().optional()
3734
+ mistralApiKey: z7.string().optional(),
3735
+ mistralCodestralUrl: z7.string().optional()
3745
3736
  });
3746
3737
  var deepSeekSchema = apiModelIdProviderModelSchema.extend({
3747
- deepSeekBaseUrl: z8.string().optional(),
3748
- deepSeekApiKey: z8.string().optional()
3738
+ deepSeekBaseUrl: z7.string().optional(),
3739
+ deepSeekApiKey: z7.string().optional()
3749
3740
  });
3750
3741
  var doubaoSchema = apiModelIdProviderModelSchema.extend({
3751
- doubaoBaseUrl: z8.string().optional(),
3752
- doubaoApiKey: z8.string().optional()
3742
+ doubaoBaseUrl: z7.string().optional(),
3743
+ doubaoApiKey: z7.string().optional()
3753
3744
  });
3754
3745
  var moonshotSchema = apiModelIdProviderModelSchema.extend({
3755
- moonshotBaseUrl: z8.union([z8.literal("https://api.moonshot.ai/v1"), z8.literal("https://api.moonshot.cn/v1")]).optional(),
3756
- moonshotApiKey: z8.string().optional()
3746
+ moonshotBaseUrl: z7.union([z7.literal("https://api.moonshot.ai/v1"), z7.literal("https://api.moonshot.cn/v1")]).optional(),
3747
+ moonshotApiKey: z7.string().optional()
3757
3748
  });
3758
3749
  var unboundSchema = baseProviderSettingsSchema.extend({
3759
- unboundApiKey: z8.string().optional(),
3760
- unboundModelId: z8.string().optional()
3750
+ unboundApiKey: z7.string().optional(),
3751
+ unboundModelId: z7.string().optional()
3761
3752
  });
3762
3753
  var requestySchema = baseProviderSettingsSchema.extend({
3763
- requestyBaseUrl: z8.string().optional(),
3764
- requestyApiKey: z8.string().optional(),
3765
- requestyModelId: z8.string().optional()
3754
+ requestyBaseUrl: z7.string().optional(),
3755
+ requestyApiKey: z7.string().optional(),
3756
+ requestyModelId: z7.string().optional()
3766
3757
  });
3767
3758
  var humanRelaySchema = baseProviderSettingsSchema;
3768
3759
  var fakeAiSchema = baseProviderSettingsSchema.extend({
3769
- fakeAi: z8.unknown().optional()
3760
+ fakeAi: z7.unknown().optional()
3770
3761
  });
3771
3762
  var xaiSchema = apiModelIdProviderModelSchema.extend({
3772
- xaiApiKey: z8.string().optional()
3763
+ xaiApiKey: z7.string().optional()
3773
3764
  });
3774
3765
  var groqSchema = apiModelIdProviderModelSchema.extend({
3775
- groqApiKey: z8.string().optional()
3766
+ groqApiKey: z7.string().optional()
3776
3767
  });
3777
3768
  var huggingFaceSchema = baseProviderSettingsSchema.extend({
3778
- huggingFaceApiKey: z8.string().optional(),
3779
- huggingFaceModelId: z8.string().optional(),
3780
- huggingFaceInferenceProvider: z8.string().optional()
3769
+ huggingFaceApiKey: z7.string().optional(),
3770
+ huggingFaceModelId: z7.string().optional(),
3771
+ huggingFaceInferenceProvider: z7.string().optional()
3781
3772
  });
3782
3773
  var chutesSchema = apiModelIdProviderModelSchema.extend({
3783
- chutesApiKey: z8.string().optional()
3774
+ chutesApiKey: z7.string().optional()
3784
3775
  });
3785
3776
  var litellmSchema = baseProviderSettingsSchema.extend({
3786
- litellmBaseUrl: z8.string().optional(),
3787
- litellmApiKey: z8.string().optional(),
3788
- litellmModelId: z8.string().optional(),
3789
- litellmUsePromptCache: z8.boolean().optional()
3777
+ litellmBaseUrl: z7.string().optional(),
3778
+ litellmApiKey: z7.string().optional(),
3779
+ litellmModelId: z7.string().optional(),
3780
+ litellmUsePromptCache: z7.boolean().optional()
3790
3781
  });
3791
3782
  var cerebrasSchema = apiModelIdProviderModelSchema.extend({
3792
- cerebrasApiKey: z8.string().optional()
3783
+ cerebrasApiKey: z7.string().optional()
3793
3784
  });
3794
3785
  var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
3795
- sambaNovaApiKey: z8.string().optional()
3786
+ sambaNovaApiKey: z7.string().optional()
3796
3787
  });
3797
3788
  var zaiSchema = apiModelIdProviderModelSchema.extend({
3798
- zaiApiKey: z8.string().optional(),
3799
- zaiApiLine: z8.union([z8.literal("china"), z8.literal("international")]).optional()
3789
+ zaiApiKey: z7.string().optional(),
3790
+ zaiApiLine: z7.union([z7.literal("china"), z7.literal("international")]).optional()
3800
3791
  });
3801
3792
  var fireworksSchema = apiModelIdProviderModelSchema.extend({
3802
- fireworksApiKey: z8.string().optional()
3793
+ fireworksApiKey: z7.string().optional()
3803
3794
  });
3804
3795
  var featherlessSchema = apiModelIdProviderModelSchema.extend({
3805
- featherlessApiKey: z8.string().optional()
3796
+ featherlessApiKey: z7.string().optional()
3806
3797
  });
3807
3798
  var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
3808
- ioIntelligenceModelId: z8.string().optional(),
3809
- ioIntelligenceApiKey: z8.string().optional()
3799
+ ioIntelligenceModelId: z7.string().optional(),
3800
+ ioIntelligenceApiKey: z7.string().optional()
3810
3801
  });
3811
3802
  var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
3812
- qwenCodeOauthPath: z8.string().optional()
3803
+ qwenCodeOauthPath: z7.string().optional()
3813
3804
  });
3814
3805
  var rooSchema = apiModelIdProviderModelSchema.extend({
3815
3806
  // No additional fields needed - uses cloud authentication
3816
3807
  });
3817
3808
  var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
3818
- vercelAiGatewayApiKey: z8.string().optional(),
3819
- vercelAiGatewayModelId: z8.string().optional()
3809
+ vercelAiGatewayApiKey: z7.string().optional(),
3810
+ vercelAiGatewayModelId: z7.string().optional()
3820
3811
  });
3821
- var defaultSchema = z8.object({
3822
- apiProvider: z8.undefined()
3812
+ var defaultSchema = z7.object({
3813
+ apiProvider: z7.undefined()
3823
3814
  });
3824
- var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
3825
- anthropicSchema.merge(z8.object({ apiProvider: z8.literal("anthropic") })),
3826
- claudeCodeSchema.merge(z8.object({ apiProvider: z8.literal("claude-code") })),
3827
- glamaSchema.merge(z8.object({ apiProvider: z8.literal("glama") })),
3828
- openRouterSchema.merge(z8.object({ apiProvider: z8.literal("openrouter") })),
3829
- bedrockSchema.merge(z8.object({ apiProvider: z8.literal("bedrock") })),
3830
- vertexSchema.merge(z8.object({ apiProvider: z8.literal("vertex") })),
3831
- openAiSchema.merge(z8.object({ apiProvider: z8.literal("openai") })),
3832
- ollamaSchema.merge(z8.object({ apiProvider: z8.literal("ollama") })),
3833
- vsCodeLmSchema.merge(z8.object({ apiProvider: z8.literal("vscode-lm") })),
3834
- lmStudioSchema.merge(z8.object({ apiProvider: z8.literal("lmstudio") })),
3835
- geminiSchema.merge(z8.object({ apiProvider: z8.literal("gemini") })),
3836
- geminiCliSchema.merge(z8.object({ apiProvider: z8.literal("gemini-cli") })),
3837
- openAiNativeSchema.merge(z8.object({ apiProvider: z8.literal("openai-native") })),
3838
- mistralSchema.merge(z8.object({ apiProvider: z8.literal("mistral") })),
3839
- deepSeekSchema.merge(z8.object({ apiProvider: z8.literal("deepseek") })),
3840
- doubaoSchema.merge(z8.object({ apiProvider: z8.literal("doubao") })),
3841
- moonshotSchema.merge(z8.object({ apiProvider: z8.literal("moonshot") })),
3842
- unboundSchema.merge(z8.object({ apiProvider: z8.literal("unbound") })),
3843
- requestySchema.merge(z8.object({ apiProvider: z8.literal("requesty") })),
3844
- humanRelaySchema.merge(z8.object({ apiProvider: z8.literal("human-relay") })),
3845
- fakeAiSchema.merge(z8.object({ apiProvider: z8.literal("fake-ai") })),
3846
- xaiSchema.merge(z8.object({ apiProvider: z8.literal("xai") })),
3847
- groqSchema.merge(z8.object({ apiProvider: z8.literal("groq") })),
3848
- huggingFaceSchema.merge(z8.object({ apiProvider: z8.literal("huggingface") })),
3849
- chutesSchema.merge(z8.object({ apiProvider: z8.literal("chutes") })),
3850
- litellmSchema.merge(z8.object({ apiProvider: z8.literal("litellm") })),
3851
- cerebrasSchema.merge(z8.object({ apiProvider: z8.literal("cerebras") })),
3852
- sambaNovaSchema.merge(z8.object({ apiProvider: z8.literal("sambanova") })),
3853
- zaiSchema.merge(z8.object({ apiProvider: z8.literal("zai") })),
3854
- fireworksSchema.merge(z8.object({ apiProvider: z8.literal("fireworks") })),
3855
- featherlessSchema.merge(z8.object({ apiProvider: z8.literal("featherless") })),
3856
- ioIntelligenceSchema.merge(z8.object({ apiProvider: z8.literal("io-intelligence") })),
3857
- qwenCodeSchema.merge(z8.object({ apiProvider: z8.literal("qwen-code") })),
3858
- rooSchema.merge(z8.object({ apiProvider: z8.literal("roo") })),
3859
- vercelAiGatewaySchema.merge(z8.object({ apiProvider: z8.literal("vercel-ai-gateway") })),
3815
+ var providerSettingsSchemaDiscriminated = z7.discriminatedUnion("apiProvider", [
3816
+ anthropicSchema.merge(z7.object({ apiProvider: z7.literal("anthropic") })),
3817
+ claudeCodeSchema.merge(z7.object({ apiProvider: z7.literal("claude-code") })),
3818
+ glamaSchema.merge(z7.object({ apiProvider: z7.literal("glama") })),
3819
+ openRouterSchema.merge(z7.object({ apiProvider: z7.literal("openrouter") })),
3820
+ bedrockSchema.merge(z7.object({ apiProvider: z7.literal("bedrock") })),
3821
+ vertexSchema.merge(z7.object({ apiProvider: z7.literal("vertex") })),
3822
+ openAiSchema.merge(z7.object({ apiProvider: z7.literal("openai") })),
3823
+ ollamaSchema.merge(z7.object({ apiProvider: z7.literal("ollama") })),
3824
+ vsCodeLmSchema.merge(z7.object({ apiProvider: z7.literal("vscode-lm") })),
3825
+ lmStudioSchema.merge(z7.object({ apiProvider: z7.literal("lmstudio") })),
3826
+ geminiSchema.merge(z7.object({ apiProvider: z7.literal("gemini") })),
3827
+ geminiCliSchema.merge(z7.object({ apiProvider: z7.literal("gemini-cli") })),
3828
+ openAiNativeSchema.merge(z7.object({ apiProvider: z7.literal("openai-native") })),
3829
+ mistralSchema.merge(z7.object({ apiProvider: z7.literal("mistral") })),
3830
+ deepSeekSchema.merge(z7.object({ apiProvider: z7.literal("deepseek") })),
3831
+ doubaoSchema.merge(z7.object({ apiProvider: z7.literal("doubao") })),
3832
+ moonshotSchema.merge(z7.object({ apiProvider: z7.literal("moonshot") })),
3833
+ unboundSchema.merge(z7.object({ apiProvider: z7.literal("unbound") })),
3834
+ requestySchema.merge(z7.object({ apiProvider: z7.literal("requesty") })),
3835
+ humanRelaySchema.merge(z7.object({ apiProvider: z7.literal("human-relay") })),
3836
+ fakeAiSchema.merge(z7.object({ apiProvider: z7.literal("fake-ai") })),
3837
+ xaiSchema.merge(z7.object({ apiProvider: z7.literal("xai") })),
3838
+ groqSchema.merge(z7.object({ apiProvider: z7.literal("groq") })),
3839
+ huggingFaceSchema.merge(z7.object({ apiProvider: z7.literal("huggingface") })),
3840
+ chutesSchema.merge(z7.object({ apiProvider: z7.literal("chutes") })),
3841
+ litellmSchema.merge(z7.object({ apiProvider: z7.literal("litellm") })),
3842
+ cerebrasSchema.merge(z7.object({ apiProvider: z7.literal("cerebras") })),
3843
+ sambaNovaSchema.merge(z7.object({ apiProvider: z7.literal("sambanova") })),
3844
+ zaiSchema.merge(z7.object({ apiProvider: z7.literal("zai") })),
3845
+ fireworksSchema.merge(z7.object({ apiProvider: z7.literal("fireworks") })),
3846
+ featherlessSchema.merge(z7.object({ apiProvider: z7.literal("featherless") })),
3847
+ ioIntelligenceSchema.merge(z7.object({ apiProvider: z7.literal("io-intelligence") })),
3848
+ qwenCodeSchema.merge(z7.object({ apiProvider: z7.literal("qwen-code") })),
3849
+ rooSchema.merge(z7.object({ apiProvider: z7.literal("roo") })),
3850
+ vercelAiGatewaySchema.merge(z7.object({ apiProvider: z7.literal("vercel-ai-gateway") })),
3860
3851
  defaultSchema
3861
3852
  ]);
3862
- var providerSettingsSchema = z8.object({
3853
+ var providerSettingsSchema = z7.object({
3863
3854
  apiProvider: providerNamesSchema.optional(),
3864
3855
  ...anthropicSchema.shape,
3865
3856
  ...claudeCodeSchema.shape,
@@ -3898,9 +3889,9 @@ var providerSettingsSchema = z8.object({
3898
3889
  ...vercelAiGatewaySchema.shape,
3899
3890
  ...codebaseIndexProviderSchema.shape
3900
3891
  });
3901
- var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z8.string().optional() });
3892
+ var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z7.string().optional() });
3902
3893
  var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
3903
- z8.object({ id: z8.string().optional() })
3894
+ z7.object({ id: z7.string().optional() })
3904
3895
  );
3905
3896
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
3906
3897
  var MODEL_ID_KEYS = [
@@ -4039,20 +4030,36 @@ var dynamicProviders = [
4039
4030
  var isDynamicProvider = (key) => dynamicProviders.includes(key);
4040
4031
 
4041
4032
  // src/history.ts
4033
+ import { z as z8 } from "zod";
4034
+ var historyItemSchema = z8.object({
4035
+ id: z8.string(),
4036
+ number: z8.number(),
4037
+ ts: z8.number(),
4038
+ task: z8.string(),
4039
+ tokensIn: z8.number(),
4040
+ tokensOut: z8.number(),
4041
+ cacheWrites: z8.number().optional(),
4042
+ cacheReads: z8.number().optional(),
4043
+ totalCost: z8.number(),
4044
+ size: z8.number().optional(),
4045
+ workspace: z8.string().optional(),
4046
+ mode: z8.string().optional()
4047
+ });
4048
+
4049
+ // src/experiment.ts
4042
4050
  import { z as z9 } from "zod";
4043
- var historyItemSchema = z9.object({
4044
- id: z9.string(),
4045
- number: z9.number(),
4046
- ts: z9.number(),
4047
- task: z9.string(),
4048
- tokensIn: z9.number(),
4049
- tokensOut: z9.number(),
4050
- cacheWrites: z9.number().optional(),
4051
- cacheReads: z9.number().optional(),
4052
- totalCost: z9.number(),
4053
- size: z9.number().optional(),
4054
- workspace: z9.string().optional(),
4055
- mode: z9.string().optional()
4051
+ var experimentIds = [
4052
+ "powerSteering",
4053
+ "multiFileApplyDiff",
4054
+ "preventFocusDisruption",
4055
+ "imageGeneration"
4056
+ ];
4057
+ var experimentIdsSchema = z9.enum(experimentIds);
4058
+ var experimentsSchema = z9.object({
4059
+ powerSteering: z9.boolean().optional(),
4060
+ multiFileApplyDiff: z9.boolean().optional(),
4061
+ preventFocusDisruption: z9.boolean().optional(),
4062
+ imageGeneration: z9.boolean().optional()
4056
4063
  });
4057
4064
 
4058
4065
  // src/telemetry.ts
@@ -4582,8 +4589,376 @@ var EVALS_SETTINGS = {
4582
4589
  };
4583
4590
  var EVALS_TIMEOUT = 5 * 60 * 1e3;
4584
4591
 
4585
- // src/ipc.ts
4592
+ // src/marketplace.ts
4586
4593
  import { z as z14 } from "zod";
4594
+ var mcpParameterSchema = z14.object({
4595
+ name: z14.string().min(1),
4596
+ key: z14.string().min(1),
4597
+ placeholder: z14.string().optional(),
4598
+ optional: z14.boolean().optional().default(false)
4599
+ });
4600
+ var mcpInstallationMethodSchema = z14.object({
4601
+ name: z14.string().min(1),
4602
+ content: z14.string().min(1),
4603
+ parameters: z14.array(mcpParameterSchema).optional(),
4604
+ prerequisites: z14.array(z14.string()).optional()
4605
+ });
4606
+ var marketplaceItemTypeSchema = z14.enum(["mode", "mcp"]);
4607
+ var baseMarketplaceItemSchema = z14.object({
4608
+ id: z14.string().min(1),
4609
+ name: z14.string().min(1, "Name is required"),
4610
+ description: z14.string(),
4611
+ author: z14.string().optional(),
4612
+ authorUrl: z14.string().url("Author URL must be a valid URL").optional(),
4613
+ tags: z14.array(z14.string()).optional(),
4614
+ prerequisites: z14.array(z14.string()).optional()
4615
+ });
4616
+ var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4617
+ content: z14.string().min(1)
4618
+ // YAML content for modes
4619
+ });
4620
+ var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4621
+ url: z14.string().url(),
4622
+ // Required url field
4623
+ content: z14.union([z14.string().min(1), z14.array(mcpInstallationMethodSchema)]),
4624
+ // Single config or array of methods
4625
+ parameters: z14.array(mcpParameterSchema).optional()
4626
+ });
4627
+ var marketplaceItemSchema = z14.discriminatedUnion("type", [
4628
+ // Mode marketplace item
4629
+ modeMarketplaceItemSchema.extend({
4630
+ type: z14.literal("mode")
4631
+ }),
4632
+ // MCP marketplace item
4633
+ mcpMarketplaceItemSchema.extend({
4634
+ type: z14.literal("mcp")
4635
+ })
4636
+ ]);
4637
+ var installMarketplaceItemOptionsSchema = z14.object({
4638
+ target: z14.enum(["global", "project"]).optional().default("project"),
4639
+ parameters: z14.record(z14.string(), z14.any()).optional()
4640
+ });
4641
+
4642
+ // src/cloud.ts
4643
+ var organizationAllowListSchema = z15.object({
4644
+ allowAll: z15.boolean(),
4645
+ providers: z15.record(
4646
+ z15.object({
4647
+ allowAll: z15.boolean(),
4648
+ models: z15.array(z15.string()).optional()
4649
+ })
4650
+ )
4651
+ });
4652
+ var organizationDefaultSettingsSchema = globalSettingsSchema.pick({
4653
+ enableCheckpoints: true,
4654
+ fuzzyMatchThreshold: true,
4655
+ maxOpenTabsContext: true,
4656
+ maxReadFileLine: true,
4657
+ maxWorkspaceFiles: true,
4658
+ showRooIgnoredFiles: true,
4659
+ terminalCommandDelay: true,
4660
+ terminalCompressProgressBar: true,
4661
+ terminalOutputLineLimit: true,
4662
+ terminalShellIntegrationDisabled: true,
4663
+ terminalShellIntegrationTimeout: true,
4664
+ terminalZshClearEolMark: true
4665
+ }).merge(
4666
+ z15.object({
4667
+ maxOpenTabsContext: z15.number().int().nonnegative().optional(),
4668
+ maxReadFileLine: z15.number().int().gte(-1).optional(),
4669
+ maxWorkspaceFiles: z15.number().int().nonnegative().optional(),
4670
+ terminalCommandDelay: z15.number().int().nonnegative().optional(),
4671
+ terminalOutputLineLimit: z15.number().int().nonnegative().optional(),
4672
+ terminalShellIntegrationTimeout: z15.number().int().nonnegative().optional()
4673
+ })
4674
+ );
4675
+ var organizationCloudSettingsSchema = z15.object({
4676
+ recordTaskMessages: z15.boolean().optional(),
4677
+ enableTaskSharing: z15.boolean().optional(),
4678
+ taskShareExpirationDays: z15.number().int().positive().optional(),
4679
+ allowMembersViewAllTasks: z15.boolean().optional()
4680
+ });
4681
+ var organizationSettingsSchema = z15.object({
4682
+ version: z15.number(),
4683
+ cloudSettings: organizationCloudSettingsSchema.optional(),
4684
+ defaultSettings: organizationDefaultSettingsSchema,
4685
+ allowList: organizationAllowListSchema,
4686
+ hiddenMcps: z15.array(z15.string()).optional(),
4687
+ hideMarketplaceMcps: z15.boolean().optional(),
4688
+ mcps: z15.array(mcpMarketplaceItemSchema).optional(),
4689
+ providerProfiles: z15.record(z15.string(), providerSettingsWithIdSchema).optional()
4690
+ });
4691
+ var userFeaturesSchema = z15.object({
4692
+ roomoteControlEnabled: z15.boolean().optional()
4693
+ });
4694
+ var userSettingsConfigSchema = z15.object({
4695
+ extensionBridgeEnabled: z15.boolean().optional()
4696
+ });
4697
+ var userSettingsDataSchema = z15.object({
4698
+ features: userFeaturesSchema,
4699
+ settings: userSettingsConfigSchema,
4700
+ version: z15.number()
4701
+ });
4702
+ var ORGANIZATION_ALLOW_ALL = {
4703
+ allowAll: true,
4704
+ providers: {}
4705
+ };
4706
+ var ORGANIZATION_DEFAULT = {
4707
+ version: 0,
4708
+ cloudSettings: {
4709
+ recordTaskMessages: true,
4710
+ enableTaskSharing: true,
4711
+ taskShareExpirationDays: 30,
4712
+ allowMembersViewAllTasks: true
4713
+ },
4714
+ defaultSettings: {},
4715
+ allowList: ORGANIZATION_ALLOW_ALL
4716
+ };
4717
+ var shareResponseSchema = z15.object({
4718
+ success: z15.boolean(),
4719
+ shareUrl: z15.string().optional(),
4720
+ error: z15.string().optional(),
4721
+ isNewShare: z15.boolean().optional(),
4722
+ manageUrl: z15.string().optional()
4723
+ });
4724
+ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
4725
+ ConnectionState2["DISCONNECTED"] = "disconnected";
4726
+ ConnectionState2["CONNECTING"] = "connecting";
4727
+ ConnectionState2["CONNECTED"] = "connected";
4728
+ ConnectionState2["RETRYING"] = "retrying";
4729
+ ConnectionState2["FAILED"] = "failed";
4730
+ return ConnectionState2;
4731
+ })(ConnectionState || {});
4732
+ var HEARTBEAT_INTERVAL_MS = 2e4;
4733
+ var INSTANCE_TTL_SECONDS = 60;
4734
+ var extensionTaskSchema = z15.object({
4735
+ taskId: z15.string(),
4736
+ taskStatus: z15.nativeEnum(TaskStatus),
4737
+ ...taskMetadataSchema.shape
4738
+ });
4739
+ var extensionInstanceSchema = z15.object({
4740
+ instanceId: z15.string(),
4741
+ userId: z15.string(),
4742
+ workspacePath: z15.string(),
4743
+ appProperties: staticAppPropertiesSchema,
4744
+ gitProperties: gitPropertiesSchema.optional(),
4745
+ lastHeartbeat: z15.coerce.number(),
4746
+ task: extensionTaskSchema,
4747
+ taskAsk: clineMessageSchema.optional(),
4748
+ taskHistory: z15.array(z15.string())
4749
+ });
4750
+ var ExtensionBridgeEventName = ((ExtensionBridgeEventName2) => {
4751
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskCreated"] = "taskCreated" /* TaskCreated */] = "TaskCreated";
4752
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskStarted"] = "taskStarted" /* TaskStarted */] = "TaskStarted";
4753
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskCompleted"] = "taskCompleted" /* TaskCompleted */] = "TaskCompleted";
4754
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskAborted"] = "taskAborted" /* TaskAborted */] = "TaskAborted";
4755
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskFocused"] = "taskFocused" /* TaskFocused */] = "TaskFocused";
4756
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskUnfocused"] = "taskUnfocused" /* TaskUnfocused */] = "TaskUnfocused";
4757
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskActive"] = "taskActive" /* TaskActive */] = "TaskActive";
4758
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskInteractive"] = "taskInteractive" /* TaskInteractive */] = "TaskInteractive";
4759
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskResumable"] = "taskResumable" /* TaskResumable */] = "TaskResumable";
4760
+ ExtensionBridgeEventName2[ExtensionBridgeEventName2["TaskIdle"] = "taskIdle" /* TaskIdle */] = "TaskIdle";
4761
+ ExtensionBridgeEventName2["InstanceRegistered"] = "instance_registered";
4762
+ ExtensionBridgeEventName2["InstanceUnregistered"] = "instance_unregistered";
4763
+ ExtensionBridgeEventName2["HeartbeatUpdated"] = "heartbeat_updated";
4764
+ return ExtensionBridgeEventName2;
4765
+ })(ExtensionBridgeEventName || {});
4766
+ var extensionBridgeEventSchema = z15.discriminatedUnion("type", [
4767
+ z15.object({
4768
+ type: z15.literal(ExtensionBridgeEventName.TaskCreated),
4769
+ instance: extensionInstanceSchema,
4770
+ timestamp: z15.number()
4771
+ }),
4772
+ z15.object({
4773
+ type: z15.literal(ExtensionBridgeEventName.TaskStarted),
4774
+ instance: extensionInstanceSchema,
4775
+ timestamp: z15.number()
4776
+ }),
4777
+ z15.object({
4778
+ type: z15.literal(ExtensionBridgeEventName.TaskCompleted),
4779
+ instance: extensionInstanceSchema,
4780
+ timestamp: z15.number()
4781
+ }),
4782
+ z15.object({
4783
+ type: z15.literal(ExtensionBridgeEventName.TaskAborted),
4784
+ instance: extensionInstanceSchema,
4785
+ timestamp: z15.number()
4786
+ }),
4787
+ z15.object({
4788
+ type: z15.literal(ExtensionBridgeEventName.TaskFocused),
4789
+ instance: extensionInstanceSchema,
4790
+ timestamp: z15.number()
4791
+ }),
4792
+ z15.object({
4793
+ type: z15.literal(ExtensionBridgeEventName.TaskUnfocused),
4794
+ instance: extensionInstanceSchema,
4795
+ timestamp: z15.number()
4796
+ }),
4797
+ z15.object({
4798
+ type: z15.literal(ExtensionBridgeEventName.TaskActive),
4799
+ instance: extensionInstanceSchema,
4800
+ timestamp: z15.number()
4801
+ }),
4802
+ z15.object({
4803
+ type: z15.literal(ExtensionBridgeEventName.TaskInteractive),
4804
+ instance: extensionInstanceSchema,
4805
+ timestamp: z15.number()
4806
+ }),
4807
+ z15.object({
4808
+ type: z15.literal(ExtensionBridgeEventName.TaskResumable),
4809
+ instance: extensionInstanceSchema,
4810
+ timestamp: z15.number()
4811
+ }),
4812
+ z15.object({
4813
+ type: z15.literal(ExtensionBridgeEventName.TaskIdle),
4814
+ instance: extensionInstanceSchema,
4815
+ timestamp: z15.number()
4816
+ }),
4817
+ z15.object({
4818
+ type: z15.literal("instance_registered" /* InstanceRegistered */),
4819
+ instance: extensionInstanceSchema,
4820
+ timestamp: z15.number()
4821
+ }),
4822
+ z15.object({
4823
+ type: z15.literal("instance_unregistered" /* InstanceUnregistered */),
4824
+ instance: extensionInstanceSchema,
4825
+ timestamp: z15.number()
4826
+ }),
4827
+ z15.object({
4828
+ type: z15.literal("heartbeat_updated" /* HeartbeatUpdated */),
4829
+ instance: extensionInstanceSchema,
4830
+ timestamp: z15.number()
4831
+ })
4832
+ ]);
4833
+ var ExtensionBridgeCommandName = /* @__PURE__ */ ((ExtensionBridgeCommandName2) => {
4834
+ ExtensionBridgeCommandName2["StartTask"] = "start_task";
4835
+ ExtensionBridgeCommandName2["StopTask"] = "stop_task";
4836
+ ExtensionBridgeCommandName2["ResumeTask"] = "resume_task";
4837
+ return ExtensionBridgeCommandName2;
4838
+ })(ExtensionBridgeCommandName || {});
4839
+ var extensionBridgeCommandSchema = z15.discriminatedUnion("type", [
4840
+ z15.object({
4841
+ type: z15.literal("start_task" /* StartTask */),
4842
+ instanceId: z15.string(),
4843
+ payload: z15.object({
4844
+ text: z15.string(),
4845
+ images: z15.array(z15.string()).optional()
4846
+ }),
4847
+ timestamp: z15.number()
4848
+ }),
4849
+ z15.object({
4850
+ type: z15.literal("stop_task" /* StopTask */),
4851
+ instanceId: z15.string(),
4852
+ payload: z15.object({ taskId: z15.string() }),
4853
+ timestamp: z15.number()
4854
+ }),
4855
+ z15.object({
4856
+ type: z15.literal("resume_task" /* ResumeTask */),
4857
+ instanceId: z15.string(),
4858
+ payload: z15.object({
4859
+ taskId: z15.string()
4860
+ }),
4861
+ timestamp: z15.number()
4862
+ })
4863
+ ]);
4864
+ var TaskBridgeEventName = ((TaskBridgeEventName2) => {
4865
+ TaskBridgeEventName2[TaskBridgeEventName2["Message"] = "message" /* Message */] = "Message";
4866
+ TaskBridgeEventName2[TaskBridgeEventName2["TaskModeSwitched"] = "taskModeSwitched" /* TaskModeSwitched */] = "TaskModeSwitched";
4867
+ TaskBridgeEventName2[TaskBridgeEventName2["TaskInteractive"] = "taskInteractive" /* TaskInteractive */] = "TaskInteractive";
4868
+ return TaskBridgeEventName2;
4869
+ })(TaskBridgeEventName || {});
4870
+ var taskBridgeEventSchema = z15.discriminatedUnion("type", [
4871
+ z15.object({
4872
+ type: z15.literal(TaskBridgeEventName.Message),
4873
+ taskId: z15.string(),
4874
+ action: z15.string(),
4875
+ message: clineMessageSchema
4876
+ }),
4877
+ z15.object({
4878
+ type: z15.literal(TaskBridgeEventName.TaskModeSwitched),
4879
+ taskId: z15.string(),
4880
+ mode: z15.string()
4881
+ }),
4882
+ z15.object({
4883
+ type: z15.literal(TaskBridgeEventName.TaskInteractive),
4884
+ taskId: z15.string()
4885
+ })
4886
+ ]);
4887
+ var TaskBridgeCommandName = /* @__PURE__ */ ((TaskBridgeCommandName2) => {
4888
+ TaskBridgeCommandName2["Message"] = "message";
4889
+ TaskBridgeCommandName2["ApproveAsk"] = "approve_ask";
4890
+ TaskBridgeCommandName2["DenyAsk"] = "deny_ask";
4891
+ return TaskBridgeCommandName2;
4892
+ })(TaskBridgeCommandName || {});
4893
+ var taskBridgeCommandSchema = z15.discriminatedUnion("type", [
4894
+ z15.object({
4895
+ type: z15.literal("message" /* Message */),
4896
+ taskId: z15.string(),
4897
+ payload: z15.object({
4898
+ text: z15.string(),
4899
+ images: z15.array(z15.string()).optional()
4900
+ }),
4901
+ timestamp: z15.number()
4902
+ }),
4903
+ z15.object({
4904
+ type: z15.literal("approve_ask" /* ApproveAsk */),
4905
+ taskId: z15.string(),
4906
+ payload: z15.object({
4907
+ text: z15.string().optional(),
4908
+ images: z15.array(z15.string()).optional()
4909
+ }),
4910
+ timestamp: z15.number()
4911
+ }),
4912
+ z15.object({
4913
+ type: z15.literal("deny_ask" /* DenyAsk */),
4914
+ taskId: z15.string(),
4915
+ payload: z15.object({
4916
+ text: z15.string().optional(),
4917
+ images: z15.array(z15.string()).optional()
4918
+ }),
4919
+ timestamp: z15.number()
4920
+ })
4921
+ ]);
4922
+ var ExtensionSocketEvents = {
4923
+ CONNECTED: "extension:connected",
4924
+ REGISTER: "extension:register",
4925
+ UNREGISTER: "extension:unregister",
4926
+ HEARTBEAT: "extension:heartbeat",
4927
+ EVENT: "extension:event",
4928
+ // event from extension instance
4929
+ RELAYED_EVENT: "extension:relayed_event",
4930
+ // relay from server
4931
+ COMMAND: "extension:command",
4932
+ // command from user
4933
+ RELAYED_COMMAND: "extension:relayed_command"
4934
+ // relay from server
4935
+ };
4936
+ var TaskSocketEvents = {
4937
+ JOIN: "task:join",
4938
+ LEAVE: "task:leave",
4939
+ EVENT: "task:event",
4940
+ // event from extension task
4941
+ RELAYED_EVENT: "task:relayed_event",
4942
+ // relay from server
4943
+ COMMAND: "task:command",
4944
+ // command from user
4945
+ RELAYED_COMMAND: "task:relayed_command"
4946
+ // relay from server
4947
+ };
4948
+
4949
+ // src/followup.ts
4950
+ import { z as z16 } from "zod";
4951
+ var suggestionItemSchema = z16.object({
4952
+ answer: z16.string(),
4953
+ mode: z16.string().optional()
4954
+ });
4955
+ var followUpDataSchema = z16.object({
4956
+ question: z16.string().optional(),
4957
+ suggest: z16.array(suggestionItemSchema).optional()
4958
+ });
4959
+
4960
+ // src/ipc.ts
4961
+ import { z as z17 } from "zod";
4587
4962
  var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
4588
4963
  IpcMessageType2["Connect"] = "Connect";
4589
4964
  IpcMessageType2["Disconnect"] = "Disconnect";
@@ -4597,10 +4972,10 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
4597
4972
  IpcOrigin2["Server"] = "server";
4598
4973
  return IpcOrigin2;
4599
4974
  })(IpcOrigin || {});
4600
- var ackSchema = z14.object({
4601
- clientId: z14.string(),
4602
- pid: z14.number(),
4603
- ppid: z14.number()
4975
+ var ackSchema = z17.object({
4976
+ clientId: z17.string(),
4977
+ pid: z17.number(),
4978
+ ppid: z17.number()
4604
4979
  });
4605
4980
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
4606
4981
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -4609,122 +4984,72 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
4609
4984
  TaskCommandName2["ResumeTask"] = "ResumeTask";
4610
4985
  return TaskCommandName2;
4611
4986
  })(TaskCommandName || {});
4612
- var taskCommandSchema = z14.discriminatedUnion("commandName", [
4613
- z14.object({
4614
- commandName: z14.literal("StartNewTask" /* StartNewTask */),
4615
- data: z14.object({
4987
+ var taskCommandSchema = z17.discriminatedUnion("commandName", [
4988
+ z17.object({
4989
+ commandName: z17.literal("StartNewTask" /* StartNewTask */),
4990
+ data: z17.object({
4616
4991
  configuration: rooCodeSettingsSchema,
4617
- text: z14.string(),
4618
- images: z14.array(z14.string()).optional(),
4619
- newTab: z14.boolean().optional()
4992
+ text: z17.string(),
4993
+ images: z17.array(z17.string()).optional(),
4994
+ newTab: z17.boolean().optional()
4620
4995
  })
4621
4996
  }),
4622
- z14.object({
4623
- commandName: z14.literal("CancelTask" /* CancelTask */),
4624
- data: z14.string()
4997
+ z17.object({
4998
+ commandName: z17.literal("CancelTask" /* CancelTask */),
4999
+ data: z17.string()
4625
5000
  }),
4626
- z14.object({
4627
- commandName: z14.literal("CloseTask" /* CloseTask */),
4628
- data: z14.string()
5001
+ z17.object({
5002
+ commandName: z17.literal("CloseTask" /* CloseTask */),
5003
+ data: z17.string()
4629
5004
  }),
4630
- z14.object({
4631
- commandName: z14.literal("ResumeTask" /* ResumeTask */),
4632
- data: z14.string()
5005
+ z17.object({
5006
+ commandName: z17.literal("ResumeTask" /* ResumeTask */),
5007
+ data: z17.string()
4633
5008
  })
4634
5009
  ]);
4635
- var ipcMessageSchema = z14.discriminatedUnion("type", [
4636
- z14.object({
4637
- type: z14.literal("Ack" /* Ack */),
4638
- origin: z14.literal("server" /* Server */),
5010
+ var ipcMessageSchema = z17.discriminatedUnion("type", [
5011
+ z17.object({
5012
+ type: z17.literal("Ack" /* Ack */),
5013
+ origin: z17.literal("server" /* Server */),
4639
5014
  data: ackSchema
4640
5015
  }),
4641
- z14.object({
4642
- type: z14.literal("TaskCommand" /* TaskCommand */),
4643
- origin: z14.literal("client" /* Client */),
4644
- clientId: z14.string(),
5016
+ z17.object({
5017
+ type: z17.literal("TaskCommand" /* TaskCommand */),
5018
+ origin: z17.literal("client" /* Client */),
5019
+ clientId: z17.string(),
4645
5020
  data: taskCommandSchema
4646
5021
  }),
4647
- z14.object({
4648
- type: z14.literal("TaskEvent" /* TaskEvent */),
4649
- origin: z14.literal("server" /* Server */),
4650
- relayClientId: z14.string().optional(),
5022
+ z17.object({
5023
+ type: z17.literal("TaskEvent" /* TaskEvent */),
5024
+ origin: z17.literal("server" /* Server */),
5025
+ relayClientId: z17.string().optional(),
4651
5026
  data: taskEventSchema
4652
5027
  })
4653
5028
  ]);
4654
5029
 
4655
- // src/marketplace.ts
4656
- import { z as z15 } from "zod";
4657
- var mcpParameterSchema = z15.object({
4658
- name: z15.string().min(1),
4659
- key: z15.string().min(1),
4660
- placeholder: z15.string().optional(),
4661
- optional: z15.boolean().optional().default(false)
4662
- });
4663
- var mcpInstallationMethodSchema = z15.object({
4664
- name: z15.string().min(1),
4665
- content: z15.string().min(1),
4666
- parameters: z15.array(mcpParameterSchema).optional(),
4667
- prerequisites: z15.array(z15.string()).optional()
4668
- });
4669
- var marketplaceItemTypeSchema = z15.enum(["mode", "mcp"]);
4670
- var baseMarketplaceItemSchema = z15.object({
4671
- id: z15.string().min(1),
4672
- name: z15.string().min(1, "Name is required"),
4673
- description: z15.string(),
4674
- author: z15.string().optional(),
4675
- authorUrl: z15.string().url("Author URL must be a valid URL").optional(),
4676
- tags: z15.array(z15.string()).optional(),
4677
- prerequisites: z15.array(z15.string()).optional()
4678
- });
4679
- var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4680
- content: z15.string().min(1)
4681
- // YAML content for modes
4682
- });
4683
- var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4684
- url: z15.string().url(),
4685
- // Required url field
4686
- content: z15.union([z15.string().min(1), z15.array(mcpInstallationMethodSchema)]),
4687
- // Single config or array of methods
4688
- parameters: z15.array(mcpParameterSchema).optional()
4689
- });
4690
- var marketplaceItemSchema = z15.discriminatedUnion("type", [
4691
- // Mode marketplace item
4692
- modeMarketplaceItemSchema.extend({
4693
- type: z15.literal("mode")
4694
- }),
4695
- // MCP marketplace item
4696
- mcpMarketplaceItemSchema.extend({
4697
- type: z15.literal("mcp")
4698
- })
4699
- ]);
4700
- var installMarketplaceItemOptionsSchema = z15.object({
4701
- target: z15.enum(["global", "project"]).optional().default("project"),
4702
- parameters: z15.record(z15.string(), z15.any()).optional()
4703
- });
4704
-
4705
5030
  // src/mcp.ts
4706
- import { z as z16 } from "zod";
4707
- var mcpExecutionStatusSchema = z16.discriminatedUnion("status", [
4708
- z16.object({
4709
- executionId: z16.string(),
4710
- status: z16.literal("started"),
4711
- serverName: z16.string(),
4712
- toolName: z16.string()
5031
+ import { z as z18 } from "zod";
5032
+ var mcpExecutionStatusSchema = z18.discriminatedUnion("status", [
5033
+ z18.object({
5034
+ executionId: z18.string(),
5035
+ status: z18.literal("started"),
5036
+ serverName: z18.string(),
5037
+ toolName: z18.string()
4713
5038
  }),
4714
- z16.object({
4715
- executionId: z16.string(),
4716
- status: z16.literal("output"),
4717
- response: z16.string()
5039
+ z18.object({
5040
+ executionId: z18.string(),
5041
+ status: z18.literal("output"),
5042
+ response: z18.string()
4718
5043
  }),
4719
- z16.object({
4720
- executionId: z16.string(),
4721
- status: z16.literal("completed"),
4722
- response: z16.string().optional()
5044
+ z18.object({
5045
+ executionId: z18.string(),
5046
+ status: z18.literal("completed"),
5047
+ response: z18.string().optional()
4723
5048
  }),
4724
- z16.object({
4725
- executionId: z16.string(),
4726
- status: z16.literal("error"),
4727
- error: z16.string().optional()
5049
+ z18.object({
5050
+ executionId: z18.string(),
5051
+ status: z18.literal("error"),
5052
+ error: z18.string().optional()
4728
5053
  })
4729
5054
  ]);
4730
5055
 
@@ -4733,56 +5058,41 @@ function shouldUseSingleFileRead(modelId) {
4733
5058
  return modelId.includes("grok-code-fast-1");
4734
5059
  }
4735
5060
 
4736
- // src/task.ts
4737
- import { z as z17 } from "zod";
4738
- var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
4739
- TaskStatus2["Running"] = "running";
4740
- TaskStatus2["Interactive"] = "interactive";
4741
- TaskStatus2["Resumable"] = "resumable";
4742
- TaskStatus2["Idle"] = "idle";
4743
- TaskStatus2["None"] = "none";
4744
- return TaskStatus2;
4745
- })(TaskStatus || {});
4746
- var taskMetadataSchema = z17.object({
4747
- task: z17.string().optional(),
4748
- images: z17.array(z17.string()).optional()
4749
- });
4750
-
4751
5061
  // src/todo.ts
4752
- import { z as z18 } from "zod";
4753
- var todoStatusSchema = z18.enum(["pending", "in_progress", "completed"]);
4754
- var todoItemSchema = z18.object({
4755
- id: z18.string(),
4756
- content: z18.string(),
5062
+ import { z as z19 } from "zod";
5063
+ var todoStatusSchema = z19.enum(["pending", "in_progress", "completed"]);
5064
+ var todoItemSchema = z19.object({
5065
+ id: z19.string(),
5066
+ content: z19.string(),
4757
5067
  status: todoStatusSchema
4758
5068
  });
4759
5069
 
4760
5070
  // src/terminal.ts
4761
- import { z as z19 } from "zod";
4762
- var commandExecutionStatusSchema = z19.discriminatedUnion("status", [
4763
- z19.object({
4764
- executionId: z19.string(),
4765
- status: z19.literal("started"),
4766
- pid: z19.number().optional(),
4767
- command: z19.string()
5071
+ import { z as z20 } from "zod";
5072
+ var commandExecutionStatusSchema = z20.discriminatedUnion("status", [
5073
+ z20.object({
5074
+ executionId: z20.string(),
5075
+ status: z20.literal("started"),
5076
+ pid: z20.number().optional(),
5077
+ command: z20.string()
4768
5078
  }),
4769
- z19.object({
4770
- executionId: z19.string(),
4771
- status: z19.literal("output"),
4772
- output: z19.string()
5079
+ z20.object({
5080
+ executionId: z20.string(),
5081
+ status: z20.literal("output"),
5082
+ output: z20.string()
4773
5083
  }),
4774
- z19.object({
4775
- executionId: z19.string(),
4776
- status: z19.literal("exited"),
4777
- exitCode: z19.number().optional()
5084
+ z20.object({
5085
+ executionId: z20.string(),
5086
+ status: z20.literal("exited"),
5087
+ exitCode: z20.number().optional()
4778
5088
  }),
4779
- z19.object({
4780
- executionId: z19.string(),
4781
- status: z19.literal("fallback")
5089
+ z20.object({
5090
+ executionId: z20.string(),
5091
+ status: z20.literal("fallback")
4782
5092
  }),
4783
- z19.object({
4784
- executionId: z19.string(),
4785
- status: z19.literal("timeout")
5093
+ z20.object({
5094
+ executionId: z20.string(),
5095
+ status: z20.literal("timeout")
4786
5096
  })
4787
5097
  ]);
4788
5098
  export {
@@ -4796,6 +5106,7 @@ export {
4796
5106
  BEDROCK_REGIONS,
4797
5107
  CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
4798
5108
  CODEBASE_INDEX_DEFAULTS,
5109
+ ConnectionState,
4799
5110
  DEEP_SEEK_DEFAULT_TEMPERATURE,
4800
5111
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
4801
5112
  DEFAULT_MODES,
@@ -4805,10 +5116,14 @@ export {
4805
5116
  DOUBAO_API_CHAT_PATH,
4806
5117
  EVALS_SETTINGS,
4807
5118
  EVALS_TIMEOUT,
5119
+ ExtensionBridgeCommandName,
5120
+ ExtensionBridgeEventName,
5121
+ ExtensionSocketEvents,
4808
5122
  GLAMA_DEFAULT_TEMPERATURE,
4809
5123
  GLOBAL_SETTINGS_KEYS,
4810
5124
  GLOBAL_STATE_KEYS,
4811
5125
  GPT5_DEFAULT_TEMPERATURE,
5126
+ HEARTBEAT_INTERVAL_MS,
4812
5127
  HUGGINGFACE_API_URL,
4813
5128
  HUGGINGFACE_CACHE_DURATION,
4814
5129
  HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
@@ -4817,6 +5132,7 @@ export {
4817
5132
  HUGGINGFACE_SLIDER_MIN,
4818
5133
  HUGGINGFACE_SLIDER_STEP,
4819
5134
  HUGGINGFACE_TEMPERATURE_MAX_VALUE,
5135
+ INSTANCE_TTL_SECONDS,
4820
5136
  IO_INTELLIGENCE_CACHE_DURATION,
4821
5137
  IpcMessageType,
4822
5138
  IpcOrigin,
@@ -4833,10 +5149,15 @@ export {
4833
5149
  OPEN_ROUTER_PROMPT_CACHING_MODELS,
4834
5150
  OPEN_ROUTER_REASONING_BUDGET_MODELS,
4835
5151
  OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
5152
+ ORGANIZATION_ALLOW_ALL,
5153
+ ORGANIZATION_DEFAULT,
4836
5154
  PROVIDER_SETTINGS_KEYS,
4837
5155
  RooCodeEventName,
4838
5156
  SECRET_STATE_KEYS,
5157
+ TaskBridgeCommandName,
5158
+ TaskBridgeEventName,
4839
5159
  TaskCommandName,
5160
+ TaskSocketEvents,
4840
5161
  TaskStatus,
4841
5162
  TelemetryEventName,
4842
5163
  VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE,
@@ -4887,6 +5208,9 @@ export {
4887
5208
  experimentIds,
4888
5209
  experimentIdsSchema,
4889
5210
  experimentsSchema,
5211
+ extensionBridgeCommandSchema,
5212
+ extensionBridgeEventSchema,
5213
+ extensionInstanceSchema,
4890
5214
  featherlessDefaultModelId,
4891
5215
  featherlessModels,
4892
5216
  fireworksDefaultModelId,
@@ -4953,6 +5277,10 @@ export {
4953
5277
  openAiNativeModels,
4954
5278
  openRouterDefaultModelId,
4955
5279
  openRouterDefaultModelInfo,
5280
+ organizationAllowListSchema,
5281
+ organizationCloudSettingsSchema,
5282
+ organizationDefaultSettingsSchema,
5283
+ organizationSettingsSchema,
4956
5284
  promptComponentSchema,
4957
5285
  providerNames,
4958
5286
  providerNamesSchema,
@@ -4975,9 +5303,12 @@ export {
4975
5303
  rooModels,
4976
5304
  sambaNovaDefaultModelId,
4977
5305
  sambaNovaModels,
5306
+ shareResponseSchema,
4978
5307
  shouldUseSingleFileRead,
4979
5308
  staticAppPropertiesSchema,
4980
5309
  suggestionItemSchema,
5310
+ taskBridgeCommandSchema,
5311
+ taskBridgeEventSchema,
4981
5312
  taskCommandSchema,
4982
5313
  taskEventSchema,
4983
5314
  taskMetadataSchema,
@@ -4997,6 +5328,9 @@ export {
4997
5328
  toolUsageSchema,
4998
5329
  unboundDefaultModelId,
4999
5330
  unboundDefaultModelInfo,
5331
+ userFeaturesSchema,
5332
+ userSettingsConfigSchema,
5333
+ userSettingsDataSchema,
5000
5334
  verbosityLevels,
5001
5335
  verbosityLevelsSchema,
5002
5336
  vercelAiGatewayDefaultModelId,