@bili-agent-kit/cli 0.0.0-stage → 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ALTERSSSS
4
+ Copyright (c) 2026 Cansiny0320 (bili-agent-kit modifications)
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,7 @@
1
+ # Third-party notices
2
+
3
+ See LICENSE for copyright notices and MIT license terms.
4
+
5
+ This is an independent, unofficial tool. Bilibili does not endorse or maintain it. Bilibili web interfaces may change without notice.
6
+
7
+ ffmpeg is optional, separately installed, and not bundled. Its own LGPL/GPL terms depend on the chosen build: https://ffmpeg.org/legal.html. Node.js, Zod, MCP SDK, TypeScript, pnpm and Vite+ retain their respective licenses. The sponsorship image in the repository is reused from Cansiny0320/Nexlet at the owner's request; it is not included in the npm packages.
package/README.md CHANGED
@@ -1,3 +1,27 @@
1
- # Temporary Holding Version
1
+ # @bili-agent-kit/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ JSON command line interface for discovery, content, media, events, approved writes and trusted account administration for bili-agent-kit. ESM; requires Node.js 22.18+, 24.11+ or 26+ (Node 23/25 unsupported).
4
+
5
+ ```sh
6
+ npx --yes @bili-agent-kit/cli@0.2.0 help
7
+ npx --yes @bili-agent-kit/cli@0.2.0 --config ./config.local.json auth.login '{}'
8
+ npx --yes @bili-agent-kit/cli@0.2.0 --config ./config.local.json auth.status '{}'
9
+ ```
10
+
11
+ Create `config.local.json` before login:
12
+
13
+ ```json
14
+ {
15
+ "version": 1,
16
+ "stateDir": "./.bili-agent-kit",
17
+ "credentialsFile": "./credentials.local.json"
18
+ }
19
+ ```
20
+
21
+ Scan with the Bilibili app and confirm on your phone. QR/progress goes to stderr; stdout contains JSON. Login can save a PNG with `'{"png":"login-qr.png"}'`. Credentials are stored as a local plaintext file with restricted permissions; failed login preserves the previous file. `auth.logout '{}'` removes only local credentials, preserving history and other devices' sessions.
22
+
23
+ `help` lists the shared operation schemas. Trusted commands also include `auth.refresh-check` and `auth.refresh`; refresh is explicit, not scheduled. New interactions and open-platform submissions require action and target allowlists. Open-platform credentials are independent from QR login.
24
+
25
+ Writes are disabled by default. Administrator commands must be separated from model-controlled shell access. See [operations/configuration](https://github.com/Cansiny0320/bili-agent-kit/blob/main/docs/usage.md) and [security/recovery](https://github.com/Cansiny0320/bili-agent-kit/blob/main/SECURITY.md).
26
+
27
+ MIT; see LICENSE and NOTICE.md. Not affiliated with Bilibili.
@@ -0,0 +1,9 @@
1
+ import { BiliKit, Envelope, FileAuth } from "@bili-agent-kit/core";
2
+ interface AuthCliOptions {
3
+ load?: (path: string) => Promise<FileAuth>;
4
+ stderr?: (text: string) => void;
5
+ signal?: AbortSignal;
6
+ }
7
+ export declare function runCli(argv: string[], stdin: () => Promise<string>, load?: (path: string) => Promise<BiliKit>, authOptions?: AuthCliOptions): Promise<Envelope<unknown>>;
8
+ export {};
9
+ //# sourceMappingURL=index.d.mts.map
package/dist/index.mjs ADDED
@@ -0,0 +1 @@
1
+ export { t as runCli } from "./src-Bz4kcLrS.mjs";
@@ -0,0 +1 @@
1
+ export {}
package/dist/main.mjs ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ import { t as runCli } from "./src-Bz4kcLrS.mjs";
3
+ // src/main.ts
4
+ const controller = new AbortController();
5
+ const cancel = () => {
6
+ controller.abort();
7
+ };
8
+ if (process.argv.includes("auth.login")) {
9
+ process.on("SIGINT", cancel);
10
+ process.on("SIGTERM", cancel);
11
+ }
12
+ const result = await runCli(process.argv.slice(2), async () => {
13
+ const chunks = [];
14
+ let size = 0;
15
+ for await (const chunk of process.stdin) {
16
+ const buffer = Buffer.from(chunk);
17
+ size += buffer.length;
18
+ if (size > 1048576) throw new Error("Input limit");
19
+ chunks.push(buffer);
20
+ }
21
+ return Buffer.concat(chunks).toString("utf8");
22
+ }, void 0, { signal: controller.signal });
23
+ process.removeListener("SIGINT", cancel);
24
+ process.removeListener("SIGTERM", cancel);
25
+ process.stdout.write(`${JSON.stringify(result)}\n`);
26
+ process.exitCode = result.ok ? 0 : result.error.code === "CANCELLED" ? 130 : result.error.code === "INVALID_INPUT" ? 2 : 1;
27
+ export {};
28
+
29
+ //# sourceMappingURL=main.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.mjs","names":[],"sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { runCli } from \"./index.js\";\nconst controller = new AbortController();\nconst cancel = () => {\n controller.abort();\n};\nif (process.argv.includes(\"auth.login\")) {\n process.on(\"SIGINT\", cancel);\n process.on(\"SIGTERM\", cancel);\n}\nconst result = await runCli(\n process.argv.slice(2),\n async () => {\n const chunks: Buffer[] = [];\n let size = 0;\n for await (const chunk of process.stdin) {\n const buffer = Buffer.from(chunk as Uint8Array);\n size += buffer.length;\n if (size > 1024 * 1024) throw new Error(\"Input limit\");\n chunks.push(buffer);\n }\n return Buffer.concat(chunks).toString(\"utf8\");\n },\n undefined,\n { signal: controller.signal },\n);\nprocess.removeListener(\"SIGINT\", cancel);\nprocess.removeListener(\"SIGTERM\", cancel);\nprocess.stdout.write(`${JSON.stringify(result)}\\n`);\nprocess.exitCode = result.ok\n ? 0\n : result.error.code === \"CANCELLED\"\n ? 130\n : result.error.code === \"INVALID_INPUT\"\n ? 2\n : 1;\n"],"mappings":";;;AAEA,MAAM,aAAa,IAAI,gBAAgB;AACvC,MAAM,eAAe;CACnB,WAAW,MAAM;AACnB;AACA,IAAI,QAAQ,KAAK,SAAS,YAAY,GAAG;CACvC,QAAQ,GAAG,UAAU,MAAM;CAC3B,QAAQ,GAAG,WAAW,MAAM;AAC9B;AACA,MAAM,SAAS,MAAM,OACnB,QAAQ,KAAK,MAAM,CAAC,GACpB,YAAY;CACV,MAAM,SAAmB,CAAC;CAC1B,IAAI,OAAO;CACX,WAAW,MAAM,SAAS,QAAQ,OAAO;EACvC,MAAM,SAAS,OAAO,KAAK,KAAmB;EAC9C,QAAQ,OAAO;EACf,IAAI,OAAO,SAAa,MAAM,IAAI,MAAM,aAAa;EACrD,OAAO,KAAK,MAAM;CACpB;CACA,OAAO,OAAO,OAAO,MAAM,CAAC,CAAC,SAAS,MAAM;AAC9C,GACA,KAAA,GACA,EAAE,QAAQ,WAAW,OAAO,CAC9B;AACA,QAAQ,eAAe,UAAU,MAAM;AACvC,QAAQ,eAAe,WAAW,MAAM;AACxC,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,MAAM,EAAE,GAAG;AAClD,QAAQ,WAAW,OAAO,KACtB,IACA,OAAO,MAAM,SAAS,cACpB,MACA,OAAO,MAAM,SAAS,kBACpB,IACA"}
@@ -0,0 +1,113 @@
1
+ import { FileStore, KitError, describeOperations, envelope, invoke, loadAuth, loadKit, writePrivateFile } from "@bili-agent-kit/core";
2
+ import QRCode from "qrcode";
3
+ import { resolve } from "node:path";
4
+ // src/auth.ts
5
+ async function runAuthCli(config, name, input, options = {}) {
6
+ if (!input || typeof input !== "object" || Array.isArray(input)) throw new KitError("INVALID_INPUT", "Auth input must be an object.");
7
+ const args = input;
8
+ if (![
9
+ "auth.login",
10
+ "auth.status",
11
+ "auth.logout",
12
+ "auth.refresh-check",
13
+ "auth.refresh"
14
+ ].includes(name) || Object.keys(args).some((k) => name !== "auth.login" || k !== "png") || args.png !== void 0 && (typeof args.png !== "string" || !args.png.length)) throw new KitError("INVALID_INPUT", "Use auth.login {\"png\":\"optional-new-file.png\"}, auth.status {} or auth.logout {}.");
15
+ const auth = await (options.load ?? loadAuth)(config);
16
+ if (name === "auth.refresh-check") return auth.refreshCheck(options.signal);
17
+ if (name === "auth.refresh") return auth.refresh(options.signal);
18
+ if (name === "auth.status") return auth.status(options.signal);
19
+ if (name === "auth.logout") return auth.logout();
20
+ if (typeof args.png === "string") {
21
+ const normalize = (path) => process.platform === "win32" ? resolve(path).toLowerCase() : resolve(path);
22
+ const reserved = [
23
+ config,
24
+ auth.credentials.path,
25
+ `${auth.credentials.path}.lock`
26
+ ];
27
+ if (auth.store instanceof FileStore) reserved.push(resolve(auth.store.directory, "state.json"), resolve(auth.store.directory, "state.json.lock"));
28
+ if (reserved.some((path) => normalize(path) === normalize(args.png))) throw new KitError("INVALID_INPUT", "Choose a PNG path separate from configuration, credentials and state.");
29
+ }
30
+ const stderr = options.stderr ?? ((text) => {
31
+ process.stderr.write(text);
32
+ });
33
+ let previous = "";
34
+ return auth.login({
35
+ ...options.signal ? { signal: options.signal } : {},
36
+ onQr: async (qr) => {
37
+ if (typeof args.png === "string") {
38
+ const path = resolve(args.png);
39
+ await writePrivateFile(path, await QRCode.toBuffer(qr.url, {
40
+ type: "png",
41
+ margin: 4,
42
+ scale: 6
43
+ }));
44
+ stderr(`二维码已保存到 ${path}\n`);
45
+ }
46
+ stderr(await QRCode.toString(qr.url, {
47
+ type: "terminal",
48
+ small: true
49
+ }));
50
+ stderr("请用哔哩哔哩 App 扫码并在手机上确认。Ctrl+C 取消。\n");
51
+ },
52
+ onStatus: (status) => {
53
+ if (previous === status) return;
54
+ previous = status;
55
+ stderr(status === "scanned" ? "已扫码,等待手机确认。\n" : "等待扫码。\n");
56
+ }
57
+ });
58
+ }
59
+ // src/index.ts
60
+ async function runCli(argv, stdin, load = loadKit, authOptions = {}) {
61
+ if (argv.length === 1 && [
62
+ "help",
63
+ "--help",
64
+ "list"
65
+ ].includes(argv[0] ?? "")) return {
66
+ version: 1,
67
+ ok: true,
68
+ data: {
69
+ usage: "bili-agent --config config.local.json <operation|auth.login|auth.status|auth.logout|auth.refresh-check|auth.refresh|admin.approve|admin.reconcile|admin.resume> <JSON|->",
70
+ auth: {
71
+ "auth.login": { png: "optional new PNG path" },
72
+ "auth.status": {},
73
+ "auth.logout": {},
74
+ "auth.refresh-check": {},
75
+ "auth.refresh": {}
76
+ },
77
+ operations: describeOperations()
78
+ }
79
+ };
80
+ return envelope(async () => {
81
+ if (argv[0] !== "--config" || !argv[1] || !argv[2] || argv.length !== 4) throw new KitError("INVALID_INPUT", "Expected --config <file> <operation> <JSON|->. Use help for schemas.");
82
+ const [, , name, argument] = argv;
83
+ const raw = argument === "-" ? await stdin() : argument ?? "";
84
+ if (raw.length > 1048576) throw new KitError("INVALID_INPUT", "JSON input exceeds 1 MiB.");
85
+ let input;
86
+ try {
87
+ input = JSON.parse(raw);
88
+ } catch {
89
+ throw new KitError("INVALID_INPUT", "Input must be valid JSON.");
90
+ }
91
+ if (name?.startsWith("auth.")) return runAuthCli(argv[1], name, input, authOptions);
92
+ const kit = await load(argv[1]);
93
+ if (name?.startsWith("admin.")) {
94
+ if (!input || typeof input !== "object" || Array.isArray(input)) throw new KitError("INVALID_INPUT", "Admin input must be an object.");
95
+ const obj = input;
96
+ const exact = (keys) => Object.keys(obj).length === keys.length && keys.every((k) => typeof obj[k] === "string");
97
+ if (name === "admin.approve" && exact([
98
+ "draftId",
99
+ "digest",
100
+ "by"
101
+ ])) return kit.admin.approve(String(obj.draftId), String(obj.digest), String(obj.by));
102
+ if (name === "admin.reconcile" && exact(["draftId", "outcome"]) && (obj.outcome === "sent" || obj.outcome === "not-sent")) return kit.admin.reconcile(String(obj.draftId), obj.outcome);
103
+ if (name === "admin.resume" && exact([])) return kit.admin.resumeAccount();
104
+ throw new KitError("INVALID_INPUT", "Unknown administrator command or invalid arguments.");
105
+ }
106
+ const result = await invoke(kit, name ?? "", input);
107
+ if (!result.ok) throw new KitError(result.error.code, result.error.message);
108
+ return result.data;
109
+ });
110
+ }
111
+ export { runCli as t };
112
+
113
+ //# sourceMappingURL=src-Bz4kcLrS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"src-Bz4kcLrS.mjs","names":[],"sources":["../src/auth.ts","../src/index.ts"],"sourcesContent":["import QRCode from \"qrcode\";\nimport { resolve } from \"node:path\";\nimport {\n loadAuth,\n writePrivateFile,\n KitError,\n FileStore,\n type FileAuth,\n} from \"@bili-agent-kit/core\";\n\nexport interface AuthCliOptions {\n load?: (path: string) => Promise<FileAuth>;\n stderr?: (text: string) => void;\n signal?: AbortSignal;\n}\nexport async function runAuthCli(\n config: string,\n name: string,\n input: unknown,\n options: AuthCliOptions = {},\n): Promise<unknown> {\n if (!input || typeof input !== \"object\" || Array.isArray(input))\n throw new KitError(\"INVALID_INPUT\", \"Auth input must be an object.\");\n const args = input as Record<string, unknown>;\n if (\n ![\"auth.login\", \"auth.status\", \"auth.logout\", \"auth.refresh-check\", \"auth.refresh\"].includes(\n name,\n ) ||\n Object.keys(args).some((k) => name !== \"auth.login\" || k !== \"png\") ||\n (args.png !== undefined && (typeof args.png !== \"string\" || !args.png.length))\n )\n throw new KitError(\n \"INVALID_INPUT\",\n 'Use auth.login {\"png\":\"optional-new-file.png\"}, auth.status {} or auth.logout {}.',\n );\n const auth = await (options.load ?? loadAuth)(config);\n if (name === \"auth.refresh-check\") return auth.refreshCheck(options.signal);\n if (name === \"auth.refresh\") return auth.refresh(options.signal);\n if (name === \"auth.status\") return auth.status(options.signal);\n if (name === \"auth.logout\") return auth.logout();\n if (typeof args.png === \"string\") {\n const normalize = (path: string) =>\n process.platform === \"win32\" ? resolve(path).toLowerCase() : resolve(path);\n const reserved = [config, auth.credentials.path, `${auth.credentials.path}.lock`];\n if (auth.store instanceof FileStore)\n reserved.push(\n resolve(auth.store.directory, \"state.json\"),\n resolve(auth.store.directory, \"state.json.lock\"),\n );\n if (reserved.some((path) => normalize(path) === normalize(args.png as string)))\n throw new KitError(\n \"INVALID_INPUT\",\n \"Choose a PNG path separate from configuration, credentials and state.\",\n );\n }\n const stderr =\n options.stderr ??\n ((text) => {\n process.stderr.write(text);\n });\n let previous = \"\";\n return auth.login({\n ...(options.signal ? { signal: options.signal } : {}),\n onQr: async (qr) => {\n if (typeof args.png === \"string\") {\n const path = resolve(args.png);\n await writePrivateFile(\n path,\n await QRCode.toBuffer(qr.url, { type: \"png\", margin: 4, scale: 6 }),\n );\n stderr(`二维码已保存到 ${path}\\n`);\n }\n stderr(await QRCode.toString(qr.url, { type: \"terminal\", small: true }));\n stderr(\"请用哔哩哔哩 App 扫码并在手机上确认。Ctrl+C 取消。\\n\");\n },\n onStatus: (status) => {\n if (previous === status) return;\n previous = status;\n stderr(status === \"scanned\" ? \"已扫码,等待手机确认。\\n\" : \"等待扫码。\\n\");\n },\n });\n}\n","import {\n loadKit,\n invoke,\n describeOperations,\n envelope,\n KitError,\n type BiliKit,\n type Envelope,\n} from \"@bili-agent-kit/core\";\nimport { runAuthCli, type AuthCliOptions } from \"./auth.js\";\n\nexport async function runCli(\n argv: string[],\n stdin: () => Promise<string>,\n load: (path: string) => Promise<BiliKit> = loadKit,\n authOptions: AuthCliOptions = {},\n): Promise<Envelope<unknown>> {\n if (argv.length === 1 && [\"help\", \"--help\", \"list\"].includes(argv[0] ?? \"\"))\n return {\n version: 1,\n ok: true,\n data: {\n usage:\n \"bili-agent --config config.local.json <operation|auth.login|auth.status|auth.logout|auth.refresh-check|auth.refresh|admin.approve|admin.reconcile|admin.resume> <JSON|->\",\n auth: {\n \"auth.login\": { png: \"optional new PNG path\" },\n \"auth.status\": {},\n \"auth.logout\": {},\n \"auth.refresh-check\": {},\n \"auth.refresh\": {},\n },\n operations: describeOperations(),\n },\n };\n return envelope(async () => {\n if (argv[0] !== \"--config\" || !argv[1] || !argv[2] || argv.length !== 4)\n throw new KitError(\n \"INVALID_INPUT\",\n \"Expected --config <file> <operation> <JSON|->. Use help for schemas.\",\n );\n const [, , name, argument] = argv;\n const raw = argument === \"-\" ? await stdin() : (argument ?? \"\");\n if (raw.length > 1024 * 1024) throw new KitError(\"INVALID_INPUT\", \"JSON input exceeds 1 MiB.\");\n let input: unknown;\n try {\n input = JSON.parse(raw);\n } catch {\n throw new KitError(\"INVALID_INPUT\", \"Input must be valid JSON.\");\n }\n if (name?.startsWith(\"auth.\")) return runAuthCli(argv[1], name, input, authOptions);\n const kit = await load(argv[1]);\n if (name?.startsWith(\"admin.\")) {\n if (!input || typeof input !== \"object\" || Array.isArray(input))\n throw new KitError(\"INVALID_INPUT\", \"Admin input must be an object.\");\n const obj = input as Record<string, unknown>;\n const exact = (keys: string[]) =>\n Object.keys(obj).length === keys.length && keys.every((k) => typeof obj[k] === \"string\");\n if (name === \"admin.approve\" && exact([\"draftId\", \"digest\", \"by\"]))\n return kit.admin.approve(String(obj.draftId), String(obj.digest), String(obj.by));\n if (\n name === \"admin.reconcile\" &&\n exact([\"draftId\", \"outcome\"]) &&\n (obj.outcome === \"sent\" || obj.outcome === \"not-sent\")\n )\n return kit.admin.reconcile(String(obj.draftId), obj.outcome);\n if (name === \"admin.resume\" && exact([])) return kit.admin.resumeAccount();\n throw new KitError(\"INVALID_INPUT\", \"Unknown administrator command or invalid arguments.\");\n }\n const result = await invoke(kit, name ?? \"\", input);\n if (!result.ok) throw new KitError(result.error.code, result.error.message);\n return result.data;\n });\n}\n"],"mappings":";;;;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- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "description": "JSON CLI for bili-agent-kit",
5
+ "homepage": "https://github.com/Cansiny0320/bili-agent-kit#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/Cansiny0320/bili-agent-kit/issues"
8
+ },
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/Cansiny0320/bili-agent-kit.git",
13
+ "directory": "packages/cli"
14
+ },
15
+ "bin": {
16
+ "bili-agent": "dist/main.mjs"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "LICENSE",
21
+ "NOTICE.md"
22
+ ],
23
+ "type": "module",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.mts",
27
+ "import": "./dist/index.mjs"
28
+ }
29
+ },
30
+ "publishConfig": {
31
+ "access": "public",
32
+ "registry": "https://registry.npmjs.org/"
33
+ },
34
+ "dependencies": {
35
+ "@bili-agent-kit/core": "0.2.0",
36
+ "qrcode": "1.5.4"
37
+ },
38
+ "engines": {
39
+ "node": "^22.18.0 || ^24.11.0 || >=26.0.0"
40
+ },
41
+ "scripts": {
42
+ "build": "vp pack"
43
+ }
6
44
  }