trustgraph-base 2.2.22__tar.gz → 2.2.24__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 (164) hide show
  1. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/PKG-INFO +1 -1
  2. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/backend.py +7 -3
  3. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/consumer.py +2 -5
  4. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_rag_client.py +2 -2
  5. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/librarian_client.py +0 -1
  6. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/pulsar_backend.py +14 -9
  7. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/rabbitmq_backend.py +11 -18
  8. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/subscriber.py +0 -1
  9. trustgraph_base-2.2.24/trustgraph/base_version.py +1 -0
  10. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/base.py +0 -1
  11. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/document_rag_client.py +2 -2
  12. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/graph_rag_client.py +2 -2
  13. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/triples.py +10 -3
  14. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/topic.py +6 -6
  15. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/config.py +1 -1
  16. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/PKG-INFO +1 -1
  17. trustgraph_base-2.2.22/trustgraph/base_version.py +0 -1
  18. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/README.md +0 -0
  19. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/pyproject.toml +0 -0
  20. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/setup.cfg +0 -0
  21. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/__init__.py +0 -0
  22. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/api.py +0 -0
  23. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_bulk_client.py +0 -0
  24. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_flow.py +0 -0
  25. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_metrics.py +0 -0
  26. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/async_socket_client.py +0 -0
  27. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/bulk_client.py +0 -0
  28. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/collection.py +0 -0
  29. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/config.py +0 -0
  30. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/exceptions.py +0 -0
  31. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/explainability.py +0 -0
  32. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/flow.py +0 -0
  33. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/knowledge.py +0 -0
  34. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/library.py +0 -0
  35. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/metrics.py +0 -0
  36. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/socket_client.py +0 -0
  37. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/api/types.py +0 -0
  38. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/__init__.py +0 -0
  39. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/agent_client.py +0 -0
  40. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/agent_service.py +0 -0
  41. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/async_processor.py +0 -0
  42. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/cassandra_config.py +0 -0
  43. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/chunking_service.py +0 -0
  44. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/collection_config_handler.py +0 -0
  45. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/consumer_spec.py +0 -0
  46. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_client.py +0 -0
  47. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_query_service.py +0 -0
  48. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/document_embeddings_store_service.py +0 -0
  49. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/dynamic_tool_service.py +0 -0
  50. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/embeddings_client.py +0 -0
  51. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/embeddings_service.py +0 -0
  52. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/flow.py +0 -0
  53. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/flow_processor.py +0 -0
  54. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_client.py +0 -0
  55. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_query_service.py +0 -0
  56. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/graph_embeddings_store_service.py +0 -0
  57. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/llm_service.py +0 -0
  58. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/logging.py +0 -0
  59. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/metrics.py +0 -0
  60. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/parameter_spec.py +0 -0
  61. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/producer.py +0 -0
  62. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/producer_spec.py +0 -0
  63. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/prompt_client.py +0 -0
  64. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/publisher.py +0 -0
  65. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/pubsub.py +0 -0
  66. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/request_response_spec.py +0 -0
  67. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/row_embeddings_query_client.py +0 -0
  68. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/serialization.py +0 -0
  69. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/spec.py +0 -0
  70. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/structured_query_client.py +0 -0
  71. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/subscriber_spec.py +0 -0
  72. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/text_completion_client.py +0 -0
  73. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_client.py +0 -0
  74. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_service.py +0 -0
  75. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/tool_service_client.py +0 -0
  76. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_client.py +0 -0
  77. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_query_service.py +0 -0
  78. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/base/triples_store_service.py +0 -0
  79. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/__init__.py +0 -0
  80. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/agent_client.py +0 -0
  81. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/config_client.py +0 -0
  82. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/document_embeddings_client.py +0 -0
  83. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/embeddings_client.py +0 -0
  84. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/graph_embeddings_client.py +0 -0
  85. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/llm_client.py +0 -0
  86. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/prompt_client.py +0 -0
  87. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/row_embeddings_client.py +0 -0
  88. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/clients/triples_query_client.py +0 -0
  89. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/exceptions.py +0 -0
  90. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/__init__.py +0 -0
  91. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/defs.py +0 -0
  92. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/document.py +0 -0
  93. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/identifier.py +0 -0
  94. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/organization.py +0 -0
  95. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/knowledge/publication.py +0 -0
  96. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/log_level.py +0 -0
  97. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/__init__.py +0 -0
  98. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/registry.py +0 -0
  99. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/__init__.py +0 -0
  100. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/agent.py +0 -0
  101. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/base.py +0 -0
  102. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/collection.py +0 -0
  103. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/config.py +0 -0
  104. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/diagnosis.py +0 -0
  105. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/document_loading.py +0 -0
  106. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/embeddings.py +0 -0
  107. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/embeddings_query.py +0 -0
  108. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/flow.py +0 -0
  109. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/knowledge.py +0 -0
  110. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/library.py +0 -0
  111. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/metadata.py +0 -0
  112. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/nlp_query.py +0 -0
  113. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/primitives.py +0 -0
  114. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/prompt.py +0 -0
  115. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/retrieval.py +0 -0
  116. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/rows_query.py +0 -0
  117. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/sparql_query.py +0 -0
  118. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/structured_query.py +0 -0
  119. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/text_completion.py +0 -0
  120. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/tool.py +0 -0
  121. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/messaging/translators/triples.py +0 -0
  122. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/__init__.py +0 -0
  123. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/field.py +0 -0
  124. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/objects/object.py +0 -0
  125. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/__init__.py +0 -0
  126. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/agent.py +0 -0
  127. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/namespaces.py +0 -0
  128. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/uris.py +0 -0
  129. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/provenance/vocabulary.py +0 -0
  130. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/rdf.py +0 -0
  131. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/__init__.py +0 -0
  132. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/__init__.py +0 -0
  133. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/metadata.py +0 -0
  134. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/core/primitives.py +0 -0
  135. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/__init__.py +0 -0
  136. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/document.py +0 -0
  137. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/embeddings.py +0 -0
  138. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/graph.py +0 -0
  139. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/knowledge.py +0 -0
  140. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/nlp.py +0 -0
  141. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/object.py +0 -0
  142. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/rows.py +0 -0
  143. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/knowledge/structured.py +0 -0
  144. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/__init__.py +0 -0
  145. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/agent.py +0 -0
  146. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/collection.py +0 -0
  147. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/diagnosis.py +0 -0
  148. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/flow.py +0 -0
  149. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/library.py +0 -0
  150. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/llm.py +0 -0
  151. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/lookup.py +0 -0
  152. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/nlp_query.py +0 -0
  153. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/prompt.py +0 -0
  154. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/query.py +0 -0
  155. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/retrieval.py +0 -0
  156. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/rows_query.py +0 -0
  157. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/sparql_query.py +0 -0
  158. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/storage.py +0 -0
  159. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/structured_query.py +0 -0
  160. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph/schema/services/tool_service.py +0 -0
  161. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/SOURCES.txt +0 -0
  162. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/dependency_links.txt +0 -0
  163. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/requires.txt +0 -0
  164. {trustgraph_base-2.2.22 → trustgraph_base-2.2.24}/trustgraph_base.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-base
