@roo-code/types 1.62.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",
@@ -178,14 +137,15 @@ var toolNames = [
178
137
  "new_task",
179
138
  "fetch_instructions",
180
139
  "codebase_search",
181
- "update_todo_list"
140
+ "update_todo_list",
141
+ "generate_image"
182
142
  ];
183
- var toolNamesSchema = z3.enum(toolNames);
184
- var toolUsageSchema = z3.record(
143
+ var toolNamesSchema = z2.enum(toolNames);
144
+ var toolUsageSchema = z2.record(
185
145
  toolNamesSchema,
186
- z3.object({
187
- attempts: z3.number(),
188
- failures: z3.number()
146
+ z2.object({
147
+ attempts: z2.number(),
148
+ failures: z2.number()
189
149
  })
190
150
  );
191
151
 
@@ -213,218 +173,258 @@ var RooCodeEventName = /* @__PURE__ */ ((RooCodeEventName2) => {
213
173
  RooCodeEventName2["EvalFail"] = "evalFail";
214
174
  return RooCodeEventName2;
215
175
  })(RooCodeEventName || {});
216
- var rooCodeEventsSchema = z4.object({
217
- ["taskCreated" /* TaskCreated */]: z4.tuple([z4.string()]),
218
- ["taskStarted" /* TaskStarted */]: z4.tuple([z4.string()]),
219
- ["taskCompleted" /* TaskCompleted */]: z4.tuple([
220
- 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(),
221
181
  tokenUsageSchema,
222
182
  toolUsageSchema,
223
- z4.object({
224
- isSubtask: z4.boolean()
183
+ z3.object({
184
+ isSubtask: z3.boolean()
225
185
  })
226
186
  ]),
227
- ["taskAborted" /* TaskAborted */]: z4.tuple([z4.string()]),
228
- ["taskFocused" /* TaskFocused */]: z4.tuple([z4.string()]),
229
- ["taskUnfocused" /* TaskUnfocused */]: z4.tuple([z4.string()]),
230
- ["taskActive" /* TaskActive */]: z4.tuple([z4.string()]),
231
- ["taskInteractive" /* TaskInteractive */]: z4.tuple([z4.string()]),
232
- ["taskResumable" /* TaskResumable */]: z4.tuple([z4.string()]),
233
- ["taskIdle" /* TaskIdle */]: z4.tuple([z4.string()]),
234
- ["taskPaused" /* TaskPaused */]: z4.tuple([z4.string()]),
235
- ["taskUnpaused" /* TaskUnpaused */]: z4.tuple([z4.string()]),
236
- ["taskSpawned" /* TaskSpawned */]: z4.tuple([z4.string(), z4.string()]),
237
- ["message" /* Message */]: z4.tuple([
238
- z4.object({
239
- taskId: z4.string(),
240
- 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")]),
241
201
  message: clineMessageSchema
242
202
  })
243
203
  ]),
244
- ["taskModeSwitched" /* TaskModeSwitched */]: z4.tuple([z4.string(), z4.string()]),
245
- ["taskAskResponded" /* TaskAskResponded */]: z4.tuple([z4.string()]),
246
- ["taskToolFailed" /* TaskToolFailed */]: z4.tuple([z4.string(), toolNamesSchema, z4.string()]),
247
- ["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])
248
208
  });
249
- var taskEventSchema = z4.discriminatedUnion("eventName", [
209
+ var taskEventSchema = z3.discriminatedUnion("eventName", [
250
210
  // Task Provider Lifecycle
251
- z4.object({
252
- eventName: z4.literal("taskCreated" /* TaskCreated */),
211
+ z3.object({
212
+ eventName: z3.literal("taskCreated" /* TaskCreated */),
253
213
  payload: rooCodeEventsSchema.shape["taskCreated" /* TaskCreated */],
254
- taskId: z4.number().optional()
214
+ taskId: z3.number().optional()
255
215
  }),
256
216
  // Task Lifecycle
257
- z4.object({
258
- eventName: z4.literal("taskStarted" /* TaskStarted */),
217
+ z3.object({
218
+ eventName: z3.literal("taskStarted" /* TaskStarted */),
259
219
  payload: rooCodeEventsSchema.shape["taskStarted" /* TaskStarted */],
260
- taskId: z4.number().optional()
220
+ taskId: z3.number().optional()
261
221
  }),
262
- z4.object({
263
- eventName: z4.literal("taskCompleted" /* TaskCompleted */),
222
+ z3.object({
223
+ eventName: z3.literal("taskCompleted" /* TaskCompleted */),
264
224
  payload: rooCodeEventsSchema.shape["taskCompleted" /* TaskCompleted */],
265
- taskId: z4.number().optional()
225
+ taskId: z3.number().optional()
266
226
  }),
267
- z4.object({
268
- eventName: z4.literal("taskAborted" /* TaskAborted */),
227
+ z3.object({
228
+ eventName: z3.literal("taskAborted" /* TaskAborted */),
269
229
  payload: rooCodeEventsSchema.shape["taskAborted" /* TaskAborted */],
270
- taskId: z4.number().optional()
230
+ taskId: z3.number().optional()
271
231
  }),
272
- z4.object({
273
- eventName: z4.literal("taskFocused" /* TaskFocused */),
232
+ z3.object({
233
+ eventName: z3.literal("taskFocused" /* TaskFocused */),
274
234
  payload: rooCodeEventsSchema.shape["taskFocused" /* TaskFocused */],
275
- taskId: z4.number().optional()
235
+ taskId: z3.number().optional()
276
236
  }),
277
- z4.object({
278
- eventName: z4.literal("taskUnfocused" /* TaskUnfocused */),
237
+ z3.object({
238
+ eventName: z3.literal("taskUnfocused" /* TaskUnfocused */),
279
239
  payload: rooCodeEventsSchema.shape["taskUnfocused" /* TaskUnfocused */],
280
- taskId: z4.number().optional()
240
+ taskId: z3.number().optional()
281
241
  }),
282
- z4.object({
283
- eventName: z4.literal("taskActive" /* TaskActive */),
242
+ z3.object({
243
+ eventName: z3.literal("taskActive" /* TaskActive */),
284
244
  payload: rooCodeEventsSchema.shape["taskActive" /* TaskActive */],
285
- taskId: z4.number().optional()
245
+ taskId: z3.number().optional()
286
246
  }),
287
- z4.object({
288
- eventName: z4.literal("taskInteractive" /* TaskInteractive */),
247
+ z3.object({
248
+ eventName: z3.literal("taskInteractive" /* TaskInteractive */),
289
249
  payload: rooCodeEventsSchema.shape["taskInteractive" /* TaskInteractive */],
290
- taskId: z4.number().optional()
250
+ taskId: z3.number().optional()
291
251
  }),
292
- z4.object({
293
- eventName: z4.literal("taskResumable" /* TaskResumable */),
252
+ z3.object({
253
+ eventName: z3.literal("taskResumable" /* TaskResumable */),
294
254
  payload: rooCodeEventsSchema.shape["taskResumable" /* TaskResumable */],
295
- taskId: z4.number().optional()
255
+ taskId: z3.number().optional()
296
256
  }),
297
- z4.object({
298
- eventName: z4.literal("taskIdle" /* TaskIdle */),
257
+ z3.object({
258
+ eventName: z3.literal("taskIdle" /* TaskIdle */),
299
259
  payload: rooCodeEventsSchema.shape["taskIdle" /* TaskIdle */],
300
- taskId: z4.number().optional()
260
+ taskId: z3.number().optional()
301
261
  }),
302
262
  // Subtask Lifecycle
303
- z4.object({
304
- eventName: z4.literal("taskPaused" /* TaskPaused */),
263
+ z3.object({
264
+ eventName: z3.literal("taskPaused" /* TaskPaused */),
305
265
  payload: rooCodeEventsSchema.shape["taskPaused" /* TaskPaused */],
306
- taskId: z4.number().optional()
266
+ taskId: z3.number().optional()
307
267
  }),
308
- z4.object({
309
- eventName: z4.literal("taskUnpaused" /* TaskUnpaused */),
268
+ z3.object({
269
+ eventName: z3.literal("taskUnpaused" /* TaskUnpaused */),
310
270
  payload: rooCodeEventsSchema.shape["taskUnpaused" /* TaskUnpaused */],
311
- taskId: z4.number().optional()
271
+ taskId: z3.number().optional()
312
272
  }),
313
- z4.object({
314
- eventName: z4.literal("taskSpawned" /* TaskSpawned */),
273
+ z3.object({
274
+ eventName: z3.literal("taskSpawned" /* TaskSpawned */),
315
275
  payload: rooCodeEventsSchema.shape["taskSpawned" /* TaskSpawned */],
316
- taskId: z4.number().optional()
276
+ taskId: z3.number().optional()
317
277
  }),
318
278
  // Task Execution
319
- z4.object({
320
- eventName: z4.literal("message" /* Message */),
279
+ z3.object({
280
+ eventName: z3.literal("message" /* Message */),
321
281
  payload: rooCodeEventsSchema.shape["message" /* Message */],
322
- taskId: z4.number().optional()
282
+ taskId: z3.number().optional()
323
283
  }),
324
- z4.object({
325
- eventName: z4.literal("taskModeSwitched" /* TaskModeSwitched */),
284
+ z3.object({
285
+ eventName: z3.literal("taskModeSwitched" /* TaskModeSwitched */),
326
286
  payload: rooCodeEventsSchema.shape["taskModeSwitched" /* TaskModeSwitched */],
327
- taskId: z4.number().optional()
287
+ taskId: z3.number().optional()
328
288
  }),
329
- z4.object({
330
- eventName: z4.literal("taskAskResponded" /* TaskAskResponded */),
289
+ z3.object({
290
+ eventName: z3.literal("taskAskResponded" /* TaskAskResponded */),
331
291
  payload: rooCodeEventsSchema.shape["taskAskResponded" /* TaskAskResponded */],
332
- taskId: z4.number().optional()
292
+ taskId: z3.number().optional()
333
293
  }),
334
294
  // Task Analytics
335
- z4.object({
336
- eventName: z4.literal("taskToolFailed" /* TaskToolFailed */),
295
+ z3.object({
296
+ eventName: z3.literal("taskToolFailed" /* TaskToolFailed */),
337
297
  payload: rooCodeEventsSchema.shape["taskToolFailed" /* TaskToolFailed */],
338
- taskId: z4.number().optional()
298
+ taskId: z3.number().optional()
339
299
  }),
340
- z4.object({
341
- eventName: z4.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
300
+ z3.object({
301
+ eventName: z3.literal("taskTokenUsageUpdated" /* TaskTokenUsageUpdated */),
342
302
  payload: rooCodeEventsSchema.shape["taskTokenUsageUpdated" /* TaskTokenUsageUpdated */],
343
- taskId: z4.number().optional()
303
+ taskId: z3.number().optional()
344
304
  }),
345
305
  // Evals
346
- z4.object({
347
- eventName: z4.literal("evalPass" /* EvalPass */),
348
- payload: z4.undefined(),
349
- taskId: z4.number()
306
+ z3.object({
307
+ eventName: z3.literal("evalPass" /* EvalPass */),
308
+ payload: z3.undefined(),
309
+ taskId: z3.number()
350
310
  }),
351
- z4.object({
352
- eventName: z4.literal("evalFail" /* EvalFail */),
353
- payload: z4.undefined(),
354
- taskId: z4.number()
311
+ z3.object({
312
+ eventName: z3.literal("evalFail" /* EvalFail */),
313
+ payload: z3.undefined(),
314
+ taskId: z3.number()
355
315
  })
356
316
  ]);
357
317
 
358
- // src/experiment.ts
359
- import { z as z5 } from "zod";
360
- var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
361
- var experimentIdsSchema = z5.enum(experimentIds);
362
- var experimentsSchema = z5.object({
363
- powerSteering: z5.boolean().optional(),
364
- multiFileApplyDiff: z5.boolean().optional(),
365
- preventFocusDisruption: z5.boolean().optional()
366
- });
367
-
368
- // src/followup.ts
369
- import { z as z6 } from "zod";
370
- var suggestionItemSchema = z6.object({
371
- answer: z6.string(),
372
- mode: z6.string().optional()
373
- });
374
- var followUpDataSchema = z6.object({
375
- question: z6.string().optional(),
376
- 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()
377
331
  });
378
332
 
379
333
  // src/global-settings.ts
380
334
  import { z as z13 } from "zod";
381
335
 
382
336
  // src/provider-settings.ts
383
- import { z as z8 } from "zod";
337
+ import { z as z7 } from "zod";
384
338
 
385
339
  // src/model.ts
386
- import { z as z7 } from "zod";
340
+ import { z as z5 } from "zod";
387
341
  var reasoningEfforts = ["low", "medium", "high"];
388
- var reasoningEffortsSchema = z7.enum(reasoningEfforts);
389
- var reasoningEffortWithMinimalSchema = z7.union([reasoningEffortsSchema, z7.literal("minimal")]);
342
+ var reasoningEffortsSchema = z5.enum(reasoningEfforts);
343
+ var reasoningEffortWithMinimalSchema = z5.union([reasoningEffortsSchema, z5.literal("minimal")]);
390
344
  var verbosityLevels = ["low", "medium", "high"];
391
- var verbosityLevelsSchema = z7.enum(verbosityLevels);
345
+ var verbosityLevelsSchema = z5.enum(verbosityLevels);
392
346
  var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
393
- var modelParametersSchema = z7.enum(modelParameters);
347
+ var modelParametersSchema = z5.enum(modelParameters);
394
348
  var isModelParameter = (value) => modelParameters.includes(value);
395
- var modelInfoSchema = z7.object({
396
- maxTokens: z7.number().nullish(),
397
- maxThinkingTokens: z7.number().nullish(),
398
- contextWindow: z7.number(),
399
- supportsImages: z7.boolean().optional(),
400
- supportsComputerUse: z7.boolean().optional(),
401
- 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(),
402
356
  // Capability flag to indicate whether the model supports an output verbosity parameter
403
- supportsVerbosity: z7.boolean().optional(),
404
- supportsReasoningBudget: z7.boolean().optional(),
405
- requiredReasoningBudget: z7.boolean().optional(),
406
- supportsReasoningEffort: z7.boolean().optional(),
407
- supportedParameters: z7.array(modelParametersSchema).optional(),
408
- inputPrice: z7.number().optional(),
409
- outputPrice: z7.number().optional(),
410
- cacheWritesPrice: z7.number().optional(),
411
- cacheReadsPrice: z7.number().optional(),
412
- description: z7.string().optional(),
357
+ supportsVerbosity: z5.boolean().optional(),
358
+ supportsReasoningBudget: z5.boolean().optional(),
359
+ // Capability flag to indicate whether the model supports temperature parameter
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(),
413
369
  reasoningEffort: reasoningEffortsSchema.optional(),
414
- minTokensPerCachePoint: z7.number().optional(),
415
- maxCachePoints: z7.number().optional(),
416
- cachableFields: z7.array(z7.string()).optional(),
417
- tiers: z7.array(
418
- z7.object({
419
- contextWindow: z7.number(),
420
- inputPrice: z7.number().optional(),
421
- outputPrice: z7.number().optional(),
422
- cacheWritesPrice: z7.number().optional(),
423
- 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()
424
380
  })
425
381
  ).optional()
426
382
  });
427
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
+
428
428
  // src/providers/anthropic.ts
429
429
  var anthropicDefaultModelId = "claude-sonnet-4-20250514";
430
430
  var anthropicModels = {
@@ -2313,7 +2313,8 @@ var openAiNativeModels = {
2313
2313
  cacheReadsPrice: 0.13,
2314
2314
  description: "GPT-5: The best model for coding and agentic tasks across domains",
2315
2315
  // supportsVerbosity is a new capability; ensure ModelInfo includes it
2316
- supportsVerbosity: true
2316
+ supportsVerbosity: true,
2317
+ supportsTemperature: false
2317
2318
  },
2318
2319
  "gpt-5-mini-2025-08-07": {
2319
2320
  maxTokens: 128e3,
@@ -2326,7 +2327,8 @@ var openAiNativeModels = {
2326
2327
  outputPrice: 2,
2327
2328
  cacheReadsPrice: 0.03,
2328
2329
  description: "GPT-5 Mini: A faster, more cost-efficient version of GPT-5 for well-defined tasks",
2329
- supportsVerbosity: true
2330
+ supportsVerbosity: true,
2331
+ supportsTemperature: false
2330
2332
  },
2331
2333
  "gpt-5-nano-2025-08-07": {
2332
2334
  maxTokens: 128e3,
@@ -2339,7 +2341,8 @@ var openAiNativeModels = {
2339
2341
  outputPrice: 0.4,
2340
2342
  cacheReadsPrice: 0.01,
2341
2343
  description: "GPT-5 Nano: Fastest, most cost-efficient version of GPT-5",
2342
- supportsVerbosity: true
2344
+ supportsVerbosity: true,
2345
+ supportsTemperature: false
2343
2346
  },
2344
2347
  "gpt-4.1": {
2345
2348
  maxTokens: 32768,
@@ -2348,7 +2351,8 @@ var openAiNativeModels = {
2348
2351
  supportsPromptCache: true,
2349
2352
  inputPrice: 2,
2350
2353
  outputPrice: 8,
2351
- cacheReadsPrice: 0.5
2354
+ cacheReadsPrice: 0.5,
2355
+ supportsTemperature: true
2352
2356
  },
2353
2357
  "gpt-4.1-mini": {
2354
2358
  maxTokens: 32768,
@@ -2357,7 +2361,8 @@ var openAiNativeModels = {
2357
2361
  supportsPromptCache: true,
2358
2362
  inputPrice: 0.4,
2359
2363
  outputPrice: 1.6,
2360
- cacheReadsPrice: 0.1
2364
+ cacheReadsPrice: 0.1,
2365
+ supportsTemperature: true
2361
2366
  },
2362
2367
  "gpt-4.1-nano": {
2363
2368
  maxTokens: 32768,
@@ -2366,7 +2371,8 @@ var openAiNativeModels = {
2366
2371
  supportsPromptCache: true,
2367
2372
  inputPrice: 0.1,
2368
2373
  outputPrice: 0.4,
2369
- cacheReadsPrice: 0.025
2374
+ cacheReadsPrice: 0.025,
2375
+ supportsTemperature: true
2370
2376
  },
2371
2377
  o3: {
2372
2378
  maxTokens: 1e5,
@@ -2377,7 +2383,8 @@ var openAiNativeModels = {
2377
2383
  outputPrice: 8,
2378
2384
  cacheReadsPrice: 0.5,
2379
2385
  supportsReasoningEffort: true,
2380
- reasoningEffort: "medium"
2386
+ reasoningEffort: "medium",
2387
+ supportsTemperature: false
2381
2388
  },
2382
2389
  "o3-high": {
2383
2390
  maxTokens: 1e5,
@@ -2387,7 +2394,8 @@ var openAiNativeModels = {
2387
2394
  inputPrice: 2,
2388
2395
  outputPrice: 8,
2389
2396
  cacheReadsPrice: 0.5,
2390
- reasoningEffort: "high"
2397
+ reasoningEffort: "high",
2398
+ supportsTemperature: false
2391
2399
  },
2392
2400
  "o3-low": {
2393
2401
  maxTokens: 1e5,
@@ -2397,7 +2405,8 @@ var openAiNativeModels = {
2397
2405
  inputPrice: 2,
2398
2406
  outputPrice: 8,
2399
2407
  cacheReadsPrice: 0.5,
2400
- reasoningEffort: "low"
2408
+ reasoningEffort: "low",
2409
+ supportsTemperature: false
2401
2410
  },
2402
2411
  "o4-mini": {
2403
2412
  maxTokens: 1e5,
@@ -2408,7 +2417,8 @@ var openAiNativeModels = {
2408
2417
  outputPrice: 4.4,
2409
2418
  cacheReadsPrice: 0.275,
2410
2419
  supportsReasoningEffort: true,
2411
- reasoningEffort: "medium"
2420
+ reasoningEffort: "medium",
2421
+ supportsTemperature: false
2412
2422
  },
2413
2423
  "o4-mini-high": {
2414
2424
  maxTokens: 1e5,
@@ -2418,7 +2428,8 @@ var openAiNativeModels = {
2418
2428
  inputPrice: 1.1,
2419
2429
  outputPrice: 4.4,
2420
2430
  cacheReadsPrice: 0.275,
2421
- reasoningEffort: "high"
2431
+ reasoningEffort: "high",
2432
+ supportsTemperature: false
2422
2433
  },
2423
2434
  "o4-mini-low": {
2424
2435
  maxTokens: 1e5,
@@ -2428,7 +2439,8 @@ var openAiNativeModels = {
2428
2439
  inputPrice: 1.1,
2429
2440
  outputPrice: 4.4,
2430
2441
  cacheReadsPrice: 0.275,
2431
- reasoningEffort: "low"
2442
+ reasoningEffort: "low",
2443
+ supportsTemperature: false
2432
2444
  },
2433
2445
  "o3-mini": {
2434
2446
  maxTokens: 1e5,
@@ -2439,7 +2451,8 @@ var openAiNativeModels = {
2439
2451
  outputPrice: 4.4,
2440
2452
  cacheReadsPrice: 0.55,
2441
2453
  supportsReasoningEffort: true,
2442
- reasoningEffort: "medium"
2454
+ reasoningEffort: "medium",
2455
+ supportsTemperature: false
2443
2456
  },
2444
2457
  "o3-mini-high": {
2445
2458
  maxTokens: 1e5,
@@ -2449,7 +2462,8 @@ var openAiNativeModels = {
2449
2462
  inputPrice: 1.1,
2450
2463
  outputPrice: 4.4,
2451
2464
  cacheReadsPrice: 0.55,
2452
- reasoningEffort: "high"
2465
+ reasoningEffort: "high",
2466
+ supportsTemperature: false
2453
2467
  },
2454
2468
  "o3-mini-low": {
2455
2469
  maxTokens: 1e5,
@@ -2459,7 +2473,8 @@ var openAiNativeModels = {
2459
2473
  inputPrice: 1.1,
2460
2474
  outputPrice: 4.4,
2461
2475
  cacheReadsPrice: 0.55,
2462
- reasoningEffort: "low"
2476
+ reasoningEffort: "low",
2477
+ supportsTemperature: false
2463
2478
  },
2464
2479
  o1: {
2465
2480
  maxTokens: 1e5,
@@ -2468,7 +2483,8 @@ var openAiNativeModels = {
2468
2483
  supportsPromptCache: true,
2469
2484
  inputPrice: 15,
2470
2485
  outputPrice: 60,
2471
- cacheReadsPrice: 7.5
2486
+ cacheReadsPrice: 7.5,
2487
+ supportsTemperature: false
2472
2488
  },
2473
2489
  "o1-preview": {
2474
2490
  maxTokens: 32768,
@@ -2477,7 +2493,8 @@ var openAiNativeModels = {
2477
2493
  supportsPromptCache: true,
2478
2494
  inputPrice: 15,
2479
2495
  outputPrice: 60,
2480
- cacheReadsPrice: 7.5
2496
+ cacheReadsPrice: 7.5,
2497
+ supportsTemperature: false
2481
2498
  },
2482
2499
  "o1-mini": {
2483
2500
  maxTokens: 65536,
@@ -2486,7 +2503,8 @@ var openAiNativeModels = {
2486
2503
  supportsPromptCache: true,
2487
2504
  inputPrice: 1.1,
2488
2505
  outputPrice: 4.4,
2489
- cacheReadsPrice: 0.55
2506
+ cacheReadsPrice: 0.55,
2507
+ supportsTemperature: false
2490
2508
  },
2491
2509
  "gpt-4o": {
2492
2510
  maxTokens: 16384,
@@ -2495,7 +2513,8 @@ var openAiNativeModels = {
2495
2513
  supportsPromptCache: true,
2496
2514
  inputPrice: 2.5,
2497
2515
  outputPrice: 10,
2498
- cacheReadsPrice: 1.25
2516
+ cacheReadsPrice: 1.25,
2517
+ supportsTemperature: true
2499
2518
  },
2500
2519
  "gpt-4o-mini": {
2501
2520
  maxTokens: 16384,
@@ -2504,7 +2523,8 @@ var openAiNativeModels = {
2504
2523
  supportsPromptCache: true,
2505
2524
  inputPrice: 0.15,
2506
2525
  outputPrice: 0.6,
2507
- cacheReadsPrice: 0.075
2526
+ cacheReadsPrice: 0.075,
2527
+ supportsTemperature: true
2508
2528
  },
2509
2529
  "codex-mini-latest": {
2510
2530
  maxTokens: 16384,
@@ -2514,6 +2534,7 @@ var openAiNativeModels = {
2514
2534
  inputPrice: 1.5,
2515
2535
  outputPrice: 6,
2516
2536
  cacheReadsPrice: 0,
2537
+ supportsTemperature: false,
2517
2538
  description: "Codex Mini: Cloud-based software engineering agent powered by codex-1, a version of o3 optimized for coding tasks. Trained with reinforcement learning to generate human-style code, adhere to instructions, and iteratively run tests."
2518
2539
  }
2519
2540
  };
@@ -3583,248 +3604,253 @@ var providerNames = [
3583
3604
  "roo",
3584
3605
  "vercel-ai-gateway"
3585
3606
  ];
3586
- var providerNamesSchema = z8.enum(providerNames);
3587
- var providerSettingsEntrySchema = z8.object({
3588
- id: z8.string(),
3589
- name: z8.string(),
3607
+ var providerNamesSchema = z7.enum(providerNames);
3608
+ var providerSettingsEntrySchema = z7.object({
3609
+ id: z7.string(),
3610
+ name: z7.string(),
3590
3611
  apiProvider: providerNamesSchema.optional(),
3591
- modelId: z8.string().optional()
3612
+ modelId: z7.string().optional()
3592
3613
  });
3593
3614
  var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
3594
- var baseProviderSettingsSchema = z8.object({
3595
- includeMaxTokens: z8.boolean().optional(),
3596
- diffEnabled: z8.boolean().optional(),
3597
- todoListEnabled: z8.boolean().optional(),
3598
- fuzzyMatchThreshold: z8.number().optional(),
3599
- modelTemperature: z8.number().nullish(),
3600
- rateLimitSeconds: z8.number().optional(),
3601
- 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(),
3602
3623
  // Model reasoning.
3603
- enableReasoningEffort: z8.boolean().optional(),
3624
+ enableReasoningEffort: z7.boolean().optional(),
3604
3625
  reasoningEffort: reasoningEffortWithMinimalSchema.optional(),
3605
- modelMaxTokens: z8.number().optional(),
3606
- modelMaxThinkingTokens: z8.number().optional(),
3626
+ modelMaxTokens: z7.number().optional(),
3627
+ modelMaxThinkingTokens: z7.number().optional(),
3607
3628
  // Model verbosity.
3608
3629
  verbosity: verbosityLevelsSchema.optional()
3609
3630
  });
3610
3631
  var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
3611
- apiModelId: z8.string().optional()
3632
+ apiModelId: z7.string().optional()
3612
3633
  });
3613
3634
  var anthropicSchema = apiModelIdProviderModelSchema.extend({
3614
- apiKey: z8.string().optional(),
3615
- anthropicBaseUrl: z8.string().optional(),
3616
- anthropicUseAuthToken: z8.boolean().optional(),
3617
- anthropicBeta1MContext: z8.boolean().optional()
3635
+ apiKey: z7.string().optional(),
3636
+ anthropicBaseUrl: z7.string().optional(),
3637
+ anthropicUseAuthToken: z7.boolean().optional(),
3638
+ anthropicBeta1MContext: z7.boolean().optional()
3618
3639
  // Enable 'context-1m-2025-08-07' beta for 1M context window
3619
3640
  });
3620
3641
  var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
3621
- claudeCodePath: z8.string().optional(),
3622
- claudeCodeMaxOutputTokens: z8.number().int().min(1).max(2e5).optional()
3642
+ claudeCodePath: z7.string().optional(),
3643
+ claudeCodeMaxOutputTokens: z7.number().int().min(1).max(2e5).optional()
3623
3644
  });
3624
3645
  var glamaSchema = baseProviderSettingsSchema.extend({
3625
- glamaModelId: z8.string().optional(),
3626
- glamaApiKey: z8.string().optional()
3646
+ glamaModelId: z7.string().optional(),
3647
+ glamaApiKey: z7.string().optional()
3627
3648
  });
3628
3649
  var openRouterSchema = baseProviderSettingsSchema.extend({
3629
- openRouterApiKey: z8.string().optional(),
3630
- openRouterModelId: z8.string().optional(),
3631
- openRouterBaseUrl: z8.string().optional(),
3632
- openRouterSpecificProvider: z8.string().optional(),
3633
- 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(),
3655
+ // Image generation settings (experimental)
3656
+ openRouterImageGenerationSettings: z7.object({
3657
+ openRouterApiKey: z7.string().optional(),
3658
+ selectedModel: z7.string().optional()
3659
+ }).optional()
3634
3660
  });
3635
3661
  var bedrockSchema = apiModelIdProviderModelSchema.extend({
3636
- awsAccessKey: z8.string().optional(),
3637
- awsSecretKey: z8.string().optional(),
3638
- awsSessionToken: z8.string().optional(),
3639
- awsRegion: z8.string().optional(),
3640
- awsUseCrossRegionInference: z8.boolean().optional(),
3641
- awsUsePromptCache: z8.boolean().optional(),
3642
- awsProfile: z8.string().optional(),
3643
- awsUseProfile: z8.boolean().optional(),
3644
- awsApiKey: z8.string().optional(),
3645
- awsUseApiKey: z8.boolean().optional(),
3646
- awsCustomArn: z8.string().optional(),
3647
- awsModelContextWindow: z8.number().optional(),
3648
- awsBedrockEndpointEnabled: z8.boolean().optional(),
3649
- awsBedrockEndpoint: z8.string().optional(),
3650
- 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()
3651
3677
  // Enable 'context-1m-2025-08-07' beta for 1M context window
3652
3678
  });
3653
3679
  var vertexSchema = apiModelIdProviderModelSchema.extend({
3654
- vertexKeyFile: z8.string().optional(),
3655
- vertexJsonCredentials: z8.string().optional(),
3656
- vertexProjectId: z8.string().optional(),
3657
- vertexRegion: z8.string().optional(),
3658
- enableUrlContext: z8.boolean().optional(),
3659
- 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()
3660
3686
  });
3661
3687
  var openAiSchema = baseProviderSettingsSchema.extend({
3662
- openAiBaseUrl: z8.string().optional(),
3663
- openAiApiKey: z8.string().optional(),
3664
- openAiLegacyFormat: z8.boolean().optional(),
3665
- openAiR1FormatEnabled: z8.boolean().optional(),
3666
- 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(),
3667
3693
  openAiCustomModelInfo: modelInfoSchema.nullish(),
3668
- openAiUseAzure: z8.boolean().optional(),
3669
- azureApiVersion: z8.string().optional(),
3670
- openAiStreamingEnabled: z8.boolean().optional(),
3671
- openAiHostHeader: z8.string().optional(),
3694
+ openAiUseAzure: z7.boolean().optional(),
3695
+ azureApiVersion: z7.string().optional(),
3696
+ openAiStreamingEnabled: z7.boolean().optional(),
3697
+ openAiHostHeader: z7.string().optional(),
3672
3698
  // Keep temporarily for backward compatibility during migration.
3673
- openAiHeaders: z8.record(z8.string(), z8.string()).optional()
3699
+ openAiHeaders: z7.record(z7.string(), z7.string()).optional()
3674
3700
  });
3675
3701
  var ollamaSchema = baseProviderSettingsSchema.extend({
3676
- ollamaModelId: z8.string().optional(),
3677
- ollamaBaseUrl: z8.string().optional()
3702
+ ollamaModelId: z7.string().optional(),
3703
+ ollamaBaseUrl: z7.string().optional()
3678
3704
  });
3679
3705
  var vsCodeLmSchema = baseProviderSettingsSchema.extend({
3680
- vsCodeLmModelSelector: z8.object({
3681
- vendor: z8.string().optional(),
3682
- family: z8.string().optional(),
3683
- version: z8.string().optional(),
3684
- 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()
3685
3711
  }).optional()
3686
3712
  });
3687
3713
  var lmStudioSchema = baseProviderSettingsSchema.extend({
3688
- lmStudioModelId: z8.string().optional(),
3689
- lmStudioBaseUrl: z8.string().optional(),
3690
- lmStudioDraftModelId: z8.string().optional(),
3691
- lmStudioSpeculativeDecodingEnabled: z8.boolean().optional()
3714
+ lmStudioModelId: z7.string().optional(),
3715
+ lmStudioBaseUrl: z7.string().optional(),
3716
+ lmStudioDraftModelId: z7.string().optional(),
3717
+ lmStudioSpeculativeDecodingEnabled: z7.boolean().optional()
3692
3718
  });
3693
3719
  var geminiSchema = apiModelIdProviderModelSchema.extend({
3694
- geminiApiKey: z8.string().optional(),
3695
- googleGeminiBaseUrl: z8.string().optional(),
3696
- enableUrlContext: z8.boolean().optional(),
3697
- enableGrounding: z8.boolean().optional()
3720
+ geminiApiKey: z7.string().optional(),
3721
+ googleGeminiBaseUrl: z7.string().optional(),
3722
+ enableUrlContext: z7.boolean().optional(),
3723
+ enableGrounding: z7.boolean().optional()
3698
3724
  });
3699
3725
  var geminiCliSchema = apiModelIdProviderModelSchema.extend({
3700
- geminiCliOAuthPath: z8.string().optional(),
3701
- geminiCliProjectId: z8.string().optional()
3726
+ geminiCliOAuthPath: z7.string().optional(),
3727
+ geminiCliProjectId: z7.string().optional()
3702
3728
  });
3703
3729
  var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
3704
- openAiNativeApiKey: z8.string().optional(),
3705
- openAiNativeBaseUrl: z8.string().optional()
3730
+ openAiNativeApiKey: z7.string().optional(),
3731
+ openAiNativeBaseUrl: z7.string().optional()
3706
3732
  });
3707
3733
  var mistralSchema = apiModelIdProviderModelSchema.extend({
3708
- mistralApiKey: z8.string().optional(),
3709
- mistralCodestralUrl: z8.string().optional()
3734
+ mistralApiKey: z7.string().optional(),
3735
+ mistralCodestralUrl: z7.string().optional()
3710
3736
  });
3711
3737
  var deepSeekSchema = apiModelIdProviderModelSchema.extend({
3712
- deepSeekBaseUrl: z8.string().optional(),
3713
- deepSeekApiKey: z8.string().optional()
3738
+ deepSeekBaseUrl: z7.string().optional(),
3739
+ deepSeekApiKey: z7.string().optional()
3714
3740
  });
3715
3741
  var doubaoSchema = apiModelIdProviderModelSchema.extend({
3716
- doubaoBaseUrl: z8.string().optional(),
3717
- doubaoApiKey: z8.string().optional()
3742
+ doubaoBaseUrl: z7.string().optional(),
3743
+ doubaoApiKey: z7.string().optional()
3718
3744
  });
3719
3745
  var moonshotSchema = apiModelIdProviderModelSchema.extend({
3720
- moonshotBaseUrl: z8.union([z8.literal("https://api.moonshot.ai/v1"), z8.literal("https://api.moonshot.cn/v1")]).optional(),
3721
- 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()
3722
3748
  });
3723
3749
  var unboundSchema = baseProviderSettingsSchema.extend({
3724
- unboundApiKey: z8.string().optional(),
3725
- unboundModelId: z8.string().optional()
3750
+ unboundApiKey: z7.string().optional(),
3751
+ unboundModelId: z7.string().optional()
3726
3752
  });
3727
3753
  var requestySchema = baseProviderSettingsSchema.extend({
3728
- requestyBaseUrl: z8.string().optional(),
3729
- requestyApiKey: z8.string().optional(),
3730
- requestyModelId: z8.string().optional()
3754
+ requestyBaseUrl: z7.string().optional(),
3755
+ requestyApiKey: z7.string().optional(),
3756
+ requestyModelId: z7.string().optional()
3731
3757
  });
3732
3758
  var humanRelaySchema = baseProviderSettingsSchema;
3733
3759
  var fakeAiSchema = baseProviderSettingsSchema.extend({
3734
- fakeAi: z8.unknown().optional()
3760
+ fakeAi: z7.unknown().optional()
3735
3761
  });
3736
3762
  var xaiSchema = apiModelIdProviderModelSchema.extend({
3737
- xaiApiKey: z8.string().optional()
3763
+ xaiApiKey: z7.string().optional()
3738
3764
  });
3739
3765
  var groqSchema = apiModelIdProviderModelSchema.extend({
3740
- groqApiKey: z8.string().optional()
3766
+ groqApiKey: z7.string().optional()
3741
3767
  });
3742
3768
  var huggingFaceSchema = baseProviderSettingsSchema.extend({
3743
- huggingFaceApiKey: z8.string().optional(),
3744
- huggingFaceModelId: z8.string().optional(),
3745
- huggingFaceInferenceProvider: z8.string().optional()
3769
+ huggingFaceApiKey: z7.string().optional(),
3770
+ huggingFaceModelId: z7.string().optional(),
3771
+ huggingFaceInferenceProvider: z7.string().optional()
3746
3772
  });
3747
3773
  var chutesSchema = apiModelIdProviderModelSchema.extend({
3748
- chutesApiKey: z8.string().optional()
3774
+ chutesApiKey: z7.string().optional()
3749
3775
  });
3750
3776
  var litellmSchema = baseProviderSettingsSchema.extend({
3751
- litellmBaseUrl: z8.string().optional(),
3752
- litellmApiKey: z8.string().optional(),
3753
- litellmModelId: z8.string().optional(),
3754
- litellmUsePromptCache: z8.boolean().optional()
3777
+ litellmBaseUrl: z7.string().optional(),
3778
+ litellmApiKey: z7.string().optional(),
3779
+ litellmModelId: z7.string().optional(),
3780
+ litellmUsePromptCache: z7.boolean().optional()
3755
3781
  });
3756
3782
  var cerebrasSchema = apiModelIdProviderModelSchema.extend({
3757
- cerebrasApiKey: z8.string().optional()
3783
+ cerebrasApiKey: z7.string().optional()
3758
3784
  });
3759
3785
  var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
3760
- sambaNovaApiKey: z8.string().optional()
3786
+ sambaNovaApiKey: z7.string().optional()
3761
3787
  });
3762
3788
  var zaiSchema = apiModelIdProviderModelSchema.extend({
3763
- zaiApiKey: z8.string().optional(),
3764
- 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()
3765
3791
  });
3766
3792
  var fireworksSchema = apiModelIdProviderModelSchema.extend({
3767
- fireworksApiKey: z8.string().optional()
3793
+ fireworksApiKey: z7.string().optional()
3768
3794
  });
3769
3795
  var featherlessSchema = apiModelIdProviderModelSchema.extend({
3770
- featherlessApiKey: z8.string().optional()
3796
+ featherlessApiKey: z7.string().optional()
3771
3797
  });
3772
3798
  var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
3773
- ioIntelligenceModelId: z8.string().optional(),
3774
- ioIntelligenceApiKey: z8.string().optional()
3799
+ ioIntelligenceModelId: z7.string().optional(),
3800
+ ioIntelligenceApiKey: z7.string().optional()
3775
3801
  });
3776
3802
  var qwenCodeSchema = apiModelIdProviderModelSchema.extend({
3777
- qwenCodeOauthPath: z8.string().optional()
3803
+ qwenCodeOauthPath: z7.string().optional()
3778
3804
  });
3779
3805
  var rooSchema = apiModelIdProviderModelSchema.extend({
3780
3806
  // No additional fields needed - uses cloud authentication
3781
3807
  });
3782
3808
  var vercelAiGatewaySchema = baseProviderSettingsSchema.extend({
3783
- vercelAiGatewayApiKey: z8.string().optional(),
3784
- vercelAiGatewayModelId: z8.string().optional()
3809
+ vercelAiGatewayApiKey: z7.string().optional(),
3810
+ vercelAiGatewayModelId: z7.string().optional()
3785
3811
  });
3786
- var defaultSchema = z8.object({
3787
- apiProvider: z8.undefined()
3812
+ var defaultSchema = z7.object({
3813
+ apiProvider: z7.undefined()
3788
3814
  });
3789
- var providerSettingsSchemaDiscriminated = z8.discriminatedUnion("apiProvider", [
3790
- anthropicSchema.merge(z8.object({ apiProvider: z8.literal("anthropic") })),
3791
- claudeCodeSchema.merge(z8.object({ apiProvider: z8.literal("claude-code") })),
3792
- glamaSchema.merge(z8.object({ apiProvider: z8.literal("glama") })),
3793
- openRouterSchema.merge(z8.object({ apiProvider: z8.literal("openrouter") })),
3794
- bedrockSchema.merge(z8.object({ apiProvider: z8.literal("bedrock") })),
3795
- vertexSchema.merge(z8.object({ apiProvider: z8.literal("vertex") })),
3796
- openAiSchema.merge(z8.object({ apiProvider: z8.literal("openai") })),
3797
- ollamaSchema.merge(z8.object({ apiProvider: z8.literal("ollama") })),
3798
- vsCodeLmSchema.merge(z8.object({ apiProvider: z8.literal("vscode-lm") })),
3799
- lmStudioSchema.merge(z8.object({ apiProvider: z8.literal("lmstudio") })),
3800
- geminiSchema.merge(z8.object({ apiProvider: z8.literal("gemini") })),
3801
- geminiCliSchema.merge(z8.object({ apiProvider: z8.literal("gemini-cli") })),
3802
- openAiNativeSchema.merge(z8.object({ apiProvider: z8.literal("openai-native") })),
3803
- mistralSchema.merge(z8.object({ apiProvider: z8.literal("mistral") })),
3804
- deepSeekSchema.merge(z8.object({ apiProvider: z8.literal("deepseek") })),
3805
- doubaoSchema.merge(z8.object({ apiProvider: z8.literal("doubao") })),
3806
- moonshotSchema.merge(z8.object({ apiProvider: z8.literal("moonshot") })),
3807
- unboundSchema.merge(z8.object({ apiProvider: z8.literal("unbound") })),
3808
- requestySchema.merge(z8.object({ apiProvider: z8.literal("requesty") })),
3809
- humanRelaySchema.merge(z8.object({ apiProvider: z8.literal("human-relay") })),
3810
- fakeAiSchema.merge(z8.object({ apiProvider: z8.literal("fake-ai") })),
3811
- xaiSchema.merge(z8.object({ apiProvider: z8.literal("xai") })),
3812
- groqSchema.merge(z8.object({ apiProvider: z8.literal("groq") })),
3813
- huggingFaceSchema.merge(z8.object({ apiProvider: z8.literal("huggingface") })),
3814
- chutesSchema.merge(z8.object({ apiProvider: z8.literal("chutes") })),
3815
- litellmSchema.merge(z8.object({ apiProvider: z8.literal("litellm") })),
3816
- cerebrasSchema.merge(z8.object({ apiProvider: z8.literal("cerebras") })),
3817
- sambaNovaSchema.merge(z8.object({ apiProvider: z8.literal("sambanova") })),
3818
- zaiSchema.merge(z8.object({ apiProvider: z8.literal("zai") })),
3819
- fireworksSchema.merge(z8.object({ apiProvider: z8.literal("fireworks") })),
3820
- featherlessSchema.merge(z8.object({ apiProvider: z8.literal("featherless") })),
3821
- ioIntelligenceSchema.merge(z8.object({ apiProvider: z8.literal("io-intelligence") })),
3822
- qwenCodeSchema.merge(z8.object({ apiProvider: z8.literal("qwen-code") })),
3823
- rooSchema.merge(z8.object({ apiProvider: z8.literal("roo") })),
3824
- 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") })),
3825
3851
  defaultSchema
3826
3852
  ]);
3827
- var providerSettingsSchema = z8.object({
3853
+ var providerSettingsSchema = z7.object({
3828
3854
  apiProvider: providerNamesSchema.optional(),
3829
3855
  ...anthropicSchema.shape,
3830
3856
  ...claudeCodeSchema.shape,
@@ -3863,9 +3889,9 @@ var providerSettingsSchema = z8.object({
3863
3889
  ...vercelAiGatewaySchema.shape,
3864
3890
  ...codebaseIndexProviderSchema.shape
3865
3891
  });
3866
- var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z8.string().optional() });
3892
+ var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: z7.string().optional() });
3867
3893
  var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
3868
- z8.object({ id: z8.string().optional() })
3894
+ z7.object({ id: z7.string().optional() })
3869
3895
  );
3870
3896
  var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
3871
3897
  var MODEL_ID_KEYS = [
@@ -4004,20 +4030,36 @@ var dynamicProviders = [
4004
4030
  var isDynamicProvider = (key) => dynamicProviders.includes(key);
4005
4031
 
4006
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
4007
4050
  import { z as z9 } from "zod";
4008
- var historyItemSchema = z9.object({
4009
- id: z9.string(),
4010
- number: z9.number(),
4011
- ts: z9.number(),
4012
- task: z9.string(),
4013
- tokensIn: z9.number(),
4014
- tokensOut: z9.number(),
4015
- cacheWrites: z9.number().optional(),
4016
- cacheReads: z9.number().optional(),
4017
- totalCost: z9.number(),
4018
- size: z9.number().optional(),
4019
- workspace: z9.string().optional(),
4020
- 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()
4021
4063
  });
4022
4064
 
4023
4065
  // src/telemetry.ts
@@ -4547,8 +4589,376 @@ var EVALS_SETTINGS = {
4547
4589
  };
4548
4590
  var EVALS_TIMEOUT = 5 * 60 * 1e3;
4549
4591
 
4550
- // src/ipc.ts
4592
+ // src/marketplace.ts
4551
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";
4552
4962
  var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
4553
4963
  IpcMessageType2["Connect"] = "Connect";
4554
4964
  IpcMessageType2["Disconnect"] = "Disconnect";
@@ -4562,10 +4972,10 @@ var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
4562
4972
  IpcOrigin2["Server"] = "server";
4563
4973
  return IpcOrigin2;
4564
4974
  })(IpcOrigin || {});
4565
- var ackSchema = z14.object({
4566
- clientId: z14.string(),
4567
- pid: z14.number(),
4568
- ppid: z14.number()
4975
+ var ackSchema = z17.object({
4976
+ clientId: z17.string(),
4977
+ pid: z17.number(),
4978
+ ppid: z17.number()
4569
4979
  });
4570
4980
  var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
4571
4981
  TaskCommandName2["StartNewTask"] = "StartNewTask";
@@ -4574,122 +4984,72 @@ var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
4574
4984
  TaskCommandName2["ResumeTask"] = "ResumeTask";
4575
4985
  return TaskCommandName2;
4576
4986
  })(TaskCommandName || {});
4577
- var taskCommandSchema = z14.discriminatedUnion("commandName", [
4578
- z14.object({
4579
- commandName: z14.literal("StartNewTask" /* StartNewTask */),
4580
- data: z14.object({
4987
+ var taskCommandSchema = z17.discriminatedUnion("commandName", [
4988
+ z17.object({
4989
+ commandName: z17.literal("StartNewTask" /* StartNewTask */),
4990
+ data: z17.object({
4581
4991
  configuration: rooCodeSettingsSchema,
4582
- text: z14.string(),
4583
- images: z14.array(z14.string()).optional(),
4584
- newTab: z14.boolean().optional()
4992
+ text: z17.string(),
4993
+ images: z17.array(z17.string()).optional(),
4994
+ newTab: z17.boolean().optional()
4585
4995
  })
4586
4996
  }),
4587
- z14.object({
4588
- commandName: z14.literal("CancelTask" /* CancelTask */),
4589
- data: z14.string()
4997
+ z17.object({
4998
+ commandName: z17.literal("CancelTask" /* CancelTask */),
4999
+ data: z17.string()
4590
5000
  }),
4591
- z14.object({
4592
- commandName: z14.literal("CloseTask" /* CloseTask */),
4593
- data: z14.string()
5001
+ z17.object({
5002
+ commandName: z17.literal("CloseTask" /* CloseTask */),
5003
+ data: z17.string()
4594
5004
  }),
4595
- z14.object({
4596
- commandName: z14.literal("ResumeTask" /* ResumeTask */),
4597
- data: z14.string()
5005
+ z17.object({
5006
+ commandName: z17.literal("ResumeTask" /* ResumeTask */),
5007
+ data: z17.string()
4598
5008
  })
4599
5009
  ]);
4600
- var ipcMessageSchema = z14.discriminatedUnion("type", [
4601
- z14.object({
4602
- type: z14.literal("Ack" /* Ack */),
4603
- 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 */),
4604
5014
  data: ackSchema
4605
5015
  }),
4606
- z14.object({
4607
- type: z14.literal("TaskCommand" /* TaskCommand */),
4608
- origin: z14.literal("client" /* Client */),
4609
- clientId: z14.string(),
5016
+ z17.object({
5017
+ type: z17.literal("TaskCommand" /* TaskCommand */),
5018
+ origin: z17.literal("client" /* Client */),
5019
+ clientId: z17.string(),
4610
5020
  data: taskCommandSchema
4611
5021
  }),
4612
- z14.object({
4613
- type: z14.literal("TaskEvent" /* TaskEvent */),
4614
- origin: z14.literal("server" /* Server */),
4615
- relayClientId: z14.string().optional(),
5022
+ z17.object({
5023
+ type: z17.literal("TaskEvent" /* TaskEvent */),
5024
+ origin: z17.literal("server" /* Server */),
5025
+ relayClientId: z17.string().optional(),
4616
5026
  data: taskEventSchema
4617
5027
  })
4618
5028
  ]);
4619
5029
 
4620
- // src/marketplace.ts
4621
- import { z as z15 } from "zod";
4622
- var mcpParameterSchema = z15.object({
4623
- name: z15.string().min(1),
4624
- key: z15.string().min(1),
4625
- placeholder: z15.string().optional(),
4626
- optional: z15.boolean().optional().default(false)
4627
- });
4628
- var mcpInstallationMethodSchema = z15.object({
4629
- name: z15.string().min(1),
4630
- content: z15.string().min(1),
4631
- parameters: z15.array(mcpParameterSchema).optional(),
4632
- prerequisites: z15.array(z15.string()).optional()
4633
- });
4634
- var marketplaceItemTypeSchema = z15.enum(["mode", "mcp"]);
4635
- var baseMarketplaceItemSchema = z15.object({
4636
- id: z15.string().min(1),
4637
- name: z15.string().min(1, "Name is required"),
4638
- description: z15.string(),
4639
- author: z15.string().optional(),
4640
- authorUrl: z15.string().url("Author URL must be a valid URL").optional(),
4641
- tags: z15.array(z15.string()).optional(),
4642
- prerequisites: z15.array(z15.string()).optional()
4643
- });
4644
- var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4645
- content: z15.string().min(1)
4646
- // YAML content for modes
4647
- });
4648
- var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
4649
- url: z15.string().url(),
4650
- // Required url field
4651
- content: z15.union([z15.string().min(1), z15.array(mcpInstallationMethodSchema)]),
4652
- // Single config or array of methods
4653
- parameters: z15.array(mcpParameterSchema).optional()
4654
- });
4655
- var marketplaceItemSchema = z15.discriminatedUnion("type", [
4656
- // Mode marketplace item
4657
- modeMarketplaceItemSchema.extend({
4658
- type: z15.literal("mode")
4659
- }),
4660
- // MCP marketplace item
4661
- mcpMarketplaceItemSchema.extend({
4662
- type: z15.literal("mcp")
4663
- })
4664
- ]);
4665
- var installMarketplaceItemOptionsSchema = z15.object({
4666
- target: z15.enum(["global", "project"]).optional().default("project"),
4667
- parameters: z15.record(z15.string(), z15.any()).optional()
4668
- });
4669
-
4670
5030
  // src/mcp.ts
4671
- import { z as z16 } from "zod";
4672
- var mcpExecutionStatusSchema = z16.discriminatedUnion("status", [
4673
- z16.object({
4674
- executionId: z16.string(),
4675
- status: z16.literal("started"),
4676
- serverName: z16.string(),
4677
- 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()
4678
5038
  }),
4679
- z16.object({
4680
- executionId: z16.string(),
4681
- status: z16.literal("output"),
4682
- response: z16.string()
5039
+ z18.object({
5040
+ executionId: z18.string(),
5041
+ status: z18.literal("output"),
5042
+ response: z18.string()
4683
5043
  }),
4684
- z16.object({
4685
- executionId: z16.string(),
4686
- status: z16.literal("completed"),
4687
- response: z16.string().optional()
5044
+ z18.object({
5045
+ executionId: z18.string(),
5046
+ status: z18.literal("completed"),
5047
+ response: z18.string().optional()
4688
5048
  }),
4689
- z16.object({
4690
- executionId: z16.string(),
4691
- status: z16.literal("error"),
4692
- error: z16.string().optional()
5049
+ z18.object({
5050
+ executionId: z18.string(),
5051
+ status: z18.literal("error"),
5052
+ error: z18.string().optional()
4693
5053
  })
4694
5054
  ]);
4695
5055
 
@@ -4698,56 +5058,41 @@ function shouldUseSingleFileRead(modelId) {
4698
5058
  return modelId.includes("grok-code-fast-1");
4699
5059
  }
4700
5060
 
4701
- // src/task.ts
4702
- import { z as z17 } from "zod";
4703
- var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
4704
- TaskStatus2["Running"] = "running";
4705
- TaskStatus2["Interactive"] = "interactive";
4706
- TaskStatus2["Resumable"] = "resumable";
4707
- TaskStatus2["Idle"] = "idle";
4708
- TaskStatus2["None"] = "none";
4709
- return TaskStatus2;
4710
- })(TaskStatus || {});
4711
- var taskMetadataSchema = z17.object({
4712
- task: z17.string().optional(),
4713
- images: z17.array(z17.string()).optional()
4714
- });
4715
-
4716
5061
  // src/todo.ts
4717
- import { z as z18 } from "zod";
4718
- var todoStatusSchema = z18.enum(["pending", "in_progress", "completed"]);
4719
- var todoItemSchema = z18.object({
4720
- id: z18.string(),
4721
- 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(),
4722
5067
  status: todoStatusSchema
4723
5068
  });
4724
5069
 
4725
5070
  // src/terminal.ts
4726
- import { z as z19 } from "zod";
4727
- var commandExecutionStatusSchema = z19.discriminatedUnion("status", [
4728
- z19.object({
4729
- executionId: z19.string(),
4730
- status: z19.literal("started"),
4731
- pid: z19.number().optional(),
4732
- 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()
4733
5078
  }),
4734
- z19.object({
4735
- executionId: z19.string(),
4736
- status: z19.literal("output"),
4737
- output: z19.string()
5079
+ z20.object({
5080
+ executionId: z20.string(),
5081
+ status: z20.literal("output"),
5082
+ output: z20.string()
4738
5083
  }),
4739
- z19.object({
4740
- executionId: z19.string(),
4741
- status: z19.literal("exited"),
4742
- exitCode: z19.number().optional()
5084
+ z20.object({
5085
+ executionId: z20.string(),
5086
+ status: z20.literal("exited"),
5087
+ exitCode: z20.number().optional()
4743
5088
  }),
4744
- z19.object({
4745
- executionId: z19.string(),
4746
- status: z19.literal("fallback")
5089
+ z20.object({
5090
+ executionId: z20.string(),
5091
+ status: z20.literal("fallback")
4747
5092
  }),
4748
- z19.object({
4749
- executionId: z19.string(),
4750
- status: z19.literal("timeout")
5093
+ z20.object({
5094
+ executionId: z20.string(),
5095
+ status: z20.literal("timeout")
4751
5096
  })
4752
5097
  ]);
4753
5098
  export {
@@ -4761,6 +5106,7 @@ export {
4761
5106
  BEDROCK_REGIONS,
4762
5107
  CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS,
4763
5108
  CODEBASE_INDEX_DEFAULTS,
5109
+ ConnectionState,
4764
5110
  DEEP_SEEK_DEFAULT_TEMPERATURE,
4765
5111
  DEFAULT_CONSECUTIVE_MISTAKE_LIMIT,
4766
5112
  DEFAULT_MODES,
@@ -4770,10 +5116,14 @@ export {
4770
5116
  DOUBAO_API_CHAT_PATH,
4771
5117
  EVALS_SETTINGS,
4772
5118
  EVALS_TIMEOUT,
5119
+ ExtensionBridgeCommandName,
5120
+ ExtensionBridgeEventName,
5121
+ ExtensionSocketEvents,
4773
5122
  GLAMA_DEFAULT_TEMPERATURE,
4774
5123
  GLOBAL_SETTINGS_KEYS,
4775
5124
  GLOBAL_STATE_KEYS,
4776
5125
  GPT5_DEFAULT_TEMPERATURE,
5126
+ HEARTBEAT_INTERVAL_MS,
4777
5127
  HUGGINGFACE_API_URL,
4778
5128
  HUGGINGFACE_CACHE_DURATION,
4779
5129
  HUGGINGFACE_DEFAULT_CONTEXT_WINDOW,
@@ -4782,6 +5132,7 @@ export {
4782
5132
  HUGGINGFACE_SLIDER_MIN,
4783
5133
  HUGGINGFACE_SLIDER_STEP,
4784
5134
  HUGGINGFACE_TEMPERATURE_MAX_VALUE,
5135
+ INSTANCE_TTL_SECONDS,
4785
5136
  IO_INTELLIGENCE_CACHE_DURATION,
4786
5137
  IpcMessageType,
4787
5138
  IpcOrigin,
@@ -4798,10 +5149,15 @@ export {
4798
5149
  OPEN_ROUTER_PROMPT_CACHING_MODELS,
4799
5150
  OPEN_ROUTER_REASONING_BUDGET_MODELS,
4800
5151
  OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS,
5152
+ ORGANIZATION_ALLOW_ALL,
5153
+ ORGANIZATION_DEFAULT,
4801
5154
  PROVIDER_SETTINGS_KEYS,
4802
5155
  RooCodeEventName,
4803
5156
  SECRET_STATE_KEYS,
5157
+ TaskBridgeCommandName,
5158
+ TaskBridgeEventName,
4804
5159
  TaskCommandName,
5160
+ TaskSocketEvents,
4805
5161
  TaskStatus,
4806
5162
  TelemetryEventName,
4807
5163
  VERCEL_AI_GATEWAY_DEFAULT_TEMPERATURE,
@@ -4852,6 +5208,9 @@ export {
4852
5208
  experimentIds,
4853
5209
  experimentIdsSchema,
4854
5210
  experimentsSchema,
5211
+ extensionBridgeCommandSchema,
5212
+ extensionBridgeEventSchema,
5213
+ extensionInstanceSchema,
4855
5214
  featherlessDefaultModelId,
4856
5215
  featherlessModels,
4857
5216
  fireworksDefaultModelId,
@@ -4918,6 +5277,10 @@ export {
4918
5277
  openAiNativeModels,
4919
5278
  openRouterDefaultModelId,
4920
5279
  openRouterDefaultModelInfo,
5280
+ organizationAllowListSchema,
5281
+ organizationCloudSettingsSchema,
5282
+ organizationDefaultSettingsSchema,
5283
+ organizationSettingsSchema,
4921
5284
  promptComponentSchema,
4922
5285
  providerNames,
4923
5286
  providerNamesSchema,
@@ -4940,9 +5303,12 @@ export {
4940
5303
  rooModels,
4941
5304
  sambaNovaDefaultModelId,
4942
5305
  sambaNovaModels,
5306
+ shareResponseSchema,
4943
5307
  shouldUseSingleFileRead,
4944
5308
  staticAppPropertiesSchema,
4945
5309
  suggestionItemSchema,
5310
+ taskBridgeCommandSchema,
5311
+ taskBridgeEventSchema,
4946
5312
  taskCommandSchema,
4947
5313
  taskEventSchema,
4948
5314
  taskMetadataSchema,
@@ -4962,6 +5328,9 @@ export {
4962
5328
  toolUsageSchema,
4963
5329
  unboundDefaultModelId,
4964
5330
  unboundDefaultModelInfo,
5331
+ userFeaturesSchema,
5332
+ userSettingsConfigSchema,
5333
+ userSettingsDataSchema,
4965
5334
  verbosityLevels,
4966
5335
  verbosityLevelsSchema,
4967
5336
  vercelAiGatewayDefaultModelId,