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

79 lines 2.81 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. */ import type { AnalysisResult, Result } from '../types/index.js'; /** * Writer for memory files (.aicf and .ai formats) * Delegates AICF generation to aicf-core v2.1.0 * Keeps markdown generation local (not in aicf-core) */ export declare class MemoryFileWriter { private coreWriter; private cwd; constructor(cwd?: string); /** * Generate AICF format content using aicf-core v2.1.1 * @param analysis - Analysis result * @param conversationId - Conversation ID * @returns AICF content as string */ generateAICF(analysis: AnalysisResult, conversationId: string): string; /** * Generate human-readable markdown content * @param analysis - Analysis result * @param conversationId - Conversation ID * @returns Markdown content as string */ generateMarkdown(analysis: AnalysisResult, conversationId: string): string; /** * Generate markdown for user intents */ private markdownUserIntents; /** * Generate markdown for AI actions */ private markdownAIActions; /** * Generate markdown for technical work */ private markdownTechnicalWork; /** * Generate markdown for decisions */ private markdownDecisions; /** * Generate markdown for flow */ private markdownFlow; /** * Generate markdown for working state */ private markdownWorkingState; /** * Write AICF content to file in recent/ folder with date in filename * All new conversations start in recent/ (0-7 days) * MemoryDropoffAgent will move them to medium/old/archive based on age * Filename format: {date}_{conversationId}.aicf (e.g., 2025-10-24_abc123.aicf) * * NOW USES aicf-core v2.1.0 FOR ENTERPRISE-GRADE WRITES: * - Proper AICF escaping (newlines and pipes) * - Thread-safe file operations * - Atomic writes (all-or-nothing) */ writeAICF(conversationId: string, content: string, cwd?: string, timestamp?: string): Promise<Result<void>>; /** * Synchronous version of writeAICF for backward compatibility * DEPRECATED: Use async writeAICF() instead * This method throws errors instead of returning Result */ writeAICFSync(conversationId: string, content: string, cwd?: string, timestamp?: string): void; /** * Write Markdown content to file in recent/ folder * DEPRECATED: We only use AICF format now * Keeping for backward compatibility */ writeMarkdown(_conversationId: string, _content: string, _cwd?: string): void; } //# sourceMappingURL=MemoryFileWriter.d.ts.map