Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrApprovalRequired = errors.New("operation requires approval")
Functions ¶
func EnforceNative ¶
func EnforceNative(safety toolregistry.Safety) error
func Resolve ¶
func Resolve(tool toolregistry.Tool, params map[string]any) (string, toolregistry.Safety, error)
Types ¶
type ApprovalClaims ¶
type ApprovalClaims struct {
Version int `json:"version"`
OperationID client.OperationID `json:"operation_id"`
Tool string `json:"tool"`
Action string `json:"action,omitempty"`
ArgumentsHash string `json:"arguments_hash"`
RiskClass string `json:"risk_class"`
ProjectID string `json:"project_id"`
ExpiresAtMS int64 `json:"expires_at_ms"`
SingleUse bool `json:"single_use"`
}
func InspectApprovalToken ¶
func InspectApprovalToken(token string) (ApprovalClaims, error)
type Assessment ¶
type Assessment struct {
RiskClass string `json:"risk_class"`
SideEffectScope string `json:"side_effect_scope"`
ReadOnly bool `json:"read_only"`
Destructive bool `json:"destructive"`
RequiresApproval bool `json:"requires_approval"`
Enforced bool `json:"enforced"`
}
func Assess ¶
func Assess(safety toolregistry.Safety) Assessment
Click to show internal directories.
Click to hide internal directories.