UNPKG

@sethdouglasford/claude-flow

Version:

Claude Code Flow - Advanced AI-powered development workflows with SPARC methodology

52 lines 1.62 kB
/** * Code Agent - Implements hierarchical model strategy for intelligent code generation * Uses different models based on task complexity and context requirements */ import { BaseAgent } from "./base-agent.js"; import { TaskDefinition, AgentCapabilities } from "../types.js"; export interface CodeEditInstruction { type: "create" | "modify" | "delete"; filePath: string; content?: string; instructions: string; context?: string[]; complexity: "simple" | "medium" | "complex"; useApplyModel?: boolean; } export interface FileContext { path: string; language: string; dependencies: string[]; exports: string[]; complexity: "low" | "medium" | "high"; lastModified: Date; relatedFiles: string[]; } export interface ModelHierarchy { primary: string; apply: string; review: string; } export declare class CodeAgent extends BaseAgent { private modelHierarchy; private fileContextCache; private editComplexityThreshold; constructor(id: string, config?: any); executeTask(task: TaskDefinition): Promise<any>; private analyzeTaskComplexity; private selectModel; private gatherFileContext; private extractFilePaths; private analyzeFile; private detectLanguage; private executeSimpleEdit; private executeMediumEdit; private executeComplexEdit; private implementWithPrimaryModel; private reviewWithReviewModel; private handleError; getCapabilities(): AgentCapabilities; canHandleTask(task: TaskDefinition): boolean; cleanup(): Promise<void>; } //# sourceMappingURL=code-agent.d.ts.map