Check an action against inline policy
trust_check_actionEvaluate a proposed action against evidence, source allowlists, data constraints and payment limits, returning ALLOW/BLOCK with reason codes. All enabled checks must pass: evidence cannot override an over-budget payment. Set action.type to payment to activate spending checks and pass its amount with remaining_budget; contract applies to data, not action. Use this gate before execution, trust_check_spend for budget alone, or trust_validate_data for structure alone. Enforce BLOCK and fail closed on errors. Source labels are unauthenticated; instruction scanning is a limited phrase heuristic. No action execution, wallet access, policy storage or decision history. Free, unauthenticated, stateless pilot: rules apply only to this call. Usage metadata is recorded; request bodies are not stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | JSON object to inspect; do not submit secrets or personal data. | |
| action | Yes | Proposed action; payment additionally requires amount and remaining_budget. | |
| contract | No | Map of dot-separated field paths to constraints, e.g. {"order.total":{"type":"number","min":0,"required":true}}. Inline rules apply only to this request. | |
| evidence | No | Caller-supplied evidence labels. Presence is required by default; content and authenticity are not verified. | |
| allow_extra | No | With a contract, false rejects top-level data keys not present in the contract. For nested dot paths keep true and enumerate leaf constraints. | |
| trusted_sources | No | Optional exact source allowlist. Every evidence source must be listed. | |
| remaining_budget | No | Caller-supplied remaining budget; never read from a wallet or persisted by this service. | |
| require_evidence | No | Require at least one evidence item. Setting false intentionally skips the presence check. | |
| allowed_merchants | No | Optional exact, case-sensitive merchant allowlist. An empty list blocks every merchant. | |
| detect_instructions | No | Scan JSON-serialized data for a small fixed phrase heuristic, with possible false positives and negatives. | |
| per_transaction_limit | No | Optional inclusive maximum amount per transaction. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | The operation completed; does not imply the verdict is ALLOW. | |
| checks | Yes | Names of the check families supported by this gate; optional checks run only when their inputs are present. | |
| reasons | Yes | All failed checks; empty when ALLOW. | |
| service | Yes | Service that evaluated the request. | |
| verdict | Yes | Advisory verdict. The integrator must prevent execution on BLOCK or any error. | |
| version | Yes | Deployed implementation version. | |
| warning | Yes | Security and enforcement limitations. |