vektor-slipstream 1.4.0 → 1.4.1
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/package.json +2 -2
- package/vektor-cli.js +94 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vektor-slipstream",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Hardware-accelerated persistent memory for AI agents. Local-first, zero cloud dependency, $0 embedding cost.",
|
|
5
5
|
"main": "slipstream-core-extended.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"better-sqlite3": "^12.8.0",
|
|
74
74
|
"onnxruntime-node": "^1.17.3",
|
|
75
|
-
"vektor-slipstream": "^1.4.
|
|
75
|
+
"vektor-slipstream": "^1.4.1"
|
|
76
76
|
},
|
|
77
77
|
"optionalDependencies": {
|
|
78
78
|
"@anthropic-ai/sdk": "^0.82.0",
|
package/vektor-cli.js
CHANGED
|
@@ -44,42 +44,69 @@ function printBox() {
|
|
|
44
44
|
|
|
45
45
|
async function cmdHelp() {
|
|
46
46
|
printBox();
|
|
47
|
-
console.log(bold(' COMMANDS\n'));
|
|
47
|
+
console.log(bold(' MEMORY COMMANDS\n'));
|
|
48
|
+
|
|
49
|
+
const memoryCmds = [
|
|
50
|
+
['chat', 'Persistent memory chat — all conversations stored in MAGMA graph'],
|
|
51
|
+
['remember', 'Store a fact instantly: npx vektor remember "I prefer TypeScript"'],
|
|
52
|
+
['ask', 'Ask a question using your memory: npx vektor ask "what stack am I using?"'],
|
|
53
|
+
['agent', 'Autonomous goal executor: npx vektor agent "research X and summarise"'],
|
|
54
|
+
['briefing', 'Generate a morning briefing from recent memories'],
|
|
55
|
+
['rem', 'Run the REM dream cycle — compress and consolidate memories'],
|
|
56
|
+
['tui', 'Launch the interactive memory browser (terminal UI)'],
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
memoryCmds.forEach(([cmd, desc]) => {
|
|
60
|
+
console.log(' ' + cyan(('npx vektor ' + cmd).padEnd(26)) + dim(desc));
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
console.log('');
|
|
64
|
+
console.log(bold(' SYSTEM COMMANDS\n'));
|
|
48
65
|
|
|
49
|
-
const
|
|
66
|
+
const sysCmds = [
|
|
50
67
|
['setup', 'First-run wizard — activate licence, test memory, configure integrations'],
|
|
51
68
|
['activate', 'Activate your licence key on this machine'],
|
|
52
69
|
['deactivate', "Free up this machine's activation slot"],
|
|
53
70
|
['status', 'Show licence status, memory stats, and system info'],
|
|
54
71
|
['test', 'Run a quick memory test (remember + recall + briefing)'],
|
|
55
72
|
['mcp', 'Start the Claude MCP server (for Claude Desktop)'],
|
|
56
|
-
['tui', 'Launch the interactive memory browser (terminal UI)'],
|
|
57
|
-
['rem', 'Run the REM dream cycle on your memory database'],
|
|
58
|
-
['briefing', 'Generate a morning briefing from recent memories'],
|
|
59
73
|
['help', 'Show this help message'],
|
|
60
74
|
];
|
|
61
75
|
|
|
62
|
-
|
|
76
|
+
sysCmds.forEach(([cmd, desc]) => {
|
|
63
77
|
console.log(' ' + cyan(('npx vektor ' + cmd).padEnd(26)) + dim(desc));
|
|
64
78
|
});
|
|
65
79
|
|
|
80
|
+
console.log('');
|
|
81
|
+
console.log(bold(' CHAT PROVIDERS\n'));
|
|
82
|
+
console.log(' ' + cyan('--provider claude ') + ' ' + dim('Anthropic Claude (ANTHROPIC_API_KEY)'));
|
|
83
|
+
console.log(' ' + cyan('--provider openai ') + ' ' + dim('OpenAI GPT (OPENAI_API_KEY)'));
|
|
84
|
+
console.log(' ' + cyan('--provider groq ') + ' ' + dim('Groq LLaMA (GROQ_API_KEY)'));
|
|
85
|
+
console.log(' ' + cyan('--provider gemini ') + ' ' + dim('Google Gemini (GEMINI_API_KEY)'));
|
|
86
|
+
console.log(' ' + cyan('--provider ollama ') + ' ' + dim('Local Ollama (free, ollama serve)'));
|
|
87
|
+
|
|
66
88
|
console.log('');
|
|
67
89
|
console.log(bold(' ENVIRONMENT\n'));
|
|
68
|
-
console.log(' ' + cyan('VEKTOR_LICENCE_KEY') + ' ' + dim('Your Polar licence key
|
|
90
|
+
console.log(' ' + cyan('VEKTOR_LICENCE_KEY') + ' ' + dim('Your Polar licence key'));
|
|
69
91
|
console.log(' ' + cyan('VEKTOR_DB_PATH ') + ' ' + dim('Path to memory database (default: ~/vektor-slipstream-memory.db)'));
|
|
70
|
-
console.log(' ' + cyan('
|
|
92
|
+
console.log(' ' + cyan('VEKTOR_PROVIDER ') + ' ' + dim('Default LLM provider (default: ollama)'));
|
|
93
|
+
console.log(' ' + cyan('VEKTOR_AGENT_ID ') + ' ' + dim('Agent identifier (default: vektor-cli)'));
|
|
71
94
|
console.log('');
|
|
72
95
|
console.log(bold(' EXAMPLES\n'));
|
|
73
|
-
console.log(dim(' #
|
|
74
|
-
console.log(' npx vektor
|
|
96
|
+
console.log(dim(' # Start chatting with persistent memory (uses Ollama by default)'));
|
|
97
|
+
console.log(' npx vektor chat\n');
|
|
98
|
+
console.log(dim(' # Chat with Claude'));
|
|
99
|
+
console.log(' npx vektor chat --provider claude\n');
|
|
100
|
+
console.log(dim(' # Store a fact instantly'));
|
|
101
|
+
console.log(' npx vektor remember "Client deadline is April 20th" --importance 5\n');
|
|
102
|
+
console.log(dim(' # Ask your memory a question'));
|
|
103
|
+
console.log(' npx vektor ask "what projects am I working on?"\n');
|
|
104
|
+
console.log(dim(' # Run an autonomous research agent'));
|
|
105
|
+
console.log(' npx vektor agent "research VEKTOR competitors and summarise findings"\n');
|
|
106
|
+
console.log(dim(' # Pipe content into memory'));
|
|
107
|
+
console.log(' cat README.md | npx vektor remember\n');
|
|
75
108
|
console.log(dim(' # Connect to Claude Desktop'));
|
|
76
109
|
console.log(' npx vektor mcp\n');
|
|
77
|
-
console.log(dim(' # Browse your memory interactively'));
|
|
78
|
-
console.log(' npx vektor tui\n');
|
|
79
|
-
console.log(dim(' # Run overnight memory compression'));
|
|
80
|
-
console.log(' npx vektor rem\n');
|
|
81
|
-
console.log(dim(' # Check everything is working'));
|
|
82
|
-
console.log(' npx vektor status\n');
|
|
83
110
|
console.log(' ' + dim('Purchase at: https://vektormemory.com/product#pricing'));
|
|
84
111
|
console.log('');
|
|
85
112
|
}
|
|
@@ -117,6 +144,20 @@ async function cmdStatus() {
|
|
|
117
144
|
try { require('onnxruntime-node'); hasOnnx = true; } catch (_) {}
|
|
118
145
|
console.log(' ONNX runtime ' + (hasOnnx ? green('✓ installed') : red('✗ missing (npm install onnxruntime-node)')));
|
|
119
146
|
|
|
147
|
+
// Provider check
|
|
148
|
+
const provider = process.env.VEKTOR_PROVIDER || 'ollama';
|
|
149
|
+
console.log(' LLM provider ' + cyan(provider));
|
|
150
|
+
if (provider === 'ollama') {
|
|
151
|
+
try {
|
|
152
|
+
const res = await fetch('http://localhost:11434/api/tags', { signal: AbortSignal.timeout(2000) });
|
|
153
|
+
const data = await res.json();
|
|
154
|
+
const models = data.models?.map(m => m.name).join(', ') || 'none';
|
|
155
|
+
console.log(' Ollama models ' + green('✓ running') + dim(' — ' + models));
|
|
156
|
+
} catch {
|
|
157
|
+
console.log(' Ollama ' + yellow('– not running (start with: ollama serve)'));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
120
161
|
console.log('\n ' + cyan('vektor-slipstream') + ' ' + dim('v' + PKG.version));
|
|
121
162
|
console.log('');
|
|
122
163
|
}
|
|
@@ -235,7 +276,6 @@ async function cmdMcp() {
|
|
|
235
276
|
console.error(red(' ✗ MCP server not found: ') + mcpScript);
|
|
236
277
|
process.exit(1);
|
|
237
278
|
}
|
|
238
|
-
// Override argv so the MCP script sees --mcp flag
|
|
239
279
|
process.argv = ['node', mcpScript, '--mcp'];
|
|
240
280
|
require(mcpScript);
|
|
241
281
|
}
|
|
@@ -275,7 +315,6 @@ async function cmdRem() {
|
|
|
275
315
|
licenceKey: process.env.VEKTOR_LICENCE_KEY,
|
|
276
316
|
});
|
|
277
317
|
|
|
278
|
-
// ── Phase 1: Audit ──────────────────────────────────────────────────────
|
|
279
318
|
console.log(' ' + dim('┌─ Phase 1/4 Auditing memory graph...'));
|
|
280
319
|
const stats = await memory.stats();
|
|
281
320
|
const total = stats.total || 0;
|
|
@@ -286,12 +325,10 @@ async function cmdRem() {
|
|
|
286
325
|
return;
|
|
287
326
|
}
|
|
288
327
|
|
|
289
|
-
// ── Phase 2: Surface recent activity ───────────────────────────────────
|
|
290
328
|
console.log(' ' + dim('├─ Phase 2/4 Scanning recent activity...'));
|
|
291
329
|
const recent = await memory.recent(20);
|
|
292
330
|
console.log(dim(' │ Recent nodes scanned: ' + (recent ? recent.length : 0)));
|
|
293
331
|
|
|
294
|
-
// ── Phase 3: Prune noise nodes ──────────────────────────────────────────
|
|
295
332
|
console.log(' ' + dim('├─ Phase 3/4 Pruning noise nodes...'));
|
|
296
333
|
let pruned = 0;
|
|
297
334
|
const NOISE = [
|
|
@@ -311,7 +348,6 @@ async function cmdRem() {
|
|
|
311
348
|
}
|
|
312
349
|
console.log(dim(' │ Noise nodes pruned: ' + pruned));
|
|
313
350
|
|
|
314
|
-
// ── Phase 4: Briefing as consolidation summary ──────────────────────────
|
|
315
351
|
console.log(' ' + dim('├─ Phase 4/4 Generating consolidation summary...'));
|
|
316
352
|
let briefSnippet = '';
|
|
317
353
|
try {
|
|
@@ -319,7 +355,6 @@ async function cmdRem() {
|
|
|
319
355
|
if (brief) briefSnippet = brief.slice(0, 120) + (brief.length > 120 ? '...' : '');
|
|
320
356
|
} catch { /* non-fatal */ }
|
|
321
357
|
|
|
322
|
-
// ── Result ──────────────────────────────────────────────────────────────
|
|
323
358
|
const statsAfter = await memory.stats();
|
|
324
359
|
const totalAfter = statsAfter.total || 0;
|
|
325
360
|
const delta = total - totalAfter;
|
|
@@ -372,6 +407,7 @@ async function cmdBriefing() {
|
|
|
372
407
|
console.log('\n ' + dim('─────────────────────────────────────────────────────'));
|
|
373
408
|
} else {
|
|
374
409
|
console.log(dim(' No briefing available — add more memories first.'));
|
|
410
|
+
console.log(dim(' Try: npx vektor chat or npx vektor remember "some fact"'));
|
|
375
411
|
}
|
|
376
412
|
} catch (e) {
|
|
377
413
|
console.error(red(' ✗ Briefing error: ') + e.message);
|
|
@@ -386,6 +422,25 @@ async function cmdSetup() {
|
|
|
386
422
|
require('./vektor-setup');
|
|
387
423
|
}
|
|
388
424
|
|
|
425
|
+
// ── Chat / Remember / Ask / Agent — from vektor-cli-chat.js ──────────────────
|
|
426
|
+
|
|
427
|
+
async function cmdChat() { const { cmdChat } = require('./vektor-cli-chat'); await cmdChat(process.argv); }
|
|
428
|
+
async function cmdRemember() { const { cmdRemember } = require('./vektor-cli-chat'); await cmdRemember(process.argv); }
|
|
429
|
+
async function cmdAsk() { const { cmdAsk } = require('./vektor-cli-chat'); await cmdAsk(process.argv); }
|
|
430
|
+
async function cmdAgent() { const { cmdAgent } = require('./vektor-cli-chat'); await cmdAgent(process.argv); }
|
|
431
|
+
|
|
432
|
+
// ── Pipe support — cat file.txt | npx vektor remember ────────────────────────
|
|
433
|
+
async function handlePipe() {
|
|
434
|
+
if (process.stdin.isTTY) return false;
|
|
435
|
+
const chunks = [];
|
|
436
|
+
for await (const chunk of process.stdin) chunks.push(chunk);
|
|
437
|
+
const piped = chunks.join('').trim();
|
|
438
|
+
if (!piped) return false;
|
|
439
|
+
// Inject piped content as the text argument
|
|
440
|
+
process.argv.push(piped);
|
|
441
|
+
return true;
|
|
442
|
+
}
|
|
443
|
+
|
|
389
444
|
// ── Router ────────────────────────────────────────────────────────────────────
|
|
390
445
|
|
|
391
446
|
const commands = {
|
|
@@ -399,6 +454,11 @@ const commands = {
|
|
|
399
454
|
rem: cmdRem,
|
|
400
455
|
briefing: cmdBriefing,
|
|
401
456
|
setup: cmdSetup,
|
|
457
|
+
// New commands
|
|
458
|
+
chat: cmdChat,
|
|
459
|
+
remember: cmdRemember,
|
|
460
|
+
ask: cmdAsk,
|
|
461
|
+
agent: cmdAgent,
|
|
402
462
|
};
|
|
403
463
|
|
|
404
464
|
const fn = commands[command];
|
|
@@ -408,7 +468,15 @@ if (!fn) {
|
|
|
408
468
|
process.exit(1);
|
|
409
469
|
}
|
|
410
470
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
471
|
+
// Handle pipe for remember command
|
|
472
|
+
if (command === 'remember') {
|
|
473
|
+
handlePipe().then(() => fn()).catch(e => {
|
|
474
|
+
console.error(red('\n ✗ Error: ') + e.message);
|
|
475
|
+
process.exit(1);
|
|
476
|
+
});
|
|
477
|
+
} else {
|
|
478
|
+
fn().catch(e => {
|
|
479
|
+
console.error(red('\n ✗ Error: ') + e.message);
|
|
480
|
+
process.exit(1);
|
|
481
|
+
});
|
|
482
|
+
}
|