@michengai/dsh-simplify 0.1.0 → 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/CHANGELOG.md +15 -10
- package/CHANGELOG.zh-CN.md +15 -10
- package/README.md +7 -5
- package/README.zh-CN.md +7 -5
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](CHANGELOG.zh-CN.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.1 - 2026-09-06
|
|
6
|
+
|
|
7
|
+
- Update the documentation in the package to focus on features, usage scope, and known issues. Code simplification behavior is unchanged from `0.1.0`.
|
|
8
|
+
|
|
9
|
+
### Known Issues
|
|
10
|
+
|
|
11
|
+
- When there are no eligible code lines to simplify, the Agent does not start. Some host interfaces may not display the result, making the command appear unresponsive.
|
|
12
|
+
|
|
5
13
|
## 0.1.0 - 2026-09-06
|
|
6
14
|
|
|
7
|
-
- Add `/simplify`
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Add real Git regression tests and an optional integration test using real DSH services.
|
|
14
|
-
- Parse patch bodies with old/new line-count validation, excluding context lines and rejecting incomplete hunks.
|
|
15
|
-
- Initialize the public repository and bilingual documentation under Apache-2.0.
|
|
15
|
+
- Add `/simplify` to ask the current Agent to simplify code and improve readability while preserving existing behavior.
|
|
16
|
+
- Support current changes, staged changes only, changes relative to a specified commit, and selected files or directories.
|
|
17
|
+
- Support untracked new files and file paths containing Chinese characters or spaces.
|
|
18
|
+
- In default mode, review the most recent commit when there are no current changes.
|
|
19
|
+
- Stop the task if Git fails, times out, returns incomplete output, or files change during collection. Retry with a smaller scope or after editing has finished.
|
|
20
|
+
- In staged-only mode, ask you to resolve any unstaged changes in the selected files before proceeding.
|
|
16
21
|
|
|
17
22
|
### Known Issues
|
|
18
23
|
|
|
19
|
-
-
|
|
24
|
+
- When there are no eligible code lines to simplify, the Agent does not start. Some host interfaces may not display the result, making the command appear unresponsive.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
[English](CHANGELOG.md)
|
|
4
4
|
|
|
5
|
+
## 0.1.1 - 2026-09-06
|
|
6
|
+
|
|
7
|
+
- 更新安装包中的说明文档,聚焦功能、使用范围与已知问题。代码简化行为与 `0.1.0` 一致。
|
|
8
|
+
|
|
9
|
+
### 已知问题
|
|
10
|
+
|
|
11
|
+
- 没有可简化的代码行时,不会启动 Agent;部分宿主界面可能未显示结果,看起来像命令没有响应。
|
|
12
|
+
|
|
5
13
|
## 0.1.0 - 2026-09-06
|
|
6
14
|
|
|
7
|
-
- 新增 `/simplify
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
- Git
|
|
12
|
-
-
|
|
13
|
-
- 新增真实 Git 回归测试和可选真实 DSH 服务集成测试。
|
|
14
|
-
- 按补丁正文核对新旧行数,排除上下文行并拒绝残缺块。
|
|
15
|
-
- 初始化公开仓库及双语文档,项目采用 Apache-2.0。
|
|
15
|
+
- 新增 `/simplify`,由当前 Agent 简化代码,改善可读性,并以保持原有功能为前提。
|
|
16
|
+
- 支持当前改动、仅暂存区、相对指定提交的改动,以及指定文件或目录范围。
|
|
17
|
+
- 支持未跟踪的新增文件,以及包含中文、空格的文件路径。
|
|
18
|
+
- 默认模式下,当前没有改动时可回看最近一次提交。
|
|
19
|
+
- Git 执行失败、超时、输出不完整或文件在收集期间发生变化时停止任务;可缩小范围或在编辑结束后重试。
|
|
20
|
+
- 仅暂存区模式下,所选文件若还有未暂存改动,会提示先处理这些改动。
|
|
16
21
|
|
|
17
22
|
### 已知问题
|
|
18
23
|
|
|
19
|
-
-
|
|
24
|
+
- 没有可简化的代码行时,不会启动 Agent;部分宿主界面可能未显示结果,看起来像命令没有响应。
|
package/README.md
CHANGED
|
@@ -34,9 +34,9 @@ The plugin has its own review prompt, patch-body parser, Git collection, and DSH
|
|
|
34
34
|
|
|
35
35
|
## Installation
|
|
36
36
|
|
|
37
|
-
Requires Node.js >= 22.19, Git on PATH, and DSH `0.1.2-rc.1` with the `commands` and `subprocess` services. The session must have a local Git working directory.
|
|
37
|
+
Requires Node.js >= 22.19, Git on PATH, and DSH `0.1.2-rc.1` with the `commands` and `subprocess` services. The session must have a local Git working directory. Automated tests, including real host service integration, pass on Windows, Linux, and macOS. Installation in the desktop application has only been verified on Windows.
|
|
38
38
|
|
|
39
|
-
The current version is `0.1.
|
|
39
|
+
The current version is `0.1.1`, 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.
|
|
40
40
|
|
|
41
41
|
### From npm
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ The current version is `0.1.0`, available through npm, a packaged archive, or so
|
|
|
44
44
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
45
45
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
46
46
|
|
|
47
|
-
dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
47
|
+
dsh plugin --profile web add @michengai/dsh-simplify@0.1.1 --registry=https://registry.npmjs.org/
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### From Source
|
|
@@ -64,13 +64,13 @@ The entry point is `lib/index.js`, so build before installing. Keep the source d
|
|
|
64
64
|
|
|
65
65
|
### From a Local Package
|
|
66
66
|
|
|
67
|
-
Download the tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.
|
|
67
|
+
Download the tgz from the [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.1), or run `npm pack` in the source directory, then run this from the package directory:
|
|
68
68
|
|
|
69
69
|
```powershell
|
|
70
70
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
71
71
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
72
72
|
|
|
73
|
-
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.
|
|
73
|
+
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.1.tgz --ignore-scripts
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### Reload and Verify
|
|
@@ -156,6 +156,8 @@ Tests use real temporary Git repositories to cover paths, untracked files, fallb
|
|
|
156
156
|
|
|
157
157
|
`tests/host.test.mjs` looks for a DSH runtime at `%USERPROFILE%\.dsh\profiles\node_modules`. Set `DSH_RUNTIME_ROOT` to use another runtime's node_modules path. When detected, it runs isolated integration checks for real service registration, Git execution, message delivery, and disposal; otherwise, that test is explicitly skipped. Tests do not call a model or modify installed profiles.
|
|
158
158
|
|
|
159
|
+
GitHub Actions checks types and tests on Windows, Linux, and macOS, using the host runtime from development dependencies through `DSH_RUNTIME_ROOT`. Publishing a stable GitHub Release starts `publish.yml`: it runs all three platform checks, validates the version, bilingual release notes, and package contents, publishes through npm Trusted Publishing, and uploads the same tgz to the Release. Configure `publish.yml` as the workflow filename in npm and allow `npm publish`; no publishing token is required.
|
|
160
|
+
|
|
159
161
|
| Path | Responsibility |
|
|
160
162
|
| --- | --- |
|
|
161
163
|
| `src/args.ts` | Command argument parsing |
|
package/README.zh-CN.md
CHANGED
|
@@ -34,9 +34,9 @@ DeepSeek Harness 代码简化插件。运行 `/simplify` 后,插件收集 Git
|
|
|
34
34
|
|
|
35
35
|
## 安装
|
|
36
36
|
|
|
37
|
-
要求 Node.js >= 22.19、PATH 中可执行的 Git,以及提供 `commands`、`subprocess` 服务的 DSH `0.1.2-rc.1`。会话需要关联本地 Git 工作目录。Windows
|
|
37
|
+
要求 Node.js >= 22.19、PATH 中可执行的 Git,以及提供 `commands`、`subprocess` 服务的 DSH `0.1.2-rc.1`。会话需要关联本地 Git 工作目录。Windows、Linux、macOS 均已通过自动化测试(含真实宿主服务集成);桌面应用中的实际安装仅在 Windows 验证。
|
|
38
38
|
|
|
39
|
-
当前版本为 `0.1.
|
|
39
|
+
当前版本为 `0.1.1`,支持 npm、安装包和源码安装。以下示例使用 `web` profile,请按实际环境替换。安装前停用其他注册 `/simplify` 的插件。
|
|
40
40
|
|
|
41
41
|
### 从 npm 安装
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ DeepSeek Harness 代码简化插件。运行 `/simplify` 后,插件收集 Git
|
|
|
44
44
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
45
45
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
46
46
|
|
|
47
|
-
dsh plugin --profile web add @michengai/dsh-simplify@0.1.
|
|
47
|
+
dsh plugin --profile web add @michengai/dsh-simplify@0.1.1 --registry=https://registry.npmjs.org/
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### 从源码安装
|
|
@@ -64,13 +64,13 @@ dsh plugin --profile web add . --ignore-scripts
|
|
|
64
64
|
|
|
65
65
|
### 从本地安装包安装
|
|
66
66
|
|
|
67
|
-
从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.
|
|
67
|
+
从 [GitHub Release](https://github.com/MichengAI/dsh-simplify/releases/tag/v0.1.1) 下载 tgz,或在源码目录运行 `npm pack` 生成安装包,然后在安装包所在目录执行:
|
|
68
68
|
|
|
69
69
|
```powershell
|
|
70
70
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
71
71
|
$OutputEncoding = [System.Text.Encoding]::UTF8
|
|
72
72
|
|
|
73
|
-
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.
|
|
73
|
+
dsh plugin --profile web add .\michengai-dsh-simplify-0.1.1.tgz --ignore-scripts
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### 重新加载与确认
|
|
@@ -156,6 +156,8 @@ npm pack --dry-run
|
|
|
156
156
|
|
|
157
157
|
`tests/host.test.mjs` 检测 `%USERPROFILE%\.dsh\profiles\node_modules` 的 DSH 运行时;也可通过 `DSH_RUNTIME_ROOT` 指定其 node_modules 路径。检测到时执行隔离的真实服务注册、Git 执行、消息投递与卸载测试;缺失时明确标为跳过。测试不调用模型,不修改已安装 profile。
|
|
158
158
|
|
|
159
|
+
GitHub Actions 在 Windows、Linux、macOS 上检查类型与测试,并通过 `DSH_RUNTIME_ROOT` 使用开发依赖中的宿主运行时。发布正式 GitHub Release 后,`publish.yml` 先完成三平台检查,再核对版本、双语发布说明及安装包内容,通过 npm Trusted Publishing 发布,并把同一 tgz 上传到 Release。npm 中的工作流文件名需配置为 `publish.yml`,并允许 `npm publish`;不需要发布令牌。
|
|
160
|
+
|
|
159
161
|
| 目录 | 职责 |
|
|
160
162
|
| --- | --- |
|
|
161
163
|
| `src/args.ts` | 命令参数解析 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-simplify",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@deepseek-ai/dsh-commands": "0.1.2-rc.1",
|
|
33
33
|
"@deepseek-ai/dsh-llm": "0.1.2-rc.1",
|
|
34
34
|
"@deepseek-ai/dsh-subprocess": "0.1.2-rc.1",
|
|
35
|
+
"@deepseek-ai/dsh-subprocess-local": "0.1.2-rc.1",
|
|
35
36
|
"@types/node": "^22.19.0",
|
|
36
37
|
"typescript": "~5.7.2"
|
|
37
38
|
}
|