@viceme-ai/cli 0.7.0 → 0.8.1

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,32 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.1] - 2026-07-24
4
+
5
+ ### Fixes
6
+
7
+ - 修正 Skill 编辑与等待契约 (`e5b92d9`)
8
+ - 修正 ViceMe Skill 发布命令契约 (`23f140b`)
9
+ - 明确步骤确认摘要路径 (`adc70a3`)
10
+ - 六轮复审——confirm_steps 指引消除 preview 死锁 (`3b33b91`)
11
+ - T2 复审修复——自然语言走 stdin 结构化传输/超时保留 edit-run ID/resume 对齐确认端点 (`852c234`)
12
+
13
+ ### Other Changes
14
+
15
+ - separate business and protocol results (`f1f9f9d`)
16
+ - 内置 Agent Skill 对齐交互步骤确认门(产品 3427) (`1992801`)
17
+ - 中文化 T2 复审交接 (`175e838`)
18
+ - add T2 review remediation handoff (`e689dff`)
19
+
20
+ ## [0.8.0] - 2026-07-22
21
+
22
+ ### Features
23
+
24
+ - surface channel binding actions (`18c1ca1`)
25
+
26
+ ### Fixes
27
+
28
+ - validate channel binding contract (`629eaf9`)
29
+
3
30
  ## [0.7.0] - 2026-07-22
4
31
 
5
32
  ### Features
package/README.md CHANGED
@@ -10,7 +10,7 @@ The official command-line client and Agent Skill for publishing external Skills
10
10
 
