import type { Client } from "@libsql/client"; import { inspectReceiptAttempt, openReceiptAttempt, reopenReceiptAttempt } from "../../op/receipt-attempt.js"; import { type ReceiptV1 } from "../../op/receipt-v1.js"; import { appendPodTransformationProof, type AppendPodTransformationProofResult } from "./pod-transformation-proof-ledger.js"; import { type GitRunner } from "./vault-publish.js"; import { type PublicationPermissionObserver } from "./publication-permission.js"; import { type PublishedMachineSnapshot } from "../../yon/machine-ledger.js"; export type PodLedgerSyncStatus = "skipped" | "synced" | "conflict" | "error"; export interface SyncPodLedgerResult { status: PodLedgerSyncStatus; podDir?: string; pulled: boolean; committed: boolean; pushed: boolean; proofDigest?: string; proofRecordCount: 0 | 2; proofCommitted: boolean; receiptPersisted: boolean; reconstituted: boolean; subscriptionsReconstituted: number; warnings: string[]; publishedMachineSnapshot?: VerifiedPublishedMachineSnapshot; revalidatePublishedMachineSnapshot?: () => Promise; reason?: string; } export interface VerifiedPublishedMachineSnapshot extends PublishedMachineSnapshot { canonicalUrl: string; canonicalRepository: string; canonicalRef: string; priorCommitOid: string; priorMachineIds: string[]; } export interface PublishedMachineAuthority { snapshot: VerifiedPublishedMachineSnapshot; revalidate: () => Promise; } export declare function resolvePublishedMachineAuthorityForHousekeep(git?: GitRunner): Promise; export interface SyncPodLedgerArgs { handle?: string | undefined; push?: boolean | undefined; pull?: boolean | undefined; refreshOnly?: boolean | undefined; runGit?: GitRunner | undefined; registryDb?: Client | undefined; nowIso?: string | undefined; permissionObserver?: PublicationPermissionObserver | undefined; permissionAttemptId?: string | undefined; dependencies?: SyncPodLedgerDependencies | undefined; } export interface SyncPodLedgerDependencies { newOperationId?: () => string; newAttemptId?: () => string; findPendingAttempt?: (operationId: string) => Promise | null>; findSuccessfulAttempt?: (operationId: string) => Promise; now?: () => Date; openReceiptAttempt?: typeof openReceiptAttempt; reopenReceiptAttempt?: typeof reopenReceiptAttempt; inspectReceiptAttempt?: typeof inspectReceiptAttempt; appendProof?: (args: Parameters[0]) => Promise; } export declare function readVerifiedPublishedMachineSnapshotForTest(git: GitRunner, podDir: string, authority?: { canonicalUrl: string; canonicalRef: string; canonicalRepository: string; priorCommitOid: string; priorMachineIds: readonly string[]; currentMachineId: string; }): Promise; export declare function resolveConfiguredCanonicalAuthorityForTest(git: GitRunner, podDir: string, branchName: string, canonicalRef: string, expectedRepository: string): Promise<{ canonicalUrl: string; canonicalRepository: string; canonicalRef: string; } | undefined>; export declare function syncPodLedgerFlow(args?: SyncPodLedgerArgs): Promise; //# sourceMappingURL=sync-pod-ledger.d.ts.map