dsh-shlr-bilitoolkit 0.1.30 → 0.1.31

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/AGENTS.md CHANGED
@@ -14,10 +14,5 @@
14
14
  2. 再 `bili_open({ group: "comment" })` 或直接 `bili_open({ tool: "bili_comment_list" })` 打开;
15
15
  3. **下一轮起**该组工具才可调用。同时最多保留 3 组,超出会关掉最久没用的——顺序使用不同领域时不受影响,只有频繁在 4+ 个领域间往返才需要重新开组。
16
16
 
17
- ## 多步查询走 run_code(省 token)
18
- 需要多个 B 站数据时(如「视频详情 + 热评 + UP主资料」),写进 `run_code` 一段代码里完成,不要连续调用多个工具:
19
- - 独立的只读调用用 `Promise.all` 并发;写操作保持逐条 `await`(串行,也避免风控)。
20
- - **只 `return` / `console.log` 你需要的字段**——中间工具的完整返回不会进对话,能大幅减少 token。
21
-
22
17
  ## 其它
23
18
  写操作(点赞 / 收藏 / 投币 / 关注 / 评论 / 私信 / 三连 / 发动态 / 改资料)会真实修改账号状态,执行前先与用户确认。
package/README.md CHANGED
@@ -88,7 +88,7 @@ const [ups, _] = await client.space.videos(574115689, 1, 10);
88
88
 
89
89
  ```bash
90
90
  dsh plugin --profile <name> add dsh-shlr-bilitoolkit # 已发布到 npm
91
- dsh plugin --profile <name> add github:your-name/dsh-shlr-bilitoolkit#<ref>
91
+ dsh plugin --profile <name> add github:shiodd/dsh-shlr-bilitoolkit#<ref>
92
92
  ```
93
93
 
94
94
  > 插件入口已对齐 **官方 DeepSeek Harness(cordis 体系)** 的约定:模块导出 `name` / `inject = ["tools"]` / `apply(ctx)`,并在 `apply` 内用官方 `ctx.tools.register(defineTool({ name, description, parameters, output, execute }))` 注册每个工具(`defineTool` 来自 `@deepseek-ai/dsh-tools`,由宿主提供、插件不打包,保证单实例)。`parameters` 用官方简化 schema(`{ 参数名: { type, required, description, enum? } }`),工具返回规范 JSON 值,由 `output.render` 转成面向模型的文本。`cordis.patch.yml` 是官方组合包配置层(`- insert: - id: bili name: dsh-shlr-bilitoolkit`,按包名解析到 `main` 入口)。若你的 dsh 版本较旧、没有 `ctx.tools`,`apply` 仍保留了 `ctx.registerTool` / `ctx.services.tools.register` 的回退路径。
package/dist/dsh.js CHANGED
@@ -1331,6 +1331,6 @@ export function apply(ctx) {
1331
1331
  }
1332
1332
  }
1333
1333
  // 同时导出库的全部公共 API(BiliClient / 各 API 类 / 模型等),
1334
- // 让 `import "dsh-bili-toolkit"` 既可作为插件入口,也可当普通库使用。
1334
+ // 让 `import "dsh-shlr-bilitoolkit"` 既可作为插件入口,也可当普通库使用。
1335
1335
  export * from "./index.js";
1336
1336
  export { BiliClient, Video, User, Page, PlayInfo, Subtitle, Collection };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /** dsh-bili-toolkit 对外导出入口。 */
1
+ /** dsh-shlr-bilitoolkit 对外导出入口。 */
2
2
  export { BiliClient, USER_AGENT, DEFAULT_HEADERS } from "./client.js";
3
3
  export type { BiliClientOptions } from "./client.js";
4
4
  export { BiliApiError, CaptchaRequired, CookieError, ERROR_HINTS, } from "./errors.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** dsh-bili-toolkit 对外导出入口。 */
1
+ /** dsh-shlr-bilitoolkit 对外导出入口。 */
2
2
  export { BiliClient, USER_AGENT, DEFAULT_HEADERS } from "./client.js";
3
3
  export { BiliApiError, CaptchaRequired, CookieError, ERROR_HINTS, } from "./errors.js";
4
4
  export { WbiSigner, mixinKey } from "./wbi.js";
@@ -0,0 +1,30 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "dsh-shlr-bilitoolkit",
4
+ "source": "community",
5
+ "displayName": "哔哩哔哩工具箱",
6
+ "description": "B站接口工具箱。可在dsh中作为工具调用。",
7
+ "descriptionZh": "B站接口工具箱。可在dsh中作为工具调用。",
8
+ "author": {
9
+ "name": "shiodd",
10
+ "url": "https://github.com/shiodd/dsh-shlr-bilitoolkit"
11
+ },
12
+ "links": {
13
+ "repo": "https://github.com/shiodd/dsh-shlr-bilitoolkit",
14
+ "docs": "https://github.com/shiodd/dsh-shlr-bilitoolkit#readme",
15
+ "npm": "dsh-shlr-bilitoolkit"
16
+ },
17
+ "license": "MIT",
18
+ "category": "tools",
19
+ "status": "beta",
20
+ "surfaces": ["server", "web"],
21
+ "install": {
22
+ "rows": [
23
+ { "npm": "dsh-shlr-bilitoolkit" }
24
+ ]
25
+ },
26
+ "verified": {
27
+ "at": "",
28
+ "packages": []
29
+ }
30
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-shlr-bilitoolkit",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "description": "深海猎人专用B站接口工具箱 dsh 插件。",
5
5
  "type": "module",
6
6
  "main": "dist/dsh.js",
@@ -12,6 +12,7 @@
12
12
  "files": [
13
13
  "dist",
14
14
  "cordis.patch.yml",
15
+ "dsh-manifest.json",
15
16
  "AGENTS.md"
16
17
  ],
17
18
  "scripts": {