11
11
  [Install](#installation--quick-start) · [AI Agent Skills](#agent-skills) · [Auth](#authentication) · [Regions & profiles](#regions--profiles) · [Commands](#command-overview) · [Output contract](#json-output-contract) · [Security](#security-and-risk-controls) · [Development](#development)
12
12
 
13
- > **Rollout status:** the Core publication transport and stable-link path are implemented, and the exact Candidate preview → test run → result-confirmation gate is enforced: after `--yes`, the publication parks at `awaiting_action` with a typed `confirm_publish` action, and `job resume --decision confirm` is accepted only after the exact candidate has a succeeded, owner-accepted preview test run (otherwise 409 `preview_run_required`). Test runs, acceptance, and natural-language candidate edits are driven from the confirmation page (`next_action.payload.preview_url`) or the `/v1/skill-agent-publications/:id/preview-runs` and `/edits` endpoints; the CLI ships no separate commands for them. `--yes` confirms the publication request; it is not proof that the user reviewed the final Candidate.
13
+ > **Rollout status:** the Core publication transport and stable-link path are implemented, and the metadata review plus exact Candidate preview → test run → result-confirmation gates are enforced. After `--yes`, the publication first parks at `meta_review` for `job metadata`, then at `awaiting_action` for `job preview`, optional `job edit`, `job run`, `job accept`, and `job resume`. Confirm is accepted only after the exact Candidate has a succeeded, owner-accepted preview run (otherwise 409 `preview_run_required`). A confirm receipt authorizes release but does not contain the final share link; run another bounded `job wait` until `share_published`. `--yes` confirms only the publication request, not the metadata or final Candidate.
14
14
 
15
15
  ## Why ViceMe CLI?
16
16
 
@@ -83,7 +83,7 @@ Use the complete bootstrap command from the bundled Skill. The explicit npm regi
83
83
  npx --yes --registry=https://registry.npmjs.org --@viceme-ai:registry=https://registry.npmjs.org --package=@viceme-ai/cli@latest -- viceme install
84
84
  ```
85
85
 
86
- Read `data.authenticated` and `data.next_step` from the result. If authentication is already valid, continue to Step 4. If login is required, do not execute the human-oriented `data.next_step` inside the Agent; use the JSON split-flow in Step 2.
86
+ Read `authenticated` and `next_step` from the formatted business result. If authentication is already valid, continue to Step 4. If login is required, do not execute the human-oriented `next_step` inside the Agent; use the JSON split-flow in Step 2.
87
87
 
88
88
  **Step 2 — Start device login when required**
89
89
 
@@ -91,7 +91,7 @@ Read `data.authenticated` and `data.next_step` from the result. If authenticatio
91
91
  viceme auth login --no-wait --json
92
92
  ```
93
93
 
94
- Return the exact `data.verification_url`; the CLI normalizes it to the prefilled `verification_url_complete` browser link when available. Include `data.user_code` only as a fallback if the browser asks for it. Preserve `data.device_code` for the continuation command, then stop the current turn. Do not request, print, or place an access token in the conversation.
94
+ Return the exact `verification_url`; the CLI normalizes it to the prefilled `verification_url_complete` browser link when available. Include `user_code` only as a fallback if the browser asks for it. Preserve `device_code` for the continuation command, then stop the current turn. Do not request, print, or place an access token in the conversation.
95
95
 
96
96
  **Step 3 — Continue the same login in a later turn**
97
97
 
@@ -120,7 +120,7 @@ Continue only when authentication is valid and `skills doctor` reports a healthy
120
120
  viceme skill inspect https://github.com/acme/poster-skill --skill-root .
121
121
  ```
122
122
 
123
- Inspection is read-only. Follow the bundled `viceme` Skill for source-specific handling, Target selection, confirmation, bounded job waiting, and result reporting. After the publication parks at `awaiting_action`, guide the user through candidate preview and a test run with accepted result before resolving with `job resume --decision confirm` (see the rollout status above).
123
+ Inspection is read-only. Follow the bundled `viceme` Skill for source-specific handling, Target selection, confirmation, bounded job waiting, and result reporting. If a publication ends at `binding_required`, run `viceme job bind <publication-id>`, give the signed ViceMe URL to the user, and stop. Downloading or forking is only an informational alternative; the CLI never performs it automatically. After the user binds the exact GitHub/Xiaohongshu channel account, inspect again and create a fresh ordinary publication rather than resuming the terminal one. At `meta_review`, show and resolve the metadata using the exact action ID and payload digest, then wait again. At `awaiting_action`, show the frozen Candidate summary, run and accept one exact-Candidate test result, and obtain the user's decision before `job resume`. After confirm, wait again until `share_published` before returning the share link.
124
124
 
125
125
  ## Regions & Profiles
126
126
 
@@ -254,30 +254,43 @@ viceme skill publish --file ./poster-skill-v2.zip \
254
254
  | `viceme skill inspect` | Freeze and inspect a source candidate without publishing |
255
255
  | `viceme skill publish` | Create or update a stable Skill Agent publication |
256
256
  | `viceme skill target` | Resolve existing logical Agent Targets and versions |
257
- | `viceme job` | Read, wait for, resume, explicitly retry, or cancel a durable publication |
257
+ | `viceme job` | Read or wait for a publication, review metadata, preview/edit/test/accept its Candidate, show a signed channel-binding URL, resume an action, explicitly retry, or cancel |
258
258
  | `viceme skills` | Read, install, and diagnose the bundled Agent Skill |
259
259
  | `viceme update` | Update the npm launcher, verified binary, and bundled Skill together |
260
260
 
261
261
  Use `viceme <command> --help` for the exact flags. The release-checked machine-readable surface is stored in [`skills/viceme/references/command-manifest.json`](skills/viceme/references/command-manifest.json).
262
262
 
263
- ## JSON Output Contract
263
+ ## Output Contract
264
264
 
265
- Automation-oriented data commands emit a stable JSON envelope by default. Interactive `viceme auth login` is the deliberate human-facing exception; AI Agents and scripts must use `--no-wait --json`, then continue with `--device-code <code> --json` in a later turn.
265
+ ViceMe selects the smallest stable representation for each command:
266
266
 
267
- Success is written to **stdout** with exit code `0`:
267
+ - Local/bootstrap commands such as `version`, `install`, `update`, `auth status`, `profile *`, and `skills doctor` write their formatted business result directly to **stdout**. They do not add `ok`, `data`, or unrelated build metadata.
268
+ - `skills read` writes the requested file byte-for-byte without a JSON wrapper.
269
+ - Interactive `viceme auth login` writes human guidance. AI Agents use `--no-wait --json`, then continue with `--device-code <code> --json`; those two commands return a formatted bare business object.
270
+ - Publication protocol commands under `skill` and `job` keep a stable envelope because action receipts, durable status, and bounded-wait metadata form one cross-command protocol.
271
+
272
+ A successful publication protocol result is written to **stdout** with exit code `0`:
273
+
274
+ ```json
275
+ {
276
+ "ok": true,
277
+ "data": {}
278
+ }
279
+ ```
280
+
281
+ Only a bounded wait that actually times out adds protocol metadata:
268
282
 
269
283
  ```json
270
284
  {
271
285
  "ok": true,
272
286
  "data": {},
273
287
  "meta": {
274
- "cli_version": "0.1.0",
275
- "skill_version": "0.1.0"
288
+ "wait_timed_out": true
276
289
  }
277
290
  }
278
291
  ```
279
292
 
280
- CLI execution errors are written to **stderr** with a non-zero exit code:
293
+ CLI execution errors are formatted and written to **stderr** with a non-zero exit code:
281
294
 
282
295
  ```json
283
296
  {
@@ -286,15 +299,11 @@ CLI execution errors are written to **stderr** with a non-zero exit code:
286
299
  "type": "validation",
287
300
  "subtype": "source_required",
288
301
  "message": "provide exactly one source argument or --expression-stdin"
289
- },
290
- "meta": {
291
- "cli_version": "0.1.0",
292
- "skill_version": "0.1.0"
293
302
  }
294
303
  }
