hyperdb-mcp 0.4.0 → 0.5.1

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.
Files changed (2) hide show
  1. package/README.md +14 -6
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -185,7 +185,7 @@ Each session has **two databases**: an ephemeral primary (scratch space — alwa
185
185
 
186
186
  | Mode | Flag | Behavior |
187
187
  |---|---|---|
188
- | **Shared daemon** *(default)* | *(none)* | One `hyperd` process per user, shared across all MCP clients. The first client auto-spawns the daemon; subsequent clients discover and reuse it. Idle for 30 minutes daemon shuts itself down; the next client spawns a fresh one. |
188
+ | **Shared daemon** *(default)* | *(none)* | One `hyperd` process per user, shared across all MCP clients. The first client auto-spawns the daemon; subsequent clients discover and reuse it. The daemon stays resident by default (idle shutdown is opt-in — see below), so the next client connects instantly instead of waiting for a fresh `hyperd` to start. A client built from a newer `hyperdb-mcp` version transparently takes over (stops and replaces) an older running daemon. |
189
189
  | **Private hyperd** | `--no-daemon` | Each MCP client spawns its own `hyperd` (legacy behavior, one per session). |
190
190
 
191
191
  The shared daemon is the bigger win for users running multiple AI clients (Claude Code + Cursor + VS Code) — they all share one Hyper engine instead of spawning three.
@@ -240,7 +240,7 @@ CREATE TABLE "persistent"."public"."revenue_2026" AS
240
240
 
241
241
  ### Daemon management
242
242
 
243
- The daemon is normally invisible — it auto-spawns and idle-times-out on its own. For diagnostics:
243
+ The daemon is normally invisible — it auto-spawns on first use and stays resident. For diagnostics:
244
244
 
245
245
  ```bash
246
246
  hyperdb-mcp daemon status # Show running daemon (PID, endpoint, started_at, version)
@@ -248,8 +248,14 @@ hyperdb-mcp daemon stop # Gracefully shut down the daemon
248
248
  hyperdb-mcp daemon # Run as a daemon explicitly (rarely needed)
249
249
  ```
250
250
 
251
+ `status` and `stop` locate the running daemon automatically (reading `daemon.json`, then scanning the port range), so they work even if the daemon scanned onto a non-default port. Pass `--port <PORT>` to target a specific port explicitly.
252
+
251
253
  State files live at `~/.hyperdb/` by default (override with `HYPERDB_STATE_DIR`).
252
254
 
255
+ **Port discovery.** The daemon binds a TCP health/lock port — by default it scans upward from **7485** (16 ports) and uses the first free one; set `HYPERDB_DAEMON_PORT` to pin an exact port (no scan). The health port doubles as a single-instance lock and an identity check: clients send `PING` and require a `PONG hyperdb-mcp <version>` reply before trusting a daemon, so an unrelated process occupying the port is skipped rather than mistaken for the daemon.
256
+
257
+ **Staying resident.** By default the daemon never idle-shuts-down — keeping `hyperd` warm means the next tool call connects immediately instead of triggering a "restarting, please retry" round-trip. To opt into auto-shutdown (e.g. on CI), pass `--idle-timeout <SECS>` or set `HYPERDB_DAEMON_IDLE_TIMEOUT`.
258
+
253
259
  ### Recovery from hyperd crashes
254
260
 
255
261
  The daemon polls `hyperd` every 5 seconds. If the process has exited (crashed, OOM, killed), the daemon spawns a replacement, atomically updates `~/.hyperdb/daemon.json` with the new endpoint, and continues serving clients. Clients see one failed tool call (the request that was in flight when hyperd died); the next tool call transparently reconnects to the new hyperd via the same recovery path used for normal connection drops.
@@ -813,15 +819,17 @@ Daemon subcommand:
813
819
  hyperdb-mcp daemon Start the daemon (usually auto-spawned)
814
820
  hyperdb-mcp daemon stop Gracefully stop the running daemon
815
821
  hyperdb-mcp daemon status Show running daemon info
816
- hyperdb-mcp daemon --port <PORT> Override the health/lock port (default 7484)
817
- hyperdb-mcp daemon --idle-timeout <SECS> Override idle timeout (default 1800 = 30 min)
822
+ hyperdb-mcp daemon --port <PORT> Pin the health/lock port. When omitted,
823
+ scans upward from 7485 for a free port.
824
+ hyperdb-mcp daemon --idle-timeout <SECS> Opt into idle shutdown after SECS idle.
825
+ When omitted, the daemon stays resident.
818
826
 
819
827
  Environment:
820
828
  HYPERD_PATH Path to hyperd binary (auto-detected if on PATH)
821
829
  HYPERDB_PERSISTENT_DB Override the default persistent-db path
822
830
  HYPERDB_STATE_DIR Override daemon state directory (default ~/.hyperdb/)
823
- HYPERDB_DAEMON_PORT Override daemon health/lock port (default 7484)
824
- HYPERDB_DAEMON_IDLE_TIMEOUT Override daemon idle timeout in seconds (default 1800)
831
+ HYPERDB_DAEMON_PORT Pin daemon health/lock port (default: scan from 7485)
832
+ HYPERDB_DAEMON_IDLE_TIMEOUT Opt into idle shutdown (seconds); default: stay resident
825
833
  ```
826
834
 
827
835
  ---
package/package.json CHANGED
@@ -29,10 +29,10 @@
29
29
  "engines": {
30
30
  "node": ">= 21"
31
31
  },
32
- "version": "0.4.0",
32
+ "version": "0.5.1",
33
33
  "optionalDependencies": {
34
- "hyperdb-mcp-darwin-arm64": "0.4.0",
35
- "hyperdb-mcp-linux-x64-gnu": "0.4.0",
36
- "hyperdb-mcp-win32-x64-msvc": "0.4.0"
34
+ "hyperdb-mcp-darwin-arm64": "0.5.1",
35
+ "hyperdb-mcp-linux-x64-gnu": "0.5.1",
36
+ "hyperdb-mcp-win32-x64-msvc": "0.5.1"
37
37
  }
38
38
  }