mumpix 1.0.17 → 1.0.18
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/LICENSE +14 -15
- package/README.md +114 -318
- package/examples/langchain-adapter.js +42 -0
- package/examples/llamaindex-adapter.js +32 -0
- package/package.json +17 -8
- package/src/integrations/developer-sdk.js +10 -3
package/LICENSE
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Copyright (c) 2026 Mumpix (
|
|
1
|
+
Mumpix Business Source License 1.1 (BUSL-1.1)
|
|
2
|
+
Copyright (c) 2026 Mumpix (VDSX). All rights reserved.
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Licensed under the Business Source License 1.1 (the "License").
|
|
5
|
+
You may obtain a copy of the License terms from Licensor.
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
Use Grant:
|
|
8
|
+
- Non-production use, evaluation, and internal development are permitted.
|
|
9
|
+
- Production use requires a commercial agreement with Licensor.
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
Restrictions:
|
|
12
|
+
- You may not offer the software as a competing hosted or embedded commercial service without a commercial license.
|
|
13
|
+
- You may not remove or alter proprietary notices.
|
|
9
14
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- USING THE SOFTWARE FOR INTERNAL BUSINESS OPERATIONS
|
|
13
|
-
- REDISTRIBUTING THE SOFTWARE FOR PROFIT
|
|
14
|
-
IS STRICTLY PROHIBITED WITHOUT AN EXPLICIT COMMERCIAL LICENSE FROM MUMPIX (vdsx.cloud).
|
|
15
|
+
Change Date:
|
|
16
|
+
- This package remains source-available under BUSL-1.1 unless and until Licensor publishes an updated license grant.
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
4. NO WARRANTY: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.
|
|
19
|
-
|
|
20
|
-
By using this Software, you agree to these terms. For commercial licensing inquiries, contact license@vdsx.cloud.
|
|
18
|
+
This software is provided "AS IS", without warranty of any kind.
|
|
19
|
+
For commercial licensing: license@vdsx.cloud
|
package/README.md
CHANGED
|
@@ -1,396 +1,192 @@
|
|
|
1
1
|
# Mumpix
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MumpixDB is the reasoning ledger and structured memory engine for AI systems.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npm install mumpix
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## What this package is
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The `mumpix` npm package is the Node package for MumpixDB.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
It is built for:
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- **LangChain / LlamaIndex adapters** — drop-in integrations
|
|
15
|
+
- durable AI memory
|
|
16
|
+
- ordered reasoning state
|
|
17
|
+
- replayable context
|
|
18
|
+
- local-first storage
|
|
19
|
+
- audit-friendly execution
|
|
21
20
|
|
|
22
|
-
|
|
21
|
+
Core thesis:
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
const { Mumpix } = require('mumpix')
|
|
23
|
+
> Git stores what changed. MumpixDB stores why.
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
const db = await Mumpix.open('./agent.mumpix', { consistency: 'eventual' })
|
|
25
|
+
This package is the database layer. It is separate from higher-level products built on top of MumpixDB, including WYD Code.
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
await db.remember('User prefers TypeScript over JavaScript')
|
|
34
|
-
await db.remember('Project uses pnpm workspaces')
|
|
27
|
+
## Why MumpixDB
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
const answer = await db.recall('what language does the user prefer?')
|
|
38
|
-
console.log(answer)
|
|
39
|
-
// → 'User prefers TypeScript over JavaScript'
|
|
40
|
-
|
|
41
|
-
await db.close()
|
|
42
|
-
```
|
|
29
|
+
Most AI systems fail at the memory layer, not the model layer.
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
MumpixDB gives you:
|
|
45
32
|
|
|
46
|
-
|
|
33
|
+
- local-first storage in a `.mumpix` file
|
|
34
|
+
- append-oriented durable state
|
|
35
|
+
- strict and verified execution modes
|
|
36
|
+
- replayable memory and audit surfaces
|
|
37
|
+
- semantic recall and exact recall
|
|
38
|
+
- a structured API for long-running assistants, workflows, and applications
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
For developers integrating Mumpix-backed services (local runner, benchmark APIs, hosted tools):
|
|
40
|
+
## Quickstart
|
|
51
41
|
|
|
52
42
|
```js
|
|
53
|
-
const {
|
|
43
|
+
const { Mumpix } = require('mumpix');
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
45
|
+
async function main() {
|
|
46
|
+
const db = await Mumpix.open('./reasoning.mumpix', { consistency: 'eventual' });
|
|
58
47
|
|
|
59
|
-
|
|
60
|
-
await
|
|
61
|
-
const hit = await client.recall('what does the user like?')
|
|
62
|
-
const stats = await client.stats()
|
|
63
|
-
```
|
|
48
|
+
await db.remember('User prefers short, direct answers');
|
|
49
|
+
await db.remember('Project auth expiry changed from 30min to 15min');
|
|
64
50
|
|
|
65
|
-
|
|
51
|
+
const answer = await db.recall('what style does the user prefer?');
|
|
52
|
+
console.log(answer);
|
|
66
53
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- `recall(query)`
|
|
70
|
-
- `recallMany(query, k)`
|
|
71
|
-
- `memories()`
|
|
72
|
-
- `clear()`
|
|
73
|
-
- `stats()`
|
|
74
|
-
- `settings()`
|
|
75
|
-
- `updateSettings(patch)`
|
|
76
|
-
- `files()`
|
|
77
|
-
- `readFile(file, { atTs, source })`
|
|
78
|
-
- `timeline(file, { source })`
|
|
79
|
-
- `exportUrl(file, format, { atTs, source })`
|
|
80
|
-
- `roms()`
|
|
81
|
-
- `manualForRom(file)`
|
|
82
|
-
- `manualViewUrl(file, { isolate, v })`
|
|
54
|
+
const stats = await db.stats();
|
|
55
|
+
console.log(stats);
|
|
83
56
|
|
|
84
|
-
|
|
57
|
+
await db.close();
|
|
58
|
+
}
|
|
85
59
|
|
|
86
|
-
|
|
60
|
+
main().catch(console.error);
|
|
61
|
+
```
|
|
87
62
|
|
|
88
|
-
|
|
63
|
+
## Core API
|
|
89
64
|
|
|
90
|
-
|
|
65
|
+
### `Mumpix.open(filePath, [opts])`
|
|
91
66
|
|
|
92
|
-
|
|
93
|
-
|---|---|---|---|
|
|
94
|
-
| `consistency` | `string` | `'eventual'` | `'eventual'` / `'strict'` / `'verified'` |
|
|
95
|
-
| `embedFn` | `async fn(texts[]) → number[][]` | — | Custom embedding function (OpenAI, Cohere, etc.) |
|
|
67
|
+
Opens or creates a local MumpixDB file.
|
|
96
68
|
|
|
97
|
-
|
|
69
|
+
```js
|
|
70
|
+
const db = await Mumpix.open('./agent.mumpix', {
|
|
71
|
+
consistency: 'eventual'
|
|
72
|
+
});
|
|
73
|
+
```
|
|
98
74
|
|
|
99
|
-
|
|
75
|
+
Options:
|
|
100
76
|
|
|
101
|
-
|
|
|
77
|
+
| Option | Type | Default | Description |
|
|
102
78
|
|---|---|---|---|
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `verified` | Synced + immutable audit log | Yes | Fintech, healthcare, regulated AI |
|
|
106
|
-
|
|
107
|
-
---
|
|
79
|
+
| `consistency` | `string` | `'eventual'` | `'eventual'`, `'strict'`, or `'verified'` |
|
|
80
|
+
| `embedFn` | `async function` | — | Custom embedding function for semantic recall |
|
|
108
81
|
|
|
109
82
|
### Core methods
|
|
110
83
|
|
|
111
84
|
```js
|
|
112
|
-
|
|
113
|
-
await db.
|
|
114
|
-
// → { written: true, id: 1, consistency: 'strict' }
|
|
115
|
-
|
|
116
|
-
// Recall the best semantic match
|
|
117
|
-
await db.recall(query)
|
|
118
|
-
// → 'User prefers TypeScript over JavaScript' or null
|
|
119
|
-
|
|
120
|
-
// Recall top-k matches with scores
|
|
121
|
-
await db.recallMany(query, k = 5)
|
|
122
|
-
// → [{ id, content, ts, score }, ...]
|
|
123
|
-
|
|
124
|
-
// Store multiple memories
|
|
125
|
-
await db.rememberAll(['pref 1', 'pref 2', 'pref 3'])
|
|
126
|
-
|
|
127
|
-
// Check if any memory matches
|
|
128
|
-
await db.has(query)
|
|
129
|
-
// → true | false
|
|
130
|
-
|
|
131
|
-
// List all memories
|
|
132
|
-
await db.list()
|
|
133
|
-
// → [{ id, content, ts }, ...]
|
|
134
|
-
|
|
135
|
-
// Delete all memories
|
|
136
|
-
await db.clear()
|
|
137
|
-
// → { cleared: true, count: 3 }
|
|
138
|
-
|
|
139
|
-
// Stats
|
|
140
|
-
await db.stats()
|
|
141
|
-
// → { path, consistency, records, sizeBytes, created, version }
|
|
142
|
-
|
|
143
|
-
// Close (releases file handles)
|
|
144
|
-
await db.close()
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Verified-mode methods
|
|
148
|
-
|
|
149
|
-
```js
|
|
150
|
-
const db = await Mumpix.open('./compliance.mumpix', { consistency: 'verified' })
|
|
85
|
+
await db.remember(text);
|
|
86
|
+
await db.rememberAll(['one', 'two']);
|
|
151
87
|
|
|
152
|
-
|
|
153
|
-
await db.
|
|
154
|
-
// → [{ _type, id, hash, ts, ... }, ...]
|
|
88
|
+
await db.recall(query);
|
|
89
|
+
await db.recallMany(query, 5);
|
|
155
90
|
|
|
156
|
-
|
|
157
|
-
await db.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
await db.exportAudit()
|
|
162
|
-
// → NDJSON string
|
|
91
|
+
await db.has(query);
|
|
92
|
+
await db.list();
|
|
93
|
+
await db.clear();
|
|
94
|
+
await db.stats();
|
|
95
|
+
await db.close();
|
|
163
96
|
```
|
|
164
97
|
|
|
165
|
-
###
|
|
166
|
-
|
|
167
|
-
```js
|
|
168
|
-
await db.recall(query, {
|
|
169
|
-
mode: 'hybrid', // 'hybrid' | 'exact' | 'semantic'
|
|
170
|
-
filter: r => r.ts > Date.now() - 3600_000, // only last hour
|
|
171
|
-
since: Date.now() - 86400_000, // shorthand for time filter
|
|
172
|
-
})
|
|
98
|
+
### Consistency modes
|
|
173
99
|
|
|
174
|
-
|
|
175
|
-
|
|
100
|
+
| Mode | Behavior | Use case |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| `eventual` | fast local writes | prototypes, local tools, development |
|
|
103
|
+
| `strict` | stronger durability path | production agents and application state |
|
|
104
|
+
| `verified` | durability + audit surfaces | regulated, auditable, or compliance-heavy workloads |
|
|
176
105
|
|
|
177
|
-
###
|
|
106
|
+
### Verified mode methods
|
|
178
107
|
|
|
179
108
|
```js
|
|
180
|
-
const
|
|
181
|
-
const OpenAI = require('openai')
|
|
182
|
-
|
|
183
|
-
const client = new OpenAI()
|
|
184
|
-
|
|
185
|
-
async function embedFn(texts) {
|
|
186
|
-
const res = await client.embeddings.create({ model: 'text-embedding-3-small', input: texts })
|
|
187
|
-
return res.data.map(d => d.embedding)
|
|
188
|
-
}
|
|
109
|
+
const db = await Mumpix.open('./verified.mumpix', { consistency: 'verified' });
|
|
189
110
|
|
|
190
|
-
|
|
191
|
-
|
|
111
|
+
await db.audit();
|
|
112
|
+
await db.auditSummary();
|
|
113
|
+
await db.exportAudit();
|
|
192
114
|
```
|
|
193
115
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
## LangChain integration
|
|
197
|
-
|
|
198
|
-
```js
|
|
199
|
-
const { Mumpix } = require('mumpix')
|
|
200
|
-
const { MumpixVectorStore, MumpixChatMemory, MumpixRetriever } = require('mumpix/src/integrations/langchain')
|
|
201
|
-
|
|
202
|
-
const db = await Mumpix.open('./agent.mumpix', { consistency: 'strict' })
|
|
203
|
-
|
|
204
|
-
// As a VectorStore
|
|
205
|
-
const store = new MumpixVectorStore(db)
|
|
206
|
-
await store.addTexts(['preference 1', 'preference 2'])
|
|
207
|
-
const docs = await store.similaritySearch('query', 4)
|
|
208
|
-
|
|
209
|
-
// As chat memory (stores Human/AI turns, recalls semantically)
|
|
210
|
-
const memory = new MumpixChatMemory({ db, k: 4 })
|
|
211
|
-
|
|
212
|
-
// As a retriever
|
|
213
|
-
const retriever = new MumpixRetriever(db, { k: 5 })
|
|
214
|
-
const results = await retriever.getRelevantDocuments('query')
|
|
215
|
-
```
|
|
116
|
+
## Developer SDK
|
|
216
117
|
|
|
217
|
-
|
|
118
|
+
This package also includes a developer client for Mumpix-backed services.
|
|
218
119
|
|
|
219
120
|
```js
|
|
220
|
-
const {
|
|
221
|
-
const { MumpixIndex, MumpixReader } = require('mumpix/src/integrations/llamaindex')
|
|
121
|
+
const { MumpixDevClient } = require('mumpix');
|
|
222
122
|
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
const retriever = index.asRetriever({ topK: 5 })
|
|
227
|
-
|
|
228
|
-
await index.insert('User prefers dark mode')
|
|
229
|
-
const nodes = await retriever.retrieve('interface preferences')
|
|
230
|
-
|
|
231
|
-
// Load all memories as documents
|
|
232
|
-
const reader = new MumpixReader(db)
|
|
233
|
-
const docs = await reader.loadData()
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
---
|
|
237
|
-
|
|
238
|
-
## CLI
|
|
239
|
-
|
|
240
|
-
```bash
|
|
241
|
-
# Global install
|
|
242
|
-
npm install -g mumpix
|
|
243
|
-
|
|
244
|
-
mumpix remember ./agent.mumpix "User prefers TypeScript"
|
|
245
|
-
mumpix recall ./agent.mumpix "what language?"
|
|
246
|
-
mumpix search ./agent.mumpix "language" 3
|
|
247
|
-
mumpix list ./agent.mumpix
|
|
248
|
-
mumpix clear ./agent.mumpix
|
|
249
|
-
mumpix stats ./agent.mumpix
|
|
250
|
-
mumpix audit ./agent.mumpix # verified mode only
|
|
251
|
-
mumpix shell ./agent.mumpix # interactive REPL
|
|
252
|
-
|
|
253
|
-
# Options
|
|
254
|
-
mumpix recall ./agent.mumpix "query" --consistency=strict
|
|
255
|
-
mumpix shell ./compliance.mumpix --consistency=verified
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
Note: CLI strict/verified modes are tier-gated the same as SDK/API mode selection.
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## File format
|
|
263
|
-
|
|
264
|
-
The `.mumpix` file is plain NDJSON — human-readable, portable, no binary parser required:
|
|
123
|
+
const client = new MumpixDevClient({
|
|
124
|
+
baseUrl: 'https://mumpixdb.com/benchmark'
|
|
125
|
+
});
|
|
265
126
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
{"id":1,"content":"User prefers TypeScript","ts":1740000001000,"h":"hmac256:..."}
|
|
269
|
-
{"id":2,"content":"Use pnpm workspaces","ts":1740000002000,"h":"hmac256:..."}
|
|
127
|
+
const health = await client.health();
|
|
128
|
+
const stats = await client.stats();
|
|
270
129
|
```
|
|
271
130
|
|
|
272
|
-
|
|
273
|
-
1. Write to WAL
|
|
274
|
-
2. Append to main file and `fdatasync` (strict/verified)
|
|
275
|
-
3. Delete WAL
|
|
131
|
+
Available client methods:
|
|
276
132
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
133
|
+
- `health()`
|
|
134
|
+
- `remember(content)`
|
|
135
|
+
- `recall(query)`
|
|
136
|
+
- `recallMany(query, k)`
|
|
137
|
+
- `memories()`
|
|
138
|
+
- `clear()`
|
|
139
|
+
- `stats()`
|
|
140
|
+
- `settings()`
|
|
141
|
+
- `updateSettings(patch)`
|
|
142
|
+
- `files()`
|
|
143
|
+
- `readFile(file, { atTs, source })`
|
|
144
|
+
- `timeline(file, { source })`
|
|
145
|
+
- `exportUrl(file, format, { atTs, source })`
|
|
146
|
+
- `roms()`
|
|
147
|
+
- `manualForRom(file)`
|
|
148
|
+
- `manualViewUrl(file, { isolate, v })`
|
|
280
149
|
|
|
281
|
-
|
|
150
|
+
## Integrations
|
|
282
151
|
|
|
283
|
-
|
|
152
|
+
This package includes adapters for:
|
|
284
153
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
node examples/agent-memory.js # Persistent agent preferences (run twice)
|
|
288
|
-
node examples/verified-mode.js # Compliance audit log export
|
|
289
|
-
npm run verify:claims # executable truth-audit for package claims
|
|
290
|
-
```
|
|
154
|
+
- LangChain
|
|
155
|
+
- LlamaIndex
|
|
291
156
|
|
|
292
|
-
|
|
157
|
+
Examples:
|
|
293
158
|
|
|
294
159
|
```bash
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
# Optional flags:
|
|
299
|
-
# --skip-verify skip verify:claims
|
|
300
|
-
# --skip-publish only deprecate older versions
|
|
301
|
-
# --dry-run no writes to npm
|
|
302
|
-
# --remove-old try to unpublish old versions; deprecate on failure
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
---
|
|
306
|
-
|
|
307
|
-
## Requirements
|
|
308
|
-
|
|
309
|
-
- Node.js >= 18
|
|
310
|
-
- Zero runtime dependencies
|
|
311
|
-
|
|
312
|
-
---
|
|
313
|
-
|
|
314
|
-
## License
|
|
315
|
-
|
|
316
|
-
Proprietary — COMMERCIAL RESTRICTED. See [LICENSE](LICENSE) for terms.
|
|
317
|
-
Copyright © 2026 Mumpix (vdsx.cloud). All Rights Reserved.
|
|
318
|
-
|
|
319
|
-
---
|
|
320
|
-
|
|
321
|
-
## Licensing & Tiers
|
|
322
|
-
|
|
323
|
-
Mumpix uses capability-based tiering: community is for building, paid tiers are for production operation and compliance.
|
|
324
|
-
|
|
325
|
-
| Capability | Community (Free) | Developer ($19/mo) | Teams ($79/mo) | Compliance ($5K/mo) |
|
|
326
|
-
|---|---|---|---|---|
|
|
327
|
-
| `eventual` mode | ✅ | ✅ | ✅ | ✅ |
|
|
328
|
-
| `strict` mode | ❌ | ✅ | ✅ | ✅ |
|
|
329
|
-
| `verified` mode | ❌ | ❌ | ❌ | ✅ |
|
|
330
|
-
| Record writes | Unlimited | Unlimited | Unlimited | Unlimited |
|
|
331
|
-
| Offline use | ✅ | ✅ | ✅ | ✅ |
|
|
332
|
-
|
|
333
|
-
### Tier intent
|
|
334
|
-
|
|
335
|
-
- **Community**: build and prototype with full local development flow.
|
|
336
|
-
- **Developer**: unlock production durability via `strict`.
|
|
337
|
-
- **Teams**: same core durability plus team/commercial operations.
|
|
338
|
-
- **Compliance**: regulated workflows with `verified` audit capabilities.
|
|
339
|
-
|
|
340
|
-
### Offline/Air-gapped expiry policy
|
|
341
|
-
|
|
342
|
-
- Monthly licenses use a **45-day offline lease window** by default.
|
|
343
|
-
- Enterprise/government/compliance licenses support long/custom lease windows (for example 5-year, 10-year, or custom).
|
|
344
|
-
- When a paid license is expired, requested paid modes are automatically downgraded to `eventual` until renewal.
|
|
345
|
-
|
|
346
|
-
You can tune lease windows with environment variables:
|
|
347
|
-
|
|
348
|
-
- `MUMPIX_LICENSE_MAX_DAYS_MONTHLY` (default `45`)
|
|
349
|
-
- `MUMPIX_LICENSE_MAX_DAYS_ENTERPRISE` (default `36500`)
|
|
350
|
-
- `MUMPIX_LICENSE_MAX_DAYS_GOVERNMENT` (default `36500`)
|
|
351
|
-
- `MUMPIX_LICENSE_MAX_DAYS_COMPLIANCE` (default `36500`)
|
|
352
|
-
|
|
353
|
-
### Using a License Key
|
|
354
|
-
|
|
355
|
-
```javascript
|
|
356
|
-
const db = await Mumpix.open('./agent.mumpix', {
|
|
357
|
-
licenseKey: 'your-license-key-here'
|
|
358
|
-
});
|
|
160
|
+
node examples/langchain-adapter.js
|
|
161
|
+
node examples/llamaindex-adapter.js
|
|
359
162
|
```
|
|
360
163
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
### No-Key account login (recommended)
|
|
364
|
-
|
|
365
|
-
You can link your paid account once and let Mumpix load the local signed license automatically:
|
|
164
|
+
## CLI
|
|
366
165
|
|
|
367
166
|
```bash
|
|
368
|
-
|
|
369
|
-
mumpix auth status
|
|
167
|
+
npm install -g mumpix
|
|
370
168
|
```
|
|
371
169
|
|
|
372
|
-
|
|
170
|
+
Then:
|
|
373
171
|
|
|
374
172
|
```bash
|
|
375
|
-
mumpix
|
|
376
|
-
mumpix auth login --license=<signed-license> # direct import
|
|
377
|
-
mumpix auth logout
|
|
173
|
+
mumpix --help
|
|
378
174
|
```
|
|
379
175
|
|
|
380
|
-
|
|
176
|
+
## Package boundary
|
|
381
177
|
|
|
382
|
-
|
|
178
|
+
The `mumpix` package is the MumpixDB package.
|
|
383
179
|
|
|
384
|
-
|
|
180
|
+
It is not:
|
|
385
181
|
|
|
386
|
-
|
|
182
|
+
- the WYD Code CLI
|
|
183
|
+
- the WYD Code MCP bridge
|
|
184
|
+
- the website product shell
|
|
387
185
|
|
|
388
|
-
|
|
389
|
-
- Press any other key: install continues in `eventual` mode only.
|
|
390
|
-
- If browser auth is cancelled/fails, install continues in `eventual` mode.
|
|
186
|
+
Those are separate layers and separate distributions.
|
|
391
187
|
|
|
392
|
-
|
|
188
|
+
## Links
|
|
393
189
|
|
|
394
|
-
|
|
395
|
-
-
|
|
396
|
-
-
|
|
190
|
+
- Website: [https://mumpixdb.com](https://mumpixdb.com)
|
|
191
|
+
- Benchmark: [https://mumpixdb.com/benchmark](https://mumpixdb.com/benchmark)
|
|
192
|
+
- Docs: [https://mumpixdb.com](https://mumpixdb.com)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { Mumpix } = require('../src/index');
|
|
4
|
+
const {
|
|
5
|
+
MumpixVectorStore,
|
|
6
|
+
MumpixChatMemory,
|
|
7
|
+
MumpixRetriever,
|
|
8
|
+
} = require('../src/integrations/langchain');
|
|
9
|
+
|
|
10
|
+
async function main() {
|
|
11
|
+
const db = await Mumpix.open('./langchain-adapter-example.mumpix', {
|
|
12
|
+
consistency: 'eventual',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const store = new MumpixVectorStore(db);
|
|
16
|
+
await store.addTexts([
|
|
17
|
+
'User likes concise answers',
|
|
18
|
+
'Project uses TypeScript',
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
const docs = await store.similaritySearch('what language is used?', 2);
|
|
22
|
+
console.log('similaritySearch ->', docs);
|
|
23
|
+
|
|
24
|
+
const memory = new MumpixChatMemory({ db, k: 3 });
|
|
25
|
+
await memory.saveContext(
|
|
26
|
+
{ input: 'What stack do we use?' },
|
|
27
|
+
{ output: 'TypeScript and Node.js' },
|
|
28
|
+
);
|
|
29
|
+
const loaded = await memory.loadMemoryVariables({ input: 'language stack' });
|
|
30
|
+
console.log('chatMemory ->', loaded);
|
|
31
|
+
|
|
32
|
+
const retriever = new MumpixRetriever(db, { k: 2 });
|
|
33
|
+
const relevant = await retriever.getRelevantDocuments('concise');
|
|
34
|
+
console.log('retriever ->', relevant);
|
|
35
|
+
|
|
36
|
+
await db.close();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
main().catch((error) => {
|
|
40
|
+
console.error('langchain-adapter example failed:', error?.message || String(error));
|
|
41
|
+
process.exit(1);
|
|
42
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { Mumpix } = require('../src/index');
|
|
4
|
+
const {
|
|
5
|
+
MumpixIndex,
|
|
6
|
+
MumpixReader,
|
|
7
|
+
} = require('../src/integrations/llamaindex');
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
const db = await Mumpix.open('./llamaindex-adapter-example.mumpix', {
|
|
11
|
+
consistency: 'eventual',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const index = new MumpixIndex(db);
|
|
15
|
+
await index.insert('The team prefers short and direct answers');
|
|
16
|
+
await index.insert({ text: 'The default runtime is Node.js' });
|
|
17
|
+
|
|
18
|
+
const retriever = index.asRetriever({ topK: 2 });
|
|
19
|
+
const nodes = await retriever.retrieve('runtime preference');
|
|
20
|
+
console.log('retrieve ->', nodes);
|
|
21
|
+
|
|
22
|
+
const reader = new MumpixReader(db);
|
|
23
|
+
const docs = await reader.loadData();
|
|
24
|
+
console.log('loadData ->', docs);
|
|
25
|
+
|
|
26
|
+
await db.close();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
main().catch((error) => {
|
|
30
|
+
console.error('llamaindex-adapter example failed:', error?.message || String(error));
|
|
31
|
+
process.exit(1);
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mumpix",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.0.18",
|
|
4
|
+
"description": "MumpixDB reasoning ledger and structured memory engine for AI systems",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"mumpix": "bin/mumpix.js"
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
"ai",
|
|
18
18
|
"memory",
|
|
19
19
|
"database",
|
|
20
|
+
"reasoning-ledger",
|
|
21
|
+
"reasoning",
|
|
22
|
+
"context",
|
|
23
|
+
"replay",
|
|
24
|
+
"audit",
|
|
20
25
|
"embedded",
|
|
21
26
|
"vector",
|
|
22
27
|
"semantic",
|
|
@@ -30,13 +35,18 @@
|
|
|
30
35
|
"rag"
|
|
31
36
|
],
|
|
32
37
|
"author": "Mumpix",
|
|
33
|
-
"license": "
|
|
38
|
+
"license": "BUSL-1.1",
|
|
39
|
+
"homepage": "https://mumpixdb.com",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/mumpix/mumpix.git"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/mumpix/mumpix/issues"
|
|
46
|
+
},
|
|
34
47
|
"engines": {
|
|
35
48
|
"node": ">=18.0.0"
|
|
36
49
|
},
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"mumpix": "^1.0.14"
|
|
39
|
-
},
|
|
40
50
|
"files": [
|
|
41
51
|
"src/",
|
|
42
52
|
"bin/",
|
|
@@ -45,6 +55,5 @@
|
|
|
45
55
|
"CHANGELOG.md",
|
|
46
56
|
"README.md",
|
|
47
57
|
"LICENSE"
|
|
48
|
-
]
|
|
49
|
-
"homepage": "https://mumpixdb.com"
|
|
58
|
+
]
|
|
50
59
|
}
|
|
@@ -70,8 +70,16 @@ class MumpixDevClient {
|
|
|
70
70
|
return this._request('/api/health');
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
remember(content) {
|
|
74
|
-
|
|
73
|
+
async remember(content) {
|
|
74
|
+
// Primary app API expects `text`. Keep `content` fallback for older endpoints.
|
|
75
|
+
try {
|
|
76
|
+
return await this._request('/remember', { method: 'POST', body: { text: content } });
|
|
77
|
+
} catch (error) {
|
|
78
|
+
if (error && Number(error.status) === 400) {
|
|
79
|
+
return this._request('/remember', { method: 'POST', body: { content } });
|
|
80
|
+
}
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
recall(query) {
|
|
@@ -155,4 +163,3 @@ module.exports = {
|
|
|
155
163
|
MumpixDevClient,
|
|
156
164
|
MumpixApiError,
|
|
157
165
|
};
|
|
158
|
-
|