Self-Validating Executable Document Format
The tessera hospitalis was a Roman token of mutual recognition — a clay tablet broken between host and guest. The fit proved the relationship without any third party. Tessera the format carries the same property: the document proves itself.
Cheaters can cheat but they can't hide it.
The engine doesn't prevent invalid mutations — it makes them detectable. Any party who receives a Tessera document can replay the chain and verify every step.
Ed25519 signatures on every mutation. SHA-256 hash chain links each state transition. Content-addressable versioning.
JSON for readability, CBOR for efficiency. Content-sniffed on load. Round-trip fidelity guaranteed.
Domain logic runs inside a sandboxed Rhai runtime. Chess rules, contract negotiation, any state machine.
Typed fields, transition guards, structural validation. The schema declares what's valid; the engine enforces it.
Different parties sign their own mutations with their own keys. Every action is attributable and verifiable.
No server, no database, no blockchain, no network. Fully offline. The document is the authority.
Declare fields, types, mutations, guards, and optional embedded validator code
Initialize state from schema defaults, sign with authority key
Each mutation is validated, signed by the actor, hash-linked to the chain
Any party replays the chain from genesis and confirms every step
Complete chess game with all rules enforced by an embedded Rhai validator (~650 lines of chess logic running inside the document's sandbox).
cargo run --bin chess
Two-party agreement where every edit, proposal, counter-offer, and acceptance is cryptographically recorded.
cargo run --bin contract
A Tessera document is a single portable artifact — JSON or CBOR — containing everything needed to verify itself.
{
"tessera": "0.1",
"schema": {
"fields": { "count": { "type": "u64", "default": 0 } },
"mutations": {
"increment": {
"guards": ["count < 1000"],
"effects": { "count": "count + 1" }
}
}
},
"state": { "count": 42 },
"chain": [ ... ],
"chain_mode": "embedded",
"pubkey": "<Ed25519 public key>",
"signature": "<Ed25519 signature>"
}
Each mutation in the chain carries: prev_hash, operation,
next_hash, actor public key, and actor signature.
The version is the SHA-256 hash of the current state.
Tessera is one layer of a larger architecture. Each component addresses a different failure mode.
Cryptographic vault between you and the world. Three-tier data model, zero-knowledge proofs, Ed25519 root of trust. Your agent proves things about you without revealing you.
Authorization policy embedded in the token, evaluated locally in microseconds. No policy server in the critical path. The SQLite of agent authorization.
Storage where the operator cannot read what they store. Client-side encryption, opaque record IDs, no relationships between records computable by the server.
Ephemeral peer-to-peer messaging. No central server, no metadata logging, no message persistence. Fixed-size padding defeats traffic analysis.