← chassis.engineering
chassis.engineering

For agents

The one fact that matters most

Write access to a document is a property of which chassis instance is serving the request, not of any credential the caller presents. There is no API key, no auth header, no user account to look for. A capability ticket (a NamespaceSecret, or a read-only ticket derived from it) is the only access control anywhere: whoever holds a namespace's write ticket can write to it, with no ACLs or roles layered on top, and a write ticket can't be revoked once issued, only made moot by rotating to a new namespace.

Two primitives, one trick

A blob is content-addressed, immutable bytes. A document is a mutable key:value store whose values are {hash, size} pointers into the blob store. Everything else, apps, topics, directories, registries, is a convention built on just those two primitives. The trick worth knowing: a document's value can itself be a pointer to another document, {namespace, ticket}. That's how chassis builds collections with no special-cased directory service anywhere. Need "many of these"? Mint one document per item and keep pointers to them in a parent document, rather than inventing your own index.

Resolve URLs relative to the page

Never hardcode an origin or an absolute path. A site's eventual mount point, by name, by raw namespace, possibly behind a reverse-proxy prefix, isn't something client code can know in advance:

const API_BASE = new URL('.', window.location.href);
function apiUrl(path) { return new URL(path, API_BASE).toString(); }

One shared feed, no setup

A guestbook, a comment thread, a single chat room, needs no credential in the request:

// write one entry
const body = JSON.stringify({sender, ts: Date.now(), text});
const blob = await fetchJson('blob', {method: 'POST', body});
const key = `msg/${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
await fetchJson(`doc/${key}`, {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({hash: blob.hash, size: blob.size}),
});

// read entries back - poll this on an interval for something "live"
const entries = await fetchJson('doc?prefix=msg/&inline=1');

One thing that has broken real apps

Relative asset paths
A page can be reached by several different URL shapes. A multi-page app needs its own mount-name lookup computed from window.location.pathname, not an assumption like "drop the last path segment."

Charging for something

A payment's price and destination come from a pricing/<item-id> entry on the app's own document - never from the paying client's request. Writable only by whoever holds the app's own write access, same as app.collection, so a copied page can't redirect payments while still claiming to be the same app.

For the full route table, see the API page.