claude-conversation-memory-mcp 0.6.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +53 -0
  2. package/dist/ConversationMemory.d.ts +151 -10
  3. package/dist/ConversationMemory.d.ts.map +1 -1
  4. package/dist/ConversationMemory.js +127 -10
  5. package/dist/ConversationMemory.js.map +1 -1
  6. package/dist/cache/QueryCache.d.ts +215 -0
  7. package/dist/cache/QueryCache.d.ts.map +1 -0
  8. package/dist/cache/QueryCache.js +294 -0
  9. package/dist/cache/QueryCache.js.map +1 -0
  10. package/dist/mcp-server.d.ts.map +1 -1
  11. package/dist/mcp-server.js +4 -1
  12. package/dist/mcp-server.js.map +1 -1
  13. package/dist/parsers/ConversationParser.d.ts +62 -3
  14. package/dist/parsers/ConversationParser.d.ts.map +1 -1
  15. package/dist/parsers/ConversationParser.js +50 -3
  16. package/dist/parsers/ConversationParser.js.map +1 -1
  17. package/dist/parsers/DecisionExtractor.d.ts +61 -3
  18. package/dist/parsers/DecisionExtractor.d.ts.map +1 -1
  19. package/dist/parsers/DecisionExtractor.js +47 -3
  20. package/dist/parsers/DecisionExtractor.js.map +1 -1
  21. package/dist/parsers/GitIntegrator.d.ts +88 -3
  22. package/dist/parsers/GitIntegrator.d.ts.map +1 -1
  23. package/dist/parsers/GitIntegrator.js +68 -3
  24. package/dist/parsers/GitIntegrator.js.map +1 -1
  25. package/dist/parsers/MistakeExtractor.d.ts +62 -3
  26. package/dist/parsers/MistakeExtractor.d.ts.map +1 -1
  27. package/dist/parsers/MistakeExtractor.js +50 -3
  28. package/dist/parsers/MistakeExtractor.js.map +1 -1
  29. package/dist/parsers/RequirementsExtractor.d.ts +95 -4
  30. package/dist/parsers/RequirementsExtractor.d.ts.map +1 -1
  31. package/dist/parsers/RequirementsExtractor.js +73 -4
  32. package/dist/parsers/RequirementsExtractor.js.map +1 -1
  33. package/dist/storage/BackupManager.d.ts +58 -0
  34. package/dist/storage/BackupManager.d.ts.map +1 -0
  35. package/dist/storage/BackupManager.js +213 -0
  36. package/dist/storage/BackupManager.js.map +1 -0
  37. package/dist/storage/ConversationStorage.d.ts +271 -2
  38. package/dist/storage/ConversationStorage.d.ts.map +1 -1
  39. package/dist/storage/ConversationStorage.js +356 -7
  40. package/dist/storage/ConversationStorage.js.map +1 -1
  41. package/dist/storage/DeletionService.d.ts +70 -0
  42. package/dist/storage/DeletionService.d.ts.map +1 -0
  43. package/dist/storage/DeletionService.js +198 -0
  44. package/dist/storage/DeletionService.js.map +1 -0
  45. package/dist/tools/ToolDefinitions.d.ts +26 -0
  46. package/dist/tools/ToolDefinitions.d.ts.map +1 -1
  47. package/dist/tools/ToolDefinitions.js +24 -0
  48. package/dist/tools/ToolDefinitions.js.map +1 -1
  49. package/dist/tools/ToolHandlers.d.ts +564 -16
  50. package/dist/tools/ToolHandlers.d.ts.map +1 -1
  51. package/dist/tools/ToolHandlers.js +664 -24
  52. package/dist/tools/ToolHandlers.js.map +1 -1
  53. package/dist/types/ToolTypes.d.ts +22 -0
  54. package/dist/types/ToolTypes.d.ts.map +1 -1
  55. package/dist/utils/Logger.d.ts +67 -0
  56. package/dist/utils/Logger.d.ts.map +1 -0
  57. package/dist/utils/Logger.js +119 -0
  58. package/dist/utils/Logger.js.map +1 -0
  59. package/dist/utils/constants.d.ts +75 -0
  60. package/dist/utils/constants.d.ts.map +1 -0
  61. package/dist/utils/constants.js +105 -0
  62. package/dist/utils/constants.js.map +1 -0
  63. package/package.json +1 -1
