@itpay/cli 2.1.19 → 2.1.29

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.
Files changed (86) hide show
  1. package/README.md +2 -2
  2. package/dist/src/commands/buy.js +3 -3
  3. package/dist/src/commands/cart.js +15 -15
  4. package/dist/src/commands/catalog.js +10 -7
  5. package/dist/src/commands/checkout.js +8 -11
  6. package/dist/src/commands/docs.js +3 -14
  7. package/dist/src/commands/guidance.js +41 -25
  8. package/dist/src/commands/install.js +2 -2
  9. package/dist/src/commands/order.js +4 -3
  10. package/dist/src/commands/orders.js +4 -9
  11. package/dist/src/commands/pay.js +1 -1
  12. package/dist/src/commands/rail_catalog.js +160 -11
  13. package/dist/src/commands/refund.js +5 -5
  14. package/dist/src/commands/services.js +658 -361
  15. package/dist/src/commands/skill.js +1 -1
  16. package/dist/src/commands/vault.js +27 -20
  17. package/dist/src/main.js +39 -24
  18. package/dist/src/render/markdown.js +0 -3
  19. package/dist/src/state/account_auth.js +9 -5
  20. package/dist/src/state/cart_session.js +4 -1
  21. package/dist/src/state/config.js +1 -1
  22. package/dist/src/state/task_journal.js +2 -0
  23. package/docs/agent/buyer/cart-checkout.json +5 -4
  24. package/docs/agent/buyer/catalog-list.json +24 -6
  25. package/docs/agent/buyer/identity-and-sessions.json +16 -15
  26. package/docs/agent/buyer/install-and-setup.json +5 -4
  27. package/docs/agent/buyer/orders-refunds.json +11 -5
  28. package/docs/agent/buyer/payment-flow.json +3 -3
  29. package/docs/agent/buyer/purchased-content.json +18 -4
  30. package/docs/agent/buyer/quickstart.json +22 -14
  31. package/docs/agent/buyer/rail-booking.json +125 -171
  32. package/docs/agent/buyer/rail-fast-checkout.json +21 -44
  33. package/docs/agent/buyer/render-hosts.json +9 -6
  34. package/docs/agent/buyer/service-feedback.json +2 -1
  35. package/docs/cli-reference/agent-types.md +1 -1
  36. package/docs/cli-reference/commands/auth.md +2 -0
  37. package/docs/cli-reference/commands/buy.md +1 -1
  38. package/docs/cli-reference/commands/cart/add.md +1 -1
  39. package/docs/cli-reference/commands/cart/clear.md +1 -1
  40. package/docs/cli-reference/commands/cart/index.md +1 -1
  41. package/docs/cli-reference/commands/cart/next.md +1 -1
  42. package/docs/cli-reference/commands/cart/remove.md +1 -1
  43. package/docs/cli-reference/commands/cart/show.md +1 -1
  44. package/docs/cli-reference/commands/catalog/index.md +1 -1
  45. package/docs/cli-reference/commands/catalog/list.md +1 -1
  46. package/docs/cli-reference/commands/checkout.md +1 -1
  47. package/docs/cli-reference/commands/device.md +8 -7
  48. package/docs/cli-reference/commands/docs/index.md +1 -1
  49. package/docs/cli-reference/commands/docs/list.md +1 -1
  50. package/docs/cli-reference/commands/docs/search.md +1 -1
  51. package/docs/cli-reference/commands/docs/show.md +1 -1
  52. package/docs/cli-reference/commands/install.md +2 -2
  53. package/docs/cli-reference/commands/next.md +1 -1
  54. package/docs/cli-reference/commands/order.md +1 -1
  55. package/docs/cli-reference/commands/pay.md +1 -1
  56. package/docs/cli-reference/commands/readyz.md +1 -1
  57. package/docs/cli-reference/commands/refund/cancel.md +1 -1
  58. package/docs/cli-reference/commands/refund/create.md +1 -1
  59. package/docs/cli-reference/commands/refund/get.md +2 -2
  60. package/docs/cli-reference/commands/refund/index.md +1 -1
  61. package/docs/cli-reference/commands/refund/list.md +1 -1
  62. package/docs/cli-reference/commands/refund/watch.md +1 -1
  63. package/docs/cli-reference/commands/services/action.md +3 -3
  64. package/docs/cli-reference/commands/services/checkout.md +1 -1
  65. package/docs/cli-reference/commands/services/events.md +1 -1
  66. package/docs/cli-reference/commands/services/get.md +1 -1
  67. package/docs/cli-reference/commands/services/index.md +1 -1
  68. package/docs/cli-reference/commands/services/invoke.md +5 -13
  69. package/docs/cli-reference/commands/services/list.md +1 -1
  70. package/docs/cli-reference/commands/services/next.md +12 -10
  71. package/docs/cli-reference/commands/services/page.md +9 -7
  72. package/docs/cli-reference/commands/services/quote.md +1 -1
  73. package/docs/cli-reference/commands/services/read-result.md +16 -9
  74. package/docs/cli-reference/commands/services/run.md +4 -2
  75. package/docs/cli-reference/commands/services/start.md +1 -1
  76. package/docs/cli-reference/conventions.md +2 -2
  77. package/package.json +7 -5
  78. package/skills/itpay/SKILL.md +77 -238
  79. package/docs/reviews/agent-ux-handoff-2026-09-23/IMPLEMENTATION-EVIDENCE.md +0 -174
  80. package/docs/skill-bundle-rollout/01-mcp-authentication.md +0 -134
  81. package/docs/skill-bundle-rollout/02-platform-bundle-repositories.md +0 -210
  82. package/docs/skill-bundle-rollout/03-platform-publishing.md +0 -161
  83. package/docs/skill-bundle-rollout/04-first-wave-platforms.md +0 -70
  84. package/docs/skill-bundle-rollout/05-sync-operations.md +0 -62
  85. package/docs/skill-bundle-rollout/README.md +0 -151
  86. /package/bin/{itp → itp.mjs} +0 -0
