import { PersistentStore } from '../../state/persistent-store.js'; import { StoreWriteQueue } from '../../state/store-write-queue.js'; import type { DistributedApprovalBridge, DistributedAutomationBridge, DistributedNodeHostContract, DistributedPendingWork, DistributedPeerAuth, DistributedPeerKind, DistributedPeerRecord, DistributedPeerTokenRecord, DistributedRuntimeAuditRecord, DistributedRuntimeManagerState, DistributedRuntimePairRequest, DistributedRuntimeSnapshotStore, DistributedSessionBridge, DistributedWorkPriority, DistributedWorkType, StoredPairRequest, StoredPeerRecord, DistributedRuntimeWaiter } from './distributed-runtime-types.js'; export declare class DistributedRuntimeManager implements DistributedRuntimeManagerState { readonly store: PersistentStore; readonly pairRequests: Map; readonly peers: Map; readonly work: Map; readonly audit: DistributedRuntimeAuditRecord[]; readonly waiters: Map; readonly writes: StoreWriteQueue; sessionBridge: DistributedSessionBridge | null; approvalBridge: DistributedApprovalBridge | null; automationBridge: DistributedAutomationBridge | null; eventPublisher: ((event: string, payload: unknown) => void) | null; loaded: boolean; constructor(storeOrPath: PersistentStore | string); attachRuntime(input: { readonly sessionBridge?: DistributedSessionBridge | null | undefined; readonly approvalBridge?: DistributedApprovalBridge | null | undefined; readonly automationBridge?: DistributedAutomationBridge | null | undefined; readonly eventPublisher?: ((event: string, payload: unknown) => void) | null | undefined; }): void; start(): Promise; listPairRequests(limit?: number): DistributedRuntimePairRequest[]; listPeers(kind?: DistributedPeerKind, limit?: number): DistributedPeerRecord[]; listWork(limit?: number, peerId?: string): DistributedPendingWork[]; listAudit(limit?: number): DistributedRuntimeAuditRecord[]; getSnapshot(): Record; getNodeHostContract(): DistributedNodeHostContract; requestPairing(input: { readonly peerKind: DistributedPeerKind; readonly requestedId?: string | undefined; readonly label: string; readonly platform?: string | undefined; readonly deviceFamily?: string | undefined; readonly version?: string | undefined; readonly clientMode?: string | undefined; readonly capabilities?: readonly string[] | undefined; readonly commands?: readonly string[] | undefined; readonly metadata?: Record | undefined; readonly requestedBy?: 'remote' | 'operator' | undefined; readonly remoteAddress?: string | undefined; readonly ttlMs?: number | undefined; }): Promise<{ request: DistributedRuntimePairRequest; challenge: string; }>; approvePairRequest(requestId: string, input?: { readonly actor?: string | undefined; readonly note?: string | undefined; readonly label?: string | undefined; readonly metadata?: Record | undefined; }): Promise<{ request: DistributedRuntimePairRequest; peer: DistributedPeerRecord; } | null>; rejectPairRequest(requestId: string, input?: { readonly actor?: string | undefined; readonly note?: string | undefined; }): Promise; verifyPairRequest(requestId: string, challenge: string, input?: { readonly remoteAddress?: string | undefined; readonly metadata?: Record | undefined; }): Promise<{ peer: DistributedPeerRecord; token: DistributedPeerTokenRecord & { value: string; }; } | null>; rotatePeerToken(peerId: string, input?: { readonly actor?: string | undefined; readonly label?: string | undefined; readonly scopes?: readonly string[] | undefined; }): Promise<{ peer: DistributedPeerRecord; token: DistributedPeerTokenRecord & { value: string; }; } | null>; revokePeerToken(peerId: string, input?: { readonly actor?: string | undefined; readonly tokenId?: string | undefined; readonly note?: string | undefined; }): Promise; disconnectPeer(peerId: string, input?: { readonly actor?: string | undefined; readonly note?: string | undefined; readonly requeueClaimedWork?: boolean | undefined; }): Promise; enqueueWork(input: { readonly peerId: string; readonly type?: DistributedWorkType | undefined; readonly command: string; readonly payload?: unknown | undefined; readonly priority?: DistributedWorkPriority | undefined; readonly actor?: string | undefined; readonly timeoutMs?: number | undefined; readonly sessionId?: string | undefined; readonly routeId?: string | undefined; readonly automationRunId?: string | undefined; readonly automationJobId?: string | undefined; readonly approvalId?: string | undefined; readonly metadata?: Record | undefined; }): Promise; invokePeer(input: { readonly peerId: string; readonly type?: DistributedWorkType | undefined; readonly command: string; readonly payload?: unknown | undefined; readonly priority?: DistributedWorkPriority | undefined; readonly actor?: string | undefined; readonly waitMs?: number | undefined; readonly timeoutMs?: number | undefined; readonly sessionId?: string | undefined; readonly routeId?: string | undefined; readonly automationRunId?: string | undefined; readonly automationJobId?: string | undefined; readonly approvalId?: string | undefined; readonly metadata?: Record | undefined; }): Promise<{ work: DistributedPendingWork; completed: boolean; }>; authenticatePeerToken(tokenValue: string, remoteAddress?: string): Promise; heartbeatPeer(auth: DistributedPeerAuth, input?: { readonly remoteAddress?: string | undefined; readonly capabilities?: readonly string[] | undefined; readonly commands?: readonly string[] | undefined; readonly version?: string | undefined; readonly clientMode?: string | undefined; readonly metadata?: Record | undefined; }): Promise; claimWork(auth: DistributedPeerAuth, input?: { readonly maxItems?: number | undefined; readonly leaseMs?: number | undefined; }): Promise; completeWork(auth: DistributedPeerAuth, workId: string, input?: { readonly status?: 'completed' | 'failed' | 'cancelled' | undefined; readonly result?: unknown | undefined; readonly error?: string | undefined; readonly telemetry?: DistributedPendingWork['telemetry'] | undefined; readonly metadata?: Record | undefined; }): Promise; cancelWork(workId: string, input?: { readonly actor?: string | undefined; readonly reason?: string | undefined; }): Promise; } //# sourceMappingURL=distributed-runtime-manager.d.ts.map