a capability-secure, witnessed substrate

A turn is the exercise of an attenuable proof-carrying token over owned state, leaving a verifiable receipt.

dregg is the substrate: cells own state and hold capabilities, a turn changes state only as those capabilities permit, and every turn proves itself, leaving a receipt anyone can check. deos is a desktop built on it. Everything below runs client-side, in your browser tab, in WebAssembly: the verified executor runs here, with no backend server. Every click you make is a real, cap-gated, verified turn.

the verified executor runs in this tab: no backend, every click a real cap-gated turn

Six words, and what they mean

The model is small. State lives in cells; capabilities say what may touch it; a turn is one atomic change; effects are the fixed vocabulary of changes a turn can make; a proof witnesses that the change obeyed the rules; a receipt is the record a third party can verify without trusting you.

cell
An owned object: some state, a balance, and a capability list (the set of things it is allowed to reference). A cell can only act on what its c-list names.
capability
An unforgeable, attenuable token of authority. You can hand someone a strictly weaker copy; you cannot hand them more than you hold. Authority only ever narrows.
turn
One atomic state transition. A call forest runs depth-first across cells; if any step is refused, the whole turn rolls back. Nothing partial commits.
effect
The fixed verb vocabulary a turn may use: transfer, set a field, mint, hand off a capability, and so on. The vocabulary is closed: an unauthorized act is not expressible.
proof
A turn carries a witness that it obeyed the rules: produced once, verified cheaply. The check does not re-run the work; it checks the proof.
receipt
The verifiable record a turn leaves behind: the before-state, the after-state, the effects, the proof. A light client can fold a whole history of receipts into one proof and check it, re-witnessing nothing.

Verify a whole history · re-executing nothing

A finalized history is a chain of turns: each turn's after-state is the next one's before-state. A producer folds the whole chain into one succinct recursive STARK. Your browser tab verifies that single proof: no re-execution, no re-hashing, no walk of the chain. If it verifies, every folded turn executed correctly, in order, from genesis to the final root. This is the in-browser recursive-STARK verification, and it runs right here.

▼ folded once, off the verifier ▼
π ✓
one recursive proof · verified in your tab, independent of how many turns the history holds

named floor: the verification carries the recursion engine's FRI soundness. The verification is the trust, not "re-run it and hope they match."

The trust anchor is your configuration, held separately, never read off the artifact under verification. Tamper one hex digit of the anchor and the proof is refused, not laundered. This is the executable counterpart of the Lean theorem light_client_verifies_whole_history.

Everything here is live, most of it in your tab

The surfaces in the first group below load a verified executor compiled to WebAssembly and run it in your browser. Click an affordance and you fire a real cap-gated turn against an in-tab ledger; the bound fields re-paint from the committed state. No install, no account, no server.

client-side WebAssembly · real verified turns · nothing leaves your machine

the desktop deos cockpit Land inside deos: cells, a moldable inspector, the affordances each cell exposes, and the ocap graph. Click an authorized affordance and a real verified turn commits, leaving a receipt in the log. open the cockpit › live cards Card gallery A counter, a reflective inspector, a tally board, a key-value store cell, and document collaboration with conflicts as first-class objects: each a real verified turn over an in-tab executor. open the gallery › capabilities Caps as rows Your capabilities expressed as the rows you may read. Present a token, change its caveats, and watch the cell rows narrow exactly as the row-level-security gate narrows them: fail-closed, no amplification. open the explorer › light client Verify a whole history Fold a multi-turn history into one succinct recursive proof, in your tab, then verify it, re-executing nothing. Check it against a config anchor; a tampered anchor is refused, not laundered. run the verifier › transclusion Xanadu made honest Quote the web without copying it: a transcluded span is a verified dregg:// finalized read. Amend the source and the live quote follows; forge the bytes and the quote refuses to open; every quote leaves a receipt-pinned backlink. open the docuverse › reference The atlas An interactive map of the whole protocol and its UI surfaces (the nouns, the effects, the screens), browsable end to end. open the atlas › full renderer · needs WebGPU gpui cockpit The full native gpui renderer (the same one the desktop draws with) on a WebGPU canvas, driving the same in-tab executor. Heavier; shown when the build is available in this deploy. open the full cockpit ›

Three surfaces run server-side, on a devnet box, served over the public web: you play against a real executor there rather than one in your tab. The rule enforcement is the same (an illegal move is refused and commits nothing), and two limits are named on the surfaces themselves: a run is checked by deterministic replay re-execution (a stranger re-runs it), not by checking a STARK, and a web player is a self-asserted cookie, not a signature.

hosted devnet · real verified turns · replay-checked, not proof-checked

Call it from your own code

