forked from cleveragents/cleveragents-core
9c4655fd5c
Implement server-side container and devcontainer lifecycle management for the CleverAgents server infrastructure. New modules in src/cleveragents/infrastructure/server/containers/: - DevcontainerSpec: Pydantic model for devcontainer.json parsing and validation (image, build, features, mounts, env vars, ports, hostRequirements, postCreateCommand, remoteUser, workspaceFolder). - ResourceLimits: CPU, memory, storage, and PID limits model with Docker CLI argument generation and hostRequirements conversion. - ContainerManager: Server-side lifecycle orchestration with create/start/stop/destroy operations using pluggable Docker CLI runner (mocked for tests). - HealthMonitor: Periodic container health probing via docker inspect with background thread management and probe history. - ContainerStatus enum: pending/created/running/stopped/destroyed/error with validated state transitions. Tests: - Behave BDD: 67 scenarios covering spec parsing, resource limits, lifecycle operations, health monitoring, and error handling (features/container_lifecycle.feature). - Robot Framework: 13 integration test cases with mock Docker runner (robot/container_lifecycle_server.robot). ISSUES CLOSED: #865