UNPKG

create-ai-chat-context-experimental

Version:

Phase 2: TypeScript rewrite - AI Chat Context & Memory System with conversation extraction and AICF format support (powered by aicf-core v2.1.0).

104 lines 2.63 kB
/** * This file is part of create-ai-chat-context-experimental. * Licensed under the GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). * See LICENSE file for details. */ export type LogLevel = 'debug' | 'info' | 'success' | 'warning' | 'error'; export interface LogEntry { timestamp: Date; level: LogLevel; message: string; context?: Record<string, unknown>; } export interface WatcherLoggerOptions { verbose?: boolean; logLevel?: LogLevel; maxEntries?: number; aicfDir?: string; } /** * Structured logger for watcher operations * Integrates with aicf-core for AICF format output */ export declare class WatcherLogger { private verbose; private logLevel; private maxEntries; private entries; private levelPriority; private aicfWriter; constructor(options?: WatcherLoggerOptions); /** * Log debug message */ debug(message: string, context?: Record<string, unknown>): void; /** * Log info message */ info(message: string, context?: Record<string, unknown>): void; /** * Log success message */ success(message: string, context?: Record<string, unknown>): void; /** * Log warning message */ warning(message: string, context?: Record<string, unknown>): void; /** * Log error message */ error(message: string, context?: Record<string, unknown>): void; /** * Internal log method */ private log; /** * Print log entry to console */ private printEntry; /** * Get all log entries */ getEntries(level?: LogLevel): LogEntry[]; /** * Get recent log entries */ getRecent(count?: number, level?: LogLevel): LogEntry[]; /** * Get log entries since timestamp */ getSince(timestamp: Date, level?: LogLevel): LogEntry[]; /** * Get log statistics */ getStats(): Record<LogLevel, number>; /** * Clear all log entries */ clear(): void; /** * Set verbose mode */ setVerbose(verbose: boolean): void; /** * Set log level */ setLogLevel(level: LogLevel): void; /** * Format entries as string (plain text format) */ format(entries?: LogEntry[]): string; /** * Write entries to AICF file using aicf-core * Delegates to AICFWriter for professional AICF format output */ writeToAICF(entries?: LogEntry[]): Promise<{ ok: boolean; error?: string; }>; /** * Get total entry count */ getCount(): number; } //# sourceMappingURL=WatcherLogger.d.ts.map