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[0]): ReturnType; approve(requestId: string, input?: Parameters[1]): ReturnType; reject(requestId: string, input?: Parameters[1]): ReturnType; verify(requestId: string, challenge: string, input?: Parameters[2]): ReturnType; } 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; heartbeat(auth: DistributedPeerAuth, input?: Parameters[1]): ReturnType; rotateToken(peerId: string, input?: Parameters[1]): ReturnType; revokeToken(peerId: string, input?: Parameters[1]): ReturnType; disconnect(peerId: string, input?: Parameters[1]): ReturnType; } export interface PeerClientWorkDomain { list(limit?: number, peerId?: string): DistributedPendingWork[]; enqueue(input: Parameters[0]): ReturnType; invoke(input: Parameters[0]): ReturnType; claim(auth: DistributedPeerAuth, input?: Parameters[1]): ReturnType; complete(auth: DistributedPeerAuth, workId: string, input?: Parameters[2]): ReturnType; cancel(workId: string, input?: Parameters[1]): ReturnType; } export interface PeerClientRunnersDomain { listPools(): RemoteRunnerPool[]; getPool(poolId: string): RemoteRunnerPool | null; createPool(input: Parameters[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; importArtifact(path: string): ReturnType; buildReviewSummary(artifactId: string): string | null; exportSessionBundle(path?: string): ReturnType; importSessionBundle(path: string): ReturnType; } 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