import type { EnboxPlatformAgent } from './types/agent.js';
import type { PermissionsApi } from './types/permissions.js';
import type { SyncMessageEntry } from './sync-messages.js';
import type { SyncScope } from './types/sync.js';
export type AdmitOutcome = {
    kind: 'admitted';
    appliedCids: string[];
} | {
    kind: 'deferred';
    rootCid: string;
    detail?: string;
} | {
    kind: 'failed';
    rootCid: string;
    reason: 'invalid' | 'terminal';
    detail?: string;
};
export type AdmitClosureDeps = {
    did: string;
    dwnUrl: string;
    delegateDid?: string;
    permissionGrantIds?: string[];
    scope?: SyncScope;
    agent: EnboxPlatformAgent;
    permissionsApi?: PermissionsApi;
    prefetched?: SyncMessageEntry[];
    shouldContinue?: () => boolean;
};
/**
 * Applies a sync root and any dependencies it discovers through the DWN's
 * structured replication result. The DWN decides whether a message is applied,
 * duplicate, superseded, incomplete, invalid, or deferred; this module only
 * fetches missing dependencies and retries in dependency order.
 */
export declare function admitClosure(rootCid: string, deps: AdmitClosureDeps): Promise<AdmitOutcome>;
//# sourceMappingURL=sync-admit-closure.d.ts.map