@stephen1620/dsh-tomato-board 0.1.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 +171 -0
- package/cordis.patch.yml +9 -0
- package/lib/client.js +738 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +319 -0
- package/lib/invariant.js +5 -0
- package/lib/types/client/TomatoBoard.d.ts +4 -0
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/index.d.ts +13 -0
- package/lib/types/invariant.d.ts +3 -0
- package/package.json +102 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Stephen
|
|
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
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# DSH 番茄工作台
|
|
2
|
+
|
|
3
|
+
为 DeepSeek Harness Web 提供 Gitee Team(番茄)工作台和原生对话联动。
|
|
4
|
+
|
|
5
|
+
## 快速安装(推荐)
|
|
6
|
+
|
|
7
|
+
Clone 仓库后,从插件目录安装到需要使用的 DSH profile。
|
|
8
|
+
|
|
9
|
+
Web:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/StephenLGF/dsh-plugins.git
|
|
13
|
+
cd dsh-plugins/plugins/tomato-board
|
|
14
|
+
|
|
15
|
+
npx @deepseek-ai/dsh plugin --profile web add .
|
|
16
|
+
npx @deepseek-ai/dsh web
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
DSH Desktop:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx @deepseek-ai/dsh plugin --profile desktop add .
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
安装完成后退出并重新打开 DSH Desktop。`web` 和 `desktop` 是两个独立 profile,需要分别安装。
|
|
26
|
+
|
|
27
|
+
安装前请先确认必备的 Gitee CLI 已配置完成,具体要求见下方“必备环境”。
|
|
28
|
+
|
|
29
|
+
## 功能
|
|
30
|
+
|
|
31
|
+
- 在 Harness 侧栏打开番茄工作台,按状态展示当前用户负责的事项。
|
|
32
|
+
- 支持标题、编号、创建人搜索和事项类型筛选。
|
|
33
|
+
- 支持手动置灰卡片;标记保存在当前客户端的 `localStorage`,刷新或重启后仍然保留,但不会同步到番茄、其他浏览器或设备。
|
|
34
|
+
- 点击卡片时优先打开已关联的 Harness 对话。
|
|
35
|
+
- 尚未关联时选择 Harness 项目,并在对应仓库中创建原生对话。
|
|
36
|
+
- 在对话标题栏查询当前状态,并一键执行可用的番茄状态流转;“待测试”因必填字段失败时,自动交给当前 AI 对话分析并继续处理。
|
|
37
|
+
- 在卡片和对话标题栏快速跳转到番茄事项页面。
|
|
38
|
+
|
|
39
|
+
当前版本不包含拖拽排序和独立的事项详情页。
|
|
40
|
+
|
|
41
|
+
## 必备环境
|
|
42
|
+
|
|
43
|
+
- DeepSeek Harness Developer Preview(Web 或 Desktop profile)。
|
|
44
|
+
- Node.js `^22.19.0 || >=24.0.0`。
|
|
45
|
+
- pnpm(Harness 当前使用 `11.7.0`)。
|
|
46
|
+
- **Gitee CLI 是必需依赖**,并且需要包含 `gitee team item search` 命令的 Team 版本。
|
|
47
|
+
- Gitee CLI 中已配置并登录可访问番茄的 profile,默认使用 `osc`。
|
|
48
|
+
|
|
49
|
+
安装插件前建议先检查:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
gitee version
|
|
53
|
+
gitee config list
|
|
54
|
+
gitee team item search --profile osc --page 1 --page-size 1 --iql "负责人 = currentUser()"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
插件只调用本机的 `gitee` CLI,不保存 Gitee PAT 或登录信息。
|
|
58
|
+
|
|
59
|
+
DSH Desktop 从 Finder 启动时可能无法继承终端的完整 `PATH`。如果 Desktop 中提示找不到 `gitee`,请把 `executable` 配置为 Gitee CLI 的绝对路径,可通过下面的命令查询:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
command -v gitee
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 安装
|
|
66
|
+
|
|
67
|
+
### 从 npm 安装(发布 npm 后推荐)
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npx @deepseek-ai/dsh plugin --profile web add @stephen1620/dsh-tomato-board
|
|
71
|
+
npx @deepseek-ai/dsh web
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 从 GitHub 安装
|
|
75
|
+
|
|
76
|
+
仓库已包含构建产物,可以直接安装指定版本:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npx @deepseek-ai/dsh plugin --profile web add \
|
|
80
|
+
"github:StephenLGF/dsh-plugins#path:/plugins/tomato-board"
|
|
81
|
+
npx @deepseek-ai/dsh web
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
也可以 clone 后从本地目录安装:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git clone https://github.com/StephenLGF/dsh-plugins.git
|
|
88
|
+
cd dsh-plugins/plugins/tomato-board
|
|
89
|
+
npx @deepseek-ai/dsh plugin --profile web add .
|
|
90
|
+
npx @deepseek-ai/dsh web
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
安装命令会识别包中的 `dsh.bundle`,自动把 `cordis.patch.yml` 加入 Web profile,无需手工修改 Harness 配置。
|
|
94
|
+
|
|
95
|
+
安装到 DSH Desktop 时,将命令中的 profile 改为 `desktop`:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
npx @deepseek-ai/dsh plugin --profile desktop add .
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
卸载:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npx @deepseek-ai/dsh plugin --profile web remove @stephen1620/dsh-tomato-board
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 配置
|
|
108
|
+
|
|
109
|
+
默认配置位于 [`cordis.patch.yml`](./cordis.patch.yml):
|
|
110
|
+
|
|
111
|
+
| 字段 | 默认值 | 说明 |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| `executable` | `gitee` | Gitee CLI 可执行文件名或绝对路径 |
|
|
114
|
+
| `profile` | `osc` | Gitee CLI profile |
|
|
115
|
+
| `iql` | 当前用户负责的 Story、Bug 等 | 工作台查询条件 |
|
|
116
|
+
| `tomatoOrigin` | `https://osc.gitee.work` | 番茄站点地址 |
|
|
117
|
+
| `tomatoTenant` | `xly-poc` | 番茄租户 |
|
|
118
|
+
|
|
119
|
+
如需覆盖配置,可在 Harness 的用户 patch 中对 `tomato-board` 节点进行修改。最终生效配置可用下面的命令检查:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
npx @deepseek-ai/dsh --profile web --dump-config
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## 开发与构建
|
|
126
|
+
|
|
127
|
+
该插件依赖 Harness 尚未独立发布的 workspace 包,因此源码构建需要放在 Harness monorepo 中进行。不要使用目录软链;Harness 的插件发现不会遍历该软链。
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
git clone https://github.com/deepseek-ai/deepseek-harness.git
|
|
131
|
+
cd deepseek-harness
|
|
132
|
+
pnpm install
|
|
133
|
+
|
|
134
|
+
rsync -a --delete \
|
|
135
|
+
--exclude .git \
|
|
136
|
+
--exclude node_modules \
|
|
137
|
+
--exclude lib \
|
|
138
|
+
/absolute/path/to/dsh-plugins/plugins/tomato-board/ \
|
|
139
|
+
packages/client/tomato-board/
|
|
140
|
+
|
|
141
|
+
pnpm exec tsc -b packages/client/tomato-board
|
|
142
|
+
pnpm --dir packages/client/tomato-board bundle
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
构建完成后,把 `packages/client/tomato-board/lib/` 同步回本仓库。`lib` 会提交到 Git,确保 GitHub 安装不依赖用户本地具备 Harness 源码构建环境。
|
|
146
|
+
|
|
147
|
+
## 发布
|
|
148
|
+
|
|
149
|
+
版本号采用语义化版本。建议每次发布同时创建 Git tag 和 GitHub Release:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
cd plugins/tomato-board
|
|
153
|
+
npm version patch --no-git-tag-version # 或 minor / major
|
|
154
|
+
git add package.json
|
|
155
|
+
git commit -m "release(tomato-board): v0.1.1"
|
|
156
|
+
git tag tomato-board-v0.1.1
|
|
157
|
+
git push origin main --follow-tags
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
如果需要 npm 一键安装,再执行:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npm login
|
|
164
|
+
pnpm publish --access public
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
作用域包首次发布必须使用 `--access public`。发布前应确认 npm 账号拥有 `@stephenlgf` scope;如果没有,需要改用自己可发布的 scope,并同步修改包名、README 安装命令和 Harness 卸载命令。
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
[MIT](./LICENSE)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
- insert:
|
|
2
|
+
- id: tomato-board
|
|
3
|
+
name: '@stephen1620/dsh-tomato-board'
|
|
4
|
+
config:
|
|
5
|
+
executable: gitee
|
|
6
|
+
profile: osc
|
|
7
|
+
iql: "负责人 = currentUser() and 所属空间 in ['Gitee-Team', 'Gitee-Test'] and 类型 in ['Story', 'EnablerStory', 'Bug', '测试缺陷']"
|
|
8
|
+
tomatoOrigin: https://osc.gitee.work
|
|
9
|
+
tomatoTenant: xly-poc
|