dsh-bash-terminal-ts 0.8.8 → 0.9.1

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 (52) hide show
  1. package/CHANGELOG.md +205 -190
  2. package/CHANGELOG.pt.md +151 -0
  3. package/README.de.md +1 -1
  4. package/README.en.md +3 -2
  5. package/README.es.md +1 -1
  6. package/README.fr.md +1 -1
  7. package/README.it.md +1 -1
  8. package/README.md +4 -3
  9. package/README.pt.md +212 -0
  10. package/README.ru.md +1 -1
  11. package/agent-presets/README.md +171 -170
  12. package/agent-presets/install-presets.mjs +180 -179
  13. package/agent-presets/standard-win-niu/agent.cordis.yml +271 -0
  14. package/agent-presets/standard-win-niu/preset.yml +2 -0
  15. package/cordis.patch.yml +84 -83
  16. package/dist/client.core.js +59 -2
  17. package/dist/client.js +59 -2
  18. package/docs/dsh-plugin-development.md +169 -0
  19. package/docs/niu-backend.md +197 -0
  20. package/dsh.plugin.json +4 -3
  21. package/lib/client.js +59 -2
  22. package/lib/dsh-types.d.ts +14 -2
  23. package/lib/index.d.ts +15 -2
  24. package/lib/index.js +43 -5
  25. package/lib/locales.js +59 -2
  26. package/lib/shell-id.d.ts +1 -1
  27. package/lib/shells.d.ts +1 -0
  28. package/lib/shells.js +8 -2
  29. package/lib/terminal.js +4 -0
  30. package/lib/webterminals/host.js +2 -2
  31. package/lib/webterminals/mount.js +1 -0
  32. package/locale/de.json +6 -6
  33. package/locale/en.json +6 -6
  34. package/locale/es.json +6 -6
  35. package/locale/fr.json +6 -6
  36. package/locale/it.json +6 -6
  37. package/locale/ja.json +6 -6
  38. package/locale/ko.json +6 -6
  39. package/locale/pt.json +6 -0
  40. package/locale/ru.json +6 -6
  41. package/locale/zh.json +6 -6
  42. package/package.json +153 -149
  43. package/scripts/check-artifacts.mjs +96 -96
  44. package/src/client.tsx +685 -685
  45. package/src/dsh-types.ts +332 -320
  46. package/src/index.ts +1316 -1275
  47. package/src/locales.ts +509 -452
  48. package/src/shell-id.ts +11 -11
  49. package/src/shells.ts +279 -272
  50. package/src/terminal.ts +616 -612
  51. package/src/webterminals/host.ts +361 -361
  52. package/src/webterminals/mount.ts +237 -236
