import type { LoopMachineRef } from "../types.js"; export interface MachineCommandPlan { command: string; args: string[]; source: string; } export interface OpenMachineSummary { id: string; hostname?: string; platform?: string; user?: string; workspacePath?: string; route?: string; local: boolean; heartbeatStatus?: string; tailscaleOnline?: boolean | null; tags: string[]; } export declare function listOpenMachines(): OpenMachineSummary[]; export declare function resolveLoopMachine(machineId: string): LoopMachineRef; export declare function resolveMachineCommand(machineId: string, command: string): MachineCommandPlan; export declare function refreshLoopMachine(machine: LoopMachineRef): LoopMachineRef; /** * Fail-closed validation of an incoming machine assignment on a create path. * * The scheduler gates every claim on the STORED machine ref * (`runnerMatchesLoop` reads `machine.id`), so a stored value that is not a * well-formed ref is a loop that can never be claimed: a bare string stores * as machine_json `"spark02"` whose `id` is undefined, matching no runner, * and an empty object matches no runner either. Both present as "leased but * never executed" — the O15-00172 assignment-loss class. Every surface that * can place a machine on a loop (server create route, SDK create) must pass * machine values through here so a malformed pin fails loudly at create time * instead of persisting an unclaimable loop. */ export declare function validateLoopMachineRef(machine: unknown, label?: string): asserts machine is LoopMachineRef;