import type { MachineView } from "../../types/machines.js"; import { type OpenGeniText } from "../../messages/runtime.js"; type Runtime = NonNullable; type Authority = MachineView["connectionAuthority"]; /** `waiting` is neutral progress or a postponement; `attention` asks for a look. */ export type StatusTone = "ok" | "progress" | "waiting" | "attention" | "failed" | "muted"; export type AgentUpdateAction = "update" | "retry" | "resend"; export type AgentRuntimeStatus = { /** "Agent v0.1.54" */ title: string; /** One short line: "Up to date", "Updates to v0.1.55 when current work finishes", … */ status: string; tone: StatusTone; /** Extra explanation under the status (blocked reason, failure cause). */ note: string | null; /** The one action that can help right now, before permission/online checks. */ action: { kind: AgentUpdateAction; label: string; } | null; }; /** An update request the agent has not confirmed after this long can be resent. */ export declare const UPDATE_CONFIRMATION_GRACE_MS = 30000; /** Presentation only; never a deadline for work or update admission. */ export declare const UPDATE_HOLD_ATTENTION_MS: number; /** A busy machine postpones an update instead of interrupting work. The agent * reports this as a retryable `update_busy_*` result; it is not a failure. */ export declare function isPostponedUpdate(errorCode: string | null | undefined): boolean; /** * Describe the connected agent's build and update in plain words. A failed * update whose target is already installed is moot and ignored; a postponed * update reads as postponed, not failed. */ export declare function describeAgentRuntime(t: OpenGeniText, runtime: Runtime, now: number, online?: boolean): AgentRuntimeStatus; /** A competing agent process retries at least every ten seconds while it runs, * so a refusal older than this belongs to history, not to the present. */ export declare const RUNNER_CONFLICT_ACTIVE_MS: number; export type RunnerConflict = { /** A second agent process on the machine is being kept out right now. */ active: boolean; count: number; lastAt: string | null; }; export declare function runnerConflict(authority: Authority, now: number): RunnerConflict | null; /** Plain words for the live connection: "Connected", "Reconnected 3 times". */ export declare function describeAgentConnection(t: OpenGeniText, authority: Authority): { label: string; detail: string | null; }; export declare const STATUS_TONE_TEXT: Record; export {};