import type { DaemonApiRouteHandlers } from './context.js';
type JsonBody = Record<string, unknown>;
type RemotePeerAuth = unknown;
interface DistributedRuntimeRouteService {
    listPairRequests(): unknown;
    approvePairRequest(requestId: string, input: Record<string, unknown>): Promise<unknown | null>;
    rejectPairRequest(requestId: string, input: Record<string, unknown>): Promise<unknown | null>;
    listPeers(): unknown;
    rotatePeerToken(peerId: string, input: Record<string, unknown>): Promise<unknown | null>;
    revokePeerToken(peerId: string, input: Record<string, unknown>): Promise<unknown | null>;
    disconnectPeer(peerId: string, input: Record<string, unknown>): Promise<unknown | null>;
    listWork(): unknown;
    invokePeer(input: Record<string, unknown>): Promise<unknown>;
    cancelWork(workId: string, input: Record<string, unknown>): Promise<unknown | null>;
    getNodeHostContract(): unknown;
    requestPairing(input: Record<string, unknown>): Promise<unknown>;
    verifyPairRequest(requestId: string, challenge: string, input: Record<string, unknown>): Promise<unknown | null>;
    heartbeatPeer(auth: RemotePeerAuth, input: Record<string, unknown>): Promise<unknown>;
    claimWork(auth: RemotePeerAuth, input: Record<string, unknown>): Promise<unknown>;
    completeWork(auth: RemotePeerAuth, workId: string, input: Record<string, unknown>): Promise<unknown | null>;
}
interface SessionUserLike {
    readonly username: string;
}
interface DaemonRemoteRouteContext {
    readonly authToken?: string | null;
    readonly parseJsonBody: (req: Request) => Promise<JsonBody | Response>;
    readonly requireAdmin: (req: Request) => Response | null;
    readonly requireRemotePeer: (req: Request, scope?: string) => Promise<RemotePeerAuth | Response>;
    readonly requireAuthenticatedSession: (req: Request) => SessionUserLike | null;
    readonly distributedRuntime: DistributedRuntimeRouteService;
}
export declare function createDaemonRemoteRouteHandlers(context: DaemonRemoteRouteContext): Pick<DaemonApiRouteHandlers, 'getRemotePairRequests' | 'approveRemotePairRequest' | 'rejectRemotePairRequest' | 'getRemotePeers' | 'rotateRemotePeerToken' | 'revokeRemotePeerToken' | 'disconnectRemotePeer' | 'getRemoteWork' | 'invokeRemotePeer' | 'cancelRemoteWork' | 'getRemoteNodeHostContract'>;
export declare function handleRemotePairRequest(context: Pick<DaemonRemoteRouteContext, 'parseJsonBody' | 'distributedRuntime'>, req: Request): Promise<Response>;
export declare function handleRemotePairVerify(context: Pick<DaemonRemoteRouteContext, 'parseJsonBody' | 'distributedRuntime'>, req: Request): Promise<Response>;
export declare function handleRemotePeerHeartbeat(context: Pick<DaemonRemoteRouteContext, 'parseJsonBody' | 'requireRemotePeer' | 'distributedRuntime'>, req: Request): Promise<Response>;
export declare function handleRemotePeerWorkPull(context: Pick<DaemonRemoteRouteContext, 'parseJsonBody' | 'requireRemotePeer' | 'distributedRuntime'>, req: Request): Promise<Response>;
export declare function handleRemotePeerWorkComplete(context: Pick<DaemonRemoteRouteContext, 'parseJsonBody' | 'requireRemotePeer' | 'distributedRuntime'>, workId: string, req: Request): Promise<Response>;
export {};
//# sourceMappingURL=remote-routes.d.ts.map