trustgraph-flow 2.7.0__tar.gz → 2.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/PKG-INFO +1 -1
  2. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/pyproject.toml +1 -0
  3. trustgraph_flow-2.7.1/trustgraph/flow_version.py +1 -0
  4. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/document_rag/document_rag.py +102 -12
  5. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/document_rag/rag.py +54 -0
  6. trustgraph_flow-2.7.1/trustgraph/storage/kw_index/fts5/__init__.py +1 -0
  7. trustgraph_flow-2.7.1/trustgraph/storage/kw_index/fts5/__main__.py +6 -0
  8. trustgraph_flow-2.7.1/trustgraph/storage/kw_index/fts5/service.py +180 -0
  9. trustgraph_flow-2.7.1/trustgraph/tables/__init__.py +0 -0
  10. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/PKG-INFO +1 -1
  11. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/SOURCES.txt +4 -0
  12. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/entry_points.txt +1 -0
  13. trustgraph_flow-2.7.0/trustgraph/flow_version.py +0 -1
  14. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/README.md +0 -0
  15. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/setup.cfg +0 -0
  16. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/__init__.py +0 -0
  17. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/__init__.py +0 -0
  18. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/mcp_tool/__init__.py +0 -0
  19. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/mcp_tool/__main__.py +0 -0
  20. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/mcp_tool/service.py +0 -0
  21. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/__init__.py +0 -0
  22. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/__main__.py +0 -0
  23. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/aggregator.py +0 -0
  24. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/meta_router.py +0 -0
  25. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/pattern_base.py +0 -0
  26. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/plan_pattern.py +0 -0
  27. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/react_pattern.py +0 -0
  28. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/service.py +0 -0
  29. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/orchestrator/supervisor_pattern.py +0 -0
  30. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/__init__.py +0 -0
  31. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/__main__.py +0 -0
  32. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/agent_manager.py +0 -0
  33. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/service.py +0 -0
  34. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/streaming_parser.py +0 -0
  35. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/tools.py +0 -0
  36. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/react/types.py +0 -0
  37. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/agent/tool_filter.py +0 -0
  38. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/__init__.py +0 -0
  39. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/base.py +0 -0
  40. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/bootstrapper/__init__.py +0 -0
  41. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/bootstrapper/__main__.py +0 -0
  42. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/bootstrapper/service.py +0 -0
  43. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/initialisers/__init__.py +0 -0
  44. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/initialisers/default_flow_start.py +0 -0
  45. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/initialisers/pulsar_topology.py +0 -0
  46. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/initialisers/template_seed.py +0 -0
  47. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/bootstrap/initialisers/workspace_init.py +0 -0
  48. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/__init__.py +0 -0
  49. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/recursive/__init__.py +0 -0
  50. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/recursive/__main__.py +0 -0
  51. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/recursive/chunker.py +0 -0
  52. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/token/__init__.py +0 -0
  53. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/token/__main__.py +0 -0
  54. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/chunking/token/chunker.py +0 -0
  55. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/config/service/__init__.py +0 -0
  56. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/config/service/__main__.py +0 -0
  57. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/config/service/config.py +0 -0
  58. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/config/service/service.py +0 -0
  59. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/cores/__init__.py +0 -0
  60. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/cores/__main__.py +0 -0
  61. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/cores/knowledge.py +0 -0
  62. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/cores/service.py +0 -0
  63. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/__init__.py +0 -0
  64. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/mistral_ocr/__init__.py +0 -0
  65. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/mistral_ocr/__main__.py +0 -0
  66. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/mistral_ocr/processor.py +0 -0
  67. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/pdf/__init__.py +0 -0
  68. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/pdf/__main__.py +0 -0
  69. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/decoding/pdf/pdf_decoder.py +0 -0
  70. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/direct/__init__.py +0 -0
  71. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/direct/cassandra_kg.py +0 -0
  72. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/direct/milvus_doc_embeddings.py +0 -0
  73. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/direct/milvus_graph_embeddings.py +0 -0
  74. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/__init__.py +0 -0
  75. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/document_embeddings/__init__.py +0 -0
  76. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/document_embeddings/__main__.py +0 -0
  77. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/document_embeddings/embeddings.py +0 -0
  78. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/fastembed/__init__.py +0 -0
  79. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/fastembed/__main__.py +0 -0
  80. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/fastembed/processor.py +0 -0
  81. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/graph_embeddings/__init__.py +0 -0
  82. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/graph_embeddings/__main__.py +0 -0
  83. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/graph_embeddings/embeddings.py +0 -0
  84. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/ollama/__init__.py +0 -0
  85. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/ollama/__main__.py +0 -0
  86. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/ollama/processor.py +0 -0
  87. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/row_embeddings/__init__.py +0 -0
  88. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/row_embeddings/__main__.py +0 -0
  89. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/embeddings/row_embeddings/embeddings.py +0 -0
  90. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/external/__init__.py +0 -0
  91. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/external/wikipedia/__init__.py +0 -0
  92. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/external/wikipedia/__main__.py +0 -0
  93. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/external/wikipedia/service.py +0 -0
  94. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/__init__.py +0 -0
  95. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/__init__.py +0 -0
  96. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/agent/__init__.py +0 -0
  97. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/agent/__main__.py +0 -0
  98. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/agent/extract.py +0 -0
  99. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/definitions/__init__.py +0 -0
  100. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/definitions/__main__.py +0 -0
  101. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/definitions/extract.py +0 -0
  102. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/__init__.py +0 -0
  103. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/entity_normalizer.py +0 -0
  104. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/extract.py +0 -0
  105. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/ontology_embedder.py +0 -0
  106. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/ontology_loader.py +0 -0
  107. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/ontology_selector.py +0 -0
  108. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/run.py +0 -0
  109. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/simplified_parser.py +0 -0
  110. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/text_processor.py +0 -0
  111. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/triple_converter.py +0 -0
  112. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/ontology/vector_store.py +0 -0
  113. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/relationships/__init__.py +0 -0
  114. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/relationships/__main__.py +0 -0
  115. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/relationships/extract.py +0 -0
  116. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/rows/__init__.py +0 -0
  117. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/rows/__main__.py +0 -0
  118. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/rows/processor.py +0 -0
  119. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/topics/__init__.py +0 -0
  120. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/topics/__main__.py +0 -0
  121. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/extract/kg/topics/extract.py +0 -0
  122. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/flow/__init__.py +0 -0
  123. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/flow/service/__init__.py +0 -0
  124. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/flow/service/__main__.py +0 -0
  125. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/flow/service/flow.py +0 -0
  126. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/flow/service/service.py +0 -0
  127. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/__init__.py +0 -0
  128. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/__main__.py +0 -0
  129. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/audit.py +0 -0
  130. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/auth.py +0 -0
  131. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/capabilities.py +0 -0
  132. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/config/receiver.py +0 -0
  133. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/agent.py +0 -0
  134. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/collection_management.py +0 -0
  135. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/config.py +0 -0
  136. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/core_export.py +0 -0
  137. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/core_import.py +0 -0
  138. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_embeddings_export.py +0 -0
  139. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_embeddings_import.py +0 -0
  140. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_embeddings_query.py +0 -0
  141. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_load.py +0 -0
  142. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_rag.py +0 -0
  143. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/document_stream.py +0 -0
  144. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/embeddings.py +0 -0
  145. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/entity_contexts_export.py +0 -0
  146. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/entity_contexts_import.py +0 -0
  147. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/flow.py +0 -0
  148. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/graph_embeddings_export.py +0 -0
  149. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/graph_embeddings_import.py +0 -0
  150. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/graph_embeddings_query.py +0 -0
  151. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/graph_rag.py +0 -0
  152. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/iam.py +0 -0
  153. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/knowledge.py +0 -0
  154. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/librarian.py +0 -0
  155. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/manager.py +0 -0
  156. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/mcp_tool.py +0 -0
  157. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/mux.py +0 -0
  158. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/nlp_query.py +0 -0
  159. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/prompt.py +0 -0
  160. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/requestor.py +0 -0
  161. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/reranker.py +0 -0
  162. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/row_embeddings_query.py +0 -0
  163. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/rows_import.py +0 -0
  164. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/rows_query.py +0 -0
  165. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/sender.py +0 -0
  166. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/serialize.py +0 -0
  167. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/sparql_query.py +0 -0
  168. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/streamer.py +0 -0
  169. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/structured_diag.py +0 -0
  170. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/structured_query.py +0 -0
  171. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/text_completion.py +0 -0
  172. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/text_load.py +0 -0
  173. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/triples_export.py +0 -0
  174. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/triples_import.py +0 -0
  175. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/dispatch/triples_query.py +0 -0
  176. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/auth_endpoints.py +0 -0
  177. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/constant_endpoint.py +0 -0
  178. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/i18n.py +0 -0
  179. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/iam_endpoint.py +0 -0
  180. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/manager.py +0 -0
  181. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/metrics.py +0 -0
  182. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/registry_endpoint.py +0 -0
  183. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/socket.py +0 -0
  184. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/stream_endpoint.py +0 -0
  185. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/endpoint/variable_endpoint.py +0 -0
  186. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/registry.py +0 -0
  187. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/running.py +0 -0
  188. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/service.py +0 -0
  189. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/unused/dbpedia.py +0 -0
  190. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/unused/encyclopedia.py +0 -0
  191. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/gateway/unused/internet_search.py +0 -0
  192. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/__init__.py +0 -0
  193. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/noauth/__init__.py +0 -0
  194. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/noauth/__main__.py +0 -0
  195. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/noauth/handler.py +0 -0
  196. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/noauth/service.py +0 -0
  197. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/service/__init__.py +0 -0
  198. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/service/__main__.py +0 -0
  199. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/service/iam.py +0 -0
  200. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/iam/service/service.py +0 -0
  201. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/__init__.py +0 -0
  202. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/__main__.py +0 -0
  203. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/blob_store.py +0 -0
  204. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/collection_manager.py +0 -0
  205. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/librarian.py +0 -0
  206. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/librarian/service.py +0 -0
  207. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/metering/__init__.py +0 -0
  208. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/metering/__main__.py +0 -0
  209. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/metering/counter.py +0 -0
  210. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/__init__.py +0 -0
  211. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/__init__.py +0 -0
  212. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure/__init__.py +0 -0
  213. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure/__main__.py +0 -0
  214. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure/llm.py +0 -0
  215. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure_openai/__init__.py +0 -0
  216. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure_openai/__main__.py +0 -0
  217. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/azure_openai/llm.py +0 -0
  218. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/claude/__init__.py +0 -0
  219. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/claude/__main__.py +0 -0
  220. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/claude/llm.py +0 -0
  221. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/cohere/__init__.py +0 -0
  222. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/cohere/__main__.py +0 -0
  223. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/cohere/llm.py +0 -0
  224. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/llamafile/__init__.py +0 -0
  225. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/llamafile/__main__.py +0 -0
  226. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/llamafile/llm.py +0 -0
  227. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/lmstudio/__init__.py +0 -0
  228. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/lmstudio/__main__.py +0 -0
  229. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/lmstudio/llm.py +0 -0
  230. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/mistral/__init__.py +0 -0
  231. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/mistral/__main__.py +0 -0
  232. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/mistral/llm.py +0 -0
  233. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/ollama/__init__.py +0 -0
  234. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/ollama/__main__.py +0 -0
  235. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/ollama/llm.py +0 -0
  236. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/openai/__init__.py +0 -0
  237. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/openai/__main__.py +0 -0
  238. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/openai/llm.py +0 -0
  239. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/openai/variants.py +0 -0
  240. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/tgi/__init__.py +0 -0
  241. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/tgi/__main__.py +0 -0
  242. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/tgi/llm.py +0 -0
  243. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/vllm/__init__.py +0 -0
  244. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/vllm/__main__.py +0 -0
  245. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/model/text_completion/vllm/llm.py +0 -0
  246. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/processing/__init__.py +0 -0
  247. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/processing/__main__.py +0 -0
  248. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/processing/processing.py +0 -0
  249. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/prompt/__init__.py +0 -0
  250. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/prompt/template/__init__.py +0 -0
  251. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/prompt/template/__main__.py +0 -0
  252. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/prompt/template/service.py +0 -0
  253. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/__init__.py +0 -0
  254. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/__init__.py +0 -0
  255. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/milvus/__init__.py +0 -0
  256. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/milvus/__main__.py +0 -0
  257. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/milvus/service.py +0 -0
  258. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/pinecone/__init__.py +0 -0
  259. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/pinecone/__main__.py +0 -0
  260. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/pinecone/service.py +0 -0
  261. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/qdrant/__init__.py +0 -0
  262. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/qdrant/__main__.py +0 -0
  263. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/doc_embeddings/qdrant/service.py +0 -0
  264. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/__init__.py +0 -0
  265. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/milvus/__init__.py +0 -0
  266. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/milvus/__main__.py +0 -0
  267. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/milvus/service.py +0 -0
  268. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/pinecone/__init__.py +0 -0
  269. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/pinecone/__main__.py +0 -0
  270. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/pinecone/service.py +0 -0
  271. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/qdrant/__init__.py +0 -0
  272. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/qdrant/__main__.py +0 -0
  273. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graph_embeddings/qdrant/service.py +0 -0
  274. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graphql/__init__.py +0 -0
  275. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graphql/filters.py +0 -0
  276. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graphql/schema.py +0 -0
  277. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/graphql/types.py +0 -0
  278. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/__init__.py +0 -0
  279. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/answer_generator.py +0 -0
  280. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/backend_router.py +0 -0
  281. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/cache.py +0 -0
  282. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/cypher_executor.py +0 -0
  283. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/cypher_generator.py +0 -0
  284. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/error_handling.py +0 -0
  285. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/monitoring.py +0 -0
  286. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/multi_language.py +0 -0
  287. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/ontology_matcher.py +0 -0
  288. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/query_explanation.py +0 -0
  289. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/query_optimizer.py +0 -0
  290. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/query_service.py +0 -0
  291. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/question_analyzer.py +0 -0
  292. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/sparql_cassandra.py +0 -0
  293. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/ontology/sparql_generator.py +0 -0
  294. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/row_embeddings/__init__.py +0 -0
  295. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/row_embeddings/qdrant/__init__.py +0 -0
  296. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/row_embeddings/qdrant/__main__.py +0 -0
  297. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/row_embeddings/qdrant/service.py +0 -0
  298. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/rows/__init__.py +0 -0
  299. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/rows/cassandra/__init__.py +0 -0
  300. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/rows/cassandra/__main__.py +0 -0
  301. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/rows/cassandra/service.py +0 -0
  302. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/__init__.py +0 -0
  303. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/__main__.py +0 -0
  304. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/algebra.py +0 -0
  305. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/expressions.py +0 -0
  306. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/parser.py +0 -0
  307. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/service.py +0 -0
  308. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/sparql/solutions.py +0 -0
  309. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/__init__.py +0 -0
  310. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/cassandra/__init__.py +0 -0
  311. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/cassandra/__main__.py +0 -0
  312. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/cassandra/service.py +0 -0
  313. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/falkordb/__init__.py +0 -0
  314. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/falkordb/__main__.py +0 -0
  315. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/falkordb/service.py +0 -0
  316. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/memgraph/__init__.py +0 -0
  317. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/memgraph/__main__.py +0 -0
  318. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/memgraph/service.py +0 -0
  319. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/neo4j/__init__.py +0 -0
  320. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/neo4j/__main__.py +0 -0
  321. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/query/triples/neo4j/service.py +0 -0
  322. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/reranker/__init__.py +0 -0
  323. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/reranker/flashrank/__init__.py +0 -0
  324. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/reranker/flashrank/__main__.py +0 -0
  325. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/reranker/flashrank/processor.py +0 -0
  326. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/__init__.py +0 -0
  327. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/document_rag/__init__.py +0 -0
  328. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/document_rag/__main__.py +0 -0
  329. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/document_rag/rerank.py +0 -0
  330. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/graph_rag/__init__.py +0 -0
  331. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/graph_rag/__main__.py +0 -0
  332. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/graph_rag/graph_rag.py +0 -0
  333. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/graph_rag/rag.py +0 -0
  334. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/nlp_query/__init__.py +0 -0
  335. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/nlp_query/__main__.py +0 -0
  336. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/nlp_query/service.py +0 -0
  337. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_diag/__init__.py +0 -0
  338. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_diag/service.py +0 -0
  339. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_diag/type_detector.py +0 -0
  340. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_query/__init__.py +0 -0
  341. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_query/__main__.py +0 -0
  342. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/retrieval/structured_query/service.py +0 -0
  343. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/rev_gateway/__init__.py +0 -0
  344. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/rev_gateway/__main__.py +0 -0
  345. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/rev_gateway/dispatcher.py +0 -0
  346. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/rev_gateway/service.py +0 -0
  347. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/__init__.py +0 -0
  348. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/__init__.py +0 -0
  349. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/milvus/__init__.py +0 -0
  350. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/milvus/__main__.py +0 -0
  351. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/milvus/write.py +0 -0
  352. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/pinecone/__init__.py +0 -0
  353. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/pinecone/__main__.py +0 -0
  354. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/pinecone/write.py +0 -0
  355. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/qdrant/__init__.py +0 -0
  356. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/qdrant/__main__.py +0 -0
  357. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/doc_embeddings/qdrant/write.py +0 -0
  358. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/__init__.py +0 -0
  359. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/milvus/__init__.py +0 -0
  360. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/milvus/__main__.py +0 -0
  361. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/milvus/write.py +0 -0
  362. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/pinecone/__init__.py +0 -0
  363. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/pinecone/__main__.py +0 -0
  364. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/pinecone/write.py +0 -0
  365. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/qdrant/__init__.py +0 -0
  366. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/qdrant/__main__.py +0 -0
  367. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/graph_embeddings/qdrant/write.py +0 -0
  368. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/knowledge/__init__.py +0 -0
  369. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/knowledge/__main__.py +0 -0
  370. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/knowledge/store.py +0 -0
  371. {trustgraph_flow-2.7.0/trustgraph/storage/rows → trustgraph_flow-2.7.1/trustgraph/storage/kw_index}/__init__.py +0 -0
  372. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/row_embeddings/__init__.py +0 -0
  373. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/row_embeddings/qdrant/__init__.py +0 -0
  374. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/row_embeddings/qdrant/__main__.py +0 -0
  375. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/row_embeddings/qdrant/write.py +0 -0
  376. {trustgraph_flow-2.7.0/trustgraph/storage/triples → trustgraph_flow-2.7.1/trustgraph/storage/rows}/__init__.py +0 -0
  377. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/rows/cassandra/__init__.py +0 -0
  378. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/rows/cassandra/__main__.py +0 -0
  379. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/rows/cassandra/write.py +0 -0
  380. {trustgraph_flow-2.7.0/trustgraph/tables → trustgraph_flow-2.7.1/trustgraph/storage/triples}/__init__.py +0 -0
  381. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/cassandra/__init__.py +0 -0
  382. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/cassandra/__main__.py +0 -0
  383. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/cassandra/write.py +0 -0
  384. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/falkordb/__init__.py +0 -0
  385. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/falkordb/__main__.py +0 -0
  386. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/falkordb/write.py +0 -0
  387. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/memgraph/__init__.py +0 -0
  388. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/memgraph/__main__.py +0 -0
  389. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/memgraph/write.py +0 -0
  390. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/neo4j/__init__.py +0 -0
  391. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/neo4j/__main__.py +0 -0
  392. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/storage/triples/neo4j/write.py +0 -0
  393. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tables/cassandra_async.py +0 -0
  394. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tables/config.py +0 -0
  395. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tables/iam.py +0 -0
  396. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tables/knowledge.py +0 -0
  397. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tables/library.py +0 -0
  398. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/template/__init__.py +0 -0
  399. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/template/prompt_manager.py +0 -0
  400. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tool_service/__init__.py +0 -0
  401. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tool_service/joke/__init__.py +0 -0
  402. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph/tool_service/joke/service.py +0 -0
  403. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/dependency_links.txt +0 -0
  404. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/requires.txt +0 -0
  405. {trustgraph_flow-2.7.0 → trustgraph_flow-2.7.1}/trustgraph_flow.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-flow
