/** * Canary token injection for detecting LLM data leakage. * * Injects unique, trackable tokens into obfuscated prompts. These tokens * serve no semantic purpose but can be monitored for leakage -- if a canary * appears in another user's output or in a training data audit, it proves * your data was exposed. */ export interface CanaryToken { token: string; sessionId: string; timestamp: number; messageIndex: number; } export declare class CanaryInjector { private readonly _prefix; private readonly _secret; private _sessionId; private _messageCounter; private _tokens; constructor(prefix: string, secretKey: string); get sessionId(): string; /** Inject a canary token into text. Returns modified text. */ inject(text: string): string; /** Return all canary tokens injected in this session. */ getTokens(): CanaryToken[]; /** Check if any known canary tokens appear in given text. */ checkLeak(text: string): CanaryToken[]; /** Reset for a new session. */ reset(): void; }