claude-mem 3.0.2 → 3.0.4
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.
- package/.mcp.json +11 -0
- package/claude-mem +0 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +64 -0
- package/dist/commands/compress.d.ts +2 -0
- package/dist/commands/compress.js +59 -0
- package/dist/commands/install.d.ts +2 -0
- package/dist/commands/install.js +372 -0
- package/dist/commands/load-context.d.ts +2 -0
- package/dist/commands/load-context.js +330 -0
- package/dist/commands/logs.d.ts +2 -0
- package/dist/commands/logs.js +41 -0
- package/dist/commands/migrate.d.ts +9 -0
- package/dist/commands/migrate.js +174 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +159 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.js +105 -0
- package/dist/config.d.ts +6 -0
- package/dist/config.js +33 -0
- package/dist/constants.d.ts +516 -0
- package/dist/constants.js +522 -0
- package/dist/error-handler.d.ts +17 -0
- package/dist/error-handler.js +103 -0
- package/dist/mcp-server-cli.d.ts +34 -0
- package/dist/mcp-server-cli.js +158 -0
- package/dist/mcp-server.d.ts +103 -0
- package/dist/mcp-server.js +269 -0
- package/dist/types.d.ts +148 -0
- package/dist/types.js +78 -0
- package/dist/utils/HookDetector.d.ts +64 -0
- package/dist/utils/HookDetector.js +213 -0
- package/dist/utils/PathResolver.d.ts +16 -0
- package/dist/utils/PathResolver.js +55 -0
- package/dist/utils/SettingsManager.d.ts +63 -0
- package/dist/utils/SettingsManager.js +133 -0
- package/dist/utils/TranscriptCompressor.d.ts +111 -0
- package/dist/utils/TranscriptCompressor.js +486 -0
- package/dist/utils/common.d.ts +29 -0
- package/dist/utils/common.js +14 -0
- package/dist/utils/error-utils.d.ts +93 -0
- package/dist/utils/error-utils.js +238 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/logger.d.ts +19 -0
- package/dist/utils/logger.js +42 -0
- package/dist/utils/mcp-client-factory.d.ts +51 -0
- package/dist/utils/mcp-client-factory.js +115 -0
- package/dist/utils/mcp-client.d.ts +75 -0
- package/dist/utils/mcp-client.js +120 -0
- package/dist/utils/memory-mcp-client.d.ts +135 -0
- package/dist/utils/memory-mcp-client.js +490 -0
- package/dist/utils/weaviate-mcp-adapter.d.ts +102 -0
- package/dist/utils/weaviate-mcp-adapter.js +587 -0
- package/package.json +3 -2
- package/src/claude-mem.js +0 -859
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Memory System - Constants and Templates
|
|
3
|
+
*
|
|
4
|
+
* This file consolidates all prompts, instructions, and output templates
|
|
5
|
+
* used throughout the claude-mem system for better maintainability,
|
|
6
|
+
* DRYness, and easier auditing of LLM logic.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Entity naming patterns for the knowledge graph
|
|
10
|
+
*/
|
|
11
|
+
export declare const ENTITY_NAMING_PATTERNS: {
|
|
12
|
+
readonly component: "Component_Name";
|
|
13
|
+
readonly decision: "Decision_Name";
|
|
14
|
+
readonly pattern: "Pattern_Name";
|
|
15
|
+
readonly tool: "Tool_Name";
|
|
16
|
+
readonly fix: "Fix_Name";
|
|
17
|
+
readonly workflow: "Workflow_Name";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Available entity types for classification
|
|
21
|
+
*/
|
|
22
|
+
export declare const ENTITY_TYPES: {
|
|
23
|
+
readonly component: "component";
|
|
24
|
+
readonly pattern: "pattern";
|
|
25
|
+
readonly workflow: "workflow";
|
|
26
|
+
readonly integration: "integration";
|
|
27
|
+
readonly concept: "concept";
|
|
28
|
+
readonly decision: "decision";
|
|
29
|
+
readonly tool: "tool";
|
|
30
|
+
readonly fix: "fix";
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Standard observation fields for entities
|
|
34
|
+
*/
|
|
35
|
+
export declare const OBSERVATION_FIELDS: readonly ["Core purpose: [what it fundamentally does]", "Brief description: [one-line summary for session-start display]", "Implementation: [key technical details, code patterns]", "Dependencies: [what it requires or builds upon]", "Usage context: [when/why it's used]", "Performance characteristics: [speed, reliability, constraints]", "Integration points: [how it connects to other systems]", "Keywords: [searchable terms for this concept]", "Decision rationale: [why this approach was chosen]", "Next steps: [what needs to be done next with this component]", "Files modified: [list of files changed]", "Tools used: [development tools/commands used]"];
|
|
36
|
+
/**
|
|
37
|
+
* Relationship types for creating meaningful entity connections
|
|
38
|
+
*/
|
|
39
|
+
export declare const RELATIONSHIP_TYPES: readonly ["executes_via", "orchestrates_through", "validates_using", "provides_auth_to", "manages_state_for", "processes_events_from", "caches_data_from", "routes_requests_to", "transforms_data_for", "extends", "enhances_performance_of", "builds_upon", "fixes_issue_in", "replaces", "optimizes", "uses_tool_chain", "triggers_tool", "receives_result_from"];
|
|
40
|
+
/**
|
|
41
|
+
* Creates the main analysis prompt for transcript compression
|
|
42
|
+
*/
|
|
43
|
+
export declare function createAnalysisPrompt(projectName: string, sessionId: string, hasCompressedContent: boolean, existingMemoriesText: string, toolUseChains: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
tools: string[];
|
|
46
|
+
}>): string;
|
|
47
|
+
/**
|
|
48
|
+
* System message templates for context priming
|
|
49
|
+
*/
|
|
50
|
+
export declare const CONTEXT_TEMPLATES: {
|
|
51
|
+
readonly PRIMARY_CONTEXT: (projectName: string) => string;
|
|
52
|
+
readonly RECENT_SESSIONS: (sessionList: string) => string;
|
|
53
|
+
readonly AVAILABLE_ENTITIES: (type: string, entities: string[], hasMore: boolean, moreCount: number) => string;
|
|
54
|
+
readonly SESSION_START_HEADER: "🧠 Active Working Context from Previous Sessions:";
|
|
55
|
+
readonly SESSION_START_SEPARATOR: string;
|
|
56
|
+
readonly RESUME_INSTRUCTIONS: "💡 TO RESUME: Load active components with open_nodes([\"<exact_names>\"])\n📊 TO EXPLORE: Search related work with search_nodes(\"<keywords>\")";
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Session start formatting templates
|
|
60
|
+
*/
|
|
61
|
+
export declare const SESSION_START_TEMPLATES: {
|
|
62
|
+
readonly FOCUS_LINE: (focus: string) => string;
|
|
63
|
+
readonly LAST_WORKED: (timeAgo: string, projectName: string) => string;
|
|
64
|
+
readonly SECTIONS: {
|
|
65
|
+
readonly COMPONENTS: "🎯 ACTIVE COMPONENTS (load these for context):";
|
|
66
|
+
readonly DECISIONS: "🔄 RECENT DECISIONS & PATTERNS:";
|
|
67
|
+
readonly TOOLS: "🛠️ TOOLS & INFRASTRUCTURE:";
|
|
68
|
+
readonly FIXES: "🐛 RECENT FIXES:";
|
|
69
|
+
readonly ACTIONS: "⚡ NEXT ACTIONS:";
|
|
70
|
+
};
|
|
71
|
+
readonly ACTION_PREFIX: "□ ";
|
|
72
|
+
readonly ENTITY_BULLET: "• ";
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Time formatting for "time ago" displays
|
|
76
|
+
*/
|
|
77
|
+
export declare const TIME_FORMATS: {
|
|
78
|
+
readonly JUST_NOW: "just now";
|
|
79
|
+
readonly HOURS_AGO: (hours: number) => string;
|
|
80
|
+
readonly DAYS_AGO: (days: number) => string;
|
|
81
|
+
readonly RECENTLY: "recently";
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Standard hook response structures for Claude Code integration
|
|
85
|
+
*/
|
|
86
|
+
export declare const HOOK_RESPONSES: {
|
|
87
|
+
readonly SUCCESS: (hookEventName: string, message: string) => {
|
|
88
|
+
hookSpecificOutput: {
|
|
89
|
+
hookEventName: string;
|
|
90
|
+
status: string;
|
|
91
|
+
message: string;
|
|
92
|
+
};
|
|
93
|
+
suppressOutput: boolean;
|
|
94
|
+
};
|
|
95
|
+
readonly SKIPPED: (hookEventName: string, message: string) => {
|
|
96
|
+
hookSpecificOutput: {
|
|
97
|
+
hookEventName: string;
|
|
98
|
+
status: string;
|
|
99
|
+
message: string;
|
|
100
|
+
};
|
|
101
|
+
suppressOutput: boolean;
|
|
102
|
+
};
|
|
103
|
+
readonly BLOCKED: (reason: string) => {
|
|
104
|
+
decision: string;
|
|
105
|
+
reason: string;
|
|
106
|
+
};
|
|
107
|
+
readonly CONTINUE: (hookEventName: string, additionalContext?: string) => {
|
|
108
|
+
hookSpecificOutput?: {
|
|
109
|
+
hookEventName: string;
|
|
110
|
+
additionalContext: string;
|
|
111
|
+
} | undefined;
|
|
112
|
+
continue: boolean;
|
|
113
|
+
};
|
|
114
|
+
readonly ERROR: (reason: string) => {
|
|
115
|
+
decision: string;
|
|
116
|
+
reason: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Pre-defined hook messages
|
|
121
|
+
*/
|
|
122
|
+
export declare const HOOK_MESSAGES: {
|
|
123
|
+
readonly COMPRESSION_SUCCESS: "Memory compression completed successfully";
|
|
124
|
+
readonly COMPRESSION_SKIPPED: "Compression skipped - Claude SDK not available in this context";
|
|
125
|
+
readonly COMPRESSION_FAILED: (stderr: string) => string;
|
|
126
|
+
readonly CONTEXT_LOADED: "Project context loaded successfully";
|
|
127
|
+
readonly CONTEXT_SKIPPED: "Continuing session - context loading skipped";
|
|
128
|
+
readonly NO_TRANSCRIPT: "No transcript path provided";
|
|
129
|
+
readonly HOOK_ERROR: (error: string) => string;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* MCP server configuration template
|
|
133
|
+
*/
|
|
134
|
+
export declare const MCP_CONFIG_TEMPLATE: {
|
|
135
|
+
readonly "claude-mem": {
|
|
136
|
+
readonly command: "npx";
|
|
137
|
+
readonly args: readonly ["-y", "@modelcontextprotocol/server-memory"];
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Hook configuration templates for Claude settings
|
|
142
|
+
*/
|
|
143
|
+
export declare const HOOK_CONFIG_TEMPLATES: {
|
|
144
|
+
readonly PRE_COMPACT: (scriptPath: string) => {
|
|
145
|
+
pattern: string;
|
|
146
|
+
hooks: {
|
|
147
|
+
type: string;
|
|
148
|
+
command: string;
|
|
149
|
+
timeout: number;
|
|
150
|
+
}[];
|
|
151
|
+
};
|
|
152
|
+
readonly SESSION_START: (scriptPath: string) => {
|
|
153
|
+
pattern: string;
|
|
154
|
+
hooks: {
|
|
155
|
+
type: string;
|
|
156
|
+
command: string;
|
|
157
|
+
timeout: number;
|
|
158
|
+
}[];
|
|
159
|
+
};
|
|
160
|
+
readonly SESSION_END: (scriptPath: string) => {
|
|
161
|
+
pattern: string;
|
|
162
|
+
hooks: {
|
|
163
|
+
type: string;
|
|
164
|
+
command: string;
|
|
165
|
+
timeout: number;
|
|
166
|
+
}[];
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Command-line interface messages
|
|
171
|
+
*/
|
|
172
|
+
export declare const CLI_MESSAGES: {
|
|
173
|
+
readonly INSTALLATION: {
|
|
174
|
+
readonly STARTING: "🚀 Installing Claude Memory System with embedded Weaviate...";
|
|
175
|
+
readonly SUCCESS: "🎉 Installation complete! Embedded vector database ready.";
|
|
176
|
+
readonly HOOKS_INSTALLED: "✅ Installed hooks to ~/.claude-mem/hooks/";
|
|
177
|
+
readonly MCP_CONFIGURED: (path: string) => string;
|
|
178
|
+
readonly EMBEDDED_READY: "🧠 Embedded Weaviate initialized for persistent semantic memory";
|
|
179
|
+
readonly ALREADY_INSTALLED: "⚠️ Claude Memory hooks are already installed.";
|
|
180
|
+
readonly USE_FORCE: " Use --force to overwrite existing installation.";
|
|
181
|
+
readonly SETTINGS_WRITTEN: (type: string, path: string) => string;
|
|
182
|
+
};
|
|
183
|
+
readonly NEXT_STEPS: readonly ["1. Restart Claude Code to load the new hooks", "2. Use `/clear` and `/compact` in Claude Code to save and compress session memories", "3. New sessions will automatically load relevant context"];
|
|
184
|
+
readonly ERRORS: {
|
|
185
|
+
readonly HOOKS_NOT_FOUND: "❌ Hook source files not found";
|
|
186
|
+
readonly SETTINGS_WRITE_FAILED: (path: string, error: string) => string;
|
|
187
|
+
readonly MCP_CONFIG_PARSE_FAILED: (error: string) => string;
|
|
188
|
+
readonly MCP_CONFIG_WRITE_FAILED: (error: string) => string;
|
|
189
|
+
readonly COMPRESSION_FAILED: (error: string) => string;
|
|
190
|
+
readonly CONTEXT_LOAD_FAILED: (error: string) => string;
|
|
191
|
+
};
|
|
192
|
+
readonly STATUS: {
|
|
193
|
+
readonly NO_INDEX: "📚 No memory index found. Starting fresh session.";
|
|
194
|
+
readonly NO_MATCHES: "📚 No matching memories found in index.";
|
|
195
|
+
readonly RECENT_MEMORIES: "🧠 Recent memories from previous sessions:";
|
|
196
|
+
readonly MEMORY_COUNT: (count: number) => string;
|
|
197
|
+
readonly FULL_CONTEXT_AVAILABLE: "💡 Full context available via MCP memory tools";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* Debug logging message templates
|
|
202
|
+
*/
|
|
203
|
+
export declare const DEBUG_MESSAGES: {
|
|
204
|
+
readonly COMPRESSION_STARTED: "🚀 COMPRESSION STARTED";
|
|
205
|
+
readonly TRANSCRIPT_PATH: (path: string) => string;
|
|
206
|
+
readonly SESSION_ID: (id: string) => string;
|
|
207
|
+
readonly PROJECT_NAME: (name: string) => string;
|
|
208
|
+
readonly CLAUDE_SDK_CALL: "🤖 Calling Claude SDK to analyze and populate knowledge graph...";
|
|
209
|
+
readonly TRANSCRIPT_STATS: (size: number, count: number) => string;
|
|
210
|
+
readonly COMPRESSION_COMPLETE: (count: number) => string;
|
|
211
|
+
readonly CLAUDE_PATH_FOUND: (path: string) => string;
|
|
212
|
+
readonly MCP_CONFIG_USED: (path: string) => string;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* Knowledge graph search templates
|
|
216
|
+
*/
|
|
217
|
+
export declare const SEARCH_TEMPLATES: {
|
|
218
|
+
readonly SEARCH_SCRIPT: (query: string) => string;
|
|
219
|
+
readonly SEARCH_PREFIX: "Search for: ";
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Weaviate MCP server configuration template
|
|
223
|
+
*/
|
|
224
|
+
export declare const WEAVIATE_MCP_CONFIG: {
|
|
225
|
+
readonly "claude-mem": {
|
|
226
|
+
readonly command: "C:\\path\\to\\mcp-server.exe" | "/usr/local/bin/mcp-server-weaviate";
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Weaviate collection names for entities and relations
|
|
231
|
+
*/
|
|
232
|
+
export declare const WEAVIATE_COLLECTIONS: {
|
|
233
|
+
readonly ENTITIES: "claude_mem_entities";
|
|
234
|
+
readonly RELATIONS: "claude_mem_relations";
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Default Weaviate configuration values
|
|
238
|
+
*/
|
|
239
|
+
export declare const WEAVIATE_DEFAULTS: {
|
|
240
|
+
readonly HOST: "localhost:8080";
|
|
241
|
+
readonly SCHEME: "http";
|
|
242
|
+
readonly MCP_PATH: "/usr/local/bin/mcp-server-weaviate";
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Weaviate-specific CLI messages
|
|
246
|
+
*/
|
|
247
|
+
export declare const WEAVIATE_MESSAGES: {
|
|
248
|
+
readonly CONNECTION: {
|
|
249
|
+
readonly CONNECTING: "🔗 Connecting to Weaviate server...";
|
|
250
|
+
readonly CONNECTED: "✅ Connected to Weaviate successfully";
|
|
251
|
+
readonly FAILED: (error: string) => string;
|
|
252
|
+
readonly DISCONNECTED: "👋 Disconnected from Weaviate";
|
|
253
|
+
};
|
|
254
|
+
readonly MIGRATION: {
|
|
255
|
+
readonly STARTING: "🚀 Starting migration to Weaviate backend...";
|
|
256
|
+
readonly READING_INDEX: "📖 Reading existing memory index files...";
|
|
257
|
+
readonly MIGRATING_ENTITIES: (count: number) => string;
|
|
258
|
+
readonly MIGRATING_RELATIONS: (count: number) => string;
|
|
259
|
+
readonly UPDATING_SETTINGS: "⚙️ Updating settings to use Weaviate backend...";
|
|
260
|
+
readonly COMPLETED: "✅ Migration to Weaviate completed successfully";
|
|
261
|
+
readonly FAILED: (error: string) => string;
|
|
262
|
+
readonly NO_DATA: "💡 No existing data found to migrate";
|
|
263
|
+
};
|
|
264
|
+
readonly SEARCH: {
|
|
265
|
+
readonly SEMANTIC_SEARCH: "🧠 Using semantic search with Weaviate...";
|
|
266
|
+
readonly KEYWORD_SEARCH: "🔍 Using keyword search with Weaviate...";
|
|
267
|
+
readonly HYBRID_SEARCH: "🔬 Using hybrid search with Weaviate...";
|
|
268
|
+
readonly NO_RESULTS: "📚 No results found in Weaviate database";
|
|
269
|
+
readonly RESULTS_FOUND: (count: number) => string;
|
|
270
|
+
};
|
|
271
|
+
readonly SETUP: {
|
|
272
|
+
readonly STARTING_EMBEDDED: "🚀 Starting embedded Weaviate instance...";
|
|
273
|
+
readonly EMBEDDED_READY: "✅ Embedded Weaviate is ready and accepting connections";
|
|
274
|
+
readonly DOWNLOADING_BINARIES: "⬇️ Downloading Weaviate binaries (first time only)...";
|
|
275
|
+
readonly INITIALIZING_SCHEMA: "📋 Initializing knowledge graph schema...";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Weaviate error messages
|
|
280
|
+
*/
|
|
281
|
+
export declare const WEAVIATE_ERRORS: {
|
|
282
|
+
readonly CONNECTION_FAILED: "Could not establish connection to Weaviate server";
|
|
283
|
+
readonly MCP_SERVER_NOT_FOUND: "Weaviate MCP server binary not found at specified path";
|
|
284
|
+
readonly INVALID_COLLECTION: (collection: string) => string;
|
|
285
|
+
readonly QUERY_FAILED: (query: string, error: string) => string;
|
|
286
|
+
readonly ENTITY_CREATION_FAILED: (name: string) => string;
|
|
287
|
+
readonly RELATION_CREATION_FAILED: (from: string, to: string) => string;
|
|
288
|
+
readonly MIGRATION_INCOMPLETE: "Migration was incomplete - some data may not have been transferred";
|
|
289
|
+
readonly EMBEDDED_START_FAILED: "Failed to start embedded Weaviate instance - check disk space and permissions";
|
|
290
|
+
readonly SCHEMA_MISMATCH: "Weaviate schema does not match expected structure";
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Export all constants for easy importing
|
|
294
|
+
*/
|
|
295
|
+
export declare const CONSTANTS: {
|
|
296
|
+
readonly ENTITY_NAMING_PATTERNS: {
|
|
297
|
+
readonly component: "Component_Name";
|
|
298
|
+
readonly decision: "Decision_Name";
|
|
299
|
+
readonly pattern: "Pattern_Name";
|
|
300
|
+
readonly tool: "Tool_Name";
|
|
301
|
+
readonly fix: "Fix_Name";
|
|
302
|
+
readonly workflow: "Workflow_Name";
|
|
303
|
+
};
|
|
304
|
+
readonly ENTITY_TYPES: {
|
|
305
|
+
readonly component: "component";
|
|
306
|
+
readonly pattern: "pattern";
|
|
307
|
+
readonly workflow: "workflow";
|
|
308
|
+
readonly integration: "integration";
|
|
309
|
+
readonly concept: "concept";
|
|
310
|
+
readonly decision: "decision";
|
|
311
|
+
readonly tool: "tool";
|
|
312
|
+
readonly fix: "fix";
|
|
313
|
+
};
|
|
314
|
+
readonly OBSERVATION_FIELDS: readonly ["Core purpose: [what it fundamentally does]", "Brief description: [one-line summary for session-start display]", "Implementation: [key technical details, code patterns]", "Dependencies: [what it requires or builds upon]", "Usage context: [when/why it's used]", "Performance characteristics: [speed, reliability, constraints]", "Integration points: [how it connects to other systems]", "Keywords: [searchable terms for this concept]", "Decision rationale: [why this approach was chosen]", "Next steps: [what needs to be done next with this component]", "Files modified: [list of files changed]", "Tools used: [development tools/commands used]"];
|
|
315
|
+
readonly RELATIONSHIP_TYPES: readonly ["executes_via", "orchestrates_through", "validates_using", "provides_auth_to", "manages_state_for", "processes_events_from", "caches_data_from", "routes_requests_to", "transforms_data_for", "extends", "enhances_performance_of", "builds_upon", "fixes_issue_in", "replaces", "optimizes", "uses_tool_chain", "triggers_tool", "receives_result_from"];
|
|
316
|
+
readonly CONTEXT_TEMPLATES: {
|
|
317
|
+
readonly PRIMARY_CONTEXT: (projectName: string) => string;
|
|
318
|
+
readonly RECENT_SESSIONS: (sessionList: string) => string;
|
|
319
|
+
readonly AVAILABLE_ENTITIES: (type: string, entities: string[], hasMore: boolean, moreCount: number) => string;
|
|
320
|
+
readonly SESSION_START_HEADER: "🧠 Active Working Context from Previous Sessions:";
|
|
321
|
+
readonly SESSION_START_SEPARATOR: string;
|
|
322
|
+
readonly RESUME_INSTRUCTIONS: "💡 TO RESUME: Load active components with open_nodes([\"<exact_names>\"])\n📊 TO EXPLORE: Search related work with search_nodes(\"<keywords>\")";
|
|
323
|
+
};
|
|
324
|
+
readonly SESSION_START_TEMPLATES: {
|
|
325
|
+
readonly FOCUS_LINE: (focus: string) => string;
|
|
326
|
+
readonly LAST_WORKED: (timeAgo: string, projectName: string) => string;
|
|
327
|
+
readonly SECTIONS: {
|
|
328
|
+
readonly COMPONENTS: "🎯 ACTIVE COMPONENTS (load these for context):";
|
|
329
|
+
readonly DECISIONS: "🔄 RECENT DECISIONS & PATTERNS:";
|
|
330
|
+
readonly TOOLS: "🛠️ TOOLS & INFRASTRUCTURE:";
|
|
331
|
+
readonly FIXES: "🐛 RECENT FIXES:";
|
|
332
|
+
readonly ACTIONS: "⚡ NEXT ACTIONS:";
|
|
333
|
+
};
|
|
334
|
+
readonly ACTION_PREFIX: "□ ";
|
|
335
|
+
readonly ENTITY_BULLET: "• ";
|
|
336
|
+
};
|
|
337
|
+
readonly TIME_FORMATS: {
|
|
338
|
+
readonly JUST_NOW: "just now";
|
|
339
|
+
readonly HOURS_AGO: (hours: number) => string;
|
|
340
|
+
readonly DAYS_AGO: (days: number) => string;
|
|
341
|
+
readonly RECENTLY: "recently";
|
|
342
|
+
};
|
|
343
|
+
readonly HOOK_RESPONSES: {
|
|
344
|
+
readonly SUCCESS: (hookEventName: string, message: string) => {
|
|
345
|
+
hookSpecificOutput: {
|
|
346
|
+
hookEventName: string;
|
|
347
|
+
status: string;
|
|
348
|
+
message: string;
|
|
349
|
+
};
|
|
350
|
+
suppressOutput: boolean;
|
|
351
|
+
};
|
|
352
|
+
readonly SKIPPED: (hookEventName: string, message: string) => {
|
|
353
|
+
hookSpecificOutput: {
|
|
354
|
+
hookEventName: string;
|
|
355
|
+
status: string;
|
|
356
|
+
message: string;
|
|
357
|
+
};
|
|
358
|
+
suppressOutput: boolean;
|
|
359
|
+
};
|
|
360
|
+
readonly BLOCKED: (reason: string) => {
|
|
361
|
+
decision: string;
|
|
362
|
+
reason: string;
|
|
363
|
+
};
|
|
364
|
+
readonly CONTINUE: (hookEventName: string, additionalContext?: string) => {
|
|
365
|
+
hookSpecificOutput?: {
|
|
366
|
+
hookEventName: string;
|
|
367
|
+
additionalContext: string;
|
|
368
|
+
} | undefined;
|
|
369
|
+
continue: boolean;
|
|
370
|
+
};
|
|
371
|
+
readonly ERROR: (reason: string) => {
|
|
372
|
+
decision: string;
|
|
373
|
+
reason: string;
|
|
374
|
+
};
|
|
375
|
+
};
|
|
376
|
+
readonly HOOK_MESSAGES: {
|
|
377
|
+
readonly COMPRESSION_SUCCESS: "Memory compression completed successfully";
|
|
378
|
+
readonly COMPRESSION_SKIPPED: "Compression skipped - Claude SDK not available in this context";
|
|
379
|
+
readonly COMPRESSION_FAILED: (stderr: string) => string;
|
|
380
|
+
readonly CONTEXT_LOADED: "Project context loaded successfully";
|
|
381
|
+
readonly CONTEXT_SKIPPED: "Continuing session - context loading skipped";
|
|
382
|
+
readonly NO_TRANSCRIPT: "No transcript path provided";
|
|
383
|
+
readonly HOOK_ERROR: (error: string) => string;
|
|
384
|
+
};
|
|
385
|
+
readonly MCP_CONFIG_TEMPLATE: {
|
|
386
|
+
readonly "claude-mem": {
|
|
387
|
+
readonly command: "npx";
|
|
388
|
+
readonly args: readonly ["-y", "@modelcontextprotocol/server-memory"];
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
readonly HOOK_CONFIG_TEMPLATES: {
|
|
392
|
+
readonly PRE_COMPACT: (scriptPath: string) => {
|
|
393
|
+
pattern: string;
|
|
394
|
+
hooks: {
|
|
395
|
+
type: string;
|
|
396
|
+
command: string;
|
|
397
|
+
timeout: number;
|
|
398
|
+
}[];
|
|
399
|
+
};
|
|
400
|
+
readonly SESSION_START: (scriptPath: string) => {
|
|
401
|
+
pattern: string;
|
|
402
|
+
hooks: {
|
|
403
|
+
type: string;
|
|
404
|
+
command: string;
|
|
405
|
+
timeout: number;
|
|
406
|
+
}[];
|
|
407
|
+
};
|
|
408
|
+
readonly SESSION_END: (scriptPath: string) => {
|
|
409
|
+
pattern: string;
|
|
410
|
+
hooks: {
|
|
411
|
+
type: string;
|
|
412
|
+
command: string;
|
|
413
|
+
timeout: number;
|
|
414
|
+
}[];
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
readonly CLI_MESSAGES: {
|
|
418
|
+
readonly INSTALLATION: {
|
|
419
|
+
readonly STARTING: "🚀 Installing Claude Memory System with embedded Weaviate...";
|
|
420
|
+
readonly SUCCESS: "🎉 Installation complete! Embedded vector database ready.";
|
|
421
|
+
readonly HOOKS_INSTALLED: "✅ Installed hooks to ~/.claude-mem/hooks/";
|
|
422
|
+
readonly MCP_CONFIGURED: (path: string) => string;
|
|
423
|
+
readonly EMBEDDED_READY: "🧠 Embedded Weaviate initialized for persistent semantic memory";
|
|
424
|
+
readonly ALREADY_INSTALLED: "⚠️ Claude Memory hooks are already installed.";
|
|
425
|
+
readonly USE_FORCE: " Use --force to overwrite existing installation.";
|
|
426
|
+
readonly SETTINGS_WRITTEN: (type: string, path: string) => string;
|
|
427
|
+
};
|
|
428
|
+
readonly NEXT_STEPS: readonly ["1. Restart Claude Code to load the new hooks", "2. Use `/clear` and `/compact` in Claude Code to save and compress session memories", "3. New sessions will automatically load relevant context"];
|
|
429
|
+
readonly ERRORS: {
|
|
430
|
+
readonly HOOKS_NOT_FOUND: "❌ Hook source files not found";
|
|
431
|
+
readonly SETTINGS_WRITE_FAILED: (path: string, error: string) => string;
|
|
432
|
+
readonly MCP_CONFIG_PARSE_FAILED: (error: string) => string;
|
|
433
|
+
readonly MCP_CONFIG_WRITE_FAILED: (error: string) => string;
|
|
434
|
+
readonly COMPRESSION_FAILED: (error: string) => string;
|
|
435
|
+
readonly CONTEXT_LOAD_FAILED: (error: string) => string;
|
|
436
|
+
};
|
|
437
|
+
readonly STATUS: {
|
|
438
|
+
readonly NO_INDEX: "📚 No memory index found. Starting fresh session.";
|
|
439
|
+
readonly NO_MATCHES: "📚 No matching memories found in index.";
|
|
440
|
+
readonly RECENT_MEMORIES: "🧠 Recent memories from previous sessions:";
|
|
441
|
+
readonly MEMORY_COUNT: (count: number) => string;
|
|
442
|
+
readonly FULL_CONTEXT_AVAILABLE: "💡 Full context available via MCP memory tools";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
readonly DEBUG_MESSAGES: {
|
|
446
|
+
readonly COMPRESSION_STARTED: "🚀 COMPRESSION STARTED";
|
|
447
|
+
readonly TRANSCRIPT_PATH: (path: string) => string;
|
|
448
|
+
readonly SESSION_ID: (id: string) => string;
|
|
449
|
+
readonly PROJECT_NAME: (name: string) => string;
|
|
450
|
+
readonly CLAUDE_SDK_CALL: "🤖 Calling Claude SDK to analyze and populate knowledge graph...";
|
|
451
|
+
readonly TRANSCRIPT_STATS: (size: number, count: number) => string;
|
|
452
|
+
readonly COMPRESSION_COMPLETE: (count: number) => string;
|
|
453
|
+
readonly CLAUDE_PATH_FOUND: (path: string) => string;
|
|
454
|
+
readonly MCP_CONFIG_USED: (path: string) => string;
|
|
455
|
+
};
|
|
456
|
+
readonly SEARCH_TEMPLATES: {
|
|
457
|
+
readonly SEARCH_SCRIPT: (query: string) => string;
|
|
458
|
+
readonly SEARCH_PREFIX: "Search for: ";
|
|
459
|
+
};
|
|
460
|
+
readonly WEAVIATE_MCP_CONFIG: {
|
|
461
|
+
readonly "claude-mem": {
|
|
462
|
+
readonly command: "C:\\path\\to\\mcp-server.exe" | "/usr/local/bin/mcp-server-weaviate";
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
readonly WEAVIATE_COLLECTIONS: {
|
|
466
|
+
readonly ENTITIES: "claude_mem_entities";
|
|
467
|
+
readonly RELATIONS: "claude_mem_relations";
|
|
468
|
+
};
|
|
469
|
+
readonly WEAVIATE_DEFAULTS: {
|
|
470
|
+
readonly HOST: "localhost:8080";
|
|
471
|
+
readonly SCHEME: "http";
|
|
472
|
+
readonly MCP_PATH: "/usr/local/bin/mcp-server-weaviate";
|
|
473
|
+
};
|
|
474
|
+
readonly WEAVIATE_MESSAGES: {
|
|
475
|
+
readonly CONNECTION: {
|
|
476
|
+
readonly CONNECTING: "🔗 Connecting to Weaviate server...";
|
|
477
|
+
readonly CONNECTED: "✅ Connected to Weaviate successfully";
|
|
478
|
+
readonly FAILED: (error: string) => string;
|
|
479
|
+
readonly DISCONNECTED: "👋 Disconnected from Weaviate";
|
|
480
|
+
};
|
|
481
|
+
readonly MIGRATION: {
|
|
482
|
+
readonly STARTING: "🚀 Starting migration to Weaviate backend...";
|
|
483
|
+
readonly READING_INDEX: "📖 Reading existing memory index files...";
|
|
484
|
+
readonly MIGRATING_ENTITIES: (count: number) => string;
|
|
485
|
+
readonly MIGRATING_RELATIONS: (count: number) => string;
|
|
486
|
+
readonly UPDATING_SETTINGS: "⚙️ Updating settings to use Weaviate backend...";
|
|
487
|
+
readonly COMPLETED: "✅ Migration to Weaviate completed successfully";
|
|
488
|
+
readonly FAILED: (error: string) => string;
|
|
489
|
+
readonly NO_DATA: "💡 No existing data found to migrate";
|
|
490
|
+
};
|
|
491
|
+
readonly SEARCH: {
|
|
492
|
+
readonly SEMANTIC_SEARCH: "🧠 Using semantic search with Weaviate...";
|
|
493
|
+
readonly KEYWORD_SEARCH: "🔍 Using keyword search with Weaviate...";
|
|
494
|
+
readonly HYBRID_SEARCH: "🔬 Using hybrid search with Weaviate...";
|
|
495
|
+
readonly NO_RESULTS: "📚 No results found in Weaviate database";
|
|
496
|
+
readonly RESULTS_FOUND: (count: number) => string;
|
|
497
|
+
};
|
|
498
|
+
readonly SETUP: {
|
|
499
|
+
readonly STARTING_EMBEDDED: "🚀 Starting embedded Weaviate instance...";
|
|
500
|
+
readonly EMBEDDED_READY: "✅ Embedded Weaviate is ready and accepting connections";
|
|
501
|
+
readonly DOWNLOADING_BINARIES: "⬇️ Downloading Weaviate binaries (first time only)...";
|
|
502
|
+
readonly INITIALIZING_SCHEMA: "📋 Initializing knowledge graph schema...";
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
readonly WEAVIATE_ERRORS: {
|
|
506
|
+
readonly CONNECTION_FAILED: "Could not establish connection to Weaviate server";
|
|
507
|
+
readonly MCP_SERVER_NOT_FOUND: "Weaviate MCP server binary not found at specified path";
|
|
508
|
+
readonly INVALID_COLLECTION: (collection: string) => string;
|
|
509
|
+
readonly QUERY_FAILED: (query: string, error: string) => string;
|
|
510
|
+
readonly ENTITY_CREATION_FAILED: (name: string) => string;
|
|
511
|
+
readonly RELATION_CREATION_FAILED: (from: string, to: string) => string;
|
|
512
|
+
readonly MIGRATION_INCOMPLETE: "Migration was incomplete - some data may not have been transferred";
|
|
513
|
+
readonly EMBEDDED_START_FAILED: "Failed to start embedded Weaviate instance - check disk space and permissions";
|
|
514
|
+
readonly SCHEMA_MISMATCH: "Weaviate schema does not match expected structure";
|
|
515
|
+
};
|
|
516
|
+
};
|