3
- Version: 2.7.0
3
+ Version: 2.7.1
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Author-email: "trustgraph.ai" <security@trustgraph.ai>
6
6
  Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
@@ -76,6 +76,7 @@ document-embeddings = "trustgraph.embeddings.document_embeddings:run"
76
76
  document-rag = "trustgraph.retrieval.document_rag:run"
77
77
  embeddings-fastembed = "trustgraph.embeddings.fastembed:run"
78
78
  embeddings-ollama = "trustgraph.embeddings.ollama:run"
79
+ kw-index-fts5 = "trustgraph.storage.kw_index.fts5:run"
79
80
  graph-embeddings-query-milvus = "trustgraph.query.graph_embeddings.milvus:run"
80
81
  graph-embeddings-query-pinecone = "trustgraph.query.graph_embeddings.pinecone:run"
81
82
  graph-embeddings-query-qdrant = "trustgraph.query.graph_embeddings.qdrant:run"
@@ -0,0 +1 @@
1
+ __version__ = "2.7.1"
@@ -31,8 +31,33 @@ logger = logging.getLogger(__name__)
31
31
  # This is only the fallback default: an explicit fetch_limit overrides it.
32
32
  OVERFETCH_FACTOR = 3
33
33
 
34
+ # Reciprocal Rank Fusion constant. The standard value from Cormack et al.
35
+ # (SIGIR 2009); higher values flatten the contribution of top ranks.
36
+ RRF_K = 60
37
+
34
38
  LABEL="http://www.w3.org/2000/01/rdf-schema#label"
