/** * Stable code for "this deployed server is missing a setting it refuses to * run without" — a hosted database or the auth signing secret. The refusal * errors carry it and auth responses repeat it, so the sign-in page can show * its setup guidance: the page hides any other error text that mentions the * database. */ export declare const DEPLOY_SETTINGS_REQUIRED_CODE = "DEPLOY_SETTINGS_REQUIRED"; /** * The running server's answer to "which required settings is this deployment * missing?", from `getMissingDeploySettings()`. Each field comes from the same * check the matching refusal uses. */ export interface MissingDeploySettings { /** * What the database refusal rejects: the env key that resolved to local * PGlite, or `"default"` when no database URL is set. Null when allowed. */ databaseSource: string | null; /** * The key that would let Better Auth start: `BETTER_AUTH_SECRET`, or * `A2A_SECRET` in a workspace, which derives the auth secret from it. Null * when the auth secret resolves. */ authSecretKey: "BETTER_AUTH_SECRET" | "A2A_SECRET" | null; /** True when a deployed workspace has no `A2A_SECRET`. */ a2aSecretMissing: boolean; } export type RuntimeConfigEnvironment = "development" | "production"; export type RuntimeConfigPhase = "build" | "runtime"; export type RuntimeConfigIssueSeverity = "warning" | "error"; export type RuntimeConfigIssueCode = "auth-disabled-in-production" | "missing-auth-secret" | "weak-auth-secret" | "missing-a2a-secret" | "weak-a2a-secret" | "invalid-auth-url" | "missing-database-url" | "local-database-in-production" | "missing-required-env"; export interface RuntimeConfigRequirements { authEnabled?: boolean; databaseRequired?: boolean; requiredEnv?: readonly string[]; } export interface RuntimeConfigIssue { code: RuntimeConfigIssueCode; severity: RuntimeConfigIssueSeverity; title: string; message: string; envKeys: string[]; } export interface RuntimeConfigReport { ok: boolean; status: "ok" | "warning" | "error"; environment: RuntimeConfigEnvironment; phase: RuntimeConfigPhase; issues: RuntimeConfigIssue[]; prompt: string; } export interface RuntimeConfigReportOptions { environment?: RuntimeConfigEnvironment; phase?: RuntimeConfigPhase; appName?: string; /** * The running server's own answer from `getMissingDeploySettings()`. When * given, it replaces the env-name checks for a missing database, auth * secret, and workspace `A2A_SECRET` in every environment. Those checks * guess from key names and `NODE_ENV`, while the server resolves app-prefixed * database URLs and the workspace-derived auth secret, and * knows whether it is deployed at all. A runtime probe must never fall back * to them, or the in-app notice and the refusals can disagree. */ missingDeploySettings?: MissingDeploySettings; } export declare function isTruthyRuntimeValue(value: string | boolean | undefined): boolean; export declare function runtimeConfigRequirementsFromSearchParams(searchParams: URLSearchParams): RuntimeConfigRequirements; export declare function buildRuntimeConfigPrompt(report: Pick, appName?: string): string; export declare function getRuntimeConfigReport(env: Record, requirements?: RuntimeConfigRequirements, options?: RuntimeConfigReportOptions): RuntimeConfigReport; export declare function formatRuntimeConfigReport(report: RuntimeConfigReport): string; export declare function parseRuntimeConfigReport(value: unknown): RuntimeConfigReport | null;