import type { DistributedPendingWork, DistributedRuntimeAuditRecord, DistributedRuntimeManagerState, DistributedRuntimePairRequest, DistributedPeerKind, DistributedPeerRecord, DistributedRuntimeWaiter } from './distributed-runtime-types.js'; export declare function attachDistributedRuntime(state: DistributedRuntimeManagerState, input: { readonly sessionBridge?: DistributedRuntimeManagerState['sessionBridge'] | undefined; readonly approvalBridge?: DistributedRuntimeManagerState['approvalBridge'] | undefined; readonly automationBridge?: DistributedRuntimeManagerState['automationBridge'] | undefined; readonly eventPublisher?: DistributedRuntimeManagerState['eventPublisher'] | undefined; }): void; export declare function startDistributedRuntime(state: DistributedRuntimeManagerState): Promise; export declare function listDistributedRuntimePairRequests(state: DistributedRuntimeManagerState, limit?: number): DistributedRuntimePairRequest[]; export declare function listDistributedRuntimePeers(state: DistributedRuntimeManagerState, kind?: DistributedPeerKind, limit?: number): DistributedPeerRecord[]; export declare function listDistributedRuntimeWork(state: DistributedRuntimeManagerState, limit?: number, peerId?: string): DistributedPendingWork[]; export declare function listDistributedRuntimeAudit(state: DistributedRuntimeManagerState, limit?: number): DistributedRuntimeAuditRecord[]; export declare function getDistributedRuntimeSnapshot(state: DistributedRuntimeManagerState): Record; export declare function publishDistributedRuntimeEvent(state: DistributedRuntimeManagerState, event: string, payload: unknown): void; export declare function recordDistributedRuntimeAudit(state: DistributedRuntimeManagerState, record: DistributedRuntimeAuditRecord): void; export declare function expireDistributedPairRequests(state: DistributedRuntimeManagerState, now?: number): void; export declare function requeueDistributedExpiredClaims(state: DistributedRuntimeManagerState, now?: number): void; export declare function waitForDistributedWork(state: DistributedRuntimeManagerState, workId: string, timeoutMs: number): Promise; export declare function resolveDistributedRuntimeWaiters(state: DistributedRuntimeManagerState, work: DistributedPendingWork): void; export declare function removeDistributedRuntimeWaiter(state: DistributedRuntimeManagerState, workId: string, resolve: DistributedRuntimeWaiter['resolve']): void; export declare function pruneAndPersistDistributedRuntime(state: DistributedRuntimeManagerState): Promise; /** * Write the whole distributed-runtime state as it stands at THIS call, after * every write already queued has finished. * * `PersistentStore.persist` is atomic but unordered, and this store is written * from three directions at once: awaited writes at the end of every pairing and * work verb, and two UNAWAITED ones, `expireDistributedPairRequests` and * `requeueDistributedExpiredClaims` both fire `persistDistributedRuntimeAsync`, * and both are reached from ordinary list/read calls, so a plain `GET` starts a * background write. Unordered, that background write's rename could land after * a verb's and put its older view back on disk: a pair request rejected or * revoked seconds earlier reads back as 'pending', which is a peer somebody * turned away still able to complete pairing; and a completed unit of work * reads back as 'queued', which is that work dispatched to a peer a second time. * * The snapshot is still built here, synchronously, every caller mutates the * maps and then persists, so each snapshot is at least as new as the one queued * before it. */ export declare function persistDistributedRuntime(state: DistributedRuntimeManagerState): Promise; //# sourceMappingURL=distributed-runtime-store.d.ts.map