@michengai/dsh-simplify 0.1.4 → 0.1.5

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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  [简体中文](CHANGELOG.zh-CN.md)
4
4
 
5
+ ## 0.1.5 - 2026-09-16
6
+
7
+ - Support DSH `0.1.6-alpha.1` while retaining compatibility with `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`.
8
+
5
9
  ## 0.1.4 - 2026-09-11
6
10
 
7
11
  - Support DSH `0.1.5-rc.2` while retaining compatibility with `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, and `0.1.5-rc.1`.
@@ -2,6 +2,10 @@
2
2
 
3
3
  [English](CHANGELOG.md)
4
4
 
5
+ ## 0.1.5 - 2026-09-16
6
+
7
+ - 支持 DSH `0.1.6-alpha.1`,继续兼容 `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1`、`0.1.5-rc.1` 和 `0.1.5-rc.2`。
8
+
5
9
  ## 0.1.4 - 2026-09-11
6
10
 
7
11
  - 支持 DSH `0.1.5-rc.2`,继续兼容 `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1` 和 `0.1.5-rc.1`。
package/README.md CHANGED
@@ -11,19 +11,16 @@
11
11
  [简体中文](README.zh-CN.md) · [Installation](#installation) · [Usage](#usage) · [Troubleshooting](#troubleshooting) · [Changelog](CHANGELOG.md) · [Apache-2.0](LICENSE)
12
12
 
13
13
  [![License: Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
14
+ [![npm package](https://img.shields.io/npm/v/%40michengai%2Fdsh-simplify.svg?label=npm%20package)](https://www.npmjs.com/package/@michengai/dsh-simplify)
14
15
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/deepseek-ai/deepseek-harness)
15
16
  [![Node.js 22.19+](https://img.shields.io/badge/Node.js-22.19%2B-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)
16
17
 
17
18
  </div>
18
19
 
19
- Use `/simplify` in DeepSeek Harness to make recently changed code easier to read and maintain.
20
-
21
- This is a community-maintained plugin, not an official DeepSeek AI product. It supports DSH Web and desktop apps that include DSH Web.
20
+ > DSH Simplify is a community-maintained DeepSeek Harness plugin, not an official DeepSeek AI product. Enter `/simplify` in the current session to ask the Agent to improve code within your Git changes while preserving behavior. Supports DSH Web and desktop apps that include DSH Web.
22
21
 
23
22
  Command messages and prompts are in Simplified Chinese.
24
23
 
25
- Compatibility: supports DSH `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`; development dependencies are pinned to `0.1.5-rc.2`.
26
-
27
24
  ## Features
28
25
 
29
26
  After a round of coding, use `/simplify` to ask the current Agent to improve the clarity of your changes while preserving behavior.
@@ -38,67 +35,63 @@ The command queues a simplification task. Check the Agent’s subsequent respons
38
35
 
39
36
  ## DSH product ecosystem
40
37
 
41
- For a ready-to-use workbench, download [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases). If you already use [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness), install any of these eight plugins individually. The desktop app includes all eight.
38
+ For a desktop workbench, download [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases). Existing [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) installations can add plugins as needed by following each project's README. Below are 11 first-party plugins; consult the corresponding desktop release notes and bundled catalog for what that version includes.
42
39
 
43
40
  | Plugin | What you can do |
44
41
  | --- | --- |
45
42
  | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | Organize projects and conversations, search tasks, and navigate chat turns |
46
- | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | Send tasks and receive replies through your usual messenger |
47
- | [Automation](https://github.com/MichengAI/dsh-automation) | Schedule tasks and review each run |
43
+ | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | Choose and summon specialists for your task |
48
44
  | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | Find, enable, create, and import local skills |
49
45
  | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | Search, restore, or clean up archived conversations |
50
- | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | Choose and summon specialists for your task |
46
+ | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | Send tasks and receive replies through messaging platforms |
47
+ | [Automation](https://github.com/MichengAI/dsh-automation) | Schedule tasks and review each run |
51
48
  | [BTW](https://github.com/MichengAI/dsh-btw) | Ask side questions without interrupting the main task |
52
- | [Simplify](https://github.com/MichengAI/dsh-simplify) | Use /simplify to improve code within your Git changes |
49
+ | [Simplify](https://github.com/MichengAI/dsh-simplify) | Use `/simplify` to improve code within your Git changes |
50
+ | [PUA](https://github.com/MichengAI/dsh-pua) | Guide the Agent to try new approaches after failures, investigate causes, and verify results before completion |
51
+ | [Code Review](https://github.com/MichengAI/dsh-code-review) | Use `/review` to request an independent Agent code review and receive the report in the current conversation |
52
+ | [Codex Pet](https://github.com/MichengAI/dsh-codex-pet) | View conversation notifications and respond to tool approvals and questions through a desktop pet |
53
53
 
54
- ## Installation
54
+ ## Prerequisites
55
+
56
+ - DeepSeek Harness is installed, `dsh` is available in your terminal, and the host provides the `commands` and `subprocess` services.
57
+ - Host peer dependencies declare `0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1`.
58
+ - Node.js >= 22.19 and Git on PATH.
59
+ - The current session is associated with a local Git project.
55
60
 
56
- Requires Node.js >= 22.19, Git on PATH, and DSH with the `commands` and `subprocess` services. The session must have a local Git working directory. Plugin `0.1.4` supports the five host versions listed above.
61
+ ## Installation
57
62
 
58
- The current version is `0.1.4`, available through npm, a packaged archive, or source installation. The examples use the `web` profile; replace it for your environment. Disable other plugins that register `/simplify` before installation.
63
+ The current version is `0.1.5`. The commands below use the `web` profile; replace it for your environment. Disable other plugins that register `/simplify` before installation.
59
64
 
60
65
  ### Ask an agent to install it (recommended)
61
66
 
62
67
  Send the prompt below to any agent that can run terminal commands on your computer. Replace `web` with your actual profile. Once installed, use the plugin in DSH.
63
68
 
64
69
  ```text
