dsh-patch-edit-plus 0.2.3 → 0.2.4

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,11 @@
1
1
  # Changelog
2
2
 
3
+
4
+ ## [0.2.4] — 2026-10-01
5
+
6
+ ### Changed
7
+ - **Both patch syntaxes are now enabled by default**: `allowCodexPatch` default `false` → `true`, so the tool accepts git/unified diff and Codex `apply_patch` out of the box. The inserted `cordis.patch.yml` row now carries the config itself (`allowUnifiedDiff: true` + `allowCodexPatch: true`) — configuration ships through the patch layer instead of leaning on the settings panel. Set `allowCodexPatch: false` to restore unified-diff-only; the `.volatile()` settings projection is unchanged, so an explicit toggle still takes effect without a restart. The actionable UNSUPPORTED hint is unchanged for the explicit-opt-out case.
8
+ - Smoke reworked for the new default: default-on apply, explicit `true` + dryRun, explicit `false` deny, and an assertion that the inserted patch row ships both modes enabled.
3
9
  ## [0.2.3] — 2026-09-29
4
10
 
5
11
  ### Fixed
package/CHANGELOG.zh.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # 更新日志
2
2
 
3
+
4
+ ## [0.2.4] — 2026-10-01
5
+
6
+ ### 变更
7
+ - **两种补丁语法默认全部开启**:`allowCodexPatch` 默认值 `false` → `true`,工具开箱即接受 git/unified diff 与 Codex `apply_patch`。插入的 `cordis.patch.yml` 行现在自带配置(`allowUnifiedDiff: true` + `allowCodexPatch: true`)——配置随 patch 层下发,不再依赖设置面板。设 `allowCodexPatch: false` 可退回仅 unified diff;`.volatile()` 设置投影不变,显式开关依旧即时生效、无需重启。显式关闭时的可操作 UNSUPPORTED 提示保持不变。
8
+ - Smoke 按新默认重写:默认开启直接应用、显式 `true` + dryRun、显式 `false` 拒绝,并断言插入的 patch 行携带两种模式开启。
3
9
  ## [0.2.3] — 2026-09-29
4
10
 
5
11
  ### 修复
package/README.ja.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # dsh-patch-edit-plus
2
2
 
3
- [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 向けのパッチ形式ファイル編集。モデルに公開される単一の `apply_patch` ツールが **git/unified diff**(既定)と **Codex `apply_patch` 構文**(オプトイン)を受け付け、すべての変更を **オール・オア・ナッシング**で適用し、DSH の動作には一切干渉しません。
3
+ [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness) 向けのパッチ形式ファイル編集。モデルに公開される単一の `apply_patch` ツールが **git/unified diff** と **Codex `apply_patch` 構文**(両方とも既定で有効)を受け付け、すべての変更を **オール・オア・ナッシング**で適用し、DSH の動作には一切干渉しません。
4
4
 
5
5
  ## DSH バージョン互換性
6
6
 
7
7
  | DSH バージョン | ステータス | 備考 |
8
8
  |---|---|---|
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()` を使用。 |
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()` を使用。v0.2.4:`allowCodexPatch` の既定値が `true` に — 両構文が初期状態で有効;設定は挿入される `cordis.patch.yml` 行経由で配布。 |
10
10
  | `0.1.2-rc.1` ~ `0.1.4` | ↗ メンテナンスライン | 公開済みの `0.1.2`(main ブランチ)が担います。 |
11
11
  | `0.1.5-rc.x` | ↗ メンテナンスライン | `dsh-0.1.5` dist-tag(v0.2.2+)が担います。 |
12
12
  | `0.2.0-rc.1+` | ↗ 次ライン | `dsh-0.2.0` dist-tag(v0.3.0+)が担います。 |
@@ -45,7 +45,7 @@ dsh web --dump-config # verify the plugin row appears
45
45
  }
46
46
  ```
47
47
 
48
- ### Codex apply_patch 構文(オプトイン)
48
+ ### Codex apply_patch 構文(既定で有効)
49
49
 
50
50
  ```text
51
51
  *** Begin Patch
@@ -61,7 +61,7 @@ dsh web --dump-config # verify the plugin row appears
61
61
  *** End Patch
