v5.1.0-beta.1
Pre-releaseHarper v5.1.0-beta.1 is the first beta of the 5.1 release line. The major additions are a built-in MCP server and substantial HNSW vector index improvements, along with storage reliability fixes and completion of the `@embed` directive.
Model Context Protocol (MCP) server
Harper now ships a built-in MCP server, exposing your application's operations as tools available to LLM agents:
- Operations profile — CRUD and query operations on your tables exposed as MCP tools, automatically derived from your schema
- Application profile — Schema-defined tools from your component's exported operations
- Resources — Tables exposed as MCP resources with list, read, and template support
- Audit logging and rate limiting — Per-session tracking and listChanged notifications
harper mcpstdio CLI — Launches the MCP server over stdio, compatible with Claude Desktop, Cursor, and other MCP clients
HNSW vector index
- int8 scalar quantization — Enable with `@indexed(type: "HNSW", quantization: "int8")` to reduce index memory footprint ~3× and improve search throughput ~4.9× with minimal recall loss. The quantized navigational graph stores int8-approximated vectors for traversal while retaining full-precision vectors for final reranking.
- Auto-scaled search ef — Search precision scales automatically with index size, maintaining recall stability as indexes grow.
- Query-time ef override — Per-query `ef` control for precision/latency tradeoff at search time.
`@embed` directive
The `@embed` directive for automatic vector embedding of schema fields is complete in this release. Additions include registry pruning when components unload, `@embed` config surfaced in `describe`, analytics tracking for embed/generate operations, and fixes for type validation and bulk-write edge cases.
Models
- `scope.models.generate` now supports `toolMode: 'auto'` for autonomous agent-loop operation — the model iterates tool calls until a final answer is produced without per-call intervention.
- Aggregate analytics are emitted for `scope.models.embed` and `scope.models.generate` calls.
Built-in Harper Agent
The core package now includes a scaffold for a built-in Harper Agent component, enabling AI-driven application creation and management without a separate install.
Storage and reliability
- rocksdb-js 1.4.1 — Fixes partial-write corruption in the writev path (the framing-corruption class that caused txnlog frame-length mismatches under concurrent writes).
- lmdb 3.5.5
- Quota-aware reclamation — Harper responds to host-manager quota-status signals to proactively reclaim disk space before hitting hard limits.
- File-watching resilience — Falls back to polling when inotify watches or file descriptors are exhausted, rather than silently dropping change events.
- Async close lifecycle — Correct shutdown ordering for `EntryHandler`, `OptionsWatcher`, and `Scope` prevents races during component teardown.
v4→v5 migration fixes
- Blob files referenced by records being migrated are now correctly preserved during LMDB→RocksDB re-encoding.
- Structures are reused across records during migration to reduce memory allocation.
Replication
- Configurable `replication.pingInterval` and `replication.pingTimeout` parameters for tuning keepalive behavior per deployment.
- MQTT over Symphony: PROXY protocol v1 header is stripped before handoff to the MQTT parser.
Other fixes
- `evict()` returns a Promise on RocksDB (was synchronous, inconsistent with LMDB behavior).
- `jsLoader` supports ESM-only packages.
- Component `process.exit()` is blocked from terminating the main Harper worker process.
- Default log rotation path is `/rotated` when unset (previously caused an error if not explicitly configured).