65
- Install the DSH plugin @michengai/dsh-simplify into my local web profile by running: dsh plugin --profile web add @michengai/dsh-simplify@0.1.4 --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm the configuration includes michengai-simplify, and explain how to reload DSH and start using the plugin.
70
+ Install the DSH plugin @michengai/dsh-simplify into my local web profile by running: dsh plugin --profile web add @michengai/dsh-simplify@0.1.5 --registry=https://registry.npmjs.org/. Then run dsh --profile web --dump-config, confirm the configuration includes michengai-simplify, and explain how to reload DSH and start using the plugin.
66
71
  ```
67
72
 
68
- ### From npm
73
+ ### Install from npm
69
74
 
70
75
  ```powershell
71
76
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
72
77
  $OutputEncoding = [System.Text.Encoding]::UTF8
73
78
 
74
- dsh plugin --profile web add @michengai/dsh-simplify@0.1.4 --registry=https://registry.npmjs.org/
79
+ dsh plugin --profile web add @michengai/dsh-simplify@0.1.5 --registry=https://registry.npmjs.org/
75
80
  ```
76
81
 
77
- ### From a Local Package
82
+ <details>
83
+ <summary>Install from a local package</summary>
78
84
 
79
- Download the published tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.4), then run this from the package directory:
85
+ Download the published tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.5), then run this from the package directory:
80
86
 
81
87
  ```powershell
82
88
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
83
89
  $OutputEncoding = [System.Text.Encoding]::UTF8
84
90
 
85
- dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
91
+ dsh plugin --profile web add .\michengai-dsh-simplify-0.1.5.tgz --ignore-scripts
86
92
  ```
87
93
 
88
- ### Build from Source
89
-
90
- Run from the repository root:
91
-
92
- ```powershell
93
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
94
- $OutputEncoding = [System.Text.Encoding]::UTF8
95
-
96
- npm ci
97
- if ($LASTEXITCODE -ne 0) { throw 'npm ci failed' }
98
- npm pack
99
- if ($LASTEXITCODE -ne 0) { throw 'npm pack failed' }
100
- dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
101
- ```
94
+ </details>
102
95
 
103
96
  ### Reload and Verify
104
97
 
@@ -108,6 +101,16 @@ Run `dsh --profile web --dump-config` and confirm that it includes `michengai-si
108
101
 
