dshbase

Plugin directory / Content / lx_music-for-dsh

lx_music-for-dsh

Unverified CyberryRe

✓ Actively maintained Pure TypeScript

View on GitHub ↗ ← Back to plugin directory

3Stars
0Forks
0Open issues
TypeScriptLanguage
2026-08-16Last push
Cross-platformPlatform

What it does

This is a plugin that allows deepseek harness own the ability of lx music.

Our take
Unverified — not yet verified

This is a plugin that allows deepseek harness own the ability of lx music. Not yet verified — install and test it yourself.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

README

lx-music-for-dsh

LX Music 增强控制插件 —— 为 deepseek_harness
Web 模式提供 LX Music 播放控制界面与 LLM 点歌能力。

功能

  • 侧边栏迷你播放卡片(位于「设置」按钮上方):封面缩略图、歌名-歌手、可拖动/点击跳转的
    进度条(与播放器双向同步)、上一首/播放暂停/下一首、播放模式切换按钮(列表循环/单曲循环/
    随机/顺序,点击循环切换)、播放列表弹窗(内含四模式直接选择)、设置齿轮。
  • 主窗口(点击卡片主体打开,可调大小、记忆位置):搜索(关键词/歌手/平台过滤)、
    搜索结果(音质标识、时长、+队尾 / +下一首)、播放列表管理(拖拽排序、删除、清空、导出为文本,
    播放模式分段按钮)。
  • 播放模式:列表循环(默认,播完回第一首)/ 单曲循环(播完自动重播)/ 随机播放(不重复当前曲目)/
    顺序播放(播完最后一首停止);host 侧权威状态,持久化,UI 与 LLM 工具共用。
  • 设置窗口(点击齿轮打开):音源管理(文件/URL/粘贴导入并自动启用、启用/禁用/删除/排序)、
    音质策略(全局默认音质、每音源平台优先级)、自动拉取规则(切歌自动最高音质、降级策略)。
  • 细粒度 LLM 音乐工具集music_search(搜索)/ music_play(播放)/ music_playlist
    (播放列表管理)/ music_prev / music_next / music_control(暂停、音量、音质、播放模式等),
    另保留兼容入口 search_and_play(一步点歌);内置滑动窗口防刷(默认 6 次/分钟)与带 action 的操作日志。

架构

  • 完全独立:搜索由内置音乐 SDK 提供(移植自 lx-music-desktop,酷我/酷狗/QQ音乐/网易云/咪咕
    五平台);直链解析由内置音源脚本引擎提供(子进程隔离执行 lx-music-desktop 音源脚本协议,
    与 lx-music-desktop v2.12.2 一致——直链 100% 依赖音源脚本);播放为浏览器 HTML5 Audio。
    无需任何外部服务即可使用。
  • 安全模型:第三方音源脚本(不可信 JS)在独立子进程中执行(每个音源一个子进程),
    宿主 DSH 进程只通过 IPC 与其交换 JSON 消息;子进程环境为白名单(不含任何 DSH 机密)、
    网络请求带 SSRF 防护(默认拦截私网/回环/链路本地地址)、初始化/调用超时自动杀进程兜底。
    脚本的任何故障——异常、逃逸尝试(如 Buffer.constructor('return process'))、死循环——
    都被限制在子进程内,下一次调用自动重启,宿主进程不受影响。
  • host(Node):PlaybackService(Typert Remote lxPlayback,播放权威状态 + 播放模式 + storage 持久化)、
    细粒度音乐工具集(music_search/music_play/music_playlist/music_prev/music_next/music_control
    及兼容 search_and_play)、内置 SDK 搜索、音源脚本子进程沙箱(导入/启用/排序/删除本地管理)、
    可选 lxserver 客户端(超时 10s / 重试 2 次 / 音质与平台降级链)。
  • client(浏览器):React UI(注入 sidebar.footer.action slot)+ HTML5 Audio 播放引擎,
    轮询 host 状态(500ms)diff 应用,进度节流上报(1s)。
  • provider 门面(providerMode):auto(默认,有地址用 lxserver 否则内置引擎)/ engine(强制内置引擎)/
    lxserver(连接 lxserver 同步服务器)/ mock(内置演示数据,用于无网络演示)。

快速开始

npm install && node scripts/link-dsh.mjs
npm run lint && npm run typecheck && npm run build && npm test
# 可选:真实网络冒烟(五平台搜索)
node scripts/compile-tests.mjs && node scripts/smoke-live.mjs

安装到 DSH:见 docs/development.md(§6)。

直链解析失败排查

解析失败时错误会出现在三个位置:

  1. 侧边栏卡片 / 主窗口:显示聚合后的错误摘要(含每个音源脚本的失败原因)。
  2. 浏览器 Console[lx-music] 直链解析失败: ...,包含完整错误消息与最近 5 条音源脚本 HTTP 请求状态码:URL(耗时))。
  3. 宿主进程 stdoutdsh web 所在终端):每个脚本的完整错误堆栈 + [lx-music sandbox] 音源脚本请求 HTTP <code>: <url> 非 2xx 告警。

按状态码判断根因:

  • HTTP 403:第三方 API 拒绝(IP 封禁 / 风控 / UA 校验)——换网络或换音源。
  • HTTP 503:第三方 API 不可用(onrender 免费实例休眠、配额耗尽或宕机)——重试或稍后再试;手机端能播多半是缓存了旧直链或使用了其他音源。
  • timeout / ERR:网络不可达。
  • HTTP 200 但仍报错:API 返回结构异常或脚本逻辑问题(可看宿主端脚本堆栈定位到具体行)。

音源健康检查:node scripts/compile-tests.mjs && node scripts/smoke-source.mjs <音源URL> [平台] [关键词]

文档

目录

manifest.json  插件清单
src/index.ts   host 入口
src/client.ts  client 入口
src/ui/        React 组件
tests/         单元测试(117 例)

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install lx_music-for-dsh for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:CyberryRe/lx_music-for-dsh

Headless (CLI) profile:

dsh plugin --profile headless add github:CyberryRe/lx_music-for-dsh

Test report

Not yet L3-verified — see failure note below if we already ran it.

Status: pending
Note: 验证: install-fail (0.1.0-rc.6) Browse all pending failures →

When to use it

Turn the agent into a writer — generating, editing, or localizing text and media — for content-heavy tasks.

Who it's for

Users producing docs, posts, or marketing copy who want the agent to draft and revise in the same loop.

For developers — extending it

Content pipelines and format outputs are the seams — add templates, style rules, or export targets.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Content

Browse all 7795 plugins →