import type { HeldImage } from "./placement"; import type { NodeInventory } from "./types"; /** The G1 calls AutoManager makes. @public */ export interface WarmNodeTransport { /** Ask the node's worker to pull these image refs now. */ prefetchImages(nodeId: string, refs: string[]): Promise; /** Override how long this node lingers idle before the daemon expires * it. `0` means "use the global `emptyNodeLinger`". */ setNodeIdleExpiry(nodeId: string, ms: number): Promise; /** Merge these tags onto the node's metadata; the daemon persists them. */ setNodeTags(nodeId: string, tags: Record): Promise; /** The images this node advertises holding. */ heldImages(nodeId: string, inv: NodeInventory | undefined): HeldImage[]; } /** * Read the advertised image set off a node inventory, in the shape * `warmth` scores against: the digest out of `image_ref` * (`repository@sha256:`) plus the `repository:tag` names the node * currently answers to for it. * * Written defensively (the field is optional and an older worker sends * nothing) so a node that advertises no images scores cold rather than * throwing. * * @public */ export declare function inventoryImageDigests(inv: unknown): HeldImage[]; /** * Split an image string into the two things warmth can match on. A ref may * carry either or both: `repo:tag`, `repo@sha256:...`, or * `repo:tag@sha256:...`. * * @public */ export declare function parseImageString(ref: string): HeldImage & { repoTag?: string; }; /** The image set a template needs, as `ImageRef`s placement can score. @public */ export declare function imageRefsFrom(refs: string[]): { repoTag?: string; digest?: string; }[]; /** * Bind the transport to a Manager client. Duck-typed: when the generated * RPC exists it is used, otherwise the call is reported through * `onUnsupported` and does nothing. * * @public */ export declare function warmNodeTransport(norsk: unknown, onUnsupported: (what: string, detail: Record) => void, override?: Partial): WarmNodeTransport; //# sourceMappingURL=warmAdapter.d.ts.map