dsh-chat-embed 0.6.6 → 0.6.7
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/README.md +9 -1
- package/client.js +1 -1
- package/docs/architecture.md +1 -1
- package/docs/publishing.md +39 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -287,7 +287,14 @@ plugin_manager { "action": "install_bundle", "target": "<本仓库克隆路径>"
|
|
|
287
287
|
|
|
288
288
|
### 发布与分发
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
一条命令发版(门禁 → 单提交 → 推送 → 等 CI → 发布 npm → 打 tag → 建 Release,中途失败可重跑续做):
|
|
291
|
+
|
|
292
|
+
```powershell
|
|
293
|
+
node scripts/release.mjs 0.6.7 --summary "这次改了什么"
|
|
294
|
+
node scripts/release.mjs 0.6.7 --summary "..." --dry-run # 只看计划
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
发版细节、CI 与 dependabot、插件列表投稿:见 **[docs/publishing.md](docs/publishing.md)**。
|
|
291
298
|
|
|
292
299
|
---
|
|
293
300
|
|
|
@@ -323,6 +330,7 @@ plugin_manager { "action": "install_bundle", "target": "<本仓库克隆路径>"
|
|
|
323
330
|
|
|
324
331
|
| 版本 | 变化 |
|
|
325
332
|
| --- | --- |
|
|
333
|
+
| `0.6.7` | 发版脚本:一条命令完成 bump/gate/提交/推送/等 CI/发布/打 tag/建 release;新增 dependabot 自动维护固定 SHA 的 Action |
|
|
326
334
|
| `0.6.6` | 元数据同步版:把 `engines.node` 收紧到 `>=22.14.0`、门禁脚本从 `prepublishOnly` 换成 `prepack`(同时覆盖 `npm pack` 与 `npm publish`)落到 npm 上;新增 CI 工作流(Node 22/24 跑门禁,并校验 tag 与 `BUILD` 一致)。无功能变化 |
|
|
327
335
|
| `0.6.5` | 设置菜单标题与诊断卡片显示自身版本号;「检查补丁配置」改为一次性开关:不再内联渲染报告,而是打开新会话并把已知事实预填进输入框(借用 DSH「创建你的插件」的 `uiWorkspace.startSession` 用法) |
|
|
328
336
|
| `0.6.3` | 自检报告改为一次性:关闭设置菜单即清除,重新打开不再显示上次的报告 |
|
package/client.js
CHANGED
|
@@ -103,7 +103,7 @@ window.__ModuleLoader__.load({
|
|
|
103
103
|
let openRightTabImpl = () => {}
|
|
104
104
|
|
|
105
105
|
/** Build identity, surfaced in the panel so a packaged app can be diagnosed. */
|
|
106
|
-
const BUILD = '0.6.
|
|
106
|
+
const BUILD = '0.6.7'
|
|
107
107
|
|
|
108
108
|
/** Where a re-applied instance finds the one it must take over from. */
|
|
109
109
|
const INSTANCE_KEY = '__DSH_CHAT_EMBED_INSTANCE__'
|
package/docs/architecture.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
本文记录 `client.js` 里每一条**反直觉**的实现决策、支撑它的证据,以及升级桌面壳时必须重新验证的清单。
|
|
4
4
|
|
|
5
5
|
目标运行环境:**`@deepseek-ai/dsh-desktop 0.2.2-rc.1`(Electron / Chromium)**。
|
|
6
|
-
当前实现:**v0.6.
|
|
6
|
+
当前实现:**v0.6.7**(`client.js` 约 3985 行,85 项契约测试)。
|
|
7
7
|
|
|
8
8
|
> **架构一句话**:聊天页直接渲染在**席位的布局盒**里(`.dce-panel.dce-inline`,`width/height:100%`),几何完全交给 CSS;席位只有两个 —— 中央主面板(`main`)和右栏聊天 tab —— 二者互斥,**哪边点哪边接管**,切换时 guest 重建一次并回到上次会话。
|
|
9
9
|
|
package/docs/publishing.md
CHANGED
|
@@ -22,29 +22,51 @@
|
|
|
22
22
|
|
|
23
23
|
仓库没有运行时依赖,也没有 lock 文件,所以正常情况下 `npm ci` 会跳过;一旦加了依赖,锁文件出现后自动生效。
|
|
24
24
|
|
|
25
|
+
`.github/dependabot.yml`:每周一维护 `ci.yml` 里固定成 commit SHA 的 action。我们钉的是 `uses: owner/action@<40 位 SHA> # vX.Y.Z` 这种形式,Dependabot 认得行尾的版本注释,会把 SHA 换成新版本的完整 SHA 并同步更新注释。同周的 action 升级合成一个 PR。包本身没有依赖,所以没有声明 npm 生态。
|
|
26
|
+
|
|
25
27
|
## 发版步骤
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
一条命令:
|
|
28
30
|
|
|
29
31
|
```powershell
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
node scripts/release.mjs 0.6.7 --summary "一句话说明这次改了什么"
|
|
33
|
+
```
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
# --orphan 重写 + gc --prune=now + 强推 master
|
|
35
|
+
它按顺序做六件事。**顺序的理由:先发布,后打 tag。** `npm publish` 是唯一不可逆的一步(72 小时后只能 deprecate),tag 与 Release 随时可删可重做;先做不可逆的,失败就停,不会留下"GitHub 有 Release、npm 没有包"的幽灵版本。
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
| 阶段 | 做什么 | 已经做过时怎么判断 |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| bump | 改 `package.json` / `client.js` 的 `BUILD` / README 版本历史 / 两份文档 | 值相同就不动 |
|
|
40
|
+
| gate | `npm run check` | — |
|
|
41
|
+
| commit | `--orphan` 重写 + `gc --prune=now`,保持单提交 | — |
|
|
42
|
+
| push | 强推 master,触发 CI | — |
|
|
43
|
+
| ci | 等这次推送的 CI 跑完,红了就停 | — |
|
|
44
|
+
| publish | `npm publish` | registry 上已有该版本则跳过 |
|
|
45
|
+
| tag | 打 tag 并推送(CI 再校验一次) | tag 已存在则跳过 |
|
|
46
|
+
| release | `npm run pack:dist` + `gh release create` | Release 已存在则跳过 |
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
npm publish
|
|
48
|
+
每个阶段都先检查现状,所以**中途失败后重跑同一条命令即可续做**,不会重复发布或重复建 tag。
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
50
|
+
常用变体:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
node scripts/release.mjs 0.6.7 --summary "..." --dry-run # 只打印计划,不改任何东西
|
|
54
|
+
node scripts/release.mjs 0.6.7 --summary "..." --stop-after gate # 做完 bump+门禁就停
|
|
55
|
+
node scripts/release.mjs 0.6.7 --summary "..." --notes dist\notes.md # Release 用独立说明文件
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
提交信息由脚本从**当前那条提交**继承:保留原来的项目描述,只换标题里的版本号,并把 `--summary` 作为正文第一段。这样单提交里那份长描述不会因为发版而丢失。
|
|
59
|
+
|
|
60
|
+
### 手动等价步骤(脚本出问题时的兜底)
|
|
45
61
|
|
|
46
|
-
|
|
47
|
-
npm run
|
|
62
|
+
```powershell
|
|
63
|
+
npm run check # 1. 本地门禁
|
|
64
|
+
# 2. --orphan 重写 + gc --prune=now + 强推 master
|
|
65
|
+
gh run list --repo poluce/dsh-chat-embed --limit 1 # 3. 等 CI 绿
|
|
66
|
+
npm publish # 4. 发布到 npm(prepack 会自动再跑一次门禁)
|
|
67
|
+
git tag v<版本> # 5. 打 tag 并推送
|
|
68
|
+
git push origin refs/tags/v<版本>
|
|
69
|
+
npm run pack:dist # 6. 打包 + 建 Release
|
|
48
70
|
gh release create v<版本> dist\dsh-chat-embed-<版本>.tgz --title "v<版本>" --notes-file dist\release-notes-<版本>.md
|
|
49
71
|
```
|
|
50
72
|
|
|
@@ -81,8 +103,8 @@ Get-FileHash $env:TEMP\check\dsh-chat-embed-<版本>.tgz -Algorithm SHA256
|
|
|
81
103
|
| --- | --- |
|
|
82
104
|
| 仓库 | <https://github.com/poluce/dsh-chat-embed> |
|
|
83
105
|
| Release | <https://github.com/poluce/dsh-chat-embed/releases> |
|
|
84
|
-
| 分发包 | `dsh-chat-embed-0.6.
|
|
85
|
-
| npm | `dsh-chat-embed@0.6.
|
|
106
|
+
| 分发包 | `dsh-chat-embed-0.6.7.tgz`(16 个文件,约 70 kB) |
|
|
107
|
+
| npm | `dsh-chat-embed@0.6.7`(<https://www.npmjs.com/package/dsh-chat-embed>,维护者 `poluce_auto`) |
|
|
86
108
|
| 商店图标 | `assets/icon-180.png`(180×180 PNG) |
|
|
87
109
|
| 商店截图 | `assets/screenshots/` + 仓库根 `screenshots.json`(6 张) |
|
|
88
110
|
|
|
@@ -101,7 +123,7 @@ dsh plugin --profile desktop add git+https://github.com/poluce/dsh-chat-embed.gi
|
|
|
101
123
|
|
|
102
124
|
1. 注册账号并完成邮箱验证:<https://www.npmjs.com/signup>;
|
|
103
125
|
2. 本机登录:`npm login`(浏览器确认或一次性密码;开了 2FA 输入验证码);
|
|
104
|
-
3. 发布:`npm publish`(`prepack` 自动跑门禁;包名 `dsh-chat-embed` 已发布 `0.6.
|
|
126
|
+
3. 发布:`npm publish`(`prepack` 自动跑门禁;包名 `dsh-chat-embed` 已发布 `0.6.7`);
|
|
105
127
|
4. 使用者随后只需:`dsh plugin --profile desktop add dsh-chat-embed`。
|
|
106
128
|
|
|
107
129
|
## 发布前后检查项
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-chat-embed",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"author": "poluce <fishsummer@126.com>",
|
|
5
5
|
"description": "Multi-tab AI chat embed for the DeepSeek Harness desktop app: DeepSeek, 豆包, ChatGPT, MiniMax, Kimi, Gemini and Grok, each signed in separately.",
|
|
6
6
|
"type": "module",
|