This commit addresses several pending tasks from Tasks.md and improves the overall quality and security of the codebase.
Key changes include:
- Implemented dynamic menu generation in `onboarding.py` to create role-based menus from available flows, resolving `[IMP-002]`.
- Hardened the `Dockerfile` by adding a non-root user and health checks, resolving `[DEP-003]`.
- Fixed a type comparison bug in `identity.py` for the admin ID check, resolving `[BUG-003]`.
- Confirmed the fix for the missing `sqlite3` import in `flow_engine.py` and updated `Tasks.md` accordingly, resolving `[BUG-004]`.
- Removed unnecessary planning and test files (`plan_de_pruebas.md`, `reparacion_vs_refactor.md`).
- Stopped all running bot instances to prevent conflicts during development, resolving `[BUG-005]`.
- Updated `Tasks.md` to reflect the completion of all addressed issues.
- Upgrade Python to 3.11 and update dependencies.
- Refactor main.py to isolate business logic.
- Fix bugs in flow_engine.py and printer.py.
- Improve database connection handling.
- Standardize error handling.
- Verify secret management.
This commit implements the first phase of the new architectural vision for the Talia Bot.
Key changes include:
- Renamed the main application directory from `app` to `talia_bot` and updated all associated imports and configurations (`Dockerfile`, tests).
- Replaced the static, `.env`-based permission system with a dynamic, database-driven role management system.
- Introduced a `db.py` module to manage a SQLite database (`users.db`) for user persistence.
- Updated `identity.py` to fetch roles ('admin', 'crew', 'client') from the database.
- Rewrote the `README.md` and `.env.example` to align with the new project specification.
- Refactored the LLM module into the new `modules` structure.
- Creates the initial project structure for the Talía bot, including the `app` and `app/modules` directories.
- Adds placeholder files for the core application logic, modules, and configuration.
- Includes a `Dockerfile` and `docker-compose.yml` for containerization.
- Adds a `requirements.txt` file with the necessary dependencies.
- Creates a `tasks.md` file to track development progress.