import type { SanityPlugin } from '../plugins/types.js'; export interface ShortcutConfig { readonly key: string; readonly label: string; readonly message: string; } export interface SanityConfig { readonly enabled?: boolean; readonly maxFileSizeWarn?: number; readonly maxFileSizeError?: number; readonly blockEnvFiles?: boolean; readonly envFileAllowlist?: ReadonlyArray; readonly detectSecrets?: boolean; readonly blockPrivateKeys?: boolean; readonly skipPaths?: ReadonlyArray; /** * Explicit plugin list. When set, overrides the default plugin set * derived from the legacy boolean flags. Use {@link defaultPlugins} * (re-exported from `@super-repo/czar`) plus any custom plugins to * compose your own set: * * ```ts * import { defineConfig, defaultPlugins, envxAuditPlugin } from '@super-repo/czar' * * export default defineConfig({ * sanity: { * plugins: [ * ...defaultPlugins(), * envxAuditPlugin({ scope: 'staged' }), * ], * }, * }) * ``` */ readonly plugins?: ReadonlyArray; } export interface AiConfig { readonly enabled?: boolean; readonly provider?: 'anthropic' | 'openai'; readonly model?: string; readonly apiKeyEnv?: string; readonly baseUrl?: string; readonly headers?: Readonly>; readonly requireApiKey?: boolean; readonly logLines?: number; readonly maxDiffBytes?: number; } export interface CzarConfig { readonly extends?: string | ReadonlyArray; readonly body?: boolean; readonly strict?: boolean; readonly shortcuts?: ReadonlyArray; /** * Sanity (commit-gate) configuration. Three accepted shapes: * * - `true` — run the default plugin set (large-file, * env-file, private-key-file, secret-scan, * standard-env-audit). Identical to omitting * the field. * - `false` — disable every sanity check. * - `SanityConfig` — full object with optional `plugins:`. The * legacy flag fields (maxFileSize*, blockEnvFiles, * detectSecrets, blockPrivateKeys, …) keep working * as defaults for the built-in plugin set. */ readonly sanity?: SanityConfig | boolean; readonly ai?: AiConfig; } export declare function defineConfig(config: CzarConfig): CzarConfig; export declare const DEFAULT_ENV_ALLOWLIST: ReadonlyArray; export declare const DEFAULT_SKIP_PATHS: ReadonlyArray; export declare const DEFAULT_BUILTIN_SHORTCUTS: ReadonlyArray; export declare const DEFAULT_SANITY: Required> & { readonly envFileAllowlist: ReadonlyArray; readonly skipPaths: ReadonlyArray; }; export declare const DEFAULT_AI: Required> & { readonly baseUrl: string | undefined; readonly headers: Readonly>; }; export declare class CzarConfigError extends Error { readonly field?: string | undefined; constructor(message: string, field?: string | undefined); } export declare function parseConfig(raw: unknown): CzarConfig; //# sourceMappingURL=schema.d.ts.map