dsh-patch-edit-plus 0.2.1 → 0.2.3

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
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.3] — 2026-09-29
4
+
5
+ ### Fixed
6
+ - **Delete/Move silently degraded to UNSUPPORTED on real 0.1.7 hosts** (defect shipped in 0.2.1): the shell duck-detect looked for `run()`, but DSH renamed `ShellExecutor.run(spec)` → `execute(spec)` (returning a `ShellProcess` handle with a `result()` foreground projection) between 0.1.2 and 0.1.7 — so the detect never matched and Delete/Move always fell back to a structured UNSUPPORTED error. `shellops` now calls `shell.execute(...)` + `await execution.result()` and duck-detects `execute`; shell test mocks moved to the `execute()`/`result()` shape.
7
+
8
+ ### Changed
9
+ - devDependencies 4x `@deepseek-ai/dsh-*` `0.1.2-rc.1` → `0.1.7-rc.2`: the type baseline now matches the hosts this line serves (the stale pin was the "fake green" pattern — it masked the rename above).
10
+ - Docs x4 (README/INSTALL): compatibility re-based to the `0.1.7` segment; ja/ko matrices were stale at the 0.1.2~0.1.5 wide claim.
11
+
12
+ ## [0.2.1] — 2026-09-25
13
+
14
+ - First release of the 0.1.7 line (`dsh-0.1.7` dist-tag): declarative settings — `allowCodexPatch` marked `.volatile()`, settings form auto-rendered, tool re-registered in place via `loader/volatile-update` (no remount, no registration call).
15
+
3
16
  ## [0.1.2] — 2026-09-19
4
17
 
5
18
  ### Fixed
package/CHANGELOG.zh.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # 更新日志
2
2
 
3
+ ## [0.2.3] — 2026-09-29
4
+
5
+ ### 修复
6
+ - **Delete/Move 在真实 0.1.7 宿主上被静默降级为 UNSUPPORTED**(0.2.1 携带的缺陷):shell 鸭子探测查的是 `run()`,但 DSH 在 0.1.2→0.1.7 之间把 `ShellExecutor.run(spec)` 改名为 `execute(spec)`(返回 `ShellProcess` 句柄 + `result()` 前台投影)——探测永不命中,Delete/Move 一直落到结构化 UNSUPPORTED 错误。`shellops` 现改用 `shell.execute(...)` + `await execution.result()`,鸭子探测改查 `execute`;shell 测试 mock 同步迁移到 `execute()`/`result()` 形态。
7
+
8
+ ### 变更
9
+ - devDependencies 4 项 `@deepseek-ai/dsh-*` `0.1.2-rc.1` → `0.1.7-rc.2`:类型基线与本线服务的宿主对齐(过期的钉版正是「假绿」形态——它掩盖了上述改名)。
10
+ - 文档 ×4(README/INSTALL):兼容矩阵重基于 `0.1.7` 线段;ja/ko 矩阵此前停留在 0.1.2~0.1.5 旧态。
11
+
12
+ ## [0.2.1] — 2026-09-25
13
+
14
+ - 0.1.7 线首发(`dsh-0.1.7` dist-tag):声明式设置——`allowCodexPatch` 标记 `.volatile()`,设置表单自动生成,工具经 `loader/volatile-update` 原位重注册(不 remount、无注册调用)。
15
+
3
16
  ## [0.1.2] — 2026-09-19
4
17
 
5
18
  ### 修复
package/README.ja.md CHANGED
@@ -6,11 +6,12 @@
6
6
 
7
7
  | DSH バージョン | ステータス | 備考 |
8
8
  |---|---|---|
9
- | `0.1.2-rc.1` | ✅ サポート対象 | ツールオーサリング契約(`defineTool` DSL、presentation intents)は 0.1.2〜0.1.5 でバイト単位で同一であり、1 つのコードパスが両方を担います。 |
10
- | `0.1.3-alpha.x` | ✅ サポート対象 | 上記と同じ。 |
11
- | `0.1.5-rc.2` | ✅ 静的検証済み | `npm run typecheck:0.1.5` は実際の `0.1.5-rc.2` ピアパッケージに対して `src/` を型チェックします。`readByteRange` の使用はなく、0.1.5 専用の PTC 識別子もありません。 |
9
+ | `0.1.7-rc.1+` | ✅ サポート対象(本ライン、v0.2.1+) | 宣言的設定:`allowCodexPatch` を `.volatile()` とマーク — 設定フォームは自動生成され、`loader/volatile-update` が remount なしでツールをその場で再登録します。v0.2.3 は Delete/Move を修正:shell のダックタイピング検出が `run()` を見ていましたが、実 0.1.7 ホストでは決して一致しません(`run` は 0.1.2→0.1.7 の間に `execute` に改名)、Delete/Move は UNSUPPORTED にサイレント降格していました。現在は `execute()` + `result()` を使用。 |
10
+ | `0.1.2-rc.1` ~ `0.1.4` | ↗ メンテナンスライン | 公開済みの `0.1.2`(main ブランチ)が担います。 |
11
+ | `0.1.5-rc.x` | ↗ メンテナンスライン | `dsh-0.1.5` dist-tag(v0.2.2+)が担います。 |
12
+ | `0.2.0-rc.1+` | ↗ 次ライン | `dsh-0.2.0` dist-tag(v0.3.0+)が担います。 |
12
13
 
