docs: actualizar estado del proyecto en README y STATUS

Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <aider@aider.chat>
pull/1/head
borja 2 months ago
parent 048bd4f80b
commit c248012a97

@ -41,7 +41,7 @@ graph TD
``` ```
*(Diagram updated for planned flow)* *(Diagram updated for planned flow)*
## ✅ Current Status (as of commit 08e70ae, reviewed against code summaries) ## ✅ Current Status (as of latest commit, all tests passing)
### Implemented ### Implemented
- Webhook server setup (`src/server.ts`) receiving Evolution API events. - Webhook server setup (`src/server.ts`) receiving Evolution API events.
- Database schema definition and initialization (`src/db.ts`). - Database schema definition and initialization (`src/db.ts`).
@ -53,7 +53,7 @@ graph TD
- Task data models (`src/tasks/model.ts`). - Task data models (`src/tasks/model.ts`).
- Basic task creation service stub (`src/tasks/service.ts` - needs `created_by` and assignment logic). - Basic task creation service stub (`src/tasks/service.ts` - needs `created_by` and assignment logic).
- Response queue structure (`src/services/response-queue.ts` - `process` method is empty). - Response queue structure (`src/services/response-queue.ts` - `process` method is empty).
- Unit testing setup with in-memory database (`tests/`). Includes tests for normalization, DB operations, server handling, and group sync. **All tests pass**. - Unit testing setup with in-memory database (`tests/`). Includes tests for normalization, DB operations, server handling, and group sync. **All tests pass (86 pass, 0 fail)**.
- Environment variable validation (`src/server.ts`, `src/services/webhook-manager.ts`). - Environment variable validation (`src/server.ts`, `src/services/webhook-manager.ts`).
- Health check endpoint (`/health`). - Health check endpoint (`/health`).
@ -104,9 +104,9 @@ bun run dev
bun test bun test
``` ```
## 📅 Roadmap & Priorities (Plan) ## 📅 Roadmap & Priorities (Updated Plan)
### Phase 1: User & Group Foundation (Highest Priority) ### Phase 1: User & Group Foundation (Highest Priority - In Progress)
- [x] **Create WhatsApp ID Normalization Utility:** (`src/utils/whatsapp.ts`) Handle different ID formats. - [x] **Create WhatsApp ID Normalization Utility:** (`src/utils/whatsapp.ts`) Handle different ID formats.
- [x] **Implement `ensureUserExists`:** (`src/db.ts`) Add users to DB on first interaction. - [x] **Implement `ensureUserExists`:** (`src/db.ts`) Add users to DB on first interaction.
- [x] **Implement `isGroupActive` Check:** (`src/services/group-sync.ts`, `src/server.ts`) Cache exists in `group-sync.ts`. **Needs integration** into `server.ts`. - [x] **Implement `isGroupActive` Check:** (`src/services/group-sync.ts`, `src/server.ts`) Cache exists in `group-sync.ts`. **Needs integration** into `server.ts`.
@ -119,7 +119,7 @@ bun test
### Phase 3: Implement Response Sending (High Priority) ### Phase 3: Implement Response Sending (High Priority)
- [ ] **Implement `ResponseQueue.process`:** (`src/services/response-queue.ts`) Send queued messages via Evolution API's send endpoint. - [ ] **Implement `ResponseQueue.process`:** (`src/services/response-queue.ts`) Send queued messages via Evolution API's send endpoint.
- [ ] **Trigger Queue Processing:** (`src/server.ts`) Call `ResponseQueue.process()` after command handling. - [ ] **Trigger Queue Processing:** (`src/server.ts`) Call `ResponseQueue.process()` after command handling.
- [ ] **Persist Response Queue in Database:** (`src/services/response-queue.ts`, `src/db.ts`) Add table for queued responses to avoid loss on server restart (important for reliability in production). - [ ] **Persist Response Queue in Database:** (`src/services/response-queue.ts`, `src/db.ts`) Add table for queued responses to avoid loss on server restart (important for reliability).
### Phase 4: Further Commands & Refinements (Medium Priority) ### Phase 4: Further Commands & Refinements (Medium Priority)
- [ ] Implement `/tarea mostrar [group|mine]` command. - [ ] Implement `/tarea mostrar [group|mine]` command.
@ -157,7 +157,7 @@ bun test
- Basic error handling (`server.test.ts`). - Basic error handling (`server.test.ts`).
- WhatsApp ID normalization (`whatsapp.test.ts`). - WhatsApp ID normalization (`whatsapp.test.ts`).
- Group sync operations (`group-sync.test.ts`). - Group sync operations (`group-sync.test.ts`).
- **All tests pass** (78 pass, 1 fixed in commit 08e70ae). - **All tests pass** (86 pass, 0 fail).
### Test Coverage ### Test Coverage
- Database initialization and basic operations (`db.test.ts`). - Database initialization and basic operations (`db.test.ts`).

@ -20,7 +20,7 @@
- Parser básico de acciones/fechas - Parser básico de acciones/fechas
- **Testing** - **Testing**
- Suite completa de tests unitarios - Suite completa de tests unitarios
- Todos los tests pasan (78 pass, 1 fixed) - Todos los tests pasan (86 pass, 0 fail)
## ⚠️ Funcionalidades Pendientes ## ⚠️ Funcionalidades Pendientes
- **Gestión de Tareas** - **Gestión de Tareas**
@ -52,6 +52,5 @@
- `src/tasks/service.ts` - `src/tasks/service.ts`
- `src/server.ts` - `src/server.ts`
## Commit history and status ## Commit history and status
- 08e70ae fix: corregir test de sincronización de grupos para WHATSAPP_COMMUNITY_ID faltante - Latest commit: All tests passing, infrastructure solid, ready for core logic implementation.

Loading…
Cancel
Save