/** * Prepare Cluster Tool - Standardized Implementation * * Prepares and validates Kubernetes cluster for deployment using standardized * helpers for consistency and improved error handling * * @example * ```typescript * const result = await prepareCluster({ * namespace: 'my-app', * environment: 'production' * }, context); * * if (result.success) { * logger.info('Cluster ready', { * ready: result.clusterReady, * checks: result.checks * }); * } * ``` */ import type { ToolContext } from '../../core/context.js'; import type { DockerPlatform } from '../shared/schemas.js'; import { type Result } from '../../types/index.js'; import { type PrepareClusterParams } from './schema.js'; export interface PrepareClusterResult { /** * Natural language summary for user display. * 1-3 sentences describing the cluster preparation outcome. * @example "✅ Cluster prepared. Namespace 'production' created. 5 resources configured. Ready for deployment." */ summary?: string; success: boolean; clusterReady: boolean; cluster: string; namespace: string; platform?: { target: DockerPlatform; cluster: DockerPlatform | null; compatible: boolean; requiresEmulation: boolean; }; checks: { connectivity: boolean; permissions: boolean; namespaceExists: boolean; ingressController?: boolean; rbacConfigured?: boolean; kindInstalled?: boolean; kindClusterCreated?: boolean; localRegistryCreated?: boolean; platformCompatible?: boolean; }; warnings?: string[]; localRegistryUrl?: string; localRegistry?: { externalUrl: string; internalEndpoint: string; containerName: string; healthy: boolean; reachableFromCluster: boolean; }; } /** * Core cluster preparation implementation */ declare function handlePrepareCluster(params: PrepareClusterParams, context: ToolContext): Promise>; export declare const prepareCluster: typeof handlePrepareCluster; declare const _default: import("../../types/index.js").Tool>; environment: import("zod").ZodOptional>; namespace: import("zod").ZodOptional; targetPlatform: import("zod").ZodDefault>; strictPlatformValidation: import("zod").ZodDefault>; }, "strip", import("zod").ZodTypeAny, { targetPlatform: "linux/amd64" | "linux/arm64" | "linux/arm/v7" | "linux/arm/v6" | "linux/386" | "linux/ppc64le" | "linux/s390x" | "linux/riscv64" | "windows/amd64"; strictPlatformValidation: boolean; environment?: "development" | "staging" | "production" | "testing" | undefined; namespace?: string | undefined; clusterType?: "generic" | "kind" | undefined; }, { environment?: "development" | "staging" | "production" | "testing" | undefined; namespace?: string | undefined; targetPlatform?: "linux/amd64" | "linux/arm64" | "linux/arm/v7" | "linux/arm/v6" | "linux/386" | "linux/ppc64le" | "linux/s390x" | "linux/riscv64" | "windows/amd64" | undefined; strictPlatformValidation?: boolean | undefined; clusterType?: "generic" | "kind" | undefined; }>, PrepareClusterResult>; export default _default; //# sourceMappingURL=tool.d.ts.map