YZz-S/dsh-bili-summary
dsh-plugin-bili-summary
DeepSeek Harness Host Plugin: bili_summary Tool - Bilibili Video Metadata, Subtitle Timeline, Sharp Frame Synchronization Images, Error Handling and Degradation Built-in, Cross-platform Pure Node Implementation
Install
npx @deepseek-ai/dsh plugin --profile web add github:YZz-S/dsh-bili-summaryRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/dsh-bili-summary)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from YZz-S/dsh-bili-summary, cleaned of badges and images.
bili-summary
DeepSeek Harness Host plugin: registers the model tool
bili_summary— a single call fetches a Bilibili video's metadata, subtitle timeline and optional image material (sharp frame extraction), letting the Agent produce structured summary notes with time-stamped jump links.DeepSeek Harness Host 插件:注册模型工具
bili_summary,一次调用取回 B 站视频的元数据、字幕时间轴与可选配图素材(sharp 切帧),供 Agent 生成带时间点跳转链接的结构化总结笔记。
English
中文 · ← Back to DeepSeekHarnessPlugins
Features
- One tool for the whole flow: the
videoinput accepts BV IDs,bilibili.com/video/links andb23.tvshort links (redirect auto-resolved) - Subtitles first: AI/human subtitle timeline → SRT cache; when subtitles are too long, writes a file and inlines only an excerpt — the model reads the rest with
readin segments - Optional images (only when the user explicitly asks for "with images"): cover + one representative frame per chapter, extracted by sharp from the player snapshot API, stored locally, referenced by relative paths
- Error handling is code behavior: Bilibili error-code mapping (-404/-412/-352/62002…), timeouts, exponential-backoff retries, automatic risk-control retries; business failures return structured JSON instead of throwing
- Progressive degradation: subtitles → "no subtitle" note; frame extraction → cover only → plain text — every degradation reason is returned to the model
- Cross-platform: pure Node (≥ 20.9), no shell calls, no encoding pitfalls; file-name sanitization handles Windows illegal characters and reserved names
- Multi-part videos: the
pageparameter switches parts, each part has its own cid; out-of-range returns the total part count
Installation (dsh.bundle)
This repo is also an installable dsh plugin package (package.json declares dsh.bundle, cordis.patch.yml declares the insertion row):
dsh plugin --profile web add github:YZz-S/dsh-bili-summary
After installation, start with dsh --profile web and the bili_summary tool mounts automatically; headless users switch the profile to headless. Notes:
dsh pluginforwards to pnpm internally (pnpm must be installed first); the profile is initialized automatically on first run;- If pnpm asks to approve build scripts, approving sharp enables frame extraction; you can also install without it — the plugin automatically degrades to "cover-only images";
- Row-level config (outputDir / cookie etc.) is overridden in the profile's own
cordis.patch.ymlunder the row idbili-summary.
Installation (agent preset row)
- Prepare your own DSH agent preset (user presets live in
${DSH_HOME}/.agent-presets/<id>/, composition fileagent.cordis.yml). - Put
bili-summary.jsinto the preset directory and add a row to the composition:
- id: tool-bili-summary
name: ./bili-summary.js
config:
outputDir: bili-output
(A full example is in examples/cordis.row.yml; this row only registers the tool in the host tools registry and publishes no services, so no isolate realm is needed.)
- sharp (optional): run
npm installinside the plugin directory tree. It works without it — automatically degrading to "cover-only images" and stating so in the result. - Validate the mount with
standingKeyFor(<preset-id>), then open a new session and confirmbili_summaryappears in the tool list.
Tool Parameters
…