@@ -0,0 +1,213 @@
1
+ /**
2
+ * BackupManager - Create and manage backups before deletion operations
3
+ * Exports affected data to JSON for potential restoration
4
+ */
5
+ import { writeFileSync, mkdirSync, existsSync } from "fs";
6
+ import { join } from "path";
7
+ import { homedir } from "os";
8
+ import { pathToProjectFolderName } from "../utils/sanitization.js";
9
+ /**
10
+ * BackupManager class
11
+ */
12
+ export class BackupManager {
13
+ db;
14
+ constructor(db) {
15
+ this.db = db;
16
+ }
17
+ /**
18
+ * Create a backup of specific conversations and related data
19
+ */
20
+ createBackupForConversations(conversationIds, description, projectPath) {
21
+ if (conversationIds.length === 0) {
22
+ throw new Error("No conversations to backup");
23
+ }
24
+ // Prepare backup directory
25
+ const backupDir = this.getBackupDirectory(projectPath);
26
+ this.ensureDirectoryExists(backupDir);
27
+ // Generate backup filename
28
+ const timestamp = Date.now();
29
+ const backupFilename = `backup-${timestamp}.json`;
30
+ const backupPath = join(backupDir, backupFilename);
31
+ // Collect data from all related tables
32
+ const backupData = {};
33
+ const recordCounts = {};
34
+ // Conversations
35
+ const conversations = this.getConversations(conversationIds);
36
+ backupData.conversations = conversations;
37
+ recordCounts.conversations = conversations.length;
38
+ // Messages
39
+ const messages = this.getMessages(conversationIds);
40
+ backupData.messages = messages;
41
+ recordCounts.messages = messages.length;
42
+ // Get message IDs for related data
43
+ const messageIds = messages.map((m) => m.id);
44
+ // Tool uses
45
+ const toolUses = this.getToolUses(messageIds);
46
+ backupData.tool_uses = toolUses;
47
+ recordCounts.tool_uses = toolUses.length;
48
+ // Tool results
49
+ const toolResults = this.getToolResults(messageIds);
50
+ backupData.tool_results = toolResults;
51
+ recordCounts.tool_results = toolResults.length;
52
+ // File edits
53
+ const fileEdits = this.getFileEdits(conversationIds);
54
+ backupData.file_edits = fileEdits;
55
+ recordCounts.file_edits = fileEdits.length;
56
+ // Thinking blocks
57
+ const thinkingBlocks = this.getThinkingBlocks(messageIds);
58
+ backupData.thinking_blocks = thinkingBlocks;
59
+ recordCounts.thinking_blocks = thinkingBlocks.length;
60
+ // Decisions
61
+ const decisions = this.getDecisions(conversationIds);
62
+ backupData.decisions = decisions;
63
+ recordCounts.decisions = decisions.length;
64
+ // Mistakes
65
+ const mistakes = this.getMistakes(conversationIds);
66
+ backupData.mistakes = mistakes;
67
+ recordCounts.mistakes = mistakes.length;
68
+ // Requirements
69
+ const requirements = this.getRequirements(conversationIds);
70
+ backupData.requirements = requirements;
71
+ recordCounts.requirements = requirements.length;
72
+ // Validations
73
+ const validations = this.getValidations(conversationIds);
74
+ backupData.validations = validations;
75
+ recordCounts.validations = validations.length;
76
+ // Embeddings
77
+ const messageEmbeddings = this.getMessageEmbeddings(messageIds);
78
+ backupData.message_embeddings = messageEmbeddings;
79
+ recordCounts.message_embeddings = messageEmbeddings.length;
80
+ const decisionIds = decisions.map((d) => d.id);
81
+ const decisionEmbeddings = this.getDecisionEmbeddings(decisionIds);
82
+ backupData.decision_embeddings = decisionEmbeddings;
83
+ recordCounts.decision_embeddings = decisionEmbeddings.length;
84
+ // Create metadata
85
+ const metadata = {
86
+ timestamp,
87
+ description,
88
+ projectPath,
89
+ tables: Object.keys(backupData),
90
+ recordCounts,
91
+ backupPath,
92
+ };
93
+ // Write backup file
94
+ const fullBackup = {
95
+ metadata,
96
+ data: backupData,
97
+ };
98
+ writeFileSync(backupPath, JSON.stringify(fullBackup, null, 2), "utf-8");
99
+ console.log(`✓ Backup created: ${backupPath}`);
100
+ console.log(` ${recordCounts.conversations} conversations`);
101
+ console.log(` ${recordCounts.messages} messages`);
102
+ console.log(` ${recordCounts.decisions} decisions`);
103
+ console.log(` ${recordCounts.mistakes} mistakes`);
104
+ return metadata;
105
+ }
106
+ /**
107
+ * Get backup directory for project
108
+ */
109
+ getBackupDirectory(projectPath) {
110
+ const projectFolderName = pathToProjectFolderName(projectPath);
111
+ return join(homedir(), ".claude", "backups", projectFolderName);
112
+ }
113
+ /**
114
+ * Ensure directory exists
115
+ */
116
+ ensureDirectoryExists(dir) {
117
+ if (!existsSync(dir)) {
118
+ mkdirSync(dir, { recursive: true });
119
+ }
120
+ }
121
+ /**
122
+ * Query helpers for each table
123
+ */
124
+ getConversations(conversationIds) {
125
+ const placeholders = conversationIds.map(() => "?").join(",");
126
+ return this.db
127
+ .prepare(`SELECT * FROM conversations WHERE id IN (${placeholders})`)
128
+ .all(...conversationIds);
129
+ }
130
+ getMessages(conversationIds) {
131
+ const placeholders = conversationIds.map(() => "?").join(",");
132
+ return this.db
133
+ .prepare(`SELECT * FROM messages WHERE conversation_id IN (${placeholders})`)
134
+ .all(...conversationIds);
135
+ }
136
+ getToolUses(messageIds) {
137
+ if (messageIds.length === 0) {
138
+ return [];
139
+ }
140
+ const placeholders = messageIds.map(() => "?").join(",");
141
+ return this.db
142
+ .prepare(`SELECT * FROM tool_uses WHERE message_id IN (${placeholders})`)
143
+ .all(...messageIds);
144
+ }
145
+ getToolResults(messageIds) {
146
+ if (messageIds.length === 0) {
147
+ return [];
148
+ }
149
+ const placeholders = messageIds.map(() => "?").join(",");
150
+ return this.db
151
+ .prepare(`SELECT * FROM tool_results WHERE message_id IN (${placeholders})`)
152
+ .all(...messageIds);
153
+ }
154
+ getFileEdits(conversationIds) {
155
+ const placeholders = conversationIds.map(() => "?").join(",");
156
+ return this.db
157
+ .prepare(`SELECT * FROM file_edits WHERE conversation_id IN (${placeholders})`)
158
+ .all(...conversationIds);
159
+ }
160
+ getThinkingBlocks(messageIds) {
161
+ if (messageIds.length === 0) {
162
+ return [];
163
+ }
164
+ const placeholders = messageIds.map(() => "?").join(",");
165
+ return this.db
166
+ .prepare(`SELECT * FROM thinking_blocks WHERE message_id IN (${placeholders})`)
167
+ .all(...messageIds);
168
+ }
169
+ getDecisions(conversationIds) {
170
+ const placeholders = conversationIds.map(() => "?").join(",");
171
+ return this.db
172
+ .prepare(`SELECT * FROM decisions WHERE conversation_id IN (${placeholders})`)
173
+ .all(...conversationIds);
174
+ }
175
+ getMistakes(conversationIds) {
176
+ const placeholders = conversationIds.map(() => "?").join(",");
177
+ return this.db
178
+ .prepare(`SELECT * FROM mistakes WHERE conversation_id IN (${placeholders})`)
179
+ .all(...conversationIds);
180
+ }
181
+ getRequirements(conversationIds) {
182
+ const placeholders = conversationIds.map(() => "?").join(",");
183
+ return this.db
184
+ .prepare(`SELECT * FROM requirements WHERE conversation_id IN (${placeholders})`)
185
+ .all(...conversationIds);
186
+ }
187
+ getValidations(conversationIds) {
188
+ const placeholders = conversationIds.map(() => "?").join(",");
189
+ return this.db
190
+ .prepare(`SELECT * FROM validations WHERE conversation_id IN (${placeholders})`)
191
+ .all(...conversationIds);
192
+ }
193
+ getMessageEmbeddings(messageIds) {
194
+ if (messageIds.length === 0) {
195
+ return [];
196
+ }
197
+ const placeholders = messageIds.map(() => "?").join(",");
198
+ // Note: BLOB data will be base64 encoded in JSON
199
+ return this.db
200
+ .prepare(`SELECT id, message_id, model_name, dimensions, created_at FROM message_embeddings WHERE message_id IN (${placeholders})`)
201
+ .all(...messageIds);
202
+ }
203
+ getDecisionEmbeddings(decisionIds) {
204
+ if (decisionIds.length === 0) {
205
+ return [];
206
+ }
207
+ const placeholders = decisionIds.map(() => "?").join(",");
208
+ return this.db
209
+ .prepare(`SELECT id, decision_id, model_name, dimensions, created_at FROM decision_embeddings WHERE decision_id IN (${placeholders})`)
210
+ .all(...decisionIds);
211
+ }
212
+ }
213
+ //# sourceMappingURL=BackupManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BackupManager.js","sourceRoot":"","sources":["../../src/storage/BackupManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAsBnE;;GAEG;AACH,MAAM,OAAO,aAAa;IAChB,EAAE,CAAoB;IAE9B,YAAY,EAAqB;QAC/B,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACf,CAAC;IAED;;OAEG;IACH,4BAA4B,CAC1B,eAAyB,EACzB,WAAmB,EACnB,WAAmB;QAEnB,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,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AC;YAC7B,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,EAAE;aACX,OAAO,CAAC,6GAA6G,YAAY,GAAG,CAAC;aACrI,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC;IACzB,CAAC;CACF"}
@@ -1,6 +1,20 @@
1
1
  /**
2
- * Conversation Storage Layer
3
- * CRUD operations for all conversation-related data
2
+ * Conversation Storage Layer - CRUD operations for all conversation-related data.
3
+ *
4
+ * This class provides the data access layer for the conversation-memory system.
5
+ * It handles storing and retrieving conversations, messages, tool uses, decisions,
6
+ * mistakes, requirements, and git commits.
7
+ *
8
+ * All store operations use transactions for atomicity and performance.
9
+ * All JSON fields are automatically serialized/deserialized.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const storage = new ConversationStorage(sqliteManager);
14
+ * await storage.storeConversations(conversations);
15
+ * const conv = storage.getConversation('conv-123');
16
+ * const timeline = storage.getFileTimeline('src/index.ts');
17
+ * ```
4
18
  */