109
102
  ## Usage
110
103
 
104
+ After a round of coding, enter this in the current Git project session:
105
+
106
+ ```text
107
+ /simplify
108
+ ```
109
+
110
+ Wait for the Agent to finish editing and validation, then inspect the actual diff. Use the options below to narrow the scope.
111
+
112
+ ### Choose a review scope
113
+
111
114
  | Input | Scope |
112
115
  | --- | --- |
113
116
  | `/simplify` | Net changes from HEAD to the working tree, including untracked files; fall back to the last commit only when there are no changes |
@@ -124,7 +127,7 @@ Run `dsh --profile web --dump-config` and confirm that it includes `michengai-si
124
127
  - Before the initial commit, files in the selected scope are treated as new and may be simplified in full. Default mode includes staged and untracked files; `--staged` includes only staged files. Select files or directories to narrow the scope; file count and size limits still apply. A clean repository with only one commit returns no changes.
125
128
  - Previous-commit fallback compares HEAD with its first parent. Merge commits do not receive a multi-parent review.
126
129
 
127
- ## Command Results
130
+ ### Command results
128
131
 
129
132
  | Result | Meaning |
130
133
  | --- | --- |
@@ -148,6 +151,13 @@ Run `dsh --profile web --dump-config` and confirm that it includes `michengai-si
148
151
 
149
152
  The plugin performs read-only Git queries and local file reads. It does not automatically run `git add`, commit, reset, or stash. Git arguments are passed through DSH `subprocess` as `argv`, independent of PowerShell or Bash quoting rules.
150
153
 
154
+ **Scope is a prompt instruction, not a file-write permission boundary.** The Agent edits and tests using host tools and user authorization. This plugin does not intercept writes from other tools or guarantee that files remain unchanged after queuing. A queued review is not a completed simplification.
155
+
156
+ The implementation assumes the local filesystem and local subprocess share the same workspace. Remote subprocess and remote filesystem combinations have not been verified.
157
+
158
+ <details>
159
+ <summary>Git scope collection, snapshot checks, and resource limits</summary>
160
+
151
161
  The repository and index are determined from the session working directory and Git worktree metadata. Child processes do not inherit repository-local environment overrides such as `GIT_DIR`, `GIT_WORK_TREE`, `GIT_INDEX_FILE`, or temporary configuration overrides. Ordinary user and repository configuration is preserved. The repository returned by Git must contain the session working directory.
152
162
 
153
163
  Git failures, signals, cancellation, timeouts, truncated output, unresolved conflicts, and stale snapshots prevent prompt delivery. They are not interpreted as an empty diff. The patch parser counts old and new lines against each hunk header, rejects incomplete bodies, and excludes context lines from editable ranges. Explicit paths that do not exist, are ignored, or lie outside the repository return errors.
@@ -158,9 +168,7 @@ Across all files, collection is limited to 4,096 separate line ranges and 128 Ki
158
168
 
159
169
  `--staged` first checks that selected staged files match the working tree. Before queuing, the plugin rechecks the index, HEAD, and file SHA-256 hashes to avoid applying index line numbers to different working-tree content. The Agent is instructed to verify snapshots again before editing and stop simplifying a file if its content has changed, requiring a new command invocation.
160
170
 
161
- **Scope is a prompt instruction, not a file-write permission boundary.** The Agent edits and tests using host tools and user authorization. This plugin does not intercept writes from other tools or guarantee that files remain unchanged after queuing. A queued review is not a completed simplification.
162
-
163
- The implementation assumes the local filesystem and local subprocess share the same workspace. Remote subprocess and remote filesystem combinations have not been verified.
171
+ </details>
164
172
 
165
173
  ## Uninstall
166
174
 
@@ -173,7 +181,7 @@ dsh plugin --profile web remove @michengai/dsh-simplify
173
181
 
