time-free.openapps.xyz

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.
Owned app · rev 4857f8a940b5
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 703ed60f2cc5ad3d98a5bf4a
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.
← All files
policy-tests/workspace.json
{
 "version": "1",
 "name": "only a workspace's members can read or change it; entries and settings stay in bounds",
 "actors": {
  "Ann": "ann_id",
  "Bob": "bob_id"
 },
 "constants": {
  "BOUNDED_PUBLIC_PRINCIPAL_API": "api_principal"
 },
 "steps": [
  {
   "op": "setTime",
   "epoch": 1800000000
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA",
   "data": {
    "name": "",
    "currency": "USD",
    "rate": 0,
    "weekStart": 1,
    "tz": "UTC",
    "createdBy": "nobody",
    "createdAt": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "setMany",
   "writes": [
    {
     "path": "ws/wsAnnAAAAAAAAAAAAAAA",
     "data": {
      "name": "",
      "currency": "USD",
      "rate": 0,
      "weekStart": 1,
      "tz": "UTC",
      "createdBy": "$Ann",
      "createdAt": 1800000000
     }
    },
    {
     "path": "ws/wsAnnAAAAAAAAAAAAAAA/members/ann_id",
     "data": {
      "role": "owner",
      "invite": "created",
      "at": 1800000000
     }
    },
    {
     "path": "users/ann_id",
     "data": {
      "ws": "wsAnnAAAAAAAAAAAAAAA",
      "at": 1800000000
     }
    }
   ]
  },
  {
   "op": "expect",
   "expr": "get(/users/ann_id).ws == 'wsAnnAAAAAAAAAAAAAAA'"
  },
  {
   "op": "setMany",
   "writes": [
    {
     "path": "ws/wsShortAAAAAAAAAAA",
     "data": {
      "name": "",
      "currency": "USD",
      "rate": 0,
      "weekStart": 1,
      "tz": "UTC",
      "createdBy": "$Ann",
      "createdAt": 1800000000
     }
    },
    {
     "path": "ws/wsShortAAAAAAAAAAA/members/ann_id",
     "data": {
      "role": "owner",
      "invite": "created",
      "at": 1800000000
     }
    }
   ],
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Bob"
  },
  {
   "op": "set",
   "path": "users/bob_id",
   "data": {
    "ws": "wsAnnAAAAAAAAAAAAAAA",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/members/bob_id",
   "data": {
    "role": "owner",
    "invite": "created",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e1",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1799996400,
    "end": 1800000000,
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/projects/p1",
   "data": {
    "name": "Acme",
    "color": "#2e5ec4",
    "client": "",
    "rate": 9500,
    "billable": true,
    "archived": false,
    "share": "",
    "team": false,
    "owner": "",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA",
   "data": {
    "name": "Bob was here",
    "currency": "USD",
    "rate": 0,
    "weekStart": 1,
    "tz": "UTC"
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e1",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1799996400,
    "end": 1800000000,
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e2",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1800000000,
    "end": 1799999940,
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e3",
   "data": {
    "description": "Work",
    "project": "",
    "tags": "[]",
    "billable": true,
    "start": 1796399999,
    "end": 1800000000,
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/projects/p1",
   "data": {
    "name": "Acme",
    "color": "#2e5ec4",
    "client": "",
    "rate": 9500,
    "billable": true,
    "archived": false,
    "share": "",
    "team": false,
    "owner": "",
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/projects/p2",
   "data": {
    "name": "Acme",
    "color": "#2e5ec4",
    "client": "",
    "rate": 100000001,
    "billable": true,
    "archived": false,
    "share": "",
    "team": false,
    "owner": "",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/projects/p3",
   "data": {
    "name": "",
    "color": "#2e5ec4",
    "client": "",
    "rate": 9500,
    "billable": true,
    "archived": false,
    "share": "",
    "team": false,
    "owner": "",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/clients/c1",
   "data": {
    "name": "Acme Inc.",
    "archived": false,
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/tags/t1",
   "data": {
    "name": "design",
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/timer/now",
   "data": {
    "description": "Writing",
    "project": "p1",
    "tags": "[]",
    "billable": true,
    "start": 1800000000,
    "entry": "e9",
    "at": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/timer/other",
   "data": {
    "description": "Writing",
    "project": "p1",
    "tags": "[]",
    "billable": true,
    "start": 1800000000,
    "entry": "e9",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA",
   "data": {
    "name": "Ann Lee",
    "currency": "EUR",
    "rate": 8000,
    "weekStart": 0,
    "tz": "Europe/Berlin"
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA",
   "data": {
    "name": "Ann Lee",
    "currency": "EUR",
    "rate": 8000,
    "weekStart": 2,
    "tz": "Europe/Berlin"
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA",
   "data": {
    "name": "Ann Lee",
    "currency": "EURO",
    "rate": 8000,
    "weekStart": 1,
    "tz": "Europe/Berlin"
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/apikeys/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
   "data": {
    "label": "Assistant",
    "hint": "abcd",
    "by": "$Ann",
    "createdAt": 1800000000
   }
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/apikeys/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
   "data": {
    "label": "Assistant",
    "hint": "abcd",
    "by": "$Ann",
    "createdAt": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/members/carl_id",
   "data": {
    "role": "owner",
    "invite": "created",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Bob"
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/apikeys/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
   "data": {
    "label": "Mine now",
    "hint": "abcd",
    "by": "$Bob",
    "createdAt": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/members/bob_id",
   "data": {
    "role": "api",
    "invite": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "delete",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e1",
   "shouldFail": true
  },
  {
   "op": "delete",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/apikeys/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
   "shouldFail": true
  },
  {
   "op": "set",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/timer/now",
   "data": {
    "start": 0,
    "entry": "",
    "at": 1800000000
   },
   "shouldFail": true
  },
  {
   "op": "as",
   "who": "Ann"
  },
  {
   "op": "delete",
   "path": "ws/wsAnnAAAAAAAAAAAAAAA/entries/e1"
  },
  {
   "op": "expect",
   "expr": "get(/ws/wsAnnAAAAAAAAAAAAAAA/entries/e1) == null"
  }
 ]
}

Change history

Point OpenApps links to openapps.free
4857f8a940 · 19 hours ago
Bind agent address constants in policy
62b1e6acb2 · 20 hours ago
Use functions.openapps.xyz alias and add OpenApp contribution strip
61d972193a · 20 hours ago
Bounded source sync
fc644b4327 · 1 day ago
Bounded source sync
22f511f3db · 1 day ago
Bounded source sync
351a8d754c · 1 day ago
Bounded source sync
0da238a77e · 1 day ago