API reference
parmana.models.policy_v2
Python SDK reference: Parmana policy version 2 models.
Parmana policy version 2 models.
Hand-maintained: the response bodies of the /v2/decisions and /v2/reviews
routes (packages/api/src/routes/policy-v2-decisions.ts and
policy-v2-reviews.ts). They mirror the TypeScript SDK’s policy-v2 models.
Policy version 2 is not enabled on every deployment: a call for a capability
the deployment has not enabled is refused with HTTP 404 and the error code
not_enabled.
One failed check of a policy, as the policy validator reports it.
A refusal that happens before any rule runs. It refuses the request.
code is one of NO_APPROVED_POLICY, POLICY_INVALID, SOURCE_UNAVAILABLE,
SOURCE_NOT_VERIFIED, STALE, INVALID, MISSING_VALUE or THRESHOLD_NOT_APPROVED.
The recorded decision. released is always False: a policy version 2
decision never releases anything by itself.
outcome is APPROVE, REJECT or REVIEW. A REVIEW outcome carries review_id;
read the review with PolicyV2Api.review until it is final.
A review item as its requester sees it.
status is pending, approved, refused or expired.
The result of a reviewer’s decision. outcome is APPROVED or REFUSED once
the review is final, and None before that.
The result of replaying a recorded decision from its evidence record.
reproduced is True when the replay gives the same outcome and inputs. differences lists what
did not match. replayed is the decision the replay produced, as a mapping: its fields are those
of the evidence record, which the SDK does not type further.