vektor-slipstream 1.4.4 → 2.0.0

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 (56) hide show
  1. package/README.md +67 -306
  2. package/package.json +14 -146
  3. package/CHANGELOG.md +0 -139
  4. package/LICENSE +0 -33
  5. package/TENETS.md +0 -189
  6. package/audn-log.js +0 -143
  7. package/axon.js +0 -389
  8. package/boot-patch.js +0 -33
  9. package/boot-screen.html +0 -210
  10. package/briefing.js +0 -150
  11. package/cerebellum.js +0 -439
  12. package/cloak-behaviour.js +0 -596
  13. package/cloak-captcha.js +0 -541
  14. package/cloak-core.js +0 -499
  15. package/cloak-identity.js +0 -484
  16. package/cloak-index.js +0 -261
  17. package/cloak-llms.js +0 -163
  18. package/cloak-pattern-store.js +0 -471
  19. package/cloak-recorder-auto.js +0 -297
  20. package/cloak-recorder-snippet.js +0 -119
  21. package/cloak-turbo-quant.js +0 -357
  22. package/cloak-warmup.js +0 -240
  23. package/cortex.js +0 -221
  24. package/detect-hardware.js +0 -181
  25. package/entity-resolver.js +0 -298
  26. package/errors.js +0 -66
  27. package/examples/example-claude-mcp.js +0 -220
  28. package/examples/example-langchain-researcher.js +0 -82
  29. package/examples/example-openai-assistant.js +0 -84
  30. package/examples/examples-README.md +0 -161
  31. package/export-import.js +0 -221
  32. package/forget.js +0 -148
  33. package/inspect.js +0 -199
  34. package/mistral/README-mistral.md +0 -123
  35. package/mistral/mistral-bridge.js +0 -218
  36. package/mistral/mistral-setup.js +0 -220
  37. package/mistral/vektor-tool-manifest.json +0 -41
  38. package/models/model_quantized.onnx +0 -0
  39. package/models/vocab.json +0 -1
  40. package/namespace.js +0 -186
  41. package/pin.js +0 -91
  42. package/slipstream-core-extended.js +0 -134
  43. package/slipstream-core.js +0 -1
  44. package/slipstream-db.js +0 -140
  45. package/slipstream-embedder.js +0 -338
  46. package/sovereign.js +0 -142
  47. package/token.js +0 -322
  48. package/types/index.d.ts +0 -269
  49. package/vektor-banner-loader.js +0 -109
  50. package/vektor-cli.js +0 -259
  51. package/vektor-licence-prompt.js +0 -128
  52. package/vektor-licence.js +0 -192
  53. package/vektor-setup.js +0 -270
  54. package/vektor-slipstream.dxt +0 -0
  55. package/vektor-tui.js +0 -373
  56. package/visualize.js +0 -235
