Expand description
agents.describe — the effective configuration, provenance, and warnings
for ONE agent (#2074, epic #2892).
Why: agents.list answers “what could I dispatch?” with four fields per row
— name, tier, description, model. An operator debugging drift needs the next
question answered: which file on disk is this, did Trusty Code write it, has
anyone edited it since, and what is actually in the prompt. Slice 1 put a
file, a checksum, and an Origin on disk for every shipped role
(crate::agents::deploy); this module is what reads them back out.
What: [describe_agent] resolves one name through
crate::agents::resolve_agent — the SAME disk-wins/embedded-fallback/
plugin chain dispatch uses, never a second copy of it — and pairs the
resolved config with the deployed-agent ledger sitting beside the file.
[load_ledger] reads that ledger once per request, and
[disk_entry_has_warnings] lets agents.list reuse the same judgement for
its per-row has_warnings flag without a second ledger parse.
§What this surface deliberately does NOT report
Trusty Code has no capability-grant model yet: an agent’s declared authority
is the flat tools.allowed allowlist
(crate::agents::config::ToolsConfig) and nothing else. #2074’s
write/shell/network/credential/delegation grants are a later slice, so this
payload reports the allowlist that exists and carries NO grants key.
An absent field is the honest answer; a fabricated one would tell an
operator the runtime enforces something it does not.
Test: crate::agents::describe::tests::*.