wolbarg 0.3.0 → 0.3.2

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 CHANGED
@@ -5,13 +5,41 @@ 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.3.0] — 2026-07-16
8
+ ## [0.3.2] — 2026-07-18
9
9
 
10
10
  ### Changed
11
11
 
12
+ - **npm metadata** — `repository`, `bugs`, `homepage`, and `funding` now point at [wolbarg/wolbarg](https://github.com/wolbarg/wolbarg)
13
+
14
+ ## [0.3.1] — 2026-07-17
15
+
16
+ ### Fixed
17
+
18
+ - **Checkpoint rollback recovery** — a failed `rollback()` (e.g. missing checkpoint name) no longer leaves SQLite storage closed; the checkpoint is validated before close, and storage is reopened on error
19
+ - **Import recovery** — a failed `import()` reopens storage the same way so the client stays usable after a bad export path
20
+
21
+ ## [0.3.0] — 2026-07-17
22
+
23
+ ### Added
24
+
25
+ - **Telemetry system** — independent EventDatabase (never shares tables with memory). SQLite provider first; interface-ready for PostgreSQL.
26
+ - **`wolbarg()` factory** plus `database.url` / `telemetry` configuration (additive; `storage` + `init()` still work)
27
+ - **Trace system** — `session_id`, `trace_id`, `parent_trace_id` for waterfall debugging
28
+ - **Telemetry schema v2** — additive organization, agent, tags, checkpoint, recall-explain, and stage-span fields with indexed queries and automatic v1 migration
29
+ - **Recall explain mode** — `recall({ explain: true })` returns ranking diagnostics and timings
30
+ - **Checkpoint API** — `checkpoint`, `rollback`, `deleteCheckpoint`, `listCheckpoints`, `getCheckpoint` (first-party SQLite snapshots, never overwrite)
31
+ - **Import / export** — portable SQLite + manifest bundles
32
+ - **Batch APIs** — `rememberBatch`, `recallBatch` with parent + child telemetry traces
33
+ - **Actionable errors** — operation-scoped messages with reason + suggestion
34
+ - **Internal benchmark helpers** — `runBenchmark` / `summarizeBenchmark`
35
+ - **Wolbarg Studio** — separate Next.js app that reads telemetry databases (see `/wolbarg_studio`)
36
+
37
+ ### Changed
38
+
39
+ - **Telemetry instrumentation** — records available organization/agent/checkpoint context, persists real recall explanations, and reports measured pipeline stages without inventing recency signals
12
40
  - **Rebrand** — product renamed from AgentOrc / `agentorc` to **Wolbarg** / `wolbarg`
13
41
  - **API** — `AgentOrc` → `Wolbarg`, `AgentOrcOptions` → `WolbargOptions`, `AgentOrcError` → `WolbargError`
14
- - **Links** — docs and homepage now at [wolbarg.com](https://wolbarg.com); GitHub at [Atharvmunde11/wolbarg](https://github.com/Atharvmunde11/wolbarg)
42
+ - **Links** — docs and homepage now at [wolbarg.com](https://wolbarg.com); GitHub at [wolbarg/wolbarg](https://github.com/wolbarg/wolbarg)
15
43
  - **Schema** — internal meta table renamed `agentorc_meta` → `wolbarg_meta` (new databases only; recreate or migrate existing DBs)
16
44
 
17
45
  ### Migration
@@ -22,10 +50,25 @@ npm install wolbarg
22
50
  ```
23
51
 
24
52
  ```ts
25
- import { Wolbarg, sqlite, openaiEmbedding } from "wolbarg";
26
- const ctx = new Wolbarg({ /* same options shape */ });
53
+ import { wolbarg, openaiEmbedding } from "wolbarg";
54
+
55
+ const ctx = wolbarg({
56
+ organization: "my-org",
57
+ database: { provider: "sqlite", url: "./memory.db" },
58
+ embedding: openaiEmbedding({
59
+ apiKey: process.env.OPENAI_API_KEY!,
60
+ model: "text-embedding-3-small",
61
+ }),
62
+ telemetry: {
63
+ enabled: true,
64
+ database: { provider: "sqlite", url: "./telemetry.db" },
65
+ level: "debug",
66
+ },
67
+ });
27
68
  ```
28
69
 
70
+ `new Wolbarg({ storage, embedding })` and `init({ database })` remain fully supported.
71
+
29
72
  ## [0.2.1] — 2026-07-15
30
73
 
31
74
  ### Fixed
@@ -83,6 +126,9 @@ const ctx = new Wolbarg({ /* same options shape */ });
83
126
 
84
127
  - Initial npm release path (pre–modular storage / ingest)
85
128
 
86
- [0.2.1]: https://github.com/Atharvmunde11/wolbarg/releases/tag/v0.2.1
87
- [0.2.0]: https://github.com/Atharvmunde11/wolbarg/releases/tag/v0.2.0
129
+ [0.3.2]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.2
130
+ [0.3.1]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.1
131
+ [0.3.0]: https://github.com/wolbarg/wolbarg/releases/tag/v0.3.0
132
+ [0.2.1]: https://github.com/wolbarg/wolbarg/releases/tag/v0.2.1
133
+ [0.2.0]: https://github.com/wolbarg/wolbarg/releases/tag/v0.2.0
88
134
  [0.1.1]: https://www.npmjs.com/package/wolbarg/v/0.1.1
package/README.md CHANGED
@@ -1,6 +1,10 @@
1
+ <p align="center">
2
+ <img src="./assets/wolbarg-banner.png" alt="Wolbarg Logo: Memory Infrastructure for AI Agents" width="720" />
3
+ </p>
4
+
1
5
  # Wolbarg
2
6
 
3
- **Modular, provider-agnostic semantic memory for AI agents (v0.3.0).**
7
+ **Modular, provider-agnostic semantic memory for AI agents (v0.3.1).**
4
8
 
5
9
  [![npm version](https://img.shields.io/npm/v/wolbarg.svg)](https://www.npmjs.com/package/wolbarg)
6
10
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
@@ -46,6 +50,45 @@ npm install pdf-parse@1.1.4 mammoth
46
50
 
47
51
  ## Quick start
48
52
 
53
+ ```ts
54
+ import { wolbarg, openaiEmbedding, openaiLlm, bm25 } from "wolbarg";
55
+
56
+ const ctx = wolbarg({
57
+ organization: "my-org",
58
+ database: { provider: "sqlite", url: "./memory.db" },
59
+ embedding: openaiEmbedding({
60
+ apiKey: process.env.OPENAI_API_KEY!,
61
+ model: "text-embedding-3-small",
62
+ }),
63
+ llm: openaiLlm({
64
+ apiKey: process.env.OPENAI_API_KEY!,
65
+ model: "gpt-4.1-mini",
66
+ }),
67
+ keywordSearch: bm25(),
68
+ telemetry: {
69
+ enabled: true,
70
+ database: { provider: "sqlite", url: "./telemetry.db" },
71
+ level: "debug",
72
+ captureQueries: true,
73
+ captureLatency: true,
74
+ },
75
+ });
76
+
77
+ await ctx.remember({
78
+ agent: "research",
79
+ content: { text: "Stripe supports recurring invoices." },
80
+ metadata: { topic: "billing" },
81
+ });
82
+
83
+ const hits = await ctx.recall({ query: "invoices", topK: 5 });
84
+ const explained = await ctx.recall({ query: "invoices", explain: true });
85
+ await ctx.checkpoint("before-compress");
86
+ ```
87
+
88
+ `new Wolbarg({ storage: sqlite("./memory.db"), embedding })` remains supported for backwards compatibility.
89
+
90
+ ## Quick start (legacy constructor)
91
+
49
92
  ```ts
50
93
  import {
51
94
  Wolbarg,
@@ -84,8 +127,8 @@ const hits = await ctx.recall({
84
127
  });
85
128
  ```
86
129
 
87
- **Required:** `organization`, `storage`, `embedding`.
88
- **Optional:** `llm`, `keywordSearch`, `reranker`, `ocr`, `vision`, `chunking`, `compression`, `retrieval`.
130
+ **Required:** `organization`, `storage` or `database`, `embedding`.
131
+ **Optional:** `llm`, `telemetry`, `keywordSearch`, `reranker`, `ocr`, `vision`, `chunking`, `compression`, `retrieval`, `checkpoint`.
89
132
 
90
133
  Calling `compress` without `llm` is a TypeScript error.
91
134
 
@@ -93,28 +136,47 @@ Calling `compress` without `llm` is a TypeScript error.
93
136
 
94
137
  | Method | Description |
95
138
  | --- | --- |
96
- | `remember` | Store + embed |
97
- | `recall` | Semantic / hybrid search |
139
+ | `remember` / `rememberBatch` | Store + embed |
140
+ | `recall` / `recallBatch` | Semantic / hybrid search (`explain: true` for diagnostics) |
98
141
  | `ingest` | Documents → chunks → memories (**peers** for PDF/DOCX/OCR) |
99
142
  | `compress` | LLM summary (needs `llm`) |
143
+ | `checkpoint` / `rollback` / `listCheckpoints` | First-party memory snapshots |
144
+ | `export` / `import` | Portable SQLite memory bundles |
100
145
  | `forget` / `history` / `stats` / `clear` | Management |
101
146
  | `ready` / `close` | Lifecycle |
102
147
 
148
+ ## Studio
149
+
150
+ Local telemetry dashboard (separate app — not bundled into the SDK):
151
+
152
+ ```bash
153
+ cd wolbarg_studio
154
+ npm install
155
+ npm run dev
156
+ ```
157
+
158
+ Open http://localhost:3100 and connect to your `./telemetry.db`. Connections persist under the user config directory (`~/.wolbarg/studio.json` / AppData), never inside the project.
159
+
160
+ Telemetry SQLite files use an additive, versioned schema. On writable open, v1
161
+ files are migrated in place to telemetry schema v2 and retain all existing
162
+ events. V2 adds organization, agent, tags, checkpoint, persisted recall
163
+ explanations, and measured stage spans. `SqliteEventDatabase.query()` can filter
164
+ by `organization`, `agentId`, `tag`, and `checkpointId`; read-only access to an
165
+ unmigrated v1 file remains supported.
166
+
103
167
  Full documentation: [wolbarg.com](https://wolbarg.com/docs/introduction)
104
168
 
105
- ## Limitations (v0.2)
169
+ ## Limitations (v0.3)
106
170
 
107
171
  - **Ingest peers are opt-in but required for those formats** — see table above.
108
172
  - **PDF text layer only** via `pdf-parse`; scan/image PDFs need OCR/vision (or a text PDF). Older pdf.js in `pdf-parse@1.1.4` may reject some modern PDFs.
109
173
  - **Node `node:sqlite` is experimental**; Node **22.5+** required.
110
- - **Postgres** needs `pg`; `pgvector` is optional (falls back to byte embeddings + in-process distance).
174
+ - **Postgres** memory storage needs `pg`; telemetry/checkpoints are SQLite-only in v0.3 (interfaces ready for Postgres).
111
175
  - **Not** an agent framework, chat UI, or hosted vector SaaS.
112
176
 
113
- See [Limitations (v0.2)](https://wolbarg.com/docs/guides/limitations) for the full list.
114
-
115
- ## Migration from 0.1
177
+ ## Migration from 0.1 / 0.2
116
178
 
117
- `init()` still works. Prefer constructor DI. LLM is optional. Schema auto-migrates to v2.
179
+ `init()` and `new Wolbarg({ storage })` still work. Prefer `wolbarg({ database, telemetry })`. LLM is optional. Schema auto-migrates to v2.
118
180
 
119
181
  ## License
120
182