#!/usr/bin/env node import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { type ZodTypeAny } from "zod"; import { SolariClient } from "@solarisdk/sdk"; import { type BrowserConfig, type BrowserRegistry } from "./browser.js"; type Kind = "sandbox" | "desktop"; interface Entry { kind: Kind; handle: any; commands: CmdRecord[]; } interface CmdRecord { cmdId: string; handle: any; stdout: string; stderr: string; droppedChars: number; exitCode?: number; error?: string; done: Promise; } export interface Registry { sessions: Map; } export interface McpResult { content: Array<{ type: "text"; text: string; } | { type: "image"; data: string; mimeType: string; }>; isError?: boolean; } export interface Tool { description: string; inputSchema: Record; handler: (args: Record) => Promise; } export declare function reconnectAfterRevert(e: Entry, attempts?: number, delayMs?: number): Promise; export declare function makeToolset(client: SolariClient, reg: Registry): Record; export declare function registerToolset(server: McpServer, toolset: Record): void; export interface ServerParts { server: McpServer; browserReg: BrowserRegistry; vmReg: Registry; browserCfg: BrowserConfig; } export declare function closeAllVmSessions(reg: Registry): Promise; export declare function reconcileVmReg(client: SolariClient, reg: Registry): Promise; export declare function buildServerParts(client?: SolariClient, browserCfg?: BrowserConfig, regs?: { browserReg?: BrowserRegistry; vmReg?: Registry; }): ServerParts; export declare function buildServer(client?: SolariClient, browserCfg?: BrowserConfig): McpServer; export declare function main(): Promise; export {};