Live classify
Duckbill™ classifies a bounded page of mail that is already stored for a connected account. The worker does not call a mail provider.
Route
POST /api/classify/live requires a signed-in session and the CSRF header. An optional accountId must belong to that user. When it is omitted, the route uses the signed-in user's jason@jasonkoch.io mailbox when that account is connected, otherwise the first connected mailbox.
The response is counts and versions: examined, persisted, already current, conversation updates, classify work completed, adapter write count, and mailMoved: false. It does not include subjects or bodies.
What it reads
Newest non-deleted, non-historical instances that do not yet have a current classify inference. Limit 10. Subject, stored body text, and the From address are the classifier input.
Pending CLASSIFY work items for those messages are marked succeeded. Other work types are left alone.
Queues
Home (/inbox) labels Needs Me, Respond, and Waiting. Counts come from conversation attention and the current classification pointer.
- Not classified yet: no conversation has an intent or attention classification, and the attention counts are zero.
- Classified empty: classify has run and Needs Me, Respond, Waiting, and system alerts are empty.
- Has attention: at least one of those queues, or a low-confidence review item, is non-zero.
Classify connected mail on the home page runs the route and reloads the counts.
Inferences stay versioned (classify.v1) and correctable. A later human correction designates current_classifications without rewriting inference history. See ADR 0033 and ADR 0022.
