approvedtools

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersionV1 = "v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Approved

type Approved struct {
	ToolIDs   MatchSet `yaml:"tool_ids" json:"tool_ids"`
	AgentIDs  MatchSet `yaml:"agent_ids" json:"agent_ids"`
	ToolTypes MatchSet `yaml:"tool_types" json:"tool_types"`
	Orgs      MatchSet `yaml:"orgs" json:"orgs"`
	Repos     MatchSet `yaml:"repos" json:"repos"`
}

type Config

type Config struct {
	SchemaVersion string   `yaml:"schema_version" json:"schema_version"`
	Approved      Approved `yaml:"approved" json:"approved"`
}

func Load

func Load(path string) (Config, error)

func (Config) HasRules

func (c Config) HasRules() bool

func (Config) Match

func (c Config) Match(candidate ToolCandidate) bool

func (*Config) Normalize

func (c *Config) Normalize()

func (Config) Validate

func (c Config) Validate() error

type MatchSet

type MatchSet struct {
	Exact  []string `yaml:"exact" json:"exact"`
	Prefix []string `yaml:"prefix" json:"prefix"`
}

func (MatchSet) Match

func (m MatchSet) Match(value string) bool

type ToolCandidate

type ToolCandidate struct {
	ToolID   string
	AgentID  string
	ToolType string
	Org      string
	Repos    []string
}

Jump to

Keyboard shortcuts

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