export declare class AgentBuilderDefaults { static DEFAULT_INSTRUCTIONS: (projectPath?: string) => string; static DEFAULT_MEMORY_CONFIG: { lastMessages: number; }; static DEFAULT_FOLDER_STRUCTURE: { agent: string; workflow: string; tool: string; 'mcp-server': string; network: string; }; static DEFAULT_TOOLS: (projectPath: string) => Promise<{ readFile: import("@mastra/core/tools").Tool<{ filePath: string; startLine?: number | undefined; endLine?: number | undefined; encoding?: string | undefined; }, { success: boolean; content?: string | undefined; lines?: string[] | undefined; metadata?: { size: number; totalLines: number; encoding: string; lastModified: string; } | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "read-file", unknown>; writeFile: import("@mastra/core/tools").Tool<{ filePath: string; content: string; createDirs?: boolean | undefined; encoding?: string | undefined; }, { success: boolean; filePath: string; message: string; bytesWritten?: number | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "write-file", unknown>; listDirectory: import("@mastra/core/tools").Tool<{ path: string; recursive?: boolean | undefined; includeHidden?: boolean | undefined; pattern?: string | undefined; maxDepth?: number | undefined; includeMetadata?: boolean | undefined; }, { success: boolean; items: { name: string; path: string; type: "file" | "directory" | "symlink"; size?: number | undefined; lastModified?: string | undefined; permissions?: string | undefined; }[]; totalItems: number; path: string; message: string; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "list-directory", unknown>; executeCommand: import("@mastra/core/tools").Tool<{ command: string; workingDirectory?: string | undefined; timeout?: number | undefined; captureOutput?: boolean | undefined; shell?: string | undefined; env?: Record | undefined; }, { success: boolean; command: string; exitCode?: number | undefined; stdout?: string | undefined; stderr?: string | undefined; workingDirectory?: string | undefined; executionTime?: number | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "execute-command", unknown>; taskManager: import("@mastra/core/tools").Tool<{ action: "create" | "update" | "list" | "complete" | "remove"; tasks?: { id: string; status: "pending" | "in_progress" | "completed" | "blocked"; content?: string | undefined; priority?: "high" | "medium" | "low" | undefined; dependencies?: string[] | undefined; notes?: string | undefined; }[] | undefined; taskId?: string | undefined; }, { success: boolean; tasks: { id: string; content: string; status: string; priority: string; createdAt: string; updatedAt: string; dependencies?: string[] | undefined; notes?: string | undefined; }[]; message: string; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "task-manager", unknown>; multiEdit: import("@mastra/core/tools").Tool<{ operations: { filePath: string; edits: { oldString: string; newString: string; replaceAll?: boolean | undefined; }[]; }[]; createBackup?: boolean | undefined; }, { success: boolean; results: { filePath: string; editsApplied: number; errors: string[]; backup?: string | undefined; }[]; message: string; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "multi-edit", unknown>; replaceLines: import("@mastra/core/tools").Tool<{ filePath: string; startLine: number; endLine: number; newContent: string; createBackup?: boolean | undefined; }, { success: boolean; message: string; linesReplaced?: number | undefined; backup?: string | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "replace-lines", unknown>; showFileLines: import("@mastra/core/tools").Tool<{ filePath: string; startLine?: number | undefined; endLine?: number | undefined; context?: number | undefined; }, { success: boolean; lines: { lineNumber: number; content: string; isTarget: boolean; }[]; totalLines: number; message: string; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "show-file-lines", unknown>; smartSearch: import("@mastra/core/tools").Tool<{ query: string; type?: "text" | "regex" | "fuzzy" | "semantic" | undefined; scope?: { paths?: string[] | undefined; fileTypes?: string[] | undefined; excludePaths?: string[] | undefined; maxResults?: number | undefined; } | undefined; context?: { beforeLines?: number | undefined; afterLines?: number | undefined; includeDefinitions?: boolean | undefined; } | undefined; }, { success: boolean; matches: { file: string; line: number; match: string; context: { before: string[]; after: string[]; }; column?: number | undefined; relevance?: number | undefined; }[]; summary: { totalMatches: number; filesSearched: number; patterns: string[]; }; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "smart-search", unknown>; validateCode: import("@mastra/core/tools").Tool<{ validationType: ("types" | "schemas" | "tests" | "lint" | "build")[]; projectPath?: string | undefined; files?: string[] | undefined; }, { valid: boolean; errors: { type: "build" | "typescript" | "eslint" | "schema" | "test"; severity: "error" | "warning" | "info"; message: string; file?: string | undefined; line?: number | undefined; column?: number | undefined; code?: string | undefined; }[]; summary: { totalErrors: number; totalWarnings: number; validationsPassed: string[]; validationsFailed: string[]; }; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "validate-code", unknown>; webSearch: import("@mastra/core/tools").Tool<{ query: string; maxResults?: number | undefined; region?: string | undefined; language?: string | undefined; includeImages?: boolean | undefined; dateRange?: "day" | "week" | "month" | "year" | "all" | undefined; }, { success: boolean; query: string; results: { title: string; url: string; snippet: string; domain: string; publishDate?: string | undefined; relevanceScore?: number | undefined; }[]; totalResults: number; searchTime: number; suggestions?: string[] | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "web-search", unknown>; attemptCompletion: import("@mastra/core/tools").Tool<{ summary: string; changes: { type: "file_created" | "file_modified" | "file_deleted" | "command_executed" | "dependency_added"; description: string; path?: string | undefined; }[]; validation: { testsRun?: boolean | undefined; buildsSuccessfully?: boolean | undefined; manualTestingRequired?: boolean | undefined; }; nextSteps?: string[] | undefined; }, { completionId: string; status: "completed" | "needs_review" | "needs_testing"; summary: string; confidence: number; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "attempt-completion", unknown>; manageProject: import("@mastra/core/tools").Tool<{ action: "create" | "install" | "upgrade"; features?: string[] | undefined; packages?: { name: string; version?: string | undefined; }[] | undefined; }, { success: boolean; installed?: string[] | undefined; upgraded?: string[] | undefined; warnings?: string[] | undefined; message?: string | undefined; details?: string | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "manage-project", unknown>; manageServer: import("@mastra/core/tools").Tool<{ action: "status" | "stop" | "start" | "restart"; port?: number | undefined; }, { success: boolean; status: "unknown" | "running" | "stopped" | "starting" | "stopping"; pid?: number | undefined; port?: number | undefined; url?: string | undefined; message?: string | undefined; stdout?: string[] | undefined; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "manage-server", unknown>; httpRequest: import("@mastra/core/tools").Tool<{ method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; url: string; baseUrl?: string | undefined; headers?: Record | undefined; body?: any; timeout?: number | undefined; }, { success: boolean; url: string; method: string; status?: number | undefined; statusText?: string | undefined; headers?: Record | undefined; data?: any; errorMessage?: string | undefined; }, unknown, unknown, import("@mastra/core/tools").ToolExecutionContext, "http-request", unknown>; }>; /** * Filter tools for template builder mode (excludes web search and other advanced tools) */ static filterToolsForTemplateBuilder(tools: Record): Record; /** * Filter tools for code editor mode (includes all tools) */ static filterToolsForCodeEditor(tools: Record): Record; /** * Get tools for a specific mode */ static listToolsForMode(projectPath: string, mode?: 'template' | 'code-editor'): Promise>; /** * Create a new Mastra project using create-mastra CLI */ static createMastraProject({ features, projectName }: { features?: string[]; projectName?: string; }): Promise<{ success: boolean; projectPath: string; message: string; details: string; errorMessage: string; } | { success: boolean; message: string; projectPath?: undefined; details?: undefined; errorMessage?: undefined; }>; /** * Install packages using the detected package manager */ static installPackages({ packages, projectPath, }: { packages: Array<{ name: string; version?: string; }>; projectPath?: string; }): Promise<{ success: boolean; installed: string[]; message: string; details: string; } | { success: boolean; message: string; installed?: undefined; details?: undefined; }>; /** * Upgrade packages using the detected package manager */ static upgradePackages({ packages, projectPath, }: { packages?: Array<{ name: string; version?: string; }>; projectPath?: string; }): Promise<{ success: boolean; upgraded: string[]; message: string; details: string; } | { success: boolean; message: string; upgraded?: undefined; details?: undefined; }>; /** * Start the Mastra server */ static startMastraServer({ port, projectPath, env, }: { port?: number; projectPath?: string; env?: Record; }): Promise; /** * Stop the Mastra server */ static stopMastraServer({ port, projectPath: _projectPath }: { port?: number; projectPath?: string; }): Promise<{ success: boolean; status: "error"; errorMessage: string; message?: undefined; } | { success: boolean; status: "stopped"; message: string; errorMessage?: undefined; } | { success: boolean; status: "unknown"; message: string; errorMessage: string; } | { success: boolean; status: "unknown"; errorMessage: string; message?: undefined; }>; /** * Check Mastra server status */ static checkMastraServerStatus({ port, projectPath: _projectPath, }: { port?: number; projectPath?: string; }): Promise<{ success: boolean; status: "running"; port: number; url: string; message: string; } | { success: boolean; status: "unknown"; port: number; message: string; url?: undefined; } | { success: boolean; status: "stopped" | "starting"; port: number; message: string; url?: undefined; }>; private static tsProgram; private static programProjectPath; /** * Validate code using hybrid approach: syntax -> types -> lint * * BEST PRACTICES FOR CODING AGENTS: * * ✅ RECOMMENDED (Fast & Accurate): * validateCode({ * validationType: ['types', 'lint'], * files: ['src/workflows/my-workflow.ts', 'src/components/Button.tsx'] * }) * * Performance: ~150ms * - Syntax check (1ms) - catches 80% of issues instantly * - Semantic validation (100ms) - full type checking with dependencies * - ESLint (50ms) - style and best practices * - Only shows errors from YOUR files * * ❌ AVOID (Slow & Noisy): * validateCode({ validationType: ['types', 'lint'] }) // no files specified * * Performance: ~2000ms+ * - Full project CLI validation * - Shows errors from all project files (confusing) * - Much slower for coding agents * * @param projectPath - Project root directory (defaults to cwd) * @param validationType - ['types', 'lint'] recommended for most use cases * @param files - ALWAYS provide this for best performance */ static validateCode({ projectPath, validationType, files, }: { projectPath?: string; validationType: Array<'types' | 'lint' | 'schemas' | 'tests' | 'build'>; files?: string[]; }): Promise<{ valid: boolean; errors: { type: "typescript" | "eslint" | "schema" | "test" | "build"; severity: "error" | "warning" | "info"; message: string; file?: string; line?: number; column?: number; code?: string; }[]; summary: { totalErrors: number; totalWarnings: number; validationsPassed: string[]; validationsFailed: string[]; }; }>; /** * CLI-based validation for when no specific files are provided */ static validateCodeCLI({ projectPath, validationType, }: { projectPath?: string; validationType: Array<'types' | 'lint' | 'schemas' | 'tests' | 'build'>; }): Promise<{ valid: boolean; errors: { type: "typescript" | "eslint" | "schema" | "test" | "build"; severity: "error" | "warning" | "info"; message: string; file?: string; line?: number; column?: number; code?: string; }[]; summary: { totalErrors: number; totalWarnings: number; validationsPassed: string[]; validationsFailed: string[]; }; }>; /** * Hybrid validation for a single file */ static validateSingleFileHybrid(filePath: string, fileContent: string, projectPath: string, validationType: Array<'types' | 'lint' | 'schemas' | 'tests' | 'build'>): Promise<{ errors: { type: "typescript" | "eslint" | "schema" | "test" | "build"; severity: "error" | "warning" | "info"; message: string; file?: string; line?: number; column?: number; code?: string; }[]; }>; /** * Fast syntax-only validation using TypeScript parser */ static validateSyntaxOnly(fileContent: string, fileName: string): Promise<{ type: "typescript"; severity: "error"; message: string; file?: string; line?: number; column?: number; }[]>; /** * TypeScript semantic validation using incremental program */ static validateTypesSemantic(filePath: string, projectPath: string): Promise<{ type: "typescript"; severity: "error" | "warning"; message: string; file?: string; line?: number; column?: number; }[]>; /** * ESLint validation for a single file */ static validateESLintSingle(filePath: string, projectPath: string): Promise<{ type: "eslint"; severity: "error" | "warning"; message: string; file?: string; line?: number; column?: number; code?: string; }[]>; /** * Get or create TypeScript program */ static getOrCreateTSProgram(projectPath: string): Promise; /** * Parse ESLint errors from JSON output */ static parseESLintErrors(eslintResults: any[]): Array<{ type: 'eslint'; severity: 'error' | 'warning'; message: string; file?: string; line?: number; column?: number; code?: string; }>; /** * Make HTTP request to server or external API */ static makeHttpRequest({ method, url, baseUrl, headers, body, timeout, }: { method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; url: string; baseUrl?: string; headers?: Record; body?: any; timeout?: number; }): Promise<{ success: boolean; status: number; statusText: string; headers: Record; data: any; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; errorMessage?: undefined; } | { success: boolean; url: string; method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"; errorMessage: string; status?: undefined; statusText?: undefined; headers?: undefined; data?: undefined; }>; /** * Enhanced task management system for complex coding tasks */ static manageTaskList(context: { action: 'create' | 'update' | 'list' | 'complete' | 'remove'; tasks?: Array<{ id: string; content?: string; status: 'pending' | 'in_progress' | 'completed' | 'blocked'; priority: 'high' | 'medium' | 'low'; dependencies?: string[]; notes?: string; }>; taskId?: string; }): Promise<{ success: boolean; tasks: any[]; message: string; }>; /** * Perform multiple edits across files atomically */ static performMultiEdit(context: { operations: Array<{ filePath: string; edits: Array<{ oldString: string; newString: string; replaceAll?: boolean; }>; }>; createBackup?: boolean; projectPath?: string; }): Promise<{ success: boolean; results: { filePath: string; editsApplied: number; errors: string[]; backup?: string; }[]; message: string; }>; /** * Replace specific line ranges in a file with new content */ static replaceLines(context: { filePath: string; startLine: number; endLine: number; newContent: string; createBackup?: boolean; projectPath?: string; }): Promise<{ success: boolean; message: string; errorMessage: string; linesReplaced?: undefined; backup?: undefined; } | { success: boolean; message: string; linesReplaced: number; backup: string | undefined; errorMessage?: undefined; }>; /** * Show file lines with line numbers for debugging */ static showFileLines(context: { filePath: string; startLine?: number; endLine?: number; context?: number; projectPath?: string; }): Promise<{ success: boolean; lines: { lineNumber: number; content: string; isTarget: boolean; }[]; totalLines: number; message: string; errorMessage?: undefined; } | { success: boolean; lines: never[]; totalLines: number; message: string; errorMessage: string; }>; /** * Signal task completion */ static signalCompletion(context: { summary: string; changes: Array<{ type: 'file_created' | 'file_modified' | 'file_deleted' | 'command_executed' | 'dependency_added'; description: string; path?: string; }>; validation: { testsRun?: boolean; buildsSuccessfully?: boolean; manualTestingRequired?: boolean; }; nextSteps?: string[]; }): Promise<{ completionId: string; status: "completed" | "needs_review" | "needs_testing"; summary: string; confidence: number; }>; /** * Perform intelligent search with context */ static performSmartSearch(context: { query: string; type?: 'text' | 'regex' | 'fuzzy' | 'semantic'; scope?: { paths?: string[]; fileTypes?: string[]; excludePaths?: string[]; maxResults?: number; }; context?: { beforeLines?: number; afterLines?: number; includeDefinitions?: boolean; }; }, projectPath: string): Promise<{ success: boolean; matches: { file: string; line: number; column?: number; match: string; context: { before: string[]; after: string[]; }; relevance?: number; }[]; summary: { totalMatches: number; filesSearched: number; patterns: string[]; }; }>; private static taskStorage; private static pendingQuestions; /** * Read file contents with optional line range */ static readFile(context: { filePath: string; startLine?: number; endLine?: number; encoding?: string; projectPath?: string; }): Promise<{ success: boolean; content: string; lines: string[]; metadata: { size: number; totalLines: number; encoding: string; lastModified: string; }; errorMessage?: undefined; } | { success: boolean; errorMessage: string; content?: undefined; lines?: undefined; metadata?: undefined; }>; /** * Write content to file with directory creation and backup options */ static writeFile(context: { filePath: string; content: string; createDirs?: boolean; encoding?: string; projectPath?: string; }): Promise<{ success: boolean; filePath: string; bytesWritten: number; message: string; errorMessage?: undefined; } | { success: boolean; filePath: string; message: string; errorMessage: string; bytesWritten?: undefined; }>; /** * List directory contents with filtering and metadata */ static listDirectory(context: { path: string; recursive?: boolean; includeHidden?: boolean; pattern?: string; maxDepth?: number; includeMetadata?: boolean; projectPath?: string; }): Promise<{ success: boolean; items: { name: string; path: string; type: "file" | "directory" | "symlink"; size?: number; lastModified?: string; permissions?: string; }[]; totalItems: number; path: string; message: string; errorMessage?: undefined; } | { success: boolean; items: never[]; totalItems: number; path: string; message: string; errorMessage: string; }>; /** * Execute shell commands with proper error handling */ static executeCommand(context: { command: string; workingDirectory?: string; timeout?: number; captureOutput?: boolean; shell?: string; env?: Record; }): Promise<{ success: boolean; exitCode: number; stdout: string | undefined; stderr: string | undefined; command: string; workingDirectory: string | undefined; executionTime: number; errorMessage?: undefined; } | { success: boolean; exitCode: any; stdout: string; stderr: string; command: string; workingDirectory: string | undefined; executionTime: number; errorMessage: string; }>; /** * Web search using a simple search approach */ static webSearch(context: { query: string; maxResults?: number; region?: string; language?: string; includeImages?: boolean; dateRange?: 'day' | 'week' | 'month' | 'year' | 'all'; }): Promise<{ success: boolean; query: string; results: { title: string; url: string; snippet: string; domain: string; publishDate?: string; relevanceScore?: number; }[]; totalResults: number; searchTime: number; suggestions: any; errorMessage?: undefined; } | { success: boolean; query: string; results: never[]; totalResults: number; searchTime: number; errorMessage: string; suggestions?: undefined; }>; } //# sourceMappingURL=defaults.d.ts.map