@@ -1,134 +0,0 @@
1
- # Local Device 与远程 MCP OAuth 边界
2
-
3
- 状态:current boundary;服务端实现以 `itpay-ai/compose` 为准。
4
- 最后核对:2026-08-10。
5
-
6
- ## 1. 本文负责什么
7
-
8
- 本文只定义 CLI/平台包必须遵守的身份选择和凭据保管规则。
9
-
10
- 服务端 OAuth 协议、Connection、workload delegation、Buyer 和 Vault 数据
11
- 模型由 Compose 仓库的 V3 文档、Schema、OpenAPI 和代码负责。CLI 仓库不再
12
- 维护一份重复的 OAuth Server 实施计划。
13
-
14
- ## 2. Local Device Authority
15
-
16
- 本地 CLI 使用:
17
-
18
- ```text
19
- ~/.itpay-v3/device/device-private.pem
20
- ~/.itpay-v3/device/identity.json
21
- ```
22
-
23
- `src/state/device_authority.ts`:
24
-
25
- - 生成/保存本地 Ed25519 私钥;
26
- - 按 Backend base URL 保持独立 Device registration;
27
- - 按显式 Agent Type 解析 exact Agent Instance;
28
- - 用 challenge 签名取得短期 Device Session;
29
- - 对受保护请求签名并防重放;
30
- - 只对可恢复 session 执行一次续期和同请求重放;
31
- - 不静默替换被吊销 Device。
32
-
33
- 这些文件表示本地工作负载,不表示网页登录 Token,也不能被复制进平台
34
- bundle。
35
-
36
- ## 3. 远程 MCP OAuth
37
-
38
- 云端 MCP 客户端使用标准 OAuth Connection:
39
-
40
- ```text
41
- MCP client
42
- -> Authorization Code + PKCE
43
- -> ItPay login/consent
44
- -> client stores Access/Refresh Token
45
- -> ItPay MCP validates token
46
- -> exact MCP Connection
47
- -> Buyer-less workload delegation to Backend
48
- ```
49
-
50
- 平台客户端负责 Token 持久化、刷新和断线重连。以下位置都不能保存或打印
51
- OAuth Token:
52
-
53
- - CLI;
54
- - `~/.itpay-v3`;
55
- - Skill / Plugin;
56
- - `bundle.lock.json`;
57
- - 模型提示、tool 参数或 tool 输出;
58
- - Git 仓库;
59
- - Backend 普通 API 日志。
60
-
61
- 十分钟 Access Token 到期应由 Refresh Token 自动续期,不得让用户每十分钟
62
- 重新扫码。Vault 短期授权到期是独立事件,只重新请求 Vault 授权。
63
-
64
- ## 4. 两条线路不能混用
65
-
66
- | 属性 | Local CLI | Remote MCP |
67
- | --- | --- | --- |
68
- | caller | Device + exact Agent Instance | exact MCP Connection |
69
- | credential owner | 用户本机 CLI | MCP client/platform |
70
- | Authorization | `ItPayDevice` + signed headers | OAuth Bearer at MCP resource |
71
- | server hop | CLI -> Backend | Platform -> MCP -> delegated Backend |
72
- | durable revoke | Device/Agent | Connection/Grant |
73
- | Buyer relationship | explicit Device binding | OAuth Connection binding |
74
-
75
- 互斥规则:
76
-
77
- - Backend Device middleware 不接受 MCP Bearer;
78
- - MCP resource 不接受 Device Session;
79
- - CLI 不读取 MCP Token;
80
- - MCP 不读取 `~/.itpay-v3`;
81
- - 撤销一个通道不删除另一个通道;
82
- - 两个通道可指向同一 Buyer,但 Vault 临时授权按 exact audience 分开。
83
-
84
- ## 5. 平台路由
85
-
86
- 平台 Skill 在开始业务动作前选择线路:
87
-
88
- ```text
89
- persistent local shell and bundled CLI and no explicit MCP -> CLI
90
- pure cloud -> MCP
91
- explicit MCP request -> MCP
92
- explicit CLI request -> CLI
93
- ```
94
-
95
- 同一任务不能:
96
-
97
- - 同时调用两条线路;
98
- - 在失败后静默 fallback;
99
- - 用 email、昵称、Agent Type 或平台名推断 Buyer;
100
- - 用 Device/MCP 重连重置免费额度或资源归属。
101
-
102
- ## 6. 跨平台 Buyer Vault 读取
103
-
104
- Local Device 与 MCP Connection 可以读取同一 Buyer Vault,但必须分别完成:
105
-
106
- 1. durable caller authentication;
107
- 2. exact-audience temporary Vault window;
108
- 3. 对需要首次揭示的工件完成 artifact-specific consent。
109
-
110
- CLI/MCP 连接不等于持续读取授权,OAuth 登录也不等于首次揭示或退款授权。
111
-
112
- 最终产品、API、Schema 和测试合同由 Compose 文档
113
- `V3_CROSS_PLATFORM_BUYER_VAULT_READ_IMPLEMENTATION_PLAN.md` 负责。
114
-
115
- ## 7. 平台不兼容时
116
-
117
- 如果平台不能安全完成标准 OAuth 或保存/刷新 Token:
118
-
119
- - 有本地 Shell 时使用 bundled CLI;
120
- - 没有本地 Shell 时标记 MCP 不支持;
121
- - 不接受静态 personal bearer;
122
- - 不要求用户在聊天中粘贴 Token;
123
- - 不把 Token做成普通 Skill setting。
124
-
125
- ## 8. 验证门禁
126
-
127
- - CLI 升级前后 Device ID 和私钥 hash 不变;
128
- - MCP 连接/刷新/撤销不修改 Local Device 文件;
129
- - Device 与 MCP auth scheme 互相拒绝;
130
- - 两个 Connection 与两个 Agent Instance 的 Vault audience 相互隔离;
131
- - Access Token 刷新无需用户或模型参与;
132
- - Vault window 到期不会销毁 OAuth/Device durable identity;
133
- - 日志、bundle、tool output 和 repo secret scan 无凭据;
134
- - 平台失败时没有静默线路切换。
@@ -1,210 +0,0 @@
1
- # 多平台仓库与 CLI Bundle 合同
2
-
3
- 状态:current。
4
- 最后核对:2026-08-10。
5
-
6
- ## 1. 原则
7
-
8
- 每个真实发布面可以有独立仓库,但所有仓库消费同一 MCP 和同一
9
- `@itpay/cli`。独立仓库解决 manifest、安装、提示、审核和发布节奏差异,
10
- 不制造平台业务 fork。
11
-
12
- ```text
13
- itpay-ai/compose
14
- Backend / OAuth / MCP / Web / Buyer / Vault
15
-
16
- itpay-ai/cli
17
- @itpay/cli source / command docs / bundle generator
18
-
19
- platform repository
20
- manifest / platform Skill / exact CLI bundle / tests / submission
21
- ```
22
-
23
- ## 2. 当前仓库注册表
24
-
25
- 具体发布状态只在
26
- [04-first-wave-platforms.md](./04-first-wave-platforms.md) 维护。
27
-
28
- | 产品面 | 仓库 | 本地 CLI | 远程 MCP |
29
- | --- | --- | --- | --- |
30
- | ChatGPT + Codex | `itpay-plugin-chatgpt` | local Codex | ChatGPT/cloud |
31
- | WorkBuddy | `itpay-skill-workbuddy` | default when shell is available | explicit connection |
32
- | OpenClaw | `itpay-skill-openclaw` | supported host-dependent | only after real client acceptance |
33
- | Kimi Work / Kimi Code | `itpay-plugin-kimi-work` | Kimi Code host-dependent | Kimi Work/remote host-dependent |
34
- | Hermes Agent | `itpay-skill-hermes` | supported host-dependent | only after real client acceptance |
35
-
36
- Claude 和 Gemini 属于待开始支持目标;没有真实仓库、manifest 和验收前不放入
37
- 当前注册表。
38
-
39
- ## 3. 平台仓库最小内容
40
-
41
- ```text
42
- platform manifest / connector config
43
- platform-specific SKILL.md
44
- bin or scripts launcher # only for local-capable hosts
45
- vendor/itpay-cli/ # generated, not edited
46
- bundle.lock.json
47
- tests/
48
- README / submission / release notes
49
- ```
50
-
51
- 平台仓库不得包含:
52
-
53
- - CLI 源码副本或手工 Agent Type patch;
54
- - Backend/MCP/Vault 状态机;
55
- - OAuth client secret、Access/Refresh Token;
56
- - `.env`、用户 HOME、Device 私钥/session;
57
- - 运行时 `npm install` 或 `latest`;
58
- - 全局 CLI fallback。
59
-
60
- ## 4. Bundle 格式
61
-
62
- 优先复用现有已验证格式:
63
-
64
- ```text
65
- npm-tree
66
- vendor/itpay-cli/package/
67
- vendor/itpay-cli/node_modules/ production only
68
-
69
- single-file-esm
70
- vendor/itpay-cli/itpay-cli.bundle.mjs
71
- vendor/itpay-cli/docs/
72
- vendor/itpay-cli/licenses/
73
- ```
74
-
75
- WorkBuddy/OpenClaw/Hermes 等上传型 Skill 优先使用 `single-file-esm`,不包含
76
- `node_modules`。只有真实平台证明 Node runtime 不可用时,才启动 standalone
77
- executable 工作;不提前维护多架构二进制。
78
-
79
- ## 5. `bundle.lock.json`
80
-
81
- 至少包含:
82
-
83
- ```json
84
- {
85
- "schemaVersion": 1,
86
- "package": "@itpay/cli",
87
- "version": "X.Y.Z",
88
- "format": "single-file-esm",
89
- "npmIntegrity": "sha512-...",
90
- "sourceGitSha": "...",
91
- "generatedAt": "<RFC3339>",
92
- "node": ">=18",
93
- "bundleDirectory": "vendor/itpay-cli",
94
- "dependencyLockSha256": "<64 lowercase hex characters>"
95
- }
96
- ```
97
-
98
- `format` is `single-file-esm` or `npm-tree`. `bundleDirectory` is the
99
- repository-relative Skill bundle directory, and `dependencyLockSha256` is the
100
- raw lowercase SHA-256 hex digest emitted by `build-platform-bundle.mjs` (without
101
- a `sha256:` prefix). The reusable synchronization workflow consumes these exact
102
- field names.
103
-
104
- 不得包含 Token、registry credential、本机路径或 Device 状态。
105
-
106
- ## 6. 启动器规则
107
-
108
- - 只调用 bundle 内入口;
109
- - 转发全部参数、stdout、stderr、signal 和 exit code;
110
- - 不修改 `HOME`;
111
- - 不搜索 PATH 中其他 `itpay`;
112
- - `itpay --version` 必须等于 lock version;
113
- - 临时测试使用临时 HOME,不能触碰开发者真实 Device;
114
- - 路径含空格和中文用户名仍可运行。
115
-
116
- ## 7. 平台 Skill 允许差异
117
-
118
- 允许:
119
-
120
- - manifest 和安装路径;
121
- - MCP 配置语法;
122
- - Agent Type / host 选择;
123
- - 平台工具名和浏览器/文件展示方式;
124
- - 权限说明和审核材料;
125
- - CLI/MCP 路由提示;
126
- - 平台特有的安全限制。
127
-
128
- 不允许:
129
-
130
- - 改变 CLI 命令参数和 JSON 合同;
131
- - 改变 MCP 工具 Schema;
132
- - 改变 Buyer/Vault/支付/退款规则;
133
- - 保存 OAuth Token;
134
- - 自动猜测并切换线路;
135
- - 修改生成的 CLI bundle 业务代码。
136
-
137
- ## 8. Bundle 生成
138
-
139
- 生成器只接受精确 semver:
140
-
141
- ```text
142
- resolve exact npm version
143
- -> fetch tarball metadata
144
- -> verify npm integrity
145
- -> install exact production dependencies with scripts disabled
146
- -> remove cache/test/temp files
147
- -> create requested bundle format
148
- -> generate lock
149
- -> secret/dangerous-file scan
150
- -> offline smoke
151
- ```
152
-
153
- 拒绝 `latest`、范围、未发布版本和 integrity 不匹配。
154
-
155
- ## 9. CLI 发布后的同步
156
-
157
- ```text
158
- @itpay/cli X.Y.Z published
159
- -> platform repo detects version drift
160
- -> invoke reusable bundle workflow
161
- -> rebuild and verify
162
- -> update lock/manifest/release notes
163
- -> create or refresh sync PR
164
- -> platform owner reviews tests and Skill differences
165
- -> merge/tag/publish separately
166
- ```
167
-
168
- CLI 主仓库在 `main` 提供 reusable workflow。各平台仓库每小时错峰运行 caller workflow,并可手动触发;npm `dist-tags.latest` 或请求的 bundle format 与当前 `bundle.lock.json` 不同时更新。同步优先使用只安装到分发仓库、只拥有 Contents/Pull requests 写权限的 `itpay-bundle-sync` GitHub App 短期 token;未配置 App 时回落到平台仓库自己的 `GITHUB_TOKEN`,但该模式创建的 PR checks 需要仓库写权限用户批准。禁止使用个人 PAT。
169
-
170
- 同步决策同时读取 main 和当前版本的 open automation PR。目标版本、format 和 bundle directory 已存在于 open PR 时必须返回 `pr-current`,不得每小时重建、提交或 force-push 同一产物。
171
-
172
- - 优先使用最小权限 GitHub App 短期 token;
173
- - fallback 只使用平台仓库自己的 `GITHUB_TOKEN`;
174
- - 禁止个人 PAT;
175
- - 不自动合并;
176
- - 不自动打 tag;
177
- - 不自动提交商店;
178
- - CLI 发布失败时不生成平台发布。
179
-
180
- - 重新生成 bundle;
181
- - 更新 manifest 版本、lock、changelog;
182
- - 跑全套测试;
183
- - 对启用 Skill 差异跟踪的平台,比较旧、新 `sourceGitSha` 的中心 `skills/itpay/SKILL.md`;有差异时创建 Draft PR、附 diff 和人工合并清单,但不覆盖平台 Skill;
184
- - 创建或刷新 `automation/itpay-cli-X.Y.Z` 分支和同步 PR;同版本的后续计划任务必须为 no-op;
185
- - PR 描述列出 CLI commit、integrity、dependency lock、同步 run、平台测试和是否需要商店重新审核;
186
- - 新版本 PR 验证成功后,只关闭没有人工提交的旧机器人同步 PR;保留远程分支用于审计和恢复。
187
-
188
- ## 10. Repository tests
189
-
190
- 每个平台必须证明:
191
-
192
- - 无全局 CLI;
193
- - 测试期间禁止 npm 网络下载;
194
- - bundle version/integrity/source SHA 正确;
195
- - manifest 能被平台 validator 读取;
196
- - platform Skill 只选择一个 CLI/MCP lane;
197
- - MCP Token 不进入配置、prompt、tool 或 bundle;
198
- - Device 文件不被打包或打印;
199
- - 同机旧全局 CLI 不影响 bundled CLI;
200
- - 升级/回滚不删除 `~/.itpay-v3`;
201
- - 平台声称支持 MCP 时完成真实连接、刷新、重连和撤销测试。
202
-
203
- ## 11. 版本与回滚
204
-
205
- 第一阶段平台包版本跟随 CLI 版本,避免双版本映射。只有平台仅修改 manifest/
206
- 说明且真实需要独立发布节奏时,才增加 `pluginVersion`,同时保留
207
- `cliVersion`。
208
-
209
- 回滚发布上一个通过验证的 bundle/manifest,不修改 Buyer、MCP Connection 或
210
- Device 状态。
@@ -1,161 +0,0 @@
1
- # 各平台制作、验证、发布与回滚手册
2
-
3
- 状态:current operational handbook。
4
- 最后核对:2026-08-10。
5
-
6
- 平台规则会变化。每次正式提交前必须重新核对平台官方要求;本文只固定 ItPay
7
- 自己的安全、版本和职责边界。
8
-
9
- ## 1. 共用发布前门禁
10
-
11
- - 平台存在于 [04-first-wave-platforms.md](./04-first-wave-platforms.md);
12
- - manifest/Skill/MCP config 来自平台仓库,不来自 Compose 或 CLI 临时目录;
13
- - CLI bundle 绑定精确 npm version、integrity、source SHA;
14
- - 无全局 CLI、无运行时 npm、离线 smoke 通过;
15
- - Skill 披露网络、命令、文件和外部 ItPay 授权页面;
16
- - MCP OAuth Token 由平台原生客户端保管,模型/Skill/CLI 看不到;
17
- - Local 使用 Device Authority,Remote 使用 MCP Connection;
18
- - 一个任务只选一条线路,不静默 fallback;
19
- - 公共 MCP `tools/list` 与当前批准合同一致;
20
- - Buyer Vault 读取只返回授权字段;
21
- - 支付/退款不因 OAuth、Skill 安装或 Vault 读取获得授权;
22
- - `.env`、Secret、Token、私钥、Device 文件、用户数据未打包;
23
- - website、support、privacy、terms、数据删除/断开说明可访问;
24
- - 正向、负向、越权、撤销、刷新和回滚测试完成。
25
-
26
- ## 2. ChatGPT + Codex
27
-
28
- 仓库:`itpay-plugin-chatgpt`。
29
-
30
- ### ChatGPT 云端
31
-
32
- - 只走远程 MCP OAuth;
33
- - 平台原生保存/刷新 Token;
34
- - 使用批准的五个 Buyer Vault read/authorization 工具;
35
- - 不探测本地 HOME 或创建 Device;
36
- - tool annotations、CSP、OAuth metadata、domain challenge 和审核材料在
37
- OpenAI 平台仓库维护;
38
- - 审核账号只含固定测试数据,不要求真实付款。
39
-
40
- ### 本地 Codex
41
-
42
- - 有 bundled CLI 时默认 Local Device;
43
- - Skill 使用 bundle 的确定入口,不调用全局 CLI;
44
- - 用户明确要求 MCP 才选择远程 MCP;
45
- - ChatGPT/Codex 共用发布仓库不代表共用凭据或运行路径。
46
-
47
- 验证:ChatGPT OAuth connect/refresh/revoke/Vault read;Codex fresh install、
48
- Device persistence、CLI Vault read、同机旧全局 CLI 隔离。
49
-
50
- ## 3. WorkBuddy
51
-
52
- 仓库:`itpay-skill-workbuddy`。
53
-
54
- - 有持久 Shell 和 Skill bundle 时默认 CLI;
55
- - 用户明确连接/要求 MCP 时使用 WorkBuddy 原生 MCP OAuth;
56
- - CLI 持久写 `~/.itpay-v3` 前遵循 WorkBuddy 权限模型;
57
- - Checkout/Auth handoff 只使用官方 HTTPS URL/Action Card 和平台实际打开
58
- 工具;
59
- - 不读取任意目录,不下载/rebuild QR,不处理用户 Device lock;
60
- - MCP Access Token 到期必须静默 refresh;Vault window 到期只重新授权
61
- Vault;
62
- - 上传包使用 `single-file-esm`,不含 `node_modules`。
63
-
64
- 验证:默认权限、用户拒绝权限、完全访问权限、路径空格/中文、窄内置浏览器、
65
- MCP 首次连接、扫码/回跳、refresh、关闭面板重连、Vault expiry/revoke。
66
-
67
- SkillHub 上传/审核由仓库管理员执行;在官方确认前不宣称公共收录状态。
68
-
69
- ## 4. OpenClaw
70
-
71
- 仓库:`itpay-skill-openclaw`。
72
-
73
- - 本地持久 host 使用 single-file CLI bundle;
74
- - 每次需要 native presentation 的命令显式传可信 `--host` 和目标上下文;
75
- - Telegram/Discord 等 host renderer 只负责展示,不改变业务合同;
76
- - 只有平台的远程 MCP OAuth 通过真实验收后才启用 MCP lane;
77
- - ClawHub 发布版本必须和 lock/Skill metadata 一致。
78
-
79
- 验证:无全局 CLI、host/target、原生按钮/普通内容 fallback、Device 持久化、
80
- bundle 更新/回滚、若启用 MCP则连接/refresh/revoke。
81
-
82
- ## 5. Kimi Work / Kimi Code
83
-
84
- 仓库:`itpay-plugin-kimi-work`。
85
-
86
- - Kimi Work 纯云端环境优先 MCP;
87
- - Kimi Code 有持久 Shell 和 bundle 时默认 CLI;
88
- - manifest/Skill 必须显式区分两个 surface;
89
- - extension/plugin setting 不存 OAuth Token;
90
- - 只有实际客户端证明的 token persistence/refresh 行为写入支持矩阵。
91
-
92
- 验证:两个 surface 分别全新安装、线路选择、升级、Token refresh、Device 文件
93
- 隔离和 Vault 跨平台读取。
94
-
95
- ## 6. Hermes Agent
96
-
97
- 仓库:`itpay-skill-hermes`。
98
-
99
- - 本地 Skill tap 使用 single-file CLI bundle;
100
- - 不调用全局 CLI或 runtime npm;
101
- - Skills Hub/trusted 状态按真实上游结果记录;
102
- - 远程 MCP 仅在 Hermes 客户端完成标准 OAuth 实测后启用。
103
-
104
- 验证:tap 安装/更新/回滚、无网 bundle、Device persistence、命令输出合同、若
105
- 启用 MCP则连接/refresh/revoke。
106
-
107
- ## 7. 后续平台
108
-
109
- Claude 和 Gemini 不在当前仓库注册表。开始真实工作时才:
110
-
111
- 1. 核对当前官方 manifest/connector/auth 规则;
112
- 2. 确认真实分发面和仓库名;
113
- 3. 建平台仓库;
114
- 4. 选择 CLI/MCP lane;
115
- 5. 完成真实安装和 Token/Device 测试;
116
- 6. 加入注册表和发布矩阵。
117
-
118
- 不能根据旧文档中的“建议仓库”直接宣称已支持。
119
-
120
- ## 8. 发布顺序
121
-
122
- ```text
123
- Backend/MCP/Web contract accepted on Dev
124
- -> CLI docs and implementation accepted
125
- -> exact npm CLI published
126
- -> platform sync PRs generated
127
- -> each platform runs its own E2E/review
128
- -> platform merge/tag/store submission
129
- -> update actual version/status registry
130
- ```
131
-
132
- 如果仅远程 MCP 变化且平台 manifest/Skill 不变,平台仍需运行 connector E2E,
133
- 但不为了形式强制发布新 CLI bundle。
134
-
135
- ## 9. 回滚
136
-
137
- - Backend/MCP/Web 使用 Compose release rollback,不改变平台 Token/Device;
138
- - CLI 回滚发布上一个验证 bundle;
139
- - 平台回滚使用上一个 tag/artifact;
140
- - 不删除 `~/.itpay-v3`;
141
- - 不撤销所有 MCP Connection,除非安全事件明确要求;
142
- - 工具合同回滚后重新验证平台 `tools/list` 与 Backend compatibility;
143
- - 记录原因、版本、时间、影响平台和恢复证据。
144
-
145
- ## 10. 实际发布矩阵
146
-
147
- 矩阵不写死在本文,统一维护在
148
- [04-first-wave-platforms.md](./04-first-wave-platforms.md)。
149
-
150
- 每行至少记录:
151
-
152
- ```text
153
- product surface
154
- repository
155
- supported lane
156
- CLI bundle version/integrity (if local)
157
- MCP contract/revision tested (if remote)
158
- draft/review/published/blocked
159
- last real acceptance date
160
- rollback artifact/tag
161
- ```
@@ -1,70 +0,0 @@
1
- # 当前平台仓库与发布状态注册表
2
-
3
- 状态:current operational registry。
4
- 最后核对:2026-08-10。
5
-
6
- 本文件是 CLI 文档中平台集合、仓库名称和实际发布状态的唯一权威来源。
7
- 不要在 README、bundle 合同或发布手册中维护另一份不同名单。
8
-
9
- ## 当前注册表
10
-
11
- | 产品面 | 仓库 | 默认线路 | 当前形态 | 本轮发布状态 | 最近验收 | 回滚锚点 | 仍需持续验证 |
12
- | --- | --- | --- | --- | --- | --- | --- | --- |
13
- | ChatGPT + Codex | `itpay-plugin-chatgpt` | ChatGPT MCP;本地 Codex CLI | OpenAI app-plus-skills plugin、MCP config、Skill、离线 CLI | blocked:Buyer Vault 候选尚未完成外部发布 | 2026-08-10 automated CI;ChatGPT/Codex 真机待验收 | pre-Vault `2b1e8a9c8030` | 当前 MCP 合同、OAuth refresh/revoke、OpenAI 审核;本地 CLI bundle pin |
14
- | WorkBuddy | `itpay-skill-workbuddy` | 本地 CLI;显式 MCP | SkillHub/local Skill 包、单文件 CLI、MCP OAuth | blocked:Buyer Vault 候选尚未同步 SkillHub | 2026-08-10 automated CI;WorkBuddy 真机待验收 | pre-Vault `584ebf3f8c46` | 权限模式、窄浏览器、OAuth 回跳/refresh、SkillHub 状态 |
15
- | 豆包工作 | `itpay-ai/cli` | 云电脑内的本地 CLI | 官方 npm CLI;`doubao-work` Agent Type | candidate:CLI 合同与自动化测试完成后待豆包工作真机验收 | 待本轮 automated CI 与真机验收 | 发布前 CLI tag | 云电脑安装/持久化、本机直达链接、二维码备用链接 |
16
- | OpenClaw / ClawHub | `itpay-skill-openclaw` | host-dependent CLI | ClawHub Skill、单文件 CLI | blocked:Buyer Vault 候选尚未同步 ClawHub | 2026-08-10 automated CI;OpenClaw 真机待验收 | pre-Vault `af2aa79d85c8` | 公开目录/审核状态、host renderer、更新/回滚 |
17
- | Kimi Work / Kimi Code | `itpay-plugin-kimi-work` | Work MCP;Code host-dependent CLI | Kimi plugin + Skill、离线 CLI | blocked:Buyer Vault 候选尚未发布;公开 release 仍为 `v2.0.17` | 2026-08-10 automated CI;两个 surface 真机待验收 | `v2.0.17` / `b8d40fe9cffd` | 两个 surface 真机、MCP Token persistence、市场状态 |
18
- | Hermes Agent / Skills Hub | `itpay-skill-hermes` | host-dependent CLI | GitHub Skill tap、单文件 CLI | blocked:Buyer Vault 候选尚未同步 Skills Hub | 2026-08-10 automated CI;Hermes 真机待验收 | pre-Vault `1189f25103fd` | Skills Hub/trusted 状态、更新/回滚、可选 MCP 真机 |
19
-
20
- CLI bundle 的实际版本、integrity 和 source SHA 只以各仓库
21
- `bundle.lock.json` 为准,不在本文复制易过期版本号。
22
-
23
- `blocked` means the repository candidate must not be presented as externally
24
- published. Update the status, acceptance date, and rollback anchor only after
25
- the named platform has real acceptance and its distribution surface is updated.
26
-
27
- ## 后续目标,不是当前仓库
28
-
29
- | 平台 | 当前状态 | 加入注册表的条件 |
30
- | --- | --- | --- |
31
- | Claude / Claude Code | planned | 确认分发面和仓库,完成 manifest、CLI/MCP 路由、OAuth/Device 真机验收。 |
32
- | Gemini CLI | planned | 确认当前 Extension 规则,完成仓库、manifest、bundle 和真机验收。 |
33
- | 扣子/火山/其他 | unconfirmed | 明确具体产品面和官方第三方发布入口,不能相互代替。 |
34
-
35
- 不要创建空仓库占位,也不要根据旧建议名单宣称支持。
36
-
37
- ## 统一合同
38
-
39
- - CLI 唯一真源是精确 npm `@itpay/cli`;
40
- - 平台仓库只保存 manifest、Skill、generated bundle、lock、测试和发布材料;
41
- - 本地使用 Device Authority,远程使用 MCP OAuth Connection;
42
- - 平台原生 MCP client 保管 Token;
43
- - 一个任务只走一条线路,不静默 fallback;
44
- - 不运行时下载 `latest`,不调用全局 CLI,不 patch generated bundle;
45
- - 同步只创建 PR,不自动发布;
46
- - Backend compatibility、CLI npm、平台 bundle 和 MCP contract 分别记录;
47
- - 跨平台 Buyer Vault 功能上线后,公共 MCP 只注册批准的五个工具。
48
-
49
- ## 每次发布如何更新
50
-
51
- 五个平台仓库每小时错峰检查 npm `@itpay/cli` 的正式版。发现版本高于各自 `bundle.lock.json` 后,调用 CLI `main` 上的统一 reusable workflow,重建对应格式的 bundle并运行仓库测试。更新 PR 优先由最小权限 `itpay-bundle-sync` GitHub App 创建;仓库未配置 App 时回落到 `GITHUB_TOKEN` 并明确要求人工批准 PR checks。该流程禁止个人 PAT,不会自动合并或发布商店版本,同一个 CLI 版本已有有效 open PR 时不会重复 force-push。
52
-
53
- 平台 owner 在真实验收后更新对应行或附加 release record,至少记录:
54
-
55
- ```text
56
- tested_at
57
- platform package/tag
58
- CLI version + npm integrity (local lane)
59
- MCP/Backend revision (remote lane)
60
- positive/negative test result
61
- store/review status
62
- rollback artifact
63
- ```
64
-
65
- “CLI 已发布”或“Backend 已部署”不能推断平台已更新。
66
-
67
- ## 历史通用仓库
68
-
69
- 旧 `itpay-ai/skill` 不再作为 CLI 或平台业务真源。独立仓库迁移完成后,
70
- 它只能归档或作为不含 bundle/业务分叉的索引仓库;不能继续手工 patch CLI。
@@ -1,62 +0,0 @@
1
- # Bundle 同步运维与事故处理
2
-
3
- ## 正常状态
4
-
5
- 每次同步必须在 Job Summary 中给出 published version、automation branch、同步决策、凭据模式、PR URL 和关闭的 superseded PR 数量。
6
-
7
- 同步决策只有以下正常结果:
8
-
9
- - `base-current`:main 已经包含目标版本,无需更新。
10
- - `pr-current`:当前版本的 open PR 已包含正确 bundle,不得产生新 commit。
11
- - `update-required`:目标版本不存在,需要构建并创建 PR。
12
- - `open-pr-artifact-missing`:PR 分支缺少 lock,需要重新构建。
13
- - `open-pr-artifact-mismatch`:PR 中的 version、format 或 bundle directory 不符合 caller 合同,需要重新构建。
14
-
15
- ## 失败分类
16
-
17
- ### GitHub Actions 启动故障
18
-
19
- 以下证据表示仓库代码没有运行:
20
-
21
- - run 的 `steps` 为空;
22
- - 失败发生在 `Set up job`;
23
- - `Failed to resolve action download info`;
24
- - Hosted Runner 长时间 queued 后被 cancelled 或 timed out。
25
-
26
- 先查看 GitHub Status。官方确认恢复后重跑原 SHA;不得为了这种故障修改 bundle、测试或业务代码。
27
-
28
- ### Bundle 构建或测试故障
29
-
30
- 以下步骤失败才属于仓库或产物问题:
31
-
32
- - Resolve published version
33
- - Rebuild bundle
34
- - Inspect upstream Skill changes
35
- - Verify platform bundle
36
-
37
- 保留失败分支和日志,不创建或更新 PR,不跳过 `npm test`。
38
-
39
- ### `action_required`
40
-
41
- 由 `GITHUB_TOKEN` 创建或更新的 PR workflow 会进入 approval-required 状态。这不是测试失败,但测试尚未执行。仓库写权限用户可以批准该 run;要求零人工同步时,必须配置最小权限 GitHub App,禁止使用个人 PAT。
42
-
43
- ## 重跑规则
44
-
45
- 1. 只重跑仍指向当前 head SHA 的基础设施失败。
46
- 2. 新 commit 已存在时不重跑旧 SHA。
47
- 3. 同一个版本第二次同步必须保持 automation PR head SHA 不变。
48
- 4. 不把 cancelled、action-required 或旧 SHA 的 success 当作当前版本通过。
49
-
50
- ## Superseded PR
51
-
52
- 新版本 PR 建立并通过平台 `npm test` 后,可以关闭旧机器人同步 PR。自动关闭只允许处理带同步标记、分支符合 `automation/itpay-cli-X.Y.Z`、且所有提交均由 `itpay-bundle-bot` 产生的 PR。检测到人工提交时必须保留并在 summary 中提示。关闭时保留远程分支,不自动删除历史。
53
-
54
- ## GitHub App 权限
55
-
56
- `itpay-bundle-sync` 只安装到分发仓库,权限限定为:
57
-
58
- - Metadata: read
59
- - Contents: read/write
60
- - Pull requests: read/write
61
-
62
- App 不需要 Actions、Secrets、Administration、Deployments 或 Packages 写权限。私钥只存于组织 Actions secrets,通过 reusable workflow 生成当前仓库、当前 job 有效的短期 token。