ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
138 lines • 3.92 kB
TypeScript
/**
* Context-Aware Agent Wrapper
* Ensures every agent is context-sharing aware and emphasizes the critical importance
*/
import { BidirectionalContextManager, ContextEntry } from './bidirectional-context-manager';
import { EventEmitter } from 'events';
export interface AgentContextConfig {
agentId: string;
agentType: 'primary' | 'sub' | 'background';
contextDependencies: string[];
contextContributions: string[];
sharingImportanceScore: number;
}
export interface ContextSharingBehavior {
shareDiscoveries: boolean;
shareDecisions: boolean;
shareProgress: boolean;
shareErrors: boolean;
requestMissingContext: boolean;
acknowledgeContextReceived: boolean;
contextSyncInterval: number;
}
/**
* Context-Aware Agent Wrapper
* Wraps any agent to make it context-sharing aware
*/
export declare class ContextAwareAgentWrapper extends EventEmitter {
private contextManager;
private config;
private behavior;
private syncInterval;
private contextBuffer;
constructor(contextManager: BidirectionalContextManager, config: AgentContextConfig, behavior?: Partial<ContextSharingBehavior>);
/**
* Initialize context-aware behavior
*/
private initialize;
/**
* Share a discovery with relevant agents
*/
shareDiscovery(discovery: {
title: string;
description: string;
data?: any;
impact?: string;
recommendations?: string[];
priority?: 'critical' | 'high' | 'medium' | 'low';
sessionId?: string;
framework?: string;
toolsInvolved?: string[];
}): Promise<string>;
/**
* Share a decision with relevant agents
*/
shareDecision(decision: {
title: string;
description: string;
rationale: string;
alternatives?: string[];
impact?: string;
priority?: 'critical' | 'high' | 'medium' | 'low';
sessionId?: string;
toolsInvolved?: string[];
}): Promise<string>;
/**
* Share progress update
*/
shareProgress(progress: {
title: string;
description: string;
completionPercentage?: number;
nextSteps?: string[];
blockers?: string[];
sessionId?: string;
}): Promise<string>;
/**
* Share error or problem
*/
shareError(error: {
title: string;
description: string;
errorDetails: any;
severity: 'critical' | 'high' | 'medium' | 'low';
recoveryAttempts?: string[];
sessionId?: string;
toolsInvolved?: string[];
}): Promise<string>;
/**
* Request specific context from other agents
*/
requestContext(contextType: string, criteria: {
priority?: string;
maxAge?: number;
requiredFor: string;
}): Promise<ContextEntry[]>;
/**
* Get agent's current context awareness status
*/
getContextAwarenessStatus(): {
agentId: string;
importance: ReturnType<BidirectionalContextManager['emphasizeContextSharingImportance']>;
sharingMetrics: {
contextsShared: number;
contextsReceived: number;
lastSyncTime: Date;
};
buffer: ContextEntry[];
};
/**
* Force context synchronization
*/
forceContextSync(): Promise<void>;
/**
* Setup context synchronization
*/
private setupContextSynchronization;
/**
* Setup context event handlers
*/
private setupContextEventHandlers;
/**
* Start periodic context synchronization
*/
private startPeriodicSync;
/**
* Stop periodic synchronization
*/
stopPeriodicSync(): void;
/**
* Get source type for context sharing
*/
private getSourceType;
/**
* Cleanup resources
*/
dispose(): void;
}
//# sourceMappingURL=context-aware-agent-wrapper.d.ts.map