/** * Logger utility - outputs debug/info to stderr, results to stdout */ export declare function setDebugEnabled(enabled: boolean): void; export declare function isDebugEnabled(): boolean; export declare function setOutputFormat(format: "json" | "text"): void; /** * Log debug message to stderr (only when debug is enabled) */ export declare function debug(message: string, ...args: unknown[]): void; /** * Log info message to stderr */ export declare function info(message: string, ...args: unknown[]): void; /** * Log a progress line to stderr, only while a human is watching a terminal. * * In a sandbox the agent's bash tool merges stderr into the model's context, * where "Uploading…" / "Downloaded…" lines are noise the JSON result repeats. */ export declare function progress(message: string): void; /** * Log warning message to stderr */ export declare function warn(message: string, ...args: unknown[]): void; /** * Log error message to stderr */ export declare function error(message: string, ...args: unknown[]): void; /** * Output final result to stdout (this goes to AI agent context) * * JSON is printed on one line whenever stdout is not a terminal (agents, jq, * CI): the indent-2 whitespace is pure token overhead for an LLM reader, and * the sandbox's tail-truncated output window then shows more payload. A human * at a terminal still gets indent-2; `compact` forces one line regardless. * Text (markdown) format is unaffected. * * An error envelope also surfaces in the process exit code: schedulers and * shell callers (sb-task sandbox_bash cron jobs, CI scripts) key success on * the exit status, and a printed-but-exit-0 error envelope reads as a * succeeded run (#47855 — a failed `telephony call dial` was recorded as a * succeeded scheduled run). `process.exitCode` (not `process.exit()`) so * stdout still flushes and call sites keep control for their own cleanup or * more specific exit codes (which win by being set later). */ export declare function output(data: unknown, opts?: { compact?: boolean; }): void; /** * Output raw JSON to stdout (compact, for machine consumption) */ export declare function outputJson(data: unknown): void; //# sourceMappingURL=logger.d.ts.map