3
- Version: 2.2.22
3
+ Version: 2.2.24
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
@@ -124,18 +124,22 @@ class PubSubBackend(Protocol):
124
124
  subscription: str,
125
125
  schema: type,
126
126
  initial_position: str = 'latest',
127
- consumer_type: str = 'shared',
128
127
  **options
129
128
  ) -> BackendConsumer:
130
129
  """
131
130
  Create a consumer for a topic.
132
131
 
132
+ Consumer behaviour is determined by the topic's class prefix:
133
+ - flow: shared competing consumers, durable named queue
134
+ - request: shared competing consumers, non-durable named queue
135
+ - response: exclusive per-subscriber, anonymous auto-delete queue
136
+ - notify: exclusive per-subscriber, anonymous auto-delete queue
137
+
133
138
  Args:
134
- topic: Generic topic format (qos/tenant/namespace/queue)
139
+ topic: Queue identifier in class:topicspace:topic format
135
140
  subscription: Subscription/consumer group name
136
141
  schema: Dataclass type for messages
137
142
  initial_position: 'earliest' or 'latest' (some backends may ignore)
138
- consumer_type: 'shared', 'exclusive', 'failover' (some backends may ignore)
139
143
  **options: Backend-specific options
140
144
 
141
145
  Returns:
@@ -33,19 +33,17 @@ class Consumer:
33
33
  rate_limit_retry_time = 10, rate_limit_timeout = 7200,
34
34
  reconnect_time = 5,
35
35
  concurrency = 1, # Number of concurrent requests to handle
36
- consumer_type = 'shared',
36
+ **kwargs,
37
37
  ):
38
38
 
39
39
  self.taskgroup = taskgroup
40
40
  self.flow = flow
41
- self.backend = backend # Changed from 'client' to 'backend'
41
+ self.backend = backend
42
42
  self.topic = topic
43
43
  self.subscriber = subscriber
44
44
  self.schema = schema
45
45
  self.handler = handler
46
46
 
47
- self.consumer_type = consumer_type
48
-
49
47
  self.rate_limit_retry_time = rate_limit_retry_time
50
48
  self.rate_limit_timeout = rate_limit_timeout
51
49
 
@@ -129,7 +127,6 @@ class Consumer:
129
127
  subscription = self.subscriber,
130
128
  schema = self.schema,
131
129
  initial_position = initial_pos,
132
- consumer_type = self.consumer_type,
133
130
  ),
134
131
  )
135
132
  consumers.append(c)
@@ -15,7 +15,7 @@ class GraphRagClient(RequestResponse):
15
15
  user: User identifier
16
16
  collection: Collection identifier
17
17
  chunk_callback: Optional async callback(text, end_of_stream) for text chunks
18
- explain_callback: Optional async callback(explain_id, explain_graph) for explain notifications
18
+ explain_callback: Optional async callback(explain_id, explain_graph, explain_triples) for explain notifications
19
19
  timeout: Request timeout in seconds
20
20
 
21
21
  Returns:
@@ -30,7 +30,7 @@ class GraphRagClient(RequestResponse):
30
30
  # Handle explain notifications
31
31
  if resp.message_type == 'explain':
32
32
  if explain_callback and resp.explain_id:
33
- await explain_callback(resp.explain_id, resp.explain_graph)
33
+ await explain_callback(resp.explain_id, resp.explain_graph, resp.explain_triples)
34
34
  return False # Continue receiving
35
35
 
36
36
  # Handle text chunks
@@ -64,7 +64,6 @@ class LibrarianClient:
64
64
  schema=LibrarianResponse,
65
65
  handler=self._on_response,
66
66
  metrics=librarian_response_metrics,
67
- consumer_type='exclusive',
68
67
  )
69
68
 
70
69
  # Single-response requests: request_id -> asyncio.Future
@@ -159,14 +159,16 @@ class PulsarBackend:
159
159
  cls, topicspace, topic = parts
160
160
 
161
161
  # Map class to Pulsar persistence and namespace
162
- if cls in ('flow', 'state'):
162
+ if cls == 'flow':
163
163
  persistence = 'persistent'
164
164
  elif cls in ('request', 'response'):
165
165
  persistence = 'non-persistent'
166
+ elif cls == 'notify':
167
+ persistence = 'non-persistent'
166
168
  else:
167
169
  raise ValueError(
168
170
  f"Invalid queue class: {cls}, "
169
- f"expected flow, request, response, or state"
171
+ f"expected flow, request, response, or notify"
170
172
  )
171
173
 
172
174
  return f"{persistence}://{topicspace}/{cls}/{topic}"
@@ -205,18 +207,20 @@ class PulsarBackend:
205
207
  subscription: str,
206
208
  schema: type,
207
209
  initial_position: str = 'latest',
208
- consumer_type: str = 'shared',
209
210
  **options
210
211
  ) -> BackendConsumer:
211
212
  """
