Skip to content

v0.11.0

Latest

Choose a tag to compare

@zekaizer zekaizer released this 18 Oct 19:03

A vault can now be served read-only: agents read and search it, nothing they call can change it, and the server keeps it current as a pull mirror (ADR-0030). Multi-vault serving stays one instance per vault — a read-only vault is a second instance with its own env file, hostname and connector name.

Added

  • MD_READ_ONLY=1 (--read-only 1). The instance registers only the read and search tools, so every tool a client sees is readOnlyHint: true apart from an explicit pull. The server instructions say the vault is read-only.
  • Pull-only sync_vault. With git sync on, a read-only vault fetches and fast-forwards only — it never commits or pushes. It pulls once in the background at startup, every MD_GIT_SYNC_INTERVAL_SECS, and whenever an agent calls sync_vault. A branch that cannot fast-forward (diverged, or local edits in the way) fails the sync and changes nothing.
  • READ_ONLY error code. The core refuses every write on a read-only vault — a backstop the advertised surface never reaches.

Behaviour on a read-only instance

  • The transfer API has no PUT: it answers 405 Method Not Allowed. provision_transfer still grants reads, and refuses write: true.
  • A pending transaction journal refuses startup; start the instance once read-write to recover it.
  • MD_GIT_AUTO_COMMIT or MD_GIT_AUTO_PUSH_SECS together with MD_READ_ONLY is a startup error.

Notes

  • Serving one directory from both a read-write and a read-only instance is unsupported.
  • No change for read-write instances.