/** * Policy Generation Configuration Types and Schemas * * Defines TypeScript interfaces and Zod schemas for policy-driven * generation configuration. These types are used by tools to query * policies for pre-generation defaults and organizational standards. */ import { z } from 'zod'; /** * Dockerfile generation configuration from policy */ export declare const dockerfileGenerationConfigSchema: z.ZodObject<{ /** * Build strategy override (multi-stage, single-stage, distroless) */ buildStrategy: z.ZodOptional>; /** * Base image category preference (official, distroless, alpine, minimal) */ baseImageCategory: z.ZodOptional>; /** * Optimization priority (speed, size, security) */ optimizationPriority: z.ZodOptional>; /** * Security features to enable */ securityFeatures: z.ZodOptional; readOnlyRootFS: z.ZodOptional; noNewPrivileges: z.ZodOptional; dropCapabilities: z.ZodOptional; }, "strip", z.ZodTypeAny, { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; }, { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; }>>; /** * Build features to enable */ buildFeatures: z.ZodOptional; layerOptimization: z.ZodOptional; healthcheck: z.ZodOptional; }, "strip", z.ZodTypeAny, { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; }, { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; }>>; }, "strict", z.ZodTypeAny, { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; }, { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; }>; export type DockerfileGenerationConfig = z.infer; /** * Resource defaults for different languages and environments */ export declare const resourceDefaultsSchema: z.ZodObject<{ /** * CPU request (e.g., "100m", "500m", "1") */ cpuRequest: z.ZodOptional; /** * CPU limit (e.g., "500m", "1", "2") */ cpuLimit: z.ZodOptional; /** * Memory request (e.g., "128Mi", "256Mi", "512Mi") */ memoryRequest: z.ZodOptional; /** * Memory limit (e.g., "256Mi", "512Mi", "1Gi") */ memoryLimit: z.ZodOptional; }, "strict", z.ZodTypeAny, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }>; export type ResourceDefaults = z.infer; /** * Organizational standards for Kubernetes resources */ export declare const orgStandardsSchema: z.ZodObject<{ /** * Required labels to apply to all resources */ requiredLabels: z.ZodOptional>; /** * Namespace naming pattern or override */ namespace: z.ZodOptional; /** * Allowed container registries by environment */ allowedRegistries: z.ZodOptional>; /** * Service account name to use */ serviceAccount: z.ZodOptional; /** * Image pull policy (Always, IfNotPresent, Never) */ imagePullPolicy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }>; export type OrgStandards = z.infer; /** * Feature toggles for Kubernetes manifest generation */ export declare const featureTogglesSchema: z.ZodObject<{ /** * Enable health checks (liveness/readiness probes) */ healthChecks: z.ZodOptional; /** * Enable horizontal pod autoscaling */ autoscaling: z.ZodOptional; /** * Enable resource quotas */ resourceQuotas: z.ZodOptional; /** * Enable network policies */ networkPolicies: z.ZodOptional; /** * Enable pod security policies */ podSecurityPolicies: z.ZodOptional; /** * Enable ingress */ ingress: z.ZodOptional; }, "strict", z.ZodTypeAny, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }>; export type FeatureToggles = z.infer; /** * Kubernetes manifest generation configuration from policy */ export declare const k8sGenerationConfigSchema: z.ZodObject<{ /** * Resource defaults based on language and environment */ resourceDefaults: z.ZodOptional; /** * CPU limit (e.g., "500m", "1", "2") */ cpuLimit: z.ZodOptional; /** * Memory request (e.g., "128Mi", "256Mi", "512Mi") */ memoryRequest: z.ZodOptional; /** * Memory limit (e.g., "256Mi", "512Mi", "1Gi") */ memoryLimit: z.ZodOptional; }, "strict", z.ZodTypeAny, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }>>; /** * Organizational standards to apply */ orgStandards: z.ZodOptional>; /** * Namespace naming pattern or override */ namespace: z.ZodOptional; /** * Allowed container registries by environment */ allowedRegistries: z.ZodOptional>; /** * Service account name to use */ serviceAccount: z.ZodOptional; /** * Image pull policy (Always, IfNotPresent, Never) */ imagePullPolicy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }>>; /** * Feature toggles for manifest generation */ features: z.ZodOptional; /** * Enable horizontal pod autoscaling */ autoscaling: z.ZodOptional; /** * Enable resource quotas */ resourceQuotas: z.ZodOptional; /** * Enable network policies */ networkPolicies: z.ZodOptional; /** * Enable pod security policies */ podSecurityPolicies: z.ZodOptional; /** * Enable ingress */ ingress: z.ZodOptional; }, "strict", z.ZodTypeAny, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }>>; /** * Replica count default */ replicas: z.ZodOptional; /** * Deployment strategy (RollingUpdate, Recreate) */ deploymentStrategy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; }, { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; }>; export type K8sGenerationConfig = z.infer; /** * Dockerfile template snippet * Represents a snippet of Dockerfile code to be injected into generated Dockerfiles */ export declare const dockerfileTemplateSnippetSchema: z.ZodObject<{ /** * Unique identifier for this template */ id: z.ZodString; /** * Section where this template should be injected * - setup: Early in the build process (after FROM, before main build steps) * - security: Security-related configurations (CA certs, user setup) * - observability: Observability agents and instrumentation * - runtime: Runtime configurations (before CMD/ENTRYPOINT) */ section: z.ZodEnum<["setup", "security", "observability", "runtime"]>; /** * The Dockerfile code snippet to inject */ content: z.ZodString; /** * Human-readable description of what this template does */ description: z.ZodString; /** * Priority for ordering within the same section (higher = earlier) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>; export type DockerfileTemplateSnippet = z.infer; /** * Kubernetes template component * Represents a component to be injected into Kubernetes manifests */ export declare const k8sTemplateComponentSchema: z.ZodObject<{ /** * Unique identifier for this template */ id: z.ZodString; /** * Component type */ type: z.ZodEnum<["sidecar", "initContainer", "volume", "volumeMount", "envVar", "configMap", "secret"]>; /** * Human-readable description of what this component does */ description: z.ZodString; /** * The component specification (varies by type) */ spec: z.ZodRecord; /** * Priority for ordering (higher = higher priority) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>; export type K8sTemplateComponent = z.infer; /** * Template additions returned from policy */ export declare const templateAdditionsSchema: z.ZodObject<{ /** * Dockerfile template snippets */ dockerfile: z.ZodOptional; /** * The Dockerfile code snippet to inject */ content: z.ZodString; /** * Human-readable description of what this template does */ description: z.ZodString; /** * Priority for ordering within the same section (higher = earlier) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>, "many">>; /** * Kubernetes template components */ kubernetes: z.ZodOptional; /** * Human-readable description of what this component does */ description: z.ZodString; /** * The component specification (varies by type) */ spec: z.ZodRecord; /** * Priority for ordering (higher = higher priority) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>, "many">>; }, "strict", z.ZodTypeAny, { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; }, { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; }>; export type TemplateAdditions = z.infer; /** * Health check configuration calculated from context */ export declare const healthCheckConfigSchema: z.ZodObject<{ /** * Initial delay before first check (seconds) */ initialDelaySeconds: z.ZodNumber; /** * Interval between checks (seconds) */ periodSeconds: z.ZodNumber; /** * Timeout for each check (seconds) */ timeoutSeconds: z.ZodNumber; /** * Failure threshold before marking unhealthy */ failureThreshold: z.ZodNumber; /** * Success threshold before marking healthy */ successThreshold: z.ZodNumber; }, "strict", z.ZodTypeAny, { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; }, { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; }>; export type HealthCheckConfig = z.infer; /** * HPA (Horizontal Pod Autoscaler) configuration */ export declare const hpaConfigSchema: z.ZodObject<{ /** * Minimum number of replicas */ minReplicas: z.ZodNumber; /** * Maximum number of replicas */ maxReplicas: z.ZodNumber; /** * Target CPU utilization percentage */ targetCPUUtilization: z.ZodOptional; /** * Target memory utilization percentage */ targetMemoryUtilization: z.ZodOptional; }, "strict", z.ZodTypeAny, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }>; export type HPAConfig = z.infer; /** * Dynamic defaults calculated from context */ export declare const dynamicDefaultsSchema: z.ZodObject<{ /** * Replica count based on environment and criticality */ replicas: z.ZodOptional; /** * Health check configuration based on language and startup characteristics */ healthChecks: z.ZodOptional>; /** * HPA configuration based on workload characteristics */ autoscaling: z.ZodOptional; /** * Target memory utilization percentage */ targetMemoryUtilization: z.ZodOptional; }, "strict", z.ZodTypeAny, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }>>; }, "strict", z.ZodTypeAny, { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; }, { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; }>; export type DynamicDefaults = z.infer; /** * Complete generation configuration from policy * Combines Dockerfile and Kubernetes manifest configuration, templates, and dynamic defaults */ export declare const generationConfigSchema: z.ZodObject<{ /** * Dockerfile generation configuration */ dockerfile: z.ZodOptional>; /** * Base image category preference (official, distroless, alpine, minimal) */ baseImageCategory: z.ZodOptional>; /** * Optimization priority (speed, size, security) */ optimizationPriority: z.ZodOptional>; /** * Security features to enable */ securityFeatures: z.ZodOptional; readOnlyRootFS: z.ZodOptional; noNewPrivileges: z.ZodOptional; dropCapabilities: z.ZodOptional; }, "strip", z.ZodTypeAny, { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; }, { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; }>>; /** * Build features to enable */ buildFeatures: z.ZodOptional; layerOptimization: z.ZodOptional; healthcheck: z.ZodOptional; }, "strip", z.ZodTypeAny, { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; }, { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; }>>; }, "strict", z.ZodTypeAny, { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; }, { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; }>>; /** * Kubernetes manifest generation configuration */ kubernetes: z.ZodOptional; /** * CPU limit (e.g., "500m", "1", "2") */ cpuLimit: z.ZodOptional; /** * Memory request (e.g., "128Mi", "256Mi", "512Mi") */ memoryRequest: z.ZodOptional; /** * Memory limit (e.g., "256Mi", "512Mi", "1Gi") */ memoryLimit: z.ZodOptional; }, "strict", z.ZodTypeAny, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }, { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; }>>; /** * Organizational standards to apply */ orgStandards: z.ZodOptional>; /** * Namespace naming pattern or override */ namespace: z.ZodOptional; /** * Allowed container registries by environment */ allowedRegistries: z.ZodOptional>; /** * Service account name to use */ serviceAccount: z.ZodOptional; /** * Image pull policy (Always, IfNotPresent, Never) */ imagePullPolicy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }, { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; }>>; /** * Feature toggles for manifest generation */ features: z.ZodOptional; /** * Enable horizontal pod autoscaling */ autoscaling: z.ZodOptional; /** * Enable resource quotas */ resourceQuotas: z.ZodOptional; /** * Enable network policies */ networkPolicies: z.ZodOptional; /** * Enable pod security policies */ podSecurityPolicies: z.ZodOptional; /** * Enable ingress */ ingress: z.ZodOptional; }, "strict", z.ZodTypeAny, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }, { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; }>>; /** * Replica count default */ replicas: z.ZodOptional; /** * Deployment strategy (RollingUpdate, Recreate) */ deploymentStrategy: z.ZodOptional>; }, "strict", z.ZodTypeAny, { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; }, { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; }>>; /** * Template additions to inject */ templates: z.ZodOptional; /** * The Dockerfile code snippet to inject */ content: z.ZodString; /** * Human-readable description of what this template does */ description: z.ZodString; /** * Priority for ordering within the same section (higher = earlier) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>, "many">>; /** * Kubernetes template components */ kubernetes: z.ZodOptional; /** * Human-readable description of what this component does */ description: z.ZodString; /** * The component specification (varies by type) */ spec: z.ZodRecord; /** * Priority for ordering (higher = higher priority) */ priority: z.ZodOptional; /** * Conditions under which this template should be applied */ conditions: z.ZodOptional>; environments: z.ZodOptional>; frameworks: z.ZodOptional>; }, "strip", z.ZodTypeAny, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }, { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; }>>; }, "strict", z.ZodTypeAny, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }, { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }>, "many">>; }, "strict", z.ZodTypeAny, { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; }, { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; }>>; /** * Dynamic defaults calculated from context */ dynamicDefaults: z.ZodOptional; /** * Health check configuration based on language and startup characteristics */ healthChecks: z.ZodOptional>; /** * HPA configuration based on workload characteristics */ autoscaling: z.ZodOptional; /** * Target memory utilization percentage */ targetMemoryUtilization: z.ZodOptional; }, "strict", z.ZodTypeAny, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }, { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; }>>; }, "strict", z.ZodTypeAny, { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; }, { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; }>>; }, "strict", z.ZodTypeAny, { kubernetes?: { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; } | undefined; dockerfile?: { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; } | undefined; templates?: { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; } | undefined; dynamicDefaults?: { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; } | undefined; }, { kubernetes?: { features?: { ingress?: boolean | undefined; autoscaling?: boolean | undefined; healthChecks?: boolean | undefined; resourceQuotas?: boolean | undefined; networkPolicies?: boolean | undefined; podSecurityPolicies?: boolean | undefined; } | undefined; replicas?: number | undefined; resourceDefaults?: { cpuRequest?: string | undefined; cpuLimit?: string | undefined; memoryRequest?: string | undefined; memoryLimit?: string | undefined; } | undefined; orgStandards?: { namespace?: string | undefined; allowedRegistries?: string[] | undefined; requiredLabels?: Record | undefined; serviceAccount?: string | undefined; imagePullPolicy?: "Always" | "IfNotPresent" | "Never" | undefined; } | undefined; deploymentStrategy?: "RollingUpdate" | "Recreate" | undefined; } | undefined; dockerfile?: { buildStrategy?: "distroless" | "multi-stage" | "single-stage" | undefined; baseImageCategory?: "official" | "distroless" | "minimal" | "alpine" | undefined; optimizationPriority?: "security" | "size" | "speed" | "balanced" | undefined; securityFeatures?: { nonRootUser?: boolean | undefined; readOnlyRootFS?: boolean | undefined; noNewPrivileges?: boolean | undefined; dropCapabilities?: boolean | undefined; } | undefined; buildFeatures?: { healthcheck?: boolean | undefined; buildCache?: boolean | undefined; layerOptimization?: boolean | undefined; } | undefined; } | undefined; templates?: { kubernetes?: { type: "secret" | "sidecar" | "initContainer" | "volume" | "volumeMount" | "envVar" | "configMap"; description: string; id: string; spec: Record; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; dockerfile?: { content: string; description: string; id: string; section: "security" | "observability" | "setup" | "runtime"; priority?: number | undefined; conditions?: { frameworks?: string[] | undefined; languages?: string[] | undefined; environments?: string[] | undefined; } | undefined; }[] | undefined; } | undefined; dynamicDefaults?: { autoscaling?: { minReplicas: number; maxReplicas: number; targetCPUUtilization?: number | undefined; targetMemoryUtilization?: number | undefined; } | undefined; replicas?: number | undefined; healthChecks?: { timeoutSeconds: number; initialDelaySeconds: number; periodSeconds: number; failureThreshold: number; successThreshold: number; } | undefined; } | undefined; }>; export type GenerationConfig = z.infer; /** * Input for querying generation configuration */ export declare const configQueryInputSchema: z.ZodObject<{ /** * Detected language (node, python, go, java, etc.) */ language: z.ZodOptional; /** * Detected framework (express, fastapi, gin, spring, etc.) */ framework: z.ZodOptional; /** * Environment (dev, staging, prod) */ environment: z.ZodOptional; /** * Application name */ appName: z.ZodOptional; /** * Additional context */ context: z.ZodOptional>; }, "strict", z.ZodTypeAny, { environment?: string | undefined; language?: string | undefined; framework?: string | undefined; context?: Record | undefined; appName?: string | undefined; }, { environment?: string | undefined; language?: string | undefined; framework?: string | undefined; context?: Record | undefined; appName?: string | undefined; }>; export type ConfigQueryInput = z.infer; //# sourceMappingURL=policy-generation-config.d.ts.map