/** * Monitoring Tool - Monitor SSH connections and profiles * * Actions: * - stats: Get transport state for a profile * - reload: Reload SSH profiles * - test: Test connection to profile * - list: List available profiles * - close: Close the shared connection of a profile */ import { CallToolRequest, Tool } from '@modelcontextprotocol/sdk/types.js'; import type { ToolResult } from '../utils/tool-result.js'; export declare class MonitoringTool { getTool(): Tool; handleCall(request: CallToolRequest): Promise; /** * A profile's transport state. * * There are no pool metrics here: the connection lives inside ssh itself * and is shared by every process on the machine, so there is nothing for * our own counters to measure it with. */ private getStats; /** * Reload SSH profiles */ private reloadProfilesAction; /** * Test connection to profile */ private testConnection; /** * Close a profile's shared connection without waiting for it to idle out. * * What closes is the profile's destination, not everything at once: the * socket's name is a hash, the server cannot be recovered from it, and * deleting the file does not tear down the connection. */ private closeConnection; /** * What is left on the machine after closing: other profiles' connections * outlive both this action and the server process exiting. */ private describeLeftovers; /** * List available profiles */ private listProfiles; }