Commit Graph

4 Commits

Author SHA1 Message Date
Gan, Jimmy 5da2ae01a0 fix: complete OPC system implementation
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 10m4s
Run Tests / Frontend Tests (push) Failing after 14m28s
Run Tests / Backend Tests (push) Failing after 14m50s
Run Tests / Test Summary (push) Has been cancelled
- Add database connection retry logic (3 attempts, 5s delay)
- Add missing database functions: get_task_by_id, get_agent_execution, approve_agent_execution, update_agent_config, update_execution_status
- Complete agent execution approval workflow
- Fix agent executor to handle approved executions
- Fix inefficient task queries (use direct ID lookup)
- Add error action handling in agent executor
- Improve LiteLLM error handling with specific exception types
- Reduce LiteLLM timeout from 60s to 30s
- Fix execution status update to only set started_at once
- Consolidate WebSocket datetime serialization with helper function
- Implement update agent endpoint
2026-04-03 22:30:51 +08:00
Gan, Jimmy 09acdcf868 fix: only send auth header when API key is set, show agent panel by default with localStorage persistence
Run Tests / Backend Tests (push) Failing after 1m9s
Run Tests / Test Summary (push) Has been cancelled
Run Tests / Frontend Tests (push) Has been cancelled
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 18m59s
2026-04-02 22:47:19 +08:00
Gan, Jimmy 54bfea16f2 fix: add LITELLM_API_KEY support for authenticated LiteLLM calls
Run Tests / Backend Tests (push) Failing after 22s
Run Tests / Frontend Tests (push) Failing after 36s
Run Tests / Test Summary (push) Failing after 40s
Deploy Dashboard (Dev) / deploy-dev (push) Failing after 7m14s
2026-04-02 22:06:12 +08:00
Gan, Jimmy 1422cc9bc8 feat: complete Phase 1 MVP - add agent executor and WebSocket real-time updates
Deploy Dashboard (Dev) / deploy-dev (push) Has been cancelled
Run Tests / Backend Tests (push) Has been cancelled
Run Tests / Frontend Tests (push) Has been cancelled
Run Tests / Test Summary (push) Has been cancelled
Agent Executor Service:
- BaseAgent class with LLM integration via LiteLLM proxy
- AgentExecutor service that processes pending executions every 5 seconds
- Action execution: create_subtask, update_status, send_notification, add_comment
- Approval workflow: CxO level agents require user approval before execution
- Telegram notifications for approvals and completions
- Error handling and execution status tracking

WebSocket Real-Time Updates:
- WebSocket endpoint at /ws/opc for real-time task updates
- ConnectionManager for broadcasting to all connected clients
- Frontend WebSocket client with auto-reconnect
- Live updates for task create/update/move/delete actions
- Agent execution status broadcasts

Integration:
- Agent executor starts on dashboard startup
- Task router broadcasts WebSocket updates on all mutations
- Frontend OPC page subscribes to WebSocket and updates UI in real-time
- Agents (PM, CTO, COO) can now execute tasks autonomously

Phase 1 MVP Complete:
 PostgreSQL database with full schema
 Task CRUD API with automatic time tracking
 Kanban board with drag-and-drop
 Agent executor service with LLM integration
 WebSocket real-time updates
 3 core agents ready to execute

Next: Agent panel UI, email notifications, PDF invoicing
2026-03-31 14:46:44 +08:00