/** * retriever-state.ts — shared helper for resolving Retriever installation state. * * Resolution order (first fully-matched hit wins): * 1. env vars — __SAVE_LOG10X_RETRIEVER_URL__ + __SAVE_LOG10X_RETRIEVER_BUCKET__ * 2. snapshot — installedComponentsDetail.retriever (namespace) + kubectl probe for URL * 3. helm_release_probe — helm list -A, filter chart=retriever-10x*, manifest parse, kubectl svc * 4. kubectl probe — get svc by chart label, resolve LoadBalancer hostname or ClusterIP * 5. none — no retriever reachable * * The `source` field on the returned state lets callers emit a * `source_disclosure.retriever_state_source` for audit. */ import type { DiscoverySnapshot } from './discovery/types.js'; export type RetrieverStateSource = 'env_var' | 'snapshot' | 'helm_release_probe' | 'kubectl_probe' | 'env_config' | 'none'; export interface RetrieverState { /** True when a URL + bucket pair was resolved. */ installed: boolean; /** Query-handler URL (no trailing slash). Undefined when not resolved. */ url?: string; /** Index/results S3 bucket. Undefined when not resolved. */ bucket?: string; /** * Namespace where the Retriever pod lives. * Derived from the snapshot's installedComponentsDetail or kubectl probe. */ namespace?: string; /** How the state was resolved — for source_disclosure. */ source: RetrieverStateSource; /** Human-readable trace for audit / doctor output. */ trace: string[]; } /** * Resolve the Retriever's runtime state. * * @param snapshot Optional discovery snapshot. When provided, step 2 * (snapshot-based resolution) is attempted before the * live kubectl probe. */ export declare function getRetrieverState(snapshot?: DiscoverySnapshot | null): Promise;