/** * `InfoClient` — backed by `GET /v1/info` and `GET /v1/auth/me` on QAR. * * Both surfaces are HTTP-not-WS: the consumer can call them before opening a * WebSocket (e.g. to discover the bootstrap document, or to confirm identity * before kicking off a task). The implementation reuses the bearer resolved * by `AuthProvider` so Studio / IDE-extension consumers don't have to thread * the token themselves. * * No caching at this layer — consumers that want it (Studio's tool inventory * panel) wrap the call themselves. The wire-level rate-limit policy lives on * `QARInfo.rate_limits` as a per-route map. */ import type { QARInfo, LeanPrincipal } from '../qar/info.js'; export declare class InfoClient { private readonly baseUrl; private readonly allowInsecureTransport; private readonly authProvider; private readonly extraHeaders; private readonly fetchImpl; private readonly traceContext; private cachedHttpBase; /** * Fetch the bootstrap document. Calls `GET /v1/info`. * * The result is intentionally not cached at this layer — consumers who want * caching wrap the call themselves. Rate-limit data lives on * `QARInfo.rate_limits` as a per-route map. * * Throws `QodoAuthError` on 401/403 (with the auth source named in the * message), and a plain `Error` on any other non-2xx response. */ get(): Promise; /** * Fetch the resolved principal via `GET /v1/auth/me`. * * Bearer-token auth flows here unchanged from 1.x — the same path, the same * `LeanPrincipal` shape. Throws `QodoAuthError` on 401/403. */ me(): Promise; private request; /** * URL parsing is lazy on purpose: `QodoClient.validateOptions` only checks * `baseUrl` is a non-empty string. Eager derivation would change behavior * for callers who construct a client with an invalid scheme but never call * any HTTP method. Cache the result so repeated calls don't re-parse. */ private requireHttpBase; } //# sourceMappingURL=InfoClient.d.ts.map