feat: 推到 master 后按版本号自动打 Release

更新说明写在 release-notes.md,中英文随安装包一起发布。README 不再累积更新记录。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
叫我小杨同学andCursor committed 2026-09-23 17:40:01 +08:00
1 parent 78ba6bdef7
commit d3d30a3819
4 files changed
+78 -203

No files matched your search

+53
View File
@@ -0,0 +1,53 @@
name: Release
on:
push:
branches:
- master
permissions:
contents: write
concurrency:
group: release-${{ github.repository }}
cancel-in-progress: false
jobs:
release:
if: github.repository == 'YuJunZhiXue/dsh-purge'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
version="$(node -p "require('./package.json').version")"
tag="v${version}"
if gh release view "$tag" >/dev/null 2>&1; then
echo "already published: $tag"
exit 0
fi
first="$(head -n 1 release-notes.md | tr -d '\r')"
if [ "$first" != "# ${version}" ]; then
echo "release-notes.md 第一行必须是 # ${version},现在是: ${first}"
exit 1
fi
zip="dsh-purge-${version}.zip"
if git rev-parse -q --verify "refs/tags/${tag}^{}" >/dev/null; then
commit="$(git rev-parse "refs/tags/${tag}^{}")"
git archive --format=zip --prefix="dsh-purge-${version}/" --output="$zip" "$commit"
gh release create "$tag" "$zip" --title "$tag" --notes-file release-notes.md
else
git archive --format=zip --prefix="dsh-purge-${version}/" --output="$zip" HEAD
args=(release create "$tag" "$zip" --target "$GITHUB_SHA" --title "$tag" --notes-file release-notes.md)
case "$version" in
*beta*|*alpha*|*rc*) args+=(--prerelease) ;;
esac
gh "${args[@]}"
fi
echo "published https://github.com/YuJunZhiXue/dsh-purge/releases/tag/${tag}"
+2 -102
View File
@@ -751,109 +751,9 @@ If nothing is found, set `DSH_BASE` / `DSH_DESKTOP_INSTALL`. No files are change
---
## Changelog
## Releases
### 1.1.14
- Rewind waits for `updateQueue` to finish. A queue item that is already gone no longer becomes an unhandled rejection that can take down the host (#32).
- The fallback rewind button records this rewind’s timestamp. The 1.2s poll does not open and refill the same rewind a second time (#33).
- When the text being restored belongs to a turn that is still open, the fork point is the last closed turn. The previous completed turn is no longer dropped. If that turn is still running and does not close within 8 seconds, rewind still fails instead of cutting an incomplete log (#34).
- The bash timeout patch is now one whole-line regular expression, and values that grew extra zeros are pulled back to 10 minutes. Startup no longer appends another zero (#22, #31).
- Patch replacement accepts regular expressions, and `$1` expands. A finished bundle-layout clean matches `persona: ""`, so the panel does not stay on pending. #39 is optional. The skipped hint now says the patch is not needed for this version, or the component is not installed.
- Beta versions already covered by the current stable release are hidden from the version list. When the commit does not match, 「当前」follows the local version number.
- Phase-1 no longer clears runtime context or the message allowlist. 梁神 and official plugin messages stay as they are.
### 1.1.13
- In-plugin updates rewrite `github:` and `git+https` to the GitHub `master.tar.gz` archive, so a reinstall does not need a local git (#30).
- A first install from the plugin hub still uses `git+https`. Without git, use the `master.tar.gz` URL above.
### 1.1.12
- **Beta is now the stable release.** Settings and `/skills` import a zip or folder into official `$DSH_HOME/skills`. DSH still owns match and load.
- Includes the 1.1.11 system-prompt fix: do not pin the previous full prompt (#29). The version list marks「当前」by commit. Local routes reject cross-origin requests. Patch #41 no longer keeps `dsh-purge:committed`.
### 1.1.11
- Settings splits Stable / Beta into two columns, each with its own list, switch, and rollback. 1.1.10 can reach this by Check update.
- **No Skill import in this release.** Skill joins stable in 1.1.12.
- **#29:** Stop pinning the previous full system prompt. That pin was meant to stop a new「系统提示词」card each step, but presets that append a section every assemble (梁神 `workspace-instructions`) turned it into “last full prompt + this step’s block”, so the prompt grew every step and prefix cache missed. Later turns only fold `prompt-inject` into persona, and do not fold a second copy when it is already there.
- The version list marks「当前」by commit. An older tag with the same 1.1.11 version is no longer current next to `master`.
- Local routes reject cross-origin requests, and updates only accept a known ref. Another webpage cannot apply, revert, uninstall, or switch.
- Patch #41 no longer keeps the `dsh-purge:committed` shortcut. Hosts that already applied the old patch need one more Apply to remove it.
### 1.1.10
- Saving or applying with both the prompt and the rule set empty is blocked and shows a dialog
- First-turn inject is complete; later turns no longer pin the previous full system prompt
- Settings / `/skills` can import a zip or folder into official `$DSH_HOME/skills`; DSH still owns match and load
- Settings can switch Stable / Beta and roll back to a published version; a rollback is pinned and will not auto-follow
### 1.1.9
- Removed the default prompt from the repository
<details>
<summary>Earlier versions</summary>
### 1.1.8
- Until the user saves a different prompt, the built-in default is used. Settings can restore the default.
### 1.1.7
- **#25:** After the first turn, do not pin the previous full system prompt. Inject `prompt-inject.md` once; later turns leave this turn’s other sections as assembled.
- **#26:** `dsh plugin add` / in-app update use GitHub `master.tar.gz`. A `.zip` URL is not a pnpm tarball (`ERR_PNPM_TARBALL_DECODE_GZIP`). Local overlay still downloads the zip for `tar` / Expand-Archive.
- Install docs split **Web / Desktop** defaults: Web uses official `dsh --profile web`; Desktop uses the built-in terminal `dsh plugin add <tar.gz>`.
- Desktop Apply / Restart / Uninstall only touch the running desktop install tree, not official Web / npm-global.
- Desktop package root follows the running `DSH Desktop.exe` (default or custom install folder).
### 1.1.6
- Settings **Uninstall** asks for confirmation, restores applied patches, then removes the plugin and restarts.
- The AI-assistant install block is install-only: no disk scan, no apply.
- Separate install commands for official Web / official EXE / community DSH Desktop. Desktop **Restart / Uninstall** relaunch `DSH Desktop.exe`.
### 1.1.5
- Manual Update: if `git pull --ff-only` fails, fetch + reset to `origin/master`, then zip overlay.
### 1.1.4
- Update check reads `package.json` at the GitHub commit SHA, instead of the stale jsDelivr `@master` cache or falling back to the local version.
### 1.1.3
- Prompt inject once on the first turn; later turns pin the committed system prompt instead of appending a second copy.
- Strip bundled `dsh-mnemon` context rows by default.
- Switching back from a subagent no longer puts the last sent message into the composer.
- Export a Cordis `{ apply }` default so the plugin tree can load.
### 1.1.2
- Custom OpenAI-compatible APIs no longer 400 on `developer` role: `#42` remaps it back to `system`.
- Settings rule sets: read / delete / save go through one POST so the browser no longer fails with `Failed to fetch`.
### 1.1.1
- Composer **Undo** / `/rewind`: main agent can rewind once or the last round (drop this round’s subagents); a subagent rewinds once.
- After rewind, the input box keeps the last user sentence, but sending again is a new turn — leftover inbox is cleared so the old prompt is not auto-sent.
- Optional unmatched patches count as skipped, not failed.
### 1.1.0
- Check update and download share one button: after a check, it becomes **Update** and the pill shows the remote version.
- Startup auto-checks GitHub `master` and downloads. `dsh plugin add` (zip / github) uses the official CLI; machines without git overlay `master.zip`. Uncommitted files in a git checkout are not auto-overwritten.
- **#16:** `#26` no longer applies bare identity replacements to YAML; apply rewrites `prefix`/`text` fold indent so the cordis preset mounts.
- **#15:** If there is text but it never reaches the model, 0.1.5 `complete:true` was dropping every section after assemble; `#41` folds inject back into the complete prompt.
- **#14:** Hub `api/plugins/download` is not a tarball; install from GitHub `master.zip` only.
### 1.0.0
- Version numbering reset.
- Settings: **Check update** reads GitHub `master`.
</details>
What changed, and the zip, are on [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases). To publish, bump the version in `package.json`, write Chinese and English notes in `release-notes.md`, and push `master`. Pushing the same version again does not publish another package.
## Notes
+2 -101
View File
@@ -738,108 +738,9 @@ prompt-inject.md 有内容? ──是──> 原样写入 dsh-purge systemPrompt
---
## 更新记录
## 更新
### 1.1.14
- 回退清队列时会等 `updateQueue` 结束。条目已经不在时不再变成未处理的拒绝,避免把宿主带崩(#32)。
- 兜底回退按钮成功后会记下这次的时间。1.2 秒后的轮询不会把同一次回退再打开、再回填一遍(#33)。
- 回填的是还没结束的那一句时,切点改到最后一个已闭合回合。不再多丢上一整轮。回合还在进行、8 秒内等不到结束时,仍然直接失败,不会按不完整日志去切(#34)。
- bash 超时补丁改成整行正则,并把已经多写出来的 0 收回到 10 分钟。每次启动不再给超时再补一个 0(#22,#31)。
- 补丁替换支持正则,`$1` 会展开。bundle 布局清洗完成后能认出 `persona: ""`,面板不再一直显示待应用。#39 改为可选。跳过说明改为「当前版本不需要或组件未安装」。
- 正式版已经追上的测试版不再出现在版本列表里。提交号对不上时,按本机版本号标「当前」。
- phase-1 不再清空 runtime context,也不改消息白名单。梁神和官方插件的消息照旧保留。
### 1.1.13
- 插件自己更新时,`github:` 和 `git+https` 改走 GitHub `master.tar.gz`,没装 git 也能重装(#30)。
- 第一次从插件市场安装仍会走 `git+https`。没装 git 时,直接用上面的 `master.tar.gz` 地址。
### 1.1.12
- **测试版转为正式版。** 设置页和 `/skills` 可把压缩包或文件夹导入官方 `$DSH_HOME/skills`。命中和加载仍由 DSH 负责。
- 带上 1.1.11 的系统提示修复:不再钉上一轮全文(#29)。版本列表按提交号标「当前」。本机接口拒绝跨站请求。补丁 #41 不再保留 `dsh-purge:committed`。
### 1.1.11
- 设置页把正式版和测试版左右分开,各自选版本、各自切换和回退。还在 1.1.10 的点「检测更新」就能升到这一版。
- **当时没有 Skill 导入。** Skill 从 1.1.12 起进入正式版。
- **#29:** 去掉「钉住上一条系统提示全文」。起初为了避免每步追加「系统提示词」,把上一轮全文钉回去;和每轮追加 section 的预设(梁神的 `workspace-instructions`)叠在一起后,系统提示每步变长,前缀缓存整段失效。现在每轮只把 `prompt-inject` 折进 persona,已经折过就不再折第二份。
- 版本列表按提交号标「当前」。同为 1.1.11 的旧标签不再和 `master` 一起显示当前。
- 本机接口拒绝跨站请求,更新只接受已知版本。任意网页不能再调用应用、还原、卸载或切换。
- 补丁 #41 去掉 `dsh-purge:committed` 短路。已经打过旧补丁的,再点一次「应用」才会从宿主文件里删掉。
### 1.1.10
- 提示词和规则集都空时不能保存或应用,弹窗要求先添加提示词
- 第一轮完整注入;不再钉上一轮整篇系统提示,避免来回追加
- 设置页 / `/skills` 可把压缩包或文件夹导入官方 `$DSH_HOME/skills`;命中与加载仍由 DSH 负责
- 设置页可切换正式版 / 测试版,并从历史版本回退;回退后会固定,不再自动跟上
### 1.1.9
- 将提示词从仓库中下线
<details>
<summary>更早版本</summary>
### 1.1.8
- 未自行改过提示词时使用内置默认;设置页保存不同内容后才换成用户自己的,可「恢复默认」。
### 1.1.7
- **#25:** 第一轮注入 `prompt-inject.md` 之后不再把上一轮整段系统提示钉回去;后续只保留本轮组装结果。
- **#26:** `dsh plugin add` / 插件内更新改用 GitHub `master.tar.gz`。`.zip` 不是 pnpm 能解的压缩包,会报 `ERR_PNPM_TARBALL_DECODE_GZIP`。本地覆盖安装仍下载 zip 给 `tar` / Expand-Archive。
- 安装文档按 **Web 端 / 桌面端** 分开写默认命令:Web 用官方 `dsh --profile web`;桌面端默认在自带终端 `dsh plugin add <zip>`。
- 桌面端安全评测补丁、重启、卸载只针对当前桌面进程的安装树,不碰官方 Web / npm-global。
- 桌面端安装目录按运行中的 `DSH Desktop.exe` 定位,默认位置或自定义目录都可以。
### 1.1.6
- 设置页「卸载」会弹窗确认;若已应用补丁则先还原回原版,再清除插件并重启。
- 给 AI 的安装块只跑官方 `dsh plugin add`,不扫盘、不应用。
### 1.1.5
- 点「更新」时:git 快进失败会 `fetch + reset`,再不行改用 zip 覆盖,不再整次失败。
### 1.1.4
- 检测更新按 GitHub 提交号读 `package.json`,不再误用 jsDelivr `@master` 缓存,也不会在读不到远端版本时显示成「有新版本 1.1.2,当前 1.1.2」。
### 1.1.3
- 系统提示词只在每个会话第一轮注入一份;后续轮次钉住已提交的系统提示词,不再追加第二份。
- 默认剥掉套件自带的 `dsh-mnemon` 上下文注入。
- 从子代理点回主代理时,不再把上一句已发送的内容填回输入框。
- 补上 Cordis 需要的 `{ apply }` 默认导出,避免插件树加载失败导致后端退出。
### 1.1.2
- 自定义 OpenAI 兼容接口不再因 `developer` 角色 400:`#42` 改回 `system`。
- 设置页规则集:读 / 删 / 存走同一个 POST,不再报 `Failed to fetch`。
### 1.1.1
- 输入框旁「回退」/ `/rewind`:主代理可选回退一次或上一轮(丢掉本轮子代理);子代理直接回退一次。
- 回退后输入框仍是上一句用户内容,再次发送是全新一轮:清掉待发送队列,不会把旧提示再自动发出去。
- 可选补丁对不上时记为跳过,不再算失败。
### 1.1.0
- 检测更新与下载分开:先查,有新版本按钮变成「更新」,版本号显示远端。
- 开机自动对照 GitHub `master` 并下载。`dsh plugin add`(zip / github)走官方 CLI;没 git 下 `master.zip` 覆盖。git 仓库本地有未提交改动时不自动覆盖。
- **#16**:`#26` 不再对 YAML 用无缩进 identity 替换;apply 重写 `prefix`/`text` 缩进,cordis 预设能挂载。
- **#15**:有内容却进不了会话,是 0.1.5 `complete:true` 丢掉 section;`#41` 把注入补回 complete 段。
- **#14**:Hub `api/plugins/download` 不是 tar,安装只用 GitHub `master.zip`。
### 1.0.0
- 版本号从头计数。
- 设置页增加 **检测更新**:对照 GitHub `master`。
</details>
每一版改了什么、安装包在 [Releases](https://github.com/YuJunZhiXue/dsh-purge/releases)。发新版时把 `package.json` 的版本号改掉,中英文说明写进 `release-notes.md`,推到 `master` 就会自动打包。同一版本再推送不会重复发包。
## 说明
+21
View File
@@ -0,0 +1,21 @@
# 1.1.14
## 中文
- 回退清队列时会等 `updateQueue` 结束。条目已经不在时不再变成未处理的拒绝,避免把宿主带崩(#32)。
- 兜底回退按钮成功后会记下这次的时间。1.2 秒后的轮询不会把同一次回退再打开、再回填一遍(#33)。
- 回填的是还没结束的那一句时,切点改到最后一个已闭合回合。不再多丢上一整轮。回合还在进行、8 秒内等不到结束时,仍然直接失败,不会按不完整日志去切(#34)。
- bash 超时补丁改成整行正则,并把已经多写出来的 0 收回到 10 分钟。每次启动不再给超时再补一个 0(#22,#31)。
- 补丁替换支持正则,`$1` 会展开。bundle 布局清洗完成后能认出 `persona: ""`,面板不再一直显示待应用。#39 改为可选。跳过说明改为「当前版本不需要或组件未安装」。
- 正式版已经追上的测试版不再出现在版本列表里。提交号对不上时,按本机版本号标「当前」。
- phase-1 不再清空 runtime context,也不改消息白名单。梁神和官方插件的消息照旧保留。
## English
- Rewind waits for `updateQueue` to finish. A queue item that is already gone no longer becomes an unhandled rejection that can take down the host (#32).
- The fallback rewind button records this rewind’s timestamp. The 1.2s poll does not open and refill the same rewind a second time (#33).
- When the text being restored belongs to a turn that is still open, the fork point is the last closed turn. The previous completed turn is no longer dropped. If that turn is still running and does not close within 8 seconds, rewind still fails instead of cutting an incomplete log (#34).
- The bash timeout patch is now one whole-line regular expression, and values that grew extra zeros are pulled back to 10 minutes. Startup no longer appends another zero (#22, #31).
- Patch replacement accepts regular expressions, and `$1` expands. A finished bundle-layout clean matches `persona: ""`, so the panel does not stay on pending. #39 is optional. The skipped hint now says the patch is not needed for this version, or the component is not installed.
- Beta versions already covered by the current stable release are hidden from the version list. When the commit does not match, 「当前」follows the local version number.
- Phase-1 no longer clears runtime context or the message allowlist. 梁神 and official plugin messages stay as they are.