Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PermissionEngine ¶
type PermissionEngine struct {
// contains filtered or unexported fields
}
PermissionEngine controls what actions the agent is allowed to perform. The allowlist is determined by the configured permission tier.
func NewDenyAll ¶
func NewDenyAll() *PermissionEngine
NewDenyAll creates a permission engine that denies every action. Intended for testing scenarios where no permissions should be granted.
func NewPermissionEngine ¶
func NewPermissionEngine(tier string) (*PermissionEngine, error)
NewPermissionEngine creates a permission engine for the given tier. Valid tiers: "autonomous", "supervised", "restricted".
func (*PermissionEngine) CanExecute ¶
func (p *PermissionEngine) CanExecute(action string) bool
CanExecute checks if an action is allowed under the current tier.
func (*PermissionEngine) Tier ¶
func (p *PermissionEngine) Tier() string
Tier returns the current permission tier.
Click to show internal directories.
Click to hide internal directories.