/** * Parameter defaulting utilities to reduce duplication of params.X || 'default' patterns */ /** * Applies default values to tool parameters. * Type-safe parameter defaulting with explicit schema. * Consolidates the pattern: params.field || defaultValue * * Note: The `Record` constraint provides type safety while supporting * flexible tool parameter objects with mixed types (strings, numbers, booleans, * nested objects, arrays, etc.). The actual type safety comes from the generic * parameter `T` which should be the concrete interface of your tool parameters. * * @param params - Partial parameters from user input * @param defaults - Complete default values * @returns Merged parameters with defaults applied * * @example * ```typescript * interface K8sParams { * namespace: string; * replicas: number; * serviceType: 'ClusterIP' | 'LoadBalancer'; * } * * const params: Partial = { replicas: 3 }; * const result = withDefaults(params, { * namespace: 'default', * replicas: 1, * serviceType: 'ClusterIP' * }); // result: K8sParams with replicas: 3, other defaults applied * ``` */ export declare function withDefaults>(params: Partial, defaults: T): T; /** * Common Kubernetes parameter defaults */ export declare const K8S_DEFAULTS: { readonly namespace: "default"; readonly serviceType: "ClusterIP"; readonly replicas: 1; readonly port: 8080; readonly targetPort: 8080; }; /** * Common container/Docker parameter defaults */ export declare const CONTAINER_DEFAULTS: { readonly environment: "production"; readonly registry: "docker.io"; readonly cpu: "0.5"; readonly memory: "1Gi"; readonly tag: "latest"; }; /** * Azure Container Apps defaults */ export declare const ACA_DEFAULTS: { readonly environment: "production"; readonly location: "eastus"; readonly cpu: "0.5"; readonly memory: "1Gi"; readonly minReplicas: 0; readonly maxReplicas: 10; }; /** * Build-related defaults */ export declare const BUILD_DEFAULTS: { readonly platform: "linux/amd64"; readonly nocache: false; readonly push: false; }; /** * Helper to get defaults for a specific tool category */ export declare function getToolDefaults(category: 'k8s' | 'container' | 'aca' | 'build'): Record; //# sourceMappingURL=param-defaults.d.ts.map