13
- 設定の登録はデュアル API フォールバック(0.1.2 以降では `settings.installSection`、旧ホストでは `settings.register`)を使用します。
14
+ 本ラインの設定は宣言的です:`Config` で `.volatile()` とマークされたフィールドが設定フォームになり、プラグインは登録 hooks を受け取る代わりに `loader/volatile-update` を購読します。
14
15
 
15
16
  ## そもそもなぜパッチなのか?(ツールルーティングガイド)
16
17
 
@@ -109,8 +110,8 @@ dsh web --dump-config # verify the plugin row appears
109
110
 
110
111
  ```bash
111
112
  npm install
112
- npm run typecheck # against 0.1.2-rc.1 peers (devDependencies)
113
- npm run typecheck:0.1.5 # against 0.1.5-rc.2 peers (static dual-version proof)
113
+ npm run typecheck # against 0.1.7-rc.2 peers (devDependencies)
114
+ npm run typecheck:0.1.5 # 実在の 0.1.5-rc.2 ピアに対するレガシー交叉検証
114
115
  npm test # vitest, 90 tests
115
116
  npm run lint
116
117
  npm run build # lib/
package/README.ko.md CHANGED
@@ -6,11 +6,12 @@
6
6
 
7
7
  | DSH 버전 | 상태 | 비고 |
8
8
  |---|---|---|
9
- | `0.1.2-rc.1` | ✅ 지원됨 | 도구 작성 계약(`defineTool` DSL, 프레젠테이션 인텐트)은 0.1.2–0.1.5 전 구간에서 바이트 단위로 동일하므로 하나의 코드 경로가 양쪽을 모두 지원합니다. |
10
- | `0.1.3-alpha.x` | ✅ 지원됨 | 위와 동일합니다. |
11
- | `0.1.5-rc.2` | ✅ 정적 검증 완료 | `npm run typecheck:0.1.5`는 실제 `0.1.5-rc.2` peer 패키지를 대상으로 `src/`의 타입을 검사합니다. `readByteRange`를 사용하지 않으며, 0.1.5 전용 PTC 식별자도 없습니다. |
9
+ | `0.1.7-rc.1+` | ✅ 지원됨(본 라인, v0.2.1+) | 선언적 설정: `allowCodexPatch`에 `.volatile()` 마크 — 설정 폼이 자동 생성되고, `loader/volatile-update`가 remount 없이 도구를 그 자리에서 재등록합니다. v0.2.3은 Delete/Move를 수정: shell 덕 타이핑 감지가 `run()`을 보았으나 실 0.1.7 호스트에서는 결코 일치하지 않았고(`run`은 0.1.2→0.1.7 사이에 `execute`로 개명), Delete/Move가 UNSUPPORTED로 조용히 강등되었습니다. 이제 `execute()` + `result()` 사용. |
10
+ | `0.1.2-rc.1` ~ `0.1.4` | ↗ 유지보수 라인 | 게시된 `0.1.2`(main 브랜치)가 담당합니다. |
11
+ | `0.1.5-rc.x` | ↗ 유지보수 라인 | `dsh-0.1.5` dist-tag(v0.2.2+)가 담당합니다. |
12
+ | `0.2.0-rc.1+` | ↗ 다음 라인 | `dsh-0.2.0` dist-tag(v0.3.0+)가 담당합니다. |
12
13
 
13
- 설정 등록은 이중 API 폴백을 사용합니다(0.1.2+ 에서는 `settings.installSection`, 이전 호스트에서는 `settings.register`).
14
+ 본 라인의 설정은 선언적입니다: `Config`에서 `.volatile()`로 마크된 필드가 설정 폼이 되고, 플러그인은 등록 hooks를 받는 대신 `loader/volatile-update`를 구독합니다.
14
15
 
15
16
  ## 왜 굳이 패치인가? (도구 라우팅 가이드)
16
17
 
@@ -109,8 +110,8 @@ dsh web --dump-config # verify the plugin row appears
109
110
 
110
111
  ```bash