62
62
  ```
63
63
 
64
- `allowCodexPatch: true` で有効化します。無効時に Codex パッチが届くと、ツールは汎用のパースエラーではなく **実行可能なヒント**(有効化の方法、または unified diff での再試行方法)を返します。Codex 構文は GPT 系モデルにとって強い事前分布であり、無言の失敗はモデルを再試行ループに閉じ込めてしまいます。
64
+ 両構文とも既定で有効です。既定値は `Config` スキーマが持ち、挿入される `cordis.patch.yml` 行も `allowUnifiedDiff: true` + `allowCodexPatch: true` を運びます。`allowCodexPatch: false` で unified diff 専用に戻せます。明示的に無効化した状態で Codex パッチが届くと、ツールは汎用のパースエラーではなく **実行可能なヒント**(有効化の方法、または unified diff での再試行方法)を返します。Codex 構文は GPT 系モデルにとって強い事前分布であり、無言の失敗はモデルを再試行ループに閉じ込めてしまいます。
65
65
 
66
66
  ### 操作
67
67
 
@@ -88,7 +88,7 @@ dsh web --dump-config # verify the plugin row appears
88
88
  | `conflictPolicy` | `rename` | ツール名が使用済みの場合の `rename` / `skip` / `fail`。 |
89
89
  | `renameSuffix` | `_1` | リネーム回避で使用される接尾辞。 |
90
90
  | `allowUnifiedDiff` | `true` | git/unified diff を受け付けます。 |
91
- | `allowCodexPatch` | `false` | Codex `apply_patch` 構文を受け付けます。DSH 設定パネルからも変更でき、変更は即座に反映されます(再起動不要)。 |
91
+ | `allowCodexPatch` | `true` | Codex `apply_patch` 構文を受け付けます(`false` で unified diff 専用)。DSH 設定パネルからも変更でき、変更は即座に反映されます(再起動不要)。 |
92
92
  | `deleteBackend` | `shell` | `shell` または `none`(削除/移動は構造化エラーを返します)。 |
93
93
  | `shellDialect` | `auto` | `auto`(win32 では pwsh)/ `posix` / `pwsh`。 |
94
94
  | `deleteCommand` / `moveCommand` | 組み込み | カスタムコマンドテンプレート。パスは依然として **env 経由のみ**(`DSH_PATCH_TARGET` / `DSH_PATCH_SOURCE`)で渡され、コマンド文字列に補間されることはありません。 |
package/README.ko.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # dsh-patch-edit-plus
2
2
 
3
- [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness)를 위한 패치 스타일 파일 편집 도구입니다. 모델에 노출되는 단일 `apply_patch` 도구가 **git/unified diff**(기본)와 **Codex `apply_patch` 문법**(옵트인)을 받아들이고, 모든 변경을 **전부 아니면 전무(all-or-nothing)** 방식으로 적용하며, DSH의 동작에는 전혀 간섭하지 않습니다.
3
+ [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness)를 위한 패치 스타일 파일 편집 도구입니다. 모델에 노출되는 단일 `apply_patch` 도구가 **git/unified diff**와 **Codex `apply_patch` 문법**(둘 다 기본 활성화)을 받아들이고, 모든 변경을 **전부 아니면 전무(all-or-nothing)** 방식으로 적용하며, DSH의 동작에는 전혀 간섭하지 않습니다.
4
4
 
5
5
  ## DSH 버전 호환성
6
6
 
7
7
  | DSH 버전 | 상태 | 비고 |
8
8
  |---|---|---|
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()` 사용. |
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()` 사용. v0.2.4: `allowCodexPatch` 기본값이 `true`로 — 두 문법 모두 초기 상태에서 활성화; 설정은 삽입되는 `cordis.patch.yml` 행을 통해 배포. |
10
10
  | `0.1.2-rc.1` ~ `0.1.4` | ↗ 유지보수 라인 | 게시된 `0.1.2`(main 브랜치)가 담당합니다. |
11
11
  | `0.1.5-rc.x` | ↗ 유지보수 라인 | `dsh-0.1.5` dist-tag(v0.2.2+)가 담당합니다. |
12
12
  | `0.2.0-rc.1+` | ↗ 다음 라인 | `dsh-0.2.0` dist-tag(v0.3.0+)가 담당합니다. |
@@ -45,7 +45,7 @@ dsh web --dump-config # verify the plugin row appears
45
45
  }
46
46
  ```
47
47
 
