Help us shape the future of Go! Take the 2026 Go Developer Survey

approval

package
v0.4.45 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAutoAllow

func NewAutoAllow(cfg AutoAllowConfig) (agentkit.Approval, error)

func NewAutoDeny

func NewAutoDeny() (agentkit.Approval, error)

NewAutoDeny registers approval/auto-deny: Deny every ask decision. For tests and CI.

Types

type AutoAllowConfig

type AutoAllowConfig struct {
	// Reason is text recorded on each decision; defaults to "auto-allowed: unattended run".
	Reason string `json:"reason"`
}

AutoAllowConfig configures unattended approval.

func (*AutoAllowConfig) SetDefaults added in v0.3.48

func (c *AutoAllowConfig) SetDefaults()

NewAutoAllow registers approval/auto-allow: Allow every ask decision, for unattended runs.

Best practices:

  • Never use alone. It filters nothing, so the Policy plane is the only enforcement left: pair it with policy/shell-allowlist and policy/path-denylist.
  • Every decision is logged via slog, so an unattended run stays reviewable after the fact.

SetDefaults implements pluginkit.Defaulter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL