dsh-bash-terminal-ts 0.9.1 → 0.9.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +214 -205
  2. package/CHANGELOG.pt.md +151 -151
  3. package/README.de.md +206 -206
  4. package/README.en.md +212 -212
  5. package/README.es.md +206 -206
  6. package/README.fr.md +206 -206
  7. package/README.it.md +206 -206
  8. package/README.md +423 -423
  9. package/README.pt.md +212 -212
  10. package/README.ru.md +206 -206
  11. package/agent-presets/README.md +171 -171
  12. package/agent-presets/install-presets.mjs +180 -180
  13. package/agent-presets/standard-win/agent.cordis.yml +271 -271
  14. package/agent-presets/standard-win/preset.yml +2 -2
  15. package/agent-presets/standard-win-gitbash/agent.cordis.yml +271 -271
  16. package/agent-presets/standard-win-gitbash/preset.yml +2 -2
  17. package/agent-presets/standard-win-msys2/agent.cordis.yml +272 -272
  18. package/agent-presets/standard-win-msys2/preset.yml +2 -2
  19. package/agent-presets/standard-win-niu/agent.cordis.yml +270 -270
  20. package/agent-presets/standard-win-niu/preset.yml +2 -2
  21. package/agent-presets/standard-win-wsl2/agent.cordis.yml +271 -271
  22. package/agent-presets/standard-win-wsl2/preset.yml +2 -2
  23. package/cordis.patch.yml +72 -84
  24. package/dist/client.core.js +193 -12
  25. package/dist/client.js +193 -12
  26. package/docs/niu-backend.md +197 -197
  27. package/dsh.plugin.json +23 -23
  28. package/lib/client.js +193 -12
  29. package/lib/dsh-types.d.ts +0 -2
  30. package/lib/index.d.ts +2 -23
  31. package/lib/index.js +4 -34
  32. package/lib/locales.js +0 -10
  33. package/lib/shell-id.d.ts +2 -2
  34. package/lib/shells.d.ts +2 -11
  35. package/lib/shells.js +4 -14
  36. package/lib/terminal.js +0 -1
  37. package/lib/webterminals/catalog.d.ts +0 -2
  38. package/lib/webterminals/catalog.js +0 -1
  39. package/lib/webterminals/mount.d.ts +0 -5
  40. package/lib/webterminals/mount.js +0 -4
  41. package/locale/de.json +5 -5
  42. package/locale/en.json +5 -5
  43. package/locale/es.json +5 -5
  44. package/locale/fr.json +5 -5
  45. package/locale/it.json +5 -5
  46. package/locale/ja.json +5 -5
  47. package/locale/ko.json +5 -5
  48. package/locale/pt.json +6 -6
  49. package/locale/ru.json +5 -5
  50. package/locale/zh.json +5 -5
  51. package/package.json +1 -5
  52. package/scripts/check-artifacts.mjs +96 -96
  53. package/scripts/link-shells.mjs +0 -21
  54. package/src/client.tsx +687 -685
  55. package/src/dsh-types.ts +330 -332
  56. package/src/index.ts +1267 -1316
  57. package/src/locales.ts +499 -509
  58. package/src/shell-id.ts +11 -11
  59. package/src/shells.ts +263 -279
  60. package/src/terminal.ts +615 -616
  61. package/src/webterminals/browser/star-row-copy.ts +256 -0
  62. package/src/webterminals/catalog.ts +0 -3
  63. package/src/webterminals/host.ts +361 -361
  64. package/src/webterminals/mount.ts +228 -237
  65. package/agent-presets/standard-win-payload/agent.cordis.yml +0 -271
  66. package/agent-presets/standard-win-payload/preset.yml +0 -2
  67. package/lib/payload.d.ts +0 -72
  68. package/lib/payload.js +0 -279
  69. package/scripts/payload-alias.mjs +0 -97
  70. package/scripts/provision-payload.mjs +0 -233
  71. package/src/payload.ts +0 -322
