export interface AgentResolution { /** Resolved (plaintext) webhook secret for HMAC verification. */ readonly webhookSecret: string; } export interface ServerOpts { readonly listen: { readonly host: string; readonly port: number; }; /** Look up an agent by handle. Return null if no such agent. */ readonly resolveAgent: (handle: string) => Promise; /** Called after signature verification succeeds. */ readonly onEvent: (handle: string, eventType: string, payload: string) => void; /** Override the current epoch-seconds clock. */ readonly now?: () => number; /** Max request body size in bytes. Defaults to 1 MiB. */ readonly maxBodyBytes?: number; /** * When set, GET /hold streams heartbeat bytes until the client closes the * connection. Used by hold-awake on hibernating hosts: the daemon holds a * request against its own public URL while wakes run so the platform's * idle detector sees activity. Off by default. */ readonly holdRoute?: { readonly heartbeatMs: number; }; /** * Awaited after signature verification, before the 204 ack is written. * On hibernating hosts the daemon uses this to establish the hold-awake * connection while the inbound webhook connection still pins the machine * awake — otherwise establishment races the freeze. Failures are * swallowed: a broken hold must not block deliveries. */ readonly beforeAck?: () => Promise; } export interface RunningServer { /** Actual bound port (useful when port 0 was requested). */ readonly port: number; close(): Promise; } export declare function startServer(opts: ServerOpts): Promise; //# sourceMappingURL=server.d.ts.map