/**
 * Debug bundle writer.
 *
 * Creates a sanitized ZIP diagnostic bundle containing config (secrets redacted),
 * recent logs, system info, metrics, cluster state, and execution data.
 * This is the primary support tool -- operators run debug-bundle and share
 * the ZIP for troubleshooting.
 */
import archiver from 'archiver';
import type { DiagnosticDeps } from './types.js';
export interface BundleOptions {
    /** Where to write the ZIP. */
    outputPath: string;
    /** Orchestrator instance identifier. */
    orchestratorId: string;
    /** Raw orchestrator config (will be redacted). */
    config: Record<string, unknown>;
    /** Path to log files directory. */
    logDir?: string;
    /** Hours of logs to include (default: 4). */
    logWindow?: number;
    /** Dependencies for running diagnostic checks. */
    diagnosticDeps: DiagnosticDeps;
    /** URL for cluster health endpoint. */
    clusterHealthUrl?: string;
    /** URL for recent runs endpoint. */
    recentRunsUrl?: string;
}
/**
 * Redact config values using allowlist approach.
 * Only known-safe fields are preserved; everything else becomes "****".
 */
export declare function redactConfig(obj: unknown, parentKey?: string): unknown;
/**
 * Create a debug bundle ZIP file.
 *
 * The bundle contains:
 * - manifest.json: version, timestamp, orchestrator ID
 * - config/config.json: redacted configuration
 * - system/info.json: OS, Node, CPU, memory info
 * - diagnostics/results.json: health check results
 * - logs/: recent log files (if logDir provided)
 * - logs/summary.json: log statistics
 */
export declare function createDebugBundle(options: BundleOptions): Promise<string>;
/**
 * Add log files from logDir to the archive, respecting MAX_LOG_BYTES cap
 * and the logWindow time filter. Matches any `*.log` file in the directory,
 * so the per-instance filename pattern produced by
 * `buildLogFilename()` is picked up without additional configuration.
 *
 * Exported for reuse by the `kici-admin debug-bundle` CLI command, which
 * runs outside the orchestrator process but still needs to include the
 * same log files in its locally-assembled bundle.
 */
export declare function addLogsToArchive(archive: archiver.Archiver, logDir: string, logWindowHours: number): Promise<void>;
//# sourceMappingURL=bundle-writer.d.ts.map