permissions

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package permissions provides tool execution permission management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptWithTUI

func PromptWithTUI(toolName string, args map[string]interface{}) (bool, error)

PromptWithTUI displays a permission prompt using bubbletea

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles tool execution permissions

func NewManager

func NewManager(allowedTools []string, yolo bool) *Manager

NewManager creates a new permission manager

func (*Manager) CheckPermission

func (m *Manager) CheckPermission(toolName string, args map[string]interface{}) (bool, error)

CheckPermission checks if a tool can be executed Returns true if allowed, false if denied

type PermissionPromptModel

type PermissionPromptModel struct {
	// contains filtered or unexported fields
}

PermissionPromptModel is a bubbletea model for permission prompts

func NewPermissionPromptModel

func NewPermissionPromptModel(toolName string, args map[string]interface{}) PermissionPromptModel

NewPermissionPromptModel creates a new permission prompt model

func (PermissionPromptModel) GetChoice

func (m PermissionPromptModel) GetChoice() string

GetChoice returns the user's choice

func (PermissionPromptModel) Init

func (m PermissionPromptModel) Init() tea.Cmd

func (PermissionPromptModel) Update

func (m PermissionPromptModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (PermissionPromptModel) View

func (m PermissionPromptModel) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL