approval

package
v0.107.6-beta.13 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package approval implements an isolated, tool-less action reviewer. Host policy remains authoritative.

Index

Constants

View Source
const MaxEvidence = 12000
View Source
const Timeout = 15 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionReportKey

type ActionReportKey struct{}

type Evidence

type Evidence struct {
	Phase      string `json:"phase"`
	Tool       string `json:"tool"`
	Action     string `json:"action"`
	UserIntent string `json:"user_intent"`
	Output     string `json:"untrusted_tool_output,omitempty"`
}

type Report

type Report struct {
	Risk          string `json:"risk"`
	Sandbox       string `json:"sandbox"`
	SensitiveData string `json:"sensitive_data"`
	ModelBehavior string `json:"model_behavior"`
	Injection     string `json:"injection"`
	Reason        string `json:"reason"`
}

func Parse

func Parse(text string) (Report, error)

func Unknown

func Unknown(reason string) Report

func (Report) Description

func (r Report) Description() string

func (Report) Safe

func (r Report) Safe() bool

type ReviewedActionKey

type ReviewedActionKey struct{}

type Reviewer

type Reviewer struct {
	// contains filtered or unexported fields
}

func New

func New(_ context.Context, cfg *config.Config) *Reviewer

func (*Reviewer) Review

func (r *Reviewer) Review(ctx context.Context, e Evidence) Report

type RunReviewer

type RunReviewer struct {
	Mode string
	// contains filtered or unexported fields
}

func NewRun

func NewRun(mode, intent string, reviewer *Reviewer, publish func(string, string, Report, bool)) *RunReviewer

func (*RunReviewer) Hooks

func (*RunReviewer) RequiresManual

func (r *RunReviewer) RequiresManual(ctx context.Context) bool

Jump to

Keyboard shortcuts

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