5
19
  import type { SQLiteManager } from "./SQLiteManager.js";
6
20
  import type { Conversation, Message, ToolUse, ToolResult, FileEdit, ThinkingBlock } from "../parsers/ConversationParser.js";
@@ -8,30 +22,285 @@ import type { Decision } from "../parsers/DecisionExtractor.js";
8
22
  import type { Mistake } from "../parsers/MistakeExtractor.js";
9
23
  import type { GitCommit } from "../parsers/GitIntegrator.js";
10
24
  import type { Requirement, Validation } from "../parsers/RequirementsExtractor.js";
25
+ import { type QueryCacheConfig, type CacheStats } from "../cache/QueryCache.js";
26
+ /**
27
+ * Data access layer for conversation memory storage.
28
+ *
29
+ * Provides CRUD operations for all conversation-related entities using SQLite.
30
+ * Supports optional caching for frequently accessed queries.
31
+ */
11
32
  export declare class ConversationStorage {
12
33
  private db;
34
+ private cache;
35
+ /**
36
+ * Create a new ConversationStorage instance.
37
+ *
38
+ * @param db - SQLiteManager instance for database access
39
+ */
13
40
  constructor(db: SQLiteManager);
41
+ /**
42
+ * Enable query result caching.
43
+ *
44
+ * Caching improves performance for frequently accessed queries by storing
45
+ * results in memory. Cache is automatically invalidated when data changes.
46
+ *
47
+ * @param config - Cache configuration (maxSize and ttlMs)
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * storage.enableCache({ maxSize: 100, ttlMs: 300000 });
52
+ * ```
53
+ */
54
+ enableCache(config: QueryCacheConfig): void;
55
+ /**
56
+ * Disable query result caching.
57
+ *
58
+ * Clears all cached data and stops caching new queries.
59
+ */
60
+ disableCache(): void;
61
+ /**
62
+ * Check if caching is enabled.
63
+ *
64
+ * @returns True if caching is enabled
65
+ */
66
+ isCacheEnabled(): boolean;
67
+ /**
68
+ * Clear all cached query results.
69
+ *
70
+ * Clears the cache but keeps caching enabled.
71
+ */
72
+ clearCache(): void;
73
+ /**
74
+ * Get cache statistics.
75
+ *
76
+ * Returns performance metrics including hits, misses, hit rate, and evictions.
77
+ *
78
+ * @returns Cache statistics or null if caching is disabled
79
+ *
80
+ * @example
81
+ * ```typescript
82
+ * const stats = storage.getCacheStats();
83
+ * if (stats) {
84
+ * console.log(`Hit rate: ${(stats.hitRate * 100).toFixed(1)}%`);
85
+ * }
86
+ * ```
87
+ */
88
+ getCacheStats(): CacheStats | null;
89
+ /**
90
+ * Store conversations in the database.
91
+ *
92
+ * Uses INSERT OR REPLACE to handle both new and updated conversations.
93
+ * All operations are performed in a single transaction for atomicity.
94
+ *
95
+ * @param conversations - Array of conversation objects to store
96
+ * @returns Promise that resolves when all conversations are stored
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * await storage.storeConversations([
101
+ * {
102
+ * id: 'conv-123',
103
+ * project_path: '/path/to/project',
104
+ * first_message_at: Date.now(),
105
+ * last_message_at: Date.now(),
106
+ * message_count: 42,
107
+ * git_branch: 'main',
108
+ * claude_version: '3.5',
109
+ * metadata: {},
110
+ * created_at: Date.now(),
111
+ * updated_at: Date.now()
112
+ * }
113
+ * ]);
114
+ * ```
115
+ */
14
116
  storeConversations(conversations: Conversation[]): Promise<void>;
117
+ /**
118
+ * Retrieve a single conversation by ID.
119
+ *
120
+ * @param id - Conversation ID to retrieve
121
+ * @returns Conversation object if found, null otherwise
122
+ *
123
+ * @example
124
+ * ```typescript
125
+ * const conv = storage.getConversation('conv-123');
126
+ * if (conv) {
127
+ * console.log(`${conv.message_count} messages on ${conv.git_branch}`);
128
+ * }
129
+ * ```
130
+ */
15
131
  getConversation(id: string): Conversation | null;
132
+ /**
133
+ * Store messages in the database.
134
+ *
135
+ * Stores all messages from conversations including content, metadata, and relationships.
136
+ * Uses INSERT OR REPLACE for idempotent storage.
137
+ *
138
+ * @param messages - Array of message objects to store
139
+ * @returns Promise that resolves when all messages are stored
140
+ *
141
+ * @example
142
+ * ```typescript
143
+ * await storage.storeMessages([
144
+ * {
145
+ * id: 'msg-123',
146
+ * conversation_id: 'conv-123',
147
+ * message_type: 'text',
148
+ * role: 'user',
149
+ * content: 'Hello',
150
+ * timestamp: Date.now(),
151
+ * is_sidechain: false,
152
+ * metadata: {}
153
+ * }
154
+ * ]);
155
+ * ```
156
+ */
16
157
  storeMessages(messages: Message[]): Promise<void>;
158
+ /**
159
+ * Store tool use records in the database.
160
+ *
161
+ * Records all tool invocations from assistant messages.
162
+ *
163
+ * @param toolUses - Array of tool use objects
164
+ * @returns Promise that resolves when stored
165
+ */
17
166
  storeToolUses(toolUses: ToolUse[]): Promise<void>;
167
+ /**
168
+ * Store tool execution results in the database.
169
+ *
170
+ * Records the output/results from tool invocations.
171
+ *
172
+ * @param toolResults - Array of tool result objects
173
+ * @returns Promise that resolves when stored
174
+ */
18
175
  storeToolResults(toolResults: ToolResult[]): Promise<void>;
176
+ /**
177
+ * Store file edit records in the database.
178
+ *
179
+ * Records all file modifications made during conversations.
180
+ *
181
+ * @param fileEdits - Array of file edit objects
182
+ * @returns Promise that resolves when stored
183
+ */
19
184
  storeFileEdits(fileEdits: FileEdit[]): Promise<void>;
185
+ /**
186
+ * Retrieve all edits for a specific file.
187
+ *
188
+ * @param filePath - Path to the file
189
+ * @returns Array of file edits, ordered by timestamp (most recent first)
190
+ */
20
191
  getFileEdits(filePath: string): FileEdit[];
192
+ /**
193
+ * Store thinking blocks in the database.
194
+ *
195
+ * Thinking blocks contain Claude's internal reasoning. They can be large and
196
+ * are optionally indexed based on the includeThinking flag.
197
+ *
198
+ * @param blocks - Array of thinking block objects
199
+ * @returns Promise that resolves when stored
200
+ */
21
201
  storeThinkingBlocks(blocks: ThinkingBlock[]): Promise<void>;
202
+ /**
203
+ * Store extracted decisions in the database.
204
+ *
205
+ * Decisions include architectural choices, technical decisions, and their rationale.
206
+ *
207
+ * @param decisions - Array of decision objects
208
+ * @returns Promise that resolves when stored
209
+ */
22
210
  storeDecisions(decisions: Decision[]): Promise<void>;
211
+ /**
212
+ * Retrieve all decisions related to a specific file.
213
+ *
214
+ * @param filePath - Path to the file
215
+ * @returns Array of decisions that reference this file
216
+ * @internal
217
+ */
23
218
  getDecisionsForFile(filePath: string): Decision[];
219
+ /**
220
+ * Store git commit records linked to conversations.
221
+ *
222
+ * Links git commits to the conversations where they were made or discussed.
223
+ *
224
+ * @param commits - Array of git commit objects
225
+ * @returns Promise that resolves when stored
226
+ */
24
227
  storeGitCommits(commits: GitCommit[]): Promise<void>;
25
228
  getCommitsForFile(filePath: string): GitCommit[];
229
+ /**
230
+ * Store extracted mistakes in the database.
231
+ *
232
+ * Mistakes include errors, bugs, and wrong approaches that were later corrected.
233
+ *
234
+ * @param mistakes - Array of mistake objects
235
+ * @returns Promise that resolves when stored
236
+ */
26
237
  storeMistakes(mistakes: Mistake[]): Promise<void>;
238
+ /**
239
+ * Store extracted requirements in the database.
240
+ *
241
+ * Requirements include dependencies, constraints, and specifications for components.
242
+ *
243
+ * @param requirements - Array of requirement objects
244
+ * @returns Promise that resolves when stored
245
+ */
27
246
  storeRequirements(requirements: Requirement[]): Promise<void>;
247
+ /**
248
+ * Store validation records in the database.
249
+ *
250
+ * Validations capture test results and performance data from conversations.
251
+ *
252
+ * @param validations - Array of validation objects
253
+ * @returns Promise that resolves when stored
254
+ */
28
255
  storeValidations(validations: Validation[]): Promise<void>;
256
+ /**
257
+ * Get the complete timeline of changes to a file.
258
+ *
259
+ * Combines file edits, git commits, and related decisions into a single timeline.
260
+ * This is a key method used by tools like checkBeforeModify and getFileEvolution.
261
+ *
262
+ * @param filePath - Path to the file
263
+ * @returns Object containing:
264
+ * - `file_path`: The file path queried
265
+ * - `edits`: All file edit records
266
+ * - `commits`: All git commits affecting this file
267
+ * - `decisions`: All decisions related to this file
268
+ *
269
+ * @example
270
+ * ```typescript
271
+ * const timeline = storage.getFileTimeline('src/index.ts');
272
+ * console.log(`${timeline.edits.length} edits`);
273
+ * console.log(`${timeline.commits.length} commits`);
274
+ * console.log(`${timeline.decisions.length} decisions`);
275
+ * ```
276
+ */
29
277
  getFileTimeline(filePath: string): {
30
278
  file_path: string;
31
279
  edits: FileEdit[];
32
280
  commits: GitCommit[];
33
281
  decisions: Decision[];
34
282
  };
283
+ /**
284
+ * Get statistics about the indexed conversation data.
285
+ *
286
+ * Returns counts of all major entity types stored in the database.
287
+ * Used for displaying indexing results and system health checks.
288
+ *
289
+ * @returns Object containing counts for:
290
+ * - `conversations`: Total conversations indexed
291
+ * - `messages`: Total messages stored
292
+ * - `decisions`: Total decisions extracted
293
+ * - `mistakes`: Total mistakes documented
294
+ * - `git_commits`: Total git commits linked
295
+ *
296
+ * @example
297
+ * ```typescript
298
+ * const stats = storage.getStats();
299
+ * console.log(`Indexed ${stats.conversations.count} conversations`);
300
+ * console.log(`Extracted ${stats.decisions.count} decisions`);
301
+ * console.log(`Linked ${stats.git_commits.count} commits`);
302
+ * ```
303
+ */
35
304
  getStats(): {
36
305
  conversations: {
37
306
  count: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationStorage.d.ts","sourceRoot":"","sources":["../../src/storage/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