/** * artifactResolver — automatic base/head contract artifacts from a pure git snapshot (artifact- * resolver-SPEC v1.0). The companion to MISSING_ARTIFACT_CONTENT: it answers "where do before/after * come from?" by turning `git diff --name-only` + blob reads into `artifacts[] { id, type, before, * after }` ready for preflight — OR honest `unresolved[]` entries. It NEVER decides, scores, or * touches the fingerprint (§0.1); `report.claim.produces_verdict` is ALWAYS false. * * PURE + DETERMINISTIC (§0.3): git I/O is the host's job and enters as the `blobs` input; the same * snapshot + changedFiles + config yields byte-identical artifacts/unresolved/coverage. * * Anti-fabrication (§4.2 / A1/A2): a missing $ref target, unreadable blob, or ambiguous SSOT becomes * an `unresolved` entry with a code — NEVER an invented component, stub, or half-bundle. */ export type ArtifactType = 'openapi' | 'graphql' | 'grpc' | 'asyncapi' | 'mcp_manifest'; export type ResolvedArtifact = { id: string; type: ArtifactType; before: string; after: string; }; export type UnresolvedReason = 'unreadable_blob' | 'missing_ref_target' | 'ref_cycle' | 'ref_depth_exceeded' | 'ambiguous_ssot' | 'unsupported_encoding' | 'type_ambiguous' | 'empty_changed_contract' | 'config_ssot_missing' | 'external_ref_forbidden' | 'parse_error'; export type UnresolvedEntry = { path: string; reason: UnresolvedReason; detail?: string; related_paths?: string[]; }; export type ResolveCoverage = 'COMPLETE' | 'PARTIAL' | 'UNRESOLVED' | 'EMPTY'; export type BlobValue = string | null | { error: UnresolvedReason; detail?: string; }; export type ResolveInput = { repository?: string; baseRef: string; headRef: string; changedFiles: string[]; /** Pure snapshot keyed `${ref}:${path}` → text | null (absent) | { error }. */ blobs: Record; }; export type ResolveConfig = { maxRefDepth?: number; followExternalRefs?: boolean; ssotPrefer?: string[]; generatedGlobs?: string[]; pathTypeHints?: Record; allowBinary?: boolean; openApiAssembly?: 'bundle_inline' | 'root_only'; /** Matrix flags (§5.1 pairing / §5 strict SSOT). */ forceSameSurfaceGroup?: string[]; requireSsotIfConfigured?: boolean; }; export type SsotSelection = { chosen: string; deferred: string[]; reason: 'ssotPrefer' | 'generated_deprioritized' | 'single'; }; export type ResolveResult = { artifacts: ResolvedArtifact[]; unresolved: UnresolvedEntry[]; coverage: ResolveCoverage; report: { version: 'artifact-resolver-report/1.0'; baseRef: string; headRef: string; contract_paths_discovered: string[]; ignored_non_contract: string[]; ssot_selections: SsotSelection[]; claim: { artifacts_ready_for_preflight: boolean; produces_verdict: false; }; }; }; /** * Path → ArtifactType from the filename only (no content sniff). Exported so binder-level * lifting can reuse the SAME table as resolve() without inventing a second extension map. * Returns null when the path is not a known contract-artifact name (e.g. README.md). */ export declare function classifyByName(path: string): ArtifactType | null; /** * Pure snapshot map key for a blob at a given ref and path. * * Format: `${ref}:${path}` — the same shape `git show :` accepts. * Hosts that build `ResolveInput.blobs` MUST use this helper (or an identical * concatenation). Do not invent a second key scheme. */ export declare function blobMapKey(ref: string, path: string): string; export declare function resolve(input: ResolveInput, config?: ResolveConfig): ResolveResult; //# sourceMappingURL=artifact-resolver.d.ts.map