adding agent tasks to the repo to not lose them

This commit is contained in:
2026-04-12 17:57:45 -04:00
parent 58948bdfb6
commit 8b34754c77
6 changed files with 132 additions and 1 deletions
@@ -0,0 +1,23 @@
# Epic 2: Provider Persistent Storage (SD Card)
## Goal
Ensure Users, Tasks, and Settings survive device reboots on the ESP32-S3 Provider.
## Context
Currently, the Provider's state (Todo tasks, Registered Devices, and User objects) resides in static BSS arrays like `g_Tasks[32]`. This means the state is lost on every reset.
The ESP32-S3 board has an onboard 3GB SD Card reader. This Epic focuses on migrating the data layer to utilize this SD Card.
## Scope & Technologies to Investigate
1. **Hardware Pinout:**
- Determine the exact physical pins the SD Card reader is using on the specific ESP32-S3 board.
- Investigate if it is wired for standard SPI (`sdspi`) or native SDMMC (1-bit or 4-bit mode).
2. **ESP-IDF Storage Drivers:**
- Mount a FATFS partition using the `esp_vfs_fat_sdmmc` / `esp_vfs_fat_sdspi` components.
3. **Data Model:**
- Decide between compiling SQLite for ESP-IDF (better querying, harder setup) or relying on flat `.json` files parsed via cJSON (easier setup, sufficient for MVP limits like 4 users and 32 tasks).
## Next Steps to Start
1. Create a `tdd/sd_card_persistence.md`.
2. Find the board schematic or test GPIO configurations to successfully mount the SD Card.
3. Abstract the storage functionality into a generic `store.hpp/cpp` interface so the `manage.cpp` and API handlers don't need to be rewritten.
4. Update `seed_users()` and `seed_tasks()` routines to populate initial `.json` files if the SD Card is empty.