cursor-guard 4.9.8 → 4.9.12

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.
Files changed (32) hide show
  1. package/README.md +10 -1
  2. package/README.zh-CN.md +10 -1
  3. package/ROADMAP.md +50 -5
  4. package/docs/RELEASE.md +196 -0
  5. package/package.json +69 -68
  6. package/references/dashboard/public/app.js +313 -95
  7. package/references/dashboard/public/style.css +320 -160
  8. package/references/dashboard/server.js +197 -4
  9. package/references/lib/core/backups.js +36 -21
  10. package/references/lib/core/core.test.js +1629 -1484
  11. package/references/lib/core/snapshot.js +59 -8
  12. package/references/mcp/server.js +73 -72
  13. package/references/vscode-extension/{dist/cursor-guard-ide-4.9.8.vsix → cursor-guard-ide-4.9.12.vsix} +0 -0
  14. package/references/vscode-extension/dist/cursor-guard-ide-4.9.12.vsix +0 -0
  15. package/references/vscode-extension/dist/dashboard/public/app.js +313 -95
  16. package/references/vscode-extension/dist/dashboard/public/style.css +320 -160
  17. package/references/vscode-extension/dist/dashboard/server.js +197 -4
  18. package/references/vscode-extension/dist/extension.js +9 -2
  19. package/references/vscode-extension/dist/guard-version.json +1 -1
  20. package/references/vscode-extension/dist/lib/core/backups.js +36 -21
  21. package/references/vscode-extension/dist/lib/core/snapshot.js +59 -8
  22. package/references/vscode-extension/dist/lib/dashboard-manager.js +110 -103
  23. package/references/vscode-extension/dist/lib/poller.js +161 -21
  24. package/references/vscode-extension/dist/lib/sidebar-webview.js +469 -156
  25. package/references/vscode-extension/dist/mcp/server.js +85 -31
  26. package/references/vscode-extension/dist/package.json +1 -1
  27. package/references/vscode-extension/dist/skill/ROADMAP.md +50 -5
  28. package/references/vscode-extension/extension.js +9 -2
  29. package/references/vscode-extension/lib/dashboard-manager.js +110 -103
  30. package/references/vscode-extension/lib/poller.js +161 -21
  31. package/references/vscode-extension/lib/sidebar-webview.js +469 -156
  32. package/references/vscode-extension/package.json +140 -140
package/README.md CHANGED
@@ -5,7 +5,8 @@
5
5
 
