/** * The callable face of the `sessionHub` Remote namespace as the panel sees * it. One definition shared by the components (face.ts), the Typert client * contribution (remote.ts), and the mount code in index.ts. */ import type { RemoteResult } from '@deepseek-ai/dsh-typert-protocol'; import type { HistoryEntry } from '../contract.ts'; import type { HubSnapshot, ImportSourceStatusView, ServerId, ServerView } from '../contract.ts'; /** What the settings form collects for a tunnelled entry. */ export interface SshTargetInput { host: string; port?: number; username: string; privateKeyPath?: string; passphrase?: string; remotePort?: number; } export type ProbeOutcome = { ok: true; version: string; } | { ok: false; error: string; }; export interface SessionHubNamespaceFace { serversAdd(payload: { name: string; baseUrl?: string; ssh?: SshTargetInput; }): Promise>; serversRemove(payload: { id: ServerId; }): Promise>; serversProbe(payload: { baseUrl?: string; ssh?: SshTargetInput; }): Promise>; snapshot(payload: Record): Promise>; modelSync(payload: { serverId?: ServerId; }): Promise; }>>; importStatus(payload: Record): Promise>; importAction(payload: { source: string; action: 'import' | 'remove' | 'auto'; auto?: boolean; }): Promise>; } export type { RemoteResult, HistoryEntry };