Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + func BuildRejectionMessage(result *GroundingResult) string + func FormatAssessment(assessment *RiskAssessment) string + func FormatGroundingResult(result *GroundingResult) string + func GenerateMitigations(assessment *RiskAssessment) []string + func ShouldProceed(assessment *RiskAssessment) bool + func ToolNeedsPermission(name string, args map[string]interface{}) bool + func ToolSummary(name string, args map[string]interface{}) string + type AutonomyConfig struct + AutoApplyEdits bool + AutoCommit bool + AutoContinue bool + AutoExecuteBash bool + Level AutonomyLevel + func PresetConfig(level AutonomyLevel) AutonomyConfig + func (c AutonomyConfig) NeedsPermission(toolName string, isSafe bool) bool + type AutonomyLevel int + const AutonomyBasic + const AutonomyFull + const AutonomySemi + const AutonomySupervised + const AutonomyYOLO + func ParseAutonomyLevel(s string) AutonomyLevel + func (l AutonomyLevel) String() string + type GroundingResult struct + Grounded bool + Score float64 + SupportedClaims []string + TotalClaims int + UnsupportedClaims []string + type HallucinationGuard struct + Enabled bool + MaxRetries int + Threshold float64 + func NewHallucinationGuard() *HallucinationGuard + func (hg *HallucinationGuard) Check(response string, context []string) *GroundingResult + func (hg *HallucinationGuard) ExtractClaims(text string) []string + func (hg *HallucinationGuard) ExtractKeyTerms(claim string) []string + func (hg *HallucinationGuard) VerifyClaim(claim string, context []string) bool + type OutputRedactor struct + KnownSecrets map[string]string + Patterns []*RedactPattern + Stats RedactStats + func NewOutputRedactor() *OutputRedactor + func (r *OutputRedactor) AddKnownSecret(name, value string) + func (r *OutputRedactor) AddPattern(name string, pattern string, category string) error + func (r *OutputRedactor) FormatStats() string + func (r *OutputRedactor) IsClean(output string) bool + func (r *OutputRedactor) Redact(output string) string + func (r *OutputRedactor) RedactEnvVars(output string) string + func (r *OutputRedactor) RedactPaths(output string, homedir string) string + type PermissionEngine struct + AutoMode *permissions.AutoModeState + Autonomy AutonomyLevel + BypassKill *permissions.BypassKillswitch + Classifier *permissions.Classifier + Memory *PermissionMemory + Mode PermissionMode + PromptFn func(PermissionRequest) + func NewPermissionEngine() *PermissionEngine + func (pe *PermissionEngine) ApplyToolState(name string) + func (pe *PermissionEngine) CheckTool(ctx context.Context, tc ToolCallInfo) (bool, string) + func (pe *PermissionEngine) SetMode(mode string) error + type PermissionMemory struct + func NewPermissionMemory() *PermissionMemory + func (pm *PermissionMemory) AllowSpec(spec string) + func (pm *PermissionMemory) AlwaysAllow(toolName string) + func (pm *PermissionMemory) AlwaysAllowPattern(pattern string) + func (pm *PermissionMemory) AlwaysDeny(toolName string) + func (pm *PermissionMemory) AlwaysDenyPattern(pattern string) + func (pm *PermissionMemory) Check(toolName string, summary string) *bool + func (pm *PermissionMemory) DenySpec(spec string) + type PermissionMode string + const PermissionModeAcceptEdits + const PermissionModeBypassPermissions + const PermissionModeDefault + const PermissionModeDontAsk + const PermissionModePlan + type PermissionRequest struct + Response chan bool + Summary string + ToolID string + ToolName string + type ProtectedPaths struct + func NewProtectedPaths() *ProtectedPaths + func (p *ProtectedPaths) Add(path string) + func (p *ProtectedPaths) Format() string + func (p *ProtectedPaths) IsProtected(path string) bool + func (p *ProtectedPaths) List() []string + func (p *ProtectedPaths) Remove(path string) + type RedactPattern struct + Category string + Name string + Pattern *regexp.Regexp + Replacement string + type RedactStats struct + ByCategory map[string]int + BytesSaved int + TotalRedacted int + type RiskAssessment struct + Factors []RiskFactor + Level string + Mitigations []string + Recommendation string + Score float64 + type RiskAssessor struct + Factors []RiskFactorDef + func NewRiskAssessor() *RiskAssessor + func (ra *RiskAssessor) Assess(ctx *RiskContext) *RiskAssessment + type RiskContext struct + Complexity int + Diff string + Files []string + FilesAffected int + HasBreakingChange bool + IsExported bool + LinesChanged int + TestsExist bool + type RiskFactor struct + Description string + Name string + Score float64 + Weight float64 + type RiskFactorDef struct + EvaluateFn func(ctx *RiskContext) float64 + Name string + Weight float64 + type ToolCallInfo struct + Args map[string]interface{} + ID string + Name string