import { formatSuccess, formatOutput } from '../output.js';
import { withMcpClient } from '../helpers.js';
export async function ping(target, options) {
    await withMcpClient(target, options, async (client, _context) => {
        const startTime = performance.now();
        await client.ping();
        const endTime = performance.now();
        const durationMs = Math.round(endTime - startTime);
        if (options.outputMode === 'human') {
            console.log(formatSuccess(`Ping successful (${durationMs}ms)`));
        }
        else {
            console.log(formatOutput({
                success: true,
                durationMs,
            }, 'json'));
        }
    });
}
//# sourceMappingURL=utilities.js.map