galaxy-opc 0.5.7 → 0.5.9

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.
Files changed (2) hide show
  1. package/bin/cli.mjs +15 -16
  2. package/package.json +1 -1
package/bin/cli.mjs CHANGED
@@ -439,6 +439,9 @@ async function cmdSetup() {
439
439
  { label: "OAuth 扫码登录", desc: "浏览器扫码,无需 API Key", recommended: true },
440
440
  { label: "DashScope API Key", desc: "从 dashscope.aliyun.com 获取" },
441
441
  ]);
442
+ // User explicitly chose Qwen. Set Qwen as default target unless a stronger config is provided below.
443
+ defaultModel = "qwen-portal/qwen-max";
444
+ newConfig = deepMerge(newConfig, { agents: { defaults: { model: { primary: "qwen-portal/qwen-max" } } } });
442
445
  if (m === 0) {
443
446
  console.log(gray("\n 浏览器即将打开,扫码登录通义千问(qwen-portal)...\n"));
444
447
  const doLogin = await askYesNo(" 现在执行登录?", true);
@@ -446,8 +449,6 @@ async function cmdSetup() {
446
449
  try {
447
450
  await runCommand("openclaw", ["models", "auth", "login", "--provider", "qwen-portal"]);
448
451
  console.log(green("\n ✓ Qwen OAuth 登录成功"));
449
- defaultModel = "qwen-portal/qwen-max";
450
- newConfig = deepMerge(newConfig, { agents: { defaults: { model: { primary: "qwen-portal/qwen-max" } } } });
451
452
  } catch {
452
453
  console.log(yellow("\n ! Qwen OAuth 登录失败"));
453
454
  console.log(gray(" 你可以稍后手动运行: openclaw models auth login --provider qwen-portal"));
@@ -470,20 +471,17 @@ async function cmdSetup() {
470
471
  }
471
472
  } else {
472
473
  printQwenCodingPlanGuide();
473
- const hasKey = await askYesNo(" 你已经拿到 DashScope API Key 了吗?", false);
474
- if (!hasKey) {
475
- console.log(dim(" 已跳过 API Key 输入,稍后可运行 npx galaxy-opc setup 继续配置。"));
474
+ const key = await ask("\n 请输入 DashScope API Key(sk-...,可直接回车跳过): ");
475
+ if (key) {
476
+ newEnv["DASHSCOPE_API_KEY"] = key;
477
+ defaultModel = "dashscope/qwen-plus";
478
+ newConfig = deepMerge(newConfig, {
479
+ models: { providers: { dashscope: { baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1", apiKey: key, api: "openai-completions", models: [{ id: "qwen-plus", name: "Qwen Plus", contextWindow: 128000, maxTokens: 8192 }] } } },
480
+ agents: { defaults: { model: { primary: "dashscope/qwen-plus" } } },
481
+ });
482
+ console.log(green(" ✓ 已保存 DashScope API Key"));
476
483
  } else {
477
- const key = await ask("\n 请输入 DashScope API Key (sk-...): ");
478
- if (key) {
479
- newEnv["DASHSCOPE_API_KEY"] = key;
480
- defaultModel = "dashscope/qwen-plus";
481
- newConfig = deepMerge(newConfig, {
482
- models: { providers: { dashscope: { baseUrl: "https://dashscope.aliyuncs.com/compatible-mode/v1", apiKey: key, api: "openai-completions", models: [{ id: "qwen-plus", name: "Qwen Plus", contextWindow: 128000, maxTokens: 8192 }] } } },
483
- agents: { defaults: { model: { primary: "dashscope/qwen-plus" } } },
484
- });
485
- console.log(green(" ✓ 已保存"));
486
- }
484
+ console.log(dim(" 已跳过 API Key 输入,默认使用 qwen-portal/qwen-max;可稍后执行 Qwen OAuth 登录。"));
487
485
  }
488
486
  }
489
487
  } else if (cnIdx === 1) {
@@ -623,8 +621,9 @@ async function cmdSetup() {
623
621
  ${cyan("openclaw gateway")}
624
622
 
625
623
  ${bold("启动后访问:")}
626
- 对话界面: ${cyan("http://localhost:18789")}
624
+ 对话界面: ${cyan(`http://localhost:18789/?token=${gatewayToken}`)}
627
625
  管理后台: ${cyan(`http://localhost:18789/opc/admin?token=${gatewayToken}`)}
626
+ ${dim("注意:不要访问 http://localhost:18791(内部 Browser Control 端口,直接打开会显示 Unauthorized)")}
628
627
 
629
628
  ${bold("后台驻守(开机自启):")}
630
629
  ${cyan("openclaw onboard --install-daemon")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "galaxy-opc",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "星环 Galaxy OPC — 一人公司孵化与赋能平台 AI 员工系统",
5
5
  "keywords": [
6
6
  "ai",