111
112
  npm install
112
- npm run typecheck # against 0.1.2-rc.1 peers (devDependencies)
113
- npm run typecheck:0.1.5 # against 0.1.5-rc.2 peers (static dual-version proof)
113
+ npm run typecheck # against 0.1.7-rc.2 peers (devDependencies)
114
+ npm run typecheck:0.1.5 # 실제 0.1.5-rc.2 peer 대상 레거시 교차 검증
114
115
  npm test # vitest, 90 tests
115
116
  npm run lint
116
117
  npm run build # lib/
package/README.md CHANGED
@@ -6,8 +6,10 @@ Patch-style file editing for [DeepSeek Harness (DSH)](https://github.com/deepsee
6
6
 
7
7
  | DSH version | Status | Notes |
8
8
  |---|---|---|
9
- | `0.1.7-rc.1+` | ✅ supported (this line, v0.2.0+) | Declarative settings: `allowCodexPatch` is marked `.volatile()` — the settings form renders automatically and `loader/volatile-update` re-registers the tool without a remount. No registration call. |
10
- | `0.1.2-rc.1` ~ `0.1.5-rc.2` | ↗ maintenance line | Served by the pre-0.1.7 branch / `dsh-0.1.5` dist-tag. 0.1.7 removed the imperative settings APIs the dual-API fallback relied on, so one codebase cannot serve both. |
9
+ | `0.1.7-rc.1+` | ✅ supported (this line, v0.2.1+) | Declarative settings: `allowCodexPatch` is marked `.volatile()` — the settings form renders automatically and `loader/volatile-update` re-registers the tool without a remount. v0.2.3 fixes Delete/Move: the shell `run()` duck-detect never matched real 0.1.7 hosts (`run` was renamed `execute` between 0.1.2 and 0.1.7), silently degrading them to UNSUPPORTED; now uses `execute()` + `result()`. |
10
+ | `0.1.2-rc.1` ~ `0.1.4` | ↗ maintenance line | Served by the published `0.1.2` (main branch). |
11
+ | `0.1.5-rc.x` | ↗ maintenance line | Served by the `dsh-0.1.5` dist-tag (v0.2.2+). |
12
+ | `0.2.0-rc.1+` | ↗ next line | Served by the `dsh-0.2.0` dist-tag (v0.3.0+). |
11
13
 
12
14
  Settings are declarative on this line: fields marked `.volatile()` in `Config` become the settings form; the plugin subscribes to `loader/volatile-update` instead of receiving registration hooks.
13
15
 
@@ -108,8 +110,8 @@ Enable with `allowCodexPatch: true`. When a Codex patch arrives while disabled,
108
110
 
109
111
  ```bash
110
112
  npm install
111
- npm run typecheck # against 0.1.2-rc.1 peers (devDependencies)
112
- npm run typecheck:0.1.5 # against 0.1.5-rc.2 peers (static dual-version proof)
113
+ npm run typecheck # against 0.1.7-rc.2 peers (devDependencies)
114
+ npm run typecheck:0.1.5 # legacy cross-proof against real 0.1.5-rc.2 peers
113
115
  npm test # vitest, 90 tests
114
116
  npm run lint
115
117
  npm run build # lib/
package/README.zh.md CHANGED
@@ -6,8 +6,10 @@
6
6
 
7
7
  | DSH 版本 | 状态 | 说明 |
8
8
  |---|---|---|
9
- | `0.1.7-rc.1+` | ✅ 支持(本线,v0.2.0+) | 声明式设置:`allowCodexPatch` 标记 `.volatile()`——设置表单自动生成,`loader/volatile-update` 驱动工具原位重注册(不 remount),无任何注册调用。 |
10
- | `0.1.2-rc.1` ~ `0.1.5-rc.2` | ↗ 维护线 | 由 0.1.7 前的分支 / `dsh-0.1.5` dist-tag 服务。0.1.7 删除了双 API 回退所依赖的命令式注册 API,一份代码无法同时兼容两代。 |
9
+ | `0.1.7-rc.1+` | ✅ 支持(本线,v0.2.1+) | 声明式设置:`allowCodexPatch` 标记 `.volatile()`——设置表单自动生成,`loader/volatile-update` 驱动工具原位重注册(不 remount)。v0.2.3 修复 Delete/Move:shell 鸭子探测查 `run()` 在真实 0.1.7 宿主永不命中(`run` 在 0.1.2→0.1.7 间改名为 `execute`),Delete/Move 被静默降级为 UNSUPPORTED;现改用 `execute()` + `result()`。 |
10
+ | `0.1.2-rc.1` ~ `0.1.4` | ↗ 维护线 | 由已发布的 `0.1.2`(main 分支)服务。 |
11
+ | `0.1.5-rc.x` | ↗ 维护线 | 由 `dsh-0.1.5` dist-tag(v0.2.2+)服务。 |
12
+ | `0.2.0-rc.1+` | ↗ 下一线 | 由 `dsh-0.2.0` dist-tag(v0.3.0+)服务。 |
11
13
 
12
14
  本线的 settings 是声明式的:`Config` 中标记 `.volatile()` 的字段即设置表单;插件订阅 `loader/volatile-update`,不再接收注册 hooks。
13
15
 
@@ -107,8 +109,8 @@ dsh web --dump-config # 确认插件行出现
107
109
 
108
110
  ```bash
109
111
  npm install
110
- npm run typecheck # 针对 0.1.2-rc.1 peer 包(devDependencies)
111
- npm run typecheck:0.1.5 # 针对 0.1.5-rc.2 peer 包(双版本静态核验)
112
+ npm run typecheck # 针对 0.1.7-rc.2 peer 包(devDependencies)
113
+ npm run typecheck:0.1.5 # 对真实 0.1.5-rc.2 peer 包的遗留交叉核验
112
114
  npm test # vitest,90 个用例
113
115
  npm run lint
114
116
  npm run build # lib/
package/dsh.plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "dsh-patch-edit-plus",
3
3
  "name": "dsh-patch-edit-plus",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "description": {
6
6
  "en": "Patch-style file editing: one apply_patch tool for git/unified diff (default) and Codex apply_patch syntax (opt-in), with all-or-nothing application and sandbox-aware delete/move.",
7
7
  "zh": "补丁风格文件编辑:单个 apply_patch 工具,接受 git/unified diff(默认)与 Codex apply_patch 语法(可选开启),全量验证后原子应用,删除/移动走沙箱感知 shell。"
package/lib/shellops.js CHANGED
@@ -36,7 +36,7 @@ export function moveTemplate(cfg) {
36
36
  export function resolveShell(ctx) {
37
37
  try {
38
38
  const shell = ctx.shell;
39
- return shell !== undefined && typeof shell.run === 'function' && typeof shell.resolve === 'function' ? shell : undefined;
39
+ return shell !== undefined && typeof shell.execute === 'function' && typeof shell.resolve === 'function' ? shell : undefined;
40
40
  }
41
41
  catch {
42
42
  return undefined;
@@ -87,7 +87,8 @@ function requireShell(ctx, cfg) {
87
87
  }
88
88
  async function runShell(shell, request) {
89
89
  try {
90
- return await shell.run(shell.resolve(request));
90
+ const execution = await shell.execute(shell.resolve(request));
91
+ return await execution.result();
91
92
  }
92
93
  catch (error) {
93
94
  const detail = error instanceof Error ? error.message : String(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-patch-edit-plus",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Patch-style file editing for DeepSeek Harness: one apply_patch tool accepting git/unified diff (default) and Codex apply_patch syntax (opt-in), with all-or-nothing application, read-before-write intent dance, sandbox-aware delete/move, with a DSH 0.1.7+ line (declarative volatile settings).",
5
5
  "type": "module",
6
6
  "repository": {
@@ -89,10 +89,10 @@
89
89
  },
90
90
  "devDependencies": {
91
91
  "@deepseek-ai/cordis": "^4.0.2",
92
- "@deepseek-ai/dsh-fs": "0.1.2-rc.1",
93
- "@deepseek-ai/dsh-sandbox": "0.1.2-rc.1",
94
- "@deepseek-ai/dsh-shell": "0.1.2-rc.1",
95
- "@deepseek-ai/dsh-tools": "0.1.2-rc.1",
92
+ "@deepseek-ai/dsh-fs": "0.1.7-rc.2",
93
+ "@deepseek-ai/dsh-sandbox": "0.1.7-rc.2",
94
+ "@deepseek-ai/dsh-shell": "0.1.7-rc.2",
95
+ "@deepseek-ai/dsh-tools": "0.1.7-rc.2",
96
96
  "@eslint/js": "^9.0.0",
97
97
  "@types/node": "^22.0.0",
98
98
  "eslint": "^9.0.0",