import { type RepositorySourceScope } from './repositorySourceAuthorization.js'; import type { RepositoryPackageSnapshot } from './repositoryPackage.js'; type SourceTransport = { signedGet(route: string): Promise>; }; export type BoundRepositorySource = RepositorySourceScope & { repositoryBindingId: string; repositoryAgentId: string; }; export declare function advanceRepositorySourceBaseline(record: { localBaselineSnapshotHash?: string | null; publishedLocalSnapshotHash?: string | null; pendingLocalSnapshotHash?: string | null; pendingLocalOperationId?: string | null; }, receipt: { state: string; operationId: string; }): { localBaselineSnapshotHash: string | null; publishedLocalSnapshotHash: string | null; pendingLocalSnapshotHash: string | null; pendingLocalOperationId: string | null; }; export declare function recoverPublishedLocalSourceBaseline(input: BoundRepositorySource & { workspace: string; record: { state: string; snapshotHash?: string | null; pendingLocalOperationId?: string | null; }; }): Promise; export declare function fetchRepositorySourceAuthorization(transport: SourceTransport, scope: BoundRepositorySource): Promise; export declare class RepositorySourceWatcher { #private; readonly debounceMs: number; constructor(debounceMs?: number); seed(fingerprint: string): void; observe(fingerprint: string, now: number): 'unchanged' | 'debouncing' | 'stable'; complete(fingerprint: string): void; invalidate(): void; } export declare function seedRepositorySourceWatcher(input: BoundRepositorySource & { workspace: string; publishedHash: string; localHash?: string | null; watcher: RepositorySourceWatcher; }): Promise; export declare class BlockedRepositorySourceRetry { #private; consider(candidateId: string, knowledge: { authority: 'locally_initialized_unsigned'; } | { authority: 'unverified_prior_release_reference'; priorRelease: { catalogHash: string; manifestHash: string; }; } | undefined, installed: { catalogBytes: Buffer; manifestBytes: Buffer; } | null): boolean; } export declare function scanRepositorySourceChanges(input: BoundRepositorySource & { workspace: string; transport: SourceTransport; watcher: RepositorySourceWatcher; monotonicNow?: () => number; loadRetainedKnowledge?: () => Promise<{ catalogBytes: Buffer; manifestBytes: Buffer; } | null>; loadPublishedLocalBaseline?: () => Promise; submitCandidate?: (snapshot: RepositoryPackageSnapshot, expectedLatestSourceFingerprint?: string) => Promise>; }): Promise<{ state: "unchanged" | "debouncing"; localMutation: boolean; sharedAuthority: "pending"; snapshotId?: undefined; fingerprint?: undefined; persisted?: undefined; candidate?: undefined; submittedManifestHash?: undefined; } | { state: "source_already_published"; localMutation: boolean; sharedAuthority: "verified_existing"; snapshotId: string; fingerprint: string; persisted: { manifestPath: string; snapshotPath: string; snapshotHash: string; managedCopiesPath: string | null; disposition: "candidate_only" | "local_bootstrap_inventory"; authority: "local_inventory_not_signed"; }; candidate: null; submittedManifestHash?: undefined; } | { state: "local_candidate_collected"; localMutation: boolean; sharedAuthority: "pending"; snapshotId: string; fingerprint: string; persisted: { manifestPath: string; snapshotPath: string; snapshotHash: string; managedCopiesPath: string | null; disposition: "candidate_only" | "local_bootstrap_inventory"; authority: "local_inventory_not_signed"; }; candidate: Record | null; submittedManifestHash: string; }>; export {}; //# sourceMappingURL=repositorySourceSync.d.ts.map