import { EventHub } from './events.js'; import type { LoopEngine } from '../mini-drama/loop-engine.js'; import type { StreamEngine } from '../mini-drama/stream-engine.js'; export interface WebServerOptions { workspaceDir: string; port: number; host?: string; /** Path to the CLI entry the job runner spawns. */ cliBin?: string; cliBaseArgs?: string[]; /** * Reuse an existing SSE hub instead of creating one. The `loop` command * passes the hub it already handed to the LoopEngine so engine `loop-updated` * events reach the same browser tabs the watcher pushes to. */ hub?: EventHub; /** * Loop-preview engine attached to one project/episode. When present, the * `/api/projects/:slug/loop/*` endpoints drive it (state/start/stop/pin/ * regenerate). Only the matching slug is controllable. */ loop?: { slug: string; episode: number; engine: LoopEngine; }; /** * Stream engine (infinite live-authored story) attached to one * project/episode. Drives `/api/projects/:slug/stream/*` (state/start/stop). */ stream?: { slug: string; episode: number; engine: StreamEngine; }; } export declare function startWebServer(options: WebServerOptions): Promise<{ close: () => Promise; port: number; hub: EventHub; }>; //# sourceMappingURL=server.d.ts.map