vektor-slipstream 1.4.0 → 1.4.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 +241 -237
- package/package.json +2 -2
- package/vektor-cli.js +94 -26
package/README.md
CHANGED
|
@@ -1,237 +1,241 @@
|
|
|
1
|
-
# vektor-slipstream
|
|
2
|
-
|
|
3
|
-
Hardware-accelerated persistent memory for AI agents. Local-first. No cloud. One-time payment.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/vektor-slipstream)
|
|
6
|
-
[](https://vektormemory.com/product#pricing)
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npm install vektor-slipstream
|
|
12
|
-
npx vektor setup
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Quick Start
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
const { createMemory } = require('vektor-slipstream');
|
|
19
|
-
|
|
20
|
-
const memory = await createMemory({
|
|
21
|
-
agentId: 'my-agent',
|
|
22
|
-
licenceKey: process.env.VEKTOR_LICENCE_KEY,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Store a memory
|
|
26
|
-
await memory.remember('User prefers TypeScript over JavaScript');
|
|
27
|
-
|
|
28
|
-
// Recall by semantic similarity — avg 8ms, fully local
|
|
29
|
-
const results = await memory.recall('coding preferences', 5);
|
|
30
|
-
// → [{ content, score, id }]
|
|
31
|
-
|
|
32
|
-
// Traverse the graph
|
|
33
|
-
const graph = await memory.graph('TypeScript', { hops: 2 });
|
|
34
|
-
|
|
35
|
-
// What changed in 7 days?
|
|
36
|
-
const delta = await memory.delta('project decisions', 7);
|
|
37
|
-
|
|
38
|
-
// Morning briefing
|
|
39
|
-
const brief = await memory.briefing();
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## CLI
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npx vektor setup # First-run wizard — licence, hardware, integrations
|
|
46
|
-
npx vektor activate # Activate licence key on this machine
|
|
47
|
-
npx vektor test # Test memory engine with progress bar
|
|
48
|
-
npx vektor status # System health check
|
|
49
|
-
npx vektor mcp # Start Claude Desktop MCP server
|
|
50
|
-
npx vektor rem # Run REM dream cycle
|
|
51
|
-
npx vektor
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
↓
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
- **
|
|
181
|
-
- **
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- `
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
|
210
|
-
|
|
211
|
-
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
1
|
+
# vektor-slipstream
|
|
2
|
+
|
|
3
|
+
Hardware-accelerated persistent memory for AI agents. Local-first. No cloud. One-time payment.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/vektor-slipstream)
|
|
6
|
+
[](https://vektormemory.com/product#pricing)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install vektor-slipstream
|
|
12
|
+
npx vektor setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
const { createMemory } = require('vektor-slipstream');
|
|
19
|
+
|
|
20
|
+
const memory = await createMemory({
|
|
21
|
+
agentId: 'my-agent',
|
|
22
|
+
licenceKey: process.env.VEKTOR_LICENCE_KEY,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Store a memory
|
|
26
|
+
await memory.remember('User prefers TypeScript over JavaScript');
|
|
27
|
+
|
|
28
|
+
// Recall by semantic similarity — avg 8ms, fully local
|
|
29
|
+
const results = await memory.recall('coding preferences', 5);
|
|
30
|
+
// → [{ content, score, id }]
|
|
31
|
+
|
|
32
|
+
// Traverse the graph
|
|
33
|
+
const graph = await memory.graph('TypeScript', { hops: 2 });
|
|
34
|
+
|
|
35
|
+
// What changed in 7 days?
|
|
36
|
+
const delta = await memory.delta('project decisions', 7);
|
|
37
|
+
|
|
38
|
+
// Morning briefing
|
|
39
|
+
const brief = await memory.briefing();
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## CLI
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx vektor setup # First-run wizard — licence, hardware, integrations
|
|
46
|
+
npx vektor activate # Activate licence key on this machine
|
|
47
|
+
npx vektor test # Test memory engine with progress bar
|
|
48
|
+
npx vektor status # System health check
|
|
49
|
+
npx vektor mcp # Start Claude Desktop MCP server
|
|
50
|
+
npx vektor rem # Run REM dream cycle
|
|
51
|
+
npx vektor chat # Persistent memory chat (all LLMs)
|
|
52
|
+
npx vektor remember # Store a fact: npx vektor remember "I prefer TypeScript"
|
|
53
|
+
npx vektor ask # Query memory: npx vektor ask "what stack am I using?"
|
|
54
|
+
npx vektor agent # Autonomous goal executor
|
|
55
|
+
npx vektor help # All commands
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## CLOAK — Developer Context Layer for Claude Code
|
|
59
|
+
|
|
60
|
+
CLOAK is a 4-tool MCP layer that gives Claude Code persistent memory of your project.
|
|
61
|
+
Every session starts with full context. Every error is remembered. Every wasted token is tracked.
|
|
62
|
+
|
|
63
|
+
### What it does
|
|
64
|
+
|
|
65
|
+
| Tool | Does exactly one thing |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `cloak_cortex` | Scans project files, builds a token-aware anatomy index in Vektor's entity graph |
|
|
68
|
+
| `cloak_axon` | Session boundary handler — loads last context on start, saves MemCell on stop |
|
|
69
|
+
| `cloak_cerebellum` | Pre-write enforcer — checks writes against known error patterns, auto-resolves fixes |
|
|
70
|
+
| `cloak_token` | Token ledger — detects repeated reads and waste, one summary write per session |
|
|
71
|
+
|
|
72
|
+
### Import
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
const { runCortex } = require('vektor-slipstream/cloak/cortex');
|
|
76
|
+
const { onSessionStart,
|
|
77
|
+
onSessionStop } = require('vektor-slipstream/cloak/axon');
|
|
78
|
+
const { checkWrite,
|
|
79
|
+
recordError } = require('vektor-slipstream/cloak/cerebellum');
|
|
80
|
+
const { getSessionSummary} = require('vektor-slipstream/cloak/token');
|
|
81
|
+
|
|
82
|
+
// Clean terminal output (replaces emoji with box-drawing chars)
|
|
83
|
+
const { createMemory } = require('vektor-slipstream/boot');
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Claude Code setup
|
|
87
|
+
|
|
88
|
+
Add to `.claude/settings.json` in your project:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"cloak": {
|
|
94
|
+
"command": "node",
|
|
95
|
+
"args": ["/path/to/node_modules/vektor-slipstream/index.js"],
|
|
96
|
+
"env": {
|
|
97
|
+
"VEKTOR_LICENCE_KEY": "your-licence-key",
|
|
98
|
+
"CLOAK_PROJECT_PATH": "/path/to/your/project"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"hooks": {
|
|
103
|
+
"SessionStart": [{ "type": "command", "command": "node /path/to/node_modules/vektor-slipstream/index.js --hook SessionStart" }],
|
|
104
|
+
"Stop": [{ "type": "command", "command": "node /path/to/node_modules/vektor-slipstream/index.js --hook Stop" }],
|
|
105
|
+
"PreToolUse": [{ "type": "command", "command": "node /path/to/node_modules/vektor-slipstream/index.js --hook PreToolUse" }],
|
|
106
|
+
"PostToolUse": [{ "type": "command", "command": "node /path/to/node_modules/vektor-slipstream/index.js --hook PostToolUse" }]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Usage
|
|
112
|
+
|
|
113
|
+
```js
|
|
114
|
+
// Scan project files into Vektor entity graph (call once on init)
|
|
115
|
+
await cloak_cortex({})
|
|
116
|
+
|
|
117
|
+
// Start session — loads last context automatically
|
|
118
|
+
await cloak_axon({ action: 'start' })
|
|
119
|
+
|
|
120
|
+
// Check before a risky write
|
|
121
|
+
await cloak_cerebellum({
|
|
122
|
+
action: 'check',
|
|
123
|
+
content: '...code...',
|
|
124
|
+
filePath: 'src/auth.ts'
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// Record a bug you just hit
|
|
128
|
+
await cloak_cerebellum({
|
|
129
|
+
action: 'record_error',
|
|
130
|
+
description: 'Null ref on user.id when DB returns empty',
|
|
131
|
+
filePath: 'src/auth.ts',
|
|
132
|
+
errorType: 'null_reference',
|
|
133
|
+
fix: 'Add guard: if (user && user.id)'
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
// Save session with intent — the "why" not just the "what"
|
|
137
|
+
await cloak_axon({
|
|
138
|
+
action: 'stop',
|
|
139
|
+
narrative: 'Fixed null reference in auth module'
|
|
140
|
+
})
|
|
141
|
+
|
|
142
|
+
// Check token waste
|
|
143
|
+
await cloak_token({ action: 'summary' })
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Architecture
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Claude Code
|
|
150
|
+
↓ hooks + MCP tool calls
|
|
151
|
+
CLOAK (4 tools, ~800 lines Node.js)
|
|
152
|
+
↓ memory.remember() / memory.recall()
|
|
153
|
+
Vektor / MAGMA
|
|
154
|
+
↓ 4-layer graph (semantic, temporal, causal, entity)
|
|
155
|
+
SQLite-vec (local, no cloud)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### DB growth
|
|
159
|
+
|
|
160
|
+
CLOAK writes 3-5 nodes per session — not per operation.
|
|
161
|
+
At 1 year of daily use: ~1,000 nodes. Sub-millisecond recall throughout.
|
|
162
|
+
|
|
163
|
+
> ⚠️ **Concurrency warning**: Use stdio MCP (default). The HTTP mode
|
|
164
|
+
> (`CLOAK_HTTP=1`) does not support concurrent multi-agent sessions.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## What's Included
|
|
169
|
+
|
|
170
|
+
### Memory Core (MAGMA)
|
|
171
|
+
|
|
172
|
+
- 4-layer associative graph — semantic, causal, temporal, entity
|
|
173
|
+
- AUDN curation loop — zero contradictions, zero duplicates
|
|
174
|
+
- REM dream cycle — up to 50:1 compression
|
|
175
|
+
- Sub-20ms recall — HNSW index, local SQLite
|
|
176
|
+
- Local ONNX embeddings — $0 embedding cost, no API key required
|
|
177
|
+
|
|
178
|
+
### Integrations
|
|
179
|
+
|
|
180
|
+
- **Claude MCP** — `vektor_recall`, `vektor_store`, `vektor_graph`, `vektor_delta`
|
|
181
|
+
- **Claude Code** — CLOAK 4-tool developer context layer (see above)
|
|
182
|
+
- **LangChain** — v1 + v2 adapter included
|
|
183
|
+
- **OpenAI Agents SDK** — drop-in integration
|
|
184
|
+
- **Mistral** — `vektor_memoire` HTTP tool, localhost bridge
|
|
185
|
+
- **Gemini · Groq · Ollama** — provider agnostic
|
|
186
|
+
|
|
187
|
+
### Cloak (Sovereign Identity)
|
|
188
|
+
|
|
189
|
+
- `cloak_fetch` — stealth headless browser fetch
|
|
190
|
+
- `cloak_render` — computed CSS · post-JS DOM sensor
|
|
191
|
+
- `cloak_passport` — AES-256-GCM credential vault, machine-bound
|
|
192
|
+
- `cloak_diff` — semantic diff since last fetch
|
|
193
|
+
- `tokens_saved` — ROI audit per session
|
|
194
|
+
|
|
195
|
+
```js
|
|
196
|
+
const { cloak_passport, cloak_fetch, tokens_saved } = require('vektor-slipstream/cloak');
|
|
197
|
+
|
|
198
|
+
cloak_passport('GITHUB_TOKEN', 'ghp_xxxx');
|
|
199
|
+
const token = cloak_passport('GITHUB_TOKEN');
|
|
200
|
+
|
|
201
|
+
const { text, tokensSaved } = await cloak_fetch('https://example.com');
|
|
202
|
+
|
|
203
|
+
const roi = tokens_saved({ raw_tokens: 10000, actual_tokens: 3000 });
|
|
204
|
+
// → { reduction_pct: 70, cost_saved_usd: 0.0175, roi_multiple: 2.3 }
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Performance
|
|
208
|
+
|
|
209
|
+
| Metric | Value |
|
|
210
|
+
|--------|-------|
|
|
211
|
+
| Recall latency | ~8ms avg (local SQLite) |
|
|
212
|
+
| Embedding cost | $0 — fully local ONNX |
|
|
213
|
+
| Embedding latency | ~10ms GPU / ~25ms CPU |
|
|
214
|
+
| First run | ~2 min (downloads ~25MB model once) |
|
|
215
|
+
| Subsequent boots | <100ms |
|
|
216
|
+
|
|
217
|
+
## Hardware Auto-Detection
|
|
218
|
+
|
|
219
|
+
Zero config. VEKTOR detects and uses the best available accelerator:
|
|
220
|
+
|
|
221
|
+
- **NVIDIA CUDA** — GPU acceleration
|
|
222
|
+
- **Apple Silicon** — CoreML
|
|
223
|
+
- **CPU** — optimised fallback, works everywhere
|
|
224
|
+
|
|
225
|
+
## Licence
|
|
226
|
+
|
|
227
|
+
Commercial licence. One-time payment of $159. Activates on up to 3 machines.
|
|
228
|
+
Manage at [polar.sh](https://polar.sh).
|
|
229
|
+
|
|
230
|
+
Purchase: [vektormemory.com/product#pricing](https://vektormemory.com/product#pricing)
|
|
231
|
+
Docs: [vektormemory.com/docs](https://vektormemory.com/docs)
|
|
232
|
+
Support: hello@vektormemory.com
|
|
233
|
+
|
|
234
|
+
## Research
|
|
235
|
+
|
|
236
|
+
Built on peer-reviewed research:
|
|
237
|
+
|
|
238
|
+
- [MAGMA (arxiv:2601.03236)](https://arxiv.org/abs/2601.03236) — Multi-Graph Agentic Memory Architecture
|
|
239
|
+
- [EverMemOS (arxiv:2601.02163)](https://arxiv.org/abs/2601.02163) — Self-Organizing Memory OS
|
|
240
|
+
- [HippoRAG (arxiv:2405.14831)](https://arxiv.org/abs/2405.14831) — Neurobiologically Inspired Long-Term Memory (NeurIPS 2024)
|
|
241
|
+
- [Mem0 (arxiv:2504.19413)](https://arxiv.org/abs/2504.19413) — Production-Ready Agent Memory
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vektor-slipstream",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
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
|
+
}
|