dsh-ssh-tui 0.5.8 → 0.5.9
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 +1 -0
- package/README.md +8 -0
- package/lib/display-sock.js +11 -16
- package/lib/display-sock.js.map +1 -1
- package/lib/i18n/en.js +1 -0
- package/lib/i18n/en.js.map +1 -1
- package/lib/i18n/zh.js +1 -0
- package/lib/i18n/zh.js.map +1 -1
- package/lib/index.js +51 -6
- package/lib/index.js.map +1 -1
- package/lib/picker.js +19 -15
- package/lib/picker.js.map +1 -1
- package/lib/session-lock.js +5 -2
- package/lib/session-lock.js.map +1 -1
- package/lib/tui.js +20 -0
- package/lib/tui.js.map +1 -1
- package/lib/types/display-sock.d.ts +8 -5
- package/lib/types/index.d.ts +4 -0
- package/lib/types/picker.d.ts +6 -5
- package/lib/types/tui.d.ts +2 -0
- package/package.json +1 -1
|
@@ -90,12 +90,15 @@ export declare class DisplayHost {
|
|
|
90
90
|
close(): Promise<void>;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* True once
|
|
93
|
+
* True once a Host is actually accepting on the display channel.
|
|
94
94
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
95
|
+
* Always a real connect, never a filesystem check: a leftover `.sock` file
|
|
96
|
+
* (killed Host, or one that is mid-dispose) is a directory entry, not a peer,
|
|
97
|
+
* and `fs.access()` used to report it as ready — the launcher then wrote HELLO
|
|
98
|
+
* into a dead socket and the first reconnect after a drop died with
|
|
99
|
+
* `write EPIPE`. Windows pipes additionally cannot be seen by `fs.access` at
|
|
100
|
+
* all. The Host treats a connect without HELLO as a liveness probe and drops
|
|
101
|
+
* it without stealing the display.
|
|
99
102
|
*/
|
|
100
103
|
export declare function displaySockExists(path: string, timeoutMs?: number): Promise<boolean>;
|
|
101
104
|
/** Watches a freshly spawned Host so a crash is reported immediately. */
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* subagents, sandbox approvals) is the same one the web surface uses.
|
|
6
6
|
*/
|
|
7
7
|
import type { Context } from '@deepseek-ai/cordis';
|
|
8
|
+
/** A relay that dies this soon after connecting reached a Host that was leaving. */
|
|
9
|
+
export declare const ATTACH_RECOVERY_WINDOW_MS = 5000;
|
|
10
|
+
/** True when a relay error means the peer vanished rather than a real fault. */
|
|
11
|
+
export declare function attachPeerVanished(error: unknown, elapsedMs: number): boolean;
|
|
8
12
|
export declare const name = "ssh-tui";
|
|
9
13
|
/** Core services required before the terminal channel can drive an agent. */
|
|
10
14
|
export declare const inject: string[];
|
package/lib/types/picker.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* typing filters by title / id / cwd, and Enter confirms the focused row.
|
|
9
9
|
*/
|
|
10
10
|
import type { Context } from '@deepseek-ai/cordis';
|
|
11
|
-
import { type ResumableSession } from './session-list.js';
|
|
11
|
+
import { listResumableSessionsProgressive, type ResumableSession } from './session-list.js';
|
|
12
12
|
/** What the launch picker decided. */
|
|
13
13
|
export type SessionPickerResult = {
|
|
14
14
|
kind: 'resume';
|
|
@@ -119,9 +119,10 @@ export declare function feedPicker(state: SessionPickerState, text: string, wind
|
|
|
119
119
|
* @param signal - optional abort signal (fiber dispose) to cancel the picker.
|
|
120
120
|
* @returns the selection, or null when cancelled.
|
|
121
121
|
*/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
streams?: {
|
|
122
|
+
/** Injection seams for tests; production uses the TTY and the session index. */
|
|
123
|
+
export interface SessionPickerOptions {
|
|
125
124
|
stdin?: NodeJS.ReadStream;
|
|
126
125
|
stdout?: NodeJS.WriteStream;
|
|
127
|
-
|
|
126
|
+
listSessions?: typeof listResumableSessionsProgressive;
|
|
127
|
+
}
|
|
128
|
+
export declare function showSessionPicker(ctx: Context, color: boolean, signal?: AbortSignal, options?: SessionPickerOptions): Promise<SessionPickerResult>;
|
package/lib/types/tui.d.ts
CHANGED
|
@@ -185,6 +185,8 @@ export declare class SshTui {
|
|
|
185
185
|
private liveStreamOwner;
|
|
186
186
|
/** Live events parked while the (yielding) history replay holds the floor. */
|
|
187
187
|
private replayQueue;
|
|
188
|
+
/** A relay claimed the display while a hangup was still cancelling/flushing. */
|
|
189
|
+
private reattachedDuringHangup;
|
|
188
190
|
private readonly pendingToolTimes;
|
|
189
191
|
private readonly usageByStep;
|
|
190
192
|
private lastStatsTurn;
|