package/LICENSE DELETED
@@ -1,33 +0,0 @@
1
- VEKTOR SLIPSTREAM — COMMERCIAL LICENCE
2
-
3
- Copyright (c) 2026 VEKTOR Memory (vektormemory.com)
4
-
5
- This software is licensed, not sold. Purchase of a Vektor Slipstream licence
6
- grants you a non-exclusive, non-transferable right to use this software in
7
- accordance with the following terms:
8
-
9
- PERMITTED:
10
- - Use in personal, commercial, and client projects
11
- - Embed in products you sell or SaaS platforms
12
- - Deploy on up to 3 machines per licence key
13
- - Modify for your own use (modifications are not redistributable)
14
-
15
- NOT PERMITTED:
16
- - Redistribute, resell, or sublicense this software
17
- - Remove or modify licence enforcement mechanisms
18
- - Share your licence key with others
19
- - Use in projects that compete directly with VEKTOR Memory
20
-
21
- LICENCE ENFORCEMENT:
22
- This software requires a valid licence key from vektormemory.com.
23
- Licence keys are validated via Polar (polar.sh) and cached locally.
24
- Each key activates on up to 3 machines.
25
-
26
- SOVEREIGNTY GUARANTEE:
27
- Core SDK functionality remains a one-time purchase permanently.
28
- No mandatory subscription will ever be required for the memory core,
29
- AUDN loop, REM cycle, or integration adapters included in this package.
30
-
31
- Purchase: https://vektormemory.com/product#pricing
32
- Support: hello@vektormemory.com
33
- Docs: https://vektormemory.com/docs
package/TENETS.md DELETED
@@ -1,189 +0,0 @@
1
- # The 8 Sovereign Laws of Vektor Slipstream
2
-
3
- Vektor Slipstream is built on a two-tier trust framework.
4
-
5
- **Tier 1 — Architectural Laws** are enforced by the code itself.
6
- You can verify every one of them by inspecting the source.
7
-
8
- **Tier 2 — Design Commitments** are the principles that shaped every
9
- engineering decision. They are auditable in how the system behaves,
10
- not enforced at runtime (except Law VIII, which is opt-in).
11
-
12
- ---
13
-
14
- ## Tier 1 — Architectural Laws
15
- *Enforced by the code. Verifiable by inspection.*
16
-
17
- ### Law I — Locality
18
- **Data never leaves your machine.**
19
-
20
- All memory operations read and write to a local SQLite file.
21
- No outbound network calls are made for memory storage, retrieval,
22
- or embedding. LLM inference uses the provider you configure under
23
- your own API key.
24
-
25
- **Verify it:**
26
- ```bash
27
- grep -r "fetch\|axios\|http\|https" src/slipstream-core.js | grep -v "provider"
28
- # Returns nothing — no outbound memory calls exist
29
- ```
30
-
31
- **In the code:** `createMemory({ dbPath })` — the only write path
32
- is the SQLite adapter. There is no cloud sync path in the codebase.
33
-
34
- ---
35
-
36
- ### Law II — Epistemological Hygiene
37
- **Every write passes through AUDN curation. No exceptions.**
38
-
39
- Every call to `memory.remember()` routes through the AUDN loop
40
- before writing. The system decides: ADD new info, UPDATE an existing
41
- node, DELETE a contradiction, or NO_OP if already known.
42
- Duplicates and drift are structurally impossible.
43
-
44
- **Verify it:**
45
- ```bash
46
- grep -n "remember" src/slipstream-core.js
47
- # Every path leads through audn() before any db.run()
48
- ```
49
-
50
- **In the code:** `memory.remember(text)` → `audn(text)` → `ADD | UPDATE | DELETE | NO_OP` → SQLite write
51
-
52
- ---
53
-
54
- ### Law III — Continual Synthesis
55
- **The REM cycle compresses. It never injects.**
56
-
57
- The 7-phase REM cycle only removes or consolidates existing memories.
58
- It never adds new information from external sources. Compression is
59
- one-way: fragments collapse into insights. The graph grows wiser,
60
- not larger.
61
-
62
- **Verify it:**
63
- ```bash
64
- grep -n "INSERT\|remember" src/rem.js
65
- # All INSERTs are rewrites of existing nodes — no external data source
66
- ```
67
-
68
- **In the code:** `memory.dream()` — reads the fragment pool, writes
69
- consolidated insights, tombstones the originals. No external fetch.
70
-
71
- ---
72
-
73
- ### Law IV — Object Permanence
74
- **Memory survives all session resets.**
75
-
76
- The SQLite graph persists across process restarts, provider changes,
77
- and agent redeployments. The `.db` file is the complete state.
78
- Backup is a file copy. Migration is a file move.
79
-
80
- **Verify it:**
81
- ```bash
82
- ls -lh ./your-agent.db
83
- # Kill the process. Restart. Memory is intact.
84
- ```
85
-
86
- **In the code:** `createMemory({ dbPath: './agent.db' })` —
87
- no in-memory-only state path exists. SQLite is the only store.
88
-
89
- ---
90
-
91
- ## Tier 2 — Design Commitments
92
- *Principles that shaped every engineering decision.
93
- Auditable in how the system behaves, not enforced at runtime.*
94
-
95
- ---
96
-
97
- ### Law V — Signal Purity
98
- **Retrieval returns relevance, not recency.**
99
-
100
- Recall is ranked by combined importance score and cosine similarity —
101
- not insertion order or timestamp. A memory from six months ago
102
- surfaces if it is more relevant than one from yesterday.
103
-
104
- **Auditable in:** `memory.recall()` ranking logic —
105
- `ORDER BY (importance_score * cos_similarity) DESC`,
106
- never `ORDER BY created_at DESC`.
107
-
108
- ---
109
-
110
- ### Law VI — Separation of Concerns
111
- **Memory and identity are separate systems.**
112
-
113
- The MAGMA graph holds what the agent knows.
114
- The Cloak vault holds who the agent is.
115
- These are separate storage systems with separate access paths.
116
- Compromising one does not compromise the other.
117
-
118
- **Auditable in:** `slipstream-memory.db` ≠ `vault.enc` —
119
- different files, different encryption keys, different access methods.
120
-
121
- ---
122
-
123
- ### Law VII — Harm Avoidance
124
- **No code path knowingly facilitates harm.**
125
-
126
- No feature in Vektor Slipstream is designed to enable surveillance,
127
- manipulation, or harm. This is a design commitment, not runtime
128
- enforcement. Operators are accountable for what their agents do
129
- with persistent memory.
130
-
131
- **Auditable in:** codebase review — no profiling, tracking, or
132
- behavioural manipulation primitives exist in the SDK.
133
-
134
- ---
135
-
136
- ### Law VIII — Injection Resistance *(opt-in enforcement)*
137
- **Prompt injection surface is minimised by design.
138
- Full enforcement is available on request.**
139
-
140
- AUDN prompt inputs are delimited before LLM evaluation.
141
- Recalled memories are clearly bounded in context to prevent
142
- bleed into system instructions.
143
-
144
- Full injection-shield screening is available as an opt-in flag
145
- for operators who require it. It adds approximately 80ms per write.
146
-
147
- ```js
148
- const memory = await createMemory({
149
- agentId: 'my-agent',
150
- licenceKey: process.env.VEKTOR_KEY,
151
- dbPath: './agent.db',
152
- sovereign: true // enables Law VIII enforcement
153
- });
154
- ```
155
-
156
- **Auditable in:** `sovereign.js` — input screening wrapper,
157
- loaded only when `sovereign: true` is passed to `createMemory()`.
158
-
159
- ---
160
-
161
- ## Boot confirmation
162
-
163
- When Vektor Slipstream initialises, the following is logged to confirm
164
- the laws are active:
165
-
166
- ```
167
- [vektor] Sovereign Agent active
168
- [vektor] Law I ✓ locality — no cloud sync path
169
- [vektor] Law II ✓ hygiene — AUDN on every write
170
- [vektor] Law III ✓ synthesis — REM compress-only
171
- [vektor] Law IV ✓ permanence — SQLite persists
172
- [vektor] Law VIII sovereign: true — injection shield active
173
- ```
174
-
175
- Laws V–VII are design commitments and are not logged at boot.
176
- Law VIII boot line only appears when `sovereign: true` is set.
177
-
178
- ---
179
-
180
- ## The contract
181
-
182
- Tier 1 laws are signed by the architecture.
183
- If any of them are ever violated by a future version of Vektor,
184
- that is a breaking change and will be documented as such in CHANGELOG.md.
185
-
186
- Tier 2 laws are signed by the team.
187
- They are the principles we will not compromise in future development.
188
-
189
- *Version: Slipstream 1.0.2 · Last updated: 2026-04-03*
package/audn-log.js DELETED
@@ -1,143 +0,0 @@
1
- /**
2
- * VEKTOR AUDN audit log — v1.3.7
3
- * Records every ADD/UPDATE/DELETE/NO_OP decision AUDN makes
4
- * before acting on it. Full transparency — nothing disappears silently.
5
- *
6
- * Schema additions required:
7
- * CREATE TABLE IF NOT EXISTS audn_log (
8
- * id INTEGER PRIMARY KEY AUTOINCREMENT,
9
- * agent_id TEXT NOT NULL,
10
- * namespace TEXT NOT NULL,
11
- * action TEXT NOT NULL, -- ADD | UPDATE | DELETE | NO_OP
12
- * memory_id TEXT, -- affected memory id (null for ADD before insert)
13
- * content TEXT, -- snapshot of content at time of action
14
- * reason TEXT, -- why AUDN made this decision
15
- * similarity REAL, -- similarity score that triggered the decision
16
- * ran_at INTEGER DEFAULT (unixepoch())
17
- * );
18
- * CREATE INDEX IF NOT EXISTS idx_audn_log_agent ON audn_log(agent_id, namespace, ran_at);
19
- */
20
-
21
- /**
22
- * logAudn — call this inside AUDN before executing each decision
23
- *
24
- * @param {object} db
25
- * @param {string} agentId
26
- * @param {string} namespace
27
- * @param {object} entry
28
- * @param {string} entry.action - ADD | UPDATE | DELETE | NO_OP
29
- * @param {string} entry.memoryId - memory id (if known)
30
- * @param {string} entry.content - content snapshot
31
- * @param {string} entry.reason - human-readable reason
32
- * @param {number} entry.similarity - cosine score that triggered this
33
- */
34
- export function logAudn(db, agentId, namespace, entry) {
35
- db.prepare(`
36
- INSERT INTO audn_log (agent_id, namespace, action, memory_id, content, reason, similarity)
37
- VALUES (?, ?, ?, ?, ?, ?, ?)
38
- `).run(
39
- agentId,
40
- namespace,
41
- entry.action,
42
- entry.memoryId || null,
43
- entry.content ? entry.content.slice(0, 500) : null,
44
- entry.reason || null,
45
- entry.similarity || null
46
- );
47
- }
48
-
49
- /**
50
- * auditLog(opts) — retrieve AUDN decision history
51
- *
52
- * @param {object} db
53
- * @param {string} agentId
54
- * @param {string} namespace
55
- * @param {object} opts
56
- * @param {number} opts.limit - max rows (default 50)
57
- * @param {string} opts.action - filter to specific action (ADD|UPDATE|DELETE|NO_OP)
58
- * @param {string} opts.since - time filter — '7d', '24h', ISO date
59
- * @returns {object[]}
60
- */
61
- export function auditLog(db, agentId, namespace, opts = {}) {
62
- const { limit = 50, action = null, since = null } = opts;
63
-
64
- let sinceTs = null;
65
- if (since) {
66
- const rel = String(since).match(/^(\d+)(d|h|m)$/);
67
- if (rel) {
68
- const n = parseInt(rel[1]);
69
- const unit = rel[2];
70
- const seconds = unit === 'd' ? n * 86400 : unit === 'h' ? n * 3600 : n * 60;
71
- sinceTs = Math.floor(Date.now() / 1000) - seconds;
72
- } else {
73
- sinceTs = Math.floor(Date.parse(since) / 1000);
74
- }
75
- }
76
-
77
- const actionClause = action ? `AND action = '${action.toUpperCase()}'` : '';
78
- const sinceClause = sinceTs ? `AND ran_at >= ${sinceTs}` : '';
79
-
80
- return db.prepare(`
81
- SELECT id, action, memory_id, content, reason, similarity, ran_at
82
- FROM audn_log
83
- WHERE agent_id = ? AND namespace = ?
84
- ${actionClause}
85
- ${sinceClause}
86
- ORDER BY ran_at DESC
87
- LIMIT ?
88
- `).all(agentId, namespace, limit);
89
- }
90
-
91
- /**
92
- * auditStats() — summary counts by action type
93
- */
94
- export function auditStats(db, agentId, namespace) {
95
- return db.prepare(`
96
- SELECT
97
- action,
98
- COUNT(*) as count,
99
- MAX(ran_at) as last_at
100
- FROM audn_log
101
- WHERE agent_id = ? AND namespace = ?
102
- GROUP BY action
103
- ORDER BY count DESC
104
- `).all(agentId, namespace);
105
- }
106
-
107
- /**
108
- * pruneAuditLog(days) — keep log from growing forever
109
- * Call from REM cycle or a scheduled job
110
- */
111
- export function pruneAuditLog(db, agentId, namespace, keepDays = 30) {
112
- const cutoff = Math.floor(Date.now() / 1000) - keepDays * 86400;
113
- const result = db.prepare(
114
- `DELETE FROM audn_log WHERE agent_id = ? AND namespace = ? AND ran_at < ?`
115
- ).run(agentId, namespace, cutoff);
116
- return { pruned: result.changes };
117
- }
118
-
119
- /**
120
- * Integration into Memory class / AUDN loop:
121
- *
122
- * // Inside AUDN decision logic:
123
- * logAudn(this.db, this.agentId, this.namespace, {
124
- * action: 'DELETE',
125
- * memoryId: existing.id,
126
- * content: existing.content,
127
- * reason: 'Contradicts newer memory with score 0.94',
128
- * similarity: 0.94
129
- * });
130
- * // then execute the delete
131
- *
132
- * // Expose on Memory class:
133
- * auditLog(opts = {}) {
134
- * return auditLog(this.db, this.agentId, this.namespace, opts);
135
- * }
136
- *
137
- * Usage:
138
- * memory.auditLog({ action: 'DELETE', since: '7d' });
139
- * // → [{ id, action:'DELETE', content:'...', reason:'...', ran_at }]
140
- *
141
- * memory.auditLog({ limit: 100 });
142
- * // → last 100 AUDN decisions
143
- */