/** stdout/stderr sinks, injected everywhere so tests capture output. */ export interface Io { /** Data channel — response bodies and JSON results ONLY. */ out(line: string): void; /** Everything else: status lines, pair codes, errors, hints. */ err(line: string): void; } export declare const EXIT: { readonly OK: 0; readonly USAGE: 1; readonly BRIDGE: 2; readonly BOTWALL: 3; readonly HTTP: 4; }; /** Invalid invocation or profile state — maps to EXIT.USAGE. */ export declare class UsageError extends Error { readonly hint?: string; constructor(message: string, hint?: string); } export declare function printJson(io: Io, value: unknown): void; /** * `--json` envelope for fetch verbs. The bridge returns `{status, url, * body}` — response headers never cross the protocol, and `body` is * always a UTF-8 string (the extension decodes it). */ export declare function fetchEnvelope(res: { status: number; url: string; body: string; }): string;