mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Replace ManagedAgent with discriminated union keyed on lifecycle state to make impossible states unrepresentable. Remove AgentSnapshot type and toSnapshot method entirely - consumers now receive ManagedAgent directly. - Define ManagedAgent as discriminated union with 5 lifecycle states - Add comprehensive immutability protection (deep clone + freeze) - Update getAgent/listAgents to return immutable ManagedAgent views - Remove AgentSnapshot type and toSnapshot method - Update event emissions to use ManagedAgent Breaking change: All consumers must now use ManagedAgent or projection functions instead of AgentSnapshot. Tasks 2 & 3 of 8 in agent architecture refactor. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>