Versions in this module Expand all Collapse all v1 v1.0.0 Oct 7, 2026 Changes in this version + type AuditEntry struct + Allow bool + Capability Capability + Decision string + Mode interact.Mode + Reason string + Summary string + Time time.Time + Tool string + type Capability string + const CapabilityExec + const CapabilityInternal + const CapabilityNetwork + const CapabilityRead + const CapabilityUnknown + const CapabilityWrite + type Config struct + Cwd string + Mode interact.Mode + OnAudit func(AuditEntry) + Roots FilesystemRoots + Rules *RuleSet + UI interact.UI + type Decision struct + Capability Capability + Kind DecisionKind + OutsideRoots bool + Prompted bool + Reason string + Source DecisionSource + Summary string + func (d Decision) Allowed() bool + type DecisionKind string + const DecisionAllow + const DecisionAllowAlways + const DecisionAllowOnce + const DecisionDeny + type DecisionSource string + const DecisionSourceGrant + const DecisionSourceInternal + const DecisionSourceMode + const DecisionSourcePrompt + const DecisionSourceRoots + const DecisionSourceRule + const DecisionSourceStore + type Engine struct + func NewEngine(cfg Config) (*Engine, error) + func (e *Engine) Configure(rules *RuleSet, roots FilesystemRoots) + func (e *Engine) Decide(ctx context.Context, req Request) (*Decision, error) + func (e *Engine) Middleware(grants func() []Rule, meta func(tool string) Metadata) agentcore.ToolMiddleware + func (e *Engine) Mode() interact.Mode + func (e *Engine) SetMode(mode interact.Mode) + type FilesystemRoots struct + InternalReadable []string + InternalWritable []string + Protected []string + ReadRoots []string + WriteRoots []string + type Metadata struct + Capability Capability + Key string + KeyPrefix string + Reason string + SummaryHint string + type Request struct + Args json.RawMessage + Grants []Rule + Metadata Metadata + Reason string + Summary string + ToolID string + ToolLabel string + ToolName string + Workspace string + type Rule struct + Kind string + Pattern string + Raw string + func ParseGrants(raw []string) []Rule + func ParseRule(raw string) (Rule, error) + type RuleSet struct + Allow []Rule + Deny []Rule + func ParseRuleSet(allow, deny []string) (*RuleSet, error) + type Store struct + func NewStore(path string) (*Store, error) + func (s *Store) Add(entry StoreEntry) error + func (s *Store) Has(key string) bool + type StoreEntry struct + AddedAt time.Time + Capability Capability + Key string + Summary string + Tool string