@viceme-ai/cli 0.9.2 → 0.9.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.3] - 2026-07-29
4
+
5
+ ### Fixes
6
+
7
+ - 允许终态后重新发布相同来源 (`4ad71ba`)
8
+ - 登录时自动回退本地加密凭证 (`6e02a08`)
9
+ - 支持开发预览环境发布凭证 (`ee42fab`)
10
+
3
11
  ## [0.9.2] - 2026-07-27
4
12
 
5
13
  ### Fixes
package/README.md CHANGED
@@ -157,7 +157,7 @@ viceme profile configure local --clear-api-base-url
157
157
 
158
158
  Normal `viceme auth login` never writes a credential into a profile. A local Profile credential is set, replaced, or cleared only by the explicit `profile add/configure` flags, is reported only as `source=local_profile`, and is never returned by list/status output. Because `--access-token` is visible in argv and may enter shell history, use it only in the controlled local/internal environment described here.
159
159
 
160
- Credential priority is process (`VICEME_ACCESS_TOKEN`) → selected local Profile → device login. Every publication credential must use `vpa1.<audience>.<secret>`: `cn-prod` is accepted only for `https://api.viceme.cn`, `global-prod` only for `https://api.viceme.ai`, and `local-dev` Profile credentials only for loopback endpoints. A process `local-dev` credential additionally requires `VICEME_CLI_ALLOW_LOCAL_PROCESS_CREDENTIAL=1`. `VICEME_CLI_CONFIG_DIR` can override the config root, while `VICEME_API_BASE_URL` remains a one-process endpoint override and never widens a Profile credential's origin. API and presigned-upload redirects fail closed.
160
+ Credential priority is process (`VICEME_ACCESS_TOKEN`) → selected local Profile → device login. Every publication credential must use `vpa1.<audience>.<secret>`: `cn-prod` is accepted only for `https://api.viceme.cn`, `global-prod` only for `https://api.viceme.ai`, `dev-preview` only for `https://viceme-envoy-dev.preview.tencent-zeabur.cn`, and `local-dev` Profile credentials only for loopback endpoints. A process `local-dev` credential additionally requires `VICEME_CLI_ALLOW_LOCAL_PROCESS_CREDENTIAL=1`. `VICEME_CLI_CONFIG_DIR` can override the config root, while `VICEME_API_BASE_URL` remains a one-process endpoint override and never widens a Profile credential's origin. API and presigned-upload redirects fail closed.
161
161
 
162
162
  Update checks query the npm registry directly and store only the last successful version result in `~/.viceme-cli/update-state.json`. A result is used as a fallback for at most 24 hours when the registry is temporarily unavailable. Normal npm-managed CLI invocations read this cache synchronously and refresh it in the background at most once per 24 hours, so commands never wait for update discovery. When a newer release is known, structured success and error objects include `_notice.update` with `current`, `latest`, `message`, and the exact `viceme update` command so AI Agents can notify the user. The advisory never changes the command exit status and does not trigger an automatic update. Set `VICEME_NO_UPDATE_NOTIFIER=1` to suppress it outside CI; standard CI environments are skipped automatically. npm operations launched by `viceme install` or `viceme update` use the isolated `~/.viceme-cli/npm-cache`, so a broken user-level `~/.npm` cache does not block the CLI. Both files are non-secret and can be deleted safely; credentials never enter either cache.
163
163
 
@@ -198,13 +198,15 @@ Before starting or exchanging a device authorization, the CLI verifies the full
198
198
 
199
199
  ### macOS sandboxes (Codex and Claude Code)
200
200
 
201
- A fresh sandboxed installation can create a private `0600` file master key when the macOS Keychain is blocked. If credentials were previously created from Terminal with a Keychain-backed master key, run this once from that same interactive macOS user session:
201
+ When an explicit device login runs inside a sandbox that cannot access the macOS Keychain, the CLI automatically creates a private `0600` file master key and saves the newly authorized credential there. No manual preparation is required.
202
+
203
+ To reuse credentials previously created from Terminal with a Keychain-backed master key without logging in again, run this once from that same interactive macOS user session:
202
204
 
203
205
  ```bash
204
206
  viceme config keychain-downgrade
205
207
  ```
206
208
 
