Commit Graph

27 Commits

Author SHA1 Message Date
a9bdf6a7fd docs(trading-twins): Document Exchange Policy pitfall and finalize code [31988f42] 2026-03-05 14:11:17 +00:00
bc1bb4ae61 feat(trading-twins): Finalize Booking Engine & Infrastructure [31988f42]
- Implemented 'Direct Calendar Booking' logic replacing MS Bookings API.
- Integrated Dual-App architecture for Graph API (Sender vs. Reader permissions).
- Added FastAPI feedback server for Teams and Email interactions.
- Configured Nginx proxy for public feedback URL access.
- Updated Docker configuration (ports, env vars, dependencies).
- Finalized documentation in lead-engine/README.md.
2026-03-05 13:52:16 +00:00
b60d38994d feat(trading-twins): Implement human-in-the-loop via Teams [31988f42]
- Adds a human-in-the-loop verification step for the Trading Twins lead engine.
- Before sending an email, a notification is sent to a specified Teams channel via webhook.
- The notification is an Adaptive Card that allows a user (Elizabeta Melcer) to stop or immediately trigger the email dispatch within a 5-minute window.
- If no action is taken, the email is sent automatically after the timeout.
- Includes a FastAPI-based feedback server on port 8004 to handle the card actions.
- Adds placeholder for the HTML email signature.
- Successfully tested the Teams webhook connectivity and the full notification/feedback loop in a sandbox environment.
2026-03-05 10:35:50 +00:00
89b06e64af feat: Implement Trading Twins Autopilot with Teams integration and फैक्टर-3 overbooking logic [31988f42] 2026-03-04 08:22:28 +00:00
75e1096853 [31388f42] Doc: Update README with new features and roadmap
- Updates the main features section in `lead-engine/README.md` to reflect multi-source ingestion, UI indicators, and persistent draft storage.
- Adds a new "Roadmap / Nächste Schritte" section to document open To-Dos and future enhancements.
- Adjusts the version to 1.1 to signify the new capabilities.
2026-03-02 19:40:31 +00:00
c784c7b3ed [31388f42] Fix: Centralize Lead Parsers in ingest.py
This commit finalizes the centralization of lead parsing logic.
- Moves  from  to .
- Moves  from  to .
- Ensures  is imported in  for  generation.
- Corrects all necessary imports in  to use functions from .
This addresses the  and improves modularity.
2026-03-02 19:38:56 +00:00
41a9f8c215 [31388f42] Feat: Persist drafts and enhance UI warnings
This commit introduces two key improvements to the Lead Engine:

1.  **Persistent Email Drafts:**
    - Adds a new  function to .
    - Modifies  to save generated email replies directly to the  column in the database, ensuring they persist across sessions.
    - Removes the previous session-based state for drafts.

2.  **Enhanced UI Visibility:**
    - Adds a warning icon (⚠️) directly to the lead expander's title if a lead is flagged as low-quality, making it easier to spot.
2026-03-02 19:32:07 +00:00
8148d7716e [31388f42] Refactor: Centralize Lead Parsers and Fix ImportError
This commit resolves an `ImportError` by centralizing all lead parsing logic into `ingest.py`.

- **Move `parse_tradingtwins_html`:** The function for parsing TradingTwins HTML emails has been moved from `trading_twins_ingest.py` to `ingest.py`.
- **Move `is_free_mail`:** The utility function `is_free_mail` was also moved from `trading_twins_ingest.py` to `ingest.py` to be shared by all parsers.
- **Update Imports:** The import statement in `trading_twins_ingest.py` is now corrected to import all necessary functions from the central `ingest.py` module.

This refactoring improves code structure, removes redundancy, and fixes the critical bug that prevented the ingest process from running.
2026-03-02 19:21:50 +00:00
efaa43858d [31388f42] Feature: Integrate Roboplanet Contact Forms into Lead Engine
This commit integrates the Roboplanet website contact form submissions into the Lead Engine, allowing them to be processed alongside TradingTwins leads.