295
304
  ```
296
305
 
297
- Determine command success from the process exit code or `ok == true`. The API's domain-specific `error.type` is preserved; the exit code is only a coarse handling class. A successfully read publication may still contain a business terminal status such as `unsupported`, `rejected`, or `failed`; inspect `data.status` instead of treating those states as CLI transport failures.
306
+ Determine local/bootstrap command success from the process exit code. For publication protocol commands, use the process exit code or `ok == true`. The API's domain-specific `error.type` is preserved; the exit code is only a coarse handling class. A successfully read publication may still contain a business terminal status such as `unsupported`, `rejected`, or `failed`; inspect `data.status` instead of treating those states as CLI transport failures.
298
307
 
299
308
  | Exit code | Meaning |
300
309
  |---|---|
@@ -309,6 +318,7 @@ Determine command success from the process exit code or `ok == true`. The API's
309
318
  ## Security and Risk Controls
310
319
 
311
320
  - **No source execution** — the CLI and compiler do not execute third-party scripts, binaries, shell fragments, marketplace commands, or copied instructions.
321
+ - **Untrusted text stays off argv** — AI Hosts must pass copied provider expressions and natural-language Candidate edits through the explicit `--expression-stdin` and `--request-stdin` modes. Never interpolate that text into command strings, argv, environment variables, or shell pipelines.
312
322
  - **Explicit public mutation** — publishing, compiler retry, and cancellation require `--yes`; exit code `10` means the Agent must obtain confirmation, not silently retry.
313
323
  - **Safe preview** — use `--dry-run` on inspect or publish when the user needs to review the planned request without network or publication side effects.
314
324
  - **Credential isolation** — on macOS, device-login credentials stay in AES-256-GCM encrypted files, with Keychain-backed or explicitly downgraded private key material; filenames do not expose profile/origin names. Other platforms retain their native credential manager. Explicit internal-test overrides are namespaced by profile, stored only in a private `0600` config, and never emitted by CLI output.
package/README.zh.md CHANGED
@@ -10,7 +10,7 @@ ViceMe 官方命令行客户端与 Agent Skill,用于将外部 Skill 发布为
10
10
 
11
11
  [安装](#安装与快速开始) · [AI Agent Skills](#agent-skills) · [认证](#认证) · [区域与-profile](#区域与-profile) · [命令](#命令概览) · [输出契约](#json-输出契约) · [安全](#安全与风险控制) · [开发](#开发)
12
12
 
13
- > **开放状态:** Core 发布传输和稳定链接链路已经实现。正式对外开放仍取决于精确 Candidate 预览、试运行和结果确认门的完成。当前 `--yes` 只确认发起发布请求,并不代表用户已经审阅最终 Candidate。
13
+ > **开放状态:** Core 发布传输和稳定链接链路已经实现,信息确认门以及精确 Candidate 的预览 → 试跑 → 结果确认门均已生效。`--yes` 后,Publication 先停在 `meta_review`,由 `job metadata` 完成信息确认;随后停在 `awaiting_action`,依次使用 `job preview`、可选的 `job edit`、`job run`、`job accept` 和 `job resume`。只有同一 Candidate 的试跑成功且结果已由发布者接受时才能确认,否则返回 409 `preview_run_required`。确认回执只授权发布,不包含最终分享链接;需要再次有界执行 `job wait` 直到 `share_published`。`--yes` 只确认发起发布请求,不代表用户已确认信息或最终 Candidate
14
14
 
15
15
  ## 为什么选择 ViceMe CLI?
16
16
 
@@ -83,7 +83,7 @@ viceme skills doctor
83
83
  npx --yes --registry=https://registry.npmjs.org --@viceme-ai:registry=https://registry.npmjs.org --package=@viceme-ai/cli@latest -- viceme install
84
84
  ```
