preflight_hash_policy
Validates a Preflight v2 policy and returns its canonical SHA-256 digest, letting you pin owner-controlled rules outside an untrusted proposal. Invalid policies return an error, not a hash.
Instructions
Validate a Preflight v2 policy and return {policy_hash}, its canonical SHA-256 digest. Invalid policies return a tool error, not a hash.
When to use
To pin owner-controlled rules outside an untrusted proposal.
When NOT to use
Do not treat a caller-supplied hash as proof of policy ownership. Use preflight_check to evaluate candidates once policy and evidence are ready.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | Yes | Owner-controlled Preflight v2 object with schema_version "2", policy_id, and 1-100 hard constraints using eq, in, lte, gte, or exists. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy_hash | Yes | Canonical SHA-256 digest. |