permission

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Action

type Action = agentutils.PermAction

type AgentMode

type AgentMode string
const (
	ModeBuild      AgentMode = "build"
	ModePlan       AgentMode = "plan"
	ModeExplore    AgentMode = "explore"
	ModeGeneral    AgentMode = "general"
	ModeCompaction AgentMode = "compaction"
	ModeTitle      AgentMode = "title"
	ModeSummary    AgentMode = "summary"
	ModeSubagent   AgentMode = "subagent"
)

type Evaluator

type Evaluator = agentutils.PermEvaluator

type PermissionRequest

type PermissionRequest struct {
	ID         string                 `json:"id"`
	SessionID  string                 `json:"session_id"`
	Permission string                 `json:"permission"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
}

func (*PermissionRequest) String

func (r *PermissionRequest) String() string

type PermissionResponse

type PermissionResponse struct {
	RequestID string `json:"request_id"`
	Reply     string `json:"reply"`
}

type Rule

type Rule = agentutils.PermRule

type Ruleset

type Ruleset = agentutils.PermRuleset

func BuildAgentRuleset

func BuildAgentRuleset(mode AgentMode) Ruleset

func DefaultRuleset

func DefaultRuleset() Ruleset

type ToolMeta

type ToolMeta struct {
	Title    string                 `json:"title"`
	Snapshot string                 `json:"snapshot,omitempty"`
	Start    int64                  `json:"start"`
	End      int64                  `json:"end,omitempty"`
	Extra    map[string]interface{} `json:"extra,omitempty"`
}

Jump to

Keyboard shortcuts

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