/**
 * Base server environment schema and validation.
 *
 * Provides `BaseServerEnv` — a shared Zod schema for common server env vars
 * that apps can use directly or extend with app-specific fields.
 *
 * Generic env loading lives in `env/load.ts`.
 *
 * @module
 */
import { z } from 'zod';
import { type Keyring } from '../auth/keyring.js';
/**
 * Base Zod schema for server environment variables.
 *
 * Provides the common fields used by fuz apps:
 * server config, database, auth, security, public URLs, and SMTP.
 *
 * Apps can use directly or extend with app-specific fields via `.extend()`.
 */
export declare const BaseServerEnv: z.ZodObject<{
    NODE_ENV: z.ZodEnum<{
        development: "development";
        production: "production";
    }>;
    PORT: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    HOST: z.ZodDefault<z.ZodString>;
    DATABASE_URL: z.ZodString;
    SECRET_FUZ_COOKIE_KEYS: z.ZodString;
    FUZ_ALLOWED_ORIGINS: z.ZodString;
    PUBLIC_FUZ_API_URL: z.ZodDefault<z.ZodString>;
    PUBLIC_FUZ_WEBSOCKET_URL: z.ZodOptional<z.ZodString>;
    PUBLIC_FUZ_CONTACT_EMAIL: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodLiteral<"">]>>;
    FUZ_BOOTSTRAP_TOKEN_PATH: z.ZodOptional<z.ZodString>;
    SMTP_HOST: z.ZodOptional<z.ZodString>;
    SMTP_USER: z.ZodOptional<z.ZodUnion<readonly [z.ZodEmail, z.ZodLiteral<"">]>>;
    SMTP_PASSWORD: z.ZodOptional<z.ZodString>;
    FUZ_FACTS_DIR: z.ZodDefault<z.ZodString>;
    FUZ_FACTS_X_ACCEL_REDIRECT_PREFIX: z.ZodOptional<z.ZodString>;
}, z.core.$strict>;
export type BaseServerEnv = z.infer<typeof BaseServerEnv>;
/**
 * Validated server env config — the artifacts `create_app_server()` needs.
 */
export interface ServerEnvOptions {
    ok: true;
    keyring: Keyring;
    allowed_origins: Array<RegExp>;
    bootstrap_token_path: string | null;
}
/**
 * Error from `validate_server_env` — keyring or origin validation failed.
 */
export interface ServerEnvOptionsError {
    ok: false;
    field: 'SECRET_FUZ_COOKIE_KEYS' | 'FUZ_ALLOWED_ORIGINS';
    errors: Array<string>;
}
export type ServerEnvOptionsResult = ServerEnvOptions | ServerEnvOptionsError;
/**
 * Validate a loaded `BaseServerEnv` and produce the artifacts needed for server init.
 *
 * Handles keyring validation, origin parsing, and bootstrap token path extraction.
 * Returns a Result so callers handle errors their own way (exit, logging, etc).
 *
 * @param env - a loaded and Zod-validated `BaseServerEnv`
 * @returns `{ok: true, keyring, allowed_origins, bootstrap_token_path}` or `{ok: false, field, errors}`
 */
export declare const validate_server_env: (env: BaseServerEnv) => ServerEnvOptionsResult;
//# sourceMappingURL=env.d.ts.map