import type { ArtifactKind, ArtifactPayload } from '../../types/handoff-artifacts.js';
import type { ValidationOk, ValidationErr } from './validation-result.js';
export interface AppendArtifactInput<K extends ArtifactKind> {
    projectId: string;
    specId: string;
    kind: K;
    payload: ArtifactPayload<K>;
}
/**
 * Validate and atomically write a handoff artifact under a cross-process lock.
 * Also appends a transition-log event with the SHA-256 of the payload.
 *
 * Steps:
 *  1. Acquire lock keyed on `${projectId}:${specId}:${kind}`
 *  2. Validate payload via validateArtifact
 *  3. Write via atomicWriteFile
 *  4. Compute SHA-256 of payload JSON
 *  5. Call appendTransitionEvent
 *  6. Release lock
 */
export declare function appendArtifact<K extends ArtifactKind>(input: AppendArtifactInput<K>): Promise<{
    path: string;
    sha: string;
}>;
/**
 * Read a handoff artifact from disk, validate it, and apply version-policy checks.
 * Returns ValidationOk with warnings on forward-minor compatibility, ValidationErr on failure.
 * Returns ValidationErr if the file does not exist.
 */
export declare function readArtifact<K extends ArtifactKind>(args: {
    projectId: string;
    specId: string;
    kind: K;
}): Promise<ValidationOk<K> | ValidationErr>;
//# sourceMappingURL=io.d.ts.map