/**
 * ConfigManifest contract — declarative registry of every config-like file CLEO
 * reads, writes, or merges, with its scope, schema, merge precedence, and the
 * drift-detection strategy applied to it.
 *
 * Foundation for the CORE SSoT config registry (T9878) and the `resolveCleoConfig`
 * cascade resolver. Built-in entries cover the four canonical CLEO files:
 *
 * - `~/.cleo/config.json`          (`global`,   precedence 10)
 * - `<project>/.cleo/config.json`  (`project`,  precedence 20)
 * - `<project>/.cleo/project-info.json`    (`metadata`, separate channel)
 * - `<project>/.cleo/project-context.json` (`metadata`, separate channel)
 *
 * Merge semantics: higher `mergePrecedence` wins. The `metadata` scope is
 * intentionally OUTSIDE the project ↔ global merge chain — those files are
 * read-only consumer state and must NEVER be merged into resolved CleoConfig.
 *
 * @task T9876
 * @saga T9855
 * @adr 076
 */
import { type ZodTypeAny, z } from 'zod';
/**
 * Cascade-participating scopes for the project ↔ global merge chain.
 *
 * - `'global'`  — `~/.cleo/config.json`        (precedence 10)
 * - `'project'` — `<project>/.cleo/config.json` (precedence 20, higher wins)
 *
 * Note: `'metadata'` is NOT part of this union — metadata-scoped files are
 * read-only consumer state and live on a separate channel. See
 * {@link ConfigManifestScope} for the full union including metadata.
 *
 * @task T9876
 */
export type ConfigScope = 'global' | 'project';
/**
 * Full scope union covering cascade scopes AND the read-only `metadata`
 * channel used by `project-info.json` and `project-context.json`.
 *
 * Metadata-scoped entries are NEVER merged into the resolved CleoConfig —
 * they are surfaced separately as consumer state and validated only for
 * schema conformance / staleness.
 *
 * @task T9876
 */
export type ConfigManifestScope = ConfigScope | 'metadata';
/**
 * Drift-detection strategy applied to a manifest entry.
 *
 * - `'schema-validate'` — Re-parse the file's contents against {@link ConfigManifestEntry.schema}
 *   on read. Any parse error is reported as drift.
 * - `'staleness-gate'`  — Compare the file's `detectedAt` (or equivalent freshness key)
 *   against a freshness threshold. Stale files are flagged but not rejected.
 * - `'value-diff'`      — Diff the file's resolved values against the manifest's
 *   `defaults` baseline and report changed keys. Useful for invariant tracking.
 * - `'none'`            — No drift detection. Entry is informational-only.
 *
 * @task T9876
 */
export type DriftDetection = 'schema-validate' | 'staleness-gate' | 'value-diff' | 'none';
/**
 * A single registry entry describing one config-like file CLEO is aware of.
 *
 * `mergePrecedence` orders entries within the SAME scope channel. Across
 * channels, the cascade-resolver consumes entries with `scope` in
 * {@link ConfigScope} (global/project) and merges by ascending precedence
 * (higher wins). Metadata entries are surfaced separately.
 *
 * @task T9876
 */
export interface ConfigManifestEntry {
    /** Stable identifier for the entry (e.g. `'cleo-config-project'`). */
    id: string;
    /** Where the file lives in the precedence hierarchy. */
    scope: ConfigManifestScope;
    /** Absolute or `~`-rooted path to the file on disk. */
    path: string;
    /**
     * Optional Zod schema used by the `'schema-validate'` drift detector to
     * re-parse the file's contents. `null` disables schema validation even when
     * `driftDetection === 'schema-validate'` (advisory-only mode).
     */
    schema?: ZodTypeAny | null;
    /**
     * Numeric merge precedence within the cascade. Higher wins.
     *
     * Canonical values:
     * - `0`  — defaults / metadata (NOT part of the merge chain)
     * - `10` — global
     * - `20` — project
     */
    mergePrecedence: number;
    /** Drift-detection strategy to apply to this entry. */
    driftDetection: DriftDetection;
    /** Optional default values used as the baseline for `'value-diff'` drift detection. */
    defaults?: Record<string, unknown>;
}
/**
 * Manifest entry for `<project>/.cleo/project-info.json`.
 *
 * Metadata channel (NOT part of the merge cascade). Schema-validated on
 * read because the file is consumer state with a stable shape.
 *
 * @task T9876
 */
export declare const PROJECT_INFO_MANIFEST: ConfigManifestEntry;
/**
 * Manifest entry for `<project>/.cleo/project-context.json`.
 *
 * Metadata channel. Staleness-gated because the file is regenerated by
 * project-detection scans and consumers care about freshness, not exact shape.
 *
 * @task T9876
 */
export declare const PROJECT_CONTEXT_MANIFEST: ConfigManifestEntry;
/**
 * Manifest entry for `<project>/.cleo/config.json` (project-scoped CleoConfig).
 *
 * Project scope; precedence 20 — wins over global. Schema-validated.
 *
 * @task T9876
 */
export declare const CLEO_CONFIG_MANIFEST: ConfigManifestEntry;
/**
 * Manifest entry for `~/.cleo/config.json` (global CleoConfig).
 *
 * Global scope; precedence 10 — loses to project. Schema-validated.
 *
 * @task T9876
 */
export declare const GLOBAL_CLEO_CONFIG_MANIFEST: ConfigManifestEntry;
/**
 * Frozen registry of all built-in manifest entries shipped with the contracts
 * package. Order is informational only — consumers MUST sort by
 * `mergePrecedence` when applying the cascade.
 *
 * @task T9876
 */
export declare const CONFIG_MANIFEST_ENTRIES: readonly ConfigManifestEntry[];
/**
 * Zod schema for {@link ConfigManifestEntry}.
 *
 * Treats `schema` as `unknown` because `ZodTypeAny` instances cannot be
 * validated through Zod itself without infinite recursion — schema-shape
 * checking is the responsibility of the consumer that constructs the entry.
 *
 * @task T9876
 */
export declare const configManifestEntrySchema: z.ZodObject<{
    id: z.ZodString;
    scope: z.ZodUnion<readonly [z.ZodLiteral<"global">, z.ZodLiteral<"project">, z.ZodLiteral<"metadata">]>;
    path: z.ZodString;
    schema: z.ZodOptional<z.ZodUnknown>;
    mergePrecedence: z.ZodNumber;
    driftDetection: z.ZodUnion<readonly [z.ZodLiteral<"schema-validate">, z.ZodLiteral<"staleness-gate">, z.ZodLiteral<"value-diff">, z.ZodLiteral<"none">]>;
    defaults: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
//# sourceMappingURL=manifest.d.ts.map