envelope_apply
Checks whether an authority envelope is active and covers the requested verb and arguments before acting, records the use in the ledger, refuses when grant is missing, expired, or out of scope.
Instructions
Check an authority envelope — an operator-granted, scoped permission —
BEFORE acting under it: verifies envelope_id is active and covers verb
with the given call_args, then appends a citation to the FRANK ledger
recording the use against project/session. Refuses with the reason
when the grant is missing, expired, or out of scope.
#333 double-charging note: verb in VERB_LEVEL_ENFORCED_VERBS (currently
just "dispatch") now cites itself from inside its own tool handler
(dispatch_send) — that handler is authoritative for the act. Calling
envelope_apply first for one of those verbs and then performing the act
would charge the grant's quota twice for one real act, so for those verbs
this tool is advisory-only: it still runs the full check() (so a caller
can preflight "would this be granted?" without side effects) but does NOT
write a citation — cited_before_act comes back False and note says so.
The verb handler cites exactly once, at the act, regardless of whether
envelope_apply was called first. Every other verb is unchanged: still
checks AND cites here, since no other verb has a handler-side citation
path yet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verb | Yes | ||
| app_id | Yes | ||
| project | Yes | ||
| session | Yes | ||
| call_args | Yes | ||
| envelope_id | Yes |