/** * Inference capacity probe (3.0.0 foundation). * * Optional backend telemetry adapter. Physical capacity belongs to the backend, * not to any agent/assignment/worker. For llama.cpp-compatible servers we can * observe `total_slots` from `/props` and per-slot `is_processing` from `/slots` * reliably. When a backend does not expose these, the caller reports * NOT_OBSERVED instead of guessing. * * Credentials are resolved per-probe and never persisted by the scheduler. */ import type { SharedInferenceResource } from "./types.js"; export interface InferenceCapacityObservation { capacity?: number; busySlots?: number; contextWindow?: number; observedAtMs: number; } export type InferenceCapacityProbeResult = { status: "observed"; observation: InferenceCapacityObservation; } | { status: "not_observed"; reason: string; }; export interface InferenceCapacityProbe { probe(resource: SharedInferenceResource): Promise; } export interface LlamaCppCapacityProbeOptions { /** Resolve the bearer key at probe time (never persisted). */ apiKey?: string | (() => Promise); fetchImpl?: typeof fetch; timeoutMs?: number; now?: () => number; } /** * llama.cpp server `/props` + `/slots` observation. * * `/props` exposes `total_slots` (the authoritative physical slot count) and * `default_generation_settings.n_ctx` (context window). `/slots` exposes each * slot's `is_processing` flag, from which busy slots are derived. */ export declare class LlamaCppCapacityProbe implements InferenceCapacityProbe { private readonly _apiKey?; private readonly _fetchImpl; private readonly _timeoutMs; private readonly _now; constructor(options?: LlamaCppCapacityProbeOptions); probe(resource: SharedInferenceResource): Promise; private _get; } //# sourceMappingURL=capacity-probe.d.ts.map