@viceme-ai/cli 0.9.1 → 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 +22 -0
- package/README.md +11 -9
- package/README.zh.md +11 -9
- package/checksums.txt +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.3] - 2026-07-29
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- 允许终态后重新发布相同来源 (`4ad71ba`)
|
|
8
|
+
- 登录时自动回退本地加密凭证 (`6e02a08`)
|
|
9
|
+
- 支持开发预览环境发布凭证 (`ee42fab`)
|
|
10
|
+
|
|
11
|
+
## [0.9.2] - 2026-07-27
|
|
12
|
+
|
|
13
|
+
### Fixes
|
|
14
|
+
|
|
15
|
+
- restore profile publication credentials (`f50c397`)
|
|
16
|
+
- bind T1 process credentials to API origins (`801b3ba`)
|
|
17
|
+
|
|
18
|
+
### Other Changes
|
|
19
|
+
|
|
20
|
+
- 更新 T1 权威来源追溯 (`ca9b059`)
|
|
21
|
+
- restore profile token rotation example (`eac514d`)
|
|
22
|
+
- 中文化 T1 复审交接 (`f549459`)
|
|
23
|
+
- add T1 review remediation handoff (`33ddc8b`)
|
|
24
|
+
|
|
3
25
|
## [0.9.1] - 2026-07-27
|
|
4
26
|
|
|
5
27
|
### Fixes
|
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Each profile selects one ViceMe region:
|
|
|
131
131
|
| China | `viceme install` | `https://api.viceme.cn` |
|
|
132
132
|
| International | `viceme install --region global` | `https://api.viceme.ai` |
|
|
133
133
|
|
|
134
|
-
The first install creates the `default` profile. Device-login credentials are isolated by profile plus normalized API origin. On macOS they are stored as private AES-256-GCM encrypted files, while the encryption master key normally remains in the operating-system Keychain; other platforms retain their native credential manager.
|
|
134
|
+
The first install creates the `default` profile. Device-login credentials are isolated by profile plus normalized API origin. On macOS they are stored as private AES-256-GCM encrypted files, while the encryption master key normally remains in the operating-system Keychain; other platforms retain their native credential manager. A profile may also contain an explicitly configured publication credential for controlled local/internal operation; any such config remains private `0600`.
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
137
|
viceme profile list
|
|
@@ -144,20 +144,20 @@ viceme profile remove company
|
|
|
144
144
|
|
|
145
145
|
`profile use` changes the persistent active profile; the global `--profile` flag overrides only one command. AI Agents must not switch or remove profiles unless the user explicitly requests it.
|
|
146
146
|
|
|
147
|
-
For
|
|
147
|
+
For controlled local/internal operation, create a dedicated profile with both an explicit endpoint and its audience-bound publication credential:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
150
|
viceme profile add --name local --region cn \
|
|
151
|
-
--api-base-url http://localhost:8090
|
|
152
|
-
|
|
151
|
+
--api-base-url http://localhost:8090 \
|
|
152
|
+
--access-token '<vpa1.local-dev.credential>' --use
|
|
153
153
|
viceme profile configure local --access-token 'YOUR_ACCESS_TOKEN'
|
|
154
154
|
viceme profile configure local --clear-access-token
|
|
155
155
|
viceme profile configure local --clear-api-base-url
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
Normal `viceme auth login` never writes
|
|
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
|
-
`
|
|
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,15 +198,17 @@ 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
|
-
|
|
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
|
-
The public CLI exposes one standard authentication and publication surface. A short-lived
|
|
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
|
|
|
211
213
|
## Supported Sources
|
|
212
214
|
|
package/README.zh.md
CHANGED
|
@@ -131,7 +131,7 @@ inspect 是只读操作。后续应按照随包发布的 `viceme` Skill 处理
|
|
|
131
131
|
| 中国区 | `viceme install` | `https://api.viceme.cn` |
|
|
132
132
|
| 国际区 | `viceme install --region global` | `https://api.viceme.ai` |
|
|
133
133
|
|
|
134
|
-
首次安装会创建 `default` Profile。设备登录凭证按 Profile 与规范化 API origin 隔离;在 macOS 上,它们保存在私有的 AES-256-GCM 加密文件中,加密主密钥通常只保存在系统 Keychain
|
|
134
|
+
首次安装会创建 `default` Profile。设备登录凭证按 Profile 与规范化 API origin 隔离;在 macOS 上,它们保存在私有的 AES-256-GCM 加密文件中,加密主密钥通常只保存在系统 Keychain;其他平台继续使用原生凭证管理器。受控本地/内部操作还可以在 Profile 中显式配置 publication credential;此类配置文件始终保持 `0600` 私有权限。
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
137
|
viceme profile list
|
|
@@ -144,20 +144,20 @@ viceme profile remove company
|
|
|
144
144
|
|
|
145
145
|
`profile use` 修改持久化的当前 Profile;全局 `--profile` 只覆盖本次命令。不要让 AI Agent 在用户没有明确要求时切换或删除 Profile。
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
受控本地/内部操作可创建同时包含显式 endpoint 与 audience-bound publication credential 的独立 Profile:
|
|
148
148
|
|
|
149
149
|
```bash
|
|
150
150
|
viceme profile add --name local --region cn \
|
|
151
|
-
--api-base-url http://localhost:8090
|
|
152
|
-
|
|
151
|
+
--api-base-url http://localhost:8090 \
|
|
152
|
+
--access-token '<vpa1.local-dev.credential>' --use
|
|
153
153
|
viceme profile configure local --access-token 'YOUR_ACCESS_TOKEN'
|
|
154
154
|
viceme profile configure local --clear-access-token
|
|
155
155
|
viceme profile configure local --clear-api-base-url
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
-
正常 `viceme auth login` 永远不会向 Profile
|
|
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
|
-
|
|
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,15 +198,17 @@ CLI 会在创建设备授权或兑换一次性 device code 之前,对完整的
|
|
|
198
198
|
|
|
199
199
|
### macOS 沙箱(Codex 与 Claude Code)
|
|
200
200
|
|
|
201
|
-
|
|
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
|
|
209
|
+
该命令会把现有主密钥复制到 `~/.viceme-cli/credentials/master.key.file`,并将已配置 Profile 的旧 Keychain 凭证导入加密文件。原 Keychain 条目会保留为冷备份。命令可重复执行,不会打印 token,也不会将 token 明文落盘。完成后,同一 macOS 用户下的 Codex、Claude Code 沙箱无需访问 Keychain 即可读取加密凭证;如果愿意重新登录,则不需要执行该迁移命令。其明确的安全取舍是:降级后由用户文件权限(目录 `0700`、文件 `0600`)代替 Keychain 的进程级访问边界。
|
|
208
210
|
|
|
209
|
-
公开 CLI
|
|
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
|
|
|
211
213
|
## 支持的来源
|
|
212
214
|
|
package/checksums.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|