dsh-over-ssh 0.1.1 → 0.2.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.
- package/README.md +10 -8
- package/agents/agent-manifest.json +6 -6
- package/agents/linux-amd64/dsh-over-ssh-agent +0 -0
- package/agents/linux-arm64/dsh-over-ssh-agent +0 -0
- package/lib/client.js +567 -246
- package/lib/file-references.js +20 -8
- package/lib/fs.js +141 -41
- package/lib/index.js +3268 -875
- package/lib/types/src/config.d.ts +76 -0
- package/lib/types/src/host/app/backend.d.ts +35 -2
- package/lib/types/src/host/domain/roots/session-roots.d.ts +23 -0
- package/lib/types/src/host/domain/session/session-admin.d.ts +5 -0
- package/lib/types/src/host/infra/transport/forward.d.ts +75 -0
- package/lib/types/src/host/infra/transport/ssh/ssh2-transport.d.ts +5 -0
- package/lib/types/src/host/infra/transport/transport.d.ts +26 -0
- package/lib/types/src/host/integration/fs/fs-provider.d.ts +18 -1
- package/lib/types/src/wiring/helpers.d.ts +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,11 +45,11 @@ shell:
|
|
|
45
45
|
|
|
46
46
|
| 平台 | 字节 | sha256 |
|
|
47
47
|
|---|---|---|
|
|
48
|
-
| linux-amd64 | 4,
|
|
49
|
-
| linux-arm64 | 4,653,216 | `
|
|
48
|
+
| linux-amd64 | 4,944,032 | `fd5a5d6f8be07e786cc7c34a1aad8e2f040f1de3b7f124e739d2209df5ab5038` |
|
|
49
|
+
| linux-arm64 | 4,653,216 | `202f4be3d1c1d98ccae27b9ccaa4879fa148c741981063f8be98689674b3ad2e` |
|
|
50
50
|
|
|
51
|
-
- 代理版本:`
|
|
52
|
-
- 源码提交:`
|
|
51
|
+
- 代理版本:`0.2.1-e019f2d`
|
|
52
|
+
- 源码提交:`e019f2d`(Go 仓 `dsh-over-ssh-agent` 的这个提交)
|
|
53
53
|
- 清单原文:包内 `agents/agent-manifest.json`
|
|
54
54
|
- 核对:`sha256sum agents/<平台>/dsh-over-ssh-agent` 与上表比对;按上面的提交检出 Go 仓后
|
|
55
55
|
`scripts/check.sh` 可重建同样的产物。
|
|
@@ -61,7 +61,7 @@ shell:
|
|
|
61
61
|
- **传输层自研**,不使用核心 `packages/ssh/*` 家族。原因见设计文档 §3.1:官方实现的 `BatchMode=yes` 让密码认证不可能、远端必须预装 Node + helper、`ctx.ssh` 单例、且其 Web 集成需单独实现(preset 的 `isolate` 子树覆盖不到 `agent.ctx`)。
|
|
62
62
|
- **文件按路径路由,进程不路由**:核心 provider 的公开方法收不到 agent/session 身份,因此 fs 用自研路由 provider 支持"本地 + 远端多根",而 bash/终端保持单一执行世界,远端命令走显式入口。
|
|
63
63
|
- **远端零安装(Tier 1,地板)**:只依赖远端已有的 POSIX 工具(`sh`/`base64`/`stat`/`find`/可选 `git`/`rg`),连上后做一次能力探测并按能力降级。
|
|
64
|
-
- **可选 Go 代理(Tier 2,增强)**:独立仓库 `../dsh-over-ssh-agent`,纯静态单文件(随包产物的体积与摘要以 `agents/agent-manifest.json` 的 `bytes`/`sha256` 为准,交叉编译矩阵见 `../dsh-over-ssh-agent/doc/05-benchmarks/baseline.md
|
|
64
|
+
- **可选 Go 代理(Tier 2,增强)**:独立仓库 `../dsh-over-ssh-agent`,纯静态单文件(随包产物的体积与摘要以 `agents/agent-manifest.json` 的 `bytes`/`sha256` 为准,交叉编译矩阵见 `../dsh-over-ssh-agent/doc/05-benchmarks/baseline.md`;第三方依赖 4 个,全部经 ADR-0008 授权),经 ssh 通信(stdio 或常驻 daemon 的 unix socket,**不监听 TCP 端口**),补齐原生监听/索引/长任务/远端 LSP/Landlock 围栏。决策见 `doc/03-decisions/0005-optional-go-remote-agent.md`;代理不可用时一律回退 Tier 1。
|
|
65
65
|
- **默认尝试部署**(2026-10-13 起,审计 0040):连接的默认传输是 `agent`,首次连接会把代理装到远端 `$HOME/.cache/dsh-over-ssh/dsh-over-ssh-agent`(约 4.7 MiB / 4,907,168 B,以 `agents/agent-manifest.json` 为准,`0700`),失败自动回退 Tier 1。想避开远端写入就显式写 `transport: alias`。
|
|
66
66
|
- **密码认证同样可用**:代理经系统 ssh 启动,而系统 ssh 靠 `SSH_ASKPASS` 助手取密码(秘密只经环境变量传递,不落盘)。此前"密码认证无法用代理"的说法是把本插件硬写 `BatchMode=yes` 误当成了 SSH 的限制。
|
|
67
67
|
- 随包只带 `linux-amd64` 与 `linux-arm64` 两个产物;其它平台的远端会正常降级到 Tier 1。
|
|
@@ -71,13 +71,15 @@ shell:
|
|
|
71
71
|
|
|
72
72
|
```
|
|
73
73
|
src/
|
|
74
|
+
index.ts fs.ts file-references.ts # 三个 DSH 入口(组合根)
|
|
74
75
|
host/
|
|
75
76
|
domain/ # 纯 TS、零框架依赖、100% 单测覆盖
|
|
76
|
-
app/ #
|
|
77
|
+
app/ # 应用层用例(根路由、传输服务、状态)
|
|
77
78
|
infra/ # 传输/后端/缓存/持久化实现
|
|
78
79
|
integration/ # 与核心对接:fs provider、fileReferences、tools、Remote API、终端 wrapper
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
client/ # web client 半(React + TS + CSS Modules)——与 host/ 是兄弟目录
|
|
81
|
+
shared/ # 两半共用的纯工具(路由常量、根键等)
|
|
82
|
+
tests/ # 镜像 src/ 的测试树(每模块一个 *.test.ts;根级只留 architecture/config 两个横切用例)
|
|
81
83
|
```
|
|
82
84
|
|
|
83
85
|
## 测试
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
4
|
-
"agentVersion": "
|
|
5
|
-
"sourceCommit": "
|
|
3
|
+
"generatedAt": "2026-11-05T23:45:29.528Z",
|
|
4
|
+
"agentVersion": "0.2.1-e019f2d",
|
|
5
|
+
"sourceCommit": "e019f2d",
|
|
6
6
|
"artifacts": [
|
|
7
7
|
{
|
|
8
8
|
"platform": "linux-amd64",
|
|
9
9
|
"path": "linux-amd64/dsh-over-ssh-agent",
|
|
10
|
-
"sha256": "
|
|
11
|
-
"bytes":
|
|
10
|
+
"sha256": "fd5a5d6f8be07e786cc7c34a1aad8e2f040f1de3b7f124e739d2209df5ab5038",
|
|
11
|
+
"bytes": 4944032
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"platform": "linux-arm64",
|
|
15
15
|
"path": "linux-arm64/dsh-over-ssh-agent",
|
|
16
|
-
"sha256": "
|
|
16
|
+
"sha256": "202f4be3d1c1d98ccae27b9ccaa4879fa148c741981063f8be98689674b3ad2e",
|
|
17
17
|
"bytes": 4653216
|
|
18
18
|
}
|
|
19
19
|
]
|
|
Binary file
|
|
Binary file
|