35
39
 
40
+ def rrf_fuse(ranked_lists, weights, limit):
41
+ """Fuse ranked ChunkMatch lists by weighted Reciprocal Rank Fusion.
42
+
43
+ score(chunk) = sum over lists of weight / (RRF_K + rank), so fusion
44
+ needs only each list's ordering, never its native score scale — BM25
45
+ and cosine scores are incomparable. Returns the surviving matches
46
+ (first-seen object per chunk_id) in fused order, truncated to limit.
47
+ """
48
+ scores = {}
49
+ first_seen = {}
50
+ for matches, weight in zip(ranked_lists, weights):
51
+ for rank, match in enumerate(matches, start=1):
52
+ if not match.chunk_id:
53
+ continue
54
+ scores[match.chunk_id] = (
55
+ scores.get(match.chunk_id, 0.0) + weight / (RRF_K + rank)
56
+ )
57
+ first_seen.setdefault(match.chunk_id, match)
58
+ ordered = sorted(scores, key=lambda cid: -scores[cid])
59
+ return [first_seen[cid] for cid in ordered[:limit]]
60
+
36
61
  class Query:
37
62
 
38
63
  def __init__(
@@ -85,15 +110,8 @@ class Query:
85
110
 
86
111
  return qembeds
87
112
 
88
- async def get_docs(self, concepts):
89
- """
90
- Get documents (chunks) matching the extracted concepts.
91
-
92
- Returns:
93
- tuple: (docs, chunk_ids) where:
94
- - docs: list of document content strings
95
- - chunk_ids: list of chunk IDs that were successfully fetched
96
- """
113
+ async def get_vector_matches(self, concepts):
114
+ """Dense path: embed concepts, query the vector store, dedupe."""
97
115
  vectors = await self.get_vectors(concepts)
98
116
 
99
117
  if self.verbose:
@@ -123,6 +141,56 @@ class Query:
123
141
  seen.add(match.chunk_id)
124
142
  chunk_matches.append(match)
125
143
 
144
+ return chunk_matches
145
+
146
+ async def get_keyword_matches(self, query):
147
+ """Sparse path: BM25 search on the raw query text."""
148
+ if self.verbose:
149
+ logger.debug("Getting chunks from keyword index...")
150
+
151
+ return await self.rag.kw_index_client.query(
152
+ query=query, limit=self.fetch_limit,
153
+ collection=self.collection,
154
+ )
155
+
156
+ async def get_docs(self, concepts, query=""):
157
+ """
158
+ Get documents (chunks) matching the query, via the retrieval mode's
159
+ paths: dense (concept embeddings), sparse (BM25 over the raw query
160
+ text), or both fused by RRF. `query` is only consulted by the sparse
161
+ path; existing vector-mode callers may omit it.
162
+
163
+ Returns:
164
+ tuple: (docs, chunk_ids) where:
165
+ - docs: list of document content strings
166
+ - chunk_ids: list of chunk IDs that were successfully fetched
167
+ """
168
+ mode = self.rag.retrieval_mode
169
+
170
+ if mode == "keyword":
171
+ chunk_matches = await self.get_keyword_matches(query)
172
+ elif mode == "hybrid":
173
+ # The paths are independent; a keyword-index failure degrades
174
+ # to vector-only rather than failing the whole query.
175
+ async def keyword_or_empty():
176
+ try:
177
+ return await self.get_keyword_matches(query)
178
+ except Exception as e:
179
+ logger.warning(f"Keyword path failed, using vector only: {e}")
180
+ return []
181
+
182
+ vector_matches, keyword_matches = await asyncio.gather(
183
+ self.get_vector_matches(concepts),
184
+ keyword_or_empty(),
185
+ )
186
+ chunk_matches = rrf_fuse(
187
+ [vector_matches, keyword_matches],
188
+ [self.rag.vector_weight, self.rag.keyword_weight],
189
+ self.fetch_limit,
190
+ )
191
+ else:
192
+ chunk_matches = await self.get_vector_matches(concepts)
193
+
126
194
  if self.verbose:
127
195
  logger.debug(f"Got {len(chunk_matches)} chunks, fetching content from Garage...")
128
196
 
@@ -154,6 +222,10 @@ class DocumentRag:
154
222
  verbose=False,
155
223
  rerank_diversity_mode="none",
156
224
  rerank_diversity_lambda=0.7,
225
+ kw_index_client=None,
226
+ retrieval_mode="vector",
227
+ vector_weight=1.0,
228
+ keyword_weight=1.0,
157
229
  ):