The shape is the same in every language: an identity makes a turn, signs it, and submits it; you get back a receipt. An unauthorized act is not expressible on the public surface. Every action carries a real signature over the canonical, federation-bound message.

Install the SDK and run a turn against a local dev node.

npm install @dregg/sdk
import { AgentRuntime, NodeClient, profiles } from "@dregg/sdk";

// 1. a named identity (the same store as the `dregg id` CLI)
const identity = profiles.loadActive() ?? (profiles.create("me"), profiles.load("me"));

// 2. bind to a node (your local dev node, or a remote node + its operator token)
const node = new NodeClient("http://localhost:8421");
const runtime = new AgentRuntime(identity, node);

// 3. identity -> turn -> sign -> submit -> receipt
const receipt = await runtime.turn()
  .transfer({ to: "cell:...", amount: 10n })
  .sign()
  .submit();

console.log(receipt.committed, receipt.postState);

There is no public server today; run a node locally first (dregg-node init && dregg-node run --enable-faucet --port 8421). See the SDK's QUICKSTART.md.

The default wheel is the light, kernel-free client. The same shape: identity → turn → sign → submit → receipt.

pip install dregg
from dregg import Identity, NodeClient

identity = Identity.load_active() or Identity.create("me")
node = NodeClient("http://localhost:8421")

receipt = (
    node.turn(identity)
        .transfer(to="cell:...", amount=10)
        .sign()
        .submit()
)
print(receipt.committed, receipt.post_state)

For the embedded verified Lean kernel, install the heavy build: pip install "dregg[kernel]".

pg-dregg adds three things to a database: cap-secure row-level security, a verified store that refuses a tampered batch, and proof-attested ranges. See them end to end without installing Postgres:

git clone https://github.com/emberian/dregg
cd dregg/pg-dregg
cargo run --example three_pillars

The same behaviour runs through real SQL on pg18 via cargo pgrx test pg18 / cargo pgrx run pg18. The browser twin of pillar one is the caps-as-rows explorer.

The guarantees, stated plainly

cap-gating

No amplification. Authority only narrows. An attenuated token sees a strict subset of what its parent saw and can do a strict subset of what its parent could do. There is no path from a weaker token to a stronger one.

conservation

Nothing is created or destroyed off the books. Balances are conserved across a turn by construction; a turn that would violate conservation does not commit.

verified store

A tampered or reordered batch is refused by the chain tooth the database engine itself runs, without re-running any prover. The store checks the proof, not the work.

light-client

A whole history folds into one proof. A client can verify that every finalized turn executed correctly, in order, from genesis to the final root, re-witnessing nothing. The trust anchor is configuration, never read off the artifact under verification.

What you can build on it

sovereign apps
Apps that own their state
An application is a set of cells and the capabilities between them. It runs the same way on your phone, on a server, or fully in a browser tab: the executor is the same verified code.
agent memory
Witnessed memory for agents
Per-cell heaps, working memory, and passable intermediate states: a portable, witnessed primitive. An agent's memory becomes something you can attenuate, hand off, and verify.
collaboration
Documents with conflicts as objects
Fork a document, diverge, then stitch. A merge surfaces conflicts as first-class objects (both alternatives held side by side), and resolving one is itself a verified turn.
disclosure
Cross-org selective disclosure
Reveal exactly the facts you choose, with a proof. Or reveal one allow/deny bit and nothing else. The verifier learns the verdict without learning the data behind it.
settlement
Settlement across chains
A finalized history can be wrapped for an external chain to settle against: the recursive aggregate is the bridge. The same receipts, checked elsewhere.
databases
A database that checks itself
pg-dregg makes row-level security a capability predicate, refuses a tampered commit log, and attests ranges with a proof (inside the engine, with no separate trusted service).

A host that cannot tamper with what it serves

Publish a minisite and you commit its blake3 hash to your cell, on-chain, in one cap-gated receipted turn. <name>.dregg.works then serves the bytes, but the host has no way to change them. Every served page carries a verify badge: your browser re-hashes the bytes it received and checks them against the commitment fetched from the node. ✓ match, or ✗ tampered, and you don't have to take the host's word for either.

1 · commitPublish A cap-gated turn writes blake3(page) into slot 0 of your cell. The commitment is the trust-bearing half: yours, on-chain, receipted.
2 · serveHost the bytes <name>.dregg.works ships the raw bytes. Convenience, not trust: the host is untrusted infrastructure.
3 · verifyCheck it yourself The badge re-hashes the served body in your tab and compares it to the cell's committed hash. A tampered byte is caught before you trust a word.

A turn is the exercise of an attenuable proof-carrying token over owned state, leaving a verifiable receipt.