/** * Profile Resolver - Load SSH profiles from file * * Profiles are loaded with caching and auto-reload support: * - Cache with TTL (default: 60 seconds) * - File watcher for automatic reload on changes * - Manual reload via reloadProfiles() * * @example File configuration * ```json * { * "profiles": { * "production": { * "host": "server.example.com", * "username": "admin", * "port": 22, * "privateKeyPath": "~/.ssh/your_private_key" * } * } * } * ``` */ import type { SSHConfig } from './ssh-config.js'; import { type BrokenProfile } from './profiles-file.js'; /** * Reload profiles from disk, forgetting everything derived from the previous ones */ export declare function reloadProfiles(): void; /** * Resolve SSH configuration from tool arguments * * The profile is always named by the caller: every profile is a different machine, * so there is nothing sensible to fall back to. * * @param args Tool arguments containing profile * @returns SSH configuration * @throws Error if no profile is named, or the named one is missing or broken * * @example * ```typescript * resolveSSHConfig({ profile: "production" }) * ``` */ export declare function resolveSSHConfig(args: { profile?: string; }): SSHConfig; /** * Get list of available profile names * Useful for debugging and error messages */ export declare function getAvailableProfiles(): string[]; /** * One profile as it may be shown to anyone: what it connects to, never what it * logs in with. * * The key path is left out along with the secret itself — it names a file on * this machine, and knowing where the key lives helps no caller work. */ export interface ProfileDescription { name: string; host: string; port: number; username: string; /** Which way the login goes: by key, by password, or left to the user's ssh config */ auth: 'key' | 'password' | 'ssh-config'; } /** * The configured profiles, described without a single secret. * * Answers the question an agent otherwise puts to a person: which machines are * there, and how does one get in. */ export declare function describeProfiles(): ProfileDescription[]; /** * Profiles rejected by the loader on the last file load */ export declare function getBrokenProfiles(): BrokenProfile[];