feat(backend): persist tasks and generated message history

- add EntityTask domain and CRUD API backed by PostgreSQL

- relate generated messages directly to tasks and delete on task removal

- move preview generation to backend Llama endpoint

- migrate frontend task APIs from localStorage to backend endpoints

- update tests and CLAUDE rules for backend-owned LLM/persistence
This commit is contained in:
2026-03-27 02:46:56 -03:00
parent f2a16b5cf6
commit ebcea643c4
20 changed files with 1181 additions and 244 deletions

View File

@@ -494,6 +494,17 @@ BODY:
<full email body here>
```
## Task Preview Generation Rules
- The frontend must **never** call LLM providers (OpenAI/Ollama/Llama) directly.
- The frontend requests backend endpoints only.
- The backend is responsible for:
- building the final prompt,
- calling the configured LLM endpoint,
- returning the generated message to the frontend.
- Generated preview message history must be persisted in the backend database (not browser storage),
so history survives reloads and restarts.
---
## Git Workflow & CI/CD