cortexweaver
Version:
CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate
111 lines • 4.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgentIntegration = void 0;
const agent_integration_critique_1 = require("./agent-integration-critique");
const agent_integration_debugger_1 = require("./agent-integration-debugger");
const agent_integration_knowledge_1 = require("./agent-integration-knowledge");
const agent_integration_general_1 = require("./agent-integration-general");
/**
* Main Agent Integration class that coordinates different agent-specific operations
* Now uses modular approach with specialized classes for each agent type
*/
class AgentIntegration {
constructor(driver) {
this.driver = driver;
this.critiqueAgent = new agent_integration_critique_1.CritiqueAgentIntegration(driver);
this.debuggerAgent = new agent_integration_debugger_1.DebuggerAgentIntegration(driver);
this.knowledgeAgent = new agent_integration_knowledge_1.KnowledgeUpdaterAgentIntegration(driver);
this.generalAgent = new agent_integration_general_1.GeneralAgentIntegration(driver);
}
// ========== Critique Agent Methods ==========
async getArtifactDetails(artifactId) {
return this.critiqueAgent.getArtifactDetails(artifactId);
}
async createCritiqueNode(critiqueData) {
return this.critiqueAgent.createCritiqueNode(critiqueData);
}
async linkCritiqueToArtifact(critiqueId, artifactId) {
return this.critiqueAgent.linkCritiqueToArtifact(critiqueId, artifactId);
}
// ========== Debugger Agent Methods ==========
async getFailureById(failureId) {
return this.debuggerAgent.getFailureById(failureId);
}
async getRelatedArtifacts(failureId) {
return this.debuggerAgent.getRelatedArtifacts(failureId);
}
async createDiagnosticNode(diagnosticData) {
return this.debuggerAgent.createDiagnosticNode(diagnosticData);
}
async linkDiagnosticToFailure(diagnosticId, failureId) {
return this.debuggerAgent.linkDiagnosticToFailure(diagnosticId, failureId);
}
async getFailureHistory(taskIdOrProjectId, hoursBack) {
return this.debuggerAgent.getFailureHistory(taskIdOrProjectId, hoursBack);
}
async getAgentInteractions(taskIdOrProjectId, hoursBack) {
return this.debuggerAgent.getAgentInteractions(taskIdOrProjectId, hoursBack);
}
// ========== Knowledge Updater Agent Methods ==========
async getTaskDetails(taskId) {
return this.knowledgeAgent.getTaskDetails(taskId);
}
async getRelatedKnowledge(taskId) {
return this.knowledgeAgent.getRelatedKnowledge(taskId);
}
async createKnowledgeExtraction(extractionData) {
return this.knowledgeAgent.createKnowledgeExtraction(extractionData);
}
async linkKnowledgeToTask(knowledgeId, taskId) {
return this.knowledgeAgent.linkKnowledgeToTask(knowledgeId, taskId);
}
async updatePheromoneStrengths(updates) {
return this.knowledgeAgent.updatePheromoneStrengths(updates);
}
async getProjectKnowledge(projectId) {
return this.knowledgeAgent.getProjectKnowledge(projectId);
}
async validateKnowledgeConsistency(projectId) {
return this.knowledgeAgent.validateKnowledgeConsistency(projectId);
}
async identifyKnowledgeGaps(projectId) {
return this.knowledgeAgent.identifyKnowledgeGaps(projectId);
}
async updateProjectMetrics(projectId, metrics) {
return this.knowledgeAgent.updateProjectMetrics(projectId, metrics);
}
// ========== General Agent Methods ==========
async getProjectContext(projectId) {
return this.generalAgent.getProjectContext(projectId);
}
async createKnowledgeEntry(projectId, entryData) {
return this.generalAgent.createKnowledgeEntry(projectId, entryData);
}
async getKnowledgeEntriesByType(projectId, type) {
return this.generalAgent.getKnowledgeEntriesByType(projectId, type);
}
async getKnowledgeEntriesByQuery(projectId, query) {
return this.generalAgent.getKnowledgeEntriesByQuery(projectId, query);
}
// ========== Error Handling Integration Methods ==========
/**
* Store failure information for error tracking
*/
async storeFailure(failureData) {
return this.debuggerAgent.storeFailure(failureData);
}
/**
* Get task retry count for recovery strategies
*/
async getTaskRetryCount(taskId) {
return this.debuggerAgent.getTaskRetryCount(taskId);
}
/**
* Store escalated error context for manual intervention
*/
async storeEscalatedError(errorData) {
return this.debuggerAgent.storeEscalatedError(errorData);
}
}
exports.AgentIntegration = AgentIntegration;
//# sourceMappingURL=agent-integration.js.map