mumpix 1.0.19 → 1.1.3
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 +82 -11
- package/README.md +278 -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/recall-quality-suite.js +156 -0
- package/examples/verified-mode.js +1 -1
- package/package.json +24 -13
- package/scripts/bench-semantic.cjs +76 -0
- package/scripts/test-license-modes.cjs +87 -0
- package/scripts/test-phase0.cjs +137 -0
- package/scripts/test-semantic.cjs +411 -0
- package/src/brp/index.js +1 -0
- package/src/collapse/index.js +1 -0
- package/src/core/MumpixDB.js +264 -323
- package/src/core/audit.js +1 -173
- package/src/core/auth.js +1 -232
- package/src/core/inverted-index.js +249 -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 +226 -112
- package/src/core/semantic-sidecar.js +312 -0
- package/src/core/store.js +365 -288
- 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,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.1.3 - 2026-07-09
|
|
4
|
+
|
|
5
|
+
Supersedes the unpublished `v1.1.2` release candidate.
|
|
6
|
+
|
|
7
|
+
### Semantic recall
|
|
8
|
+
- Fixed freshly written semantic sidecar entries so `recallMany()` exposes stable WAL-backed `id` metadata before and after reopen.
|
|
9
|
+
- Hardened the semantic sidecar insert path to normalize entries at the hot-write boundary, keeping live memory, JSONL journal replay, and compacted snapshots in the same schema.
|
|
10
|
+
- Corrected the semantic SIGKILL reconciliation test so it treats durable WAL replay as surviving ledger data instead of comparing only against pre-replay main-file lines.
|
|
11
|
+
- Replaced the public recall-quality demo's mock embedder with a real OpenAI-compatible embeddings adapter, defaulting to Ollama `nomic-embed-text`.
|
|
12
|
+
- Kept the real embedding smoke framed as a demo with counts, not a calibrated quality benchmark.
|
|
13
|
+
- Removed transport URL from the demo embedder id so moving the same model to another endpoint does not force an unnecessary semantic sidecar rebuild.
|
|
14
|
+
- Raised the provisional semantic fallback floor from `0.35` to `0.5` after the real `nomic-embed-text` smoke showed `0.35` allowed its nonsense control to fire; this floor remains uncalibrated pending a larger labeled suite.
|
|
15
|
+
- Updated the public recall quality demo cleanup to remove both semantic sidecar files: `<db>.vectors.json` and `<db>.vectors.jsonl`.
|
|
16
|
+
|
|
17
|
+
## 1.1.1 - 2026-07-09
|
|
18
|
+
|
|
19
|
+
### Semantic recall seam
|
|
20
|
+
- Added `Mumpix.open(path, { recall: "semantic" })` as a zero-dependency semantic fallback seam.
|
|
21
|
+
- Added optional embedder contract support: `{ id, dim, embed(texts) }`.
|
|
22
|
+
- Added a semantic vector sidecar keyed by WAL record `seq`, embedder id, and vector dimension. Hot writes append to `<db>.vectors.jsonl`; lifecycle compaction writes the `<db>.vectors.json` snapshot.
|
|
23
|
+
- Added semantic sidecar crash reconciliation on open. Missing vectors are re-embedded from WAL records, and torn JSONL journal tails are discarded/rebuilt rather than treated as fatal.
|
|
24
|
+
- `recall: "semantic"` now fails loudly when neither `{ embedder }` nor optional package `mumpix-embed` is available, instead of silently becoming a no-op.
|
|
25
|
+
- Preserved 1.1.0 no-match semantics: lexical recall still runs first, semantic fallback is consulted only after lexical no-hit, and results below `semanticFloor` return `null` / `[]`.
|
|
26
|
+
- Added `npm run bench:recall` with a deterministic mock embedder to demonstrate the pipeline without shipping model weights. Replaced by a real-embedder smoke in `1.1.2`.
|
|
27
|
+
- Added `npm run bench:semantic` to guard against semantic sidecar write amplification regressions.
|
|
28
|
+
|
|
29
|
+
## 1.1.0 - 2026-07-08
|
|
30
|
+
|
|
31
|
+
### Correctness
|
|
32
|
+
- Added `minScore` to `recall()` and `recallMany()` with a default local TF-IDF threshold of `0.15`.
|
|
33
|
+
- Breaking change: `recall()` may now return `null`, and `recallMany()` may now return `[]`, when the best candidate is below threshold. This is correct behavior for agent memory and prevents false context injection.
|
|
34
|
+
- Fixed the zero-overlap TF-IDF ranking path so recency alone no longer makes unrelated memories look relevant.
|
|
35
|
+
- Added deterministic tie-breaking after score comparison to avoid unstable first-document fallthrough behavior.
|
|
4
36
|
|
|
5
|
-
###
|
|
6
|
-
-
|
|
7
|
-
-
|
|
37
|
+
### Reliability
|
|
38
|
+
- Fixed stale crash locks by checking the lock payload PID on open. If the lock owner process is dead, Mumpix removes the lock and retries immediately.
|
|
39
|
+
- Kept `lockStaleMs` mtime fallback for containers, NFS, and PID namespace cases where PID liveness is not authoritative.
|
|
40
|
+
- Documented `lockStaleMs` and `lock: false`.
|
|
41
|
+
|
|
42
|
+
### Verification
|
|
43
|
+
- Added `npm run test:phase0` covering unrelated recall no-match behavior, explicit `minScore:false` opt-out, SIGKILL stale-lock recovery, and dead-PID lock payload recovery.
|
|
44
|
+
|
|
45
|
+
## 1.0.30 - 2026-06-14
|
|
46
|
+
|
|
47
|
+
### Production package
|
|
48
|
+
- Republished the production-only package contents under a fresh immutable npm version after `1.0.29` became unavailable for normal registry installs.
|
|
49
|
+
- 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.
|
|
50
|
+
- 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.
|
|
51
|
+
- Preserved the public vector sidecar API while improving domain-scoped retrieval performance for embedders using MumpixDB as a general-purpose AI memory store.
|
|
8
52
|
|
|
9
|
-
## 1.0.
|
|
10
|
-
- General performance and sync updates
|
|
53
|
+
## 1.0.28 - 2026-06-14
|
|
11
54
|
|
|
12
|
-
|
|
13
|
-
-
|
|
55
|
+
### Performance and retrieval
|
|
56
|
+
- Promoted the pure-code MumpixDB recall update into the bundled runtime package.
|
|
57
|
+
- Added persistent inverted-index recall candidates with hash re-verification, preserving the existing trust boundary while avoiding full scans.
|
|
58
|
+
- Added WAL writer policy support for coalesced eventual-mode flushes while keeping strict and verified durability paths on per-record fsync semantics.
|
|
59
|
+
- Added `rememberAll()` batch persistence and index maintenance so large promotion bursts do not require per-record main-file rewrites.
|
|
60
|
+
- Exported `WalWriter` and `InvertedIndex` from the package entrypoint for runtime diagnostics and tests.
|
|
61
|
+
|
|
62
|
+
### Benchmark record
|
|
63
|
+
- Added a scale benchmark covering write throughput, randomized reads, reopen reads, and mixed read/write pressure.
|
|
64
|
+
- At 100k records, indexed retrieval measured about 24ms p95 on reopen versus about 631ms p95 for full scan.
|
|
65
|
+
- Under a 5k concurrent-promotion burst, indexed retrieval stayed under 50ms p95 while full scan was about 1.29s p95.
|
|
66
|
+
- Reopen p95 tracked hot p95, confirming the index is persisted and reused after load instead of acting as an in-process cache.
|
|
67
|
+
- Added a pgvector RLP retrieval comparison harness that measures domain-scoped vector retrieval against an independent exact flat cosine oracle.
|
|
68
|
+
- 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
69
|
|
|
15
70
|
## 1.0.11 - 2026-03-03
|
|
16
71
|
|
|
@@ -28,7 +83,24 @@
|
|
|
28
83
|
- Clarified that `strict`/`verified` are tier-gated capabilities (SDK and CLI).
|
|
29
84
|
- Added `verify:claims` usage to the examples section.
|
|
30
85
|
|
|
31
|
-
##
|
|
86
|
+
## 1.0.22 - 2026-06-12
|
|
87
|
+
|
|
88
|
+
### Truth and verification
|
|
89
|
+
- Tightened README claims to match implementation exactly.
|
|
90
|
+
- Clarified local recall as exact substring, TF-IDF recall, and optional custom embedding recall.
|
|
91
|
+
- Clarified mandatory runtime usage sync fields and local ML-DSA event verification payloads.
|
|
92
|
+
- Fixed `npm run verify:claims` so it uses a writable local Mumpix config directory during tests.
|
|
93
|
+
|
|
94
|
+
## 1.0.21 - 2026-06-12
|
|
95
|
+
|
|
96
|
+
### Publish hardening
|
|
97
|
+
- Prepared the npm package above the published `1.0.20` line.
|
|
98
|
+
- Kept install side effects out of `npm install`; account linking now happens through explicit CLI auth commands.
|
|
99
|
+
- Kept runtime usage sync mandatory for billing reconciliation and license enforcement, with local queuing for failed sends.
|
|
100
|
+
- Added ML-DSA-44 device identities, signed usage events, and hash-chain continuity for air-gapped reconciliation.
|
|
101
|
+
- Added `mumpix auth device-id` for device-bound license issuance.
|
|
102
|
+
- Tightened package files so generated `.mumpix` artifacts are not included in npm tarballs.
|
|
103
|
+
- Updated smoke examples to await `Mumpix.open(...)` and run in free `eventual` mode by default.
|
|
32
104
|
|
|
33
105
|
### Licensing (offline/air-gapped)
|
|
34
106
|
- Added monthly tier capability mapping for paid durability modes (`eventual`, `strict`) while active.
|
|
@@ -41,8 +113,7 @@
|
|
|
41
113
|
- Added local account auth state support in `src/core/auth.js`.
|
|
42
114
|
- Added CLI auth commands: `mumpix auth login|status|logout`.
|
|
43
115
|
- 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.
|
|
116
|
+
- Added explicit device login flow through `mumpix auth login`; free installs remain in `eventual` mode until linked.
|
|
46
117
|
|
|
47
118
|
## 1.0.9 - 2026-03-02
|
|
48
119
|
|
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,14 @@ 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
|
+
| `recall` | `string` | — | Set to `'semantic'` to enable optional semantic fallback using a local embedder |
|
|
82
|
+
| `embedder` | `object` | — | Semantic recall embedder implementing `{ id, dim, embed(texts) }` |
|
|
83
|
+
| `semanticFloor` | `number` | `0.5` | Minimum semantic cosine score before fallback recall returns a match; provisional and not yet calibrated on a labeled suite |
|
|
84
|
+
| `vectorPath` | `string` | `<db>.vectors.json` | Optional semantic vector sidecar path |
|
|
85
|
+
| `telemetry` | `boolean` | `false` | Opt in to signed license heartbeat telemetry for verified licenses |
|
|
86
|
+
| `lockStaleMs` | `number` | `300000` | Milliseconds before mtime-based stale lock recovery; dead lock owner PIDs are recovered immediately |
|
|
87
|
+
| `lock` | `boolean` | `true` | Set `false` only when an external single-writer lock already protects the file |
|
|
81
88
|
|
|
82
89
|
### Core methods
|
|
83
90
|
|
|
@@ -95,6 +102,93 @@ await db.stats();
|
|
|
95
102
|
await db.close();
|
|
96
103
|
```
|
|
97
104
|
|
|
105
|
+
`recall()` returns `null` when no stored memory clears the relevance threshold.
|
|
106
|
+
`recallMany()` returns `[]` for the same no-match case. This is intentional:
|
|
107
|
+
agent memory should prefer "I don't know" over injecting a low-confidence or
|
|
108
|
+
unrelated record into context.
|
|
109
|
+
|
|
110
|
+
Recall options:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
await db.recall('what style does the user prefer?', { minScore: 0.15 });
|
|
114
|
+
await db.recallMany('deployment preference', 5, { minScore: 0.15 });
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
`minScore` defaults to `0.15` for the local TF-IDF path. Set `minScore: false`
|
|
118
|
+
only when you explicitly want the old permissive behavior.
|
|
119
|
+
|
|
120
|
+
### Semantic recall fallback
|
|
121
|
+
|
|
122
|
+
`mumpix` keeps the core package zero-dependency. To enable semantic fallback,
|
|
123
|
+
open a database with `recall: 'semantic'` and provide an embedder, or install an
|
|
124
|
+
optional package that exports the same contract as `mumpix-embed`.
|
|
125
|
+
|
|
126
|
+
If neither an explicit embedder nor `mumpix-embed` is available, open fails
|
|
127
|
+
loudly. Mumpix does not silently fall back to lexical recall when
|
|
128
|
+
`recall: 'semantic'` is requested.
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
const db = await Mumpix.open('./agent.mumpix', {
|
|
132
|
+
recall: 'semantic',
|
|
133
|
+
embedder: {
|
|
134
|
+
id: 'my-local-embedder-v1',
|
|
135
|
+
dim: 384,
|
|
136
|
+
async embed(texts) {
|
|
137
|
+
// Return one L2-normalized vector per input text.
|
|
138
|
+
return texts.map(() => new Float32Array(384));
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
semanticFloor: 0.5,
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Embedder contract:
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
{
|
|
149
|
+
id: string, // changes whenever the embedding space changes
|
|
150
|
+
dim: number, // vector dimensionality
|
|
151
|
+
embed(texts: string[]): Promise<Float32Array[] | number[][]>
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Semantic vectors are a derived index of the WAL records. They are keyed by
|
|
156
|
+
record `seq`, `embedder.id`, and vector dimension. Hot writes append to a
|
|
157
|
+
`<db>.vectors.jsonl` journal, while `flush()`, `close()`, clear, prune, and
|
|
158
|
+
embedding-space changes compact into the `<db>.vectors.json` snapshot. If the
|
|
159
|
+
embedder id or vector dimension changes, the sidecar is rebuilt instead of
|
|
160
|
+
mixing incompatible embedding spaces.
|
|
161
|
+
|
|
162
|
+
On open, semantic mode reconciles the sidecar against the ledger. Records past
|
|
163
|
+
the sidecar's max `seq` are re-embedded, stale vectors are pruned, and a torn
|
|
164
|
+
JSONL tail from a crash is discarded and rebuilt from the WAL-backed records.
|
|
165
|
+
|
|
166
|
+
Hybrid behavior is deliberately conservative:
|
|
167
|
+
|
|
168
|
+
- lexical recall runs first and wins when it clears the normal threshold
|
|
169
|
+
- semantic vectors are consulted only when lexical recall returns no hit
|
|
170
|
+
- results below `semanticFloor` still return `null` / `[]`
|
|
171
|
+
|
|
172
|
+
Run the public recall smoke/demo:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
ollama pull nomic-embed-text
|
|
176
|
+
npm run bench:recall
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Run the semantic write-amplification bench:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npm run bench:semantic
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The bundled recall example is a smoke/demo, not a calibrated quality benchmark.
|
|
186
|
+
It reports counts on five paraphrases plus one nonsense control, using a real
|
|
187
|
+
OpenAI-compatible embeddings endpoint. By default it expects Ollama at
|
|
188
|
+
`http://127.0.0.1:11434/v1` with `nomic-embed-text` and provisional
|
|
189
|
+
`semanticFloor: 0.5`. Override with `MUMPIX_EMBED_BASE_URL`,
|
|
190
|
+
`MUMPIX_EMBED_MODEL`, `MUMPIX_EMBED_API_KEY`, and `MUMPIX_SEMANTIC_FLOOR`.
|
|
191
|
+
|
|
98
192
|
### Temporal API
|
|
99
193
|
|
|
100
194
|
`mumpix` also exposes a deterministic temporal layer built on top of WAL-backed records.
|
|
@@ -158,6 +252,72 @@ Temporal records support scoped metadata on write:
|
|
|
158
252
|
- `source`
|
|
159
253
|
- `ts`
|
|
160
254
|
|
|
255
|
+
### Behavioral Reasoning Primitives
|
|
256
|
+
|
|
257
|
+
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.
|
|
258
|
+
|
|
259
|
+
```js
|
|
260
|
+
const { brp, rlp, collapse } = require('mumpix');
|
|
261
|
+
|
|
262
|
+
const gene = brp.normalizeBRP({
|
|
263
|
+
domain: 'browser',
|
|
264
|
+
trigger_signature: 'login page asks for workspace slug',
|
|
265
|
+
executable_payload: {
|
|
266
|
+
intent: 'DO',
|
|
267
|
+
sequence: [
|
|
268
|
+
{ verb: 'input-text', args: { selector: '#workspace', value: 'acme' } },
|
|
269
|
+
{ verb: 'click-element', args: { selector: 'button[type=submit]' } },
|
|
270
|
+
],
|
|
271
|
+
},
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
const boundary = rlp.validateActionBoundary(gene);
|
|
275
|
+
const economics = collapse.analyzeCollapse({
|
|
276
|
+
stages: [
|
|
277
|
+
{ name: 'INDEX', token_cost: 200 },
|
|
278
|
+
{ name: 'SCAN', token_cost: 2400 },
|
|
279
|
+
{ name: 'DEBATE', token_cost: 7200 },
|
|
280
|
+
{ name: 'EXECUTE', token_cost: 2050 },
|
|
281
|
+
],
|
|
282
|
+
retrievalCost: 150,
|
|
283
|
+
promotionCost: 35550,
|
|
284
|
+
hits: 3,
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
console.log(gene.payload_type); // DO
|
|
288
|
+
console.log(boundary.ok); // true
|
|
289
|
+
console.log(economics.savingsPerHit); // 11700
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
Available BRP APIs:
|
|
293
|
+
|
|
294
|
+
- `brp.normalizeBRP(candidate)`
|
|
295
|
+
- `brp.validateBRP(candidate)`
|
|
296
|
+
- `brp.validatePayload(payload)`
|
|
297
|
+
- `brp.parseExecutablePayload(payload)`
|
|
298
|
+
- `brp.updateSplitConfidence(brp, event)`
|
|
299
|
+
- `brp.transitionStatus(brp, status, reason)`
|
|
300
|
+
- `brp.structuralPrefilter(brps, query)`
|
|
301
|
+
- `brp.twoStageMatch(brps, query, { k })`
|
|
302
|
+
- `brp.VerbRegistry`
|
|
303
|
+
|
|
304
|
+
Available RLP APIs:
|
|
305
|
+
|
|
306
|
+
- `rlp.REQUIRED_MECHANISMS`
|
|
307
|
+
- `rlp.FAILURE_MODES`
|
|
308
|
+
- `rlp.ARCHITECTURAL_LAWS`
|
|
309
|
+
- `rlp.gap(numberOrId)`
|
|
310
|
+
- `rlp.validateActionBoundary(record)`
|
|
311
|
+
- `rlp.mechanismChecklist(system)`
|
|
312
|
+
|
|
313
|
+
Available computational-collapse APIs:
|
|
314
|
+
|
|
315
|
+
- `collapse.graphCost(stages)`
|
|
316
|
+
- `collapse.collapseSavings(stages, opts)`
|
|
317
|
+
- `collapse.breakEvenReuseThreshold(promotionCost, cycleCost)`
|
|
318
|
+
- `collapse.beta(promotionCost, cycleCost)`
|
|
319
|
+
- `collapse.analyzeCollapse(input)`
|
|
320
|
+
|
|
161
321
|
### Consistency modes
|
|
162
322
|
|
|
163
323
|
| Mode | Behavior | Use case |
|
|
@@ -166,6 +326,43 @@ Temporal records support scoped metadata on write:
|
|
|
166
326
|
| `strict` | stronger durability path | production agents and application state |
|
|
167
327
|
| `verified` | durability + audit surfaces | regulated, auditable, or compliance-heavy workloads |
|
|
168
328
|
|
|
329
|
+
### Upgrades, licenses, and billing
|
|
330
|
+
|
|
331
|
+
Free installs run in `eventual` mode. Users upgrade by linking an account or installing a signed license:
|
|
332
|
+
|
|
333
|
+
```bash
|
|
334
|
+
mumpix auth login
|
|
335
|
+
mumpix auth login --token=<account-token>
|
|
336
|
+
mumpix auth login --license=<signed-license-key>
|
|
337
|
+
mumpix auth status
|
|
338
|
+
mumpix auth device-id
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
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.
|
|
342
|
+
|
|
343
|
+
Paid monthly licenses should be issued as short leases. The recommended policy is:
|
|
344
|
+
|
|
345
|
+
- `monthly`, `developer`, `standard`, or `teams` unlock `strict`
|
|
346
|
+
- `compliance`, `enterprise`, `government`, `verified`, or `pro` unlock `verified`
|
|
347
|
+
- monthly leases expire and refresh through the account backend
|
|
348
|
+
- canceled or unpaid subscriptions stop receiving refreshed leases, so paid modes downgrade or block after expiry
|
|
349
|
+
|
|
350
|
+
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.
|
|
351
|
+
|
|
352
|
+
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`.
|
|
353
|
+
|
|
354
|
+
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.
|
|
355
|
+
|
|
356
|
+
### Release hardening
|
|
357
|
+
|
|
358
|
+
Published builds can be staged with build-time obfuscation:
|
|
359
|
+
|
|
360
|
+
```bash
|
|
361
|
+
npm run release:pack:obfuscated
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
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.
|
|
365
|
+
|
|
169
366
|
### Verified mode methods
|
|
170
367
|
|
|
171
368
|
```js
|
|
@@ -178,13 +375,13 @@ await db.exportAudit();
|
|
|
178
375
|
|
|
179
376
|
## Developer SDK
|
|
180
377
|
|
|
181
|
-
This package also includes a
|
|
378
|
+
This package also includes a small HTTP client for Mumpix-compatible services that expose the endpoints listed below.
|
|
182
379
|
|
|
183
380
|
```js
|
|
184
381
|
const { MumpixDevClient } = require('mumpix');
|
|
185
382
|
|
|
186
383
|
const client = new MumpixDevClient({
|
|
187
|
-
baseUrl: '
|
|
384
|
+
baseUrl: 'http://127.0.0.1:3012'
|
|
188
385
|
});
|
|
189
386
|
|
|
190
387
|
const health = await client.health();
|
|
@@ -212,10 +409,83 @@ Available client methods:
|
|
|
212
409
|
|
|
213
410
|
## Integrations
|
|
214
411
|
|
|
215
|
-
This package includes
|
|
412
|
+
This package includes two integration layers:
|
|
413
|
+
|
|
414
|
+
- official peer-backed subclasses for LangChain and LlamaIndex
|
|
415
|
+
- zero-dependency compatibility adapters with LangChain/LlamaIndex-shaped methods
|
|
416
|
+
|
|
417
|
+
For official subclassing, install the optional peer package you need:
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
npm install mumpix @langchain/core
|
|
421
|
+
npm install mumpix llamaindex
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Official LangChain exports:
|
|
425
|
+
|
|
426
|
+
```js
|
|
427
|
+
const {
|
|
428
|
+
MumpixLangChainVectorStore,
|
|
429
|
+
MumpixLangChainRetriever,
|
|
430
|
+
MumpixLangChainMemory,
|
|
431
|
+
} = require('mumpix/src/integrations/langchain-official');
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
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`.
|
|
435
|
+
|
|
436
|
+
Official LlamaIndex exports:
|
|
437
|
+
|
|
438
|
+
```js
|
|
439
|
+
const {
|
|
440
|
+
MumpixLlamaIndexVectorStore,
|
|
441
|
+
MumpixLlamaIndexRetriever,
|
|
442
|
+
} = require('mumpix/src/integrations/llamaindex-official');
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
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`.
|
|
446
|
+
|
|
447
|
+
Zero-dependency LangChain-shaped exports:
|
|
448
|
+
|
|
449
|
+
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.
|
|
450
|
+
|
|
451
|
+
```js
|
|
452
|
+
const {
|
|
453
|
+
MumpixVectorStore,
|
|
454
|
+
MumpixChatMemory,
|
|
455
|
+
MumpixRetriever,
|
|
456
|
+
} = require('mumpix/src/integrations/langchain');
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
Available methods:
|
|
460
|
+
|
|
461
|
+
- `MumpixVectorStore.similaritySearch(query, k)`
|
|
462
|
+
- `MumpixVectorStore.similaritySearchWithScore(query, k)`
|
|
463
|
+
- `MumpixVectorStore.addDocuments(docs)`
|
|
464
|
+
- `MumpixVectorStore.addTexts(texts, metadatas)`
|
|
465
|
+
- `MumpixChatMemory.loadMemoryVariables(values)`
|
|
466
|
+
- `MumpixChatMemory.saveContext(inputs, outputs)`
|
|
467
|
+
- `MumpixChatMemory.clear()`
|
|
468
|
+
- `MumpixRetriever.getRelevantDocuments(query)`
|
|
469
|
+
|
|
470
|
+
Zero-dependency LlamaIndex-shaped exports:
|
|
471
|
+
|
|
472
|
+
These do not import `llamaindex` and do not subclass LlamaIndex base classes.
|
|
473
|
+
|
|
474
|
+
```js
|
|
475
|
+
const {
|
|
476
|
+
MumpixIndex,
|
|
477
|
+
MumpixIndexRetriever,
|
|
478
|
+
MumpixReader,
|
|
479
|
+
} = require('mumpix/src/integrations/llamaindex');
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Available methods:
|
|
216
483
|
|
|
217
|
-
-
|
|
218
|
-
-
|
|
484
|
+
- `MumpixIndex.asRetriever({ topK })`
|
|
485
|
+
- `MumpixIndex.insert(node)`
|
|
486
|
+
- `MumpixIndex.insertMany(nodes)`
|
|
487
|
+
- `MumpixIndexRetriever.retrieve(queryBundle)`
|
|
488
|
+
- `MumpixReader.loadData()`
|
|
219
489
|
|
|
220
490
|
Examples:
|
|
221
491
|
|