/** * Shape of the ssh_monitor summary: which machine was asked, and in what * state it answered. * * The state decides everything that follows — on `limited` the file tools, * the snapshot and the audit have nothing to work with — and until now it was * only spoken in the first line of the text, next to an emoji. */ import type { Tool } from '@modelcontextprotocol/sdk/types.js'; import type { PingResult, PingState } from '../runner/types.js'; import { type Legend } from './legend.js'; type OutputSchema = NonNullable; export type MonitorAction = 'stats' | 'reload' | 'test' | 'list' | 'close'; /** * The answer of one ssh_monitor call. * * Only `test` reaches the server, so the other actions leave the measured * fields `null`: a state nobody checked must not read as a state that was * checked and found fine. */ export interface MonitorSummary { action: MonitorAction; /** The machine the action worked on; `null` where the action is about the profiles file */ profile: string | null; state: PingState | null; latency_ms: number | null; /** Probe's exit code: only `limited` carries one, and `null` means the probe never got to run */ exit_code: number | null; /** Machines this server can be asked about; only the listing carries them */ profiles?: string[]; /** Entries that name a machine but cannot be used, and what is wrong with each */ broken?: Array<{ name: string; reason: string; }>; legend: Legend; } /** An action that did not go to a server: there is nothing to say about reachability */ export declare function actionSummary(action: MonitorAction, profile: string | null): MonitorSummary; /** * The listing: names are the answer itself, not a note beside it. * * Broken entries travel apart from working ones — mixed into one list, a name * that cannot be connected to would be indistinguishable from one that can. */ export declare function listSummary(profiles: string[], broken: Array<{ name: string; reason: string; }>): MonitorSummary; /** The outcome of a connection test, as the headline says it */ export declare function pingSummary(profile: string, result: PingResult): MonitorSummary; export declare const MONITOR_OUTPUT_SCHEMA: OutputSchema; export {};