Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GuardianDecision ¶
type GuardianDecision struct {
Allowed bool `json:"allowed"`
Reason string `json:"reason"`
Confidence float64 `json:"confidence"`
}
GuardianDecision is a provider-neutral automatic permission review response.
type PermissionRequest ¶
type PermissionRequest struct {
ToolName string `json:"tool_name"`
ToolID string `json:"tool_id,omitempty"`
Summary string `json:"summary,omitempty"`
}
PermissionRequest represents a user-facing approval request.
type PermissionVerdict ¶
type PermissionVerdict struct {
Allowed bool `json:"allowed"`
Reason string `json:"reason,omitempty"`
Rule string `json:"rule,omitempty"`
Risk Risk `json:"risk"`
Confidence float64 `json:"confidence,omitempty"`
Source string `json:"source,omitempty"`
}
PermissionVerdict is the unified outcome type for permission subsystems.
func Deny ¶
func Deny(reason, rule string) PermissionVerdict
Deny returns a reject verdict with the given reason and rule.
func RequireApproval ¶
func RequireApproval(reason, rule string, risk Risk) PermissionVerdict
RequireApproval returns a "needs human approval" verdict.
func (PermissionVerdict) IsZero ¶
func (v PermissionVerdict) IsZero() bool
IsZero reports whether v is the zero value.
func (PermissionVerdict) String ¶
func (v PermissionVerdict) String() string
String returns a one-line summary for logs.
Click to show internal directories.
Click to hide internal directories.