/** * Curator daemon configuration schema — Sphere B SG-CLEO-SKILLS foundation. * * Defines the `daemon.curator` config namespace consumed by the (future) * curator daemon under SG-CLEO-SKILLS that periodically sweeps `skills.db` * to mark stale rows and archive expired ones. * * Lives in `packages/core/src/sentient/` because the curator is a sentient * subsystem peer of the existing `propose-tick` / `dream-cycle` daemons — * it reads the global skills.db on a fixed cadence and emits proposals when * thresholds are crossed. * * ## Why a separate module (not contracts/src/config.ts)? * * The T9683 charter explicitly requires "NEW modules (NO edits to existing * public API except adding exports to index.ts)". The Zod schema lives here; * the (future) merge into the global {@link CleoConfig} interface will be * done in a downstream task that owns the contracts/config.ts touch. * * ## Validation invariants * * Beyond per-field type/range checks, the cross-field invariants enforced by * {@link curatorConfigSchema} are: * * 1. `staleAfterDays < archiveAfterDays` — archiving CANNOT happen before * staleness is reached; reversing the order would silently archive rows * that were never marked stale. * 2. `runEveryHours >= 1` — sub-hourly cadence is rejected to keep the * daemon's CPU + IO footprint bounded on low-spec hosts (Pi v2/v3 ADR-035). * * @task T9683 * @epic T9571 * @saga T9560 * @architecture docs/architecture/SG-CLEO-SKILLS-architecture-v3.md §5/§6 */ import { z } from 'zod'; /** * Zod schema for `daemon.curator` configuration block. * * All keys are optional at the wire level so an empty `{}` parses to the * canonical defaults (`enabled=false`, `staleAfterDays=30`, * `archiveAfterDays=90`, `runEveryHours=24`). * * Cross-field validation runs via {@link z.object#superRefine} after per-key * parsing succeeds so the user gets a single, well-formed error per invalid * combination instead of a cascade. * * @task T9683 */ export declare const curatorConfigSchema: z.ZodObject<{ enabled: z.ZodDefault; staleAfterDays: z.ZodDefault; archiveAfterDays: z.ZodDefault; runEveryHours: z.ZodDefault; }, z.core.$strip>; /** * Parsed shape of `daemon.curator`. Inferred from {@link curatorConfigSchema} * so any schema edit propagates to the TS type without a manual sync step. */ export type CuratorConfig = z.infer; /** * Build the canonical default {@link CuratorConfig} value. * * Equivalent to `curatorConfigSchema.parse({})` but returned as a fresh * object on every call so mutating the result is safe. * * @returns A new object with all four defaults populated. * * @task T9683 */ export declare function getDefaultCuratorConfig(): CuratorConfig; /** * Parse an unknown blob into a validated {@link CuratorConfig}. * * Thin wrapper around {@link curatorConfigSchema.parse} that exposes a stable * import name (`parseCuratorConfig`) for downstream consumers — keeps the * Zod dependency localised to this module if we ever swap validators. * * @param input - Anything (typically a JSON blob from config.json). * @returns The validated, defaulted config object. * @throws {z.ZodError} If validation fails. * * @task T9683 */ export declare function parseCuratorConfig(input: unknown): CuratorConfig; //# sourceMappingURL=curator-config.d.ts.map