mumpix 1.0.19 → 1.0.29
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/CHANGELOG.md +42 -14
- package/README.md +185 -8
- package/bin/mumpix.js +1 -405
- package/examples/agent-memory.js +1 -1
- package/examples/basic.js +1 -1
- package/examples/behavioral-primitives.js +50 -0
- package/examples/verified-mode.js +1 -1
- package/package.json +17 -13
- package/scripts/test-license-modes.cjs +87 -0
- package/src/brp/index.js +1 -0
- package/src/collapse/index.js +1 -0
- package/src/core/MumpixDB.js +210 -322
- package/src/core/audit.js +1 -173
- package/src/core/auth.js +1 -232
- package/src/core/inverted-index.js +144 -0
- package/src/core/license.js +1 -267
- package/src/core/ml-dsa.mjs +1 -25
- package/src/core/ml-kem.mjs +1 -32
- package/src/core/recall.js +1 -176
- package/src/core/store.js +335 -286
- package/src/core/wal-writer.js +83 -0
- package/src/index.js +20 -34
- package/src/integrations/developer-sdk.js +1 -165
- package/src/integrations/langchain-official.js +1 -0
- package/src/integrations/langchain.js +1 -131
- package/src/integrations/llamaindex-official.js +1 -0
- package/src/integrations/llamaindex.js +1 -86
- package/src/integrations/vector-sidecar.js +325 -0
- package/src/rlp/index.js +1 -0
- package/src/temporal/engine.js +1 -1894
- package/src/temporal/indexes.js +1 -178
- package/src/temporal/operators.js +1 -186
- package/scripts/postinstall-auth.js +0 -101
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.0.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-
|
|
3
|
+
## 1.0.29 - 2026-06-14
|
|
4
|
+
|
|
5
|
+
### Production package
|
|
6
|
+
- Removed benchmark harnesses and dated benchmark artifacts from the npm package allowlist so production installs only include the runtime library, CLI, examples, scripts, README, changelog, and license.
|
|
7
|
+
- Kept the pure-code vector retrieval optimization in the production runtime: packed `Float32Array` vector storage, lazy index construction, and metadata equality candidate narrowing before exact cosine scoring.
|
|
8
|
+
- Preserved the public vector sidecar API while improving domain-scoped retrieval performance for embedders using MumpixDB as a general-purpose AI memory store.
|
|
9
|
+
|
|
10
|
+
## 1.0.28 - 2026-06-14
|
|
11
|
+
|
|
12
|
+
### Performance and retrieval
|
|
13
|
+
- Promoted the pure-code MumpixDB recall update into the bundled runtime package.
|
|
14
|
+
- Added persistent inverted-index recall candidates with hash re-verification, preserving the existing trust boundary while avoiding full scans.
|
|
15
|
+
- Added WAL writer policy support for coalesced eventual-mode flushes while keeping strict and verified durability paths on per-record fsync semantics.
|
|
16
|
+
- Added `rememberAll()` batch persistence and index maintenance so large promotion bursts do not require per-record main-file rewrites.
|
|
17
|
+
- Exported `WalWriter` and `InvertedIndex` from the package entrypoint for runtime diagnostics and tests.
|
|
18
|
+
|
|
19
|
+
### Benchmark record
|
|
20
|
+
- Added a scale benchmark covering write throughput, randomized reads, reopen reads, and mixed read/write pressure.
|
|
21
|
+
- At 100k records, indexed retrieval measured about 24ms p95 on reopen versus about 631ms p95 for full scan.
|
|
22
|
+
- Under a 5k concurrent-promotion burst, indexed retrieval stayed under 50ms p95 while full scan was about 1.29s p95.
|
|
23
|
+
- Reopen p95 tracked hot p95, confirming the index is persisted and reused after load instead of acting as an in-process cache.
|
|
24
|
+
- Added a pgvector RLP retrieval comparison harness that measures domain-scoped vector retrieval against an independent exact flat cosine oracle.
|
|
25
|
+
- Documented MumpixDB vector retrieval as exact flat cosine today, pgvector exact scan as the default peer, pgvector HNSW as an explicit opt-in approximate mode, and FAISS-flat as the optional million-scale oracle.
|
|
14
26
|
|
|
15
27
|
## 1.0.11 - 2026-03-03
|
|
16
28
|
|
|
@@ -28,7 +40,24 @@
|
|
|
28
40
|
- Clarified that `strict`/`verified` are tier-gated capabilities (SDK and CLI).
|
|
29
41
|
- Added `verify:claims` usage to the examples section.
|
|
30
42
|
|
|
31
|
-
##
|
|
43
|
+
## 1.0.22 - 2026-06-12
|
|
44
|
+
|
|
45
|
+
### Truth and verification
|
|
46
|
+
- Tightened README claims to match implementation exactly.
|
|
47
|
+
- Clarified local recall as exact substring, TF-IDF recall, and optional custom embedding recall.
|
|
48
|
+
- Clarified mandatory runtime usage sync fields and local ML-DSA event verification payloads.
|
|
49
|
+
- Fixed `npm run verify:claims` so it uses a writable local Mumpix config directory during tests.
|
|
50
|
+
|
|
51
|
+
## 1.0.21 - 2026-06-12
|
|
52
|
+
|
|
53
|
+
### Publish hardening
|
|
54
|
+
- Prepared the npm package above the published `1.0.20` line.
|
|
55
|
+
- Kept install side effects out of `npm install`; account linking now happens through explicit CLI auth commands.
|
|
56
|
+
- Kept runtime usage sync mandatory for billing reconciliation and license enforcement, with local queuing for failed sends.
|
|
57
|
+
- Added ML-DSA-44 device identities, signed usage events, and hash-chain continuity for air-gapped reconciliation.
|
|
58
|
+
- Added `mumpix auth device-id` for device-bound license issuance.
|
|
59
|
+
- Tightened package files so generated `.mumpix` artifacts are not included in npm tarballs.
|
|
60
|
+
- Updated smoke examples to await `Mumpix.open(...)` and run in free `eventual` mode by default.
|
|
32
61
|
|
|
33
62
|
### Licensing (offline/air-gapped)
|
|
34
63
|
- Added monthly tier capability mapping for paid durability modes (`eventual`, `strict`) while active.
|
|
@@ -41,8 +70,7 @@
|
|
|
41
70
|
- Added local account auth state support in `src/core/auth.js`.
|
|
42
71
|
- Added CLI auth commands: `mumpix auth login|status|logout`.
|
|
43
72
|
- Added automatic local-license loading in `MumpixDB.open()` when `licenseKey` is not passed explicitly.
|
|
44
|
-
- Added
|
|
45
|
-
- Added browser-open device flow on install; skip path remains `eventual` only.
|
|
73
|
+
- Added explicit device login flow through `mumpix auth login`; free installs remain in `eventual` mode until linked.
|
|
46
74
|
|
|
47
75
|
## 1.0.9 - 2026-03-02
|
|
48
76
|
|
package/README.md
CHANGED
|
@@ -32,9 +32,9 @@ MumpixDB gives you:
|
|
|
32
32
|
|
|
33
33
|
- local-first storage in a `.mumpix` file
|
|
34
34
|
- append-oriented durable state
|
|
35
|
-
- strict and verified execution modes
|
|
35
|
+
- license-gated strict and verified execution modes
|
|
36
36
|
- replayable memory and audit surfaces
|
|
37
|
-
-
|
|
37
|
+
- exact substring recall, local TF-IDF recall, and optional custom embedding recall
|
|
38
38
|
- a structured API for long-running assistants, workflows, and applications
|
|
39
39
|
|
|
40
40
|
## Quickstart
|
|
@@ -77,7 +77,8 @@ Options:
|
|
|
77
77
|
| Option | Type | Default | Description |
|
|
78
78
|
|---|---|---|---|
|
|
79
79
|
| `consistency` | `string` | `'eventual'` | `'eventual'`, `'strict'`, or `'verified'` |
|
|
80
|
-
| `embedFn` | `async function` | — | Custom embedding function for
|
|
80
|
+
| `embedFn` | `async function` | — | Custom embedding function for embedding-based recall |
|
|
81
|
+
| `telemetry` | `boolean` | `false` | Opt in to signed license heartbeat telemetry for verified licenses |
|
|
81
82
|
|
|
82
83
|
### Core methods
|
|
83
84
|
|
|
@@ -158,6 +159,72 @@ Temporal records support scoped metadata on write:
|
|
|
158
159
|
- `source`
|
|
159
160
|
- `ts`
|
|
160
161
|
|
|
162
|
+
### Behavioral Reasoning Primitives
|
|
163
|
+
|
|
164
|
+
The package includes the BRP, RLP, and computational-collapse utilities from the MumpixDB papers as built-in modules. They are pure local APIs and do not add another npm package.
|
|
165
|
+
|
|
166
|
+
```js
|
|
167
|
+
const { brp, rlp, collapse } = require('mumpix');
|
|
168
|
+
|
|
169
|
+
const gene = brp.normalizeBRP({
|
|
170
|
+
domain: 'browser',
|
|
171
|
+
trigger_signature: 'login page asks for workspace slug',
|
|
172
|
+
executable_payload: {
|
|
173
|
+
intent: 'DO',
|
|
174
|
+
sequence: [
|
|
175
|
+
{ verb: 'input-text', args: { selector: '#workspace', value: 'acme' } },
|
|
176
|
+
{ verb: 'click-element', args: { selector: 'button[type=submit]' } },
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
const boundary = rlp.validateActionBoundary(gene);
|
|
182
|
+
const economics = collapse.analyzeCollapse({
|
|
183
|
+
stages: [
|
|
184
|
+
{ name: 'INDEX', token_cost: 200 },
|
|
185
|
+
{ name: 'SCAN', token_cost: 2400 },
|
|
186
|
+
{ name: 'DEBATE', token_cost: 7200 },
|
|
187
|
+
{ name: 'EXECUTE', token_cost: 2050 },
|
|
188
|
+
],
|
|
189
|
+
retrievalCost: 150,
|
|
190
|
+
promotionCost: 35550,
|
|
191
|
+
hits: 3,
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
console.log(gene.payload_type); // DO
|
|
195
|
+
console.log(boundary.ok); // true
|
|
196
|
+
console.log(economics.savingsPerHit); // 11700
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Available BRP APIs:
|
|
200
|
+
|
|
201
|
+
- `brp.normalizeBRP(candidate)`
|
|
202
|
+
- `brp.validateBRP(candidate)`
|
|
203
|
+
- `brp.validatePayload(payload)`
|
|
204
|
+
- `brp.parseExecutablePayload(payload)`
|
|
205
|
+
- `brp.updateSplitConfidence(brp, event)`
|
|
206
|
+
- `brp.transitionStatus(brp, status, reason)`
|
|
207
|
+
- `brp.structuralPrefilter(brps, query)`
|
|
208
|
+
- `brp.twoStageMatch(brps, query, { k })`
|
|
209
|
+
- `brp.VerbRegistry`
|
|
210
|
+
|
|
211
|
+
Available RLP APIs:
|
|
212
|
+
|
|
213
|
+
- `rlp.REQUIRED_MECHANISMS`
|
|
214
|
+
- `rlp.FAILURE_MODES`
|
|
215
|
+
- `rlp.ARCHITECTURAL_LAWS`
|
|
216
|
+
- `rlp.gap(numberOrId)`
|
|
217
|
+
- `rlp.validateActionBoundary(record)`
|
|
218
|
+
- `rlp.mechanismChecklist(system)`
|
|
219
|
+
|
|
220
|
+
Available computational-collapse APIs:
|
|
221
|
+
|
|
222
|
+
- `collapse.graphCost(stages)`
|
|
223
|
+
- `collapse.collapseSavings(stages, opts)`
|
|
224
|
+
- `collapse.breakEvenReuseThreshold(promotionCost, cycleCost)`
|
|
225
|
+
- `collapse.beta(promotionCost, cycleCost)`
|
|
226
|
+
- `collapse.analyzeCollapse(input)`
|
|
227
|
+
|
|
161
228
|
### Consistency modes
|
|
162
229
|
|
|
163
230
|
| Mode | Behavior | Use case |
|
|
@@ -166,6 +233,43 @@ Temporal records support scoped metadata on write:
|
|
|
166
233
|
| `strict` | stronger durability path | production agents and application state |
|
|
167
234
|
| `verified` | durability + audit surfaces | regulated, auditable, or compliance-heavy workloads |
|
|
168
235
|
|
|
236
|
+
### Upgrades, licenses, and billing
|
|
237
|
+
|
|
238
|
+
Free installs run in `eventual` mode. Users upgrade by linking an account or installing a signed license:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
mumpix auth login
|
|
242
|
+
mumpix auth login --token=<account-token>
|
|
243
|
+
mumpix auth login --license=<signed-license-key>
|
|
244
|
+
mumpix auth status
|
|
245
|
+
mumpix auth device-id
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
The account backend exchanges an authenticated user session or account token for a signed license key. The package stores that license locally in the user's Mumpix config directory and validates it before allowing paid modes.
|
|
249
|
+
|
|
250
|
+
Paid monthly licenses should be issued as short leases. The recommended policy is:
|
|
251
|
+
|
|
252
|
+
- `monthly`, `developer`, `standard`, or `teams` unlock `strict`
|
|
253
|
+
- `compliance`, `enterprise`, `government`, `verified`, or `pro` unlock `verified`
|
|
254
|
+
- monthly leases expire and refresh through the account backend
|
|
255
|
+
- canceled or unpaid subscriptions stop receiving refreshed leases, so paid modes downgrade or block after expiry
|
|
256
|
+
|
|
257
|
+
License telemetry is opt-in and is used only as a signed license-verification heartbeat. By default, opening and closing a database performs no telemetry network call. To allow license heartbeat telemetry for a verified signed license, pass `telemetry: true` to `Mumpix.open()` or set `MUMPIX_TELEMETRY=1`. Free or unlicensed use stays local even when telemetry is enabled. When a verified license is present and telemetry is enabled, Mumpix sends account tier, machine/platform metadata, database stats, timestamp, the license fingerprint, and the license key transport header to the Mumpix usage endpoint on database close. Database filesystem paths are not included in telemetry events. If the endpoint is temporarily unavailable, license heartbeat events are queued locally and retried on later opted-in closes. Billing state should remain server-side in the account/subscription system; license telemetry is a reconciliation signal, not the source of truth for customer entitlement.
|
|
258
|
+
|
|
259
|
+
For air-gapped installs, Mumpix creates a local ML-DSA-44 device identity. Usage events are signed with that device key and linked in a hash chain before being queued or uploaded. The event payload includes the device public key, signature, event hash, and previous hash so a reconciliation service can verify device signature, event hash, and chain continuity when the system reconnects. License issuers can bind a lease to a device by including the device public-key fingerprint from `mumpix auth device-id`.
|
|
260
|
+
|
|
261
|
+
This is tamper-evident hardening for editable JavaScript packages: it makes gaps, edits, and device changes visible during reconciliation without adding cryptographic work to normal read/write paths.
|
|
262
|
+
|
|
263
|
+
### Release hardening
|
|
264
|
+
|
|
265
|
+
Published builds can be staged with build-time obfuscation:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
npm run release:pack:obfuscated
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
This creates `.release/obfuscated` and packs from that staged tree. Runtime files under `src/` and `bin/` are minified and identifier-mangled with Terser, while examples and tests remain readable. The transform avoids control-flow flattening, eval wrappers, string-array indirection, and runtime loaders, so the package still runs as normal Node.js code with no runtime obfuscation dependency.
|
|
272
|
+
|
|
169
273
|
### Verified mode methods
|
|
170
274
|
|
|
171
275
|
```js
|
|
@@ -178,13 +282,13 @@ await db.exportAudit();
|
|
|
178
282
|
|
|
179
283
|
## Developer SDK
|
|
180
284
|
|
|
181
|
-
This package also includes a
|
|
285
|
+
This package also includes a small HTTP client for Mumpix-compatible services that expose the endpoints listed below.
|
|
182
286
|
|
|
183
287
|
```js
|
|
184
288
|
const { MumpixDevClient } = require('mumpix');
|
|
185
289
|
|
|
186
290
|
const client = new MumpixDevClient({
|
|
187
|
-
baseUrl: '
|
|
291
|
+
baseUrl: 'http://127.0.0.1:3012'
|
|
188
292
|
});
|
|
189
293
|
|
|
190
294
|
const health = await client.health();
|
|
@@ -212,10 +316,83 @@ Available client methods:
|
|
|
212
316
|
|
|
213
317
|
## Integrations
|
|
214
318
|
|
|
215
|
-
This package includes
|
|
319
|
+
This package includes two integration layers:
|
|
320
|
+
|
|
321
|
+
- official peer-backed subclasses for LangChain and LlamaIndex
|
|
322
|
+
- zero-dependency compatibility adapters with LangChain/LlamaIndex-shaped methods
|
|
323
|
+
|
|
324
|
+
For official subclassing, install the optional peer package you need:
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
npm install mumpix @langchain/core
|
|
328
|
+
npm install mumpix llamaindex
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Official LangChain exports:
|
|
332
|
+
|
|
333
|
+
```js
|
|
334
|
+
const {
|
|
335
|
+
MumpixLangChainVectorStore,
|
|
336
|
+
MumpixLangChainRetriever,
|
|
337
|
+
MumpixLangChainMemory,
|
|
338
|
+
} = require('mumpix/src/integrations/langchain-official');
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
These classes subclass LangChain's `VectorStore`, `BaseRetriever`, and `BaseMemory` from `@langchain/core`. The vector store persists embeddings in a `.vectors.json` sidecar next to the `.mumpix` file and supports `addDocuments`, `addVectors`, `addTexts`, `delete`, `similaritySearch`, `similaritySearchWithScore`, `similaritySearchVectorWithScore`, `maxMarginalRelevanceSearch`, and `save`.
|
|
342
|
+
|
|
343
|
+
Official LlamaIndex exports:
|
|
344
|
+
|
|
345
|
+
```js
|
|
346
|
+
const {
|
|
347
|
+
MumpixLlamaIndexVectorStore,
|
|
348
|
+
MumpixLlamaIndexRetriever,
|
|
349
|
+
} = require('mumpix/src/integrations/llamaindex-official');
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
These classes subclass LlamaIndex's `BaseVectorStore` and `BaseRetriever`. The vector store persists embeddings in the same `.vectors.json` sidecar and supports `client`, `get`, `add`, `delete`, `query`, and `persist`.
|
|
353
|
+
|
|
354
|
+
Zero-dependency LangChain-shaped exports:
|
|
355
|
+
|
|
356
|
+
These do not import `@langchain/core` and do not subclass LangChain base classes. They expose common document, retriever, and memory-shaped methods while using MumpixDB's local recall internally.
|
|
357
|
+
|
|
358
|
+
```js
|
|
359
|
+
const {
|
|
360
|
+
MumpixVectorStore,
|
|
361
|
+
MumpixChatMemory,
|
|
362
|
+
MumpixRetriever,
|
|
363
|
+
} = require('mumpix/src/integrations/langchain');
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
Available methods:
|
|
367
|
+
|
|
368
|
+
- `MumpixVectorStore.similaritySearch(query, k)`
|
|
369
|
+
- `MumpixVectorStore.similaritySearchWithScore(query, k)`
|
|
370
|
+
- `MumpixVectorStore.addDocuments(docs)`
|
|
371
|
+
- `MumpixVectorStore.addTexts(texts, metadatas)`
|
|
372
|
+
- `MumpixChatMemory.loadMemoryVariables(values)`
|
|
373
|
+
- `MumpixChatMemory.saveContext(inputs, outputs)`
|
|
374
|
+
- `MumpixChatMemory.clear()`
|
|
375
|
+
- `MumpixRetriever.getRelevantDocuments(query)`
|
|
376
|
+
|
|
377
|
+
Zero-dependency LlamaIndex-shaped exports:
|
|
378
|
+
|
|
379
|
+
These do not import `llamaindex` and do not subclass LlamaIndex base classes.
|
|
380
|
+
|
|
381
|
+
```js
|
|
382
|
+
const {
|
|
383
|
+
MumpixIndex,
|
|
384
|
+
MumpixIndexRetriever,
|
|
385
|
+
MumpixReader,
|
|
386
|
+
} = require('mumpix/src/integrations/llamaindex');
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
Available methods:
|
|
216
390
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
391
|
+
- `MumpixIndex.asRetriever({ topK })`
|
|
392
|
+
- `MumpixIndex.insert(node)`
|
|
393
|
+
- `MumpixIndex.insertMany(nodes)`
|
|
394
|
+
- `MumpixIndexRetriever.retrieve(queryBundle)`
|
|
395
|
+
- `MumpixReader.loadData()`
|
|
219
396
|
|
|
220
397
|
Examples:
|
|
221
398
|
|