dsh-pr-release-workspace 0.0.0-stage → 0.1.1
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 +194 -2
- package/README.zh.md +167 -0
- package/cordis.patch.yml +12 -0
- package/icon.svg +8 -0
- package/lib/client.js +2745 -0
- package/lib/host/drafts.js +315 -0
- package/lib/host/exec.js +284 -0
- package/lib/host/pull.js +793 -0
- package/lib/host/release.js +584 -0
- package/lib/host/routes.js +456 -0
- package/lib/host/search.js +467 -0
- package/lib/index.js +249 -0
- package/locale/en.json +110 -0
- package/locale/zh.json +110 -0
- package/package.json +74 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tangyixiao
|
|
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,195 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-pr-release-workspace
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A pull request and release workspace for [DeepSeek Harness](https://github.com/deepseek-harness). It adds one sidebar entry that
|
|
4
|
+
does two jobs: review pull requests without leaving DSH, and check whether a release
|
|
5
|
+
actually shipped.
|
|
6
|
+
|
|
7
|
+
The second job is the reason this plugin exists. A merged pull request, a green CI run, a
|
|
8
|
+
published npm version, a GitHub Release, a merged market pull request, a market manifest
|
|
9
|
+
entry and a live index update are seven different facts. Most release dashboards show one
|
|
10
|
+
of them and call it done. This one takes the pull request as its target and shows the other
|
|
11
|
+
six as separate verdicts, refusing to say "released" until every one of them passes.
|
|
12
|
+
|
|
13
|
+
Licence: MIT. Author: Tang Yixiao.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
| Requirement | Why |
|
|
20
|
+
| --- | --- |
|
|
21
|
+
| DSH `>= 0.1.6-alpha.2` | The panel uses the `sidebar.panellist` and `main` slots |
|
|
22
|
+
| Node `>= 22` | The host half uses `AbortSignal.any` |
|
|
23
|
+
| [GitHub CLI](https://cli.github.com/) `gh` on `PATH`, signed in (`gh auth login`) | Every GitHub read goes through your existing `gh` session |
|
|
24
|
+
| `read:org` scope for the team tab | `gh auth refresh -s read:org` if your token lacks it |
|
|
25
|
+
|
|
26
|
+
The plugin never asks for a token of its own and never reads a browser cookie. It shells
|
|
27
|
+
out to `gh`, so whatever `gh` can see is what the panel can see, and nothing more.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
dsh plugin --profile <profile> add dsh-pr-release-workspace
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
In the desktop app the active profile is managed by the application itself, so install the
|
|
38
|
+
package from the plugin market inside DSH, or add it to a profile you control:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
dsh plugin --profile web add dsh-pr-release-workspace
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Then restart the host and open **Pull requests** in the left sidebar.
|
|
45
|
+
|
|
46
|
+
To try it from a local checkout instead:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
dsh plugin --profile <profile> add file:/absolute/path/to/dsh-pr-release-workspace
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Uninstall
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
dsh plugin --profile <profile> remove dsh-pr-release-workspace
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Local review notes survive an uninstall. Delete `~/.dsh/storages/dsh-pr-release-workspace/drafts.json`
|
|
59
|
+
if you want them gone too.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## What you get
|
|
64
|
+
|
|
65
|
+
### The sidebar entry
|
|
66
|
+
|
|
67
|
+
One icon in the left rail. The panel has two halves, switched by a pair of pills at the top.
|
|
68
|
+
|
|
69
|
+
### Pull requests
|
|
70
|
+
|
|
71
|
+
Three lists, each loaded independently:
|
|
72
|
+
|
|
73
|
+
| List | Query |
|
|
74
|
+
| --- | --- |
|
|
75
|
+
| Created by me | `is:pr author:@me is:open` |
|
|
76
|
+
| Awaiting my review | `is:pr review-requested:@me is:open` |
|
|
77
|
+
| Awaiting my team | `is:pr team-review-requested:<your-teams> is:open` |
|
|
78
|
+
|
|
79
|
+
A list that could not be loaded says so, per list. A list whose team membership could not be
|
|
80
|
+
confirmed says so — it is never rendered as "no results", because "we could not check" and
|
|
81
|
+
"there is nothing" are different statements.
|
|
82
|
+
|
|
83
|
+
The search box takes a pasted `https://github.com/owner/repo/pull/123` URL, the
|
|
84
|
+
`owner/repo#123` shorthand, or free text passed to GitHub's search.
|
|
85
|
+
|
|
86
|
+
### The pull request view
|
|
87
|
+
|
|
88
|
+
Four tabs:
|
|
89
|
+
|
|
90
|
+
- **Overview** — author, description, base and head branches, mergeable state, file and
|
|
91
|
+
line counts, and the CI rollup with one row per check.
|
|
92
|
+
- **Files** — the changed file list with line totals. Expand a file for its diff, written as
|
|
93
|
+
old-side and new-side text and rendered by the host's own diff component.
|
|
94
|
+
- **Comments** — review verdicts, conversation comments, and inline comments with their file
|
|
95
|
+
and line.
|
|
96
|
+
- **My notes** — review notes you write locally, per file and per line.
|
|
97
|
+
|
|
98
|
+
CI is reported as one of: passed, failed, pending, cancelled, only skipped checks, not
|
|
99
|
+
configured, or unknown. An empty check list is **not configured**, never "passed". A
|
|
100
|
+
cancelled run is not a pass. This distinction matters: a repository with no CI has not
|
|
101
|
+
verified anything.
|
|
102
|
+
|
|
103
|
+
### Release state
|
|
104
|
+
|
|
105
|
+
Fill in the target — owner, repo, tag, commit SHA, npm package name, version, and the market
|
|
106
|
+
repository plus pull request number — and the panel reports six independent facts:
|
|
107
|
+
|
|
108
|
+
| Fact | Read from |
|
|
109
|
+
| --- | --- |
|
|
110
|
+
| Commit checks | check runs on the exact commit |
|
|
111
|
+
| GitHub Release | the release for the tag |
|
|
112
|
+
| npm | the published version and the `latest` dist-tag |
|
|
113
|
+
| Market pull request | the market repository's pull request |
|
|
114
|
+
| Market manifest | `market.json` on the market's default branch |
|
|
115
|
+
| Live index | the published market index URL |
|
|
116
|
+
|
|
117
|
+
Each row shows its own verdict, its reason, and the evidence it read. The summary reads
|
|
118
|
+
"every fact checks out" only when all six pass.
|
|
119
|
+
|
|
120
|
+
Three cases this is built to catch, all observed in the wild:
|
|
121
|
+
|
|
122
|
+
- The market pull request is merged, but the manifest on `main` lists a *newer* version than
|
|
123
|
+
the one you asked about — so merging that PR did not publish your version.
|
|
124
|
+
- npm has the version, but `latest` points somewhere else — so a plain `npm install` does not
|
|
125
|
+
get it.
|
|
126
|
+
- The release exists, but CI on that commit is still pending — so nobody verified the
|
|
127
|
+
artifact.
|
|
128
|
+
|
|
129
|
+
## What it does not do
|
|
130
|
+
|
|
131
|
+
- **It does not write to GitHub.** No comments, no reviews, no approvals, no merges. Every
|
|
132
|
+
one of those is a decision with a name attached, and the panel is not where you make it.
|
|
133
|
+
Each pull request view links to GitHub for those actions.
|
|
134
|
+
- **It does not read browser cookies or store a token.** Authentication is `gh`'s.
|
|
135
|
+
- **It does not write pull request content to logs.** Errors are flattened to a code before
|
|
136
|
+
they are logged; a GitHub error message can quote private text.
|
|
137
|
+
- **It does not cache pull request content on disk.** Lists and diffs are re-fetched. The
|
|
138
|
+
only file it writes is your own local notes.
|
|
139
|
+
- **It does not render Markdown or HTML from GitHub.** Descriptions show as text with
|
|
140
|
+
`http(s)` links; a Markdown renderer is a large attack surface for a panel that can reach a
|
|
141
|
+
local HTTP route.
|
|
142
|
+
|
|
143
|
+
## Local notes and privacy
|
|
144
|
+
|
|
145
|
+
Notes are stored at `~/.dsh/storages/dsh-pr-release-workspace/drafts.json` (or under
|
|
146
|
+
`$DSH_HOME`). Each note records the pull request, the commit it was written against, the
|
|
147
|
+
file, and the line.
|
|
148
|
+
|
|
149
|
+
A note written against an earlier commit is marked **stale** rather than moved to whatever
|
|
150
|
+
now occupies that line. The read path never rewrites a note's position.
|
|
151
|
+
|
|
152
|
+
Nothing leaves the machine. Nothing is posted. Deleting a note deletes it.
|
|
153
|
+
|
|
154
|
+
## Routes
|
|
155
|
+
|
|
156
|
+
The client talks to the host on `POST /dsh-pr-release-workspace/<endpoint>`. The route
|
|
157
|
+
accepts only `POST` with `content-type: application/json`, rejects cross-site and foreign
|
|
158
|
+
`Origin` requests, caps bodies at 1 MiB, and answers with a JSON envelope:
|
|
159
|
+
`{"ok":true,"value":…}` or `{"ok":false,"error":{"code":…,"message":…}}`. Endpoint names and
|
|
160
|
+
GitHub owner/repo/number arguments are validated against a fixed pattern before they reach
|
|
161
|
+
`gh`; `gh` is spawned with an argument array, never a shell string.
|
|
162
|
+
|
|
163
|
+
## Known limits
|
|
164
|
+
|
|
165
|
+
- `gh pr view --json files` silently truncates at 100 files. The panel reports the real
|
|
166
|
+
changed-file count and says when it is showing fewer.
|
|
167
|
+
- Diffs over 300 files cannot be fetched as one diff. The panel reassembles them from
|
|
168
|
+
per-file patches and says so.
|
|
169
|
+
- A binary file has no text sides and renders as "binary file".
|
|
170
|
+
- GitHub's search API allows 30 requests a minute. Reloading the three lists in a tight loop
|
|
171
|
+
will hit the limit; the panel then says how long to wait.
|
|
172
|
+
- DSH `0.1.6-alpha.2` has no native diff or review panel to reuse, so the diff view is built
|
|
173
|
+
on the `DiffBlock` component that ships with `@deepseek-ai/dsh-client-ui-primitives`.
|
|
174
|
+
|
|
175
|
+
## Development
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
npm install
|
|
179
|
+
npm run build # concatenates src/client/*.js into lib/client.js
|
|
180
|
+
npm test # node --test, 100+ cases
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
There is no bundler. `lib/client.js` is assembled from numbered fragments in `src/client/`,
|
|
184
|
+
each of which appends to one namespace object, and is wrapped in the loader call DSH expects.
|
|
185
|
+
The numeric prefixes are load order and must not be renumbered.
|
|
186
|
+
|
|
187
|
+
`lib/host/` is plain ESM, no build step.
|
|
188
|
+
|
|
189
|
+
See `docs/baseline.md` for the host-version research this was built against,
|
|
190
|
+
`docs/research/gh-api.md` for the verified `gh` behaviour table, and
|
|
191
|
+
`docs/research/native-review.md` for what native capability exists to reuse (almost none).
|
|
192
|
+
|
|
193
|
+
## Licence
|
|
194
|
+
|
|
195
|
+
MIT — see [LICENSE](./LICENSE).
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# dsh-pr-release-workspace
|
|
2
|
+
|
|
3
|
+
[DeepSeek Harness](https://github.com/deepseek-harness) 的拉取请求与发布工作台。左侧加一个入口,做两件事:
|
|
4
|
+
不离开 DSH 就能看 PR,以及核验一次发布到底有没有真的发出去。
|
|
5
|
+
|
|
6
|
+
第二件事才是这个插件存在的理由。PR 已合并、CI 已通过、npm 已发布、GitHub Release 已发布、
|
|
7
|
+
市场 PR 已合并、市场清单里有这一版、线上索引已更新 —— 这是七个不同的事实。多数发布面板显示其中
|
|
8
|
+
一个就当成了全部。这个面板并排显示六个判据,六个都通过之前不会说「已发布」。
|
|
9
|
+
|
|
10
|
+
许可证:MIT。作者:Tang Yixiao。
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 环境要求
|
|
15
|
+
|
|
16
|
+
| 要求 | 原因 |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| DSH `>= 0.1.6-alpha.2` | 面板用到 `sidebar.panellist` 和 `main` 两个扩展点 |
|
|
19
|
+
| Node `>= 22` | 宿主侧用到 `AbortSignal.any` |
|
|
20
|
+
| `PATH` 上有 [GitHub CLI](https://cli.github.com/) `gh`,并且已登录(`gh auth login`) | 所有 GitHub 读取都走你现有的 `gh` 会话 |
|
|
21
|
+
| 「团队待审」需要 `read:org` scope | 没有就 `gh auth refresh -s read:org` |
|
|
22
|
+
|
|
23
|
+
插件不申请自己的 token,也不读浏览器 Cookie。它就是调 `gh` —— `gh` 能看到的,面板才能看到,不会更多。
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 安装
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
dsh plugin --profile <profile> add dsh-pr-release-workspace
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
桌面版的当前 profile 由应用自己管理,所以请在 DSH 的插件市场里装,或者加到你自己的 profile:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
dsh plugin --profile web add dsh-pr-release-workspace
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
重启宿主,然后在左侧栏打开 **拉取请求**。
|
|
40
|
+
|
|
41
|
+
从本地目录试用:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
dsh plugin --profile <profile> add file:/绝对路径/dsh-pr-release-workspace
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 卸载
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
dsh plugin --profile <profile> remove dsh-pr-release-workspace
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
本地批注不会因卸载消失。要一起清掉就删
|
|
54
|
+
`~/.dsh/storages/dsh-pr-release-workspace/drafts.json`。
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 功能
|
|
59
|
+
|
|
60
|
+
### 侧边栏入口
|
|
61
|
+
|
|
62
|
+
左侧栏一个图标,面板顶部用两个 pill 切换两半。
|
|
63
|
+
|
|
64
|
+
### 拉取请求
|
|
65
|
+
|
|
66
|
+
三个列表,各自独立加载:
|
|
67
|
+
|
|
68
|
+
| 列表 | 查询 |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| 我创建的 | `is:pr author:@me is:open` |
|
|
71
|
+
| 待我审查 | `is:pr review-requested:@me is:open` |
|
|
72
|
+
| 需要我的团队审查 | `is:pr team-review-requested:<你的团队> is:open` |
|
|
73
|
+
|
|
74
|
+
某个列表加载失败就单独说失败。某个列表的团队成员身份无法确认,也单独说明 —— 绝不渲染成「没有内容」,
|
|
75
|
+
因为「没法确认」和「确实没有」是两句话。
|
|
76
|
+
|
|
77
|
+
搜索框接受粘贴的 `https://github.com/owner/repo/pull/123`、`owner/repo#123` 简写,或交给 GitHub 搜索的
|
|
78
|
+
自由文本。
|
|
79
|
+
|
|
80
|
+
### PR 详情
|
|
81
|
+
|
|
82
|
+
四个标签页:
|
|
83
|
+
|
|
84
|
+
- **概览** —— 作者、描述、base/head 分支、可否合并、文件与行数、CI 汇总(每个 check 一行)。
|
|
85
|
+
- **文件** —— 变更文件列表与行数统计。展开就能看 diff,按旧侧/新侧文本渲染,用宿主自带的 diff 组件。
|
|
86
|
+
- **评论** —— 评审结论、会话评论、带文件与行号的行内评论。
|
|
87
|
+
- **我的批注** —— 你自己按文件和行写的本地评审批注。
|
|
88
|
+
|
|
89
|
+
CI 只会是这几种之一:通过、失败、进行中、已取消、只有跳过的检查、未配置、未知。空的检查列表是
|
|
90
|
+
**未配置**,不是「通过」。已取消的运行也不是通过。仓库根本没配 CI 的时候,它什么也没验证。
|
|
91
|
+
|
|
92
|
+
### 发布状态
|
|
93
|
+
|
|
94
|
+
填目标 —— owner、repo、tag、commit SHA、npm 包名、版本,以及市场仓库与 PR 号 —— 面板报告六个独立判据:
|
|
95
|
+
|
|
96
|
+
| 判据 | 读取来源 |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| 提交检查 | 该 commit 上的 check runs |
|
|
99
|
+
| GitHub Release | 该 tag 的 release |
|
|
100
|
+
| npm | 已发布版本与 `latest` dist-tag |
|
|
101
|
+
| 市场 PR | 市场仓库的那个 PR |
|
|
102
|
+
| 市场清单 | 市场默认分支上的 `market.json` |
|
|
103
|
+
| 线上索引 | 已发布的索引 URL |
|
|
104
|
+
|
|
105
|
+
每行显示自己的结论、原因,以及它读到的证据。六项全通过时汇总行才显示「全部判据通过」。
|
|
106
|
+
|
|
107
|
+
这三类情况是它专门要抓的,都是在真实数据里见过的:
|
|
108
|
+
|
|
109
|
+
- 市场 PR 已合并,但 `main` 上的清单里列的是**更新**的版本 —— 合并那个 PR 并没有发布你这一版。
|
|
110
|
+
- npm 上有这一版,但 `latest` 指向别处 —— 所以直接 `npm install` 拿不到。
|
|
111
|
+
- Release 有了,但该 commit 的 CI 还在进行 —— 那就是没人验证过产物。
|
|
112
|
+
|
|
113
|
+
## 它不做什么
|
|
114
|
+
|
|
115
|
+
- **不向 GitHub 写入。** 不发评论、不提交评审、不 Approve、不合并。这些动作都带着你的名字,应该由你来
|
|
116
|
+
做,面板只负责把每项链接回 GitHub。
|
|
117
|
+
- **不读浏览器 Cookie,不存 token。** 认证是 `gh` 的事。
|
|
118
|
+
- **不把 PR 内容写进日志。** 错误在记录前先压成错误码;GitHub 的错误消息里可能带着私有文本。
|
|
119
|
+
- **不在磁盘上缓存 PR 内容。** 列表和 diff 每次重新取。它唯一写的文件是你自己的批注。
|
|
120
|
+
- **不渲染 GitHub 来的 Markdown 或 HTML。** 描述按纯文本显示,只把 `http(s)` 链接变成可点链接;
|
|
121
|
+
对一个能访问本机 HTTP 路由的面板来说,Markdown 渲染器是过大的攻击面。
|
|
122
|
+
|
|
123
|
+
## 本地批注与隐私
|
|
124
|
+
|
|
125
|
+
批注存在 `~/.dsh/storages/dsh-pr-release-workspace/drafts.json`(或 `$DSH_HOME` 下)。每条记录 PR、
|
|
126
|
+
写入时的 commit、文件、行号。
|
|
127
|
+
|
|
128
|
+
写在更早 commit 上的批注会被标成 **stale**(对应行可能已经移动),而不是被悄悄挪到那个位置现在的
|
|
129
|
+
内容上。读取路径从不改写批注位置。
|
|
130
|
+
|
|
131
|
+
任何内容都不离开这台机器,什么都不会发出去。删掉就是删掉。
|
|
132
|
+
|
|
133
|
+
## 路由
|
|
134
|
+
|
|
135
|
+
客户端通过 `POST /dsh-pr-release-workspace/<endpoint>` 与宿主通信。该路由只接受 `POST` 且
|
|
136
|
+
`content-type: application/json`,拒绝跨站与外部 `Origin`,请求体上限 1 MiB,统一返回 JSON 信封:
|
|
137
|
+
`{"ok":true,"value":…}` 或 `{"ok":false,"error":{"code":…,"message":…}}`。端点名与 GitHub 的
|
|
138
|
+
owner/repo/number 参数在进入 `gh` 之前都会按固定模式校验;`gh` 以参数数组启动,从不经过 shell 字符串。
|
|
139
|
+
|
|
140
|
+
## 已知限制
|
|
141
|
+
|
|
142
|
+
- `gh pr view --json files` 在 100 个文件处静默截断。面板会报告真实的变更文件数,并说明当前只显示了其中多少。
|
|
143
|
+
- 超过 300 个文件的 diff 无法一次取回。面板改用逐文件 patch 重组,并注明这一点。
|
|
144
|
+
- 二进制文件没有文本两侧,显示为「二进制文件」。
|
|
145
|
+
- GitHub 搜索接口限速 30 次/分钟。连续快速刷新三个列表会触限,面板会告诉你还要等多久。
|
|
146
|
+
- DSH `0.1.6-alpha.2` 没有原生 diff 或评审面板可复用,所以 diff 视图建在
|
|
147
|
+
`@deepseek-ai/dsh-client-ui-primitives` 自带的 `DiffBlock` 之上。
|
|
148
|
+
|
|
149
|
+
## 开发
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
npm install
|
|
153
|
+
npm run build # 把 src/client/*.js 拼成 lib/client.js
|
|
154
|
+
npm test # node --test,100+ 个用例
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
没有打包器。`lib/client.js` 由 `src/client/` 下按编号排列的片段拼装而成,每个片段往同一个命名空间
|
|
158
|
+
对象上挂东西,最后包进 DSH 期望的 loader 调用。数字前缀就是加载顺序,不能重新编号。
|
|
159
|
+
|
|
160
|
+
`lib/host/` 是纯 ESM,没有构建步骤。
|
|
161
|
+
|
|
162
|
+
宿主版本调研见 `docs/baseline.md`,`gh` 行为实测表见 `docs/research/gh-api.md`,可复用的原生能力调研
|
|
163
|
+
见 `docs/research/native-review.md`(几乎没有)。
|
|
164
|
+
|
|
165
|
+
## 许可证
|
|
166
|
+
|
|
167
|
+
MIT —— 见 [LICENSE](./LICENSE)。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Loader rows for the PR & release workspace.
|
|
2
|
+
#
|
|
3
|
+
# `name` must be this package's name: the loader resolves it from the profile's
|
|
4
|
+
# node_modules by package name, so a renamed row silently disables the bundle.
|
|
5
|
+
#
|
|
6
|
+
# Local hot reload: replace `name` with an absolute `file://` URL of lib/index.js
|
|
7
|
+
# plus `?v=N`. The loader only re-imports when the row name changes, and Node ESM
|
|
8
|
+
# keys its cache on the full URL, so bump N after editing lib/*.js and re-enable
|
|
9
|
+
# the bundle.
|
|
10
|
+
- insert:
|
|
11
|
+
- id: pr-release-workspace
|
|
12
|
+
name: dsh-pr-release-workspace
|
package/icon.svg
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" role="img" aria-label="Pull request with a review check" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<circle cx="6.5" cy="5.6" r="2.3"/>
|
|
3
|
+
<circle cx="6.5" cy="18.4" r="2.3"/>
|
|
4
|
+
<path d="M6.5 7.9v8.2"/>
|
|
5
|
+
<circle cx="16.1" cy="8.6" r="2.3"/>
|
|
6
|
+
<path d="M6.5 13.6c0-3 2.3-5 5.1-5h2.2"/>
|
|
7
|
+
<path d="M13.9 17.8l2.2 2.2 4-4.3"/>
|
|
8
|
+
</svg>
|