The non-rich output branch of list_profiles() in
src/cleveragents/cli/commands/automation_profile.py has been refactored
to produce the spec-required envelope rather than a flat list of full
profile objects. The new envelope structure is:
{"profiles": [...simplified...], "summary": {"built_in": N, "custom": N, "total": N}}
Where profiles entries now contain only five fields: name, source,
select_tool, sandbox, and description.
Key changes:
- Profiles in the profiles array are reduced to match the exact spec
(name, source, select_tool, sandbox, description). Full details are
preserved for the show command via the existing _profile_spec_dict().
- The summary object aggregates counts after namespace/regex filtering
so the numbers accurately reflect what is being displayed.
- The rich table column header renamed from 'Select Tool' to 'Auto-Apply'
per spec line 16946, and a Summary panel is appended to the rich output
showing Built-in / Custom / Total counts per spec lines 16959-16963.
- Behave feature file updated with new scenarios covering JSON/YAML output
structure, rich table column header, and Summary panel.
- New step definitions include a comprehensive profiles-wrapper-with-summary
step that validates the full spec-required structure.
- Robot Framework helper test_list_json() updated to validate the new dict
structure with profiles wrapper and summary instead of the old flat list.
ISSUES CLOSED: #2064