@gaiaworks/gaia-cli 0.0.3 → 0.0.4

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/README.md CHANGED
@@ -14,17 +14,17 @@ npx @gaiaworks/gaia-cli version
14
14
 
15
15
  ```bash
16
16
  npx @gaiaworks/gaia-cli@latest install
17
- gaia-cli version
17
+ gaia version
18
18
  ```
19
19
 
20
20
  安装模式:
21
21
 
22
22
  ```bash
23
23
  npx @gaiaworks/gaia-cli@latest install
24
- npx @gaiaworks/gaia-cli@latest install --mode saas
25
- npx @gaiaworks/gaia-cli@latest install --mode work
24
+ npx @gaiaworks/gaia-cli@latest install --mode external
25
+ npx @gaiaworks/gaia-cli@latest install --mode internal
26
26
  ```
27
27
 
28
- 未指定 `--mode` 时默认写入 `saas`。安装脚本会在全局安装完成后执行 `gaia-cli config set mode <saas|work>`,用于后续区分内部/外部登录流程和 shared skill 规则。
28
+ 未指定 `--mode` 时默认写入 `external`。安装脚本会执行 `gaia setup --mode <external|internal>`,用于初始化本地 `install_mode` 和 Agent Skills。
29
29
 
30
30
  安装时会根据 npm 包版本,从 OSS 的同版本目录下载当前平台对应的 `gaia-cli` 二进制。
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@gaiaworks/gaia-cli",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "JavaScript launcher for gaia-cli.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,
7
7
  "bin": {
8
- "gaia-cli": "scripts/run.js"
8
+ "gaia": "scripts/run.js"
9
9
  },
10
10
  "os": [
11
11
  "darwin",
@@ -11,7 +11,7 @@ const packageSpec = `${packageJson.name}@${packageJson.version}`;
11
11
  const binaryPath = path.join(__dirname, '..', 'bin', binaryName());
12
12
 
13
13
  function parseInstallArgs(args) {
14
- let mode = 'saas';
14
+ let mode = 'external';
15
15
  let explicitMode = false;
16
16
  const npmArgs = [];
17
17
 
@@ -20,7 +20,7 @@ function parseInstallArgs(args) {
20
20
  if (arg === '--mode') {
21
21
  const value = args[i + 1];
22
22
  if (!value) {
23
- throw new Error('--mode requires a value: work or saas');
23
+ throw new Error('--mode requires a value: external or internal');
24
24
  }
25
25
  mode = value;
26
26
  explicitMode = true;
@@ -35,8 +35,8 @@ function parseInstallArgs(args) {
35
35
  npmArgs.push(arg);
36
36
  }
37
37
 
38
- if (mode !== 'work' && mode !== 'saas') {
39
- throw new Error(`Unsupported mode: ${mode}. Expected work or saas.`);
38
+ if (mode !== 'external' && mode !== 'internal') {
39
+ throw new Error(`Unsupported mode: ${mode}. Expected external or internal.`);
40
40
  }
41
41
 
42
42
  return { explicitMode, mode, npmArgs };
@@ -70,11 +70,11 @@ function installWizard(args) {
70
70
 
71
71
  ensureLocalBinary();
72
72
  run('npm', ['install', '-g', packageSpec]);
73
- run(binaryPath, ['config', 'set', 'mode', mode], { stdio: 'ignore' });
73
+ run(binaryPath, ['setup', '--mode', mode], { stdio: 'ignore' });
74
74
  if (explicitMode) {
75
- console.error(`[gaia-cli] 安装完成,当前模式: ${mode}。可以执行: gaia-cli version`);
75
+ console.error(`[gaia-cli] 安装完成,当前模式: ${mode}。可以执行: gaia version`);
76
76
  } else {
77
- console.error('[gaia-cli] 安装完成。可以执行: gaia-cli version');
77
+ console.error('[gaia-cli] 安装完成。可以执行: gaia version');
78
78
  }
79
79
  }
80
80
 
File without changes
package/scripts/run.js CHANGED
File without changes