specific-ai-cli 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.en.md +177 -0
- package/README.ja.md +177 -0
- package/README.ko.md +177 -0
- package/README.md +174 -2
- package/README.zh-TW.md +177 -0
- package/assets/banner.txt +3 -0
- package/dist/cli/argv.js +98 -0
- package/dist/cli/commands/auth.js +11 -0
- package/dist/cli/commands/config.js +23 -0
- package/dist/cli/commands/doctor.js +134 -0
- package/dist/cli/commands/platforms.js +24 -0
- package/dist/cli/commands/version.js +4 -0
- package/dist/cli/confirm.js +22 -0
- package/dist/cli/dispatch.js +440 -0
- package/dist/cli/help.js +223 -0
- package/dist/cli/hints.js +60 -0
- package/dist/cli/main.js +18 -0
- package/dist/cli/output.js +66 -0
- package/dist/core/auth-handlers.js +41 -0
- package/dist/core/auth-store.js +119 -0
- package/dist/core/capabilities.js +163 -0
- package/dist/core/config.js +121 -0
- package/dist/core/cookies.js +164 -0
- package/dist/core/errors.js +37 -0
- package/dist/core/files.js +89 -0
- package/dist/core/fsutil.js +52 -0
- package/dist/core/hash.js +4 -0
- package/dist/core/http.js +331 -0
- package/dist/core/image.js +280 -0
- package/dist/core/log.js +40 -0
- package/dist/core/login.js +191 -0
- package/dist/core/mp4.js +130 -0
- package/dist/core/normalize.js +207 -0
- package/dist/core/options.js +110 -0
- package/dist/core/paths.js +38 -0
- package/dist/core/pb.js +59 -0
- package/dist/core/py.js +181 -0
- package/dist/core/rand.js +131 -0
- package/dist/core/registry.js +129 -0
- package/dist/core/schemas.js +41 -0
- package/dist/core/stream.js +104 -0
- package/dist/core/toolkit.js +35 -0
- package/dist/core/vm.js +73 -0
- package/dist/core/vocab.js +157 -0
- package/dist/platforms/_shared/impaas.js +410 -0
- package/dist/platforms/bilibili/index.js +216 -0
- package/dist/platforms/bilibili/web/api.js +806 -0
- package/dist/platforms/bilibili/web/client.js +311 -0
- package/dist/platforms/bilibili/web/commands.js +783 -0
- package/dist/platforms/bilibili/web/ddddocr.js +342 -0
- package/dist/platforms/bilibili/web/gaia.js +130 -0
- package/dist/platforms/bilibili/web/geetest-manual.js +154 -0
- package/dist/platforms/bilibili/web/geetest-vision.js +232 -0
- package/dist/platforms/bilibili/web/geetest.js +450 -0
- package/dist/platforms/bilibili/web/normalize.js +234 -0
- package/dist/platforms/bilibili/web/profile.js +135 -0
- package/dist/platforms/bilibili/web/resolve.js +112 -0
- package/dist/platforms/bilibili/web/sign.js +223 -0
- package/dist/platforms/bilibili/web/upos.js +102 -0
- package/dist/platforms/douyin/index.js +142 -0
- package/dist/platforms/douyin/web/api.js +863 -0
- package/dist/platforms/douyin/web/client.js +413 -0
- package/dist/platforms/douyin/web/commands.js +712 -0
- package/dist/platforms/douyin/web/creator.js +601 -0
- package/dist/platforms/douyin/web/crypto.js +247 -0
- package/dist/platforms/douyin/web/dtrait.js +190 -0
- package/dist/platforms/douyin/web/im.js +502 -0
- package/dist/platforms/douyin/web/image.js +5 -0
- package/dist/platforms/douyin/web/live.js +225 -0
- package/dist/platforms/douyin/web/mssdk.js +148 -0
- package/dist/platforms/douyin/web/normalize.js +326 -0
- package/dist/platforms/douyin/web/passport.js +1247 -0
- package/dist/platforms/douyin/web/profile.js +221 -0
- package/dist/platforms/douyin/web/proto.js +26 -0
- package/dist/platforms/douyin/web/resolve.js +88 -0
- package/dist/platforms/douyin/web/sign.js +436 -0
- package/dist/platforms/douyin/web/tos.js +78 -0
- package/dist/platforms/index.js +17 -0
- package/dist/platforms/jd/index.js +67 -0
- package/dist/platforms/jd/web/aks.js +115 -0
- package/dist/platforms/jd/web/api.js +549 -0
- package/dist/platforms/jd/web/chat.js +132 -0
- package/dist/platforms/jd/web/client.js +470 -0
- package/dist/platforms/jd/web/commands.js +557 -0
- package/dist/platforms/jd/web/jcap/helper.js +90 -0
- package/dist/platforms/jd/web/jcap/host.js +107 -0
- package/dist/platforms/jd/web/jcap/lsd.js +300 -0
- package/dist/platforms/jd/web/jcap/solver.js +995 -0
- package/dist/platforms/jd/web/jcap.js +150 -0
- package/dist/platforms/jd/web/js.js +420 -0
- package/dist/platforms/jd/web/login.js +775 -0
- package/dist/platforms/jd/web/normalize.js +297 -0
- package/dist/platforms/jd/web/profile.js +256 -0
- package/dist/platforms/jd/web/util.js +175 -0
- package/dist/platforms/jd/web/webm.js +133 -0
- package/dist/platforms/kuaishou/index.js +98 -0
- package/dist/platforms/kuaishou/web/api.js +694 -0
- package/dist/platforms/kuaishou/web/captcha-crypto.js +134 -0
- package/dist/platforms/kuaishou/web/captcha-fp.js +180 -0
- package/dist/platforms/kuaishou/web/captcha.js +273 -0
- package/dist/platforms/kuaishou/web/client.js +487 -0
- package/dist/platforms/kuaishou/web/commands.js +863 -0
- package/dist/platforms/kuaishou/web/gap.js +144 -0
- package/dist/platforms/kuaishou/web/gdfp.js +376 -0
- package/dist/platforms/kuaishou/web/gql.js +11 -0
- package/dist/platforms/kuaishou/web/live.js +125 -0
- package/dist/platforms/kuaishou/web/normalize.js +241 -0
- package/dist/platforms/kuaishou/web/oracle.js +329 -0
- package/dist/platforms/kuaishou/web/profile.js +259 -0
- package/dist/platforms/kuaishou/web/resolve.js +84 -0
- package/dist/platforms/kuaishou/web/session.js +592 -0
- package/dist/platforms/kuaishou/web/sign.js +568 -0
- package/dist/platforms/taobao/index.js +56 -0
- package/dist/platforms/taobao/web/api.js +96 -0
- package/dist/platforms/taobao/web/client.js +102 -0
- package/dist/platforms/taobao/web/commands.js +172 -0
- package/dist/platforms/taobao/web/im.js +68 -0
- package/dist/platforms/taobao/web/normalize.js +103 -0
- package/dist/platforms/taobao/web/profile.js +85 -0
- package/dist/platforms/taobao/web/resolve.js +51 -0
- package/dist/platforms/taobao/web/sign.js +35 -0
- package/dist/platforms/tiktok/index.js +120 -0
- package/dist/platforms/tiktok/web/api.js +1234 -0
- package/dist/platforms/tiktok/web/client.js +362 -0
- package/dist/platforms/tiktok/web/commands.js +821 -0
- package/dist/platforms/tiktok/web/im.js +133 -0
- package/dist/platforms/tiktok/web/jsrun.js +126 -0
- package/dist/platforms/tiktok/web/normalize.js +286 -0
- package/dist/platforms/tiktok/web/profile.js +169 -0
- package/dist/platforms/tiktok/web/resolve.js +156 -0
- package/dist/platforms/tiktok/web/sign.js +585 -0
- package/dist/platforms/tiktok/web/upload.js +805 -0
- package/dist/platforms/tiktok/web/wire.js +490 -0
- package/dist/platforms/weibo/index.js +91 -0
- package/dist/platforms/weibo/web/api.js +206 -0
- package/dist/platforms/weibo/web/client.js +155 -0
- package/dist/platforms/weibo/web/commands.js +202 -0
- package/dist/platforms/weibo/web/normalize.js +137 -0
- package/dist/platforms/weibo/web/profile.js +246 -0
- package/dist/platforms/weibo/web/resolve.js +60 -0
- package/dist/platforms/weibo/web/sign.js +85 -0
- package/dist/platforms/x/index.js +107 -0
- package/dist/platforms/x/web/api.js +443 -0
- package/dist/platforms/x/web/article.js +212 -0
- package/dist/platforms/x/web/client.js +202 -0
- package/dist/platforms/x/web/commands.js +363 -0
- package/dist/platforms/x/web/graphql.js +108 -0
- package/dist/platforms/x/web/normalize.js +235 -0
- package/dist/platforms/x/web/profile.js +99 -0
- package/dist/platforms/x/web/resolve.js +44 -0
- package/dist/platforms/x/web/transaction.js +171 -0
- package/dist/platforms/xhs/index.js +101 -0
- package/dist/platforms/xhs/web/api.js +278 -0
- package/dist/platforms/xhs/web/client.js +540 -0
- package/dist/platforms/xhs/web/commands.js +1046 -0
- package/dist/platforms/xhs/web/creator-api.js +609 -0
- package/dist/platforms/xhs/web/creator.js +203 -0
- package/dist/platforms/xhs/web/js.js +194 -0
- package/dist/platforms/xhs/web/login.js +230 -0
- package/dist/platforms/xhs/web/normalize.js +166 -0
- package/dist/platforms/xhs/web/profile.js +127 -0
- package/dist/platforms/xhs/web/push.js +361 -0
- package/dist/platforms/xhs/web/resolve.js +69 -0
- package/dist/platforms/xhs/web/state.js +368 -0
- package/dist/platforms/xianyu/index.js +59 -0
- package/dist/platforms/xianyu/web/api.js +312 -0
- package/dist/platforms/xianyu/web/client.js +134 -0
- package/dist/platforms/xianyu/web/commands.js +305 -0
- package/dist/platforms/xianyu/web/im.js +73 -0
- package/dist/platforms/xianyu/web/normalize.js +123 -0
- package/dist/platforms/xianyu/web/profile.js +146 -0
- package/dist/platforms/xianyu/web/resolve.js +48 -0
- package/dist/platforms/xianyu/web/sign.js +79 -0
- package/package.json +77 -4
- package/static/douyin/Live.proto +194 -0
- package/static/douyin/Request.proto +89 -0
- package/static/douyin/Response.proto +46 -0
- package/static/douyin/acrawler_runtime/ac_vm.js +2 -0
- package/static/douyin/acrawler_runtime/browser_window_shape.json +1 -0
- package/static/douyin/acrawler_runtime/canvas_actual_exact.json +1 -0
- package/static/douyin/acrawler_runtime/run_ac_node.js +1005 -0
- package/static/douyin/acrawler_runtime/runner_window_keys_baseline.txt +240 -0
- package/static/douyin/challenge_profile.json +801 -0
- package/static/douyin/challenge_template_runner.js +217 -0
- package/static/douyin/dtrait_profile.json +66 -0
- package/static/douyin/mstoken_common_profile.json +1 -0
- package/static/douyin/mstoken_profile.json +214 -0
- package/static/jd/h5st5_env.js +750 -0
- package/static/jd/h5st5_lib.js +5 -0
- package/static/jd/h5st5_server.js +49 -0
- package/static/jd/jcap/env/env_core.js +512 -0
- package/static/jd/jcap/env/run.js +1307 -0
- package/static/jd/jcap/run/jcap_ujb96b.js +39 -0
- package/static/jd/package.json +4 -0
- package/static/jd/pc_tk_lib.js +1 -0
- package/static/jd/pc_tk_server.js +63 -0
- package/static/jd/summer_cryptico_runner.js +50 -0
- package/static/jd/webm/env/run.js +453 -0
- package/static/jd/webm/run/jdwebm-riskhandle.js +49 -0
- package/static/kuaishou/bundles/weapon/kwf-0.0.2.2cee19b4b7dec496.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-0-0.0.1-obfuscated.4b7f3de1ab0ddcc2.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-1-0.0.1-obfuscated.346ebdb1c78df316.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-10-0.0.1-obfuscated.a33db41897b983af.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-11-0.0.1-obfuscated.5e0a90af726d8a7e.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-12-0.0.1-obfuscated.20ea29345706ec8c.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-13-0.0.1-obfuscated.6b74e9640ff18648.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-14-0.0.1-obfuscated.551e4429d156bf66.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-15-0.0.1-obfuscated.8625b087aaba4a60.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-16-0.0.1-obfuscated.d5ffa4020f3be99a.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-17-0.0.1-obfuscated.6d13e19b22f50a80.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-18-0.0.1-obfuscated.6d31405044166289.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-19-0.0.1-obfuscated.a9a8d925942f19e4.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-2-0.0.1-obfuscated.b849a136ae4a6b3e.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-3-0.0.1-obfuscated.f9e77ebf6186e2ac.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-4-0.0.1-obfuscated.2c3c155aa52ceb0e.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-5-0.0.1-obfuscated.4e553d17691b3c5a.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-6-0.0.1-obfuscated.f73ddd3ff13e1217.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-7-0.0.1-obfuscated.1628b8729beaab7e.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-8-0.0.1-obfuscated.6da6baef7aa81fff.js +1 -0
- package/static/kuaishou/bundles/weapon/kws-9-0.0.1-obfuscated.8645d55e5323b743.js +1 -0
- package/static/kuaishou/fixtures/current_follow_script_813.network-response +2 -0
- package/static/kuaishou/fixtures/live_ws_maps.json +61 -0
- package/static/kuaishou/fixtures/live_ws_proto.json +1342 -0
- package/static/kuaishou/js/cp-kwf.js +1 -0
- package/static/kuaishou/tools/kwf_oracle.js +799 -0
- package/static/kuaishou/tools/kws_oracle.js +885 -0
- package/static/kuaishou/tools/like_token_oracle.js +70 -0
- package/static/taobao/taobao_js_20260407.js +570 -0
- package/static/tiktok/Tiktok_Request.json +597 -0
- package/static/tiktok/package.json +3 -0
- package/static/tiktok/shop_bsid/core.js +1 -0
- package/static/tiktok/shop_bsid/env_core.js +512 -0
- package/static/tiktok/shop_bsid/loader.js +1 -0
- package/static/tiktok/shop_bsid/run.js +753 -0
- package/static/tiktok/shop_bsid/sign.js +100 -0
- package/static/tiktok/shop_bsid/webmssdk.js +1 -0
- package/static/tiktok/shop_bsid/webmssdk_ex.js +1 -0
- package/static/tiktok/signing/env/env_core.js +512 -0
- package/static/tiktok/signing/env/sign.js +455 -0
- package/static/tiktok/signing/sdk_config.json +230 -0
- package/static/tiktok/signing/source/webmssdk.js +1 -0
- package/static/tiktok/signing/source/webmssdk_ex.js +1 -0
- package/static/tiktok/signing/source/webmssdk_legacy.js +1 -0
- package/static/x/graphql.json +7777 -0
- package/static/x/transaction_l1.json +12 -0
- package/static/xhs/package.json +3 -0
- package/static/xhs/xhs_core/js/b1.js +210 -0
- package/static/xhs/xhs_core/js/mns.js +340 -0
- package/static/xhs/xhs_core/js/mns_0101_keystream.json +5 -0
- package/static/xhs/xhs_core/js/mns_keystreams.json +1 -0
- package/static/xhs/xhs_core/js/sign.js +225 -0
- package/static/xhs/xhs_core/js/websectiga_cli.js +220 -0
- package/static/xhs/xhs_core/js/websectiga_env.js +512 -0
- package/static/xhs/xhs_core/js/xs_common.js +79 -0
- package/static/xhs/xhs_creator/js/profile.js +115 -0
- package/static/xhs/xhs_creator/js/rap_fingerprint_creator.json +6 -0
- package/static/xhs/xhs_creator/js/reference_profile.json +282 -0
- package/static/xhs/xhs_creator/js/xhs_creator_sign.js +29 -0
- package/static/xhs/xhs_creator/js/xhs_creator_signature.js +23 -0
- package/static/xhs/xhs_pc/js/aes_decrypt.js +22 -0
- package/static/xhs/xhs_pc/js/aes_encrypt.js +30 -0
- package/static/xhs/xhs_pc/js/b1.js +9 -0
- package/static/xhs/xhs_pc/js/deflate.js +320 -0
- package/static/xhs/xhs_pc/js/mns.js +4 -0
- package/static/xhs/xhs_pc/js/profile.js +141 -0
- package/static/xhs/xhs_pc/js/rap.js +173 -0
- package/static/xhs/xhs_pc/js/rap_cli.js +30 -0
- package/static/xhs/xhs_pc/js/rap_crypto.js +73 -0
- package/static/xhs/xhs_pc/js/rap_fingerprint_template.json +8 -0
- package/static/xhs/xhs_pc/js/reference_profile.json +262 -0
- package/static/xhs/xhs_pc/js/sign.js +6 -0
- package/static/xhs/xhs_pc/js/web_ssk.js +82 -0
- package/static/xhs/xhs_pc/js/xs_common.js +4 -0
- package/static/xianyu/et_f.js +2 -0
- package/static/xianyu/gen_tfstk.js +410 -0
- package/static/xianyu/goofish_js_version_2.js +568 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CATEGORY, filter, PUBLISH, visibility } from '../../core/options.js';
|
|
3
|
+
import { definePlatform, handlers } from '../../core/registry.js';
|
|
4
|
+
import { VOCAB } from '../../core/vocab.js';
|
|
5
|
+
/** 懒加载 web 端的 handler:只有执行到这条命令时才加载实现。 */
|
|
6
|
+
const { h, impl } = handlers(() => import('./web/commands.js'));
|
|
7
|
+
const item = { name: 'item', summary: '稿件:BV 号、av 号或 URL' };
|
|
8
|
+
/** 评论区可以是稿件、专栏或动态,按参数形态识别(AGENTS 4.8:参数由平台归一化)。 */
|
|
9
|
+
const replyTarget = { name: 'item', summary: '稿件(BV 号、av 号、视频链接)、专栏(cv 号、专栏链接)或动态(动态链接、动态 ID;只支持纯文字和转发动态)' };
|
|
10
|
+
/** 动态的评论区(type 17)只对纯文字和转发动态成立,图文动态挂在相簿上,上游没有查相簿 ID 的接口。 */
|
|
11
|
+
const DYNAMIC_REPLY_NOTE = '动态只支持纯文字和转发:图文动态(带图)的评论区挂在相簿上,上游没有查相簿 ID 的接口;稿件、专栏不受影响';
|
|
12
|
+
/** 直播间参数也接受主播,按 get_room_by_mid 换成房间号。 */
|
|
13
|
+
const room = { name: 'room', summary: '直播间:房间号或 URL;也可以传主播(空间链接、uid:<mid>、me)' };
|
|
14
|
+
const draftId = { name: 'id', summary: '草稿 ID(article publish 返回的 id)' };
|
|
15
|
+
const FOLDER = z
|
|
16
|
+
.string()
|
|
17
|
+
.regex(/^\d+(,\d+)*$/, '收藏夹 id 是数字,多个用逗号分隔')
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('收藏夹 id,多个用逗号分隔;取值来自 folder list');
|
|
20
|
+
const withRoom = (rest = []) => ({ args: [room, ...(rest ?? [])] });
|
|
21
|
+
/** 弹幕样式(上游 send_danmaku 的 color / fontsize / mode),视频弹幕和直播弹幕共用。 */
|
|
22
|
+
const DANMAKU_STYLE = {
|
|
23
|
+
color: z
|
|
24
|
+
.string()
|
|
25
|
+
.regex(/^(#[0-9a-fA-F]{6}|\d+)$/, '格式为 #RRGGBB 或十进制数')
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('颜色:#RRGGBB 或十进制,默认白色'),
|
|
28
|
+
fontSize: z.number().int().positive().optional().describe('字号:18 小、25 标准(默认)'),
|
|
29
|
+
position: z.enum(['scroll', 'top', 'bottom']).optional().describe('位置:scroll 滚动(默认)、top 顶部、bottom 底部'),
|
|
30
|
+
};
|
|
31
|
+
const LIVE_STYLE_KEYS = ['color', 'fontSize', 'position', 'replyUser'];
|
|
32
|
+
function liveSendCheck(a, o) {
|
|
33
|
+
const base = VOCAB['live send'].check?.(a, o);
|
|
34
|
+
if (base)
|
|
35
|
+
return base;
|
|
36
|
+
if (o.gift != null && LIVE_STYLE_KEYS.some((k) => o[k] != null))
|
|
37
|
+
return '--color、--font-size、--position、--reply-user 只用于发弹幕,不能和 --gift 一起用';
|
|
38
|
+
}
|
|
39
|
+
export default definePlatform({
|
|
40
|
+
id: 'bilibili',
|
|
41
|
+
name: 'B 站',
|
|
42
|
+
aliases: ['bili', 'b'],
|
|
43
|
+
item: '稿件',
|
|
44
|
+
endpoints: {
|
|
45
|
+
web: {
|
|
46
|
+
login: { methods: ['qrcode', 'sms', 'password', 'cookie'], default: 'qrcode' },
|
|
47
|
+
logout: h('serverLogout'),
|
|
48
|
+
commands: {
|
|
49
|
+
'auth login': impl('full', 'authLogin'),
|
|
50
|
+
'auth status': impl('full', 'authStatus'),
|
|
51
|
+
'user get': impl('full', 'userGet'),
|
|
52
|
+
'user search': impl('full', 'userSearch'),
|
|
53
|
+
'user items': impl('full', 'userItems', {
|
|
54
|
+
options: { sort: filter.sort('latest', 'views', 'collects'), keyword: z.string().optional().describe('只看投稿里匹配关键词的') },
|
|
55
|
+
}),
|
|
56
|
+
'user collects': 'none',
|
|
57
|
+
'user followers': 'none',
|
|
58
|
+
'user following': 'none',
|
|
59
|
+
'user follow': 'none',
|
|
60
|
+
'user unfollow': 'none',
|
|
61
|
+
'item get': impl('full', 'itemGet'),
|
|
62
|
+
'item search': impl('full', 'itemSearch', {
|
|
63
|
+
options: { sort: filter.sort('general', 'views', 'latest', 'collects'), type: filter.type('video', 'article') },
|
|
64
|
+
}),
|
|
65
|
+
'item related': impl('full', 'itemRelated'),
|
|
66
|
+
'item list': impl('full', 'itemList'),
|
|
67
|
+
'item media': impl('full', 'itemMedia'),
|
|
68
|
+
'item download': impl('full', 'itemDownload'),
|
|
69
|
+
'item like': impl('full', 'itemLike'),
|
|
70
|
+
'item unlike': impl('full', 'itemUnlike'),
|
|
71
|
+
'item collect': impl('full', 'itemCollect', { options: { folder: FOLDER } }),
|
|
72
|
+
'item uncollect': impl('full', 'itemUncollect', { options: { folder: FOLDER } }),
|
|
73
|
+
'item publish': impl('full', 'itemPublish', {
|
|
74
|
+
supports: ['title', 'text', 'video', 'cover', 'tag', 'category', 'visibility'],
|
|
75
|
+
options: {
|
|
76
|
+
visibility: visibility('public', 'private'),
|
|
77
|
+
source: z.string().optional().describe('转载来源;给出时按转载投稿,不给为自制'),
|
|
78
|
+
dynamic: z.string().optional().describe('同步到动态的文案'),
|
|
79
|
+
allowReprint: z.boolean().optional().describe('允许转载,默认禁止'),
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
'item delete': impl('partial', 'itemDelete', { note: '需要人机验证(极验点选),specific-ai 还不能自动通过,会报 RISK_CONTROL' }),
|
|
83
|
+
'item categories': impl('full', 'itemCategories'),
|
|
84
|
+
'comment list': impl('partial', 'commentList', { note: DYNAMIC_REPLY_NOTE, args: [replyTarget], options: { sort: filter.sort('popular', 'latest') } }),
|
|
85
|
+
'comment replies': 'none',
|
|
86
|
+
'comment add': impl('partial', 'commentAdd', {
|
|
87
|
+
note: DYNAMIC_REPLY_NOTE,
|
|
88
|
+
args: [replyTarget, { name: 'text', summary: '评论内容' }],
|
|
89
|
+
options: { root: z.string().regex(/^\d+$/, '评论 ID 是数字').optional().describe('根评论 ID:回复楼中楼时用,--reply-to 给被回复的那条') },
|
|
90
|
+
check: (_a, o) => (o.root != null && o.replyTo == null ? '--root 要和 --reply-to 一起用' : undefined),
|
|
91
|
+
}),
|
|
92
|
+
'comment delete': impl('partial', 'commentDelete', { note: DYNAMIC_REPLY_NOTE, args: [replyTarget, { name: 'comment', summary: '评论 ID' }] }),
|
|
93
|
+
'comment like': 'none',
|
|
94
|
+
'comment unlike': 'none',
|
|
95
|
+
'feed list': impl('partial', 'feedList', {
|
|
96
|
+
note: 'following 规划中',
|
|
97
|
+
options: { kind: filter.kind('recommend', 'hot', 'following') },
|
|
98
|
+
}),
|
|
99
|
+
'live get': impl('full', 'liveGet', withRoom()),
|
|
100
|
+
'live list': 'none',
|
|
101
|
+
'live search': impl('full', 'liveSearch'),
|
|
102
|
+
'live categories': impl('full', 'liveCategories'),
|
|
103
|
+
'live listen': impl('full', 'liveListen', withRoom()),
|
|
104
|
+
'live history': impl('full', 'liveHistory', withRoom()),
|
|
105
|
+
'live send': impl('full', 'liveSend', {
|
|
106
|
+
...withRoom([{ name: 'text', summary: '弹幕内容', optional: true }]),
|
|
107
|
+
options: { ...DANMAKU_STYLE, replyUser: z.string().optional().describe('回复的观众:UID 或空间链接') },
|
|
108
|
+
check: liveSendCheck,
|
|
109
|
+
}),
|
|
110
|
+
'live like': 'none',
|
|
111
|
+
'live rank': 'none',
|
|
112
|
+
'live gifts': impl('full', 'liveGifts', withRoom()),
|
|
113
|
+
'live media': impl('full', 'liveMedia', withRoom()),
|
|
114
|
+
'live replays': 'none',
|
|
115
|
+
'live start': impl('full', 'liveStart', { options: { category: CATEGORY } }),
|
|
116
|
+
'live stop': impl('full', 'liveStop'),
|
|
117
|
+
'keyword suggest': 'none',
|
|
118
|
+
'keyword hot': 'none',
|
|
119
|
+
'notice list': 'none',
|
|
120
|
+
'notice count': 'none',
|
|
121
|
+
'msg list': 'none',
|
|
122
|
+
'msg history': 'none',
|
|
123
|
+
'msg send': 'none',
|
|
124
|
+
'msg listen': 'none',
|
|
125
|
+
'msg read': 'none',
|
|
126
|
+
'msg revoke': 'none',
|
|
127
|
+
'msg delete': 'none',
|
|
128
|
+
'media upload': impl('full', 'mediaUpload'),
|
|
129
|
+
'folder list': impl('partial', 'folderList', { note: '只列用户自己创建的收藏夹,一次返回全部' }),
|
|
130
|
+
'folder items': impl('partial', 'folderItems', {
|
|
131
|
+
note: '非上游:上游没有收藏夹内容接口,请求按网页端收藏夹页补的(x/v3/fav/resource/list),没有对拍;只列出稿件',
|
|
132
|
+
args: [{ name: 'folder', summary: '收藏夹:ID 或 folder list 输出的 url' }],
|
|
133
|
+
}),
|
|
134
|
+
'folder create': 'none',
|
|
135
|
+
'folder update': 'none',
|
|
136
|
+
'folder delete': 'none',
|
|
137
|
+
'series list': 'none',
|
|
138
|
+
'series items': 'none',
|
|
139
|
+
'history list': 'none',
|
|
140
|
+
'topic search': 'none',
|
|
141
|
+
// 平台扩展(AGENTS 4.7)
|
|
142
|
+
'item coin': {
|
|
143
|
+
upstream: 'full',
|
|
144
|
+
summary: '投币',
|
|
145
|
+
args: [item],
|
|
146
|
+
options: {
|
|
147
|
+
count: z.number().int().min(1).max(2).default(1).describe('投币数量,1 或 2'),
|
|
148
|
+
like: z.boolean().optional().describe('同时点赞'),
|
|
149
|
+
},
|
|
150
|
+
auth: 'required',
|
|
151
|
+
confirm: true,
|
|
152
|
+
output: '{id}',
|
|
153
|
+
handler: h('itemCoin'),
|
|
154
|
+
},
|
|
155
|
+
'item triple': { upstream: 'full', summary: '一键三连', args: [item], auth: 'required', confirm: true, output: '{id}', handler: h('itemTriple') },
|
|
156
|
+
'item subtitles': { upstream: 'full', summary: '字幕', args: [item], auth: 'required', output: 'Subtitle[]', handler: h('itemSubtitles') },
|
|
157
|
+
'danmaku list': { upstream: 'full', summary: '视频弹幕', args: [item], auth: 'required', output: 'Danmaku[]', handler: h('danmakuList') },
|
|
158
|
+
'danmaku send': {
|
|
159
|
+
upstream: 'full',
|
|
160
|
+
summary: '发视频弹幕',
|
|
161
|
+
args: [item, { name: 'text', summary: '弹幕内容' }],
|
|
162
|
+
options: { offset: z.number().nonnegative().describe('出现在视频的第几秒'), ...DANMAKU_STYLE },
|
|
163
|
+
auth: 'required',
|
|
164
|
+
output: '{id}',
|
|
165
|
+
handler: h('danmakuSend'),
|
|
166
|
+
},
|
|
167
|
+
'dynamic publish': {
|
|
168
|
+
upstream: 'full',
|
|
169
|
+
summary: '发动态',
|
|
170
|
+
args: [],
|
|
171
|
+
options: { text: z.string().describe('正文,@file 表示从文件读取'), image: PUBLISH.image },
|
|
172
|
+
auth: 'required',
|
|
173
|
+
output: '{id url}',
|
|
174
|
+
handler: h('dynamicPublish'),
|
|
175
|
+
},
|
|
176
|
+
'dynamic delete': {
|
|
177
|
+
upstream: 'full',
|
|
178
|
+
summary: '删动态',
|
|
179
|
+
args: [{ name: 'id', summary: '动态:ID 或链接(dynamic publish 输出的 id、url)' }],
|
|
180
|
+
auth: 'required',
|
|
181
|
+
confirm: true,
|
|
182
|
+
output: '{id}',
|
|
183
|
+
handler: h('dynamicDelete'),
|
|
184
|
+
},
|
|
185
|
+
'article publish': {
|
|
186
|
+
upstream: 'full',
|
|
187
|
+
summary: '发专栏:先存草稿,再提交',
|
|
188
|
+
args: [],
|
|
189
|
+
options: {
|
|
190
|
+
title: z.string().describe('标题'),
|
|
191
|
+
text: z.string().describe('正文(HTML),@file 表示从文件读取'),
|
|
192
|
+
category: z.string().regex(/^\d+$/, '专栏分区 ID 是数字').optional().describe('专栏分区 ID(数字),默认 0;specific-ai 没有专栏分区列表命令'),
|
|
193
|
+
tag: PUBLISH.tag,
|
|
194
|
+
summary: z.string().optional().describe('摘要'),
|
|
195
|
+
draft: z.boolean().optional().describe('只存草稿,不提交'),
|
|
196
|
+
},
|
|
197
|
+
auth: 'required',
|
|
198
|
+
output: '{id url}',
|
|
199
|
+
handler: h('articlePublish'),
|
|
200
|
+
},
|
|
201
|
+
'draft get': { upstream: 'full', summary: '专栏草稿', args: [draftId], auth: 'required', output: 'Item', handler: h('draftGet') },
|
|
202
|
+
'draft delete': {
|
|
203
|
+
upstream: 'full',
|
|
204
|
+
summary: '删专栏草稿',
|
|
205
|
+
args: [draftId],
|
|
206
|
+
auth: 'required',
|
|
207
|
+
confirm: true,
|
|
208
|
+
output: '{id}',
|
|
209
|
+
handler: h('draftDelete'),
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
app: 'planned',
|
|
214
|
+
pc: 'planned',
|
|
215
|
+
},
|
|
216
|
+
});
|