/** Env var that gates every emission. Public + namespaced. */ export declare const PROPOSIT_PIPELINE_DEBUG_ENV_VAR = "PROPOSIT_PIPELINE_DEBUG"; /** Line prefix on every emission; useful for grep/filter. */ export declare const PROPOSIT_PIPELINE_DEBUG_PREFIX = "[proposit/pipeline]"; /** * Truthy when the env var is set to `"1"`, `"true"`, or `"yes"` * (case-insensitive). Anything else is off — including `"0"`, * `"false"`, the empty string, and `undefined`. * * Re-read on every call so a consumer can flip the var mid-process. * * **Browser-safety.** `src/lib/` must not import or reference Node- * only globals (`process`, `Buffer`, `__dirname`, …) — this module * therefore reaches the env via a `globalThis` indirection guarded * by `typeof`. In a browser/Expo bundle the chain resolves to * `undefined` and the function returns `false`, leaving the gate * permanently closed for non-Node consumers (which is the right * outcome — debug logging is a Node-side dev affordance). */ export declare function isDebugEnabled(): boolean; export declare function debugPipelineStart(args: { pipelineId: string; pipelineVersion: string; stageCount: number; rootStages: readonly string[]; }): void; export declare function debugPipelineEnd(args: { pipelineId: string; status: "completed" | "failed"; output: "present" | "null"; durationMs: number; tokenUsage?: { input: number; output: number; reasoning?: number; }; }): void; export declare function debugStageStart(args: { stageId: string; deps: readonly string[]; }): void; export declare function debugStageEnd(args: { stageId: string; status: "completed" | "skipped" | "failed"; durationMs: number; outputPresence: "present" | "null-or-undefined"; tokenUsage?: { input: number; output: number; reasoning?: number; }; }): void; export declare function debugLlmRequest(args: { stageId: string | null; model: string; maxOutputTokens?: number; reasoningEffort?: string; systemPromptLen: number; userMessageLen: number; systemPromptHead: string; userMessageHead: string; }): void; export declare function debugLlmResponse(args: { stageId: string | null; status?: string; incompleteReason?: string; outputTextLen?: number; tokenUsage: { input: number; output: number; reasoning?: number; }; rawResponseId?: string; }): void; /** * Surfaces when the last-resort safety net truncates an over-long * field — i.e. the model overshot its declared `maxLength` and the * length steering (shrunk wire `maxLength` + budget hint) did not keep * it under the cap. Emits the field's JSON-pointer path, the limit, and * the original length (not the value) so a dev can see whether steering * is still letting overshoots through after it lands. */ export declare function debugMaxLengthTruncation(args: { stageId: string | null; instancePath: string; limit: number; originalLength: number; }): void; /** * Failure-branch dump. Surfaces when the provider catches a thrown * error after the HTTP roundtrip (e.g. JSON parse failure on a * truncated payload). The `rawText` is capped to * `RAW_OUTPUT_DUMP_BYTES` to keep the line manageable while * preserving the head where the truncation usually shows up. */ export declare function debugLlmFailure(args: { stageId: string | null; model: string; errorName: string; errorMessage: string; status?: string; incompleteReason?: string; rawText?: string; tokenUsage?: { input: number; output: number; reasoning?: number; }; }): void; //# sourceMappingURL=debug-log.d.ts.map