48
- ### Codex apply_patch 문법 (옵트인)
48
+ ### Codex apply_patch 문법 (기본 활성화)
49
49
 
50
50
  ```text
51
51
  *** Begin Patch
@@ -61,7 +61,7 @@ dsh web --dump-config # verify the plugin row appears
61
61
  *** End Patch
62
62
  ```
63
63
 
64
- `allowCodexPatch: true`로 활성화합니다. 비활성 상태에서 Codex 패치가 들어오면 도구는 일반적인 파싱 오류 대신 **실행 가능한 힌트**(활성화 방법, 또는 unified diff로 재시도하는 방법)를 반환합니다. Codex 문법은 GPT 계열 모델에게 강한 사전 확률(prior)이며, 조용한 실패는 모델을 재시도 루프에 가두기 때문입니다.
64
+ 두 문법 모두 기본 활성화되어 있습니다. 기본값은 `Config` 스키마가 가지며, 삽입되는 `cordis.patch.yml` 행도 `allowUnifiedDiff: true` + `allowCodexPatch: true`를 운반합니다. `allowCodexPatch: false`로 unified diff 전용으로 되돌릴 수 있습니다. 명시적으로 비활성화된 상태에서 Codex 패치가 들어오면 도구는 일반적인 파싱 오류 대신 **실행 가능한 힌트**(활성화 방법, 또는 unified diff로 재시도하는 방법)를 반환합니다. Codex 문법은 GPT 계열 모델에게 강한 사전 확률(prior)이며, 조용한 실패는 모델을 재시도 루프에 가두기 때문입니다.
65
65
 
66
66
  ### 연산
67
67
 
@@ -88,7 +88,7 @@ dsh web --dump-config # verify the plugin row appears
88
88
  | `conflictPolicy` | `rename` | 도구 이름이 이미 사용 중일 때의 동작으로, `rename` / `skip` / `fail` 중 하나입니다. |
89
89
  | `renameSuffix` | `_1` | 이름 회피에 사용되는 접미사입니다. |
90
90
  | `allowUnifiedDiff` | `true` | git/unified diff를 허용합니다. |
91
- | `allowCodexPatch` | `false` | Codex `apply_patch` 문법을 허용합니다. DSH 설정 패널에서도 변경할 수 있으며, 변경은 즉시 적용됩니다(재시작 불필요). |
91
+ | `allowCodexPatch` | `true` | Codex `apply_patch` 문법을 허용합니다(`false`로 unified diff 전용). DSH 설정 패널에서도 변경할 수 있으며, 변경은 즉시 적용됩니다(재시작 불필요). |
92
92
  | `deleteBackend` | `shell` | `shell` 또는 `none`(`none`이면 삭제/이동이 구조화된 오류를 반환합니다). |
93
93
  | `shellDialect` | `auto` | `auto`(win32에서는 pwsh) / `posix` / `pwsh` 중 하나입니다. |
94
94
  | `deleteCommand` / `moveCommand` | 내장 | 사용자 지정 명령 템플릿입니다. 경로는 여전히 **환경 변수로만**(`DSH_PATCH_TARGET` / `DSH_PATCH_SOURCE`) 전달되며, 명령 문자열에 끼워 넣어서는 안 됩니다. |
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # dsh-patch-edit-plus
2
2
 
3
- Patch-style file editing for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness): one model-facing `apply_patch` tool that accepts **git/unified diff** (default) and **Codex `apply_patch` syntax** (opt-in), applies every change **all-or-nothing**, and stays completely out of DSH's way.
3
+ Patch-style file editing for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness): one model-facing `apply_patch` tool that accepts **git/unified diff** and **Codex `apply_patch` syntax** (both enabled by default), applies every change **all-or-nothing**, and stays completely out of DSH's way.
4
4
 
5
5
  ## DSH version compatibility
6
6
 
7
7
  | DSH version | Status | Notes |
8
8
  |---|---|---|
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()`. |
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()`. v0.2.4: `allowCodexPatch` defaults to `true` — both syntaxes on out of the box; the config ships on the inserted `cordis.patch.yml` row. |
10
10
  | `0.1.2-rc.1` ~ `0.1.4` | ↗ maintenance line | Served by the published `0.1.2` (main branch). |
11
11
  | `0.1.5-rc.x` | ↗ maintenance line | Served by the `dsh-0.1.5` dist-tag (v0.2.2+). |
