import { z } from "zod"; import { instanceExperimentalSettingsSchema } from "./validators/instance.js"; /** * Feature catalog for cloud-managed instances. * * The instance-settings zod schema is the feature manifest; this module adds * only metadata about the flags the schema already declares. Keys are derived * from the schema type, so adding, removing, or renaming a boolean flag in * `instanceExperimentalSettingsSchema` without updating the metadata map is a * compile error (and vice versa). * * Tiers: * - `preference`: tenant-controllable taste setting; the cloud harness does * not manage it. * - `managed`: the cloud harness may set this per fleet/stack via * `PAPERCLIP_MANAGED_CONFIG`. * - `floor`: pinned by code on managed instances; no flag value may widen it. */ export declare const FEATURE_TIERS: readonly ["preference", "managed", "floor"]; export type FeatureTier = (typeof FEATURE_TIERS)[number]; type ExperimentalSettings = z.infer; /** * The boolean flag keys of the experimental settings schema. Non-flag keys * (activation timestamps, numeric tuning values) are excluded. */ export type InstanceFeatureKey = { [K in keyof ExperimentalSettings]: ExperimentalSettings[K] extends boolean ? K : never; }[keyof ExperimentalSettings]; export interface FeatureCatalogEntry { title: string; description: string; tier: FeatureTier; /** Desired default on cloud-managed instances. */ cloudDefault: boolean; /** Must match the schema default; enforced by test. */ selfHostedDefault: boolean; } export declare const INSTANCE_FEATURE_CATALOG: Record; export declare const INSTANCE_FEATURE_KEYS: InstanceFeatureKey[]; /** * Shape of the `feature-catalog.json` release artifact the cloud harness * imports per app release and validates feature writes against. */ export declare const featureCatalogArtifactSchema: z.ZodObject<{ catalogVersion: z.ZodString; features: z.ZodRecord; }, z.core.$strict>>; }, z.core.$strict>; export type FeatureCatalogArtifact = z.infer; export declare function buildFeatureCatalogArtifact(catalogVersion: string): FeatureCatalogArtifact; /** Deterministic serialization (sorted keys, trailing newline) for the artifact file. */ export declare function renderFeatureCatalogArtifact(catalogVersion: string): string; export {}; //# sourceMappingURL=feature-catalog.d.ts.map