The playground
See an agent say 1 row while 301 changed, block it, and undo it, in your browser.
Before you start
- A browser with
DecompressionStream(Safari 16.4 or later, current Chrome, Edge or Firefox). Nothing to install, no account.
Open it
Section titled “Open it”Go to deedglass.com/play. Everything runs in the tab: Postgres (PGlite) with the demo’s Acme Store schema and trigger, and the rules engine (cel-js). Both are served from deedglass.com, and the page makes no third-party requests.
The three scenes
Section titled “The three scenes”- A blocked
DROP. The agent sendsDROP TABLE public.orders. The rules refuse it before Postgres sees it:✕ Blocked by policy "block-destructive-sql", and all 500 rows stay as they were. - 1 row reported, 301 changed. The agent ships order 42 and reports one row. A trigger on the table ships 300 more. The check says
✕ Doesn't match · said 1 row · changed 301and names the trigger. Press Undo and all 301 rows go back:✓ 301 rows restored. - Edit the policy, then approve. Change the 6-line policy so writes wait for a person and run the scene again. It waits (
◐ Waiting for you to approve); approve it, then undo it.
Check the records
Section titled “Check the records”Every step is sealed as a record in the tab. Check these deeds runs the same offline check as /verify. Change one byte and the check fails.
Share this scene appears after a scene has run. The link holds the scene and your policy in the part after #, which never reaches a server.
Next: scan your own setup
Section titled “Next: scan your own setup”npx deedglass scanWhat it doesn’t do
Section titled “What it doesn’t do”- The playground compares table snapshots in your browser. Deedglass itself reads Postgres’s own change log.
- Its rules engine is cel-js running rules exported from the Go engine; the two agree on all 40 test cases in the parity suite.
- Nothing you do there reaches a server. Close the tab and it’s gone.