/** * Jev (TypeSafe System One) — configuration * * Precedence: JEV_DEFAULTS <- `.specweave/config.json` "jev" section <- environment. * * Consent is explicit: `jev.enabled` must be true in the project config (written by * `specweave jev setup` after a live ping). `SPECWEAVE_JEV=0` disables Jev for a single * process, `SPECWEAVE_JEV=1` enables it ad hoc. * * Nothing here ever reads, prints or stores an API key VALUE — only env var NAMES. * * @module core/jev/config */ export type JevProvider = 'openrouter' | 'typesafe' | 'openai'; export interface JevConfig { enabled: boolean; provider: JevProvider; model: string; apiKeyEnv?: string; timeoutMs: number; thresholds: { route: number; guardDeny: number; guardWarn: number; }; guards: { bash: boolean; }; modelRouting: boolean; browse: { allowDomains: string[]; maxSteps: number; }; } /** Built-in defaults. Jev is OFF until a project opts in. */ export declare const JEV_DEFAULTS: JevConfig; /** System One endpoint per provider. */ export declare const JEV_PROVIDER_ENDPOINT: Record; /** Default model id per provider (used when `model` is not set anywhere). */ export declare const JEV_PROVIDER_MODEL: Record; /** Default API key environment variable NAME per provider. */ export declare const JEV_PROVIDER_KEY_ENV: Record; /** Provider-agnostic fallback key env var NAME. */ export declare const JEV_FALLBACK_KEY_ENV = "JEV_API_KEY"; /** * Load the effective Jev config. * * @param projectRoot - Project root to read `.specweave/config.json` from. Used AS GIVEN * (no upward walk) so callers stay deterministic; omit it to resolve * the effective (umbrella-aware) root automatically. * @param env - Environment to read overrides from (defaults to `process.env`). */ export declare function loadJevConfig(projectRoot?: string, env?: NodeJS.ProcessEnv): JevConfig; /** True when this project (and this process) may call Jev. */ export declare function isJevEnabled(projectRoot?: string, env?: NodeJS.ProcessEnv): boolean; /** * Resolve the API key. * * Order: `cfg.apiKeyEnv` -> the provider's default var -> `JEV_API_KEY`. * * @returns `{ key, source }` where `source` is the env var NAME (safe to print), or null. */ export declare function resolveApiKey(cfg: JevConfig, env?: NodeJS.ProcessEnv): { key: string; source: string; } | null; /** Endpoint URL for a config's provider. */ export declare function jevEndpoint(cfg: JevConfig): string; //# sourceMappingURL=config.d.ts.map