158
230
 
159
231
  self.verbose = verbose
@@ -169,6 +241,19 @@ class DocumentRag:
169
241
  self.rerank_diversity_mode = rerank_diversity_mode
170
242
  self.rerank_diversity_lambda = rerank_diversity_lambda
171
243
 
244
+ # Optional sparse (BM25) retrieval path. "vector" keeps the current
245
+ # dense-only behaviour; "keyword"/"hybrid" need a keyword index
246
+ # client wired.
247
+ if retrieval_mode != "vector" and kw_index_client is None:
248
+ raise ValueError(
249
+ f"retrieval_mode={retrieval_mode!r} requires a keyword "
250
+ f"index client"
251
+ )
252
+ self.kw_index_client = kw_index_client
253
+ self.retrieval_mode = retrieval_mode
254
+ self.vector_weight = vector_weight
255
+ self.keyword_weight = keyword_weight
256
+
172
257
  if self.verbose:
173
258
  logger.debug("DocumentRag initialized")
174
259
 
@@ -249,8 +334,13 @@ class DocumentRag:
249
334
  fetch_limit=fetch_count, track_usage=track_usage,
250
335
  )
251
336
 
252
- # Extract concepts from query (grounding step)
253
- concepts = await q.extract_concepts(query)
337
+ # Extract concepts from query (grounding step). Concepts only feed
338
+ # the dense path's embeddings; in keyword-only mode the LLM call
339
+ # would be paid and discarded, so ground on the raw query instead.
340
+ if self.retrieval_mode == "keyword":
341
+ concepts = [query]
342
+ else:
343
+ concepts = await q.extract_concepts(query)
254
344
 
