import { z } from "zod"; declare const EntrySchema: z.ZodObject<{ name: z.ZodString; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"local">; path: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"archive">; url: z.ZodString; subpath: z.ZodOptional; }, z.core.$strip>], "type">; target: z.ZodString; ref: z.ZodOptional; checksum: z.ZodOptional; updatePolicy: z.ZodOptional>; }, z.core.$strip>; export declare const VendorManifestSchema: z.ZodObject<{ vendored: z.ZodArray; path: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"archive">; url: z.ZodString; subpath: z.ZodOptional; }, z.core.$strip>], "type">; target: z.ZodString; ref: z.ZodOptional; checksum: z.ZodOptional; updatePolicy: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>; export type VendorEntry = z.infer; export type VendorManifest = z.infer; export declare const MANIFEST_FILE = "vendor.json"; /** * Deterministic sha256 over a file set — independent of fetch/extract order. * Hashes each `path\0content\0` in sorted-path order. */ export declare function contentHash(files: Map): string; /** * Normalize an extracted archive: strip the single top-level wrapper directory * (e.g. "repo-main/") that archives commonly add, then scope to `subpath`. * Pure — separated from the network fetch so the scoping is unit-testable. */ export declare function scopeArchiveFiles(raw: Map, subpath?: string): Map; export declare function loadManifest(manifestDir: string): { manifest: VendorManifest; path: string; }; export interface VendorPullResult { success: boolean; pulled: Array<{ name: string; target: string; checksum: string; fileCount: number; }>; output: string; } /** * Pull each vendored entry (or just `only`): resolve the source, write it into * `target`, and record the content checksum back into the manifest. */ export declare function vendorPull(manifestDir: string, only?: string): Promise; export interface VendorCheckResult { success: boolean; /** True if any vendored target diverged from its recorded checksum. */ drift: boolean; entries: Array<{ name: string; status: "ok" | "drifted" | "unpinned" | "missing"; }>; output: string; } /** * Verify each target's working copy against its recorded checksum. Editing * vendored files is allowed — `check` only reports that they diverged from the * pin. The caller decides whether drift is fatal (CI) or a warning (local). */ export declare function vendorCheck(manifestDir: string): VendorCheckResult; export {}; //# sourceMappingURL=vendor.d.ts.map