pub fn installed_agent(text: &str) -> DefinitionRead<AgentProfile>Expand description
Read an Agent from an installed .mars tree.
The bytes are what the Mars that installed them wrote, not an authored schema v1 file: a tree
an older Mars wrote carries the pre-v1 spellings (type, when_to_use, a tools list,
permission, …) that the strict reader refuses. When the strict reading reports one, the
file is upgraded in memory with the same conversion prepare applies to a pre-v1 package and
read again. A file that reports any other error is simply invalid, and keeps that error: only
a spelling the upgrade can cure says the bytes predate schema v1. The upgrade’s notes are
about the authored file, which mars sync and mars migrate report, so only the reading is
returned. An authored package’s own Agent is read strictly with crate::agent::read.