/** * dsh-ssh-tui — an SSH-friendly interactive terminal front door for DeepSeek * Harness. The bundle rides over @deepseek-ai/dsh-base and drives one * configured agent, so the whole plugin ecosystem (shell, filesystem, skills, * subagents, sandbox approvals) is the same one the web surface uses. */ import type { Context } from '@deepseek-ai/cordis'; export { ATTACH_RECOVERY_WINDOW_MS, attachPeerVanished } from './attach.js'; import z from '@deepseek-ai/schemastery'; export declare const name = "ssh-tui"; /** Core services required before the terminal channel can drive an agent. */ export declare const inject: string[]; export { EXIT_FALLBACK_MS, createLauncherExit } from './launcher-exit.js'; /** Plugin config: the session identity and presentation defaults. */ export interface Config { sessionId: string; showReasoning?: boolean; maxToolOutputLines?: number; color?: boolean; welcome?: string; /** Whether this launch resumes an existing persisted session. */ resume?: boolean; /** Show the history-session picker before mounting the main interface. */ resumePicker?: boolean; /** CLI-supplied provider override; otherwise the saved default is used. */ provider?: string; /** CLI-supplied model override; otherwise the saved default is used. */ model?: string; /** Minimum milliseconds between paints; see DSH_TUI_PAINT_MS. */ paintIntervalMs?: number; /** * The fields below are the TUI's live settings, i.e. the `ssh-tui` section. * They ride on this entry's schema so 0.1.7 can project a form for it — and so * a pre-0.1.7 `$DSH_HOME/settings.yaml` `ssh-tui:` section is imported into * this entry rather than left behind. */ /** UI language (`/language`); zh unless the environment says otherwise. */ language?: string; /** Palette (`/theme`): default | catppuccin | gruvbox | mono. */ theme?: string; /** Newest plugin version whose update notice was dismissed. */ skipUpdate?: string; /** Workspace pane layout (`/view`). */ view?: string; /** What a dropped display does (`/disconnect`). */ disconnect?: string; /** Auto-approval mode (`/autoapproval`). */ autoApproval?: string; /** Milliseconds a leftover finished Host waits before exiting; 0 = never. */ idleExit?: number; /** * Retry once when the *provider* rejects a request with 401/403 while a local * credential is configured (see `auth-failure.ts`). Off by default: the retry * re-sends the whole context, which in a long session is expensive. */ retryProviderAuth?: boolean; /** * Fail loudly instead of staying inert when there is no terminal. * * The default (`false`) logs one line and mounts nothing — that is what keeps * this plugin harmless in a GUI host with no console (the desktop app) and in * pipes. Set it when a missing terminal *is* an error for the caller: a script * asserting that a terminal profile really starts, for one. */ requireTerminal?: boolean; } /** Every field above, as schemastery resolves them (all optional). */ interface ConfigFields { sessionId?: string; requireTerminal?: boolean; showReasoning?: boolean; maxToolOutputLines?: number; color?: boolean; welcome?: string; resume?: boolean; resumePicker?: boolean; provider?: string; model?: string; paintIntervalMs?: number; language?: string; theme?: string; skipUpdate?: string; view?: string; disconnect?: string; autoApproval?: string; idleExit?: number; retryProviderAuth?: boolean; } /** * The entry's schema. Everything a launch supplies (`config:` in * `cordis.patch.yml`, including its `!!js` expressions) stays ordinary, * non-live configuration; the TUI's own settings are the live fields, which is * what makes them visible to, and writable through, the 0.1.7 settings service. */ export declare const Config: z; /** * Mount the SSH TUI. The `main` agent is created here after the loader * settles, reading the saved default provider/model from * `agent-default-model` (the same settings memory the official Models page * uses). Launch flags still win when supplied. */ export declare function apply(ctx: Context, config: Config): void;