@workclaw/cli 1.0.327 → 1.0.330

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.
@@ -0,0 +1,2 @@
1
+ export * from './model';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/configs/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,13 @@
1
+ export declare const MODEL_GENERAL_CONFIG: {
2
+ reasoning: boolean;
3
+ input: string[];
4
+ cost: {
5
+ input: number;
6
+ output: number;
7
+ cacheRead: number;
8
+ cacheWrite: number;
9
+ };
10
+ contextWindow: number;
11
+ maxTokens: number;
12
+ };
13
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/box/configs/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAMhC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './model';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,9 @@
1
+ export declare const SUPPORTED_MODELS: readonly ["gpt-4.1-mini", "gpt-4o-mini", "gpt-5-chat", "gpt-5-mini"];
2
+ export type ModelType = typeof SUPPORTED_MODELS[number];
3
+ export declare const DEFAULT_MODEL: ModelType;
4
+ export declare const MODEL_ID_MAP: Record<ModelType, {
5
+ id: string;
6
+ name: string;
7
+ }>;
8
+ export declare const DEFAULT_PROVIDER = "siliconflow-minimax";
9
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/box/constants/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,sEAKnB,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAA;AAEvD,eAAO,MAAM,aAAa,EAAE,SAAwB,CAAA;AAEpD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,SAAS,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAKxE,CAAA;AAED,eAAO,MAAM,gBAAgB,wBAAwB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAGxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAYvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIxC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAavD"}
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/box/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,UAAU,CAAA;AA2EhE,qBAAa,YAAY;IAIX,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEX,MAAM,EAAE,kBAAkB;IAI9C,cAAc,IAAI,IAAI;IAyBtB,OAAO,CAAC,QAAQ;IAoChB,OAAO,CAAC,aAAa;IAMrB,aAAa,IAAI,MAAM;IAIvB,OAAO,CAAC,cAAc;IAOhB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YA0BhB,eAAe;YA0Bf,iBAAiB;YAoHjB,cAAc;CAoR7B"}
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/box/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAgB,MAAM,UAAU,CAAA;AAiFhE,qBAAa,YAAY;IAIX,OAAO,CAAC,MAAM;IAH1B,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEX,MAAM,EAAE,kBAAkB;IAI9C,cAAc,IAAI,IAAI;IAyBtB,OAAO,CAAC,QAAQ;IAoChB,OAAO,CAAC,aAAa;IAMrB,aAAa,IAAI,MAAM;IAIvB,OAAO,CAAC,cAAc;IAOhB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YA0BhB,eAAe;YA0Bf,iBAAiB;YAoHjB,cAAc;CAwQ7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/box/src/box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAQ1C;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAuJzE"}
1
+ {"version":3,"file":"box.d.ts","sourceRoot":"","sources":["../../../src/box/src/box.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAU1C;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA6KzE"}
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { ModelType } from '../constants';
2
3
  export interface BoxOptions {
3
4
  env?: string;
4
5
  appKey?: string;
@@ -8,6 +9,7 @@ export interface BoxOptions {
8
9
  pluginVersion?: string;
9
10
  openclawPath?: string;
10
11
  debug?: boolean;
12
+ model?: ModelType;
11
13
  }
12
14
  /**
13
15
  * BoxInstaller 配置验证 schema
@@ -25,6 +27,12 @@ export declare const BoxInstallerConfigSchema: z.ZodObject<{
25
27
  appSecret: z.ZodString;
26
28
  pluginVersion: z.ZodOptional<z.ZodString>;
27
29
  openclawPath: z.ZodOptional<z.ZodIntersection<z.ZodString, z.ZodString>>;
30
+ model: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
31
+ "gpt-4.1-mini": "gpt-4.1-mini";
32
+ "gpt-4o-mini": "gpt-4o-mini";
33
+ "gpt-5-chat": "gpt-5-chat";
34
+ "gpt-5-mini": "gpt-5-mini";
35
+ }>>>;
28
36
  }, z.core.$strip>;
29
37
  export type BoxInstallerConfig = z.infer<typeof BoxInstallerConfigSchema>;
30
38
  export interface InstallResult {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;iBAmBpC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/box/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;iBAoBpC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb"}
@@ -193,6 +193,27 @@ class AppError2 extends Error {
193
193
  function getHomeDir$1() {
194
194
  return process$1.env.HOME || process$1.env.USERPROFILE || "";
195
195
  }
196
+ const SUPPORTED_MODELS = [
197
+ "gpt-4.1-mini",
198
+ "gpt-4o-mini",
199
+ "gpt-5-chat",
200
+ "gpt-5-mini"
201
+ ];
202
+ const DEFAULT_MODEL = "gpt-5-mini";
203
+ const MODEL_ID_MAP = {
204
+ "gpt-4.1-mini": { id: "gpt-4.1-mini", name: "GPT-4.1-Mini" },
205
+ "gpt-4o-mini": { id: "gpt-4o-mini", name: "GPT-4o-Mini" },
206
+ "gpt-5-chat": { id: "gpt-5-chat", name: "GPT-5-Chat" },
207
+ "gpt-5-mini": { id: "gpt-5-mini", name: "GPT-5-Mini" }
208
+ };
209
+ const DEFAULT_PROVIDER$1 = "siliconflow-minimax";
210
+ const MODEL_GENERAL_CONFIG$1 = {
211
+ reasoning: false,
212
+ input: ["text"],
213
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
214
+ contextWindow: 2e5,
215
+ maxTokens: 65536
216
+ };
196
217
  const PLUGIN_PACKAGE_NAME$1 = "@workclaw/openclaw-workclaw";
197
218
  function execAsync$1(command, options) {
198
219
  return new Promise((resolve2, reject) => {
@@ -205,6 +226,9 @@ function execAsync$1(command, options) {
205
226
  });
206
227
  });
207
228
  }
229
+ function getObjectHash$1(obj) {
230
+ return JSON.stringify(obj, Object.keys(obj).sort());
231
+ }
208
232
  function deepMerge$1(target, source) {
209
233
  const result = { ...target };
210
234
  for (const key in source) {
@@ -212,9 +236,9 @@ function deepMerge$1(target, source) {
212
236
  const sourceValue = source[key];
213
237
  const targetValue = target[key];
214
238
  if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
215
- if (key === "models" && targetValue.length > 0 && typeof targetValue[0] === "object" && "id" in targetValue[0]) {
216
- const existingIds = new Set(targetValue.map((item) => item.id));
217
- const newItems = sourceValue.filter((item) => !existingIds.has(item.id));
239
+ if (targetValue.length > 0 && typeof targetValue[0] === "object" && targetValue[0] !== null) {
240
+ const existingHashes = new Set(targetValue.map((item) => getObjectHash$1(item)));
241
+ const newItems = sourceValue.filter((item) => !existingHashes.has(getObjectHash$1(item)));
218
242
  result[key] = [...targetValue, ...newItems];
219
243
  } else {
220
244
  const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
@@ -457,6 +481,7 @@ class BoxInstaller {
457
481
  debug.log("[更新配置] 无原有配置");
458
482
  }
459
483
  const config = getConfig(this.config.env || "test", this.config.customIp);
484
+ const modelInfo = MODEL_ID_MAP[this.config.model];
460
485
  const newConfig = {
461
486
  // diagnostics: 诊断配置
462
487
  diagnostics: {
@@ -475,7 +500,7 @@ class BoxInstaller {
475
500
  // 配置合并模式:'merge' 合并 | 'replace' 替换
476
501
  mode: "replace",
477
502
  providers: {
478
- "siliconflow-minimax": {
503
+ [DEFAULT_PROVIDER$1]: {
479
504
  // 模型 API 基础地址
480
505
  baseUrl: config.MODEL_BASE_URL,
481
506
  // API 密钥(留空,由外部提供)
@@ -486,19 +511,11 @@ class BoxInstaller {
486
511
  authHeader: true,
487
512
  models: [{
488
513
  // 模型 ID(provider/model 格式)
489
- id: "Pro/MiniMaxAI/MiniMax-M2.5",
514
+ id: modelInfo.id,
490
515
  // 模型显示名称
491
- name: "MiniMax-M2.5",
492
- // 是否启用推理能力
493
- reasoning: false,
494
- // 支持的输入类型:['text'] | ['text', 'image']
495
- input: ["text"],
496
- // 价格(0 表示免费或未设置)
497
- cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
498
- // 上下文窗口大小(token)
499
- contextWindow: 2e5,
500
- // 最大输出 token 数
501
- maxTokens: 65536
516
+ name: modelInfo.name,
517
+ // 模型通用配置
518
+ ...MODEL_GENERAL_CONFIG$1
502
519
  }]
503
520
  }
504
521
  }
@@ -507,13 +524,7 @@ class BoxInstaller {
507
524
  agents: {
508
525
  defaults: {
509
526
  // 默认使用的模型
510
- model: { primary: "siliconflow-minimax/Pro/MiniMaxAI/MiniMax-M2.5" },
511
- models: {
512
- "siliconflow-minimax/Pro/MiniMaxAI/MiniMax-M2.5": {
513
- // 模型别名,用于显示
514
- alias: "Pro/MiniMaxAI/MiniMax-M2.5"
515
- }
516
- },
527
+ model: { primary: `${DEFAULT_PROVIDER$1}/${modelInfo.id}` },
517
528
  // 工作区目录路径
518
529
  workspace: paths.workspace,
519
530
  // 会话压缩模式:'safeguard' 保守模式
@@ -711,6 +722,7 @@ async function createBoxCommand(options) {
711
722
  let appKey = options.appKey;
712
723
  let appSecret = options.appSecret;
713
724
  let customIp = options.customIp;
725
+ let model = options.model;
714
726
  const questions = [];
715
727
  if (!env) {
716
728
  debug.log("[盒子安装] 需要选择环境");
@@ -762,6 +774,21 @@ async function createBoxCommand(options) {
762
774
  } else {
763
775
  debug.log("[盒子安装] 使用命令行参数: appSecret");
764
776
  }
777
+ if (!model) {
778
+ debug.log("[盒子安装] 需要选择模型");
779
+ questions.push({
780
+ type: "list",
781
+ name: "model",
782
+ message: chalk.cyan("请选择模型:"),
783
+ default: DEFAULT_MODEL,
784
+ choices: SUPPORTED_MODELS.map((m) => ({
785
+ name: m === DEFAULT_MODEL ? `${chalk.green(m)} ${chalk.dim("(默认)")}` : m,
786
+ value: m
787
+ }))
788
+ });
789
+ } else {
790
+ debug.log(`[盒子安装] 使用命令行参数: model=${model}`);
791
+ }
765
792
  if (questions.length > 0) {
766
793
  debug.log(`[盒子安装] 开始交互式问答,共 ${questions.length} 个问题`);
767
794
  const answers = await inquirer.prompt(questions);
@@ -769,7 +796,9 @@ async function createBoxCommand(options) {
769
796
  env = env || answers.env || "test";
770
797
  appKey = appKey || answers.appKey;
771
798
  appSecret = appSecret || answers.appSecret;
799
+ model = model || answers.model || DEFAULT_MODEL;
772
800
  }
801
+ model = model || DEFAULT_MODEL;
773
802
  if (env === "custom" && !customIp) {
774
803
  debug.log("[盒子安装] 自定义环境需要输入后端 IP");
775
804
  const answer = await inquirer.prompt([{
@@ -793,7 +822,7 @@ async function createBoxCommand(options) {
793
822
  } else if (env === "custom" && customIp) {
794
823
  debug.log(`[盒子安装] 使用命令行参数: customIp=${customIp}`);
795
824
  }
796
- debug.log(`[盒子安装] 最终参数: env=${env}, customIp=${customIp}, openclawPath=${options.openclawPath}`);
825
+ debug.log(`[盒子安装] 最终参数: env=${env}, customIp=${customIp}, openclawPath=${options.openclawPath}, model=${model}`);
797
826
  debug.log("[盒子安装] 创建 BoxInstaller 实例...");
798
827
  const installer = new BoxInstaller({
799
828
  appKey,
@@ -802,7 +831,8 @@ async function createBoxCommand(options) {
802
831
  customIp,
803
832
  wsUrl: options.wsUrl,
804
833
  pluginVersion: options.pluginVersion,
805
- openclawPath: options.openclawPath
834
+ openclawPath: options.openclawPath,
835
+ model
806
836
  });
807
837
  debug.log("[盒子安装] 开始安装...");
808
838
  await installer.install();
@@ -837,7 +867,7 @@ async function createBoxCommand(options) {
837
867
  }
838
868
  }
839
869
  function registerCommands$1(program2) {
840
- program2.command("box").description("盒子设备安装(无需登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--app-key <appKey>", "App Key").option("--app-secret <appSecret>", "App Secret").option("--customIp <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--debug", "开启调试日志").action(createBoxCommand);
870
+ program2.command("box").description("盒子设备安装(无需登录)").option("-e, --env <env>", "环境 (test/prod/custom)").option("--app-key <appKey>", "App Key").option("--app-secret <appSecret>", "App Secret").option("--customIp <ip>", "自定义后端 IP(仅 custom 环境生效)").option("--ws-url <url>", "自定义 WebSocket URL(仅 custom 环境生效,默认自动生成)").option("--plugin-version <plugin-version>", "插件版本号(默认最新版)").option("--openclaw-path <path>", "OpenClaw 安装目录路径(默认 ~/.openclaw)").option("--model <model>", `选择模型 (${SUPPORTED_MODELS.join("/")}),默认 ${DEFAULT_MODEL}`).option("--debug", "开启调试日志").action(createBoxCommand);
841
871
  }
842
872
  function createHttpClient(baseURL) {
843
873
  return axios.create({
@@ -4905,6 +4935,16 @@ function buildLocalCode(phone, machineId) {
4905
4935
  function getHomeDir() {
4906
4936
  return process$1.env.HOME || process$1.env.USERPROFILE || "";
4907
4937
  }
4938
+ const DEFAULT_PROVIDER = "siliconflow-minimax";
4939
+ const DEFAULT_MODEL_ID = "MiniMax-M2.5";
4940
+ const DEFAULT_MODEL_NAME = "MiniMax-M2.5";
4941
+ const MODEL_GENERAL_CONFIG = {
4942
+ reasoning: false,
4943
+ input: ["text"],
4944
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
4945
+ contextWindow: 2e5,
4946
+ maxTokens: 65536
4947
+ };
4908
4948
  const PLUGIN_PACKAGE_NAME = "@workclaw/openclaw-workclaw";
4909
4949
  function execAsync(command, options) {
4910
4950
  return new Promise((resolve2, reject) => {
@@ -4917,6 +4957,9 @@ function execAsync(command, options) {
4917
4957
  });
4918
4958
  });
4919
4959
  }
4960
+ function getObjectHash(obj) {
4961
+ return JSON.stringify(obj, Object.keys(obj).sort());
4962
+ }
4920
4963
  function deepMerge(target, source) {
4921
4964
  const result = { ...target };
4922
4965
  for (const key in source) {
@@ -4924,9 +4967,9 @@ function deepMerge(target, source) {
4924
4967
  const sourceValue = source[key];
4925
4968
  const targetValue = target[key];
4926
4969
  if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
4927
- if (key === "models" && targetValue.length > 0 && typeof targetValue[0] === "object" && "id" in targetValue[0]) {
4928
- const existingIds = new Set(targetValue.map((item) => item.id));
4929
- const newItems = sourceValue.filter((item) => !existingIds.has(item.id));
4970
+ if (targetValue.length > 0 && typeof targetValue[0] === "object" && targetValue[0] !== null) {
4971
+ const existingHashes = new Set(targetValue.map((item) => getObjectHash(item)));
4972
+ const newItems = sourceValue.filter((item) => !existingHashes.has(getObjectHash(item)));
4930
4973
  result[key] = [...targetValue, ...newItems];
4931
4974
  } else {
4932
4975
  const mergedArray = [.../* @__PURE__ */ new Set([...targetValue, ...sourceValue])];
@@ -5235,19 +5278,15 @@ class LocalInstaller {
5235
5278
  models: {
5236
5279
  mode: "replace",
5237
5280
  providers: {
5238
- "siliconflow-minimax": {
5281
+ [DEFAULT_PROVIDER]: {
5239
5282
  baseUrl: boundConfig.modelApiBaseUrl || config.MODEL_BASE_URL,
5240
5283
  apiKey: boundConfig.modelApiKey,
5241
5284
  api: "openai-completions",
5242
5285
  authHeader: true,
5243
5286
  models: [{
5244
- id: "Pro/MiniMaxAI/MiniMax-M2.5",
5245
- name: "MiniMax-M2.5",
5246
- reasoning: false,
5247
- input: ["text"],
5248
- cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
5249
- contextWindow: 2e5,
5250
- maxTokens: 65536
5287
+ id: DEFAULT_MODEL_ID,
5288
+ name: DEFAULT_MODEL_NAME,
5289
+ ...MODEL_GENERAL_CONFIG
5251
5290
  }]
5252
5291
  }
5253
5292
  }
@@ -5255,12 +5294,7 @@ class LocalInstaller {
5255
5294
  // agents: 代理配置
5256
5295
  agents: {
5257
5296
  defaults: {
5258
- model: { primary: "siliconflow-minimax/Pro/MiniMaxAI/MiniMax-M2.5" },
5259
- models: {
5260
- "siliconflow-minimax/Pro/MiniMaxAI/MiniMax-M2.5": {
5261
- alias: "Pro/MiniMaxAI/MiniMax-M2.5"
5262
- }
5263
- },
5297
+ model: { primary: `${DEFAULT_PROVIDER}/${DEFAULT_MODEL_ID}` },
5264
5298
  workspace: paths.workspace,
5265
5299
  compaction: { mode: "safeguard" },
5266
5300
  verboseDefault: "full",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import("./index-DthSFxr_.js").then((cli) => {
2
+ import("./index-DV-DJElg.js").then((cli) => {
3
3
  cli.default();
4
4
  });
@@ -0,0 +1,2 @@
1
+ export * from './model';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/local/configs/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,13 @@
1
+ export declare const MODEL_GENERAL_CONFIG: {
2
+ reasoning: boolean;
3
+ input: string[];
4
+ cost: {
5
+ input: number;
6
+ output: number;
7
+ cacheRead: number;
8
+ cacheWrite: number;
9
+ };
10
+ contextWindow: number;
11
+ maxTokens: number;
12
+ };
13
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/local/configs/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;CAMhC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './model';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/local/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
@@ -0,0 +1,4 @@
1
+ export declare const DEFAULT_PROVIDER = "siliconflow-minimax";
2
+ export declare const DEFAULT_MODEL_ID = "MiniMax-M2.5";
3
+ export declare const DEFAULT_MODEL_NAME = "MiniMax-M2.5";
4
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/local/constants/model.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,wBAAwB,CAAA;AAErD,eAAO,MAAM,gBAAgB,iBAAiB,CAAA;AAE9C,eAAO,MAAM,kBAAkB,iBAAiB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/local/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAyF/E;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,KAAK,CAAa;IAE1B;;OAEG;gBACS,MAAM,EAAE,oBAAoB;IAOxC;;OAEG;IACH,cAAc,IAAI,IAAI;IAUtB;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE9B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;YACW,OAAO;IAoBrB;;OAEG;YACW,kBAAkB;IAchC;;OAEG;YACW,eAAe;IAmB7B;;OAEG;YACW,iBAAiB;IAoH/B;;OAEG;YACW,cAAc;CAmN7B"}
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../../src/local/installer/installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA6B,oBAAoB,EAAE,MAAM,UAAU,CAAA;AA+F/E;;;GAGG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,KAAK,CAAa;IAE1B;;OAEG;gBACS,MAAM,EAAE,oBAAoB;IAOxC;;OAEG;IACH,cAAc,IAAI,IAAI;IAUtB;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAgE9B;;OAEG;IACH,aAAa,IAAI,MAAM;IAIvB;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;YACW,OAAO;IAoBrB;;OAEG;YACW,kBAAkB;IAchC;;OAEG;YACW,eAAe;IAmB7B;;OAEG;YACW,iBAAiB;IAoH/B;;OAEG;YACW,cAAc;CA0M7B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workclaw/cli",
3
3
  "type": "module",
4
- "version": "1.0.327",
4
+ "version": "1.0.330",
5
5
  "description": "WorkClaw CLI 工具 - 用于初始化和配置 WorkClaw 插件",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -40,4 +40,4 @@
40
40
  "tar": "^6.2.1",
41
41
  "zod": "^4.3.6"
42
42
  }
43
- }
43
+ }