Files
paseo/packages
Mohamed Boudra 8a708aab8b refactor: convert ManagedAgent to discriminated unions and remove AgentSnapshot
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>
2025-11-30 00:02:47 +00:00
..