import type { NavPoint } from "../nav/navGrid.js"; export type JobPhase = "idle" | "travelling" | "working" | "done"; export interface JobDef { id?: string; station: NavPoint; work: number; priority?: number; arriveRadius?: number; repeat?: boolean; } export interface Job { id: string; station: NavPoint; work: number; priority: number; arriveRadius: number; repeat: boolean; worker: string | null; } export interface JobTickContext { distanceToStation: number; } export interface JobReport { jobId: string; workerId: string; cycle: number; } export interface WorkerState { jobId: string | null; phase: JobPhase; worked: number; cycles: number; } export interface JobBoard { post(job: JobDef): string; cancel(jobId: string): boolean; assign(workerId: string, jobId: string): boolean; claim(workerId: string): string | null; release(workerId: string): void; advance(workerId: string, dt: number, ctx: JobTickContext): JobReport | null; worker(workerId: string): WorkerState; station(workerId: string): NavPoint | null; jobOf(workerId: string): string | null; get(jobId: string): Job | null; queued(): readonly Job[]; active(): readonly Job[]; list(): readonly Job[]; } /** @internal */ export declare function createJobBoard(): JobBoard;