Commit Graph

6 Commits

Author SHA1 Message Date
Haitao Pan
8b8a2aa3fa feat(agent-persistence): implement PostgreSQL persistence for agent registry
Core Changes:
- Add Agent struct and management methods to Store interface
- Implement PostgreSQL store methods (UpsertAgent, ListAgents, DeleteAgent, DeleteStaleAgents)
- Integrate persistence into Registry with async database writes
- Add Load() method to restore agents from database on startup
- Implement runAgentCleanup background task (5min interval, 10min stale threshold)

Database:
- Update agents table schema to use JSONB for groups field
- Add indexes on last_heartbeat and healthy columns
- Support health tracking and automatic cleanup of stale agents

Documentation:
- Add comprehensive DB access and upgrade guide
- Include agent persistence implementation plan
- Document diagnostic procedures and troubleshooting steps
- Add walkthrough of multi-agent support implementation

This enables:
- Persistent agent state across service restarts
- Automatic cleanup of offline agents
- Multi-agent support with shared token authentication
2026-02-05 08:34:25 +08:00
Haitao Pan
40bb141322 feat: enforce root account and introduce RBAC policy scaffolding 2026-02-04 13:36:24 +08:00
Haitao Pan
693889f366 feat: implement user management features (pause, delete, blacklist, renew uuid) 2026-02-02 20:19:06 +08:00
Haitao Pan
5bf93d1d3f feat: add user management APIs for management page
- Add ListUsers to Store interface and implementations
- Add user listing API endpoint (GET /api/users)
- Add role management endpoints (POST/DELETE /api/auth/admin/users/:userId/role)
- Add GeneratePublicToken to TokenService for OAuth callback
- Add CancelSubscription to Store interface
- Update go.mod with oauth2 dependencies
2026-01-30 08:59:55 +08:00
Haitao Pan
6ba56841b5 feat: add OAuth2 authentication support with new API endpoints, configuration, and identity storage. 2026-01-30 08:46:24 +08:00
Haitao Pan
ee6e1a6363 feat: move account service to repo root
# Conflicts:
#	account/Makefile
#	account/go.mod
#	docs/account-admin-settings.md
#	docs/account-svc-plus.md
2026-01-16 16:15:23 +08:00