12
12
  | `0.2.0-rc.1+` | ↗ next line | Served by the `dsh-0.2.0` dist-tag (v0.3.0+). |
@@ -45,7 +45,7 @@ dsh web --dump-config # verify the plugin row appears
45
45
  }
46
46
  ```
47
47
 
48
- ### Codex apply_patch syntax (opt-in)
48
+ ### Codex apply_patch syntax (on by default)
49
49
 
50
50
  ```text
51
51
  *** Begin Patch
@@ -61,7 +61,7 @@ dsh web --dump-config # verify the plugin row appears
61
61
  *** End Patch
62
62
  ```
63
63
 
64
- Enable with `allowCodexPatch: true`. When a Codex patch arrives while disabled, the tool returns an **actionable hint** (how to enable or how to retry in unified diff) instead of a generic parse error — Codex syntax is a strong prior for GPT-family models and a silent failure traps them in retry loops.
64
+ Both syntaxes ship enabled: the defaults live in the `Config` schema and the inserted `cordis.patch.yml` row carries `allowUnifiedDiff: true` + `allowCodexPatch: true`. Set `allowCodexPatch: false` to go unified-diff-only. When a Codex patch arrives while explicitly disabled, the tool returns an **actionable hint** (how to enable or how to retry in unified diff) instead of a generic parse error — Codex syntax is a strong prior for GPT-family models and a silent failure traps them in retry loops.
65
65
 
66
66
  ### Operations
67
67
 
@@ -88,7 +88,7 @@ Enable with `allowCodexPatch: true`. When a Codex patch arrives while disabled,
88
88
  | `conflictPolicy` | `rename` | `rename` / `skip` / `fail` when the tool name is taken. |
89
89
  | `renameSuffix` | `_1` | Suffix used by rename avoidance. |
90
90
  | `allowUnifiedDiff` | `true` | Accept git/unified diffs. |
91
- | `allowCodexPatch` | `false` | Accept Codex `apply_patch` syntax. Also editable in the DSH settings panel; changes take effect immediately, no restart needed. |
91
+ | `allowCodexPatch` | `true` | Accept Codex `apply_patch` syntax (set `false` for unified-diff-only). Also editable in the DSH settings panel; changes take effect immediately, no restart needed. |
92
92
  | `deleteBackend` | `shell` | `shell` or `none` (Delete/Move return a structured error). |
93
93
  | `shellDialect` | `auto` | `auto` (pwsh on win32) / `posix` / `pwsh`. |
94
94
  | `deleteCommand` / `moveCommand` | built-in | Custom command templates. Paths still arrive **only via env** (`DSH_PATCH_TARGET` / `DSH_PATCH_SOURCE`); never interpolate them into the command string. |
package/README.zh.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # dsh-patch-edit-plus
2
2
 
3
- 面向 [DeepSeek Harness(DSH)](https://github.com/deepseek-ai/deepseek-harness) 的补丁风格文件编辑插件:只提供 **1 个**模型可见工具 `apply_patch`,接受 **git/unified diff**(默认开启)与 **Codex `apply_patch` 语法**(可选开启),全量验证后**原子应用**,对 DSH 既有功能零负面影响。
3
+ 面向 [DeepSeek Harness(DSH)](https://github.com/deepseek-ai/deepseek-harness) 的补丁风格文件编辑插件:只提供 **1 个**模型可见工具 `apply_patch`,接受 **git/unified diff** 与 **Codex `apply_patch` 语法**(两种语法均默认开启),全量验证后**原子应用**,对 DSH 既有功能零负面影响。
4
4
 
5
5
  ## DSH 版本适配矩阵
6
6
 
7
7
  | DSH 版本 | 状态 | 说明 |
8
8
  |---|---|---|
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()`。 |
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()`。v0.2.4:`allowCodexPatch` 默认改为 `true`——两种语法开箱即用;配置随插入的 `cordis.patch.yml` 行下发。 |
10
10
  | `0.1.2-rc.1` ~ `0.1.4` | ↗ 维护线 | 由已发布的 `0.1.2`(main 分支)服务。 |
11
11
  | `0.1.5-rc.x` | ↗ 维护线 | 由 `dsh-0.1.5` dist-tag(v0.2.2+)服务。 |
12
12
  | `0.2.0-rc.1+` | ↗ 下一线 | 由 `dsh-0.2.0` dist-tag(v0.3.0+)服务。 |
@@ -45,7 +45,7 @@ dsh web --dump-config # 确认插件行出现
45
45
  }
46
46
  ```
