import { Config } from "./schema.js"; type MutableConfigObject = Record; export declare class ConfigLoadError extends Error { readonly code: "config_invalid" | "config_unwritable"; constructor(code: "config_invalid" | "config_unwritable", message: string); } /** * Loads and validates the server configuration. * * Priority (highest wins): * 1. Environment variable overrides (MOODLE_URL, LOGGING_LEVEL, etc.) * 2. config.json on disk * 3. Schema defaults * * Fails loudly with a readable error if the config is invalid — * no silent fallbacks, no half-broken startup. */ export declare function loadConfig(): Config; export declare function persistConfig(configPath: string, cfg: MutableConfigObject): void; export declare function resolveConfigPath(): string; export declare function resolvePluginSearchPaths(searchPaths: Config["plugins"]["searchPaths"], configPath?: string): Config["plugins"]["searchPaths"]; /** * Reads and returns the MOODLE_TOKEN from the environment. * Fails if not set — the token is required for all Moodle API calls. */ export declare function loadToken(): string; export {}; //# sourceMappingURL=loader.d.ts.map