/**
 * Artifact Writer — ADR-008 Implementation
 *
 * Enterprise-grade synthesis artifact persistence to ~/.agentics/runs/<run-id>/.
 * Provides a local audit trail for offline inspection via `agentics inspect run`.
 *
 * INVARIANTS:
 * - Every write produces exactly four artifact files in the run directory
 * - All file content is serialized BEFORE any I/O begins (fail-fast)
 * - File writes use atomic temp-then-rename to prevent partial artifacts
 * - Files are written with mode 0o600 (owner read/write only)
 * - Directories are created with mode 0o700 (owner read/write/execute only)
 * - All run-id values are validated for path traversal and format safety
 * - SHA-256 checksums are computed for every artifact file
 * - All I/O errors are wrapped with CLIError for structured diagnostics
 *
 * FORBIDDEN:
 * - Validating artifact content semantics (already validated by runner/router)
 * - Calling external APIs
 * - Modifying artifact data (write-through only)
 * - Following symlinks outside the base directory
 */
import type { RunManifest, PlatformReceipt, ArtifactWriterInput, IArtifactWriter, ArtifactWriteResult, RunSummary, ListRunsOptions } from '../contracts/adr-008-synthesis-artifact-persistence.js';
/**
 * Enterprise-grade artifact writer implementing the IArtifactWriter contract.
 *
 * Persists synthesis run artifacts to the local filesystem with:
 * - Atomic writes (temp-then-rename per file)
 * - SHA-256 integrity checksums
 * - Owner-only file permissions (0o600 files, 0o700 directories)
 * - Path traversal prevention
 * - Structured error handling with correlation IDs
 * - Size guards for claude_output and prompt
 * - Read-back methods for offline inspection
 * - Listing and filtering for run discovery
 */
export declare class ArtifactWriter implements IArtifactWriter {
    private readonly baseDir;
    constructor(baseDir?: string);
    getRunsDir(): string;
    getRunDir(runId: string): string;
    runExists(runId: string): boolean;
    write(input: ArtifactWriterInput): ArtifactWriteResult;
    readManifest(runId: string): RunManifest | null;
    readReceipt(runId: string): PlatformReceipt | null;
    readClaudeOutput(runId: string): unknown;
    readPrompt(runId: string): string | null;
    listRuns(options?: ListRunsOptions): RunSummary[];
    deleteRun(runId: string): boolean;
}
/**
 * Create an IArtifactWriter instance.
 *
 * Base directory resolution order:
 * 1. Explicit `baseDir` parameter
 * 2. AGENTICS_RUNS_DIR environment variable
 * 3. ~/.agentics/runs/ (default)
 *
 * @param baseDir Optional base directory override for artifact storage
 */
export declare function createArtifactWriter(baseDir?: string): IArtifactWriter;
//# sourceMappingURL=artifact-writer.d.ts.map