/** * daemon/machine.ts — what this machine is, so work can be sent to the right one. * * THE MODEL. A fleet of machines running agents is not a distributed-systems * problem, it is a team. Each machine is a developer with their own computer, * their own checkout and their own branch; git is already the protocol for * merging their work, and it was designed for exactly this — people who cannot * see each other's screens, working in parallel, reconciling later. Nothing here * tries to improve on that. * * What a team does need, and what a lone machine never did, is to know who can * take which job. Sending a build to a machine without a compiler, or screen * verification to one with no display, fails slowly and confusingly rather than * immediately. So each hub says what it is, and the answer travels with every * ping. * * DELIBERATELY DESCRIPTIVE, NOT PRESCRIPTIVE. This reports what is true of the * machine; it does not enforce anything. A scheduler may ignore it. The failure * of a capability list is always that it drifts from reality, so everything here * is measured at the moment of asking rather than written into a config file * somebody has to remember to update. */ export interface MachineFacts { /** What a person calls this machine. */ name: string; host: string; os: string; arch: string; cpus: number; memoryGb: number; /** Can it drive a screen — is there a window server with a display attached. */ canDriveScreen: boolean; /** Toolchains that are actually present, not ones somebody hoped for. */ has: string[]; /** Where this hub keeps checkouts, if it has been told. */ workRoot?: string; } /** * Facts about this machine, re-measured occasionally. * * Cached for a few minutes because probing toolchains costs several process * launches and the answer rarely changes — but not cached forever, because * "Xcode finished installing" is exactly the sort of change that should not * require a daemon restart to become visible. */ export declare function machineFacts(): MachineFacts; /** * The state of a checkout, so a lead can ask "where are you" without asking. * * Reported rather than controlled. The whole point of giving each machine its * own branch is that it works without permission; what the fleet needs back is * enough to decide whether the work is ready to look at. */ export declare function branchState(repo: string): { repo: string; branch?: string; head?: string; dirty?: number; ahead?: number; behind?: number; error?: string; }; //# sourceMappingURL=machine.d.ts.map