85
85
 
86
- 读取结果中的 `data.authenticated` 和 `data.next_step`。如果认证已经有效,直接进入第 4 步。如果需要登录,Agent 不要执行面向人类的 `data.next_step`,而应使用第 2 步的 JSON 跨回合流程。
86
+ 读取格式化业务结果中的 `authenticated` 和 `next_step`。如果认证已经有效,直接进入第 4 步。如果需要登录,Agent 不要执行面向人类的 `next_step`,而应使用第 2 步的 JSON 跨回合流程。
87
87
 
88
88
  **第 2 步 — 需要时启动设备登录**
89
89
 
@@ -91,7 +91,7 @@ npx --yes --registry=https://registry.npmjs.org --@viceme-ai:registry=https://re
91
91
  viceme auth login --no-wait --json
92
92
  ```
93
93
 
94
- 向用户返回准确的 `data.verification_url`;存在 `verification_url_complete` 时,CLI 会把这个已预填设备码的浏览器直达链接规范化为 `verification_url`。只有浏览器要求输入时,才把 `data.user_code` 作为备用信息提供。保留 `data.device_code` 供后续命令使用,然后结束当前回合。不要在对话中索取、打印或传递访问令牌。
94
+ 向用户返回准确的 `verification_url`;存在 `verification_url_complete` 时,CLI 会把这个已预填设备码的浏览器直达链接规范化为 `verification_url`。只有浏览器要求输入时,才把 `user_code` 作为备用信息提供。保留 `device_code` 供后续命令使用,然后结束当前回合。不要在对话中索取、打印或传递访问令牌。
95
95
 
96
96
  **第 3 步 — 在后续回合继续同一个登录流程**
97
97
 
@@ -120,7 +120,7 @@ viceme skills list
120
120
  viceme skill inspect https://github.com/acme/poster-skill --skill-root .
121
121
  ```
122
122
 
123
- inspect 是只读操作。后续应按照随包发布的 `viceme` Skill 处理不同来源、Target 选择、用户确认、有界任务等待和结果返回。在上方所述的精确 Candidate 确认门完成前,公开发布流程仍保持关闭。
123
+ inspect 是只读操作。后续应按照随包发布的 `viceme` Skill 处理不同来源、Target 选择、用户确认、有界任务等待和结果返回。若 Publication 终结为 `binding_required`,运行 `viceme job bind <publication-id>`,把服务端签名的 ViceMe 链接交给用户后停止;下载或 Fork 仅为提示,CLI 不会自动执行。用户完成精确 GitHub/小红书渠道绑定后,必须重新 inspect 并创建新的普通 Publication,不能恢复旧任务。进入 `meta_review` 后,使用同一 action ID 与 payload digest 展示并决议信息,然后再次等待;进入 `awaiting_action` 后,展示冻结摘要、完成同一 Candidate 的试跑与结果接受,并取得用户决定后再执行 `job resume`。确认后还需再次等待到 `share_published`,才能返回分享链接。
124
124
 
