/** * [WHO]: Provides SAL build metadata, eval env constants, credential loading, and sidecar path resolution * [FROM]: Depends on node fs/os/path/url and eval adapter type for local credential normalization * [TO]: Consumed by extensions/builtin/sal/index.ts and tests that validate SAL experiment/config behavior * [HERE]: extensions/builtin/sal/sal-config.ts - configuration and path boundary for Structural Anchor Localization */ import type { EvalAdapterId } from "./eval/index.js"; import type { BuildMeta, SalDiagnosticReporter } from "./sal-runtime.js"; export declare const SAL_AB_ENV = "CATUI_SAL_AB"; export declare const EVAL_ENABLED_ENV = "CATUI_EVAL_ENABLED"; export declare const EVAL_ENDPOINT_ENV = "CATUI_EVAL_ENDPOINT"; export declare const EVAL_RUN_ID_ENV = "CATUI_EVAL_RUN_ID"; export declare const EVAL_VARIANT_ENV = "CATUI_EVAL_VARIANT"; export declare const EVAL_LEGACY_FILE_ENV = "CATUI_EVAL_LEGACY_FILE"; export declare const EVAL_API_KEY_ENV = "CATUI_EVAL_API_KEY"; export declare const EVAL_API_KEY_HEADER_ENV = "CATUI_EVAL_API_KEY_HEADER"; export declare const EVAL_HEADERS_JSON_ENV = "CATUI_EVAL_HEADERS_JSON"; export declare const EVAL_CREDENTIALS_FILE_ENV = "CATUI_EVAL_CREDENTIALS_FILE"; export declare const EVAL_STALE_CLEANUP_ENV = "CATUI_EVAL_CLEANUP_STALE_RUNS"; export interface EvalCredentials { insforge_url?: string; endpoint?: string; api_key?: string; anon_key?: string; api_key_header?: string; headers?: Record; enabled?: boolean; allow_self_signed?: boolean; cleanup_stale_runs?: boolean; /** Adapter selector. When omitted, inferred from endpoint scheme (http -> insforge, file/path -> jsonl). */ adapter?: EvalAdapterId; } /** * Delegate to the shared core/platform/telemetry/build-meta loader so SAL eval, the * ext-events sink, and any future telemetry consumer all stamp identical * catui_version / commit_hash on emitted rows. */ export declare function loadBuildMeta(): BuildMeta; export declare const BUILD_META: BuildMeta; export declare function resolveStaleCleanupEnabled(envValue: string | undefined, credentials: EvalCredentials | undefined): boolean; export declare function isTruthy(value: unknown): boolean; export declare function parseHeadersJson(raw: string | undefined, reportDiagnostic?: SalDiagnosticReporter): Record; export declare function resolveEvalCredentials(workspaceRoot: string, reportDiagnostic?: SalDiagnosticReporter): EvalCredentials | undefined; export declare function normalizeExperimentId(experimentId?: string): string | undefined; export declare function resolveSalSidecarDir(workspaceRoot: string, experimentId?: string): string; export declare function resolveSalAbEnabled(flagValue: unknown): boolean;