Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorPermissionDenied = errors.New("permission denied")
Functions ¶
This section is empty.
Types ¶
type CreatePermissionRequest ¶
type PermissionRequest ¶
type Service ¶
type Service interface {
pubsub.Suscriber[PermissionRequest]
GrantPersistant(permission PermissionRequest)
Grant(permission PermissionRequest)
Deny(permission PermissionRequest)
Request(opts CreatePermissionRequest) bool
AutoApproveSession(sessionID string)
RemoveAutoApproveSession(sessionID string)
SetGlobalAutoApprove(enabled bool)
// RegisterSessionHandler installs a custom approval function for a specific session.
// When set, this handler is called instead of the TUI dialog for that session.
// The handler receives (sessionID, toolName, description string) and returns true to approve.
RegisterSessionHandler(sessionID string, handler func(sessionID, toolName, description string) bool)
// UnregisterSessionHandler removes the custom handler for a session.
UnregisterSessionHandler(sessionID string)
}
func NewPermissionService ¶
func NewPermissionService() Service
Click to show internal directories.
Click to hide internal directories.