/** * @module b2tfs-snapshot-sync-adapter * * Implements SyncDomainAdapter for B2tFS snapshot-based repositories. * Leverages immutable snapshot trees to eliminate recursive crawling of * unchanged repository files during both Init stage analysis and * fast-forward delta payload calculation. */ import { IbGibAddr } from '@ibgib/ts-gib/dist/types.mjs'; import { IbGib_V1 } from '@ibgib/ts-gib/dist/V1/types.mjs'; import { IbGibSpaceAny } from '../../../witness/space/space-base-v1.mjs'; import { SyncDomainAdapter, DomainIbGibAnalysisInfo, SnapshotSyncManifest } from '../../../sync/sync-types.mjs'; import { B2tFSBranchIbGib_V1 } from '../branch/branch-types.mjs'; import { B2tFSSnapshotIbGib_V1 } from '../snapshot/snapshot-types.mjs'; import { CosmosIbGib_V1 } from '../../cosmos/cosmos-types.mjs'; import { GalaxyIbGib_V1 } from '../../galaxy/galaxy-types.mjs'; export interface B2tFSSnapshotSyncAdapterOpts { /** Target branch being synchronized */ branchIbGib?: B2tFSBranchIbGib_V1; /** Latest branch snapshot stone */ latestSnapshot?: B2tFSSnapshotIbGib_V1; /** Previous branch snapshot stone (if any) */ previousSnapshot?: B2tFSSnapshotIbGib_V1; /** Cosmos stone (if part of domain) */ cosmosIbGib?: CosmosIbGib_V1; /** Galaxy stone (if part of domain) */ galaxyIbGib?: GalaxyIbGib_V1; /** Precomputed intermediate manifest */ accelerationHint?: SnapshotSyncManifest; /** * When true, runs calculations in shadow/diagnostic mode and returns undefined * to allow generic sync to execute. */ shadowOnly?: boolean; } export declare class B2tFSSnapshotSyncAdapter implements SyncDomainAdapter { protected opts: B2tFSSnapshotSyncAdapterOpts; readonly adapterId = "b2tfs-snapshot-v1"; private lc; constructor(opts?: B2tFSSnapshotSyncAdapterOpts); /** * Optimizes domain analysis by restricting live: true resolution only to dynamic * roots (branch, galaxy, cosmos) while treating snapshot stones as static content. */ analyzeDomainIbGibs({ domainIbGibs, space, }: { domainIbGibs: IbGib_V1[]; space: IbGibSpaceAny; }): Promise; /** * Computes the fast-forward delta payload using snapshot tree diffing instead * of traversing the entire previous commit tree. */ computeDeltaPayload({ latestCommonFrameAddr, latestLocalAddr, localSpace, }: { latestCommonFrameAddr: string; latestLocalAddr: string; localSpace: IbGibSpaceAny; }): Promise<{ deltaPayloadIbGibs: IbGib_V1[]; deltaPayloadAddrs: IbGibAddr[]; } | undefined>; } //# sourceMappingURL=b2tfs-snapshot-sync-adapter.d.mts.map