Web audit view and public projects
The Worker serves a static audit view at its root. It shows one project: an overview with counters and measured Artifacts cost, the intents, each decision with its tags, matched rule and approvals, and the audit timeline. The review console at /console/ adds approve and reject.
https://wayglass.example.com/?project=acme-webhttps://wayglass.example.com/?project=acme-web#/intentshttps://wayglass.example.com/?project=acme-web#/intents/i269d1c348ehttps://wayglass.example.com/?project=acme-web#/decisions/d4b1e2c3a09https://wayglass.example.com/?project=acme-web#/auditThe page has no build step. Who can see it depends on how the Worker is configured:
- Signed in. On a Worker with Cloudflare Access on, which includes the hosted
api.wayglass.dev, the Worker refuses/,/console/, every static file and/v1/public/*to anyone without a valid Access token. A person who signs in gets a 12-hour human key, and the page reads the project with it through the key API (/v1/intents,/v1/decisions,/v1/audit,/v1/cost, and the read-onlybrowse,historyandchangesroutes under/v1/projects/<name>/). Nothing is served by URL alone. On a Worker without Access, the same page signs in with a key at#/signin/key. - Anonymous. On a self-hosted Worker with every
ACCESS_*variable empty, the page can also read opted-in projects without any login, through the public read-only routes:
GET /v1/public/projectsGET /v1/public/projects/<name>GET /v1/public/projects/<name>/intentsGET /v1/public/projects/<name>/decisionsGET /v1/public/projects/<name>/decisions/<decision-id>GET /v1/public/projects/<name>/auditThe hosted Worker has PUBLIC_PROJECTS empty, so /v1/public/* answers 404 there even to a signed-in person.
Projects are private by default
Section titled “Projects are private by default”For the anonymous routes, a project appears only when two separate gates are both open:
- The Worker variable
PUBLIC_PROJECTSmatches its name. It is a comma-separated list of exact names or prefixes ending in a single*, for exampledemo-*,eu-demo-*. A bare*, or a*anywhere but the end, matches nothing. Changing it means changing the wrangler config and deploying (scripts/selfhost.sh --public <patterns>does both). - The project itself opted in, either at creation with
wayglass init --publicor later by an admin withPATCH /v1/projects/<name> {"public": true}. The change is audited (project.made_public,project.made_private) and can be reversed at once with{"public": false}.
Any other name gets the same 404 whether the project exists or not, so the routes do not reveal which projects exist.
What is shown
Section titled “What is shown”Responses are built from a list of allowed fields, so a field added to the Worker later stays private until someone adds it here. Trunk and fork remotes, token ids, land ids, subscription ids and the client’s own preview of a decision are never returned. Token-shaped strings and Artifacts remote URLs inside free text, such as an intent’s reason, are masked.
What is shown: intent goals, reasons, agents, declared and changed paths, commits and statuses; decisions with tags, matched rule, action, reason, status and approvals (approver, verdict, reason); and the audit events. An approver who signed in through Access appears by email, like any other approver name.
Successful answers are cached for 15 seconds, so a project made private stops answering within that time. Code is never served anonymously: the browse, history and changes routes need a key even for a public project.