Skip to content

Commit c5eb171

Browse files
committed
Sync evals types
1 parent b51abf7 commit c5eb171

File tree

5 files changed

+540
-222
lines changed

5 files changed

+540
-222
lines changed

evals/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"drizzle:studio": "pnpm --filter @evals/db db:studio"
1414
},
1515
"devDependencies": {
16-
"@dotenvx/dotenvx": "^1.39.1",
17-
"@eslint/js": "^9.24.0",
18-
"eslint": "^9.24.0",
16+
"@dotenvx/dotenvx": "^1.41.0",
17+
"@eslint/js": "^9.25.1",
18+
"eslint": "^9.25.1",
1919
"globals": "^16.0.0",
2020
"prettier": "^3.5.3",
21-
"tsx": "^4.19.3",
22-
"turbo": "^2.5.0",
21+
"tsx": "^4.19.4",
22+
"turbo": "^2.5.2",
2323
"typescript": "^5.8.3",
24-
"typescript-eslint": "^8.29.1"
24+
"typescript-eslint": "^8.31.1"
2525
}
2626
}

evals/packages/types/src/roo-code-defaults.ts

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ export const rooCodeDefaults: RooCodeSettings = {
44
apiProvider: "openrouter",
55
openRouterUseMiddleOutTransform: false,
66

7-
// modelTemperature: null,
8-
// reasoningEffort: "high",
9-
rateLimitSeconds: 0,
10-
11-
pinnedApiConfigs: {},
12-
lastShownAnnouncementId: "apr-18-2025-3-13",
7+
lastShownAnnouncementId: "apr-30-2025-3-15",
138

149
autoApprovalEnabled: true,
1510
alwaysAllowReadOnly: true,
@@ -27,43 +22,17 @@ export const rooCodeDefaults: RooCodeSettings = {
2722
allowedCommands: ["*"],
2823

2924
browserToolEnabled: false,
30-
browserViewportSize: "900x600",
31-
screenshotQuality: 75,
32-
remoteBrowserEnabled: false,
3325

3426
enableCheckpoints: false,
35-
checkpointStorage: "task",
36-
37-
ttsEnabled: false,
38-
ttsSpeed: 1,
39-
soundEnabled: false,
40-
soundVolume: 0.5,
4127

4228
maxOpenTabsContext: 20,
4329
maxWorkspaceFiles: 200,
4430
showRooIgnoredFiles: true,
4531
maxReadFileLine: 500,
4632

47-
terminalOutputLineLimit: 500,
48-
terminalShellIntegrationTimeout: 30000,
49-
terminalCommandDelay: 0,
50-
terminalPowershellCounter: false,
51-
terminalZshClearEolMark: true,
52-
terminalZshOhMy: true,
53-
terminalZshP10k: false,
54-
terminalZdotdir: true,
55-
56-
diffEnabled: true,
57-
fuzzyMatchThreshold: 1.0,
58-
experiments: {
59-
powerSteering: false,
60-
},
61-
62-
language: "en",
63-
64-
telemetrySetting: "enabled",
33+
terminalShellIntegrationDisabled: true,
6534

6635
mcpEnabled: false,
36+
6737
mode: "code",
68-
customModes: [],
6938
}

evals/packages/types/src/roo-code.ts

Lines changed: 86 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export const providerNames = [
1818
"lmstudio",
1919
"gemini",
2020
"openai-native",
21-
"xai",
2221
"mistral",
2322
"deepseek",
2423
"unbound",
2524
"requesty",
2625
"human-relay",
2726
"fake-ai",
27+
"xai",
2828
] as const
2929

3030
export const providerNamesSchema = z.enum(providerNames)
@@ -41,19 +41,6 @@ export const toolGroupsSchema = z.enum(toolGroups)
4141

4242
export type ToolGroup = z.infer<typeof toolGroupsSchema>
4343

44-
/**
45-
* CheckpointStorage
46-
*/
47-
48-
export const checkpointStorages = ["task", "workspace"] as const
49-
50-
export const checkpointStoragesSchema = z.enum(checkpointStorages)
51-
52-
export type CheckpointStorage = z.infer<typeof checkpointStoragesSchema>
53-
54-
export const isCheckpointStorage = (value: string): value is CheckpointStorage =>
55-
checkpointStorages.includes(value as CheckpointStorage)
56-
5744
/**
5845
* Language
5946
*/
@@ -93,23 +80,49 @@ export const telemetrySettingsSchema = z.enum(telemetrySettings)
9380

9481
export type TelemetrySetting = z.infer<typeof telemetrySettingsSchema>
9582

83+
/**
84+
* ReasoningEffort
85+
*/
86+
87+
export const reasoningEfforts = ["low", "medium", "high"] as const
88+
89+
export const reasoningEffortsSchema = z.enum(reasoningEfforts)
90+
91+
export type ReasoningEffort = z.infer<typeof reasoningEffortsSchema>
92+
9693
/**
9794
* ModelInfo
9895
*/
9996

10097
export const modelInfoSchema = z.object({
10198
maxTokens: z.number().nullish(),
99+
maxThinkingTokens: z.number().nullish(),
102100
contextWindow: z.number(),
103101
supportsImages: z.boolean().optional(),
104102
supportsComputerUse: z.boolean().optional(),
105103
supportsPromptCache: z.boolean(),
104+
isPromptCacheOptional: z.boolean().optional(),
106105
inputPrice: z.number().optional(),
107106
outputPrice: z.number().optional(),
108107
cacheWritesPrice: z.number().optional(),
109108
cacheReadsPrice: z.number().optional(),
110109
description: z.string().optional(),
111-
reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
110+
reasoningEffort: reasoningEffortsSchema.optional(),
112111
thinking: z.boolean().optional(),
112+
minTokensPerCachePoint: z.number().optional(),
113+
maxCachePoints: z.number().optional(),
114+
cachableFields: z.array(z.string()).optional(),
115+
tiers: z
116+
.array(
117+
z.object({
118+
contextWindow: z.number(),
119+
inputPrice: z.number().optional(),
120+
outputPrice: z.number().optional(),
121+
cacheWritesPrice: z.number().optional(),
122+
cacheReadsPrice: z.number().optional(),
123+
}),
124+
)
125+
.optional(),
113126
})
114127

115128
export type ModelInfo = z.infer<typeof modelInfoSchema>
@@ -141,6 +154,7 @@ export const historyItemSchema = z.object({
141154
cacheReads: z.number().optional(),
142155
totalCost: z.number(),
143156
size: z.number().optional(),
157+
workspace: z.string().optional(),
144158
})
145159

146160
export type HistoryItem = z.infer<typeof historyItemSchema>
@@ -268,6 +282,29 @@ export const customSupportPromptsSchema = z.record(z.string(), z.string().option
268282

269283
export type CustomSupportPrompts = z.infer<typeof customSupportPromptsSchema>
270284

285+
/**
286+
* CommandExecutionStatus
287+
*/
288+
289+
export const commandExecutionStatusSchema = z.discriminatedUnion("status", [
290+
z.object({
291+
executionId: z.string(),
292+
status: z.literal("running"),
293+
pid: z.number().optional(),
294+
}),
295+
z.object({
296+
executionId: z.string(),
297+
status: z.literal("exited"),
298+
exitCode: z.number().optional(),
299+
}),
300+
z.object({
301+
executionId: z.string(),
302+
status: z.literal("fallback"),
303+
}),
304+
])
305+
306+
export type CommandExecutionStatus = z.infer<typeof commandExecutionStatusSchema>
307+
271308
/**
272309
* ExperimentId
273310
*/
@@ -330,12 +367,15 @@ export const providerSettingsSchema = z.object({
330367
// OpenAI
331368
openAiBaseUrl: z.string().optional(),
332369
openAiApiKey: z.string().optional(),
370+
openAiHostHeader: z.string().optional(),
371+
openAiLegacyFormat: z.boolean().optional(),
333372
openAiR1FormatEnabled: z.boolean().optional(),
334373
openAiModelId: z.string().optional(),
335-
openAiCustomModelInfo: modelInfoSchema.optional(),
374+
openAiCustomModelInfo: modelInfoSchema.nullish(),
336375
openAiUseAzure: z.boolean().optional(),
337376
azureApiVersion: z.string().optional(),
338377
openAiStreamingEnabled: z.boolean().optional(),
378+
enableReasoningEffort: z.boolean().optional(),
339379
// Ollama
340380
ollamaModelId: z.string().optional(),
341381
ollamaBaseUrl: z.string().optional(),
@@ -358,8 +398,6 @@ export const providerSettingsSchema = z.object({
358398
googleGeminiBaseUrl: z.string().optional(),
359399
// OpenAI Native
360400
openAiNativeApiKey: z.string().optional(),
361-
// XAI
362-
xaiApiKey: z.string().optional(),
363401
// Mistral
364402
mistralApiKey: z.string().optional(),
365403
mistralCodestralUrl: z.string().optional(),
@@ -372,13 +410,18 @@ export const providerSettingsSchema = z.object({
372410
// Requesty
373411
requestyApiKey: z.string().optional(),
374412
requestyModelId: z.string().optional(),
413+
// X.AI (Grok)
414+
xaiApiKey: z.string().optional(),
375415
// Claude 3.7 Sonnet Thinking
376-
modelMaxTokens: z.number().optional(), // Currently only used by Anthropic hybrid thinking models.
377-
modelMaxThinkingTokens: z.number().optional(), // Currently only used by Anthropic hybrid thinking models.
416+
modelMaxTokens: z.number().optional(),
417+
modelMaxThinkingTokens: z.number().optional(),
378418
// Generic
379419
includeMaxTokens: z.boolean().optional(),
420+
reasoningEffort: reasoningEffortsSchema.optional(),
421+
promptCachingEnabled: z.boolean().optional(),
422+
diffEnabled: z.boolean().optional(),
423+
fuzzyMatchThreshold: z.number().optional(),
380424
modelTemperature: z.number().nullish(),
381-
reasoningEffort: z.enum(["low", "medium", "high"]).optional(),
382425
rateLimitSeconds: z.number().optional(),
383426
// Fake AI
384427
fakeAi: z.unknown().optional(),
@@ -423,14 +466,15 @@ const providerSettingsRecord: ProviderSettingsRecord = {
423466
// OpenAI
424467
openAiBaseUrl: undefined,
425468
openAiApiKey: undefined,
469+
openAiHostHeader: undefined,
470+
openAiLegacyFormat: undefined,
426471
openAiR1FormatEnabled: undefined,
427472
openAiModelId: undefined,
428473
openAiCustomModelInfo: undefined,
429474
openAiUseAzure: undefined,
430475
azureApiVersion: undefined,
431476
openAiStreamingEnabled: undefined,
432-
// xAI
433-
xaiApiKey: undefined,
477+
enableReasoningEffort: undefined,
434478
// Ollama
435479
ollamaModelId: undefined,
436480
ollamaBaseUrl: undefined,
@@ -462,11 +506,16 @@ const providerSettingsRecord: ProviderSettingsRecord = {
462506
modelMaxThinkingTokens: undefined,
463507
// Generic
464508
includeMaxTokens: undefined,
465-
modelTemperature: undefined,
466509
reasoningEffort: undefined,
510+
promptCachingEnabled: undefined,
511+
diffEnabled: undefined,
512+
fuzzyMatchThreshold: undefined,
513+
modelTemperature: undefined,
467514
rateLimitSeconds: undefined,
468515
// Fake AI
469516
fakeAi: undefined,
517+
// X.AI (Grok)
518+
xaiApiKey: undefined,
470519
}
471520

472521
export const PROVIDER_SETTINGS_KEYS = Object.keys(providerSettingsRecord) as Keys<ProviderSettings>[]
@@ -504,9 +553,9 @@ export const globalSettingsSchema = z.object({
504553
screenshotQuality: z.number().optional(),
505554
remoteBrowserEnabled: z.boolean().optional(),
506555
remoteBrowserHost: z.string().optional(),
556+
cachedChromeHostUrl: z.string().optional(),
507557

508558
enableCheckpoints: z.boolean().optional(),
509-
checkpointStorage: checkpointStoragesSchema.optional(),
510559

511560
ttsEnabled: z.boolean().optional(),
512561
ttsSpeed: z.number().optional(),
@@ -520,13 +569,16 @@ export const globalSettingsSchema = z.object({
520569

521570
terminalOutputLineLimit: z.number().optional(),
522571
terminalShellIntegrationTimeout: z.number().optional(),
572+
terminalShellIntegrationDisabled: z.boolean().optional(),
523573
terminalCommandDelay: z.number().optional(),
524574
terminalPowershellCounter: z.boolean().optional(),
525575
terminalZshClearEolMark: z.boolean().optional(),
526576
terminalZshOhMy: z.boolean().optional(),
527577
terminalZshP10k: z.boolean().optional(),
528578
terminalZdotdir: z.boolean().optional(),
579+
terminalCompressProgressBar: z.boolean().optional(),
529580

581+
rateLimitSeconds: z.number().optional(),
530582
diffEnabled: z.boolean().optional(),
531583
fuzzyMatchThreshold: z.number().optional(),
532584
experiments: experimentsSchema.optional(),
@@ -544,6 +596,7 @@ export const globalSettingsSchema = z.object({
544596
customModePrompts: customModePromptsSchema.optional(),
545597
customSupportPrompts: customSupportPromptsSchema.optional(),
546598
enhancementApiConfigId: z.string().optional(),
599+
historyPreviewCollapsed: z.boolean().optional(),
547600
})
548601

549602
export type GlobalSettings = z.infer<typeof globalSettingsSchema>
@@ -581,7 +634,6 @@ const globalSettingsRecord: GlobalSettingsRecord = {
581634
remoteBrowserHost: undefined,
582635

583636
enableCheckpoints: undefined,
584-
checkpointStorage: undefined,
585637

586638
ttsEnabled: undefined,
587639
ttsSpeed: undefined,
@@ -595,13 +647,16 @@ const globalSettingsRecord: GlobalSettingsRecord = {
595647

596648
terminalOutputLineLimit: undefined,
597649
terminalShellIntegrationTimeout: undefined,
650+
terminalShellIntegrationDisabled: undefined,
598651
terminalCommandDelay: undefined,
599652
terminalPowershellCounter: undefined,
600653
terminalZshClearEolMark: undefined,
601654
terminalZshOhMy: undefined,
602655
terminalZshP10k: undefined,
603656
terminalZdotdir: undefined,
657+
terminalCompressProgressBar: undefined,
604658

659+
rateLimitSeconds: undefined,
605660
diffEnabled: undefined,
606661
fuzzyMatchThreshold: undefined,
607662
experiments: undefined,
@@ -619,6 +674,8 @@ const globalSettingsRecord: GlobalSettingsRecord = {
619674
customModePrompts: undefined,
620675
customSupportPrompts: undefined,
621676
enhancementApiConfigId: undefined,
677+
cachedChromeHostUrl: undefined,
678+
historyPreviewCollapsed: undefined,
622679
}
623680

624681
export const GLOBAL_SETTINGS_KEYS = Object.keys(globalSettingsRecord) as Keys<GlobalSettings>[]
@@ -652,6 +709,7 @@ export type SecretState = Pick<
652709
| "mistralApiKey"
653710
| "unboundApiKey"
654711
| "requestyApiKey"
712+
| "xaiApiKey"
655713
>
656714

657715
type SecretStateRecord = Record<Keys<SecretState>, undefined>
@@ -670,6 +728,7 @@ const secretStateRecord: SecretStateRecord = {
670728
mistralApiKey: undefined,
671729
unboundApiKey: undefined,
672730
requestyApiKey: undefined,
731+
xaiApiKey: undefined,
673732
}
674733

675734
export const SECRET_STATE_KEYS = Object.keys(secretStateRecord) as Keys<SecretState>[]
@@ -747,6 +806,7 @@ export type ClineSay = z.infer<typeof clineSaySchema>
747806
*/
748807

749808
export const toolProgressStatusSchema = z.object({
809+
id: z.string().optional(),
750810
icon: z.string().optional(),
751811
text: z.string().optional(),
752812
})
@@ -796,7 +856,6 @@ export const toolNames = [
796856
"execute_command",
797857
"read_file",
798858
"write_to_file",
799-
"append_to_file",
800859
"apply_diff",
801860
"insert_content",
802861
"search_and_replace",

0 commit comments

Comments
 (0)