import type { AcpConnection } from './store/domains/acp.js';
import type { RuntimeStore } from './store/index.js';
import type { DistributedRuntimeManager } from './remote/distributed-runtime-manager.js';
import type { DistributedNodeHostContract, DistributedPeerAuth, DistributedPeerKind, DistributedPeerRecord, DistributedPendingWork, DistributedRuntimePairRequest } from './remote/index.js';
import type { RemoteExecutionArtifact, RemoteRunnerContract, RemoteRunnerPool } from './remote/types.js';
import type { RemoteRunnerRegistry } from './remote/runner-registry.js';
import type { RemoteSupervisor, RemoteSupervisorSnapshot } from './remote/supervisor.js';
import type { RemoteSessionStateSnapshot } from './remote/session-state.js';
export interface PeerClientDependencies {
    readonly runtimeStore: RuntimeStore;
    readonly distributedRuntime: DistributedRuntimeManager;
    readonly remoteRunnerRegistry: RemoteRunnerRegistry;
    readonly remoteSupervisor: RemoteSupervisor;
}
export interface PeerClientPairingSnapshot {
    readonly requests: readonly DistributedRuntimePairRequest[];
    readonly total: number;
    readonly pending: number;
    readonly approved: number;
    readonly verified: number;
    readonly rejected: number;
    readonly expired: number;
}
export interface PeerClientPeerSnapshot {
    readonly peerId: string;
    readonly peer: DistributedPeerRecord | null;
    readonly session: RemoteSessionStateSnapshot | null;
    readonly runnerContract: RemoteRunnerContract | null;
    readonly pairRequests: readonly DistributedRuntimePairRequest[];
    readonly pendingWork: readonly DistributedPendingWork[];
    readonly artifacts: readonly RemoteExecutionArtifact[];
}
export interface PeerClientRunnersSnapshot {
    readonly pools: readonly RemoteRunnerPool[];
    readonly contracts: readonly RemoteRunnerContract[];
    readonly artifacts: readonly RemoteExecutionArtifact[];
}
export interface PeerClientAcpSnapshot {
    readonly transportState: string;
    readonly totalMessages: number;
    readonly activeConnections: readonly AcpConnection[];
}
export interface PeerClientSnapshot {
    readonly capturedAt: number;
    readonly nodeHostContract: DistributedNodeHostContract;
    readonly acp: PeerClientAcpSnapshot;
    readonly pairing: PeerClientPairingSnapshot;
    readonly peers: readonly DistributedPeerRecord[];
    readonly peerSnapshots: readonly PeerClientPeerSnapshot[];
    readonly work: readonly DistributedPendingWork[];
    readonly runners: PeerClientRunnersSnapshot;
    readonly supervisor: RemoteSupervisorSnapshot;
}
export interface PeerClientPairingDomain {
    listRequests(limit?: number): DistributedRuntimePairRequest[];
    request(input: Parameters<DistributedRuntimeManager['requestPairing']>[0]): ReturnType<DistributedRuntimeManager['requestPairing']>;
    approve(requestId: string, input?: Parameters<DistributedRuntimeManager['approvePairRequest']>[1]): ReturnType<DistributedRuntimeManager['approvePairRequest']>;
    reject(requestId: string, input?: Parameters<DistributedRuntimeManager['rejectPairRequest']>[1]): ReturnType<DistributedRuntimeManager['rejectPairRequest']>;
    verify(requestId: string, challenge: string, input?: Parameters<DistributedRuntimeManager['verifyPairRequest']>[2]): ReturnType<DistributedRuntimeManager['verifyPairRequest']>;
}
export interface PeerClientPeersDomain {
    list(kind?: DistributedPeerKind, limit?: number): DistributedPeerRecord[];
    get(peerId: string): DistributedPeerRecord | null;
    getSnapshot(peerId: string): PeerClientPeerSnapshot | null;
    authenticateToken(tokenValue: string, remoteAddress?: string): ReturnType<DistributedRuntimeManager['authenticatePeerToken']>;
    heartbeat(auth: DistributedPeerAuth, input?: Parameters<DistributedRuntimeManager['heartbeatPeer']>[1]): ReturnType<DistributedRuntimeManager['heartbeatPeer']>;
    rotateToken(peerId: string, input?: Parameters<DistributedRuntimeManager['rotatePeerToken']>[1]): ReturnType<DistributedRuntimeManager['rotatePeerToken']>;
    revokeToken(peerId: string, input?: Parameters<DistributedRuntimeManager['revokePeerToken']>[1]): ReturnType<DistributedRuntimeManager['revokePeerToken']>;
    disconnect(peerId: string, input?: Parameters<DistributedRuntimeManager['disconnectPeer']>[1]): ReturnType<DistributedRuntimeManager['disconnectPeer']>;
}
export interface PeerClientWorkDomain {
    list(limit?: number, peerId?: string): DistributedPendingWork[];
    enqueue(input: Parameters<DistributedRuntimeManager['enqueueWork']>[0]): ReturnType<DistributedRuntimeManager['enqueueWork']>;
    invoke(input: Parameters<DistributedRuntimeManager['invokePeer']>[0]): ReturnType<DistributedRuntimeManager['invokePeer']>;
    claim(auth: DistributedPeerAuth, input?: Parameters<DistributedRuntimeManager['claimWork']>[1]): ReturnType<DistributedRuntimeManager['claimWork']>;
    complete(auth: DistributedPeerAuth, workId: string, input?: Parameters<DistributedRuntimeManager['completeWork']>[2]): ReturnType<DistributedRuntimeManager['completeWork']>;
    cancel(workId: string, input?: Parameters<DistributedRuntimeManager['cancelWork']>[1]): ReturnType<DistributedRuntimeManager['cancelWork']>;
}
export interface PeerClientRunnersDomain {
    listPools(): RemoteRunnerPool[];
    getPool(poolId: string): RemoteRunnerPool | null;
    createPool(input: Parameters<RemoteRunnerRegistry['createPool']>[0]): RemoteRunnerPool;
    assignRunnerToPool(poolId: string, runnerId: string): RemoteRunnerPool | null;
    removeRunnerFromPool(poolId: string, runnerId: string): RemoteRunnerPool | null;
    listContracts(): RemoteRunnerContract[];
    getContract(runnerId: string): RemoteRunnerContract | null;
    registerContract(contract: RemoteRunnerContract): RemoteRunnerContract;
    upsertContractForAgent(agentId: string): RemoteRunnerContract | null;
    listArtifacts(): RemoteExecutionArtifact[];
    getArtifact(artifactId: string): RemoteExecutionArtifact | null;
    captureArtifactForAgent(agentId: string): RemoteExecutionArtifact | null;
    captureArtifactForRunner(runnerId: string): RemoteExecutionArtifact | null;
    exportArtifact(artifactId: string, path?: string): ReturnType<RemoteRunnerRegistry['exportArtifact']>;
    importArtifact(path: string): ReturnType<RemoteRunnerRegistry['importArtifact']>;
    buildReviewSummary(artifactId: string): string | null;
    exportSessionBundle(path?: string): ReturnType<RemoteRunnerRegistry['exportSessionBundle']>;
    importSessionBundle(path: string): ReturnType<RemoteRunnerRegistry['importSessionBundle']>;
}
export interface PeerClient {
    readonly pairing: PeerClientPairingDomain;
    readonly peers: PeerClientPeersDomain;
    readonly work: PeerClientWorkDomain;
    readonly runners: PeerClientRunnersDomain;
    getSnapshot(): PeerClientSnapshot;
    getNodeHostContract(): DistributedNodeHostContract;
}
export declare function createPeerClient(deps: PeerClientDependencies): PeerClient;
//# sourceMappingURL=peer-client.d.ts.map