import { McpServer } from "@modelcontextprotocol/server"; import type { Paths } from "../paths.js"; import { type FleetClient } from "./api.js"; import { type Catalog } from "./tools.js"; /** `code` and `status`: the CloudApiError's, so the setup tool knows whether signing in would help. */ export type CloudConnection = { client: FleetClient; catalog: Catalog; } | { problem: string; code?: string; status?: number; }; export interface CloudMcpOptions { /** Opens the sign-in page in the person's browser (`serveCloudMcp`); without it the agent only gets the link to show. */ openUrl?: (url: string) => boolean; /** How a sign-in waits between polls (tests pass their own). */ sleep?: (ms: number) => Promise; } /** The key and URL this home keeps, and the catalogue the cloud offers that key; or why there is none. */ export declare function connectCloud(paths: Paths, env: NodeJS.ProcessEnv): Promise; /** The server for one connection: the catalogue's tools when connected, else the setup tool that connects. */ export declare function buildCloudMcpServer(paths: Paths, env: NodeJS.ProcessEnv, connection: CloudConnection, options?: CloudMcpOptions): McpServer; export declare function serveCloudMcp(paths: Paths, env?: NodeJS.ProcessEnv): Promise;