Help us shape the future of Go! Take the 2026 Go Developer Survey

subagents

package
v0.19.13 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extension

func Extension(injected engine.StreamFn, policy *permissions.Policy, settings *config.SettingsManager) extensions.Factory

func ExternalEntries

func ExternalEntries(settings *config.SettingsManager) (map[string]ExternalEntry, error)

ExternalEntries parses plugins.subagents.external, where each value is either a command string or {"command": string, "enabled": bool} — the object form is how a CLI is switched off without losing its command.

func ParseExternalEntries

func ParseExternalEntries(configured map[string]any) (map[string]ExternalEntry, error)

ParseExternalEntries parses one scope's raw subagents configuration, and checks its models: each "provider/id".

func ToggleExternalCLI

func ToggleExternalCLI(settings *config.SettingsManager, name string) error

ToggleExternalCLI flips one external CLI, preserving its command (the object form of plugins.subagents.external), or configures a detected CLI with its known invocation.

Types

type ExternalEntry

type ExternalEntry struct {
	Command string
	Enabled bool
}

ExternalEntry is one configured external CLI: its command and whether it is currently offered to the model.

type KnownCLI

type KnownCLI struct {
	Name    string
	Command string
}

KnownCLI is an agent CLI orb can drive as an external subagent: the command is its print-mode invocation reading the task on stdin and answering on stdout (the contract runExternalChild expects).

func DetectCLIs

func DetectCLIs(lookPath func(string) (string, error)) []KnownCLI

DetectCLIs returns the known CLIs present on PATH, in registry order. lookPath is injectable for tests.

func KnownCLIs

func KnownCLIs() []KnownCLI

KnownCLIs is deliberately short: only invocations known to honor the stdin/stdout contract. A wrong template would fail visibly (the child's output is surfaced), but a curated list keeps auto-detection trustworthy.

Jump to

Keyboard shortcuts

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