toolcap

package
v0.0.0-...-8c5cae0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capability

type Capability struct {
	Operations []Operation `json:"operations,omitempty"`
	Risk       RiskLevel   `json:"risk,omitempty"`
}

Capability describes one tool's side-effect profile for policy hooks.

func Of

func Of(value any) Capability

Of returns declared capability, or a default unknown profile.

func (Capability) HasOperation

func (c Capability) HasOperation(op Operation) bool

HasOperation reports whether one operation is declared.

type Operation

type Operation string

Operation is one normalized tool operation class.

const (
	OperationFileRead  Operation = "file_read"
	OperationFileWrite Operation = "file_write"
	OperationExec      Operation = "exec"
	OperationNetwork   Operation = "network"
)

type Provider

type Provider interface {
	Capability() Capability
}

Provider allows a value to declare capabilities.

type RiskLevel

type RiskLevel string

RiskLevel is a coarse risk signal for policy decisions.

const (
	RiskUnknown RiskLevel = "unknown"
	RiskLow     RiskLevel = "low"
	RiskMedium  RiskLevel = "medium"
	RiskHigh    RiskLevel = "high"
)

Jump to

Keyboard shortcuts

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