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.

primwhat it does
echoidentity: the argument tree comes back unchanged
nowthe host clock, unix seconds as a decimal string
uuida fresh v4 uuid, one per call
store/getkeyed value read (the key is a tree hash)
store/putkeyed value write, capped by the journal payload limit
http/getHTTP GET under TUNA_HTTP_ALLOWLIST (unset = deny all egress)
tree/getread the value at a path
tree/putwrite a path (covering-prefix rule; version bumps)
tree/cascompare-and-swap a path at an expected version
tree/listwindowed listing under a prefix
tree/deldelete a path
ns/forkcopy one namespace slice to a new prefix
value/putpublish a content-addressed value (tree or bytes)
value/getread a published value by hash
value/lenbyte length of a value
math/addlaw-5 integer add, O(bits) per call
math/sublaw-5 integer subtract
math/mullaw-5 integer multiply
math/cmplaw-5 integer compare
math/neglaw-5 integer negate

request shapes live in /agent.txt; the claims a run's evidence supports live in /claims.