Mohamed Boudra 2794a5b63c feat: add pure projection functions for ManagedAgent transformations
Introduce toStoredAgentRecord and toAgentPayload as deterministic
pure functions to project ManagedAgent state to persistence and
client payload formats. This eliminates the need for AgentSnapshot
as an intermediate representation.

- Add toStoredAgentRecord for persistence projection
- Add toAgentPayload for client communication projection
- Add comprehensive test suite covering all lifecycle states
- Handle optionality at boundaries with proper null/undefined semantics

Task 1 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:37 +00:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%