Ask BRYDGE before acting
brydge_superviseRequest permission before executing an action (e.g., refund). Returns an authorization ID to record, or escalates to a person when rules need review.
Instructions
Ask BRYDGE whether you may take an action, before you take it. ALLOWED returns an authorization id: carry the action out and write that id into the record it creates, where the destination keeps it (for a Stripe refund: metadata.brydge_authorization). ESCALATED means a person decides: do not carry it out.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| facts | No | What BRYDGE's rules judge the action by, such as {"amount": 4200}. BRYDGE compares a fact named amount with the amount in the destination's record, so give it in the same units. | |
| action | Yes | The kind of work, as it is set up in BRYDGE, such as refund. | |
| target | Yes | What the work acts on: the charge, order or ticket id. | |
| idempotency_key | Yes | A name for this one intended action, such as refund:ch_123. Send the same value if you retry the same action; never reuse it for a different one. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| because | Yes | ||
| decision | Yes | ||
| replayed | Yes | ||
| unobserved | Yes | ||
| authorization | Yes |