@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
22 lines • 1.07 kB
TypeScript
import type { DetectorMatch } from "../types.ts";
export declare const REPETITIVE_TURNS_RULE_NAME = "repetitive-turns";
export declare const REPETITIVE_TURNS_SIMILARITY_THRESHOLD = 0.55;
export declare const REPETITIVE_TURNS_STREAK_LENGTH = 3;
export declare const REPETITIVE_TURNS_MIN_NORMALIZED_CHARS = 40;
export declare const REPETITIVE_TURNS_HISTORY_CAPACITY = 6;
export declare function normalizeTurnText(text: string): string;
export declare function trigramJaccard(a: string, b: string): number;
export declare function isNearDuplicateOfPreviousTurn(normalizedCandidate: string, normalizedPrevious: string): boolean;
interface TurnEntry {
readonly normalized: string;
readonly grams: Set<string>;
}
export interface RepetitiveTurnsState {
readonly history: TurnEntry[];
streak: number;
latched: boolean;
}
export declare function createRepetitiveTurnsState(): RepetitiveTurnsState;
export declare function recordTurnText(state: RepetitiveTurnsState, text: string): DetectorMatch | null;
export {};
//# sourceMappingURL=repetitive-turns.d.ts.map