Bid emails arrive at bids@ai-globalfoodsolutions.co. src/email.ts parses the headers and body, the document converter (PDF / XLSX) normalizes attachments to markdown, and we attempt to match the sender to a known customer via name_synonyms.json. A proposed_actions row stages "New bid inbound — customer match <X> — run review?" until Mike approves. On approve, a chat session opens with the bid PDF, the customer's customer.json, and the customer's latest bid_quote_versions row already in context, and the standardized 11-skill review runs. Customer + SY-version is the trace thread.
| kind | name | purpose |
|---|---|---|
| Mailbox | bids@ai-globalfoodsolutions.co | Path 1 inbound |
| Code path | src/email.ts | email parser + router |
| Code path | src/document_converter.ts | PDF / XLSX -> Markdown |
| R2 bucket | bid-attachments | source attachment audit |
| D1 table | proposed_actions | HITL gate (kind='bid_email_intake') |
| D1 table | bid_customers | customer match |
| D1 table | bid_quote_versions | SY-version source-of-truth |
| D1 table | bid_price_snapshots | line-level snapshot |
| D1 table | bid_external_pipeline | if external bid logged |
| D1 table | bid_reviews | 23 review .md analyses |
| Endpoint | POST /api/proposed-actions/decide | Mike approve / reject / reassign |
| Event | bid.email_intake_completed | downstream subscribers |