prims
prim contract 2 · 20 registered
the calculus has no I/O. a program touches the world only through
prims, and every call must be covered by a live grant — checked at the
boundary and journaled either way; denial is a journaled error answer,
never an exception. the path-addressed prims (tree/*,
ns/fork) are minted only against an explicit path prefix.
| prim | what it does |
|---|---|
echo | identity: the argument tree comes back unchanged |
now | the host clock, unix seconds as a decimal string |
uuid | a fresh v4 uuid, one per call |
store/get | keyed value read (the key is a tree hash) |
store/put | keyed value write, capped by the journal payload limit |
http/get | HTTP GET under TUNA_HTTP_ALLOWLIST (unset = deny all egress) |
tree/get | read the value at a path |
tree/put | write a path (covering-prefix rule; version bumps) |
tree/cas | compare-and-swap a path at an expected version |
tree/list | windowed listing under a prefix |
tree/del | delete a path |
ns/fork | copy one namespace slice to a new prefix |
value/put | publish a content-addressed value (tree or bytes) |
value/get | read a published value by hash |
value/len | byte length of a value |
math/add | law-5 integer add, O(bits) per call |
math/sub | law-5 integer subtract |
math/mul | law-5 integer multiply |
math/cmp | law-5 integer compare |
math/neg | law-5 integer negate |
request shapes live in /agent.txt; the claims a run's evidence supports live in /claims.