codecrucible-synth
Version:
Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability
57 lines • 1.58 kB
TypeScript
/**
* User-Friendly Warning System for CLI AI Agents
* Industry standard: Warn users about resource usage and repetitive actions
* Never terminate processes - only provide helpful guidance
*/
export interface WarningConfig {
memoryWarningThreshold: number;
repetitiveToolThreshold: number;
longRunningWarningInterval: number;
maxWarningsPerHour: number;
}
export interface ToolUsage {
toolName: string;
count: number;
lastUsed: Date;
firstUsed: Date;
}
export declare class UserWarningSystem {
private config;
private toolUsageMap;
private lastWarningTimes;
private sessionStartTime;
constructor(config?: Partial<WarningConfig>);
/**
* Check memory usage and warn user if high (never terminate)
*/
checkMemoryUsage(currentUsage: number): void;
/**
* Track tool usage and warn about repetitive usage
*/
trackToolUsage(toolName: string): void;
/**
* Check for repetitive tool usage and warn user
*/
private checkRepetitiveUsage;
/**
* Start periodic long-running session warnings
*/
private startLongRunningWarnings;
/**
* Warn user about long-running sessions (helpful, not alarming)
*/
private checkLongRunningSession;
/**
* Check if we should show a warning (rate limiting)
*/
private shouldWarn;
/**
* Record that we showed a warning
*/
private recordWarning;
/**
* Get session statistics for user
*/
getSessionStats(): string;
}
//# sourceMappingURL=user-warning-system.d.ts.map