import type { AutomationRunTelemetry } from '../../automation/runs.js';
import type { DistributedPendingWork, DistributedPeerRecord, DistributedRuntimeManagerState, DistributedWorkPriority, DistributedWorkType } from './distributed-runtime-types.js';
export declare function enqueueDistributedWork(state: DistributedRuntimeManagerState, 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<string, unknown> | undefined;
}): Promise<DistributedPendingWork>;
export declare function invokeDistributedPeer(state: DistributedRuntimeManagerState, input: {
    readonly peerId: string;
    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<string, unknown> | undefined;
}): Promise<{
    work: DistributedPendingWork;
    completed: boolean;
}>;
export declare function claimDistributedWork(state: DistributedRuntimeManagerState, auth: {
    readonly peer: DistributedPeerRecord;
    readonly token: {
        readonly id: string;
    };
}, input?: {
    readonly maxItems?: number | undefined;
    readonly leaseMs?: number | undefined;
}): Promise<DistributedPendingWork[]>;
export declare function completeDistributedWork(state: DistributedRuntimeManagerState, auth: {
    readonly peer: DistributedPeerRecord;
    readonly token: {
        readonly id: string;
    };
}, workId: string, input?: {
    readonly status?: 'completed' | 'failed' | 'cancelled' | undefined;
    readonly result?: unknown | undefined;
    readonly error?: string | undefined;
    readonly telemetry?: AutomationRunTelemetry | undefined;
    readonly metadata?: Record<string, unknown> | undefined;
}): Promise<DistributedPendingWork | null>;
export declare function cancelDistributedWork(state: DistributedRuntimeManagerState, workId: string, input?: {
    readonly actor?: string | undefined;
    readonly reason?: string | undefined;
}): Promise<DistributedPendingWork | null>;
//# sourceMappingURL=distributed-runtime-work.d.ts.map