UNPKG

@ai2070/l0

Version:

L0: The Missing Reliability Substrate for AI

39 lines 1.28 kB
export interface DriftResult { detected: boolean; confidence: number; types: DriftType[]; details?: string; } export type DriftType = "tone_shift" | "meta_commentary" | "format_collapse" | "repetition" | "entropy_spike" | "markdown_collapse" | "hedging"; export interface DriftConfig { detectToneShift?: boolean; detectMetaCommentary?: boolean; detectRepetition?: boolean; detectEntropySpike?: boolean; repetitionThreshold?: number; entropyThreshold?: number; entropyWindow?: number; } export declare class DriftDetector { private config; private history; constructor(config?: DriftConfig); check(content: string, delta?: string): DriftResult; private detectMetaCommentary; private detectToneShift; private detectRepetition; private calculateEntropy; private detectEntropySpike; private detectFormatCollapse; private detectMarkdownCollapse; private detectExcessiveHedging; reset(): void; getHistory(): { entropy: number[]; tokens: string[]; lastContent: string; }; } export declare function createDriftDetector(config?: DriftConfig): DriftDetector; export declare function checkDrift(content: string): DriftResult; //# sourceMappingURL=drift.d.ts.map