v2.55.4
Bounded dashboard fleet and session inventory payloads
Fleet, session-inventory, and recovery responses no longer serialize internal session-search text to the browser.
What changed
- Explicit wire projection. The dashboard server now constructs each on-disk session's browser DTO field by field instead of casting internal session objects, so
allMessagesText,parentSessionPath, and any future internal fields can never reach browser JSON. - Bounded first-message previews.
firstMessageis capped at 256 Unicode code points, truncated by code point so surrogate pairs are never split. - One boundary for every path. The shared projection feeds
GET /api/fleet,GET /api/sessions,GET /api/resync, and memory-scope cwd inventory; missing-cwd filtering and thepath/cwdvalues behind resume and deletion are unchanged. - Type-checked injection. The server's session-list injection is typed against the projection source rather than
unknown[], so the productionSessionManager.listAll()registration is compile-time checked. - Boxed payload growth. A many-session fixture with very large searchable transcripts proves encoded responses scale with session count × preview limit instead of transcript size; exact-shape tests cover all three endpoints, ISO timestamps, and the astral-Unicode cut point.
Previously an observed /api/fleet response encoded ~17.8 MB, dominated by ~16.4 MB of internal search text; it is now bounded by design.
Implemented in PR 451.