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
143 lines • 4.31 kB
TypeScript
export interface Neo4jQueryResult {
records: any[];
summary: any;
}
export interface ProjectNodeData {
name: string;
description: string;
[key: string]: any;
}
export interface ProjectNode {
nodeId: string;
[key: string]: any;
}
export interface WorktreeResult {
path: string;
branch: string;
}
export interface CommitResult {
commitHash: string;
message: string;
}
export interface MCPClientConfig {
neo4j?: {
uri: string;
username: string;
password: string;
mcpServerUrl?: string;
};
github?: {
token: string;
mcpServerUrl?: string;
};
}
/**
* MCPClient provides a unified interface for interacting with MCP (Model Context Protocol) servers
* for Neo4j and GitHub operations, with support for agent diagnostics and knowledge management
*/
export declare class MCPClient {
private operations;
constructor(config?: MCPClientConfig);
/**
* Initialize configuration with environment variables fallback
*/
private initializeConfig;
connectToNeo4j(): Promise<boolean>;
connectToGitHub(): Promise<boolean>;
disconnect(): Promise<void>;
healthCheck(): Promise<{
neo4j: boolean;
github: boolean;
}>;
isConnected(): boolean;
isNeo4jConnected(): boolean;
isGitHubConnected(): boolean;
updateConfig(config: Partial<MCPClientConfig>): void;
getConfig(): MCPClientConfig;
executeCypherQuery(query: string, parameters?: {
[key: string]: any;
}): Promise<Neo4jQueryResult>;
createProjectNode(projectData: ProjectNodeData): Promise<ProjectNode>;
createTaskNode(taskData: any): Promise<any>;
linkTaskToProject(taskId: string, projectId: string): Promise<void>;
createWorktree(branchName: string, baseBranch?: string): Promise<WorktreeResult>;
writeFileToWorktree(filePath: string, fileName: string, content: string): Promise<boolean>;
commitToWorktree(worktreePath: string, message: string, files: string[]): Promise<CommitResult>;
mergeWorktree(branchName: string, targetBranch?: string): Promise<void>;
removeWorktree(worktreePath: string): Promise<void>;
scanWorktreeForChanges(projectId?: string): Promise<Array<{
path: string;
type: 'contract' | 'prototype' | 'code' | 'test';
lastModified: string;
}>>;
analyzeLogs(projectId?: string): Promise<{
errorPatterns: string[];
frequency: Record<string, number>;
timeline: string;
}>;
getStackTrace(errorId: string): Promise<{
stackTrace: string;
sourceMap?: string;
context: string[];
}>;
getSystemMetrics(): Promise<{
memory: {
usage: string;
available?: string;
trend?: string;
};
cpu: {
usage: string;
load?: number;
trend?: string;
};
disk?: {
usage: string;
iops?: string;
};
network?: {
bandwidth?: string;
latency?: string;
packetLoss?: string;
errors?: number;
};
database?: {
connections?: number;
maxConnections?: number;
status?: string;
};
}>;
runDiagnosticCommands(commands: string[]): Promise<{
results: Array<{
command: string;
output: string;
exitCode: number;
duration: number;
}>;
}>;
getEnvironmentInfo(): Promise<{
nodeVersion: string;
npmVersion: string;
osVersion: string;
dockerVersion?: string;
dependencies: Record<string, string>;
}>;
captureErrorContext(errorId: string): Promise<{
timestamp: string;
environment: Record<string, any>;
processState: Record<string, any>;
memorySnapshot: Record<string, any>;
}>;
commitKnowledgeUpdates(projectId: string, updates: {
knowledgeNodes: string[];
pheromoneChanges: string[];
summary: string;
}): Promise<{
success: boolean;
commitHash?: string;
message?: string;
}>;
}
export * from './client-operations';
export * from './diagnostic-operations';
//# sourceMappingURL=index.d.ts.map