Skip to content

v5.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Jun 00:20
001bf7b

Harper 5.1

Harper 5.1 adds an AI/LLM integration layer, a built-in MCP server, deployment tracking, HNSW int8 quantization, a new middleware and routing system, and a set of replication and upgrade reliability fixes.

AI Models Integration

A built-in models layer provides a unified interface for AI backends (Anthropic, OpenAI, AWS Bedrock, Ollama). Applications call scope.models.embed(), scope.models.generate(), and scope.models.generateStream() directly, without managing external connections per-application. The @embed schema directive automates vector embedding at the schema level: on every write Harper calls the configured model and stores the result automatically. scope.models.generate now supports toolMode: 'auto' for agentic tool-calling loops.

MCP Server

A built-in Model Context Protocol server allows LLM clients (Claude Desktop, Cursor, Zed) to connect directly to a Harper instance. Two profiles: an operations profile that wraps Harper's operations API as tools, and an application profile that auto-generates tools from Resource verb methods. The harper mcp CLI provides a stdio bridge and diagnostic tooling.

Application Routing & Middleware

Components can now declare a urlPath to scope their routes to a URL prefix (Harper strips the prefix before dispatch) and before/after to order execution relative to named middleware — most commonly relative to 'authentication'. This works uniformly for HTTP, WebSocket, and Upgrade handlers. request.getNodeRequestResponse() provides a Node.js IncomingMessage/ServerResponse bridge for integrating Express/Koa-style third-party middleware.

Deployment Tracking

deploy_component now records a full audit trail in system.hdb_deployment, tracking deployment phases, per-node outcomes, and install output. The response includes a deployment_id. New operations: list_deployments, get_deployment (with SSE streaming for live deploys), get_deployment_payload, delete_deployment_payload.

HNSW int8 Quantization

HNSW vector indexes support int8 quantization (on by default for new indexes), roughly 3× smaller index and 5× faster search with ~1% recall cost at recall@10. Search is asymmetric: queries use full-precision vectors, the graph uses int8, and results are reranked before returning. dotProduct distance is also new in 5.1.

Replication & Upgrade Reliability

  • Wedge detection and auto-recovery for stalled replication streams
  • Resumable bulk clone — interrupted copies resume from where they stopped
  • Client-side WebSocket dead-connection detection
  • Reconnect backoff capped at 30s
  • Boot replay bounded — handles corrupt transaction log frames instead of aborting
  • replication.pingInterval / replication.pingTimeout configurable keepalive
  • LOCAL_ONLY record metadata flag for writes that should not replicate
  • In-place v4→v5 upgrade reliability: correct hostname handling, __dbis__ structure persistence, blob/metadata preservation during LMDB→RocksDB migration

Configuration

  • HARPER_CONFIG env var — recommended way to specify config file location
  • storage.rocks.blockCacheSize — explicit RocksDB block cache sizing
  • storage.migrateOnStart: true — auto-migrate LMDB to RocksDB on startup
  • WriteBufferManager on by default at 1/3 of block cache

Full Changelog: v5.0.31...v5.1.0