47
47
 
48
- ### Codex apply_patch 语法(需开启)
48
+ ### Codex apply_patch 语法(默认开启)
49
49
 
50
50
  ```text
51
51
  *** Begin Patch
@@ -60,7 +60,7 @@ dsh web --dump-config # 确认插件行出现
60
60
  *** End Patch
61
61
  ```
62
62
 
63
- 在配置中设 `allowCodexPatch: true` 开启。关闭状态下收到 Codex 补丁时,工具返回**可操作提示**(如何开启、或改用 unified diff),而不是泛化的解析错误 —— Codex 语法是 GPT 系模型的强先验,沉默失败会让模型陷入重试循环。
63
+ 两种语法默认全部开启:默认值由 `Config` schema 给出,插入的 `cordis.patch.yml` 行同样携带 `allowUnifiedDiff: true` + `allowCodexPatch: true`。设 `allowCodexPatch: false` 可退回仅 unified diff。显式关闭后收到 Codex 补丁时,工具返回**可操作提示**(如何开启、或改用 unified diff),而不是泛化的解析错误 —— Codex 语法是 GPT 系模型的强先验,沉默失败会让模型陷入重试循环。
64
64
 
65
65
  ### 四类操作
66
66
 
@@ -87,7 +87,7 @@ dsh web --dump-config # 确认插件行出现
87
87
  | `conflictPolicy` | `rename` | 重名时 `rename` / `skip` / `fail`。 |
88
88
  | `renameSuffix` | `_1` | 改名避让使用的后缀。 |
89
89
  | `allowUnifiedDiff` | `true` | 接受 git/unified diff。 |
90
- | `allowCodexPatch` | `false` | 接受 Codex `apply_patch` 语法。也可在 DSH 设置面板中修改,改动立即生效、无需重启。 |
90
+ | `allowCodexPatch` | `true` | 接受 Codex `apply_patch` 语法(设 `false` 退回仅 unified diff)。也可在 DSH 设置面板中修改,改动立即生效、无需重启。 |
91
91
  | `deleteBackend` | `shell` | `shell` 或 `none`(Delete/Move 返回结构化错误)。 |
92
92
  | `shellDialect` | `auto` | `auto`(win32 上 pwsh)/ `posix` / `pwsh`。 |
93
93
  | `deleteCommand` / `moveCommand` | 内置 | 自定义命令模板。路径仍然**只经 env** 传入(`DSH_PATCH_TARGET` / `DSH_PATCH_SOURCE`),请勿把路径插值进命令串。 |
package/cordis.patch.yml CHANGED
@@ -1,6 +1,14 @@
1
1
  # Assembly layer for the dsh profiles whose bundles list includes this package.
2
2
  # A pure addition: one insert row with an id no shipped entry uses. No shipped
3
3
  # row is disabled, renamed, or reconfigured here.
4
+ #
5
+ # Config rides the inserted row: both patch syntaxes ship enabled. The DSH
6
+ # settings panel still projects the volatile `allowCodexPatch` from this row,
7
+ # so a user toggle keeps working without touching this file. Every knob left
8
+ # out of the row resolves to its schema default computed in lib/index.js.
4
9
  - insert:
5
10
  - id: dsh-patch-edit-plus
6
11
  name: dsh-patch-edit-plus
12
+ config:
13
+ allowUnifiedDiff: true
14
+ allowCodexPatch: true
package/dsh.plugin.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "id": "dsh-patch-edit-plus",
3
3
  "name": "dsh-patch-edit-plus",
4
- "version": "0.2.3",
4
+ "version": "0.2.4",
5
5
  "description": {
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
- "zh": "补丁风格文件编辑:单个 apply_patch 工具,接受 git/unified diff(默认)与 Codex apply_patch 语法(可选开启),全量验证后原子应用,删除/移动走沙箱感知 shell。"
6
+ "en": "Patch-style file editing: one apply_patch tool for git/unified diff and Codex apply_patch syntax (both enabled by default), with all-or-nothing application and sandbox-aware delete/move.",
7
+ "zh": "补丁风格文件编辑:单个 apply_patch 工具,接受 git/unified diff 与 Codex apply_patch 语法(两种语法均默认开启),全量验证后原子应用,删除/移动走沙箱感知 shell。"
8
8
  },
