import { type AssignmentPollResponse, type ClaimResponse, type HeartbeatResponse, type RunnerRegistrationRequest, type RunnerRegistrationResponse } from "../contract.js"; export interface PoolClientConfig { /** Control-plane origin, e.g. https://api.boardwalk.sh */ baseUrl: string; /** The standing `bwkr_…` credential (absent only for `register`). */ runnerToken?: string; /** This daemon's package version, declared on every call for display and support. */ runnerVersion?: string; fetchImpl?: typeof fetch; } export declare class PoolClientError extends Error { readonly status: number; readonly operation: string; constructor(status: number, operation: string, message: string); } export declare class PoolClient { private readonly cfg; private readonly fetchImpl; constructor(cfg: PoolClientConfig); private url; private headers; /** Redeem a registration token (unauthenticated: the token in the body IS the credential). */ register(request: RunnerRegistrationRequest): Promise; /** What this runner declares about itself on every authenticated call — read LIVE by the * control plane, so upgrading the daemon is what fixes a compatibility refusal. */ private declaration; /** Long-poll for ONE credential-free offer (the server holds ~22s). */ poll(): Promise; /** Race-safe claim. Null on 409 — another runner won; go back to polling. */ claim(assignmentId: string): Promise; /** Extend the assignment lease + receive the control signal. Null on 409 — lease lost: * the control plane recovered the assignment; discard local state. */ heartbeat(leaseId: string, runId: string, phase: "preparing" | "running" | "finalizing"): Promise; /** Permanent removal (decommissioning this machine). */ deregister(): Promise; }