UNPKG

@vfarcic/dot-ai

Version:

AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance

130 lines 4.27 kB
/** * Recommend Tool - AI-powered Kubernetes resource recommendations */ import { z } from 'zod'; import { Question } from '../core/schema'; import { DotAI } from '../core/index'; import { Logger } from '../core/error-handling'; import { HelmChartInfo } from '../core/helm-types'; import type { PluginManager } from '../core/plugin-manager'; export declare const RECOMMEND_TOOL_NAME = "recommend"; export declare const RECOMMEND_TOOL_DESCRIPTION = "Deploy applications, infrastructure, and services using Kubernetes resources with AI recommendations. Supports cloud resources via operators like Crossplane, cluster management via CAPI, and traditional Kubernetes workloads. Describe what you want to deploy. Does NOT handle policy creation, organizational patterns, or resource capabilities - use manageOrgData for those."; export declare const RECOMMEND_TOOL_INPUT_SCHEMA: { stage: z.ZodOptional<z.ZodString>; intent: z.ZodOptional<z.ZodString>; final: z.ZodOptional<z.ZodBoolean>; solutionId: z.ZodOptional<z.ZodString>; answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; timeout: z.ZodOptional<z.ZodNumber>; repoUrl: z.ZodOptional<z.ZodString>; targetPath: z.ZodOptional<z.ZodString>; branch: z.ZodOptional<z.ZodString>; commitMessage: z.ZodOptional<z.ZodString>; authorName: z.ZodOptional<z.ZodString>; authorEmail: z.ZodOptional<z.ZodString>; interaction_id: z.ZodOptional<z.ZodString>; }; export interface SolutionData { toolName: 'recommend'; stage?: 'solutions' | 'questions' | 'manifests' | 'pushed' | 'deployed'; intent: string; type: string; score: number; description: string; reasons: string[]; resources?: Array<{ kind: string; apiVersion: string; group: string; description: string; }>; chart?: HelmChartInfo; questions: { required?: Question[]; basic?: Question[]; advanced?: Question[]; open?: { question: string; placeholder: string; answer?: string; }; relevantPolicies?: string[]; }; answers: Record<string, unknown>; timestamp: string; appliedPatterns?: string[]; generatedManifests?: { type: 'raw' | 'helm' | 'kustomize'; outputPath?: string; files?: Array<{ relativePath: string; content: string; }>; valuesYaml?: string; helmCommand?: string; chart?: { repository: string; repositoryName: string; chartName: string; version: string; }; releaseName?: string; namespace?: string; validationAttempts?: number; packagingAttempts?: number; }; gitPush?: { repoUrl: string; path: string; branch: string; commitSha?: string; pushedAt?: string; }; currentQuestionStage?: 'required' | 'basic' | 'advanced' | 'open'; nextQuestionStage?: string | null; allSolutions?: Array<{ solutionId: string; type: string; score: number; description: string; reasons: string[]; }>; organizationalContext?: { solutionsUsingPatterns: number; totalSolutions: number; totalPatterns: number; totalPolicies: number; patternsAvailable: string; policiesAvailable: string; }; } /** * Arguments for recommend tool */ interface RecommendToolArgs { stage?: string; intent?: string; final?: boolean; solutionId?: string; answers?: Record<string, unknown>; timeout?: number; repoUrl?: string; targetPath?: string; branch?: string; commitMessage?: string; authorName?: string; authorEmail?: string; interaction_id?: string; } /** * Direct MCP tool handler for recommend functionality (unified with stage routing) * PRD #343: pluginManager required for kubectl operations */ export declare function handleRecommendTool(args: RecommendToolArgs, dotAI: DotAI, logger: Logger, requestId: string, pluginManager: PluginManager): Promise<{ content: { type: 'text'; text: string; }[]; }>; export {}; //# sourceMappingURL=recommend.d.ts.map