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
79 lines • 2.59 kB
TypeScript
/**
* Sub-Agent Auto-Delegation Decorator
*
* Provides decorators and utilities to automatically wrap handler methods
* with intelligent sub-agent delegation and elegant fallback.
*/
interface DelegationConfig {
taskTemplate: string;
priority: 'high' | 'medium' | 'low';
fallbackStrategy: 'continue' | 'throw' | 'return_null';
logLevel: 'info' | 'debug' | 'warn';
contextHint?: string;
timeoutMs?: number;
}
/**
* Method decorator for automatic sub-agent delegation
*/
export declare function withSubAgentDelegation(config: DelegationConfig): (target: any, propertyName: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
/**
* Predefined delegation configurations for common debugging tasks
*/
export declare const DelegationConfigs: {
PERFORMANCE_ANALYSIS: {
taskTemplate: string;
priority: "high";
fallbackStrategy: "continue";
logLevel: "info";
contextHint: string;
};
ACCESSIBILITY_AUDIT: {
taskTemplate: string;
priority: "medium";
fallbackStrategy: "continue";
logLevel: "info";
contextHint: string;
};
ERROR_INVESTIGATION: {
taskTemplate: string;
priority: "high";
fallbackStrategy: "continue";
logLevel: "info";
contextHint: string;
};
USER_INTERACTION: {
taskTemplate: string;
priority: "medium";
fallbackStrategy: "continue";
logLevel: "debug";
contextHint: string;
};
VALIDATION_TESTING: {
taskTemplate: string;
priority: "high";
fallbackStrategy: "continue";
logLevel: "info";
contextHint: string;
};
DEBUG_DISCOVERY: {
taskTemplate: string;
priority: "high";
fallbackStrategy: "continue";
logLevel: "info";
contextHint: string;
};
};
/**
* Utility function to wrap any function with sub-agent delegation
*/
export declare function wrapWithSubAgentDelegation<T extends (...args: any[]) => any>(fn: T, config: DelegationConfig, methodName?: string): T;
/**
* Convenience function to create a delegation-enabled handler method
*/
export declare function createDelegatedMethod(originalMethod: (...args: any[]) => any, delegationConfig: DelegationConfig, methodName: string): (...args: any[]) => any;
/**
* Batch wrap multiple methods with sub-agent delegation
*/
export declare function batchWrapMethods(target: any, methodConfigs: Record<string, DelegationConfig>): void;
export {};
//# sourceMappingURL=sub-agent-auto-delegate.d.ts.map