heurchain 1.2.0 → 1.3.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 ADDED
@@ -0,0 +1,67 @@
1
+ # HeurChain Changelog
2
+
3
+ ## v1.3.0 — 2026-05-07
4
+
5
+ ### New: Frictionless REST layer
6
+
7
+ - `GET /api/session-context?agent=X&hint=Y` — token-budgeted payload (proc knobs + last session + top BM25 hits) designed for system-prompt injection via hook at session start. Zero MCP tool calls required.
8
+ - `GET /api/search?q=...` — BM25 search over the full index via plain HTTP. No SSE session, no tool definition overhead.
9
+ - `POST /api/buffer` — fire-and-forget turn capture. Flushes to Redis on 5-min heartbeat or session end. No agent action required.
10
+ - `POST/GET/DELETE /api/proc` — procedural memory tier. Stable agent preferences (coding style, language, patterns) stored with no TTL or decay.
11
+
12
+ ### New: Slim MCP profile
13
+
14
+ - Connect with `?profile=slim` on `/sse` to load 14 core tools instead of 29 (~750 token savings on tool definitions per context window).
15
+ - Infrastructure tools (Prometheus, Grafana, Proxmox, Ceph) only load on `?profile=full`.
16
+
17
+ ### New: MCP tools
18
+
19
+ - `proc_set` / `proc_get` — read and write procedural memory from within an MCP session.
20
+
21
+ ### Fix: BM25 index was Redis-blind
22
+
23
+ - Silent bug in node-redis `scanIterator` caused it to yield key pages (arrays) instead of individual keys. Every `redis.get(array)` call failed silently, so BM25 was built from Obsidian vault files only — Redis keys were never indexed. Fixed via `scanKeys()` normalizer. Index now correctly covers both tiers (465 docs vs 447 before).
24
+
25
+ ---
26
+
27
+ ## v1.2.1 — 2026-05-06
28
+
29
+ ### Security
30
+
31
+ - Path traversal fix: `validateKey()` now rejects `..` segments, null bytes, and slash characters before resolving vault paths.
32
+ - Bearer token auth (`MCP_AUTH_TOKEN`) enforced on all endpoints. `/health` remains open for healthcheck probes.
33
+ - Grafana tool fails closed when credentials are not configured rather than exposing unauthenticated access.
34
+
35
+ ### Fixes
36
+
37
+ - SSE session cap (50) with cleanup on both `req.on("close")` and `res.on("close")` to prevent transport leaks.
38
+ - BM25 rebuild is atomic: `isBuilding` flag + `pendingOps` queue replays writes that arrived during a rebuild onto the fresh index after swap. No silent memory loss during hourly rebuild.
39
+ - `bulkAdd()` for O(N log N) index builds instead of O(N²) per-insert `_recalcStats()` calls.
40
+ - Per-key try/catch in `buildIndex` Redis scan — a single bad key type no longer aborts the entire scan.
41
+ - Tier validation: unknown tier strings fall back to `"all"` instead of returning empty results.
42
+
43
+ ### Features
44
+
45
+ - `heurchain_export` — glacier sync: exports Redis longterm-tier entries to Obsidian vault as markdown. Idempotent.
46
+ - `minScore` parameter on `heurchain_search` to filter low-signal results.
47
+ - Namespace isolation: `namespace` parameter scopes search and write operations to an agent-specific key prefix.
48
+ - Session noise filter: suppresses low-signal session metadata keys from BM25 results.
49
+
50
+ ---
51
+
52
+ ## v1.2.0 — 2026-05-05
53
+
54
+ ### Features
55
+
56
+ - Native BM25 search (Okapi BM25, k1=1.5, b=0.75) implemented in-process. Replaced dead broker call to port 3012.
57
+ - Redis integration: `redis-cache` service added to Docker stack; `REDIS_URL` fixed to use Docker service name.
58
+ - `heurchain_search` now indexes all Redis string keys + Obsidian vault `.md` files on startup with hourly rebuild.
59
+
60
+ ---
61
+
62
+ ## v1.1.0 — initial release
63
+
64
+ - MCP SSE server with 27 tools across cache, vault, search, monitoring, infrastructure, and user context categories.
65
+ - Tiered storage: Redis (longterm) + Obsidian vault (working).
66
+ - nginx gateway for SSE proxying.
67
+ - Ansible role for managed host deployment.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # HeurChain
2
2
 
3
+ > **HeurChain** — short for **Heuristic Chaining** — describes the core design principle: knowledge is not stored in isolation but chained through heuristic reasoning, so that each piece of stored information reinforces and contextualizes what came before. The result is a memory system that improves its own recall accuracy over time, across every agent that writes to it.
4
+
3
5
  **One memory system. Every AI agent. Simultaneously.**
4
6
 
5
7
  HeurChain is a universal persistent memory layer for AI agents. Claude Code, Kimi, Hermes, OpenClaw, ChatGPT, and any HTTP or MCP client share the same tiered knowledge store — BM25-ranked search, session continuity, and automatic tier promotion — without any agent-specific configuration beyond a URL and an interface choice.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heurchain",
3
- "version": "1.2.0",
4
- "description": "MCP (Model Context Protocol) server for HeurChain — tiered agent memory with BM25 search, session lifecycle, and infrastructure knowledge tools",
3
+ "version": "1.3.0",
4
+ "description": "MCP (Model Context Protocol) server for HeurChain — tiered agent memory with BM25 search, session lifecycle, procedural memory, ambient capture, and frictionless session-context injection",
5
5
  "main": "server.js",
6
6
  "scripts": {
7
7
  "start": "node server.js"
@@ -9,7 +9,8 @@
9
9
  "author": "Peter Medina <peter@carlssoncreative.com>",
10
10
  "files": [
11
11
  "server.js",
12
- "AGENT_CONFIG.json"
12
+ "AGENT_CONFIG.json",
13
+ "CHANGELOG.md"
13
14
  ],
14
15
  "keywords": [
15
16
  "mcp",