dsh-ssh-tui 0.6.0 → 0.6.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.
@@ -59,9 +59,6 @@ export declare const LOCAL_COMMANDS: readonly [{
59
59
  }, {
60
60
  readonly name: "subagents";
61
61
  readonly key: "cmd.subagents";
62
- }, {
63
- readonly name: "resume";
64
- readonly key: "cmd.resume";
65
62
  }, {
66
63
  readonly name: "setup";
67
64
  readonly key: "cmd.setup";
@@ -9,13 +9,7 @@ export { ATTACH_RECOVERY_WINDOW_MS, attachPeerVanished } from './attach.js';
9
9
  export declare const name = "ssh-tui";
10
10
  /** Core services required before the terminal channel can drive an agent. */
11
11
  export declare const inject: string[];
12
- /**
13
- * Grace allowed to the launcher's graceful `appExit` before the process is
14
- * forced out. That shutdown only sets `process.exitCode`, and a lingering
15
- * event-loop handle (the profile patch watcher) can keep the drain from ever
16
- * finishing — with the user's shell still blocked on the foreground process.
17
- */
18
- export declare const EXIT_FALLBACK_MS = 2000;
12
+ export { EXIT_FALLBACK_MS, createLauncherExit } from './launcher-exit.js';
19
13
  /** Plugin config: the session identity and presentation defaults. */
20
14
  export interface Config {
21
15
  sessionId: string;
@@ -0,0 +1,20 @@
1
+ /** Grace allowed to the launcher's graceful `appExit` before the process is forced out. */
2
+ export declare const EXIT_FALLBACK_MS = 2000;
3
+ export interface LauncherExitOptions {
4
+ /** Resolves the host's graceful shutdown at exit time (it may be registered later). */
5
+ appExit?: () => ((code: number) => void) | undefined;
6
+ /** Bound on the graceful drain; the TTY is already handed back when it fires. */
7
+ fallbackMs?: number;
8
+ stdin?: NodeJS.ReadStream;
9
+ /** Process exit, injectable for tests. */
10
+ force?: (code: number) => void;
11
+ /** Timer factory, injectable for tests. */
12
+ schedule?: (handler: () => void, ms: number) => {
13
+ unref?: () => void;
14
+ };
15
+ }
16
+ /**
17
+ * Build the one function every launcher exit path calls. Esc from the picker,
18
+ * a replaced window, `/exit`, and the error paths all funnel through it.
19
+ */
20
+ export declare function createLauncherExit(options?: LauncherExitOptions): (code: number) => void;
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Shared history-session listing for the SSH TUI: the launch picker and the
3
- * in-app `/resume` command use the same candidates, labels, and ordering, so
4
- * both surfaces offer the same sessions.
2
+ * Shared history-session listing for the SSH TUI: the launch picker's lazy
3
+ * pages and the eager `listResumableSessions` listing use the same candidates,
4
+ * labels, and ordering, so both surfaces offer the same sessions.
5
5
  */
6
6
  import { listAttachableHosts } from './session-lock.js';
7
7
  /** Last path segment for the footer chip (`\root\genshin\srv` → `srv`). */
@@ -71,7 +71,7 @@ export interface ResumableSessionPage {
71
71
  export interface ResumableSessionPager {
72
72
  /** Inspect onward until `size` more rows exist, or history runs out. */
73
73
  page(size?: number): Promise<ResumableSessionPage>;
74
- /** Read every remaining candidate (the `/resume` flow wants the whole list). */
74
+ /** Read every remaining candidate (the eager listing wants the whole list). */
75
75
  complete(): Promise<ResumableSession[]>;
76
76
  }
77
77
  /** Sessions read before the picker's first paint, and per lazy page after it. */
@@ -77,8 +77,8 @@ export declare function windowsProcessMatchesLock(lock: SessionLockInfo, identit
77
77
  * behavior is kept.
78
78
  *
79
79
  * Async because the Windows probe spawns PowerShell, and this runs on the
80
- * render path (`/resume` inspects every lock); a synchronous spawn would
81
- * freeze painting and keystrokes for the duration of the probe.
80
+ * history-listing path (the picker inspects every lock); a synchronous spawn
81
+ * would freeze painting and keystrokes for the duration of the probe.
82
82
  */
83
83
  export declare function lockOwnerIsAlive(lock: SessionLockInfo): Promise<boolean>;
84
84
  export declare function formatLockHeldMessage(lock: SessionLockInfo): string;
@@ -63,12 +63,8 @@ export interface TuiConfig {
63
63
  presetId?: string;
64
64
  /** Display name of the active preset. */
65
65
  presetName?: string;
66
- /** Switch the running TUI to another session (used by /resume). */
67
- onSwitchSession?: (sessionId: string) => Promise<void> | void;
68
66
  /** Notify the launcher of an explicit in-process selection change. */
69
67
  onSelectionChanged?: (selection: ModelSelection) => void;
70
- /** Open the history-session picker immediately after mounting (--resume). */
71
- resumePicker?: boolean;
72
68
  /**
73
69
  * Minimum milliseconds between paints while a turn is streaming.
74
70
  * Jump-host / proxied SSH can raise this so token ticks do not flood the
@@ -157,9 +153,7 @@ export declare class SshTui {
157
153
  private readonly providerName;
158
154
  private readonly selectionRef;
159
155
  private readonly subagentSelection;
160
- private readonly onSwitchSession;
161
156
  private readonly onSelectionChanged;
162
- private readonly resumePicker;
163
157
  private readonly disposers;
164
158
  private userQuestionDisposer;
165
159
  private presetId;
@@ -574,8 +568,6 @@ export declare class SshTui {
574
568
  private runDisconnectCommand;
575
569
  /** /mode: pick an agent preset (standard / minimal / ptc / cordis / routing-suite / ...). */
576
570
  private runModeCommand;
577
- /** /resume: switch to a past session, or open a picker when no id is given. */
578
- private runResumeCommand;
579
571
  /** Current provider route selected for the running agent. */
580
572
  private currentProvider;
581
573
  /** Resolve one credential reference without exposing its value. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ssh-tui",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "SSH-friendly interactive terminal TUI plugin for DeepSeek Harness",
5
5
  "keywords": [
6
6
  "deepseek-harness",