import { AuthService } from "./auth.js"; import { type ModelRefreshOptions } from "./models.js"; import { ProcessManager } from "./process-manager.js"; import { StructuredSessionManager } from "./structured-session-manager.js"; import { type PathRepairResult } from "./path-repair.js"; import type { TerminalHost } from "./terminal-host.js"; import { WandConfig } from "./types.js"; interface ServerUrl { url: string; scheme: "HTTP" | "HTTPS"; } export interface ServerHandle { processManager: ProcessManager; structuredSessions: StructuredSessionManager; authService: AuthService; configPath: string; dbPath: string; urls: ServerUrl[]; bindAddr: string; httpsEnabled: boolean; version: string; orphanRecoveredCount: number; pathRepair: PathRepairResult; close(): Promise; } export declare class PortInUseError extends Error { readonly port: number; readonly host: string; readonly code = "EADDRINUSE"; constructor(port: number, host: string); } export declare function isPortInUseError(error: unknown): error is PortInUseError; export declare function startServer(config: WandConfig, configPath: string, options?: { modelRefreshOptions?: () => Partial; terminalHost?: TerminalHost; }): Promise; export {};