# Changelog

## 2026-03-15

- Added `webhook.php` to receive Agenty job-completion webhooks.
- Added `config.php` to hold the shared webhook token and `agent_id -> dealer_slug` mapping.
- Implemented JSON payload parsing and CSV generation from Agenty `result` rows.
- Standardized dealer CSV output to:
  `/var/www/feeds/agenty_scraping/uploads/agenty_scraping_csv/{dealer_slug}/{YYYY}/{MM}/{dealer_slug}_{YYYYMMDD}_{HHMM}.csv`
- Continued updating dealer JSON file lists in `/var/www/feeds/json/{dealer_slug}_csv_file_list.json`.
- Added webhook activity logging in `logs/webhook.log`.
- Added duplicate protection using `agent_id + job_id`.
- Added processed-job retention cleanup with configurable retention days.
- Removed dependency on Agenty custom webhook headers for dealer identification.
