Mail & Digital Twin (v5.0)
Everything in this section is off by default; nothing is read, drafted or sent until you switch it on. Deep dives: DIGITAL_TWIN_AND_MAIL.md, MAIL_SECURITY.md, DIGITAL_TWIN_APPROVAL.md.
Connecting and reading mail
- Zero-config sign-in. Gmail and Outlook through OAuth (XOAUTH2, no app passwords); any other provider through IMAP/SMTP with settings found from built-in presets or Thunderbird's autoconfig database. Credentials are kept in an encrypted vault on the machine.
- A 60-second watcher. New mail is polled in the background. Only mail that arrives after you connect is handled; the old inbox is never backfilled and a cold start never floods the model.
- Three-layer triage (the Gatekeeper). Layer 1 is structured data and your own contacts (invitations, flights, invoices, one-time codes, people you already write to, active reply threads); layer 2 is standard headers (
List-Unsubscribe, Auto-Submitted, Precedence, noreply-style senders); layer 3 is a model, only for what is left. Mail lands in one of five categories and bulk, newsletter and one-time-code mail never enter memory or get a reply.
Protection
- Inbound shield. Deterministic English and Turkish instruction-override, role-delimiter and base64-encoded-instruction checks run before triage, memory indexing and calendar extraction. An optional decision-model review adds a second opinion and fails closed: if it can't answer, the mail is held, not passed. A blocked mail stays readable in the inbox.
- Mail is data, never instructions. Mail text reaches a model inside an untrusted-data envelope, and the research assistant that reads it has four read-only tools only (contact history, memory search, calendar availability, git status of a registered project).
- Outbound scan. Subject, body,
To/Cc and drafts are checked for API keys, private-key blocks, KEY=value lines and recently seen one-time codes before any connection is opened.
- Privacy wall. The model sees only masked free/busy ranges from your calendar, never titles, places or guests, and other people's data never leaks into a reply.
The twin
- One person, every channel. Link a person's mail address and WhatsApp number; a timeline shows both with their original dates, and a "tomorrow" written last week keeps its meaning. People are never merged by name alone.
- Your style, not a clone. A plain summary (formal or casual, language, greeting) from your last 100 sent messages; it says so when examples are few.
- Prepared replies. Read-only research, then a draft in your style, uploaded to the account's Drafts folder and shown in Mail → Replies, where you edit and send it yourself. A separate reply model writes the text; the decision model only scores.
- Per-person policy
never / draft_only (default) / full_auto.
- Approval from anywhere. In the app, or on WhatsApp and Telegram with
#onay N, #iptal N, #asla N (only your own chat is accepted).
- Automatic sending with an undo window. For a full auto person, a reply waits a 60-second window (adjustable); at the moment of sending every rule is re-checked, plus an independent confidence score of at least 0.95. Groups and CC are never answered automatically, nothing is sent twice, mail older than six hours is never answered on its own, one automatic reply per person per hour at most, and after a restart whatever still waits returns to you.
- Calendar-aware. An
.ics invitation is added with a note to review, conflicts are flagged, up to two alternatives are offered, and the reply never reveals other events.
- Follow-up radar and promises. A review-only reminder draft for answers you are waiting on (one per person, groups never nagged), and tracking of your own dated promises.
- Chat tools. Pending drafts, open commitments, a contact's timeline and the unfinished work of your projects;
/mail and /twin in the terminal; a message can become an idle Self-Driving task, only on your say-so.
Source document