Source
This app’s code and revision history are public. Download a copy or explore the files below.
Public
The app’s code and revision history are public.
Run it yourself
Take the whole tree and run it on your own machine. The download needs no account. Cloning needs a sign-in.
Download .zip
bounded clone c7891873549c9ca1004894b3
A copy you download is not bounded. The guarantees this app runs under - declared egress, proven invariants, writes that fail closed - live in the runtime serving this page, not in the files. What you get is auditable source you can read and run, with no runtime guarantees attached.
policy-tests/reveal.json
{
"version": "1",
"name": "reveals in the future, a final draw after the reveal, and assistant opens nobody can fake",
"actors": {
"Org": "org_user",
"Api": "api_principal"
},
"constants": {
"BOUNDED_PUBLIC_PRINCIPAL_API": "api_principal"
},
"steps": [
{
"op": "setTime",
"epoch": 1800000000
},
{
"op": "as",
"who": "Org"
},
{
"op": "setMany",
"shouldFail": true,
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"name": "Family",
"budget": "$25",
"date": "2026-12-18",
"notes": "",
"allowJoin": true,
"organizerSees": false,
"revealAt": 1799999900,
"status": "open",
"round": 0,
"drawnAt": 0,
"createdBy": "$Org",
"createdAt": 1800000000
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/joins/org_user",
"data": {
"at": 1800000000
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/owners/org_user",
"data": {
"at": 1800000000
}
},
{
"path": "exchangekeys/exaaaaaaaaaaaaaaaaaa",
"data": {
"key": "kexkexkexkexkexkexkexkex"
}
},
{
"path": "keepapart/exaaaaaaaaaaaaaaaaaa",
"data": {
"pairs": "[]"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pann",
"data": {
"name": "Ann",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pann",
"data": {
"key": "kannkannkannkannkannkann",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pben",
"data": {
"name": "Ben",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pben",
"data": {
"key": "kbenkbenkbenkbenkbenkben",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pcat",
"data": {
"name": "Cat",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pcat",
"data": {
"key": "kcatkcatkcatkcatkcatkcat",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "personclaims/pann/c/org_user",
"data": {
"key": "kannkannkannkannkannkann",
"exchangeId": "exaaaaaaaaaaaaaaaaaa",
"openId": "pann_org_user"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pann_org_user",
"data": {
"pid": "pann",
"by": "org_user",
"via": "web",
"at": 1800000000
}
}
]
},
{
"op": "setMany",
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"name": "Family",
"budget": "$25",
"date": "2026-12-18",
"notes": "",
"allowJoin": true,
"organizerSees": false,
"revealAt": 0,
"status": "open",
"round": 0,
"drawnAt": 0,
"createdBy": "$Org",
"createdAt": 1800000000
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/joins/org_user",
"data": {
"at": 1800000000
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/owners/org_user",
"data": {
"at": 1800000000
}
},
{
"path": "exchangekeys/exaaaaaaaaaaaaaaaaaa",
"data": {
"key": "kexkexkexkexkexkexkexkex"
}
},
{
"path": "keepapart/exaaaaaaaaaaaaaaaaaa",
"data": {
"pairs": "[]"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pann",
"data": {
"name": "Ann",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pann",
"data": {
"key": "kannkannkannkannkannkann",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pben",
"data": {
"name": "Ben",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pben",
"data": {
"key": "kbenkbenkbenkbenkbenkben",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/people/pcat",
"data": {
"name": "Cat",
"addedBy": "$Org",
"self": false,
"createdAt": 1800000000
}
},
{
"path": "personkeys/pcat",
"data": {
"key": "kcatkcatkcatkcatkcatkcat",
"exchangeId": "exaaaaaaaaaaaaaaaaaa"
}
},
{
"path": "personclaims/pann/c/org_user",
"data": {
"key": "kannkannkannkannkannkann",
"exchangeId": "exaaaaaaaaaaaaaaaaaa",
"openId": "pann_org_user"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pann_org_user",
"data": {
"pid": "pann",
"by": "org_user",
"via": "web",
"at": 1800000000
}
}
]
},
{
"op": "setMany",
"shouldFail": true,
"writes": [
{
"path": "personclaims/pben/c/org_user",
"data": {
"key": "kbenkbenkbenkbenkbenkben",
"exchangeId": "exaaaaaaaaaaaaaaaaaa",
"openId": "pben_org_user"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pben_org_user",
"data": {
"pid": "pben",
"by": "org_user",
"via": "api",
"at": 1800000000
}
}
]
},
{
"op": "setMany",
"writes": [
{
"path": "personclaims/pben/c/org_user",
"data": {
"key": "kbenkbenkbenkbenkbenkben",
"exchangeId": "exaaaaaaaaaaaaaaaaaa",
"openId": "pben_org_user"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pben_org_user",
"data": {
"pid": "pben",
"by": "org_user",
"via": "web",
"at": 1800000000
}
}
]
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pben_org_user",
"data": {
"at": 1800000000
},
"shouldFail": true
},
{
"op": "as",
"who": "Api"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/joins/api_principal",
"data": {
"at": 1800000000
}
},
{
"op": "setMany",
"writes": [
{
"path": "personclaims/pcat/c/api_principal",
"data": {
"key": "kcatkcatkcatkcatkcatkcat",
"exchangeId": "exaaaaaaaaaaaaaaaaaa",
"openId": "pcat_api_principal"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal",
"data": {
"pid": "pcat",
"by": "api_principal",
"via": "api",
"at": 1800000000
}
}
]
},
{
"op": "advanceTime",
"seconds": 60
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal",
"data": {
"at": 1800000060
}
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal",
"data": {
"at": 1800000000
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal",
"data": {
"at": 1800003600
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal",
"data": {
"via": "web"
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/opens/pann_org_user",
"data": {
"at": 1800000060
},
"shouldFail": true
},
{
"op": "expect",
"expr": "get(/exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal).at == 1800000060 && get(/exchanges/exaaaaaaaaaaaaaaaaaa/opens/pcat_api_principal).via == 'api'"
},
{
"op": "as",
"who": "Org"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"revealAt": 1800000000
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"revealAt": 1800000120
}
},
{
"op": "advanceTime",
"seconds": 120
},
{
"op": "as",
"who": "Api"
},
{
"op": "setMany",
"writes": [
{
"path": "exchangeclaims/exaaaaaaaaaaaaaaaaaa/c/api_principal",
"data": {
"key": "kexkexkexkexkexkexkexkex"
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/owners/api_principal",
"data": {
"at": 1800000180
}
}
]
},
{
"op": "setMany",
"shouldFail": true,
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn",
"round": 1,
"drawnAt": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pben",
"round": 1,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pben",
"data": {
"to": "pcat",
"round": 1,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pcat",
"data": {
"to": "pann",
"round": 1,
"at": 1800000180
}
}
]
},
{
"op": "as",
"who": "Org"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"revealAt": 1800086400
}
},
{
"op": "as",
"who": "Api"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn"
},
"shouldFail": true
},
{
"op": "setMany",
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn",
"round": 1,
"drawnAt": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pben",
"round": 1,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pben",
"data": {
"to": "pcat",
"round": 1,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pcat",
"data": {
"to": "pann",
"round": 1,
"at": 1800000180
}
}
]
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pcat",
"round": 1,
"at": 1800000180
},
"shouldFail": true
},
{
"op": "setMany",
"shouldFail": true,
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn",
"round": 1
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pcat",
"round": 1,
"at": 1800000180
}
}
]
},
{
"op": "expect",
"expr": "get(/exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann).to == 'pben' && get(/exchanges/exaaaaaaaaaaaaaaaaaa).round == 1"
},
{
"op": "setMany",
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn",
"round": 2,
"drawnAt": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pcat",
"round": 2,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pben",
"data": {
"to": "pann",
"round": 2,
"at": 1800000180
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pcat",
"data": {
"to": "pben",
"round": 2,
"at": 1800000180
}
}
]
},
{
"op": "advanceTime",
"seconds": 86400
},
{
"op": "as",
"who": "Org"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "open"
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"revealAt": 0
},
"shouldFail": true
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"revealAt": 1800400000
},
"shouldFail": true
},
{
"op": "as",
"who": "Api"
},
{
"op": "setMany",
"shouldFail": true,
"writes": [
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"status": "drawn",
"round": 3,
"drawnAt": 1800086580
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann",
"data": {
"to": "pben",
"round": 3,
"at": 1800086580
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pben",
"data": {
"to": "pcat",
"round": 3,
"at": 1800086580
}
},
{
"path": "exchanges/exaaaaaaaaaaaaaaaaaa/matches/pcat",
"data": {
"to": "pann",
"round": 3,
"at": 1800086580
}
}
]
},
{
"op": "as",
"who": "Org"
},
{
"op": "set",
"path": "exchanges/exaaaaaaaaaaaaaaaaaa",
"data": {
"name": "Family 2026",
"notes": "Thanks, everyone."
}
},
{
"op": "expect",
"expr": "get(/exchanges/exaaaaaaaaaaaaaaaaaa).status == 'drawn' && get(/exchanges/exaaaaaaaaaaaaaaaaaa).round == 2 && get(/exchanges/exaaaaaaaaaaaaaaaaaa).revealAt == 1800086400 && get(/exchanges/exaaaaaaaaaaaaaaaaaa/matches/pann).to == 'pcat'"
}
]
}
Change history
Point OpenApps links to openapps.free
Bind agent address in policy constants
Use functions.openapps.xyz alias, add OpenApp contribution strip
Bounded source sync
Bounded source sync
Bounded source sync
Bounded source sync