Skip to content
dsh.fish
Bundle

dsh-agent-skill-manager

Agent & Skill management UI for DeepSeek Harness: list agent presets and skills from Settings.

Source
ArkFishingLab
License
MIT
Updated
Updated 2 days ago

Readme

# dsh-agent-skill-manager

> Agent & Skill 管理 UI 插件 for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness)

在 Web **设置 → Agent & Skill** 页里:

- **Agent 预设**:列出所有 agent preset(id / name / trust / path),支持复制预设、删除预设。
- **Skills**:列出当前会话可见的 skill(name / description / provider / source)。

Host half 通过 Package-private RPC 调用 `agentPresets` / `skills` 两个 Cordis Service,只把叶子标量字段回传给浏览器;Client half 注册一个 `settings.section`。

## 状态

社区插件,非官方包。MVP:只读列表 + 预设复制/删除。Skill 的「导入新 skill」尚未实现(参考 `dsh-skills-manager` 的私有库思路后续补)。

## 仓库结构

```
dsh-agent-skill-manager/
├── package.json          # dsh.bundle + dsh.client + peerDependencies (带预发布分支)
├── cordis.patch.yml      # host 组合补丁:insert 插件行(上架必需)
├── tsconfig.json
├── tsdown.config.ts       # 双产物:host ESM + client 工厂闭包 (window.__ModuleLoader__.load)
├── src/
│   ├── index.ts          # Host half:harness.handle RPC
│   ├── client/
│   │   └── index.ts      # Client half:settings.section UI (React.createElement, 无 JSX)
│   └── globals.d.ts      # harness 等 Host Builtin 全局声明
└── README.md
```

## 安装

```sh
dsh plugin --profile web add dsh-agent-skill-manager
```

重启 `dsh web`,打开 **设置 → Agent & Skill**。

从 GitHub 安装:

```sh
dsh plugin --profile web add "github:ArkFishingLab/dsh-agent-skill-manager#main"
```

> 需要 dsh web 0.1.0-rc.6 或更新版本。

## 开发

此插件在 DSH 源码 workspace 内开发(peerDependencies 指向 `@deepseek-ai/*` workspace 包)。

```sh
# 在 deepseek-harness checkout 根目录
pnpm install
pnpm --filter dsh-agent-skill-manager build      # 产出 lib/index.js + lib/client.js
pnpm --filter dsh-agent-skill-manager watch      # 开发热构建
```

构建产出两个产物:
- `lib/index.js` — Node host half(ESM,`@deepseek-ai/*` 保持 external)
- `lib/client.js` — 浏览器 client half,包成 `window.__ModuleLoader__.load({ id, factory })` 工厂闭包,符合 DSH client bundle 协议

## 本地开发挂载

把 `cordis.patch.yml` 作为补丁层叠加到 web profile:

```sh
dsh web --patch ./cordis.dev.yml
```

## 发布到 npm

```sh
pnpm --filter dsh-agent-skill-manager build
pnpm --filter dsh-agent-skill-manager pack      # 产出 tgz
npm publish
```

发布到 npm 后,安装免 `allowBuilds` 构建授权。不发 npm 也可用 GitHub Release 预构建 tarball。

## 上架到插件市场

本插件目标是上架 [dsh-market](https://github.com/dsh-market/dsh-market)(dshmarket.com)。市场里的插件列表来自精选列表 [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin),上架流程:

1. 满足收录门槛:`package.json` 声明 `dsh.bundle`(✅)、仓库 ≥1 天且 ≥10 commits、加 `dsh-plugin` topic、描述属实。
2. 在 awesome-dsh-plugin 仓库提 PR,加一个文件 `data/plugins/<owner>__<repo>.yml`:

```yaml
url: https://github.com/ArkFishingLab/dsh-agent-skill-manager
name: ArkFishingLab/dsh-agent-skill-manager
category: ui
description:
  en: Agent & Skill management UI — list presets and skills from Settings.
  zh: Agent 与 Skill 管理 UI,在设置页列出预设与技能。
```

3. CI 通过后维护者评审,合并后 dsh-market 和站点自动收录。

## 行为与安全

- 删除预设会真实移除 `~/.dsh/.agent-presets/<id>/`,**不可恢复**,操作前会二次确认。
- RPC 仅返回标量字段,不序列化 live Service 对象。
- Web API 走 DSH 的 trusted-host 策略,不要把 Harness Web 暴露给不可信网络。

## License

MIT

Install

dsh plugin --profile web add github:ArkFishingLab/dsh-agent-skill-manager#c0273fd1563a7ac505ffea44efd2a4337a4c5c45

Profile: web

  • This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
Source