dsh-gitbash-shell 0.20.0 → 0.21.0

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/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-gitbash-shell",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "main": "./src/index.js",
5
5
  "description": "Windows 全模式 Git Bash:用 Git for Windows bash 替换 PowerShell 执行器,并物化 standard/minimal/code/cordis 的 Git Bash 变体 preset。双 era 适配 dsh <= 0.1.1(内置 id 'code')与 >= 0.1.2(改名 'ptc'),启动探测自动选择,preset id 永不变。联动:dsh-ptc-cordis-preset(两者同装时 PTC 创造模式自动物化为 Git Bash 版)+ dsh-better-sidebar(终端 UI 标签与模型 terminal_* 工具自动切到 Git Bash)。",
6
6
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-gitbash-shell",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "Windows 上让 agent 的每条 shell 命令改经 Git for Windows bash 执行;物化四个内置预设的 Git Bash 变体,统一 MSYS 盘根路径方言,侧栏终端接管可开关。· Run every agent shell command through Git for Windows bash on Windows; materialize Git Bash variants of the built-in presets, unify the MSYS drive-root path dialect, and adopt the sidebar terminal behind a switch.",
5
5
  "type": "module",
6
6
  "repository": {
package/src/client.js CHANGED
@@ -72,7 +72,9 @@ window.__ModuleLoader__.load({
72
72
  "split.label": "glob 绝对路径拆分",
73
73
  "split.hint": "glob 的绝对 pattern(/c/.../*.md)自动拆为 path + 相对 pattern;关闭则原样传递。",
74
74
  "code.label": "run_code 程序内路径",
75
- "code.hint": "run_code 程序里写的 /c/... 等路径字面量在执行前按同一张挂载表翻译;注释、插值模板、$VAR 与非路径字符串不动,扫描有任何不确定就整份不改。",
75
+ "code.hint": "run_code 程序里写的 /c/... 等路径字面量在执行前按同一张挂载表翻译;注释、插值模板、$VAR 与非路径字符串不动,扫描有任何不确定就整份不改。 并给程序补 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 会得到 undefined\\temp,程序会静默写错地方。",
76
+ "eol.label": "Git 行尾(与 Linux 一致)",
77
+ "eol.hint": "模型跑的 git 命令按 Linux 行为:core.autocrlf=false、core.eol=lf。你自己终端的 git 与仓库里的 .gitattributes 都不受影响。",
76
78
  "bash.label": "Git Bash 路径",
77
79
  "bash.hint": "自定义 bash.exe 完整路径,用于 /usr 等挂载的 Git 根解析;留空自动探测默认安装与 PATH。",
78
80
  "bash.save": "保存",
@@ -100,7 +102,9 @@ window.__ModuleLoader__.load({
100
102
  "split.label": "Glob absolute-pattern split",
101
103
  "split.hint": "An absolute glob pattern (/c/.../*.md) splits into path + relative pattern; off passes it through verbatim.",
102
104
  "code.label": "run_code program paths",
103
- "code.hint": "Path literals inside a run_code program are translated through the same mount table before it runs; comments, interpolated templates, $VARs and non-path strings stay untouched, and any uncertainty leaves the whole program as written.",
105
+ "code.hint": "Path literals inside a run_code program are translated through the same mount table before it runs; comments, interpolated templates, $VARs and non-path strings stay untouched, and any uncertainty leaves the whole program as written. It also seeds TEMP/TMP for the program: with an empty env Windows' os.tmpdir() returns undefined\\temp and writes land in a bogus folder.",
106
+ "eol.label": "Git line endings (Linux match)",
107
+ "eol.hint": "Git commands the model runs behave like Linux: core.autocrlf=false, core.eol=lf. Your own terminal's git and a repository's .gitattributes are unaffected.",
104
108
  "bash.label": "Git Bash path",
105
109
  "bash.hint": "Full path of a custom bash.exe for resolving /usr mounts; empty = auto-detect the default install and PATH.",
106
110
  "bash.save": "Save",
@@ -138,7 +142,9 @@ window.__ModuleLoader__.load({
138
142
  "split.label": "تقسيم نمط glob المطلق",
139
143
  "split.hint": "نمط glob المطلق يُقسم إلى path + نمط نسبي؛ الإيقاف يمرره كما هو.",
140
144
  "code.label": "مسارات برامج run_code",
141
- "code.hint": "تُترجم السلاسل النصية للمسارات المكتوبة داخل برنامج run_code عبر جدول التحميل نفسه قبل التشغيل؛ وتبقى التعليقات والقوالب ذات الإدراج و$VAR والسلاسل غير المسارية كما هي، وأي التباس يُبقي البرنامج كاملًا دون تغيير.",
145
+ "code.hint": "تُترجم السلاسل النصية للمسارات المكتوبة داخل برنامج run_code عبر جدول التحميل نفسه قبل التشغيل؛ وتبقى التعليقات والقوالب ذات الإدراج و$VAR والسلاسل غير المسارية كما هي، وأي التباس يُبقي البرنامج كاملًا دون تغيير. وتُهيَّأ أيضًا TEMP/TMP للبرنامج: مع بيئة فارغة يعيد os.tmpdir() على ويندوز القيمة undefined\\temp فيُكتب في مكان خاطئ.",
146
+ "eol.label": "نهايات أسطر Git (مطابقة لينكس)",
147
+ "eol.hint": "أوامر git التي يشغّلها النموذج تتبع سلوك لينكس: core.autocrlf=false و core.eol=lf؛ لا يتأثر طرفيتك ولا ملف .gitattributes للمستودع.",
142
148
  "bash.label": "مسار Git Bash",
143
149
  "bash.hint": "المسار الكامل لنسخة bash.exe مخصصة؛ فارغ = اكتشاف تلقائي.",
144
150
  "bash.save": "حفظ",
@@ -166,7 +172,9 @@ window.__ModuleLoader__.load({
166
172
  "split.label": "Glob-Absolutmuster-Split",
167
173
  "split.hint": "Ein absolutes Glob-Muster zerfällt in Pfad + relatives Muster; aus übergibt es unverändert.",
168
174
  "code.label": "Pfade in run_code-Programmen",
169
- "code.hint": "Pfadliterale in einem run_code-Programm werden vor dem Start über dieselbe Mount-Tabelle übersetzt; Kommentare, interpolierte Templates, $VARs und Nicht-Pfad-Strings bleiben unangetastet, und bei Unklarheit bleibt das ganze Programm unverändert.",
175
+ "code.hint": "Pfadliterale in einem run_code-Programm werden vor dem Start über dieselbe Mount-Tabelle übersetzt; Kommentare, interpolierte Templates, $VARs und Nicht-Pfad-Strings bleiben unangetastet, und bei Unklarheit bleibt das ganze Programm unverändert. Zusätzlich werden TEMP/TMP für das Programm gesetzt: bei leerer Umgebung liefert os.tmpdir() unter Windows undefined\\temp und schreibt an einen falschen Ort.",
176
+ "eol.label": "Git-Zeilenenden (Linux-gleich)",
177
+ "eol.hint": "Vom Modell ausgeführte git-Befehle verhalten sich wie unter Linux: core.autocrlf=false, core.eol=lf. Dein eigenes Terminal und die .gitattributes eines Repos bleiben unberührt.",
170
178
  "bash.label": "Git-Bash-Pfad",
171
179
  "bash.hint": "Vollständiger Pfad einer benutzerdefinierten bash.exe; leer = automatische Erkennung.",
172
180
  "bash.save": "Speichern",
@@ -194,7 +202,9 @@ window.__ModuleLoader__.load({
194
202
  "split.label": "Découpage des motifs glob absolus",
195
203
  "split.hint": "Un motif glob absolu se scinde en chemin + motif relatif ; désactivé le passe tel quel.",
196
204
  "code.label": "chemins dans les programmes run_code",
197
- "code.hint": "Les littéraux de chemin écrits dans un programme run_code sont traduits via la même table de montage avant exécution; commentaires, gabarits interpolés, $VAR et chaînes non-chemin restent intacts, et la moindre incertitude laisse le programme tel quel.",
205
+ "code.hint": "Les littéraux de chemin écrits dans un programme run_code sont traduits via la même table de montage avant exécution; commentaires, gabarits interpolés, $VAR et chaînes non-chemin restent intacts, et la moindre incertitude laisse le programme tel quel. TEMP/TMP sont aussi fournis au programme : avec un env vide, os.tmpdir() sous Windows renvoie undefined\\temp et écrit au mauvais endroit.",
206
+ "eol.label": "fins de ligne Git (comme Linux)",
207
+ "eol.hint": "Les commandes git lancées par le modèle suivent le comportement Linux : core.autocrlf=false, core.eol=lf. Votre terminal et les .gitattributes du dépôt ne sont pas touchés.",
198
208
  "bash.label": "Chemin Git Bash",
199
209
  "bash.hint": "Chemin complet d'un bash.exe personnalisé ; vide = détection automatique.",
200
210
  "bash.save": "Enregistrer",
@@ -222,7 +232,9 @@ window.__ModuleLoader__.load({
222
232
  "split.label": "glob एब्सोल्यूट-पैटर्न विभाजन",
223
233
  "split.hint": "एब्सोल्यूट glob पैटर्न path + रिलेटिव पैटर्न में विभाजित होता है; बंद इसे वैसे ही पास करता है।",
224
234
  "code.label": "run_code प्रोग्राम पथ",
225
- "code.hint": "run_code प्रोग्राम में लिखे पथ लिटरल चलने से पहले उसी माउंट तालिका से अनूदित होते हैं; टिप्पणियाँ, इंटरपोलेटेड टेम्पलेट, $VAR और गैर-पथ स्ट्रिंग अछूते रहते हैं, और किसी भी अनिश्चितता पर पूरा प्रोग्राम अपरिवर्तित रहता है।",
235
+ "code.hint": "run_code प्रोग्राम में लिखे पथ लिटरल चलने से पहले उसी माउंट तालिका से अनूदित होते हैं; टिप्पणियाँ, इंटरपोलेटेड टेम्पलेट, $VAR और गैर-पथ स्ट्रिंग अछूते रहते हैं, और किसी भी अनिश्चितता पर पूरा प्रोग्राम अपरिवर्तित रहता है। साथ ही प्रोग्राम के लिए TEMP/TMP भर दिए जाते हैं: खाली env में Windows पर os.tmpdir() undefined\\temp देता है और गलत जगह लिखता है।",
236
+ "eol.label": "Git पंक्ति-अंत (Linux जैसा)",
237
+ "eol.hint": "मॉडल द्वारा चलाए git कमांड Linux व्यवहार अपनाते हैं: core.autocrlf=false, core.eol=lf। आपका टर्मिनल और रेपो का .gitattributes अछूते रहते हैं।",
226
238
  "bash.label": "Git Bash पथ",
227
239
  "bash.hint": "कस्टम bash.exe का पूर्ण पथ; खाली = ऑटो-डिटेक्ट।",
228
240
  "bash.save": "सहेजें",
@@ -250,7 +262,9 @@ window.__ModuleLoader__.load({
250
262
  "split.label": "Pemisahan pattern glob absolut",
251
263
  "split.hint": "Pattern glob absolut dipecah menjadi path + pattern relatif; nonaktif meneruskannya apa adanya.",
252
264
  "code.label": "jalur dalam program run_code",
253
- "code.hint": "Literal jalur yang ditulis di program run_code diterjemahkan lewat tabel mount yang sama sebelum dijalankan; komentar, template berinterpolasi, $VAR, dan string non-jalur dibiarkan, dan bila ada keraguan seluruh program tidak diubah.",
265
+ "code.hint": "Literal jalur yang ditulis di program run_code diterjemahkan lewat tabel mount yang sama sebelum dijalankan; komentar, template berinterpolasi, $VAR, dan string non-jalur dibiarkan, dan bila ada keraguan seluruh program tidak diubah. TEMP/TMP juga diisi untuk program: dengan env kosong, os.tmpdir() di Windows mengembalikan undefined\\temp dan menulis ke lokasi salah.",
266
+ "eol.label": "akhir baris Git (sama seperti Linux)",
267
+ "eol.hint": "Perintah git yang dijalankan model mengikuti perilaku Linux: core.autocrlf=false, core.eol=lf. Terminal Anda dan .gitattributes repo tidak terpengaruh.",
254
268
  "bash.label": "Path Git Bash",
255
269
  "bash.hint": "Path lengkap bash.exe kustom; kosong = deteksi otomatis.",
256
270
  "bash.save": "Simpan",
@@ -278,7 +292,9 @@ window.__ModuleLoader__.load({
278
292
  "split.label": "Suddivisione pattern glob assoluti",
279
293
  "split.hint": "Un pattern glob assoluto si divide in percorso + pattern relativo; off lo passa invariato.",
280
294
  "code.label": "percorsi nei programmi run_code",
281
- "code.hint": "I letterali di percorso scritti in un programma run_code vengono tradotti con la stessa tabella di mount prima dell'esecuzione; commenti, template interpolati, $VAR e stringhe non di percorso restano intatti e qualsiasi incertezza lascia il programma invariato.",
295
+ "code.hint": "I letterali di percorso scritti in un programma run_code vengono tradotti con la stessa tabella di mount prima dell'esecuzione; commenti, template interpolati, $VAR e stringhe non di percorso restano intatti e qualsiasi incertezza lascia il programma invariato. Inoltre TEMP/TMP vengono forniti al programma: con env vuoto, os.tmpdir() su Windows restituisce undefined\\temp e scrive nel posto sbagliato.",
296
+ "eol.label": "fine riga Git (come Linux)",
297
+ "eol.hint": "I comandi git eseguiti dal modello seguono il comportamento Linux: core.autocrlf=false, core.eol=lf. Il tuo terminale e i .gitattributes del repo non vengono toccati.",
282
298
  "bash.label": "Percorso Git Bash",
283
299
  "bash.hint": "Percorso completo di un bash.exe personalizzato; vuoto = rilevamento automatico.",
284
300
  "bash.save": "Salva",
@@ -306,7 +322,9 @@ window.__ModuleLoader__.load({
306
322
  "split.label": "glob 絶対パターン分割",
307
323
  "split.hint": "絶対 glob パターンを path + 相対パターンに分割;オフならそのまま渡します。",
308
324
  "code.label": "run_code プログラム内のパス",
309
- "code.hint": "run_code プログラム内に書いた /c/... などのパスリテラルは実行前に同じマウント表で変換されます。コメント・補間テンプレート・$VAR・パス以外の文字列は変更せず、解析に不確かさがあればプログラム全体をそのまま実行します。",
325
+ "code.hint": "run_code プログラム内に書いた /c/... などのパスリテラルは実行前に同じマウント表で変換されます。コメント・補間テンプレート・$VAR・パス以外の文字列は変更せず、解析に不確かさがあればプログラム全体をそのまま実行します。 さらにプログラムに TEMP/TMP を渡します: 空の env では Windows の os.tmpdir() が undefined\\temp を返し、誤った場所に書き込みます。",
326
+ "eol.label": "Git の行末(Linux と同じ)",
327
+ "eol.hint": "モデルが実行する git コマンドは Linux と同じ挙動になります: core.autocrlf=false、core.eol=lf。あなたのターミナルやリポジトリの .gitattributes は影響を受けません。",
310
328
  "bash.label": "Git Bash パス",
311
329
  "bash.hint": "カスタム bash.exe の完全パス;空欄なら自動検出。",
312
330
  "bash.save": "保存",
@@ -334,7 +352,9 @@ window.__ModuleLoader__.load({
334
352
  "split.label": "glob 절대 패턴 분할",
335
353
  "split.hint": "절대 glob 패턴을 path + 상대 패턴으로 분할; 끄면 그대로 전달.",
336
354
  "code.label": "run_code 프로그램 경로",
337
- "code.hint": "run_code 프로그램에 쓴 /c/... 경로 리터럴은 실행 전에 같은 마운트 표로 변환됩니다. 주석, 보간 템플릿, $VAR, 경로가 아닌 문자열은 그대로 두고, 스캔이 불확실하면 프로그램 전체를 그대로 둡니다.",
355
+ "code.hint": "run_code 프로그램에 쓴 /c/... 경로 리터럴은 실행 전에 같은 마운트 표로 변환됩니다. 주석, 보간 템플릿, $VAR, 경로가 아닌 문자열은 그대로 두고, 스캔이 불확실하면 프로그램 전체를 그대로 둡니다. 또한 프로그램에 TEMP/TMP를 채워 줍니다: 빈 env에서 Windows의 os.tmpdir()는 undefined\\temp를 반환해 엉뚱한 곳에 씁니다.",
356
+ "eol.label": "Git 줄바꿈(Linux와 동일)",
357
+ "eol.hint": "모델이 실행하는 git 명령은 Linux 동작을 따릅니다: core.autocrlf=false, core.eol=lf. 사용자의 터미널과 저장소의 .gitattributes는 영향을 받지 않습니다.",
338
358
  "bash.label": "Git Bash 경로",
339
359
  "bash.hint": "사용자 bash.exe 전체 경로; 비우면 자동 감지.",
340
360
  "bash.save": "저장",
@@ -362,7 +382,9 @@ window.__ModuleLoader__.load({
362
382
  "split.label": "Glob absoluut-patroon-splitsing",
363
383
  "split.hint": "Een absoluut glob-patroon splitst in pad + relatief patroon; uit geeft het ongewijzigd door.",
364
384
  "code.label": "paden in run_code-programma's",
365
- "code.hint": "Pad-literalen in een run_code-programma worden vóór uitvoering via dezelfde mounttabel vertaald; opmerkingen, geïnterpoleerde templates, $VAR's en niet-pad-strings blijven ongemoeid, en bij twijfel blijft het hele programma ongewijzigd.",
385
+ "code.hint": "Pad-literalen in een run_code-programma worden vóór uitvoering via dezelfde mounttabel vertaald; opmerkingen, geïnterpoleerde templates, $VAR's en niet-pad-strings blijven ongemoeid, en bij twijfel blijft het hele programma ongewijzigd. Ook worden TEMP/TMP voor het programma gezet: met een lege env geeft os.tmpdir() op Windows undefined\\temp en schrijft het op de verkeerde plek.",
386
+ "eol.label": "Git regeleinden (zoals Linux)",
387
+ "eol.hint": "Git-opdrachten die het model uitvoert volgen Linux-gedrag: core.autocrlf=false, core.eol=lf. Je eigen terminal en de .gitattributes van een repo blijven onaangetast.",
366
388
  "bash.label": "Git Bash-pad",
367
389
  "bash.hint": "Volledig pad van een aangepaste bash.exe; leeg = automatisch detecteren.",
368
390
  "bash.save": "Opslaan",
@@ -390,7 +412,9 @@ window.__ModuleLoader__.load({
390
412
  "split.label": "Podział wzorców glob absolutnych",
391
413
  "split.hint": "Absolutny wzorzec glob dzieli się na ścieżkę + wzorzec względny; wył. przekazuje bez zmian.",
392
414
  "code.label": "ścieżki w programach run_code",
393
- "code.hint": "Literały ścieżek w programie run_code są tłumaczone przez tę samą tabelę montowania przed uruchomieniem; komentarze, szablony z interpolacją, $VAR i ciągi niebędące ścieżkami pozostają nietknięte, a każda niepewność pozostawia program bez zmian.",
415
+ "code.hint": "Literały ścieżek w programie run_code są tłumaczone przez tę samą tabelę montowania przed uruchomieniem; komentarze, szablony z interpolacją, $VAR i ciągi niebędące ścieżkami pozostają nietknięte, a każda niepewność pozostawia program bez zmian. Dodatkowo ustawiane są TEMP/TMP dla programu: przy pustym env Windows zwraca z os.tmpdir() undefined\\temp i zapisuje w złym miejscu.",
416
+ "eol.label": "końce linii Git (jak w Linuksie)",
417
+ "eol.hint": "Polecenia git uruchamiane przez model działają jak w Linuksie: core.autocrlf=false, core.eol=lf. Twój terminal i .gitattributes repozytorium pozostają nietknięte.",
394
418
  "bash.label": "Ścieżka Git Bash",
395
419
  "bash.hint": "Pełna ścieżka własnego bash.exe; puste = autodetekcja.",
396
420
  "bash.save": "Zapisz",
@@ -418,7 +442,9 @@ window.__ModuleLoader__.load({
418
442
  "split.label": "Divisão de padrão glob absoluto",
419
443
  "split.hint": "Um padrão glob absoluto divide em caminho + padrão relativo; desligado passa-o inalterado.",
420
444
  "code.label": "caminhos em programas run_code",
421
- "code.hint": "Literais de caminho escritos num programa run_code são traduzidos pela mesma tabela de montagem antes da execução; comentários, modelos interpolados, $VAR e strings que não são caminhos ficam intactos, e qualquer incerteza deixa o programa como está.",
445
+ "code.hint": "Literais de caminho escritos num programa run_code são traduzidos pela mesma tabela de montagem antes da execução; comentários, modelos interpolados, $VAR e strings que não são caminhos ficam intactos, e qualquer incerteza deixa o programa como está. Também são definidos TEMP/TMP para o programa: com env vazio, os.tmpdir() no Windows devolve undefined\\temp e grava no lugar errado.",
446
+ "eol.label": "fins de linha do Git (como no Linux)",
447
+ "eol.hint": "Os comandos git executados pelo modelo seguem o comportamento do Linux: core.autocrlf=false, core.eol=lf. O seu terminal e os .gitattributes do repositório não são afetados.",
422
448
  "bash.label": "Caminho do Git Bash",
423
449
  "bash.hint": "Caminho completo de um bash.exe personalizado; vazio = detecção automática.",
424
450
  "bash.save": "Salvar",
@@ -446,7 +472,9 @@ window.__ModuleLoader__.load({
446
472
  "split.label": "Разбор абсолютного glob-шаблона",
447
473
  "split.hint": "Абсолютный glob-шаблон разбивается на path + относительный шаблон; выкл передаёт как есть.",
448
474
  "code.label": "пути в программах run_code",
449
- "code.hint": "Строковые литералы путей в программе run_code переводятся по той же таблице монтирования до запуска; комментарии, шаблоны с интерполяцией, $VAR и строки-не-пути не трогаются, а при любой неопределённости программа остаётся без изменений.",
475
+ "code.hint": "Строковые литералы путей в программе run_code переводятся по той же таблице монтирования до запуска; комментарии, шаблоны с интерполяцией, $VAR и строки-не-пути не трогаются, а при любой неопределённости программа остаётся без изменений. Также программе задаются TEMP/TMP: при пустом env в Windows os.tmpdir() возвращает undefined\\temp и запись идёт не туда.",
476
+ "eol.label": "переводы строк Git (как в Linux)",
477
+ "eol.hint": "Команды git, запускаемые моделью, ведут себя как в Linux: core.autocrlf=false, core.eol=lf. Ваш терминал и .gitattributes репозитория не затрагиваются.",
450
478
  "bash.label": "Путь Git Bash",
451
479
  "bash.hint": "Полный путь кастомного bash.exe; пусто = автоопределение.",
452
480
  "bash.save": "Сохранить",
@@ -474,7 +502,9 @@ window.__ModuleLoader__.load({
474
502
  "split.label": "Glob absolut mönsterdelning",
475
503
  "split.hint": "Ett absolut glob-mönster delas i sökväg + relativt mönster; av skickar det oförändrat.",
476
504
  "code.label": "sökvägar i run_code-program",
477
- "code.hint": "Sökvägslitteraler i ett run_code-program översätts via samma monteringstabell före körning; kommentarer, interpolerade mallar, $VAR och strängar som inte är sökvägar lämnas orörda, och vid minsta osäkerhet lämnas hela programmet oförändrat.",
505
+ "code.hint": "Sökvägslitteraler i ett run_code-program översätts via samma monteringstabell före körning; kommentarer, interpolerade mallar, $VAR och strängar som inte är sökvägar lämnas orörda, och vid minsta osäkerhet lämnas hela programmet oförändrat. Dessutom sätts TEMP/TMP för programmet: med tom env ger os.tmpdir() i Windows undefined\\temp och skriver på fel ställe.",
506
+ "eol.label": "Git radslut (som Linux)",
507
+ "eol.hint": "Git-kommandon som modellen kör följer Linux-beteende: core.autocrlf=false, core.eol=lf. Din egen terminal och repots .gitattributes påverkas inte.",
478
508
  "bash.label": "Git Bash-sökväg",
479
509
  "bash.hint": "Fullständig sökväg till egen bash.exe; tom = automatisk detektering.",
480
510
  "bash.save": "Spara",
@@ -502,7 +532,9 @@ window.__ModuleLoader__.load({
502
532
  "split.label": "การแยก pattern glob แบบสัมบูรณ์",
503
533
  "split.hint": "pattern glob สัมบูรณ์แยกเป็น path + pattern สัมพัทธ์; ปิดส่งต่อตามเดิม",
504
534
  "code.label": "พาธในโปรแกรม run_code",
505
- "code.hint": "สตริงพาธที่เขียนในโปรแกรม run_code จะถูกแปลผ่านตาราง mount เดียวกันก่อนรัน ความคิดเห็น เทมเพลตที่มีการแทรก $VAR และสตริงที่ไม่ใช่พาธจะไม่ถูกแตะ และหากไม่แน่ใจทั้งโปรแกรมจะไม่ถูกแก้ไข",
535
+ "code.hint": "สตริงพาธที่เขียนในโปรแกรม run_code จะถูกแปลผ่านตาราง mount เดียวกันก่อนรัน ความคิดเห็น เทมเพลตที่มีการแทรก $VAR และสตริงที่ไม่ใช่พาธจะไม่ถูกแตะ และหากไม่แน่ใจทั้งโปรแกรมจะไม่ถูกแก้ไข และเติม TEMP/TMP ให้โปรแกรมด้วย: เมื่อ env ว่าง os.tmpdir() บน Windows จะคืน undefined\\temp แล้วเขียนผิดที่",
536
+ "eol.label": "อักขระขึ้นบรรทัด Git (เหมือน Linux)",
537
+ "eol.hint": "คำสั่ง git ที่โมเดลรันจะใช้พฤติกรรมแบบ Linux: core.autocrlf=false, core.eol=lf เทอร์มินัลของคุณและ .gitattributes ของ repo ไม่ได้รับผลกระทบ",
506
538
  "bash.label": "เส้นทาง Git Bash",
507
539
  "bash.hint": "เส้นทางเต็มของ bash.exe แบบกำหนดเอง; ว่าง = ตรวจจับอัตโนมัติ",
508
540
  "bash.save": "บันทึก",
@@ -530,7 +562,9 @@ window.__ModuleLoader__.load({
530
562
  "split.label": "Glob mutlak örüntü ayrıştırma",
531
563
  "split.hint": "Mutlak glob örüntüsü path + göreli örüntüye ayrılır; kapalı olduğu gibi geçirir.",
532
564
  "code.label": "run_code program yolları",
533
- "code.hint": "Bir run_code programında yazılan yol dizeleri çalıştırılmadan önce aynı bağlama tablosuyla çevrilir; yorumlar, enterpolasyonlu şablonlar, $VAR ve yol olmayan dizeler olduğu gibi kalır, herhangi bir belirsizlikte programın tamamı değişmeden bırakılır.",
565
+ "code.hint": "Bir run_code programında yazılan yol dizeleri çalıştırılmadan önce aynı bağlama tablosuyla çevrilir; yorumlar, enterpolasyonlu şablonlar, $VAR ve yol olmayan dizeler olduğu gibi kalır, herhangi bir belirsizlikte programın tamamı değişmeden bırakılır. Ayrıca programa TEMP/TMP verilir: boş env ile Windows'ta os.tmpdir() undefined\\temp döner ve yanlış yere yazar.",
566
+ "eol.label": "Git satır sonları (Linux gibi)",
567
+ "eol.hint": "Modelin çalıştırdığı git komutları Linux davranışını izler: core.autocrlf=false, core.eol=lf. Kendi terminaliniz ve deponun .gitattributes dosyası etkilenmez.",
534
568
  "bash.label": "Git Bash yolu",
535
569
  "bash.hint": "Özel bash.exe tam yolu; boş = otomatik algılama.",
536
570
  "bash.save": "Kaydet",
@@ -558,7 +592,9 @@ window.__ModuleLoader__.load({
558
592
  "split.label": "Tách pattern glob tuyệt đối",
559
593
  "split.hint": "Pattern glob tuyệt đối tách thành path + pattern tương đối; tắt truyền nguyên văn.",
560
594
  "code.label": "đường dẫn trong chương trình run_code",
561
- "code.hint": "Chuỗi đường dẫn viết trong chương trình run_code được dịch qua cùng bảng mount trước khi chạy; chú thích, template nội suy, $VAR và chuỗi không phải đường dẫn được giữ nguyên, và mọi điểm không chắc chắn sẽ khiến cả chương trình không bị sửa.",
595
+ "code.hint": "Chuỗi đường dẫn viết trong chương trình run_code được dịch qua cùng bảng mount trước khi chạy; chú thích, template nội suy, $VAR và chuỗi không phải đường dẫn được giữ nguyên, và mọi điểm không chắc chắn sẽ khiến cả chương trình không bị sửa. Đồng thời nạp TEMP/TMP cho chương trình: với env rỗng, os.tmpdir() trên Windows trả về undefined\\temp và ghi sai chỗ.",
596
+ "eol.label": "kết thúc dòng Git (giống Linux)",
597
+ "eol.hint": "Các lệnh git do mô hình chạy theo hành vi Linux: core.autocrlf=false, core.eol=lf. Terminal của bạn và .gitattributes của repo không bị ảnh hưởng.",
562
598
  "bash.label": "Đường dẫn Git Bash",
563
599
  "bash.hint": "Đường dẫn đầy đủ của bash.exe tùy chỉnh; để trống = tự dò tìm.",
564
600
  "bash.save": "Lưu",
@@ -586,7 +622,9 @@ window.__ModuleLoader__.load({
586
622
  "split.label": "glob 絕對路徑拆分",
587
623
  "split.hint": "glob 嘅絕對 pattern 自動拆做 path + 相對 pattern;關閉就原樣傳遞。",
588
624
  "code.label": "run_code 程式內路徑",
589
- "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。",
625
+ "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
626
+ "eol.label": "Git 行尾(與 Linux 一致)",
627
+ "eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=false、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
590
628
  "bash.label": "Git Bash 路徑",
591
629
  "bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
592
630
  "bash.save": "儲存",
@@ -614,7 +652,9 @@ window.__ModuleLoader__.load({
614
652
  "split.label": "glob 絕對路徑拆分",
615
653
  "split.hint": "glob 嘅絕對 pattern 自動拆做 path + 相對 pattern;關閉就原樣傳遞。",
616
654
  "code.label": "run_code 程式內路徑",
617
- "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。",
655
+ "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
656
+ "eol.label": "Git 行尾(與 Linux 一致)",
657
+ "eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=false、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
618
658
  "bash.label": "Git Bash 路徑",
619
659
  "bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
620
660
  "bash.save": "儲存",
@@ -642,7 +682,9 @@ window.__ModuleLoader__.load({
642
682
  "split.label": "glob 絕對路徑拆分",
643
683
  "split.hint": "glob 的絕對 pattern 自動拆為 path + 相對 pattern;關閉則原樣傳遞。",
644
684
  "code.label": "run_code 程式內路徑",
645
- "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。",
685
+ "code.hint": "run_code 程式內寫的 /c/... 路徑字面量會在執行前按同一張掛載表翻譯;註解、插值模板、$VAR 與非路徑字串不動,掃描有任何不確定就整份不改。 並為程式補上 TEMP/TMP:空 env 下 Windows 的 os.tmpdir() 會得到 undefined\\temp,程式會靜默寫錯位置。",
686
+ "eol.label": "Git 行尾(與 Linux 一致)",
687
+ "eol.hint": "模型執行的 git 指令採 Linux 行為:core.autocrlf=false、core.eol=lf。你自己終端的 git 與倉庫的 .gitattributes 都不受影響。",
646
688
  "bash.label": "Git Bash 路徑",
647
689
  "bash.hint": "自訂 bash.exe 完整路徑;留空自動探測。",
648
690
  "bash.save": "儲存",
@@ -892,6 +934,7 @@ window.__ModuleLoader__.load({
892
934
  var errs = snap.value.errorDialect !== false;
893
935
  var splits = snap.value.globSplit !== false;
894
936
  var codes = snap.value.codePaths !== false;
937
+ var eolOn = snap.value.gitAutocrlf !== false;
895
938
 
896
939
  var dialectSection = E("div", { className: "gb-section" },
897
940
  E("div", { className: "gb-sectionTitle" }, t("sec.dialect")),
@@ -941,6 +984,15 @@ window.__ModuleLoader__.load({
941
984
  E("button", { type: "button", className: "gb-segBtn" + (!codes ? " gb-segActive" : ""), onClick: function () { if (codes) writeField("codePaths", false); } }, t("switch.off")),
942
985
  ),
943
986
  E("p", { className: "gb-hint" }, t("code.hint")),
987
+ E("div", { className: "gb-row" },
988
+ E("span", { className: "gb-rowLabel" }, t("eol.label") + ":"),
989
+ E("span", { className: "gb-rowValue" }, eolOn ? t("state.on") : t("state.off")),
990
+ ),
991
+ E("div", { className: "gb-seg" },
992
+ E("button", { type: "button", className: "gb-segBtn" + (eolOn ? " gb-segActive" : ""), onClick: function () { if (!eolOn) writeField("gitAutocrlf", true); } }, t("switch.on")),
993
+ E("button", { type: "button", className: "gb-segBtn" + (!eolOn ? " gb-segActive" : ""), onClick: function () { if (eolOn) writeField("gitAutocrlf", false); } }, t("switch.off")),
994
+ ),
995
+ E("p", { className: "gb-hint" }, t("eol.hint")),
944
996
  E("div", { className: "gb-row" },
945
997
  E("span", { className: "gb-rowLabel" }, t("bash.label") + ":"),
946
998
  ),
package/src/index.js CHANGED
@@ -663,10 +663,30 @@ export function installRegisterShim(reg) {
663
663
  const SETTINGS_NAMESPACE = 'gitbash-shell'
664
664
 
665
665
  /** The full directive text, injected only while posixPaths is on. */
666
- const POSIX_DIRECTIVE_TEXT = 'The working shell is Git for Windows bash: paths use MSYS drive roots (/c/Users/...), and every tool accepts that form directly — including the bash-native habits (~ home shorthand, /tmp, /dev/null, /usr/bin/...), which resolve in every tool exactly as bash itself resolves them. Path literals written inside a run_code program are translated the same way before the program runs; shell expansion is not available there, so spell paths out instead of relying on $VARS.'
666
+ const POSIX_DIRECTIVE_TEXT = 'The working shell is Git for Windows bash: paths use MSYS drive roots (/c/Users/...), and every tool accepts that form directly — including the bash-native habits (~ home shorthand, /tmp, /dev/null, /usr/bin/...), which resolve in every tool exactly as bash itself resolves them.'
667
667
 
668
668
  /** Strict drive-root-only directive (v0.19.0): used while virtualMounts is off. */
669
- const POSIX_DIRECTIVE_TEXT_STRICT = 'The working shell is Git for Windows bash: paths use MSYS drive roots (/c/Users/...), and every tool accepts that form directly — including path literals written inside a run_code program, which are translated before the program runs.'
669
+ const POSIX_DIRECTIVE_TEXT_STRICT = 'The working shell is Git for Windows bash: paths use MSYS drive roots (/c/Users/...), and every tool accepts that form directly.'
670
+
671
+ /**
672
+ * The run_code sentence is added ONLY for assemblies whose tool list actually
673
+ * carries run_code (v0.20.1): a preset without it — standard/cordis sessions,
674
+ * or a code-mode session whose tool row is disabled — has no program text to
675
+ * write paths into, so the sentence would be pure noise there. Cheap and
676
+ * honest: the tool list of the very assembly being rendered decides.
677
+ */
678
+ const RUN_CODE_DIRECTIVE_TEXT = ' Path literals written inside a run_code program are translated the same way before the program runs; shell expansion is not available there, so spell paths out instead of relying on $VARS.'
679
+ const RUN_CODE_DIRECTIVE_STRICT_TEXT = ' Path literals written inside a run_code program are translated before the program runs.'
680
+
681
+ /** The run_code sentence for this assembly, or '' when the tool is not offered. */
682
+ export function runCodeHintFor(tools) {
683
+ if (!Array.isArray(tools)) return ''
684
+ for (const tool of tools) {
685
+ const name = tool && typeof tool.name === 'string' ? tool.name : ''
686
+ if (name === 'run_code') return RUN_CODE_DIRECTIVE_TEXT
687
+ }
688
+ return ''
689
+ }
670
690
 
671
691
  // Official runtime counterpart to the directive (v0.11.0): dsh-shell-env is
672
692
  // the host-plane registry behind the model-visible $DSH_* facts, and the
@@ -676,6 +696,19 @@ const PATH_DIALECT_KEY = 'DSH_PATH_DIALECT'
676
696
  const PATH_DIALECT_VALUE = 'msys'
677
697
  const PATH_DIALECT_DESCRIPTION = 'Path dialect for tool calls and tool results: MSYS drive roots (/c/Users/...) plus the bash-native mounts (~, /tmp, /dev/null, /usr); every tool accepts these forms directly.'
678
698
 
699
+ // v0.21.0 — line endings for the MODEL's git commands. Windows Git defaults to
700
+ // core.autocrlf=true, so an LF file the model writes comes back CRLF after a
701
+ // checkout (scripts break on the stray \r, byte assertions fail); a Linux guest
702
+ // has autocrlf=false. GIT_CONFIG_* are per-invocation settings: they reach only
703
+ // the commands this plugin's shell runs, never the user's own terminal, and a
704
+ // repository's .gitattributes still wins.
705
+ const GIT_CONFIG_COUNT_KEY = 'GIT_CONFIG_COUNT'
706
+ const GIT_CONFIG_KEY_0 = 'GIT_CONFIG_KEY_0'
707
+ const GIT_CONFIG_VALUE_0 = 'GIT_CONFIG_VALUE_0'
708
+ const GIT_CONFIG_KEY_1 = 'GIT_CONFIG_KEY_1'
709
+ const GIT_CONFIG_VALUE_1 = 'GIT_CONFIG_VALUE_1'
710
+ const GIT_EOL_DESCRIPTION = 'Git line endings for model-run commands: core.autocrlf=false / core.eol=lf, matching a Linux guest (the user own git config is untouched).'
711
+
679
712
  /** Read the posixPaths switch from the live settings service; never throws. */
680
713
  export function readPosixPaths(ctxLike) {
681
714
  try {
@@ -696,7 +729,7 @@ export function readPosixPaths(ctxLike) {
696
729
  * first. All default ON (schema defaults); never throws.
697
730
  */
698
731
  export function readDialectSettings(ctxLike) {
699
- const fallback = { posixPaths: false, virtualMounts: false, globSplit: false, errorDialect: false, codePaths: false, bashPath: '' }
732
+ const fallback = { posixPaths: false, virtualMounts: false, globSplit: false, errorDialect: false, codePaths: false, gitAutocrlf: false, bashPath: '' }
700
733
  try {
701
734
  const settings = ctxLike && typeof ctxLike.get === 'function' ? ctxLike.get('settings') : undefined
702
735
  const value = settings && typeof settings.get === 'function' ? settings.get(SETTINGS_NAMESPACE) : undefined
@@ -707,6 +740,7 @@ export function readDialectSettings(ctxLike) {
707
740
  globSplit: v.globSplit === true,
708
741
  errorDialect: v.errorDialect === true,
709
742
  codePaths: v.codePaths === true,
743
+ gitAutocrlf: v.gitAutocrlf === true,
710
744
  bashPath: typeof v.bashPath === 'string' ? v.bashPath : '',
711
745
  }
712
746
  } catch {
@@ -773,8 +807,9 @@ function posixSeparators(value) {
773
807
  */
774
808
  const ERROR_CONTENT_TOOLS = new Set(['read', 'read_image', 'write', 'edit', 'glob', 'grep', 'present'])
775
809
 
776
- export function rewriteErrorContent(content) {
810
+ export function rewriteErrorContent(content, options) {
777
811
  if (!Array.isArray(content)) return content
812
+ const nulHint = !options || options.nulHint !== false
778
813
  let changed = false
779
814
  const next = content.map((block) => {
780
815
  if (!block || typeof block !== 'object' || typeof block.text !== 'string') return block
@@ -791,7 +826,7 @@ export function rewriteErrorContent(content) {
791
826
  const t = block && typeof block === 'object' && typeof block.text === 'string' ? block.text : ''
792
827
  return t.includes('EINVAL') && t.includes('NUL')
793
828
  })
794
- if (nulHit) {
829
+ if (nulHint && nulHit) {
795
830
  next.push({ type: 'text', text: 'hint: /dev/null is the NUL device — file tools cannot target device paths (their realpath step rejects them); discard output through bash instead (echo ... > /dev/null)' })
796
831
  changed = true
797
832
  }
@@ -1264,6 +1299,25 @@ export function scanCodeLiterals(code) {
1264
1299
  return spans
1265
1300
  }
1266
1301
 
1302
+ /**
1303
+ * The one line prepended to a run_code program (v0.21.0). run_code's process
1304
+ * environment is EMPTY BY DESIGN — exactly the same on macOS — so this is NOT
1305
+ * "giving the program a shell env". It exists for one measured Windows-only
1306
+ * symptom: with an empty env, Node's os.tmpdir() on Windows returns the literal
1307
+ * 'undefined\\temp' (macOS falls back to a real per-user directory), so a program
1308
+ * asking for the temp dir silently writes into a bogus 'undefined' folder.
1309
+ * Seeding ONLY TEMP/TMP — Windows' own convention — makes it resolvable again.
1310
+ * HOME/PATH are deliberately NOT seeded: values macOS does not have would make
1311
+ * the two platforms behave DIFFERENTLY, which is the opposite of the goal.
1312
+ * @param {{tmpDir?: string}|null} env
1313
+ * @returns {string} prelude source, or '' when there is no temp fact to seed
1314
+ */
1315
+ export function programPrelude(env) {
1316
+ const tmp = env && typeof env.tmpDir === 'string' && env.tmpDir !== '' ? env.tmpDir : ''
1317
+ if (tmp === '') return ''
1318
+ return 'try{const e=process.env;if(e&&!e.TEMP){e.TEMP=' + JSON.stringify(tmp) + ';e.TMP=e.TEMP}}catch{}\n'
1319
+ }
1320
+
1267
1321
  /**
1268
1322
  * Translates MSYS path literals inside a run_code program. Returns the input
1269
1323
  * unchanged when nothing matched or when the scan was not certain.
@@ -1600,6 +1654,7 @@ export async function apply(ctx, config = {}) {
1600
1654
  globSplit: Schema.boolean().default(true),
1601
1655
  errorDialect: Schema.boolean().default(true),
1602
1656
  codePaths: Schema.boolean().default(true),
1657
+ gitAutocrlf: Schema.boolean().default(true),
1603
1658
  bashPath: Schema.string().default(''),
1604
1659
  adoptSidebar: Schema.boolean().default(true),
1605
1660
  }))
@@ -1645,12 +1700,29 @@ export async function apply(ctx, config = {}) {
1645
1700
  if (!shellEnv || typeof shellEnv.register !== 'function') return
1646
1701
  const unregister = shellEnv.register({
1647
1702
  name: 'gitbash-shell',
1648
- variables: { [PATH_DIALECT_KEY]: { description: PATH_DIALECT_DESCRIPTION } },
1703
+ variables: {
1704
+ [PATH_DIALECT_KEY]: { description: PATH_DIALECT_DESCRIPTION },
1705
+ [GIT_CONFIG_COUNT_KEY]: { description: GIT_EOL_DESCRIPTION },
1706
+ [GIT_CONFIG_KEY_0]: { description: GIT_EOL_DESCRIPTION },
1707
+ [GIT_CONFIG_VALUE_0]: { description: GIT_EOL_DESCRIPTION },
1708
+ [GIT_CONFIG_KEY_1]: { description: GIT_EOL_DESCRIPTION },
1709
+ [GIT_CONFIG_VALUE_1]: { description: GIT_EOL_DESCRIPTION },
1710
+ },
1649
1711
  resolve() {
1650
- return readPosixPaths(envCtx) ? { [PATH_DIALECT_KEY]: PATH_DIALECT_VALUE } : {}
1712
+ const dialect = readDialectSettings(envCtx)
1713
+ if (dialect.posixPaths !== true) return {}
1714
+ const values = { [PATH_DIALECT_KEY]: PATH_DIALECT_VALUE }
1715
+ if (dialect.gitAutocrlf === true) {
1716
+ values[GIT_CONFIG_COUNT_KEY] = '2'
1717
+ values[GIT_CONFIG_KEY_0] = 'core.autocrlf'
1718
+ values[GIT_CONFIG_VALUE_0] = 'false'
1719
+ values[GIT_CONFIG_KEY_1] = 'core.eol'
1720
+ values[GIT_CONFIG_VALUE_1] = 'lf'
1721
+ }
1722
+ return values
1651
1723
  },
1652
1724
  })
1653
- envCtx.effect(() => unregister, 'dsh-gitbash-shell: shellEnv path-dialect fact')
1725
+ envCtx.effect(() => unregister, 'dsh-gitbash-shell: shellEnv path-dialect fact')
1654
1726
  console.log(`${TAG} shellEnv fact registered: ${PATH_DIALECT_KEY} (gated by the posixPaths setting)`)
1655
1727
  } catch (error) {
1656
1728
  console.log(`${TAG} shellEnv fact registration failed: ${error?.message ?? error}`)
@@ -1689,6 +1761,17 @@ export async function apply(ctx, config = {}) {
1689
1761
  if (typeof variables[key] === 'string') variables[key] = windowsToMsys(variables[key])
1690
1762
  }
1691
1763
  }
1764
+ // v0.20.1: the run_code sentence rides the SAME context entry, but
1765
+ // only when this assembly actually offers the tool (see
1766
+ // runCodeHintFor) — every other mode stays quiet.
1767
+ const hint = runCodeHintFor(assembly.tools)
1768
+ if (hint !== '') {
1769
+ for (const assembled of Array.isArray(assembly.contexts) ? assembly.contexts : []) {
1770
+ if (assembled && assembled.name === 'gitbash-shell:posix-paths' && typeof assembled.text === 'string') {
1771
+ assembled.text += hint
1772
+ }
1773
+ }
1774
+ }
1692
1775
  }
1693
1776
  } catch { /* never block assembly */ }
1694
1777
  return next()
@@ -1722,7 +1805,8 @@ export async function apply(ctx, config = {}) {
1722
1805
  // anything unclear leaves the code untouched).
1723
1806
  if (exec.name === 'run_code' && dialect.codePaths && typeof translated.code === 'string') {
1724
1807
  const rewritten = rewriteCodePaths(translated.code, env)
1725
- if (rewritten !== translated.code) translated = { ...translated, code: rewritten }
1808
+ const next = programPrelude(env) + rewritten
1809
+ if (next !== translated.code) translated = { ...translated, code: next }
1726
1810
  }
1727
1811
  if (translated !== exec.arguments) exec.arguments = translated
1728
1812
  }
@@ -1753,9 +1837,18 @@ export async function apply(ctx, config = {}) {
1753
1837
  if (result.isError === false && result.value && typeof result.value === 'object') {
1754
1838
  const value = rewriteResultPaths(exec && exec.name, result.value, dialect.virtualMounts ? buildTranslateEnv(dialect.bashPath) : null)
1755
1839
  if (value !== result.value) patch = value
1756
- } else if (result.isError === true && dialect.errorDialect && exec && ERROR_CONTENT_TOOLS.has(exec.name) && Array.isArray(result.content)) {
1757
- const content = rewriteErrorContent(result.content)
1758
- if (content !== result.content) contentPatch = content
1840
+ } else if (result.isError === true && dialect.errorDialect && exec && Array.isArray(result.content)) {
1841
+ if (ERROR_CONTENT_TOOLS.has(exec.name)) {
1842
+ const content = rewriteErrorContent(result.content)
1843
+ if (content !== result.content) contentPatch = content
1844
+ } else if (exec.name === 'run_code') {
1845
+ // v0.21.0: an uncaught program failure carries WINDOWS paths in
1846
+ // its text ("ENOENT: ... open 'C:\\Users\\...'") — the one place where
1847
+ // the dialect the model sees everywhere else broke. Paths only;
1848
+ // the diagnostic stays verbatim and no /dev/null hint is added.
1849
+ const content = rewriteErrorContent(result.content, { nulHint: false })
1850
+ if (content !== result.content) contentPatch = content
1851
+ }
1759
1852
  }
1760
1853
  }
1761
1854
  } catch { /* never block a result */ }
@@ -1898,4 +1991,4 @@ export async function apply(ctx, config = {}) {
1898
1991
  }
1899
1992
 
1900
1993
  // Test surface: pure helpers, no Cordis context required.
1901
- export const _internal = { PRESET_IDS, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }
1994
+ export const _internal = { PRESET_IDS, translateMsysPath, translatePathArguments, rewriteCodePaths, scanCodeLiterals, programPrelude, translateGlobArguments, buildTranslateEnv, rewriteErrorContent, ERROR_CONTENT_TOOLS, readPosixPaths, readAdoptSidebar, readDialectSettings, windowsToMsys, rewriteResultPaths, MARKER_FILE, classify, materialize, cleanupOnDispose, firstUserRoot, hashTree, skillsHashes, syncDecision, installRegisterShim, baseForRoster, detectBase, pickComposition, personaEraForText, detectPersonaEra, injectPresentRow, hostHasToolPresent, detectPresentSupport, injectPluginManagerRow, hostHasPluginManagerTools, rowFormOf, rowFormsOf, alignEngineRow, alignRalphRow, ROW_SOURCE }