export interface Config {
    $schemaVersion: number;
    name: string;
    port: number;
    pagesDir: string;
    /**
     * M21: catalog of brief files (relative to cwd, default `.claude4spec/briefs`).
     * Same validation as `pagesDir` (must be relative, must not escape cwd).
     * Forward-compat: missing in pre-M21 configs = treated as default.
     */
    briefsDir: string;
    /**
     * M23: catalog of patch files (relative to cwd, default `.claude4spec/patches`).
     * Same validation as `pagesDir`/`briefsDir` (must be relative, must not
     * escape cwd). Forward-compat: missing in pre-M23 configs = treated as default.
     */
    patchesDir: string;
    mode: 'dev' | 'prod';
    writingStyle: string | null;
    onboardingCompleted: boolean;
    /**
     * Whitelist of active entity-plugin types (M13). Absent (undefined) =
     * all registered plugins are active — backward compat with $schemaVersion: 1
     * projects. Empty array [] = no plugins active (markdown-only project).
     */
    entities?: string[];
    consistency?: ConsistencyConfig;
    agent?: AgentConfig;
    /**
     * M24: base URL of the remote claude4spec-API (dev/staging override).
     * `null`/absent = the hardcoded production constant in M24. Additive — no
     * `$schemaVersion` bump; projects from before M24 keep production behaviour.
     */
    remoteApiUrl?: string | null;
    /**
     * M25: UUID of this project on the remote (set after the first successful
     * push). `null`/absent = no remote project yet ⇒ the next push is a first push
     * (creates a new project from `name`). Additive — no `$schemaVersion` bump; not
     * a secret (the secret is `access_token` in `remote_session`).
     */
    remoteProjectId?: string | null;
    /**
     * M28: optional Git Sync toggles. Absent/missing ⇒ both `false` (opt-in,
     * forward-compatible with configs written before M28). Additive — no
     * `$schemaVersion` bump. Read per-action (hot-reload).
     */
    git?: GitSyncConfig;
}
export interface GitSyncConfig {
    /** When on, creating a release best-effort `git commit`s pagesDir + config.json. */
    syncCommitOnRelease?: boolean;
    /** When on, a successful remote push best-effort `git push`es the current branch. */
    syncPushOnPush?: boolean;
}
export type ConsistencySeverity = 'off' | 'warn' | 'error';
export interface ConsistencyConfig {
    requireAcCoverage?: ConsistencySeverity;
    requireModuleAc?: ConsistencySeverity;
}
export interface AgentConfig {
    claudeUsePreset?: boolean;
}
export interface ConfigCliArgs {
    name?: string;
    port?: number;
    pagesDir?: string;
    mode?: 'dev' | 'prod';
    /**
     * M01 (0.1.36): `--remote-url <url>` maps here. Sticky like `port`/`name` —
     * persisted to `config.json` on first bootstrap, then drives M24/M27 base URL.
     */
    remoteApiUrl?: string | null;
}
export declare const CURRENT_SCHEMA_VERSION = 2;
export declare function configPath(cwd: string): string;
export declare function defaults(cwd: string): Config;
export interface LoadResult {
    config: Config;
    created: boolean;
    path: string;
}
/**
 * Pure disk read configu — bez side-effectow (mkdir/atomic write/CLI merge).
 * Uzywany przez SkillResolver per query, zeby edycja config.json miedzy turami
 * threadu byla efektywna od nastepnego POST /api/chat.
 * Throws na malformed JSON / type mismatch — ta sama walidacja co loadOrCreateConfig.
 */
export declare function readConfig(cwd: string): Config;
export declare function loadOrCreateConfig(cwd: string, cli: ConfigCliArgs): LoadResult;
/**
 * Atomic patch — czyta biezacy config, merguje partial, waliduje pole-po-polu,
 * zapisuje atomic. Uzywany przez PATCH /api/config (M01 + M16).
 * Throws na malformed input lub blad I/O.
 */
export declare function writeConfig(cwd: string, partial: Partial<Config>): Config;