125
125
  ## 区域与 Profile
126
126
 
@@ -254,30 +254,43 @@ viceme skill publish --file ./poster-skill-v2.zip \
254
254
  | `viceme skill inspect` | 固化并检查来源候选,不执行发布 |
255
255
  | `viceme skill publish` | 创建或更新具有稳定链接的 Skill Agent 发布 |
256
256
  | `viceme skill target` | 解析现有逻辑 Agent Target 及其版本 |
257
- | `viceme job` | 读取、等待、恢复、显式重试或取消持久化发布任务 |
257
+ | `viceme job` | 读取或等待发布任务,审阅信息,预览、编辑、试跑并接受 Candidate,展示签名渠道绑定链接,决议 action,以及显式重试或取消 |
258
258
  | `viceme skills` | 读取、安装和诊断随包发布的 Agent Skill |
259
259
  | `viceme update` | 同时更新 npm 启动器、已校验二进制文件和随包发布的 Skill |
260
260
 
261
261
  使用 `viceme <command> --help` 查看准确参数。经过发布检查的机器可读命令面存放在 [`skills/viceme/references/command-manifest.json`](skills/viceme/references/command-manifest.json)。
262
262
 
263
- ## JSON 输出契约
263
+ ## 输出契约
264
264
 
265
- 面向自动化的数据命令默认输出稳定的 JSON 信封。交互式 `viceme auth login` 是特意保留的人类友好例外;AI Agent 和脚本必须使用 `--no-wait --json`,并在后续回合使用 `--device-code <code> --json` 继续。
265
+ ViceMe 根据命令语义选择最小且稳定的输出形式:
266
266
 
267
- 成功结果写入 **stdout**,退出码为 `0`:
267
+ - `version`、`install`、`update`、`auth status`、`profile *`、`skills doctor` 等本地/引导命令,将格式化后的业务结果直接写入 **stdout**,不附加 `ok`、`data` 或无关构建元数据。
268
+ - `skills read` 按原始字节输出目标文件,不添加 JSON 包装。
269
+ - 交互式 `viceme auth login` 输出面向人的引导;AI Agent 使用 `--no-wait --json`,并在后续回合用 `--device-code <code> --json` 继续,这两个命令返回格式化的裸业务对象。
270
+ - `skill` 和 `job` 下的发布协议命令继续使用稳定 Envelope,因为 action receipt、持久状态与有界等待元数据共同构成跨命令协议。
271
+
272
+ 发布协议命令成功时写入 **stdout**,退出码为 `0`:
273
+
274
+ ```json
275
+ {
276
+ "ok": true,
277
+ "data": {}
278
+ }
279
+ ```
280
+
281
+ 只有有界等待真实超时时才附加协议元数据:
268
282
 
269
283
  ```json
270
284
  {
271
285
  "ok": true,
272
286
  "data": {},
273
287
  "meta": {
274
- "cli_version": "0.1.0",
275
- "skill_version": "0.1.0"
288
+ "wait_timed_out": true
276
289
  }
277
290
  }
278
291
  ```
279
292
 
280
- CLI 执行错误写入 **stderr**,退出码非零:
293
+ CLI 执行错误以格式化形式写入 **stderr**,退出码非零:
281
294
 
282
295
  ```json
283
296
  {
@@ -286,15 +299,11 @@ CLI 执行错误写入 **stderr**,退出码非零:
286
299
  "type": "validation",
287
300
  "subtype": "source_required",
288
301
  "message": "provide exactly one source argument or --expression-stdin"
289
- },
290
- "meta": {
291
- "cli_version": "0.1.0",
292
- "skill_version": "0.1.0"
293
302
  }
294
303
  }
295
304
  ```
296
305
 