174
182
  Reload DSH manually if the desktop app does not reload automatically. Uninstalling does not undo code changes already made by the Agent.
175
183
 
176
- ## Development and Verification
184
+ ## Development
177
185
 
178
186
  ### From Source
179
187
 
@@ -190,6 +198,10 @@ dsh plugin --profile web add . --ignore-scripts
190
198
 
191
199
  The entry point is `lib/index.js`, so build before installing. Keep the source directory when the profile uses a local link.
192
200
 
201
+ ### Verification
202
+
203
+ Development dependencies are pinned to DSH `0.1.6-alpha.1`.
204
+
193
205
  ```powershell
194
206
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
195
207
  $OutputEncoding = [System.Text.Encoding]::UTF8
package/README.zh-CN.md CHANGED
@@ -8,22 +8,19 @@
8
8
 
9
9
  **在 DeepSeek Harness 中简化最近改动的代码,保持原有功能。**
10
10
 
11
- [English](README.md) · [安装](#安装) · [用法](#用法) · [故障排查](#故障排查) · [更新日志](CHANGELOG.zh-CN.md) · [Apache-2.0](LICENSE)
11
+ [English](README.md) · [安装](#安装) · [使用](#使用) · [故障排查](#故障排查) · [更新日志](CHANGELOG.zh-CN.md) · [Apache-2.0](LICENSE)
12
12
 
13
13
  [![许可证:Apache-2.0](https://img.shields.io/badge/License-Apache--2.0-blue.svg)](LICENSE)
14
+ [![npm package](https://img.shields.io/npm/v/%40michengai%2Fdsh-simplify.svg?label=npm%20package)](https://www.npmjs.com/package/@michengai/dsh-simplify)
14
15
  [![DSH Web Plugin](https://img.shields.io/badge/DSH%20Web-Plugin-0f766e.svg)](https://github.com/deepseek-ai/deepseek-harness)
15
16
  [![Node.js 22.19+](https://img.shields.io/badge/Node.js-22.19%2B-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org/)
16
17
 
17
18
  </div>
18
19
 
19
- DeepSeek Harness 代码简化插件。用 `/simplify` 整理刚改过的代码,让后续阅读和维护更轻松。
20
-
21
- 本项目为社区插件,并非 DeepSeek AI 官方产品。支持 DSH Web 及集成 DSH Web 的桌面应用。
20
+ > DSH Simplify 是社区维护的 DeepSeek Harness 插件,并非 DeepSeek AI 官方产品。在当前会话中输入 `/simplify`,即可请 Agent 整理 Git 改动范围内的代码,改善可读性并保持原有功能。支持 DSH Web 及集成 DSH Web 的桌面应用。
22
21
 
23
22
  命令文案及提示词使用简体中文。
24
23
 
25
- 兼容性:支持 DSH `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1`、`0.1.5-rc.1`、`0.1.5-rc.2`,开发依赖固定为 `0.1.5-rc.2`。
26
-
27
24
  ## 功能概览
28
25
 
29
26
  写完一轮代码后,用 `/simplify` 请当前 Agent 整理刚改过的部分,改善可读性并保持原有功能。
@@ -38,67 +35,63 @@ DeepSeek Harness 代码简化插件。用 `/simplify` 整理刚改过的代码
38
35
 
39
36
  ## DSH 产品生态
40
37
 
41
- 想直接使用完整工作台,可下载 [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases);已有 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 环境,可按需独立安装以下 8 个自研插件。桌面端已随附这些插件。
38
+ 想使用桌面工作台,可下载 [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop/releases);已有 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 环境,可按各项目 README 按需安装。以下列出 11 个自研插件;桌面端实际随附范围以对应版本的发行说明和内置清单为准。
42
39
 
43
40
  | 插件 | 你可以用它做什么 |
44
41
  | --- | --- |
45
42
  | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) | 整理项目与会话、搜索任务、跳转对话轮次 |
46
- | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | 从微信、飞书、钉钉等消息平台下任务、收回复 |
47
- | [Automation](https://github.com/MichengAI/dsh-automation) | 按计划执行任务,查看每次运行的结果 |
43
+ | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | 按任务选择并召唤专业角色 |
48
44
  | [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) | 统一查找、启停、创建和导入本机技能 |
49
45
  | [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) | 搜索、恢复或清理已归档会话 |
50
- | [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) | 按任务选择并召唤专业角色 |
46
+ | [IM Connect](https://github.com/MichengAI/dsh-im-connect) | 从消息平台下任务、收回复 |
47
+ | [Automation](https://github.com/MichengAI/dsh-automation) | 按计划执行任务,查看每次运行的结果 |
51
48
  | [BTW](https://github.com/MichengAI/dsh-btw) | 在当前上下文中临时旁问,不打断主任务 |
52
- | [Simplify](https://github.com/MichengAI/dsh-simplify) | 用 /simplify 整理 Git 改动范围内的代码 |
49
+ | [Simplify](https://github.com/MichengAI/dsh-simplify) | 用 `/simplify` 整理 Git 改动范围内的代码 |
50
+ | [PUA](https://github.com/MichengAI/dsh-pua) | 引导 Agent 在失败时换方法、查原因,并在完成前验证结果 |
51
+ | [Code Review](https://github.com/MichengAI/dsh-code-review) | 用 `/review` 发起独立 Agent 代码审查,在当前会话接收报告 |
52
+ | [Codex Pet](https://github.com/MichengAI/dsh-codex-pet) | 通过桌面宠物查看会话提醒、处理工具审批和问题回答 |
53
53
 
54
- ## 安装
54
+ ## 前置条件
55
+
56
+ - 已安装 DeepSeek Harness,可在终端执行 `dsh`,宿主提供 `commands` 和 `subprocess` 服务。
57
+ - 宿主 peer 依赖声明为 `0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1`。
58
+ - Node.js >= 22.19,PATH 中可执行 Git。
59
+ - 当前会话关联本地 Git 项目。
55
60
 
56
- 要求 Node.js >= 22.19、PATH 中可执行的 Git,以及提供 `commands`、`subprocess` 服务的 DSH。会话需要关联本地 Git 工作目录。插件 `0.1.4` 支持上文列出的五个宿主版本。
61
+ ## 安装
57
62
 
58
- 当前版本为 `0.1.4`,支持 npm、安装包和源码安装。以下示例使用 `web` profile,请按实际环境替换。安装前停用其他注册 `/simplify` 的插件。
63
+ 当前版本为 `0.1.5`。以下命令使用 `web` profile,请按实际环境替换。安装前停用其他注册 `/simplify` 的插件。
59
64
 
60
65
  ### 让 Agent 帮你安装(推荐)
61
66
 
62
67
  把下面这段话发给任意能够执行本机终端命令的 Agent。将 `web` 替换为实际使用的 profile;安装完成后,在 DSH 中使用本插件。
63
68
 
64
69
  ```text
