Build on Bevia

The runtime

A local HTTP daemon in front of a closed engine. Narrow, named doors; capabilities the owner grants; a versioning promise.

The daemon

The engine listens on 127.0.0.1:<port> and never beyond loopback unless the owner enables the LAN phone door. Bevia's own desktop app, Chrome extension, Obsidian plugin and developer workspace use the same doors you do; third-party programs are not second-class. The desktop app shows the port, pins it across restarts, and writes it with a working token into ~/Bevia/Developer/bevia-workspace.json when you press Build on Bevia.

There is no execute("whatever") and no database handle. The doors are narrow and named, which is what lets the engine's internals evolve without breaking what you built.

The doors

DoorWhat it is for
POST /intake/captureEvidence in. Validate first with /intake/validate, a dry run that writes nothing and says exactly what is wrong. Input
GET /world-inspect?entity= · /published-documentOne understanding, Attention, follow-through. The whole World (/world-snapshot, /world-diff, /publication) and the map are the owner's only. Read
GET /world/historyEvery publication, newest first.
GET /events · /events/streamWhat happened, as a cursor feed and as server-sent events. Identifiers only. Events
POST /propose · /proposals · /proposals/receiptSay what you think; the owner decides; report what you did. Proposals
POST /queryA grounded answer over the published map — spends the owner's fuel.
POST /mcpThe answer tools an AI client gets. MCP
GET /export-substrateThe whole portable bundle — owner-grant only. Export
GET /whoami · /healthDoes the engine still recognize me, and what may I do? · Is it up?

Capabilities

Every call carries a bearer token minted by pairing, and every door is gated by what that token may do — never by what the program is called. The owner sees every paired program, what it may do and what it asked for, and can narrow or revoke it at any time. That is the entire permission system, and it belongs to the owner.

CapabilityOpens
captureintake and the capture proxy — every paired program has it
readone understanding at a time, history, Attention, the MCP answer tools
evidencethe originals — raw moment text behind a territory
askroutes that invoke the model the owner configured; they spend the owner's fuel; alone, it also opens the MCP answer tools
subscribethe event feed and stream
proposeproposals, withdrawal, receipts
substrate_exportthe WHOLE substrate — owner-grant only; not a Block Share's bounded export
source_contractpropose the declared structure of a custom source, and read back what is registered
controlBlocks and Shares, the whole-World reads and the map. Owner-grant only
The loopback rule

A pairing from the owner's own machine gets the self-serve capabilities it asks for. A pairing from another device gets capture, and the rest waits for the owner. substrate_export and control are never granted by asking. The whole World is the owner's only. A vault the Bevia app writes sends notes in and asks (capture and ask). A Share key reads its slice and nothing else: every read it makes is Share → Block → Rights → Edition, or fails closed.

Pairing

Pairing is owner-initiated: the app shows a short-lived code (Settings → Into Bevia); the program exchanges it once and stores the token. Off-device tokens carry a 90-day sliding expiry; same-machine tokens do not.

POST /pair
{ "code": "ABCD2345", "name": "Thesis Guard", "kind": "extension",
  "capabilities": ["capture", "read", "subscribe", "propose"] }
→ { "sensor_id": "…", "token": "…", "capabilities": ["capture","read","subscribe","propose"], "pending": [] }

GET /whoami   →  { "sensor_id", "name", "kind", "capabilities", "pending" }

Unknown capability names are refused by name (400 unknown_capability). Validation, never permission: the engine says what it cannot understand; it never says what you may not build.

Versioning promise

This is protocol v1.5 (v1.2 plus the MCP door stated for both engines: Bevia's answer tools and Verify's four read-only tools, reality_check, nuance_briefing, verify_holds and verify_brief; and, since v1.5, the whole World is the owner's only). Valid v1 evidence will be understood by every future engine version. New evidence kinds, richer schemas, new event kinds and new proposal kinds arrive as additions, never as breaking changes to v1 fields. One read-side change is semantic, not structural, and is stated plainly: since 2026-09-18 the durable World a publication carries holds superseded Matter beside current Matter, so durable_world.matter is history and present together — read the current projection (world.current(), owner only), never the row count. A token paired before capabilities existed keeps exactly the access it had. The full contract is written into every developer workspace as PROTOCOL.md and served as text at /build/PROTOCOL.md; /llms.txt points a coding agent at it.

The SDK →