Commit Graph

5 Commits

Author SHA1 Message Date
Matt b8e3cc3685 fix: Added circuit breaker
Build and Push Docker Image / build (push) Successful in 2m7s Details
2025-12-09 13:23:21 +01:00
Matt 813e9127f5 Fix auth headers not applied after registration
Build and Push Docker Image / build (push) Successful in 51s Details
Bug: After registration, credentials were set directly on private
attributes (_agent_id, _agent_secret) instead of using property
setters. This bypassed _invalidate_client(), so the HTTP client
kept using old headers without X-Agent-Id/X-Agent-Secret.

Fix: Use property setters (self.agent_id, self.agent_secret) which
trigger _invalidate_client() to recreate the client with new headers.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 13:16:21 +01:00
Matt 51b3050b5c feat: add secure registration with credential persistence
- Add REGISTRATION_TOKEN config for new secure registration flow
- Add agent_secret and credentials_path config options
- Update HTTP client to use X-Agent-Id/X-Agent-Secret headers
- Add credential persistence to ~/.letsbe-agent/credentials.json
- Load persisted credentials on startup to survive restarts
- Verify credentials via heartbeat before skipping registration
- Maintain backward compatibility with legacy Bearer token auth

The agent now:
1. First tries to load persisted credentials
2. Validates them via heartbeat
3. Falls back to registration if invalid/missing
4. Persists new credentials after successful registration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 11:11:59 +01:00
Matt cea54183cc feat: add tenant_id support to agent registration
- Add tenant_id field to Settings (via TENANT_ID env var)
- Include tenant_id in registration payload when configured
- Add TENANT_ID to docker-compose.yml with documentation
- Add ROADMAP.md tracking project progress

Agents can now be associated with a specific tenant at startup.
Required in production, optional in development.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 20:10:43 +01:00
Matt b351217509 Initial commit: SysAdmin Agent with executors
- Core agent architecture with task manager and orchestrator client
- Executors: ECHO, SHELL, FILE_WRITE, ENV_UPDATE, DOCKER_RELOAD, COMPOSITE, PLAYWRIGHT
- EnvUpdateExecutor: Secure .env file management with key validation
- DockerExecutor: Docker Compose operations with path security
- CompositeExecutor: Sequential task execution with fail-fast behavior
- Comprehensive unit tests (84 tests)
- Docker deployment configuration

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 11:05:54 +01:00