Skip to main content

Module policy

Module policy 

Source
Expand description

Capability/policy layer per spec §7.4.

Operators specify what effects are allowed before any execution starts. The runtime walks the program’s declared effects and aborts with a structured violation if the program would exceed the policy. During execution, individual effect calls are also gated through the same policy so that scoped effects (fs paths, budget consumption) are caught at call time.

Structs§

Policy
Policy a program is run under. Empty allowlist = pure-only execution.
PolicyReport
PolicyViolation
Structured policy violation, formatted to match spec §6.7’s JSON shape.

Functions§

check_program
Walk the program’s declared effects (gathered from fn signatures) and verify them against policy. Run before any execution.
is_effect_allowed
Decide whether e is permitted by grants (#207).