wolbarg 0.3.2 → 0.5.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.
- package/CHANGELOG.md +42 -0
- package/README.md +35 -1
- package/dist/index.cjs +4202 -627
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +541 -23
- package/dist/index.d.ts +541 -23
- package/dist/index.js +4194 -626
- package/dist/index.js.map +1 -1
- package/package.json +11 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,46 @@ All notable changes to this project are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [0.5.0] — 2026-07-19
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Optional graph memory** — `graph` constructor option with `sqliteGraph({ path })` (local) and `neo4jGraph({ url, username, password })` (networked); optional peer `neo4j-driver`
|
|
13
|
+
- **Typed graph API** — `linkMemories()`, `getRelated()` on the facade; provider surface also includes `unlinkMemories`, `upsertEntity`, `linkEntityToMemory`, `deleteMemory`
|
|
14
|
+
- **`recall({ includeGraph: true })`** — attaches `related` neighbor memories from the graph
|
|
15
|
+
- **Cascade deletes** — `forget` / `clear` remove graph memory nodes and incident edges when graph is configured
|
|
16
|
+
- **Graph-aware checkpoints / export** — file-backed SQLite graph snapshots alongside memory DB; Neo4j refuses with `GraphCheckpointNotSupportedError` (`GRAPH_CHECKPOINT_NOT_SUPPORTED`)
|
|
17
|
+
- **Schema v4** — memory DB index / ANN housekeeping migration on open (graph tables live in a separate SQLite file or Neo4j)
|
|
18
|
+
- **Wolbarg Studio** — graph canvas, Connect for memory/telemetry/checkpoints/graph, ops filters for graph methods, stream / checkpoints / explain polish
|
|
19
|
+
- **Docs** — Graph memory, What's New 0.5, Observability screenshots, provider-isolated project layout
|
|
20
|
+
|
|
21
|
+
### Compatibility
|
|
22
|
+
|
|
23
|
+
- Graph is **optional** and **additive**. Omitting `graph` leaves 0.4 behavior unchanged.
|
|
24
|
+
- No required constructor changes for upgrades from **0.4.x**.
|
|
25
|
+
- Raw Cypher `query()` is Neo4j-only; SQLite graph hard-errors (use typed methods for portable code).
|
|
26
|
+
|
|
27
|
+
## [0.4.0] — 2026-07-18
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **`subscribe()`** — real-time memory change events (SQLite in-process EventEmitter; Postgres LISTEN/NOTIFY with reconnect)
|
|
32
|
+
- **Multi-writer SQLite concurrency** — `BEGIN IMMEDIATE`, exponential backoff retry, `concurrency` constructor config, stable error code `WOLBARG_STORAGE_LOCKED`
|
|
33
|
+
- **Embedding cache** — transparent `hash(content)+model` cache with optional LRU/TTL (`embeddingCache` config); additive `cacheHit` path via cache wrapper stats
|
|
34
|
+
- **Memory upsert / dedupe** — opt-in write-time exact and near-duplicate detection updates existing active memories instead of inserting (`memory.dedupe`); `RememberResult.action`; history event `"updated"`; public `update()`
|
|
35
|
+
- **Schema v3** — `content_hash` column, unique active hash index, `embedding_cache` table, history CHECK allows `'updated'`
|
|
36
|
+
- **Docs** — Concurrency, Real-time events, Embedding cache, Memory upsert pages
|
|
37
|
+
- **Benchmarks** — `benchmark/multiprocess-levels.ts`, `benchmark/embedding-cache-bench.ts`
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- SQLite mutating transactions use `BEGIN IMMEDIATE` instead of deferred `BEGIN`
|
|
42
|
+
- `remember()` / `rememberBatch()` return `RememberResult` (MemoryRecord + `action`) — additive field
|
|
43
|
+
|
|
44
|
+
### Compatibility
|
|
45
|
+
|
|
46
|
+
- All features are additive. Dedupe defaults **off**. Embedding cache defaults **on**. No required constructor changes for upgrades from 0.3.x.
|
|
47
|
+
|
|
8
48
|
## [0.3.2] — 2026-07-18
|
|
9
49
|
|
|
10
50
|
### Changed
|
|
@@ -126,6 +166,8 @@ const ctx = wolbarg({
|
|
|
126
166
|
|
|
127
167
|
- Initial npm release path (pre–modular storage / ingest)
|
|
128
168
|
|
|
169
|
+
[0.5.0]: https://github.com/wolbarg/wolbarg/releases/tag/v0.5.0
|
|
170
|
+
[0.4.0]: https://github.com/wolbarg/wolbarg/releases/tag/v0.4.0
|
|
129
171
|
[0.3.2]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.2
|
|
130
172
|
[0.3.1]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.1
|
|
131
173
|
[0.3.0]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.0
|
package/README.md
CHANGED
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
# Wolbarg
|
|
6
6
|
|
|
7
|
-
**Modular, provider-agnostic semantic memory for AI agents (v0.
|
|
7
|
+
**Modular, provider-agnostic semantic memory for AI agents (v0.5.0).**
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/wolbarg)
|
|
10
10
|
[](./LICENSE)
|
|
11
11
|
[](https://wolbarg.com)
|
|
12
12
|
[](https://wolbarg.com/benchmarks)
|
|
13
13
|
|
|
14
|
+
## What's new in 0.5.0
|
|
15
|
+
|
|
16
|
+
Optional **graph memory** (`sqliteGraph` / `neo4jGraph`), `linkMemories` / `getRelated`, `recall({ includeGraph: true })`, cascade forget, graph-aware checkpoints, and **Wolbarg Studio** graph canvas.
|
|
17
|
+
|
|
18
|
+
Full notes: [CHANGELOG](./CHANGELOG.md) · [Docs — What's New](https://wolbarg.com/docs/guides/whats-new) · [Graph memory](https://wolbarg.com/docs/graph-memory) · [Studio](https://wolbarg.com/docs/observability)
|
|
19
|
+
|
|
14
20
|
## Benchmarks
|
|
15
21
|
|
|
16
22
|
**v0.2.1 Storage suite** (mock embeddings · scale quick) — dual-backend SQLite + PostgreSQL:
|
|
@@ -37,6 +43,7 @@ Node.js **22.5+**.
|
|
|
37
43
|
| Peer | Required for |
|
|
38
44
|
| --- | --- |
|
|
39
45
|
| `pg` | `postgres({ … })` storage |
|
|
46
|
+
| `neo4j-driver` | `neo4jGraph({ … })` graph backend |
|
|
40
47
|
| `pdf-parse` (pin `@1.1.4`) | `ingest()` of `.pdf` files |
|
|
41
48
|
| `mammoth` | `ingest()` of `.docx` files |
|
|
42
49
|
| `tesseract.js` | OCR provider for images |
|
|
@@ -85,6 +92,33 @@ const explained = await ctx.recall({ query: "invoices", explain: true });
|
|
|
85
92
|
await ctx.checkpoint("before-compress");
|
|
86
93
|
```
|
|
87
94
|
|
|
95
|
+
### Optional graph (0.5)
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import { wolbarg, openaiEmbedding, sqliteGraph } from "wolbarg";
|
|
99
|
+
|
|
100
|
+
const ctx = wolbarg({
|
|
101
|
+
organization: "my-org",
|
|
102
|
+
database: { provider: "sqlite", url: "./memory.db" },
|
|
103
|
+
embedding: openaiEmbedding({
|
|
104
|
+
apiKey: process.env.OPENAI_API_KEY!,
|
|
105
|
+
model: "text-embedding-3-small",
|
|
106
|
+
}),
|
|
107
|
+
graph: sqliteGraph({ path: "./graph.db" }),
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const a = await ctx.remember({
|
|
111
|
+
agent: "research",
|
|
112
|
+
content: { text: "Refunds take 5 business days." },
|
|
113
|
+
});
|
|
114
|
+
const b = await ctx.remember({
|
|
115
|
+
agent: "research",
|
|
116
|
+
content: { text: "Chargebacks escalate to risk." },
|
|
117
|
+
});
|
|
118
|
+
await ctx.linkMemories(a.id, b.id, "related_to");
|
|
119
|
+
const related = await ctx.getRelated(a.id);
|
|
120
|
+
```
|
|
121
|
+
|
|
88
122
|
`new Wolbarg({ storage: sqlite("./memory.db"), embedding })` remains supported for backwards compatibility.
|
|
89
123
|
|
|
90
124
|
## Quick start (legacy constructor)
|