import type { AssetCatalogEntry, MirrorAcquireState, MirrorIndexEntry } from "../types.js"; interface MaterializedMirrorArtifact { content: Buffer; files?: Array<{ relativePath: string; content: Buffer; upstreamBlobSha?: string; }>; upstreamRef?: string; upstreamCommit?: string; upstreamBlobSha?: string; } interface MirrorFileManifest { schemaVersion: 1; aggregateHash: string; files: Array<{ relativePath: string; sha256: string; sizeBytes: number; upstreamBlobSha?: string; }>; } type MirrorAcquireSkipReason = "materialize-failed" | "official-index-package-too-many-files" | "official-index-file-too-large" | "official-index-package-too-large"; interface MaterializeArtifactResult { artifact: MaterializedMirrorArtifact | null; skipReason?: MirrorAcquireSkipReason; } interface AcquireMirrorArtifactsDependencies { materializeArtifact?: (entry: AssetCatalogEntry, projectRoot: string, requirePinnedProvenance: boolean, evidenceAllowedRoots: readonly string[]) => Promise; } /** * Provides acquire mirror artifacts for the lifecycle pipeline. */ export declare function acquireMirrorArtifacts(projectRoot: string, workingDirectory: string, args: string[], dependencies?: AcquireMirrorArtifactsDependencies): Promise; declare function restoreRefreshProcessedCount(previousAcquireState: MirrorAcquireState | null, totalEligibleCount: number): number; declare function materializeMirrorArtifact(entry: AssetCatalogEntry, projectRoot: string, requirePinnedProvenance: boolean, evidenceAllowedRoots: readonly string[]): Promise; declare function materializeGitHubTreeArtifact(entry: AssetCatalogEntry, requirePinnedProvenance: boolean): Promise; declare function materializeOfficialIndexPackage(entry: AssetCatalogEntry, projectRoot: string): Promise; declare function buildOfficialIndexRepoUrlCandidates(entry: AssetCatalogEntry, owner: string, resolvedOfficialIndexRepoUrl?: string | null): Promise; declare function isGitHubHttpsRepositoryUrl(value: string): boolean; declare function isGitHubHttpsUrl(value: string): boolean; declare function selectOfficialIndexPrimaryContent(materializedFiles: Array<{ relativePath: string; content: Buffer; }>, entry: AssetCatalogEntry): Buffer; declare function findOfficialIndexSkillRoot(treeEntries: Array<{ path: string; type: string; size: number | null; sha: string; }>, slug: string): string | null; declare function fetchVerifiedGitHubFileContent(owner: string, repo: string, branch: string, filePath: string, maxBytes: number, expectedBlobSha?: string): Promise; declare function fetchGitHubBranchCommitSha(owner: string, repo: string, ref: string): Promise; declare function parseGitHubBlobEntry(entry: AssetCatalogEntry): { owner: string; repo: string; ref: string; filePath: string; expectedBlobSha?: string; } | null; declare function buildMirrorFileManifest(materializedArtifact: MaterializedMirrorArtifact, entry: AssetCatalogEntry): MirrorFileManifest; declare function buildGitHubHeaders(options?: { accept?: string; }): HeadersInit; declare function buildUpstreamMetadata(entry: AssetCatalogEntry, materializedArtifact: MaterializedMirrorArtifact): MirrorIndexEntry["upstream"]; /** * Returns only the resolved mirror status for an artifact. Retained as a stable * internal test surface; delegates to {@link evaluateMirrorSafety}. */ declare function determineMirrorStatus(entry: AssetCatalogEntry, materializedArtifact: MaterializedMirrorArtifact): MirrorIndexEntry["status"]; declare function normalizePromptInjectionText(content: string): string; declare function createGitBlobSha(content: Buffer): string; declare function isGitBlobSha(value: string | undefined): value is string; declare function findAssetIdsMissingMirrorManifests(projectRoot: string, mirrorIndexEntries: MirrorIndexEntry[], eligibleAssetIds: Set): Promise>; declare function buildSortedReasonRecord(reasons: Map): Record; declare function mergeMirrorIndexEntries(existingEntries: MirrorIndexEntry[], newEntries: MirrorIndexEntry[]): MirrorIndexEntry[]; declare function buildGitHubCachePath(entry: AssetCatalogEntry, projectRoot: string): string | null; declare function pathLooksReadable(filePath: string): Promise; /** * Exposes pure and narrowly-scoped mirror acquire internals for focused tests. */ export declare const mirrorAcquireInternals: { restoreRefreshProcessedCount: typeof restoreRefreshProcessedCount; materializeMirrorArtifact: typeof materializeMirrorArtifact; materializeGitHubTreeArtifact: typeof materializeGitHubTreeArtifact; materializeOfficialIndexPackage: typeof materializeOfficialIndexPackage; buildOfficialIndexRepoUrlCandidates: typeof buildOfficialIndexRepoUrlCandidates; isGitHubHttpsRepositoryUrl: typeof isGitHubHttpsRepositoryUrl; isGitHubHttpsUrl: typeof isGitHubHttpsUrl; findOfficialIndexSkillRoot: typeof findOfficialIndexSkillRoot; selectOfficialIndexPrimaryContent: typeof selectOfficialIndexPrimaryContent; fetchVerifiedGitHubFileContent: typeof fetchVerifiedGitHubFileContent; fetchGitHubBranchCommitSha: typeof fetchGitHubBranchCommitSha; parseGitHubBlobEntry: typeof parseGitHubBlobEntry; buildMirrorFileManifest: typeof buildMirrorFileManifest; buildGitHubHeaders: typeof buildGitHubHeaders; buildUpstreamMetadata: typeof buildUpstreamMetadata; determineMirrorStatus: typeof determineMirrorStatus; normalizePromptInjectionText: typeof normalizePromptInjectionText; createGitBlobSha: typeof createGitBlobSha; isGitBlobSha: typeof isGitBlobSha; findAssetIdsMissingMirrorManifests: typeof findAssetIdsMissingMirrorManifests; buildSortedReasonRecord: typeof buildSortedReasonRecord; mergeMirrorIndexEntries: typeof mergeMirrorIndexEntries; buildGitHubCachePath: typeof buildGitHubCachePath; pathLooksReadable: typeof pathLooksReadable; }; export {};