/** * `QARInfo` — the response shape for `GET /v1/info` on QAR. * * Backed by the codegen output in `./generated/qar-info.ts` (regenerated * from `schemas/qar/qar-info.json` via `npm run codegen:qar`). The * runtime exposes a deployment-kind discriminator, a `runtime_version` * field, a per-route `rate_limits` map, and a forward-compatible * schema-version tripwire. The generated v1 inventory is shared by v2; * its additive flag-manifest metadata is declared below until schema refresh. * * `LeanPrincipal` stays hand-written: QAR's schema export script does not * include the `/v1/auth/me` shape today (it's auth-side, not protocol-side), * so the SDK mirrors `qar.auth.principal.LeanPrincipal` here. A follow-up * extends QAR's exporter to cover this surface. */ import type { QARInfo as GeneratedQARInfo } from './generated/qar-info.js'; export type { ModelEntry, ToolEntry, RateLimitEntry, } from './generated/qar-info.js'; /** Last flag-manifest apply observed by this runtime replica (QAR info schema v2). */ export interface FlagsManifestApply { readonly content_hash: string; readonly source: string; readonly observed_at: number; } /** * Supports deployed v1 and v2 bootstrap documents. Version 2 adds only * flags_manifest; inventory fields retain the generated v1 contract. * Source: qodo-agent-runtime@1551326f, src/qar/api/info.py. */ export type QARInfo = Omit & { readonly schema_version?: 1 | 2; readonly flags_manifest?: FlagsManifestApply | null; }; /** Bearer kinds returned by `GET /v1/auth/me`. */ export type BearerKind = 'sk' | 'qodo-svc' | 'qsk' | 'firebase' | 'oidc'; /** * `GET /v1/auth/me` response shape. * * Mirrors `qar.auth.principal.LeanPrincipal` 1:1. Bearer tokens never appear * in this object. Hand-written (not codegen) until QAR's schema exporter * adds the auth surface. */ export interface LeanPrincipal { readonly schema_version: 1; readonly email: string; readonly tenant_id: string; readonly tier_level: number; readonly organization_id?: string; readonly organization_permission?: string; readonly account_id?: string; readonly is_scoped_key: boolean; readonly bearer_kind: BearerKind; } //# sourceMappingURL=info.d.ts.map