import type { Orckit } from '../orchestrator/orchestrator.js'; import type { IdeLink } from './ide.js'; export interface WebUiServerOptions { /** Port to bind. Use 0 for an arbitrary free port. */ port: number; /** Host to bind. Defaults to 127.0.0.1. */ host?: string; /** * IDE deep-link descriptor. When set, file references in the dashboard's * logs and errors become IDE deep links (built-in server). Null disables it. */ ide?: IdeLink | null; /** * Mac-side open relay URL (sandbox mode). When set, `/api/open` forwards * there instead of launching anything itself. */ openRelay?: string; } export interface WebUiServerHandle { readonly url: string; readonly port: number; dispose(): Promise; } /** * Attach an in-process web dashboard to an Orckit instance. * * Routes: * GET / → SPA shell (and any nested route via fallback) * GET /assets/* → bundled JS/CSS/fonts * GET /api/state → full snapshot (initial hydration) * GET /api/output/:name → recent N lines from a process buffer * GET /events → SSE stream of orckit events * POST /api/restart/:name → restart a process (cascade by default) * POST /api/start/:name → start a process (+ deps, skipping running ones) * POST /api/stop/:name → stop a process * * Follows the same shape as `attachMcpServer`: subscribes to events, returns * a handle whose `dispose()` cleanly shuts down the HTTP listener and * force-closes any open SSE sockets. */ export declare function attachWebUi(orckit: Orckit, opts: WebUiServerOptions): Promise; //# sourceMappingURL=server.d.ts.map