/** * Where a command's words go, and where its result goes. * * The lane's stated convention (pro-lane design, "Conventions that make this agent-drivable") is * **progress to stderr, result JSON to stdout**, so `bitmagic forge --json > result.json` works * while the agent still watches progress on a minutes-long pipeline. * * That only holds if EVERY human-facing line goes through `info`. A stray `console.log` in * `--json` mode lands on stdout beside the JSON document and corrupts it — which is not a * hypothetical: the engine-upgrade nudge did exactly that before this existed, printing through * the same `log` seam as the result line. */ export interface Output { /** Progress, warnings, prose. stdout normally; stderr under `--json`. */ info(message: string): void; /** * The machine-readable result. Prints only under `--json`, as a single line on stdout. * * In human mode this is a no-op: the command has already said the same thing through `info`, * in a form a person reads. */ result(value: unknown): void; } export declare function createOutput(json: boolean): Output; /** * The failure shape, so an agent can branch on one parse rather than on prose. * * Emitted on stdout like any other result: under `--json` the contract is "stdout is exactly one * JSON document describing what happened", and a failure is as much an outcome as a success. The * exit code is still authoritative and unchanged — this only makes the reason machine-readable. */ export declare function jsonErrorResult(message: string, exitCode: number): { ok: false; exitCode: number; error: string; };