255
345
  # Emit grounding explainability after concept extraction
256
346
  if explain_callback:
@@ -266,7 +356,7 @@ class DocumentRag:
266
356
  )
267
357
  await explain_callback(gnd_triples, gnd_uri)
268
358
 
269
- docs, chunk_ids = await q.get_docs(concepts)
359
+ docs, chunk_ids = await q.get_docs(concepts, query)
270
360
 
271
361
  # Emit exploration explainability after chunks retrieved
272
362
  # (full candidate set, before any reranking)
@@ -14,6 +14,7 @@ from ... base import FlowProcessor, ConsumerSpec, ProducerSpec
14
14
  from ... base import PromptClientSpec, EmbeddingsClientSpec
15
15
  from ... base import DocumentEmbeddingsClientSpec
16
16
  from ... base import RerankerClientSpec
17
+ from ... base import KeywordIndexClientSpec
17
18
  from ... base import LibrarianSpec
18
19
 
19
20
  # Module logger
@@ -35,6 +36,9 @@ class Processor(FlowProcessor):
35
36
  fetch_limit = params.get("fetch_limit", 0)
36
37
  rerank_diversity_mode = params.get("rerank_diversity_mode", "none")
37
38
  rerank_diversity_lambda = params.get("rerank_diversity_lambda", 0.7)
