Skip to main content

Module policy

Module policy 

Source
Expand description

Policy types and the PolicyEvaluator trait for governance decisions.

A GovernanceAction describes what an agent wants to do. A PolicyEvaluator decides whether that action is permitted, denied, or requires human approval, and returns a PolicyResult. Policy rules are expressed as PolicyDocument objects containing ordered PolicyRule entries.

Structs§

PolicyDocument
Minimal policy document stub.
PolicyRule
A single rule inside a PolicyDocument.

Enums§

EnforcementMode
Controls whether policy decisions are applied to agent actions or only observed.
FileMode
File access mode for GovernanceAction::FileAccess.
GovernanceAction
An agent action subject to governance evaluation.
PolicyDecision
The decision recorded in a PolicyRule.
PolicyError
Errors produced during policy loading or evaluation.
PolicyResult
The outcome of a PolicyEvaluator::evaluate call.

Traits§

PolicyEvaluator
Pluggable policy evaluation backend.

Functions§

is_host_allowed_by_egress_allowlist
Decide whether a host is allowed by an outbound-egress allowlist.

Type Aliases§

ArgsJson
Pre-serialized JSON string passed at policy trait boundaries.