9
9
  "homepage": "https://github.com/drscrewdriver/dsh-patch-edit-plus",
10
10
  "repository": {
package/lib/config.js CHANGED
@@ -12,7 +12,7 @@ export const Config = z.object({
12
12
  conflictPolicy: z.union(['rename', 'skip', 'fail']).default('rename'),
13
13
  renameSuffix: z.string().default('_1'),
14
14
  allowUnifiedDiff: z.boolean().default(true),
15
- allowCodexPatch: z.boolean().default(false).volatile(),
15
+ allowCodexPatch: z.boolean().default(true).volatile(),
16
16
  deleteBackend: z.union(['shell', 'none']).default('shell'),
17
17
  shellDialect: z.union(['auto', 'posix', 'pwsh']).default('auto'),
18
18
  deleteCommand: z.string(),
@@ -39,7 +39,7 @@ export function resolveConfig(config) {
39
39
  conflictPolicy: c.conflictPolicy ?? 'rename',
40
40
  renameSuffix: typeof c.renameSuffix === 'string' ? c.renameSuffix : '_1',
41
41
  allowUnifiedDiff: c.allowUnifiedDiff ?? true,
42
- allowCodexPatch: readVolatileBoolean(c.allowCodexPatch, false),
42
+ allowCodexPatch: readVolatileBoolean(c.allowCodexPatch, true),
43
43
  deleteBackend: c.deleteBackend ?? 'shell',
44
44
  shellDialect: c.shellDialect ?? 'auto',
45
45
  deleteCommand: typeof c.deleteCommand === 'string' && c.deleteCommand !== '' ? c.deleteCommand : undefined,
package/lib/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * dsh-patch-edit-plus — patch-style file editing for DeepSeek Harness.
3
3
  *
4
- * One `apply_patch` tool accepting git/unified diff (default) and Codex
5
- * `apply_patch` syntax (opt-in). All-or-nothing application through the
4
+ * One `apply_patch` tool accepting git/unified diff and Codex `apply_patch`
5
+ * syntax (both on by default; the patch-layer row in `cordis.patch.yml` ships
6
+ * the same defaults). All-or-nothing application through the
6
7
  * official fs write-intent dance; delete/move through the sandbox-aware
7
8
  * shell. Targets DSH 0.1.7+: settings are declarative — the fields marked
8
9
  * `.volatile()` in `Config` render the settings form automatically (no
@@ -23,7 +23,9 @@ export interface Config {
23
23
  renameSuffix?: string;
24
24
  /** Accept git/unified diff patches. Defaults to true. */
25
25
  allowUnifiedDiff?: boolean;
26
- /** Accept Codex `apply_patch` syntax. Defaults to false.
26
+ /** Accept Codex `apply_patch` syntax. Defaults to true (both syntaxes on;
27
+ * the patch-layer row in `cordis.patch.yml` carries the same default). Set
28
+ * false to restore unified-diff-only.
27
29
  * 0.1.7 `.volatile()`: the loader hands `apply` a live `Volatile` ref for this
28
30
  * field — always read it through `readVolatileBoolean`, never cache the ref. */
29
31
  allowCodexPatch?: boolean | Volatile<boolean>;
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * dsh-patch-edit-plus — patch-style file editing for DeepSeek Harness.
3
3
  *
4
- * One `apply_patch` tool accepting git/unified diff (default) and Codex
5
- * `apply_patch` syntax (opt-in). All-or-nothing application through the
4
+ * One `apply_patch` tool accepting git/unified diff and Codex `apply_patch`
5
+ * syntax (both on by default; the patch-layer row in `cordis.patch.yml` ships
6
+ * the same defaults). All-or-nothing application through the
6
7
  * official fs write-intent dance; delete/move through the sandbox-aware
7
8
  * shell. Targets DSH 0.1.7+: settings are declarative — the fields marked
8
9
  * `.volatile()` in `Config` render the settings form automatically (no
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-patch-edit-plus",
3
- "version": "0.2.3",
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).",
3
+ "version": "0.2.4",
4
+ "description": "Patch-style file editing for DeepSeek Harness: one apply_patch tool accepting git/unified diff and Codex apply_patch syntax (both enabled by default), 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": {
7
7
  "type": "git",