/** * The HTTP surface: sessions, a stream of events, and the routes that act on a session. * * Every route that changes anything needs the token, for the reason the daemon's /run needed it — * an agent reads and writes files and runs shell commands, so being wrong about who is calling is * unrecoverable. Reading is allowed without one on the loopback interface, because a session * listing is not a capability. * * Server-sent events rather than a WebSocket. The traffic is entirely one-way except for short * commands, which are ordinary POSTs; SSE reconnects by itself, survives a proxy, and needs no * dependency. `Last-Event-ID` is honoured, so a reload replays what the client missed instead of * losing the conversation. */ import type { AgentConfig } from '../types.js'; export declare const DEFAULT_WEB_PORT = 4300; export interface WebOptions { port?: number; /** Loopback unless named. Anything else publishes an agent, and says so. */ host?: string; /** Supply one to keep a token across restarts; otherwise a fresh one each start. */ token?: string; /** Print the address and token. */ quiet?: boolean; } export interface WebHandle { url: string; token: string; close: () => Promise; } export declare function startWeb(baseConfigIn: AgentConfig, options?: WebOptions): Promise; //# sourceMappingURL=api.d.ts.map