@coze/cli 0.3.0 → 0.3.1-alpha.ae71a9
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 +20 -1
- package/bin/postinstall.js +1 -1
- package/lib/cli.js +3 -3
- package/lib/index-JxWKC7px.js +1 -0
- package/lib/send-message.worker.js +1 -1
- package/lib/session-task-refresh.worker.js +1 -1
- package/lib/task-worker-C2B8gryU.js +1 -0
- package/package.json +5 -3
- package/skills/manifest.json +6 -6
- package/skills/using-coze-cli/SKILL.md +16 -2
- package/skills/using-coze-cli/coze-claw/MODULE.md +1 -1
- package/skills/using-coze-cli/coze-code/MODULE.md +23 -11
- package/skills/using-coze-cli/coze-code/references/coze-code-project.md +11 -4
- package/skills/using-coze-cli/coze-file/MODULE.md +1 -1
- package/skills/using-coze-cli/coze-generate/MODULE.md +1 -1
- package/lib/index-DN7-Fdfx.js +0 -1
- package/lib/task-worker-Bt8hYeP2.js +0 -1
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/auto-upgrade.md`](docs/auto-upgrade.md) for details.
|
|
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
|
-
| `
|
|
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
|
|
package/bin/postinstall.js
CHANGED
|
@@ -18,7 +18,7 @@ try {
|
|
|
18
18
|
const { spawnSync } = require('child_process');
|
|
19
19
|
|
|
20
20
|
// CI 环境不执行同步(不可控环境不写家目录)
|
|
21
|
-
//
|
|
21
|
+
// 开发仓库内的依赖更新(rush update / pnpm add 等)也跳过:发布包不含 src/
|
|
22
22
|
if (process.env.CI || existsSync(join(__dirname, '..', 'src'))) {
|
|
23
23
|
process.exit(0);
|
|
24
24
|
}
|