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).

118 lines 2.6 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 interface WatcherManagerOptions { pidFile?: string; logFile?: string; aicfLogFile?: string; daemonMode?: boolean; verbose?: boolean; } export interface WatcherStatus { isRunning: boolean; pid?: number; startTime?: Date; uptime?: number; processedCount?: number; errorCount?: number; } /** * Watcher Manager for daemon mode and process lifecycle management * Integrates with aicf-core for AICF format logging */ export declare class WatcherManager { private pidFile; private logFile; private aicfLogFile; private verbose; private pid; private startTime; private processedCount; private errorCount; private aicfWriter; constructor(options?: WatcherManagerOptions); /** * Initialize watcher (write PID file, setup signal handlers) */ initialize(): { ok: true; } | { ok: false; error: string; }; /** * Cleanup watcher (remove PID file, cleanup resources) */ cleanup(): { ok: true; } | { ok: false; error: string; }; /** * Get watcher status */ getStatus(): WatcherStatus; /** * Check if process is running */ isProcessRunning(): boolean; /** * Record successful checkpoint processing */ recordSuccess(): Promise<void>; /** * Record checkpoint processing error */ recordError(error: string): Promise<void>; /** * Log event to file (both plain text and AICF) */ private logEvent; /** * Log event to AICF file using aicf-core */ private logEventAsAICF; /** * Setup signal handlers for graceful shutdown */ private setupSignalHandlers; /** * Get log file content */ getLogContent(): { ok: true; content: string; } | { ok: false; error: string; }; /** * Clear log file */ clearLog(): Promise<{ ok: true; } | { ok: false; error: string; }>; /** * Get PID file path */ getPidFilePath(): string; /** * Get log file path */ getLogFilePath(): string; /** * Get AICF log file path */ getAICFLogFilePath(): string; /** * Set verbose mode */ setVerbose(verbose: boolean): void; } //# sourceMappingURL=WatcherManager.d.ts.map