better-dsh 0.3.1 → 0.3.2
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 +6 -5
- package/cordis.patch.yml +14 -9
- package/docs/20_specs/kernel-provisioning/spec.md +2 -0
- package/docs/remote-tools.md +15 -9
- package/docs/specs/kernel-provisioning/spec.md +12 -40
- package/docs/specs/omp-python-repl-port/runtime-guide.md +3 -1
- package/docs/specs/omp-python-repl-port/spec.md +7 -0
- package/docs/specs/remote-pty-label/spec.md +2 -0
- package/docs/specs/remote-tool-enhancement/spec.md +1 -0
- package/lib/BrowserWebSocketTransport.js +4 -0
- package/lib/{BrowserWebSocketTransport-wm99h94r.js → BrowserWebSocketTransport2.js} +1 -1
- package/lib/LaunchOptions.js +4 -0
- package/lib/{LaunchOptions-5eg7E0ye.js → LaunchOptions2.js} +1 -1
- package/lib/{NodeWebSocketTransport-D9ysYGLM.js → NodeWebSocketTransport.js} +2 -2
- package/lib/NodeWebSocketTransport2.js +4 -0
- package/lib/{bidi-CwabFH07.js → bidi.js} +4 -4
- package/lib/client/index.js +59 -6
- package/lib/compaction/index.d.ts +1 -1
- package/lib/compaction/index.js +1 -1
- package/lib/failover/index.d.ts +1 -1
- package/lib/failover/index.js +1 -1
- package/lib/fs-aware/sandbox-plugin.js +1 -1
- package/lib/{index-browser-B-9jm12n.js → index-browser.js} +6 -6
- package/lib/index.d.ts +2 -12
- package/lib/index.js +58 -62
- package/lib/kernel-env.d.ts +5 -15
- package/lib/kernel-env.js +2 -2
- package/lib/kernel-env2.js +76 -0
- package/lib/{lsp-server-registry-BcdkHROD.js → lsp-server-registry2.js} +1 -1
- package/lib/{main-BeCgUd20.js → main.js} +1 -1
- package/lib/{main-Dv_UQqG2.js → main2.js} +1 -1
- package/lib/mobile/plugin.d.ts +2 -2
- package/lib/mobile/plugin.js +2 -2
- package/lib/{puppeteer-core-Dnd7eqel.js → puppeteer-core.js} +9 -9
- package/lib/py-sdk.js +1 -1
- package/lib/remote/helper-bin/MANIFEST.json +35 -0
- package/lib/remote/helper-bin/aarch64-apple-darwin/BUILT-VER +1 -0
- package/lib/remote/helper-bin/aarch64-apple-darwin/superd-run +0 -0
- package/lib/remote/helper-bin/aarch64-unknown-linux-musl/BUILT-VER +1 -0
- package/lib/remote/helper-bin/aarch64-unknown-linux-musl/superd-run +0 -0
- package/lib/remote/helper-bin/x86_64-pc-windows-gnu/BUILT-VER +1 -0
- package/lib/remote/helper-bin/x86_64-pc-windows-gnu/superd-run.exe +0 -0
- package/lib/remote/helper-bin/x86_64-unknown-linux-musl/BUILT-VER +1 -0
- package/lib/remote/helper-bin/x86_64-unknown-linux-musl/superd-run +0 -0
- package/lib/remote/plugin.d.ts +172 -51
- package/lib/remote/plugin.js +2168 -718
- package/lib/url-schemes/index.d.ts +11 -11
- package/lib/url-schemes/index.js +12 -12
- package/lib/{wasm_bg-CNXhHjVg.js → wasm_bg.js} +1 -1
- package/lib/web-password.d.ts +7 -7
- package/lib/web-password.js +1 -1
- package/lib/web-trust.d.ts +1 -1
- package/lib/web-trust.js +2 -2
- package/lib/{web-trust-D6gJpUMf.js → web-trust2.js} +20 -8
- package/lib/welcome-notice.js +1 -1
- package/package.json +4 -4
- package/scripts/kernel-check.mjs +5 -0
- package/lib/BrowserWebSocketTransport-D1aFReu_.js +0 -4
- package/lib/LaunchOptions-DxQQ0s-A.js +0 -4
- package/lib/NodeWebSocketTransport-BRLjmu2R.js +0 -4
- package/lib/kernel-env-BOF0fNHn.js +0 -91
- package/scripts/kernel-provision.mjs +0 -5
- /package/lib/{chunk-DQxbwPpZ.js → chunk.js} +0 -0
- /package/lib/{index-DTDXUe6m.d.ts → index2.d.ts} +0 -0
- /package/lib/{lib-C8_jXvwA.js → lib.js} +0 -0
- /package/lib/{lsp-server-registry-D4VLs1Sm.js → lsp-server-registry.js} +0 -0
- /package/lib/{native-capture-BEByDXYM.js → native-capture.js} +0 -0
- /package/lib/{py-sdk-D7klhpWb.js → py-sdk2.js} +0 -0
- /package/lib/{util-BHL_dfV_.js → util.js} +0 -0
- /package/lib/{web-tree-sitter-CPrPD4J2.js → web-tree-sitter.js} +0 -0
- /package/lib/{web-trust-CwZrTBcl.d.ts → web-trust2.d.ts} +0 -0
- /package/lib/{wrap-0VA0uFx8.js → wrap.js} +0 -0
package/lib/remote/plugin.d.ts
CHANGED
|
@@ -13,16 +13,10 @@ interface SshConnection {
|
|
|
13
13
|
readonly key?: string;
|
|
14
14
|
readonly proxyJump?: string;
|
|
15
15
|
}
|
|
16
|
-
/** One instance per Agent-owned driver; destroyed with its Agent/plugin owners. */
|
|
17
|
-
declare class SshTargets {
|
|
18
|
-
private readonly targets;
|
|
19
|
-
register(label: string, connection: SshConnection): SshConnection;
|
|
20
|
-
get(label: string): SshConnection | undefined;
|
|
21
|
-
entries(): ReadonlyArray<readonly [string, SshConnection]>;
|
|
22
|
-
clear(): void;
|
|
23
|
-
}
|
|
24
16
|
/** Shared by execution, probes and file/relay consumers. extraArgs is trusted
|
|
25
|
-
* internal SSH argv (e.g. forwarding), never a model-provided shell string.
|
|
17
|
+
* internal SSH argv (e.g. forwarding), never a model-provided shell string.
|
|
18
|
+
* Identity assembly lives in ssh-argv.ts (the ONE policy — 2026-10-17 ruling);
|
|
19
|
+
* this wrapper only picks the tty/batch dialect base. */
|
|
26
20
|
declare function sshArgv(connection: SshConnection, options?: {
|
|
27
21
|
tty?: boolean;
|
|
28
22
|
extraArgs?: readonly string[];
|
|
@@ -40,7 +34,12 @@ interface TransferReceipt {
|
|
|
40
34
|
action: 'copy';
|
|
41
35
|
src: string;
|
|
42
36
|
dst: string;
|
|
43
|
-
|
|
37
|
+
route: 'hub-staged';
|
|
38
|
+
/** S4: tier actually performed — sha256 digests ran and matched, or explicitly skipped. */
|
|
39
|
+
verification: 'sha256' | 'not-applicable';
|
|
40
|
+
/** S3 unified failure envelope. */
|
|
41
|
+
ok: boolean;
|
|
42
|
+
reason?: 'digest-mismatch' | 'staging-error' | 'aborted';
|
|
44
43
|
sourceDigest?: string;
|
|
45
44
|
destinationDigest?: string;
|
|
46
45
|
bytes: number;
|
|
@@ -77,8 +76,16 @@ interface NativeCopyReceipt {
|
|
|
77
76
|
stdout: string[];
|
|
78
77
|
stderr: string[];
|
|
79
78
|
outputTruncated: boolean;
|
|
80
|
-
/**
|
|
81
|
-
|
|
79
|
+
/** S3/S4 (spec §3.3): verification names the tier actually performed — native routes are exit-code-only (D1=A). */
|
|
80
|
+
verification: 'native-exit-only';
|
|
81
|
+
/** S3 unified failure envelope: all native exits zero. */
|
|
82
|
+
ok: boolean;
|
|
83
|
+
/** Failure class when ok is false. */
|
|
84
|
+
reason?: 'non-zero-exit' | 'aborted';
|
|
85
|
+
/** Human context, e.g. two-segment 'push not started: pull failed' (prose moved out of route, S8). */
|
|
86
|
+
note?: string;
|
|
87
|
+
/** D3 mkdir pre-hop outcome: true = created this call, false = already existed, 'n-a' = skipped or unavailable (detail in note). */
|
|
88
|
+
created?: true | false | 'n-a';
|
|
82
89
|
/** Tool-owned staging/config release: released on normal/observed exit, unknown when a channel was lost. */
|
|
83
90
|
cleanup: 'released' | 'unknown' | 'none-required';
|
|
84
91
|
}
|
|
@@ -126,6 +133,10 @@ interface RsyncReceipt extends RunResult {
|
|
|
126
133
|
transferredBytes?: number;
|
|
127
134
|
/** Two-SSH route actually used, when applicable. */
|
|
128
135
|
route?: 'local-ssh' | 'ssh-ssh-forward' | 'ssh-ssh-stdio';
|
|
136
|
+
/** S3/S4: exit-code-only tier (D1=A) + unified failure envelope. */
|
|
137
|
+
verification: 'native-exit-only';
|
|
138
|
+
ok: boolean;
|
|
139
|
+
reason?: 'non-zero-exit' | 'aborted';
|
|
129
140
|
}
|
|
130
141
|
/**
|
|
131
142
|
* Native rsync with ordered caller options. Local↔SSH runs rsync directly with
|
|
@@ -136,6 +147,58 @@ interface RsyncReceipt extends RunResult {
|
|
|
136
147
|
*/
|
|
137
148
|
declare function runRsync(request: RsyncRequest, source: RsyncEndpoint, destination: RsyncEndpoint, signal: AbortSignal, options?: RelayRsyncOptions): Promise<RsyncReceipt>;
|
|
138
149
|
//#endregion
|
|
150
|
+
//#region src/remote/helper.d.ts
|
|
151
|
+
interface HelperManifest {
|
|
152
|
+
format: 1;
|
|
153
|
+
name: string;
|
|
154
|
+
ver: string;
|
|
155
|
+
protocol: number;
|
|
156
|
+
targets: Record<string, {
|
|
157
|
+
file: string;
|
|
158
|
+
bytes: number;
|
|
159
|
+
sha256: string;
|
|
160
|
+
}>;
|
|
161
|
+
}
|
|
162
|
+
interface HelperAssets {
|
|
163
|
+
dir: string;
|
|
164
|
+
manifest: HelperManifest;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/remote/nonce-framing.d.ts
|
|
168
|
+
interface EnvDelta {
|
|
169
|
+
added: string[];
|
|
170
|
+
changed: string[];
|
|
171
|
+
removed: string[];
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/remote/pty-session.d.ts
|
|
175
|
+
/** detached job 的完成结果(frame 或会话死亡时结算;与 dispatch 回执同构)。 */
|
|
176
|
+
interface PtyJobResult {
|
|
177
|
+
output: string;
|
|
178
|
+
outputStats?: StreamOutputStats;
|
|
179
|
+
exit: number | null;
|
|
180
|
+
cwd: string | null;
|
|
181
|
+
timedOut: boolean;
|
|
182
|
+
commandId: string;
|
|
183
|
+
envDelta?: EnvDelta;
|
|
184
|
+
}
|
|
185
|
+
/** P4/P5(2026-10-19)running job 句柄:byte-cursor 增量读 + P8 显式中断 + 完成时帧结算。 */
|
|
186
|
+
interface PtyRunningJob {
|
|
187
|
+
/** 账本键:与 jobId 同构(background 通道预传入 registry id;同步完成命令用同格式生成 id)。 */
|
|
188
|
+
commandId: string;
|
|
189
|
+
/** Byte-cursor incremental read over the command's merged output (tail-ring retention; lossy reports eviction). */
|
|
190
|
+
read: (fromByte: number) => {
|
|
191
|
+
text: string;
|
|
192
|
+
nextOffset: number;
|
|
193
|
+
lossy: boolean;
|
|
194
|
+
};
|
|
195
|
+
stats: () => OutputStats;
|
|
196
|
+
/** P8 两段式 ^C 中断(会话存活;trap-INT 走宽限 group-kill 兜底)。 */
|
|
197
|
+
interrupt: () => void;
|
|
198
|
+
/** Settles on the exit frame, or with exit null when the session dies. */
|
|
199
|
+
done: Promise<PtyJobResult>;
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
139
202
|
//#region src/remote/process.d.ts
|
|
140
203
|
declare const PROCESS_CLEANUP_BOUND_MS: number;
|
|
141
204
|
interface ProcessOptions {
|
|
@@ -183,7 +246,6 @@ interface ProbeOptions {
|
|
|
183
246
|
//#endregion
|
|
184
247
|
//#region src/remote/roster.d.ts
|
|
185
248
|
interface RosterOptions {
|
|
186
|
-
byosshLabels?: readonly string[];
|
|
187
249
|
/** 测试缝:替代 runOneShot 的容器扫描执行器。 */
|
|
188
250
|
runner?: (argv: string[], opts?: OneShotOptions) => Promise<OneShotResult>;
|
|
189
251
|
/** 测试缝:替代 ~/.ssh/config 读取。 */
|
|
@@ -206,10 +268,25 @@ interface RemoteCallResult {
|
|
|
206
268
|
truncated?: number;
|
|
207
269
|
outputStats?: StreamOutputStats;
|
|
208
270
|
outputStatsUnavailable?: boolean;
|
|
209
|
-
/**
|
|
271
|
+
/** §5.2 回执字段序:session(+label)→ connection → commandId → state 字段(cwd/envDelta/ttlSec/exit)。 */
|
|
210
272
|
session?: string;
|
|
211
|
-
|
|
273
|
+
label?: string;
|
|
274
|
+
connection?: string;
|
|
275
|
+
/** (byo-pty)/(byo-ssh) 来源标注(创建回执与 roster/card;native 回执省略)。 */
|
|
276
|
+
byoTag?: 'byo-pty' | 'byo-ssh';
|
|
277
|
+
commandId?: string;
|
|
278
|
+
envDelta?: EnvDelta;
|
|
279
|
+
/** 引导/教学行;无则省略。 */
|
|
212
280
|
notice?: string;
|
|
281
|
+
/** oneshot 监督路径的如实标注:`superd-run <ver> (<triple>)` 或 `posix-shim`(spec remote-rescope §5)。 */
|
|
282
|
+
runner?: string;
|
|
283
|
+
/** P4/P5(2026-10-19):true = pty 命令仍在前台运行(回执 = handoff),ptyJob 随行供 job 通道接管。 */
|
|
284
|
+
running?: boolean;
|
|
285
|
+
ptyJob?: PtyRunningJob;
|
|
286
|
+
/** 本会话 idle TTL 剩余(秒);回执即状态快照(P2/P3:状态留在上下文里)。 */
|
|
287
|
+
ttlSec?: number;
|
|
288
|
+
/** 预热(创建形无 cmd)回执 = true。 */
|
|
289
|
+
created?: boolean;
|
|
213
290
|
}
|
|
214
291
|
interface RemoteAuditRecord {
|
|
215
292
|
target: string;
|
|
@@ -234,31 +311,39 @@ interface RemoteDriverOptions {
|
|
|
234
311
|
ptyArgvFor?: (plan: TargetPlan) => string[];
|
|
235
312
|
spawnArgvFor?: (spawnCommand: string) => string[];
|
|
236
313
|
probeRunner?: ProbeOptions['runner'];
|
|
237
|
-
/**
|
|
314
|
+
/** 测试/验收缝:helper 资产来源(默认 lib 旁挂 helper-bin);显式 null 强制 shim 路径。 */
|
|
315
|
+
helperAssetsFor?: () => HelperAssets | null;
|
|
316
|
+
/** 测试缝:roster 扫描执行器(裸名解析复用)。 */
|
|
238
317
|
rosterRunner?: RosterOptions['runner'];
|
|
239
|
-
/** 测试缝:ssh config
|
|
318
|
+
/** 测试缝:ssh config 读取(裸名解析复用)。 */
|
|
240
319
|
sshConfigReader?: () => Promise<string>;
|
|
241
320
|
}
|
|
242
|
-
/**
|
|
321
|
+
/** 双轨调度器:参数校验 → 目标语法(parseTargetForm)→ 统一 label 池 → oneshot 子进程 / pty 会话池。 */
|
|
243
322
|
declare class RemoteDriver {
|
|
244
323
|
private readonly opts;
|
|
245
|
-
private readonly sshTargets;
|
|
246
324
|
private readonly pool;
|
|
325
|
+
private readonly labels;
|
|
247
326
|
private readonly hubOwner;
|
|
248
327
|
private readonly hubProviders;
|
|
249
328
|
private readonly processes;
|
|
250
329
|
private readonly starting;
|
|
251
330
|
private readonly fileAbort;
|
|
252
331
|
private disposed;
|
|
332
|
+
/** undefined = 未尝试;null = 资产缺失(shim-only);registry = 每 target sticky 状态机。 */
|
|
333
|
+
private helpers;
|
|
334
|
+
private readonly runnerOf;
|
|
253
335
|
private disposal;
|
|
336
|
+
private readonly ptyIdleTtlSec;
|
|
254
337
|
constructor(opts?: RemoteDriverOptions);
|
|
255
338
|
call(params: RemoteCallParams, callCtx?: {
|
|
256
339
|
sessionKey?: string;
|
|
340
|
+
ptyBackground?: boolean;
|
|
341
|
+
commandId?: string;
|
|
257
342
|
}): Promise<RemoteCallResult>;
|
|
258
|
-
/**
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
343
|
+
/** 参数互斥矩阵(§2):spawn/ssh 是 BYO 入口(参数在场即 BYO),只与对应形态的 target 配对。 */
|
|
344
|
+
private validate;
|
|
345
|
+
private execute;
|
|
346
|
+
/** Native-first copy routing (spec: remote-native-shortcut) — unchanged by the workbench round. */
|
|
262
347
|
copy(request: CopyRequest & {
|
|
263
348
|
argv?: unknown;
|
|
264
349
|
pullArgv?: unknown;
|
|
@@ -270,44 +355,80 @@ declare class RemoteDriver {
|
|
|
270
355
|
sessionKey?: string;
|
|
271
356
|
}): Promise<RsyncReceipt>;
|
|
272
357
|
/** Only called from JobSpec.run: admission precedes local file reads and discovery. */
|
|
273
|
-
start(input: RemoteInput, signal: AbortSignal
|
|
358
|
+
start(input: RemoteInput, signal: AbortSignal, callCtx?: {
|
|
359
|
+
sessionKey?: string;
|
|
360
|
+
}): Promise<RemoteProcess>;
|
|
274
361
|
private startPrepared;
|
|
275
362
|
private nativeProcess;
|
|
363
|
+
/** Helper bootstrap is best-effort and sticky: any failure parks null for this driver
|
|
364
|
+
* lifetime and the shim stays the path. First call to a target pays probe (+ upload). */
|
|
365
|
+
private ensureHelper;
|
|
366
|
+
private helperExec;
|
|
276
367
|
private own;
|
|
277
|
-
/**
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
private
|
|
284
|
-
/**
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
368
|
+
/** 现场采集机器面并 merge 进本 session 注册表(ssh → docker → incus → hub,迟到者加前缀)。错误逐段吞掉(roster 另行如实呈现)。 */
|
|
369
|
+
private refreshMachines;
|
|
370
|
+
/** 池寻址:命中即回;miss 现场采集一次再寻址(docker 容器名不经 roster 也可达)。 */
|
|
371
|
+
private resolvePoolEntry;
|
|
372
|
+
private planOf;
|
|
373
|
+
/** ssh:<name> 的池感知解析:BYO 身份 → 其 connection;否则按 config 别名/主机名。 */
|
|
374
|
+
private sshPlanFor;
|
|
375
|
+
/** BYO ssh 注册(v2:无 spec 对比——label 占用即拒;注册成功才认领)。返回实际名(label 或 s-id)。 */
|
|
376
|
+
private registerByoSsh;
|
|
377
|
+
/** PTY 会话创建(native/spawn 同一形状):上限 → label 认领 → 惰性会话(失败由 onDead 释放 label)。 */
|
|
378
|
+
private createSession;
|
|
379
|
+
private ttlMinutes;
|
|
380
|
+
/** connection 由 BYO ssh 身份建立 → card 面标 `(built on)`(与 roster 同词,R2 复核 P2-10)。 */
|
|
381
|
+
private isBuiltOn;
|
|
382
|
+
/** PTY 创建形唯一实现(execute 与 background 预建共用):spawn BYO / ssh BYO / native `<transport>:pty`。 */
|
|
383
|
+
private createPtyLane;
|
|
384
|
+
/** background PTY lane:会话先占位(不拨号)再进官方 jobs registry——首回执必须能寻址;
|
|
385
|
+
* registry 拒绝时把新建的会话拆掉(复用形的会话绝不拆)。返回 undefined = 走普通 oneshot job。 */
|
|
386
|
+
preparePtyLane(params: RemoteCallParams, callCtx?: {
|
|
387
|
+
sessionKey?: string;
|
|
388
|
+
}): Promise<{
|
|
389
|
+
input: RemoteInput;
|
|
390
|
+
session: string;
|
|
391
|
+
connection: string;
|
|
392
|
+
label?: string;
|
|
393
|
+
cleanup: () => void;
|
|
394
|
+
} | undefined>;
|
|
395
|
+
/** `pty:<id|label>` 寻址:先 id 后 label;miss 给重建形式。 */
|
|
396
|
+
private resolvePty;
|
|
397
|
+
/** §6 close:默认撞 detached job 报错(列杀法);force = 杀组+关闭(披露 killed)。幂等 not-found。 */
|
|
398
|
+
closePty(selector: string, sessionKey: string, force?: boolean): {
|
|
399
|
+
session: string;
|
|
400
|
+
connection: string;
|
|
401
|
+
closed: boolean;
|
|
402
|
+
reason?: string;
|
|
403
|
+
killed: string[];
|
|
404
|
+
message?: string;
|
|
405
|
+
};
|
|
406
|
+
/** job 通道收养回填(timeout handoff 时 registry id ≠ commandId,账本记录两者)。 */
|
|
407
|
+
attachPtyJob(commandId: string, jobId: string, sessionKey: string): void;
|
|
408
|
+
private dispatchPty;
|
|
409
|
+
/** 预热(创建形无 cmd)回执:§3——无 commandId/envDelta;timeout 忽略。 */
|
|
410
|
+
private warmReceipt;
|
|
411
|
+
/** session card 回执(`pty:<id|label>` 无 cmd):connection/state/cwd + 最近 20 条账本(不带输出尾,§9 Q7)。 */
|
|
412
|
+
private cardReceipt;
|
|
413
|
+
private oneshot;
|
|
414
|
+
private hubOneshot;
|
|
415
|
+
private hubOneshotProcess;
|
|
416
|
+
/** Ruling P19 + §2.5:roster = 注意力入口——本地扫描刷新统一池,零拨号;机器面公共,会话面 caller-scoped。 */
|
|
288
417
|
roster(callCtx?: {
|
|
289
418
|
sessionKey?: string;
|
|
290
419
|
}): Promise<string>;
|
|
420
|
+
/** status probe(target 无 cmd):机器面 = probe + 该 connection 上的会话;pty selector = session card。 */
|
|
291
421
|
status(target: string, callCtx?: {
|
|
292
422
|
sessionKey?: string;
|
|
293
423
|
}): Promise<string>;
|
|
294
|
-
/**
|
|
295
|
-
private ptyStatus;
|
|
296
|
-
/** Ruling 13:审计 best-effort——钩子抛错不得影响命令路径(成功被毒化成失败+双重审计)。 */
|
|
424
|
+
/** Ruling 13:审计 best-effort——钩子抛错不得影响命令路径。 */
|
|
297
425
|
private audit;
|
|
298
|
-
/**
|
|
299
|
-
registerSsh(target: string, connection: SshConnection): string;
|
|
300
|
-
private byosshPlan;
|
|
301
|
-
/** Single target resolver for later copy/rsync; BYO identities cannot be
|
|
302
|
-
* independently re-resolved through the origin's alias table. */
|
|
426
|
+
/** Single target resolver for later copy/rsync; PTY sessions are not filesystem connections. */
|
|
303
427
|
resolveConnectionTarget(target: string, callCtx?: {
|
|
304
428
|
sessionKey?: string;
|
|
305
429
|
}): Promise<TargetPlan>;
|
|
306
|
-
|
|
307
|
-
private
|
|
308
|
-
/** BYO-PTY 通道:label 即池键(agent 前缀之外),spawn 只在 label 尚不存在时被接受。
|
|
309
|
-
* 三分支 —— 建(无会话)/ 复用(无 spawn,或有 spawn 且与创建来源相同)/ **冲突(有 spawn 且来源不同:不执行任何命令)**。 */
|
|
310
|
-
private ptyCall;
|
|
430
|
+
/** P2/P3:回执即状态快照——idle TTL 剩余随每次 pty 回执带回。 */
|
|
431
|
+
private ptyTtl;
|
|
311
432
|
hasHub(): boolean;
|
|
312
433
|
private requireHub;
|
|
313
434
|
private assertOpen;
|
|
@@ -320,13 +441,13 @@ interface RemoteInput {
|
|
|
320
441
|
spawn?: string;
|
|
321
442
|
ssh?: SshConnection;
|
|
322
443
|
cmd?: string;
|
|
323
|
-
|
|
444
|
+
scriptPath?: string;
|
|
324
445
|
stdin?: string;
|
|
325
446
|
mode?: 'oneshot' | 'pty';
|
|
326
447
|
timeout?: number;
|
|
327
448
|
}
|
|
328
449
|
interface PreparedRemoteInput {
|
|
329
|
-
target
|
|
450
|
+
target?: string;
|
|
330
451
|
spawn?: string;
|
|
331
452
|
ssh?: SshConnection;
|
|
332
453
|
cmd: string;
|
|
@@ -475,4 +596,4 @@ declare const _default: {
|
|
|
475
596
|
apply: (ctx: Context, config: RemoteRowConfig) => (() => void);
|
|
476
597
|
};
|
|
477
598
|
//#endregion
|
|
478
|
-
export { type BinaryFileEndpoint, ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, type HubRemoteTransport, type HubTarget, type OutputStats, PROCESS_CLEANUP_BOUND_MS, type PreparedRemoteInput, RemoteConfigValidator, type RemoteInput, type RemoteProcess, RemoteRowConfig, type RsyncEndpoint, type RsyncReceipt, type RsyncRequest, type SshConnection,
|
|
599
|
+
export { type BinaryFileEndpoint, ByteTailRing, Config, FILE_FRAME_BYTES, FILE_MAX_ENTRIES, FILE_MAX_METADATA, type HubRemoteTransport, type HubTarget, type OutputStats, PROCESS_CLEANUP_BOUND_MS, type PreparedRemoteInput, RemoteConfigValidator, type RemoteInput, type RemoteProcess, RemoteRowConfig, type RsyncEndpoint, type RsyncReceipt, type RsyncRequest, type SshConnection, type StreamOutputStats, Utf16TailRing, apply, checkAbsolute, checkSelection, _default as default, inject, localFileEndpoint, name, readUtf8Tail, runFileWorker, runRsync, sshArgv, startBinaryProcess, startOneShot, startRemoteJob };
|