39
+ retrieval_mode = params.get("retrieval_mode", "vector")
40
+ vector_weight = params.get("vector_weight", 1.0)
41
+ keyword_weight = params.get("keyword_weight", 1.0)
38
42
 
39
43
  super(Processor, self).__init__(
40
44
  **params | {
@@ -43,6 +47,9 @@ class Processor(FlowProcessor):
43
47
  "fetch_limit": fetch_limit,
44
48
  "rerank_diversity_mode": rerank_diversity_mode,
45
49
  "rerank_diversity_lambda": rerank_diversity_lambda,
50
+ "retrieval_mode": retrieval_mode,
51
+ "vector_weight": vector_weight,
52
+ "keyword_weight": keyword_weight,
46
53
  }
47
54
  )
48
55
 
@@ -50,6 +57,9 @@ class Processor(FlowProcessor):
50
57
  self.fetch_limit = fetch_limit
51
58
  self.rerank_diversity_mode = rerank_diversity_mode
52
59
  self.rerank_diversity_lambda = rerank_diversity_lambda
60
+ self.retrieval_mode = retrieval_mode
61
+ self.vector_weight = vector_weight
62
+ self.keyword_weight = keyword_weight
53
63
 
54
64
  self.register_specification(
55
65
  ConsumerSpec(
@@ -87,6 +97,19 @@ class Processor(FlowProcessor):
87
97
  )
88
98
  )
89
99
 
100
+ # Only registered when the sparse path is enabled: the spec binds
101
+ # keyword-index topics from the flow definition, so registering it
102
+ # unconditionally would break flow classes that don't declare them.
103
+ # With the default retrieval_mode=vector, existing deployments are
104
+ # untouched.
105
+ if retrieval_mode != "vector":
106
+ self.register_specification(
107
+ KeywordIndexClientSpec(
108
+ request_name = "keyword-index-request",
109
+ response_name = "keyword-index-response",
110
+ )
111
+ )
112
+
90
113
  self.register_specification(
91
114
  ProducerSpec(
92
115
  name = "response",
@@ -130,6 +153,13 @@ class Processor(FlowProcessor):
130
153
  verbose=True,
131
154
  rerank_diversity_mode=self.rerank_diversity_mode,
132
155
  rerank_diversity_lambda=self.rerank_diversity_lambda,
156
+ # None when the spec wasn't registered (vector mode) or its
157
+ # topics were absent from this flow's definition (optional
158
+ # spec skipped) — DocumentRag validates per-request.
159
+ kw_index_client = flow("keyword-index-request"),
160
+ retrieval_mode=self.retrieval_mode,
161
+ vector_weight=self.vector_weight,
162
+ keyword_weight=self.keyword_weight,
133
163
  )
134
164
 
135
165
  if v.doc_limit:
@@ -299,6 +329,30 @@ class Processor(FlowProcessor):
299
329
  help='MMR relevance/diversity tradeoff, higher values prefer relevance'
300
330
  )
