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