65
- 请将 DSH 插件 @michengai/dsh-simplify 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-simplify@0.1.4 --registry=https://registry.npmjs.org/。安装后执行 dsh --profile web --dump-config,确认配置包含 michengai-simplify,并告诉我如何重新加载 DSH 和开始使用。
70
+ 请将 DSH 插件 @michengai/dsh-simplify 安装到本机 web profile,执行:dsh plugin --profile web add @michengai/dsh-simplify@0.1.5 --registry=https://registry.npmjs.org/。安装后执行 dsh --profile web --dump-config,确认配置包含 michengai-simplify,并告诉我如何重新加载 DSH 和开始使用。
66
71
  ```
67
72
 
68
- ### 从 npm 安装
73
+ ### 手动从 npm 安装
69
74
 
70
75
  ```powershell
71
76
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
72
77
  $OutputEncoding = [System.Text.Encoding]::UTF8
73
78
 
74
- dsh plugin --profile web add @michengai/dsh-simplify@0.1.4 --registry=https://registry.npmjs.org/
79
+ dsh plugin --profile web add @michengai/dsh-simplify@0.1.5 --registry=https://registry.npmjs.org/
75
80
  ```
76
81
 
77
- ### 从本地安装包安装
82
+ <details>
83
+ <summary>从本地安装包安装</summary>
78
84
 
79
- 从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.4) 下载已发布的 tgz,然后在安装包所在目录执行:
85
+ 从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.5) 下载已发布的 tgz,然后在安装包所在目录执行:
80
86
 
81
87
  ```powershell
