Repository navigation
refactor(agents): retire the vestigial agent type taxonomy (#2104) - #2115
Merged
Merged
Conversation
The free-text agent `type` (default "business-assistant") predates tags and
carried no behavior — the github: create path never populated it, so nearly
every agent wore the stale default on the Permissions tab, the info chip, and
even public-link titles. Remove it end-to-end, no deprecation window:
- Models: AgentConfig.type and AgentStatus.type deleted; a legacy `type=`
kwarg (enterprise skill-runner provisioner) is silently ignored by Pydantic.
- Writers: creation, recreate-from-nothing, system-agent, Cornelius and deploy
paths no longer bake the trinity.agent-type label or AGENT_TYPE env (read by
nothing); SYSTEM_AGENT_TYPE / CORNELIUS_TYPE constants dropped.
- Readers: /api/agents, /api/agents/{name}/info (incl. a strip of the field
from older base images' proxied responses), permissions payload, ops fleet
dicts, the agent_created WS broadcast, and the container-less fallback all
stop emitting it; avatar existence-map keys on names.
- Public links fall back to the owner-set display label then the slug — the
stale baked label is never rendered, so the existing fleet cleans up with
zero forced recreates.
- UI: Permissions rows show the canonical slug when a display label hides it
(replacing the [type] suffix); InfoPanel chip and MobileAdmin badge removed;
the skill-runner tile keys on the fixed trinity-skill-runner name.
- MCP: create_agent param, Agent/AgentConfig/TemplateInfo interfaces and tool
descriptions updated; list/get responses lose the field via passthrough.
- template.yaml `type:` stays parseable but ignored; the always-null
agent_type audit field (a typo for `type`) is dropped.
- Guard: tests/unit/test_2104_agent_type_retired.py pins the ignore contract,
the schema, stale-label tolerance, and a source-level residue scan so the
taxonomy cannot silently re-enter.
Fixes #2104
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Resolve by running |
# Conflicts: # docs/memory/learnings.md # tests/registry.json
test_resolvable_template_still_loads asserted the retired `type` field is projected onto AgentConfig — the sixth unmapped reader of the taxonomy (the sweep found five; this one hid in a test the issue never mapped). The fixture keeps `type: research-agent` deliberately: it now proves a legacy template carrying `type:` stays loadable with the field inert. Co-Authored-By: Claude Fable 5 <[email protected]>
vybe
approved these changes
Aug 12, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated via /validate-pr: churn-file conflicts vs dev resolved (registry.json rebuilt from stages, 175 unique entries; both learnings entries kept). CI's regression diff caught a sixth unmapped reader of the retired field (test_1793 asserting type projection) — fixed to the PR's own inertness contract, full suite green on re-run. Security battery clean; 7 feature-flows + user docs updated; residue-guard test present. 14/14 targeted unit tests pass locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
typefield (defaultbusiness-assistant) end-to-end — models, all five creation/recreate writers (trinity.agent-typelabel +AGENT_TYPEenv, read by nothing), API/MCP/WS response surfaces, and every display surface. No deprecation window per the issue.[type]suffix with the canonical slug whenever a display label hides it; the skill-runner tile keys on the fixedtrinity-skill-runnername; the enterprise provisioner'stype=kwarg stays inert (Pydantic ignore — pinned by test) until its private-repo follow-up drops it.template.yaml type:remains parseable but ignored (existing templates keep working — proven by the recreate test fixture); the always-nullagent_typeaudit field (typo fortype) is dropped.Changes
models.py(both fields),crud.py(env/label/config-yaml/local-template mutation + theagent_createdbroadcast — a reader inside the creation try-block that unit tests can't see becausews_manageris nulled),lifecycle.py,deploy.py,system_agent_service.py,cornelius_agent_service.py,docker_service.py,agent_files.py(3 fallbacks + a strip oftypefrom older base images' proxied/inforesponses),public.py,avatar.py,ops.py(both fleet dicts),agents.py(audit + container-less fallback),permissions.py(the payload feeding the Permissions tab)PermissionsPanel.vue(slug-when-label-differs viahasDistinctLabel),InfoPanel.vue,AgentTile.vue,MobileAdmin.vue(+ orphaned CSS),stores/network.jscreate_agentparam removed,Agent/AgentConfig/TemplateInfointerfaces, tool descriptions; list/get responses lose the field via passthroughinfo.pystops returningtype(belt; the backend strip covers un-rebuilt images)tests/unit/test_2104_agent_type_retired.py(Pydantic ignore contract, schema, stale-label tolerance, source-level residue guard over 4 trees) +test_start_agent_skip_inject.pyconverted to negative assertions; registered intests/registry.jsonConsumer note (no backward compat, per issue)
typeleaves/api/agents,/api/agents/{name}(incl. the recovered-agent fallback),/api/agents/{name}/info, the permissions payload, ops fleet-status, theagent_createdWS event, and MCPlist_agents/get_agent. Cross-repo: grep trinity-ops-agent for readers before release; include in release notes.Test Plan
pytest tests/unit/test_2104_agent_type_retired.py— 5/5 (incl. residue guard that caught two comment stragglers during development)test_start_agent_skip_inject+test_runtime_label_fast_path+test_1811_recovery_container_parity(env-parity guard) +test_ent89green;test_1484_create_agent_characterization40/40tsc --noEmitclean, 236/236 teststest_2006_deploy_residuefailures when co-scheduled withtest_start_agent_skip_injectin one process — reproduced identically on clean dev (randomized-suite stub-leak class), unrelated to this diffFixes #2104
🤖 Generated with Claude Code