export declare const artifactsPackage = "@runx/artifacts"; export interface ArtifactContract { readonly emits?: readonly string[]; readonly namedEmits?: Readonly>; readonly wrapAs?: string; } export interface ArtifactEnvelope { readonly type: string | null; readonly version: "1"; readonly data: Readonly>; readonly meta: ArtifactMeta; } export interface ArtifactMeta { readonly artifact_id: string; readonly run_id: string; readonly step_id: string | null; readonly producer: { readonly skill: string; readonly runner: string; }; readonly created_at: string; readonly hash: string; readonly size_bytes: number; readonly parent_artifact_id: string | null; readonly receipt_id: string | null; readonly redacted: boolean; } export interface JournalAppendOptions { readonly receiptDir: string; readonly runId: string; readonly entries: readonly ArtifactEnvelope[]; } export interface ArtifactProducer { readonly skill: string; readonly runner: string; } export interface ArtifactEnvelopeSeed { readonly type: string | null; readonly data: Readonly>; readonly runId: string; readonly stepId?: string; readonly producer: ArtifactProducer; readonly createdAt?: string; readonly parentArtifactId?: string; readonly receiptId?: string; readonly redacted?: boolean; } export interface MaterializedArtifacts { readonly envelopes: readonly ArtifactEnvelope[]; readonly fields: Readonly>; } export declare const SYSTEM_ARTIFACT_TYPES: Set; export declare function createArtifactEnvelope(seed: ArtifactEnvelopeSeed): ArtifactEnvelope; export declare function materializeArtifacts(options: { readonly stdout: string; readonly contract?: ArtifactContract; readonly runId: string; readonly stepId?: string; readonly producer: ArtifactProducer; readonly createdAt?: string; }): MaterializedArtifacts; export declare function createRunEventEntry(options: { readonly runId: string; readonly stepId?: string; readonly producer: ArtifactProducer; readonly kind: string; readonly status: string; readonly detail?: Readonly>; readonly createdAt?: string; }): ArtifactEnvelope; export declare function createReceiptLinkEntry(options: { readonly runId: string; readonly producer: ArtifactProducer; readonly artifactId: string; readonly receiptId: string; readonly stepId?: string; readonly createdAt?: string; }): ArtifactEnvelope; export declare function appendJournalEntries(options: JournalAppendOptions): Promise; export declare function readJournalEntries(receiptDir: string, runId: string): Promise; export declare function resolveJournalPath(receiptDir: string, runId: string): string; export declare function hashStable(value: unknown): string; export declare function hashString(value: string): string; export declare function stableStringify(value: unknown): string;