package/lib/client.js CHANGED
@@ -6156,7 +6156,6 @@ var zh = {
6156
6156
  "dock.state.available": "\u53EF\u7528",
6157
6157
  "dock.state.notInstalled": "\u672A\u63A2\u6D4B\u5230",
6158
6158
  "dock.state.wslPreferred": "\u5DF2\u68C0\u6D4B\u5230 WSL \u53D1\u884C\u7248\uFF08\u4F18\u5148\u7528 WSL bash\uFF09",
6159
- "shell.payload": "POSIX payload",
6160
6159
  "shell.niu": "Niubash",
6161
6160
  "dock.state.noDistro": "\u65E0\u5DF2\u5B89\u88C5\u53D1\u884C\u7248",
6162
6161
  "dock.state.launcherOnly": "\u53EA\u627E\u5230\u542F\u52A8\u5668\uFF0C\u65E0\u6CD5\u5185\u5D4C",
@@ -6204,7 +6203,6 @@ var en = {
6204
6203
  "dock.state.available": "Available",
6205
6204
  "dock.state.notInstalled": "Not found",
6206
6205
  "dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
6207
- "shell.payload": "POSIX payload",
6208
6206
  "shell.niu": "Niubash",
6209
6207
  "dock.state.noDistro": "No distro installed",
6210
6208
  "dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
@@ -6252,7 +6250,6 @@ var ja = {
6252
6250
  "dock.state.available": "\u5229\u7528\u53EF",
6253
6251
  "dock.state.notInstalled": "\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
6254
6252
  "dock.state.wslPreferred": "WSL \u30C7\u30A3\u30B9\u30C8\u30EA\u691C\u51FA\u6E08\u307F\uFF08WSL bash \u512A\u5148\uFF09",
6255
- "shell.payload": "POSIX payload",
6256
6253
  "shell.niu": "Niubash",
6257
6254
  "dock.state.noDistro": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C7\u30A3\u30B9\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306A\u3057",
6258
6255
  "dock.state.launcherOnly": "\u30E9\u30F3\u30C1\u30E3\u30FC\u306E\u307F\u691C\u51FA\u3001\u57CB\u3081\u8FBC\u307F\u4E0D\u53EF",
@@ -6300,7 +6297,6 @@ var ko = {
6300
6297
  "dock.state.available": "\uC0AC\uC6A9 \uAC00\uB2A5",
6301
6298
  "dock.state.notInstalled": "\uD0D0\uC9C0\uB418\uC9C0 \uC54A\uC74C",
6302
6299
  "dock.state.wslPreferred": "WSL \uBC30\uD3EC\uD310 \uAC10\uC9C0\uB428 (WSL bash \uC6B0\uC120)",
6303
- "shell.payload": "POSIX payload",
6304
6300
  "shell.niu": "Niubash",
6305
6301
  "dock.state.noDistro": "\uC124\uCE58\uB41C \uBC30\uD3EC\uD310 \uC5C6\uC74C",
6306
6302
  "dock.state.launcherOnly": "\uB7F0\uCC98\uB9CC \uBC1C\uACAC\uB418\uC5B4 \uB0B4\uC7A5\uD560 \uC218 \uC5C6\uC74C",
@@ -6348,7 +6344,6 @@ var fr = {
6348
6344
  "dock.state.available": "Disponible",
6349
6345
  "dock.state.notInstalled": "Non d\xE9tect\xE9",
6350
6346
  "dock.state.wslPreferred": "Distro WSL d\xE9tect\xE9e (bash WSL pr\xE9f\xE9r\xE9)",
6351
- "shell.payload": "POSIX payload",
6352
6347
  "shell.niu": "Niubash",
6353
6348
  "dock.state.noDistro": "Aucune distribution install\xE9e",
6354
6349
  "dock.state.launcherOnly": "Seuls des lanceurs ont \xE9t\xE9 trouv\xE9s; int\xE9gration impossible",
@@ -6396,7 +6391,6 @@ var de = {
6396
6391
  "dock.state.available": "Verf\xFCgbar",
6397
6392
  "dock.state.notInstalled": "Nicht gefunden",
6398
6393
  "dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
6399
- "shell.payload": "POSIX payload",
6400
6394
  "shell.niu": "Niubash",
6401
6395
  "dock.state.noDistro": "Keine Distribution installiert",
6402
6396
  "dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht m\xF6glich",
@@ -6444,7 +6438,6 @@ var it = {
6444
6438
  "dock.state.available": "Disponibile",
6445
6439
  "dock.state.notInstalled": "Non trovato",
6446
6440
  "dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
6447
- "shell.payload": "POSIX payload",
6448
6441
  "shell.niu": "Niubash",
6449
6442
  "dock.state.noDistro": "Nessuna distribuzione installata",
6450
6443
  "dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
@@ -6492,7 +6485,6 @@ var ru = {
6492
6485
  "dock.state.available": "\u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D",
6493
6486
  "dock.state.notInstalled": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
6494
6487
  "dock.state.wslPreferred": "\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 WSL (\u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u0435\u0435 WSL bash)",
6495
- "shell.payload": "POSIX payload",
6496
6488
  "shell.niu": "Niubash",
6497
6489
  "dock.state.noDistro": "\u041D\u0435\u0442 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043E\u0432",
6498
6490
  "dock.state.launcherOnly": "\u041D\u0430\u0439\u0434\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u043B\u0430\u0443\u043D\u0447\u0435\u0440, \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043D\u0438\u0435 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E",
@@ -6540,7 +6532,6 @@ var es = {
6540
6532
  "dock.state.available": "Disponible",
6541
6533
  "dock.state.notInstalled": "No detectado",
6542
6534
  "dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
6543
- "shell.payload": "POSIX payload",
6544
6535
  "shell.niu": "Niubash",
6545
6536
  "dock.state.noDistro": "Sin distribuci\xF3n instalada",
6546
6537
  "dock.state.launcherOnly": "Solo se encontr\xF3 un lanzador; no se puede incrustar",
@@ -6588,7 +6579,6 @@ var pt = {
6588
6579
  "dock.state.available": "Dispon\xEDvel",
6589
6580
  "dock.state.notInstalled": "N\xE3o detectado",
6590
6581
  "dock.state.wslPreferred": "Distro WSL detectada (bash do WSL preferido)",
6591
- "shell.payload": "POSIX payload",
6592
6582
  "shell.niu": "Niubash",
6593
6583
  "dock.state.noDistro": "Nenhuma distribui\xE7\xE3o instalada",
6594
6584
  "dock.state.launcherOnly": "Apenas um lan\xE7ador foi encontrado; n\xE3o \xE9 poss\xEDvel incorpor\xE1-lo",
@@ -7752,10 +7742,198 @@ function MultiShellTerminal(props) {
7752
7742
  ] });
7753
7743
  }
7754
7744
 
7745
+ // src/webterminals/browser/star-row-copy.ts
7746
+ var REPO_URL = "https://github.com/drscrewdriver/dsh-bash-terminal-ts";
7747
+ var STAR_NS = "bash-terminal";
7748
+ var STAR_VARIANT = "S";
7749
+ var STAR_COPY = {
7750
+ zh: { ask: "\u89C9\u5F97\u7701\u4E8B\u4E86\uFF1F\u4E00\u9897 Star \u8BA9\u5DE5\u5177\u88AB\u66F4\u591A\u4EBA\u770B\u89C1" },
7751
+ en: { ask: "Finding it handy? A star helps more people discover this tool" },
7752
+ ja: { ask: "\u4FBF\u5229\u3067\u3057\u305F\u3089\u2B50\u3067\u3001\u3053\u306E\u30C4\u30FC\u30EB\u304C\u3082\u3063\u3068\u5C4A\u304D\u307E\u3059" },
7753
+ ko: { ask: "\uC720\uC6A9\uD588\uB2E4\uBA74 \u2B50 \uD558\uB098\uB85C \uB354 \uB9CE\uC740 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uB2FF\uC2B5\uB2C8\uB2E4" },
7754
+ fr: { ask: "Utile ? Une \xE9toile aide cet outil \xE0 \xEAtre d\xE9couvert" },
7755
+ de: { ask: "N\xFCtzlich? Ein Stern hilft dem Tool, gesehen zu werden" },
7756
+ it: { ask: "Ti \xE8 utile? Una stella aiuta questo tool a farsi scoprire" },
7757
+ ru: { ask: "\u041F\u0440\u0438\u0433\u043E\u0434\u0438\u043B\u043E\u0441\u044C? \u0417\u0432\u0435\u0437\u0434\u0430 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435\u043C\u0443 \u0447\u0438\u0441\u043B\u0443 \u043B\u044E\u0434\u0435\u0439 \u0443\u0437\u043D\u0430\u0442\u044C \u043E tool" },
7758
+ es: { ask: "\xBFTe resulta \xFAtil? Una estrella ayuda a que m\xE1s gente lo descubra" },
7759
+ pt: { ask: "Achou \xFAtil? Uma estrela ajuda mais pessoas a descobrir a ferramenta" }
7760
+ };
7761
+ var STAR_LANGS = ["zh", "en", "ja", "ko", "fr", "de", "it", "ru", "es", "pt"];
7762
+ var GITHUB_MARK_PATH = "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332 -5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12";
7763
+ var STYLE_ID = "dsh-star-row-style";
7764
+ var STYLE_CSS = [
7765
+ ".dsh-star-row{display:flex;align-items:center;gap:7px;font-size:12px;",
7766
+ "line-height:1.5;color:inherit;text-decoration:none;opacity:.72;padding:3px 0;",
7767
+ "margin-top:6px;min-width:0;flex-wrap:wrap}",
7768
+ ".dsh-star-row:hover{opacity:1;text-decoration:underline}",
7769
+ ".dsh-star-row svg{width:14px;height:14px;flex:none;display:block}",
7770
+ ".dsh-star-row .dsh-star-ask{opacity:.85;font-weight:400}"
7771
+ ].join("");
7772
+ function pickLang() {
7773
+ const tag = typeof document !== "undefined" && document.documentElement.lang || "";
7774
+ const low = tag.toLowerCase();
7775
+ for (const cand of STAR_LANGS) {
7776
+ if (low.startsWith(cand)) return STAR_COPY[cand];
7777
+ }
7778
+ return STAR_COPY.en;
7779
+ }
7780
+ var STAR_CTA = {
7781
+ zh: "\u7559\u9897 Star",
7782
+ en: "Star",
7783
+ ja: "\u30B9\u30BF\u30FC",
7784
+ ko: "\uC2A4\uD0C0",
7785
+ fr: "Star",
7786
+ de: "Stern",
7787
+ it: "Stella",
7788
+ ru: "\u0417\u0432\u0435\u0437\u0434\u0430",
7789
+ es: "Estrella",
7790
+ pt: "Estrela"
7791
+ };
7792
+ var STAR_HIDE = {
7793
+ zh: "\u4E0D\u518D\u63D0\u793A",
7794
+ en: "Dismiss",
7795
+ ja: "\u4ECA\u5F8C\u8868\u793A\u3057\u306A\u3044",
7796
+ ko: "\uB2E4\uC2DC \uBCF4\uC9C0 \uC54A\uAE30",
7797
+ fr: "Masquer",
7798
+ de: "Ausblenden",
7799
+ it: "Nascondi",
7800
+ ru: "\u0421\u043A\u0440\u044B\u0442\u044C",
7801
+ es: "Ocultar",
7802
+ pt: "Ocultar"
7803
+ };
7804
+ var STAR_S_STYLE_ID = "dsh-star-row-s-style";
7805
+ var STAR_S_STYLE = [
7806
+ ".dsh-star-row-s{display:flex;align-items:center;gap:8px;flex-wrap:wrap;",
7807
+ "font-size:12px;line-height:1.5;color:inherit;opacity:.75;margin-top:10px;",
7808
+ "padding-top:8px;border-top:1px solid var(--dsw-alias-border-l2,currentColor)}",
7809
+ ".dsh-star-row-s:hover{opacity:1}",
7810
+ ".dsh-star-link{display:inline-flex;align-items:center;gap:6px;",
7811
+ "color:inherit;text-decoration:none}",
7812
+ ".dsh-star-link:hover{text-decoration:underline}",
7813
+ ".dsh-star-link svg{width:14px;height:14px;flex:none;display:block}",
7814
+ ".dsh-star-row-s .dsh-star-ask{opacity:.85;font-weight:400}",
7815
+ ".dsh-star-cta,.dsh-star-hide{font:inherit;font-size:11px;line-height:1;",
7816
+ "padding:4px 9px;border-radius:999px;border:1px solid currentColor;",
7817
+ "background:transparent;color:inherit;cursor:pointer;flex:none;opacity:.7}",
7818
+ ".dsh-star-hide{padding:4px 7px}",
7819
+ ".dsh-star-cta:hover,.dsh-star-hide:hover{opacity:1}"
7820
+ ].join("");
7821
+ function starLang() {
7822
+ const tag = typeof document !== "undefined" && document.documentElement.lang || "";
7823
+ const low = tag.toLowerCase();
7824
+ for (const cand of STAR_LANGS) if (low.startsWith(cand)) return cand;
7825
+ return "en";
7826
+ }
7827
+ function starDismissed() {
7828
+ try {
7829
+ return localStorage.getItem("dsh.star." + STAR_NS + ".dismissed") === "1";
7830
+ } catch {
7831
+ return false;
7832
+ }
7833
+ }
7834
+ function starDismiss() {
7835
+ try {
7836
+ localStorage.setItem("dsh.star." + STAR_NS + ".dismissed", "1");
7837
+ } catch {
7838
+ }
7839
+ }
7840
+ function injectStarSStyle(d) {
7841
+ if (d.getElementById(STAR_S_STYLE_ID)) return;
7842
+ const style = d.createElement("style");
7843
+ style.id = STAR_S_STYLE_ID;
7844
+ style.textContent = STAR_S_STYLE;
7845
+ d.head.appendChild(style);
7846
+ }
7847
+ function openRepo(d) {
7848
+ const a = d.createElement("a");
7849
+ a.href = REPO_URL;
7850
+ a.target = "_blank";
7851
+ a.rel = "noopener noreferrer";
7852
+ a.click();
7853
+ }
7854
+ function extendedStarRow(link, d) {
7855
+ if (STAR_VARIANT !== "S") return null;
7856
+ if (starDismissed()) return link;
7857
+ injectStarSStyle(d);
7858
+ link.className = "dsh-star-link";
7859
+ const lang = starLang();
7860
+ const row = d.createElement("div");
7861
+ row.className = "dsh-star-row-s";
7862
+ row.appendChild(link);
7863
+ const ask = d.createElement("span");
7864
+ ask.className = "dsh-star-ask";
7865
+ ask.textContent = STAR_COPY[lang].ask;
7866
+ row.appendChild(ask);
7867
+ const cta = d.createElement("button");
7868
+ cta.type = "button";
7869
+ cta.className = "dsh-star-cta";
7870
+ cta.textContent = "\u2605 " + STAR_CTA[lang];
7871
+ cta.addEventListener("click", (event) => {
7872
+ event.preventDefault();
7873
+ event.stopPropagation();
7874
+ openRepo(d);
7875
+ });
7876
+ row.appendChild(cta);
7877
+ const hide = d.createElement("button");
7878
+ hide.type = "button";
7879
+ hide.className = "dsh-star-hide";
7880
+ hide.textContent = "\xD7";
7881
+ hide.title = STAR_HIDE[lang];
7882
+ hide.setAttribute("aria-label", STAR_HIDE[lang]);
7883
+ hide.addEventListener("click", (event) => {
7884
+ event.preventDefault();
7885
+ event.stopPropagation();
7886
+ starDismiss();
7887
+ if (row.parentNode) {
7888
+ row.parentNode.replaceChild(link, row);
7889
+ link.className = "dsh-star-row";
7890
+ }
7891
+ });
7892
+ row.appendChild(hide);
7893
+ return row;
7894
+ }
7895
+ function mountStarRow(doc) {
7896
+ const d = doc ?? document;
7897
+ if (!d.getElementById(STYLE_ID)) {
7898
+ const tag = d.createElement("style");
7899
+ tag.id = STYLE_ID;
7900
+ tag.textContent = STYLE_CSS;
7901
+ d.head.appendChild(tag);
7902
+ }
7903
+ const match = REPO_URL.match(/github\.com\/([^/]+\/[^/#?]+)/);
7904
+ const repo = match ? match[1] : "drscrewdriver";
7905
+ const a = d.createElement("a");
7906
+ a.className = "dsh-star-row";
7907
+ a.href = REPO_URL;
7908
+ a.target = "_blank";
7909
+ a.rel = "noreferrer";
7910
+ a.dataset.starNs = STAR_NS;
7911
+ const svg = d.createElementNS("http://www.w3.org/2000/svg", "svg");
7912
+ svg.setAttribute("viewBox", "0 0 24 24");
7913
+ svg.setAttribute("aria-hidden", "true");
7914
+ const path = d.createElementNS("http://www.w3.org/2000/svg", "path");
7915
+ path.setAttribute("fill", "currentColor");
7916
+ path.setAttribute("d", GITHUB_MARK_PATH);
7917
+ svg.appendChild(path);
7918
+ a.appendChild(svg);
7919
+ const label = d.createElement("span");
7920
+ label.textContent = repo;
7921
+ a.appendChild(label);
7922
+ const row = extendedStarRow(a, d);
7923
+ if (row) return row;
7924
+ if (STAR_VARIANT === "A") {
7925
+ const ask = d.createElement("span");
7926
+ ask.className = "dsh-star-ask";
7927
+ ask.textContent = pickLang().ask;
7928
+ a.appendChild(ask);
7929
+ }
7930
+ return a;
7931
+ }
7932
+
7755
7933
  // src/client.tsx
7756
7934
  var import_jsx_runtime3 = require("react/jsx-runtime");
7757
7935
  var SETTINGS_NS = "settings.bash-terminal";
7758
- var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
7936
+ var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "niu"];
7759
7937
  var ROW_CSS = ".btRow{border-bottom:1px solid var(--dsw-alias-border-l2);align-items:center;gap:8px;padding:16px 0;display:flex}.btRowText{flex-direction:column;flex:1;gap:4px;min-width:0;padding-right:48px;display:flex}.btTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.btDesc{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.btSelector{background:var(--dsw-alias-bg-module-platform);height:36px;font:inherit;color:var(--dsw-alias-label-primary);cursor:pointer;border:none;border-radius:18px;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;display:inline-flex}.btSelector:hover{background:var(--dsw-alias-interactive-bg-hover)}.btGear{position:fixed;right:16px;bottom:110px;z-index:10000;width:40px;height:40px;border-radius:50%;border:1px solid rgba(127,127,127,.4);background:rgba(30,30,32,.85);color:inherit;cursor:pointer;font-size:17px;box-shadow:0 4px 16px rgba(0,0,0,.35)}.btOverlay{position:fixed;inset:0;z-index:10000;background:rgba(0,0,0,.45)}.btPanel{position:fixed;top:6vh;left:50%;transform:translateX(-50%);width:min(760px,92vw);max-height:84vh;overflow-y:auto;z-index:10001;background:var(--dsw-alias-bg-module-platform,rgba(30,30,32,.92));border:1px solid var(--dsw-alias-border-l2,rgba(127,127,127,.3));border-radius:14px;padding:20px;color:var(--dsw-alias-label-primary)}.btBadge{border-radius:10px;padding:2px 8px;font-size:11px;line-height:16px;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-tertiary);white-space:nowrap}.btBadgeOk{color:var(--dsw-alias-label-primary)}.btNotice{color:var(--dsw-alias-label-secondary);font-size:12px;line-height:18px;padding:8px 0}.btWarn{color:var(--dsw-status-warning-default,#b8860b)}.btRowSwitch{padding-right:0}.btSwitch{width:40px;height:24px;border-radius:12px;border:none;cursor:pointer;background:var(--dsw-alias-bg-module-platform);position:relative;flex:none;transition:background .15s ease;box-shadow:inset 0 0 0 1px var(--dsw-alias-border-l2)}.btSwitch::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--dsw-alias-label-tertiary);transition:transform .15s ease,background .15s ease}.btSwitchOn{background:var(--dsw-alias-interactive-brand,#2f6fed)}.btSwitchOn::after{transform:translateX(16px);background:#fff}.btSwitch:disabled{cursor:not-allowed;opacity:.4}.btSwitch:disabled::after{background:var(--dsw-alias-label-quaternary,#8a8a8a)}.btInput{background:var(--dsw-alias-bg-module-platform);height:32px;border:none;border-radius:8px;color:var(--dsw-alias-label-primary);padding:0 10px;font:inherit;min-width:0;flex:1}.btPick{position:relative;display:inline-block}.btPickBtn{gap:6px}.btPickSm{height:28px;padding:0 10px;border-radius:14px;font-size:12px;line-height:18px}.btPickBtn:disabled{opacity:.4;cursor:not-allowed}.btPickText{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.btPickCaret{color:var(--dsw-alias-label-tertiary);font-size:10px;line-height:1}.btPickList{position:absolute;z-index:1000;top:calc(100% + 4px);left:0;min-width:100%;max-height:260px;overflow-y:auto;padding:4px;border:1px solid var(--dsw-alias-border-l2);border-radius:10px;background:var(--dsw-alias-bg-overlay);box-shadow:0 8px 24px rgba(0,0,0,.28)}.btPickOpt{padding:6px 10px;font-size:12px;line-height:18px;border-radius:6px;color:var(--dsw-alias-label-primary);cursor:pointer;white-space:nowrap}.btPickOpt:hover{background:var(--dsw-alias-interactive-bg-hover)}.btPickOptOn{color:var(--dsw-alias-interactive-brand);font-weight:600}";
7760
7938
  if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
7761
7939
  const tag = document.createElement("style");
@@ -8005,7 +8183,10 @@ function ShellDockSection() {
8005
8183
  function SettingsBody() {
8006
8184
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
8007
8185
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellPreferenceRow, {}),
8008
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {})
8186
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ShellDockSection, {}),
8187
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { ref: (node) => {
8188
+ if (node && !node.firstChild) node.appendChild(mountStarRow());
8189
+ } })
8009
8190
  ] });
8010
8191
  }
8011
8192
  var hostSettingsSurface = "unknown";
@@ -185,8 +185,6 @@ export interface ResolvedPaths {
185
185
  gitbash?: string;
186
186
  msys2?: string;
187
187
  wsl?: string;
188
- /** The digest-verified pinned POSIX runtime payload (see src/payload.ts). */
189
- payload?: string;
190
188
  /** Niubash (native bash reimplementation); see candidateNiuPaths in index.ts. */
191
189
  niu?: string;
192
190
  }
package/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export declare const name = "bash-terminal";
4
4
  /** Services required before the tool can register. */
5
5
  export declare const inject: string[];
6
6
  /** The terminal backends this tool exposes, in catalog order. */
7
- export declare const SHELLS: readonly ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
7
+ export declare const SHELLS: readonly ["powershell", "gitbash", "msys2", "wsl", "niu"];
8
8
  /** The backend used when the caller does not name one. */
9
9
  export declare const DEFAULT_SHELL: ShellId;
10
10
  /** Static shape of the runtime configuration schema. */
@@ -41,29 +41,8 @@ export interface ConfigValues {
41
41
  shellGitBash: boolean;
42
42
  shellMsys2: boolean;
43
43
  shellWsl: boolean;
44
- /**
45
- * Activation switch for the payload row in the bottom-terminal UI. Separate
46
- * from `enablePosixPayload` (the operator gate that RUNS the digest check at
47
- * startup): this one only decides whether a resolved payload may appear in
48
- * pickers. Default false - the payload is opt-in twice, provisioning and
49
- * activation.
50
- */
51
- shellPayload: boolean;
52
44
  /** WSL distribution for the browser terminal; '' means the WSL default. */
53
45
  wslDistro: string;
54
- /**
55
- * Pinned backup POSIX runtime payload (see src/payload.ts - the artifact is
56
- * a Git-for-Windows tree; OUR name avoids the bash/msys tokens by policy).
57
- * Default off; enabling it lets a digest-verified payload fill the Git Bash
58
- * slot as a LAST-RESORT source when the machine has no system Git Bash. A
59
- * detected WSL distro outranks the payload entirely (a real WSL bash is the
60
- * better POSIX shell), and an unverifiable payload fails closed - it is
61
- * never run, never silently replaced. Resolved at startup, so toggling
62
- * takes effect on the next restart.
63
- */
64
- enablePosixPayload: boolean;
65
- /** Explicit payload root or bin/bash.exe path; '' = auto-discovery only. */
66
- payloadPosixPath: string;
67
46
  /** Fixed niu.exe path; '' = auto-discovery via candidateNiuPaths. */
68
47
  niuPath: string;
69
48
  /** Activation switch for the Niubash row (default true: detected means on). */
@@ -108,7 +87,7 @@ export declare function defaultWslPath(env?: NodeJS.ProcessEnv): string;
108
87
  /** Executable paths, possibly undefined when a backend is not installed. */
109
88
  export type { ResolvedPaths };
110
89
  type PathConfig = Partial<Pick<ConfigValues, "pwshPath" | "gitBashPath" | "msys2Path" | "wslPath" | "niuPath">>;
111
- export declare function resolveAllPaths(config?: PathConfig, env?: NodeJS.ProcessEnv, payloadBash?: string): ResolvedPaths;
90
+ export declare function resolveAllPaths(config?: PathConfig, env?: NodeJS.ProcessEnv): ResolvedPaths;
112
91
  export declare function buildArgv(shell: string, command: string, paths: ResolvedPaths, distro?: string): Array<string | undefined>;
113
92
  /**
114
93
  * Merge the DSH_* environment over the process environment. For WSL, only
package/lib/index.js CHANGED
@@ -26,7 +26,6 @@ import { isAbsolute, join, resolve } from "node:path";
26
26
  import { mountBrowserTerminals } from "./webterminals/mount.js";
27
27
  import { ESCALATION_TARGETS, TOOL_ABORTED, approveEscalation, defineTool, escalationHintMarker, clampTimeout, deadline, parseExitStatus, timeoutOf, sandboxDenialMarker, validateEscalationArgs, z, HarnessError } from "./dsh.js";
28
28
  import { createTerminalRegistry, terminalTool } from "./terminal.js";
29
- import { resolvePayloadBash } from "./payload.js";
30
29
  /** Stable Cordis plugin name. */
31
30
  export const name = "bash-terminal";
32
31
  /** Composition entry id (the `tool-bash-terminal` row the bundle patch declares). */
@@ -34,7 +33,7 @@ const ENTRY_ID = "tool-bash-terminal";
34
33
  /** Services required before the tool can register. */
35
34
  export const inject = ["tools", "systemPrompt", "shellEnv", "subprocess", "settings", "sandbox", "sandboxPolicy"];
36
35
  /** The terminal backends this tool exposes, in catalog order. */
37
- export const SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
36
+ export const SHELLS = ["powershell", "gitbash", "msys2", "wsl", "niu"];
38
37
  /** The backend used when the caller does not name one. */
39
38
  export const DEFAULT_SHELL = "powershell";
40
39
  /** Default per-command timeout (ms). */
@@ -73,12 +72,7 @@ export const Config = z.object({
73
72
  shellGitBash: z.boolean().default(true).volatile(),
74
73
  shellMsys2: z.boolean().default(true).volatile(),
75
74
  shellWsl: z.boolean().default(true).volatile(),
76
- shellPayload: z.boolean().default(false).volatile(),
77
75
  wslDistro: z.string().default("").volatile(),
78
- // Payload gate state is read once per process (paths resolve at startup), so
79
- // these are deliberately NOT volatile: a flip needs the restart it implies.
80
- enablePosixPayload: z.boolean().default(false),
81
- payloadPosixPath: z.string().default(""),
82
76
  niuPath: z.string().default(""),
83
77
  shellNiu: z.boolean().default(true).volatile()
84
78
  });
@@ -198,7 +192,7 @@ export function defaultWslPath(env = process.env) {
198
192
  const systemRoot = env.SystemRoot ?? "C:\\Windows";
199
193
  return join(systemRoot, "System32", "wsl.exe");
200
194
  }
201
- export function resolveAllPaths(config = {}, env = process.env, payloadBash) {
195
+ export function resolveAllPaths(config = {}, env = process.env) {
202
196
  const pwsh = config.pwshPath && config.pwshPath.trim().length > 0
203
197
  ? config.pwshPath
204
198
  : resolveFromCandidates(candidatePwshPaths(env));
@@ -214,10 +208,7 @@ export function resolveAllPaths(config = {}, env = process.env, payloadBash) {
214
208
  const niu = config.niuPath && config.niuPath.trim().length > 0
215
209
  ? config.niuPath
216
210
  : resolveFromCandidates(candidateNiuPaths(env));
217
- // The payload is its OWN backend (first-class catalog row) - it never
218
- // silently substitutes for the gitbash slot, so a row labelled "Git Bash"
219
- // always names a shell the machine actually has.
220
- return { pwsh, gitbash, msys2, wsl, niu, ...(payloadBash !== undefined ? { payload: payloadBash } : {}) };
211
+ return { pwsh, gitbash, msys2, wsl, niu };
221
212
  }
222
213
  // ---- argv / env construction ------------------------------------------------
223
214
  export function buildArgv(shell, command, paths, distro) {
@@ -231,10 +222,6 @@ export function buildArgv(shell, command, paths, distro) {
231
222
  // /usr/bin and /mingw64/bin on PATH. With a bare -c, `tr`, `sed`, `gcc`
232
223
  // and friends are all "command not found".
233
224
  return [paths.msys2, "-lc", command];
234
- case "payload":
235
- // Same login-shell rule as msys2/gitbash: the payload is a
236
- // Git-for-Windows tree and `-lc` is what gives it a usable PATH.
237
- return [paths.payload, "-lc", command];
238
225
  case "niu":
239
226
  // Same login-shell rule: -lc sources the profile chain so winuxcmd's
240
227
  // bin directory joins PATH. (niu has no MSYS runtime; see findings F2
@@ -458,7 +445,6 @@ export const SHELL_DESCRIPTIONS = {
458
445
  gitbash: "Execute a bash command (Git for Windows bash -lc <command>) and return its stdout/stderr. POSIX syntax; paths like /d/WorkSpace; PATH includes /usr/bin and /mingw64/bin so git, npm, ssh etc. work; environment variables via $NAME.",
459
446
  msys2: "Execute a bash command (MSYS2 bash -lc <command>) and return its stdout/stderr. POSIX syntax; paths like /c/...; PATH includes /usr/bin and /mingw64/bin so git, npm, gcc, make etc. work; environment variables via $NAME. MSYS2 provides a full GCC/mingw64 toolchain.",
460
447
  wsl: "Execute a Linux bash command (wsl [-d <distro>] -e bash -lc <command>) and return its stdout/stderr. Linux syntax; Windows files under /mnt/d/...; environment variables via $NAME.",
461
- payload: "Execute a bash command in the plugin's pinned POSIX runtime payload (a digest-verified Git-for-Windows bash -lc <command>) and return its stdout/stderr. POSIX syntax; paths like /c/...; PATH includes /usr/bin so git, npm, ssh etc. work; environment variables via $NAME. Use it only when the user has deliberately enabled the payload backend.",
462
448
  niu: "Execute a bash command (Niubash niu -lc <command>) and return its stdout/stderr. GNU bash 5.3 semantics; WinuxCmd applets (ls, cp, rm, grep, find, cat, sed, awk, ...) are on PATH; native Windows paths such as C:\\... are kept as-is while /c/... style arguments are translated; environment variables via $NAME. Niubash is a native binary with no MSYS emulation layer, so /dev/* redirects other than /dev/null do not exist; its startup file is ~/.niubashrc."
463
449
  };
464
450
  /**
@@ -593,20 +579,7 @@ export async function persistConfigValue(svc, path, value) {
593
579
  }
594
580
  // ---- plugin -------------------------------------------------------------------
595
581
  export function apply(ctx, config = {}) {
596
- // Pinned backup POSIX runtime payload: opt-in, its OWN backend slot. A
597
- // detected WSL distro is an advisory note only (the official menu lists both
598
- // side by side, so our picker must not be stricter); the digest gate is the
599
- // only hard no: an unverified payload simply does not run.
600
- let payloadBash;
601
- const payloadSuppressed = false;
602
- if (config.enablePosixPayload === true && process.platform === "win32") {
603
- const outcome = resolvePayloadBash({ payloadBashPath: config.payloadPosixPath ?? "" });
604
- if (outcome.engaged)
605
- payloadBash = outcome.bashPath;
606
- for (const note of outcome.notes)
607
- ctx.logger?.warn?.(`dsh-bash-terminal-ts: ${note}`);
608
- }
609
- const paths = resolveAllPaths(config, process.env, payloadBash);
582
+ const paths = resolveAllPaths(config, process.env);
610
583
  // 0.1.7: `defaultShell` is a `.volatile()` config field — the loader hands
611
584
  // `apply` a live ref and the latest value is resolved on every read; there
612
585
  // is no settings registration call anymore (removed with the 0.1.7 host).
@@ -650,8 +623,6 @@ export function apply(ctx, config = {}) {
650
623
  return read(config.shellMsys2, true);
651
624
  if (shell === "wsl")
652
625
  return read(config.shellWsl, true);
653
- if (shell === "payload")
654
- return read(config.shellPayload, false);
655
626
  if (shell === "niu")
656
627
  return read(config.shellNiu, true);
657
628
  return false;
@@ -681,7 +652,6 @@ export function apply(ctx, config = {}) {
681
652
  config: config,
682
653
  paths,
683
654
  configuredShell: storedShell,
684
- payloadSuppressed: () => payloadSuppressed,
685
655
  persist: async (svc, path, value) => {
686
656
  await persistConfigValue(svc, path, value);
687
657
  // ≤0.1.6 hosts have no config hot-reload, so mirror a defaultShell write into
package/lib/locales.js CHANGED
@@ -24,7 +24,6 @@ const zh = {
24
24
  "dock.state.available": "可用",
25
25
  "dock.state.notInstalled": "未探测到",
26
26
  "dock.state.wslPreferred": "已检测到 WSL 发行版(优先用 WSL bash)",
27
- "shell.payload": "POSIX payload",
28
27
  "shell.niu": "Niubash",
29
28
  "dock.state.noDistro": "无已安装发行版",
30
29
  "dock.state.launcherOnly": "只找到启动器,无法内嵌",
@@ -72,7 +71,6 @@ const en = {
72
71
  "dock.state.available": "Available",
73
72
  "dock.state.notInstalled": "Not found",
74
73
  "dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
75
- "shell.payload": "POSIX payload",
76
74
  "shell.niu": "Niubash",
77
75
  "dock.state.noDistro": "No distro installed",
78
76
  "dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
@@ -120,7 +118,6 @@ const ja = {
120
118
  "dock.state.available": "利用可",
121
119
  "dock.state.notInstalled": "見つかりません",
122
120
  "dock.state.wslPreferred": "WSL ディストリ検出済み(WSL bash 優先)",
123
- "shell.payload": "POSIX payload",
124
121
  "shell.niu": "Niubash",
125
122
  "dock.state.noDistro": "インストール済みディストリビューションなし",
126
123
  "dock.state.launcherOnly": "ランチャーのみ検出、埋め込み不可",
@@ -168,7 +165,6 @@ const ko = {
168
165
  "dock.state.available": "사용 가능",
169
166
  "dock.state.notInstalled": "탐지되지 않음",
170
167
  "dock.state.wslPreferred": "WSL 배포판 감지됨 (WSL bash 우선)",
171
- "shell.payload": "POSIX payload",
172
168
  "shell.niu": "Niubash",
173
169
  "dock.state.noDistro": "설치된 배포판 없음",
174
170
  "dock.state.launcherOnly": "런처만 발견되어 내장할 수 없음",
@@ -216,7 +212,6 @@ const fr = {
216
212
  "dock.state.available": "Disponible",
217
213
  "dock.state.notInstalled": "Non détecté",
218
214
  "dock.state.wslPreferred": "Distro WSL détectée (bash WSL préféré)",
219
- "shell.payload": "POSIX payload",
220
215
  "shell.niu": "Niubash",
221
216
  "dock.state.noDistro": "Aucune distribution installée",
222
217
  "dock.state.launcherOnly": "Seuls des lanceurs ont été trouvés; intégration impossible",
@@ -264,7 +259,6 @@ const de = {
264
259
  "dock.state.available": "Verfügbar",
265
260
  "dock.state.notInstalled": "Nicht gefunden",
266
261
  "dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
267
- "shell.payload": "POSIX payload",
268
262
  "shell.niu": "Niubash",
269
263
  "dock.state.noDistro": "Keine Distribution installiert",
270
264
  "dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht möglich",
@@ -312,7 +306,6 @@ const it = {
312
306
  "dock.state.available": "Disponibile",
313
307
  "dock.state.notInstalled": "Non trovato",
314
308
  "dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
315
- "shell.payload": "POSIX payload",
316
309
  "shell.niu": "Niubash",
317
310
  "dock.state.noDistro": "Nessuna distribuzione installata",
318
311
  "dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
@@ -360,7 +353,6 @@ const ru = {
360
353
  "dock.state.available": "Доступен",
361
354
  "dock.state.notInstalled": "Не найден",
362
355
  "dock.state.wslPreferred": "Обнаружен дистрибутив WSL (предпочтительнее WSL bash)",
363
- "shell.payload": "POSIX payload",
364
356
  "shell.niu": "Niubash",
365
357
  "dock.state.noDistro": "Нет установленных дистрибутивов",
366
358
  "dock.state.launcherOnly": "Найден только лаунчер, встраивание невозможно",
@@ -408,7 +400,6 @@ const es = {
408
400
  "dock.state.available": "Disponible",
409
401
  "dock.state.notInstalled": "No detectado",
410
402
  "dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
411
- "shell.payload": "POSIX payload",
412
403
  "shell.niu": "Niubash",
413
404
  "dock.state.noDistro": "Sin distribución instalada",
414
405
  "dock.state.launcherOnly": "Solo se encontró un lanzador; no se puede incrustar",
@@ -456,7 +447,6 @@ const pt = {
456
447
  "dock.state.available": "Disponível",
457
448
  "dock.state.notInstalled": "Não detectado",
458
449
  "dock.state.wslPreferred": "Distro WSL detectada (bash do WSL preferido)",
459
- "shell.payload": "POSIX payload",
460
450
  "shell.niu": "Niubash",
461
451
  "dock.state.noDistro": "Nenhuma distribuição instalada",
462
452
  "dock.state.launcherOnly": "Apenas um lançador foi encontrado; não é possível incorporá-lo",
package/lib/shell-id.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- /** The five backends, in catalog order (`payload` = the pinned POSIX runtime). */
2
- export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload" | "niu";
1
+ /** The five backends, in catalog order. */
2
+ export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "niu";
package/lib/shells.d.ts CHANGED
@@ -2,12 +2,10 @@ import type { ResolvedPaths } from "./dsh-types.js";
2
2
  import type { ShellId } from "./shell-id.js";
3
3
  /** Re-exported so existing importers keep working (see shell-id.ts for why). */
4
4
  export type { ShellId };
5
- /** Catalog order = fallback order: powershell is BOTH first choice and floor. The
6
- * pinned POSIX payload sits last: it only earns a seat when the machine's own
7
- * shells are absent, and a detected WSL distro vetoes it before that. */
5
+ /** Catalog order = fallback order: powershell is BOTH first choice and floor. */
8
6
  export declare const SHELL_PRIORITY: readonly ShellId[];
9
7
  /** Why one backend is not launchable (drives the settings-row badge). */
10
- export type ShellUnavailable = "installed" | "not-installed" | "no-distro" | "launcher-only" | "wsl-preferred";
8
+ export type ShellUnavailable = "installed" | "not-installed" | "no-distro" | "launcher-only";
11
9
  /** One catalog row: what the UI shows and what the host would spawn. */
12
10
  export interface ShellEntry {
13
11
  readonly id: ShellId;
@@ -30,7 +28,6 @@ export interface ShellSwitches {
30
28
  msys2: boolean;
31
29
  wsl: boolean;
32
30
  niu: boolean;
33
- payload: boolean;
34
31
  }
35
32
  /** Everything the catalog builder needs from the outside world. */
36
33
  export interface CatalogFacts {
@@ -44,12 +41,6 @@ export interface CatalogFacts {
44
41
  switches: ShellSwitches;
45
42
  /** WSL distro override from config ('' = the WSL default). */
46
43
  wslDistro: string;
47
- /**
48
- * True when the payload gate was vetoed by a positively-detected WSL distro
49
- * (a real Linux bash outranks the MSYS payload). It only colors the payload
50
- * row's badge when no payload path resolved - "why" information, not a gate.
51
- */
52
- payloadSuppressed?: boolean;
53
44
  }
54
45
  /**
55
46
  * `<SystemRoot>\System32\bash.exe` (and the sysnative mirror) is the deprecated
package/lib/shells.js CHANGED
@@ -15,10 +15,8 @@
15
15
  //
16
16
  // Everything here is pure: no fs, no child_process, no module-level cache. The
17
17
  // caller injects `fsProbe` / `distros` and owns the TTL.
18
- /** Catalog order = fallback order: powershell is BOTH first choice and floor. The
19
- * pinned POSIX payload sits last: it only earns a seat when the machine's own
20
- * shells are absent, and a detected WSL distro vetoes it before that. */
21
- export const SHELL_PRIORITY = ["powershell", "gitbash", "msys2", "wsl", "niu", "payload"];
18
+ /** Catalog order = fallback order: powershell is BOTH first choice and floor. */
19
+ export const SHELL_PRIORITY = ["powershell", "gitbash", "msys2", "wsl", "niu"];
22
20
  /** Display labels. The catalog id/label pair is DECIDED BY THIS TABLE. */
23
21
  const LABELS = {
24
22
  powershell: "PowerShell",
@@ -26,7 +24,6 @@ const LABELS = {
26
24
  msys2: "MSYS2",
27
25
  wsl: "WSL bash",
28
26
  niu: "Niubash",
29
- payload: "POSIX payload",
30
27
  };
31
28
  /**
32
29
  * `<SystemRoot>\System32\bash.exe` (and the sysnative mirror) is the deprecated
@@ -67,10 +64,6 @@ export function uiArgv(shell, paths, wslDistro = "") {
67
64
  return [requirePath(paths.gitbash, shell), "-i"];
68
65
  case "msys2":
69
66
  return [requirePath(paths.msys2, shell), "-l"];
70
- case "payload":
71
- // The payload is a Git-for-Windows tree: the interactive rules are the
72
- // gitbash ones (an interactive non-login shell; its /etc still works).
73
- return [requirePath(paths.payload, shell), "-i"];
74
67
  case "niu":
75
68
  // Interactive non-login: niu reads ~/.niubashrc (its only Windows
76
69
  // startup file), so the user's prompt and colours survive.
@@ -114,12 +107,9 @@ function probe(id, facts) {
114
107
  const path = id === "powershell" ? facts.paths.pwsh
115
108
  : id === "gitbash" ? facts.paths.gitbash
116
109
  : id === "msys2" ? facts.paths.msys2
117
- : id === "payload" ? facts.paths.payload
118
- : id === "niu" ? facts.paths.niu
119
- : facts.paths.wsl;
110
+ : id === "niu" ? facts.paths.niu
111
+ : facts.paths.wsl;
120
112
  if (path === undefined || path.length === 0) {
121
- if (id === "payload" && facts.payloadSuppressed === true)
122
- return { available: false, reason: "wsl-preferred" };
123
113
  return { available: false, reason: "not-installed" };
124
114
  }
125
115
  // A configured path is honoured, but a launcher is not a shell: trusting the
package/lib/terminal.js CHANGED
@@ -49,7 +49,6 @@ export function terminalArgv(shell, paths, distro) {
49
49
  switch (shell) {
50
50
  case "powershell": return [paths.pwsh, "-NoLogo", "-NoProfile"];
51
51
  case "gitbash": return [paths.gitbash, "-i"];
52
- case "payload": return [paths.payload, "-i"];
53
52
  case "niu":
54
53
  // Interactive non-login: reads ~/.niubashrc (the only startup file niu
55
54
  // reads on Windows), keeps the user's prompt and colours.
@@ -16,8 +16,6 @@ export interface CatalogSource {
16
16
  paths(): ResolvedPaths;
17
17
  switches(): ShellSwitches;
18
18
  wslDistro(): string;
19
- /** Why the payload row has no path: vetoed by a detected WSL distro. */
20
- payloadSuppressed(): boolean;
21
19
  /** Cached distro list; undefined means "unknown", [] means "none installed". */
22
20
  distros(): readonly string[] | undefined;
23
21
  }