Documentation
¶
Index ¶
- type ApprovalGate
- func (g *ApprovalGate) IsAutoApproved(toolName string) bool
- func (g *ApprovalGate) IsDenied(toolName string) bool
- func (g *ApprovalGate) RequestApproval(toolName string, args json.RawMessage, preview string) (bool, error)
- func (g *ApprovalGate) SetPermissions(autoApprove, deny []string)
- func (g *ApprovalGate) WrapExecution(ctx context.Context, tool Tool, args json.RawMessage) (Result, error)
- type FilePatchTool
- type FileReadTool
- type FileWriteTool
- type Registry
- type Result
- type ShellExecTool
- type Tool
- type ToolSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalGate ¶
type ApprovalGate struct {
OnPresent func(toolName string, args json.RawMessage, preview string) (bool, error)
// contains filtered or unexported fields
}
func NewApprovalGate ¶
func NewApprovalGate() *ApprovalGate
func NewApprovalGateWithPermissions ¶ added in v0.2.0
func NewApprovalGateWithPermissions(autoApprove, deny []string) *ApprovalGate
func (*ApprovalGate) IsAutoApproved ¶ added in v0.2.0
func (g *ApprovalGate) IsAutoApproved(toolName string) bool
func (*ApprovalGate) IsDenied ¶ added in v0.2.0
func (g *ApprovalGate) IsDenied(toolName string) bool
func (*ApprovalGate) RequestApproval ¶
func (g *ApprovalGate) RequestApproval(toolName string, args json.RawMessage, preview string) (bool, error)
func (*ApprovalGate) SetPermissions ¶ added in v0.2.0
func (g *ApprovalGate) SetPermissions(autoApprove, deny []string)
func (*ApprovalGate) WrapExecution ¶
func (g *ApprovalGate) WrapExecution(ctx context.Context, tool Tool, args json.RawMessage) (Result, error)
type FilePatchTool ¶
func (*FilePatchTool) Execute ¶
func (f *FilePatchTool) Execute(ctx context.Context, args json.RawMessage) (Result, error)
func (*FilePatchTool) RequiresApproval ¶
func (f *FilePatchTool) RequiresApproval() bool
func (*FilePatchTool) Spec ¶
func (f *FilePatchTool) Spec() ToolSpec
type FileReadTool ¶
func (*FileReadTool) Execute ¶
func (f *FileReadTool) Execute(ctx context.Context, args json.RawMessage) (Result, error)
func (*FileReadTool) RequiresApproval ¶
func (f *FileReadTool) RequiresApproval() bool
func (*FileReadTool) Spec ¶
func (f *FileReadTool) Spec() ToolSpec
type FileWriteTool ¶
func (*FileWriteTool) Execute ¶
func (f *FileWriteTool) Execute(ctx context.Context, args json.RawMessage) (Result, error)
func (*FileWriteTool) RequiresApproval ¶
func (f *FileWriteTool) RequiresApproval() bool
func (*FileWriteTool) Spec ¶
func (f *FileWriteTool) Spec() ToolSpec
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type Result ¶
type ShellExecTool ¶
func (*ShellExecTool) Execute ¶
func (s *ShellExecTool) Execute(ctx context.Context, args json.RawMessage) (Result, error)
func (*ShellExecTool) RequiresApproval ¶
func (s *ShellExecTool) RequiresApproval() bool
func (*ShellExecTool) Spec ¶
func (s *ShellExecTool) Spec() ToolSpec
Click to show internal directories.
Click to hide internal directories.