@roo-code/types 1.42.0 → 1.44.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 +116 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +463 -86
- package/dist/index.d.ts +463 -86
- package/dist/index.js +111 -3
- package/dist/index.js.map +1 -1
- package/package.json +8 -4
package/dist/index.cjs
CHANGED
|
@@ -71,6 +71,7 @@ __export(index_exports, {
|
|
|
71
71
|
TaskCommandName: () => TaskCommandName,
|
|
72
72
|
TelemetryEventName: () => TelemetryEventName,
|
|
73
73
|
VERTEX_REGIONS: () => VERTEX_REGIONS,
|
|
74
|
+
ZAI_DEFAULT_TEMPERATURE: () => ZAI_DEFAULT_TEMPERATURE,
|
|
74
75
|
ackSchema: () => ackSchema,
|
|
75
76
|
anthropicDefaultModelId: () => anthropicDefaultModelId,
|
|
76
77
|
anthropicModels: () => anthropicModels,
|
|
@@ -127,6 +128,8 @@ __export(index_exports, {
|
|
|
127
128
|
groupOptionsSchema: () => groupOptionsSchema,
|
|
128
129
|
historyItemSchema: () => historyItemSchema,
|
|
129
130
|
installMarketplaceItemOptionsSchema: () => installMarketplaceItemOptionsSchema,
|
|
131
|
+
internationalZAiDefaultModelId: () => internationalZAiDefaultModelId,
|
|
132
|
+
internationalZAiModels: () => internationalZAiModels,
|
|
130
133
|
ipcMessageSchema: () => ipcMessageSchema,
|
|
131
134
|
isBlockingAsk: () => isBlockingAsk,
|
|
132
135
|
isGlobalStateKey: () => isGlobalStateKey,
|
|
@@ -139,6 +142,8 @@ __export(index_exports, {
|
|
|
139
142
|
languagesSchema: () => languagesSchema,
|
|
140
143
|
litellmDefaultModelId: () => litellmDefaultModelId,
|
|
141
144
|
litellmDefaultModelInfo: () => litellmDefaultModelInfo,
|
|
145
|
+
mainlandZAiDefaultModelId: () => mainlandZAiDefaultModelId,
|
|
146
|
+
mainlandZAiModels: () => mainlandZAiModels,
|
|
142
147
|
marketplaceItemSchema: () => marketplaceItemSchema,
|
|
143
148
|
marketplaceItemTypeSchema: () => marketplaceItemTypeSchema,
|
|
144
149
|
mcpExecutionStatusSchema: () => mcpExecutionStatusSchema,
|
|
@@ -328,7 +333,8 @@ var providerNames = [
|
|
|
328
333
|
"litellm",
|
|
329
334
|
"huggingface",
|
|
330
335
|
"cerebras",
|
|
331
|
-
"sambanova"
|
|
336
|
+
"sambanova",
|
|
337
|
+
"zai"
|
|
332
338
|
];
|
|
333
339
|
var providerNamesSchema = import_zod3.z.enum(providerNames);
|
|
334
340
|
var providerSettingsEntrySchema = import_zod3.z.object({
|
|
@@ -496,6 +502,10 @@ var cerebrasSchema = apiModelIdProviderModelSchema.extend({
|
|
|
496
502
|
var sambaNovaSchema = apiModelIdProviderModelSchema.extend({
|
|
497
503
|
sambaNovaApiKey: import_zod3.z.string().optional()
|
|
498
504
|
});
|
|
505
|
+
var zaiSchema = apiModelIdProviderModelSchema.extend({
|
|
506
|
+
zaiApiKey: import_zod3.z.string().optional(),
|
|
507
|
+
zaiApiLine: import_zod3.z.union([import_zod3.z.literal("china"), import_zod3.z.literal("international")]).optional()
|
|
508
|
+
});
|
|
499
509
|
var defaultSchema = import_zod3.z.object({
|
|
500
510
|
apiProvider: import_zod3.z.undefined()
|
|
501
511
|
});
|
|
@@ -528,6 +538,7 @@ var providerSettingsSchemaDiscriminated = import_zod3.z.discriminatedUnion("apiP
|
|
|
528
538
|
litellmSchema.merge(import_zod3.z.object({ apiProvider: import_zod3.z.literal("litellm") })),
|
|
529
539
|
cerebrasSchema.merge(import_zod3.z.object({ apiProvider: import_zod3.z.literal("cerebras") })),
|
|
530
540
|
sambaNovaSchema.merge(import_zod3.z.object({ apiProvider: import_zod3.z.literal("sambanova") })),
|
|
541
|
+
zaiSchema.merge(import_zod3.z.object({ apiProvider: import_zod3.z.literal("zai") })),
|
|
531
542
|
defaultSchema
|
|
532
543
|
]);
|
|
533
544
|
var providerSettingsSchema = import_zod3.z.object({
|
|
@@ -560,6 +571,7 @@ var providerSettingsSchema = import_zod3.z.object({
|
|
|
560
571
|
...litellmSchema.shape,
|
|
561
572
|
...cerebrasSchema.shape,
|
|
562
573
|
...sambaNovaSchema.shape,
|
|
574
|
+
...zaiSchema.shape,
|
|
563
575
|
...codebaseIndexProviderSchema.shape
|
|
564
576
|
});
|
|
565
577
|
var providerSettingsWithIdSchema = providerSettingsSchema.extend({ id: import_zod3.z.string().optional() });
|
|
@@ -614,12 +626,13 @@ var historyItemSchema = import_zod4.z.object({
|
|
|
614
626
|
|
|
615
627
|
// src/experiment.ts
|
|
616
628
|
var import_zod5 = require("zod");
|
|
617
|
-
var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption"];
|
|
629
|
+
var experimentIds = ["powerSteering", "multiFileApplyDiff", "preventFocusDisruption", "assistantMessageParser"];
|
|
618
630
|
var experimentIdsSchema = import_zod5.z.enum(experimentIds);
|
|
619
631
|
var experimentsSchema = import_zod5.z.object({
|
|
620
632
|
powerSteering: import_zod5.z.boolean().optional(),
|
|
621
633
|
multiFileApplyDiff: import_zod5.z.boolean().optional(),
|
|
622
|
-
preventFocusDisruption: import_zod5.z.boolean().optional()
|
|
634
|
+
preventFocusDisruption: import_zod5.z.boolean().optional(),
|
|
635
|
+
assistantMessageParser: import_zod5.z.boolean().optional()
|
|
623
636
|
});
|
|
624
637
|
|
|
625
638
|
// src/telemetry.ts
|
|
@@ -1146,6 +1159,7 @@ var globalSettingsSchema = import_zod11.z.object({
|
|
|
1146
1159
|
telemetrySetting: telemetrySettingsSchema.optional(),
|
|
1147
1160
|
mcpEnabled: import_zod11.z.boolean().optional(),
|
|
1148
1161
|
enableMcpServerCreation: import_zod11.z.boolean().optional(),
|
|
1162
|
+
remoteControlEnabled: import_zod11.z.boolean().optional(),
|
|
1149
1163
|
mode: import_zod11.z.string().optional(),
|
|
1150
1164
|
modeApiConfigs: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.string()).optional(),
|
|
1151
1165
|
customModes: import_zod11.z.array(modeConfigSchema).optional(),
|
|
@@ -1255,6 +1269,7 @@ var EVALS_SETTINGS = {
|
|
|
1255
1269
|
language: "en",
|
|
1256
1270
|
telemetrySetting: "enabled",
|
|
1257
1271
|
mcpEnabled: false,
|
|
1272
|
+
remoteControlEnabled: false,
|
|
1258
1273
|
mode: "code",
|
|
1259
1274
|
// "architect",
|
|
1260
1275
|
customModes: []
|
|
@@ -4130,6 +4145,99 @@ var doubaoModels = {
|
|
|
4130
4145
|
var doubaoDefaultModelInfo = doubaoModels[doubaoDefaultModelId];
|
|
4131
4146
|
var DOUBAO_API_BASE_URL = "https://ark.cn-beijing.volces.com/api/v3";
|
|
4132
4147
|
var DOUBAO_API_CHAT_PATH = "/chat/completions";
|
|
4148
|
+
|
|
4149
|
+
// src/providers/zai.ts
|
|
4150
|
+
var internationalZAiDefaultModelId = "glm-4.5";
|
|
4151
|
+
var internationalZAiModels = {
|
|
4152
|
+
"glm-4.5": {
|
|
4153
|
+
maxTokens: 98304,
|
|
4154
|
+
contextWindow: 131072,
|
|
4155
|
+
supportsImages: false,
|
|
4156
|
+
supportsPromptCache: true,
|
|
4157
|
+
inputPrice: 0.6,
|
|
4158
|
+
outputPrice: 2.2,
|
|
4159
|
+
cacheWritesPrice: 0,
|
|
4160
|
+
cacheReadsPrice: 0.11,
|
|
4161
|
+
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."
|
|
4162
|
+
},
|
|
4163
|
+
"glm-4.5-air": {
|
|
4164
|
+
maxTokens: 98304,
|
|
4165
|
+
contextWindow: 131072,
|
|
4166
|
+
supportsImages: false,
|
|
4167
|
+
supportsPromptCache: true,
|
|
4168
|
+
inputPrice: 0.2,
|
|
4169
|
+
outputPrice: 1.1,
|
|
4170
|
+
cacheWritesPrice: 0,
|
|
4171
|
+
cacheReadsPrice: 0.03,
|
|
4172
|
+
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."
|
|
4173
|
+
}
|
|
4174
|
+
};
|
|
4175
|
+
var mainlandZAiDefaultModelId = "glm-4.5";
|
|
4176
|
+
var mainlandZAiModels = {
|
|
4177
|
+
"glm-4.5": {
|
|
4178
|
+
maxTokens: 98304,
|
|
4179
|
+
contextWindow: 131072,
|
|
4180
|
+
supportsImages: false,
|
|
4181
|
+
supportsPromptCache: true,
|
|
4182
|
+
inputPrice: 0.29,
|
|
4183
|
+
outputPrice: 1.14,
|
|
4184
|
+
cacheWritesPrice: 0,
|
|
4185
|
+
cacheReadsPrice: 0.057,
|
|
4186
|
+
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.",
|
|
4187
|
+
tiers: [
|
|
4188
|
+
{
|
|
4189
|
+
contextWindow: 32e3,
|
|
4190
|
+
inputPrice: 0.21,
|
|
4191
|
+
outputPrice: 1,
|
|
4192
|
+
cacheReadsPrice: 0.043
|
|
4193
|
+
},
|
|
4194
|
+
{
|
|
4195
|
+
contextWindow: 128e3,
|
|
4196
|
+
inputPrice: 0.29,
|
|
4197
|
+
outputPrice: 1.14,
|
|
4198
|
+
cacheReadsPrice: 0.057
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
contextWindow: Infinity,
|
|
4202
|
+
inputPrice: 0.29,
|
|
4203
|
+
outputPrice: 1.14,
|
|
4204
|
+
cacheReadsPrice: 0.057
|
|
4205
|
+
}
|
|
4206
|
+
]
|
|
4207
|
+
},
|
|
4208
|
+
"glm-4.5-air": {
|
|
4209
|
+
maxTokens: 98304,
|
|
4210
|
+
contextWindow: 131072,
|
|
4211
|
+
supportsImages: false,
|
|
4212
|
+
supportsPromptCache: true,
|
|
4213
|
+
inputPrice: 0.1,
|
|
4214
|
+
outputPrice: 0.6,
|
|
4215
|
+
cacheWritesPrice: 0,
|
|
4216
|
+
cacheReadsPrice: 0.02,
|
|
4217
|
+
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.",
|
|
4218
|
+
tiers: [
|
|
4219
|
+
{
|
|
4220
|
+
contextWindow: 32e3,
|
|
4221
|
+
inputPrice: 0.07,
|
|
4222
|
+
outputPrice: 0.4,
|
|
4223
|
+
cacheReadsPrice: 0.014
|
|
4224
|
+
},
|
|
4225
|
+
{
|
|
4226
|
+
contextWindow: 128e3,
|
|
4227
|
+
inputPrice: 0.1,
|
|
4228
|
+
outputPrice: 0.6,
|
|
4229
|
+
cacheReadsPrice: 0.02
|
|
4230
|
+
},
|
|
4231
|
+
{
|
|
4232
|
+
contextWindow: Infinity,
|
|
4233
|
+
inputPrice: 0.1,
|
|
4234
|
+
outputPrice: 0.6,
|
|
4235
|
+
cacheReadsPrice: 0.02
|
|
4236
|
+
}
|
|
4237
|
+
]
|
|
4238
|
+
}
|
|
4239
|
+
};
|
|
4240
|
+
var ZAI_DEFAULT_TEMPERATURE = 0;
|
|
4133
4241
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4134
4242
|
0 && (module.exports = {
|
|
4135
4243
|
ANTHROPIC_DEFAULT_MAX_TOKENS,
|
|
@@ -4183,6 +4291,7 @@ var DOUBAO_API_CHAT_PATH = "/chat/completions";
|
|
|
4183
4291
|
TaskCommandName,
|
|
4184
4292
|
TelemetryEventName,
|
|
4185
4293
|
VERTEX_REGIONS,
|
|
4294
|
+
ZAI_DEFAULT_TEMPERATURE,
|
|
4186
4295
|
ackSchema,
|
|
4187
4296
|
anthropicDefaultModelId,
|
|
4188
4297
|
anthropicModels,
|
|
@@ -4239,6 +4348,8 @@ var DOUBAO_API_CHAT_PATH = "/chat/completions";
|
|
|
4239
4348
|
groupOptionsSchema,
|
|
4240
4349
|
historyItemSchema,
|
|
4241
4350
|
installMarketplaceItemOptionsSchema,
|
|
4351
|
+
internationalZAiDefaultModelId,
|
|
4352
|
+
internationalZAiModels,
|
|
4242
4353
|
ipcMessageSchema,
|
|
4243
4354
|
isBlockingAsk,
|
|
4244
4355
|
isGlobalStateKey,
|
|
@@ -4251,6 +4362,8 @@ var DOUBAO_API_CHAT_PATH = "/chat/completions";
|
|
|
4251
4362
|
languagesSchema,
|
|
4252
4363
|
litellmDefaultModelId,
|
|
4253
4364
|
litellmDefaultModelInfo,
|
|
4365
|
+
mainlandZAiDefaultModelId,
|
|
4366
|
+
mainlandZAiModels,
|
|
4254
4367
|
marketplaceItemSchema,
|
|
4255
4368
|
marketplaceItemTypeSchema,
|
|
4256
4369
|
mcpExecutionStatusSchema,
|