Passer au contenu principal
L

dsh-lsp-manager

lxeon/dsh-lsp-manager

Manages the LSP server registry from Settings — per-server status with executable health checks, enable/disable, add/remove, and the same operations as an agent tool.

Installer

dsh plugin --profile web add github:lxeon/dsh-lsp-manager

README

dsh-lsp-manager

DeepSeek Harness 插件:LSP 语言服务器注册表管理(类似 skills 管理页)。

仓库:https://github.com/Lxeon/dsh-lsp-manager

管理 @deepseek-ai/dsh-lsp-stdio 的语言服务器:状态显示、启用/禁用、添加/删除、bundle 开关, 并在会话里暴露同能力的 dsh_lsp_admin agent tool。

功能

能力UIagent tool
列出服务器(command / 扩展名 / 来源 / 健康)✅action=status
添加服务器✅action=add
删除服务器(删最后一台需确认)✅action=remove
禁用 / 启用(配置暂存不失真)✅action=disable / enable
恢复 bundle 默认定义✅action=restore-default
启停 dsh-bundle-lsp-local bundle✅action=set-bundle
  • 健康徽章在 healthProbe: true(默认)时用 subprocess.resolveExecutable 实测每台服务器的 command 是否可解析。
  • 禁用的服务器写入 $DSH_HOME/lsp-manager/<profile>.disabled.json,配置原样保留。
  • 写入优先走 Host configEditor.edit(原子、Loader 热生效、恢复默认时自动删除 override 行);行不可编辑时回退写 profile patch YAML(HMR 同样热生效)。
  • bundle 源文件 /root/tools/dsh-bundle-lsp-local/ 始终不动,无须 cp + set_bundle 往返。

结构

index.js          Host 半:configEditor 持久化 + /api/lsp-manager/v1/* 路由 + dsh_lsp_admin tool
core.js           纯逻辑:校验/归一化/registry op/YAML 行手术/暂存读写(无 DSH 依赖)
client.js         Browser 半:settings.section 管理页(中英双语)
cordis.patch.yml  插件行(id: lsp-manager)
locale/           展示文案(en/zh)
docs/DETAIL.md    插件详情页
icon.svg          图标
test/verify.mjs   离线测试(25 case)

安装

从 GitHub 直接安装(插件管理页 → Install,填下面任一种;未发布到 npm):

# 简写:默认克隆 main
github:Lxeon/dsh-lsp-manager

# 显式 URL(可用 #<commit|tag> 钉版本)
git+https://github.com/Lxeon/dsh-lsp-manager#main

等价工具调用:

plugin_manager install_bundle target=github:Lxeon/dsh-lsp-manager
# 返回 application: applied 即生效;新会话的工具表可见 dsh_lsp_admin

本地开发时改用目录:

plugin_manager install_bundle target=link:/path/to/dsh-lsp-manager

测试

node test/verify.mjs   # 25 cases: 校验/registry op/归一化/YAML 手术/暂存往返/工具 schema 回归

配置

插件行 config(Plugins 页可编辑):

- id: lsp-manager
  name: '@leonhoy/dsh-lsp-manager'
  config:
    enabled: true       # false = 只读状态,禁写入与工具
    healthProbe: true   # false = 不实测 command,健康徽章显示"未探测"

注意

  • 已存在会话的工具表是启动快照;变更写入后新会话可见。
  • lsp-stdio 要求 servers 至少一台服务器;清空 map 会让整个 LSP 提供方组注册失败, 因此 UI/工具对"删除最后一台"强制二次确认。
  • 一条服务器定义坏(未知字段、空 command、扩展名非小写点开头等)会让所有 LSP 提供方不注册;添加入口已按 lsp-stdio 的 schema 严格校验。

Plugins associés