ribo-cli-setup 2.2.0 → 2.3.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.
Files changed (2) hide show
  1. package/bin/cli.js +11 -11
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -38,7 +38,7 @@ function parseArgs(argv) {
38
38
  upgrade: false,
39
39
  uninstall: false,
40
40
  skipAuth: false,
41
- yes: false,
41
+ yes: true,
42
42
  help: false,
43
43
  };
44
44
  for (let i = 0; i < argv.length; i++) {
@@ -218,7 +218,7 @@ async function main() {
218
218
  const binPath = path.join(binDir, BIN_NAME);
219
219
 
220
220
  console.log('┌─────────────────────────────────────────────┐');
221
- console.log('│ ribo-cli-setup 一键安装器 │');
221
+ console.log('│ 播AI工具(ribo-cli) 管理器 │');
222
222
  console.log('└─────────────────────────────────────────────┘');
223
223
  console.log(` 平台: ${plat.osName}/${plat.archName}`);
224
224
  console.log(` 网关: ${opts.gateway}`);
@@ -338,15 +338,7 @@ async function main() {
338
338
  console.log('→ 配置网关地址…');
339
339
  run(binPath, ['config', 'set-gateway', opts.gateway]);
340
340
 
341
- // 选择接入目标
342
- const tgt = opts.target || (await pickTarget(opts));
343
- if (!tgt) { console.error('未指定接入目标,已取消(仅完成二进制安装)'); notePathIfMissing(binDir); return; }
344
- const flag = tgt === 'qwenwork' ? '--qwenwork' : '--workbuddy';
345
-
346
- console.log(`→ 接入 ${tgt === 'qwenwork' ? '千问办公' : 'WorkBuddy'}…`);
347
- run(binPath, ['install', flag]);
348
-
349
- // 实名授权
341
+ // 实名授权(先于技能安装,确保安装时已有有效凭据)
350
342
  if (!opts.skipAuth) {
351
343
  const doAuth = opts.yes || (await confirm('是否现在执行实名授权(ribo-cli auth init)?', false));
352
344
  if (doAuth) {
@@ -357,6 +349,14 @@ async function main() {
357
349
  }
358
350
  }
359
351
 
352
+ // 选择接入目标并安装技能
353
+ const tgt = opts.target || (await pickTarget(opts));
354
+ if (!tgt) { console.error('未指定接入目标,已取消(仅完成二进制安装)'); notePathIfMissing(binDir); return; }
355
+ const flag = tgt === 'qwenwork' ? '--qwenwork' : '--workbuddy';
356
+
357
+ console.log(`→ 接入 ${tgt === 'qwenwork' ? '千问办公' : 'WorkBuddy'}…`);
358
+ run(binPath, ['install', flag]);
359
+
360
360
  notePathIfMissing(binDir);
361
361
  console.log();
362
362
  console.log('✓ 全部完成。');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ribo-cli-setup",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "ribo-cli 一键安装器:检测操作系统与 CPU 架构,从 ribo 网关下载对应平台 CLI 二进制,完成 WorkBuddy / 千问办公接入与实名授权",
5
5
  "bin": {
6
6
  "ribo-cli-setup": "bin/cli.js"