Documentation
¶
Overview ¶
Package subagentprofile loads the declarative role and persona presets that parameterize a delegated child. It owns discovery and validation only; the Runtime resolves a preset against its captured model and tool catalogs before any child runs, so a preset can never grant authority by itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalid reports a malformed preset declaration or option set. ErrInvalid = errors.New("coding subagent profile: invalid") // ErrLimitExceeded reports bounded preset discovery or content exhaustion. ErrLimitExceeded = errors.New("coding subagent profile: limit exceeded") // ErrInsecure reports an unsafe user-owned preset root. ErrInsecure = errors.New("coding subagent profile: insecure root") )
Functions ¶
func IsolationWorktree ¶
IsolationWorktree reports whether the isolation spelling requests a worktree.
Types ¶
type Diagnostic ¶
Diagnostic is a bounded, content-free discovery decision.
type Limits ¶
type Limits struct {
MaxEntries int
MaxPresets int
MaxFileBytes int64
MaxTotalBytes int64
// MaxPromptBytes bounds one resolved role prompt or persona instruction
// file.
MaxPromptBytes int64
MaxNameBytes int
}
Limits bounds preset discovery and content.
func DefaultLimits ¶
func DefaultLimits() Limits
DefaultLimits returns the production preset discovery bounds.
type Options ¶
type Options struct {
Paths paths.Layout
Tree *workspace.Tree
ProjectTrusted bool
InlineRoles map[string]config.SubagentRole
InlinePersonas map[string]config.SubagentPersona
Limits Limits
}
Options select the user root, the optional trusted project root, and the inline declarations that take precedence over both.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry is an immutable snapshot of the resolved presets. It has no model, Tool, or credential dependency, so holding it cannot grant authority.
func Load ¶
Load discovers role and persona presets from the user root, the trusted project root, and the inline declarations, then returns one detached snapshot. Project roots are never inspected until ProjectTrusted is true. Inline declarations win over project files, which win over user files.
func (Registry) Diagnostics ¶
func (r Registry) Diagnostics() []Diagnostic
Diagnostics returns deterministic discovery diagnostics.