subagents

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCodeSubAgentUnavailable     = "subagent_unavailable"
	ErrorCodeSubAgentInvalidRequest  = "subagent_invalid_request"
	ErrorCodeSubAgentTaskNotEligible = "subagent_task_not_eligible"
	ErrorCodeSubAgentAgentNotFound   = "subagent_agent_not_found"
	ErrorCodeSubAgentModeNotAllowed  = "subagent_mode_not_allowed"
	ErrorCodeSubAgentToolDenied      = "subagent_tool_denied"
	DelegateSubAgentToolName         = "delegate_subagent"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name            string
	Description     string
	Scope           Scope
	SourcePath      string
	Entry           string
	Instruction     string
	Tools           []string
	DisallowedTools []string
	Model           string
	Mode            string
	MaxTurns        int
	Timeout         string
	Output          string
	Isolation       string
	PermissionMode  string // reserved: subagent permission strategy (inherit, bubble, acceptEdits, plan); MVP ignores
	Aliases         []string
	WhenToUse       string
	DiscoveredAt    time.Time
}

type Catalog

type Catalog struct {
	Agents      []Agent
	Diagnostics []Diagnostic
	Overrides   []Override
	LoadedAt    time.Time
}

type Diagnostic

type Diagnostic struct {
	Scope   Scope
	Path    string
	Agent   string
	Level   string
	Message string
}

type Gateway

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

func NewGateway

func NewGateway(manager *Manager) *Gateway

func (*Gateway) Preflight

func (g *Gateway) Preflight(request PreflightRequest) (PreflightResult, error)

type GatewayError

type GatewayError struct {
	Code      string
	Message   string
	Retryable bool
}

func (*GatewayError) Error

func (e *GatewayError) Error() string

type Manager

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

func NewManager

func NewManager(workspace string) *Manager

func NewManagerWithDirs

func NewManagerWithDirs(workspace, builtinDir, userDir, projectDir string) *Manager

func (*Manager) Find

func (m *Manager) Find(name string) (Agent, bool)

func (*Manager) FindBuiltin

func (m *Manager) FindBuiltin(name string) (Agent, bool)

func (*Manager) List

func (m *Manager) List() ([]Agent, []Diagnostic)

func (*Manager) Reload

func (m *Manager) Reload() Catalog

func (*Manager) Snapshot

func (m *Manager) Snapshot() Catalog

func (*Manager) Workspace

func (m *Manager) Workspace() string

type Override

type Override struct {
	Name       string
	Winner     Scope
	Loser      Scope
	WinnerPath string
	LoserPath  string
}

type PreflightRequest

type PreflightRequest struct {
	Agent              string
	Task               string
	Mode               planpkg.AgentMode
	ParentVisible      []string
	ParentAllowed      map[string]struct{}
	ParentDenied       map[string]struct{}
	RequestedTimeout   string
	RequestedOutput    string
	RequestedIsolation string
}

type PreflightResult

type PreflightResult struct {
	Definition               Agent
	AllowedTools             map[string]struct{}
	DeniedTools              map[string]struct{}
	EffectiveTools           []string
	RequestedTimeout         string
	RequestedTimeoutDuration time.Duration
	RequestedOutput          string
	Isolation                string
}

type Scope

type Scope string
const (
	ScopeBuiltin Scope = "builtin"
	ScopeUser    Scope = "user"
	ScopeProject Scope = "project"
)

Jump to

Keyboard shortcuts

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