dsh-patch-edit-plus 0.4.7 → 0.4.8

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/INSTALL.it.md ADDED
@@ -0,0 +1,179 @@
1
+ # Guida all'installazione (CLI DSH ufficiale)
2
+
3
+ Questa guida utilizza solo il comando DSH ufficiale `dsh plugin`. Quel comando installa la dipendenza in un profilo e sincronizza `dsh.profile.bundles`. Non sostituitelo con un semplice `npm install`, un `pnpm add` diretto nel profilo o modifiche manuali al manifest del profilo.
4
+
5
+ - [Guida all'installazione in inglese](./INSTALL.md)
6
+ - [Guida all'installazione in cinese](./INSTALL.zh.md)
7
+ - [Guida all'installazione in giapponese](./INSTALL.ja.md)
8
+ - [Guida all'installazione in coreano](./INSTALL.ko.md)
9
+ - [Guida all'installazione in italiano](./INSTALL.it.md)
10
+ - [Guida all'installazione in francese](./INSTALL.fr.md)
11
+ - [Guida all'installazione in tedesco](./INSTALL.de.md)
12
+ - [Guida all'installazione in russo](./INSTALL.ru.md)
13
+ - [Guida all'installazione in spagnolo](./INSTALL.es.md)
14
+ - [README in inglese](./README.md)
15
+ - [README in cinese](./README.zh.md)
16
+ - [README in giapponese](./README.ja.md)
17
+ - [README in coreano](./README.ko.md)
18
+ - [README in italiano](./README.it.md)
19
+ - [README in francese](./README.fr.md)
20
+ - [README in tedesco](./README.de.md)
21
+ - [README in russo](./README.ru.md)
22
+ - [README in spagnolo](./README.es.md)
23
+ - [Registro delle modifiche](./CHANGELOG.md)
24
+ - [Registro delle modifiche in giapponese](./CHANGELOG.ja.md)
25
+ - [Registro delle modifiche in coreano](./CHANGELOG.ko.md)
26
+ - [Registro delle modifiche in italiano](./CHANGELOG.it.md)
27
+ - [Registro delle modifiche in francese](./CHANGELOG.fr.md)
28
+ - [Registro delle modifiche in tedesco](./CHANGELOG.de.md)
29
+ - [Registro delle modifiche in russo](./CHANGELOG.ru.md)
30
+ - [Registro delle modifiche in spagnolo](./CHANGELOG.es.md)
31
+
32
+ I segnaposto di questa guida sono:
33
+
34
+ - `<profile>`: il profilo DSH da modificare, di solito `web`;
35
+ - `dsh-patch-edit-plus`: il pacchetto npm, l'ID del plugin a runtime e l'id dell'unica riga inserita dalla patch del bundle.
36
+
37
+ > **Intervallo DSH supportato: da `0.1.0-rc.8` a `0.2.0-rc.2` (desktop incluso) — una singola versione, la v0.4.0.**
38
+ >
39
+ > Verificate prima la versione in esecuzione con `dsh --version`.
40
+ >
41
+ > | Versione DSH | Stato | Note |
42
+ > | --- | --- | --- |
43
+ > | `0.2.0-rc.1` ~ `0.2.0-rc.2` (desktop incluso) | supportato | Stessa v0.4.0. |
44
+ > | `0.1.0-rc.8` ~ `0.1.7-rc.2` | supportato | Stessa v0.4.0 — nessuna scelta di ramo o dist-tag necessaria. |
45
+ >
46
+ > Su qualsiasi linea di host supportata installate `latest`: una singola versione serve sia i 0.1.x sia i 0.2.x. Dopo la pubblicazione, i dist-tag `latest`, `dsh-0.2.0`, `dsh-0.1.7`, `dsh-0.1.5` e `dsh-0.1.2` punteranno tutti a 0.4.0.
47
+
48
+ ## 0. Prerequisiti e individuazione del profilo
49
+
50
+ ```bash
51
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
52
+ dsh --version
53
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
54
+ ```
55
+
56
+ Usate il profilo indicato dal vostro processo DSH in esecuzione. `web` è comune, ma è l'argomento `--profile` attivo a fare autorità.
57
+
58
+ ## 1. Installazione ufficiale
59
+
60
+ ```bash
61
+ dsh plugin --profile <profile> add dsh-patch-edit-plus -w
62
+ ```
63
+
64
+ (il flag `-w` è richiesto quando il profilo è la radice di un workspace pnpm, come nel caso di `web`.)
65
+
66
+ Installare esplicitamente una versione specifica:
67
+
68
+ ```bash
69
+ dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
70
+ ```
71
+
72
+ La CLI ufficiale aggiorna automaticamente la dipendenza del profilo, il lockfile e `dsh.profile.bundles`. Non aggiungete una riga YAML manuale.
73
+
74
+ ### Periodo di raffreddamento della supply chain
75
+
76
+ Il runtime DSH usa pnpm 11, la cui politica `minimumReleaseAge` può bloccare una versione appena pubblicata con `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Aggiungete la versione a `minimumReleaseAgeExclude` in `~/.dsh/profiles/<profile>/pnpm-workspace.yaml`:
77
+
78
+ ```yaml
79
+ minimumReleaseAgeExclude:
80
+ - dsh-patch-edit-plus@0.4.0
81
+ ```
82
+
83
+ ## 2. Riavviare l'host
84
+
85
+ Questo è un plugin **solo host**: registra uno strumento e una sezione di impostazioni sull'host e non include alcuna parte per il browser. Riavviate il processo host DSH dopo l'installazione o l'aggiornamento; ricaricare la pagina non è né necessario né sufficiente.
86
+
87
+ ## 3. Aggiornamento
88
+
89
+ ```bash
90
+ dsh plugin --profile <profile> update dsh-patch-edit-plus -w
91
+ ```
92
+
93
+ Riavviate DSH in seguito.
94
+
95
+ ## 4. Registrazione tramite percorso locale / `link:` (alternativa)
96
+
97
+ ```bash
98
+ # ~/.dsh/profiles/<profile>/package.json dependencies:
99
+ # "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
100
+ # ~/.dsh/profiles/<profile>/cordis.patch.yml:
101
+ # - insert:
102
+ # - id: dsh-patch-edit-plus
103
+ # name: dsh-patch-edit-plus
104
+ cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
105
+ ```
106
+
107
+ Oppure usate la CLI ufficiale con un percorso locale (nessuna rete necessaria):
108
+
109
+ ```bash
110
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
111
+ ```
112
+
113
+ La compilazione da un checkout dei sorgenti usa questi script:
114
+
115
+ ```bash
116
+ npm install
117
+ npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
118
+ npm run typecheck # tsc -p tsconfig.json
119
+ npm run verify:source # source-level assertions
120
+ npm run test # vitest run
121
+ npm run smoke # _smoke/load-smoke.mjs
122
+ ```
123
+
124
+ `lib/` non è versionato, quindi un checkout dei sorgenti deve essere compilato prima di poter essere registrato tramite percorso. La pubblicazione lo compila automaticamente tramite l'hook `prepublishOnly`, così il tarball pubblicato contiene sempre l'output compilato.
125
+
126
+ ## 5. Verificare l'installazione
127
+
128
+ ```bash
129
+ grep -n "dsh-patch-edit-plus" \
130
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
131
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
132
+ ```
133
+
134
+ Controllate la composizione ufficiale:
135
+
136
+ ```bash
137
+ dsh --profile <profile> --dump-default-config
138
+ ```
139
+
140
+ Deve contenere:
141
+
142
+ ```yaml
143
+ - id: dsh-patch-edit-plus
144
+ name: dsh-patch-edit-plus
145
+ ```
146
+
147
+ ## 6. Verificare il plugin
148
+
149
+ Dopo il riavvio, confermate in una sessione:
150
+
151
+ 1. Lo strumento `apply_patch` è disponibile per il modello.
152
+ 2. Una patch in diff unificato viene applicata e il contenuto del file corrisponde esattamente al diff.
153
+ 3. Una patch che non supera la verifica lascia il workspace intatto — il motore verifica tutto in sola lettura prima di scrivere qualsiasi cosa.
154
+ 4. Una patch in stile Codex, con `allowCodexPatch` disattivato, restituisce un suggerimento azionabile che dice al modello come abilitare lo stile o riprovare in diff unificato, invece di un generico errore di parsing.
155
+
156
+ Se un altro plugin fornisce già uno strumento chiamato `apply_patch`, la politica di conflitto a tre livelli (`rename` per impostazione predefinita, oppure `skip` / `fail`) decide l'esito. Con il `rename` predefinito, l'avvio di DSH non è influenzato e lo strumento viene registrato con un nome con suffisso.
157
+
158
+ ## 7. Risoluzione dei problemi
159
+
160
+ | Sintomo | Azione |
161
+ | --- | --- |
162
+ | `dsh` non trovato | Installare o abilitare la CLI DSH ufficiale. |
163
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Aggiungere la versione a `minimumReleaseAgeExclude` nel `pnpm-workspace.yaml` del profilo. |
164
+ | `apply_patch` non compare | Riavviare il processo host e ricontrollare la riga della composizione. |
165
+ | Conflitto di nome con un altro provider di `apply_patch` | Impostare la politica di conflitto su `rename` (predefinito), `skip` o `fail`, come da README. |
166
+ | Sintassi Codex rifiutata | Abilitare `allowCodexPatch: true` o rinviare la modifica come diff unificato. |
167
+ | Hunk non corrispondente | Leggere la diagnostica a quattro elementi (file + indice dell'hunk, origine della ricerca, anteprima attesa, estratto reale) e rinviare l'hunk con un contesto corrispondente. |
168
+
169
+ ## 8. Rimozione
170
+
171
+ ```bash
172
+ dsh plugin --profile <profile> remove dsh-patch-edit-plus
173
+ ```
174
+
175
+ Riavviate DSH in seguito.
176
+
177
+ ## Licenza
178
+
179
+ MIT
package/INSTALL.ja.md ADDED
@@ -0,0 +1,179 @@
1
+ # インストールガイド(公式 DSH CLI)
2
+
3
+ 本ガイドでは公式の DSH `dsh plugin` コマンドのみを使用します。このコマンドは依存関係を profile にインストールし、`dsh.profile.bundles` を同期します。素の `npm install`、profile 内での直接の `pnpm add`、あるいは profile マニフェストの手動編集で置き換えないでください。
4
+
5
+ - [英語インストールガイド](./INSTALL.md)
6
+ - [中国語インストールガイド](./INSTALL.zh.md)
7
+ - [日本語インストールガイド](./INSTALL.ja.md)
8
+ - [韓国語インストールガイド](./INSTALL.ko.md)
9
+ - [フランス語インストールガイド](./INSTALL.fr.md)
10
+ - [ドイツ語インストールガイド](./INSTALL.de.md)
11
+ - [イタリア語インストールガイド](./INSTALL.it.md)
12
+ - [ロシア語インストールガイド](./INSTALL.ru.md)
13
+ - [スペイン語インストールガイド](./INSTALL.es.md)
14
+ - [英語 README](./README.md)
15
+ - [中国語 README](./README.zh.md)
16
+ - [日本語 README](./README.ja.md)
17
+ - [韓国語 README](./README.ko.md)
18
+ - [フランス語 README](./README.fr.md)
19
+ - [ドイツ語 README](./README.de.md)
20
+ - [イタリア語 README](./README.it.md)
21
+ - [ロシア語 README](./README.ru.md)
22
+ - [スペイン語 README](./README.es.md)
23
+ - [変更履歴](./CHANGELOG.md)
24
+ - [日本語変更履歴](./CHANGELOG.ja.md)
25
+ - [韓国語変更履歴](./CHANGELOG.ko.md)
26
+ - [フランス語変更履歴](./CHANGELOG.fr.md)
27
+ - [ドイツ語変更履歴](./CHANGELOG.de.md)
28
+ - [イタリア語変更履歴](./CHANGELOG.it.md)
29
+ - [ロシア語変更履歴](./CHANGELOG.ru.md)
30
+ - [スペイン語変更履歴](./CHANGELOG.es.md)
31
+
32
+ 本ガイドで使用するプレースホルダーは次のとおりです。
33
+
34
+ - `<profile>`: 変更対象の DSH profile。通常は `web`。
35
+ - `dsh-patch-edit-plus`: npm パッケージ名であり、ランタイムのプラグイン ID であり、bundle パッチが挿入する唯一の行の id でもあります。
36
+
37
+ > **サポート対象の DSH 範囲: `0.1.0-rc.8` ~ `0.2.0-rc.2`(desktop を含む)—— 単一バージョン v0.4.0。**
38
+ >
39
+ > まず `dsh --version` で実行中のバージョンを確認してください。
40
+ >
41
+ > | DSH バージョン | ステータス | 備考 |
42
+ > | --- | --- | --- |
43
+ > | `0.2.0-rc.1` ~ `0.2.0-rc.2`(desktop を含む) | サポート対象 | 同じ v0.4.0。 |
44
+ > | `0.1.0-rc.8` ~ `0.1.7-rc.2` | サポート対象 | 同じ v0.4.0 —— ブランチや dist-tag の選択は不要です。 |
45
+ >
46
+ > サポート対象のホストラインであれば一律 `latest` をインストールしてください: 1 つのバージョンが 0.1.x と 0.2.x の双方に対応します。公開後、dist-tag の `latest`、`dsh-0.2.0`、`dsh-0.1.7`、`dsh-0.1.5`、`dsh-0.1.2` はすべて 0.4.0 を指します。
47
+
48
+ ## 0. 前提条件と profile の探索
49
+
50
+ ```bash
51
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
52
+ dsh --version
53
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
54
+ ```
55
+
56
+ 実行中の DSH プロセスが指定している profile を使用してください。`web` が一般的ですが、実際に有効なのは実行時の `--profile` 引数です。
57
+
58
+ ## 1. 公式インストール
59
+
60
+ ```bash
61
+ dsh plugin --profile <profile> add dsh-patch-edit-plus -w
62
+ ```
63
+
64
+ (profile が pnpm ワークスペースのルートである場合、`web` がそうであるように、`-w` フラグが必要です。)
65
+
66
+ 特定のバージョンを明示的にインストールする:
67
+
68
+ ```bash
69
+ dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
70
+ ```
71
+
72
+ 公式 CLI は profile の依存関係、ロックファイル、および `dsh.profile.bundles` を自動的に更新します。手動で YAML の行を追加しないでください。
73
+
74
+ ### サプライチェーンのクールダウン期間
75
+
76
+ DSH ランタイムは pnpm 11 を使用しており、その `minimumReleaseAge` ポリシーが公開直後のバージョンを `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` でブロックすることがあります。`~/.dsh/profiles/<profile>/pnpm-workspace.yaml` の `minimumReleaseAgeExclude` にそのバージョンを追加してください:
77
+
78
+ ```yaml
79
+ minimumReleaseAgeExclude:
80
+ - dsh-patch-edit-plus@0.4.0
81
+ ```
82
+
83
+ ## 2. ホストの再起動
84
+
85
+ これは **ホスト専用**のプラグインです。ホスト上にツールと設定セクションを登録し、ブラウザ側の実装は同梱しません。インストールまたはアップグレードの後は DSH ホストプロセスを再起動してください。ページの再読み込みは必須でも十分でもありません。
86
+
87
+ ## 3. アップグレード
88
+
89
+ ```bash
90
+ dsh plugin --profile <profile> update dsh-patch-edit-plus -w
91
+ ```
92
+
93
+ その後 DSH を再起動します。
94
+
95
+ ## 4. ローカルパス / `link:` による登録(代替手段)
96
+
97
+ ```bash
98
+ # ~/.dsh/profiles/<profile>/package.json dependencies:
99
+ # "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
100
+ # ~/.dsh/profiles/<profile>/cordis.patch.yml:
101
+ # - insert:
102
+ # - id: dsh-patch-edit-plus
103
+ # name: dsh-patch-edit-plus
104
+ cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
105
+ ```
106
+
107
+ または、公式 CLI をローカルパスで使用します(ネットワーク不要):
108
+
109
+ ```bash
110
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
111
+ ```
112
+
113
+ ソースチェックアウトからビルドする場合は、次のスクリプトを使用します:
114
+
115
+ ```bash
116
+ npm install
117
+ npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
118
+ npm run typecheck # tsc -p tsconfig.json
119
+ npm run verify:source # source-level assertions
120
+ npm run test # vitest run
121
+ npm run smoke # _smoke/load-smoke.mjs
122
+ ```
123
+
124
+ `lib/` はコミットされていないため、ソースチェックアウトはパスで登録する前にビルドする必要があります。公開時には `prepublishOnly` フックを通じて自動的にビルドされるため、公開された tarball には常にコンパイル済みの出力が含まれます。
125
+
126
+ ## 5. インストールの検証
127
+
128
+ ```bash
129
+ grep -n "dsh-patch-edit-plus" \
130
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
131
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
132
+ ```
133
+
134
+ 公式のコンポジションを確認します:
135
+
136
+ ```bash
137
+ dsh --profile <profile> --dump-default-config
138
+ ```
139
+
140
+ 次の内容が含まれている必要があります:
141
+
142
+ ```yaml
143
+ - id: dsh-patch-edit-plus
144
+ name: dsh-patch-edit-plus
145
+ ```
146
+
147
+ ## 6. プラグインの検証
148
+
149
+ 再起動後、セッションで次を確認します:
150
+
151
+ 1. `apply_patch` ツールがモデルから利用可能であること。
152
+ 2. unified diff のパッチが適用され、ファイルの内容が diff と正確に一致すること。
153
+ 3. 検証に失敗したパッチはワークスペースを一切変更しないこと — エンジンは何かを書き込む前に、すべてを読み取り専用で検証します。
154
+ 4. `allowCodexPatch` がオフのときに Codex 形式のパッチを送ると、汎用のパースエラーではなく、その形式を有効化する方法または unified diff で再試行する方法をモデルに伝える実行可能なヒントが返ること。
155
+
156
+ 別のプラグインがすでに `apply_patch` という名前のツールを提供している場合、三層の競合ポリシー(既定では `rename`、または `skip` / `fail`)が結果を決定します。既定の `rename` では DSH の起動は影響を受けず、ツールは接尾辞付きの名前で登録されます。
157
+
158
+ ## 7. トラブルシューティング
159
+
160
+ | 症状 | 対処 |
161
+ | --- | --- |
162
+ | `dsh` が見つからない | 公式 DSH CLI をインストールするか、有効化してください。 |
163
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | profile の `pnpm-workspace.yaml` の `minimumReleaseAgeExclude` にそのバージョンを追加してください。 |
164
+ | `apply_patch` が表示されない | ホストプロセスを再起動し、コンポジションの行を再確認してください。 |
165
+ | 他の `apply_patch` 提供元とのツール名の衝突 | README に従い、競合ポリシーを `rename`(既定)、`skip`、または `fail` に設定してください。 |
166
+ | Codex 構文が拒否される | `allowCodexPatch: true` を有効にするか、変更を unified diff として再送してください。 |
167
+ | ハンク不一致 | 四要素診断(ファイル + ハンクインデックス、検索開始位置、期待プレビュー、実際の抜粋)を読み、一致するコンテキストでハンクを再出力してください。 |
168
+
169
+ ## 8. 削除
170
+
171
+ ```bash
172
+ dsh plugin --profile <profile> remove dsh-patch-edit-plus
173
+ ```
174
+
175
+ その後 DSH を再起動します。
176
+
177
+ ## ライセンス
178
+
179
+ MIT
package/INSTALL.ko.md ADDED
@@ -0,0 +1,179 @@
1
+ # 설치 안내 (공식 DSH CLI)
2
+
3
+ 이 안내서는 공식 DSH `dsh plugin` 명령만 사용합니다. 이 명령은 의존성을 profile에 설치하고 `dsh.profile.bundles`를 동기화합니다. 이를 일반 `npm install`, profile에서의 직접적인 `pnpm add`, 또는 profile 매니페스트 수동 편집으로 대체하지 마십시오.
4
+
5
+ - [영어 설치 안내](./INSTALL.md)
6
+ - [중국어 설치 안내](./INSTALL.zh.md)
7
+ - [일본어 설치 안내](./INSTALL.ja.md)
8
+ - [한국어 설치 안내](./INSTALL.ko.md)
9
+ - [프랑스어 설치 안내](./INSTALL.fr.md)
10
+ - [독일어 설치 안내](./INSTALL.de.md)
11
+ - [이탈리아어 설치 안내](./INSTALL.it.md)
12
+ - [러시아어 설치 안내](./INSTALL.ru.md)
13
+ - [스페인어 설치 안내](./INSTALL.es.md)
14
+ - [영어 README](./README.md)
15
+ - [중국어 README](./README.zh.md)
16
+ - [일본어 README](./README.ja.md)
17
+ - [한국어 README](./README.ko.md)
18
+ - [프랑스어 README](./README.fr.md)
19
+ - [독일어 README](./README.de.md)
20
+ - [이탈리아어 README](./README.it.md)
21
+ - [러시아어 README](./README.ru.md)
22
+ - [스페인어 README](./README.es.md)
23
+ - [변경 이력](./CHANGELOG.md)
24
+ - [일본어 변경 이력](./CHANGELOG.ja.md)
25
+ - [한국어 변경 이력](./CHANGELOG.ko.md)
26
+ - [프랑스어 변경 이력](./CHANGELOG.fr.md)
27
+ - [독일어 변경 이력](./CHANGELOG.de.md)
28
+ - [이탈리아어 변경 이력](./CHANGELOG.it.md)
29
+ - [러시아어 변경 이력](./CHANGELOG.ru.md)
30
+ - [스페인어 변경 이력](./CHANGELOG.es.md)
31
+
32
+ 이 안내서에서 사용하는 자리표시자는 다음과 같습니다.
33
+
34
+ - `<profile>`: 변경할 DSH profile이며, 보통 `web`입니다.
35
+ - `dsh-patch-edit-plus`: npm 패키지 이름이자 런타임 플러그인 ID이며, bundle 패치가 삽입하는 단일 행의 id입니다.
36
+
37
+ > **지원하는 DSH 범위: `0.1.0-rc.8` ~ `0.2.0-rc.2`(desktop 포함) —— 단일 버전 v0.4.0.**
38
+ >
39
+ > 먼저 `dsh --version`으로 실행 중인 버전을 확인하십시오.
40
+ >
41
+ > | DSH 버전 | 상태 | 비고 |
42
+ > | --- | --- | --- |
43
+ > | `0.2.0-rc.1` ~ `0.2.0-rc.2`(desktop 포함) | 지원됨 | 동일한 v0.4.0. |
44
+ > | `0.1.0-rc.8` ~ `0.1.7-rc.2` | 지원됨 | 동일한 v0.4.0 —— 브랜치나 dist-tag를 고를 필요가 없습니다. |
45
+ >
46
+ > 지원되는 호스트 라인이라면 무엇이든 `latest`를 설치하십시오: 하나의 버전이 0.1.x와 0.2.x를 모두 지원합니다. 배포 후 dist-tag `latest`, `dsh-0.2.0`, `dsh-0.1.7`, `dsh-0.1.5`, `dsh-0.1.2`는 모두 0.4.0을 가리킵니다.
47
+
48
+ ## 0. 사전 요구 사항과 profile 탐색
49
+
50
+ ```bash
51
+ echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
52
+ dsh --version
53
+ ls "${DSH_HOME:-$HOME/.dsh}/profiles"
54
+ ```
55
+
56
+ 실행 중인 DSH 프로세스가 사용하는 profile을 사용하십시오. `web`이 일반적이지만, 실제로 적용되는 `--profile` 인자가 기준입니다.
57
+
58
+ ## 1. 공식 설치
59
+
60
+ ```bash
61
+ dsh plugin --profile <profile> add dsh-patch-edit-plus -w
62
+ ```
63
+
64
+ (`web`처럼 profile이 pnpm 워크스페이스 루트인 경우 `-w` 플래그가 필요합니다.)
65
+
66
+ 특정 버전을 명시적으로 설치하려면 다음과 같이 합니다.
67
+
68
+ ```bash
69
+ dsh plugin --profile <profile> add dsh-patch-edit-plus@0.4.0 -w
70
+ ```
71
+
72
+ 공식 CLI가 profile 의존성, lockfile, `dsh.profile.bundles`를 자동으로 갱신합니다. YAML 행을 수동으로 추가하지 마십시오.
73
+
74
+ ### 공급망 쿨다운 기간
75
+
76
+ DSH 런타임은 pnpm 11을 사용하며, 이 버전의 `minimumReleaseAge` 정책이 갓 게시된 버전을 `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` 오류로 차단할 수 있습니다. `~/.dsh/profiles/<profile>/pnpm-workspace.yaml`의 `minimumReleaseAgeExclude`에 해당 버전을 추가하십시오.
77
+
78
+ ```yaml
79
+ minimumReleaseAgeExclude:
80
+ - dsh-patch-edit-plus@0.4.0
81
+ ```
82
+
83
+ ## 2. 호스트 재시작
84
+
85
+ 이 플러그인은 **호스트 전용** 플러그인입니다. 호스트에 도구 하나와 설정 섹션 하나를 등록하며, 브라우저 측 절반은 포함하지 않습니다. 설치하거나 업그레이드한 뒤에는 DSH 호스트 프로세스를 재시작하십시오. 페이지를 새로고침하는 것은 필요하지도, 충분하지도 않습니다.
86
+
87
+ ## 3. 업그레이드
88
+
89
+ ```bash
90
+ dsh plugin --profile <profile> update dsh-patch-edit-plus -w
91
+ ```
92
+
93
+ 이후 DSH를 재시작하십시오.
94
+
95
+ ## 4. 로컬 경로 / `link:` 등록 (대안)
96
+
97
+ ```bash
98
+ # ~/.dsh/profiles/<profile>/package.json dependencies:
99
+ # "dsh-patch-edit-plus": "link:<absolute path to dsh-patch-edit-plus>"
100
+ # ~/.dsh/profiles/<profile>/cordis.patch.yml:
101
+ # - insert:
102
+ # - id: dsh-patch-edit-plus
103
+ # name: dsh-patch-edit-plus
104
+ cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
105
+ ```
106
+
107
+ 또는 로컬 경로와 함께 공식 CLI를 사용하십시오(네트워크가 필요하지 않습니다).
108
+
109
+ ```bash
110
+ dsh plugin --profile <profile> add /absolute/path/to/dsh-patch-edit-plus -w
111
+ ```
112
+
113
+ 소스 체크아웃에서 빌드할 때는 다음 스크립트를 사용합니다.
114
+
115
+ ```bash
116
+ npm install
117
+ npm run build # tsc -p tsconfig.build.json → lib/ + lib/types/
118
+ npm run typecheck # tsc -p tsconfig.json
119
+ npm run verify:source # source-level assertions
120
+ npm run test # vitest run
121
+ npm run smoke # _smoke/load-smoke.mjs
122
+ ```
123
+
124
+ `lib/`는 커밋되지 않으므로, 소스 체크아웃은 경로로 등록하기 전에 반드시 빌드해야 합니다. 게시 시에는 `prepublishOnly` 훅을 통해 자동으로 빌드되므로, 게시된 tarball에는 항상 컴파일된 출력물이 들어 있습니다.
125
+
126
+ ## 5. 설치 확인
127
+
128
+ ```bash
129
+ grep -n "dsh-patch-edit-plus" \
130
+ "${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
131
+ node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-patch-edit-plus/package.json').version"
132
+ ```
133
+
134
+ 공식 구성(composition)을 확인하십시오.
135
+
136
+ ```bash
137
+ dsh --profile <profile> --dump-default-config
138
+ ```
139
+
140
+ 다음을 반드시 포함해야 합니다.
141
+
142
+ ```yaml
143
+ - id: dsh-patch-edit-plus
144
+ name: dsh-patch-edit-plus
145
+ ```
146
+
147
+ ## 6. 플러그인 확인
148
+
149
+ 재시작 후 세션에서 다음을 확인하십시오.
150
+
151
+ 1. 모델이 `apply_patch` 도구를 사용할 수 있습니다.
152
+ 2. unified diff 패치가 적용되고, 파일 내용이 diff와 정확히 일치합니다.
153
+ 3. 검증에 실패한 패치는 워크스페이스를 전혀 건드리지 않습니다. 엔진은 무엇이든 쓰기 전에 모든 것을 읽기 전용으로 검증합니다.
154
+ 4. `allowCodexPatch`가 꺼진 상태에서 Codex 스타일 패치를 보내면 일반적인 파싱 오류 대신, 해당 스타일을 활성화하는 방법이나 unified diff로 재시도하는 방법을 알려주는 실행 가능한 힌트가 반환됩니다.
155
+
156
+ 다른 플러그인이 이미 `apply_patch`라는 이름의 도구를 제공하고 있다면, 3중 충돌 정책(기본값 `rename`, 또는 `skip` / `fail`)이 결과를 결정합니다. 기본값인 `rename`을 사용하면 DSH 시작에 영향이 없고, 도구는 접미사가 붙은 이름으로 등록됩니다.
157
+
158
+ ## 7. 문제 해결
159
+
160
+ | 증상 | 조치 |
161
+ | --- | --- |
162
+ | `dsh`를 찾을 수 없음 | 공식 DSH CLI를 설치하거나 활성화하십시오. |
163
+ | `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | profile의 `pnpm-workspace.yaml`에 있는 `minimumReleaseAgeExclude`에 해당 버전을 추가하십시오. |
164
+ | `apply_patch`가 나타나지 않음 | 호스트 프로세스를 재시작하고 구성 행을 다시 확인하십시오. |
165
+ | 다른 `apply_patch` 제공자와 도구 이름 충돌 | README에 따라 충돌 정책을 `rename`(기본값), `skip`, `fail` 중 하나로 설정하십시오. |
166
+ | Codex 문법이 거부됨 | `allowCodexPatch: true`를 활성화하거나, 변경 사항을 unified diff로 다시 보내십시오. |
167
+ | hunk 불일치 | 4요소 진단(파일 + hunk 인덱스, 탐색 시작 지점, 예상 미리보기, 실제 발췌)을 읽고 컨텍스트가 일치하도록 hunk를 다시 내보내십시오. |
168
+
169
+ ## 8. 제거
170
+
171
+ ```bash
172
+ dsh plugin --profile <profile> remove dsh-patch-edit-plus
173
+ ```
174
+
175
+ 이후 DSH를 재시작하십시오.
176
+
177
+ ## 라이선스
178
+
179
+ MIT