301
331
 
332
+ parser.add_argument(
333
+ '--retrieval-mode',
334
+ choices=['vector', 'keyword', 'hybrid'],
335
+ default='vector',
336
+ help='Chunk retrieval strategy: dense vector search (default), '
337
+ 'BM25 keyword search, or both fused by reciprocal rank '
338
+ 'fusion. keyword/hybrid need keyword-index queues in the '
339
+ 'flow definition'
340
+ )
341
+
342
+ parser.add_argument(
343
+ '--vector-weight',
344
+ type=float,
345
+ default=1.0,
346
+ help='Vector path weight in hybrid rank fusion (default: 1.0)'
347
+ )
348
+
349
+ parser.add_argument(
350
+ '--keyword-weight',
351
+ type=float,
352
+ default=1.0,
353
+ help='Keyword path weight in hybrid rank fusion (default: 1.0)'
354
+ )
355
+
302
356
  def run():
303
357
 
304
358
  Processor.launch(default_ident, __doc__)
@@ -0,0 +1 @@
1
+ from . service import *
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env python3
2
+
3
+ from . service import run
4
+
5
+ if __name__ == '__main__':
6
+ run()
@@ -0,0 +1,180 @@
1
+
2
+ """
3
+ Keyword index over chunk text, backed by SQLite FTS5. Consumes Chunk
4
+ messages off the ingestion stream and answers BM25 keyword queries; both
5
+ sides live in one service because the index is a single local file. One
6
+ FTS5 table per (workspace, collection) keeps BM25 corpus statistics and
7
+ collection deletion scoped correctly.
8
+ """
9
+
10
+ import asyncio
11
+ import logging
12
+ import re
13
+ import sqlite3
14
+ from pathlib import Path
15
+
16
+ from .... base import KeywordIndexService, CollectionConfigHandler
17
+ from .... schema import ChunkMatch
18
+
19
+ # Module logger
20
+ logger = logging.getLogger(__name__)
21
+
22
+ default_ident = "kw-index"
23
+ default_index_path = "/data/kw-index.db"
24
+
25
+ # FTS5 table names embed workspace/collection; quoting handles the rest, but
26
+ # strip anything outside the character set other stores allow in names so a
27
+ # hostile name can't smuggle quote characters.
28
+ _NAME_SAFE = re.compile(r"[^A-Za-z0-9_-]")
29
+
30
+ def _table(workspace, collection):
31
+ ws = _NAME_SAFE.sub("_", workspace)
32
+ coll = _NAME_SAFE.sub("_", collection)
33
+ return f"kw_{ws}_{coll}"
34
+
35
+ def to_match_query(text):
36
+ """User text -> FTS5 MATCH expression.
37
+
38
+ Raw text is not valid FTS5 syntax ("7.3.2" is a syntax error, the "-" in
39
+ "AURA-7" is column-filter syntax), so each whitespace token is quoted as
40
+ a phrase and the phrases are OR-ed: BM25 scores accumulate over matching
41
+ terms, and a quoted phrase of sub-tokens ("7.3.2" -> [7 3 2]) still
42
+ matches the exact dotted term without also matching "7.3.1".
43
+ """
44
+ tokens = [t for t in text.split() if t.strip('"')]
45
+ if not tokens:
46
+ return None
47
+ return " OR ".join('"' + t.replace('"', '""') + '"' for t in tokens)
48
+
49
+ class Processor(CollectionConfigHandler, KeywordIndexService):
50
+
51
+ def __init__(self, **params):
52
+
53
+ index_path = params.get("index_path", default_index_path)
54
+
55
+ super(Processor, self).__init__(
56
+ **params | {
57
+ "index_path": index_path,
58
+ }
59
+ )
60
+
61
+ Path(index_path).parent.mkdir(parents=True, exist_ok=True)
62
+
63
+ # Writes are serialized on one connection by the lock; reads get
64
+ # their own connection so a query never queues behind the chunk
65
+ # ingestion backlog. WAL lets the reader proceed while a write
66
+ # commits, and NORMAL sync is safe with WAL (an index is
67
+ # re-derivable from the chunk store anyway). All sqlite work runs
68
+ # in a thread so the event loop is never blocked.
69
+ self.db = sqlite3.connect(index_path, check_same_thread=False)
70
+ self.db.execute("PRAGMA journal_mode=WAL")
71
+ self.db.execute("PRAGMA synchronous=NORMAL")
72
+ self.read_db = sqlite3.connect(index_path, check_same_thread=False)
73
+ self._lock = asyncio.Lock()
74
+
75
+ # Register for config push notifications
76
+ self.register_config_handler(self.on_collection_config, types=["collection"])
77
+
78
+ logger.info(f"Keyword index at {index_path}")
79
+
80
+ def _index(self, table, chunk_id, body):
81
+ self.db.execute(
82
+ f'CREATE VIRTUAL TABLE IF NOT EXISTS "{table}" '
83
+ f'USING fts5(chunk_id UNINDEXED, body)'
84
+ )
85
+ # Re-ingesting a chunk replaces its previous row rather than
86
+ # accumulating duplicates.
87
+ self.db.execute(
88
+ f'DELETE FROM "{table}" WHERE chunk_id = ?', (chunk_id,)
89
+ )
90
+ self.db.execute(
91
+ f'INSERT INTO "{table}" (chunk_id, body) VALUES (?, ?)',
92
+ (chunk_id, body),
93
+ )
94
+ self.db.commit()
95
+
96
+ def _query(self, table, match, limit):
97
+ try:
98
+ rows = self.read_db.execute(
99
+ f'SELECT chunk_id, bm25("{table}") FROM "{table}" '
100
+ f'WHERE "{table}" MATCH ? ORDER BY bm25("{table}") LIMIT ?',
101
+ (match, limit),
102
+ ).fetchall()
103
+ except sqlite3.OperationalError as e:
104
+ if "no such table" in str(e):
105
+ # Nothing indexed for this collection yet
106
+ return []
107
+ raise
108
+ # bm25() is lower-is-better (negative); negate so ChunkMatch.score
109
+ # is higher-is-better like the vector path.
110
+ return [ChunkMatch(chunk_id=r[0], score=-r[1]) for r in rows]
111
+
112
+ async def index_chunk(self, workspace, message):
113
+
114
+ if not self.collection_exists(workspace, message.metadata.collection):
115
+ logger.warning(
116
+ f"Collection {message.metadata.collection} for workspace {workspace} "
117
+ f"does not exist in config (likely deleted while data was in-flight). "
118
+ f"Dropping message."
119
+ )
120
+ return
121
+
122
+ chunk_id = message.document_id
123
+ if not chunk_id:
124
+ return
125
+
126
+ body = message.chunk.decode("utf-8", errors="replace")
127
+ if not body.strip():
128
+ return
129
+
130
+ table = _table(workspace, message.metadata.collection)
131
+
132
+ async with self._lock:
133
+ await asyncio.to_thread(self._index, table, chunk_id, body)
134
+
135
+ async def query_keyword_index(self, workspace, request):
136
+
137
+ match = to_match_query(request.query)
138
+ if match is None:
139
+ return []
140
+
141
+ limit = request.limit if request.limit > 0 else 20
142
+ table = _table(workspace, request.collection)
143
+
144
+ # No lock: reads run on their own connection and WAL keeps them
145
+ # consistent alongside the writer.
146
+ return await asyncio.to_thread(self._query, table, match, limit)
147
+
148
+ async def create_collection(self, workspace: str, collection: str, metadata: dict):
149
+ """FTS5 tables are created lazily on first indexed chunk."""
150
+ logger.info(
151
+ f"Collection create request for {workspace}/{collection} - "
152
+ f"table created lazily on first write"
153
+ )
154
+
155
+ async def delete_collection(self, workspace: str, collection: str):
156
+ """Drop the FTS5 table for this collection via config push."""
157
+ table = _table(workspace, collection)
158
+
159
+ def drop():
160
+ self.db.execute(f'DROP TABLE IF EXISTS "{table}"')
161
+ self.db.commit()
162
+
163
+ async with self._lock:
164
+ await asyncio.to_thread(drop)
165
+ logger.info(f"Deleted keyword index table: {table}")
166
+
167
+ @staticmethod
168
+ def add_args(parser):
169
+
170
+ KeywordIndexService.add_args(parser)
171
+
172
+ parser.add_argument(
173
+ '--index-path',
174
+ default=default_index_path,
175
+ help=f'SQLite FTS5 index file (default: {default_index_path})'
176
+ )
177
+
178
+ def run():
179
+
180
+ Processor.launch(default_ident, __doc__)
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-flow
3
- Version: 2.7.0
3
+ Version: 2.7.1
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Author-email: "trustgraph.ai" <security@trustgraph.ai>
6
6
  Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
