/** * Shape of the ssh_snapshot summary: the few numbers a decision is made on. * * The overview itself stays whole — this is a header above it. What could not * be measured is named in `unavailable` and arrives as `null`, never as zero: * a router that has neither ss nor netstat would otherwise report "0 listening * ports", and nothing listening reads as a machine that is fine. */ import type { Tool } from '@modelcontextprotocol/sdk/types.js'; type OutputSchema = NonNullable; export interface SnapshotSummary { /** The fullest filesystem, in percent — the one a decision is made on */ disk_pct: number | null; mem_pct: number | null; cpu_pct: number | null; load: string | null; /** Running containers; `null` — there is no docker on the server */ containers: number | null; ports: number | null; /** Well-known services found running; `null` — systemd never answered */ services_running: number | null; /** Fresh error lines in the journal; `null` — there was no journal to read */ recent_errors: number | null; /** Sections there was nothing to measure with */ unavailable: string[]; /** * The sections themselves, beside their counts. Each list is `null` exactly * where its own count is: an empty list says "looked, found nothing", and a * machine nobody could ask must not answer the same way. */ listening: Array<{ port: string; service: string; }> | null; services: Array<{ name: string; status: string; }> | null; containers_running: Array<{ name: string; status: string; }> | null; error_lines: Array<{ source: string; message: string; }> | null; } /** The numbers of one snapshot, pulled out of the sections it was collected from */ export declare function snapshotSummary(parts: { cpu: { usage: number | null; loadAvg: string | null; }; memory: { percent: number | null; }; disk: { items: Array<{ percent: string; }>; }; docker?: { containers: Array<{ name: string; status: string; }>; }; network: { checked: boolean; listening: Array<{ port: string; service: string; }>; }; services: { checked: boolean; items: Array<{ name: string; status: string; }>; }; recentErrors: { checked: boolean; items: Array<{ source: string; message: string; }>; }; }): SnapshotSummary; export declare const SNAPSHOT_OUTPUT_SCHEMA: OutputSchema; export {};