Skip to content

docs(daemon): design and plan for hyperdb-daemon extraction - #385

Open
StefanSteiner wants to merge 4 commits into
tableau:mainfrom
StefanSteiner:docs/hyperdb-daemon-extraction
Open

StefanSteiner wants to merge 4 commits into
tableau:mainfrom
StefanSteiner:docs/hyperdb-daemon-extraction

Conversation

@StefanSteiner

Copy link
Copy Markdown
Contributor

Adds the design spec and implementation plan for extracting the shared-engine daemon in hyperdb-mcp/src/daemon/ into a hyperdb-daemon crate. This PR is docs only: no code changes, and nothing is scheduled yet.

  • Spec: docs/superpowers/specs/2026-11-24-hyperdb-daemon-extraction-design.md
  • Plan: docs/superpowers/plans/2026-11-24-hyperdb-daemon-extraction.md

Decisions recorded

  • Transport: the shared engine uses TCP loopback over the PostgreSQL protocol only. New daemons create no IPC or gRPC listener.
  • Engine credential: each daemon start generates a password. hyperd receives only its SCRAM-SHA-256 verifier, through an owner-only --config file (authorized_users), and always runs with --strict-settings-mode. Before publishing its record, the daemon checks that a passwordless connection is rejected. The HYPER_INITIAL_USER_PASSWORD environment variable is documented as the fallback.
  • Client: connections to the shared engine use a new strict mode that requires SCRAM-SHA-256 with server verification.
  • Control channel: a capability token is required for commands that change state.
  • Remote engines: out of scope; noted as a possible future extension.

Phases

  • 0: measure.
  • S: engine and control-channel hardening, planned as two PRs.
  • A: internal crate move.
  • B: public acquire() API; needs a go/no-go decision first.

Open decisions are listed at the end of the spec.

npx markdownlint-cli2 reports 0 issues.

🤖 Generated with Claude Code

Design spec and implementation plan for moving the shared-hyperd daemon
out of hyperdb-mcp into a hyperdb-daemon crate, in phases: measure,
engine and control-channel hardening, internal crate move, and a later
public acquire() API. The shared engine runs on TCP loopback with a
generated SCRAM password and a strict-SCRAM client.
Pre-1.0 clients are unsupported against a 1.0 daemon; the daemon reports a
rejected client in STATUS/log naming the upgrade, and the changelog documents
the rule.
…rsion and engine_user in Phase S

Decide D8 (standalone hyperdb-daemon binary, L1 dropped) and reshape
Phase B around a language-neutral contract (command line, record schema,
control protocol) with the Rust acquire() API as a layer on top, so users
of the Hyper API in C++, Python or Java can share an engine. Phase S gains
protocol_version and engine_user in daemon.json so that contract starts
from a known baseline. Also reflow a broken line in D5.
Sharing a .hyper file across processes needs a shared engine because the
file is locked by the hyperd that opened it. Key each daemon by a required
app ID (the MCP is app `mcp`, keeping ~/.hyperdb) instead of a shared
default cohort: an app's processes share one engine, apps do not share
databases and update independently. Takeover stays lease-aware and only
happens between versions of the same app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant