Guardrails
Preview

Preview what a scope reaches

Counts the deployments (and their apps and clusters) the caller may read that these conditions reach, for those who write guardrails and freezes: the editor's coverage strip and the New freeze form's "6 deployments, 2 apps, 3 clusters". With `guardrailId` that guardrail's exceptions in effect are ap

POST
/guardrail-previews
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

application/json
  1. body
agentCap?string

The autonomy cap the guardrail would set, to work out the stages it lowers.

Value in"propose""act_with_approval""act"
scope*array<>
Itemsitems <= 20
guardrailId?string
Formatuuid

Response Body

What the scope reaches.

application/json
  1. response
deployments*integer
apps*integer
clusters*integer
leftOut*integer

Deployments the scope reaches that exceptions in effect excuse.

summary?string

The apps and clusters they involve, by name, such as "ledger-svc and ledger-worker on prod-us-1 and prod-eu-1." Long lists are cut.

lowered?array<string>

Stages ("Pipeline › stage") that let an agent act with more autonomy than the guardrail's cap, in the environments the scope reaches. Only worked out when the guardrail caps agent autonomy.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/guardrail-previews' \  -H 'Content-Type: application/json' \  -d '{  "scope": [    {      "field": "class",      "op": "is",      "value": "string"    }  ]}'
Example Response
{  "deployments": 0,  "apps": 0,  "clusters": 0,  "leftOut": 0,  "summary": "string",  "lowered": [    "string"  ]}