@artenx/dshb 0.1.32 → 0.1.33

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.
@@ -70,6 +70,46 @@ declare class SyncSshTransport {
70
70
  private fetchDataOperation;
71
71
  private requestHandshake;
72
72
  }
73
+ interface SyncRemoteProbeDraft {
74
+ host: string;
75
+ port: number;
76
+ username: string;
77
+ authKind: 'password' | 'key';
78
+ }
79
+ interface SyncRemoteProbeProfile {
80
+ name: string;
81
+ dshbInstalled: boolean;
82
+ home: string;
83
+ }
84
+ interface SyncRemoteProbeHandshake {
85
+ port: number;
86
+ instanceId: string;
87
+ }
88
+ interface SyncRemoteProbeResult {
89
+ homes: string[];
90
+ profiles: SyncRemoteProbeProfile[];
91
+ /** 握手命中的全部端口(同机多实例时可能有多个;配置端口的命中排最前)。 */
92
+ handshakes: SyncRemoteProbeHandshake[];
93
+ webPort?: number;
94
+ instanceId?: string;
95
+ processHints: string[];
96
+ hostKeyFingerprint: string;
97
+ }
98
+ declare const REMOTE_PROBE_BEGIN_MARKER = "DSHB_PROBE_BEGIN";
99
+ declare const REMOTE_PROBE_END_MARKER = "DSHB_PROBE_END";
100
+ /**
101
+ * 生成远端发现脚本:纯 POSIX sh + 远端 node(DSH 所在机器必然有 node)。
102
+ * 三个动作:① 多候选定位 DSH_HOME(含桌面版常见路径);② 列出 profiles 及
103
+ * dshb 安装标记;③ 握手探测真实 Web 端口(仅远端回环,桌面版 127.0.0.1:3080
104
+ * 即可命中)。输出以 BEGIN/END 标记包裹,逐行 "key value"。
105
+ */
106
+ declare function buildRemoteProbeScript(dshHome?: string, preferredWebPort?: number): string;
107
+ /** 解析探测输出:仅在 BEGIN/END 标记之间取行,容忍未知行。 */
108
+ declare function parseRemoteProbeOutput(output: string, hostKeyFingerprint: string, preferredWebPort?: number): SyncRemoteProbeResult;
109
+ declare class SyncRemoteProbe {
110
+ /** 探测远端:SSH 登录 + 单次 exec 发现脚本;主机密钥自动接受(只读发现,指纹随结果返回)。 */
111
+ probeRemote(draft: SyncRemoteProbeDraft, secrets: SyncPeerSecrets, preferredWebPort?: number): Promise<SyncRemoteProbeResult>;
112
+ }
73
113
  //#endregion
74
- export { SyncSshProbeError as a, buildSyncSshConnectConfig as c, SyncSshErrorCategory as i, SyncRemoteNodeManifest as n, SyncSshSession as o, SyncSessionDeltaPrefixError as r, SyncSshTransport as s, SyncRemoteHandshake as t };
75
- //# sourceMappingURL=ssh-transport-B2oNDs0D.d.ts.map
114
+ export { parseRemoteProbeOutput as _, SyncRemoteProbe as a, SyncRemoteProbeProfile as c, SyncSshErrorCategory as d, SyncSshProbeError as f, buildSyncSshConnectConfig as g, buildRemoteProbeScript as h, SyncRemoteNodeManifest as i, SyncRemoteProbeResult as l, SyncSshTransport as m, REMOTE_PROBE_END_MARKER as n, SyncRemoteProbeDraft as o, SyncSshSession as p, SyncRemoteHandshake as r, SyncRemoteProbeHandshake as s, REMOTE_PROBE_BEGIN_MARKER as t, SyncSessionDeltaPrefixError as u };
115
+ //# sourceMappingURL=ssh-transport-C7povM0s.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artenx/dshb",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Routes DSH filesystem, shell, subprocess, and PTY operations to local, SSH, and Docker execution nodes, with a node registry, an authentication gate, a mobile-aware management UI, and per-workspace custom project instructions.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",