karti-ai
|
319a2fa689
|
Milestone 1: core services + Mox ingest + wired v0 API
- internal/mail: MailBackend interface (Send/Start/Capabilities) + NullBackend.
- internal/core: inbox/message/thread services over pgx; default-pod bootstrap.
- IngestRaw: real mox/message parse → body extraction (text/html walk) →
quote-stripping (extracted_text) → reference-based threading → store, all in
one tx; emits message.received event; populates FTS tsvector.
- core implements mail.InboundSink (Deliver) so any backend feeds the same path.
- internal/api: v0 routes wired live (was 501) — create/list/get inbox, ingest,
list/get messages, list/get thread(+messages), send/reply (503 via NullBackend).
- cmd/openmail serve: builds core + NullBackend, ensures default pod.
Verified e2e vs Postgres 16: inbox create; ingest original+reply → same thread
via In-Reply-To/References; extracted_text strips quoted history; thread detail
ordered; FTS matches 'invoice'; events written; send → honest 503. vet clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-21 12:54:25 -07:00 |
|
karti-ai
|
551739baa3
|
Milestone 1 scaffold: binary skeleton, schema, deploy, Mox spike
- Confirmed core bet via spike/mimecheck: mox/message parses a messy multipart
message standalone (envelope, MIME tree, attachment, body) with only an
io.ReaderAt — no mox store/config. Option B is viable.
- cmd/openmail single binary: serve|migrate|smtpd|sender|version subcommands.
- internal/api: chi router, constant-time bearer auth, /healthz, stubbed v0
AgentMail-shaped routes (501 until core services land).
- internal/store: pgxpool + embedded, idempotent, tracked SQL migrations.
- internal/store/migrations/0001_init.sql: full native schema (pods, inboxes,
threads, messages, attachments, drafts, api_keys, webhooks, outbox, events,
domains) with FTS + GIN indexes. Validated end-to-end against Postgres 16.
- deploy/: docker-compose (postgres+minio+openmail+caddy), Caddyfile, DNS.md
(MX/SPF/DKIM/DMARC/DANE/MTA-STS). Makefile, .gitignore.
- Verified: go vet clean; build OK; health/auth smoke tests; migrate idempotent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
2026-06-21 12:16:51 -07:00 |
|