/** A release selected by the API and delivered inside the PQ-sealed response. */ export interface AgentRelease { package: '@forgezero/agent'; version: string; integrity: string; tarball: string; } export interface UpdateCommand { command: string; args: readonly string[]; cwd?: string; } export interface UpdateCommandResult { exitCode: number; output: string; } export interface StagedAgentRelease { version: string; fromVersion: string; directory: string; previousTarget: string; nextTarget: string; currentLink: string; } export declare const DEFAULT_AGENT_RELEASE_ROOT = "/opt/forgezero/agent"; export declare const DEFAULT_AGENT_CANDIDATE_LINK = "/opt/forgezero/agent/candidate"; export declare const DEFAULT_AGENT_UPDATE_SOCKET = "/run/forgezero-update/helper.sock"; export declare const MAX_AGENT_TARBALL_BYTES: number; /** Root helper input is data, never a command or filesystem path. */ export declare function validateAgentRelease(release: AgentRelease): AgentRelease; export declare function compareVersions(left: string, right: string): number; /** * Download, verify and atomically select one self-contained Agent release. * * The published `fz-agent.js` and `fz.js` are dependency-bundled. No package * manager executes lifecycle scripts on a compute, and no mutable global * node_modules tree sits underneath a running daemon. */ export declare function stageAgentRelease(releaseInput: AgentRelease, options: { currentVersion: string; root?: string; fetch?: typeof globalThis.fetch; run?: (input: UpdateCommand) => Promise; }): Promise; /** Select the already-verified immutable directory immediately before restart. */ export declare function selectAgentRelease(staged: StagedAgentRelease): void; /** Roll back only to the exact link target captured before activation. */ export declare function restoreAgentRelease(staged: StagedAgentRelease): void; /** Select a verified candidate without changing the active generation. */ export declare function selectAgentCandidate(staged: StagedAgentRelease): void; export declare function clearAgentCandidate(root?: string): void;