212
213
  Create a Pulsar consumer.
213
214
 
215
+ Consumer type is derived from the topic's class prefix:
216
+ - flow/request: Shared (competing consumers)
217
+ - response/notify: Exclusive (per-subscriber)
218
+
214
219
  Args:
215
- topic: Generic topic format (qos/tenant/namespace/queue)
220
+ topic: Queue identifier in class:topicspace:topic format
216
221
  subscription: Subscription name
217
222
  schema: Dataclass type for messages
218
223
  initial_position: 'earliest' or 'latest'
219
- consumer_type: 'shared', 'exclusive', or 'failover'
220
224
  **options: Backend-specific options
221
225
 
222
226
  Returns:
@@ -224,17 +228,18 @@ class PulsarBackend:
224
228
  """
225
229
  pulsar_topic = self.map_topic(topic)
226
230
 
231
+ # Extract class from topic for consumer type mapping
232
+ cls = topic.split(':', 1)[0] if ':' in topic else 'flow'
233
+
227
234
  # Map initial position
228
235
  if initial_position == 'earliest':
229
236
  pos = pulsar.InitialPosition.Earliest
230
237
  else:
231
238
  pos = pulsar.InitialPosition.Latest
232
239
 
233
- # Map consumer type
234
- if consumer_type == 'exclusive':
240
+ # Map consumer type from class
241
+ if cls in ('response', 'notify'):
235
242
  ctype = pulsar.ConsumerType.Exclusive
236
- elif consumer_type == 'failover':
237
- ctype = pulsar.ConsumerType.Failover
238
243
  else:
239
244
  ctype = pulsar.ConsumerType.Shared
240
245
 
@@ -311,14 +311,14 @@ class RabbitMQBackend:
311
311
 
312
312
  cls, topicspace, topic = parts
313
313
 
314
- if cls in ('flow', 'state'):
314
+ if cls == 'flow':
315
315
  durable = True
316
- elif cls in ('request', 'response'):
316
+ elif cls in ('request', 'response', 'notify'):
317
317
  durable = False
318
318
  else:
319
319
  raise ValueError(
320
320
  f"Invalid queue class: {cls}, "
321
- f"expected flow, request, response, or state"
321
+ f"expected flow, request, response, or notify"
322
322
  )
323
323
 
324
324
  # Exchange per topicspace, routing key includes class
@@ -345,26 +345,19 @@ class RabbitMQBackend:
345
345
 
346
346
  def create_consumer(self, topic: str, subscription: str, schema: type,
347
347
  initial_position: str = 'latest',
348
- consumer_type: str = 'shared',
349
348
  **options) -> BackendConsumer:
350
349
  """Create a consumer with a queue bound to the topic exchange.
