Skip to content
dsh.fish
Bundle

@dsh-community/dsh-req-workbench

需求管理工作台:在 DeepSeek Harness Web UI 中管理需求与子任务,支持从对话 turn 与本地文档导入功能需求,子任务截止时间与超时提醒。

Source
Songran241
License
MIT
Updated
Updated 7 days ago

Readme

# dsh-req-workbench

需求管理工作台 —— 在 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web UI 中管理需求与子任务:从对话 turn、粘贴文本、本地文件导入功能需求,支持子任务截止时间与超时提醒。

## 功能

- **需求 / 子任务管理**:新建、编辑、删除需求;子任务勾选完成、编辑、删除、设置截止时间
- **三种导入来源**
  - 对话 turn:每条 assistant 消息下方"提取需求"按钮,把该轮内容解析为需求清单
  - 粘贴文本 / 读取工作区文件:支持 Markdown 标题/列表,导入前可预览、勾选、编辑
- **截止提醒**:即将超时(24h 内)的子任务在侧边栏与浮层中提醒,每分钟轮询

## 安装(在你的 dsh profile 中)

前提:已安装 pnpm(可用 `corepack pnpm`)。

```bash
dsh plugin --profile web add github:Songran241/dsh-req-workbench
```

或手动:编辑 `~/.dsh/profiles/web/package.json`,加入依赖并在 `dsh.profile.bundles` 追加本包,然后:

```bash
cd ~/.dsh/profiles/web
corepack pnpm install
```

完成后重启 `dsh web`,侧边栏底部会出现"需求管理"入口。

## 架构

| 文件 | 职责 |
| --- | --- |
| `src/index.ts` | Host 面(Node):`RequirementsService`,`@Remote` 暴露 RPC + `dsh-storage-domain` 持久化 |
| `src/client.tsx` | Client 面(浏览器):React UI,挂载到 sidebar / overlay / turn 插槽 |
| `src/typert.remote-client.ts` | 两端协议契约:每个 RPC 的 strict zod schema 与 wire 描述 |
| `cordis.patch.yml` | bundle 补丁:把插件条目插入 profile 的 loader 树 |
| `scripts/build.mjs` | 构建:host → ESM;client → `window.__ModuleLoader__` 格式 |

数据流:浏览器 UI → `remote.requirements.*`(Typert RPC)→ `RequirementsService` → `req_workbench` 存储域。

## 开发

```bash
pnpm install        # 安装 devDependencies
pnpm build          # 构建 lib/index.js + lib/client.js
pnpm pack           # 打出可安装的 tarball(lib + cordis.patch.yml)
```

注意:host 面必须是 ESM 构建(`"type": "module"`)。若 host 为 CJS 并在 Node 24 上 `require()` ESM 依赖(`dsh-typert-protocol`),会触发 `ERR_INTERNAL_ASSERTION` 竞态崩溃。

## License

MIT

Install

dsh plugin --profile web add github:Songran241/dsh-req-workbench#e2210ec15f85973564e0581bd536b212005e5a2e

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