@taptap/cli 2026.11.27 → 2026.11.29-beta.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/.claude-plugin/plugin.json +1 -1
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/bin/taptap-cli-darwin-amd64 +0 -0
- package/bin/taptap-cli-darwin-arm64 +0 -0
- package/bin/taptap-cli-linux-amd64 +0 -0
- package/bin/taptap-cli-linux-arm64 +0 -0
- package/bin/taptap-cli-linux-riscv64 +0 -0
- package/bin/taptap-cli-windows-amd64.exe +0 -0
- package/bin/taptap-cli-windows-arm64.exe +0 -0
- package/checksums.txt +7 -7
- package/package.json +1 -1
- package/scripts/bot/cli.mjs +41 -23
- package/scripts/bot/entry.cjs +9 -0
- package/scripts/bot/tap.mjs +34 -6
- package/scripts/claude-hooks/dispatch.mjs +1 -1
- package/scripts/claude-hooks/dispatch.test.mjs +1 -2
- package/scripts/run.js +3 -1
- package/skills/taptap-cli/SKILL.md +2 -2
- package/skills/taptap-cli/references/cli-command-patterns.md +3 -8
- package/skills/taptap-identity/SKILL.md +2 -2
- package/taptap-suite/SKILL.md +2 -2
- package/taptap-suite/references/taptap-cli/references/cli-command-patterns.md +3 -8
- package/taptap-suite/references/taptap-identity/SKILL.md +2 -2
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
|
|
126
|
+
> Run the command and send the returned login link to the user.
|
|
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
|
-
>
|
|
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.
|
|
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
|
+
> 用户已能看见链接时,执行返回的续登命令。如果宿主只显示最终回复或无法保活,先在最终回复中发送链接,等用户确认后续登。
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
package/package.json
CHANGED
package/scripts/bot/cli.mjs
CHANGED
|
@@ -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, servers } from "./tap.mjs";
|
|
11
|
+
import { login, loginBinding, assertLoginBinding, tap, nativeCli, nativeEnvironment, resolveBotProfile, 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,17 +59,12 @@ async function loadListener() {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
function config(v, requireBot = true) {
|
|
62
|
+
async 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
|
-
|
|
68
|
-
if (
|
|
69
|
-
!Object.hasOwn(servers, env) ||
|
|
70
|
-
!/^[A-Za-z0-9][\w.-]{0,63}$/.test(profile)
|
|
71
|
-
)
|
|
72
|
-
throw Error("环境或 profile 无效");
|
|
66
|
+
const env = v.env || "production";
|
|
67
|
+
if (!Object.hasOwn(servers, env)) throw Error("--env 需要 production 或 rnd");
|
|
73
68
|
if (env === "rnd" && !v.cli && requireBot === false)
|
|
74
69
|
throw Error("RND 登录需要 --cli 对应构建");
|
|
75
70
|
if (isCindyAgent(v.agent) && (v.permissions || v["allow-workspace-write"] || v.codex))
|
|
@@ -91,9 +86,10 @@ function config(v, requireBot = true) {
|
|
|
91
86
|
throw Error("工作区写入需要 --reply 和 --workspace");
|
|
92
87
|
if (v["replace-epoch"] && !positive(v["replace-epoch"]))
|
|
93
88
|
throw Error("epoch 必须是正整数");
|
|
89
|
+
const cli = v.cli && realpathSync(v.cli);
|
|
94
90
|
return {
|
|
95
91
|
env,
|
|
96
|
-
profile,
|
|
92
|
+
profile: await resolveBotProfile(cli, v.profile),
|
|
97
93
|
bot,
|
|
98
94
|
workspace,
|
|
99
95
|
reply: !!v.reply,
|
|
@@ -103,7 +99,7 @@ function config(v, requireBot = true) {
|
|
|
103
99
|
model: v.model,
|
|
104
100
|
replace: v["replace-epoch"],
|
|
105
101
|
personal: !!v.personal,
|
|
106
|
-
cli
|
|
102
|
+
cli,
|
|
107
103
|
agent: v.reply ? getAgent(v.agent).name : undefined,
|
|
108
104
|
agentOptions:
|
|
109
105
|
isCindyAgent(v.agent)
|
|
@@ -189,19 +185,24 @@ function summary(row) {
|
|
|
189
185
|
binding: row.credential ? JSON.parse(row.credential).binding_id : null,
|
|
190
186
|
};
|
|
191
187
|
}
|
|
192
|
-
export async function main(
|
|
193
|
-
|
|
194
|
-
|
|
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")
|
|
195
196
|
return console.log(help);
|
|
196
197
|
// A sidecar credential represents a proxy, not a reusable local account.
|
|
197
198
|
if (Object.entries(process.env).some(([key, value]) =>
|
|
198
199
|
key.toUpperCase() === "TAPTAP_CLI_AUTH_PROXY" && value?.trim()))
|
|
199
200
|
throw Error("机器人需要本机登录的账号,请在 TapTap 授权代理外运行");
|
|
200
|
-
if (
|
|
201
|
+
if (argv[0] === "__run") {
|
|
201
202
|
const listen = await loadListener();
|
|
202
203
|
const db = store();
|
|
203
204
|
try {
|
|
204
|
-
await listen(db,
|
|
205
|
+
await listen(db, argv[1], argv[2]);
|
|
205
206
|
} finally {
|
|
206
207
|
db.close();
|
|
207
208
|
}
|
|
@@ -231,13 +232,17 @@ export async function main(argv) {
|
|
|
231
232
|
"personal",
|
|
232
233
|
"retry-issue",
|
|
233
234
|
];
|
|
234
|
-
const { values: v } = parseArgs({
|
|
235
|
-
args,
|
|
235
|
+
const { values: v, positionals } = parseArgs({
|
|
236
|
+
args: argv,
|
|
237
|
+
allowPositionals: true,
|
|
236
238
|
options: Object.fromEntries([
|
|
237
239
|
...strings.map((k) => [k, { type: "string" }]),
|
|
238
240
|
...flags.map((k) => [k, { type: "boolean" }]),
|
|
239
241
|
]),
|
|
240
242
|
});
|
|
243
|
+
const [cmd] = positionals;
|
|
244
|
+
if (!cmd || cmd === "help") return console.log(help);
|
|
245
|
+
if (positionals.length > 1) throw Error("参数过多,请运行 taptap-cli bot --help");
|
|
241
246
|
if (v["bot-name"] !== undefined &&
|
|
242
247
|
(cmd !== "connect" || !v.reply || isCindyAgent(v.agent) || v.workspace || !v["bot-name"].trim()))
|
|
243
248
|
throw Error("--bot-name 仅用于 Codex 的默认项目,请提供机器人昵称");
|
|
@@ -277,7 +282,7 @@ export async function main(argv) {
|
|
|
277
282
|
return getAgent("codex").login({ executable: v.codex });
|
|
278
283
|
}
|
|
279
284
|
if (cmd === "list" || cmd === "login") {
|
|
280
|
-
const c = config(v, false);
|
|
285
|
+
const c = await config(v, false);
|
|
281
286
|
await login(c);
|
|
282
287
|
if (cmd === "list") {
|
|
283
288
|
const bots = [];
|
|
@@ -287,7 +292,7 @@ export async function main(argv) {
|
|
|
287
292
|
return;
|
|
288
293
|
}
|
|
289
294
|
if (cmd === "permissions") {
|
|
290
|
-
const c = config(v);
|
|
295
|
+
const c = await config(v);
|
|
291
296
|
await login(c);
|
|
292
297
|
c.loginBinding = await loginBinding(c);
|
|
293
298
|
if (v.agent === "cindy-plugin") return output({ agent: v.agent,
|
|
@@ -311,7 +316,8 @@ export async function main(argv) {
|
|
|
311
316
|
return output(
|
|
312
317
|
db.prepare("SELECT * FROM instances ORDER BY id").all().map(summary),
|
|
313
318
|
);
|
|
314
|
-
|
|
319
|
+
if (!["connect", "events", "stop"].includes(cmd)) throw Error("未知命令,请运行 taptap-cli bot --help");
|
|
320
|
+
const c = await config(v),
|
|
315
321
|
id = idOf(c);
|
|
316
322
|
let row = db.prepare("SELECT * FROM instances WHERE id=?").get(id);
|
|
317
323
|
if (cmd === "events") {
|
|
@@ -360,10 +366,22 @@ export async function main(argv) {
|
|
|
360
366
|
alive(db.prepare("SELECT pid FROM instances WHERE id=?").get(id)?.pid)
|
|
361
367
|
)
|
|
362
368
|
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
|
+
}
|
|
363
382
|
}
|
|
364
383
|
return output({ instance: id, status: "stopped" });
|
|
365
384
|
}
|
|
366
|
-
if (cmd !== "connect") throw Error("未知命令,请运行 taptap-cli bot --help");
|
|
367
385
|
if (alive(row?.pid)) {
|
|
368
386
|
await assertLoginBinding(JSON.parse(row.config));
|
|
369
387
|
const summary = runningSummary(row, c.agent, c.model, c.cindyPermission ?? c.permissionMode ?? (c.write ? "work" : undefined), c.workspace);
|
|
@@ -411,7 +429,7 @@ export async function main(argv) {
|
|
|
411
429
|
"community-bot",
|
|
412
430
|
"create-connection",
|
|
413
431
|
"--help",
|
|
414
|
-
]);
|
|
432
|
+
], { env: nativeEnvironment() });
|
|
415
433
|
if (!check.stdout.includes("--replace-epoch"))
|
|
416
434
|
throw Error("此 CLI 不支持个人绑定替换,请用 --cli 指定兼容构建");
|
|
417
435
|
}
|
package/scripts/bot/entry.cjs
CHANGED
|
@@ -14,3 +14,12 @@ 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
|
+
};
|
package/scripts/bot/tap.mjs
CHANGED
|
@@ -20,9 +20,27 @@ export const servers = {
|
|
|
20
20
|
"wss://api.xdrnd.com/community-bot/v2/connect",
|
|
21
21
|
],
|
|
22
22
|
};
|
|
23
|
-
export async function
|
|
24
|
-
|
|
25
|
-
|
|
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() {
|
|
26
44
|
const env = Object.fromEntries(
|
|
27
45
|
Object.entries(process.env).filter(
|
|
28
46
|
([k]) => !k.toUpperCase().startsWith("TAPTAP_CLI_"),
|
|
@@ -34,13 +52,19 @@ export async function tap(config, args, body, timeout) {
|
|
|
34
52
|
TAPTAP_CLI_NO_SKILLS_NOTIFIER: "1",
|
|
35
53
|
TAPTAP_CLI_NO_TELEMETRY: "1",
|
|
36
54
|
});
|
|
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();
|
|
37
62
|
if (config.loginBinding && ["create-connection", "get-content", "reply"].includes(args[1]))
|
|
38
63
|
env.TAPTAP_CLI_BOT_EXPECT_BINDING = config.loginBinding;
|
|
39
64
|
const result = await run(
|
|
40
65
|
file,
|
|
41
66
|
[
|
|
42
|
-
|
|
43
|
-
config.profile,
|
|
67
|
+
...selector,
|
|
44
68
|
...args,
|
|
45
69
|
...(body === undefined ? [] : ["--data", "-"]),
|
|
46
70
|
],
|
|
@@ -50,6 +74,10 @@ export async function tap(config, args, body, timeout) {
|
|
|
50
74
|
try {
|
|
51
75
|
response = JSON.parse(result.code === 0 ? result.stdout : result.stderr);
|
|
52
76
|
} 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
|
+
}
|
|
53
81
|
if (result.code !== 0 || !response?.ok) {
|
|
54
82
|
const err = response?.error;
|
|
55
83
|
const error = Error(
|
|
@@ -106,7 +134,7 @@ export async function login(c) {
|
|
|
106
134
|
Math.max(1000, d.expires_at * 1000 - Date.now() + 10000),
|
|
107
135
|
);
|
|
108
136
|
s = await tap(c, ["auth", "status", "--offline", "--json"]);
|
|
109
|
-
if (!s.hasAccessToken || s.accessTokenExpired
|
|
137
|
+
if (!s.hasAccessToken || s.accessTokenExpired)
|
|
110
138
|
throw Error("账号授权未完成");
|
|
111
139
|
return s;
|
|
112
140
|
}
|
|
@@ -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:
|
|
349
|
+
? `Offline auth: 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,7 +196,6 @@ 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",
|
|
200
199
|
credentialSource: "keychain",
|
|
201
200
|
hasAccessToken: true,
|
|
202
201
|
accessTokenExpired: false,
|
|
@@ -213,7 +212,7 @@ test("SessionStart is local, bounded by its caller, and performs no mutation", (
|
|
|
213
212
|
);
|
|
214
213
|
assert.equal(probes, 1);
|
|
215
214
|
assert.equal(startup.hookSpecificOutput.hookEventName, "SessionStart");
|
|
216
|
-
assert.match(startup.hookSpecificOutput.additionalContext, /Offline auth/);
|
|
215
|
+
assert.match(startup.hookSpecificOutput.additionalContext, /Offline auth: credential keychain, token present/);
|
|
217
216
|
assert.match(startup.hookSpecificOutput.additionalContext, /embedded 9/);
|
|
218
217
|
assert.match(startup.hookSpecificOutput.additionalContext, /No login, update, Skill installation/);
|
|
219
218
|
|
package/scripts/run.js
CHANGED
|
@@ -68,7 +68,9 @@ 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
|
-
|
|
71
|
+
const runBot = require("./bot/entry.cjs");
|
|
72
|
+
const botArgs = runBot.botArguments(args);
|
|
73
|
+
if (botArgs) return runBot(botArgs);
|
|
72
74
|
|
|
73
75
|
// Intercept "install" before native-binary dispatch: the JavaScript wizard
|
|
74
76
|
// is self-contained and does not need the native CLI.
|
|
@@ -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`
|
|
25
|
+
**CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 发起授权。不要输出、记录或上报 access token。**
|
|
26
26
|
|
|
27
|
-
**登录链接交接 — 将 `verification_url`
|
|
27
|
+
**登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
|
|
28
28
|
|
|
29
29
|
## 快速决策
|
|
30
30
|
|
|
@@ -20,14 +20,9 @@ taptap-cli version # 查看当前 CLI 包版本(也支持 --version / -v
|
|
|
20
20
|
taptap-cli update # 更新到最新 CLI 包版本(upgrade 同义)
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Agent
|
|
24
|
-
|
|
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 属于服务端或传输故障,不能当作认证失效处理。
|
|
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 属于服务端或传输故障。
|
|
31
26
|
|
|
32
27
|
### 通用工具调用
|
|
33
28
|
|
|
@@ -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
|
|
27
|
+
**CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`。不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
|
|
28
28
|
|
|
29
|
-
**登录链接交接 — 将 `data.verification_url`
|
|
29
|
+
**登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
|
|
30
30
|
|
|
31
31
|
查询厂商名册、核对指定成员的游戏权限、调整成员角色或查询变更历史,转[厂商成员与权限](../taptap-member/SKILL.md)。
|
|
32
32
|
|
package/taptap-suite/SKILL.md
CHANGED
|
@@ -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`
|
|
42
|
+
**CRITICAL — Agent 登录必须使用 `auth login --no-wait --json` 发起授权。不要输出、记录或上报 access token。**
|
|
43
43
|
|
|
44
|
-
**登录链接交接 — 将 `verification_url`
|
|
44
|
+
**登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
|
|
45
45
|
|
|
46
46
|
## 常用命令
|
|
47
47
|
|
|
@@ -20,14 +20,9 @@ taptap-cli version # 查看当前 CLI 包版本(也支持 --version / -v
|
|
|
20
20
|
taptap-cli update # 更新到最新 CLI 包版本(upgrade 同义)
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Agent
|
|
24
|
-
|
|
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 属于服务端或传输故障,不能当作认证失效处理。
|
|
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 属于服务端或传输故障。
|
|
31
26
|
|
|
32
27
|
### 通用工具调用
|
|
33
28
|
|
|
@@ -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
|
|
27
|
+
**CRITICAL — 未登录时使用 `taptap-cli auth login --no-wait --json`。不要输出、记录或上报 access token;token 只由 CLI 保存在本机凭证存储,不进入日志、埋点或错误上报。**
|
|
28
28
|
|
|
29
|
-
**登录链接交接 — 将 `data.verification_url`
|
|
29
|
+
**登录链接交接 — 将 `data.verification_url` 原样发给用户。第一行仅写“请完成授权:”,第二行仅写 URL。如果用户能在工具运行期间看见链接,发送后即可轮询。如果宿主只显示最终回复,或无法保活轮询,先用最终回复交付链接,等用户确认后再续登。续登时把同一回执的 `data.device_code` 填入 `data.hint` 的 `<device_code>`。登录成功后向用户只回复“登录成功”。**
|
|
30
30
|
|
|
31
31
|
查询厂商名册、核对指定成员的游戏权限、调整成员角色或查询变更历史,转[厂商成员与权限](../taptap-member/SKILL.md)。
|
|
32
32
|
|