351
350
 
352
- consumer_type='shared': Named durable queue. Multiple consumers
353
- with the same subscription compete (round-robin).
354
- consumer_type='exclusive': Anonymous ephemeral queue. Each
355
- consumer gets its own copy of every message (broadcast).
351
+ Behaviour is determined by the topic's class prefix:
352
+ - flow: named durable queue, competing consumers (round-robin)
353
+ - request: named non-durable queue, competing consumers
354
+ - response: anonymous ephemeral queue, per-subscriber (auto-delete)
355
+ - notify: anonymous ephemeral queue, per-subscriber (auto-delete)
356
356
  """
357
357
  exchange, routing_key, cls, durable = self._parse_queue_id(topic)
358
358
 
359
- if consumer_type == 'exclusive' and cls == 'state':
360
- # State broadcast: named durable queue per subscriber.
361
- # Retains messages so late-starting processors see current state.
362
- queue_name = f"{exchange}.{routing_key}.{subscription}"
363
- queue_durable = True
364
- exclusive = False
365
- auto_delete = False
366
- elif consumer_type == 'exclusive':
367
- # Broadcast: anonymous queue, auto-deleted on disconnect
359
+ if cls in ('response', 'notify'):
360
+ # Per-subscriber: anonymous queue, auto-deleted on disconnect
368
361
  queue_name = ''
369
362
  queue_durable = False
370
363
  exclusive = True
@@ -379,7 +372,7 @@ class RabbitMQBackend:
379
372
  logger.debug(
380
373
  f"Creating consumer: exchange={exchange}, "
381
374
  f"routing_key={routing_key}, queue={queue_name or '(anonymous)'}, "
382
- f"type={consumer_type}"
375
+ f"cls={cls}"
383
376
  )
384
377
 
385
378
  return RabbitMQBackendConsumer(
@@ -84,7 +84,6 @@ class Subscriber:
84
84
  topic=self.topic,
85
85
  subscription=self.subscription,
86
86
  schema=self.schema,
87
- consumer_type='exclusive',
88
87
  ),
89
88
  )
90
89
 
@@ -0,0 +1 @@
1
+ __version__ = "2.2.24"
@@ -42,7 +42,6 @@ class BaseClient:
42
42
  topic=output_queue,
43
43
  subscription=subscriber,
44
44
  schema=output_schema,
45
- consumer_type='shared',
46
45
  )
47
46
 
48
47
  self.input_schema = input_schema
@@ -43,7 +43,7 @@ class DocumentRagClient(BaseClient):
43
43
  user: User identifier
44
44
  collection: Collection identifier
45
45
  chunk_callback: Optional callback(text, end_of_stream) for text chunks
46
- explain_callback: Optional callback(explain_id, explain_graph) for explain notifications
46
+ explain_callback: Optional callback(explain_id, explain_graph, explain_triples) for explain notifications
47
47
  timeout: Request timeout in seconds
48
48
 
49
49
  Returns:
@@ -55,7 +55,7 @@ class DocumentRagClient(BaseClient):
55
55
  # Handle explain notifications (response is None/empty, explain_id present)
56
56
  if x.explain_id and not x.response:
57
57
  if explain_callback:
58
- explain_callback(x.explain_id, x.explain_graph)
58
+ explain_callback(x.explain_id, x.explain_graph, x.explain_triples)
59
59
  return False # Continue receiving
60
60
 
61
61
  # Handle text chunks
@@ -47,7 +47,7 @@ class GraphRagClient(BaseClient):
47
47
  user: User identifier
48
48
  collection: Collection identifier
49
49
  chunk_callback: Optional callback(text, end_of_stream) for text chunks
50
- explain_callback: Optional callback(explain_id, explain_graph) for explain notifications
50
+ explain_callback: Optional callback(explain_id, explain_graph, explain_triples) for explain notifications
51
51
  timeout: Request timeout in seconds
52
52
 
53
53
  Returns:
@@ -59,7 +59,7 @@ class GraphRagClient(BaseClient):
59
59
  # Handle explain notifications
60
60
  if x.message_type == 'explain':
61
61
  if explain_callback and x.explain_id:
62
- explain_callback(x.explain_id, x.explain_graph)
62
+ explain_callback(x.explain_id, x.explain_graph, x.explain_triples)
63
63
  return False # Continue receiving
64
64
 
65
65
  # Handle text chunks
@@ -465,11 +465,18 @@ def exploration_triples(
465
465
  return triples
466
466
 
467
467
 
468
- def _quoted_triple(s: str, p: str, o: str) -> Term:
469
- """Create a quoted triple term (RDF-star) from string values."""
468
+ def _quoted_triple(s, p, o) -> Term:
469
+ """Create a quoted triple term (RDF-star).
470
+
471
+ Accepts either Term objects (preserving original types) or plain
472
+ strings (treated as IRIs for backward compatibility).
473
+ """
474
+ s_term = s if isinstance(s, Term) else _iri(s)
475
+ p_term = p if isinstance(p, Term) else _iri(p)
476
+ o_term = o if isinstance(o, Term) else _iri(o)
470
477
  return Term(
471
478
  type=TRIPLE,
472
- triple=Triple(s=_iri(s), p=_iri(p), o=_iri(o))
479
+ triple=Triple(s=s_term, p=p_term, o=o_term)
473
480
  )
474
481
 
475
482
 
@@ -6,10 +6,10 @@ def queue(topic, cls='flow', topicspace='tg'):
6
6
  Args:
7
7
  topic: The logical queue name (e.g. 'config', 'librarian')
8
8
  cls: Queue class determining operational characteristics:
9
- - 'flow' = persistent processing pipeline queue
10
- - 'request' = non-persistent, short TTL request queue
11
- - 'response' = non-persistent, short TTL response queue
12
- - 'state' = persistent, last-value state broadcast
9
+ - 'flow' = persistent shared work queue (competing consumers)
10
+ - 'request' = non-persistent RPC request queue (shared)
11
+ - 'response' = non-persistent RPC response queue (per-subscriber)
12
+ - 'notify' = ephemeral broadcast (per-subscriber, auto-delete)
13
13
  topicspace: Deployment isolation prefix (default: 'tg')
14
14
 
15
15
  Returns:
@@ -20,7 +20,7 @@ def queue(topic, cls='flow', topicspace='tg'):
20
20
  # flow:tg:text-completion-request
21
21
  queue('config', cls='request')
22
22
  # request:tg:config
23
- queue('config', cls='state')
24
- # state:tg:config
23
+ queue('config', cls='notify')
24
+ # notify:tg:config
25
25
  """
26
26
  return f"{cls}:{topicspace}:{topic}"
@@ -62,7 +62,7 @@ class ConfigPush:
62
62
 
63
63
  config_request_queue = queue('config', cls='request')
64
64
  config_response_queue = queue('config', cls='response')
65
- config_push_queue = queue('config', cls='flow')
65
+ config_push_queue = queue('config', cls='notify')
66
66
 
67
67
  ############################################################################
68
68
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: trustgraph-base
3
- Version: 2.2.22
3
+ Version: 2.2.24
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
@@ -1 +0,0 @@
1
- __version__ = "2.2.22"