Documentation
¶
Index ¶
Constants ¶
const ToolSandboxAccess = "SandboxAccess"
ToolSandboxAccess names the synthetic approval the agent raises when a tool is denied a path, so the user can grant it instead of failing the call.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access string
Access is what a rule lets a tool do with a path. Write implies read.
type Allowed ¶
Allowed opens Path to the tools with Access (write when unset). Path is an anchored directory or file (absolute, ~, . or ./) or a relative pattern matched at any depth (dir/, *.glob, name). In YAML it is a string or a map.
func (Allowed) MarshalYAML ¶
type Denied ¶
type Denied struct {
Path string `yaml:"path"`
OnViolation Violation `yaml:"on_violation,omitempty"`
}
Denied closes Path whatever Allowed says. OnViolation decides whether a denied call fails or asks the user. In YAML it is a string or a map.
func (Denied) MarshalYAML ¶
type DeniedError ¶
DeniedError is returned when a path is denied and the user may grant it. Rule names the denied entry, or is empty when the path is outside allowed.
func ParseDenial ¶
func ParseDenial(msg string) (*DeniedError, bool)
ParseDenial recovers a DeniedError from a message that has been flattened into a tool-result error string.
func (*DeniedError) Error ¶
func (e *DeniedError) Error() string