import type { Settings } from "@opengeni/config"; import { type Database, type MachineMetricsRow } from "@opengeni/db"; import { MetricSample, type MachinesResponse } from "@opengeni/contracts"; export type MachinesServices = { db: Database; settings: Settings; }; /** * Project a stored `machine_metrics_latest` row to the contract `MetricSample`. * The DB carries `gpuUtilPercent` + `gpuMemUsedBytes`/`gpuMemTotalBytes`; the wire * `MetricSample` exposes the single `gpuUtilPct` + `gpuMemBytes` (USED bytes — the * "how much VRAM is in use" the dashboard reads). A null any-numeric stays null * (the not-reported contract); the byte/load fields default to 0 when a sample * carried no value (the agent reports 0 == not-reported for those). */ export declare function metricRowToSample(row: MachineMetricsRow): MetricSample; /** * Build the Machines dashboard response for a workspace. When `sessionId` is * supplied (an in-session view) the session's synthetic home group box is * prepended when one exists (`isSessionGroup:true`) and the active-sandbox pointer is echoed; * without it (the pure workspace dashboard) `activeSandboxId` is null and only * the enrolled machines are listed. */ export declare function listMachines(services: MachinesServices, input: { accountId?: string; workspaceId: string; subjectId?: string; sessionId?: string | null; }): Promise;