Expand description
Phase-1 plugin AGENT ingestion: discovery, namespacing, and resolution (issue #3539).
Why: a plugin’s agents/*.md files are the exact same
Markdown+frontmatter format agents::md_loader already parses for
project/embedded agents — the only new work is namespacing
(<plugin>:<name>) and two Phase-1 leaf-only guarantees #3539 locks in:
unsupported frontmatter fields (effort/maxTurns/memory/isolation/
disallowedTools — trusty-mpm’s own agent schema, which a plugin may
carry over) are dropped with a warning rather than failing the load, and
an extends: chain is never composed (a plugin agent is always a leaf —
cross-catalog compose is a later-phase item).
What: discover_plugin_agents lists every plugin agent as a fully
projected AgentConfig (used by agents::protocol::agents_list’s
plugin tier); find_plugin_agent_config resolves one namespaced
<plugin>:<name> on demand (used by agents::resolve_agent, the
dispatch path). Both route through [load_plugin_agent], which reuses
agents::md_loader’s frontmatter/body parsing
([crate::agents::md_loader::extract_body],
[crate::agents::md_loader::project_to_agent_config]) rather than
duplicating the projection — the only difference from a disk agent load
is the namespaced name and the two Phase-1 guards above.
Test: tests::* — discovery finds and namespaces agents, unsupported
fields are dropped with a warning, extends: is warned-and-ignored,
resolution finds/misses a namespaced name, a base-agent-named plugin
agent is excluded from listing.
Functions§
- discover_
plugin_ agents - List every plugin agent across every discovered plugin, fully projected and namespaced.
- find_
plugin_ agent_ config - Resolve one namespaced
<plugin>:<agent_name>to itsAgentConfig, orNonewhen no such plugin/agent exists.