@@ -358,6 +358,10 @@ trustgraph/storage/graph_embeddings/qdrant/write.py
358
358
  trustgraph/storage/knowledge/__init__.py
359
359
  trustgraph/storage/knowledge/__main__.py
360
360
  trustgraph/storage/knowledge/store.py
361
+ trustgraph/storage/kw_index/__init__.py
362
+ trustgraph/storage/kw_index/fts5/__init__.py
363
+ trustgraph/storage/kw_index/fts5/__main__.py
364
+ trustgraph/storage/kw_index/fts5/service.py
361
365
  trustgraph/storage/row_embeddings/__init__.py
362
366
  trustgraph/storage/row_embeddings/qdrant/__init__.py
363
367
  trustgraph/storage/row_embeddings/qdrant/__main__.py
@@ -35,6 +35,7 @@ kg-extract-rows = trustgraph.extract.kg.rows:run
35
35
  kg-extract-topics = trustgraph.extract.kg.topics:run
36
36
  kg-manager = trustgraph.cores:run
37
37
  kg-store = trustgraph.storage.knowledge:run
38
+ kw-index-fts5 = trustgraph.storage.kw_index.fts5:run
38
39
  librarian = trustgraph.librarian:run
39
40
  mcp-tool = trustgraph.agent.mcp_tool:run
40
41
  metering = trustgraph.metering:run
@@ -1 +0,0 @@
1
- __version__ = "2.7.0"