engram-sdk 0.5.0 → 0.5.2
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/README.md +4 -2
- package/dist/cli.js +133 -2
- package/dist/cli.js.map +1 -1
- package/dist/hosted.d.ts.map +1 -1
- package/dist/hosted.js +38 -1
- package/dist/hosted.js.map +1 -1
- package/dist/import.d.ts +31 -0
- package/dist/import.d.ts.map +1 -0
- package/dist/import.js +460 -0
- package/dist/import.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +218 -0
- package/dist/server.js.map +1 -1
- package/dist/telemetry.js +1 -1
- package/dist/telemetry.js.map +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/.mcpregistry_github_token +0 -1
- package/.mcpregistry_registry_token +0 -1
- package/deploy/fly.toml +0 -26
- package/eval-codebase-v2-NOTE.md +0 -22
- package/fly.toml +0 -33
- package/hackernews-post.md +0 -45
- package/hn-posts/2026-02-23.md +0 -64
- package/rescore-codebase.ts +0 -184
- package/rescore-vscode.ts +0 -142
- package/signal-quality-plan.md +0 -23
package/dist/import.js
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* engram import — Migrate memory from other AI tools into Engram
|
|
3
|
+
*
|
|
4
|
+
* Supports:
|
|
5
|
+
* --claude-code Import from Claude Code (CLAUDE.md + auto memory + session transcripts)
|
|
6
|
+
*
|
|
7
|
+
* Claude Code caps auto memory at 200 lines per project, siloed per repo.
|
|
8
|
+
* Engram has no limit, semantic search across everything, and cross-project intelligence.
|
|
9
|
+
* Import in one command. Keep using Claude Code — Engram just makes it smarter.
|
|
10
|
+
*/
|
|
11
|
+
import { readFileSync, existsSync, readdirSync, statSync } from 'fs';
|
|
12
|
+
import { join, basename } from 'path';
|
|
13
|
+
import { homedir } from 'os';
|
|
14
|
+
// ── Formatting helpers ─────────────────────────────────────
|
|
15
|
+
function bold(s) { return `\x1b[1m${s}\x1b[0m`; }
|
|
16
|
+
function dim(s) { return `\x1b[2m${s}\x1b[0m`; }
|
|
17
|
+
function green(s) { return `\x1b[32m${s}\x1b[0m`; }
|
|
18
|
+
function yellow(s) { return `\x1b[33m${s}\x1b[0m`; }
|
|
19
|
+
function cyan(s) { return `\x1b[36m${s}\x1b[0m`; }
|
|
20
|
+
function red(s) { return `\x1b[31m${s}\x1b[0m`; }
|
|
21
|
+
// ── Discovery ──────────────────────────────────────────────
|
|
22
|
+
function discoverClaudeCodeSources() {
|
|
23
|
+
const home = homedir();
|
|
24
|
+
const sources = [];
|
|
25
|
+
const claudeDir = join(home, '.claude');
|
|
26
|
+
if (!existsSync(claudeDir)) {
|
|
27
|
+
return sources;
|
|
28
|
+
}
|
|
29
|
+
// 1. User-level CLAUDE.md
|
|
30
|
+
const userClaudeMd = join(claudeDir, 'CLAUDE.md');
|
|
31
|
+
if (existsSync(userClaudeMd)) {
|
|
32
|
+
const content = readFileSync(userClaudeMd, 'utf-8');
|
|
33
|
+
sources.push({
|
|
34
|
+
path: userClaudeMd,
|
|
35
|
+
project: '~global',
|
|
36
|
+
type: 'claude-md',
|
|
37
|
+
content,
|
|
38
|
+
lineCount: content.split('\n').length,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// 2. User-level rules
|
|
42
|
+
const userRulesDir = join(claudeDir, 'rules');
|
|
43
|
+
if (existsSync(userRulesDir)) {
|
|
44
|
+
for (const file of findMarkdownFiles(userRulesDir)) {
|
|
45
|
+
const content = readFileSync(file, 'utf-8');
|
|
46
|
+
sources.push({
|
|
47
|
+
path: file,
|
|
48
|
+
project: '~global',
|
|
49
|
+
type: 'rules',
|
|
50
|
+
content,
|
|
51
|
+
lineCount: content.split('\n').length,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// 3. Per-project auto memory and sessions
|
|
56
|
+
const projectsDir = join(claudeDir, 'projects');
|
|
57
|
+
if (existsSync(projectsDir)) {
|
|
58
|
+
for (const projectSlug of readdirSync(projectsDir)) {
|
|
59
|
+
const projectPath = join(projectsDir, projectSlug);
|
|
60
|
+
if (!statSync(projectPath).isDirectory())
|
|
61
|
+
continue;
|
|
62
|
+
const projectName = decodeProjectSlug(projectSlug);
|
|
63
|
+
// Auto memory files
|
|
64
|
+
const memoryDir = join(projectPath, 'memory');
|
|
65
|
+
if (existsSync(memoryDir)) {
|
|
66
|
+
for (const file of findMarkdownFiles(memoryDir)) {
|
|
67
|
+
const content = readFileSync(file, 'utf-8');
|
|
68
|
+
if (content.trim().length === 0)
|
|
69
|
+
continue;
|
|
70
|
+
sources.push({
|
|
71
|
+
path: file,
|
|
72
|
+
project: projectName,
|
|
73
|
+
type: 'auto-memory',
|
|
74
|
+
content,
|
|
75
|
+
lineCount: content.split('\n').length,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// Session transcripts (JSONL)
|
|
80
|
+
const jsonlFiles = readdirSync(projectPath)
|
|
81
|
+
.filter(f => f.endsWith('.jsonl'))
|
|
82
|
+
.map(f => ({
|
|
83
|
+
name: f,
|
|
84
|
+
path: join(projectPath, f),
|
|
85
|
+
mtime: statSync(join(projectPath, f)).mtimeMs,
|
|
86
|
+
size: statSync(join(projectPath, f)).size,
|
|
87
|
+
}))
|
|
88
|
+
.sort((a, b) => b.mtime - a.mtime); // newest first
|
|
89
|
+
for (const jsonl of jsonlFiles) {
|
|
90
|
+
sources.push({
|
|
91
|
+
path: jsonl.path,
|
|
92
|
+
project: projectName,
|
|
93
|
+
type: 'session-transcript',
|
|
94
|
+
content: '', // loaded on demand (can be huge)
|
|
95
|
+
lineCount: 0,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// 4. Project-level CLAUDE.md in cwd
|
|
101
|
+
const cwd = process.cwd();
|
|
102
|
+
for (const relPath of ['CLAUDE.md', '.claude/CLAUDE.md', 'CLAUDE.local.md']) {
|
|
103
|
+
const fullPath = join(cwd, relPath);
|
|
104
|
+
if (existsSync(fullPath)) {
|
|
105
|
+
const content = readFileSync(fullPath, 'utf-8');
|
|
106
|
+
sources.push({
|
|
107
|
+
path: fullPath,
|
|
108
|
+
project: basename(cwd),
|
|
109
|
+
type: 'claude-md',
|
|
110
|
+
content,
|
|
111
|
+
lineCount: content.split('\n').length,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Project rules in cwd
|
|
116
|
+
const cwdRulesDir = join(cwd, '.claude', 'rules');
|
|
117
|
+
if (existsSync(cwdRulesDir)) {
|
|
118
|
+
for (const file of findMarkdownFiles(cwdRulesDir)) {
|
|
119
|
+
const content = readFileSync(file, 'utf-8');
|
|
120
|
+
sources.push({
|
|
121
|
+
path: file,
|
|
122
|
+
project: basename(cwd),
|
|
123
|
+
type: 'rules',
|
|
124
|
+
content,
|
|
125
|
+
lineCount: content.split('\n').length,
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return sources;
|
|
130
|
+
}
|
|
131
|
+
function findMarkdownFiles(dir) {
|
|
132
|
+
const files = [];
|
|
133
|
+
try {
|
|
134
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
135
|
+
const fullPath = join(dir, entry.name);
|
|
136
|
+
if (entry.isDirectory()) {
|
|
137
|
+
files.push(...findMarkdownFiles(fullPath));
|
|
138
|
+
}
|
|
139
|
+
else if (entry.name.endsWith('.md')) {
|
|
140
|
+
files.push(fullPath);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
// Permission denied or similar
|
|
146
|
+
}
|
|
147
|
+
return files;
|
|
148
|
+
}
|
|
149
|
+
function decodeProjectSlug(slug) {
|
|
150
|
+
// Claude Code encodes paths like: -Users-thomasstockham-Desktop-Scout
|
|
151
|
+
// Decode back to a readable project name
|
|
152
|
+
const parts = slug.split('-').filter(Boolean);
|
|
153
|
+
// Try to find a reasonable project name from the path
|
|
154
|
+
// Skip "Users" and username, take the last meaningful parts
|
|
155
|
+
if (parts.length >= 3 && parts[0] === 'Users') {
|
|
156
|
+
const projectParts = parts.slice(2); // skip "Users" and username
|
|
157
|
+
return projectParts.join('/');
|
|
158
|
+
}
|
|
159
|
+
return slug;
|
|
160
|
+
}
|
|
161
|
+
// ── Parsing ────────────────────────────────────────────────
|
|
162
|
+
function parseMarkdownIntoChunks(source) {
|
|
163
|
+
const chunks = [];
|
|
164
|
+
const lines = source.content.split('\n');
|
|
165
|
+
let currentSection = '';
|
|
166
|
+
let currentLines = [];
|
|
167
|
+
function flush() {
|
|
168
|
+
const text = currentLines.join('\n').trim();
|
|
169
|
+
if (text.length < 10)
|
|
170
|
+
return; // skip trivially short chunks
|
|
171
|
+
// Extract potential entities (capitalized words, @mentions, paths)
|
|
172
|
+
const entities = extractEntities(text);
|
|
173
|
+
const topics = extractTopics(text, source);
|
|
174
|
+
chunks.push({
|
|
175
|
+
content: text,
|
|
176
|
+
source,
|
|
177
|
+
section: currentSection || undefined,
|
|
178
|
+
entities: entities.length > 0 ? entities : undefined,
|
|
179
|
+
topics: topics.length > 0 ? topics : undefined,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
for (const line of lines) {
|
|
183
|
+
const headerMatch = line.match(/^(#{1,3})\s+(.+)/);
|
|
184
|
+
if (headerMatch) {
|
|
185
|
+
flush();
|
|
186
|
+
currentSection = headerMatch[2].trim();
|
|
187
|
+
currentLines = [];
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
currentLines.push(line);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
flush();
|
|
194
|
+
return chunks;
|
|
195
|
+
}
|
|
196
|
+
function extractEntities(text) {
|
|
197
|
+
const entities = new Set();
|
|
198
|
+
// Extract @mentions
|
|
199
|
+
for (const match of text.matchAll(/@(\w+)/g)) {
|
|
200
|
+
entities.add(match[1]);
|
|
201
|
+
}
|
|
202
|
+
// Extract quoted terms
|
|
203
|
+
for (const match of text.matchAll(/[`"']([A-Z][a-zA-Z0-9]+(?:\s+[A-Z][a-zA-Z0-9]+)*)[`"']/g)) {
|
|
204
|
+
if (match[1].length < 30)
|
|
205
|
+
entities.add(match[1]);
|
|
206
|
+
}
|
|
207
|
+
return [...entities].slice(0, 10);
|
|
208
|
+
}
|
|
209
|
+
function extractTopics(text, source) {
|
|
210
|
+
const topics = new Set();
|
|
211
|
+
// Add source type as topic
|
|
212
|
+
topics.add(`claude-code`);
|
|
213
|
+
if (source.type === 'auto-memory')
|
|
214
|
+
topics.add('auto-memory');
|
|
215
|
+
if (source.type === 'rules')
|
|
216
|
+
topics.add('rules');
|
|
217
|
+
// Extract hashtags
|
|
218
|
+
for (const match of text.matchAll(/#(\w+)/g)) {
|
|
219
|
+
topics.add(match[1]);
|
|
220
|
+
}
|
|
221
|
+
return [...topics].slice(0, 5);
|
|
222
|
+
}
|
|
223
|
+
function parseSessionTranscript(source, maxMessages = 200) {
|
|
224
|
+
const chunks = [];
|
|
225
|
+
try {
|
|
226
|
+
const raw = readFileSync(source.path, 'utf-8');
|
|
227
|
+
const lines = raw.split('\n').filter(l => l.trim());
|
|
228
|
+
const messages = [];
|
|
229
|
+
for (const line of lines) {
|
|
230
|
+
try {
|
|
231
|
+
const entry = JSON.parse(line);
|
|
232
|
+
// Skip non-message entries (file snapshots, tool results, etc.)
|
|
233
|
+
if (!entry.message?.role)
|
|
234
|
+
continue;
|
|
235
|
+
if (entry.message.role !== 'user' && entry.message.role !== 'assistant')
|
|
236
|
+
continue;
|
|
237
|
+
let content = '';
|
|
238
|
+
if (typeof entry.message.content === 'string') {
|
|
239
|
+
content = entry.message.content;
|
|
240
|
+
}
|
|
241
|
+
else if (Array.isArray(entry.message.content)) {
|
|
242
|
+
// Extract text blocks, skip thinking/tool_use
|
|
243
|
+
content = entry.message.content
|
|
244
|
+
.filter((b) => b.type === 'text')
|
|
245
|
+
.map((b) => b.text)
|
|
246
|
+
.join('\n');
|
|
247
|
+
}
|
|
248
|
+
if (content.trim().length < 20)
|
|
249
|
+
continue; // skip trivial messages
|
|
250
|
+
messages.push({
|
|
251
|
+
role: entry.message.role,
|
|
252
|
+
content: content.trim(),
|
|
253
|
+
timestamp: entry.timestamp,
|
|
254
|
+
});
|
|
255
|
+
if (messages.length >= maxMessages)
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
// Skip unparseable lines
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (messages.length === 0)
|
|
263
|
+
return chunks;
|
|
264
|
+
// Strategy: Extract user instructions, decisions, and corrections
|
|
265
|
+
// These are the highest-signal memories from session transcripts
|
|
266
|
+
for (const msg of messages) {
|
|
267
|
+
if (msg.role !== 'user')
|
|
268
|
+
continue;
|
|
269
|
+
if (msg.content.length < 30)
|
|
270
|
+
continue;
|
|
271
|
+
if (msg.content.length > 2000)
|
|
272
|
+
continue; // skip huge pastes
|
|
273
|
+
// Filter for high-signal user messages
|
|
274
|
+
const isHighSignal =
|
|
275
|
+
// Preferences and decisions
|
|
276
|
+
/\b(prefer|always|never|don't|instead|actually|use|switch to|change to)\b/i.test(msg.content) ||
|
|
277
|
+
// Instructions
|
|
278
|
+
/\b(make sure|important|remember|note that|keep in mind|convention|standard|rule)\b/i.test(msg.content) ||
|
|
279
|
+
// Corrections
|
|
280
|
+
/\b(no,|wrong|incorrect|that's not|fix|should be|supposed to)\b/i.test(msg.content) ||
|
|
281
|
+
// Architecture/design
|
|
282
|
+
/\b(architecture|pattern|approach|design|structure|framework|stack|tech)\b/i.test(msg.content);
|
|
283
|
+
if (!isHighSignal)
|
|
284
|
+
continue;
|
|
285
|
+
chunks.push({
|
|
286
|
+
content: msg.content.slice(0, 1000), // cap length
|
|
287
|
+
source,
|
|
288
|
+
section: `Session transcript`,
|
|
289
|
+
topics: ['claude-code', 'session-transcript'],
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
catch (err) {
|
|
294
|
+
// Can't read file — permission or format issue
|
|
295
|
+
}
|
|
296
|
+
return chunks;
|
|
297
|
+
}
|
|
298
|
+
// ── Import engine ──────────────────────────────────────────
|
|
299
|
+
export async function importClaudeCode(options) {
|
|
300
|
+
const result = {
|
|
301
|
+
sourcesFound: 0,
|
|
302
|
+
sourcesProcessed: 0,
|
|
303
|
+
memoriesCreated: 0,
|
|
304
|
+
memoriesDeduped: 0,
|
|
305
|
+
projectsCovered: [],
|
|
306
|
+
sessionsParsed: 0,
|
|
307
|
+
errors: [],
|
|
308
|
+
dryRun: options.dryRun ?? false,
|
|
309
|
+
};
|
|
310
|
+
const projects = new Set();
|
|
311
|
+
console.log(bold('\n🧠 Engram Import — Claude Code\n'));
|
|
312
|
+
console.log(dim(' Scanning for Claude Code memory sources...\n'));
|
|
313
|
+
// Discover all sources
|
|
314
|
+
const sources = discoverClaudeCodeSources();
|
|
315
|
+
result.sourcesFound = sources.length;
|
|
316
|
+
const mdSources = sources.filter(s => s.type !== 'session-transcript');
|
|
317
|
+
const sessionSources = sources.filter(s => s.type === 'session-transcript');
|
|
318
|
+
console.log(` ${green('✓')} Found ${mdSources.length} memory files across ${new Set(sources.map(s => s.project)).size} projects`);
|
|
319
|
+
console.log(` ${green('✓')} Found ${sessionSources.length} session transcripts`);
|
|
320
|
+
if (sources.length === 0) {
|
|
321
|
+
console.log(yellow('\n No Claude Code data found. Is Claude Code installed?\n'));
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
// Phase 1: Import markdown sources (CLAUDE.md, auto memory, rules)
|
|
325
|
+
if (mdSources.length > 0) {
|
|
326
|
+
console.log(bold('\n Phase 1: Memory files\n'));
|
|
327
|
+
for (const source of mdSources) {
|
|
328
|
+
const shortPath = source.path.replace(homedir(), '~');
|
|
329
|
+
const chunks = parseMarkdownIntoChunks(source);
|
|
330
|
+
if (chunks.length === 0) {
|
|
331
|
+
if (options.verbose)
|
|
332
|
+
console.log(dim(` skip ${shortPath} (empty)`));
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
console.log(` ${cyan(shortPath)}`);
|
|
336
|
+
console.log(` ${source.type} | ${source.lineCount} lines | ${chunks.length} chunks | project: ${source.project}`);
|
|
337
|
+
projects.add(source.project);
|
|
338
|
+
result.sourcesProcessed++;
|
|
339
|
+
for (const chunk of chunks) {
|
|
340
|
+
if (options.dryRun) {
|
|
341
|
+
if (options.verbose) {
|
|
342
|
+
const preview = chunk.content.slice(0, 80).replace(/\n/g, ' ');
|
|
343
|
+
console.log(dim(` → [dry-run] ${preview}...`));
|
|
344
|
+
}
|
|
345
|
+
result.memoriesCreated++;
|
|
346
|
+
continue;
|
|
347
|
+
}
|
|
348
|
+
try {
|
|
349
|
+
const mem = options.vault.remember({
|
|
350
|
+
content: chunk.content,
|
|
351
|
+
type: 'semantic',
|
|
352
|
+
entities: chunk.entities,
|
|
353
|
+
topics: [...(chunk.topics ?? []), `import:${source.type}`],
|
|
354
|
+
source: { type: 'external' },
|
|
355
|
+
salience: source.type === 'rules' ? 0.8 : 0.6,
|
|
356
|
+
confidence: 0.7,
|
|
357
|
+
});
|
|
358
|
+
result.memoriesCreated++;
|
|
359
|
+
}
|
|
360
|
+
catch (err) {
|
|
361
|
+
result.errors.push(`Failed to import chunk from ${shortPath}: ${err.message}`);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
// Phase 2: Import session transcripts (opt-in, higher signal)
|
|
367
|
+
if (options.includeSessions && sessionSources.length > 0) {
|
|
368
|
+
console.log(bold('\n Phase 2: Session transcripts\n'));
|
|
369
|
+
const maxPerProject = options.maxSessionsPerProject ?? 10;
|
|
370
|
+
const projectSessionCounts = {};
|
|
371
|
+
// Sort by modification time (newest first), limit per project
|
|
372
|
+
const sortedSessions = sessionSources
|
|
373
|
+
.map(s => ({ ...s, mtime: statSync(s.path).mtimeMs }))
|
|
374
|
+
.sort((a, b) => b.mtime - a.mtime);
|
|
375
|
+
for (const source of sortedSessions) {
|
|
376
|
+
const count = projectSessionCounts[source.project] ?? 0;
|
|
377
|
+
if (count >= maxPerProject)
|
|
378
|
+
continue;
|
|
379
|
+
projectSessionCounts[source.project] = count + 1;
|
|
380
|
+
const shortPath = source.path.replace(homedir(), '~');
|
|
381
|
+
const chunks = parseSessionTranscript(source);
|
|
382
|
+
if (chunks.length === 0)
|
|
383
|
+
continue;
|
|
384
|
+
result.sessionsParsed++;
|
|
385
|
+
projects.add(source.project);
|
|
386
|
+
if (options.verbose) {
|
|
387
|
+
console.log(` ${cyan(shortPath)}`);
|
|
388
|
+
console.log(` ${chunks.length} high-signal messages extracted`);
|
|
389
|
+
}
|
|
390
|
+
for (const chunk of chunks) {
|
|
391
|
+
if (options.dryRun) {
|
|
392
|
+
result.memoriesCreated++;
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
try {
|
|
396
|
+
options.vault.remember({
|
|
397
|
+
content: chunk.content,
|
|
398
|
+
type: 'episodic',
|
|
399
|
+
topics: [...(chunk.topics ?? []), 'import:session'],
|
|
400
|
+
source: { type: 'external' },
|
|
401
|
+
salience: 0.4,
|
|
402
|
+
confidence: 0.5,
|
|
403
|
+
});
|
|
404
|
+
result.memoriesCreated++;
|
|
405
|
+
}
|
|
406
|
+
catch (err) {
|
|
407
|
+
result.errors.push(`Failed to import from session: ${err.message}`);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
if (result.sessionsParsed > 0) {
|
|
412
|
+
console.log(` Parsed ${result.sessionsParsed} sessions across ${Object.keys(projectSessionCounts).length} projects`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
else if (sessionSources.length > 0 && !options.includeSessions) {
|
|
416
|
+
console.log(dim(`\n Skipping ${sessionSources.length} session transcripts (use --include-sessions to import)`));
|
|
417
|
+
}
|
|
418
|
+
result.projectsCovered = [...projects];
|
|
419
|
+
// Phase 3: Consolidate if we imported enough
|
|
420
|
+
if (!options.dryRun && result.memoriesCreated >= 10) {
|
|
421
|
+
console.log(bold('\n Phase 3: Consolidation\n'));
|
|
422
|
+
console.log(dim(' Running consolidation to connect and deduplicate imported memories...'));
|
|
423
|
+
try {
|
|
424
|
+
const report = await options.vault.consolidate();
|
|
425
|
+
result.memoriesDeduped = report.contradictionsFound;
|
|
426
|
+
console.log(` ${green('✓')} ${report.connectionsFormed} connections formed, ${report.contradictionsFound} contradictions resolved`);
|
|
427
|
+
}
|
|
428
|
+
catch (err) {
|
|
429
|
+
result.errors.push(`Consolidation failed: ${err.message}`);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
// Summary
|
|
433
|
+
console.log(bold('\n ─────────────────────────────────────'));
|
|
434
|
+
console.log(bold(' Import Summary\n'));
|
|
435
|
+
console.log(` Sources found: ${result.sourcesFound}`);
|
|
436
|
+
console.log(` Sources processed: ${result.sourcesProcessed}`);
|
|
437
|
+
console.log(` Sessions parsed: ${result.sessionsParsed}`);
|
|
438
|
+
console.log(` Memories created: ${green(String(result.memoriesCreated))}`);
|
|
439
|
+
console.log(` Projects covered: ${result.projectsCovered.length}`);
|
|
440
|
+
if (result.dryRun) {
|
|
441
|
+
console.log(yellow('\n [DRY RUN] No memories were actually created.'));
|
|
442
|
+
console.log(yellow(' Remove --dry-run to import for real.\n'));
|
|
443
|
+
}
|
|
444
|
+
if (result.errors.length > 0) {
|
|
445
|
+
console.log(red(`\n ${result.errors.length} errors:`));
|
|
446
|
+
for (const err of result.errors.slice(0, 5)) {
|
|
447
|
+
console.log(red(` • ${err}`));
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
if (!result.dryRun && result.memoriesCreated > 0) {
|
|
451
|
+
const stats = options.vault.stats();
|
|
452
|
+
console.log(bold('\n 🎉 Import complete!\n'));
|
|
453
|
+
console.log(` Your Engram vault now has ${bold(String(stats.total))} memories.`);
|
|
454
|
+
console.log(` No 200-line limit. Semantic search across all projects.`);
|
|
455
|
+
console.log(dim(`\n Try: engram recall "your query here"`));
|
|
456
|
+
console.log(dim(` Or: engram stats\n`));
|
|
457
|
+
}
|
|
458
|
+
return result;
|
|
459
|
+
}
|
|
460
|
+
//# sourceMappingURL=import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"import.js","sourceRoot":"","sources":["../src/import.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAoB,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAuC7B,8DAA8D;AAE9D,SAAS,IAAI,CAAC,CAAS,IAAI,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AACzD,SAAS,GAAG,CAAC,CAAS,IAAI,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;AACxD,SAAS,KAAK,CAAC,CAAS,IAAI,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAC3D,SAAS,MAAM,CAAC,CAAS,IAAI,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAC5D,SAAS,IAAI,CAAC,CAAS,IAAI,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAC1D,SAAS,GAAG,CAAC,CAAS,IAAI,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAEzD,8DAA8D;AAE9D,SAAS,yBAAyB;IAChC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAExC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0BAA0B;IAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,SAA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O,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAU9C,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,kDAAkD;IAClD,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAU9C,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACpC,kDAAkD;IAClD,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AA0vBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY;;;;EAyGtD"}
|