export type EnvClassification = string; export interface EnvVarInventoryRow { name: string; classifications: EnvClassification[]; reviewReason: string | null; contractKey: string | null; contractKeys: string[]; sourceOfTruth: string | null; sensitivity: string | null; runtimeSurfaces: string[]; readers: string[]; localSetup: string[]; docs: string[]; deployment: string[]; dockerBuildArgs: string[]; workflows: string[]; packageGates: string[]; } export interface DynamicConfigInventoryRow { namespace: string; definitionFiles: string[]; registryFiles: string[]; } export interface PackageGateInventoryRow { name: string; values: string[]; files: string[]; } export interface ConfigInventory { envVars: EnvVarInventoryRow[]; dynamicConfigs: DynamicConfigInventoryRow[]; packageGates: PackageGateInventoryRow[]; } export interface EnvVarAccumulator { name: string; contractKey: string | null; contractKeys: Set; sourceOfTruth: string | null; sensitivity: string | null; runtimeSurfaces: Set; readers: Set; localSetup: Set; docs: Set; deployment: Set; dockerBuildArgs: Set; workflows: Set; packageGates: Set; } export type SourceBucket = keyof Omit; export interface EnvVarReferenceMatcher { name: string; pattern: RegExp; } export interface TypedEnvContractEntry { name: string; contractKey?: string; sourceOfTruth?: string; sensitivity?: string; runtimeSurfaces?: string[]; } /** Discovery is opt-in by file role; the caller owns paths and exclusions. */ export interface ConfigSourceRules { workerBindings?: boolean; localAssignments?: boolean; shellExports?: boolean; jsonBindings?: boolean; docker?: boolean; workflow?: boolean; markdown?: boolean; packageManifest?: boolean; packageManagerConfig?: boolean; referenceBuckets?: readonly SourceBucket[]; } export interface ConfigInventoryContext { trackedFiles: readonly string[]; /** Return null for a missing/non-text file. Reader failures propagate. */ readTrackedFile(file: string): string | null; } export interface DynamicConfigReference { namespace: string; kind: 'definition' | 'registry'; } export interface ConfigInventoryOptions { /** Return null to exclude a file before it is read. */ describeFile(file: string): ConfigSourceRules | null; envContract?: readonly TypedEnvContractEntry[]; envConstants?: ReadonlyMap; envHelperNames?: readonly string[]; /** Sensitivity labels from least to most sensitive. Defaults to internal, public, secret. */ sensitivityOrder?: readonly string[]; collectDynamicConfigs?(file: string, source: string): readonly DynamicConfigReference[]; annotateEnv?(row: Readonly): { classifications: string[]; reviewReason: string | null; }; }