82
88
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
83
89
  $OutputEncoding = [System.Text.Encoding]::UTF8
84
90
 
85
- dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
91
+ dsh plugin --profile web add .\michengai-dsh-simplify-0.1.5.tgz --ignore-scripts
86
92
  ```
87
93
 
88
- ### 从源码打包安装
89
-
90
- 在仓库根目录执行:
91
-
92
- ```powershell
93
- [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
94
- $OutputEncoding = [System.Text.Encoding]::UTF8
95
-
96
- npm ci
97
- if ($LASTEXITCODE -ne 0) { throw 'npm ci failed' }
98
- npm pack
99
- if ($LASTEXITCODE -ne 0) { throw 'npm pack failed' }
100
- dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
101
- ```
94
+ </details>
102
95
 
103
96
  ### 重新加载与确认
104
97
 
@@ -106,7 +99,17 @@ dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
106
99
 
107
100
  执行 `dsh --profile web --dump-config`,确认包含 `michengai-simplify`。分享完整配置前先检查其中是否包含敏感设置。然后在 Git 项目会话中输入 `/simplify`。
108
101
 
109
- ## 用法
102
+ ## 使用
103
+
104
+ 写完一轮代码后,在当前 Git 项目会话中输入:
105
+
106
+ ```text
107
+ /simplify
108
+ ```
109
+
110
+ 等待 Agent 完成修改与验证,再检查实际 diff。需要缩小范围时,可使用以下参数。
111
+
112
+ ### 选择审查范围
110
113
 
111
114
  | 输入 | 范围 |
112
115
  | --- | --- |
@@ -124,7 +127,7 @@ dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
124
127
  - 没有首次提交时,所选范围内的文件视为新增文件,允许整文件整理:默认包含暂存与未跟踪文件,`--staged` 仅包含暂存文件。可指定文件或目录缩小范围,文件数量和大小限制仍然生效。只有一个提交且工作区干净时直接返回无变更。
125
128
  - 上一提交回看相对于 HEAD 第一父提交;merge commit 不做多父合并审查。
126
129
 
127
- ## 命令结果
130
+ ### 命令结果
128
131
 
129
132
  | 返回结果 | 含义 |
130
133
  | --- | --- |
@@ -148,6 +151,13 @@ dsh plugin --profile web add .\michengai-dsh-simplify-0.1.4.tgz --ignore-scripts
148
151
 
149
152
  插件只执行 Git 只读查询和读取本地文件,不自动 `git add`、提交、重置或存储工作区。Git 参数通过 DSH `subprocess` 的 `argv` 传递,不依赖 PowerShell/Bash 引用规则。
150
153
 
154
+ **修改范围是提示词约束,不是文件写入权限隔离。** Agent 按宿主工具和用户授权执行修改及测试;本插件没有拦截其他工具的写入,也不能保证排队后文件不再变化。不要把“已提交审查”理解成“已完成简化”。
155
+
156
+ 实现针对本地文件系统与本地 subprocess 同一工作区,未验证远程 subprocess 或远程文件系统组合。
157
+
158
+ <details>
159
+ <summary>查看 Git 范围收集、快照校验与资源限制</summary>
160
+
151
161
  仓库和索引依据会话工作目录及 Git worktree 元数据确定;子进程不继承 `GIT_DIR`、`GIT_WORK_TREE`、`GIT_INDEX_FILE` 等仓库局部环境或临时配置覆盖,保留普通用户与仓库配置。Git 返回的仓库必须包含当前会话工作目录。
152
162
 
153
163
  Git 失败、信号终止、取消、超时、输出截断、未解决冲突和过期快照都会阻止提示词投递,不将它们当作无改动。补丁解析器按正文核对每块的新旧行数,拒绝残缺正文,并排除上下文行。显式路径不存在、被忽略或位于仓库外时返回错误。
@@ -158,9 +168,7 @@ Git 失败、信号终止、取消、超时、输出截断、未解决冲突和
158
168
 
159
169
  `--staged` 先确认所选暂存文件与工作区一致,并在入队前再次核对暂存区、HEAD 和文件 SHA-256,避免把 index 行号直接用于不同的工作区内容。Agent 编辑前还需复核内容快照;内容变化时停止该文件的简化并重新运行命令。
160
170
 
161
- **修改范围是提示词约束,不是文件写入权限隔离。** Agent 按宿主工具和用户授权执行修改及测试;本插件没有拦截其他工具的写入,也不能保证排队后文件不再变化。不要把“已提交审查”理解成“已完成简化”。
162
-
163
- 实现针对本地文件系统与本地 subprocess 同一工作区,未验证远程 subprocess 或远程文件系统组合。
171
+ </details>
164
172
 
165
173
  ## 卸载
166
174
 
@@ -173,7 +181,7 @@ dsh plugin --profile web remove @michengai/dsh-simplify
173
181
 
174
182
  若桌面应用未自动重载,手动重新加载 DSH。卸载不会撤销 Agent 已产生的代码修改。
175
183
 
176
- ## 开发与验证
184
+ ## 二次开发
177
185
 
178
186
  ### 从源码安装
179
187
 
@@ -190,6 +198,10 @@ dsh plugin --profile web add . --ignore-scripts
190
198
 
191
199
  入口为 `lib/index.js`,必须先构建再安装;profile 使用本地链接时需要保留源码目录。
192
200
 
201
+ ### 验证
202
+
203
+ 开发依赖固定为 DSH `0.1.6-alpha.1`。
204
+
193
205
  ```powershell
194
206
  [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
195
207
  $OutputEncoding = [System.Text.Encoding]::UTF8
@@ -213,6 +225,6 @@ GitHub Actions 在 Windows、Linux、macOS 上检查类型与测试,并通过
213
225
  | `src/command.ts`、`src/index.ts` | 命令处理、投递及生命周期 |
214
226
  | `tests` | 回归与宿主集成验证 |
215
227
 
216
- ## 许可
228
+ ## 许可证
217
229
 
218
230
  [Apache-2.0](LICENSE),Copyright 2026 MichengAI。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-simplify",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "DSH 代码简化插件:限定 Git 变更范围,支持未跟踪文件、跨平台路径与可靠的 Git 异常处理",
5
5
  "repository": { "type": "git", "url": "git+https://github.com/MichengAI/dsh-simplify.git" },
6
6
  "homepage": "https://github.com/MichengAI/dsh-simplify#readme",
@@ -23,16 +23,16 @@
23
23
  "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
24
24
  "peerDependencies": {
25
25
  "@deepseek-ai/cordis": "^4.0.2",
26
- "@deepseek-ai/dsh-commands": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2",
27
- "@deepseek-ai/dsh-llm": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2",
28
- "@deepseek-ai/dsh-subprocess": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2"
26
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1",
27
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1",
28
+ "@deepseek-ai/dsh-subprocess": "0.1.0-rc.8 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.6-alpha.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@deepseek-ai/cordis": "4.0.2",
32
- "@deepseek-ai/dsh-commands": "0.1.5-rc.2",
33
- "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
34
- "@deepseek-ai/dsh-subprocess": "0.1.5-rc.2",
35
- "@deepseek-ai/dsh-subprocess-local": "0.1.5-rc.2",
32
+ "@deepseek-ai/dsh-commands": "0.1.6-alpha.1",
33
+ "@deepseek-ai/dsh-llm": "0.1.6-alpha.1",
34
+ "@deepseek-ai/dsh-subprocess": "0.1.6-alpha.1",
35
+ "@deepseek-ai/dsh-subprocess-local": "0.1.6-alpha.1",
36
36
  "@types/node": "^22.19.0",
37
37
  "typescript": "~5.7.2"
38
38
  }