import { D as DocBridgeConfigV1 } from './schema-N9E45fYJ.js'; import { z } from 'zod'; /** Type-safe config helper for `doc-bridge.config.ts`. */ declare const defineConfig: (config: DocBridgeConfigV1) => DocBridgeConfigV1; declare const applyConfigDefaults: (config: DocBridgeConfigV1) => DocBridgeConfigV1; type ExecutionProfile = 'local' | 'service'; type ExecutionContext = Readonly<{ profile: ExecutionProfile; }>; /** Caller-owned ceiling; nested calls cannot restore local capabilities. */ declare const executionContext: (profile?: ExecutionProfile) => ExecutionContext; declare const withExecutionProfile: (profile: ExecutionProfile | undefined, run: () => T) => T; declare const StorageHashSchema: z.ZodString; declare const StoragePathSchema: z.ZodString; declare const PartitionSchema: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; type Partition = Readonly>; declare const StorageLimitsSchema: z.ZodObject<{ maxFiles: z.ZodNumber; maxBytes: z.ZodNumber; maxFileBytes: z.ZodNumber; maxTimeMs: z.ZodNumber; maxMemoryMb: z.ZodNumber; }, z.core.$strict>; type StorageLimits = Readonly>; declare const StorageFailureCodeSchema: z.ZodEnum<{ PARTITION_MISMATCH: "PARTITION_MISMATCH"; CONTENT_MISMATCH: "CONTENT_MISMATCH"; REVISION_MISMATCH: "REVISION_MISMATCH"; PATH_DENIED: "PATH_DENIED"; NOT_FOUND: "NOT_FOUND"; FILE_LIMIT: "FILE_LIMIT"; BYTE_LIMIT: "BYTE_LIMIT"; TIME_LIMIT: "TIME_LIMIT"; MEMORY_LIMIT: "MEMORY_LIMIT"; ABORTED: "ABORTED"; IO_ERROR: "IO_ERROR"; INVALID_CONTRACT: "INVALID_CONTRACT"; CAS_CONFLICT: "CAS_CONFLICT"; }>; declare const StorageFailureSchema: z.ZodObject<{ status: z.ZodEnum<{ error: "error"; missing: "missing"; cancelled: "cancelled"; mismatch: "mismatch"; denied: "denied"; limit: "limit"; }>; code: z.ZodEnum<{ PARTITION_MISMATCH: "PARTITION_MISMATCH"; CONTENT_MISMATCH: "CONTENT_MISMATCH"; REVISION_MISMATCH: "REVISION_MISMATCH"; PATH_DENIED: "PATH_DENIED"; NOT_FOUND: "NOT_FOUND"; FILE_LIMIT: "FILE_LIMIT"; BYTE_LIMIT: "BYTE_LIMIT"; TIME_LIMIT: "TIME_LIMIT"; MEMORY_LIMIT: "MEMORY_LIMIT"; ABORTED: "ABORTED"; IO_ERROR: "IO_ERROR"; INVALID_CONTRACT: "INVALID_CONTRACT"; CAS_CONFLICT: "CAS_CONFLICT"; }>; }, z.core.$strict>; type StorageFailure = Readonly>; type StorageResult = Readonly<{ status: 'ok'; value: T; }> | StorageFailure; declare const storageResultSchema: (value: T) => z.ZodUnion; value: T; }, z.core.$strict>, z.ZodObject<{ status: z.ZodEnum<{ error: "error"; missing: "missing"; cancelled: "cancelled"; mismatch: "mismatch"; denied: "denied"; limit: "limit"; }>; code: z.ZodEnum<{ PARTITION_MISMATCH: "PARTITION_MISMATCH"; CONTENT_MISMATCH: "CONTENT_MISMATCH"; REVISION_MISMATCH: "REVISION_MISMATCH"; PATH_DENIED: "PATH_DENIED"; NOT_FOUND: "NOT_FOUND"; FILE_LIMIT: "FILE_LIMIT"; BYTE_LIMIT: "BYTE_LIMIT"; TIME_LIMIT: "TIME_LIMIT"; MEMORY_LIMIT: "MEMORY_LIMIT"; ABORTED: "ABORTED"; IO_ERROR: "IO_ERROR"; INVALID_CONTRACT: "INVALID_CONTRACT"; CAS_CONFLICT: "CAS_CONFLICT"; }>; }, z.core.$strict>]>; declare const ContentRefSchema: z.ZodObject<{ algorithm: z.ZodLiteral<"sha256-normalized-v1">; hash: z.ZodString; }, z.core.$strict>; type ContentRef = Readonly>; declare const FileMetaSchema: z.ZodObject<{ path: z.ZodString; kind: z.ZodEnum<{ file: "file"; directory: "directory"; symlink: "symlink"; }>; bytes: z.ZodNumber; content: z.ZodOptional; hash: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; type FileMeta = Readonly>; declare const StorageRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; }, z.core.$strict>; type StorageRequest = Readonly & { profile?: ExecutionProfile; }>; declare const RepositoryListRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; under: z.ZodUnion, z.ZodString]>; include: z.ZodArray; exclude: z.ZodArray; }, z.core.$strict>; declare const RepositoryStatRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; path: z.ZodString; }, z.core.$strict>; declare const RepositoryReadRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; path: z.ZodString; expected: z.ZodOptional; hash: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>; declare const RepositoryListingSchema: z.ZodObject<{ entries: z.ZodArray; bytes: z.ZodNumber; content: z.ZodOptional; hash: z.ZodString; }, z.core.$strict>>; }, z.core.$strict>>; complete: z.ZodBoolean; limitation: z.ZodOptional>; visibilityPolicyHash: z.ZodString; }, z.core.$strict>; type RepositoryListing = Readonly, 'entries'> & { entries: readonly FileMeta[]; }>; interface RepositoryReadV1 { readonly version: 1; readonly partition: Partition; readonly limits: StorageLimits; list(request: z.infer): Promise>; stat(request: z.infer): Promise>; read(request: z.infer): Promise>>; } declare const ArtifactKindSchema: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; type ArtifactKind = z.infer; declare const ArtifactKeySchema: z.ZodObject<{ kind: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; name: z.ZodString; }, z.core.$strict>; type ArtifactKey = Readonly>; declare const ArtifactEnvelopeSchema: z.ZodObject<{ ioVersion: z.ZodLiteral<1>; partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; key: z.ZodObject<{ kind: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; name: z.ZodString; }, z.core.$strict>; payloadSchema: z.ZodString; payloadSchemaVersion: z.ZodNumber; contentHashAlgo: z.ZodEnum<{ "sha256-normalized-v1": "sha256-normalized-v1"; "sha256-raw-v1": "sha256-raw-v1"; }>; contentHash: z.ZodString; byteHash: z.ZodString; payloadEncoding: z.ZodEnum<{ json: "json"; base64: "base64"; }>; payload: z.ZodInstanceOf>; }, z.core.$strict>; type ArtifactEnvelope = Readonly>; declare const ArtifactReadRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; key: z.ZodObject<{ kind: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; name: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; declare const ArtifactReplaceRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; artifact: z.ZodObject<{ ioVersion: z.ZodLiteral<1>; partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; key: z.ZodObject<{ kind: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; name: z.ZodString; }, z.core.$strict>; payloadSchema: z.ZodString; payloadSchemaVersion: z.ZodNumber; contentHashAlgo: z.ZodEnum<{ "sha256-normalized-v1": "sha256-normalized-v1"; "sha256-raw-v1": "sha256-raw-v1"; }>; contentHash: z.ZodString; byteHash: z.ZodString; payloadEncoding: z.ZodEnum<{ json: "json"; base64: "base64"; }>; payload: z.ZodInstanceOf>; }, z.core.$strict>; expectedPreviousByteHash: z.ZodNullable; }, z.core.$strict>; declare const ArtifactListRequestSchema: z.ZodObject<{ partition: z.ZodObject<{ repositoryId: z.ZodString; revision: z.ZodString; }, z.core.$strict>; signal: z.ZodInstanceOf; kind: z.ZodEnum<{ index: "index"; workflow: "workflow"; approval: "approval"; snapshot: "snapshot"; overlay: "overlay"; cache: "cache"; proposal: "proposal"; }>; maxItems: z.ZodNumber; }, z.core.$strict>; interface ArtifactIOV1 { readonly version: 1; readonly partition: Partition; readonly limits: StorageLimits; read(request: z.infer): Promise>; replaceAtomic(request: z.infer): Promise>>; list(request: z.infer): Promise>; } type LoadConfigOptions = { readonly profile?: ExecutionProfile; readonly cwd?: string; readonly explicitPath?: string; }; type LoadConfigResult = { readonly config: DocBridgeConfigV1; readonly path: string; readonly diagnostics?: readonly string[]; }; declare class ConfigNotFoundError extends Error { readonly cwd: string; constructor(cwd: string); } /** Legacy local configuration API; service callers use bounded injected reads. */ declare const loadConfig: (opts?: LoadConfigOptions) => LoadConfigResult; /** Static config acquisition from a caller-owned exact repository partition. */ declare const loadConfigWithRead: (read: RepositoryReadV1, options?: { profile?: ExecutionProfile; explicitPath?: string; signal?: AbortSignal; }) => Promise; declare const resolveProjectRoot: (start?: string) => string; /** Project root for a loaded config file path (directory of the config). */ declare const projectRootFromConfigPath: (configFilePath: string, projectRootField?: string) => string; export { type ArtifactIOV1 as A, StorageLimitsSchema as B, type ContentRef as C, StoragePathSchema as D, type ExecutionProfile as E, type FileMeta as F, StorageRequestSchema as G, applyConfigDefaults as H, defineConfig as I, executionContext as J, loadConfig as K, type LoadConfigOptions as L, loadConfigWithRead as M, projectRootFromConfigPath as N, resolveProjectRoot as O, type Partition as P, storageResultSchema as Q, type RepositoryReadV1 as R, type StorageLimits as S, withExecutionProfile as T, type StorageFailure as a, type StorageRequest as b, type StorageResult as c, type ArtifactEnvelope as d, type ArtifactKey as e, ArtifactEnvelopeSchema as f, ArtifactKeySchema as g, type ArtifactKind as h, ArtifactKindSchema as i, ArtifactListRequestSchema as j, ArtifactReadRequestSchema as k, ArtifactReplaceRequestSchema as l, ConfigNotFoundError as m, ContentRefSchema as n, type ExecutionContext as o, FileMetaSchema as p, type LoadConfigResult as q, PartitionSchema as r, RepositoryListRequestSchema as s, type RepositoryListing as t, RepositoryListingSchema as u, RepositoryReadRequestSchema as v, RepositoryStatRequestSchema as w, StorageFailureCodeSchema as x, StorageFailureSchema as y, StorageHashSchema as z };