Coverage for astrocyte/documents/retrieval/__init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-04 05:24 +0000

1"""Document Engine tree-search retrieval. 

2 

3Two components: 

4 DocumentRetriever — low-level reads from DocumentStore (no LLM) 

5 DocumentNavigator — agentic loop over the retriever (LLM + tree reasoning) 

6 

7Three agent-callable tools (PageIndex parity): 

8 get_document_info(doc_id) → DocumentInfo 

9 get_document_structure(doc_id) → TreeSkeleton 

10 get_node_content(doc_id, node_id) → NodeContent 

11 

12Usage: 

13 from astrocyte.documents.retrieval import ( 

14 DocumentRetriever, 

15 DocumentNavigator, 

16 make_retrieval_tools, 

17 ) 

18""" 

19 

20from astrocyte.documents.retrieval.navigator import DocumentNavigator 

21from astrocyte.documents.retrieval.retriever import DocumentRetriever 

22from astrocyte.documents.retrieval.tools import make_retrieval_tools 

23from astrocyte.documents.retrieval.types import ( 

24 DocumentInfo, 

25 DocumentSearchResult, 

26 NodeContent, 

27 SectionHit, 

28 SkeletonNode, 

29 TreeSkeleton, 

30) 

31 

32__all__ = [ 

33 # retrieval classes 

34 "DocumentRetriever", 

35 "DocumentNavigator", 

36 "make_retrieval_tools", 

37 # types 

38 "DocumentInfo", 

39 "SkeletonNode", 

40 "TreeSkeleton", 

41 "NodeContent", 

42 "SectionHit", 

43 "DocumentSearchResult", 

44]