/** The CLI writer surface this command needs (structurally compatible with program.ts CliIo). */ interface CatchHostIo { writeOut(text: string): void; writeErr(text: string): void; setExitCode(code: number): void; } export interface CommsCatchHostOptions { port: number; dir: string; /** Bearer token required on GET /deliveries. Strongly recommended when the host is reachable. */ token?: string; /** SECOND port for the READ-ONLY inbox listener bound to 0.0.0.0, so a persona on another machine * (or in a per-lane desktop) can reach the inbox. Omit to stay loopback-only. */ inboxPort?: number; /** Restrict the rendered inbox to these addresses. Omit to render whatever the app actually mailed * — a standalone catch has no lab roster to read recipients from, and an operator who forgets to * name one should not get a healthy catch that renders an empty inbox forever (#380). */ recipients?: string[]; /** Inbox re-render cadence in ms (test seam). */ renderIntervalMs?: number; } /** * Render the persona-facing inbox surface from the catch's own deliveries file into `surfaceDir`. * * This is the half that was missing on an adopter-hosted plane (#380). The catch serves /inbox and * /api/inbox as STATIC FILES; in-sandbox, humanish-as-host renders those files on a cadence. On a * plane humanish does not provision there is no such host, so nothing wrote them and every persona * that reached /inbox got `message not found` against a catch whose /health was green — the funnel * dead-ended at a technically-healthy service. * * Rebuilding from scratch each pass is deliberate and matches refreshInboxSurface: a fresh channel per * pass means a send is never routed twice, so the persona never sees duplicates, and a failed write * simply retries next tick. */ export declare function renderInboxSurfaceLocally(args: { deliveriesPath: string; surfaceDir: string; recipients?: string[] | undefined; }): Promise<{ sends: number; messages: number; files: number; }>; /** * Write the catch script and run it in the foreground. Resolves when the child exits; the caller's * Ctrl-C reaches the child through the shared process group, so the normal way to stop it is the * normal way to stop any foreground server. */ export declare function runCommsCatchHost(options: CommsCatchHostOptions, io: CatchHostIo): Promise; export {};