Key changes:
- **Database Schema Update (db.py):** Added a new source column to the leads table for tracking lead origin (TradingTwins or Website-Formular). Includes a migration check to safely add the column.
- **Improved HTML Parsing (ingest.py):** Refined the `parse_roboplanet_form` function to accurately extract data from the specific HTML structure of Roboplanet contact form emails.
- **Enhanced Ingestion Logic (trading_twins_ingest.py):**
    - Renamed `fetch_tradingtwins_emails` to `fetch_new_leads_emails` and updated it to fetch emails from both lead sources.
    - Modified `process_leads` to dynamically select the correct parser based on email subject.
    - Ensured `source` field is correctly populated and `is_low_quality` checks are applied for both lead types.
- **UI Enhancement (app.py):** Updated the Streamlit UI to visually distinguish lead types with icons and improved the "Low Quality Lead" warning message.

This feature enables a unified processing pipeline for different lead sources and provides better visibility in the Lead Engine dashboard.
2026-03-02 19:19:01 +00:00
04013920ee [31388f42] Final session polish: Refined UI, improved ingest parsing, and completed documentation 2026-03-02 15:10:12 +00:00
86be6b1c08 [31388f42] Update documentation: Append external lead ingestion to MIGRATION_PLAN and create Lead Engine README 2026-03-02 15:08:41 +00:00
7579c78f3a [31388f42] Restructure Lead Engine UI: vertical layout with 2-column top section for source data 2026-03-02 13:35:18 +00:00
0734256c11 [31388f42] Fix NameError in reply generator and implement free-mail quality detection 2026-03-02 13:04:10 +00:00
5c760efc4c [31388f42] Fix contact sync: separate first/last names and enable CE role mapping 2026-03-02 10:42:51 +00:00
fe4916dc17 [31388f42] Fix field naming: Use industry_ai and research_dossier from CE API 2026-03-02 10:20:06 +00:00
dc3595244a [31388f42] Deep CE Sync: Support contact creation and automated enrichment workflow 2026-03-02 10:01:11 +00:00
4fe0d03a39 [31388f42] Implement hierarchical search strategy for more robust role discovery 2026-03-02 09:52:51 +00:00
faf2ac3670 [31388f42] Add SerpAPI debugging to UI and relax dotenv loading 2026-03-02 09:40:04 +00:00
4fa70f4ff1 [31388f42] Fix Gemini API Key path resolution for Docker environment 2026-03-02 09:31:10 +00:00
fcc5f6e63e [31388f42] Fix role lookup: Force German locale, improved LLM prompt 2026-03-02 09:27:35 +00:00
c9c2572104 [31388f42] Implement Expert Response Generator with Gemini & CE integration 2026-03-02 08:46:22 +00:00
dddc92a6c3 [31388f42] Fix ingest: Increase limit to 200, handle None-Subject, client-side filter 2026-03-02 07:58:11 +00:00
8bc2f61aca [31388f42] Dockerize lead-engine: Add service to docker-compose.yml, update nginx proxy, fix Dockerfile deps 2026-03-02 07:49:17 +00:00
b5bb78c7c0 [31388f42] Implement end-to-end email ingest for Tradingtwins leads via MS Graph API 2026-03-02 07:39:46 +00:00
e4bf109458 feat(company-explorer-integration): Implement Company Explorer Connector and Lead Engine Sync [2f988f42]\n\nIntegrates the Company Explorer API into the Lead Engine workflow, allowing for robust company existence checks, creation, and asynchronous enrichment.\n\n- Introduced as a central client wrapper for the Company Explorer API, handling find-or-create logic, discovery, polling for website data, and analysis triggers.\n- Updated to utilize the new connector for syncing new leads with the Company Explorer.\n- Added for comprehensive unit testing of the connector logic.\n- Created as a demonstration script for the end-to-end integration.\n- Updated to document the new client integration architecture pattern.\n\nThis enhances the Lead Engine with a reliable mechanism for company data enrichment. 2026-02-01 19:55:12 +00:00
Jarvis
278da72f4a Fix notion script + update lead-engine debug tools 2026-01-31 17:37:32 +00:00
Jarvis
30c19a546e Add lead-engine source code to main repo 2026-01-31 17:25:19 +00:00