Documentation
¶
Overview ¶
Package approver defines interfaces for approval checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Approver ¶
type Approver interface {
// Name returns the approver identifier.
Name() string
// Approve returns a decision for the given request.
Approve(ctx context.Context, req Request) (Decision, error)
}
Approver checks whether an action is allowed.
type Chain ¶
type Chain struct {
// Approvers is the ordered list to execute.
Approvers []Approver
}
Chain runs approvers sequentially until a decision is made.
type Decision ¶
type Decision struct {
// Allowed indicates approval result.
Allowed bool
// Reason explains the decision.
Reason string
// Source identifies the approver.
Source string
}
Decision represents the approver decision.
type Request ¶
type Request struct {
// ToolName is the tool being approved.
ToolName string
// Arguments are tool arguments.
Arguments map[string]any
// CorrelationID links related approvals.
CorrelationID string
}
Request defines the input sent to approvers.
Click to show internal directories.
Click to hide internal directories.