207
- The command copies the existing master key into `~/.viceme-cli/credentials/master.key.file` and imports configured legacy Keychain credentials into encrypted files. Existing Keychain entries are preserved as a cold backup. The command is idempotent and never prints or stores a plaintext token. Afterward, Codex and Claude Code sandboxes for the same macOS user can read the encrypted credential files without Keychain access. The trade-off is explicit: security is then enforced by the user's filesystem permissions (`0700` directory and `0600` files) instead of the Keychain per-process access boundary.
209
+ The command copies the existing master key into `~/.viceme-cli/credentials/master.key.file` and imports configured legacy Keychain credentials into encrypted files. Existing Keychain entries are preserved as a cold backup. The command is idempotent and never prints or stores a plaintext token. Afterward, Codex and Claude Code sandboxes for the same macOS user can read the encrypted credential files without Keychain access. This migration is optional when the user is willing to log in again. The trade-off is explicit: security is then enforced by the user's filesystem permissions (`0700` directory and `0600` files) instead of the Keychain per-process access boundary.
208
210
 
209
211
  The public CLI exposes one standard authentication and publication surface. A short-lived staff authorization credential may be supplied through process environment (`source=process`) or an explicitly configured local Profile (`source=local_profile`). Both use normal inspect/publish/job commands and the standard `x-api-key` header; there are no identity-selection or staff-authorization issuance commands. Tokens are never printed or inherited by update subprocesses, and login/logout fail closed while either override is active.
210
212
 
package/README.zh.md CHANGED
@@ -157,7 +157,7 @@ viceme profile configure local --clear-api-base-url
157
157
 
158
158
  正常 `viceme auth login` 永远不会向 Profile 写入凭证。本地 Profile credential 只能通过显式的 `profile add/configure` flag 设置、替换或清除,list/status 只报告 `source=local_profile`,不会返回 token。`--access-token` 会出现在 argv 中且可能进入 shell history,因此只能用于本文约定的受控本地/内部环境。
159
159
 
160
- 凭证优先级为进程 `VICEME_ACCESS_TOKEN` → 当前本地 Profile → 设备登录。publication credential 必须使用 `vpa1.<audience>.<secret>`:`cn-prod` 只能访问 `https://api.viceme.cn`,`global-prod` 只能访问 `https://api.viceme.ai`,Profile 中的 `local-dev` 只能访问 loopback endpoint;进程 `local-dev` 还要求 `VICEME_CLI_ALLOW_LOCAL_PROCESS_CREDENTIAL=1`。`VICEME_CLI_CONFIG_DIR` 可覆盖配置根目录,`VICEME_API_BASE_URL` 仍只是单进程 endpoint 覆盖,不能放宽 Profile credential 的 origin。API 与预签名上传重定向一律 fail closed。
160
+ 凭证优先级为进程 `VICEME_ACCESS_TOKEN` → 当前本地 Profile → 设备登录。publication credential 必须使用 `vpa1.<audience>.<secret>`:`cn-prod` 只能访问 `https://api.viceme.cn`,`global-prod` 只能访问 `https://api.viceme.ai`,`dev-preview` 只能访问 `https://viceme-envoy-dev.preview.tencent-zeabur.cn`,Profile 中的 `local-dev` 只能访问 loopback endpoint;进程 `local-dev` 还要求 `VICEME_CLI_ALLOW_LOCAL_PROCESS_CREDENTIAL=1`。`VICEME_CLI_CONFIG_DIR` 可覆盖配置根目录,`VICEME_API_BASE_URL` 仍只是单进程 endpoint 覆盖,不能放宽 Profile credential 的 origin。API 与预签名上传重定向一律 fail closed。
161
161
 
162
162
  更新检查直接请求 npm registry,并且只把最近一次成功查询到的版本写入 `~/.viceme-cli/update-state.json`;registry 暂时不可用时,该结果最多回退使用 24 小时。npm 管理的 CLI 在普通命令中只同步读取本地缓存,并且最多每 24 小时在后台刷新一次,因此命令不会等待版本发现。当缓存确认存在新版本时,结构化成功与错误对象都会携带 `_notice.update`,其中包含 `current`、`latest`、`message` 和精确的 `viceme update` 命令,AI Agent 可以据此提醒用户。该提醒不会改变命令退出码,也不会自动执行更新。非 CI 环境可以设置 `VICEME_NO_UPDATE_NOTIFIER=1` 关闭提醒;标准 CI 环境会自动跳过。`viceme install` 和 `viceme update` 启动的 npm 操作统一使用隔离的 `~/.viceme-cli/npm-cache`,不会因为用户级 `~/.npm` 缓存损坏而失败。这两个位置都不包含秘密信息,可以安全删除;凭证不会进入任何更新缓存。
163
163
 
@@ -198,13 +198,15 @@ CLI 会在创建设备授权或兑换一次性 device code 之前,对完整的
198
198
 
199
199
  ### macOS 沙箱(Codex 与 Claude Code)
200
200
 
