[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"Fu082luny0":3},"# Mini\n\nMini is a multi-user system in which people, applications and AI agents keep their documents,\npermissions, money and programs in one shared state (the *world*). Every change to the world\nis a signed request, and one admission function, written in Lean, admits or refuses it:\n\n- An admitted request produces a new world root (a hash of the whole state) and a receipt.\n- A refused request says why. When a resource's *law* (the rule attached to it) refused it,\n  the refusal names the clause, and `can --any` can show a write that law would admit.\n- If the reply is lost, the client does not know whether the write happened. It kept the\n  exact bytes it sent, so looking the call up, or retrying it, returns the original outcome;\n  the world records the effect once.\n\nA program can propose a change but cannot admit one: admission checks the proposer's grants\nagainst the current laws.\n\nThe repository and the host binary still use the older name, minidregg.\n\n## Try it\n\n**The demo** is at \u003Chttps://demo.dregg.online>. It runs in a browser with nothing to install.\nIt is temporary: it shuts down on 11 November 2026 and its data is deleted, except encrypted\nbackups that expire within 22 days and anything you chose to contribute for research\n([the retention text](deploy/policy/RETENTION.txt)). Everything on it is world-readable, and a\nhosted account's signing key is kept on the box. Logins and the join page stay closed until the\nowner opens them; the public pages are readable before then.\n\nOnce you have joined, you can:\n\n- write documents, link them, and embed a live range of someone else's document in yours;\n- try an edit that a document's law forbids, see the clause that refused it, and paste the\n  write that `can --any DOC` says the law would admit;\n- give an AI agent that lives in one of your rooms a narrow grant and a budget, read the\n  receipts of its writes and their cost, then revoke the grant and watch its next attempt\n  get refused;\n- install an application from the Sandstorm app store and open it on its own origin;\n- play the built-in story, whose law makes impossible moves fail, or install a law on your own\n  document;\n- publish and run Objective Bend programs (`bend publish`, `bend run`);\n- use the same commands from the web pages or from a shell over ssh\n  ([deploy/shell/README.md](deploy/shell/README.md)), and post to your rooms from Discord after\n  linking your account with `/mini line:link CODE`.\n\n[The demo status page](https://emberian.github.io/minidregg/edition.html) says which of these\nare built and which are still landing.\n\n**The project site** is \u003Chttps://emberian.github.io/minidregg/>, with pages on the\n[language](https://emberian.github.io/minidregg/language.html), the\n[laws](https://emberian.github.io/minidregg/laws.html) and the\n[architecture](https://emberian.github.io/minidregg/architecture.html).\n\n## The repository\n\nLean decides what is allowed. Rust handles the physical edges (clients, keys, storage,\ntransport, the browser gateway, the application sandbox) and makes no admission decisions.\n`World.admit` in `Kernel/World.lean` is the model of a world transition;\n`Kernel/HostRefinesWorldCore.lean` proves that the Host's deployed path\n(`DurableDataIntent.execute`) refines it.\n\n| Directory | Contents |\n|---|---|\n| `Kernel/` | Admission: resources, capabilities, laws, the world transition `World.admit`, durable receiving |\n| `Pred/` | The predicate algebra laws are written in |\n| `Effects/` | The effect derivation engine: an effect is declared once, and its executor, term and descriptor are derived from the declaration |\n| `Compiler/` | Wire codecs, refusal reasons, the Objective Bend front end, the arithmetization compilers |\n| `Theory/` | Metatheory; never imports the design it reasons about (`scripts/check-import-boundary.sh`) |\n| `Selvage/`, `Assurance/` | Proof-system mathematics, and proofs that connect kernel objects to it |\n| `Host/` | The native Host; `Host.Main` builds the `minidregg-host` executable |\n| `TokenCensus/` | The census of private constructors: each must be minted only in its home module, and a planted forgery must be caught |\n| `protocol/` | The registry of Host operations, checked against the Host's receivers |\n| `native/` | The Rust crates (below) |\n| `prover/` | Native arithmetic, hash and sumcheck kernels used by the Lean side |\n| `world/` | Example world programs in Objective Bend (`.obend`): stories, markets, ballots, bounties; `scripts/check-world-cohorts.sh` checks their expected outcomes |\n| `examples/`, `tests/`, `Fixtures/`, `Verify/`, `testing/` | Worked Objective Bend examples, tests, recorded fixtures and verification harnesses |\n| `deploy/` | What runs on the demo box: the candidate build, the join door, the web front end, agent residents, the app market, payments, the policy text |\n| `scripts/` | Build, generation and check scripts |\n| `docs/` | Design documents and dated evidence; [`docs/README.md`](docs/README.md) is the index |\n| `website/` | The project site, plain HTML |\n\nThe main crates under `native/`:\n\n- `resource-client`: the `mini` command, its shell, and the server-rendered web pages.\n- `mini-sdk`: the client SDK (consent-gated signing, and the record that keeps each attempt's\n  exact retry). `mini-sdk-ts` is its TypeScript twin for building and signing; it has no\n  transport and no consent process.\n- `mini-web`, `mini-web-spawn`: the browser gateway and the helper that runs a member's\n  session.\n- `spk-host`, `spk-rpc`, `grain-runtime`: Sandstorm applications and agent tasks, sandboxed.\n- `mini-keys`: the key broker, the one process that holds provider keys and secrets.\n- `mini-kernels`: Rust implementations of hash functions the compiled Lean calls through\n  `@[extern]`; Lean keeps the reference definitions and test vectors.\n- `discord-entrance`, `pay-watcher`: the Discord gateway and the Solana payment watcher.\n\n## Building and running\n\nLean builds need a warm Lake cache (Mathlib is a dependency). Linux x86-64 is the supported\nplatform. Build the Rust kernels first: Lean loads them while elaborating anything that hashes.\n\n```sh\nscripts/build-mini-kernels.sh              # the Rust kernels the compiled Lean links\nlake env lean Kernel/World.lean            # check one Lean module\nlake build Minidregg                       # the main umbrella target\nscripts/build-native-host.sh --help        # the native Host build\ncargo nextest run -p \u003Ccrate> -E 'test(\u003Cpattern>)'   # a filtered Rust test run\nscripts/check-import-boundary.sh           # the import boundary between layers\n```\n\nA *candidate* is a directory of pinned binaries for one commit. To build one, start a private\nStore (one world's durable state) from it, and run the end-to-end journey, which starts its\nown fresh Store (files, formats and prerequisites in\n[deploy/candidate/INTERFACES.md](deploy/candidate/INTERFACES.md)):\n\n```sh\ndeploy/candidate/build.sh --out /srv/mini/candidate-\u003Ccommit>\nC=/srv/mini/candidate-\u003Ccommit>\ncp $C/genesis-params.example.json /srv/mini/genesis-params.json   # then edit the operator's choices\n$C/params.sh fill-genesis /srv/mini/genesis-params.json\n$C/run.sh init  --manifest $C/manifest.json --params /srv/mini/genesis-params.json --state /srv/mini/store-a\n$C/run.sh start --state /srv/mini/store-a\nnative/resource-client/journey.sh $C/manifest.json /srv/mini/journey-1\n```\n\nThis runs a Host and its Store, not the web front end; the demo box's other services are in\n`deploy/`. The journey writes `journey-result.json`. Read its first step that did not pass,\nnot just the exit status ([docs/JOURNEY.md](docs/JOURNEY.md)). [docs/DEVELOPING.md](docs/DEVELOPING.md) is\nthe developer guide.\n\n## Read next\n\n- [The architecture page](https://emberian.github.io/minidregg/architecture.html): admission,\n  laws, receipts, consent, private rooms.\n- [docs/README.md](docs/README.md): the documentation index, by subsystem.\n- [docs/STATUS.md](docs/STATUS.md): what the next build carries, each line with its evidence.\n- [Objective Bend](docs/OBJECTIVE-BEND.md): the language world programs are written in.\n- [The app market](docs/APP-MARKET-2026-10-27.md) and\n  [agent residents](deploy/hermes/README.md).\n- [The Oracle appliance](docs/oracle-appliance.md): question answering with checked evidence,\n  and [its tools for agents](docs/oracle-agent-tools.md).\n- [ATLAS.md](ATLAS.md): the founding diagnosis and the sixteen design laws.\n- Contributors: [HANDOFF.md](HANDOFF.md), then [AGENTS.md](AGENTS.md).\n\n## Sibling repositories\n\n- [`dregg`](https://github.com/emberian/dregg): the first, much larger system (working name\n  *breadstuffs*) that this tree rebuilds.\n- [`nanodregg`](https://github.com/emberian/nanodregg): a single-writer rebuild whose laws are\n  the target shape for this tree; its testground runs at \u003Chttps://nano.demo.dregg.online/>.\n- [`zkml-research`](https://github.com/emberian/zkml-research): zero-knowledge and\n  machine-learning research.\n- [`degg-research`](https://github.com/emberian/degg-research): multi-party computation and\n  homomorphic encryption for coordination.\n- [`fn`](https://github.com/emberian/fn): an NNTP transport for exchange between Mini nodes; not\n  part of this demo.\n- [`delvetalk`](https://github.com/emberian/delvetalk): the conversations and design talks behind\n  the project.\n",1794686192412]