Repository navigation
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 isreadOnlyHint: trueapart from an explicit pull. The serverinstructionssay 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, everyMD_GIT_SYNC_INTERVAL_SECS, and whenever an agent callssync_vault. A branch that cannot fast-forward (diverged, or local edits in the way) fails the sync and changes nothing. READ_ONLYerror 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 answers405 Method Not Allowed.provision_transferstill grants reads, and refuseswrite: true. - A pending transaction journal refuses startup; start the instance once read-write to recover it.
MD_GIT_AUTO_COMMITorMD_GIT_AUTO_PUSH_SECStogether withMD_READ_ONLYis 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.