/** * Remote shared inference admission client (3.0.0 cross-host bridge). * * Implements `SharedInferenceAdmissionPort` over the structured HTTP protocol to * the local admission service. It NEVER re-implements the scheduling algorithm * and NEVER falls back to direct provider access: when the scheduler is * unreachable or returns an error, `acquire` resolves to a `cancelled` outcome * with a `scheduler_unavailable` reason, which the stream seam surfaces as a * fail-closed error stream. */ import type { InferenceAdmissionInput, ReleaseInferenceInput, SharedInferenceAdmissionPort } from "./admission-port.js"; import type { AcquireInferenceOutcome, AdmittedInference, ReleaseInferenceOutcome, SharedInferenceResource } from "./types.js"; export interface RemoteAdmissionClientOptions { baseUrl: string; token: string; executionId: string; resources: SharedInferenceResource[]; /** Poll cadence while waiting for admission. */ pollMs?: number; /** Per-request HTTP timeout. */ timeoutMs?: number; /** Injectable fetch (tests). */ fetchImpl?: typeof fetch; } export declare class RemoteSchedulerAdmissionClient implements SharedInferenceAdmissionPort { readonly kind: "remote"; private readonly _baseUrl; private readonly _token; private readonly _executionId; private readonly _resources; private readonly _pollMs; private readonly _timeoutMs; private readonly _fetchImpl; constructor(options: RemoteAdmissionClientOptions); resourceFor(model: { provider: string; id: string; }): SharedInferenceResource | undefined; acquire(input: InferenceAdmissionInput & { signal?: AbortSignal; queueWaitTimeoutMs?: number; }): Promise; release(admitted: AdmittedInference, outcome: ReleaseInferenceInput): Promise; cancel(inferenceRequestId: string): Promise<{ status: "cancelled" | "not_found" | "running"; inferenceRequestId: string; }>; private _requestAdmission; private _status; private _post; private _get; private _decodeResponse; } /** Fail-closed marker used to convert transport failure into a cancelled outcome. */ export declare class AdmissionUnavailableError extends Error { readonly inferenceRequestId: string; constructor(reason: string, inferenceRequestId: string); } //# sourceMappingURL=remote-admission-client.d.ts.map