@coze/cli 0.3.0 → 0.3.1-alpha.103a11

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
@@ -809,6 +809,23 @@ coze upgrade --tag beta
809
809
  | `--force` | Force upgrade even if already on the latest version |
810
810
  | `--tag <tag>` | Specify the dist-tag to upgrade to (default: `latest`) |
811
811
 
812
+ #### Auto-Upgrade
813
+
814
+ By default Coze CLI keeps itself up to date: it checks for new versions in the background (throttled, never blocking the current command) and, in `auto` mode, installs the update silently so it takes effect on your **next run**. Behavior is controlled via `coze config set`:
815
+
816
+ | Config | Values | Default | Description |
817
+ | ----------------- | ------------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
818
+ | `upgrade.mode` | `auto` / `notify` / `off` | `auto` | `auto`: silent background upgrade; `notify`: only prompt to run `coze upgrade`; `off`: disable checks |
819
+ | `upgrade.channel` | `latest` / `beta` / `alpha` / … | `latest` | npm dist-tag to track |
820
+
821
+ ```bash
822
+ coze config set upgrade.mode notify # only prompt, don't auto-install
823
+ coze config set upgrade.mode off # disable upgrade checks entirely
824
+ coze config set upgrade.channel beta # track the beta channel
825
+ ```
826
+
827
+ Upgrade checks are automatically skipped in CI (the `CI` env var is set), for dev/local builds, and when `COZE_CLI_NO_UPDATE_NOTIFIER` is set. Version checks are throttled to at most once every **4 hours**; a failed background upgrade is retried at most once every **10 minutes**. In JSON output the hint is attached as `_notice.update` with a ready-to-run `command` field. See [`docs/design/auto-upgrade-and-skill-sync.md`](docs/design/auto-upgrade-and-skill-sync.md) for the full auto-upgrade and bundled-skill design.
828
+
812
829
  ### Other Commands
813
830
 
814
831
  | Command | Description |
@@ -855,7 +872,9 @@ The CLI reads configuration from multiple sources with the following priority (h
855
872
  | `COZE_PROJECT_ID` | Default Project ID (used by `message` commands) |
856
873
  | `COZE_CONFIG_FILE` | Custom configuration file path |
857
874
  | `COZE_CONFIG_SCOPE` | Config write scope: `global` or `local` |
858
- | `COZE_AUTO_CHECK_UPDATE` | Enable/disable auto update check: `true` or `false` |
875
+ | `COZE_CLI_NO_UPDATE_NOTIFIER` | Set to any non-empty value to skip the upgrade check for this run (overrides `upgrade.mode`) |
876
+ | `COZE_CLI_NO_SKILL_NOTIFIER` | Set to any non-empty value to suppress the bundled-skill version-mismatch notice |
877
+ | `CI` | When set (to any value other than `false`/`0`), auto-skips upgrade checks and skill notices |
859
878
 
860
879
  ## Exit Codes
861
880
 
@@ -18,7 +18,7 @@ try {
18
18
  const { spawnSync } = require('child_process');
19
19
 
20
20
  // CI 环境不执行同步(不可控环境不写家目录)
21
- // 开发仓库内的安装(rush update / pnpm install)也跳过:发布包不含 src/
21
+ // 开发仓库内的依赖更新(rush update / pnpm add 等)也跳过:发布包不含 src/
22
22
  if (process.env.CI || existsSync(join(__dirname, '..', 'src'))) {
23
23
  process.exit(0);
24
24
  }
@@ -27,7 +27,7 @@ try {
27
27
  const cyan = text => (useColor ? `[36m${text}[0m` : text);
28
28
 
29
29
  // 通过包内 CLI 入口走真实的 `coze self skill install` 代码路径(skipAuth,纯本地:
30
- // 释放 bundled skills ~/.coze/cli/skills 并软链到已安装的 AI agents)。
30
+ // 委托 skills 工具把 bundled skills 拷入中心池 ~/.agents/skills 并软链到已安装的 AI agents)。
31
31
  // 用户改过的 skill 不会被覆盖(sync 默认不带 --force 即阻止)。
32
32
  const result = spawnSync(
33
33
  process.execPath,