Embeds the acgay music site as a DSH side panel with search, a global mini player, and optional import of missing tracks into acgay when an import token is configured. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:fishcg/dsh-music
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
A DeepSeek Harness (DSH) plugin that embeds the online acgay.cn music site in a right-side drawer, with an optional import path for missing tracks.
Features
- A small vinyl button in the DSH top-right corner opens a right drawer.
- The drawer preloads behind the scenes and keeps its iframe mounted, so reopening is instant and the acgay login session is preserved.
- The site header, footer and bottom navigation are hidden inside the drawer. Login is available at the top of the drawer.
- Search queries acgay and an online catalog in parallel; acgay results are always listed first.
- Online catalog rows can be imported into acgay, where they are published immediately (
status = 1). - A compact top player controls play/pause, previous/next, progress, and shows the current cover/title.
- The drawer and the surrounding workspace animate open/closed. Clicking outside closes it;
Escalso closes it.
Requirements
- DSH desktop with the profile patched to load this package.
ffmpegandffprobeonPATHfor imports. Search and playback do not need ffmpeg.- Node.js 20+ (the DSH runtime is normally sufficient).
Install
Add the package to the DSH profile and patch the profile:
// ~/.dsh/profiles/desktop/package.json
{
"dependencies": {
"dsh-music": "link:/absolute/path/to/dsh-music"
},
"dsh": {
"profile": {
"bundles": ["dsh-music"]
}
}
}
# ~/.dsh/profiles/desktop/cordis.patch.yml
- insert:
- id: dsh-music
name: 'dsh-music'
Reload DSH after adding the package. If the client half does not appear on an already-running app, restart DSH once.
Import credential (optional)
Import is disabled when no credential is configured. Search, playback, login, and the mini player still work.
The host resolves the token in this order:
ACGAY_IMPORT_TOKENenvironment variable.config.importToken/config.tokenin the plugin row.ACGAY_IMPORT_TOKEN_FILEenvironment variable (path to a file).~/.acgay-import-token.~/.dsh/profiles/desktop/acgay-import-token(legacy location).
The file contains the raw token, one line. Import is enabled when a non-empty token is found.
When no token is set:
/dsh-music/statereturnsimports: false.- Per-row import buttons and the “抓取并入库” action are hidden.
- A direct POST to
/dsh-music/importreturns HTTP 503.
Do not commit the token. It is a shared write credential for the acgay import endpoint.
Optional environment variables
| Variable | Default | Purpose |
|---|---|---|
ACGAY_BASE_URL |
https://www.acgay.cn |
Upstream site used by the proxy and the importer. |
ACGAY_IMPORT_TOKEN |
unset | Enables import. |
ACGAY_IMPORT_TOKEN_FILE |
unset | Read the token from a custom path. |
ACGAY_FFMPEG |
ffmpeg |
ffmpeg executable. |
ACGAY_FFPROBE |
ffprobe |
ffprobe executable. |
DSH_ACGAY_NODE_BIN |
process.execPath |
Node executable used for the import worker. |
How import works
- The client asks acgay for online catalog candidates along with the normal site search.
- Clicking “导入”, or “抓取并入库”, calls the plugin host route
POST /dsh-music/importwith{ query }; a catalog item id may be sent instead. - The host starts
scripts/import-one.mjsas a short-lived child process. scripts/import-direct.mjsselects one candidate, downloads it, converts it to 192 kbps mp3 with ffmpeg, and POSTs a multipart request to acgay’s/api/plugin/importwith the token.- acgay writes the audio/cover to OSS, inserts a published
lab_musicrow and anlab_import_logrow, and returns the production id. The drawer navigates to/sound/{id}.
Nothing is written to a local MySQL database or local OSS client.
Security notes
- The shared import token grants upload + auto-publish permission. Never ship it in a public repository or client bundle.
- The embedded acgay login session is kept in
~/.dsh/dsh-music-cookies.json(mode 0600) by the loopback proxy, so a DSH restart does not force a new acgay login. It contains a session cookie, not a password. Delete the file to drop the saved session locally; the acgay session expiry still applies server-side. - A shared token should only be used in a trusted self-hosted setup. For multi-user deployments, use per-user tokens or a rate-limited endpoint.
- The plugin performs no database, OSS, or catalog account authentication itself; all privileged writes happen in the acgay server endpoint.
Development
index.js: DSH host half; proxy, state, import route.client.js: DSH web client half; vinyl button, drawer, search panel, mini player.assets/bridge.js: injected into proxied pages; forwardswindow.__ACGAY_PLAYER__state and commands.scripts/import-direct.ts: source for the importer.scripts/import-direct.mjs: runtime bundle (generated from the TS source).scripts/lib/*.ts/*.mjs: vendored catalog client used by the importer.
License
MIT
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 6367
Desktop pet for the DSH Web UI on Windows, macOS and Linux: 106 transparent animations in the browser overlay or a transparent always-on-top desktop window, throw-and-bounce drag physics with squash and particle scoring, a work-status bubble driven by live session events, self-talk and chat with persistent memory, balance display, meme-image bubbles, multiple pets on screen, and drop-in custom animations and pet packs.
flizzywine/dsh-tavern#dsh-tavern★ 1636
An agent-powered tavern for DeepSeek Harness with SillyTavern compatibility, character card imports, support for multiple models, and mobile play. Install the tavern from Settings → Tavern Launcher on desktop. A launcher derived from 2NF/dsh-profile-bridge (MIT): it downloads the tavern into a separate DSH profile and switches profiles on restart. Install this launcher or the upstream plugin, not both — they claim the same /profile-bridge channel.
Alterssss/dsh-bili-whale★ 1062
A Bilibili companion that keeps its own schedule. A 60-second tick in the plugin host wakes a dedicated agent session at a random moment inside the configured time windows (opting out of a day is a configurable chance), then hands it a bundled CLI of 38 subcommands — feed, subtitles, danmaku, comments, ffmpeg frame grabs, and two diaries. Shares at most N items a day by commenting on them and @-mentioning the owner (default 3, enforced from a written quota log, and it stops on rate-limit or captcha signals). Also polls comment replies, direct messages and live-room danmaku; replies to anyone but the owner are queued for approval in Settings. Settings → 养鱼 writes ~/.dsh/bili-whale.config.json; cookies live separately in ~/.bili-ai/credentials.json and are never echoed back. The HTTP routes are loopback-only behind DSH's trust fence. Needs Node 18+ and ffmpeg on PATH for frame extraction.
Nagi-ovo/dsh-ads★ 728
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
yyh-001/dsh-meme★ 581
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
vlln/whale-girl★ 409
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.