Documentation
¶
Index ¶
- Constants
- type ApproverFunc
- type AuditEntry
- type Capability
- type Choice
- type CommandCategory
- type CommandRequest
- type Engine
- func (e *Engine) ApproveCommand(_ context.Context, req CommandRequest) error
- func (e *Engine) ApproveHook(ctx context.Context, req HookRequest) error
- func (e *Engine) Decide(ctx context.Context, req permission.Request) (*permission.Decision, error)
- func (e *Engine) Mode() Mode
- func (e *Engine) PlanMode() bool
- func (e *Engine) SetApprover(fn ApproverFunc)
- func (e *Engine) SetFilesystemRoots(roots FilesystemRoots)
- func (e *Engine) SetMode(mode Mode)
- func (e *Engine) SetPlanAllowedCommands(prefixes []string)
- func (e *Engine) SetPlanMode(active bool)
- func (e *Engine) SetSkillAllows(rawTools []string)
- type FilesystemRoots
- type HookRequest
- type Mode
- type Prompt
- type Rule
- type RuleSet
Constants ¶
View Source
const ( ModeStrict = permission.ModeStrict ModeBalanced = permission.ModeBalanced ModeAcceptEdits = permission.ModeAcceptEdits ModeTrust = permission.ModeTrust )
View Source
const ( CapHook = permission.CapabilityHook CapInternal = permission.CapabilityInternal )
View Source
const ( ChoiceAllowOnce = permission.ChoiceAllowOnce ChoiceAllowSession = permission.ChoiceAllowSession ChoiceAllowAlways = permission.ChoiceAllowAlways ChoiceDeny = permission.ChoiceDeny )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApproverFunc ¶
type ApproverFunc = permission.Approver
type AuditEntry ¶
type AuditEntry = permission.AuditEntry
type Capability ¶
type Capability = permission.Capability
type Choice ¶
type Choice = permission.Choice
type CommandCategory ¶
type CommandCategory string
const ( CommandCategoryInfo CommandCategory = "info" CommandCategoryPrompt CommandCategory = "prompt" CommandCategorySession CommandCategory = "session" CommandCategoryConfig CommandCategory = "config" CommandCategoryPlan CommandCategory = "plan" CommandCategoryExit CommandCategory = "exit" )
func NormalizeCommandCategory ¶
func NormalizeCommandCategory(raw string) CommandCategory
type CommandRequest ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) ApproveCommand ¶
func (e *Engine) ApproveCommand(_ context.Context, req CommandRequest) error
func (*Engine) ApproveHook ¶
func (e *Engine) ApproveHook(ctx context.Context, req HookRequest) error
func (*Engine) Decide ¶ added in v0.1.0
func (e *Engine) Decide(ctx context.Context, req permission.Request) (*permission.Decision, error)
func (*Engine) SetApprover ¶
func (e *Engine) SetApprover(fn ApproverFunc)
func (*Engine) SetFilesystemRoots ¶
func (e *Engine) SetFilesystemRoots(roots FilesystemRoots)
func (*Engine) SetPlanAllowedCommands ¶ added in v0.1.0
func (*Engine) SetPlanMode ¶
func (*Engine) SetSkillAllows ¶
type FilesystemRoots ¶
type FilesystemRoots = permission.FilesystemRoots
type HookRequest ¶
type Prompt ¶
type Prompt = permission.Prompt
Click to show internal directories.
Click to hide internal directories.