import { z } from 'zod'; export declare const BfflessConfigSchema: z.ZodObject<{ apiUrl: z.ZodOptional; project: z.ZodOptional; ruleSets: z.ZodOptional>; }, "strict", z.ZodTypeAny, { apiUrl?: string | undefined; project?: string | undefined; ruleSets?: string[] | undefined; }, { apiUrl?: string | undefined; project?: string | undefined; ruleSets?: string[] | undefined; }>; export type BfflessConfig = z.infer; /** * Walk up from `cwd` looking for `.bffless/config.json`. Returns the nearest one found * (parsed + validated against `BfflessConfigSchema`), or `null` if none exists between * `cwd` and the filesystem root. Throws if a `.bffless/config.json` is found but is * invalid JSON or fails schema validation — an existing-but-broken config should not be * silently treated as "no config". */ export declare function findConfig(cwd: string): { path: string; config: BfflessConfig; } | null; /** * Resolve the rule-set directories a command should operate on. * * - If `args` is non-empty, each entry is resolved to an absolute path relative to `cwd` * and MUST contain a `ruleset.yaml` — an explicitly-named directory that isn't a rule * set is a hard error (the caller made a mistake, not the glob). * - Otherwise, the nearest `.bffless/config.json` (found by walking up from `cwd`) is * loaded and its `ruleSets` glob patterns are expanded, resolved *relative to the * config file's own directory* (the project root that owns `.bffless/`), not `cwd`. * Glob matches that don't contain a `ruleset.yaml` are silently filtered out — globs * are inherently permissive over directory structure (e.g. a `skills` dir sitting * next to rule sets), so filtering rather than erroring here is the useful behavior. * - No args and no config (or a config with no/empty `ruleSets`) is a helpful error, not * an empty array — silently validating nothing is never what the caller wants. */ export declare function resolveRuleSetDirs(cwd: string, args: string[]): string[];