mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
117 lines
3.5 KiB
Markdown
117 lines
3.5 KiB
Markdown
# TASK-001: Phase 1 - Core Services
|
|
|
|
## Status
|
|
- **State**: completed
|
|
- **Priority**: P0
|
|
- **Cell**: board
|
|
|
|
## Dates
|
|
- **Created**: 2025-12-09
|
|
- **Completed**: 2025-12-09
|
|
|
|
## Overview
|
|
Implement Phase 1 of the RoboCo system per HOMELAB_TEAM_V0.md blueprint:
|
|
- Database schema
|
|
- Messaging API
|
|
- Agent framework
|
|
- Infrastructure setup
|
|
|
|
## Acceptance Criteria
|
|
- [x] Database schema designed and implemented
|
|
- [x] Messaging API (REST) functional
|
|
- [x] Agent base class created
|
|
- [x] Simple orchestrator built
|
|
- [x] PostgreSQL configured
|
|
- [x] Redis configured
|
|
|
|
## What Was Built
|
|
|
|
### 1. Project Configuration
|
|
- `pyproject.toml` - Dependencies, ruff, mypy, pytest config
|
|
- `docker-compose.yml` - PostgreSQL, Redis, Qdrant
|
|
- `.env.example` - Environment template
|
|
- `alembic/` - Migration setup
|
|
|
|
### 2. Data Models (`src/roboco/models/`)
|
|
| File | Models |
|
|
|------|--------|
|
|
| `base.py` | All enums (TaskStatus, AgentRole, Team, etc.) |
|
|
| `task.py` | Task, TaskPlan, Checkpoint, CommitRef |
|
|
| `agent.py` | Agent, ModelConfig, AgentPermissions |
|
|
| `session.py` | Session, SessionConfig |
|
|
| `message.py` | ExtractedMessage, RawStream |
|
|
| `group.py` | Group |
|
|
| `channel.py` | Channel |
|
|
| `notification.py` | Notification |
|
|
| `journal.py` | Journal, JournalEntry |
|
|
| `handoff.py` | DocumenterHandoff |
|
|
|
|
### 3. Database Layer (`src/roboco/db/`)
|
|
- `base.py` - Async SQLAlchemy engine, session factory
|
|
- `tables.py` - All ORM table definitions (10 tables)
|
|
|
|
### 4. Configuration (`src/roboco/config.py`)
|
|
- Environment-based settings via pydantic-settings
|
|
- Database, Redis, Qdrant, LLM provider configs
|
|
|
|
### 5. Messaging API (`src/roboco/api/`)
|
|
| Route | Endpoints |
|
|
|-------|-----------|
|
|
| `health.py` | `/health`, `/ready` |
|
|
| `channels.py` | CRUD for channels, member management |
|
|
| `sessions.py` | Session lifecycle |
|
|
| `messages.py` | Send, edit, delete messages |
|
|
| `notifications.py` | Send, list, acknowledge |
|
|
|
|
### 6. WebSocket (`src/roboco/api/websocket.py`)
|
|
- `/ws/channels/{id}` - Channel stream
|
|
- `/ws/agents/{id}` - Agent output stream
|
|
- `/ws/sessions/{id}` - Session stream
|
|
- ConnectionManager for broadcasting
|
|
|
|
### 7. Agent Framework (`src/roboco/agents/`)
|
|
- `base.py` - Agent base class with lifecycle, LLM stubs
|
|
- `orchestrator.py` - Spawn/stop agents, health monitoring
|
|
|
|
## File Structure
|
|
```
|
|
src/roboco/
|
|
├── __init__.py
|
|
├── config.py
|
|
├── models/
|
|
│ ├── __init__.py
|
|
│ ├── base.py, task.py, agent.py, session.py
|
|
│ ├── message.py, group.py, channel.py
|
|
│ ├── notification.py, journal.py, handoff.py
|
|
│ └── README.md
|
|
├── db/
|
|
│ ├── __init__.py
|
|
│ ├── base.py
|
|
│ └── tables.py
|
|
├── api/
|
|
│ ├── __init__.py
|
|
│ ├── app.py
|
|
│ ├── deps.py
|
|
│ ├── websocket.py
|
|
│ └── routes/
|
|
│ ├── __init__.py
|
|
│ ├── health.py
|
|
│ ├── channels.py
|
|
│ ├── sessions.py
|
|
│ ├── messages.py
|
|
│ └── notifications.py
|
|
└── agents/
|
|
├── __init__.py
|
|
├── base.py
|
|
└── orchestrator.py
|
|
```
|
|
|
|
## Next Steps (Phase 2: Communication)
|
|
Per HOMELAB_TEAM_V0.md section 13.4:
|
|
- [ ] Transcription service (extract messages from LLM streams)
|
|
- [ ] Message extraction pipeline
|
|
- [ ] Permission system
|
|
|
|
## Quick Context Restore
|
|
Phase 1 core services complete. Database schema, Messaging API, and Agent framework are functional. WebSocket streaming is in place. Ready for Phase 2 which adds transcription/extraction pipelines to process agent LLM output into structured messages.
|