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.
@@ -90,12 +90,15 @@ export declare class DisplayHost {
90
90
  close(): Promise<void>;
91
91
  }
92
92
  /**
93
- * True once something is listening on the display channel.
93
+ * True once a Host is actually accepting on the display channel.
94
94
  *
95
- * `fs.access(path, F_OK)` cannot see a Windows named pipe (it goes through
96
- * GetFileAttributesW, which does not resolve the pipe namespace), so pipes are
97
- * checked with a real connect. The Host deliberately treats a connect without
98
- * HELLO as a liveness probe and drops it without stealing the display.
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. */
@@ -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[];
@@ -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
- export declare function showSessionPicker(ctx: Context, color: boolean, signal?: AbortSignal,
123
- /** Injectable for tests; production always drives the real TTY streams. */
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
- }): Promise<SessionPickerResult>;
126
+ listSessions?: typeof listResumableSessionsProgressive;
127
+ }
128
+ export declare function showSessionPicker(ctx: Context, color: boolean, signal?: AbortSignal, options?: SessionPickerOptions): Promise<SessionPickerResult>;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ssh-tui",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "SSH-friendly interactive terminal TUI plugin for DeepSeek Harness",
5
5
  "keywords": [
6
6
  "deepseek-harness",