/** * Reason a ConfigRequiredError was thrown. Surfaced as `error.code` * so callers can branch on the failure mode without parsing the message. */ export type ConfigRequiredCode = "MISSING" | "INVALID_JSON" | "SCHEMA_VIOLATION"; export interface ConfigRequiredErrorInit { code: ConfigRequiredCode; toolPath: string; tool: string; /** Underlying ajv errors when code === SCHEMA_VIOLATION; otherwise omitted. */ errors?: unknown[] | null; } /** * Structured error indicating the caller must surface a "run init" prompt. * Plain Error subclass — the `code`, `toolPath`, `tool`, `hint`, and * optional `errors` fields are accessed directly by F15 callers. */ export declare class ConfigRequiredError extends Error { readonly code: ConfigRequiredCode; readonly toolPath: string; readonly tool: string; readonly hint: string; readonly errors: unknown[] | null | undefined; constructor(init: ConfigRequiredErrorInit); } export interface RequireConfigOptions { /** Absolute or cwd-relative path to ..json. */ configPath: string; /** Tool name (e.g. "trello", "asana") — used in error messages + the init hint. */ tool: string; /** Optional JSON schema. When omitted, only existence + JSON-parse are checked. */ schema?: unknown; } /** * Load and (optionally) validate the ..json config file. Returns the * parsed object on success; throws ConfigRequiredError on missing file, * malformed JSON, or schema violation. * * The caller is responsible for loading the adapter's schema (e.g. via * fs.readFile of pm-tasks-/schemas/config.json) and passing it as * opts.schema — this helper does NOT auto-load schemas (keeps pm-tasks-core * adapter-agnostic). */ export declare function requireConfig(opts: RequireConfigOptions): Promise; //# sourceMappingURL=require-config.d.ts.map