Expand description
Agent auto-discovery — scan $PATH for known CLI agents and probe
their versions in parallel, so the registry can populate itself
without user configuration.
Discovery is data-only: it produces a DiscoveredBinary list.
Turning those into [AgentDelegate] instances happens in the
registry layer, which can also merge user overrides on top.
Structs§
- Agent
Fingerprint - A static description of one known agent family. The discovery pass
tries each
binary_namesentry on$PATH; the first hit is probed and the result becomes aDiscoveredBinary. - Delegate
Discovery - Top-level discovery coordinator. Holds the fingerprint table and probe budget; one instance can be reused across SIGHUP refreshes.
- Discovered
Binary - Outcome of discovery for one fingerprinted agent.
- Invocation
Template - How a discovered agent should be wired into a runnable delegate.
- Path
Scanner - Walks directories (usually from
$PATH) looking for executable files by name. Caches the directory list so repeated lookups during a single discovery pass don’t re-read the env var.
Enums§
- Discovery
Status - Why a candidate binary isn’t usable.
Constants§
- DEFAULT_
PROBE_ TIMEOUT - Per-binary version probe deadline. 3s gives Node-based CLIs (gemini-cli, qwen-code, opencode) enough time to cold-start and print –version; faster CLIs still return well under the cap.
Functions§
- default_
fingerprints - Built-in fingerprints shipped with Brain. Extend this list when a new CLI agent becomes common enough to warrant zero-config wiring.