@ooples/token-optimizer-mcp
Version:
Intelligent context window optimization for Claude Code - store content externally via caching and compression, freeing up your context window for what matters
32 lines • 980 B
TypeScript
/**
* Thinking Mode Detection Utilities
* Detects when Claude is in thinking mode based on tool usage patterns and token velocity
*/
export type TurnMode = 'normal' | 'thinking' | 'planning';
export interface TurnData {
timestamp: string;
toolName: string;
tokens: number;
metadata: string;
}
export interface TurnSummary {
turnNumber: number;
timestamp: string;
tools: string[];
totalTokens: number;
mode: TurnMode;
reason: string;
}
/**
* Detects the mode of a turn based on tool usage and token patterns
*/
export declare function detectTurnMode(turns: TurnData[], averageTurnTokens: number): TurnMode;
/**
* Analyzes turns and groups them with mode detection
*/
export declare function analyzeTurns(operations: TurnData[]): TurnSummary[];
/**
* Detects anomalies in turn token usage
*/
export declare function detectAnomalies(turns: TurnSummary[], threshold?: number): TurnSummary[];
//# sourceMappingURL=thinking-mode.d.ts.map