6
6
  Protects your code from accidental AI overwrite or deletion in [Cursor](https://cursor.com).
7
7
 
8
- **[中文文档](README.zh-CN.md)**
8
+ **[中文文档](README.zh-CN.md)**
9
+ **Release / 发版(maintainers & AI):** [docs/RELEASE.md](docs/RELEASE.md)
9
10
 
10
11
  ---
11
12
 
@@ -467,6 +468,12 @@ The skill activates on these signals:
467
468
 
468
469
  ## Changelog
469
470
 
471
+ ### v4.9.9 — Dedicated release guide (`docs/RELEASE.md`)
472
+
473
+ - **Docs**: New bilingual **[docs/RELEASE.md](docs/RELEASE.md)** for maintainers, developers, and AI agents (full procedure, Windows `gh` + UTF-8 `--notes-file`, npm OTP)
474
+ - **Docs**: README / README.zh-CN link to the guide from the header and the release-checklist section; `npm run release:checklist` footer points to the same file
475
+ - **Packaging**: `docs/RELEASE.md` added to npm `files` so it ships with the package
476
+
470
477
  ### v4.9.8 — Release docs, checklist script, sidebar brand asset
471
478
 
472
479
  - **Docs**: Bilingual **Release checklist** sections in README / README.zh-CN; steps tied to root `package.json` `version` so VSIX file name, Git tag, and npm stay consistent
@@ -628,6 +635,8 @@ The skill activates on these signals:
628
635
 
629
636
  **Single source of truth**: the `version` field in the **repository root** `package.json`. Running `references/vscode-extension/build-vsix.js` copies that value into the extension `package.json` and `guard-version.json`, so the VSIX and npm tarball stay aligned.
630
637
 
638
+ **Full guide (bilingual, for humans and AI agents):** [docs/RELEASE.md](docs/RELEASE.md) — includes **Windows `gh` + UTF-8**: use `--notes-file` for GitHub Release bodies so Chinese text does not become mojibake.
639
+
631
640
  ### Generate a filled-in table (recommended)
632
641
 
633
642
  From the repository root:
package/README.zh-CN.md CHANGED
@@ -5,7 +5,8 @@
5
5
 
6
6
  保护你的代码免受 [Cursor](https://cursor.com) AI 代理意外覆写或删除。
7
7
 
8
- **[English](README.md)**
8
+ **[English](README.md)**
9
+ **发版流程(维护者 / 其他开发者 / AI):** [docs/RELEASE.md](docs/RELEASE.md)
9
10
 
10
11
  ---
11
12
 
@@ -467,6 +468,12 @@ code --install-extension .
467
468
 
468
469
  ## 更新日志
469
470
 
471
+ ### v4.9.9 — 独立发版指南 docs/RELEASE.md
472
+
473
+ - **文档**:新增中英双语 **[docs/RELEASE.md](docs/RELEASE.md)**,面向维护者、其他开发者及 **AI 助手**(完整步骤、Windows 下 `gh` 与 UTF-8 `--notes-file`、npm OTP 等)
474
+ - **文档**:README / README.zh-CN 顶部与发版小节增加指向该指南的链接;`npm run release:checklist` 输出末尾提示同一文件
475
+ - **打包**:`docs/RELEASE.md` 已加入 npm `files`,随包分发
476
+
470
477
  ### v4.9.8 — 发版文档、清单脚本、侧边栏品牌资源
471
478
 
472
479
  - **文档**:在 README / README.zh-CN 增加双语**发版检查清单**,步骤与根目录 `package.json` 的 `version` 绑定,避免 VSIX 名、Git 标签、npm 版本各写各的
@@ -627,6 +634,8 @@ code --install-extension .
627
634
 
628
635
  **唯一版本源**:仓库**根目录** `package.json` 里的 **`version`**。执行 `references/vscode-extension/build-vsix.js` 时,会把同一版本写入扩展内的 `package.json` 与 `guard-version.json`,因此 VSIX 与 npm 包版本一致。
629
636
 
637
+ **完整发版指南(中英双语,给人看也给 AI 执行):** [docs/RELEASE.md](docs/RELEASE.md) — 内含 **Windows 下 GitHub CLI**:Release 正文请用 UTF-8 文件 + `gh … --notes-file`,避免中文乱码。
638
+
630
639
  ### 生成已填好版本号的表格(推荐)
631
640
 
632
641
  在仓库根目录执行:
package/ROADMAP.md CHANGED
@@ -3,8 +3,8 @@
3
3
  > 本文档描述 cursor-guard 从 V2 到 V7 的长期演进方向。
4
4
  > 每一代向下兼容,低版本功能永远不废弃。
5
5
  >
6
- > **当前版本**:`V4.9.8`
7
- > **文档状态**:`V2` ~ `V4.9.8` 已完成交付(含 V5 intent/audit 基础),`V5` 主体规划中
6
+ > **当前版本**:`V4.9.12`
7
+ > **文档状态**:`V2` ~ `V4.9.12` 已完成交付(含 V5 intent/audit 基础),`V5` 主体规划中
8
8
 
9
9
  ## 阅读导航
10
10
 
@@ -734,6 +734,34 @@ V4 经过 4 轮系统性代码审查,修复了以下关键问题:
734
734
  }
735
735
  ```
736
736
 
737
+ ### V4.9.9:独立发版指南(人 + AI)✅
738
+ | 能力 | 说明 |
739
+ |------|------|
740
+ | **docs/RELEASE.md** | 中英双语完整发版流程:版本源、VSIX、Git、GitHub Release、npm OTP;**Windows 下 `gh` 须用 UTF-8 文件 + `--notes-file`** 避免 Release 正文乱码;专设「给其他 AI 助手」摘要 |
741
+ | **入口** | README / README.zh-CN 顶部与发版小节链接;`print-release-checklist.js` 末尾提示;`package.json` `files` 纳入该文档以便 npm tarball 携带 |
742
+
743
+ ### V4.9.11:仪表盘推送同步 + 备份元数据/交互收口 ✅
744
+
745
+ | 能力 | 说明 |
746
+ |------|------|
747
+ | **推送优先于轮询** | Dashboard HTTP:`GET /api/events`(SSE)+ `fs.watch` 监听 `refs/guard/*`、`.cursor-guard-backup/`、`.git` 下 `cursor-guard-alert.json` / `cursor-guard.lock`;`refs` 下首次出现 `guard` 时自动重挂 watcher。前端 `EventSource` 收 `guard-changed` 即刷新;仅保留 3min(前台)/ 10min(后台标签)兜底拉取 |
748
+ | **扩展 Poller** | 以 `fs.watch` 同上路径触发 `forceRefresh`,HTTP 心跳改为约 **3min** 兜底(不再高频轮询) |
749
+ | **活跃告警忽略** | `POST /api/dismiss-alert` + 仪表盘/侧边栏「忽略」;dismiss 后主动 SSE 广播 |
750
+ | **备份列表可读性** | Git 提交 `Guard-Diff-Base` / `Guard-Scope` trailer;`listBackups` 解析 + 仪表盘「范围/基线」列;`refs/guard/snapshot` 完整历史;`Summary` trailer 去 `\r` + 列表行合计 `+/-` 行数 |
751
+ | **5.x 后续(已记入下方 V5 规划)** | watcher 进程与仪表盘 **进程内/管道事件**、MCP `notifications`、统一事件总线——见「V5.x 深化:仪表盘与 watcher 联动」 |
752
+
753
+ ### V4.9.12:仪表盘 Intent 展示修复 ✅
754
+
755
+ | 能力 | 说明 |
756
+ |------|------|
757
+ | **变更列 Intent** | 仅当备份类型为 **`git-pre-restore` / `shadow-pre-restore`** 时使用 `From` + `Restore-To` 琥珀色恢复条;自动备份与手动快照不再被误解析的 `from`/`restoreTo` 抢占,**Intent** 蓝条正常显示 |
758
+
759
+ ### V4.9.10:扩展版本线对齐 ✅
760
+
761
+ | 说明 |
762
+ |------|
763
+ | IDE 扩展与根目录 `package.json` 版本对齐发版(VSIX 构建链 `build-vsix.js` 以根版本为准)。 |
764
+
737
765
  ### V4.9.8:发版流程文档化 + 侧边栏品牌占位 ✅
738
766
  | 能力 | 说明 |
739
767
  |------|------|
@@ -1137,6 +1165,19 @@ Phase 2 (V5.x):
1137
1165
  └── 完整审计链闭环,支持 restore_from_event
1138
1166
  ```
1139
1167
 
1168
+ ### V5.x 深化:仪表盘与 watcher 联动(建议纳入 5.x 更新)
1169
+
1170
+ > V4.9.11 已用 **文件系统监听 + SSE** 实现「备份/告警变更 → 仪表盘几乎实时更新」,无需依赖高频 HTTP 轮询。以下能力适合在 **V5.x** 与 embedded watcher / 审计事件链一并演进:
1171
+
1172
+ | 方向 | 说明 |
1173
+ |------|------|
1174
+ | **跨进程显式通知** | 独立 `auto-backup` 子进程在 snapshot 成功后,通过 **本地 socket / 命名管道 / 向 dashboard 进程发 UDP** 等方式推送 `backup_completed`(含 project root、shortHash、timestamp),补全 `fs.watch` 在少数 OS/网络盘上的漏事件 |
1175
+ | **MCP / LSP 式通知** | 若 MCP 宿主支持 `notifications`,由 server 在备份/告警状态变化时向客户端推送,IDE 与 Web 共用同一语义字段 |
1176
+ | **统一事件模型** | 将 `guard-changed`、intent 事件、审计 JSONL 写入映射到同一 **event type + payload schema**,便于 dashboard 时间线与 `restore_from_event` 对齐 |
1177
+ | **可观测性** | 可选:推送失败降级策略、SSE 连接数上限、watch 句柄泄漏检测(长会话桌面环境) |
1178
+
1179
+ **原则**:V4.9.x 保持「零新常驻依赖 + 本地回环」;V5.x 可在确认架构(embedded watcher)后引入更重的 IPC,且不破坏现有 SSE/Watch 降级路径。
1180
+
1140
1181
  #### 与"意图队列"方案的本质区别
1141
1182
 
1142
1183
  | | 意图队列(已否决) | embedded watcher + begin_edit |
@@ -1620,7 +1661,11 @@ V4.3.5 ───── ✅ Summary 增量 diff-tree 修复 + 变更列堆叠布
1620
1661
  V4.4.0 ───── ✅ V4 收官:首次快照 summary + doctor 完整性/retention 检查 + init 升级检测
1621
1662
  V4.9.0 ───── ✅ 事件驱动 watcher + 实时侧边栏计时
1622
1663
  V4.9.5 ───── ✅ 修复 `.git` 写入导致的疯狂自触发备份
1623
- V4.9.8 ─────发版清单(README 双语 + checklist 脚本)+ 侧边栏品牌图 ← 当前版本
1664
+ V4.9.12 ────仪表盘变更列:Intent 仅被真正的恢复前快照类型让位给 From→Restore-To;常规备份正确显示 Intent ← 当前版本
1665
+ V4.9.11 ──── ✅ 仪表盘 SSE + fs.watch 推送;Poller 事件驱动;告警忽略;Guard trailer 列;Summary/列表行数;snapshot 历史列表
1666
+ V4.9.10 ──── ✅ 扩展版本线与根包对齐(VSIX 发版链)
1667
+ V4.9.9 ───── ✅ docs/RELEASE.md 发版指南(人 + AI)+ gh UTF-8 说明
1668
+ V4.9.8 ───── ✅ 发版清单(README 双语 + checklist 脚本)+ 侧边栏品牌图
1624
1669
  V4.9.7 ───── ✅ 预警体验打磨 + 语言同步 + watcher 单例保护
1625
1670
 
1626
1671
  │ 前提:MVP 已跑通,需要把提示从“能用”打磨到“适合常开”
@@ -1709,5 +1754,5 @@ V7 的"可验证治理"是这条产品线的逻辑终点——该保护的都保
1709
1754
 
1710
1755
  ---
1711
1756
 
1712
- *最后更新:2026-03-22*
1713
- *版本:v1.8(V4.9.8,在 V4.9.7 基础上增加发版流程文档与侧边栏品牌资源;历史能力含事件驱动 watcher、自触发备份反馈环修复、`pre_warning` 事先预警 MVP)*
1757
+ *最后更新:2026-03-23*
1758
+ *版本:v1.11(V4.9.12:仪表盘 Intent 列修复;V4.9.11 SSE/fs.watch、Poller 事件驱动等;历史含 V4.9.9 发版指南、V4.9.0 事件驱动 watcher、`pre_warning` 等)*
@@ -0,0 +1,196 @@
1
+ # Release guide / 发版流程指南
2
+
3
+ **Audience / 读者**:本仓库维护者、其他开发者、以及需要代为执行发版步骤的 **AI 助手**(Agent)。
4
+ **Repo / 仓库**:<https://github.com/zhangqiang8vipp/cursor-guard>
5
+
6
+ **Jump / 跳转**:[English](#english-for-maintainers-and-ai-agents) · [中文(维护者与 AI)](#中文维护者与-ai-助手)
7
+
8
+ ---
9
+
10
+ ## English (for maintainers and AI agents)
11
+
12
+ ### Single source of truth
13
+
14
+ - All release versions come from the **repository root** `package.json` → field **`version`** (semver, e.g. `4.9.8`).
15
+ - `references/vscode-extension/build-vsix.js` reads that value and writes the same version into:
16
+ - `references/vscode-extension/dist/package.json`
17
+ - `references/vscode-extension/dist/guard-version.json`
18
+ - The **npm** package name is `cursor-guard@<version>`. The **VSIX** file name is always `cursor-guard-ide-<version>.vsix`.
19
+
20
+ Never hand-type an old version in release notes while the repo already has a higher `version`.
21
+
22
+ ### Quick machine-readable checklist
23
+
24
+ From the repo root:
25
+
26
+ ```bash
27
+ npm run release:checklist
28
+ ```
29
+
30
+ Copy the printed table into your tracker. It is always aligned with the current `package.json`.
31
+
32
+ ### Step-by-step release procedure
33
+
34
+ 1. **Bump version**
35
+ Edit root `package.json` → `version`. Optionally sync `package-lock.json` (`npm install` or manual bump of the top-level `version` fields).
36
+
37
+ 2. **Run tests (recommended)**
38
+ ```bash
39
+ npm test
40
+ ```
41
+
42
+ 3. **Build the VSIX**
43
+ ```bash
44
+ cd references/vscode-extension
45
+ node build-vsix.js
46
+ cd dist
47
+ npx --yes @vscode/vsce package --no-dependencies
48
+ ```
49
+ Output: `references/vscode-extension/dist/cursor-guard-ide-<version>.vsix`.
50
+
51
+ 4. **Commit**
52
+ Include source changes, updated `dist/` if your workflow commits it, and the new `.vsix` if you ship it from the repo. Use a clear message, e.g. `release: vX.Y.Z — …`.
53
+
54
+ 5. **Tag and push**
55
+ ```bash
56
+ git tag -a vX.Y.Z -m "vX.Y.Z"
57
+ git push origin <default-branch>
58
+ git push origin vX.Y.Z
59
+ ```
60
+
61
+ 6. **GitHub Release + attach VSIX**
62
+ - Create a release for tag `vX.Y.Z` and attach `cursor-guard-ide-X.Y.Z.vsix`.
63
+ - **Windows + GitHub CLI (`gh`) — avoid mojibake in release notes**
64
+ On Windows, passing long Chinese (or mixed) text inline with `gh release edit --notes "..."` often corrupts encoding (garbled text on GitHub).
65
+ **Always** put the body in a **UTF-8** file and use:
66
+ ```bash
67
+ gh release create vX.Y.Z path/to/cursor-guard-ide-X.Y.Z.vsix --title "Cursor Guard vX.Y.Z" --notes-file RELEASE_NOTES.md
68
+ ```
69
+ or for an existing release:
70
+ ```bash
71
+ gh release edit vX.Y.Z --notes-file RELEASE_NOTES.md
72
+ ```
73
+ Save `RELEASE_NOTES.md` as UTF-8 in VS Code / Cursor (default). Keep the release **title** ASCII-only if your shell is unreliable with Unicode.
74
+ - This repo’s `.gitignore` includes `.release-notes-*.md` so temporary note files are not committed by mistake.
75
+
76
+ 7. **Maintenance branches (optional)**
77
+ If you use branches like `release/v4.8.x`, fast-forward them to the current default branch when your policy requires it.
78
+
79
+ 8. **npm publish**
80
+ From the repo root:
81
+ ```bash
82
+ npm publish --access public
83
+ ```
84
+ If npm returns **EOTP**, open the URL it prints, complete authentication in the browser, then run `npm publish` again. AI agents cannot complete OTP for you.
85
+
86
+ 9. **VS Code Marketplace (optional)**
87
+ Not required for GitHub Release + VSIX. If you publish there, use a personal access token and `npx @vscode/vsce publish` from `references/vscode-extension/dist` (see VS Code publishing docs).
88
+
89
+ ### Hints for AI agents
90
+
91
+ - Read root `package.json` → `version` before claiming a release number.
92
+ - Prefer `npm run release:checklist` over inventing version strings.
93
+ - After editing release notes on Windows, use **`gh … --notes-file`** with a UTF-8 file; do not rely on huge `--notes "…"` strings in PowerShell.
94
+ - Do not echo npm OTP URLs as “user must visit” without also explaining they must complete the flow in a real browser.
95
+ - Never paste publish tokens into chat logs.
96
+
97
+ ---
98
+
99
+ ## 中文(维护者与 AI 助手)
100
+
101
+ ### 唯一版本源
102
+
103
+ - 一切发版版本号以**仓库根目录** `package.json` 的 **`version`** 为准(semver,例如 `4.9.8`)。
104
+ - 执行 `references/vscode-extension/build-vsix.js` 时,会把同一版本写入扩展构建产物中的 `package.json` 与 `guard-version.json`。
105
+ - **npm** 包为 `cursor-guard@<version>`;**VSIX** 固定命名为 `cursor-guard-ide-<version>.vsix`。
106
+
107
+ 仓库已是新版本时,不要在对外说明里仍写旧的版本号(例如仍写 4.9.5)。
108
+
109
+ ### 一键打印检查表
110
+
111
+ 在仓库根目录:
112
+
113
+ ```bash
114
+ npm run release:checklist
115
+ ```
116
+
117
+ 将终端输出复制到你的发版记录即可,内容与当前 `package.json` 一致。
118
+
119
+ ### 发版步骤(建议顺序)
120
+
121
+ 1. **改版本号**
122
+ 修改根目录 `package.json` 的 `version`。如需,同步 `package-lock.json` 顶部版本字段或执行 `npm install` 更新锁文件。
123
+
124
+ 2. **测试(建议)**
125
+ ```bash
126
+ npm test
127
+ ```
128
+
129
+ 3. **构建 VSIX**
130
+ ```bash
131
+ cd references/vscode-extension
132
+ node build-vsix.js
133
+ cd dist
134
+ npx --yes @vscode/vsce package --no-dependencies
135
+ ```
136
+ 得到:`references/vscode-extension/dist/cursor-guard-ide-<version>.vsix`。
137
+
138
+ 4. **Git 提交**
139
+ 按你们仓库习惯包含源码与 `dist/`(若纳入版本控制)及新的 `.vsix`。提交信息建议含 `release: vX.Y.Z`。
140
+
141
+ 5. **打标签并推送**
142
+ ```bash
143
+ git tag -a vX.Y.Z -m "vX.Y.Z"
144
+ git push origin <默认分支>
145
+ git push origin vX.Y.Z
146
+ ```
147
+
148
+ 6. **GitHub Release 并上传 VSIX**
149
+ - 为标签 `vX.Y.Z` 创建 Release,上传对应 VSIX。
150
+ - **Windows 上使用 `gh` 写中文说明时务必注意编码**
151
+ 在 PowerShell 里用很长的 `gh release edit --notes "……中文……"` 容易导致 GitHub 上显示**乱码**。
152
+ **正确做法**:把正文保存为 **UTF-8** 的 Markdown 文件(如 `RELEASE_NOTES.md`,用 Cursor/VS Code 保存即可),然后执行:
153
+ ```bash
154
+ gh release create vX.Y.Z ./references/vscode-extension/dist/cursor-guard-ide-X.Y.Z.vsix --title "Cursor Guard vX.Y.Z" --notes-file RELEASE_NOTES.md
155
+ ```
156
+ 或已有 Release 时:
157
+ ```bash
158
+ gh release edit vX.Y.Z --notes-file RELEASE_NOTES.md
159
+ ```
160
+ **标题**建议只用 ASCII(如 `Cursor Guard v4.9.8`),避免控制台编码问题。
161
+ - 本仓库 `.gitignore` 已忽略 `.release-notes-*.md`,避免临时说明文件被误提交。
162
+
163
+ 7. **release 维护分支(可选)**
164
+ 若使用 `release/v4.8.x` 等分支,按团队策略决定是否快进到当前默认分支。
165
+
166
+ 8. **npm 发布**
167
+ 在仓库根目录:
168
+ ```bash
169
+ npm publish --access public
170
+ ```
171
+ 若提示 **OTP / 二次验证**,在浏览器完成 npm 提示的认证后**再执行一次** `npm publish`。AI 无法代替你完成浏览器验证。
172
+
173
+ 9. **VS Code 扩展市场(可选)**
174
+ 非必须;多数用户通过 GitHub Release + VSIX 安装即可。若上架市场,需 PAT 与 `vsce publish`(见官方文档)。
175
+
176
+ ### 给其他 AI 助手的摘要
177
+
178
+ - 发版前先读根目录 `package.json` 的 `version`,不要臆造版本号。
179
+ - 优先执行 `npm run release:checklist` 生成与仓库一致的步骤表。
180
+ - 在 Windows 上更新 GitHub Release 正文时,用 **`gh … --notes-file`** + UTF-8 文件,避免在命令行里直接塞长中文。
181
+ - 不要在对话中粘贴 npm / GitHub 令牌;OTP 必须用户本人在浏览器完成。
182
+
183
+ ---
184
+
185
+ ## Related files / 相关文件
186
+
187
+ | File | Purpose |
188
+ |------|---------|
189
+ | `scripts/print-release-checklist.js` | Implements `npm run release:checklist` |
190
+ | `references/vscode-extension/build-vsix.js` | Assembles `dist/` and syncs version from root `package.json` |
191
+ | `README.md` / `README.zh-CN.md` | Short “Release checklist” sections + link here |
192
+ | `.gitignore` | Ignores `.release-notes-*.md` |
193
+
194
+ ---
195
+
196
+ *Last updated / 最后更新: 2026-03-22(v4.9.9:随包分发与 README 入口)*
package/package.json CHANGED
@@ -1,68 +1,69 @@
1
- {
2
- "name": "cursor-guard",
3
- "version": "4.9.8",
4
- "description": "Protects code from accidental AI overwrite or deletion in Cursor IDE — mandatory pre-write snapshots, review-before-apply, local Git safety net, and deterministic recovery. | 保护代码免受 Cursor AI 代理意外覆写或删除——强制写前快照、预览再执行、本地 Git 安全网、确定性恢复。",
5
- "keywords": [
6
- "cursor",
7
- "cursor-ide",
8
- "ai-safety",
9
- "code-protection",
10
- "git-backup",
11
- "snapshot",
12
- "recovery",
13
- "agent-skill",
14
- "cross-platform"
15
- ],
16
- "author": "zhangqiang8vipp",
17
- "license": "BUSL-1.1",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/zhangqiang8vipp/cursor-guard.git"
21
- },
22
- "homepage": "https://github.com/zhangqiang8vipp/cursor-guard",
23
- "engines": {
24
- "node": ">=18"
25
- },
26
- "scripts": {
27
- "test": "node references/lib/utils.test.js && node references/lib/core/core.test.js && node references/mcp/mcp.test.js",
28
- "release:checklist": "node scripts/print-release-checklist.js"
29
- },
30
- "bin": {
31
- "cursor-guard-init": "references/bin/cursor-guard-init.js",
32
- "cursor-guard-backup": "references/bin/cursor-guard-backup.js",
33
- "cursor-guard-doctor": "references/bin/cursor-guard-doctor.js",
34
- "cursor-guard-mcp": "references/mcp/server.js",
35
- "cursor-guard-dashboard": "references/dashboard/server.js"
36
- },
37
- "files": [
38
- "SKILL.md",
39
- "README.md",
40
- "README.zh-CN.md",
41
- "ROADMAP.md",
42
- "LICENSE",
43
- "references/auto-backup.ps1",
44
- "references/auto-backup.sh",
45
- "references/guard-doctor.ps1",
46
- "references/guard-doctor.sh",
47
- "references/bin/",
48
- "references/lib/auto-backup.js",
49
- "references/lib/guard-doctor.js",
50
- "references/lib/utils.js",
51
- "references/lib/core/",
52
- "references/mcp/",
53
- "references/dashboard/",
54
- "references/vscode-extension/",
55
- "media/",
56
- "references/config-reference.md",
57
- "references/config-reference.zh-CN.md",
58
- "references/cursor-guard.example.json",
59
- "references/cursor-guard.schema.json",
60
- "references/recovery.md",
61
- "references/quickstart.zh-CN.md"
62
- ],
63
- "main": "SKILL.md",
64
- "dependencies": {
65
- "@modelcontextprotocol/sdk": "^1.27.1",
66
- "zod": "^4.3.6"
67
- }
68
- }
1
+ {
2
+ "name": "cursor-guard",
3
+ "version": "4.9.12",
4
+ "description": "Protects code from accidental AI overwrite or deletion in Cursor IDE — mandatory pre-write snapshots, review-before-apply, local Git safety net, and deterministic recovery. | 保护代码免受 Cursor AI 代理意外覆写或删除——强制写前快照、预览再执行、本地 Git 安全网、确定性恢复。",
5
+ "keywords": [
6
+ "cursor",
7
+ "cursor-ide",
8
+ "ai-safety",
9
+ "code-protection",
10
+ "git-backup",
11
+ "snapshot",
12
+ "recovery",
13
+ "agent-skill",
14
+ "cross-platform"
15
+ ],
16
+ "author": "zhangqiang8vipp",
17
+ "license": "BUSL-1.1",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/zhangqiang8vipp/cursor-guard.git"
21
+ },
22
+ "homepage": "https://github.com/zhangqiang8vipp/cursor-guard",
23
+ "engines": {
24
+ "node": ">=18"
25
+ },
26
+ "scripts": {
27
+ "test": "node references/lib/utils.test.js && node references/lib/core/core.test.js && node references/mcp/mcp.test.js",
28
+ "release:checklist": "node scripts/print-release-checklist.js"
29
+ },
30
+ "bin": {
31
+ "cursor-guard-init": "references/bin/cursor-guard-init.js",
32
+ "cursor-guard-backup": "references/bin/cursor-guard-backup.js",
33
+ "cursor-guard-doctor": "references/bin/cursor-guard-doctor.js",
34
+ "cursor-guard-mcp": "references/mcp/server.js",
35
+ "cursor-guard-dashboard": "references/dashboard/server.js"
36
+ },
37
+ "files": [
38
+ "SKILL.md",
39
+ "README.md",
40
+ "README.zh-CN.md",
41
+ "docs/RELEASE.md",
42
+ "ROADMAP.md",
43
+ "LICENSE",
44
+ "references/auto-backup.ps1",
45
+ "references/auto-backup.sh",
46
+ "references/guard-doctor.ps1",
47
+ "references/guard-doctor.sh",
48
+ "references/bin/",
49
+ "references/lib/auto-backup.js",
50
+ "references/lib/guard-doctor.js",
51
+ "references/lib/utils.js",
52
+ "references/lib/core/",
53
+ "references/mcp/",
54
+ "references/dashboard/",
55
+ "references/vscode-extension/",
56
+ "media/",
57
+ "references/config-reference.md",
58
+ "references/config-reference.zh-CN.md",
59
+ "references/cursor-guard.example.json",
60
+ "references/cursor-guard.schema.json",
61
+ "references/recovery.md",
62
+ "references/quickstart.zh-CN.md"
63
+ ],
64
+ "main": "SKILL.md",
65
+ "dependencies": {
66
+ "@modelcontextprotocol/sdk": "^1.27.1",
67
+ "zod": "^4.3.6"
68
+ }
69
+ }