package/lib/client.js CHANGED
@@ -6157,6 +6157,7 @@ var zh = {
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
6159
  "shell.payload": "POSIX payload",
6160
+ "shell.niu": "Niubash",
6160
6161
  "dock.state.noDistro": "\u65E0\u5DF2\u5B89\u88C5\u53D1\u884C\u7248",
6161
6162
  "dock.state.launcherOnly": "\u53EA\u627E\u5230\u542F\u52A8\u5668\uFF0C\u65E0\u6CD5\u5185\u5D4C",
6162
6163
  "dock.powershell.locked": "PowerShell \u662F\u4FDD\u5E95\u540E\u7AEF\uFF0C\u65E0\u6CD5\u5173\u95ED\u3002",
@@ -6204,6 +6205,7 @@ var en = {
6204
6205
  "dock.state.notInstalled": "Not found",
6205
6206
  "dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
6206
6207
  "shell.payload": "POSIX payload",
6208
+ "shell.niu": "Niubash",
6207
6209
  "dock.state.noDistro": "No distro installed",
6208
6210
  "dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
6209
6211
  "dock.powershell.locked": "PowerShell is the fallback backend and cannot be turned off.",
@@ -6251,6 +6253,7 @@ var ja = {
6251
6253
  "dock.state.notInstalled": "\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
6252
6254
  "dock.state.wslPreferred": "WSL \u30C7\u30A3\u30B9\u30C8\u30EA\u691C\u51FA\u6E08\u307F\uFF08WSL bash \u512A\u5148\uFF09",
6253
6255
  "shell.payload": "POSIX payload",
6256
+ "shell.niu": "Niubash",
6254
6257
  "dock.state.noDistro": "\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u6E08\u307F\u30C7\u30A3\u30B9\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306A\u3057",
6255
6258
  "dock.state.launcherOnly": "\u30E9\u30F3\u30C1\u30E3\u30FC\u306E\u307F\u691C\u51FA\u3001\u57CB\u3081\u8FBC\u307F\u4E0D\u53EF",
6256
6259
  "dock.powershell.locked": "PowerShell \u306F\u6700\u5F8C\u306E\u4EE3\u66FF\u306E\u305F\u3081\u7121\u52B9\u5316\u3067\u304D\u307E\u305B\u3093\u3002",
@@ -6298,6 +6301,7 @@ var ko = {
6298
6301
  "dock.state.notInstalled": "\uD0D0\uC9C0\uB418\uC9C0 \uC54A\uC74C",
6299
6302
  "dock.state.wslPreferred": "WSL \uBC30\uD3EC\uD310 \uAC10\uC9C0\uB428 (WSL bash \uC6B0\uC120)",
6300
6303
  "shell.payload": "POSIX payload",
6304
+ "shell.niu": "Niubash",
6301
6305
  "dock.state.noDistro": "\uC124\uCE58\uB41C \uBC30\uD3EC\uD310 \uC5C6\uC74C",
6302
6306
  "dock.state.launcherOnly": "\uB7F0\uCC98\uB9CC \uBC1C\uACAC\uB418\uC5B4 \uB0B4\uC7A5\uD560 \uC218 \uC5C6\uC74C",
6303
6307
  "dock.powershell.locked": "PowerShell\uC740 \uCD5C\uC885 \uB300\uCCB4 \uD56D\uBAA9\uC774\uBBC0\uB85C \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
@@ -6345,6 +6349,7 @@ var fr = {
6345
6349
  "dock.state.notInstalled": "Non d\xE9tect\xE9",
6346
6350
  "dock.state.wslPreferred": "Distro WSL d\xE9tect\xE9e (bash WSL pr\xE9f\xE9r\xE9)",
6347
6351
  "shell.payload": "POSIX payload",
6352
+ "shell.niu": "Niubash",
6348
6353
  "dock.state.noDistro": "Aucune distribution install\xE9e",
6349
6354
  "dock.state.launcherOnly": "Seuls des lanceurs ont \xE9t\xE9 trouv\xE9s; int\xE9gration impossible",
6350
6355
  "dock.powershell.locked": "PowerShell sert de repli final et ne peut pas \xEAtre d\xE9sactiv\xE9.",
@@ -6392,6 +6397,7 @@ var de = {
6392
6397
  "dock.state.notInstalled": "Nicht gefunden",
6393
6398
  "dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
6394
6399
  "shell.payload": "POSIX payload",
6400
+ "shell.niu": "Niubash",
6395
6401
  "dock.state.noDistro": "Keine Distribution installiert",
6396
6402
  "dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht m\xF6glich",
6397
6403
  "dock.powershell.locked": "PowerShell ist die letzte R\xFCckfallm\xF6glichkeit und kann nicht deaktiviert werden.",
@@ -6439,6 +6445,7 @@ var it = {
6439
6445
  "dock.state.notInstalled": "Non trovato",
6440
6446
  "dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
6441
6447
  "shell.payload": "POSIX payload",
6448
+ "shell.niu": "Niubash",
6442
6449
  "dock.state.noDistro": "Nessuna distribuzione installata",
6443
6450
  "dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
6444
6451
  "dock.powershell.locked": "PowerShell \xE8 il ripiego finale e non pu\xF2 essere disattivato.",
@@ -6486,6 +6493,7 @@ var ru = {
6486
6493
  "dock.state.notInstalled": "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D",
6487
6494
  "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)",
6488
6495
  "shell.payload": "POSIX payload",
6496
+ "shell.niu": "Niubash",
6489
6497
  "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",
6490
6498
  "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",
6491
6499
  "dock.powershell.locked": "PowerShell \u2014 \u0440\u0435\u0437\u0435\u0440\u0432\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442, \u0435\u0433\u043E \u043D\u0435\u043B\u044C\u0437\u044F \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C.",
@@ -6533,6 +6541,7 @@ var es = {
6533
6541
  "dock.state.notInstalled": "No detectado",
6534
6542
  "dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
6535
6543
  "shell.payload": "POSIX payload",
6544
+ "shell.niu": "Niubash",
6536
6545
  "dock.state.noDistro": "Sin distribuci\xF3n instalada",
6537
6546
  "dock.state.launcherOnly": "Solo se encontr\xF3 un lanzador; no se puede incrustar",
6538
6547
  "dock.powershell.locked": "PowerShell es el respaldo final y no puede desactivarse.",
@@ -6566,7 +6575,55 @@ var es = {
6566
6575
  "tab.phase.exited": "terminado",
6567
6576
  "tab.phase.failed": "fall\xF3"
6568
6577
  };
6569
- var dictionaries = { zh, en, ja, ko, fr, de, it, ru, es };
6578
+ var pt = {
6579
+ "shell.title": "Terminal padr\xE3o",
6580
+ "shell.description": "Terminal usado pela ferramenta shell para executar comandos",
6581
+ "shell.powershell": "PowerShell",
6582
+ "shell.gitbash": "Git Bash",
6583
+ "shell.msys2": "MSYS2",
6584
+ "shell.wsl": "WSL",
6585
+ "shell.unavailable": "Configura\xE7\xE3o indispon\xEDvel: a ponte de configura\xE7\xE3o do host n\xE3o respondeu (verifique se o host \xE9 a linha compat)",
6586
+ "dock.title": "Terminal inferior",
6587
+ "dock.hint": "Essas chaves valem tanto para o terminal do painel inferior quanto para os backends selecion\xE1veis da ferramenta shell (PowerShell \xE9 o piso, sempre dispon\xEDvel). O terminal oficial da coluna direita n\xE3o muda.",
6588
+ "dock.state.available": "Dispon\xEDvel",
6589
+ "dock.state.notInstalled": "N\xE3o detectado",
6590
+ "dock.state.wslPreferred": "Distro WSL detectada (bash do WSL preferido)",
6591
+ "shell.payload": "POSIX payload",
6592
+ "shell.niu": "Niubash",
6593
+ "dock.state.noDistro": "Nenhuma distribui\xE7\xE3o instalada",
6594
+ "dock.state.launcherOnly": "Apenas um lan\xE7ador foi encontrado; n\xE3o \xE9 poss\xEDvel incorpor\xE1-lo",
6595
+ "dock.powershell.locked": "PowerShell \xE9 o backend de \xFAltimo recurso e n\xE3o pode ser desativado.",
6596
+ "dock.defaultChoice": "Shell padr\xE3o (apenas as ativas e dispon\xEDveis aparecem na lista)",
6597
+ "dock.wslDistro": "Distribui\xE7\xE3o WSL (vazio usa a padr\xE3o do WSL)",
6598
+ "dock.fallback.notice": "{from} n\xE3o est\xE1 dispon\xEDvel agora; este terminal foi iniciado com {to}.",
6599
+ "dock.floor.notice": "Todas as shells est\xE3o desativadas ou indispon\xEDveis; {to} foi usado como \xFAltimo recurso.",
6600
+ "dock.unavailable.noPty": "Nenhum backend PTY dispon\xEDvel neste computador: o node-pty n\xE3o foi compilado e o host n\xE3o exp\xF5e a costura de terminal (execute pnpm approve-builds).",
6601
+ "dock.unavailable.noSocket": "O host n\xE3o exp\xF5e um canal de upgrade de WebSocket; o terminal inferior n\xE3o recebe sa\xEDda.",
6602
+ "dock.unavailable.notInstalled": "O host ainda n\xE3o montou as rotas de terminal; o terminal inferior est\xE1 indispon\xEDvel.",
6603
+ "dock.hostProvided": "O terminal do host est\xE1 no comando; este plugin se colocou de lado.",
6604
+ "dock.applying": "Salvando\u2026",
6605
+ "dock.failed": "Falha ao gravar: {message}",
6606
+ "dock.terminals": "{count} terminal(is) em execu\xE7\xE3o",
6607
+ "dock.refresh": "Redetectar",
6608
+ "dock.enabled.title": "Ativar o terminal inferior",
6609
+ "dock.enabled.description": "Chave geral: desligada oculta as subchaves das shells e recusa aloca\xE7\xF5es",
6610
+ "dock.enabled.off": "Desligado. As subchaves das shells dispon\xEDveis aparecem ao lig\xE1-lo",
6611
+ "dock.shim.title": "Assumir a linha do terminal oficial",
6612
+ "dock.shim.description": "Ative apenas se o host n\xE3o tem controlador de terminal. Publicar duas vezes o mesmo servi\xE7o faz o outro provedor falhar; desligado por padr\xE3o.",
6613
+ "dock.shim.published": "Assumida: a linha \xABTerminal\xBB oficial agora \xE9 alimentada por este plugin",
6614
+ "dock.shim.hostProvides": "O host j\xE1 publica webTerminals; nada foi assumido (a linha oficial j\xE1 funciona)",
6615
+ "dock.state.floor": "\xFAltimo recurso",
6616
+ "tab.title": "Terminal (multi-shell)",
6617
+ "tab.description": "Abre Git Bash / MSYS2 / WSL / PowerShell sobre o backend PTY deste plugin, ao lado do terminal oficial",
6618
+ "tab.new": "Novo",
6619
+ "tab.noShell": "Nenhuma shell dispon\xEDvel (ative uma nos ajustes)",
6620
+ "tab.phase.allocating": "alocando",
6621
+ "tab.phase.connecting": "conectando",
6622
+ "tab.phase.running": "em execu\xE7\xE3o",
6623
+ "tab.phase.exited": "encerrado",
6624
+ "tab.phase.failed": "falhou"
6625
+ };
6626
+ var dictionaries = { zh, en, ja, ko, fr, de, it, ru, es, pt };
6570
6627
  var fallbackDict = { ...zh };
6571
6628
 
6572
6629
  // src/browser-i18n.ts
@@ -7698,7 +7755,7 @@ function MultiShellTerminal(props) {
7698
7755
  // src/client.tsx
7699
7756
  var import_jsx_runtime3 = require("react/jsx-runtime");
7700
7757
  var SETTINGS_NS = "settings.bash-terminal";
7701
- var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload"];
7758
+ var SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
7702
7759
  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}";
7703
7760
  if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
7704
7761
  const tag = document.createElement("style");
@@ -1,5 +1,15 @@
1
- /** The terminal backends this plugin exposes. */
2
- export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload";
1
+ /**
2
+ * The terminal backends this plugin exposes.
3
+ *
4
+ * Re-exported from `./shell-id.js` rather than declared here: the browser graph
5
+ * needs the same union (socket frames, catalog rows) and `shell-id.ts` is the one
6
+ * module with no Node references, so it is the single source of truth. Declaring
7
+ * a second copy here is how `niu` shipped in the union the catalog reads while
8
+ * `SHELL_DESCRIPTIONS` stayed five-keyed - a drift the compiler cannot see,
9
+ * because `Record<ShellId, string>` only complains in the module that owns the
10
+ * wider union.
11
+ */
12
+ export type { ShellId } from "./shell-id.js";
3
13
  /** Permissive node of the DSH JSON-schema dialect used in tool output declarations. */
4
14
  export interface JsonSchemaNode {
5
15
  type?: string;
@@ -177,6 +187,8 @@ export interface ResolvedPaths {
177
187
  wsl?: string;
178
188
  /** The digest-verified pinned POSIX runtime payload (see src/payload.ts). */
179
189
  payload?: string;
190
+ /** Niubash (native bash reimplementation); see candidateNiuPaths in index.ts. */
191
+ niu?: string;
180
192
  }
181
193
  export interface CollectSpec {
182
194
  maxBytes: number;
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"];
7
+ export declare const SHELLS: readonly ["powershell", "gitbash", "msys2", "wsl", "payload", "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. */
@@ -64,6 +64,10 @@ export interface ConfigValues {
64
64
  enablePosixPayload: boolean;
65
65
  /** Explicit payload root or bin/bash.exe path; '' = auto-discovery only. */
66
66
  payloadPosixPath: string;
67
+ /** Fixed niu.exe path; '' = auto-discovery via candidateNiuPaths. */
68
+ niuPath: string;
69
+ /** Activation switch for the Niubash row (default true: detected means on). */
70
+ shellNiu: boolean;
67
71
  }
68
72
  /** Runtime configuration schema. */
69
73
  export declare const Config: import("./dsh.js").SchemasterySchema;
@@ -91,10 +95,19 @@ export declare function candidateGitBashPaths(env?: NodeJS.ProcessEnv): string[]
91
95
  * under the DSH Windows ACL restricted-token sandbox.
92
96
  */
93
97
  export declare function candidateMsys2Paths(env?: NodeJS.ProcessEnv): string[];
98
+ /**
99
+ * Niubash locations, in preference order: the per-user installer default
100
+ * (LOCALAPPDATA\Programs\Niubash) first, then the winget shim link, then a
101
+ * machine-wide install, then PATH entries. Read from the registry on this
102
+ * machine: the installer writes a USER Path entry pointing at the capitalized
103
+ * directory, so the first candidate must match that exact casing on
104
+ * case-sensitive filesystems (Windows itself is case-insensitive).
105
+ */
106
+ export declare function candidateNiuPaths(env?: NodeJS.ProcessEnv): string[];
94
107
  export declare function defaultWslPath(env?: NodeJS.ProcessEnv): string;
95
108
  /** Executable paths, possibly undefined when a backend is not installed. */
96
109
  export type { ResolvedPaths };
97
- type PathConfig = Partial<Pick<ConfigValues, "pwshPath" | "gitBashPath" | "msys2Path" | "wslPath">>;
110
+ type PathConfig = Partial<Pick<ConfigValues, "pwshPath" | "gitBashPath" | "msys2Path" | "wslPath" | "niuPath">>;
98
111
  export declare function resolveAllPaths(config?: PathConfig, env?: NodeJS.ProcessEnv, payloadBash?: string): ResolvedPaths;
99
112
  export declare function buildArgv(shell: string, command: string, paths: ResolvedPaths, distro?: string): Array<string | undefined>;
100
113
  /**
package/lib/index.js CHANGED
@@ -34,7 +34,7 @@ const ENTRY_ID = "tool-bash-terminal";
34
34
  /** Services required before the tool can register. */
35
35
  export const inject = ["tools", "systemPrompt", "shellEnv", "subprocess", "settings", "sandbox", "sandboxPolicy"];
36
36
  /** The terminal backends this tool exposes, in catalog order. */
37
- export const SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload"];
37
+ export const SHELLS = ["powershell", "gitbash", "msys2", "wsl", "payload", "niu"];
38
38
  /** The backend used when the caller does not name one. */
39
39
  export const DEFAULT_SHELL = "powershell";
40
40
  /** Default per-command timeout (ms). */
@@ -78,7 +78,9 @@ export const Config = z.object({
78
78
  // Payload gate state is read once per process (paths resolve at startup), so
79
79
  // these are deliberately NOT volatile: a flip needs the restart it implies.
80
80
  enablePosixPayload: z.boolean().default(false),
81
- payloadPosixPath: z.string().default("")
81
+ payloadPosixPath: z.string().default(""),
82
+ niuPath: z.string().default(""),
83
+ shellNiu: z.boolean().default(true).volatile()
82
84
  });
83
85
  // ---- executable resolution ------------------------------------------------
84
86
  function candidateExists(candidate) {
@@ -167,6 +169,31 @@ export function candidateMsys2Paths(env = process.env) {
167
169
  candidates.push("C:\\msys64\\msys2.exe"); // last resort: see the note above
168
170
  return candidates;
169
171
  }
172
+ /**
173
+ * Niubash locations, in preference order: the per-user installer default
174
+ * (LOCALAPPDATA\Programs\Niubash) first, then the winget shim link, then a
175
+ * machine-wide install, then PATH entries. Read from the registry on this
176
+ * machine: the installer writes a USER Path entry pointing at the capitalized
177
+ * directory, so the first candidate must match that exact casing on
178
+ * case-sensitive filesystems (Windows itself is case-insensitive).
179
+ */
180
+ export function candidateNiuPaths(env = process.env) {
181
+ const localAppData = env.LOCALAPPDATA ?? "";
182
+ const programFiles = env.ProgramFiles ?? "C:\\Program Files";
183
+ const candidates = [];
184
+ if (localAppData.length > 0) {
185
+ candidates.push(join(localAppData, "Programs", "Niubash", "niu.exe"));
186
+ candidates.push(join(localAppData, "Microsoft", "WinGet", "Links", "niu.exe"));
187
+ }
188
+ candidates.push(join(programFiles, "Niubash", "niu.exe"));
189
+ for (const entry of (env.PATH ?? "").split(";")) {
190
+ const trimmed = entry.trim().replace(/^"|"$/g, "");
191
+ if (trimmed.length === 0)
192
+ continue;
193
+ candidates.push(join(trimmed, "niu.exe"));
194
+ }
195
+ return candidates;
196
+ }
170
197
  export function defaultWslPath(env = process.env) {
171
198
  const systemRoot = env.SystemRoot ?? "C:\\Windows";
172
199
  return join(systemRoot, "System32", "wsl.exe");
@@ -184,10 +211,13 @@ export function resolveAllPaths(config = {}, env = process.env, payloadBash) {
184
211
  const wsl = config.wslPath && config.wslPath.trim().length > 0
185
212
  ? config.wslPath
186
213
  : defaultWslPath(env);
214
+ const niu = config.niuPath && config.niuPath.trim().length > 0
215
+ ? config.niuPath
216
+ : resolveFromCandidates(candidateNiuPaths(env));
187
217
  // The payload is its OWN backend (first-class catalog row) - it never
188
218
  // silently substitutes for the gitbash slot, so a row labelled "Git Bash"
189
219
  // always names a shell the machine actually has.
190
- return { pwsh, gitbash, msys2, wsl, ...(payloadBash !== undefined ? { payload: payloadBash } : {}) };
220
+ return { pwsh, gitbash, msys2, wsl, niu, ...(payloadBash !== undefined ? { payload: payloadBash } : {}) };
191
221
  }
192
222
  // ---- argv / env construction ------------------------------------------------
193
223
  export function buildArgv(shell, command, paths, distro) {
@@ -205,6 +235,11 @@ export function buildArgv(shell, command, paths, distro) {
205
235
  // Same login-shell rule as msys2/gitbash: the payload is a
206
236
  // Git-for-Windows tree and `-lc` is what gives it a usable PATH.
207
237
  return [paths.payload, "-lc", command];
238
+ case "niu":
239
+ // Same login-shell rule: -lc sources the profile chain so winuxcmd's
240
+ // bin directory joins PATH. (niu has no MSYS runtime; see findings F2
241
+ // for the sandbox question this backend answers.)
242
+ return [paths.niu, "-lc", command];
208
243
  case "wsl": {
209
244
  const distroArg = distro !== undefined && distro.trim().length > 0 ? ["-d", distro.trim()] : [];
210
245
  return [paths.wsl, ...distroArg, "-e", "bash", "-lc", command];
@@ -423,7 +458,8 @@ export const SHELL_DESCRIPTIONS = {
423
458
  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.",
424
459
  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.",
425
460
  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.",
426
- 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."
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
+ 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."
427
463
  };
428
464
  /**
429
465
  * Render the model-facing tool description for one backend. The backend is
@@ -438,7 +474,7 @@ export function toolDescription(backgroundEnabled, shell = DEFAULT_SHELL) {
438
474
  const base = [
439
475
  `The user's chosen default terminal (Settings -> General -> Default terminal) is ${active}; commands run there.`,
440
476
  lead,
441
- "Each call spawns a fresh shell: no state (cwd, variables, aliases) persists between calls - pass workdir instead of using cd. Non-zero exits are reported as [exit code: N] markers; investigate failures before moving on. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Commands run under the DSH sandbox: confined modes (read-only / workspace-write) are enforced through ctx.sandbox and deny fail-closed for PowerShell; danger-full-access, Git Bash, MSYS2, the pinned POSIX payload, and WSL run unconfined."
477
+ "Each call spawns a fresh shell: no state (cwd, variables, aliases) persists between calls - pass workdir instead of using cd. Non-zero exits are reported as [exit code: N] markers; investigate failures before moving on. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. Commands run under the DSH sandbox: confined modes (read-only / workspace-write) are enforced through ctx.sandbox and deny fail-closed for PowerShell; danger-full-access, Git Bash, MSYS2, the pinned POSIX payload, Niubash, and WSL run unconfined."
442
478
  ].join(" ");
443
479
  if (!backgroundEnabled)
444
480
  return base;
@@ -616,6 +652,8 @@ export function apply(ctx, config = {}) {
616
652
  return read(config.shellWsl, true);
617
653
  if (shell === "payload")
618
654
  return read(config.shellPayload, false);
655
+ if (shell === "niu")
656
+ return read(config.shellNiu, true);
619
657
  return false;
620
658
  };
621
659
  /**
package/lib/locales.js CHANGED
@@ -1,4 +1,4 @@
1
- // The client dictionary for the settings surface, all nine host languages.
1
+ // The client dictionary for the settings surface, all ten host languages.
2
2
  //
3
3
  // `zh` is the key source: every other language is typed `Record<keyof typeof zh,
4
4
  // string>`, so a missing or misspelled key is a compile error rather than a
@@ -25,6 +25,7 @@ const zh = {
25
25
  "dock.state.notInstalled": "未探测到",
26
26
  "dock.state.wslPreferred": "已检测到 WSL 发行版(优先用 WSL bash)",
27
27
  "shell.payload": "POSIX payload",
28
+ "shell.niu": "Niubash",
28
29
  "dock.state.noDistro": "无已安装发行版",
29
30
  "dock.state.launcherOnly": "只找到启动器,无法内嵌",
30
31
  "dock.powershell.locked": "PowerShell 是保底后端,无法关闭。",
@@ -72,6 +73,7 @@ const en = {
72
73
  "dock.state.notInstalled": "Not found",
73
74
  "dock.state.wslPreferred": "WSL distro detected (WSL bash preferred)",
74
75
  "shell.payload": "POSIX payload",
76
+ "shell.niu": "Niubash",
75
77
  "dock.state.noDistro": "No distro installed",
76
78
  "dock.state.launcherOnly": "Only a launcher was found; it cannot be embedded",
77
79
  "dock.powershell.locked": "PowerShell is the fallback backend and cannot be turned off.",
@@ -119,6 +121,7 @@ const ja = {
119
121
  "dock.state.notInstalled": "見つかりません",
120
122
  "dock.state.wslPreferred": "WSL ディストリ検出済み(WSL bash 優先)",
121
123
  "shell.payload": "POSIX payload",
124
+ "shell.niu": "Niubash",
122
125
  "dock.state.noDistro": "インストール済みディストリビューションなし",
123
126
  "dock.state.launcherOnly": "ランチャーのみ検出、埋め込み不可",
124
127
  "dock.powershell.locked": "PowerShell は最後の代替のため無効化できません。",
@@ -166,6 +169,7 @@ const ko = {
166
169
  "dock.state.notInstalled": "탐지되지 않음",
167
170
  "dock.state.wslPreferred": "WSL 배포판 감지됨 (WSL bash 우선)",
168
171
  "shell.payload": "POSIX payload",
172
+ "shell.niu": "Niubash",
169
173
  "dock.state.noDistro": "설치된 배포판 없음",
170
174
  "dock.state.launcherOnly": "런처만 발견되어 내장할 수 없음",
171
175
  "dock.powershell.locked": "PowerShell은 최종 대체 항목이므로 끌 수 없습니다.",
@@ -213,6 +217,7 @@ const fr = {
213
217
  "dock.state.notInstalled": "Non détecté",
214
218
  "dock.state.wslPreferred": "Distro WSL détectée (bash WSL préféré)",
215
219
  "shell.payload": "POSIX payload",
220
+ "shell.niu": "Niubash",
216
221
  "dock.state.noDistro": "Aucune distribution installée",
217
222
  "dock.state.launcherOnly": "Seuls des lanceurs ont été trouvés; intégration impossible",
218
223
  "dock.powershell.locked": "PowerShell sert de repli final et ne peut pas être désactivé.",
@@ -260,6 +265,7 @@ const de = {
260
265
  "dock.state.notInstalled": "Nicht gefunden",
261
266
  "dock.state.wslPreferred": "WSL-Distro erkannt (WSL bash bevorzugt)",
262
267
  "shell.payload": "POSIX payload",
268
+ "shell.niu": "Niubash",
263
269
  "dock.state.noDistro": "Keine Distribution installiert",
264
270
  "dock.state.launcherOnly": "Nur Launcher gefunden; Einbettung nicht möglich",
265
271
  "dock.powershell.locked": "PowerShell ist die letzte Rückfallmöglichkeit und kann nicht deaktiviert werden.",
@@ -307,6 +313,7 @@ const it = {
307
313
  "dock.state.notInstalled": "Non trovato",
308
314
  "dock.state.wslPreferred": "Distro WSL rilevata (bash WSL preferito)",
309
315
  "shell.payload": "POSIX payload",
316
+ "shell.niu": "Niubash",
310
317
  "dock.state.noDistro": "Nessuna distribuzione installata",
311
318
  "dock.state.launcherOnly": "Trovato solo un launcher; incorporamento non possibile",
312
319
  "dock.powershell.locked": "PowerShell è il ripiego finale e non può essere disattivato.",
@@ -354,6 +361,7 @@ const ru = {
354
361
  "dock.state.notInstalled": "Не найден",
355
362
  "dock.state.wslPreferred": "Обнаружен дистрибутив WSL (предпочтительнее WSL bash)",
356
363
  "shell.payload": "POSIX payload",
364
+ "shell.niu": "Niubash",
357
365
  "dock.state.noDistro": "Нет установленных дистрибутивов",
358
366
  "dock.state.launcherOnly": "Найден только лаунчер, встраивание невозможно",
359
367
  "dock.powershell.locked": "PowerShell — резервный вариант, его нельзя отключить.",
@@ -401,6 +409,7 @@ const es = {
401
409
  "dock.state.notInstalled": "No detectado",
402
410
  "dock.state.wslPreferred": "Distro de WSL detectada (se prefiere bash de WSL)",
403
411
  "shell.payload": "POSIX payload",
412
+ "shell.niu": "Niubash",
404
413
  "dock.state.noDistro": "Sin distribución instalada",
405
414
  "dock.state.launcherOnly": "Solo se encontró un lanzador; no se puede incrustar",
406
415
  "dock.powershell.locked": "PowerShell es el respaldo final y no puede desactivarse.",
@@ -434,7 +443,55 @@ const es = {
434
443
  "tab.phase.exited": "terminado",
435
444
  "tab.phase.failed": "falló",
436
445
  };
446
+ const pt = {
447
+ "shell.title": "Terminal padrão",
448
+ "shell.description": "Terminal usado pela ferramenta shell para executar comandos",
449
+ "shell.powershell": "PowerShell",
450
+ "shell.gitbash": "Git Bash",
451
+ "shell.msys2": "MSYS2",
452
+ "shell.wsl": "WSL",
453
+ "shell.unavailable": "Configuração indisponível: a ponte de configuração do host não respondeu (verifique se o host é a linha compat)",
454
+ "dock.title": "Terminal inferior",
455
+ "dock.hint": "Essas chaves valem tanto para o terminal do painel inferior quanto para os backends selecionáveis da ferramenta shell (PowerShell é o piso, sempre disponível). O terminal oficial da coluna direita não muda.",
456
+ "dock.state.available": "Disponível",
457
+ "dock.state.notInstalled": "Não detectado",
458
+ "dock.state.wslPreferred": "Distro WSL detectada (bash do WSL preferido)",
459
+ "shell.payload": "POSIX payload",
460
+ "shell.niu": "Niubash",
461
+ "dock.state.noDistro": "Nenhuma distribuição instalada",
462
+ "dock.state.launcherOnly": "Apenas um lançador foi encontrado; não é possível incorporá-lo",
463
+ "dock.powershell.locked": "PowerShell é o backend de último recurso e não pode ser desativado.",
464
+ "dock.defaultChoice": "Shell padrão (apenas as ativas e disponíveis aparecem na lista)",
465
+ "dock.wslDistro": "Distribuição WSL (vazio usa a padrão do WSL)",
466
+ "dock.fallback.notice": "{from} não está disponível agora; este terminal foi iniciado com {to}.",
467
+ "dock.floor.notice": "Todas as shells estão desativadas ou indisponíveis; {to} foi usado como último recurso.",
468
+ "dock.unavailable.noPty": "Nenhum backend PTY disponível neste computador: o node-pty não foi compilado e o host não expõe a costura de terminal (execute pnpm approve-builds).",
469
+ "dock.unavailable.noSocket": "O host não expõe um canal de upgrade de WebSocket; o terminal inferior não recebe saída.",
470
+ "dock.unavailable.notInstalled": "O host ainda não montou as rotas de terminal; o terminal inferior está indisponível.",
471
+ "dock.hostProvided": "O terminal do host está no comando; este plugin se colocou de lado.",
472
+ "dock.applying": "Salvando…",
473
+ "dock.failed": "Falha ao gravar: {message}",
474
+ "dock.terminals": "{count} terminal(is) em execução",
475
+ "dock.refresh": "Redetectar",
476
+ "dock.enabled.title": "Ativar o terminal inferior",
477
+ "dock.enabled.description": "Chave geral: desligada oculta as subchaves das shells e recusa alocações",
478
+ "dock.enabled.off": "Desligado. As subchaves das shells disponíveis aparecem ao ligá-lo",
479
+ "dock.shim.title": "Assumir a linha do terminal oficial",
480
+ "dock.shim.description": "Ative apenas se o host não tem controlador de terminal. Publicar duas vezes o mesmo serviço faz o outro provedor falhar; desligado por padrão.",
481
+ "dock.shim.published": "Assumida: a linha «Terminal» oficial agora é alimentada por este plugin",
482
+ "dock.shim.hostProvides": "O host já publica webTerminals; nada foi assumido (a linha oficial já funciona)",
483
+ "dock.state.floor": "último recurso",
484
+ "tab.title": "Terminal (multi-shell)",
485
+ "tab.description": "Abre Git Bash / MSYS2 / WSL / PowerShell sobre o backend PTY deste plugin, ao lado do terminal oficial",
486
+ "tab.new": "Novo",
487
+ "tab.noShell": "Nenhuma shell disponível (ative uma nos ajustes)",
488
+ "tab.phase.allocating": "alocando",
489
+ "tab.phase.connecting": "conectando",
490
+ "tab.phase.running": "em execução",
491
+ "tab.phase.exited": "encerrado",
492
+ "tab.phase.failed": "falhou",
493
+ };
437
494
  /** The registered dictionary, one row per host language. */
438
- export const dictionaries = { zh, en, ja, ko, fr, de, it, ru, es };
495
+ export const dictionaries = { zh, en, ja, ko, fr, de, it, ru, es, pt };
439
496
  /** The Chinese fallback used when the host exposes no `locale.bind` (0.1.0/0.1.1). */
440
497
  export const fallbackDict = { ...zh };
package/lib/shell-id.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  /** The five backends, in catalog order (`payload` = the pinned POSIX runtime). */
2
- export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload";
2
+ export type ShellId = "powershell" | "gitbash" | "msys2" | "wsl" | "payload" | "niu";
package/lib/shells.d.ts CHANGED
@@ -29,6 +29,7 @@ export interface ShellSwitches {
29
29
  gitbash: boolean;
30
30
  msys2: boolean;
31
31
  wsl: boolean;
32
+ niu: boolean;
32
33
  payload: boolean;
33
34
  }
34
35
  /** Everything the catalog builder needs from the outside world. */
package/lib/shells.js CHANGED
@@ -18,13 +18,14 @@
18
18
  /** Catalog order = fallback order: powershell is BOTH first choice and floor. The
19
19
  * pinned POSIX payload sits last: it only earns a seat when the machine's own
20
20
  * shells are absent, and a detected WSL distro vetoes it before that. */
21
- export const SHELL_PRIORITY = ["powershell", "gitbash", "msys2", "wsl", "payload"];
21
+ export const SHELL_PRIORITY = ["powershell", "gitbash", "msys2", "wsl", "niu", "payload"];
22
22
  /** Display labels. The catalog id/label pair is DECIDED BY THIS TABLE. */
23
23
  const LABELS = {
24
24
  powershell: "PowerShell",
25
25
  gitbash: "Git Bash",
26
26
  msys2: "MSYS2",
27
27
  wsl: "WSL bash",
28
+ niu: "Niubash",
28
29
  payload: "POSIX payload",
29
30
  };
30
31
  /**
@@ -70,6 +71,10 @@ export function uiArgv(shell, paths, wslDistro = "") {
70
71
  // The payload is a Git-for-Windows tree: the interactive rules are the
71
72
  // gitbash ones (an interactive non-login shell; its /etc still works).
72
73
  return [requirePath(paths.payload, shell), "-i"];
74
+ case "niu":
75
+ // Interactive non-login: niu reads ~/.niubashrc (its only Windows
76
+ // startup file), so the user's prompt and colours survive.
77
+ return [requirePath(paths.niu, shell), "-i"];
73
78
  case "wsl": {
74
79
  const distro = wslDistro.trim();
75
80
  return distro.length > 0
@@ -110,7 +115,8 @@ function probe(id, facts) {
110
115
  : id === "gitbash" ? facts.paths.gitbash
111
116
  : id === "msys2" ? facts.paths.msys2
112
117
  : id === "payload" ? facts.paths.payload
113
- : facts.paths.wsl;
118
+ : id === "niu" ? facts.paths.niu
119
+ : facts.paths.wsl;
114
120
  if (path === undefined || path.length === 0) {
115
121
  if (id === "payload" && facts.payloadSuppressed === true)
116
122
  return { available: false, reason: "wsl-preferred" };
package/lib/terminal.js CHANGED
@@ -50,6 +50,10 @@ export function terminalArgv(shell, paths, distro) {
50
50
  case "powershell": return [paths.pwsh, "-NoLogo", "-NoProfile"];
51
51
  case "gitbash": return [paths.gitbash, "-i"];
52
52
  case "payload": return [paths.payload, "-i"];
53
+ case "niu":
54
+ // Interactive non-login: reads ~/.niubashrc (the only startup file niu
55
+ // reads on Windows), keeps the user's prompt and colours.
56
+ return [paths.niu, "-i"];
53
57
  case "msys2":
54
58
  // -l, NOT -lc: this argv carries no command (the PTY itself is the
55
59
  // session), and `bash -lc` with no operand dies immediately with
@@ -51,7 +51,7 @@ function num(value, fallback, max) {
51
51
  * persist nothing, and look fine in the settings page. Two spellings of one fact
52
52
  * always drift, so this table is the single place the name appears.
53
53
  */
54
- const SWITCH_FIELD = { gitbash: "shellGitBash", msys2: "shellMsys2", wsl: "shellWsl", payload: "shellPayload" };
54
+ const SWITCH_FIELD = { gitbash: "shellGitBash", msys2: "shellMsys2", wsl: "shellWsl", payload: "shellPayload", niu: "shellNiu" };
55
55
  /**
56
56
  * Register the terminal routes.
57
57
  * @param webServer - the host webserver (may lack upgrade support).
@@ -159,7 +159,7 @@ async function dispatch(body, deps) {
159
159
  const next = requested;
160
160
  // Persist first, then answer with a rebuilt catalog: a switch that cannot be
161
161
  // stored must not look applied in the settings row.
162
- for (const key of ["gitbash", "msys2", "wsl", "payload"]) {
162
+ for (const key of ["gitbash", "msys2", "wsl", "payload", "niu"]) {
163
163
  if (typeof next[key] === "boolean")
164
164
  await deps.writeConfig([SWITCH_FIELD[key]], next[key]);
165
165
  }
@@ -65,6 +65,7 @@ export function mountBrowserTerminals(input) {
65
65
  // Opt-in twice over: enablePosixPayload provisions the runtime, this
66
66
  // switch decides whether a provisioned payload may show in pickers.
67
67
  payload: readField("shellPayload", false),
68
+ niu: readField("shellNiu", true),
68
69
  });
69
70
  const wslDistro = () => readField("wslDistro", "").trim();
70
71
  /** The master switch: off hides the child switches and refuses allocations. */
package/locale/de.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Unteres Terminal",
4
- "description": "Shell-Werkzeug plus eingebettetes Terminal im unteren Dock (PowerShell / Git Bash / MSYS2 / WSL), mit Aktivierung pro Shell und Rückfallkette."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Unteres Terminal",
4
+ "description": "Shell-Werkzeug plus eingebettetes Terminal im unteren Dock (PowerShell / Git Bash / MSYS2 / WSL / Niubash), mit Aktivierung pro Shell und Rückfallkette."
5
+ }
6
+ }
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Bottom terminal",
4
- "description": "The shell tool plus an embedded terminal for the bottom dock (PowerShell / Git Bash / MSYS2 / WSL), with per-shell activation switches and a default-shell fallback chain."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Bottom terminal",
4
+ "description": "The shell tool plus an embedded terminal for the bottom dock (PowerShell / Git Bash / MSYS2 / WSL / Niubash), with per-shell activation switches and a default-shell fallback chain."
5
+ }
6
+ }
package/locale/es.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Terminal inferior",
4
- "description": "La herramienta shell y un terminal incrustado del panel inferior (PowerShell / Git Bash / MSYS2 / WSL), con activación por shell y cadena de sustitución."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Terminal inferior",
4
+ "description": "La herramienta shell y un terminal incrustado del panel inferior (PowerShell / Git Bash / MSYS2 / WSL / Niubash), con activación por shell y cadena de sustitución."
5
+ }
6
+ }
package/locale/fr.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Terminal inférieur",
4
- "description": "L'outil shell et un terminal intégré du dock bas (PowerShell / Git Bash / MSYS2 / WSL), avec activation par shell et chaîne de repli."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Terminal inférieur",
4
+ "description": "L'outil shell et un terminal intégré du dock bas (PowerShell / Git Bash / MSYS2 / WSL / Niubash), avec activation par shell et chaîne de repli."
5
+ }
6
+ }
package/locale/it.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "meta": {
3
- "title": "Terminale inferiore",
4
- "description": "Strumento shell e terminale incorporato del dock inferiore (PowerShell / Git Bash / MSYS2 / WSL), con attivazione per shell e catena di ripiego."
5
- }
6
- }
1
+ {
2
+ "meta": {
3
+ "title": "Terminale inferiore",
4
+ "description": "Strumento shell e terminale incorporato del dock inferiore (PowerShell / Git Bash / MSYS2 / WSL / Niubash), con attivazione per shell e catena di ripiego."
5
+ }
6
+ }