Originally created by: MLastAirBender
1. Core Data Model Updates
- src/types.ts: Expanded the Agent interface to include an optional category string field. This allows every fleet member to be
assigned to a logical group (e.g., "production", "testing", "gpu-nodes").
- Merge Integrity: Successfully integrated the new category field alongside the recently added unattended execution mode from
the upstream repository, ensuring no loss of functionality from either feature.
2. Member Management Enhancements
- register_member: Added a new category parameter to the registration schema. Members can now be categorized at the moment they
are added to the fleet.
- update_member: Added support for modifying or clearing the category field for existing members.
- list_members: Updated the listing tool to display the category for each member, improving the administrative overview of the
fleet.
3. Smart Status Rendering (check_status)
- Categorized Grouping: The fleet_status output now groups members by their category. This makes large fleets much easier to
navigate by separating different types of workers.
- Status Chips: Redesigned the "compact" status line to show category-based groups with emoji status chips (e.g., [cloud]: 🟢
worker-1(idle)).
- Upstream Integration: Merged the categorization logic with the new "Update Notice" system. The status output now
simultaneously shows your custom groups and alerts you if a new version of apra-fleet is available.
4. Infrastructure & Sync
- Upstream Sync: Synchronized the codebase with over 90 files from the main repository, including new providers, security
hardening, and performance improvements.
- Statusline Updates: Enhanced src/services/statusline.ts to be more robust when handling state changes across different member
types.
Technical Impact: These changes improve the scalability of the fleet CLI by allowing users to organize and monitor large numbers
of members through logical grouping, without breaking compatibility with new upstream security and automation features.
Originally posted by: kumaakh
Code Review — fleet-rev
Overall
The PR adds an optional
categoryfield to fleet members and uses it to group output infleet_status,list_members, and the statusline. Approach is sound — a few issues worth addressing.Correctness
1. Whitespace-only category silently stored (
update-member.ts:123)" "is truthy so it gets stored as-is, but the display side trims it → shows as(uncategorized)while the DB value is non-empty whitespace. Fix: trim before the falsy check:2. Fragile index-based join in
check-status.ts:219Relies on
rowsandagentsbeing the same length and order. Any future filtering onrowswould silently miscategorize members. Attachcategorywhen the row is first built, not retroactively by index.3. Multi-line statusline — new code joins category groups with
\n. If Claude Code's status bar reads only the first line, all categories after the first are invisible. Needs verification.Edge Cases
4. Category ordering is insertion-order (no sort). Users might expect alphabetical. Consider sorting Map keys, or at minimum putting
(uncategorized)last.Security
No issues.
categoryis bounded (.max(64)), optional, display-only.Tests
None added. Missing at minimum: whitespace-clearing behaviour on update, grouped output format in
list_members/fleet_status, andcategorypresence in JSON output.Code Quality
5. Duplicated group-by-category logic across
statusline.ts,check-status.ts, andlist-members.ts. Extract a shared helper:6. Unrelated
package-lock.jsonchanges —"peer": trueadded to several packages (express,hono,zod,vite, etc.). Looks like an npm version difference, not intentional. Should be explained or reverted.Summary
groupByCategoryhelperpackage-lock.jsonpeer changes