@roo-code/types 1.55.0 → 1.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1633 -1541
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +333 -325
- package/dist/index.d.ts +333 -325
- package/dist/index.js +1631 -1540
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
|
57
57
|
LITELLM_COMPUTER_USE_MODELS: () => LITELLM_COMPUTER_USE_MODELS,
|
|
58
58
|
LMSTUDIO_DEFAULT_TEMPERATURE: () => LMSTUDIO_DEFAULT_TEMPERATURE,
|
|
59
59
|
MISTRAL_DEFAULT_TEMPERATURE: () => MISTRAL_DEFAULT_TEMPERATURE,
|
|
60
|
+
MODELS_BY_PROVIDER: () => MODELS_BY_PROVIDER,
|
|
60
61
|
MODEL_ID_KEYS: () => MODEL_ID_KEYS,
|
|
61
62
|
MOONSHOT_DEFAULT_TEMPERATURE: () => MOONSHOT_DEFAULT_TEMPERATURE,
|
|
62
63
|
OPENAI_AZURE_AI_INFERENCE_PATH: () => OPENAI_AZURE_AI_INFERENCE_PATH,
|
|
@@ -116,7 +117,6 @@ __export(index_exports, {
|
|
|
116
117
|
experimentIds: () => experimentIds,
|
|
117
118
|
experimentIdsSchema: () => experimentIdsSchema,
|
|
118
119
|
experimentsSchema: () => experimentsSchema,
|
|
119
|
-
extendedReasoningEffortsSchema: () => extendedReasoningEffortsSchema,
|
|
120
120
|
featherlessDefaultModelId: () => featherlessDefaultModelId,
|
|
121
121
|
featherlessModels: () => featherlessModels,
|
|
122
122
|
fireworksDefaultModelId: () => fireworksDefaultModelId,
|
|
@@ -189,6 +189,7 @@ __export(index_exports, {
|
|
|
189
189
|
providerSettingsSchema: () => providerSettingsSchema,
|
|
190
190
|
providerSettingsSchemaDiscriminated: () => providerSettingsSchemaDiscriminated,
|
|
191
191
|
providerSettingsWithIdSchema: () => providerSettingsWithIdSchema,
|
|
192
|
+
reasoningEffortWithMinimalSchema: () => reasoningEffortWithMinimalSchema,
|
|
192
193
|
reasoningEfforts: () => reasoningEfforts,
|
|
193
194
|
reasoningEffortsSchema: () => reasoningEffortsSchema,
|
|
194
195
|
requestyDefaultModelId: () => requestyDefaultModelId,
|
|
@@ -621,6 +622,7 @@ var import_zod8 = require("zod");
|
|
|
621
622
|
var import_zod7 = require("zod");
|
|
622
623
|
var reasoningEfforts = ["low", "medium", "high"];
|
|
623
624
|
var reasoningEffortsSchema = import_zod7.z.enum(reasoningEfforts);
|
|
625
|
+
var reasoningEffortWithMinimalSchema = import_zod7.z.union([reasoningEffortsSchema, import_zod7.z.literal("minimal")]);
|
|
624
626
|
var verbosityLevels = ["low", "medium", "high"];
|
|
625
627
|
var verbosityLevelsSchema = import_zod7.z.enum(verbosityLevels);
|
|
626
628
|
var modelParameters = ["max_tokens", "temperature", "reasoning", "include_reasoning"];
|
|
@@ -659,1100 +661,6 @@ var modelInfoSchema = import_zod7.z.object({
|
|
|
659
661
|
).optional()
|
|
660
662
|
});
|
|
661
663
|
|
|
662
|
-
// src/provider-settings.ts
|
|
663
|
-
var BEDROCK_CLAUDE_SONNET_4_MODEL_ID = "anthropic.claude-sonnet-4-20250514-v1:0";
|
|
664
|
-
var extendedReasoningEffortsSchema = import_zod8.z.union([reasoningEffortsSchema, import_zod8.z.literal("minimal")]);
|
|
665
|
-
var providerNames = [
|
|
666
|
-
"anthropic",
|
|
667
|
-
"claude-code",
|
|
668
|
-
"glama",
|
|
669
|
-
"openrouter",
|
|
670
|
-
"bedrock",
|
|
671
|
-
"vertex",
|
|
672
|
-
"openai",
|
|
673
|
-
"ollama",
|
|
674
|
-
"vscode-lm",
|
|
675
|
-
"lmstudio",
|
|
676
|
-
"gemini",
|
|
677
|
-
"gemini-cli",
|
|
678
|
-
"openai-native",
|
|
679
|
-
"mistral",
|
|
680
|
-
"moonshot",
|
|
681
|
-
"deepseek",
|
|
682
|
-
"doubao",
|
|
683
|
-
"unbound",
|
|
684
|
-
"requesty",
|
|
685
|
-
"human-relay",
|
|
686
|
-
"fake-ai",
|
|
687
|
-
"xai",
|
|
688
|
-
"groq",
|
|
689
|
-
"chutes",
|
|
690
|
-
"litellm",
|
|
691
|
-
"huggingface",
|
|
692
|
-
"cerebras",
|
|
693
|
-
"sambanova",
|
|
694
|
-
"zai",
|
|
695
|
-
"fireworks",
|
|
696
|
-
"featherless",
|
|
697
|
-
"io-intelligence",
|
|
698
|
-
"roo"
|
|
699
|
-
];
|
|
700
|
-
var providerNamesSchema = import_zod8.z.enum(providerNames);
|
|
701
|
-
var providerSettingsEntrySchema = import_zod8.z.object({
|
|
702
|
-
id: import_zod8.z.string(),
|
|
703
|
-
name: import_zod8.z.string(),
|
|
704
|
-
apiProvider: providerNamesSchema.optional()
|
|
705
|
-
});
|
|
706
|
-
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
707
|
-
var baseProviderSettingsSchema = import_zod8.z.object({
|
|
708
|
-
includeMaxTokens: import_zod8.z.boolean().optional(),
|
|
709
|
-
diffEnabled: import_zod8.z.boolean().optional(),
|
|
710
|
-
todoListEnabled: import_zod8.z.boolean().optional(),
|
|
711
|
-
fuzzyMatchThreshold: import_zod8.z.number().optional(),
|
|
712
|
-
modelTemperature: import_zod8.z.number().nullish(),
|
|
713
|
-
rateLimitSeconds: import_zod8.z.number().optional(),
|
|
714
|
-
consecutiveMistakeLimit: import_zod8.z.number().min(0).optional(),
|
|
715
|
-
// Model reasoning.
|
|
716
|
-
enableReasoningEffort: import_zod8.z.boolean().optional(),
|
|
717
|
-
reasoningEffort: extendedReasoningEffortsSchema.optional(),
|
|
718
|
-
modelMaxTokens: import_zod8.z.number().optional(),
|
|
719
|
-
modelMaxThinkingTokens: import_zod8.z.number().optional(),
|
|
720
|
-
// Model verbosity.
|
|
721
|
-
verbosity: verbosityLevelsSchema.optional()
|
|
722
|
-
});
|
|
723
|
-
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
724
|
-
apiModelId: import_zod8.z.string().optional()
|
|
725
|
-
});
|
|
726
|
-
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
727
|
-
apiKey: import_zod8.z.string().optional(),
|
|
728
|
-
anthropicBaseUrl: import_zod8.z.string().optional(),
|
|
729
|
-
anthropicUseAuthToken: import_zod8.z.boolean().optional(),
|
|
730
|
-
anthropicBeta1MContext: import_zod8.z.boolean().optional()
|
|
731
|
-
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
732
|
-
});
|
|
733
|
-
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
734
|
-
claudeCodePath: import_zod8.z.string().optional(),
|
|
735
|
-
claudeCodeMaxOutputTokens: import_zod8.z.number().int().min(1).max(2e5).optional()
|
|
736
|
-
});
|
|
737
|
-
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
738
|
-
glamaModelId: import_zod8.z.string().optional(),
|
|
739
|
-
glamaApiKey: import_zod8.z.string().optional()
|
|
740
|
-
});
|
|
741
|
-
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
742
|
-
openRouterApiKey: import_zod8.z.string().optional(),
|
|
743
|
-
openRouterModelId: import_zod8.z.string().optional(),
|
|
744
|
-
openRouterBaseUrl: import_zod8.z.string().optional(),
|
|
745
|
-
openRouterSpecificProvider: import_zod8.z.string().optional(),
|
|
746
|
-
openRouterUseMiddleOutTransform: import_zod8.z.boolean().optional()
|
|
747
|
-
});
|
|
748
|
-
var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
749
|
-
awsAccessKey: import_zod8.z.string().optional(),
|
|
750
|
-
awsSecretKey: import_zod8.z.string().optional(),
|
|
751
|
-
awsSessionToken: import_zod8.z.string().optional(),
|
|
752
|
-
awsRegion: import_zod8.z.string().optional(),
|
|
753
|
-
awsUseCrossRegionInference: import_zod8.z.boolean().optional(),
|
|
754
|
-
awsUsePromptCache: import_zod8.z.boolean().optional(),
|
|
755
|
-
awsProfile: import_zod8.z.string().optional(),
|
|
756
|
-
awsUseProfile: import_zod8.z.boolean().optional(),
|
|
757
|
-
awsApiKey: import_zod8.z.string().optional(),
|
|
758
|
-
awsUseApiKey: import_zod8.z.boolean().optional(),
|
|
759
|
-
awsCustomArn: import_zod8.z.string().optional(),
|
|
760
|
-
awsModelContextWindow: import_zod8.z.number().optional(),
|
|
761
|
-
awsBedrockEndpointEnabled: import_zod8.z.boolean().optional(),
|
|
762
|
-
awsBedrockEndpoint: import_zod8.z.string().optional(),
|
|
763
|
-
awsBedrock1MContext: import_zod8.z.boolean().optional()
|
|
764
|
-
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
765
|
-
});
|
|
766
|
-
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
767
|
-
vertexKeyFile: import_zod8.z.string().optional(),
|
|
768
|
-
vertexJsonCredentials: import_zod8.z.string().optional(),
|
|
769
|
-
vertexProjectId: import_zod8.z.string().optional(),
|
|
770
|
-
vertexRegion: import_zod8.z.string().optional()
|
|
771
|
-
});
|
|
772
|
-
var openAiSchema = baseProviderSettingsSchema.extend({
|
|
773
|
-
openAiBaseUrl: import_zod8.z.string().optional(),
|
|
774
|
-
openAiApiKey: import_zod8.z.string().optional(),
|
|
775
|
-
openAiLegacyFormat: import_zod8.z.boolean().optional(),
|
|
776
|
-
openAiR1FormatEnabled: import_zod8.z.boolean().optional(),
|
|
777
|
-
openAiModelId: import_zod8.z.string().optional(),
|
|
778
|
-
openAiCustomModelInfo: modelInfoSchema.nullish(),
|
|
779
|
-
openAiUseAzure: import_zod8.z.boolean().optional(),
|
|
780
|
-
azureApiVersion: import_zod8.z.string().optional(),
|
|
781
|
-
openAiStreamingEnabled: import_zod8.z.boolean().optional(),
|
|
782
|
-
openAiHostHeader: import_zod8.z.string().optional(),
|
|
783
|
-
// Keep temporarily for backward compatibility during migration.
|
|
784
|
-
openAiHeaders: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional()
|
|
785
|
-
});
|
|
786
|
-
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
787
|
-
ollamaModelId: import_zod8.z.string().optional(),
|
|
788
|
-
ollamaBaseUrl: import_zod8.z.string().optional()
|
|
789
|
-
});
|
|
790
|
-
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
791
|
-
vsCodeLmModelSelector: import_zod8.z.object({
|
|
792
|
-
vendor: import_zod8.z.string().optional(),
|
|
793
|
-
family: import_zod8.z.string().optional(),
|
|
794
|
-
version: import_zod8.z.string().optional(),
|
|
795
|
-
id: import_zod8.z.string().optional()
|
|
796
|
-
}).optional()
|
|
797
|
-
});
|
|
798
|
-
var lmStudioSchema = baseProviderSettingsSchema.extend({
|
|
799
|
-
lmStudioModelId: import_zod8.z.string().optional(),
|
|
800
|
-
lmStudioBaseUrl: import_zod8.z.string().optional(),
|
|
801
|
-
lmStudioDraftModelId: import_zod8.z.string().optional(),
|
|
802
|
-
lmStudioSpeculativeDecodingEnabled: import_zod8.z.boolean().optional()
|
|
803
|
-
});
|
|
804
|
-
var geminiSchema = apiModelIdProviderModelSchema.extend({
|
|
805
|
-
geminiApiKey: import_zod8.z.string().optional(),
|
|
806
|
-
googleGeminiBaseUrl: import_zod8.z.string().optional(),
|
|
807
|
-
enableUrlContext: import_zod8.z.boolean().optional(),
|
|
808
|
-
enableGrounding: import_zod8.z.boolean().optional()
|
|
809
|
-
});
|
|
810
|
-
var geminiCliSchema = apiModelIdProviderModelSchema.extend({
|
|
811
|
-
geminiCliOAuthPath: import_zod8.z.string().optional(),
|
|
812
|
-
geminiCliProjectId: import_zod8.z.string().optional()
|
|
813
|
-
});
|
|
814
|
-
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
815
|
-
openAiNativeApiKey: import_zod8.z.string().optional(),
|
|
816
|
-
openAiNativeBaseUrl: import_zod8.z.string().optional()
|
|
817
|
-
});
|
|
818
|
-
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
819
|
-
mistralApiKey: import_zod8.z.string().optional(),
|
|
820
|
-
mistralCodestralUrl: import_zod8.z.string().optional()
|
|
821
|
-
});
|
|
822
|
-
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
823
|
-
deepSeekBaseUrl: import_zod8.z.string().optional(),
|
|
824
|
-
deepSeekApiKey: import_zod8.z.string().optional()
|
|
825
|
-
});
|
|
826
|
-
var doubaoSchema = apiModelIdProviderModelSchema.extend({
|
|
827
|
-
doubaoBaseUrl: import_zod8.z.string().optional(),
|
|
828
|
-
doubaoApiKey: import_zod8.z.string().optional()
|
|
829
|
-
});
|
|
830
|
-
var moonshotSchema = apiModelIdProviderModelSchema.extend({
|
|
831
|
-
moonshotBaseUrl: import_zod8.z.union([import_zod8.z.literal("https://api.moonshot.ai/v1"), import_zod8.z.literal("https://api.moonshot.cn/v1")]).optional(),
|
|
832
|
-
moonshotApiKey: import_zod8.z.string().optional()
|
|
833
|
-
});
|
|
834
|
-
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
835
|
-
unboundApiKey: import_zod8.z.string().optional(),
|
|
836
|
-
unboundModelId: import_zod8.z.string().optional()
|
|
837
|
-
});
|
|
838
|
-
var requestySchema = baseProviderSettingsSchema.extend({
|
|
839
|
-
requestyBaseUrl: import_zod8.z.string().optional(),
|
|
840
|
-
requestyApiKey: import_zod8.z.string().optional(),
|
|
841
|
-
requestyModelId: import_zod8.z.string().optional()
|
|
842
|
-
});
|
|
843
|
-
var humanRelaySchema = baseProviderSettingsSchema;
|
|
844
|
-
var fakeAiSchema = baseProviderSettingsSchema.extend({
|
|
845
|
-
fakeAi: import_zod8.z.unknown().optional()
|
|
846
|
-
});
|
|
847
|
-
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
848
|
-
xaiApiKey: import_zod8.z.string().optional()
|
|
849
|
-
});
|
|
850
|
-
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
851
|
-
groqApiKey: import_zod8.z.string().optional()
|
|
852
|
-
});
|
|
853
|
-
var huggingFaceSchema = baseProviderSettingsSchema.extend({
|
|
854
|
-
huggingFaceApiKey: import_zod8.z.string().optional(),
|
|
855
|
-
huggingFaceModelId: import_zod8.z.string().optional(),
|
|
856
|
-
huggingFaceInferenceProvider: import_zod8.z.string().optional()
|
|
857
|
-
});
|
|
858
|
-
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
859
|
-
chutesApiKey: import_zod8.z.string().optional()
|
|
860
|
-
});
|
|
861
|
-
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
862
|
-
litellmBaseUrl: import_zod8.z.string().optional(),
|
|
863
|
-
litellmApiKey: import_zod8.z.string().optional(),
|
|
864
|
-
litellmModelId: import_zod8.z.string().optional(),
|
|
865
|
-
litellmUsePromptCache: import_zod8.z.boolean().optional()
|
|
866
|
-
});
|
|
867
|
-
var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
868
|
-
cerebrasApiKey: import_zod8.z.string().optional()
|
|
869
|
-
});
|
|
870
|
-
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
871
|
-
sambaNovaApiKey: import_zod8.z.string().optional()
|
|
872
|
-
});
|
|
873
|
-
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
874
|
-
zaiApiKey: import_zod8.z.string().optional(),
|
|
875
|
-
zaiApiLine: import_zod8.z.union([import_zod8.z.literal("china"), import_zod8.z.literal("international")]).optional()
|
|
876
|
-
});
|
|
877
|
-
var fireworksSchema = apiModelIdProviderModelSchema.extend({
|
|
878
|
-
fireworksApiKey: import_zod8.z.string().optional()
|
|
879
|
-
});
|
|
880
|
-
var featherlessSchema = apiModelIdProviderModelSchema.extend({
|
|
881
|
-
featherlessApiKey: import_zod8.z.string().optional()
|
|
882
|
-
});
|
|
883
|
-
var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
|
|
884
|
-
ioIntelligenceModelId: import_zod8.z.string().optional(),
|
|
885
|
-
ioIntelligenceApiKey: import_zod8.z.string().optional()
|
|
886
|
-
});
|
|
887
|
-
var rooSchema = apiModelIdProviderModelSchema.extend({
|
|
888
|
-
// No additional fields needed - uses cloud authentication
|
|
889
|
-
});
|
|
890
|
-
var defaultSchema = import_zod8.z.object({
|
|
891
|
-
apiProvider: import_zod8.z.undefined()
|
|
892
|
-
});
|
|
893
|
-
var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiProvider", [
|
|
894
|
-
anthropicSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("anthropic") })),
|
|
895
|
-
claudeCodeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("claude-code") })),
|
|
896
|
-
glamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("glama") })),
|
|
897
|
-
openRouterSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openrouter") })),
|
|
898
|
-
bedrockSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("bedrock") })),
|
|
899
|
-
vertexSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vertex") })),
|
|
900
|
-
openAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai") })),
|
|
901
|
-
ollamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("ollama") })),
|
|
902
|
-
vsCodeLmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vscode-lm") })),
|
|
903
|
-
lmStudioSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("lmstudio") })),
|
|
904
|
-
geminiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini") })),
|
|
905
|
-
geminiCliSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini-cli") })),
|
|
906
|
-
openAiNativeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai-native") })),
|
|
907
|
-
mistralSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("mistral") })),
|
|
908
|
-
deepSeekSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("deepseek") })),
|
|
909
|
-
doubaoSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("doubao") })),
|
|
910
|
-
moonshotSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("moonshot") })),
|
|
911
|
-
unboundSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("unbound") })),
|
|
912
|
-
requestySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("requesty") })),
|
|
913
|
-
humanRelaySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("human-relay") })),
|
|
914
|
-
fakeAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fake-ai") })),
|
|
915
|
-
xaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("xai") })),
|
|
916
|
-
groqSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("groq") })),
|
|
917
|
-
huggingFaceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("huggingface") })),
|
|
918
|
-
chutesSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("chutes") })),
|
|
919
|
-
litellmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("litellm") })),
|
|
920
|
-
cerebrasSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("cerebras") })),
|
|
921
|
-
sambaNovaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("sambanova") })),
|
|
922
|
-
zaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("zai") })),
|
|
923
|
-
fireworksSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fireworks") })),
|
|
924
|
-
featherlessSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("featherless") })),
|
|
925
|
-
ioIntelligenceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("io-intelligence") })),
|
|
926
|
-
rooSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("roo") })),
|
|
927
|
-
defaultSchema
|
|
928
|
-
]);
|
|
929
|
-
var providerSettingsSchema = import_zod8.z.object({
|
|
930
|
-
apiProvider: providerNamesSchema.optional(),
|
|
931
|
-
...anthropicSchema.shape,
|
|
932
|
-
...claudeCodeSchema.shape,
|
|
933
|
-
...glamaSchema.shape,
|
|
934
|
-
...openRouterSchema.shape,
|
|
935
|
-
...bedrockSchema.shape,
|
|
936
|
-
...vertexSchema.shape,
|
|
937
|
-
...openAiSchema.shape,
|
|
938
|
-
...ollamaSchema.shape,
|
|
939
|
-
...vsCodeLmSchema.shape,
|
|
940
|
-
...lmStudioSchema.shape,
|
|
941
|
-
...geminiSchema.shape,
|
|
942
|
-
...geminiCliSchema.shape,
|
|
943
|
-
...openAiNativeSchema.shape,
|
|
944
|
-
...mistralSchema.shape,
|
|
945
|
-
...deepSeekSchema.shape,
|
|
946
|
-
...doubaoSchema.shape,
|
|
947
|
-
...moonshotSchema.shape,
|
|
948
|
-
...unboundSchema.shape,
|
|
949
|
-
...requestySchema.shape,
|
|
950
|
-
...humanRelaySchema.shape,
|
|
951
|
-
...fakeAiSchema.shape,
|
|
952
|
-
...xaiSchema.shape,
|
|
953
|
-
...groqSchema.shape,
|
|
954
|
-
...huggingFaceSchema.shape,
|
|
955
|
-
...chutesSchema.shape,
|
|
956
|
-
...litellmSchema.shape,
|
|
957
|
-
...cerebrasSchema.shape,
|
|
958
|
-
...sambaNovaSchema.shape,
|
|
959
|
-
...zaiSchema.shape,
|
|
960
|
-
...fireworksSchema.shape,
|
|
961
|
-
...featherlessSchema.shape,
|
|
962
|
-
...ioIntelligenceSchema.shape,
|
|
963
|
-
...rooSchema.shape,
|
|
964
|
-
...codebaseIndexProviderSchema.shape
|
|
965
|
-
});
|
|
966
|
-
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: import_zod8.z.string().optional() });
|
|
967
|
-
var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
|
|
968
|
-
import_zod8.z.object({ id: import_zod8.z.string().optional() })
|
|
969
|
-
);
|
|
970
|
-
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
971
|
-
var MODEL_ID_KEYS = [
|
|
972
|
-
"apiModelId",
|
|
973
|
-
"glamaModelId",
|
|
974
|
-
"openRouterModelId",
|
|
975
|
-
"openAiModelId",
|
|
976
|
-
"ollamaModelId",
|
|
977
|
-
"lmStudioModelId",
|
|
978
|
-
"lmStudioDraftModelId",
|
|
979
|
-
"unboundModelId",
|
|
980
|
-
"requestyModelId",
|
|
981
|
-
"litellmModelId",
|
|
982
|
-
"huggingFaceModelId",
|
|
983
|
-
"ioIntelligenceModelId"
|
|
984
|
-
];
|
|
985
|
-
var getModelId = (settings) => {
|
|
986
|
-
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
987
|
-
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
988
|
-
};
|
|
989
|
-
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code", "bedrock"];
|
|
990
|
-
var getApiProtocol = (provider, modelId) => {
|
|
991
|
-
if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
|
|
992
|
-
return "anthropic";
|
|
993
|
-
}
|
|
994
|
-
if (provider && provider === "vertex" && modelId && modelId.toLowerCase().includes("claude")) {
|
|
995
|
-
return "anthropic";
|
|
996
|
-
}
|
|
997
|
-
return "openai";
|
|
998
|
-
};
|
|
999
|
-
|
|
1000
|
-
// src/history.ts
|
|
1001
|
-
var import_zod9 = require("zod");
|
|
1002
|
-
var historyItemSchema = import_zod9.z.object({
|
|
1003
|
-
id: import_zod9.z.string(),
|
|
1004
|
-
number: import_zod9.z.number(),
|
|
1005
|
-
ts: import_zod9.z.number(),
|
|
1006
|
-
task: import_zod9.z.string(),
|
|
1007
|
-
tokensIn: import_zod9.z.number(),
|
|
1008
|
-
tokensOut: import_zod9.z.number(),
|
|
1009
|
-
cacheWrites: import_zod9.z.number().optional(),
|
|
1010
|
-
cacheReads: import_zod9.z.number().optional(),
|
|
1011
|
-
totalCost: import_zod9.z.number(),
|
|
1012
|
-
size: import_zod9.z.number().optional(),
|
|
1013
|
-
workspace: import_zod9.z.string().optional(),
|
|
1014
|
-
mode: import_zod9.z.string().optional()
|
|
1015
|
-
});
|
|
1016
|
-
|
|
1017
|
-
// src/telemetry.ts
|
|
1018
|
-
var import_zod10 = require("zod");
|
|
1019
|
-
var telemetrySettings = ["unset", "enabled", "disabled"];
|
|
1020
|
-
var telemetrySettingsSchema = import_zod10.z.enum(telemetrySettings);
|
|
1021
|
-
var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
1022
|
-
TelemetryEventName2["TASK_CREATED"] = "Task Created";
|
|
1023
|
-
TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
|
|
1024
|
-
TelemetryEventName2["TASK_COMPLETED"] = "Task Completed";
|
|
1025
|
-
TelemetryEventName2["TASK_MESSAGE"] = "Task Message";
|
|
1026
|
-
TelemetryEventName2["TASK_CONVERSATION_MESSAGE"] = "Conversation Message";
|
|
1027
|
-
TelemetryEventName2["LLM_COMPLETION"] = "LLM Completion";
|
|
1028
|
-
TelemetryEventName2["MODE_SWITCH"] = "Mode Switched";
|
|
1029
|
-
TelemetryEventName2["MODE_SELECTOR_OPENED"] = "Mode Selector Opened";
|
|
1030
|
-
TelemetryEventName2["TOOL_USED"] = "Tool Used";
|
|
1031
|
-
TelemetryEventName2["CHECKPOINT_CREATED"] = "Checkpoint Created";
|
|
1032
|
-
TelemetryEventName2["CHECKPOINT_RESTORED"] = "Checkpoint Restored";
|
|
1033
|
-
TelemetryEventName2["CHECKPOINT_DIFFED"] = "Checkpoint Diffed";
|
|
1034
|
-
TelemetryEventName2["TAB_SHOWN"] = "Tab Shown";
|
|
1035
|
-
TelemetryEventName2["MODE_SETTINGS_CHANGED"] = "Mode Setting Changed";
|
|
1036
|
-
TelemetryEventName2["CUSTOM_MODE_CREATED"] = "Custom Mode Created";
|
|
1037
|
-
TelemetryEventName2["CONTEXT_CONDENSED"] = "Context Condensed";
|
|
1038
|
-
TelemetryEventName2["SLIDING_WINDOW_TRUNCATION"] = "Sliding Window Truncation";
|
|
1039
|
-
TelemetryEventName2["CODE_ACTION_USED"] = "Code Action Used";
|
|
1040
|
-
TelemetryEventName2["PROMPT_ENHANCED"] = "Prompt Enhanced";
|
|
1041
|
-
TelemetryEventName2["TITLE_BUTTON_CLICKED"] = "Title Button Clicked";
|
|
1042
|
-
TelemetryEventName2["AUTHENTICATION_INITIATED"] = "Authentication Initiated";
|
|
1043
|
-
TelemetryEventName2["MARKETPLACE_ITEM_INSTALLED"] = "Marketplace Item Installed";
|
|
1044
|
-
TelemetryEventName2["MARKETPLACE_ITEM_REMOVED"] = "Marketplace Item Removed";
|
|
1045
|
-
TelemetryEventName2["MARKETPLACE_TAB_VIEWED"] = "Marketplace Tab Viewed";
|
|
1046
|
-
TelemetryEventName2["MARKETPLACE_INSTALL_BUTTON_CLICKED"] = "Marketplace Install Button Clicked";
|
|
1047
|
-
TelemetryEventName2["SHARE_BUTTON_CLICKED"] = "Share Button Clicked";
|
|
1048
|
-
TelemetryEventName2["SHARE_ORGANIZATION_CLICKED"] = "Share Organization Clicked";
|
|
1049
|
-
TelemetryEventName2["SHARE_PUBLIC_CLICKED"] = "Share Public Clicked";
|
|
1050
|
-
TelemetryEventName2["SHARE_CONNECT_TO_CLOUD_CLICKED"] = "Share Connect To Cloud Clicked";
|
|
1051
|
-
TelemetryEventName2["ACCOUNT_CONNECT_CLICKED"] = "Account Connect Clicked";
|
|
1052
|
-
TelemetryEventName2["ACCOUNT_CONNECT_SUCCESS"] = "Account Connect Success";
|
|
1053
|
-
TelemetryEventName2["ACCOUNT_LOGOUT_CLICKED"] = "Account Logout Clicked";
|
|
1054
|
-
TelemetryEventName2["ACCOUNT_LOGOUT_SUCCESS"] = "Account Logout Success";
|
|
1055
|
-
TelemetryEventName2["SCHEMA_VALIDATION_ERROR"] = "Schema Validation Error";
|
|
1056
|
-
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
1057
|
-
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
1058
|
-
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
1059
|
-
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
1060
|
-
return TelemetryEventName2;
|
|
1061
|
-
})(TelemetryEventName || {});
|
|
1062
|
-
var staticAppPropertiesSchema = import_zod10.z.object({
|
|
1063
|
-
appName: import_zod10.z.string(),
|
|
1064
|
-
appVersion: import_zod10.z.string(),
|
|
1065
|
-
vscodeVersion: import_zod10.z.string(),
|
|
1066
|
-
platform: import_zod10.z.string(),
|
|
1067
|
-
editorName: import_zod10.z.string()
|
|
1068
|
-
});
|
|
1069
|
-
var dynamicAppPropertiesSchema = import_zod10.z.object({
|
|
1070
|
-
language: import_zod10.z.string(),
|
|
1071
|
-
mode: import_zod10.z.string()
|
|
1072
|
-
});
|
|
1073
|
-
var cloudAppPropertiesSchema = import_zod10.z.object({
|
|
1074
|
-
cloudIsAuthenticated: import_zod10.z.boolean().optional()
|
|
1075
|
-
});
|
|
1076
|
-
var appPropertiesSchema = import_zod10.z.object({
|
|
1077
|
-
...staticAppPropertiesSchema.shape,
|
|
1078
|
-
...dynamicAppPropertiesSchema.shape,
|
|
1079
|
-
...cloudAppPropertiesSchema.shape
|
|
1080
|
-
});
|
|
1081
|
-
var taskPropertiesSchema = import_zod10.z.object({
|
|
1082
|
-
taskId: import_zod10.z.string().optional(),
|
|
1083
|
-
apiProvider: import_zod10.z.enum(providerNames).optional(),
|
|
1084
|
-
modelId: import_zod10.z.string().optional(),
|
|
1085
|
-
diffStrategy: import_zod10.z.string().optional(),
|
|
1086
|
-
isSubtask: import_zod10.z.boolean().optional(),
|
|
1087
|
-
todos: import_zod10.z.object({
|
|
1088
|
-
total: import_zod10.z.number(),
|
|
1089
|
-
completed: import_zod10.z.number(),
|
|
1090
|
-
inProgress: import_zod10.z.number(),
|
|
1091
|
-
pending: import_zod10.z.number()
|
|
1092
|
-
}).optional()
|
|
1093
|
-
});
|
|
1094
|
-
var gitPropertiesSchema = import_zod10.z.object({
|
|
1095
|
-
repositoryUrl: import_zod10.z.string().optional(),
|
|
1096
|
-
repositoryName: import_zod10.z.string().optional(),
|
|
1097
|
-
defaultBranch: import_zod10.z.string().optional()
|
|
1098
|
-
});
|
|
1099
|
-
var telemetryPropertiesSchema = import_zod10.z.object({
|
|
1100
|
-
...appPropertiesSchema.shape,
|
|
1101
|
-
...taskPropertiesSchema.shape,
|
|
1102
|
-
...gitPropertiesSchema.shape
|
|
1103
|
-
});
|
|
1104
|
-
var rooCodeTelemetryEventSchema = import_zod10.z.discriminatedUnion("type", [
|
|
1105
|
-
import_zod10.z.object({
|
|
1106
|
-
type: import_zod10.z.enum([
|
|
1107
|
-
"Task Created" /* TASK_CREATED */,
|
|
1108
|
-
"Task Reopened" /* TASK_RESTARTED */,
|
|
1109
|
-
"Task Completed" /* TASK_COMPLETED */,
|
|
1110
|
-
"Conversation Message" /* TASK_CONVERSATION_MESSAGE */,
|
|
1111
|
-
"Mode Switched" /* MODE_SWITCH */,
|
|
1112
|
-
"Mode Selector Opened" /* MODE_SELECTOR_OPENED */,
|
|
1113
|
-
"Tool Used" /* TOOL_USED */,
|
|
1114
|
-
"Checkpoint Created" /* CHECKPOINT_CREATED */,
|
|
1115
|
-
"Checkpoint Restored" /* CHECKPOINT_RESTORED */,
|
|
1116
|
-
"Checkpoint Diffed" /* CHECKPOINT_DIFFED */,
|
|
1117
|
-
"Code Action Used" /* CODE_ACTION_USED */,
|
|
1118
|
-
"Prompt Enhanced" /* PROMPT_ENHANCED */,
|
|
1119
|
-
"Title Button Clicked" /* TITLE_BUTTON_CLICKED */,
|
|
1120
|
-
"Authentication Initiated" /* AUTHENTICATION_INITIATED */,
|
|
1121
|
-
"Marketplace Item Installed" /* MARKETPLACE_ITEM_INSTALLED */,
|
|
1122
|
-
"Marketplace Item Removed" /* MARKETPLACE_ITEM_REMOVED */,
|
|
1123
|
-
"Marketplace Tab Viewed" /* MARKETPLACE_TAB_VIEWED */,
|
|
1124
|
-
"Marketplace Install Button Clicked" /* MARKETPLACE_INSTALL_BUTTON_CLICKED */,
|
|
1125
|
-
"Share Button Clicked" /* SHARE_BUTTON_CLICKED */,
|
|
1126
|
-
"Share Organization Clicked" /* SHARE_ORGANIZATION_CLICKED */,
|
|
1127
|
-
"Share Public Clicked" /* SHARE_PUBLIC_CLICKED */,
|
|
1128
|
-
"Share Connect To Cloud Clicked" /* SHARE_CONNECT_TO_CLOUD_CLICKED */,
|
|
1129
|
-
"Account Connect Clicked" /* ACCOUNT_CONNECT_CLICKED */,
|
|
1130
|
-
"Account Connect Success" /* ACCOUNT_CONNECT_SUCCESS */,
|
|
1131
|
-
"Account Logout Clicked" /* ACCOUNT_LOGOUT_CLICKED */,
|
|
1132
|
-
"Account Logout Success" /* ACCOUNT_LOGOUT_SUCCESS */,
|
|
1133
|
-
"Schema Validation Error" /* SCHEMA_VALIDATION_ERROR */,
|
|
1134
|
-
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
1135
|
-
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
1136
|
-
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
|
|
1137
|
-
"Code Index Error" /* CODE_INDEX_ERROR */,
|
|
1138
|
-
"Context Condensed" /* CONTEXT_CONDENSED */,
|
|
1139
|
-
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
1140
|
-
"Tab Shown" /* TAB_SHOWN */,
|
|
1141
|
-
"Mode Setting Changed" /* MODE_SETTINGS_CHANGED */,
|
|
1142
|
-
"Custom Mode Created" /* CUSTOM_MODE_CREATED */
|
|
1143
|
-
]),
|
|
1144
|
-
properties: telemetryPropertiesSchema
|
|
1145
|
-
}),
|
|
1146
|
-
import_zod10.z.object({
|
|
1147
|
-
type: import_zod10.z.literal("Task Message" /* TASK_MESSAGE */),
|
|
1148
|
-
properties: import_zod10.z.object({
|
|
1149
|
-
...telemetryPropertiesSchema.shape,
|
|
1150
|
-
taskId: import_zod10.z.string(),
|
|
1151
|
-
message: clineMessageSchema
|
|
1152
|
-
})
|
|
1153
|
-
}),
|
|
1154
|
-
import_zod10.z.object({
|
|
1155
|
-
type: import_zod10.z.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
1156
|
-
properties: import_zod10.z.object({
|
|
1157
|
-
...telemetryPropertiesSchema.shape,
|
|
1158
|
-
inputTokens: import_zod10.z.number(),
|
|
1159
|
-
outputTokens: import_zod10.z.number(),
|
|
1160
|
-
cacheReadTokens: import_zod10.z.number().optional(),
|
|
1161
|
-
cacheWriteTokens: import_zod10.z.number().optional(),
|
|
1162
|
-
cost: import_zod10.z.number().optional()
|
|
1163
|
-
})
|
|
1164
|
-
})
|
|
1165
|
-
]);
|
|
1166
|
-
|
|
1167
|
-
// src/mode.ts
|
|
1168
|
-
var import_zod11 = require("zod");
|
|
1169
|
-
var groupOptionsSchema = import_zod11.z.object({
|
|
1170
|
-
fileRegex: import_zod11.z.string().optional().refine(
|
|
1171
|
-
(pattern) => {
|
|
1172
|
-
if (!pattern) {
|
|
1173
|
-
return true;
|
|
1174
|
-
}
|
|
1175
|
-
try {
|
|
1176
|
-
new RegExp(pattern);
|
|
1177
|
-
return true;
|
|
1178
|
-
} catch {
|
|
1179
|
-
return false;
|
|
1180
|
-
}
|
|
1181
|
-
},
|
|
1182
|
-
{ message: "Invalid regular expression pattern" }
|
|
1183
|
-
),
|
|
1184
|
-
description: import_zod11.z.string().optional()
|
|
1185
|
-
});
|
|
1186
|
-
var groupEntrySchema = import_zod11.z.union([toolGroupsSchema, import_zod11.z.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
1187
|
-
var groupEntryArraySchema = import_zod11.z.array(groupEntrySchema).refine(
|
|
1188
|
-
(groups) => {
|
|
1189
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1190
|
-
return groups.every((group) => {
|
|
1191
|
-
const groupName = Array.isArray(group) ? group[0] : group;
|
|
1192
|
-
if (seen.has(groupName)) {
|
|
1193
|
-
return false;
|
|
1194
|
-
}
|
|
1195
|
-
seen.add(groupName);
|
|
1196
|
-
return true;
|
|
1197
|
-
});
|
|
1198
|
-
},
|
|
1199
|
-
{ message: "Duplicate groups are not allowed" }
|
|
1200
|
-
);
|
|
1201
|
-
var modeConfigSchema = import_zod11.z.object({
|
|
1202
|
-
slug: import_zod11.z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
1203
|
-
name: import_zod11.z.string().min(1, "Name is required"),
|
|
1204
|
-
roleDefinition: import_zod11.z.string().min(1, "Role definition is required"),
|
|
1205
|
-
whenToUse: import_zod11.z.string().optional(),
|
|
1206
|
-
description: import_zod11.z.string().optional(),
|
|
1207
|
-
customInstructions: import_zod11.z.string().optional(),
|
|
1208
|
-
groups: groupEntryArraySchema,
|
|
1209
|
-
source: import_zod11.z.enum(["global", "project"]).optional()
|
|
1210
|
-
});
|
|
1211
|
-
var customModesSettingsSchema = import_zod11.z.object({
|
|
1212
|
-
customModes: import_zod11.z.array(modeConfigSchema).refine(
|
|
1213
|
-
(modes) => {
|
|
1214
|
-
const slugs = /* @__PURE__ */ new Set();
|
|
1215
|
-
return modes.every((mode) => {
|
|
1216
|
-
if (slugs.has(mode.slug)) {
|
|
1217
|
-
return false;
|
|
1218
|
-
}
|
|
1219
|
-
slugs.add(mode.slug);
|
|
1220
|
-
return true;
|
|
1221
|
-
});
|
|
1222
|
-
},
|
|
1223
|
-
{
|
|
1224
|
-
message: "Duplicate mode slugs are not allowed"
|
|
1225
|
-
}
|
|
1226
|
-
)
|
|
1227
|
-
});
|
|
1228
|
-
var promptComponentSchema = import_zod11.z.object({
|
|
1229
|
-
roleDefinition: import_zod11.z.string().optional(),
|
|
1230
|
-
whenToUse: import_zod11.z.string().optional(),
|
|
1231
|
-
description: import_zod11.z.string().optional(),
|
|
1232
|
-
customInstructions: import_zod11.z.string().optional()
|
|
1233
|
-
});
|
|
1234
|
-
var customModePromptsSchema = import_zod11.z.record(import_zod11.z.string(), promptComponentSchema.optional());
|
|
1235
|
-
var customSupportPromptsSchema = import_zod11.z.record(import_zod11.z.string(), import_zod11.z.string().optional());
|
|
1236
|
-
var DEFAULT_MODES = [
|
|
1237
|
-
{
|
|
1238
|
-
slug: "architect",
|
|
1239
|
-
name: "\u{1F3D7}\uFE0F Architect",
|
|
1240
|
-
roleDefinition: "You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
|
|
1241
|
-
whenToUse: "Use this mode when you need to plan, design, or strategize before implementation. Perfect for breaking down complex problems, creating technical specifications, designing system architecture, or brainstorming solutions before coding.",
|
|
1242
|
-
description: "Plan and design before implementation",
|
|
1243
|
-
groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
|
|
1244
|
-
customInstructions: "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n **Note:** If the `update_todo_list` tool is not available, write the plan to a markdown file (e.g., `plan.md` or `todo.md`) instead.\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**"
|
|
1245
|
-
},
|
|
1246
|
-
{
|
|
1247
|
-
slug: "code",
|
|
1248
|
-
name: "\u{1F4BB} Code",
|
|
1249
|
-
roleDefinition: "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
|
|
1250
|
-
whenToUse: "Use this mode when you need to write, modify, or refactor code. Ideal for implementing features, fixing bugs, creating new files, or making code improvements across any programming language or framework.",
|
|
1251
|
-
description: "Write, modify, and refactor code",
|
|
1252
|
-
groups: ["read", "edit", "browser", "command", "mcp"]
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
slug: "ask",
|
|
1256
|
-
name: "\u2753 Ask",
|
|
1257
|
-
roleDefinition: "You are Roo, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics.",
|
|
1258
|
-
whenToUse: "Use this mode when you need explanations, documentation, or answers to technical questions. Best for understanding concepts, analyzing existing code, getting recommendations, or learning about technologies without making changes.",
|
|
1259
|
-
description: "Get answers and explanations",
|
|
1260
|
-
groups: ["read", "browser", "mcp"],
|
|
1261
|
-
customInstructions: "You can analyze code, explain concepts, and access external resources. Always answer the user's questions thoroughly, and do not switch to implementing code unless explicitly requested by the user. Include Mermaid diagrams when they clarify your response."
|
|
1262
|
-
},
|
|
1263
|
-
{
|
|
1264
|
-
slug: "debug",
|
|
1265
|
-
name: "\u{1FAB2} Debug",
|
|
1266
|
-
roleDefinition: "You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
|
|
1267
|
-
whenToUse: "Use this mode when you're troubleshooting issues, investigating errors, or diagnosing problems. Specialized in systematic debugging, adding logging, analyzing stack traces, and identifying root causes before applying fixes.",
|
|
1268
|
-
description: "Diagnose and fix software issues",
|
|
1269
|
-
groups: ["read", "edit", "browser", "command", "mcp"],
|
|
1270
|
-
customInstructions: "Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions. Explicitly ask the user to confirm the diagnosis before fixing the problem."
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
slug: "orchestrator",
|
|
1274
|
-
name: "\u{1FA83} Orchestrator",
|
|
1275
|
-
roleDefinition: "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.",
|
|
1276
|
-
whenToUse: "Use this mode for complex, multi-step projects that require coordination across different specialties. Ideal when you need to break down large tasks into subtasks, manage workflows, or coordinate work that spans multiple domains or expertise areas.",
|
|
1277
|
-
description: "Coordinate tasks across multiple modes",
|
|
1278
|
-
groups: [],
|
|
1279
|
-
customInstructions: "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. These instructions must include:\n * All necessary context from the parent task or previous subtasks required to complete the work.\n * A clearly defined scope, specifying exactly what the subtask should accomplish.\n * An explicit statement that the subtask should *only* perform the work outlined in these instructions and not deviate.\n * An instruction for the subtask to signal completion by using the `attempt_completion` tool, providing a concise yet thorough summary of the outcome in the `result` parameter, keeping in mind that this summary will be the source of truth used to keep track of what was completed on this project.\n * A statement that these specific instructions supersede any conflicting general instructions the subtask's mode might have.\n\n3. Track and manage the progress of all subtasks. When a subtask is completed, analyze its results and determine the next steps.\n\n4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\n\n5. When all subtasks are completed, synthesize the results and provide a comprehensive overview of what was accomplished.\n\n6. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively.\n\n7. Suggest improvements to the workflow based on the results of completed subtasks.\n\nUse subtasks to maintain clarity. If a request significantly shifts focus or requires a different expertise (mode), consider creating a subtask rather than overloading the current one."
|
|
1280
|
-
}
|
|
1281
|
-
];
|
|
1282
|
-
|
|
1283
|
-
// src/vscode.ts
|
|
1284
|
-
var import_zod12 = require("zod");
|
|
1285
|
-
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
1286
|
-
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
1287
|
-
var commandIds = [
|
|
1288
|
-
"activationCompleted",
|
|
1289
|
-
"plusButtonClicked",
|
|
1290
|
-
"promptsButtonClicked",
|
|
1291
|
-
"mcpButtonClicked",
|
|
1292
|
-
"historyButtonClicked",
|
|
1293
|
-
"marketplaceButtonClicked",
|
|
1294
|
-
"popoutButtonClicked",
|
|
1295
|
-
"accountButtonClicked",
|
|
1296
|
-
"settingsButtonClicked",
|
|
1297
|
-
"openInNewTab",
|
|
1298
|
-
"showHumanRelayDialog",
|
|
1299
|
-
"registerHumanRelayCallback",
|
|
1300
|
-
"unregisterHumanRelayCallback",
|
|
1301
|
-
"handleHumanRelayResponse",
|
|
1302
|
-
"newTask",
|
|
1303
|
-
"setCustomStoragePath",
|
|
1304
|
-
"importSettings",
|
|
1305
|
-
"focusInput",
|
|
1306
|
-
"acceptInput",
|
|
1307
|
-
"focusPanel"
|
|
1308
|
-
];
|
|
1309
|
-
var languages = [
|
|
1310
|
-
"ca",
|
|
1311
|
-
"de",
|
|
1312
|
-
"en",
|
|
1313
|
-
"es",
|
|
1314
|
-
"fr",
|
|
1315
|
-
"hi",
|
|
1316
|
-
"id",
|
|
1317
|
-
"it",
|
|
1318
|
-
"ja",
|
|
1319
|
-
"ko",
|
|
1320
|
-
"nl",
|
|
1321
|
-
"pl",
|
|
1322
|
-
"pt-BR",
|
|
1323
|
-
"ru",
|
|
1324
|
-
"tr",
|
|
1325
|
-
"vi",
|
|
1326
|
-
"zh-CN",
|
|
1327
|
-
"zh-TW"
|
|
1328
|
-
];
|
|
1329
|
-
var languagesSchema = import_zod12.z.enum(languages);
|
|
1330
|
-
var isLanguage = (value) => languages.includes(value);
|
|
1331
|
-
|
|
1332
|
-
// src/global-settings.ts
|
|
1333
|
-
var DEFAULT_WRITE_DELAY_MS = 1e3;
|
|
1334
|
-
var DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 5e4;
|
|
1335
|
-
var globalSettingsSchema = import_zod13.z.object({
|
|
1336
|
-
currentApiConfigName: import_zod13.z.string().optional(),
|
|
1337
|
-
listApiConfigMeta: import_zod13.z.array(providerSettingsEntrySchema).optional(),
|
|
1338
|
-
pinnedApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.boolean()).optional(),
|
|
1339
|
-
lastShownAnnouncementId: import_zod13.z.string().optional(),
|
|
1340
|
-
customInstructions: import_zod13.z.string().optional(),
|
|
1341
|
-
taskHistory: import_zod13.z.array(historyItemSchema).optional(),
|
|
1342
|
-
condensingApiConfigId: import_zod13.z.string().optional(),
|
|
1343
|
-
customCondensingPrompt: import_zod13.z.string().optional(),
|
|
1344
|
-
autoApprovalEnabled: import_zod13.z.boolean().optional(),
|
|
1345
|
-
alwaysAllowReadOnly: import_zod13.z.boolean().optional(),
|
|
1346
|
-
alwaysAllowReadOnlyOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
1347
|
-
alwaysAllowWrite: import_zod13.z.boolean().optional(),
|
|
1348
|
-
alwaysAllowWriteOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
1349
|
-
alwaysAllowWriteProtected: import_zod13.z.boolean().optional(),
|
|
1350
|
-
writeDelayMs: import_zod13.z.number().min(0).optional(),
|
|
1351
|
-
alwaysAllowBrowser: import_zod13.z.boolean().optional(),
|
|
1352
|
-
alwaysApproveResubmit: import_zod13.z.boolean().optional(),
|
|
1353
|
-
requestDelaySeconds: import_zod13.z.number().optional(),
|
|
1354
|
-
alwaysAllowMcp: import_zod13.z.boolean().optional(),
|
|
1355
|
-
alwaysAllowModeSwitch: import_zod13.z.boolean().optional(),
|
|
1356
|
-
alwaysAllowSubtasks: import_zod13.z.boolean().optional(),
|
|
1357
|
-
alwaysAllowExecute: import_zod13.z.boolean().optional(),
|
|
1358
|
-
alwaysAllowFollowupQuestions: import_zod13.z.boolean().optional(),
|
|
1359
|
-
followupAutoApproveTimeoutMs: import_zod13.z.number().optional(),
|
|
1360
|
-
alwaysAllowUpdateTodoList: import_zod13.z.boolean().optional(),
|
|
1361
|
-
allowedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1362
|
-
deniedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1363
|
-
commandExecutionTimeout: import_zod13.z.number().optional(),
|
|
1364
|
-
commandTimeoutAllowlist: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
1365
|
-
preventCompletionWithOpenTodos: import_zod13.z.boolean().optional(),
|
|
1366
|
-
allowedMaxRequests: import_zod13.z.number().nullish(),
|
|
1367
|
-
allowedMaxCost: import_zod13.z.number().nullish(),
|
|
1368
|
-
autoCondenseContext: import_zod13.z.boolean().optional(),
|
|
1369
|
-
autoCondenseContextPercent: import_zod13.z.number().optional(),
|
|
1370
|
-
maxConcurrentFileReads: import_zod13.z.number().optional(),
|
|
1371
|
-
/**
|
|
1372
|
-
* Whether to include diagnostic messages (errors, warnings) in tool outputs
|
|
1373
|
-
* @default true
|
|
1374
|
-
*/
|
|
1375
|
-
includeDiagnosticMessages: import_zod13.z.boolean().optional(),
|
|
1376
|
-
/**
|
|
1377
|
-
* Maximum number of diagnostic messages to include in tool outputs
|
|
1378
|
-
* @default 50
|
|
1379
|
-
*/
|
|
1380
|
-
maxDiagnosticMessages: import_zod13.z.number().optional(),
|
|
1381
|
-
browserToolEnabled: import_zod13.z.boolean().optional(),
|
|
1382
|
-
browserViewportSize: import_zod13.z.string().optional(),
|
|
1383
|
-
screenshotQuality: import_zod13.z.number().optional(),
|
|
1384
|
-
remoteBrowserEnabled: import_zod13.z.boolean().optional(),
|
|
1385
|
-
remoteBrowserHost: import_zod13.z.string().optional(),
|
|
1386
|
-
cachedChromeHostUrl: import_zod13.z.string().optional(),
|
|
1387
|
-
enableCheckpoints: import_zod13.z.boolean().optional(),
|
|
1388
|
-
ttsEnabled: import_zod13.z.boolean().optional(),
|
|
1389
|
-
ttsSpeed: import_zod13.z.number().optional(),
|
|
1390
|
-
soundEnabled: import_zod13.z.boolean().optional(),
|
|
1391
|
-
soundVolume: import_zod13.z.number().optional(),
|
|
1392
|
-
maxOpenTabsContext: import_zod13.z.number().optional(),
|
|
1393
|
-
maxWorkspaceFiles: import_zod13.z.number().optional(),
|
|
1394
|
-
showRooIgnoredFiles: import_zod13.z.boolean().optional(),
|
|
1395
|
-
maxReadFileLine: import_zod13.z.number().optional(),
|
|
1396
|
-
maxImageFileSize: import_zod13.z.number().optional(),
|
|
1397
|
-
maxTotalImageSize: import_zod13.z.number().optional(),
|
|
1398
|
-
terminalOutputLineLimit: import_zod13.z.number().optional(),
|
|
1399
|
-
terminalOutputCharacterLimit: import_zod13.z.number().optional(),
|
|
1400
|
-
terminalShellIntegrationTimeout: import_zod13.z.number().optional(),
|
|
1401
|
-
terminalShellIntegrationDisabled: import_zod13.z.boolean().optional(),
|
|
1402
|
-
terminalCommandDelay: import_zod13.z.number().optional(),
|
|
1403
|
-
terminalPowershellCounter: import_zod13.z.boolean().optional(),
|
|
1404
|
-
terminalZshClearEolMark: import_zod13.z.boolean().optional(),
|
|
1405
|
-
terminalZshOhMy: import_zod13.z.boolean().optional(),
|
|
1406
|
-
terminalZshP10k: import_zod13.z.boolean().optional(),
|
|
1407
|
-
terminalZdotdir: import_zod13.z.boolean().optional(),
|
|
1408
|
-
terminalCompressProgressBar: import_zod13.z.boolean().optional(),
|
|
1409
|
-
diagnosticsEnabled: import_zod13.z.boolean().optional(),
|
|
1410
|
-
rateLimitSeconds: import_zod13.z.number().optional(),
|
|
1411
|
-
diffEnabled: import_zod13.z.boolean().optional(),
|
|
1412
|
-
fuzzyMatchThreshold: import_zod13.z.number().optional(),
|
|
1413
|
-
experiments: experimentsSchema.optional(),
|
|
1414
|
-
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
1415
|
-
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
1416
|
-
language: languagesSchema.optional(),
|
|
1417
|
-
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
1418
|
-
mcpEnabled: import_zod13.z.boolean().optional(),
|
|
1419
|
-
enableMcpServerCreation: import_zod13.z.boolean().optional(),
|
|
1420
|
-
remoteControlEnabled: import_zod13.z.boolean().optional(),
|
|
1421
|
-
mode: import_zod13.z.string().optional(),
|
|
1422
|
-
modeApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.string()).optional(),
|
|
1423
|
-
customModes: import_zod13.z.array(modeConfigSchema).optional(),
|
|
1424
|
-
customModePrompts: customModePromptsSchema.optional(),
|
|
1425
|
-
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
1426
|
-
enhancementApiConfigId: import_zod13.z.string().optional(),
|
|
1427
|
-
includeTaskHistoryInEnhance: import_zod13.z.boolean().optional(),
|
|
1428
|
-
historyPreviewCollapsed: import_zod13.z.boolean().optional(),
|
|
1429
|
-
profileThresholds: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.number()).optional(),
|
|
1430
|
-
hasOpenedModeSelector: import_zod13.z.boolean().optional(),
|
|
1431
|
-
lastModeExportPath: import_zod13.z.string().optional(),
|
|
1432
|
-
lastModeImportPath: import_zod13.z.string().optional()
|
|
1433
|
-
});
|
|
1434
|
-
var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
1435
|
-
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
1436
|
-
var SECRET_STATE_KEYS = [
|
|
1437
|
-
"apiKey",
|
|
1438
|
-
"glamaApiKey",
|
|
1439
|
-
"openRouterApiKey",
|
|
1440
|
-
"awsAccessKey",
|
|
1441
|
-
"awsApiKey",
|
|
1442
|
-
"awsSecretKey",
|
|
1443
|
-
"awsSessionToken",
|
|
1444
|
-
"openAiApiKey",
|
|
1445
|
-
"geminiApiKey",
|
|
1446
|
-
"openAiNativeApiKey",
|
|
1447
|
-
"cerebrasApiKey",
|
|
1448
|
-
"deepSeekApiKey",
|
|
1449
|
-
"doubaoApiKey",
|
|
1450
|
-
"moonshotApiKey",
|
|
1451
|
-
"mistralApiKey",
|
|
1452
|
-
"unboundApiKey",
|
|
1453
|
-
"requestyApiKey",
|
|
1454
|
-
"xaiApiKey",
|
|
1455
|
-
"groqApiKey",
|
|
1456
|
-
"chutesApiKey",
|
|
1457
|
-
"litellmApiKey",
|
|
1458
|
-
"codeIndexOpenAiKey",
|
|
1459
|
-
"codeIndexQdrantApiKey",
|
|
1460
|
-
"codebaseIndexOpenAiCompatibleApiKey",
|
|
1461
|
-
"codebaseIndexGeminiApiKey",
|
|
1462
|
-
"codebaseIndexMistralApiKey",
|
|
1463
|
-
"huggingFaceApiKey",
|
|
1464
|
-
"sambaNovaApiKey",
|
|
1465
|
-
"zaiApiKey",
|
|
1466
|
-
"fireworksApiKey",
|
|
1467
|
-
"featherlessApiKey",
|
|
1468
|
-
"ioIntelligenceApiKey"
|
|
1469
|
-
];
|
|
1470
|
-
var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
|
|
1471
|
-
var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
|
|
1472
|
-
(key) => !SECRET_STATE_KEYS.includes(key)
|
|
1473
|
-
);
|
|
1474
|
-
var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
1475
|
-
var EVALS_SETTINGS = {
|
|
1476
|
-
apiProvider: "openrouter",
|
|
1477
|
-
openRouterUseMiddleOutTransform: false,
|
|
1478
|
-
lastShownAnnouncementId: "jul-09-2025-3-23-0",
|
|
1479
|
-
pinnedApiConfigs: {},
|
|
1480
|
-
autoApprovalEnabled: true,
|
|
1481
|
-
alwaysAllowReadOnly: true,
|
|
1482
|
-
alwaysAllowReadOnlyOutsideWorkspace: false,
|
|
1483
|
-
alwaysAllowWrite: true,
|
|
1484
|
-
alwaysAllowWriteOutsideWorkspace: false,
|
|
1485
|
-
alwaysAllowWriteProtected: false,
|
|
1486
|
-
writeDelayMs: 1e3,
|
|
1487
|
-
alwaysAllowBrowser: true,
|
|
1488
|
-
alwaysApproveResubmit: true,
|
|
1489
|
-
requestDelaySeconds: 10,
|
|
1490
|
-
alwaysAllowMcp: true,
|
|
1491
|
-
alwaysAllowModeSwitch: true,
|
|
1492
|
-
alwaysAllowSubtasks: true,
|
|
1493
|
-
alwaysAllowExecute: true,
|
|
1494
|
-
alwaysAllowFollowupQuestions: true,
|
|
1495
|
-
alwaysAllowUpdateTodoList: true,
|
|
1496
|
-
followupAutoApproveTimeoutMs: 0,
|
|
1497
|
-
allowedCommands: ["*"],
|
|
1498
|
-
commandExecutionTimeout: 20,
|
|
1499
|
-
commandTimeoutAllowlist: [],
|
|
1500
|
-
preventCompletionWithOpenTodos: false,
|
|
1501
|
-
browserToolEnabled: false,
|
|
1502
|
-
browserViewportSize: "900x600",
|
|
1503
|
-
screenshotQuality: 75,
|
|
1504
|
-
remoteBrowserEnabled: false,
|
|
1505
|
-
ttsEnabled: false,
|
|
1506
|
-
ttsSpeed: 1,
|
|
1507
|
-
soundEnabled: false,
|
|
1508
|
-
soundVolume: 0.5,
|
|
1509
|
-
terminalOutputLineLimit: 500,
|
|
1510
|
-
terminalOutputCharacterLimit: DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
|
|
1511
|
-
terminalShellIntegrationTimeout: 3e4,
|
|
1512
|
-
terminalCommandDelay: 0,
|
|
1513
|
-
terminalPowershellCounter: false,
|
|
1514
|
-
terminalZshOhMy: true,
|
|
1515
|
-
terminalZshClearEolMark: true,
|
|
1516
|
-
terminalZshP10k: false,
|
|
1517
|
-
terminalZdotdir: true,
|
|
1518
|
-
terminalCompressProgressBar: true,
|
|
1519
|
-
terminalShellIntegrationDisabled: true,
|
|
1520
|
-
diagnosticsEnabled: true,
|
|
1521
|
-
diffEnabled: true,
|
|
1522
|
-
fuzzyMatchThreshold: 1,
|
|
1523
|
-
enableCheckpoints: false,
|
|
1524
|
-
rateLimitSeconds: 0,
|
|
1525
|
-
maxOpenTabsContext: 20,
|
|
1526
|
-
maxWorkspaceFiles: 200,
|
|
1527
|
-
showRooIgnoredFiles: true,
|
|
1528
|
-
maxReadFileLine: -1,
|
|
1529
|
-
// -1 to enable full file reading.
|
|
1530
|
-
includeDiagnosticMessages: true,
|
|
1531
|
-
maxDiagnosticMessages: 50,
|
|
1532
|
-
language: "en",
|
|
1533
|
-
telemetrySetting: "enabled",
|
|
1534
|
-
mcpEnabled: false,
|
|
1535
|
-
remoteControlEnabled: false,
|
|
1536
|
-
mode: "code",
|
|
1537
|
-
// "architect",
|
|
1538
|
-
customModes: []
|
|
1539
|
-
};
|
|
1540
|
-
var EVALS_TIMEOUT = 5 * 60 * 1e3;
|
|
1541
|
-
|
|
1542
|
-
// src/ipc.ts
|
|
1543
|
-
var import_zod14 = require("zod");
|
|
1544
|
-
var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
|
|
1545
|
-
IpcMessageType2["Connect"] = "Connect";
|
|
1546
|
-
IpcMessageType2["Disconnect"] = "Disconnect";
|
|
1547
|
-
IpcMessageType2["Ack"] = "Ack";
|
|
1548
|
-
IpcMessageType2["TaskCommand"] = "TaskCommand";
|
|
1549
|
-
IpcMessageType2["TaskEvent"] = "TaskEvent";
|
|
1550
|
-
return IpcMessageType2;
|
|
1551
|
-
})(IpcMessageType || {});
|
|
1552
|
-
var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
1553
|
-
IpcOrigin2["Client"] = "client";
|
|
1554
|
-
IpcOrigin2["Server"] = "server";
|
|
1555
|
-
return IpcOrigin2;
|
|
1556
|
-
})(IpcOrigin || {});
|
|
1557
|
-
var ackSchema = import_zod14.z.object({
|
|
1558
|
-
clientId: import_zod14.z.string(),
|
|
1559
|
-
pid: import_zod14.z.number(),
|
|
1560
|
-
ppid: import_zod14.z.number()
|
|
1561
|
-
});
|
|
1562
|
-
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
1563
|
-
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
1564
|
-
TaskCommandName2["CancelTask"] = "CancelTask";
|
|
1565
|
-
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
1566
|
-
TaskCommandName2["ResumeTask"] = "ResumeTask";
|
|
1567
|
-
return TaskCommandName2;
|
|
1568
|
-
})(TaskCommandName || {});
|
|
1569
|
-
var taskCommandSchema = import_zod14.z.discriminatedUnion("commandName", [
|
|
1570
|
-
import_zod14.z.object({
|
|
1571
|
-
commandName: import_zod14.z.literal("StartNewTask" /* StartNewTask */),
|
|
1572
|
-
data: import_zod14.z.object({
|
|
1573
|
-
configuration: rooCodeSettingsSchema,
|
|
1574
|
-
text: import_zod14.z.string(),
|
|
1575
|
-
images: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
1576
|
-
newTab: import_zod14.z.boolean().optional()
|
|
1577
|
-
})
|
|
1578
|
-
}),
|
|
1579
|
-
import_zod14.z.object({
|
|
1580
|
-
commandName: import_zod14.z.literal("CancelTask" /* CancelTask */),
|
|
1581
|
-
data: import_zod14.z.string()
|
|
1582
|
-
}),
|
|
1583
|
-
import_zod14.z.object({
|
|
1584
|
-
commandName: import_zod14.z.literal("CloseTask" /* CloseTask */),
|
|
1585
|
-
data: import_zod14.z.string()
|
|
1586
|
-
}),
|
|
1587
|
-
import_zod14.z.object({
|
|
1588
|
-
commandName: import_zod14.z.literal("ResumeTask" /* ResumeTask */),
|
|
1589
|
-
data: import_zod14.z.string()
|
|
1590
|
-
})
|
|
1591
|
-
]);
|
|
1592
|
-
var ipcMessageSchema = import_zod14.z.discriminatedUnion("type", [
|
|
1593
|
-
import_zod14.z.object({
|
|
1594
|
-
type: import_zod14.z.literal("Ack" /* Ack */),
|
|
1595
|
-
origin: import_zod14.z.literal("server" /* Server */),
|
|
1596
|
-
data: ackSchema
|
|
1597
|
-
}),
|
|
1598
|
-
import_zod14.z.object({
|
|
1599
|
-
type: import_zod14.z.literal("TaskCommand" /* TaskCommand */),
|
|
1600
|
-
origin: import_zod14.z.literal("client" /* Client */),
|
|
1601
|
-
clientId: import_zod14.z.string(),
|
|
1602
|
-
data: taskCommandSchema
|
|
1603
|
-
}),
|
|
1604
|
-
import_zod14.z.object({
|
|
1605
|
-
type: import_zod14.z.literal("TaskEvent" /* TaskEvent */),
|
|
1606
|
-
origin: import_zod14.z.literal("server" /* Server */),
|
|
1607
|
-
relayClientId: import_zod14.z.string().optional(),
|
|
1608
|
-
data: taskEventSchema
|
|
1609
|
-
})
|
|
1610
|
-
]);
|
|
1611
|
-
|
|
1612
|
-
// src/marketplace.ts
|
|
1613
|
-
var import_zod15 = require("zod");
|
|
1614
|
-
var mcpParameterSchema = import_zod15.z.object({
|
|
1615
|
-
name: import_zod15.z.string().min(1),
|
|
1616
|
-
key: import_zod15.z.string().min(1),
|
|
1617
|
-
placeholder: import_zod15.z.string().optional(),
|
|
1618
|
-
optional: import_zod15.z.boolean().optional().default(false)
|
|
1619
|
-
});
|
|
1620
|
-
var mcpInstallationMethodSchema = import_zod15.z.object({
|
|
1621
|
-
name: import_zod15.z.string().min(1),
|
|
1622
|
-
content: import_zod15.z.string().min(1),
|
|
1623
|
-
parameters: import_zod15.z.array(mcpParameterSchema).optional(),
|
|
1624
|
-
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
1625
|
-
});
|
|
1626
|
-
var marketplaceItemTypeSchema = import_zod15.z.enum(["mode", "mcp"]);
|
|
1627
|
-
var baseMarketplaceItemSchema = import_zod15.z.object({
|
|
1628
|
-
id: import_zod15.z.string().min(1),
|
|
1629
|
-
name: import_zod15.z.string().min(1, "Name is required"),
|
|
1630
|
-
description: import_zod15.z.string(),
|
|
1631
|
-
author: import_zod15.z.string().optional(),
|
|
1632
|
-
authorUrl: import_zod15.z.string().url("Author URL must be a valid URL").optional(),
|
|
1633
|
-
tags: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
1634
|
-
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
1635
|
-
});
|
|
1636
|
-
var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1637
|
-
content: import_zod15.z.string().min(1)
|
|
1638
|
-
// YAML content for modes
|
|
1639
|
-
});
|
|
1640
|
-
var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
1641
|
-
url: import_zod15.z.string().url(),
|
|
1642
|
-
// Required url field
|
|
1643
|
-
content: import_zod15.z.union([import_zod15.z.string().min(1), import_zod15.z.array(mcpInstallationMethodSchema)]),
|
|
1644
|
-
// Single config or array of methods
|
|
1645
|
-
parameters: import_zod15.z.array(mcpParameterSchema).optional()
|
|
1646
|
-
});
|
|
1647
|
-
var marketplaceItemSchema = import_zod15.z.discriminatedUnion("type", [
|
|
1648
|
-
// Mode marketplace item
|
|
1649
|
-
modeMarketplaceItemSchema.extend({
|
|
1650
|
-
type: import_zod15.z.literal("mode")
|
|
1651
|
-
}),
|
|
1652
|
-
// MCP marketplace item
|
|
1653
|
-
mcpMarketplaceItemSchema.extend({
|
|
1654
|
-
type: import_zod15.z.literal("mcp")
|
|
1655
|
-
})
|
|
1656
|
-
]);
|
|
1657
|
-
var installMarketplaceItemOptionsSchema = import_zod15.z.object({
|
|
1658
|
-
target: import_zod15.z.enum(["global", "project"]).optional().default("project"),
|
|
1659
|
-
parameters: import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any()).optional()
|
|
1660
|
-
});
|
|
1661
|
-
|
|
1662
|
-
// src/mcp.ts
|
|
1663
|
-
var import_zod16 = require("zod");
|
|
1664
|
-
var mcpExecutionStatusSchema = import_zod16.z.discriminatedUnion("status", [
|
|
1665
|
-
import_zod16.z.object({
|
|
1666
|
-
executionId: import_zod16.z.string(),
|
|
1667
|
-
status: import_zod16.z.literal("started"),
|
|
1668
|
-
serverName: import_zod16.z.string(),
|
|
1669
|
-
toolName: import_zod16.z.string()
|
|
1670
|
-
}),
|
|
1671
|
-
import_zod16.z.object({
|
|
1672
|
-
executionId: import_zod16.z.string(),
|
|
1673
|
-
status: import_zod16.z.literal("output"),
|
|
1674
|
-
response: import_zod16.z.string()
|
|
1675
|
-
}),
|
|
1676
|
-
import_zod16.z.object({
|
|
1677
|
-
executionId: import_zod16.z.string(),
|
|
1678
|
-
status: import_zod16.z.literal("completed"),
|
|
1679
|
-
response: import_zod16.z.string().optional()
|
|
1680
|
-
}),
|
|
1681
|
-
import_zod16.z.object({
|
|
1682
|
-
executionId: import_zod16.z.string(),
|
|
1683
|
-
status: import_zod16.z.literal("error"),
|
|
1684
|
-
error: import_zod16.z.string().optional()
|
|
1685
|
-
})
|
|
1686
|
-
]);
|
|
1687
|
-
|
|
1688
|
-
// src/single-file-read-models.ts
|
|
1689
|
-
var SINGLE_FILE_READ_MODELS = /* @__PURE__ */ new Set(["roo/sonic"]);
|
|
1690
|
-
function shouldUseSingleFileRead(modelId) {
|
|
1691
|
-
if (SINGLE_FILE_READ_MODELS.has(modelId)) {
|
|
1692
|
-
return true;
|
|
1693
|
-
}
|
|
1694
|
-
const patterns = Array.from(SINGLE_FILE_READ_MODELS);
|
|
1695
|
-
for (const pattern of patterns) {
|
|
1696
|
-
if (pattern.endsWith("*") && modelId.startsWith(pattern.slice(0, -1))) {
|
|
1697
|
-
return true;
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
return false;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
// src/task.ts
|
|
1704
|
-
var import_zod17 = require("zod");
|
|
1705
|
-
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
1706
|
-
TaskStatus2["Running"] = "running";
|
|
1707
|
-
TaskStatus2["Interactive"] = "interactive";
|
|
1708
|
-
TaskStatus2["Resumable"] = "resumable";
|
|
1709
|
-
TaskStatus2["Idle"] = "idle";
|
|
1710
|
-
TaskStatus2["None"] = "none";
|
|
1711
|
-
return TaskStatus2;
|
|
1712
|
-
})(TaskStatus || {});
|
|
1713
|
-
var taskMetadataSchema = import_zod17.z.object({
|
|
1714
|
-
task: import_zod17.z.string().optional(),
|
|
1715
|
-
images: import_zod17.z.array(import_zod17.z.string()).optional()
|
|
1716
|
-
});
|
|
1717
|
-
|
|
1718
|
-
// src/todo.ts
|
|
1719
|
-
var import_zod18 = require("zod");
|
|
1720
|
-
var todoStatusSchema = import_zod18.z.enum(["pending", "in_progress", "completed"]);
|
|
1721
|
-
var todoItemSchema = import_zod18.z.object({
|
|
1722
|
-
id: import_zod18.z.string(),
|
|
1723
|
-
content: import_zod18.z.string(),
|
|
1724
|
-
status: todoStatusSchema
|
|
1725
|
-
});
|
|
1726
|
-
|
|
1727
|
-
// src/terminal.ts
|
|
1728
|
-
var import_zod19 = require("zod");
|
|
1729
|
-
var commandExecutionStatusSchema = import_zod19.z.discriminatedUnion("status", [
|
|
1730
|
-
import_zod19.z.object({
|
|
1731
|
-
executionId: import_zod19.z.string(),
|
|
1732
|
-
status: import_zod19.z.literal("started"),
|
|
1733
|
-
pid: import_zod19.z.number().optional(),
|
|
1734
|
-
command: import_zod19.z.string()
|
|
1735
|
-
}),
|
|
1736
|
-
import_zod19.z.object({
|
|
1737
|
-
executionId: import_zod19.z.string(),
|
|
1738
|
-
status: import_zod19.z.literal("output"),
|
|
1739
|
-
output: import_zod19.z.string()
|
|
1740
|
-
}),
|
|
1741
|
-
import_zod19.z.object({
|
|
1742
|
-
executionId: import_zod19.z.string(),
|
|
1743
|
-
status: import_zod19.z.literal("exited"),
|
|
1744
|
-
exitCode: import_zod19.z.number().optional()
|
|
1745
|
-
}),
|
|
1746
|
-
import_zod19.z.object({
|
|
1747
|
-
executionId: import_zod19.z.string(),
|
|
1748
|
-
status: import_zod19.z.literal("fallback")
|
|
1749
|
-
}),
|
|
1750
|
-
import_zod19.z.object({
|
|
1751
|
-
executionId: import_zod19.z.string(),
|
|
1752
|
-
status: import_zod19.z.literal("timeout")
|
|
1753
|
-
})
|
|
1754
|
-
]);
|
|
1755
|
-
|
|
1756
664
|
// src/providers/anthropic.ts
|
|
1757
665
|
var anthropicDefaultModelId = "claude-sonnet-4-20250514";
|
|
1758
666
|
var anthropicModels = {
|
|
@@ -2334,6 +1242,7 @@ var BEDROCK_REGIONS = [
|
|
|
2334
1242
|
{ value: "us-gov-east-1", label: "us-gov-east-1" },
|
|
2335
1243
|
{ value: "us-gov-west-1", label: "us-gov-west-1" }
|
|
2336
1244
|
].sort((a, b) => a.value.localeCompare(b.value));
|
|
1245
|
+
var BEDROCK_CLAUDE_SONNET_4_MODEL_ID = "anthropic.claude-sonnet-4-20250514-v1:0";
|
|
2337
1246
|
|
|
2338
1247
|
// src/providers/cerebras.ts
|
|
2339
1248
|
var cerebrasDefaultModelId = "qwen-3-coder-480b-free";
|
|
@@ -2713,49 +1622,238 @@ var claudeCodeModels = {
|
|
|
2713
1622
|
"claude-3-5-haiku-20241022": {
|
|
2714
1623
|
...anthropicModels["claude-3-5-haiku-20241022"],
|
|
2715
1624
|
supportsImages: false,
|
|
2716
|
-
supportsPromptCache: true,
|
|
2717
|
-
// Claude Code does report cache tokens
|
|
2718
|
-
supportsReasoningEffort: false,
|
|
2719
|
-
supportsReasoningBudget: false,
|
|
2720
|
-
requiredReasoningBudget: false
|
|
2721
|
-
}
|
|
2722
|
-
};
|
|
2723
|
-
|
|
2724
|
-
// src/providers/deepseek.ts
|
|
2725
|
-
var deepSeekDefaultModelId = "deepseek-chat";
|
|
2726
|
-
var deepSeekModels = {
|
|
2727
|
-
"deepseek-chat": {
|
|
2728
|
-
maxTokens: 8192,
|
|
2729
|
-
contextWindow: 64e3,
|
|
1625
|
+
supportsPromptCache: true,
|
|
1626
|
+
// Claude Code does report cache tokens
|
|
1627
|
+
supportsReasoningEffort: false,
|
|
1628
|
+
supportsReasoningBudget: false,
|
|
1629
|
+
requiredReasoningBudget: false
|
|
1630
|
+
}
|
|
1631
|
+
};
|
|
1632
|
+
|
|
1633
|
+
// src/providers/deepseek.ts
|
|
1634
|
+
var deepSeekDefaultModelId = "deepseek-chat";
|
|
1635
|
+
var deepSeekModels = {
|
|
1636
|
+
"deepseek-chat": {
|
|
1637
|
+
maxTokens: 8192,
|
|
1638
|
+
contextWindow: 64e3,
|
|
1639
|
+
supportsImages: false,
|
|
1640
|
+
supportsPromptCache: true,
|
|
1641
|
+
inputPrice: 0.27,
|
|
1642
|
+
// $0.27 per million tokens (cache miss)
|
|
1643
|
+
outputPrice: 1.1,
|
|
1644
|
+
// $1.10 per million tokens
|
|
1645
|
+
cacheWritesPrice: 0.27,
|
|
1646
|
+
// $0.27 per million tokens (cache miss)
|
|
1647
|
+
cacheReadsPrice: 0.07,
|
|
1648
|
+
// $0.07 per million tokens (cache hit).
|
|
1649
|
+
description: `DeepSeek-V3 achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally.`
|
|
1650
|
+
},
|
|
1651
|
+
"deepseek-reasoner": {
|
|
1652
|
+
maxTokens: 8192,
|
|
1653
|
+
contextWindow: 64e3,
|
|
1654
|
+
supportsImages: false,
|
|
1655
|
+
supportsPromptCache: true,
|
|
1656
|
+
inputPrice: 0.55,
|
|
1657
|
+
// $0.55 per million tokens (cache miss)
|
|
1658
|
+
outputPrice: 2.19,
|
|
1659
|
+
// $2.19 per million tokens
|
|
1660
|
+
cacheWritesPrice: 0.55,
|
|
1661
|
+
// $0.55 per million tokens (cache miss)
|
|
1662
|
+
cacheReadsPrice: 0.14,
|
|
1663
|
+
// $0.14 per million tokens (cache hit)
|
|
1664
|
+
description: `DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks. Supports Chain of Thought reasoning with up to 32K tokens.`
|
|
1665
|
+
}
|
|
1666
|
+
};
|
|
1667
|
+
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6;
|
|
1668
|
+
|
|
1669
|
+
// src/providers/doubao.ts
|
|
1670
|
+
var doubaoDefaultModelId = "doubao-seed-1-6-250615";
|
|
1671
|
+
var doubaoModels = {
|
|
1672
|
+
"doubao-seed-1-6-250615": {
|
|
1673
|
+
maxTokens: 32768,
|
|
1674
|
+
contextWindow: 128e3,
|
|
1675
|
+
supportsImages: true,
|
|
1676
|
+
supportsPromptCache: true,
|
|
1677
|
+
inputPrice: 1e-4,
|
|
1678
|
+
// $0.0001 per million tokens (cache miss)
|
|
1679
|
+
outputPrice: 4e-4,
|
|
1680
|
+
// $0.0004 per million tokens
|
|
1681
|
+
cacheWritesPrice: 1e-4,
|
|
1682
|
+
// $0.0001 per million tokens (cache miss)
|
|
1683
|
+
cacheReadsPrice: 2e-5,
|
|
1684
|
+
// $0.00002 per million tokens (cache hit)
|
|
1685
|
+
description: `Doubao Seed 1.6 is a powerful model designed for high-performance tasks with extensive context handling.`
|
|
1686
|
+
},
|
|
1687
|
+
"doubao-seed-1-6-thinking-250715": {
|
|
1688
|
+
maxTokens: 32768,
|
|
1689
|
+
contextWindow: 128e3,
|
|
1690
|
+
supportsImages: true,
|
|
1691
|
+
supportsPromptCache: true,
|
|
1692
|
+
inputPrice: 2e-4,
|
|
1693
|
+
// $0.0002 per million tokens
|
|
1694
|
+
outputPrice: 8e-4,
|
|
1695
|
+
// $0.0008 per million tokens
|
|
1696
|
+
cacheWritesPrice: 2e-4,
|
|
1697
|
+
// $0.0002 per million
|
|
1698
|
+
cacheReadsPrice: 4e-5,
|
|
1699
|
+
// $0.00004 per million tokens (cache hit)
|
|
1700
|
+
description: `Doubao Seed 1.6 Thinking is optimized for reasoning tasks, providing enhanced performance in complex problem-solving scenarios.`
|
|
1701
|
+
},
|
|
1702
|
+
"doubao-seed-1-6-flash-250715": {
|
|
1703
|
+
maxTokens: 32768,
|
|
1704
|
+
contextWindow: 128e3,
|
|
1705
|
+
supportsImages: true,
|
|
1706
|
+
supportsPromptCache: true,
|
|
1707
|
+
inputPrice: 15e-5,
|
|
1708
|
+
// $0.00015 per million tokens
|
|
1709
|
+
outputPrice: 6e-4,
|
|
1710
|
+
// $0.0006 per million tokens
|
|
1711
|
+
cacheWritesPrice: 15e-5,
|
|
1712
|
+
// $0.00015 per million
|
|
1713
|
+
cacheReadsPrice: 3e-5,
|
|
1714
|
+
// $0.00003 per million tokens (cache hit)
|
|
1715
|
+
description: `Doubao Seed 1.6 Flash is tailored for speed and efficiency, making it ideal for applications requiring rapid responses.`
|
|
1716
|
+
}
|
|
1717
|
+
};
|
|
1718
|
+
var doubaoDefaultModelInfo = doubaoModels[doubaoDefaultModelId];
|
|
1719
|
+
var DOUBAO_API_BASE_URL = "https://ark.cn-beijing.volces.com/api/v3";
|
|
1720
|
+
var DOUBAO_API_CHAT_PATH = "/chat/completions";
|
|
1721
|
+
|
|
1722
|
+
// src/providers/featherless.ts
|
|
1723
|
+
var featherlessModels = {
|
|
1724
|
+
"deepseek-ai/DeepSeek-V3-0324": {
|
|
1725
|
+
maxTokens: 4096,
|
|
1726
|
+
contextWindow: 32678,
|
|
1727
|
+
supportsImages: false,
|
|
1728
|
+
supportsPromptCache: false,
|
|
1729
|
+
inputPrice: 0,
|
|
1730
|
+
outputPrice: 0,
|
|
1731
|
+
description: "DeepSeek V3 0324 model."
|
|
1732
|
+
},
|
|
1733
|
+
"deepseek-ai/DeepSeek-R1-0528": {
|
|
1734
|
+
maxTokens: 4096,
|
|
1735
|
+
contextWindow: 32678,
|
|
1736
|
+
supportsImages: false,
|
|
1737
|
+
supportsPromptCache: false,
|
|
1738
|
+
inputPrice: 0,
|
|
1739
|
+
outputPrice: 0,
|
|
1740
|
+
description: "DeepSeek R1 0528 model."
|
|
1741
|
+
},
|
|
1742
|
+
"moonshotai/Kimi-K2-Instruct": {
|
|
1743
|
+
maxTokens: 4096,
|
|
1744
|
+
contextWindow: 32678,
|
|
1745
|
+
supportsImages: false,
|
|
1746
|
+
supportsPromptCache: false,
|
|
1747
|
+
inputPrice: 0,
|
|
1748
|
+
outputPrice: 0,
|
|
1749
|
+
description: "Kimi K2 Instruct model."
|
|
1750
|
+
},
|
|
1751
|
+
"openai/gpt-oss-120b": {
|
|
1752
|
+
maxTokens: 4096,
|
|
1753
|
+
contextWindow: 32678,
|
|
1754
|
+
supportsImages: false,
|
|
1755
|
+
supportsPromptCache: false,
|
|
1756
|
+
inputPrice: 0,
|
|
1757
|
+
outputPrice: 0,
|
|
1758
|
+
description: "GPT-OSS 120B model."
|
|
1759
|
+
},
|
|
1760
|
+
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
|
|
1761
|
+
maxTokens: 4096,
|
|
1762
|
+
contextWindow: 32678,
|
|
1763
|
+
supportsImages: false,
|
|
1764
|
+
supportsPromptCache: false,
|
|
1765
|
+
inputPrice: 0,
|
|
1766
|
+
outputPrice: 0,
|
|
1767
|
+
description: "Qwen3 Coder 480B A35B Instruct model."
|
|
1768
|
+
}
|
|
1769
|
+
};
|
|
1770
|
+
var featherlessDefaultModelId = "deepseek-ai/DeepSeek-R1-0528";
|
|
1771
|
+
|
|
1772
|
+
// src/providers/fireworks.ts
|
|
1773
|
+
var fireworksDefaultModelId = "accounts/fireworks/models/kimi-k2-instruct";
|
|
1774
|
+
var fireworksModels = {
|
|
1775
|
+
"accounts/fireworks/models/kimi-k2-instruct": {
|
|
1776
|
+
maxTokens: 16384,
|
|
1777
|
+
contextWindow: 128e3,
|
|
1778
|
+
supportsImages: false,
|
|
1779
|
+
supportsPromptCache: false,
|
|
1780
|
+
inputPrice: 0.6,
|
|
1781
|
+
outputPrice: 2.5,
|
|
1782
|
+
description: "Kimi K2 is a state-of-the-art mixture-of-experts (MoE) language model with 32 billion activated parameters and 1 trillion total parameters. Trained with the Muon optimizer, Kimi K2 achieves exceptional performance across frontier knowledge, reasoning, and coding tasks while being meticulously optimized for agentic capabilities."
|
|
1783
|
+
},
|
|
1784
|
+
"accounts/fireworks/models/qwen3-235b-a22b-instruct-2507": {
|
|
1785
|
+
maxTokens: 32768,
|
|
1786
|
+
contextWindow: 256e3,
|
|
1787
|
+
supportsImages: false,
|
|
1788
|
+
supportsPromptCache: false,
|
|
1789
|
+
inputPrice: 0.22,
|
|
1790
|
+
outputPrice: 0.88,
|
|
1791
|
+
description: "Latest Qwen3 thinking model, competitive against the best closed source models in Jul 2025."
|
|
1792
|
+
},
|
|
1793
|
+
"accounts/fireworks/models/qwen3-coder-480b-a35b-instruct": {
|
|
1794
|
+
maxTokens: 32768,
|
|
1795
|
+
contextWindow: 256e3,
|
|
1796
|
+
supportsImages: false,
|
|
1797
|
+
supportsPromptCache: false,
|
|
1798
|
+
inputPrice: 0.45,
|
|
1799
|
+
outputPrice: 1.8,
|
|
1800
|
+
description: "Qwen3's most agentic code model to date."
|
|
1801
|
+
},
|
|
1802
|
+
"accounts/fireworks/models/deepseek-r1-0528": {
|
|
1803
|
+
maxTokens: 20480,
|
|
1804
|
+
contextWindow: 16e4,
|
|
1805
|
+
supportsImages: false,
|
|
1806
|
+
supportsPromptCache: false,
|
|
1807
|
+
inputPrice: 3,
|
|
1808
|
+
outputPrice: 8,
|
|
1809
|
+
description: "05/28 updated checkpoint of Deepseek R1. Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. Compared to the previous version, the upgraded model shows significant improvements in handling complex reasoning tasks, and this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
|
|
1810
|
+
},
|
|
1811
|
+
"accounts/fireworks/models/deepseek-v3": {
|
|
1812
|
+
maxTokens: 16384,
|
|
1813
|
+
contextWindow: 128e3,
|
|
1814
|
+
supportsImages: false,
|
|
1815
|
+
supportsPromptCache: false,
|
|
1816
|
+
inputPrice: 0.9,
|
|
1817
|
+
outputPrice: 0.9,
|
|
1818
|
+
description: "A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
|
|
1819
|
+
},
|
|
1820
|
+
"accounts/fireworks/models/glm-4p5": {
|
|
1821
|
+
maxTokens: 16384,
|
|
1822
|
+
contextWindow: 128e3,
|
|
2730
1823
|
supportsImages: false,
|
|
2731
|
-
supportsPromptCache:
|
|
2732
|
-
inputPrice: 0.
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
// $1.10 per million tokens
|
|
2736
|
-
cacheWritesPrice: 0.27,
|
|
2737
|
-
// $0.27 per million tokens (cache miss)
|
|
2738
|
-
cacheReadsPrice: 0.07,
|
|
2739
|
-
// $0.07 per million tokens (cache hit).
|
|
2740
|
-
description: `DeepSeek-V3 achieves a significant breakthrough in inference speed over previous models. It tops the leaderboard among open-source models and rivals the most advanced closed-source models globally.`
|
|
1824
|
+
supportsPromptCache: false,
|
|
1825
|
+
inputPrice: 0.55,
|
|
1826
|
+
outputPrice: 2.19,
|
|
1827
|
+
description: "Z.ai GLM-4.5 with 355B total parameters and 32B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
|
|
2741
1828
|
},
|
|
2742
|
-
"
|
|
2743
|
-
maxTokens:
|
|
2744
|
-
contextWindow:
|
|
1829
|
+
"accounts/fireworks/models/glm-4p5-air": {
|
|
1830
|
+
maxTokens: 16384,
|
|
1831
|
+
contextWindow: 128e3,
|
|
2745
1832
|
supportsImages: false,
|
|
2746
|
-
supportsPromptCache:
|
|
1833
|
+
supportsPromptCache: false,
|
|
2747
1834
|
inputPrice: 0.55,
|
|
2748
|
-
// $0.55 per million tokens (cache miss)
|
|
2749
1835
|
outputPrice: 2.19,
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
1836
|
+
description: "Z.ai GLM-4.5-Air with 106B total parameters and 12B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
|
|
1837
|
+
},
|
|
1838
|
+
"accounts/fireworks/models/gpt-oss-20b": {
|
|
1839
|
+
maxTokens: 16384,
|
|
1840
|
+
contextWindow: 128e3,
|
|
1841
|
+
supportsImages: false,
|
|
1842
|
+
supportsPromptCache: false,
|
|
1843
|
+
inputPrice: 0.07,
|
|
1844
|
+
outputPrice: 0.3,
|
|
1845
|
+
description: "OpenAI gpt-oss-20b: Compact model for local/edge deployments. Optimized for low-latency and resource-constrained environments with chain-of-thought output, adjustable reasoning, and agentic workflows."
|
|
1846
|
+
},
|
|
1847
|
+
"accounts/fireworks/models/gpt-oss-120b": {
|
|
1848
|
+
maxTokens: 16384,
|
|
1849
|
+
contextWindow: 128e3,
|
|
1850
|
+
supportsImages: false,
|
|
1851
|
+
supportsPromptCache: false,
|
|
1852
|
+
inputPrice: 0.15,
|
|
1853
|
+
outputPrice: 0.6,
|
|
1854
|
+
description: "OpenAI gpt-oss-120b: Production-grade, general-purpose model that fits on a single H100 GPU. Features complex reasoning, configurable effort, full chain-of-thought transparency, and supports function calling, tool use, and structured outputs."
|
|
2756
1855
|
}
|
|
2757
1856
|
};
|
|
2758
|
-
var DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6;
|
|
2759
1857
|
|
|
2760
1858
|
// src/providers/gemini.ts
|
|
2761
1859
|
var geminiDefaultModelId = "gemini-2.0-flash-001";
|
|
@@ -3738,6 +2836,20 @@ var requestyDefaultModelInfo = {
|
|
|
3738
2836
|
description: "The best coding model, optimized by Requesty, and automatically routed to the fastest provider. Claude 4 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities."
|
|
3739
2837
|
};
|
|
3740
2838
|
|
|
2839
|
+
// src/providers/roo.ts
|
|
2840
|
+
var rooDefaultModelId = "roo/sonic";
|
|
2841
|
+
var rooModels = {
|
|
2842
|
+
"roo/sonic": {
|
|
2843
|
+
maxTokens: 16384,
|
|
2844
|
+
contextWindow: 262144,
|
|
2845
|
+
supportsImages: false,
|
|
2846
|
+
supportsPromptCache: true,
|
|
2847
|
+
inputPrice: 0,
|
|
2848
|
+
outputPrice: 0,
|
|
2849
|
+
description: "A stealth reasoning model that is blazing fast and excels at agentic coding, accessible for free through Roo Code Cloud for a limited time. (Note: prompts and completions are logged by the model creator and used to improve the model.)"
|
|
2850
|
+
}
|
|
2851
|
+
};
|
|
2852
|
+
|
|
3741
2853
|
// src/providers/sambanova.ts
|
|
3742
2854
|
var sambaNovaDefaultModelId = "Meta-Llama-3.3-70B-Instruct";
|
|
3743
2855
|
var sambaNovaModels = {
|
|
@@ -4291,431 +3403,1410 @@ var vscodeLlmModels = {
|
|
|
4291
3403
|
supportsToolCalling: true,
|
|
4292
3404
|
maxInputTokens: 108637
|
|
4293
3405
|
},
|
|
4294
|
-
"o4-mini": {
|
|
4295
|
-
contextWindow: 128e3,
|
|
3406
|
+
"o4-mini": {
|
|
3407
|
+
contextWindow: 128e3,
|
|
3408
|
+
supportsImages: false,
|
|
3409
|
+
supportsPromptCache: false,
|
|
3410
|
+
inputPrice: 0,
|
|
3411
|
+
outputPrice: 0,
|
|
3412
|
+
family: "o4-mini",
|
|
3413
|
+
version: "o4-mini-2025-04-16",
|
|
3414
|
+
name: "o4-mini (Preview)",
|
|
3415
|
+
supportsToolCalling: true,
|
|
3416
|
+
maxInputTokens: 111452
|
|
3417
|
+
},
|
|
3418
|
+
"gpt-4.1": {
|
|
3419
|
+
contextWindow: 128e3,
|
|
3420
|
+
supportsImages: true,
|
|
3421
|
+
supportsPromptCache: false,
|
|
3422
|
+
inputPrice: 0,
|
|
3423
|
+
outputPrice: 0,
|
|
3424
|
+
family: "gpt-4.1",
|
|
3425
|
+
version: "gpt-4.1-2025-04-14",
|
|
3426
|
+
name: "GPT-4.1 (Preview)",
|
|
3427
|
+
supportsToolCalling: true,
|
|
3428
|
+
maxInputTokens: 111452
|
|
3429
|
+
},
|
|
3430
|
+
"gpt-5-mini": {
|
|
3431
|
+
contextWindow: 128e3,
|
|
3432
|
+
supportsImages: true,
|
|
3433
|
+
supportsPromptCache: false,
|
|
3434
|
+
inputPrice: 0,
|
|
3435
|
+
outputPrice: 0,
|
|
3436
|
+
family: "gpt-5-mini",
|
|
3437
|
+
version: "gpt-5-mini",
|
|
3438
|
+
name: "GPT-5 mini (Preview)",
|
|
3439
|
+
supportsToolCalling: true,
|
|
3440
|
+
maxInputTokens: 108637
|
|
3441
|
+
},
|
|
3442
|
+
"gpt-5": {
|
|
3443
|
+
contextWindow: 128e3,
|
|
3444
|
+
supportsImages: true,
|
|
3445
|
+
supportsPromptCache: false,
|
|
3446
|
+
inputPrice: 0,
|
|
3447
|
+
outputPrice: 0,
|
|
3448
|
+
family: "gpt-5",
|
|
3449
|
+
version: "gpt-5",
|
|
3450
|
+
name: "GPT-5 (Preview)",
|
|
3451
|
+
supportsToolCalling: true,
|
|
3452
|
+
maxInputTokens: 108637
|
|
3453
|
+
}
|
|
3454
|
+
};
|
|
3455
|
+
|
|
3456
|
+
// src/providers/xai.ts
|
|
3457
|
+
var xaiDefaultModelId = "grok-4";
|
|
3458
|
+
var xaiModels = {
|
|
3459
|
+
"grok-4": {
|
|
3460
|
+
maxTokens: 8192,
|
|
3461
|
+
contextWindow: 256e3,
|
|
3462
|
+
supportsImages: true,
|
|
3463
|
+
supportsPromptCache: true,
|
|
3464
|
+
inputPrice: 3,
|
|
3465
|
+
outputPrice: 15,
|
|
3466
|
+
cacheWritesPrice: 0.75,
|
|
3467
|
+
cacheReadsPrice: 0.75,
|
|
3468
|
+
description: "xAI's Grok-4 model with 256K context window"
|
|
3469
|
+
},
|
|
3470
|
+
"grok-3": {
|
|
3471
|
+
maxTokens: 8192,
|
|
3472
|
+
contextWindow: 131072,
|
|
3473
|
+
supportsImages: false,
|
|
3474
|
+
supportsPromptCache: true,
|
|
3475
|
+
inputPrice: 3,
|
|
3476
|
+
outputPrice: 15,
|
|
3477
|
+
cacheWritesPrice: 0.75,
|
|
3478
|
+
cacheReadsPrice: 0.75,
|
|
3479
|
+
description: "xAI's Grok-3 model with 128K context window"
|
|
3480
|
+
},
|
|
3481
|
+
"grok-3-fast": {
|
|
3482
|
+
maxTokens: 8192,
|
|
3483
|
+
contextWindow: 131072,
|
|
3484
|
+
supportsImages: false,
|
|
3485
|
+
supportsPromptCache: true,
|
|
3486
|
+
inputPrice: 5,
|
|
3487
|
+
outputPrice: 25,
|
|
3488
|
+
cacheWritesPrice: 1.25,
|
|
3489
|
+
cacheReadsPrice: 1.25,
|
|
3490
|
+
description: "xAI's Grok-3 fast model with 128K context window"
|
|
3491
|
+
},
|
|
3492
|
+
"grok-3-mini": {
|
|
3493
|
+
maxTokens: 8192,
|
|
3494
|
+
contextWindow: 131072,
|
|
3495
|
+
supportsImages: false,
|
|
3496
|
+
supportsPromptCache: true,
|
|
3497
|
+
inputPrice: 0.3,
|
|
3498
|
+
outputPrice: 0.5,
|
|
3499
|
+
cacheWritesPrice: 0.07,
|
|
3500
|
+
cacheReadsPrice: 0.07,
|
|
3501
|
+
description: "xAI's Grok-3 mini model with 128K context window",
|
|
3502
|
+
supportsReasoningEffort: true
|
|
3503
|
+
},
|
|
3504
|
+
"grok-3-mini-fast": {
|
|
3505
|
+
maxTokens: 8192,
|
|
3506
|
+
contextWindow: 131072,
|
|
3507
|
+
supportsImages: false,
|
|
3508
|
+
supportsPromptCache: true,
|
|
3509
|
+
inputPrice: 0.6,
|
|
3510
|
+
outputPrice: 4,
|
|
3511
|
+
cacheWritesPrice: 0.15,
|
|
3512
|
+
cacheReadsPrice: 0.15,
|
|
3513
|
+
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
3514
|
+
supportsReasoningEffort: true
|
|
3515
|
+
},
|
|
3516
|
+
"grok-2-1212": {
|
|
3517
|
+
maxTokens: 8192,
|
|
3518
|
+
contextWindow: 131072,
|
|
3519
|
+
supportsImages: false,
|
|
3520
|
+
supportsPromptCache: false,
|
|
3521
|
+
inputPrice: 2,
|
|
3522
|
+
outputPrice: 10,
|
|
3523
|
+
description: "xAI's Grok-2 model (version 1212) with 128K context window"
|
|
3524
|
+
},
|
|
3525
|
+
"grok-2-vision-1212": {
|
|
3526
|
+
maxTokens: 8192,
|
|
3527
|
+
contextWindow: 32768,
|
|
3528
|
+
supportsImages: true,
|
|
3529
|
+
supportsPromptCache: false,
|
|
3530
|
+
inputPrice: 2,
|
|
3531
|
+
outputPrice: 10,
|
|
3532
|
+
description: "xAI's Grok-2 Vision model (version 1212) with image support and 32K context window"
|
|
3533
|
+
}
|
|
3534
|
+
};
|
|
3535
|
+
|
|
3536
|
+
// src/providers/zai.ts
|
|
3537
|
+
var internationalZAiDefaultModelId = "glm-4.5";
|
|
3538
|
+
var internationalZAiModels = {
|
|
3539
|
+
"glm-4.5": {
|
|
3540
|
+
maxTokens: 98304,
|
|
3541
|
+
contextWindow: 131072,
|
|
3542
|
+
supportsImages: false,
|
|
3543
|
+
supportsPromptCache: true,
|
|
3544
|
+
inputPrice: 0.6,
|
|
3545
|
+
outputPrice: 2.2,
|
|
3546
|
+
cacheWritesPrice: 0,
|
|
3547
|
+
cacheReadsPrice: 0.11,
|
|
3548
|
+
description: "GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k."
|
|
3549
|
+
},
|
|
3550
|
+
"glm-4.5-air": {
|
|
3551
|
+
maxTokens: 98304,
|
|
3552
|
+
contextWindow: 131072,
|
|
3553
|
+
supportsImages: false,
|
|
3554
|
+
supportsPromptCache: true,
|
|
3555
|
+
inputPrice: 0.2,
|
|
3556
|
+
outputPrice: 1.1,
|
|
3557
|
+
cacheWritesPrice: 0,
|
|
3558
|
+
cacheReadsPrice: 0.03,
|
|
3559
|
+
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models."
|
|
3560
|
+
}
|
|
3561
|
+
};
|
|
3562
|
+
var mainlandZAiDefaultModelId = "glm-4.5";
|
|
3563
|
+
var mainlandZAiModels = {
|
|
3564
|
+
"glm-4.5": {
|
|
3565
|
+
maxTokens: 98304,
|
|
3566
|
+
contextWindow: 131072,
|
|
3567
|
+
supportsImages: false,
|
|
3568
|
+
supportsPromptCache: true,
|
|
3569
|
+
inputPrice: 0.29,
|
|
3570
|
+
outputPrice: 1.14,
|
|
3571
|
+
cacheWritesPrice: 0,
|
|
3572
|
+
cacheReadsPrice: 0.057,
|
|
3573
|
+
description: "GLM-4.5 is Zhipu's latest featured model. Its comprehensive capabilities in reasoning, coding, and agent reach the state-of-the-art (SOTA) level among open-source models, with a context length of up to 128k.",
|
|
3574
|
+
tiers: [
|
|
3575
|
+
{
|
|
3576
|
+
contextWindow: 32e3,
|
|
3577
|
+
inputPrice: 0.21,
|
|
3578
|
+
outputPrice: 1,
|
|
3579
|
+
cacheReadsPrice: 0.043
|
|
3580
|
+
},
|
|
3581
|
+
{
|
|
3582
|
+
contextWindow: 128e3,
|
|
3583
|
+
inputPrice: 0.29,
|
|
3584
|
+
outputPrice: 1.14,
|
|
3585
|
+
cacheReadsPrice: 0.057
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
contextWindow: Infinity,
|
|
3589
|
+
inputPrice: 0.29,
|
|
3590
|
+
outputPrice: 1.14,
|
|
3591
|
+
cacheReadsPrice: 0.057
|
|
3592
|
+
}
|
|
3593
|
+
]
|
|
3594
|
+
},
|
|
3595
|
+
"glm-4.5-air": {
|
|
3596
|
+
maxTokens: 98304,
|
|
3597
|
+
contextWindow: 131072,
|
|
4296
3598
|
supportsImages: false,
|
|
4297
|
-
supportsPromptCache:
|
|
4298
|
-
inputPrice: 0,
|
|
4299
|
-
outputPrice: 0,
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
"
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
3599
|
+
supportsPromptCache: true,
|
|
3600
|
+
inputPrice: 0.1,
|
|
3601
|
+
outputPrice: 0.6,
|
|
3602
|
+
cacheWritesPrice: 0,
|
|
3603
|
+
cacheReadsPrice: 0.02,
|
|
3604
|
+
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models.",
|
|
3605
|
+
tiers: [
|
|
3606
|
+
{
|
|
3607
|
+
contextWindow: 32e3,
|
|
3608
|
+
inputPrice: 0.07,
|
|
3609
|
+
outputPrice: 0.4,
|
|
3610
|
+
cacheReadsPrice: 0.014
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
contextWindow: 128e3,
|
|
3614
|
+
inputPrice: 0.1,
|
|
3615
|
+
outputPrice: 0.6,
|
|
3616
|
+
cacheReadsPrice: 0.02
|
|
3617
|
+
},
|
|
3618
|
+
{
|
|
3619
|
+
contextWindow: Infinity,
|
|
3620
|
+
inputPrice: 0.1,
|
|
3621
|
+
outputPrice: 0.6,
|
|
3622
|
+
cacheReadsPrice: 0.02
|
|
3623
|
+
}
|
|
3624
|
+
]
|
|
3625
|
+
}
|
|
3626
|
+
};
|
|
3627
|
+
var ZAI_DEFAULT_TEMPERATURE = 0;
|
|
3628
|
+
|
|
3629
|
+
// src/provider-settings.ts
|
|
3630
|
+
var providerNames = [
|
|
3631
|
+
"anthropic",
|
|
3632
|
+
"claude-code",
|
|
3633
|
+
"glama",
|
|
3634
|
+
"openrouter",
|
|
3635
|
+
"bedrock",
|
|
3636
|
+
"vertex",
|
|
3637
|
+
"openai",
|
|
3638
|
+
"ollama",
|
|
3639
|
+
"vscode-lm",
|
|
3640
|
+
"lmstudio",
|
|
3641
|
+
"gemini",
|
|
3642
|
+
"gemini-cli",
|
|
3643
|
+
"openai-native",
|
|
3644
|
+
"mistral",
|
|
3645
|
+
"moonshot",
|
|
3646
|
+
"deepseek",
|
|
3647
|
+
"doubao",
|
|
3648
|
+
"unbound",
|
|
3649
|
+
"requesty",
|
|
3650
|
+
"human-relay",
|
|
3651
|
+
"fake-ai",
|
|
3652
|
+
"xai",
|
|
3653
|
+
"groq",
|
|
3654
|
+
"chutes",
|
|
3655
|
+
"litellm",
|
|
3656
|
+
"huggingface",
|
|
3657
|
+
"cerebras",
|
|
3658
|
+
"sambanova",
|
|
3659
|
+
"zai",
|
|
3660
|
+
"fireworks",
|
|
3661
|
+
"featherless",
|
|
3662
|
+
"io-intelligence",
|
|
3663
|
+
"roo"
|
|
3664
|
+
];
|
|
3665
|
+
var providerNamesSchema = import_zod8.z.enum(providerNames);
|
|
3666
|
+
var providerSettingsEntrySchema = import_zod8.z.object({
|
|
3667
|
+
id: import_zod8.z.string(),
|
|
3668
|
+
name: import_zod8.z.string(),
|
|
3669
|
+
apiProvider: providerNamesSchema.optional()
|
|
3670
|
+
});
|
|
3671
|
+
var DEFAULT_CONSECUTIVE_MISTAKE_LIMIT = 3;
|
|
3672
|
+
var baseProviderSettingsSchema = import_zod8.z.object({
|
|
3673
|
+
includeMaxTokens: import_zod8.z.boolean().optional(),
|
|
3674
|
+
diffEnabled: import_zod8.z.boolean().optional(),
|
|
3675
|
+
todoListEnabled: import_zod8.z.boolean().optional(),
|
|
3676
|
+
fuzzyMatchThreshold: import_zod8.z.number().optional(),
|
|
3677
|
+
modelTemperature: import_zod8.z.number().nullish(),
|
|
3678
|
+
rateLimitSeconds: import_zod8.z.number().optional(),
|
|
3679
|
+
consecutiveMistakeLimit: import_zod8.z.number().min(0).optional(),
|
|
3680
|
+
// Model reasoning.
|
|
3681
|
+
enableReasoningEffort: import_zod8.z.boolean().optional(),
|
|
3682
|
+
reasoningEffort: reasoningEffortWithMinimalSchema.optional(),
|
|
3683
|
+
modelMaxTokens: import_zod8.z.number().optional(),
|
|
3684
|
+
modelMaxThinkingTokens: import_zod8.z.number().optional(),
|
|
3685
|
+
// Model verbosity.
|
|
3686
|
+
verbosity: verbosityLevelsSchema.optional()
|
|
3687
|
+
});
|
|
3688
|
+
var apiModelIdProviderModelSchema = baseProviderSettingsSchema.extend({
|
|
3689
|
+
apiModelId: import_zod8.z.string().optional()
|
|
3690
|
+
});
|
|
3691
|
+
var anthropicSchema = apiModelIdProviderModelSchema.extend({
|
|
3692
|
+
apiKey: import_zod8.z.string().optional(),
|
|
3693
|
+
anthropicBaseUrl: import_zod8.z.string().optional(),
|
|
3694
|
+
anthropicUseAuthToken: import_zod8.z.boolean().optional(),
|
|
3695
|
+
anthropicBeta1MContext: import_zod8.z.boolean().optional()
|
|
3696
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
3697
|
+
});
|
|
3698
|
+
var claudeCodeSchema = apiModelIdProviderModelSchema.extend({
|
|
3699
|
+
claudeCodePath: import_zod8.z.string().optional(),
|
|
3700
|
+
claudeCodeMaxOutputTokens: import_zod8.z.number().int().min(1).max(2e5).optional()
|
|
3701
|
+
});
|
|
3702
|
+
var glamaSchema = baseProviderSettingsSchema.extend({
|
|
3703
|
+
glamaModelId: import_zod8.z.string().optional(),
|
|
3704
|
+
glamaApiKey: import_zod8.z.string().optional()
|
|
3705
|
+
});
|
|
3706
|
+
var openRouterSchema = baseProviderSettingsSchema.extend({
|
|
3707
|
+
openRouterApiKey: import_zod8.z.string().optional(),
|
|
3708
|
+
openRouterModelId: import_zod8.z.string().optional(),
|
|
3709
|
+
openRouterBaseUrl: import_zod8.z.string().optional(),
|
|
3710
|
+
openRouterSpecificProvider: import_zod8.z.string().optional(),
|
|
3711
|
+
openRouterUseMiddleOutTransform: import_zod8.z.boolean().optional()
|
|
3712
|
+
});
|
|
3713
|
+
var bedrockSchema = apiModelIdProviderModelSchema.extend({
|
|
3714
|
+
awsAccessKey: import_zod8.z.string().optional(),
|
|
3715
|
+
awsSecretKey: import_zod8.z.string().optional(),
|
|
3716
|
+
awsSessionToken: import_zod8.z.string().optional(),
|
|
3717
|
+
awsRegion: import_zod8.z.string().optional(),
|
|
3718
|
+
awsUseCrossRegionInference: import_zod8.z.boolean().optional(),
|
|
3719
|
+
awsUsePromptCache: import_zod8.z.boolean().optional(),
|
|
3720
|
+
awsProfile: import_zod8.z.string().optional(),
|
|
3721
|
+
awsUseProfile: import_zod8.z.boolean().optional(),
|
|
3722
|
+
awsApiKey: import_zod8.z.string().optional(),
|
|
3723
|
+
awsUseApiKey: import_zod8.z.boolean().optional(),
|
|
3724
|
+
awsCustomArn: import_zod8.z.string().optional(),
|
|
3725
|
+
awsModelContextWindow: import_zod8.z.number().optional(),
|
|
3726
|
+
awsBedrockEndpointEnabled: import_zod8.z.boolean().optional(),
|
|
3727
|
+
awsBedrockEndpoint: import_zod8.z.string().optional(),
|
|
3728
|
+
awsBedrock1MContext: import_zod8.z.boolean().optional()
|
|
3729
|
+
// Enable 'context-1m-2025-08-07' beta for 1M context window
|
|
3730
|
+
});
|
|
3731
|
+
var vertexSchema = apiModelIdProviderModelSchema.extend({
|
|
3732
|
+
vertexKeyFile: import_zod8.z.string().optional(),
|
|
3733
|
+
vertexJsonCredentials: import_zod8.z.string().optional(),
|
|
3734
|
+
vertexProjectId: import_zod8.z.string().optional(),
|
|
3735
|
+
vertexRegion: import_zod8.z.string().optional()
|
|
3736
|
+
});
|
|
3737
|
+
var openAiSchema = baseProviderSettingsSchema.extend({
|
|
3738
|
+
openAiBaseUrl: import_zod8.z.string().optional(),
|
|
3739
|
+
openAiApiKey: import_zod8.z.string().optional(),
|
|
3740
|
+
openAiLegacyFormat: import_zod8.z.boolean().optional(),
|
|
3741
|
+
openAiR1FormatEnabled: import_zod8.z.boolean().optional(),
|
|
3742
|
+
openAiModelId: import_zod8.z.string().optional(),
|
|
3743
|
+
openAiCustomModelInfo: modelInfoSchema.nullish(),
|
|
3744
|
+
openAiUseAzure: import_zod8.z.boolean().optional(),
|
|
3745
|
+
azureApiVersion: import_zod8.z.string().optional(),
|
|
3746
|
+
openAiStreamingEnabled: import_zod8.z.boolean().optional(),
|
|
3747
|
+
openAiHostHeader: import_zod8.z.string().optional(),
|
|
3748
|
+
// Keep temporarily for backward compatibility during migration.
|
|
3749
|
+
openAiHeaders: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.string()).optional()
|
|
3750
|
+
});
|
|
3751
|
+
var ollamaSchema = baseProviderSettingsSchema.extend({
|
|
3752
|
+
ollamaModelId: import_zod8.z.string().optional(),
|
|
3753
|
+
ollamaBaseUrl: import_zod8.z.string().optional()
|
|
3754
|
+
});
|
|
3755
|
+
var vsCodeLmSchema = baseProviderSettingsSchema.extend({
|
|
3756
|
+
vsCodeLmModelSelector: import_zod8.z.object({
|
|
3757
|
+
vendor: import_zod8.z.string().optional(),
|
|
3758
|
+
family: import_zod8.z.string().optional(),
|
|
3759
|
+
version: import_zod8.z.string().optional(),
|
|
3760
|
+
id: import_zod8.z.string().optional()
|
|
3761
|
+
}).optional()
|
|
3762
|
+
});
|
|
3763
|
+
var lmStudioSchema = baseProviderSettingsSchema.extend({
|
|
3764
|
+
lmStudioModelId: import_zod8.z.string().optional(),
|
|
3765
|
+
lmStudioBaseUrl: import_zod8.z.string().optional(),
|
|
3766
|
+
lmStudioDraftModelId: import_zod8.z.string().optional(),
|
|
3767
|
+
lmStudioSpeculativeDecodingEnabled: import_zod8.z.boolean().optional()
|
|
3768
|
+
});
|
|
3769
|
+
var geminiSchema = apiModelIdProviderModelSchema.extend({
|
|
3770
|
+
geminiApiKey: import_zod8.z.string().optional(),
|
|
3771
|
+
googleGeminiBaseUrl: import_zod8.z.string().optional(),
|
|
3772
|
+
enableUrlContext: import_zod8.z.boolean().optional(),
|
|
3773
|
+
enableGrounding: import_zod8.z.boolean().optional()
|
|
3774
|
+
});
|
|
3775
|
+
var geminiCliSchema = apiModelIdProviderModelSchema.extend({
|
|
3776
|
+
geminiCliOAuthPath: import_zod8.z.string().optional(),
|
|
3777
|
+
geminiCliProjectId: import_zod8.z.string().optional()
|
|
3778
|
+
});
|
|
3779
|
+
var openAiNativeSchema = apiModelIdProviderModelSchema.extend({
|
|
3780
|
+
openAiNativeApiKey: import_zod8.z.string().optional(),
|
|
3781
|
+
openAiNativeBaseUrl: import_zod8.z.string().optional()
|
|
3782
|
+
});
|
|
3783
|
+
var mistralSchema = apiModelIdProviderModelSchema.extend({
|
|
3784
|
+
mistralApiKey: import_zod8.z.string().optional(),
|
|
3785
|
+
mistralCodestralUrl: import_zod8.z.string().optional()
|
|
3786
|
+
});
|
|
3787
|
+
var deepSeekSchema = apiModelIdProviderModelSchema.extend({
|
|
3788
|
+
deepSeekBaseUrl: import_zod8.z.string().optional(),
|
|
3789
|
+
deepSeekApiKey: import_zod8.z.string().optional()
|
|
3790
|
+
});
|
|
3791
|
+
var doubaoSchema = apiModelIdProviderModelSchema.extend({
|
|
3792
|
+
doubaoBaseUrl: import_zod8.z.string().optional(),
|
|
3793
|
+
doubaoApiKey: import_zod8.z.string().optional()
|
|
3794
|
+
});
|
|
3795
|
+
var moonshotSchema = apiModelIdProviderModelSchema.extend({
|
|
3796
|
+
moonshotBaseUrl: import_zod8.z.union([import_zod8.z.literal("https://api.moonshot.ai/v1"), import_zod8.z.literal("https://api.moonshot.cn/v1")]).optional(),
|
|
3797
|
+
moonshotApiKey: import_zod8.z.string().optional()
|
|
3798
|
+
});
|
|
3799
|
+
var unboundSchema = baseProviderSettingsSchema.extend({
|
|
3800
|
+
unboundApiKey: import_zod8.z.string().optional(),
|
|
3801
|
+
unboundModelId: import_zod8.z.string().optional()
|
|
3802
|
+
});
|
|
3803
|
+
var requestySchema = baseProviderSettingsSchema.extend({
|
|
3804
|
+
requestyBaseUrl: import_zod8.z.string().optional(),
|
|
3805
|
+
requestyApiKey: import_zod8.z.string().optional(),
|
|
3806
|
+
requestyModelId: import_zod8.z.string().optional()
|
|
3807
|
+
});
|
|
3808
|
+
var humanRelaySchema = baseProviderSettingsSchema;
|
|
3809
|
+
var fakeAiSchema = baseProviderSettingsSchema.extend({
|
|
3810
|
+
fakeAi: import_zod8.z.unknown().optional()
|
|
3811
|
+
});
|
|
3812
|
+
var xaiSchema = apiModelIdProviderModelSchema.extend({
|
|
3813
|
+
xaiApiKey: import_zod8.z.string().optional()
|
|
3814
|
+
});
|
|
3815
|
+
var groqSchema = apiModelIdProviderModelSchema.extend({
|
|
3816
|
+
groqApiKey: import_zod8.z.string().optional()
|
|
3817
|
+
});
|
|
3818
|
+
var huggingFaceSchema = baseProviderSettingsSchema.extend({
|
|
3819
|
+
huggingFaceApiKey: import_zod8.z.string().optional(),
|
|
3820
|
+
huggingFaceModelId: import_zod8.z.string().optional(),
|
|
3821
|
+
huggingFaceInferenceProvider: import_zod8.z.string().optional()
|
|
3822
|
+
});
|
|
3823
|
+
var chutesSchema = apiModelIdProviderModelSchema.extend({
|
|
3824
|
+
chutesApiKey: import_zod8.z.string().optional()
|
|
3825
|
+
});
|
|
3826
|
+
var litellmSchema = baseProviderSettingsSchema.extend({
|
|
3827
|
+
litellmBaseUrl: import_zod8.z.string().optional(),
|
|
3828
|
+
litellmApiKey: import_zod8.z.string().optional(),
|
|
3829
|
+
litellmModelId: import_zod8.z.string().optional(),
|
|
3830
|
+
litellmUsePromptCache: import_zod8.z.boolean().optional()
|
|
3831
|
+
});
|
|
3832
|
+
var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
3833
|
+
cerebrasApiKey: import_zod8.z.string().optional()
|
|
3834
|
+
});
|
|
3835
|
+
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
3836
|
+
sambaNovaApiKey: import_zod8.z.string().optional()
|
|
3837
|
+
});
|
|
3838
|
+
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
3839
|
+
zaiApiKey: import_zod8.z.string().optional(),
|
|
3840
|
+
zaiApiLine: import_zod8.z.union([import_zod8.z.literal("china"), import_zod8.z.literal("international")]).optional()
|
|
3841
|
+
});
|
|
3842
|
+
var fireworksSchema = apiModelIdProviderModelSchema.extend({
|
|
3843
|
+
fireworksApiKey: import_zod8.z.string().optional()
|
|
3844
|
+
});
|
|
3845
|
+
var featherlessSchema = apiModelIdProviderModelSchema.extend({
|
|
3846
|
+
featherlessApiKey: import_zod8.z.string().optional()
|
|
3847
|
+
});
|
|
3848
|
+
var ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
|
|
3849
|
+
ioIntelligenceModelId: import_zod8.z.string().optional(),
|
|
3850
|
+
ioIntelligenceApiKey: import_zod8.z.string().optional()
|
|
3851
|
+
});
|
|
3852
|
+
var rooSchema = apiModelIdProviderModelSchema.extend({
|
|
3853
|
+
// No additional fields needed - uses cloud authentication
|
|
3854
|
+
});
|
|
3855
|
+
var defaultSchema = import_zod8.z.object({
|
|
3856
|
+
apiProvider: import_zod8.z.undefined()
|
|
3857
|
+
});
|
|
3858
|
+
var providerSettingsSchemaDiscriminated = import_zod8.z.discriminatedUnion("apiProvider", [
|
|
3859
|
+
anthropicSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("anthropic") })),
|
|
3860
|
+
claudeCodeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("claude-code") })),
|
|
3861
|
+
glamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("glama") })),
|
|
3862
|
+
openRouterSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openrouter") })),
|
|
3863
|
+
bedrockSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("bedrock") })),
|
|
3864
|
+
vertexSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vertex") })),
|
|
3865
|
+
openAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai") })),
|
|
3866
|
+
ollamaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("ollama") })),
|
|
3867
|
+
vsCodeLmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("vscode-lm") })),
|
|
3868
|
+
lmStudioSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("lmstudio") })),
|
|
3869
|
+
geminiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini") })),
|
|
3870
|
+
geminiCliSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("gemini-cli") })),
|
|
3871
|
+
openAiNativeSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("openai-native") })),
|
|
3872
|
+
mistralSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("mistral") })),
|
|
3873
|
+
deepSeekSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("deepseek") })),
|
|
3874
|
+
doubaoSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("doubao") })),
|
|
3875
|
+
moonshotSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("moonshot") })),
|
|
3876
|
+
unboundSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("unbound") })),
|
|
3877
|
+
requestySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("requesty") })),
|
|
3878
|
+
humanRelaySchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("human-relay") })),
|
|
3879
|
+
fakeAiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fake-ai") })),
|
|
3880
|
+
xaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("xai") })),
|
|
3881
|
+
groqSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("groq") })),
|
|
3882
|
+
huggingFaceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("huggingface") })),
|
|
3883
|
+
chutesSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("chutes") })),
|
|
3884
|
+
litellmSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("litellm") })),
|
|
3885
|
+
cerebrasSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("cerebras") })),
|
|
3886
|
+
sambaNovaSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("sambanova") })),
|
|
3887
|
+
zaiSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("zai") })),
|
|
3888
|
+
fireworksSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("fireworks") })),
|
|
3889
|
+
featherlessSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("featherless") })),
|
|
3890
|
+
ioIntelligenceSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("io-intelligence") })),
|
|
3891
|
+
rooSchema.merge(import_zod8.z.object({ apiProvider: import_zod8.z.literal("roo") })),
|
|
3892
|
+
defaultSchema
|
|
3893
|
+
]);
|
|
3894
|
+
var providerSettingsSchema = import_zod8.z.object({
|
|
3895
|
+
apiProvider: providerNamesSchema.optional(),
|
|
3896
|
+
...anthropicSchema.shape,
|
|
3897
|
+
...claudeCodeSchema.shape,
|
|
3898
|
+
...glamaSchema.shape,
|
|
3899
|
+
...openRouterSchema.shape,
|
|
3900
|
+
...bedrockSchema.shape,
|
|
3901
|
+
...vertexSchema.shape,
|
|
3902
|
+
...openAiSchema.shape,
|
|
3903
|
+
...ollamaSchema.shape,
|
|
3904
|
+
...vsCodeLmSchema.shape,
|
|
3905
|
+
...lmStudioSchema.shape,
|
|
3906
|
+
...geminiSchema.shape,
|
|
3907
|
+
...geminiCliSchema.shape,
|
|
3908
|
+
...openAiNativeSchema.shape,
|
|
3909
|
+
...mistralSchema.shape,
|
|
3910
|
+
...deepSeekSchema.shape,
|
|
3911
|
+
...doubaoSchema.shape,
|
|
3912
|
+
...moonshotSchema.shape,
|
|
3913
|
+
...unboundSchema.shape,
|
|
3914
|
+
...requestySchema.shape,
|
|
3915
|
+
...humanRelaySchema.shape,
|
|
3916
|
+
...fakeAiSchema.shape,
|
|
3917
|
+
...xaiSchema.shape,
|
|
3918
|
+
...groqSchema.shape,
|
|
3919
|
+
...huggingFaceSchema.shape,
|
|
3920
|
+
...chutesSchema.shape,
|
|
3921
|
+
...litellmSchema.shape,
|
|
3922
|
+
...cerebrasSchema.shape,
|
|
3923
|
+
...sambaNovaSchema.shape,
|
|
3924
|
+
...zaiSchema.shape,
|
|
3925
|
+
...fireworksSchema.shape,
|
|
3926
|
+
...featherlessSchema.shape,
|
|
3927
|
+
...ioIntelligenceSchema.shape,
|
|
3928
|
+
...rooSchema.shape,
|
|
3929
|
+
...codebaseIndexProviderSchema.shape
|
|
3930
|
+
});
|
|
3931
|
+
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: import_zod8.z.string().optional() });
|
|
3932
|
+
var discriminatedProviderSettingsWithIdSchema = providerSettingsSchemaDiscriminated.and(
|
|
3933
|
+
import_zod8.z.object({ id: import_zod8.z.string().optional() })
|
|
3934
|
+
);
|
|
3935
|
+
var PROVIDER_SETTINGS_KEYS = providerSettingsSchema.keyof().options;
|
|
3936
|
+
var MODEL_ID_KEYS = [
|
|
3937
|
+
"apiModelId",
|
|
3938
|
+
"glamaModelId",
|
|
3939
|
+
"openRouterModelId",
|
|
3940
|
+
"openAiModelId",
|
|
3941
|
+
"ollamaModelId",
|
|
3942
|
+
"lmStudioModelId",
|
|
3943
|
+
"lmStudioDraftModelId",
|
|
3944
|
+
"unboundModelId",
|
|
3945
|
+
"requestyModelId",
|
|
3946
|
+
"litellmModelId",
|
|
3947
|
+
"huggingFaceModelId",
|
|
3948
|
+
"ioIntelligenceModelId"
|
|
3949
|
+
];
|
|
3950
|
+
var getModelId = (settings) => {
|
|
3951
|
+
const modelIdKey = MODEL_ID_KEYS.find((key) => settings[key]);
|
|
3952
|
+
return modelIdKey ? settings[modelIdKey] : void 0;
|
|
3953
|
+
};
|
|
3954
|
+
var ANTHROPIC_STYLE_PROVIDERS = ["anthropic", "claude-code", "bedrock"];
|
|
3955
|
+
var getApiProtocol = (provider, modelId) => {
|
|
3956
|
+
if (provider && ANTHROPIC_STYLE_PROVIDERS.includes(provider)) {
|
|
3957
|
+
return "anthropic";
|
|
3958
|
+
}
|
|
3959
|
+
if (provider && provider === "vertex" && modelId && modelId.toLowerCase().includes("claude")) {
|
|
3960
|
+
return "anthropic";
|
|
4341
3961
|
}
|
|
3962
|
+
return "openai";
|
|
3963
|
+
};
|
|
3964
|
+
var MODELS_BY_PROVIDER = {
|
|
3965
|
+
anthropic: {
|
|
3966
|
+
id: "anthropic",
|
|
3967
|
+
label: "Anthropic",
|
|
3968
|
+
models: Object.keys(anthropicModels)
|
|
3969
|
+
},
|
|
3970
|
+
bedrock: {
|
|
3971
|
+
id: "bedrock",
|
|
3972
|
+
label: "Amazon Bedrock",
|
|
3973
|
+
models: Object.keys(bedrockModels)
|
|
3974
|
+
},
|
|
3975
|
+
cerebras: {
|
|
3976
|
+
id: "cerebras",
|
|
3977
|
+
label: "Cerebras",
|
|
3978
|
+
models: Object.keys(cerebrasModels)
|
|
3979
|
+
},
|
|
3980
|
+
chutes: {
|
|
3981
|
+
id: "chutes",
|
|
3982
|
+
label: "Chutes AI",
|
|
3983
|
+
models: Object.keys(chutesModels)
|
|
3984
|
+
},
|
|
3985
|
+
"claude-code": { id: "claude-code", label: "Claude Code", models: Object.keys(claudeCodeModels) },
|
|
3986
|
+
deepseek: {
|
|
3987
|
+
id: "deepseek",
|
|
3988
|
+
label: "DeepSeek",
|
|
3989
|
+
models: Object.keys(deepSeekModels)
|
|
3990
|
+
},
|
|
3991
|
+
doubao: { id: "doubao", label: "Doubao", models: Object.keys(doubaoModels) },
|
|
3992
|
+
featherless: {
|
|
3993
|
+
id: "featherless",
|
|
3994
|
+
label: "Featherless",
|
|
3995
|
+
models: Object.keys(featherlessModels)
|
|
3996
|
+
},
|
|
3997
|
+
fireworks: {
|
|
3998
|
+
id: "fireworks",
|
|
3999
|
+
label: "Fireworks",
|
|
4000
|
+
models: Object.keys(fireworksModels)
|
|
4001
|
+
},
|
|
4002
|
+
gemini: {
|
|
4003
|
+
id: "gemini",
|
|
4004
|
+
label: "Google Gemini",
|
|
4005
|
+
models: Object.keys(geminiModels)
|
|
4006
|
+
},
|
|
4007
|
+
groq: { id: "groq", label: "Groq", models: Object.keys(groqModels) },
|
|
4008
|
+
"io-intelligence": {
|
|
4009
|
+
id: "io-intelligence",
|
|
4010
|
+
label: "IO Intelligence",
|
|
4011
|
+
models: Object.keys(ioIntelligenceModels)
|
|
4012
|
+
},
|
|
4013
|
+
mistral: {
|
|
4014
|
+
id: "mistral",
|
|
4015
|
+
label: "Mistral",
|
|
4016
|
+
models: Object.keys(mistralModels)
|
|
4017
|
+
},
|
|
4018
|
+
moonshot: {
|
|
4019
|
+
id: "moonshot",
|
|
4020
|
+
label: "Moonshot",
|
|
4021
|
+
models: Object.keys(moonshotModels)
|
|
4022
|
+
},
|
|
4023
|
+
"openai-native": {
|
|
4024
|
+
id: "openai-native",
|
|
4025
|
+
label: "OpenAI",
|
|
4026
|
+
models: Object.keys(openAiNativeModels)
|
|
4027
|
+
},
|
|
4028
|
+
roo: { id: "roo", label: "Roo", models: Object.keys(rooModels) },
|
|
4029
|
+
sambanova: {
|
|
4030
|
+
id: "sambanova",
|
|
4031
|
+
label: "SambaNova",
|
|
4032
|
+
models: Object.keys(sambaNovaModels)
|
|
4033
|
+
},
|
|
4034
|
+
vertex: {
|
|
4035
|
+
id: "vertex",
|
|
4036
|
+
label: "GCP Vertex AI",
|
|
4037
|
+
models: Object.keys(vertexModels)
|
|
4038
|
+
},
|
|
4039
|
+
"vscode-lm": {
|
|
4040
|
+
id: "vscode-lm",
|
|
4041
|
+
label: "VS Code LM API",
|
|
4042
|
+
models: Object.keys(vscodeLlmModels)
|
|
4043
|
+
},
|
|
4044
|
+
xai: { id: "xai", label: "xAI (Grok)", models: Object.keys(xaiModels) },
|
|
4045
|
+
zai: { id: "zai", label: "Zai", models: Object.keys(internationalZAiModels) },
|
|
4046
|
+
// Models pulled from the respective APIs.
|
|
4047
|
+
glama: { id: "glama", label: "Glama", models: [] },
|
|
4048
|
+
huggingface: { id: "huggingface", label: "Hugging Face", models: [] },
|
|
4049
|
+
litellm: { id: "litellm", label: "LiteLLM", models: [] },
|
|
4050
|
+
openrouter: { id: "openrouter", label: "OpenRouter", models: [] },
|
|
4051
|
+
requesty: { id: "requesty", label: "Requesty", models: [] },
|
|
4052
|
+
unbound: { id: "unbound", label: "Unbound", models: [] }
|
|
4342
4053
|
};
|
|
4343
4054
|
|
|
4344
|
-
// src/
|
|
4345
|
-
var
|
|
4346
|
-
var
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
"
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4055
|
+
// src/history.ts
|
|
4056
|
+
var import_zod9 = require("zod");
|
|
4057
|
+
var historyItemSchema = import_zod9.z.object({
|
|
4058
|
+
id: import_zod9.z.string(),
|
|
4059
|
+
number: import_zod9.z.number(),
|
|
4060
|
+
ts: import_zod9.z.number(),
|
|
4061
|
+
task: import_zod9.z.string(),
|
|
4062
|
+
tokensIn: import_zod9.z.number(),
|
|
4063
|
+
tokensOut: import_zod9.z.number(),
|
|
4064
|
+
cacheWrites: import_zod9.z.number().optional(),
|
|
4065
|
+
cacheReads: import_zod9.z.number().optional(),
|
|
4066
|
+
totalCost: import_zod9.z.number(),
|
|
4067
|
+
size: import_zod9.z.number().optional(),
|
|
4068
|
+
workspace: import_zod9.z.string().optional(),
|
|
4069
|
+
mode: import_zod9.z.string().optional()
|
|
4070
|
+
});
|
|
4071
|
+
|
|
4072
|
+
// src/telemetry.ts
|
|
4073
|
+
var import_zod10 = require("zod");
|
|
4074
|
+
var telemetrySettings = ["unset", "enabled", "disabled"];
|
|
4075
|
+
var telemetrySettingsSchema = import_zod10.z.enum(telemetrySettings);
|
|
4076
|
+
var TelemetryEventName = /* @__PURE__ */ ((TelemetryEventName2) => {
|
|
4077
|
+
TelemetryEventName2["TASK_CREATED"] = "Task Created";
|
|
4078
|
+
TelemetryEventName2["TASK_RESTARTED"] = "Task Reopened";
|
|
4079
|
+
TelemetryEventName2["TASK_COMPLETED"] = "Task Completed";
|
|
4080
|
+
TelemetryEventName2["TASK_MESSAGE"] = "Task Message";
|
|
4081
|
+
TelemetryEventName2["TASK_CONVERSATION_MESSAGE"] = "Conversation Message";
|
|
4082
|
+
TelemetryEventName2["LLM_COMPLETION"] = "LLM Completion";
|
|
4083
|
+
TelemetryEventName2["MODE_SWITCH"] = "Mode Switched";
|
|
4084
|
+
TelemetryEventName2["MODE_SELECTOR_OPENED"] = "Mode Selector Opened";
|
|
4085
|
+
TelemetryEventName2["TOOL_USED"] = "Tool Used";
|
|
4086
|
+
TelemetryEventName2["CHECKPOINT_CREATED"] = "Checkpoint Created";
|
|
4087
|
+
TelemetryEventName2["CHECKPOINT_RESTORED"] = "Checkpoint Restored";
|
|
4088
|
+
TelemetryEventName2["CHECKPOINT_DIFFED"] = "Checkpoint Diffed";
|
|
4089
|
+
TelemetryEventName2["TAB_SHOWN"] = "Tab Shown";
|
|
4090
|
+
TelemetryEventName2["MODE_SETTINGS_CHANGED"] = "Mode Setting Changed";
|
|
4091
|
+
TelemetryEventName2["CUSTOM_MODE_CREATED"] = "Custom Mode Created";
|
|
4092
|
+
TelemetryEventName2["CONTEXT_CONDENSED"] = "Context Condensed";
|
|
4093
|
+
TelemetryEventName2["SLIDING_WINDOW_TRUNCATION"] = "Sliding Window Truncation";
|
|
4094
|
+
TelemetryEventName2["CODE_ACTION_USED"] = "Code Action Used";
|
|
4095
|
+
TelemetryEventName2["PROMPT_ENHANCED"] = "Prompt Enhanced";
|
|
4096
|
+
TelemetryEventName2["TITLE_BUTTON_CLICKED"] = "Title Button Clicked";
|
|
4097
|
+
TelemetryEventName2["AUTHENTICATION_INITIATED"] = "Authentication Initiated";
|
|
4098
|
+
TelemetryEventName2["MARKETPLACE_ITEM_INSTALLED"] = "Marketplace Item Installed";
|
|
4099
|
+
TelemetryEventName2["MARKETPLACE_ITEM_REMOVED"] = "Marketplace Item Removed";
|
|
4100
|
+
TelemetryEventName2["MARKETPLACE_TAB_VIEWED"] = "Marketplace Tab Viewed";
|
|
4101
|
+
TelemetryEventName2["MARKETPLACE_INSTALL_BUTTON_CLICKED"] = "Marketplace Install Button Clicked";
|
|
4102
|
+
TelemetryEventName2["SHARE_BUTTON_CLICKED"] = "Share Button Clicked";
|
|
4103
|
+
TelemetryEventName2["SHARE_ORGANIZATION_CLICKED"] = "Share Organization Clicked";
|
|
4104
|
+
TelemetryEventName2["SHARE_PUBLIC_CLICKED"] = "Share Public Clicked";
|
|
4105
|
+
TelemetryEventName2["SHARE_CONNECT_TO_CLOUD_CLICKED"] = "Share Connect To Cloud Clicked";
|
|
4106
|
+
TelemetryEventName2["ACCOUNT_CONNECT_CLICKED"] = "Account Connect Clicked";
|
|
4107
|
+
TelemetryEventName2["ACCOUNT_CONNECT_SUCCESS"] = "Account Connect Success";
|
|
4108
|
+
TelemetryEventName2["ACCOUNT_LOGOUT_CLICKED"] = "Account Logout Clicked";
|
|
4109
|
+
TelemetryEventName2["ACCOUNT_LOGOUT_SUCCESS"] = "Account Logout Success";
|
|
4110
|
+
TelemetryEventName2["SCHEMA_VALIDATION_ERROR"] = "Schema Validation Error";
|
|
4111
|
+
TelemetryEventName2["DIFF_APPLICATION_ERROR"] = "Diff Application Error";
|
|
4112
|
+
TelemetryEventName2["SHELL_INTEGRATION_ERROR"] = "Shell Integration Error";
|
|
4113
|
+
TelemetryEventName2["CONSECUTIVE_MISTAKE_ERROR"] = "Consecutive Mistake Error";
|
|
4114
|
+
TelemetryEventName2["CODE_INDEX_ERROR"] = "Code Index Error";
|
|
4115
|
+
return TelemetryEventName2;
|
|
4116
|
+
})(TelemetryEventName || {});
|
|
4117
|
+
var staticAppPropertiesSchema = import_zod10.z.object({
|
|
4118
|
+
appName: import_zod10.z.string(),
|
|
4119
|
+
appVersion: import_zod10.z.string(),
|
|
4120
|
+
vscodeVersion: import_zod10.z.string(),
|
|
4121
|
+
platform: import_zod10.z.string(),
|
|
4122
|
+
editorName: import_zod10.z.string()
|
|
4123
|
+
});
|
|
4124
|
+
var dynamicAppPropertiesSchema = import_zod10.z.object({
|
|
4125
|
+
language: import_zod10.z.string(),
|
|
4126
|
+
mode: import_zod10.z.string()
|
|
4127
|
+
});
|
|
4128
|
+
var cloudAppPropertiesSchema = import_zod10.z.object({
|
|
4129
|
+
cloudIsAuthenticated: import_zod10.z.boolean().optional()
|
|
4130
|
+
});
|
|
4131
|
+
var appPropertiesSchema = import_zod10.z.object({
|
|
4132
|
+
...staticAppPropertiesSchema.shape,
|
|
4133
|
+
...dynamicAppPropertiesSchema.shape,
|
|
4134
|
+
...cloudAppPropertiesSchema.shape
|
|
4135
|
+
});
|
|
4136
|
+
var taskPropertiesSchema = import_zod10.z.object({
|
|
4137
|
+
taskId: import_zod10.z.string().optional(),
|
|
4138
|
+
apiProvider: import_zod10.z.enum(providerNames).optional(),
|
|
4139
|
+
modelId: import_zod10.z.string().optional(),
|
|
4140
|
+
diffStrategy: import_zod10.z.string().optional(),
|
|
4141
|
+
isSubtask: import_zod10.z.boolean().optional(),
|
|
4142
|
+
todos: import_zod10.z.object({
|
|
4143
|
+
total: import_zod10.z.number(),
|
|
4144
|
+
completed: import_zod10.z.number(),
|
|
4145
|
+
inProgress: import_zod10.z.number(),
|
|
4146
|
+
pending: import_zod10.z.number()
|
|
4147
|
+
}).optional()
|
|
4148
|
+
});
|
|
4149
|
+
var gitPropertiesSchema = import_zod10.z.object({
|
|
4150
|
+
repositoryUrl: import_zod10.z.string().optional(),
|
|
4151
|
+
repositoryName: import_zod10.z.string().optional(),
|
|
4152
|
+
defaultBranch: import_zod10.z.string().optional()
|
|
4153
|
+
});
|
|
4154
|
+
var telemetryPropertiesSchema = import_zod10.z.object({
|
|
4155
|
+
...appPropertiesSchema.shape,
|
|
4156
|
+
...taskPropertiesSchema.shape,
|
|
4157
|
+
...gitPropertiesSchema.shape
|
|
4158
|
+
});
|
|
4159
|
+
var rooCodeTelemetryEventSchema = import_zod10.z.discriminatedUnion("type", [
|
|
4160
|
+
import_zod10.z.object({
|
|
4161
|
+
type: import_zod10.z.enum([
|
|
4162
|
+
"Task Created" /* TASK_CREATED */,
|
|
4163
|
+
"Task Reopened" /* TASK_RESTARTED */,
|
|
4164
|
+
"Task Completed" /* TASK_COMPLETED */,
|
|
4165
|
+
"Conversation Message" /* TASK_CONVERSATION_MESSAGE */,
|
|
4166
|
+
"Mode Switched" /* MODE_SWITCH */,
|
|
4167
|
+
"Mode Selector Opened" /* MODE_SELECTOR_OPENED */,
|
|
4168
|
+
"Tool Used" /* TOOL_USED */,
|
|
4169
|
+
"Checkpoint Created" /* CHECKPOINT_CREATED */,
|
|
4170
|
+
"Checkpoint Restored" /* CHECKPOINT_RESTORED */,
|
|
4171
|
+
"Checkpoint Diffed" /* CHECKPOINT_DIFFED */,
|
|
4172
|
+
"Code Action Used" /* CODE_ACTION_USED */,
|
|
4173
|
+
"Prompt Enhanced" /* PROMPT_ENHANCED */,
|
|
4174
|
+
"Title Button Clicked" /* TITLE_BUTTON_CLICKED */,
|
|
4175
|
+
"Authentication Initiated" /* AUTHENTICATION_INITIATED */,
|
|
4176
|
+
"Marketplace Item Installed" /* MARKETPLACE_ITEM_INSTALLED */,
|
|
4177
|
+
"Marketplace Item Removed" /* MARKETPLACE_ITEM_REMOVED */,
|
|
4178
|
+
"Marketplace Tab Viewed" /* MARKETPLACE_TAB_VIEWED */,
|
|
4179
|
+
"Marketplace Install Button Clicked" /* MARKETPLACE_INSTALL_BUTTON_CLICKED */,
|
|
4180
|
+
"Share Button Clicked" /* SHARE_BUTTON_CLICKED */,
|
|
4181
|
+
"Share Organization Clicked" /* SHARE_ORGANIZATION_CLICKED */,
|
|
4182
|
+
"Share Public Clicked" /* SHARE_PUBLIC_CLICKED */,
|
|
4183
|
+
"Share Connect To Cloud Clicked" /* SHARE_CONNECT_TO_CLOUD_CLICKED */,
|
|
4184
|
+
"Account Connect Clicked" /* ACCOUNT_CONNECT_CLICKED */,
|
|
4185
|
+
"Account Connect Success" /* ACCOUNT_CONNECT_SUCCESS */,
|
|
4186
|
+
"Account Logout Clicked" /* ACCOUNT_LOGOUT_CLICKED */,
|
|
4187
|
+
"Account Logout Success" /* ACCOUNT_LOGOUT_SUCCESS */,
|
|
4188
|
+
"Schema Validation Error" /* SCHEMA_VALIDATION_ERROR */,
|
|
4189
|
+
"Diff Application Error" /* DIFF_APPLICATION_ERROR */,
|
|
4190
|
+
"Shell Integration Error" /* SHELL_INTEGRATION_ERROR */,
|
|
4191
|
+
"Consecutive Mistake Error" /* CONSECUTIVE_MISTAKE_ERROR */,
|
|
4192
|
+
"Code Index Error" /* CODE_INDEX_ERROR */,
|
|
4193
|
+
"Context Condensed" /* CONTEXT_CONDENSED */,
|
|
4194
|
+
"Sliding Window Truncation" /* SLIDING_WINDOW_TRUNCATION */,
|
|
4195
|
+
"Tab Shown" /* TAB_SHOWN */,
|
|
4196
|
+
"Mode Setting Changed" /* MODE_SETTINGS_CHANGED */,
|
|
4197
|
+
"Custom Mode Created" /* CUSTOM_MODE_CREATED */
|
|
4198
|
+
]),
|
|
4199
|
+
properties: telemetryPropertiesSchema
|
|
4200
|
+
}),
|
|
4201
|
+
import_zod10.z.object({
|
|
4202
|
+
type: import_zod10.z.literal("Task Message" /* TASK_MESSAGE */),
|
|
4203
|
+
properties: import_zod10.z.object({
|
|
4204
|
+
...telemetryPropertiesSchema.shape,
|
|
4205
|
+
taskId: import_zod10.z.string(),
|
|
4206
|
+
message: clineMessageSchema
|
|
4207
|
+
})
|
|
4208
|
+
}),
|
|
4209
|
+
import_zod10.z.object({
|
|
4210
|
+
type: import_zod10.z.literal("LLM Completion" /* LLM_COMPLETION */),
|
|
4211
|
+
properties: import_zod10.z.object({
|
|
4212
|
+
...telemetryPropertiesSchema.shape,
|
|
4213
|
+
inputTokens: import_zod10.z.number(),
|
|
4214
|
+
outputTokens: import_zod10.z.number(),
|
|
4215
|
+
cacheReadTokens: import_zod10.z.number().optional(),
|
|
4216
|
+
cacheWriteTokens: import_zod10.z.number().optional(),
|
|
4217
|
+
cost: import_zod10.z.number().optional()
|
|
4218
|
+
})
|
|
4219
|
+
})
|
|
4220
|
+
]);
|
|
4221
|
+
|
|
4222
|
+
// src/mode.ts
|
|
4223
|
+
var import_zod11 = require("zod");
|
|
4224
|
+
var groupOptionsSchema = import_zod11.z.object({
|
|
4225
|
+
fileRegex: import_zod11.z.string().optional().refine(
|
|
4226
|
+
(pattern) => {
|
|
4227
|
+
if (!pattern) {
|
|
4228
|
+
return true;
|
|
4229
|
+
}
|
|
4230
|
+
try {
|
|
4231
|
+
new RegExp(pattern);
|
|
4232
|
+
return true;
|
|
4233
|
+
} catch {
|
|
4234
|
+
return false;
|
|
4235
|
+
}
|
|
4236
|
+
},
|
|
4237
|
+
{ message: "Invalid regular expression pattern" }
|
|
4238
|
+
),
|
|
4239
|
+
description: import_zod11.z.string().optional()
|
|
4240
|
+
});
|
|
4241
|
+
var groupEntrySchema = import_zod11.z.union([toolGroupsSchema, import_zod11.z.tuple([toolGroupsSchema, groupOptionsSchema])]);
|
|
4242
|
+
var groupEntryArraySchema = import_zod11.z.array(groupEntrySchema).refine(
|
|
4243
|
+
(groups) => {
|
|
4244
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4245
|
+
return groups.every((group) => {
|
|
4246
|
+
const groupName = Array.isArray(group) ? group[0] : group;
|
|
4247
|
+
if (seen.has(groupName)) {
|
|
4248
|
+
return false;
|
|
4249
|
+
}
|
|
4250
|
+
seen.add(groupName);
|
|
4251
|
+
return true;
|
|
4252
|
+
});
|
|
4379
4253
|
},
|
|
4380
|
-
"
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4254
|
+
{ message: "Duplicate groups are not allowed" }
|
|
4255
|
+
);
|
|
4256
|
+
var modeConfigSchema = import_zod11.z.object({
|
|
4257
|
+
slug: import_zod11.z.string().regex(/^[a-zA-Z0-9-]+$/, "Slug must contain only letters numbers and dashes"),
|
|
4258
|
+
name: import_zod11.z.string().min(1, "Name is required"),
|
|
4259
|
+
roleDefinition: import_zod11.z.string().min(1, "Role definition is required"),
|
|
4260
|
+
whenToUse: import_zod11.z.string().optional(),
|
|
4261
|
+
description: import_zod11.z.string().optional(),
|
|
4262
|
+
customInstructions: import_zod11.z.string().optional(),
|
|
4263
|
+
groups: groupEntryArraySchema,
|
|
4264
|
+
source: import_zod11.z.enum(["global", "project"]).optional()
|
|
4265
|
+
});
|
|
4266
|
+
var customModesSettingsSchema = import_zod11.z.object({
|
|
4267
|
+
customModes: import_zod11.z.array(modeConfigSchema).refine(
|
|
4268
|
+
(modes) => {
|
|
4269
|
+
const slugs = /* @__PURE__ */ new Set();
|
|
4270
|
+
return modes.every((mode) => {
|
|
4271
|
+
if (slugs.has(mode.slug)) {
|
|
4272
|
+
return false;
|
|
4273
|
+
}
|
|
4274
|
+
slugs.add(mode.slug);
|
|
4275
|
+
return true;
|
|
4276
|
+
});
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
message: "Duplicate mode slugs are not allowed"
|
|
4280
|
+
}
|
|
4281
|
+
)
|
|
4282
|
+
});
|
|
4283
|
+
var promptComponentSchema = import_zod11.z.object({
|
|
4284
|
+
roleDefinition: import_zod11.z.string().optional(),
|
|
4285
|
+
whenToUse: import_zod11.z.string().optional(),
|
|
4286
|
+
description: import_zod11.z.string().optional(),
|
|
4287
|
+
customInstructions: import_zod11.z.string().optional()
|
|
4288
|
+
});
|
|
4289
|
+
var customModePromptsSchema = import_zod11.z.record(import_zod11.z.string(), promptComponentSchema.optional());
|
|
4290
|
+
var customSupportPromptsSchema = import_zod11.z.record(import_zod11.z.string(), import_zod11.z.string().optional());
|
|
4291
|
+
var DEFAULT_MODES = [
|
|
4292
|
+
{
|
|
4293
|
+
slug: "architect",
|
|
4294
|
+
name: "\u{1F3D7}\uFE0F Architect",
|
|
4295
|
+
roleDefinition: "You are Roo, an experienced technical leader who is inquisitive and an excellent planner. Your goal is to gather information and get context to create a detailed plan for accomplishing the user's task, which the user will review and approve before they switch into another mode to implement the solution.",
|
|
4296
|
+
whenToUse: "Use this mode when you need to plan, design, or strategize before implementation. Perfect for breaking down complex problems, creating technical specifications, designing system architecture, or brainstorming solutions before coding.",
|
|
4297
|
+
description: "Plan and design before implementation",
|
|
4298
|
+
groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
|
|
4299
|
+
customInstructions: "1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n **Note:** If the `update_todo_list` tool is not available, write the plan to a markdown file (e.g., `plan.md` or `todo.md`) instead.\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**"
|
|
4391
4300
|
},
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
cacheWritesPrice: 0.15,
|
|
4400
|
-
cacheReadsPrice: 0.15,
|
|
4401
|
-
description: "xAI's Grok-3 mini fast model with 128K context window",
|
|
4402
|
-
supportsReasoningEffort: true
|
|
4301
|
+
{
|
|
4302
|
+
slug: "code",
|
|
4303
|
+
name: "\u{1F4BB} Code",
|
|
4304
|
+
roleDefinition: "You are Roo, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.",
|
|
4305
|
+
whenToUse: "Use this mode when you need to write, modify, or refactor code. Ideal for implementing features, fixing bugs, creating new files, or making code improvements across any programming language or framework.",
|
|
4306
|
+
description: "Write, modify, and refactor code",
|
|
4307
|
+
groups: ["read", "edit", "browser", "command", "mcp"]
|
|
4403
4308
|
},
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4309
|
+
{
|
|
4310
|
+
slug: "ask",
|
|
4311
|
+
name: "\u2753 Ask",
|
|
4312
|
+
roleDefinition: "You are Roo, a knowledgeable technical assistant focused on answering questions and providing information about software development, technology, and related topics.",
|
|
4313
|
+
whenToUse: "Use this mode when you need explanations, documentation, or answers to technical questions. Best for understanding concepts, analyzing existing code, getting recommendations, or learning about technologies without making changes.",
|
|
4314
|
+
description: "Get answers and explanations",
|
|
4315
|
+
groups: ["read", "browser", "mcp"],
|
|
4316
|
+
customInstructions: "You can analyze code, explain concepts, and access external resources. Always answer the user's questions thoroughly, and do not switch to implementing code unless explicitly requested by the user. Include Mermaid diagrams when they clarify your response."
|
|
4412
4317
|
},
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4318
|
+
{
|
|
4319
|
+
slug: "debug",
|
|
4320
|
+
name: "\u{1FAB2} Debug",
|
|
4321
|
+
roleDefinition: "You are Roo, an expert software debugger specializing in systematic problem diagnosis and resolution.",
|
|
4322
|
+
whenToUse: "Use this mode when you're troubleshooting issues, investigating errors, or diagnosing problems. Specialized in systematic debugging, adding logging, analyzing stack traces, and identifying root causes before applying fixes.",
|
|
4323
|
+
description: "Diagnose and fix software issues",
|
|
4324
|
+
groups: ["read", "edit", "browser", "command", "mcp"],
|
|
4325
|
+
customInstructions: "Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions. Explicitly ask the user to confirm the diagnosis before fixing the problem."
|
|
4326
|
+
},
|
|
4327
|
+
{
|
|
4328
|
+
slug: "orchestrator",
|
|
4329
|
+
name: "\u{1FA83} Orchestrator",
|
|
4330
|
+
roleDefinition: "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.",
|
|
4331
|
+
whenToUse: "Use this mode for complex, multi-step projects that require coordination across different specialties. Ideal when you need to break down large tasks into subtasks, manage workflows, or coordinate work that spans multiple domains or expertise areas.",
|
|
4332
|
+
description: "Coordinate tasks across multiple modes",
|
|
4333
|
+
groups: [],
|
|
4334
|
+
customInstructions: "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. These instructions must include:\n * All necessary context from the parent task or previous subtasks required to complete the work.\n * A clearly defined scope, specifying exactly what the subtask should accomplish.\n * An explicit statement that the subtask should *only* perform the work outlined in these instructions and not deviate.\n * An instruction for the subtask to signal completion by using the `attempt_completion` tool, providing a concise yet thorough summary of the outcome in the `result` parameter, keeping in mind that this summary will be the source of truth used to keep track of what was completed on this project.\n * A statement that these specific instructions supersede any conflicting general instructions the subtask's mode might have.\n\n3. Track and manage the progress of all subtasks. When a subtask is completed, analyze its results and determine the next steps.\n\n4. Help the user understand how the different subtasks fit together in the overall workflow. Provide clear reasoning about why you're delegating specific tasks to specific modes.\n\n5. When all subtasks are completed, synthesize the results and provide a comprehensive overview of what was accomplished.\n\n6. Ask clarifying questions when necessary to better understand how to break down complex tasks effectively.\n\n7. Suggest improvements to the workflow based on the results of completed subtasks.\n\nUse subtasks to maintain clarity. If a request significantly shifts focus or requires a different expertise (mode), consider creating a subtask rather than overloading the current one."
|
|
4421
4335
|
}
|
|
4336
|
+
];
|
|
4337
|
+
|
|
4338
|
+
// src/vscode.ts
|
|
4339
|
+
var import_zod12 = require("zod");
|
|
4340
|
+
var codeActionIds = ["explainCode", "fixCode", "improveCode", "addToContext", "newTask"];
|
|
4341
|
+
var terminalActionIds = ["terminalAddToContext", "terminalFixCommand", "terminalExplainCommand"];
|
|
4342
|
+
var commandIds = [
|
|
4343
|
+
"activationCompleted",
|
|
4344
|
+
"plusButtonClicked",
|
|
4345
|
+
"promptsButtonClicked",
|
|
4346
|
+
"mcpButtonClicked",
|
|
4347
|
+
"historyButtonClicked",
|
|
4348
|
+
"marketplaceButtonClicked",
|
|
4349
|
+
"popoutButtonClicked",
|
|
4350
|
+
"accountButtonClicked",
|
|
4351
|
+
"settingsButtonClicked",
|
|
4352
|
+
"openInNewTab",
|
|
4353
|
+
"showHumanRelayDialog",
|
|
4354
|
+
"registerHumanRelayCallback",
|
|
4355
|
+
"unregisterHumanRelayCallback",
|
|
4356
|
+
"handleHumanRelayResponse",
|
|
4357
|
+
"newTask",
|
|
4358
|
+
"setCustomStoragePath",
|
|
4359
|
+
"importSettings",
|
|
4360
|
+
"focusInput",
|
|
4361
|
+
"acceptInput",
|
|
4362
|
+
"focusPanel"
|
|
4363
|
+
];
|
|
4364
|
+
var languages = [
|
|
4365
|
+
"ca",
|
|
4366
|
+
"de",
|
|
4367
|
+
"en",
|
|
4368
|
+
"es",
|
|
4369
|
+
"fr",
|
|
4370
|
+
"hi",
|
|
4371
|
+
"id",
|
|
4372
|
+
"it",
|
|
4373
|
+
"ja",
|
|
4374
|
+
"ko",
|
|
4375
|
+
"nl",
|
|
4376
|
+
"pl",
|
|
4377
|
+
"pt-BR",
|
|
4378
|
+
"ru",
|
|
4379
|
+
"tr",
|
|
4380
|
+
"vi",
|
|
4381
|
+
"zh-CN",
|
|
4382
|
+
"zh-TW"
|
|
4383
|
+
];
|
|
4384
|
+
var languagesSchema = import_zod12.z.enum(languages);
|
|
4385
|
+
var isLanguage = (value) => languages.includes(value);
|
|
4386
|
+
|
|
4387
|
+
// src/global-settings.ts
|
|
4388
|
+
var DEFAULT_WRITE_DELAY_MS = 1e3;
|
|
4389
|
+
var DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT = 5e4;
|
|
4390
|
+
var globalSettingsSchema = import_zod13.z.object({
|
|
4391
|
+
currentApiConfigName: import_zod13.z.string().optional(),
|
|
4392
|
+
listApiConfigMeta: import_zod13.z.array(providerSettingsEntrySchema).optional(),
|
|
4393
|
+
pinnedApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.boolean()).optional(),
|
|
4394
|
+
lastShownAnnouncementId: import_zod13.z.string().optional(),
|
|
4395
|
+
customInstructions: import_zod13.z.string().optional(),
|
|
4396
|
+
taskHistory: import_zod13.z.array(historyItemSchema).optional(),
|
|
4397
|
+
condensingApiConfigId: import_zod13.z.string().optional(),
|
|
4398
|
+
customCondensingPrompt: import_zod13.z.string().optional(),
|
|
4399
|
+
autoApprovalEnabled: import_zod13.z.boolean().optional(),
|
|
4400
|
+
alwaysAllowReadOnly: import_zod13.z.boolean().optional(),
|
|
4401
|
+
alwaysAllowReadOnlyOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
4402
|
+
alwaysAllowWrite: import_zod13.z.boolean().optional(),
|
|
4403
|
+
alwaysAllowWriteOutsideWorkspace: import_zod13.z.boolean().optional(),
|
|
4404
|
+
alwaysAllowWriteProtected: import_zod13.z.boolean().optional(),
|
|
4405
|
+
writeDelayMs: import_zod13.z.number().min(0).optional(),
|
|
4406
|
+
alwaysAllowBrowser: import_zod13.z.boolean().optional(),
|
|
4407
|
+
alwaysApproveResubmit: import_zod13.z.boolean().optional(),
|
|
4408
|
+
requestDelaySeconds: import_zod13.z.number().optional(),
|
|
4409
|
+
alwaysAllowMcp: import_zod13.z.boolean().optional(),
|
|
4410
|
+
alwaysAllowModeSwitch: import_zod13.z.boolean().optional(),
|
|
4411
|
+
alwaysAllowSubtasks: import_zod13.z.boolean().optional(),
|
|
4412
|
+
alwaysAllowExecute: import_zod13.z.boolean().optional(),
|
|
4413
|
+
alwaysAllowFollowupQuestions: import_zod13.z.boolean().optional(),
|
|
4414
|
+
followupAutoApproveTimeoutMs: import_zod13.z.number().optional(),
|
|
4415
|
+
alwaysAllowUpdateTodoList: import_zod13.z.boolean().optional(),
|
|
4416
|
+
allowedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
4417
|
+
deniedCommands: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
4418
|
+
commandExecutionTimeout: import_zod13.z.number().optional(),
|
|
4419
|
+
commandTimeoutAllowlist: import_zod13.z.array(import_zod13.z.string()).optional(),
|
|
4420
|
+
preventCompletionWithOpenTodos: import_zod13.z.boolean().optional(),
|
|
4421
|
+
allowedMaxRequests: import_zod13.z.number().nullish(),
|
|
4422
|
+
allowedMaxCost: import_zod13.z.number().nullish(),
|
|
4423
|
+
autoCondenseContext: import_zod13.z.boolean().optional(),
|
|
4424
|
+
autoCondenseContextPercent: import_zod13.z.number().optional(),
|
|
4425
|
+
maxConcurrentFileReads: import_zod13.z.number().optional(),
|
|
4426
|
+
/**
|
|
4427
|
+
* Whether to include diagnostic messages (errors, warnings) in tool outputs
|
|
4428
|
+
* @default true
|
|
4429
|
+
*/
|
|
4430
|
+
includeDiagnosticMessages: import_zod13.z.boolean().optional(),
|
|
4431
|
+
/**
|
|
4432
|
+
* Maximum number of diagnostic messages to include in tool outputs
|
|
4433
|
+
* @default 50
|
|
4434
|
+
*/
|
|
4435
|
+
maxDiagnosticMessages: import_zod13.z.number().optional(),
|
|
4436
|
+
browserToolEnabled: import_zod13.z.boolean().optional(),
|
|
4437
|
+
browserViewportSize: import_zod13.z.string().optional(),
|
|
4438
|
+
screenshotQuality: import_zod13.z.number().optional(),
|
|
4439
|
+
remoteBrowserEnabled: import_zod13.z.boolean().optional(),
|
|
4440
|
+
remoteBrowserHost: import_zod13.z.string().optional(),
|
|
4441
|
+
cachedChromeHostUrl: import_zod13.z.string().optional(),
|
|
4442
|
+
enableCheckpoints: import_zod13.z.boolean().optional(),
|
|
4443
|
+
ttsEnabled: import_zod13.z.boolean().optional(),
|
|
4444
|
+
ttsSpeed: import_zod13.z.number().optional(),
|
|
4445
|
+
soundEnabled: import_zod13.z.boolean().optional(),
|
|
4446
|
+
soundVolume: import_zod13.z.number().optional(),
|
|
4447
|
+
maxOpenTabsContext: import_zod13.z.number().optional(),
|
|
4448
|
+
maxWorkspaceFiles: import_zod13.z.number().optional(),
|
|
4449
|
+
showRooIgnoredFiles: import_zod13.z.boolean().optional(),
|
|
4450
|
+
maxReadFileLine: import_zod13.z.number().optional(),
|
|
4451
|
+
maxImageFileSize: import_zod13.z.number().optional(),
|
|
4452
|
+
maxTotalImageSize: import_zod13.z.number().optional(),
|
|
4453
|
+
terminalOutputLineLimit: import_zod13.z.number().optional(),
|
|
4454
|
+
terminalOutputCharacterLimit: import_zod13.z.number().optional(),
|
|
4455
|
+
terminalShellIntegrationTimeout: import_zod13.z.number().optional(),
|
|
4456
|
+
terminalShellIntegrationDisabled: import_zod13.z.boolean().optional(),
|
|
4457
|
+
terminalCommandDelay: import_zod13.z.number().optional(),
|
|
4458
|
+
terminalPowershellCounter: import_zod13.z.boolean().optional(),
|
|
4459
|
+
terminalZshClearEolMark: import_zod13.z.boolean().optional(),
|
|
4460
|
+
terminalZshOhMy: import_zod13.z.boolean().optional(),
|
|
4461
|
+
terminalZshP10k: import_zod13.z.boolean().optional(),
|
|
4462
|
+
terminalZdotdir: import_zod13.z.boolean().optional(),
|
|
4463
|
+
terminalCompressProgressBar: import_zod13.z.boolean().optional(),
|
|
4464
|
+
diagnosticsEnabled: import_zod13.z.boolean().optional(),
|
|
4465
|
+
rateLimitSeconds: import_zod13.z.number().optional(),
|
|
4466
|
+
diffEnabled: import_zod13.z.boolean().optional(),
|
|
4467
|
+
fuzzyMatchThreshold: import_zod13.z.number().optional(),
|
|
4468
|
+
experiments: experimentsSchema.optional(),
|
|
4469
|
+
codebaseIndexModels: codebaseIndexModelsSchema.optional(),
|
|
4470
|
+
codebaseIndexConfig: codebaseIndexConfigSchema.optional(),
|
|
4471
|
+
language: languagesSchema.optional(),
|
|
4472
|
+
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
4473
|
+
mcpEnabled: import_zod13.z.boolean().optional(),
|
|
4474
|
+
enableMcpServerCreation: import_zod13.z.boolean().optional(),
|
|
4475
|
+
remoteControlEnabled: import_zod13.z.boolean().optional(),
|
|
4476
|
+
mode: import_zod13.z.string().optional(),
|
|
4477
|
+
modeApiConfigs: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.string()).optional(),
|
|
4478
|
+
customModes: import_zod13.z.array(modeConfigSchema).optional(),
|
|
4479
|
+
customModePrompts: customModePromptsSchema.optional(),
|
|
4480
|
+
customSupportPrompts: customSupportPromptsSchema.optional(),
|
|
4481
|
+
enhancementApiConfigId: import_zod13.z.string().optional(),
|
|
4482
|
+
includeTaskHistoryInEnhance: import_zod13.z.boolean().optional(),
|
|
4483
|
+
historyPreviewCollapsed: import_zod13.z.boolean().optional(),
|
|
4484
|
+
profileThresholds: import_zod13.z.record(import_zod13.z.string(), import_zod13.z.number()).optional(),
|
|
4485
|
+
hasOpenedModeSelector: import_zod13.z.boolean().optional(),
|
|
4486
|
+
lastModeExportPath: import_zod13.z.string().optional(),
|
|
4487
|
+
lastModeImportPath: import_zod13.z.string().optional()
|
|
4488
|
+
});
|
|
4489
|
+
var GLOBAL_SETTINGS_KEYS = globalSettingsSchema.keyof().options;
|
|
4490
|
+
var rooCodeSettingsSchema = providerSettingsSchema.merge(globalSettingsSchema);
|
|
4491
|
+
var SECRET_STATE_KEYS = [
|
|
4492
|
+
"apiKey",
|
|
4493
|
+
"glamaApiKey",
|
|
4494
|
+
"openRouterApiKey",
|
|
4495
|
+
"awsAccessKey",
|
|
4496
|
+
"awsApiKey",
|
|
4497
|
+
"awsSecretKey",
|
|
4498
|
+
"awsSessionToken",
|
|
4499
|
+
"openAiApiKey",
|
|
4500
|
+
"geminiApiKey",
|
|
4501
|
+
"openAiNativeApiKey",
|
|
4502
|
+
"cerebrasApiKey",
|
|
4503
|
+
"deepSeekApiKey",
|
|
4504
|
+
"doubaoApiKey",
|
|
4505
|
+
"moonshotApiKey",
|
|
4506
|
+
"mistralApiKey",
|
|
4507
|
+
"unboundApiKey",
|
|
4508
|
+
"requestyApiKey",
|
|
4509
|
+
"xaiApiKey",
|
|
4510
|
+
"groqApiKey",
|
|
4511
|
+
"chutesApiKey",
|
|
4512
|
+
"litellmApiKey",
|
|
4513
|
+
"codeIndexOpenAiKey",
|
|
4514
|
+
"codeIndexQdrantApiKey",
|
|
4515
|
+
"codebaseIndexOpenAiCompatibleApiKey",
|
|
4516
|
+
"codebaseIndexGeminiApiKey",
|
|
4517
|
+
"codebaseIndexMistralApiKey",
|
|
4518
|
+
"huggingFaceApiKey",
|
|
4519
|
+
"sambaNovaApiKey",
|
|
4520
|
+
"zaiApiKey",
|
|
4521
|
+
"fireworksApiKey",
|
|
4522
|
+
"featherlessApiKey",
|
|
4523
|
+
"ioIntelligenceApiKey"
|
|
4524
|
+
];
|
|
4525
|
+
var isSecretStateKey = (key) => SECRET_STATE_KEYS.includes(key);
|
|
4526
|
+
var GLOBAL_STATE_KEYS = [...GLOBAL_SETTINGS_KEYS, ...PROVIDER_SETTINGS_KEYS].filter(
|
|
4527
|
+
(key) => !SECRET_STATE_KEYS.includes(key)
|
|
4528
|
+
);
|
|
4529
|
+
var isGlobalStateKey = (key) => GLOBAL_STATE_KEYS.includes(key);
|
|
4530
|
+
var EVALS_SETTINGS = {
|
|
4531
|
+
apiProvider: "openrouter",
|
|
4532
|
+
openRouterUseMiddleOutTransform: false,
|
|
4533
|
+
lastShownAnnouncementId: "jul-09-2025-3-23-0",
|
|
4534
|
+
pinnedApiConfigs: {},
|
|
4535
|
+
autoApprovalEnabled: true,
|
|
4536
|
+
alwaysAllowReadOnly: true,
|
|
4537
|
+
alwaysAllowReadOnlyOutsideWorkspace: false,
|
|
4538
|
+
alwaysAllowWrite: true,
|
|
4539
|
+
alwaysAllowWriteOutsideWorkspace: false,
|
|
4540
|
+
alwaysAllowWriteProtected: false,
|
|
4541
|
+
writeDelayMs: 1e3,
|
|
4542
|
+
alwaysAllowBrowser: true,
|
|
4543
|
+
alwaysApproveResubmit: true,
|
|
4544
|
+
requestDelaySeconds: 10,
|
|
4545
|
+
alwaysAllowMcp: true,
|
|
4546
|
+
alwaysAllowModeSwitch: true,
|
|
4547
|
+
alwaysAllowSubtasks: true,
|
|
4548
|
+
alwaysAllowExecute: true,
|
|
4549
|
+
alwaysAllowFollowupQuestions: true,
|
|
4550
|
+
alwaysAllowUpdateTodoList: true,
|
|
4551
|
+
followupAutoApproveTimeoutMs: 0,
|
|
4552
|
+
allowedCommands: ["*"],
|
|
4553
|
+
commandExecutionTimeout: 20,
|
|
4554
|
+
commandTimeoutAllowlist: [],
|
|
4555
|
+
preventCompletionWithOpenTodos: false,
|
|
4556
|
+
browserToolEnabled: false,
|
|
4557
|
+
browserViewportSize: "900x600",
|
|
4558
|
+
screenshotQuality: 75,
|
|
4559
|
+
remoteBrowserEnabled: false,
|
|
4560
|
+
ttsEnabled: false,
|
|
4561
|
+
ttsSpeed: 1,
|
|
4562
|
+
soundEnabled: false,
|
|
4563
|
+
soundVolume: 0.5,
|
|
4564
|
+
terminalOutputLineLimit: 500,
|
|
4565
|
+
terminalOutputCharacterLimit: DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
|
|
4566
|
+
terminalShellIntegrationTimeout: 3e4,
|
|
4567
|
+
terminalCommandDelay: 0,
|
|
4568
|
+
terminalPowershellCounter: false,
|
|
4569
|
+
terminalZshOhMy: true,
|
|
4570
|
+
terminalZshClearEolMark: true,
|
|
4571
|
+
terminalZshP10k: false,
|
|
4572
|
+
terminalZdotdir: true,
|
|
4573
|
+
terminalCompressProgressBar: true,
|
|
4574
|
+
terminalShellIntegrationDisabled: true,
|
|
4575
|
+
diagnosticsEnabled: true,
|
|
4576
|
+
diffEnabled: true,
|
|
4577
|
+
fuzzyMatchThreshold: 1,
|
|
4578
|
+
enableCheckpoints: false,
|
|
4579
|
+
rateLimitSeconds: 0,
|
|
4580
|
+
maxOpenTabsContext: 20,
|
|
4581
|
+
maxWorkspaceFiles: 200,
|
|
4582
|
+
showRooIgnoredFiles: true,
|
|
4583
|
+
maxReadFileLine: -1,
|
|
4584
|
+
// -1 to enable full file reading.
|
|
4585
|
+
includeDiagnosticMessages: true,
|
|
4586
|
+
maxDiagnosticMessages: 50,
|
|
4587
|
+
language: "en",
|
|
4588
|
+
telemetrySetting: "enabled",
|
|
4589
|
+
mcpEnabled: false,
|
|
4590
|
+
remoteControlEnabled: false,
|
|
4591
|
+
mode: "code",
|
|
4592
|
+
// "architect",
|
|
4593
|
+
customModes: []
|
|
4422
4594
|
};
|
|
4595
|
+
var EVALS_TIMEOUT = 5 * 60 * 1e3;
|
|
4423
4596
|
|
|
4424
|
-
// src/
|
|
4425
|
-
var
|
|
4426
|
-
var
|
|
4427
|
-
"
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
}
|
|
4473
|
-
|
|
4474
|
-
var
|
|
4475
|
-
|
|
4597
|
+
// src/ipc.ts
|
|
4598
|
+
var import_zod14 = require("zod");
|
|
4599
|
+
var IpcMessageType = /* @__PURE__ */ ((IpcMessageType2) => {
|
|
4600
|
+
IpcMessageType2["Connect"] = "Connect";
|
|
4601
|
+
IpcMessageType2["Disconnect"] = "Disconnect";
|
|
4602
|
+
IpcMessageType2["Ack"] = "Ack";
|
|
4603
|
+
IpcMessageType2["TaskCommand"] = "TaskCommand";
|
|
4604
|
+
IpcMessageType2["TaskEvent"] = "TaskEvent";
|
|
4605
|
+
return IpcMessageType2;
|
|
4606
|
+
})(IpcMessageType || {});
|
|
4607
|
+
var IpcOrigin = /* @__PURE__ */ ((IpcOrigin2) => {
|
|
4608
|
+
IpcOrigin2["Client"] = "client";
|
|
4609
|
+
IpcOrigin2["Server"] = "server";
|
|
4610
|
+
return IpcOrigin2;
|
|
4611
|
+
})(IpcOrigin || {});
|
|
4612
|
+
var ackSchema = import_zod14.z.object({
|
|
4613
|
+
clientId: import_zod14.z.string(),
|
|
4614
|
+
pid: import_zod14.z.number(),
|
|
4615
|
+
ppid: import_zod14.z.number()
|
|
4616
|
+
});
|
|
4617
|
+
var TaskCommandName = /* @__PURE__ */ ((TaskCommandName2) => {
|
|
4618
|
+
TaskCommandName2["StartNewTask"] = "StartNewTask";
|
|
4619
|
+
TaskCommandName2["CancelTask"] = "CancelTask";
|
|
4620
|
+
TaskCommandName2["CloseTask"] = "CloseTask";
|
|
4621
|
+
TaskCommandName2["ResumeTask"] = "ResumeTask";
|
|
4622
|
+
return TaskCommandName2;
|
|
4623
|
+
})(TaskCommandName || {});
|
|
4624
|
+
var taskCommandSchema = import_zod14.z.discriminatedUnion("commandName", [
|
|
4625
|
+
import_zod14.z.object({
|
|
4626
|
+
commandName: import_zod14.z.literal("StartNewTask" /* StartNewTask */),
|
|
4627
|
+
data: import_zod14.z.object({
|
|
4628
|
+
configuration: rooCodeSettingsSchema,
|
|
4629
|
+
text: import_zod14.z.string(),
|
|
4630
|
+
images: import_zod14.z.array(import_zod14.z.string()).optional(),
|
|
4631
|
+
newTab: import_zod14.z.boolean().optional()
|
|
4632
|
+
})
|
|
4633
|
+
}),
|
|
4634
|
+
import_zod14.z.object({
|
|
4635
|
+
commandName: import_zod14.z.literal("CancelTask" /* CancelTask */),
|
|
4636
|
+
data: import_zod14.z.string()
|
|
4637
|
+
}),
|
|
4638
|
+
import_zod14.z.object({
|
|
4639
|
+
commandName: import_zod14.z.literal("CloseTask" /* CloseTask */),
|
|
4640
|
+
data: import_zod14.z.string()
|
|
4641
|
+
}),
|
|
4642
|
+
import_zod14.z.object({
|
|
4643
|
+
commandName: import_zod14.z.literal("ResumeTask" /* ResumeTask */),
|
|
4644
|
+
data: import_zod14.z.string()
|
|
4645
|
+
})
|
|
4646
|
+
]);
|
|
4647
|
+
var ipcMessageSchema = import_zod14.z.discriminatedUnion("type", [
|
|
4648
|
+
import_zod14.z.object({
|
|
4649
|
+
type: import_zod14.z.literal("Ack" /* Ack */),
|
|
4650
|
+
origin: import_zod14.z.literal("server" /* Server */),
|
|
4651
|
+
data: ackSchema
|
|
4652
|
+
}),
|
|
4653
|
+
import_zod14.z.object({
|
|
4654
|
+
type: import_zod14.z.literal("TaskCommand" /* TaskCommand */),
|
|
4655
|
+
origin: import_zod14.z.literal("client" /* Client */),
|
|
4656
|
+
clientId: import_zod14.z.string(),
|
|
4657
|
+
data: taskCommandSchema
|
|
4658
|
+
}),
|
|
4659
|
+
import_zod14.z.object({
|
|
4660
|
+
type: import_zod14.z.literal("TaskEvent" /* TaskEvent */),
|
|
4661
|
+
origin: import_zod14.z.literal("server" /* Server */),
|
|
4662
|
+
relayClientId: import_zod14.z.string().optional(),
|
|
4663
|
+
data: taskEventSchema
|
|
4664
|
+
})
|
|
4665
|
+
]);
|
|
4476
4666
|
|
|
4477
|
-
// src/
|
|
4478
|
-
var
|
|
4479
|
-
var
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
cacheReadsPrice: 0.057
|
|
4527
|
-
},
|
|
4528
|
-
{
|
|
4529
|
-
contextWindow: Infinity,
|
|
4530
|
-
inputPrice: 0.29,
|
|
4531
|
-
outputPrice: 1.14,
|
|
4532
|
-
cacheReadsPrice: 0.057
|
|
4533
|
-
}
|
|
4534
|
-
]
|
|
4535
|
-
},
|
|
4536
|
-
"glm-4.5-air": {
|
|
4537
|
-
maxTokens: 98304,
|
|
4538
|
-
contextWindow: 131072,
|
|
4539
|
-
supportsImages: false,
|
|
4540
|
-
supportsPromptCache: true,
|
|
4541
|
-
inputPrice: 0.1,
|
|
4542
|
-
outputPrice: 0.6,
|
|
4543
|
-
cacheWritesPrice: 0,
|
|
4544
|
-
cacheReadsPrice: 0.02,
|
|
4545
|
-
description: "GLM-4.5-Air is the lightweight version of GLM-4.5. It balances performance and cost-effectiveness, and can flexibly switch to hybrid thinking models.",
|
|
4546
|
-
tiers: [
|
|
4547
|
-
{
|
|
4548
|
-
contextWindow: 32e3,
|
|
4549
|
-
inputPrice: 0.07,
|
|
4550
|
-
outputPrice: 0.4,
|
|
4551
|
-
cacheReadsPrice: 0.014
|
|
4552
|
-
},
|
|
4553
|
-
{
|
|
4554
|
-
contextWindow: 128e3,
|
|
4555
|
-
inputPrice: 0.1,
|
|
4556
|
-
outputPrice: 0.6,
|
|
4557
|
-
cacheReadsPrice: 0.02
|
|
4558
|
-
},
|
|
4559
|
-
{
|
|
4560
|
-
contextWindow: Infinity,
|
|
4561
|
-
inputPrice: 0.1,
|
|
4562
|
-
outputPrice: 0.6,
|
|
4563
|
-
cacheReadsPrice: 0.02
|
|
4564
|
-
}
|
|
4565
|
-
]
|
|
4566
|
-
}
|
|
4567
|
-
};
|
|
4568
|
-
var ZAI_DEFAULT_TEMPERATURE = 0;
|
|
4667
|
+
// src/marketplace.ts
|
|
4668
|
+
var import_zod15 = require("zod");
|
|
4669
|
+
var mcpParameterSchema = import_zod15.z.object({
|
|
4670
|
+
name: import_zod15.z.string().min(1),
|
|
4671
|
+
key: import_zod15.z.string().min(1),
|
|
4672
|
+
placeholder: import_zod15.z.string().optional(),
|
|
4673
|
+
optional: import_zod15.z.boolean().optional().default(false)
|
|
4674
|
+
});
|
|
4675
|
+
var mcpInstallationMethodSchema = import_zod15.z.object({
|
|
4676
|
+
name: import_zod15.z.string().min(1),
|
|
4677
|
+
content: import_zod15.z.string().min(1),
|
|
4678
|
+
parameters: import_zod15.z.array(mcpParameterSchema).optional(),
|
|
4679
|
+
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
4680
|
+
});
|
|
4681
|
+
var marketplaceItemTypeSchema = import_zod15.z.enum(["mode", "mcp"]);
|
|
4682
|
+
var baseMarketplaceItemSchema = import_zod15.z.object({
|
|
4683
|
+
id: import_zod15.z.string().min(1),
|
|
4684
|
+
name: import_zod15.z.string().min(1, "Name is required"),
|
|
4685
|
+
description: import_zod15.z.string(),
|
|
4686
|
+
author: import_zod15.z.string().optional(),
|
|
4687
|
+
authorUrl: import_zod15.z.string().url("Author URL must be a valid URL").optional(),
|
|
4688
|
+
tags: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
4689
|
+
prerequisites: import_zod15.z.array(import_zod15.z.string()).optional()
|
|
4690
|
+
});
|
|
4691
|
+
var modeMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
4692
|
+
content: import_zod15.z.string().min(1)
|
|
4693
|
+
// YAML content for modes
|
|
4694
|
+
});
|
|
4695
|
+
var mcpMarketplaceItemSchema = baseMarketplaceItemSchema.extend({
|
|
4696
|
+
url: import_zod15.z.string().url(),
|
|
4697
|
+
// Required url field
|
|
4698
|
+
content: import_zod15.z.union([import_zod15.z.string().min(1), import_zod15.z.array(mcpInstallationMethodSchema)]),
|
|
4699
|
+
// Single config or array of methods
|
|
4700
|
+
parameters: import_zod15.z.array(mcpParameterSchema).optional()
|
|
4701
|
+
});
|
|
4702
|
+
var marketplaceItemSchema = import_zod15.z.discriminatedUnion("type", [
|
|
4703
|
+
// Mode marketplace item
|
|
4704
|
+
modeMarketplaceItemSchema.extend({
|
|
4705
|
+
type: import_zod15.z.literal("mode")
|
|
4706
|
+
}),
|
|
4707
|
+
// MCP marketplace item
|
|
4708
|
+
mcpMarketplaceItemSchema.extend({
|
|
4709
|
+
type: import_zod15.z.literal("mcp")
|
|
4710
|
+
})
|
|
4711
|
+
]);
|
|
4712
|
+
var installMarketplaceItemOptionsSchema = import_zod15.z.object({
|
|
4713
|
+
target: import_zod15.z.enum(["global", "project"]).optional().default("project"),
|
|
4714
|
+
parameters: import_zod15.z.record(import_zod15.z.string(), import_zod15.z.any()).optional()
|
|
4715
|
+
});
|
|
4569
4716
|
|
|
4570
|
-
// src/
|
|
4571
|
-
var
|
|
4572
|
-
var
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
supportsPromptCache: false,
|
|
4596
|
-
inputPrice: 0.45,
|
|
4597
|
-
outputPrice: 1.8,
|
|
4598
|
-
description: "Qwen3's most agentic code model to date."
|
|
4599
|
-
},
|
|
4600
|
-
"accounts/fireworks/models/deepseek-r1-0528": {
|
|
4601
|
-
maxTokens: 20480,
|
|
4602
|
-
contextWindow: 16e4,
|
|
4603
|
-
supportsImages: false,
|
|
4604
|
-
supportsPromptCache: false,
|
|
4605
|
-
inputPrice: 3,
|
|
4606
|
-
outputPrice: 8,
|
|
4607
|
-
description: "05/28 updated checkpoint of Deepseek R1. Its overall performance is now approaching that of leading models, such as O3 and Gemini 2.5 Pro. Compared to the previous version, the upgraded model shows significant improvements in handling complex reasoning tasks, and this version also offers a reduced hallucination rate, enhanced support for function calling, and better experience for vibe coding. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
|
|
4608
|
-
},
|
|
4609
|
-
"accounts/fireworks/models/deepseek-v3": {
|
|
4610
|
-
maxTokens: 16384,
|
|
4611
|
-
contextWindow: 128e3,
|
|
4612
|
-
supportsImages: false,
|
|
4613
|
-
supportsPromptCache: false,
|
|
4614
|
-
inputPrice: 0.9,
|
|
4615
|
-
outputPrice: 0.9,
|
|
4616
|
-
description: "A strong Mixture-of-Experts (MoE) language model with 671B total parameters with 37B activated for each token from Deepseek. Note that fine-tuning for this model is only available through contacting fireworks at https://fireworks.ai/company/contact-us."
|
|
4617
|
-
},
|
|
4618
|
-
"accounts/fireworks/models/glm-4p5": {
|
|
4619
|
-
maxTokens: 16384,
|
|
4620
|
-
contextWindow: 128e3,
|
|
4621
|
-
supportsImages: false,
|
|
4622
|
-
supportsPromptCache: false,
|
|
4623
|
-
inputPrice: 0.55,
|
|
4624
|
-
outputPrice: 2.19,
|
|
4625
|
-
description: "Z.ai GLM-4.5 with 355B total parameters and 32B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
|
|
4626
|
-
},
|
|
4627
|
-
"accounts/fireworks/models/glm-4p5-air": {
|
|
4628
|
-
maxTokens: 16384,
|
|
4629
|
-
contextWindow: 128e3,
|
|
4630
|
-
supportsImages: false,
|
|
4631
|
-
supportsPromptCache: false,
|
|
4632
|
-
inputPrice: 0.55,
|
|
4633
|
-
outputPrice: 2.19,
|
|
4634
|
-
description: "Z.ai GLM-4.5-Air with 106B total parameters and 12B active parameters. Features unified reasoning, coding, and intelligent agent capabilities."
|
|
4635
|
-
},
|
|
4636
|
-
"accounts/fireworks/models/gpt-oss-20b": {
|
|
4637
|
-
maxTokens: 16384,
|
|
4638
|
-
contextWindow: 128e3,
|
|
4639
|
-
supportsImages: false,
|
|
4640
|
-
supportsPromptCache: false,
|
|
4641
|
-
inputPrice: 0.07,
|
|
4642
|
-
outputPrice: 0.3,
|
|
4643
|
-
description: "OpenAI gpt-oss-20b: Compact model for local/edge deployments. Optimized for low-latency and resource-constrained environments with chain-of-thought output, adjustable reasoning, and agentic workflows."
|
|
4644
|
-
},
|
|
4645
|
-
"accounts/fireworks/models/gpt-oss-120b": {
|
|
4646
|
-
maxTokens: 16384,
|
|
4647
|
-
contextWindow: 128e3,
|
|
4648
|
-
supportsImages: false,
|
|
4649
|
-
supportsPromptCache: false,
|
|
4650
|
-
inputPrice: 0.15,
|
|
4651
|
-
outputPrice: 0.6,
|
|
4652
|
-
description: "OpenAI gpt-oss-120b: Production-grade, general-purpose model that fits on a single H100 GPU. Features complex reasoning, configurable effort, full chain-of-thought transparency, and supports function calling, tool use, and structured outputs."
|
|
4653
|
-
}
|
|
4654
|
-
};
|
|
4717
|
+
// src/mcp.ts
|
|
4718
|
+
var import_zod16 = require("zod");
|
|
4719
|
+
var mcpExecutionStatusSchema = import_zod16.z.discriminatedUnion("status", [
|
|
4720
|
+
import_zod16.z.object({
|
|
4721
|
+
executionId: import_zod16.z.string(),
|
|
4722
|
+
status: import_zod16.z.literal("started"),
|
|
4723
|
+
serverName: import_zod16.z.string(),
|
|
4724
|
+
toolName: import_zod16.z.string()
|
|
4725
|
+
}),
|
|
4726
|
+
import_zod16.z.object({
|
|
4727
|
+
executionId: import_zod16.z.string(),
|
|
4728
|
+
status: import_zod16.z.literal("output"),
|
|
4729
|
+
response: import_zod16.z.string()
|
|
4730
|
+
}),
|
|
4731
|
+
import_zod16.z.object({
|
|
4732
|
+
executionId: import_zod16.z.string(),
|
|
4733
|
+
status: import_zod16.z.literal("completed"),
|
|
4734
|
+
response: import_zod16.z.string().optional()
|
|
4735
|
+
}),
|
|
4736
|
+
import_zod16.z.object({
|
|
4737
|
+
executionId: import_zod16.z.string(),
|
|
4738
|
+
status: import_zod16.z.literal("error"),
|
|
4739
|
+
error: import_zod16.z.string().optional()
|
|
4740
|
+
})
|
|
4741
|
+
]);
|
|
4655
4742
|
|
|
4656
|
-
// src/
|
|
4657
|
-
var
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
contextWindow: 262144,
|
|
4662
|
-
supportsImages: false,
|
|
4663
|
-
supportsPromptCache: true,
|
|
4664
|
-
inputPrice: 0,
|
|
4665
|
-
outputPrice: 0,
|
|
4666
|
-
description: "A stealth reasoning model that is blazing fast and excels at agentic coding, accessible for free through Roo Code Cloud for a limited time. (Note: prompts and completions are logged by the model creator and used to improve the model.)"
|
|
4743
|
+
// src/single-file-read-models.ts
|
|
4744
|
+
var SINGLE_FILE_READ_MODELS = /* @__PURE__ */ new Set(["roo/sonic"]);
|
|
4745
|
+
function shouldUseSingleFileRead(modelId) {
|
|
4746
|
+
if (SINGLE_FILE_READ_MODELS.has(modelId)) {
|
|
4747
|
+
return true;
|
|
4667
4748
|
}
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
maxTokens: 4096,
|
|
4674
|
-
contextWindow: 32678,
|
|
4675
|
-
supportsImages: false,
|
|
4676
|
-
supportsPromptCache: false,
|
|
4677
|
-
inputPrice: 0,
|
|
4678
|
-
outputPrice: 0,
|
|
4679
|
-
description: "DeepSeek V3 0324 model."
|
|
4680
|
-
},
|
|
4681
|
-
"deepseek-ai/DeepSeek-R1-0528": {
|
|
4682
|
-
maxTokens: 4096,
|
|
4683
|
-
contextWindow: 32678,
|
|
4684
|
-
supportsImages: false,
|
|
4685
|
-
supportsPromptCache: false,
|
|
4686
|
-
inputPrice: 0,
|
|
4687
|
-
outputPrice: 0,
|
|
4688
|
-
description: "DeepSeek R1 0528 model."
|
|
4689
|
-
},
|
|
4690
|
-
"moonshotai/Kimi-K2-Instruct": {
|
|
4691
|
-
maxTokens: 4096,
|
|
4692
|
-
contextWindow: 32678,
|
|
4693
|
-
supportsImages: false,
|
|
4694
|
-
supportsPromptCache: false,
|
|
4695
|
-
inputPrice: 0,
|
|
4696
|
-
outputPrice: 0,
|
|
4697
|
-
description: "Kimi K2 Instruct model."
|
|
4698
|
-
},
|
|
4699
|
-
"openai/gpt-oss-120b": {
|
|
4700
|
-
maxTokens: 4096,
|
|
4701
|
-
contextWindow: 32678,
|
|
4702
|
-
supportsImages: false,
|
|
4703
|
-
supportsPromptCache: false,
|
|
4704
|
-
inputPrice: 0,
|
|
4705
|
-
outputPrice: 0,
|
|
4706
|
-
description: "GPT-OSS 120B model."
|
|
4707
|
-
},
|
|
4708
|
-
"Qwen/Qwen3-Coder-480B-A35B-Instruct": {
|
|
4709
|
-
maxTokens: 4096,
|
|
4710
|
-
contextWindow: 32678,
|
|
4711
|
-
supportsImages: false,
|
|
4712
|
-
supportsPromptCache: false,
|
|
4713
|
-
inputPrice: 0,
|
|
4714
|
-
outputPrice: 0,
|
|
4715
|
-
description: "Qwen3 Coder 480B A35B Instruct model."
|
|
4749
|
+
const patterns = Array.from(SINGLE_FILE_READ_MODELS);
|
|
4750
|
+
for (const pattern of patterns) {
|
|
4751
|
+
if (pattern.endsWith("*") && modelId.startsWith(pattern.slice(0, -1))) {
|
|
4752
|
+
return true;
|
|
4753
|
+
}
|
|
4716
4754
|
}
|
|
4717
|
-
|
|
4718
|
-
|
|
4755
|
+
return false;
|
|
4756
|
+
}
|
|
4757
|
+
|
|
4758
|
+
// src/task.ts
|
|
4759
|
+
var import_zod17 = require("zod");
|
|
4760
|
+
var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
|
|
4761
|
+
TaskStatus2["Running"] = "running";
|
|
4762
|
+
TaskStatus2["Interactive"] = "interactive";
|
|
4763
|
+
TaskStatus2["Resumable"] = "resumable";
|
|
4764
|
+
TaskStatus2["Idle"] = "idle";
|
|
4765
|
+
TaskStatus2["None"] = "none";
|
|
4766
|
+
return TaskStatus2;
|
|
4767
|
+
})(TaskStatus || {});
|
|
4768
|
+
var taskMetadataSchema = import_zod17.z.object({
|
|
4769
|
+
task: import_zod17.z.string().optional(),
|
|
4770
|
+
images: import_zod17.z.array(import_zod17.z.string()).optional()
|
|
4771
|
+
});
|
|
4772
|
+
|
|
4773
|
+
// src/todo.ts
|
|
4774
|
+
var import_zod18 = require("zod");
|
|
4775
|
+
var todoStatusSchema = import_zod18.z.enum(["pending", "in_progress", "completed"]);
|
|
4776
|
+
var todoItemSchema = import_zod18.z.object({
|
|
4777
|
+
id: import_zod18.z.string(),
|
|
4778
|
+
content: import_zod18.z.string(),
|
|
4779
|
+
status: todoStatusSchema
|
|
4780
|
+
});
|
|
4781
|
+
|
|
4782
|
+
// src/terminal.ts
|
|
4783
|
+
var import_zod19 = require("zod");
|
|
4784
|
+
var commandExecutionStatusSchema = import_zod19.z.discriminatedUnion("status", [
|
|
4785
|
+
import_zod19.z.object({
|
|
4786
|
+
executionId: import_zod19.z.string(),
|
|
4787
|
+
status: import_zod19.z.literal("started"),
|
|
4788
|
+
pid: import_zod19.z.number().optional(),
|
|
4789
|
+
command: import_zod19.z.string()
|
|
4790
|
+
}),
|
|
4791
|
+
import_zod19.z.object({
|
|
4792
|
+
executionId: import_zod19.z.string(),
|
|
4793
|
+
status: import_zod19.z.literal("output"),
|
|
4794
|
+
output: import_zod19.z.string()
|
|
4795
|
+
}),
|
|
4796
|
+
import_zod19.z.object({
|
|
4797
|
+
executionId: import_zod19.z.string(),
|
|
4798
|
+
status: import_zod19.z.literal("exited"),
|
|
4799
|
+
exitCode: import_zod19.z.number().optional()
|
|
4800
|
+
}),
|
|
4801
|
+
import_zod19.z.object({
|
|
4802
|
+
executionId: import_zod19.z.string(),
|
|
4803
|
+
status: import_zod19.z.literal("fallback")
|
|
4804
|
+
}),
|
|
4805
|
+
import_zod19.z.object({
|
|
4806
|
+
executionId: import_zod19.z.string(),
|
|
4807
|
+
status: import_zod19.z.literal("timeout")
|
|
4808
|
+
})
|
|
4809
|
+
]);
|
|
4719
4810
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4720
4811
|
0 && (module.exports = {
|
|
4721
4812
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
@@ -4755,6 +4846,7 @@ var featherlessDefaultModelId = "deepseek-ai/DeepSeek-R1-0528";
|
|
|
4755
4846
|
LITELLM_COMPUTER_USE_MODELS,
|
|
4756
4847
|
LMSTUDIO_DEFAULT_TEMPERATURE,
|
|
4757
4848
|
MISTRAL_DEFAULT_TEMPERATURE,
|
|
4849
|
+
MODELS_BY_PROVIDER,
|
|
4758
4850
|
MODEL_ID_KEYS,
|
|
4759
4851
|
MOONSHOT_DEFAULT_TEMPERATURE,
|
|
4760
4852
|
OPENAI_AZURE_AI_INFERENCE_PATH,
|
|
@@ -4814,7 +4906,6 @@ var featherlessDefaultModelId = "deepseek-ai/DeepSeek-R1-0528";
|
|
|
4814
4906
|
experimentIds,
|
|
4815
4907
|
experimentIdsSchema,
|
|
4816
4908
|
experimentsSchema,
|
|
4817
|
-
extendedReasoningEffortsSchema,
|
|
4818
4909
|
featherlessDefaultModelId,
|
|
4819
4910
|
featherlessModels,
|
|
4820
4911
|
fireworksDefaultModelId,
|
|
@@ -4887,6 +4978,7 @@ var featherlessDefaultModelId = "deepseek-ai/DeepSeek-R1-0528";
|
|
|
4887
4978
|
providerSettingsSchema,
|
|
4888
4979
|
providerSettingsSchemaDiscriminated,
|
|
4889
4980
|
providerSettingsWithIdSchema,
|
|
4981
|
+
reasoningEffortWithMinimalSchema,
|
|
4890
4982
|
reasoningEfforts,
|
|
4891
4983
|
reasoningEffortsSchema,
|
|
4892
4984
|
requestyDefaultModelId,
|