writ_check
Check whether a consequential action may proceed before any hard-to-undo write, returning ALLOW, DENY, or STEP_UP plus an audit receipt.
Instructions
Ask Writ whether an action may proceed. CALL THIS BEFORE any consequential write.
A consequential write is anything hard to undo: sending money or messages, changing access or identity records, deleting data, calling an external API that acts in the world.
Args: sponsor_id: The human sponsor accountable for this action (e.g. a user id or email). agent_id: The agent or workflow performing the action. verb: What is being done (e.g. "verify_human", "send_payment"). target: What it acts on (e.g. "benefit-case-123"). purpose: Why, in plain words. Be specific — the approval is bound to this purpose.
Returns a decision: ALLOW — proceed. You get an authToken valid 90 seconds, bound to this exact sponsor/agent/verb/target/purpose. Call writ_verify_token against the intended write immediately before executing it. DENY — do NOT perform the action. Explain the receipt reason to the user. STEP_UP — a human sponsor must approve first. Tell the user what needs approval; they can approve via writ_grant (or the dashboard), then call writ_check again. Every outcome creates an audit receipt with a receiptId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verb | Yes | ||
| target | Yes | ||
| purpose | Yes | ||
| agent_id | Yes | ||
| sponsor_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |