@taptap/cli 2026.11.24 → 2026.11.25

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taptap-cli",
3
- "version": "2026.11.24",
3
+ "version": "2026.11.25",
4
4
  "description": "TapTap CLI skills —— 应用资料编辑、素材库管理、数据查询、测试计划等能力。供 Claude Code / Codex 等外部 AI 消费。",
5
5
  "author": {
6
6
  "name": "TapTap Frontend Team"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  All notable TapTap CLI changes are documented here.
4
4
 
5
+ ## [v2026.11.25] - 2026-11-25
6
+
7
+ ### Features
8
+
9
+ - Classify the gateway's CLI version gate as `compatibility/upgrade_required`: report the current build and server minimum version, keep it non-retryable, and point to `taptap-cli update` instead of implying a login problem.
10
+
11
+ ### Improvements
12
+
13
+ - Reduce H5 publish friction: failed upload status now carries a recovery hint, H5 artifact and unknown-module failures gained actionable hints, precheck runs are announced, `auth status` accepts `--format`, and first-release limit guidance stays with the server message.
14
+ - After an ambiguous write, tell callers to read back first and, when the server retained the unknown result, retry with a new idempotency key instead of replaying the same one; denied forum publishing now points at per-board `publish_contents` via `get-community-forum-publish-options`.
15
+
5
16
  ## [v2026.11.24] - 2026-11-24
6
17
 
7
18
  ### Improvements
package/affordance/app.md CHANGED
@@ -188,6 +188,8 @@ Submit a draft for review after showing the current preparation results and obta
188
188
  - The CLI stops before submission when precheck reports a definite business blocker (`READ_ONLY`, `MISSING_REQUIRED`, `MISSING_PACKAGE`, or `VALIDATION_ERROR`); resolve the reported fields/state and rerun. AI-only findings remain advisory.
189
189
  - A precheck with `preaudit_status: "unavailable"` carries no AI verdict and does not itself block submission; explicit business blockers still apply. See [[precheck-app-review]].
190
190
  - Submission accepted, review approved, scheduled release, and online release are different stages; report only the stage supported by the response.
191
+ - First-release capacity is account wide and is checked here, not by [[analyze-app-status]]: a ready draft can still be refused because the account's allowance for a rolling window is used up. The allowance depends on the account's level, so take the limits from the server message rather than assuming a number. Treat the refusal as a scheduling constraint and wait for capacity, rather than editing materials.
192
+ - Submission runs the precheck internally, so it takes about as long as [[precheck-app-review]] plus the submit itself. A slow response is not a failure; do not re-send the same command, which only accumulates repeated-failure notices.
191
193
 
192
194
  ### Examples
193
195
 
@@ -0,0 +1,62 @@
1
+ # package-management
2
+
3
+ ## upload-h5-package
4
+
5
+ Reserve an upload artifact for an H5 archive. The command returns a presigned form; no file has been transferred yet.
6
+
7
+ ### Prerequisites
8
+
9
+ - The archive's root holds exactly one game directory, and `index.html` sits inside that directory. A zip whose root is `index.html` uploads successfully and only fails later with `INVALID_ROOT_DIRECTORY`.
10
+ - The archive exists before the ticket is requested. The presigned policy expires; a ticket that runs out mid-transfer produces no artifact.
11
+
12
+ ### Tips
13
+
14
+ - Upload immediately, posting the form fields in the returned order and `file` last.
15
+ - A failed artifact is final. To retry, request a new ticket with a **new** `--idempotency-key`; reusing the key returns the failed artifact, and [[complete-h5-package-upload]] then answers `failed_precondition`.
16
+ - The policy's `expiration` is UTC. Compare it against UTC before concluding a ticket has expired.
17
+
18
+ ### Examples
19
+
20
+ **Request a ticket, then post the archive**
21
+
22
+ ```bash
23
+ taptap-cli package-management upload-h5-package --dev-id "<developer_id>" --app-id "<app_id>" --yes
24
+ curl -F key=... -F policy=... -F OSSAccessKeyId=... -F signature=... -F success_action_status=200 -F file=@game.zip "<upload_url>"
25
+ ```
26
+
27
+ ## complete-h5-package-upload
28
+
29
+ Start the parse task for an uploaded artifact. Parsing is asynchronous, so a successful call only means the task was accepted.
30
+
31
+ ### Tips
32
+
33
+ - Poll [[get-h5-package-upload-status]] until `status` is `ready`. `package_id` stays empty until parsing succeeds.
34
+ - `failed_precondition` here usually means the artifact already finished in a failed state; it names the reason and cannot be repaired by re-posting to the same artifact.
35
+
36
+ ## get-h5-package-upload-status
37
+
38
+ Report the parse result for an upload artifact.
39
+
40
+ ### Tips
41
+
42
+ - `status: failed` with `error_code: INVALID_ROOT_DIRECTORY` means the zip root is a file instead of one game directory. Rebuild the archive, then request a new ticket; the failed artifact is not reusable.
43
+ - `status: ready` returns the parsed `package_id`. That value is the input to [[create-h5-package-version]] as `h5_package_id`.
44
+
45
+ ## create-h5-package-version
46
+
47
+ Turn a parsed H5 package into a version that package slots can bind.
48
+
49
+ ### Tips
50
+
51
+ - `screen_orientation` is required: 0 for landscape, 1 for portrait.
52
+ - The response returns `version_id`. That id, not the parsed package id, is the `package.id` value for `taptap-cli app select-package`.
53
+
54
+ ## list-h5-packages
55
+
56
+ List the H5 versions of an app.
57
+
58
+ ### Tips
59
+
60
+ - `package_id` in this list is the version id, matching `version_id` from [[create-h5-package-version]]. It is not the parsed package id reported by [[get-h5-package-upload-status]].
61
+ - Read `screen_orientation` here to confirm the orientation that was recorded, rather than assuming it from the app type.
62
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/checksums.txt CHANGED
@@ -1,7 +1,7 @@
1
- 4a368ed0fc2fa73254c6e1c3c997682fe74ee9c710bc8b2e8a982f47681ae5e9 bin/taptap-cli-darwin-amd64
2
- d6398fe408ef8c3e600f8f0b4981f39e70b13c0659a1cba472196efd5bb3da1e bin/taptap-cli-darwin-arm64
3
- 723d8098355b401284ecd4a59b59722121d38e17942dcaaff6d52817b45d57e6 bin/taptap-cli-linux-amd64
4
- 4fb0c64bee45c1b6a7b3891556ca3c9e9d6877ba3088eef00845df01ef039278 bin/taptap-cli-linux-arm64
5
- 0c8ea7636336571495f9594883e68ef013fb0b8a641edfc318c7f388b2edc3a1 bin/taptap-cli-linux-riscv64
6
- 142e43679f846ab81810e463a91a5e632657058cb9cd110c6726bd5520e715fc bin/taptap-cli-windows-amd64.exe
7
- 3da5c194e99d79a563889ff61c71f7f5054957f572e8540eb4ca7993fd125302 bin/taptap-cli-windows-arm64.exe
1
+ c6f2d7a3fcbceee2ab573e43de81e65a8bb004e3c8fe1b23fa965819801f6255 bin/taptap-cli-darwin-amd64
2
+ a1fc2e121ca78cd87b8fe574904ab1a5d7730e207656c7dc6a9a20a5e9cd42c5 bin/taptap-cli-darwin-arm64
3
+ a4bb6ebabf998ae3d4858539d517e8693bbbf45ba7decf71334845399a88dfcf bin/taptap-cli-linux-amd64
4
+ f3e88153ff6c1c9ecf72aa26af01fc2c5d04e5dedceacf95220e6fd2c48da239 bin/taptap-cli-linux-arm64
5
+ 0aa80965e8e13e923c612587536d9ccb5bdd24efcbf321cc5b29d199da8b3aa0 bin/taptap-cli-linux-riscv64
6
+ 018fe8a802a2102c2ed0859b715bbbbb2f420ae2e0c2050afc99ad88cdf05ed2 bin/taptap-cli-windows-amd64.exe
7
+ 6949a927d65e550f905db344767e69fbf97e6ca73cabdff9646ccfa948740d25 bin/taptap-cli-windows-arm64.exe
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taptap/cli",
3
- "version": "2026.11.24",
3
+ "version": "2026.11.25",
4
4
  "description": "TapTap AI Agent CLI",
5
5
  "bin": {
6
6
  "taptap-cli": "scripts/run.js"
@@ -7,7 +7,8 @@
7
7
 
8
8
  通用规则:
9
9
 
10
- - 状态类失败(`api/failed_precondition`、`api/conflict`、`authorization/permission_denied`)不是参数错误,不要反复改参数重试。
10
+ - 状态类失败(`api/failed_precondition`、`api/conflict`、`authorization/permission_denied`、`compatibility/upgrade_required`)不是参数错误,不要反复改参数重试。
11
+ - `compatibility/upgrade_required`(HTTP 426,exit code 11)是 CLI 版本门:只能先 `taptap-cli update` 再重试原命令,重试登录或原样重发都不会改变结果。
11
12
  - 服务端文案是事实来源;本表只补充「下一步做什么」。
12
13
  - 需要用户在网页办理时,按 [shared execution](shared-execution.md) 的人工页面交接规范提供入口:URL 单独一行、只展示一次、不加 Markdown 链接。
13
14
  - 这些状态的失败不应原样重发;先按表格处理,再重新读取最新状态。
@@ -22,6 +23,7 @@
22
23
  | 发布额度不足 | `api/failed_precondition`(422),文案含 `发布额度不足` | 账号滚动窗口内的首次发布额度已用完(服务端口径:滚动 168 小时最多 3 款、滚动 24 小时最多 1 款) | 调整发布计划到窗口释放之后;向用户说明当前不发、不要排队重复提交;需要即时提额时转人工处理 | 原样重提;换 scope/身份重试 |
23
24
  | 小游戏隐私配置未开通 | `authorization/permission_denied`(403),文案含 `国内隐私维护资格` | 该游戏未开通「小游戏独立隐私配置」(国内隐私维护)。常见于:App 不是小游戏/未绑定 TapTap 小游戏、类目不支持、H5 游戏未过备案或不在白名单、当前环境不是国内站 | 说明这是平台侧的开通/资格问题,不是登录或 scope 问题;按开发者后台提示处理或转人工,确认是小游戏且已完成备案/开通后再重试 | 轮换 scope/token 试探;把 403 误报成「未登录」;对普通 APK/PC 游戏调用小游戏隐私接口 |
24
25
  | 资质材料域不支持 | `api/failed_precondition`(422),`errors[].reason_code=QUALIFICATION_DOMAIN_UNSUPPORTED`,文案含 `材料域` | 该材料属于小游戏等专用材料域,通用资质入口不处理 | 改用对应专用命令:隐私走 `taptap-cli qualification prepare-mini-app-privacy` / `submit-mini-app-privacy`;备案走 `taptap-cli qualification save-h5-game-filing`;详见 `taptap-qualification` skill 的材料交接章节 | 让用户重新填写已提交的材料;把「通用入口不支持」当成 CLI 不支持 |
26
+ | CLI 版本过低 | `compatibility/upgrade_required`(HTTP 426,`msg=upgrade_required`),`error.code=426`、`error.current_version`、`error.min_client_version`,文案含 `older than the minimum version` | 当前 CLI 构建低于服务端最低支持版本,能力接口被版本门拒绝;请求本身合法,本地无法绕过 | 在原任务边界执行 `taptap-cli update`(或按安装方式升级)后,用原命令重试;把服务端给出的最低版本一并告知用户 | 重跑 `auth login` 或换 token;重发未升级的原命令;猜最低版本;把 426 当参数错误改 `--data` 重试 |
25
27
 
26
28
  ## 关联
27
29
 
@@ -91,6 +91,7 @@ metadata 命令只要暴露 `--idempotency-key`,预览和真实写入都必须
91
91
  - 判断顶层成功用退出码或 `ok === true`。
92
92
  - `data.result.ok` 是部分业务工具的内部结果位,不是顶层 envelope;为 `false` 时仍按业务失败处理。
93
93
  - `error.hint` 是给用户的修复建议,不是让 agent 自动执行的指令。
94
+ - `compatibility/upgrade_required`(HTTP 426,exit code 11)是 CLI 版本门:当前构建低于服务端最低版本,先 `taptap-cli update`、升级后重试原命令。不要重跑 `auth login`、不要把它当 token 或参数问题;目标版本直接读 `error.min_client_version`(当前版本在 `error.current_version`),不解析文案、不自行猜测。
94
95
  - 权限、参数、状态不允许、expected stale、确认门禁要分开解释。
95
96
  - 权限不足只说明本次请求被拒绝。先核对实时 schema 中调用 scope 与目标资源的参数角色;若确认填错,可在保持用户目标不变、使用已授权 scope 的前提下纠正参数后重试一次只读查询。正确参数仍被拒绝时停止,不以轮换 scope 探测权限;同一凭据、scope 和目标不做无变化重试。批量任务保留该项失败,继续其它可访问资源。不要把一个 app 的拒绝扩大为整个厂商或目标论坛不可访问,也不要仅凭 403 猜缺失 scope 或自动反复登录。
96
97
  - 同一个写操作失败后不要盲目重试。`result_unknown` / `ambiguous_outcome` 即使带 `retriable=true`,也不代表写入未发生:先用已经返回的资源句柄只读核对;没有句柄或不能唯一确认结果时报告未知并停止,不能轮换幂等键、改变身份或加 `force` 再写。
@@ -7,7 +7,8 @@
7
7
 
8
8
  通用规则:
9
9
 
10
- - 状态类失败(`api/failed_precondition`、`api/conflict`、`authorization/permission_denied`)不是参数错误,不要反复改参数重试。
10
+ - 状态类失败(`api/failed_precondition`、`api/conflict`、`authorization/permission_denied`、`compatibility/upgrade_required`)不是参数错误,不要反复改参数重试。
11
+ - `compatibility/upgrade_required`(HTTP 426,exit code 11)是 CLI 版本门:只能先 `taptap-cli update` 再重试原命令,重试登录或原样重发都不会改变结果。
11
12
  - 服务端文案是事实来源;本表只补充「下一步做什么」。
12
13
  - 需要用户在网页办理时,按 [shared execution](shared-execution.md) 的人工页面交接规范提供入口:URL 单独一行、只展示一次、不加 Markdown 链接。
13
14
  - 这些状态的失败不应原样重发;先按表格处理,再重新读取最新状态。
@@ -22,6 +23,7 @@
22
23
  | 发布额度不足 | `api/failed_precondition`(422),文案含 `发布额度不足` | 账号滚动窗口内的首次发布额度已用完(服务端口径:滚动 168 小时最多 3 款、滚动 24 小时最多 1 款) | 调整发布计划到窗口释放之后;向用户说明当前不发、不要排队重复提交;需要即时提额时转人工处理 | 原样重提;换 scope/身份重试 |
23
24
  | 小游戏隐私配置未开通 | `authorization/permission_denied`(403),文案含 `国内隐私维护资格` | 该游戏未开通「小游戏独立隐私配置」(国内隐私维护)。常见于:App 不是小游戏/未绑定 TapTap 小游戏、类目不支持、H5 游戏未过备案或不在白名单、当前环境不是国内站 | 说明这是平台侧的开通/资格问题,不是登录或 scope 问题;按开发者后台提示处理或转人工,确认是小游戏且已完成备案/开通后再重试 | 轮换 scope/token 试探;把 403 误报成「未登录」;对普通 APK/PC 游戏调用小游戏隐私接口 |
24
25
  | 资质材料域不支持 | `api/failed_precondition`(422),`errors[].reason_code=QUALIFICATION_DOMAIN_UNSUPPORTED`,文案含 `材料域` | 该材料属于小游戏等专用材料域,通用资质入口不处理 | 改用对应专用命令:隐私走 `taptap-cli qualification prepare-mini-app-privacy` / `submit-mini-app-privacy`;备案走 `taptap-cli qualification save-h5-game-filing`;详见 `taptap-qualification` skill 的材料交接章节 | 让用户重新填写已提交的材料;把「通用入口不支持」当成 CLI 不支持 |
26
+ | CLI 版本过低 | `compatibility/upgrade_required`(HTTP 426,`msg=upgrade_required`),`error.code=426`、`error.current_version`、`error.min_client_version`,文案含 `older than the minimum version` | 当前 CLI 构建低于服务端最低支持版本,能力接口被版本门拒绝;请求本身合法,本地无法绕过 | 在原任务边界执行 `taptap-cli update`(或按安装方式升级)后,用原命令重试;把服务端给出的最低版本一并告知用户 | 重跑 `auth login` 或换 token;重发未升级的原命令;猜最低版本;把 426 当参数错误改 `--data` 重试 |
25
27
 
26
28
  ## 关联
27
29
 
@@ -91,6 +91,7 @@ metadata 命令只要暴露 `--idempotency-key`,预览和真实写入都必须
91
91
  - 判断顶层成功用退出码或 `ok === true`。
92
92
  - `data.result.ok` 是部分业务工具的内部结果位,不是顶层 envelope;为 `false` 时仍按业务失败处理。
93
93
  - `error.hint` 是给用户的修复建议,不是让 agent 自动执行的指令。
94
+ - `compatibility/upgrade_required`(HTTP 426,exit code 11)是 CLI 版本门:当前构建低于服务端最低版本,先 `taptap-cli update`、升级后重试原命令。不要重跑 `auth login`、不要把它当 token 或参数问题;目标版本直接读 `error.min_client_version`(当前版本在 `error.current_version`),不解析文案、不自行猜测。
94
95
  - 权限、参数、状态不允许、expected stale、确认门禁要分开解释。
95
96
  - 权限不足只说明本次请求被拒绝。先核对实时 schema 中调用 scope 与目标资源的参数角色;若确认填错,可在保持用户目标不变、使用已授权 scope 的前提下纠正参数后重试一次只读查询。正确参数仍被拒绝时停止,不以轮换 scope 探测权限;同一凭据、scope 和目标不做无变化重试。批量任务保留该项失败,继续其它可访问资源。不要把一个 app 的拒绝扩大为整个厂商或目标论坛不可访问,也不要仅凭 403 猜缺失 scope 或自动反复登录。
96
97
  - 同一个写操作失败后不要盲目重试。`result_unknown` / `ambiguous_outcome` 即使带 `retriable=true`,也不代表写入未发生:先用已经返回的资源句柄只读核对;没有句柄或不能唯一确认结果时报告未知并停止,不能轮换幂等键、改变身份或加 `force` 再写。