Coverage for astrocyte/conversations/__init__.py: 100%
5 statements
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-04 05:24 +0000
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-04 05:24 +0000
1"""Astrocyte Conversation Engine — Hindsight-style turn-aware ingestion.
3A standalone subsystem for ingesting conversational input (chat
4sessions, Slack threads, voice transcripts, multi-turn agent dialogs).
5Conversations are inherently sequential — preserved as ordered turns,
6chunked at turn boundaries (never mid-turn), with speaker context kept
7intact.
9Independent of the Document Engine — different input shape, different
10chunking strategy. Both feed the same Memory Engine downstream.
12To compose them with a memory backend, use ``astrocyte.ingest.ConversationIngestor``
13(Phase 3) which walks a conversation and calls memory.retain() per
14chunk with opaque metadata.
16Public API:
17 from astrocyte.conversations import (
18 Conversation, ConversationTurn, TurnRole,
19 ConversationChunk, chunk_conversation,
20 ConversationStore, InMemoryConversationStore,
21 )
22"""
24from astrocyte.conversations.chunking import (
25 DEFAULT_MAX_CHARS_PER_CHUNK,
26 ConversationChunk,
27 chunk_conversation,
28)
29from astrocyte.conversations.ingestor import ConversationIngestor
30from astrocyte.conversations.storage import (
31 ConversationNotFoundError,
32 ConversationStore,
33 InMemoryConversationStore,
34)
35from astrocyte.conversations.types import (
36 Conversation,
37 ConversationTurn,
38 TurnRole,
39)
41__all__ = [
42 # types
43 "Conversation",
44 "ConversationTurn",
45 "TurnRole",
46 # chunking
47 "ConversationChunk",
48 "chunk_conversation",
49 "DEFAULT_MAX_CHARS_PER_CHUNK",
50 # storage
51 "ConversationStore",
52 "InMemoryConversationStore",
53 "ConversationNotFoundError",
54 # ingestor (Memory-Engine bridge)
55 "ConversationIngestor",
56]