🐾 feat(library): add 'email' library type #4
Reference in New Issue
Block a user
Delete Branch "feat/email-library-type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Second companion to the Kairos mail-sync work (with #3, the bucket registry). Kairos will provision a per-user app-managed (workspace) library for synced mail via
POST /library/api/workspaces/, and none of the existing types fit correspondence.content_types.py: newemailentry inLIBRARY_TYPE_DEFAULTS— entry-level chunking mirroringjournal(one message ≈ one entry; 512/32), with embedding/reranker instructions tuned for correspondents, dates, and requests/commitments, and an LLM context prompt that flags quoted-reply text as earlier context rather than the sender's own words.models.py:emailadded to theLibrary.library_typeneomodel choices.api/serializers.py:emailadded toLIBRARY_TYPE_CHOICES(workspace create + search filter + library serializer).EXPECTED_TYPESregistry updated;library.tests.test_content_types24/24 green (run against a sqlite shim — the dev Postgres role here can't create test databases).forms.pyandload_library_typesderive from the registry, so no changes there; the composeinitsidecar re-runs the seeder on deploy, which picks up the new type automatically.Independent of #3 — the two merge in any order.
🤖 Generated with Claude Code