297
- 应根据进程退出码或 `ok == true` 判断命令是否成功。API 返回的领域 `error.type` 会原样保留,退出码只表示粗粒度处理类别。成功读取发布任务时,业务状态仍可能是 `unsupported`、`rejected` 或 `failed`;这时应检查 `data.status`,不能把这些状态当成 CLI 传输失败。
306
+ 本地/引导命令根据进程退出码判断成功;发布协议命令可以检查退出码或 `ok == true`。API 返回的领域 `error.type` 会原样保留,退出码只表示粗粒度处理类别。成功读取发布任务时,业务状态仍可能是 `unsupported`、`rejected` 或 `failed`;这时应检查 `data.status`,不能把这些状态当成 CLI 传输失败。
298
307
 
299
308
  | 退出码 | 含义 |
300
309
  |---|---|
@@ -309,6 +318,7 @@ CLI 执行错误写入 **stderr**,退出码非零:
309
318
  ## 安全与风险控制
310
319
 
311
320
  - **不执行来源内容** — CLI 和编译器不会执行第三方脚本、二进制文件、shell 片段、市场命令或复制口令中的指令。
321
+ - **不让不可信文本进入 argv** — AI Host 必须通过显式的 `--expression-stdin` 和 `--request-stdin` 模式传递复制的来源表达式与 Candidate 自然语言修改要求;不得把这些文本拼入命令字符串、argv、环境变量或 shell 管道。
312
322
  - **公开变更需要明确确认** — 发布、编译重试和取消操作需要 `--yes`;退出码 `10` 表示 Agent 必须向用户取得确认,不能静默重试。
313
323
  - **安全预览** — 用户需要检查计划请求时,可以对 inspect 或 publish 使用 `--dry-run`,不会产生网络请求或发布副作用。
314
324
  - **凭证隔离** — 在 macOS 上,设备登录凭证保存在 AES-256-GCM 加密文件中,主密钥由 Keychain 或显式降级后的私有文件保护,文件名不会暴露 Profile/origin;其他平台继续使用原生凭证管理器。显式内部测试覆盖按 Profile 隔离,仅允许保存在 `0600` 配置中,并且不会出现在 CLI 输出中。
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- 7f90a74dcd12b898fcd80bde1efa1e06b923e3b3e50dd5680967568ad2ba64c5 viceme_0.7.0_darwin_amd64
2
- 1f8cf57c0a698189a6b9271147a3f5fc783413d7ba627ab00e2524c2ce1f4170 viceme_0.7.0_darwin_arm64
3
- e9638dbc55e15303d4f2fd96efffcae7783151e033886ce0d879345120c9081f viceme_0.7.0_linux_amd64
4
- 430930b7b11f7bab3cc2866f1f5dc397b1b8326d5bc089dade896ceee4e41640 viceme_0.7.0_linux_arm64
5
- c04562d5bd653084db32bba2a0ddbbb0a5ed7772e9710343507bfca24287fe86 viceme_0.7.0_windows_amd64.exe
6
- d42f3dae6e024e0455caad96f9cbc8484586f2cb77af6c3320361a9f9aa5f9c9 viceme_0.7.0_windows_arm64.exe
1
+ 274e0db4e7e1e1896c9ecac6e5784a16f0fd2aedcb654f0f160d98d3e733af60 viceme_0.8.1_darwin_amd64
2
+ 8c5ea0d0ac40da645cce074eb78aaa33522ce29c3ed49b1161a49467580f0429 viceme_0.8.1_darwin_arm64
3
+ 83cac5e106d89b2645948937de5dba48aee5db68f377d2c8e0b2d897466f4bc6 viceme_0.8.1_linux_amd64
4
+ 29011f74d7c48bc4f7ba4fb1ce62921077c3a9c67b2cdad2b0956b898c88fb89 viceme_0.8.1_linux_arm64
5
+ 88e6592c27da508d2ca50545d96bb0e208b5b03e49fe4dbeabe67c9194109fe9 viceme_0.8.1_windows_amd64.exe
6
+ 3df41ae3c8b4bbf3cdbaf6af91132cb44dbac31d053dd20911e39ca15a1d8b4c viceme_0.8.1_windows_arm64.exe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viceme-ai/cli",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
4
4
  "description": "Install and run the ViceMe CLI and ViceMe Agent Skill",
5
5
  "type": "module",
6
6
  "bin": {