dsh-workbase 0.0.0-stage → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/cordis.patch.yml +4 -0
- package/dist/index.js +15587 -0
- package/lib/client.js +1147 -0
- package/package.json +87 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AlwaysFyo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,122 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DSH Workbase · 工作台
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/zhileyo/dsh-workbase)
|
|
4
|
+
[](https://cnb.cool/zhileyo/dsh-workbase)
|
|
5
|
+
|
|
6
|
+
DeepSeek Harness 的工作台插件,集中管理项目、会话和待办,并支持 Agent 在当前项目中创建和更新任务。
|
|
7
|
+
|
|
8
|
+
## 功能
|
|
9
|
+
|
|
10
|
+
- **项目管理**:宫格与列表视图、添加目录、新建项目、重命名、移除、置顶、收藏,以及归档与恢复;归档项目变为只读,随时可以恢复。
|
|
11
|
+
- **会话管理**:查看最近会话、按项目浏览、重命名、归档、置顶及收藏;选择 Agent 模式和模型发起会话。
|
|
12
|
+
- **待办管理**:创建、编辑、备注、完成、重新打开、删除确认及撤销。
|
|
13
|
+
- **分支与工作树**:输入卡下方显示当前分支;宿主启用 `experimental-forge-bundle` 时可指定基准分支并在新工作树中发起,非 Git 项目自动降级为普通发起。
|
|
14
|
+
- **全局搜索**:搜索项目、会话标题与正文、待办标题与备注,并跳转到对应内容。
|
|
15
|
+
- **工作台设置**:首页模块、主题、项目根目录、Agent 权限及布局偏好;通用设置支持侧边栏名称(默认「项目概览」)、侧边栏入口和会话 Header 工作台按钮显隐。
|
|
16
|
+
- **配色主题**:跟随 DSH、DSH 默认、清爽、温暖阅读和紫晶工作台;明暗外观跟随宿主,主题支持即时预览与保存。
|
|
17
|
+
- **响应式布局**:双栏列表或整体卡片,窄屏切换会话与待办页签;断点按面板宽度计算,不依赖浏览器视口。
|
|
18
|
+
|
|
19
|
+
项目、待办和设置由宿主持久化;未提交草稿及滚动位置保存在当前浏览器。
|
|
20
|
+
|
|
21
|
+
## 仓库
|
|
22
|
+
|
|
23
|
+
| 平台 | 地址 | 角色 |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| GitHub | <https://github.com/zhileyo/dsh-workbase> | 主库:提交、Actions、发版与 Release |
|
|
26
|
+
| CNB | <https://cnb.cool/zhileyo/dsh-workbase> | 只读镜像:CNB 定时任务每 10 分钟从 GitHub 拉取 `main` 与标签 |
|
|
27
|
+
|
|
28
|
+
CNB 侧的分支与标签由 `.cnb.yml` 的定时任务拉取后强推对齐,提交 SHA 与 GitHub 一致(最多滞后一个周期);改动请提到 GitHub,不要在镜像侧直接推。
|
|
29
|
+
|
|
30
|
+
## 环境要求
|
|
31
|
+
|
|
32
|
+
| 项目 | 要求 |
|
|
33
|
+
| --- | --- |
|
|
34
|
+
| DeepSeek Harness | 当前适配 `0.2.2-rc.1` |
|
|
35
|
+
| Cordis | `~4.1.0` |
|
|
36
|
+
| Node.js | 本地开发使用 22 或以上版本 |
|
|
37
|
+
| 运行环境 | Web;桌面 profile 验收进行中,已安装版本与验收范围见[开发日志](.agents/notes/dev-log.md) |
|
|
38
|
+
|
|
39
|
+
## 安装
|
|
40
|
+
|
|
41
|
+
### 本地安装包
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm pack # 产出 dsh-workbase-<版本>.tgz
|
|
45
|
+
dsh plugin --profile web add ./dsh-workbase-<版本>.tgz
|
|
46
|
+
dsh web
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
把 `<版本>` 换成 `npm pack` 实际输出的版本号。
|
|
50
|
+
|
|
51
|
+
### npm 安装
|
|
52
|
+
|
|
53
|
+
当前没有 npm 发布成功记录。发布预览版后,可执行:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
dsh plugin --profile web add dsh-workbase@beta
|
|
57
|
+
dsh web
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
桌面端需将 `web` 替换为实际运行的 profile。
|
|
61
|
+
|
|
62
|
+
## Agent 工具
|
|
63
|
+
|
|
64
|
+
| 工具 | 功能 |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `workbase_list_todos` | 查看当前项目待办 |
|
|
67
|
+
| `workbase_create_todo` | 创建待办 |
|
|
68
|
+
| `workbase_update_todo` | 更新待办内容或完成状态 |
|
|
69
|
+
|
|
70
|
+
Agent 只能操作所属会话的当前项目,不能删除待办;状态修改受项目权限设置控制。
|
|
71
|
+
|
|
72
|
+
## 已知限制
|
|
73
|
+
|
|
74
|
+
- 项目归档由插件自行记录:归档后业务只读、可恢复,但宿主原生归档接口缺失,宿主自己的归档视图不感知这个状态。
|
|
75
|
+
- 修改绑定目录、跨目录迁移及 72 小时撤销缺少安全的宿主接口,暂无真实迁移记录;会话永久删除同样没有公开接口。
|
|
76
|
+
- 会话正文搜索要求宿主索引 `openAt` 为 `first-search` 或 `startup`;默认 `never` 时正文搜索不可用。插件不会自动修改宿主配置。
|
|
77
|
+
- 正文搜索最多返回 20 条结果,不支持消息精确定位或命中次数统计。
|
|
78
|
+
- 真实模型发送、真实正文命中,以及桌面环境的低高度、软键盘、缩放与跨平台字体仍待完整验收。
|
|
79
|
+
|
|
80
|
+
## 开发
|
|
81
|
+
|
|
82
|
+
在源码项目根目录执行:
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
npm ci
|
|
86
|
+
npm test # node:test:存储、RPC、HTTP、Agent 工具、视图渲染、主题与样式生成
|
|
87
|
+
npm run typecheck
|
|
88
|
+
npm run build
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
改动源码后需重新构建并重启宿主。服务端入口 `src/server/index.ts` 产出 `dist/index.js`,客户端入口 `src/client/entry.tsx` 产出 `lib/client.js`(样式以文本形式打进客户端产物)。
|
|
92
|
+
|
|
93
|
+
出本地安装包用 `npm pack`,但**先 `npm run build`**——`npm pack` 不会触发构建,可能把上一次的 `dist`/`lib` 打进包。版本号与发版流程由 semantic-release 从提交类型推断,push 到 `main` 后由 GitHub Actions 自动发版,规则见 [AGENTS.md](AGENTS.md)。
|
|
94
|
+
|
|
95
|
+
本地链接安装:
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
dsh plugin --profile web add "$(pwd)"
|
|
99
|
+
dsh web
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 目录结构
|
|
103
|
+
|
|
104
|
+
| 路径 | 内容 |
|
|
105
|
+
| --- | --- |
|
|
106
|
+
| `src/server/` | 插件入口、存储域(含旧标识迁移)、业务服务、宿主能力适配、RPC 与 Agent 工具 |
|
|
107
|
+
| `src/client/` | React 视图(首页/详情/搜索/设置)、输入卡与分支条、主题、`api` 与启动逻辑 |
|
|
108
|
+
| `src/shared/` | 前后端共享的 zod 模型、RPC 频道名、会话类型 |
|
|
109
|
+
| `src/client/prototype.css`<br>`src/client/prototype-icons.ts` | 由 `sync-ui.mjs` 从 `docs/ui/ui-directions.html` 生成,改样式要改原型而非这两个文件 |
|
|
110
|
+
| `test/` | `node:test` 测试,`npm test` 全量执行 |
|
|
111
|
+
| `docs/` | 需求、UI 基线、验收证据与验收脚本;不进入 npm 包 |
|
|
112
|
+
| `release.config.mjs`、`release-sync-docs.mjs`、`build.mjs`、`sync-ui.mjs` | 发版配置与文档同步、构建、原型样式与图标的同步生成 |
|
|
113
|
+
| `.github/workflows/release.yml` | GitHub Actions:push `main` 后跑类型/测试/构建门禁,交由 semantic-release 发版并建 Release |
|
|
114
|
+
| `.cnb.yml` | CNB 定时任务:每 10 分钟从 GitHub 拉取 `main` 与标签并强推对齐,不做构建 |
|
|
115
|
+
|
|
116
|
+
## 许可证
|
|
117
|
+
|
|
118
|
+
MIT,全文见 [LICENSE](LICENSE)。Copyright (c) 2026 AlwaysFyo。
|
|
119
|
+
|
|
120
|
+
## 项目文档
|
|
121
|
+
|
|
122
|
+
需求与视觉规则在 `docs/` 里,实现状态、验收证据与限制在 `.agents/notes/dev-log.md`(开发日志的上半部分)。两者都不随 npm 包分发:`docs/PRD.md`(需求)、`docs/UI-DESIGN.md`(视觉规则)、`docs/ui/ui-directions.html`(可交互原型)。
|
package/cordis.patch.yml
ADDED