syy-shark/dsh-music-plugin 预览 preview

syy-shark/dsh-music-plugin

DeepSeek 音乐插件(dsh-plugin)

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that enables DSH agents to search for, play, pause, and skip audio files stored in a user’s local music folder. Once installed, it adds a dedicated local music control panel to the right sidebar of DSH’s web interface, supporting both direct click controls and natural language commands directly from the agent. It is built with an extensible framework, so future features like third-party music platform integration can be added without rewriting the existing core logic.

Before using the plugin, you need to add all your music files to a specified library directory, which defaults to ~/Music on macOS but can be changed manually in the plugin’s configuration file. To install, you run the official DSH CLI command to add the plugin to your DSH profile, then launch DSH Web as normal to access the full feature set. You can either control playback directly through the sidebar panel or send natural language requests to the agent, like asking it to play a specific track or skip to the next song in the queue.

The plugin uses macOS’s built-in afplay utility by default for all audio playback, but it will automatically use mpv if you already have it installed on your system for more stable FLAC format support. Other DSH plugins can access the plugin’s full playback functionality by adding music to their injection list, then calling the exposed play, pause, search, and skip methods on the context object. This plugin is released under the open source MIT license, and currently does not support lyrics, progress bar dragging, or third-party streaming integration, only core playback control features.

这是一个专为DeepSeek Harness(DSH)开发的原生插件,核心功能是让DSH中的Agent能够搜索、播放和控制用户本地文件夹中的音乐文件。插件安装后会在DSH的Web端右侧生成「本地音乐」控制面板,支持点击操作和Agent自然语言指令控制两种交互方式,关闭插件后播放会自动停止。它采用可扩展架构设计,后续接入其他音乐平台都可基于现有框架开发,无需重构整体逻辑。

使用该插件前,用户需要先将自己的音乐文件放入指定的音乐文件夹,默认路径为Mac系统的~/Music目录,也可在配置中修改路径。安装时通过DSH的插件命令将插件添加到DSH配置中,后续启动DSH Web即可使用,开发阶段也可通过临时挂载源码的方式调试。用户既可以在网页面板点击切换播放,也可以直接和Agent对话,下达搜索、播放、暂停、切歌等指令。

该插件基于系统自带的afplay播放音乐,如果用户本地安装了mpv播放器,插件会优先使用mpv以获得更好的FLAC格式支持。插件支持其他DSH插件调用其音乐能力,开发者只需注入music依赖即可调用播放控制接口。该插件采用MIT许可协议,目前暂未支持网易云音乐、歌词显示、进度条拖拽等功能,仅实现基础播放控制能力。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:syy-shark/dsh-music-plugin

把 syy-shark/dsh-music-plugin 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH 音乐插件

DeepSeek 鲸鱼听歌

给 DeepSeek Harness 加一个音乐开关:Agent 能搜、播、暂停你电脑里的歌。关掉插件,声音也会停。

今天接的是本机文件夹。以后要接网易云或加播放器界面,都走这个开关,不用推倒重来。

怎么用

  1. 把歌放进 ~/Music(就是 Mac「音乐」文件夹)。
  2. 装一次(写进 DSH 配置,以后不用再贴路径):
npx @deepseek-ai/dsh plugin --profile web add /Users/shark/项目/DSH-music-plugin
  1. 以后直接启动:
npx @deepseek-ai/dsh web

打开 http://127.0.0.1:3080。右侧会出现「本地音乐」面板:能看见歌单,点播放 / 暂停 / 下一首。也可以继续跟 Agent 说「播放 xxx」,两边是同一套播放。

拔掉:

npx @deepseek-ai/dsh plugin --profile web remove dsh-music-plugin

开发时还可以用 --patch 临时挂源码,不写进配置。

能听到声音就算成了。找到好几首时,Agent 会列出路径,你让它按准确路径再播一次。

它能干什么

你说的 Agent 会调
找一下某首歌 music_search
播放 xxx music_play
暂停 / 继续 music_pause / music_resume
下一首 music_skip
现在在播什么 music_status

正在播的时候再点播,会排进队列,不会把当前这首掐掉。

出声用 Mac 自带的 afplay。电脑里有 mpv 的话会优先用它(flac 更稳)。

配置

都在 cordis.yml 里,改完重新加载即可:

  • libraryDir:歌在哪个文件夹,默认 ~/Music
  • backend:auto / afplay / mpv
  • extensions:当音乐文件的后缀

给别的插件用

别的 DSH 插件可以 inject: ['music'],然后调 ctx.music.play / pause / search。不用自己去扫文件夹、也不用管 afplay。

这次没做

网易云、进度条拖拽、歌词。先做到打开网页就能看见歌、点一下能出声。

← 上一个 Prev dsh-worlds 下一个 Next dsh-lsp-packs →