201
- 全新沙箱环境在系统 Keychain 被阻断时,可以自动创建私有的 `0600` 文件主密钥。如果凭证此前是在 Terminal 中使用 Keychain 主密钥创建的,请从同一 macOS 用户的交互式终端执行一次:
201
+ 当用户在无法访问 macOS Keychain 的沙箱中显式执行设备登录时,CLI 会自动创建私有的 `0600` 文件主密钥,并将新授权的凭证保存到本地加密文件中,无需用户预先执行额外命令。
202
+
203
+ 如果用户不想重新登录,希望直接复用此前在 Terminal 中使用 Keychain 主密钥创建的凭证,可以从同一 macOS 用户的交互式终端执行一次:
202
204
 
203
205
  ```bash
204
206
  viceme config keychain-downgrade
205
207
  ```
206
208
 
207
- 该命令会把现有主密钥复制到 `~/.viceme-cli/credentials/master.key.file`,并将已配置 Profile 的旧 Keychain 凭证导入加密文件。原 Keychain 条目会保留为冷备份。命令可重复执行,不会打印 token,也不会将 token 明文落盘。完成后,同一 macOS 用户下的 Codex、Claude Code 沙箱无需访问 Keychain 即可读取加密凭证。其明确的安全取舍是:降级后由用户文件权限(目录 `0700`、文件 `0600`)代替 Keychain 的进程级访问边界。
209
+ 该命令会把现有主密钥复制到 `~/.viceme-cli/credentials/master.key.file`,并将已配置 Profile 的旧 Keychain 凭证导入加密文件。原 Keychain 条目会保留为冷备份。命令可重复执行,不会打印 token,也不会将 token 明文落盘。完成后,同一 macOS 用户下的 Codex、Claude Code 沙箱无需访问 Keychain 即可读取加密凭证;如果愿意重新登录,则不需要执行该迁移命令。其明确的安全取舍是:降级后由用户文件权限(目录 `0700`、文件 `0600`)代替 Keychain 的进程级访问边界。
208
210
 
209
211
  公开 CLI 只提供一套标准认证与发布命令面。工作人员短时授权凭证可由进程环境注入(`source=process`),也可由受控本地 Profile 显式配置(`source=local_profile`);两者都只调用标准 `inspect/publish/job` 并使用统一 `x-api-key`。CLI 不提供身份选择或 staff authorization 签发命令;永远不输出 token,任一覆盖凭证生效时 login/logout fail closed,update 子进程也不会继承该凭证。
210
212
 
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- 7f21f1c71185f7ce71175387c462d25efd8a1d57d30c9aef1783a04e5cba1aaa viceme_0.9.2_darwin_amd64
2
- 77db5cc05043d3f831e2f6b2374264bd53edc8874065c2e1a46cc707ed298858 viceme_0.9.2_darwin_arm64
3
- 50fa0e10c8f0cdf5d48d88c4146888a90a98c38045a537ab8ee8f8b2a2754141 viceme_0.9.2_linux_amd64
4
- 368d11c72700333e7f53f402e3a3cd58c99c753d59ab82e14f8ea0fb05f82292 viceme_0.9.2_linux_arm64
5
- f1942ad4dc1bc85ecf775954faccb793df3f0962e6d1b1b3f8a583bddd3a1f9e viceme_0.9.2_windows_amd64.exe
6
- f51acff1dd8d0f37eb29f01e233a282822e8472b2286b45cac67fb7d15804248 viceme_0.9.2_windows_arm64.exe
1
+ 19ff2a49c4362232f17abde16ff595d73084e9f8ec19d1517e52219c57c51eb5 viceme_0.9.3_darwin_amd64
2
+ edea86049041c952a64a2d3e79f7de071448615399000637398a65ae13967591 viceme_0.9.3_darwin_arm64
3
+ 4394ca7e37794db6137fdc30e4e530667c0581a67791358aa413865f0d3eaa33 viceme_0.9.3_linux_amd64
4
+ c52f1d1d6a03c3bb5c93aaa57fe01ef284cf3e57215726ca431148d2aaaff02c viceme_0.9.3_linux_arm64
5
+ 909207b84f8ae66c816e4eeb8dbc91d002fb1fd299ea77f0d4f3fc079bbe92f5 viceme_0.9.3_windows_amd64.exe
6
+ 4048a25ea0da2b6efd890049c1faa7ad6ec67451d1ba6a60edec7f9a06d59335 viceme_0.9.3_windows_arm64.exe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viceme-ai/cli",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "Install and run the ViceMe CLI and ViceMe Agent Skill",
5
5
  "type": "module",
6
6
  "bin": {