Skip to main content

Module capability

Module capability 

Source
Expand description

Capability-constrained admissibility kernel (PSP-8 System 7).

Stochastic components emit proposals, never unmediated effects. Every effect passes through an admissibility kernel before execution. This module is the domain-neutral reference kernel and contract; perspt-policy is the deterministic trusted base that adopts it. Generated code, prompts, domain packages, and subagents are outside that trusted base.

Authority is an explicit, attenuable value: delegation may only shrink effect scope, call budget, expiry, and delegability (the attenuation preorder c' ⪯ c). Payload data, model text, or generated code cannot mint authority (PSP-8 R4).

Re-exports§

pub use crate::scope::CommandPattern;
pub use crate::scope::NetworkPattern;
pub use crate::scope::PathPattern;

Structs§

ActorId
An actor that can hold capabilities and emit proposals.
AdmissibilityWitness
The witness produced by checking a proposal (PSP-8 AdmissibilityWitness).
Capability
A capability: an explicit, attenuable grant of authority (PSP-8 System 7).
EffectProposal
An effect proposal (PSP-8 System 7).
GrantPolicy
Durable authorization intent. A resume re-mints a fresh live capability from this policy and current workspace facts; the capability itself is deliberately not serializable.
KernelState
The current durable state the kernel reads when checking a proposal.
RiskBudget
A recorded risk budget (PSP-8 System 7).
SignedGrantPolicy
Signed durable grant intent. Verification authenticates policy bytes only; resume must still intersect the policy with the current authority epoch, workspace facts, and configured ceilings before minting a new capability.
StateWitness
A state witness: a content hash of a precondition that must still hold at execution time (PSP-8 System 7).

Enums§

AdmissibilityDecision
The admissibility decision.
ApprovalPolicy
Approval policy for an effect.
CapabilityRole
Role-scoped authority template. Role is part of attenuation and cannot be changed by proposal payload data.
DenyReason
Why an effect was denied.
EffectKind
Effect classes (PSP-8 System 7).
RecoveryClass
Recovery classification for a denied or failed effect.
RiskClass
Risk classification for a proposed effect.

Functions§

check_admissibility
Evaluate the admissibility predicate Adm(x, p, x') for a proposal against the actor’s capabilities and current kernel state.
grant_public_key
Derive the Ed25519 public key for a grant signing key, so callers can anchor SignedGrantPolicy::verify_against to the key they resolved without taking their own dependency on the signature crate.
hex_decode
Inverse of hex_encode.
hex_encode
Lowercase hex encoding, shared by grant signing and key persistence.