dsh-bash-terminal-ts 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +5 -5
- package/README.md +15 -15
- package/cordis.patch.yml +2 -2
- package/dist/client.core.js +1 -1
- package/dist/client.js +2 -2
- package/dsh.plugin.json +22 -22
- package/lib/client.js +2 -2
- package/lib/dsh-types.d.ts +1 -1
- package/lib/index.js +6 -6
- package/lib/terminal.js +1 -1
- package/package.json +119 -119
- package/scripts/build-client.mjs +2 -2
- package/src/client.tsx +2 -2
- package/src/dsh-types.ts +1 -1
- package/src/index.ts +6 -6
- package/src/terminal.ts +1 -1
package/README.en.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-bash-terminal
|
|
1
|
+
# dsh-bash-terminal-ts
|
|
2
2
|
|
|
3
3
|
> Community: [LINUX DO](https://linux.do) · [GitHub](https://github.com/drscrewdriver/dsh-bash-terminal-ts)
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ A DeepSeek Harness (DSH) plugin: one `shell` tool that runs commands through **P
|
|
|
10
10
|
>
|
|
11
11
|
> | Branch | DSH segment | Package name | Status |
|
|
12
12
|
> |--------|-------------|--------------|--------|
|
|
13
|
-
> | `ts/0.1.5` | 0.1.5-alpha.1 – 0.1.5-rc.x | `dsh-bash-terminal` | this branch; `build` / `unit` / `apply` / `client` / `terminal` green locally |
|
|
13
|
+
> | `ts/0.1.5` | 0.1.5-alpha.1 – 0.1.5-rc.x | `dsh-bash-terminal-ts` | this branch; `build` / `unit` / `apply` / `client` / `terminal` green locally |
|
|
14
14
|
> | `main` | 0.1.2-alpha.1 – 0.1.2-rc.x | `dsh-bash-terminal-ts` | the TypeScript rewrite's mainline |
|
|
15
15
|
>
|
|
16
16
|
> The two lines **deliberately use different package names**, so they install side by side without overwriting each other. Pick the branch that covers your DSH build.
|
|
@@ -37,11 +37,11 @@ The **Default terminal** row in Settings -> General: the user picks PowerShell /
|
|
|
37
37
|
|
|
38
38
|
## Install
|
|
39
39
|
|
|
40
|
-
The package ships the official `dsh.bundle` manifest (its own `cordis.patch.yml`): listing `dsh-bash-terminal` in a profile's `dsh.profile.bundles` auto-applies the mount — no manual profile edits.
|
|
40
|
+
The package ships the official `dsh.bundle` manifest (its own `cordis.patch.yml`): listing `dsh-bash-terminal-ts` in a profile's `dsh.profile.bundles` auto-applies the mount — no manual profile edits.
|
|
41
41
|
|
|
42
42
|
```powershell
|
|
43
|
-
npm install -g dsh-bash-terminal
|
|
44
|
-
dsh plugin --profile web add dsh-bash-terminal # adds to profile bundles + applies the patch
|
|
43
|
+
npm install -g dsh-bash-terminal-ts
|
|
44
|
+
dsh plugin --profile web add dsh-bash-terminal-ts # adds to profile bundles + applies the patch
|
|
45
45
|
powershell -ExecutionPolicy Bypass -File install.ps1 install # patches the DSH settings-UI allowlist (see below)
|
|
46
46
|
# restart dsh web
|
|
47
47
|
```
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-bash-terminal
|
|
1
|
+
# dsh-bash-terminal-ts
|
|
2
2
|
|
|
3
3
|
> 🌐 [English](README.en.md) · 社区交流:[LINUX DO](https://linux.do) · [GitHub](https://github.com/drscrewdriver/dsh-bash-terminal-ts)
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ DSH(DeepSeek Harness)插件:一个 `shell` 工具,在 Windows 上统一
|
|
|
10
10
|
>
|
|
11
11
|
> | 分支 | DSH 段 | 包名 | 状态 |
|
|
12
12
|
> |------|--------|------|------|
|
|
13
|
-
> | `ts/0.1.5` | 0.1.5-alpha.1 – 0.1.5-rc.x | `dsh-bash-terminal` | 本分支;`build` / `unit` / `apply` / `client` / `terminal` 本机全绿 |
|
|
13
|
+
> | `ts/0.1.5` | 0.1.5-alpha.1 – 0.1.5-rc.x | `dsh-bash-terminal-ts` | 本分支;`build` / `unit` / `apply` / `client` / `terminal` 本机全绿 |
|
|
14
14
|
> | `main` | 0.1.2-alpha.1 – 0.1.2-rc.x | `dsh-bash-terminal-ts` | TypeScript 重写主线 |
|
|
15
15
|
>
|
|
16
16
|
> **两条线刻意使用不同包名**,因此可以并存安装、互不覆盖。请按你的 DSH 版本选分支。
|
|
@@ -46,8 +46,8 @@ DSH(DeepSeek Harness)插件:一个 `shell` 工具,在 Windows 上统一
|
|
|
46
46
|
|
|
47
47
|
```powershell
|
|
48
48
|
# 1. 安装插件包
|
|
49
|
-
npm install -g dsh-bash-terminal
|
|
50
|
-
dsh plugin --profile web add dsh-bash-terminal # 自动加进 profile 的 bundles 并应用 patch
|
|
49
|
+
npm install -g dsh-bash-terminal-ts
|
|
50
|
+
dsh plugin --profile web add dsh-bash-terminal-ts # 自动加进 profile 的 bundles 并应用 patch
|
|
51
51
|
|
|
52
52
|
# 2. patch DSH 设置白名单(DSH 限制,见下方说明)
|
|
53
53
|
powershell -ExecutionPolicy Bypass -File install.ps1 install
|
|
@@ -55,21 +55,21 @@ powershell -ExecutionPolicy Bypass -File install.ps1 install
|
|
|
55
55
|
# 3. 重启 dsh web
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
> 已用临时 profile 实测:`bundles: [dsh-bash-terminal]` → dump-config 自动出现 `tool-bash-terminal` entry。
|
|
58
|
+
> 已用临时 profile 实测:`bundles: [dsh-bash-terminal-ts]` → dump-config 自动出现 `tool-bash-terminal` entry。
|
|
59
59
|
|
|
60
60
|
### 本地开发安装(junction 直连,改源码即时生效)
|
|
61
61
|
|
|
62
62
|
```powershell
|
|
63
63
|
# 1. 链接插件包到 profile 的 node_modules(junction,改源码即时生效)
|
|
64
64
|
$profile = "$env:USERPROFILE\.dsh\profiles\web"
|
|
65
|
-
New-Item -ItemType Junction -Path "$profile\node_modules\dsh-bash-terminal" -Target "D:\workspace\projects\dsh-bash-terminal" | Out-Null
|
|
65
|
+
New-Item -ItemType Junction -Path "$profile\node_modules\dsh-bash-terminal-ts" -Target "D:\workspace\projects\dsh-bash-terminal-ts" | Out-Null
|
|
66
66
|
|
|
67
67
|
# 2. 让插件能解析 @deepseek-ai/* 依赖(junction 到 profile 的依赖树,插件与宿主共用同一份模块实例)
|
|
68
|
-
New-Item -ItemType Junction -Path "D:\workspace\projects\dsh-bash-terminal\node_modules\@deepseek-ai" -Target "$profile\..\node_modules\@deepseek-ai" | Out-Null
|
|
68
|
+
New-Item -ItemType Junction -Path "D:\workspace\projects\dsh-bash-terminal-ts\node_modules\@deepseek-ai" -Target "$profile\..\node_modules\@deepseek-ai" | Out-Null
|
|
69
69
|
|
|
70
|
-
# 3. 让 profile 通过官方 bundle 挂载插件(install.ps1 install 会自动做;等价于在 dsh.profile.bundles 加 "dsh-bash-terminal")
|
|
70
|
+
# 3. 让 profile 通过官方 bundle 挂载插件(install.ps1 install 会自动做;等价于在 dsh.profile.bundles 加 "dsh-bash-terminal-ts")
|
|
71
71
|
# 4. (仅修改前端源码后)重新打包 client bundle:
|
|
72
|
-
# cd D:\workspace\projects\dsh-bash-terminal && node scripts/build-client.mjs
|
|
72
|
+
# cd D:\workspace\projects\dsh-bash-terminal-ts && node scripts/build-client.mjs
|
|
73
73
|
# 5. 重启 dsh web
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -84,12 +84,12 @@ New-Item -ItemType Junction -Path "D:\workspace\projects\dsh-bash-terminal\node_
|
|
|
84
84
|
> 另:0.1.5 的 Web 设置面改为 `settings.describe()` 动态枚举,**不再有 namespace 白名单**
|
|
85
85
|
> (`settings-not-exposed` 已不存在),`install.ps1` 里的白名单 patch 只是历史遗留、可忽略。
|
|
86
86
|
|
|
87
|
-
> 当前已不再需要手动改 profile 的 `cordis.patch.yml`:插件包内自带 `dsh.bundle.patch`(包内 `cordis.patch.yml`),只要 profile 的 `dsh.profile.bundles` 里有 `dsh-bash-terminal`,DSH 就会自动挂载。
|
|
87
|
+
> 当前已不再需要手动改 profile 的 `cordis.patch.yml`:插件包内自带 `dsh.bundle.patch`(包内 `cordis.patch.yml`),只要 profile 的 `dsh.profile.bundles` 里有 `dsh-bash-terminal-ts`,DSH 就会自动挂载。
|
|
88
88
|
|
|
89
89
|
验证组合树(无需重启):
|
|
90
90
|
|
|
91
91
|
```powershell
|
|
92
|
-
node "$env:APPDATA\nvm\<node-version>\node_modules\@deepseek-ai\dsh\lib\bin.js" --profile web --dump-config | Select-String dsh-bash-terminal
|
|
92
|
+
node "$env:APPDATA\nvm\<node-version>\node_modules\@deepseek-ai\dsh\lib\bin.js" --profile web --dump-config | Select-String dsh-bash-terminal-ts
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
## 使用
|
|
@@ -132,7 +132,7 @@ node "$env:APPDATA\nvm\<node-version>\node_modules\@deepseek-ai\dsh\lib\bin.js"
|
|
|
132
132
|
npm 账号已启用 2FA 发布验证,需一次性验证码:
|
|
133
133
|
|
|
134
134
|
```powershell
|
|
135
|
-
cd D:\workspace\projects\dsh-bash-terminal
|
|
135
|
+
cd D:\workspace\projects\dsh-bash-terminal-ts
|
|
136
136
|
npm publish --otp <验证码> # 验证码来自你的认证器
|
|
137
137
|
```
|
|
138
138
|
|
|
@@ -146,9 +146,9 @@ npm publish --otp <验证码> # 验证码来自你的认证器
|
|
|
146
146
|
powershell -ExecutionPolicy Bypass -File install.ps1 uninstall
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
它会删除 junction、恢复设置白名单、清理旧版遗留的 `cordis.patch.yml` 挂载块,并从 `dsh.profile.bundles` 移除 `dsh-bash-terminal`。之后重启 dsh web 即可。
|
|
149
|
+
它会删除 junction、恢复设置白名单、清理旧版遗留的 `cordis.patch.yml` 挂载块,并从 `dsh.profile.bundles` 移除 `dsh-bash-terminal-ts`。之后重启 dsh web 即可。
|
|
150
150
|
|
|
151
|
-
手动卸载时,除了删除 `node_modules\dsh-bash-terminal`,还要记得从 profile `package.json` 的 `dsh.profile.bundles` 中移除 `dsh-bash-terminal`。
|
|
151
|
+
手动卸载时,除了删除 `node_modules\dsh-bash-terminal-ts`,还要记得从 profile `package.json` 的 `dsh.profile.bundles` 中移除 `dsh-bash-terminal-ts`。
|
|
152
152
|
|
|
153
153
|
## 交互式终端(terminal 工具)
|
|
154
154
|
|
|
@@ -194,7 +194,7 @@ powershell -ExecutionPolicy Bypass -File install.ps1 uninstall
|
|
|
194
194
|
## 测试
|
|
195
195
|
|
|
196
196
|
```powershell
|
|
197
|
-
cd D:\workspace\projects\dsh-bash-terminal
|
|
197
|
+
cd D:\workspace\projects\dsh-bash-terminal-ts
|
|
198
198
|
npm install # 安装依赖(含 typescript)
|
|
199
199
|
npm run build # tsc 编译 src/*.ts → lib/*.js;client.tsx → lib/client.js + dist/client.js;test/*.ts → test-dist/
|
|
200
200
|
npm test # node test-dist/unit.js → apply.js → client.js → terminal.js
|
package/cordis.patch.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# dsh-bash-terminal bundle layer — applied automatically when a profile lists
|
|
1
|
+
# dsh-bash-terminal-ts bundle layer — applied automatically when a profile lists
|
|
2
2
|
# this package in dsh.profile.bundles (dsh.bundle.patch declaration).
|
|
3
3
|
- insert:
|
|
4
4
|
- id: tool-bash-terminal
|
|
5
|
-
name: 'dsh-bash-terminal'
|
|
5
|
+
name: 'dsh-bash-terminal-ts'
|
package/dist/client.core.js
CHANGED
|
@@ -33,7 +33,7 @@ var SHELLS = ["powershell", "gitbash", "msys2", "wsl"];
|
|
|
33
33
|
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)}.btChevron{flex:none}";
|
|
34
34
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
|
|
35
35
|
const tag = document.createElement("style");
|
|
36
|
-
tag.dataset.plugin = "dsh-bash-terminal";
|
|
36
|
+
tag.dataset.plugin = "dsh-bash-terminal-ts";
|
|
37
37
|
tag.dataset.pluginCss = "bash-terminal-row";
|
|
38
38
|
tag.textContent = ROW_CSS;
|
|
39
39
|
document.head.appendChild(tag);
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "dsh-bash-terminal",
|
|
2
|
+
id: "dsh-bash-terminal-ts",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -38,7 +38,7 @@ var SHELLS = ["powershell", "gitbash", "msys2", "wsl"];
|
|
|
38
38
|
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)}.btChevron{flex:none}";
|
|
39
39
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
|
|
40
40
|
const tag = document.createElement("style");
|
|
41
|
-
tag.dataset.plugin = "dsh-bash-terminal";
|
|
41
|
+
tag.dataset.plugin = "dsh-bash-terminal-ts";
|
|
42
42
|
tag.dataset.pluginCss = "bash-terminal-row";
|
|
43
43
|
tag.textContent = ROW_CSS;
|
|
44
44
|
document.head.appendChild(tag);
|
package/dsh.plugin.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "dsh-bash-terminal",
|
|
3
|
-
"name": "dsh-bash-terminal",
|
|
4
|
-
"version": "0.6.
|
|
5
|
-
"description": {
|
|
6
|
-
"en": "One shell tool that runs commands through PowerShell, Git Bash, MSYS2 or WSL on Windows, with a user-chosen default terminal in the Web UI settings.",
|
|
7
|
-
"zh": "一个 shell 工具,可在 Windows 上通过 PowerShell / Git Bash / MSYS2 / WSL 执行命令,默认终端在 Web UI 设置中选择。"
|
|
8
|
-
},
|
|
9
|
-
"homepage": "https://github.com/drscrewdriver/dsh-bash-terminal-ts",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/drscrewdriver/dsh-bash-terminal-ts.git"
|
|
13
|
-
},
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"engines": {
|
|
16
|
-
"dsh": ">=0.1.7-rc.1 <0.1.8-0"
|
|
17
|
-
},
|
|
18
|
-
"components": {
|
|
19
|
-
"host": "lib/index.js",
|
|
20
|
-
"client": "dist/client.js"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "dsh-bash-terminal-ts",
|
|
3
|
+
"name": "dsh-bash-terminal-ts",
|
|
4
|
+
"version": "0.6.4",
|
|
5
|
+
"description": {
|
|
6
|
+
"en": "One shell tool that runs commands through PowerShell, Git Bash, MSYS2 or WSL on Windows, with a user-chosen default terminal in the Web UI settings.",
|
|
7
|
+
"zh": "一个 shell 工具,可在 Windows 上通过 PowerShell / Git Bash / MSYS2 / WSL 执行命令,默认终端在 Web UI 设置中选择。"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/drscrewdriver/dsh-bash-terminal-ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/drscrewdriver/dsh-bash-terminal-ts.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"engines": {
|
|
16
|
+
"dsh": ">=0.1.7-rc.1 <0.1.8-0"
|
|
17
|
+
},
|
|
18
|
+
"components": {
|
|
19
|
+
"host": "lib/index.js",
|
|
20
|
+
"client": "dist/client.js"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/lib/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
window.__ModuleLoader__.load({
|
|
2
|
-
id: "dsh-bash-terminal",
|
|
2
|
+
id: "dsh-bash-terminal-ts",
|
|
3
3
|
factory: (require) => {
|
|
4
4
|
var module = { exports: {} };
|
|
5
5
|
var exports = module.exports;
|
|
@@ -38,7 +38,7 @@ var SHELLS = ["powershell", "gitbash", "msys2", "wsl"];
|
|
|
38
38
|
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)}.btChevron{flex:none}";
|
|
39
39
|
if (typeof document !== "undefined" && document.querySelector('style[data-plugin-css="bash-terminal-row"]') === null) {
|
|
40
40
|
const tag = document.createElement("style");
|
|
41
|
-
tag.dataset.plugin = "dsh-bash-terminal";
|
|
41
|
+
tag.dataset.plugin = "dsh-bash-terminal-ts";
|
|
42
42
|
tag.dataset.pluginCss = "bash-terminal-row";
|
|
43
43
|
tag.textContent = ROW_CSS;
|
|
44
44
|
document.head.appendChild(tag);
|
package/lib/dsh-types.d.ts
CHANGED
|
@@ -241,7 +241,7 @@ export interface ApprovalSeam {
|
|
|
241
241
|
request(input: unknown): Promise<unknown>;
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
244
|
-
* The structural context face dsh-bash-terminal programs against: the union
|
|
244
|
+
* The structural context face dsh-bash-terminal-ts programs against: the union
|
|
245
245
|
* of every `ctx.*` member touched by src/index.ts and src/terminal.ts.
|
|
246
246
|
*/
|
|
247
247
|
export interface BashTerminalContext {
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-bash-terminal - one shell tool, four Windows terminals.
|
|
1
|
+
// dsh-bash-terminal-ts - one shell tool, four Windows terminals.
|
|
2
2
|
//
|
|
3
3
|
// Registers a model-facing shell tool. The terminal backend (powershell /
|
|
4
4
|
// gitbash / msys2 / wsl) is chosen by the USER in the Web UI settings (default
|
|
@@ -249,7 +249,7 @@ function spawnSpec(resolved, argv, env, signal) {
|
|
|
249
249
|
function collectedOutput(handle) {
|
|
250
250
|
const { stdout, stderr } = handle.collected;
|
|
251
251
|
if (!isCollectedStream(stdout) || !isCollectedStream(stderr)) {
|
|
252
|
-
throw new Error("dsh-bash-terminal: subprocess implementation dropped a requested collect stream");
|
|
252
|
+
throw new Error("dsh-bash-terminal-ts: subprocess implementation dropped a requested collect stream");
|
|
253
253
|
}
|
|
254
254
|
return { stdout, stderr };
|
|
255
255
|
}
|
|
@@ -290,7 +290,7 @@ async function runForeground(ctx, argv, resolved, env, signal, timeoutMs) {
|
|
|
290
290
|
function requireSubprocess(ctx) {
|
|
291
291
|
const subprocess = ctx.subprocess;
|
|
292
292
|
if (subprocess === null) {
|
|
293
|
-
throw new Error("dsh-bash-terminal: ctx.subprocess seam unavailable (missing inject service)");
|
|
293
|
+
throw new Error("dsh-bash-terminal-ts: ctx.subprocess seam unavailable (missing inject service)");
|
|
294
294
|
}
|
|
295
295
|
return subprocess;
|
|
296
296
|
}
|
|
@@ -493,7 +493,7 @@ const BACKGROUND_OUTPUT_PROPERTIES = {
|
|
|
493
493
|
// ---- plugin -------------------------------------------------------------------
|
|
494
494
|
export function apply(ctx, config = {}) {
|
|
495
495
|
if (process.platform !== "win32") {
|
|
496
|
-
ctx.logger?.info?.("dsh-bash-terminal: only meaningful on win32; skipping tool registration");
|
|
496
|
+
ctx.logger?.info?.("dsh-bash-terminal-ts: only meaningful on win32; skipping tool registration");
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
499
|
const backgroundEnabled = true;
|
|
@@ -509,7 +509,7 @@ export function apply(ctx, config = {}) {
|
|
|
509
509
|
return typeof got === "string" ? got : DEFAULT_SHELL;
|
|
510
510
|
};
|
|
511
511
|
if (!SHELLS.includes(currentShell())) {
|
|
512
|
-
throw new Error(`dsh-bash-terminal: invalid defaultShell ${JSON.stringify(currentShell())}`);
|
|
512
|
+
throw new Error(`dsh-bash-terminal-ts: invalid defaultShell ${JSON.stringify(currentShell())}`);
|
|
513
513
|
}
|
|
514
514
|
/** Official sandbox-escalation surface (mirrors tool-bash): advertise the
|
|
515
515
|
* escalation modes whenever the deployment confines. */
|
|
@@ -653,7 +653,7 @@ export function apply(ctx, config = {}) {
|
|
|
653
653
|
const shell = currentShell();
|
|
654
654
|
const argv0 = buildArgv(shell, v.command, paths, v.distro);
|
|
655
655
|
if (argv0[0] === undefined) {
|
|
656
|
-
throw new Error(`dsh-bash-terminal: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
|
|
656
|
+
throw new Error(`dsh-bash-terminal-ts: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
|
|
657
657
|
}
|
|
658
658
|
// Only element 0 (the resolved executable) can be undefined; guarded above.
|
|
659
659
|
const argv = argv0;
|
package/lib/terminal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-bash-terminal: interactive terminal tool over the official PTY seam.
|
|
1
|
+
// dsh-bash-terminal-ts: interactive terminal tool over the official PTY seam.
|
|
2
2
|
// ctx.subprocess.spawnTerminal (node-pty under the hood) allocates a real
|
|
3
3
|
// terminal; this module owns model-facing sessions: open / send / read /
|
|
4
4
|
// signal (Ctrl+C etc.) / close. The backend follows the user's default
|
package/package.json
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-bash-terminal-ts",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"tag": "dsh-0.1.7"
|
|
6
|
-
},
|
|
7
|
-
"description": "DSH plugin: one shell tool that runs commands through PowerShell, Git Bash, MSYS2, or WSL on Windows, with a user-chosen default terminal in the Web UI settings. TypeScript rewrite of MAXeaglet/dsh-bash-terminal with working MSYS2/MINGW64 support.",
|
|
8
|
-
"author": "drscrewdriver",
|
|
9
|
-
"license": "MIT",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/drscrewdriver/dsh-bash-terminal-ts.git"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/drscrewdriver/dsh-bash-terminal-ts/issues"
|
|
16
|
-
},
|
|
17
|
-
"homepage": "https://github.com/drscrewdriver/dsh-bash-terminal-ts#readme",
|
|
18
|
-
"keywords": [
|
|
19
|
-
"deepseek-harness",
|
|
20
|
-
"dsh",
|
|
21
|
-
"plugin",
|
|
22
|
-
"terminal",
|
|
23
|
-
"shell",
|
|
24
|
-
"powershell",
|
|
25
|
-
"git-bash",
|
|
26
|
-
"wsl",
|
|
27
|
-
"windows",
|
|
28
|
-
"typescript"
|
|
29
|
-
],
|
|
30
|
-
"engines": {
|
|
31
|
-
"node": ">=22",
|
|
32
|
-
"dsh": ">=0.1.7-rc.1 <0.1.8-0"
|
|
33
|
-
},
|
|
34
|
-
"type": "module",
|
|
35
|
-
"main": "lib/index.js",
|
|
36
|
-
"exports": {
|
|
37
|
-
".": "./lib/index.js",
|
|
38
|
-
"./client": "./lib/client.js",
|
|
39
|
-
"./package.json": "./package.json"
|
|
40
|
-
},
|
|
41
|
-
"files": [
|
|
42
|
-
"lib",
|
|
43
|
-
"dist",
|
|
44
|
-
"src",
|
|
45
|
-
"scripts",
|
|
46
|
-
"template",
|
|
47
|
-
"tsconfig.json",
|
|
48
|
-
"tsconfig.client.json",
|
|
49
|
-
"tsconfig.test.json",
|
|
50
|
-
"README.md",
|
|
51
|
-
"LICENSE",
|
|
52
|
-
"cordis.patch.yml",
|
|
53
|
-
"dsh.plugin.json",
|
|
54
|
-
"screenshots.json"
|
|
55
|
-
],
|
|
56
|
-
"scripts": {
|
|
57
|
-
"build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs && tsc -p tsconfig.test.json",
|
|
58
|
-
"build:client": "node scripts/build-client.mjs",
|
|
59
|
-
"test": "node test-dist/unit.js && node test-dist/apply.js && node test-dist/client.js && node test-dist/terminal.js"
|
|
60
|
-
},
|
|
61
|
-
"dsh": {
|
|
62
|
-
"bundle": {
|
|
63
|
-
"patch": "./cordis.patch.yml"
|
|
64
|
-
},
|
|
65
|
-
"client": {
|
|
66
|
-
"platform": "web",
|
|
67
|
-
"immediately": true,
|
|
68
|
-
"inject": [
|
|
69
|
-
"@deepseek-ai/dsh-client-locale",
|
|
70
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
71
|
-
"@deepseek-ai/dsh-api-remotes"
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
"peerDependencies": {
|
|
76
|
-
"@deepseek-ai/cordis": "^4.0.2",
|
|
77
|
-
"@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.1.8-0",
|
|
78
|
-
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.1.8-0",
|
|
79
|
-
"@deepseek-ai/dsh-llm": ">=0.1.7-rc.1 <0.1.8-0",
|
|
80
|
-
"@deepseek-ai/dsh-shell": ">=0.1.7-rc.1 <0.1.8-0",
|
|
81
|
-
"@deepseek-ai/dsh-sandbox": ">=0.1.7-rc.1 <0.1.8-0",
|
|
82
|
-
"@deepseek-ai/dsh-timeout": ">=0.1.7-rc.1 <0.1.8-0",
|
|
83
|
-
"@deepseek-ai/dsh-client-store": ">=0.1.7-rc.1 <0.1.8-0",
|
|
84
|
-
"@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.1.8-0",
|
|
85
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.1 <0.1.8-0",
|
|
86
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.1.8-0",
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.1 <0.1.8-0",
|
|
88
|
-
"react": "^18.2.0"
|
|
89
|
-
},
|
|
90
|
-
"dependencies": {
|
|
91
|
-
"@deepseek-ai/schemastery": "^3.18.4",
|
|
92
|
-
"node-pty": "^1.1.0"
|
|
93
|
-
},
|
|
94
|
-
"devDependencies": {
|
|
95
|
-
"@deepseek-ai/cordis": "^4.0.2",
|
|
96
|
-
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
97
|
-
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
|
|
99
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
|
|
100
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
101
|
-
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
102
|
-
"@deepseek-ai/dsh-sandbox": "0.1.7-rc.2",
|
|
103
|
-
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
104
|
-
"@deepseek-ai/dsh-shell": "0.1.7-rc.2",
|
|
105
|
-
"@deepseek-ai/dsh-timeout": "0.1.7-rc.2",
|
|
106
|
-
"@deepseek-ai/dsh-tools": "0.1.7-rc.2",
|
|
107
|
-
"@types/node": "^22.10.0",
|
|
108
|
-
"@types/react": "^18.2.0",
|
|
109
|
-
"@types/react-dom": "^18.2.0",
|
|
110
|
-
"esbuild": "^0.28.2",
|
|
111
|
-
"react": "^18.2.0",
|
|
112
|
-
"react-dom": "^18.2.0",
|
|
113
|
-
"typescript": "^5.9.0",
|
|
114
|
-
"@deepseek-ai/dsh-scope": "0.1.7-rc.2",
|
|
115
|
-
"@deepseek-ai/dsh-subprocess": "0.1.7-rc.2",
|
|
116
|
-
"@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
|
|
117
|
-
"@deepseek-ai/dsh-http-proxy": "0.1.7-rc.2"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-bash-terminal-ts",
|
|
3
|
+
"version": "0.6.4",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"tag": "dsh-0.1.7"
|
|
6
|
+
},
|
|
7
|
+
"description": "DSH plugin: one shell tool that runs commands through PowerShell, Git Bash, MSYS2, or WSL on Windows, with a user-chosen default terminal in the Web UI settings. TypeScript rewrite of MAXeaglet/dsh-bash-terminal with working MSYS2/MINGW64 support.",
|
|
8
|
+
"author": "drscrewdriver",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/drscrewdriver/dsh-bash-terminal-ts.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/drscrewdriver/dsh-bash-terminal-ts/issues"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/drscrewdriver/dsh-bash-terminal-ts#readme",
|
|
18
|
+
"keywords": [
|
|
19
|
+
"deepseek-harness",
|
|
20
|
+
"dsh",
|
|
21
|
+
"plugin",
|
|
22
|
+
"terminal",
|
|
23
|
+
"shell",
|
|
24
|
+
"powershell",
|
|
25
|
+
"git-bash",
|
|
26
|
+
"wsl",
|
|
27
|
+
"windows",
|
|
28
|
+
"typescript"
|
|
29
|
+
],
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=22",
|
|
32
|
+
"dsh": ">=0.1.7-rc.1 <0.1.8-0"
|
|
33
|
+
},
|
|
34
|
+
"type": "module",
|
|
35
|
+
"main": "lib/index.js",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": "./lib/index.js",
|
|
38
|
+
"./client": "./lib/client.js",
|
|
39
|
+
"./package.json": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"lib",
|
|
43
|
+
"dist",
|
|
44
|
+
"src",
|
|
45
|
+
"scripts",
|
|
46
|
+
"template",
|
|
47
|
+
"tsconfig.json",
|
|
48
|
+
"tsconfig.client.json",
|
|
49
|
+
"tsconfig.test.json",
|
|
50
|
+
"README.md",
|
|
51
|
+
"LICENSE",
|
|
52
|
+
"cordis.patch.yml",
|
|
53
|
+
"dsh.plugin.json",
|
|
54
|
+
"screenshots.json"
|
|
55
|
+
],
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsc -p tsconfig.json && tsc -p tsconfig.client.json && node scripts/build-client.mjs && tsc -p tsconfig.test.json",
|
|
58
|
+
"build:client": "node scripts/build-client.mjs",
|
|
59
|
+
"test": "node test-dist/unit.js && node test-dist/apply.js && node test-dist/client.js && node test-dist/terminal.js"
|
|
60
|
+
},
|
|
61
|
+
"dsh": {
|
|
62
|
+
"bundle": {
|
|
63
|
+
"patch": "./cordis.patch.yml"
|
|
64
|
+
},
|
|
65
|
+
"client": {
|
|
66
|
+
"platform": "web",
|
|
67
|
+
"immediately": true,
|
|
68
|
+
"inject": [
|
|
69
|
+
"@deepseek-ai/dsh-client-locale",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
71
|
+
"@deepseek-ai/dsh-api-remotes"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
77
|
+
"@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.1.8-0",
|
|
78
|
+
"@deepseek-ai/dsh-settings": ">=0.1.7-rc.1 <0.1.8-0",
|
|
79
|
+
"@deepseek-ai/dsh-llm": ">=0.1.7-rc.1 <0.1.8-0",
|
|
80
|
+
"@deepseek-ai/dsh-shell": ">=0.1.7-rc.1 <0.1.8-0",
|
|
81
|
+
"@deepseek-ai/dsh-sandbox": ">=0.1.7-rc.1 <0.1.8-0",
|
|
82
|
+
"@deepseek-ai/dsh-timeout": ">=0.1.7-rc.1 <0.1.8-0",
|
|
83
|
+
"@deepseek-ai/dsh-client-store": ">=0.1.7-rc.1 <0.1.8-0",
|
|
84
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.7-rc.1 <0.1.8-0",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.7-rc.1 <0.1.8-0",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.7-rc.1 <0.1.8-0",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.1.7-rc.1 <0.1.8-0",
|
|
88
|
+
"react": "^18.2.0"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
92
|
+
"node-pty": "^1.1.0"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
96
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-client-store": "0.1.7-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.7-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.7-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.7-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-sandbox": "0.1.7-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-settings": "0.1.7-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-shell": "0.1.7-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-timeout": "0.1.7-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-tools": "0.1.7-rc.2",
|
|
107
|
+
"@types/node": "^22.10.0",
|
|
108
|
+
"@types/react": "^18.2.0",
|
|
109
|
+
"@types/react-dom": "^18.2.0",
|
|
110
|
+
"esbuild": "^0.28.2",
|
|
111
|
+
"react": "^18.2.0",
|
|
112
|
+
"react-dom": "^18.2.0",
|
|
113
|
+
"typescript": "^5.9.0",
|
|
114
|
+
"@deepseek-ai/dsh-scope": "0.1.7-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-subprocess": "0.1.7-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-sandbox-policy": "0.1.7-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-http-proxy": "0.1.7-rc.2"
|
|
118
|
+
}
|
|
119
|
+
}
|
package/scripts/build-client.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Build the browser client bundle for dsh-bash-terminal.
|
|
1
|
+
// Build the browser client bundle for dsh-bash-terminal-ts.
|
|
2
2
|
// Output: lib/client.js (primary, consumed by DSH loader/reload precheck) and
|
|
3
3
|
// dist/client.js (legacy compatibility) — a __ModuleLoader__.load({ id, factory })
|
|
4
4
|
// wrapper around the esbuild CJS bundle; shared deps (react, @deepseek-ai/*)
|
|
@@ -33,7 +33,7 @@ await build({
|
|
|
33
33
|
|
|
34
34
|
const core = readFileSync(join(root, "dist", "client.core.js"), "utf8");
|
|
35
35
|
const wrapper = `window.__ModuleLoader__.load({
|
|
36
|
-
id: "dsh-bash-terminal",
|
|
36
|
+
id: "dsh-bash-terminal-ts",
|
|
37
37
|
factory: (require) => {
|
|
38
38
|
var module = { exports: {} };
|
|
39
39
|
var exports = module.exports;
|
package/src/client.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-bash-terminal client plugin: a "Default terminal" preference row in the
|
|
1
|
+
// dsh-bash-terminal-ts client plugin: a "Default terminal" preference row in the
|
|
2
2
|
// Web UI General settings, mirroring the shipped EnterBehaviorRow grammar
|
|
3
3
|
// (row layout, capsule selector with chevron, --dsw-* tokens).
|
|
4
4
|
//
|
|
@@ -33,7 +33,7 @@ const ROW_CSS =
|
|
|
33
33
|
".btChevron{flex:none}";
|
|
34
34
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"bash-terminal-row\"]") === null) {
|
|
35
35
|
const tag = document.createElement("style");
|
|
36
|
-
tag.dataset.plugin = "dsh-bash-terminal";
|
|
36
|
+
tag.dataset.plugin = "dsh-bash-terminal-ts";
|
|
37
37
|
tag.dataset.pluginCss = "bash-terminal-row";
|
|
38
38
|
tag.textContent = ROW_CSS;
|
|
39
39
|
document.head.appendChild(tag);
|
package/src/dsh-types.ts
CHANGED
|
@@ -294,7 +294,7 @@ export interface ApprovalSeam {
|
|
|
294
294
|
// ---- plugin context (server side) ----------------------------------------------
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
|
-
* The structural context face dsh-bash-terminal programs against: the union
|
|
297
|
+
* The structural context face dsh-bash-terminal-ts programs against: the union
|
|
298
298
|
* of every `ctx.*` member touched by src/index.ts and src/terminal.ts.
|
|
299
299
|
*/
|
|
300
300
|
export interface BashTerminalContext {
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-bash-terminal - one shell tool, four Windows terminals.
|
|
1
|
+
// dsh-bash-terminal-ts - one shell tool, four Windows terminals.
|
|
2
2
|
//
|
|
3
3
|
// Registers a model-facing shell tool. The terminal backend (powershell /
|
|
4
4
|
// gitbash / msys2 / wsl) is chosen by the USER in the Web UI settings (default
|
|
@@ -324,7 +324,7 @@ function spawnSpec(resolved: SpawnResolution, argv: string[], env: Record<string
|
|
|
324
324
|
function collectedOutput(handle: { collected: { stdout: unknown; stderr: unknown } }) {
|
|
325
325
|
const { stdout, stderr } = handle.collected;
|
|
326
326
|
if (!isCollectedStream(stdout) || !isCollectedStream(stderr)) {
|
|
327
|
-
throw new Error("dsh-bash-terminal: subprocess implementation dropped a requested collect stream");
|
|
327
|
+
throw new Error("dsh-bash-terminal-ts: subprocess implementation dropped a requested collect stream");
|
|
328
328
|
}
|
|
329
329
|
return { stdout, stderr };
|
|
330
330
|
}
|
|
@@ -395,7 +395,7 @@ async function runForeground(
|
|
|
395
395
|
function requireSubprocess(ctx: BashTerminalContext) {
|
|
396
396
|
const subprocess = ctx.subprocess;
|
|
397
397
|
if (subprocess === null) {
|
|
398
|
-
throw new Error("dsh-bash-terminal: ctx.subprocess seam unavailable (missing inject service)");
|
|
398
|
+
throw new Error("dsh-bash-terminal-ts: ctx.subprocess seam unavailable (missing inject service)");
|
|
399
399
|
}
|
|
400
400
|
return subprocess;
|
|
401
401
|
}
|
|
@@ -669,7 +669,7 @@ const BACKGROUND_OUTPUT_PROPERTIES: Record<string, JsonSchemaNode> = {
|
|
|
669
669
|
|
|
670
670
|
export function apply(ctx: BashTerminalContext, config: Partial<ConfigValues> = {}): void {
|
|
671
671
|
if (process.platform !== "win32") {
|
|
672
|
-
ctx.logger?.info?.("dsh-bash-terminal: only meaningful on win32; skipping tool registration");
|
|
672
|
+
ctx.logger?.info?.("dsh-bash-terminal-ts: only meaningful on win32; skipping tool registration");
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
const backgroundEnabled = true;
|
|
@@ -684,7 +684,7 @@ export function apply(ctx: BashTerminalContext, config: Partial<ConfigValues> =
|
|
|
684
684
|
return typeof got === "string" ? got : DEFAULT_SHELL;
|
|
685
685
|
};
|
|
686
686
|
if (!(SHELLS as readonly string[]).includes(currentShell())) {
|
|
687
|
-
throw new Error(`dsh-bash-terminal: invalid defaultShell ${JSON.stringify(currentShell())}`);
|
|
687
|
+
throw new Error(`dsh-bash-terminal-ts: invalid defaultShell ${JSON.stringify(currentShell())}`);
|
|
688
688
|
}
|
|
689
689
|
/** Official sandbox-escalation surface (mirrors tool-bash): advertise the
|
|
690
690
|
* escalation modes whenever the deployment confines. */
|
|
@@ -835,7 +835,7 @@ export function apply(ctx: BashTerminalContext, config: Partial<ConfigValues> =
|
|
|
835
835
|
const shell = currentShell();
|
|
836
836
|
const argv0 = buildArgv(shell, v.command, paths, v.distro);
|
|
837
837
|
if (argv0[0] === undefined) {
|
|
838
|
-
throw new Error(`dsh-bash-terminal: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
|
|
838
|
+
throw new Error(`dsh-bash-terminal-ts: ${shell} backend unavailable - executable not found. Install it or set the corresponding *Path config.`);
|
|
839
839
|
}
|
|
840
840
|
// Only element 0 (the resolved executable) can be undefined; guarded above.
|
|
841
841
|
const argv = argv0 as string[];
|
package/src/terminal.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-bash-terminal: interactive terminal tool over the official PTY seam.
|
|
1
|
+
// dsh-bash-terminal-ts: interactive terminal tool over the official PTY seam.
|
|
2
2
|
// ctx.subprocess.spawnTerminal (node-pty under the hood) allocates a real
|
|
3
3
|
// terminal; this module owns model-facing sessions: open / send / read /
|
|
4
4
|
// signal (Ctrl+C etc.) / close. The backend follows the user's default
|