@taptap/cli 2026.11.29-beta.1 → 2026.11.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taptap-cli",
3
- "version": "2026.11.29-beta.1",
3
+ "version": "2026.11.29",
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,15 @@
2
2
 
3
3
  All notable TapTap CLI changes are documented here.
4
4
 
5
+ ## [v2026.11.29] - 2026-11-29
6
+
7
+ ### Fixes
8
+
9
+ - Invalid `--data` input now includes a hint for the detected mistake, including a missing `@` before a JSON file path.
10
+ - Single-image uploads share a local rate limit across CLI processes using the same configuration directory, credential, endpoint and game. When the gateway returns HTTP 429 with `Retry-After`, subsequent uploads sharing a writable cache wait for that deadline. An unavailable cache still allows the upload to reach the gateway.
11
+ - `app list-versions` classifies a permission denial inside an HTTP 200 response as a non-retryable authorization error (exit code 3). Batch callers can pause the affected game and continue checking the others.
12
+ - The bundled production Catalog lists the field IDs accepted by `app save-changes`. Preview and submission identify an invalid field by its position in the batch and list the available choices.
13
+
5
14
  ## [v2026.11.27] - 2026-11-27
6
15
 
7
16
  ### Features
package/README.md CHANGED
@@ -123,7 +123,7 @@ see the [Skills CLI guide](https://github.com/vercel-labs/skills).
123
123
 
124
124
  **Step 2 - Login**
125
125
 
126
- > Run the command and send the returned login link to the user.
126
+ > Run the command in the background, give the returned login link to the user, and continue with the returned recovery command.
127
127
 
128
128
  ```bash
129
129
  taptap-cli auth login --no-wait --json
@@ -131,7 +131,7 @@ taptap-cli auth login --no-wait --json
131
131
 
132
132
  **Step 3 - Continue login**
133
133
 
134
- > Once the user can see the link, run the returned recovery command. If your agent only shows final replies or cannot keep polling, send the link in a final reply and resume when the user confirms.
134
+ > Immediately execute the returned recovery command in the background. It polls until authorization succeeds or the device code expires.
135
135
 
136
136
  **Step 4 - Verify**
137
137
 
package/README.zh.md CHANGED
@@ -122,7 +122,7 @@ npx skills add taptap/cli -a universal
122
122
 
123
123
  **第 2 步 — 登录**
124
124
 
125
- > 运行命令,将返回的登录链接发给用户。
125
+ > 后台运行命令,将命令返回的登录链接直接提供给用户,并继续执行返回的恢复命令。
126
126
 
127
127
  ```bash
128
128
  taptap-cli auth login --no-wait --json
@@ -130,7 +130,7 @@ taptap-cli auth login --no-wait --json
130
130
 
131
131
  **第 3 步 — 继续登录**
132
132
 
133
- > 用户已能看见链接时,执行返回的续登命令。如果宿主只显示最终回复或无法保活,先在最终回复中发送链接,等用户确认后续登。
133
+ > 立即在后台执行返回的恢复命令,持续轮询直到授权成功或 device code 过期。
134
134
 
135
135
  **第 4 步 — 验证**
136
136
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/checksums.txt CHANGED
@@ -1,7 +1,7 @@
1
- eb69829f03422f97be05cdf3f85eb7ed6f87b5f28910cf28b03a5a7aaeb43cd6 bin/taptap-cli-darwin-amd64
2
- 6e4097ad8f261cf4ed0003c0cb0bd627cdd0d11ace870ac4fee87eeaabe28524 bin/taptap-cli-darwin-arm64
3
- f1635ae872682fe38c1eb82f6c68786f87a26d160da0d72bbfa6e3b9c9220ad6 bin/taptap-cli-linux-amd64
4
- 303ef674e88e88988162d31eec0f069d085f26d2d2e87eb811a26a800f4dd674 bin/taptap-cli-linux-arm64
5
- a89685e50e782c3280121ad650e515450ce440c01104ba1a1069cb1b2824eafb bin/taptap-cli-linux-riscv64
6
- 8c7fda6b0cd7b8593f542c9bdc7881b591734b37e1b4cd87c1447fef056daaf8 bin/taptap-cli-windows-amd64.exe
7
- fb93870446367acd8924f3136a99be66ff303d53c0c76a3b4952b9864c1aaa88 bin/taptap-cli-windows-arm64.exe
1
+ 9b395d23f7208f445cc27dfaac9cbff5e71f0906091400b5445e699267ffc32c bin/taptap-cli-darwin-amd64
2
+ 69a6f7bb9294c4de5072e0e29fb9e749d69dc1b342bf096f19bb205f2709d14d bin/taptap-cli-darwin-arm64
3
+ 9534e862c32026d80ca3356e85959993288dcece7f3f6f464bdfa01eff9c88e3 bin/taptap-cli-linux-amd64
4
+ db2560688d36d4f4761ac56b64ac3049cea82179f19117504417f47fd4a82008 bin/taptap-cli-linux-arm64
5
+ fed093e318adf03938dc60ad1d1cf41dd708ea29e98dd03c781479eb5307d0fa bin/taptap-cli-linux-riscv64
6
+ 26d7e3f30e4dc8b1fc5d81f2268095b6ce398d504555562e8071cddbf3991267 bin/taptap-cli-windows-amd64.exe
7
+ 6b062cbb12c45a1fff1a00a9620e341e99e8b4e2e704ae93f4f281a84d25a1e7 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.29-beta.1",
3
+ "version": "2026.11.29",
4
4
  "description": "TapTap AI Agent CLI",
5
5
  "bin": {
6
6
  "taptap-cli": "scripts/run.js"
@@ -8,7 +8,7 @@ import { realpathSync, statSync } from "node:fs";
8
8
  import { spawn } from "node:child_process";
9
9
  import { setTimeout as delay } from "node:timers/promises";
10
10
  import { store, alive, positive, inboxId, defaultWorkspace } from "./store.mjs";
11
- import { login, loginBinding, assertLoginBinding, tap, nativeCli, nativeEnvironment, resolveBotProfile, servers } from "./tap.mjs";
11
+ import { login, loginBinding, assertLoginBinding, tap, nativeCli, servers } from "./tap.mjs";
12
12
  import { run } from "./process.mjs";
13
13
  import { getAgent } from "./agents/index.mjs";
14
14
  import { selectModel, saveModel } from "./models.mjs";
@@ -59,12 +59,17 @@ async function loadListener() {
59
59
  }
60
60
  }
61
61
 
62
- async function config(v, requireBot = true) {
62
+ function config(v, requireBot = true) {
63
63
  const bot = v.bot;
64
64
  if (requireBot && !positive(bot))
65
65
  throw Error("请选择 --bot 正整数");
66
- const env = v.env || "production";
67
- if (!Object.hasOwn(servers, env)) throw Error("--env 需要 production 或 rnd");
66
+ const env = v.env || "production",
67
+ profile = v.profile || "default";
68
+ if (
69
+ !Object.hasOwn(servers, env) ||
70
+ !/^[A-Za-z0-9][\w.-]{0,63}$/.test(profile)
71
+ )
72
+ throw Error("环境或 profile 无效");
68
73
  if (env === "rnd" && !v.cli && requireBot === false)
69
74
  throw Error("RND 登录需要 --cli 对应构建");
70
75
  if (isCindyAgent(v.agent) && (v.permissions || v["allow-workspace-write"] || v.codex))
@@ -86,10 +91,9 @@ async function config(v, requireBot = true) {
86
91
  throw Error("工作区写入需要 --reply 和 --workspace");
87
92
  if (v["replace-epoch"] && !positive(v["replace-epoch"]))
88
93
  throw Error("epoch 必须是正整数");
89
- const cli = v.cli && realpathSync(v.cli);
90
94
  return {
91
95
  env,
92
- profile: await resolveBotProfile(cli, v.profile),
96
+ profile,
93
97
  bot,
94
98
  workspace,
95
99
  reply: !!v.reply,
@@ -99,7 +103,7 @@ async function config(v, requireBot = true) {
99
103
  model: v.model,
100
104
  replace: v["replace-epoch"],
101
105
  personal: !!v.personal,
102
- cli,
106
+ cli: v.cli && realpathSync(v.cli),
103
107
  agent: v.reply ? getAgent(v.agent).name : undefined,
104
108
  agentOptions:
105
109
  isCindyAgent(v.agent)
@@ -185,24 +189,19 @@ function summary(row) {
185
189
  binding: row.credential ? JSON.parse(row.credential).binding_id : null,
186
190
  };
187
191
  }
188
- export async function main(args) {
189
- // Keep a profile starting with "-" attached to its flag, including "--help".
190
- const argv = [];
191
- for (let i = 0; i < args.length; i++) {
192
- if (args[i] === "--profile" && i + 1 < args.length) argv.push("--profile=" + args[++i]);
193
- else argv.push(args[i]);
194
- }
195
- if (!argv.length || argv.includes("--help") || argv.includes("-h") || argv[0] === "help")
192
+ export async function main(argv) {
193
+ const [cmd, ...args] = argv;
194
+ if (!cmd || ["--help", "-h", "help"].includes(cmd) || args.includes("--help"))
196
195
  return console.log(help);
197
196
  // A sidecar credential represents a proxy, not a reusable local account.
198
197
  if (Object.entries(process.env).some(([key, value]) =>
199
198
  key.toUpperCase() === "TAPTAP_CLI_AUTH_PROXY" && value?.trim()))
200
199
  throw Error("机器人需要本机登录的账号,请在 TapTap 授权代理外运行");
201
- if (argv[0] === "__run") {
200
+ if (cmd === "__run") {
202
201
  const listen = await loadListener();
203
202
  const db = store();
204
203
  try {
205
- await listen(db, argv[1], argv[2]);
204
+ await listen(db, args[0], args[1]);
206
205
  } finally {
207
206
  db.close();
208
207
  }
@@ -232,17 +231,13 @@ export async function main(args) {
232
231
  "personal",
233
232
  "retry-issue",
234
233
  ];
235
- const { values: v, positionals } = parseArgs({
236
- args: argv,
237
- allowPositionals: true,
234
+ const { values: v } = parseArgs({
235
+ args,
238
236
  options: Object.fromEntries([
239
237
  ...strings.map((k) => [k, { type: "string" }]),
240
238
  ...flags.map((k) => [k, { type: "boolean" }]),
241
239
  ]),
242
240
  });
243
- const [cmd] = positionals;
244
- if (!cmd || cmd === "help") return console.log(help);
245
- if (positionals.length > 1) throw Error("参数过多,请运行 taptap-cli bot --help");
246
241
  if (v["bot-name"] !== undefined &&
247
242
  (cmd !== "connect" || !v.reply || isCindyAgent(v.agent) || v.workspace || !v["bot-name"].trim()))
248
243
  throw Error("--bot-name 仅用于 Codex 的默认项目,请提供机器人昵称");
@@ -282,7 +277,7 @@ export async function main(args) {
282
277
  return getAgent("codex").login({ executable: v.codex });
283
278
  }
284
279
  if (cmd === "list" || cmd === "login") {
285
- const c = await config(v, false);
280
+ const c = config(v, false);
286
281
  await login(c);
287
282
  if (cmd === "list") {
288
283
  const bots = [];
@@ -292,7 +287,7 @@ export async function main(args) {
292
287
  return;
293
288
  }
294
289
  if (cmd === "permissions") {
295
- const c = await config(v);
290
+ const c = config(v);
296
291
  await login(c);
297
292
  c.loginBinding = await loginBinding(c);
298
293
  if (v.agent === "cindy-plugin") return output({ agent: v.agent,
@@ -316,8 +311,7 @@ export async function main(args) {
316
311
  return output(
317
312
  db.prepare("SELECT * FROM instances ORDER BY id").all().map(summary),
318
313
  );
319
- if (!["connect", "events", "stop"].includes(cmd)) throw Error("未知命令,请运行 taptap-cli bot --help");
320
- const c = await config(v),
314
+ const c = config(v),
321
315
  id = idOf(c);
322
316
  let row = db.prepare("SELECT * FROM instances WHERE id=?").get(id);
323
317
  if (cmd === "events") {
@@ -366,22 +360,10 @@ export async function main(args) {
366
360
  alive(db.prepare("SELECT pid FROM instances WHERE id=?").get(id)?.pid)
367
361
  )
368
362
  throw Error("实例正在停止,请用 status 查看");
369
- } else {
370
- const others = db.prepare("SELECT id, pid FROM instances WHERE id GLOB ? AND id != ? AND pid IS NOT NULL ORDER BY id")
371
- .all(`${c.env}/*/${c.bot}`, id)
372
- .filter(instance => alive(instance.pid));
373
- if (others.length) {
374
- const commands = others.map(instance => {
375
- const name = instance.id.split("/")[1];
376
- const selector = /^[a-z0-9][a-z0-9_.-]*$/i.test(name) ? "--profile " + name :
377
- "--profile='" + name.replaceAll("'", "'\"'\"'") + "'";
378
- return `taptap-cli bot stop --bot ${c.bot} --env ${c.env} ${selector}`;
379
- });
380
- throw Error(`当前实例 ${id} 未运行。请选择要停止的实例:\n${commands.join("\n")}`);
381
- }
382
363
  }
383
364
  return output({ instance: id, status: "stopped" });
384
365
  }
366
+ if (cmd !== "connect") throw Error("未知命令,请运行 taptap-cli bot --help");
385
367
  if (alive(row?.pid)) {
386
368
  await assertLoginBinding(JSON.parse(row.config));
387
369
  const summary = runningSummary(row, c.agent, c.model, c.cindyPermission ?? c.permissionMode ?? (c.write ? "work" : undefined), c.workspace);
@@ -429,7 +411,7 @@ export async function main(args) {
429
411
  "community-bot",
430
412
  "create-connection",
431
413
  "--help",
432
- ], { env: nativeEnvironment() });
414
+ ]);
433
415
  if (!check.stdout.includes("--replace-epoch"))
434
416
  throw Error("此 CLI 不支持个人绑定替换,请用 --cli 指定兼容构建");
435
417
  }
@@ -14,12 +14,3 @@ module.exports = async function runBot(args) {
14
14
  process.exitCode = 1;
15
15
  }
16
16
  };
17
-
18
- // Both npm launchers accept the root --profile before the bot command.
19
- module.exports.botArguments = function botArguments(args) {
20
- let index = 0;
21
- if (args[0] === "--profile") index = 2;
22
- else if (args[0]?.startsWith("--profile=")) index = 1;
23
- if (args[index] !== "bot") return null;
24
- return [...args.slice(0, index), ...args.slice(index + 1)];
25
- };
@@ -20,27 +20,9 @@ export const servers = {
20
20
  "wss://api.xdrnd.com/community-bot/v2/connect",
21
21
  ],
22
22
  };
23
- export async function resolveBotProfile(cli, override) {
24
- let profile = override ?? process.env.TAPTAP_CLI_PROFILE;
25
- if (!profile) {
26
- const profiles = await runTap({ cli }, [], ["profile", "list"]);
27
- if (!profiles.length) return "default";
28
- const selected = profiles.filter(row => row?.effective === true);
29
- if (selected.length !== 1) throw Error("TapTap CLI profile list 未返回唯一生效的配置");
30
- profile = selected[0].name;
31
- }
32
- // Match the native CLI's ValidateProfileName, including its 64-code-point limit.
33
- if (typeof profile !== "string" || !profile || [...profile].length > 64 ||
34
- /[\x00-\x20\x7f/\\"'`$#!&|;(){}\[\]<>?*~]/u.test(profile))
35
- throw Error("profile 无效,请用 --profile 指定有效的名称");
36
- return profile;
37
- }
38
-
39
- export function tap(config, args, body, timeout) {
40
- return runTap(config, ["--profile=" + config.profile], args, body, timeout);
41
- }
42
-
43
- export function nativeEnvironment() {
23
+ export async function tap(config, args, body, timeout) {
24
+ const file = config.cli || nativeCli();
25
+ accessSync(file);
44
26
  const env = Object.fromEntries(
45
27
  Object.entries(process.env).filter(
46
28
  ([k]) => !k.toUpperCase().startsWith("TAPTAP_CLI_"),
@@ -52,19 +34,13 @@ export function nativeEnvironment() {
52
34
  TAPTAP_CLI_NO_SKILLS_NOTIFIER: "1",
53
35
  TAPTAP_CLI_NO_TELEMETRY: "1",
54
36
  });
55
- return env;
56
- }
57
-
58
- async function runTap(config, selector, args, body, timeout) {
59
- const file = config.cli || nativeCli();
60
- accessSync(file);
61
- const env = nativeEnvironment();
62
37
  if (config.loginBinding && ["create-connection", "get-content", "reply"].includes(args[1]))
63
38
  env.TAPTAP_CLI_BOT_EXPECT_BINDING = config.loginBinding;
64
39
  const result = await run(
65
40
  file,
66
41
  [
67
- ...selector,
42
+ "--profile",
43
+ config.profile,
68
44
  ...args,
69
45
  ...(body === undefined ? [] : ["--data", "-"]),
70
46
  ],
@@ -74,10 +50,6 @@ async function runTap(config, selector, args, body, timeout) {
74
50
  try {
75
51
  response = JSON.parse(result.code === 0 ? result.stdout : result.stderr);
76
52
  } catch {}
77
- if (result.code === 0 && args[0] === "profile" && args[1] === "list") {
78
- if (!Array.isArray(response)) throw Error("TapTap CLI profile list 返回的不是 JSON 数组");
79
- return response;
80
- }
81
53
  if (result.code !== 0 || !response?.ok) {
82
54
  const err = response?.error;
83
55
  const error = Error(
@@ -134,7 +106,7 @@ export async function login(c) {
134
106
  Math.max(1000, d.expires_at * 1000 - Date.now() + 10000),
135
107
  );
136
108
  s = await tap(c, ["auth", "status", "--offline", "--json"]);
137
- if (!s.hasAccessToken || s.accessTokenExpired)
109
+ if (!s.hasAccessToken || s.accessTokenExpired || s.profile !== c.profile)
138
110
  throw Error("账号授权未完成");
139
111
  return s;
140
112
  }
@@ -346,7 +346,7 @@ function handleSessionStart(input, deps) {
346
346
  ? `taptap-cli is available (${probe.version || "version unknown"}; plugin version ${versionMatches ? "matches" : "does not match"}).`
347
347
  : "taptap-cli was not found on PATH; TapTap commands will require environment repair.";
348
348
  const authStatus = probe.auth && probe.auth.status !== "unavailable"
349
- ? `Offline auth: credential ${probe.auth.credentialSource || "none"}, token ${probe.auth.hasAccessToken ? (probe.auth.accessTokenExpired ? "expired" : "present") : "absent"}.`
349
+ ? `Offline auth: profile ${probe.auth.profile || "default"}, credential ${probe.auth.credentialSource || "none"}, token ${probe.auth.hasAccessToken ? (probe.auth.accessTokenExpired ? "expired" : "present") : "absent"}.`
350
350
  : "Offline auth status unavailable.";
351
351
  const embedded = probe.skills?.embedded;
352
352
  const globalSkills = probe.skills?.global_agent_skills;
@@ -196,6 +196,7 @@ test("SessionStart is local, bounded by its caller, and performs no mutation", (
196
196
  available: true,
197
197
  version: "2026.7.22",
198
198
  auth: {
199
+ profile: "default",
199
200
  credentialSource: "keychain",
200
201
  hasAccessToken: true,
201
202
  accessTokenExpired: false,
@@ -212,7 +213,7 @@ test("SessionStart is local, bounded by its caller, and performs no mutation", (
212
213
  );
213
214
  assert.equal(probes, 1);
214
215
  assert.equal(startup.hookSpecificOutput.hookEventName, "SessionStart");
215
- assert.match(startup.hookSpecificOutput.additionalContext, /Offline auth: credential keychain, token present/);
216
+ assert.match(startup.hookSpecificOutput.additionalContext, /Offline auth/);
216
217
  assert.match(startup.hookSpecificOutput.additionalContext, /embedded 9/);
217
218
  assert.match(startup.hookSpecificOutput.additionalContext, /No login, update, Skill installation/);
218
219
 
package/scripts/run.js CHANGED
@@ -68,9 +68,7 @@ async function main(args = process.argv.slice(2), dependencies = {}) {
68
68
  const runWizard = dependencies.runWizard ||
69
69
  (() => require("./install-wizard.js").runWizard());
70
70
 
71
- const runBot = require("./bot/entry.cjs");
72
- const botArgs = runBot.botArguments(args);
73
- if (botArgs) return runBot(botArgs);
71
+ if (args[0] === "bot") return require("./bot/entry.cjs")(args.slice(1));
74
72
 
75
73
  // Intercept "install" before native-binary dispatch: the JavaScript wizard
76
74
  // is self-contained and does not need the native CLI.
@@ -212,6 +212,8 @@ HTTP 200 只表示 HTTP 请求成功。以顶层 `ok` 判断预检是否执行
212
212
 
213
213
  ### H. 版本历史回溯
214
214
 
215
+ 多 App 轮询中,某个 App 的 `list-versions` 返回 403 时,只暂停该 App,继续查询其余目标。核对本次 `--dev-id` 与 `--app-id` 的归属,以及调用账号在该 App 的 `apply_update` 权限。修正目标或恢复权限后再查询该 App。
216
+
215
217
  #### H-1. "上一版为什么被拒?" / "刚才那次提审什么结果?"
216
218
 
217
219
  ```bash
@@ -24,6 +24,8 @@ Skill 分析只用于资料准备建议。用户明确要求提审后,展示 `
24
24
 
25
25
  ### 文字字段
26
26
 
27
+ 按用户要展示文字的位置选模块。游戏简介读 `basic-info`,首页推荐语读 `profile-promotion`。在该 App 本次 `get-module` 返回的 `fields` 里确认字段和原值,再填入 `changes[].field_id` 和 `expected`。游戏简介使用 `description`,首页推荐语使用 `promotion_text`。
28
+
27
29
  | 用户怎么说 | 处理 |
28
30
  | --- | --- |
29
31
  | “改成 Y” / “就用这段” | 用户已给最终值,直接 `save-changes` 写入,不再包装候选 |
@@ -41,6 +43,8 @@ Skill 分析只用于资料准备建议。用户明确要求提审后,展示 `
41
43
 
42
44
  ### 保存失败与部分完成
43
45
 
46
+ - 批量发布时,用 `save-changes --dry-run` 校验字段名。若校验指出某个 `changes[i].field_id` 无效,按提示的合法值修正该项;完整清单可用 `taptap-cli schema app save-changes` 查看。保留已上传的图片回执和视频 ID,修正字段模板并重新预览。确认保存并读回后,再继续该 App 的包体或提审步骤。
47
+
44
48
  - 先区分缺少 `expected`、字段值漂移、字段约束不符与草稿不可编辑;不要把所有 conflict 都归因其他人修改。
45
49
  - conflict 或响应含 `stale` 时,重新读取受影响字段与当前草稿。目标值已经存在则报告“当前值已符合目标”,不重复写,也不声称刚才失败的请求完成了保存。
46
50
  - 409 的 `error_description` 会点名漂移字段的中文名;按 [field map](app-edit-field-map.md) 把它对到 `field_id` 与所属 `module_id`,再用 `get-app-module --data '{"module_id":...}'` 读该模块的 `current_value`,原样回填到对应 change 的 `expected`。同一目标再冲突一次就停止重试,报告观察到的状态,不要原样重发。`expected` 必须等于该字段当前的 `current_value`:字段当前为空时才能传 `null`,字段有值时传 `null` 会被服务端当作「缺 expected」并返回 409,需要按 `get-app-module` 的本次读数原样回填。
@@ -22,9 +22,9 @@ TapTap CLI 总入口,同时承担 TapTap 业务 skill 的共享执行规范。
22
22
 
23
23
  **CRITICAL — `--yes` 只确认执行动作。服务端要求额外核对风险时,展示响应中实际返回的 `blockers` / `warnings`。签署协议前,单独展示协议名称和 URL 并取得用户明确同意,再按对应业务流程签署和回读。不得补造本地 flag 或请求字段。**
24
24
 
25
- **CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 发起授权。不要输出、记录或上报 access token。**
25
+ **CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 返回的裸 JSON 契约,并用响应中的完整恢复参数继续轮询。不要只用 `device_code` 重建命令,也不要输出、记录或上报 access token。**
26
26
 
27
- **登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
27
+ **登录链接交接 — 将 `verification_url` 按两行原样提供给用户:第一行仅写“请完成授权:”,第二行仅写 URL。不要使用 Markdown 链接语法,也不要重复展示 URL。随后立即执行 `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>` 持续轮询,不要等待用户回复;只有运行环境无法保活轮询进程时,才请用户完成授权后通知你。登录成功后向用户只回复“登录成功”。**
28
28
 
29
29
  ## 快速决策
30
30
 
@@ -20,9 +20,14 @@ taptap-cli version # 查看当前 CLI 包版本(也支持 --version / -v
20
20
  taptap-cli update # 更新到最新 CLI 包版本(upgrade 同义)
21
21
  ```
22
22
 
23
- Agent 运行 `taptap-cli auth login --no-wait --json` 发起授权。根据响应展示 `data.verification_url`,随后把同一响应的 `data.device_code` 填入 `data.hint` 提供的续登命令。access token 只由 CLI 保存在本机凭证存储,不得进入日志、埋点或错误上报。链接展示和回复口径见[身份 Skill](../../taptap-identity/SKILL.md)。
24
-
25
- 遇到认证错误时先看 `error.type` / `error.subtype`。凭据缺失、过期或被拒绝时,按 `error.hint` 处理。HTTP 502 属于服务端或传输故障。
23
+ Agent 需要把登录拆成可恢复步骤时,使用 `taptap-cli auth login --no-wait --json`
24
+ 获取 `data.verification_url`、`data.device_code`、`data.expires_in`。展示话术、两行 URL 输出规则、轮询时机和“登录成功”回复口径以 `taptap-identity` 的登录规范为准,本文件不重复。
25
+ 恢复轮询命令为
26
+ `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>`。不要只拿 `device_code` 重建命令,因为恢复参数还包含 OAuth/Forge endpoint
27
+ 和 device code 过期时间。
28
+ access token 只由 CLI 保存到本机凭证存储,不得进入日志、埋点或错误上报。
29
+
30
+ 遇到认证错误时先看 `error.type` / `error.subtype`:凭证缺失、过期或被拒绝时,请用户运行 `taptap-cli auth login` 完成登录;CLI 不会自动重新登录。HTTP 502 属于服务端或传输故障,不能当作认证失效处理。
26
31
 
27
32
  ### 通用工具调用
28
33
 
@@ -24,9 +24,9 @@ identity 是所有业务 skill 的前置定位能力。它只确认登录态、
24
24
 
25
25
  身份发现中的页面入口优先使用本次 `app +list` / `overview` 每个游戏返回的 `page_url`;接口缺失时的规范地址推导按 [shared execution](../taptap-cli/references/shared-execution.md)「人工页面交接和链接输出」执行,推导入口必须标记为非服务端返回。
26
26
 
27
- **CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`。不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
27
+ **CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`,并用响应中的完整恢复参数继续轮询。不要只用 `device_code` 重建命令(恢复参数还包含 OAuth/Forge endpoint 和过期时间),不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
28
28
 
29
- **登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
29
+ **登录链接交接 — 将 `data.verification_url` 按两行原样提供给用户:第一行仅写“请完成授权:”,第二行仅写 URL。不要使用 Markdown 链接语法,也不要重复展示 URL。随后立即执行 `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>` 持续轮询,不要等待用户回复;只有运行环境无法保活轮询进程时,才请用户完成授权后通知你。登录成功后向用户只回复“登录成功”。**
30
30
 
31
31
  查询厂商名册、核对指定成员的游戏权限、调整成员角色或查询变更历史,转[厂商成员与权限](../taptap-member/SKILL.md)。
32
32
 
@@ -39,9 +39,9 @@ metadata:
39
39
 
40
40
  **CRITICAL — `--yes` 只确认执行动作。服务端要求额外核对风险时,展示响应中实际返回的 `blockers` / `warnings`。签署协议前,单独展示协议名称和 URL 并取得用户明确同意,再按对应业务流程签署和回读。不得补造本地 flag 或请求字段。**
41
41
 
42
- **CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 发起授权。不要输出、记录或上报 access token。**
42
+ **CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 返回的裸 JSON 契约,并用响应中的完整恢复参数继续轮询。不要只用 `device_code` 重建命令,也不要输出、记录或上报 access token。**
43
43
 
44
- **登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
44
+ **登录链接交接 — 将 `verification_url` 按两行原样提供给用户:第一行仅写“请完成授权:”,第二行仅写 URL。不要使用 Markdown 链接语法,也不要重复展示 URL。随后立即执行 `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>` 持续轮询,不要等待用户回复;只有运行环境无法保活轮询进程时,才请用户完成授权后通知你。登录成功后向用户只回复“登录成功”。**
45
45
 
46
46
  ## 常用命令
47
47
 
@@ -212,6 +212,8 @@ HTTP 200 只表示 HTTP 请求成功。以顶层 `ok` 判断预检是否执行
212
212
 
213
213
  ### H. 版本历史回溯
214
214
 
215
+ 多 App 轮询中,某个 App 的 `list-versions` 返回 403 时,只暂停该 App,继续查询其余目标。核对本次 `--dev-id` 与 `--app-id` 的归属,以及调用账号在该 App 的 `apply_update` 权限。修正目标或恢复权限后再查询该 App。
216
+
215
217
  #### H-1. "上一版为什么被拒?" / "刚才那次提审什么结果?"
216
218
 
217
219
  ```bash
@@ -24,6 +24,8 @@ Skill 分析只用于资料准备建议。用户明确要求提审后,展示 `
24
24
 
25
25
  ### 文字字段
26
26
 
27
+ 按用户要展示文字的位置选模块。游戏简介读 `basic-info`,首页推荐语读 `profile-promotion`。在该 App 本次 `get-module` 返回的 `fields` 里确认字段和原值,再填入 `changes[].field_id` 和 `expected`。游戏简介使用 `description`,首页推荐语使用 `promotion_text`。
28
+
27
29
  | 用户怎么说 | 处理 |
28
30
  | --- | --- |
29
31
  | “改成 Y” / “就用这段” | 用户已给最终值,直接 `save-changes` 写入,不再包装候选 |
@@ -41,6 +43,8 @@ Skill 分析只用于资料准备建议。用户明确要求提审后,展示 `
41
43
 
42
44
  ### 保存失败与部分完成
43
45
 
46
+ - 批量发布时,用 `save-changes --dry-run` 校验字段名。若校验指出某个 `changes[i].field_id` 无效,按提示的合法值修正该项;完整清单可用 `taptap-cli schema app save-changes` 查看。保留已上传的图片回执和视频 ID,修正字段模板并重新预览。确认保存并读回后,再继续该 App 的包体或提审步骤。
47
+
44
48
  - 先区分缺少 `expected`、字段值漂移、字段约束不符与草稿不可编辑;不要把所有 conflict 都归因其他人修改。
45
49
  - conflict 或响应含 `stale` 时,重新读取受影响字段与当前草稿。目标值已经存在则报告“当前值已符合目标”,不重复写,也不声称刚才失败的请求完成了保存。
46
50
  - 409 的 `error_description` 会点名漂移字段的中文名;按 [field map](app-edit-field-map.md) 把它对到 `field_id` 与所属 `module_id`,再用 `get-app-module --data '{"module_id":...}'` 读该模块的 `current_value`,原样回填到对应 change 的 `expected`。同一目标再冲突一次就停止重试,报告观察到的状态,不要原样重发。`expected` 必须等于该字段当前的 `current_value`:字段当前为空时才能传 `null`,字段有值时传 `null` 会被服务端当作「缺 expected」并返回 409,需要按 `get-app-module` 的本次读数原样回填。
@@ -20,9 +20,14 @@ taptap-cli version # 查看当前 CLI 包版本(也支持 --version / -v
20
20
  taptap-cli update # 更新到最新 CLI 包版本(upgrade 同义)
21
21
  ```
22
22
 
23
- Agent 运行 `taptap-cli auth login --no-wait --json` 发起授权。根据响应展示 `data.verification_url`,随后把同一响应的 `data.device_code` 填入 `data.hint` 提供的续登命令。access token 只由 CLI 保存在本机凭证存储,不得进入日志、埋点或错误上报。链接展示和回复口径见[身份 Skill](../../taptap-identity/SKILL.md)。
24
-
25
- 遇到认证错误时先看 `error.type` / `error.subtype`。凭据缺失、过期或被拒绝时,按 `error.hint` 处理。HTTP 502 属于服务端或传输故障。
23
+ Agent 需要把登录拆成可恢复步骤时,使用 `taptap-cli auth login --no-wait --json`
24
+ 获取 `data.verification_url`、`data.device_code`、`data.expires_in`。展示话术、两行 URL 输出规则、轮询时机和“登录成功”回复口径以 `taptap-identity` 的登录规范为准,本文件不重复。
25
+ 恢复轮询命令为
26
+ `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>`。不要只拿 `device_code` 重建命令,因为恢复参数还包含 OAuth/Forge endpoint
27
+ 和 device code 过期时间。
28
+ access token 只由 CLI 保存到本机凭证存储,不得进入日志、埋点或错误上报。
29
+
30
+ 遇到认证错误时先看 `error.type` / `error.subtype`:凭证缺失、过期或被拒绝时,请用户运行 `taptap-cli auth login` 完成登录;CLI 不会自动重新登录。HTTP 502 属于服务端或传输故障,不能当作认证失效处理。
26
31
 
27
32
  ### 通用工具调用
28
33
 
@@ -24,9 +24,9 @@ identity 是所有业务 skill 的前置定位能力。它只确认登录态、
24
24
 
25
25
  身份发现中的页面入口优先使用本次 `app +list` / `overview` 每个游戏返回的 `page_url`;接口缺失时的规范地址推导按 [shared execution](../taptap-cli/references/shared-execution.md)「人工页面交接和链接输出」执行,推导入口必须标记为非服务端返回。
26
26
 
27
- **CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`。不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
27
+ **CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`,并用响应中的完整恢复参数继续轮询。不要只用 `device_code` 重建命令(恢复参数还包含 OAuth/Forge endpoint 和过期时间),不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
28
28
 
29
- **登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
29
+ **登录链接交接 — 将 `data.verification_url` 按两行原样提供给用户:第一行仅写“请完成授权:”,第二行仅写 URL。不要使用 Markdown 链接语法,也不要重复展示 URL。随后立即执行 `taptap-cli auth login --device-code <device_code> --expires-at-unix <data.expires_at> --interval-seconds <data.interval>` 持续轮询,不要等待用户回复;只有运行环境无法保活轮询进程时,才请用户完成授权后通知你。登录成功后向用户只回复“登录成功”。**
30
30
 
31
31
  查询厂商名册、核对指定成员的游戏权限、调整成员角色或查询变更历史,转[厂商成员与权限](../taptap-member/SKILL.md)。
32
32