claude-conversation-memory-mcp 0.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 (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +223 -0
  3. package/dist/ConversationMemory.d.ts +80 -0
  4. package/dist/ConversationMemory.d.ts.map +1 -0
  5. package/dist/ConversationMemory.js +203 -0
  6. package/dist/ConversationMemory.js.map +1 -0
  7. package/dist/documentation/CodeAnalyzer.d.ts +29 -0
  8. package/dist/documentation/CodeAnalyzer.d.ts.map +1 -0
  9. package/dist/documentation/CodeAnalyzer.js +122 -0
  10. package/dist/documentation/CodeAnalyzer.js.map +1 -0
  11. package/dist/documentation/ConversationAnalyzer.d.ts +19 -0
  12. package/dist/documentation/ConversationAnalyzer.d.ts.map +1 -0
  13. package/dist/documentation/ConversationAnalyzer.js +156 -0
  14. package/dist/documentation/ConversationAnalyzer.js.map +1 -0
  15. package/dist/documentation/CrossReferencer.d.ts +67 -0
  16. package/dist/documentation/CrossReferencer.d.ts.map +1 -0
  17. package/dist/documentation/CrossReferencer.js +247 -0
  18. package/dist/documentation/CrossReferencer.js.map +1 -0
  19. package/dist/documentation/DocumentationGenerator.d.ts +22 -0
  20. package/dist/documentation/DocumentationGenerator.d.ts.map +1 -0
  21. package/dist/documentation/DocumentationGenerator.js +57 -0
  22. package/dist/documentation/DocumentationGenerator.js.map +1 -0
  23. package/dist/documentation/MarkdownFormatter.d.ts +26 -0
  24. package/dist/documentation/MarkdownFormatter.d.ts.map +1 -0
  25. package/dist/documentation/MarkdownFormatter.js +301 -0
  26. package/dist/documentation/MarkdownFormatter.js.map +1 -0
  27. package/dist/documentation/types.d.ts +176 -0
  28. package/dist/documentation/types.d.ts.map +1 -0
  29. package/dist/documentation/types.js +5 -0
  30. package/dist/documentation/types.js.map +1 -0
  31. package/dist/embeddings/EmbeddingConfig.d.ts +39 -0
  32. package/dist/embeddings/EmbeddingConfig.d.ts.map +1 -0
  33. package/dist/embeddings/EmbeddingConfig.js +132 -0
  34. package/dist/embeddings/EmbeddingConfig.js.map +1 -0
  35. package/dist/embeddings/EmbeddingGenerator.d.ts +45 -0
  36. package/dist/embeddings/EmbeddingGenerator.d.ts.map +1 -0
  37. package/dist/embeddings/EmbeddingGenerator.js +129 -0
  38. package/dist/embeddings/EmbeddingGenerator.js.map +1 -0
  39. package/dist/embeddings/EmbeddingProvider.d.ts +34 -0
  40. package/dist/embeddings/EmbeddingProvider.d.ts.map +1 -0
  41. package/dist/embeddings/EmbeddingProvider.js +6 -0
  42. package/dist/embeddings/EmbeddingProvider.js.map +1 -0
  43. package/dist/embeddings/VectorStore.d.ts +75 -0
  44. package/dist/embeddings/VectorStore.d.ts.map +1 -0
  45. package/dist/embeddings/VectorStore.js +220 -0
  46. package/dist/embeddings/VectorStore.js.map +1 -0
  47. package/dist/embeddings/providers/OllamaEmbeddings.d.ts +38 -0
  48. package/dist/embeddings/providers/OllamaEmbeddings.d.ts.map +1 -0
  49. package/dist/embeddings/providers/OllamaEmbeddings.js +132 -0
  50. package/dist/embeddings/providers/OllamaEmbeddings.js.map +1 -0
  51. package/dist/embeddings/providers/OpenAIEmbeddings.d.ts +40 -0
  52. package/dist/embeddings/providers/OpenAIEmbeddings.d.ts.map +1 -0
  53. package/dist/embeddings/providers/OpenAIEmbeddings.js +128 -0
  54. package/dist/embeddings/providers/OpenAIEmbeddings.js.map +1 -0
  55. package/dist/embeddings/providers/TransformersEmbeddings.d.ts +38 -0
  56. package/dist/embeddings/providers/TransformersEmbeddings.d.ts.map +1 -0
  57. package/dist/embeddings/providers/TransformersEmbeddings.js +114 -0
  58. package/dist/embeddings/providers/TransformersEmbeddings.js.map +1 -0
  59. package/dist/index.d.ts +7 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +127 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/parsers/ConversationParser.d.ts +138 -0
  64. package/dist/parsers/ConversationParser.d.ts.map +1 -0
  65. package/dist/parsers/ConversationParser.js +325 -0
  66. package/dist/parsers/ConversationParser.js.map +1 -0
  67. package/dist/parsers/DecisionExtractor.d.ts +76 -0
  68. package/dist/parsers/DecisionExtractor.d.ts.map +1 -0
  69. package/dist/parsers/DecisionExtractor.js +305 -0
  70. package/dist/parsers/DecisionExtractor.js.map +1 -0
  71. package/dist/parsers/GitIntegrator.d.ts +71 -0
  72. package/dist/parsers/GitIntegrator.d.ts.map +1 -0
  73. package/dist/parsers/GitIntegrator.js +283 -0
  74. package/dist/parsers/GitIntegrator.js.map +1 -0
  75. package/dist/parsers/MistakeExtractor.d.ts +86 -0
  76. package/dist/parsers/MistakeExtractor.d.ts.map +1 -0
  77. package/dist/parsers/MistakeExtractor.js +341 -0
  78. package/dist/parsers/MistakeExtractor.js.map +1 -0
  79. package/dist/parsers/RequirementsExtractor.d.ts +70 -0
  80. package/dist/parsers/RequirementsExtractor.d.ts.map +1 -0
  81. package/dist/parsers/RequirementsExtractor.js +252 -0
  82. package/dist/parsers/RequirementsExtractor.js.map +1 -0
  83. package/dist/search/SemanticSearch.d.ts +90 -0
  84. package/dist/search/SemanticSearch.d.ts.map +1 -0
  85. package/dist/search/SemanticSearch.js +352 -0
  86. package/dist/search/SemanticSearch.js.map +1 -0
  87. package/dist/storage/ConversationStorage.d.ts +53 -0
  88. package/dist/storage/ConversationStorage.d.ts.map +1 -0
  89. package/dist/storage/ConversationStorage.js +249 -0
  90. package/dist/storage/ConversationStorage.js.map +1 -0
  91. package/dist/storage/SQLiteManager.d.ts +88 -0
  92. package/dist/storage/SQLiteManager.d.ts.map +1 -0
  93. package/dist/storage/SQLiteManager.js +281 -0
  94. package/dist/storage/SQLiteManager.js.map +1 -0
  95. package/dist/storage/migrations.d.ts +54 -0
  96. package/dist/storage/migrations.d.ts.map +1 -0
  97. package/dist/storage/migrations.js +153 -0
  98. package/dist/storage/migrations.js.map +1 -0
  99. package/dist/storage/schema.sql +321 -0
  100. package/dist/tools/ToolDefinitions.d.ts +265 -0
  101. package/dist/tools/ToolDefinitions.d.ts.map +1 -0
  102. package/dist/tools/ToolDefinitions.js +261 -0
  103. package/dist/tools/ToolDefinitions.js.map +1 -0
  104. package/dist/tools/ToolHandlers.d.ts +56 -0
  105. package/dist/tools/ToolHandlers.d.ts.map +1 -0
  106. package/dist/tools/ToolHandlers.js +431 -0
  107. package/dist/tools/ToolHandlers.js.map +1 -0
  108. package/dist/types/ToolTypes.d.ts +333 -0
  109. package/dist/types/ToolTypes.d.ts.map +1 -0
  110. package/dist/types/ToolTypes.js +6 -0
  111. package/dist/types/ToolTypes.js.map +1 -0
  112. package/dist/utils/sanitization.d.ts +35 -0
  113. package/dist/utils/sanitization.d.ts.map +1 -0
  114. package/dist/utils/sanitization.js +97 -0
  115. package/dist/utils/sanitization.js.map +1 -0
  116. package/package.json +87 -0
@@ -0,0 +1,265 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ */
4
+ export declare const TOOLS: {
5
+ index_conversations: {
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: string;
10
+ properties: {
11
+ project_path: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ session_id: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ include_thinking: {
20
+ type: string;
21
+ description: string;
22
+ default: boolean;
23
+ };
24
+ enable_git: {
25
+ type: string;
26
+ description: string;
27
+ default: boolean;
28
+ };
29
+ exclude_mcp_conversations: {
30
+ type: string[];
31
+ description: string;
32
+ default: string;
33
+ };
34
+ exclude_mcp_servers: {
35
+ type: string;
36
+ description: string;
37
+ items: {
38
+ type: string;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ };
44
+ search_conversations: {
45
+ name: string;
46
+ description: string;
47
+ inputSchema: {
48
+ type: string;
49
+ properties: {
50
+ query: {
51
+ type: string;
52
+ description: string;
53
+ };
54
+ limit: {
55
+ type: string;
56
+ description: string;
57
+ default: number;
58
+ };
59
+ date_range: {
60
+ type: string;
61
+ description: string;
62
+ items: {
63
+ type: string;
64
+ };
65
+ };
66
+ };
67
+ required: string[];
68
+ };
69
+ };
70
+ get_decisions: {
71
+ name: string;
72
+ description: string;
73
+ inputSchema: {
74
+ type: string;
75
+ properties: {
76
+ query: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ file_path: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ limit: {
85
+ type: string;
86
+ description: string;
87
+ default: number;
88
+ };
89
+ };
90
+ required: string[];
91
+ };
92
+ };
93
+ check_before_modify: {
94
+ name: string;
95
+ description: string;
96
+ inputSchema: {
97
+ type: string;
98
+ properties: {
99
+ file_path: {
100
+ type: string;
101
+ description: string;
102
+ };
103
+ };
104
+ required: string[];
105
+ };
106
+ };
107
+ get_file_evolution: {
108
+ name: string;
109
+ description: string;
110
+ inputSchema: {
111
+ type: string;
112
+ properties: {
113
+ file_path: {
114
+ type: string;
115
+ description: string;
116
+ };
117
+ include_decisions: {
118
+ type: string;
119
+ description: string;
120
+ default: boolean;
121
+ };
122
+ include_commits: {
123
+ type: string;
124
+ description: string;
125
+ default: boolean;
126
+ };
127
+ };
128
+ required: string[];
129
+ };
130
+ };
131
+ link_commits_to_conversations: {
132
+ name: string;
133
+ description: string;
134
+ inputSchema: {
135
+ type: string;
136
+ properties: {
137
+ query: {
138
+ type: string;
139
+ description: string;
140
+ };
141
+ conversation_id: {
142
+ type: string;
143
+ description: string;
144
+ };
145
+ limit: {
146
+ type: string;
147
+ description: string;
148
+ default: number;
149
+ };
150
+ };
151
+ };
152
+ };
153
+ search_mistakes: {
154
+ name: string;
155
+ description: string;
156
+ inputSchema: {
157
+ type: string;
158
+ properties: {
159
+ query: {
160
+ type: string;
161
+ description: string;
162
+ };
163
+ mistake_type: {
164
+ type: string;
165
+ description: string;
166
+ enum: string[];
167
+ };
168
+ limit: {
169
+ type: string;
170
+ description: string;
171
+ default: number;
172
+ };
173
+ };
174
+ required: string[];
175
+ };
176
+ };
177
+ get_requirements: {
178
+ name: string;
179
+ description: string;
180
+ inputSchema: {
181
+ type: string;
182
+ properties: {
183
+ component: {
184
+ type: string;
185
+ description: string;
186
+ };
187
+ type: {
188
+ type: string;
189
+ description: string;
190
+ enum: string[];
191
+ };
192
+ };
193
+ required: string[];
194
+ };
195
+ };
196
+ get_tool_history: {
197
+ name: string;
198
+ description: string;
199
+ inputSchema: {
200
+ type: string;
201
+ properties: {
202
+ tool_name: {
203
+ type: string;
204
+ description: string;
205
+ };
206
+ file_path: {
207
+ type: string;
208
+ description: string;
209
+ };
210
+ limit: {
211
+ type: string;
212
+ description: string;
213
+ default: number;
214
+ };
215
+ };
216
+ };
217
+ };
218
+ find_similar_sessions: {
219
+ name: string;
220
+ description: string;
221
+ inputSchema: {
222
+ type: string;
223
+ properties: {
224
+ query: {
225
+ type: string;
226
+ description: string;
227
+ };
228
+ limit: {
229
+ type: string;
230
+ description: string;
231
+ default: number;
232
+ };
233
+ };
234
+ required: string[];
235
+ };
236
+ };
237
+ generate_documentation: {
238
+ name: string;
239
+ description: string;
240
+ inputSchema: {
241
+ type: string;
242
+ properties: {
243
+ project_path: {
244
+ type: string;
245
+ description: string;
246
+ };
247
+ session_id: {
248
+ type: string;
249
+ description: string;
250
+ };
251
+ scope: {
252
+ type: string;
253
+ enum: string[];
254
+ description: string;
255
+ default: string;
256
+ };
257
+ module_filter: {
258
+ type: string;
259
+ description: string;
260
+ };
261
+ };
262
+ };
263
+ };
264
+ };
265
+ //# sourceMappingURL=ToolDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolDefinitions.d.ts","sourceRoot":"","sources":["../../src/tools/ToolDefinitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0QjB,CAAC"}
@@ -0,0 +1,261 @@
1
+ /**
2
+ * MCP Tool Definitions
3
+ */
4
+ export const TOOLS = {
5
+ index_conversations: {
6
+ name: "index_conversations",
7
+ description: "Index conversation history for the current project. This parses conversation files, extracts decisions, mistakes, and links to git commits. Can index all sessions or a specific session.",
8
+ inputSchema: {
9
+ type: "object",
10
+ properties: {
11
+ project_path: {
12
+ type: "string",
13
+ description: "Path to the project (defaults to current working directory)",
14
+ },
15
+ session_id: {
16
+ type: "string",
17
+ description: "Optional: specific session ID to index (e.g., 'a1172af3-ca62-41be-9b90-701cef39daae'). If not provided, indexes all sessions in the project.",
18
+ },
19
+ include_thinking: {
20
+ type: "boolean",
21
+ description: "Include thinking blocks in indexing (default: false, can be large)",
22
+ default: false,
23
+ },
24
+ enable_git: {
25
+ type: "boolean",
26
+ description: "Enable git integration to link commits to conversations (default: true)",
27
+ default: true,
28
+ },
29
+ exclude_mcp_conversations: {
30
+ type: ["boolean", "string"],
31
+ description: "Exclude MCP tool conversations from indexing. Options: 'self-only' (exclude only conversation-memory MCP to prevent self-referential loops, DEFAULT), false (index all MCP conversations), 'all-mcp' or true (exclude all MCP tool conversations)",
32
+ default: "self-only",
33
+ },
34
+ exclude_mcp_servers: {
35
+ type: "array",
36
+ description: "List of specific MCP server names to exclude (e.g., ['conversation-memory', 'code-graph-rag']). More granular than exclude_mcp_conversations.",
37
+ items: { type: "string" },
38
+ },
39
+ },
40
+ },
41
+ },
42
+ search_conversations: {
43
+ name: "search_conversations",
44
+ description: "Search conversation history using natural language queries. Returns relevant messages with context.",
45
+ inputSchema: {
46
+ type: "object",
47
+ properties: {
48
+ query: {
49
+ type: "string",
50
+ description: "Natural language search query",
51
+ },
52
+ limit: {
53
+ type: "number",
54
+ description: "Maximum number of results (default: 10)",
55
+ default: 10,
56
+ },
57
+ date_range: {
58
+ type: "array",
59
+ description: "Optional date range filter [start_timestamp, end_timestamp]",
60
+ items: { type: "number" },
61
+ },
62
+ },
63
+ required: ["query"],
64
+ },
65
+ },
66
+ get_decisions: {
67
+ name: "get_decisions",
68
+ description: "Find decisions made about a specific topic, file, or component. Shows rationale, alternatives considered, and rejected approaches.",
69
+ inputSchema: {
70
+ type: "object",
71
+ properties: {
72
+ query: {
73
+ type: "string",
74
+ description: "Topic or keyword to search for (e.g., 'authentication', 'database')",
75
+ },
76
+ file_path: {
77
+ type: "string",
78
+ description: "Optional: filter decisions related to a specific file",
79
+ },
80
+ limit: {
81
+ type: "number",
82
+ description: "Maximum number of decisions to return (default: 10)",
83
+ default: 10,
84
+ },
85
+ },
86
+ required: ["query"],
87
+ },
88
+ },
89
+ check_before_modify: {
90
+ name: "check_before_modify",
91
+ description: "Check important context before modifying a file. Shows recent changes, related decisions, commits, and past mistakes to avoid.",
92
+ inputSchema: {
93
+ type: "object",
94
+ properties: {
95
+ file_path: {
96
+ type: "string",
97
+ description: "Path to the file you want to modify",
98
+ },
99
+ },
100
+ required: ["file_path"],
101
+ },
102
+ },
103
+ get_file_evolution: {
104
+ name: "get_file_evolution",
105
+ description: "Show complete timeline of changes to a file across conversations and commits.",
106
+ inputSchema: {
107
+ type: "object",
108
+ properties: {
109
+ file_path: {
110
+ type: "string",
111
+ description: "Path to the file",
112
+ },
113
+ include_decisions: {
114
+ type: "boolean",
115
+ description: "Include related decisions (default: true)",
116
+ default: true,
117
+ },
118
+ include_commits: {
119
+ type: "boolean",
120
+ description: "Include git commits (default: true)",
121
+ default: true,
122
+ },
123
+ },
124
+ required: ["file_path"],
125
+ },
126
+ },
127
+ link_commits_to_conversations: {
128
+ name: "link_commits_to_conversations",
129
+ description: "Link git commits to the conversation sessions where they were made or discussed. Creates associations between code changes and their conversation context, enabling you to see WHY changes were made.",
130
+ inputSchema: {
131
+ type: "object",
132
+ properties: {
133
+ query: {
134
+ type: "string",
135
+ description: "Search query for commits",
136
+ },
137
+ conversation_id: {
138
+ type: "string",
139
+ description: "Optional: filter by specific conversation ID",
140
+ },
141
+ limit: {
142
+ type: "number",
143
+ description: "Maximum number of commits (default: 20)",
144
+ default: 20,
145
+ },
146
+ },
147
+ },
148
+ },
149
+ search_mistakes: {
150
+ name: "search_mistakes",
151
+ description: "Find past mistakes to avoid repeating them. Shows what went wrong and how it was corrected.",
152
+ inputSchema: {
153
+ type: "object",
154
+ properties: {
155
+ query: {
156
+ type: "string",
157
+ description: "Search query for mistakes",
158
+ },
159
+ mistake_type: {
160
+ type: "string",
161
+ description: "Optional: filter by type (logic_error, wrong_approach, misunderstanding, tool_error, syntax_error)",
162
+ enum: ["logic_error", "wrong_approach", "misunderstanding", "tool_error", "syntax_error"],
163
+ },
164
+ limit: {
165
+ type: "number",
166
+ description: "Maximum number of results (default: 10)",
167
+ default: 10,
168
+ },
169
+ },
170
+ required: ["query"],
171
+ },
172
+ },
173
+ get_requirements: {
174
+ name: "get_requirements",
175
+ description: "Look up requirements and constraints for a component or feature.",
176
+ inputSchema: {
177
+ type: "object",
178
+ properties: {
179
+ component: {
180
+ type: "string",
181
+ description: "Component or feature name",
182
+ },
183
+ type: {
184
+ type: "string",
185
+ description: "Optional: filter by requirement type",
186
+ enum: ["dependency", "performance", "compatibility", "business"],
187
+ },
188
+ },
189
+ required: ["component"],
190
+ },
191
+ },
192
+ get_tool_history: {
193
+ name: "get_tool_history",
194
+ description: "Query history of tool uses (bash commands, file edits, reads, etc.).",
195
+ inputSchema: {
196
+ type: "object",
197
+ properties: {
198
+ tool_name: {
199
+ type: "string",
200
+ description: "Optional: filter by tool name (Bash, Edit, Write, Read)",
201
+ },
202
+ file_path: {
203
+ type: "string",
204
+ description: "Optional: filter by file path",
205
+ },
206
+ limit: {
207
+ type: "number",
208
+ description: "Maximum number of results (default: 20)",
209
+ default: 20,
210
+ },
211
+ },
212
+ },
213
+ },
214
+ find_similar_sessions: {
215
+ name: "find_similar_sessions",
216
+ description: "Find conversations that dealt with similar topics or problems.",
217
+ inputSchema: {
218
+ type: "object",
219
+ properties: {
220
+ query: {
221
+ type: "string",
222
+ description: "Description of the topic or problem",
223
+ },
224
+ limit: {
225
+ type: "number",
226
+ description: "Maximum number of sessions (default: 5)",
227
+ default: 5,
228
+ },
229
+ },
230
+ required: ["query"],
231
+ },
232
+ },
233
+ generate_documentation: {
234
+ name: "generate_documentation",
235
+ description: "Generate comprehensive project documentation by combining codebase analysis (CODE-GRAPH-RAG-MCP) with conversation history. Shows WHAT exists in code and WHY it was built that way.",
236
+ inputSchema: {
237
+ type: "object",
238
+ properties: {
239
+ project_path: {
240
+ type: "string",
241
+ description: "Path to the project (defaults to current working directory)",
242
+ },
243
+ session_id: {
244
+ type: "string",
245
+ description: "Optional: specific session ID to include. If not provided, includes all sessions.",
246
+ },
247
+ scope: {
248
+ type: "string",
249
+ enum: ["full", "architecture", "decisions", "quality"],
250
+ description: "Documentation scope: full (everything), architecture (modules), decisions (decision log), quality (code quality insights)",
251
+ default: "full",
252
+ },
253
+ module_filter: {
254
+ type: "string",
255
+ description: "Optional: filter to specific module path (e.g., 'src/auth')",
256
+ },
257
+ },
258
+ },
259
+ },
260
+ };
261
+ //# sourceMappingURL=ToolDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolDefinitions.js","sourceRoot":"","sources":["../../src/tools/ToolDefinitions.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,mBAAmB,EAAE;QACnB,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,2LAA2L;QACxM,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8IAA8I;iBAC5J;gBACD,gBAAgB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E;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+BAA+B;iBAC7C;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yCAAyC;oBACtD,OAAO,EAAE,EAAE;iBACZ;aACF;SACF;KACF;IAED,qBAAqB,EAAE;QACrB,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,gEAAgE;QAC7E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qCAAqC;iBACnD;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yCAAyC;oBACtD,OAAO,EAAE,CAAC;iBACX;aACF;YACD,QAAQ,EAAE,CAAC,OAAO,CAAC;SACpB;KACF;IAED,sBAAsB,EAAE;QACtB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,sLAAsL;QACnM,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mFAAmF;iBACjG;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,CAAC;oBACtD,WAAW,EAAE,2HAA2H;oBACxI,OAAO,EAAE,MAAM;iBAChB;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6DAA6D;iBAC3E;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * MCP Tool Handlers - Implementation of all 11 tools
3
+ */
4
+ import { ConversationMemory } from "../ConversationMemory.js";
5
+ import type { SQLiteManager } from "../storage/SQLiteManager.js";
6
+ import type * as Types from "../types/ToolTypes.js";
7
+ export declare class ToolHandlers {
8
+ private memory;
9
+ private db;
10
+ constructor(memory: ConversationMemory, db: SQLiteManager);
11
+ /**
12
+ * Tool 1: index_conversations
13
+ */
14
+ indexConversations(args: Record<string, unknown>): Promise<Types.IndexConversationsResponse>;
15
+ /**
16
+ * Tool 2: search_conversations
17
+ */
18
+ searchConversations(args: Record<string, unknown>): Promise<Types.SearchConversationsResponse>;
19
+ /**
20
+ * Tool 3: get_decisions
21
+ */
22
+ getDecisions(args: Record<string, unknown>): Promise<Types.GetDecisionsResponse>;
23
+ /**
24
+ * Tool 4: check_before_modify
25
+ */
26
+ checkBeforeModify(args: Record<string, unknown>): Promise<Types.CheckBeforeModifyResponse>;
27
+ /**
28
+ * Tool 5: get_file_evolution
29
+ */
30
+ getFileEvolution(args: Record<string, unknown>): Promise<Types.GetFileEvolutionResponse>;
31
+ /**
32
+ * Tool 6: link_commits_to_conversations
33
+ */
34
+ linkCommitsToConversations(args: Record<string, unknown>): Promise<Types.LinkCommitsToConversationsResponse>;
35
+ /**
36
+ * Tool 7: search_mistakes
37
+ */
38
+ searchMistakes(args: Record<string, unknown>): Promise<Types.SearchMistakesResponse>;
39
+ /**
40
+ * Tool 8: get_requirements
41
+ */
42
+ getRequirements(args: Record<string, unknown>): Promise<Types.GetRequirementsResponse>;
43
+ /**
44
+ * Tool 9: get_tool_history
45
+ */
46
+ getToolHistory(args: Record<string, unknown>): Promise<Types.GetToolHistoryResponse>;
47
+ /**
48
+ * Tool 10: find_similar_sessions
49
+ */
50
+ findSimilarSessions(args: Record<string, unknown>): Promise<Types.FindSimilarSessionsResponse>;
51
+ /**
52
+ * Tool 11: generate_documentation
53
+ */
54
+ generateDocumentation(args: Record<string, unknown>): Promise<Types.GenerateDocumentationResponse>;
55
+ }
56
+ //# sourceMappingURL=ToolHandlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToolHandlers.d.ts","s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