trustgraph-base 2.4.4__tar.gz → 2.4.6__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 (183) hide show
  1. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/PKG-INFO +1 -1
  2. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/async_socket_client.py +51 -5
  3. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/socket_client.py +48 -5
  4. trustgraph_base-2.4.6/trustgraph/base/iam_client.py +321 -0
  5. trustgraph_base-2.4.6/trustgraph/base_version.py +1 -0
  6. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/__init__.py +9 -2
  7. trustgraph_base-2.4.6/trustgraph/messaging/translators/iam.py +194 -0
  8. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/__init__.py +1 -0
  9. trustgraph_base-2.4.6/trustgraph/schema/services/iam.py +169 -0
  10. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph_base.egg-info/PKG-INFO +1 -1
  11. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph_base.egg-info/SOURCES.txt +3 -0
  12. trustgraph_base-2.4.4/trustgraph/base_version.py +0 -1
  13. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/README.md +0 -0
  14. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/pyproject.toml +0 -0
  15. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/setup.cfg +0 -0
  16. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/__init__.py +0 -0
  17. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/api.py +0 -0
  18. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/async_bulk_client.py +0 -0
  19. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/async_flow.py +0 -0
  20. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/async_metrics.py +0 -0
  21. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/bulk_client.py +0 -0
  22. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/collection.py +0 -0
  23. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/config.py +0 -0
  24. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/exceptions.py +0 -0
  25. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/explainability.py +0 -0
  26. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/flow.py +0 -0
  27. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/knowledge.py +0 -0
  28. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/library.py +0 -0
  29. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/metrics.py +0 -0
  30. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/api/types.py +0 -0
  31. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/__init__.py +0 -0
  32. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/agent_client.py +0 -0
  33. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/agent_service.py +0 -0
  34. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/async_processor.py +0 -0
  35. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/backend.py +0 -0
  36. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/cassandra_config.py +0 -0
  37. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/chunking_service.py +0 -0
  38. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/collection_config_handler.py +0 -0
  39. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/config_client.py +0 -0
  40. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/consumer.py +0 -0
  41. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/consumer_spec.py +0 -0
  42. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/document_embeddings_client.py +0 -0
  43. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/document_embeddings_query_service.py +0 -0
  44. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/document_embeddings_store_service.py +0 -0
  45. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/dynamic_tool_service.py +0 -0
  46. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/embeddings_client.py +0 -0
  47. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/embeddings_service.py +0 -0
  48. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/flow.py +0 -0
  49. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/flow_processor.py +0 -0
  50. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/graph_embeddings_client.py +0 -0
  51. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/graph_embeddings_query_service.py +0 -0
  52. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/graph_embeddings_store_service.py +0 -0
  53. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/graph_rag_client.py +0 -0
  54. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/kafka_backend.py +0 -0
  55. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/librarian_client.py +0 -0
  56. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/llm_service.py +0 -0
  57. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/logging.py +0 -0
  58. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/metrics.py +0 -0
  59. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/parameter_spec.py +0 -0
  60. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/processor_group.py +0 -0
  61. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/producer.py +0 -0
  62. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/producer_spec.py +0 -0
  63. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/prompt_client.py +0 -0
  64. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/publisher.py +0 -0
  65. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/pubsub.py +0 -0
  66. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/pulsar_backend.py +0 -0
  67. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/rabbitmq_backend.py +0 -0
  68. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/request_response_spec.py +0 -0
  69. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/row_embeddings_query_client.py +0 -0
  70. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/serialization.py +0 -0
  71. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/spec.py +0 -0
  72. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/structured_query_client.py +0 -0
  73. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/subscriber.py +0 -0
  74. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/subscriber_spec.py +0 -0
  75. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/text_completion_client.py +0 -0
  76. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/tool_client.py +0 -0
  77. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/tool_service.py +0 -0
  78. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/tool_service_client.py +0 -0
  79. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/triples_client.py +0 -0
  80. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/triples_query_service.py +0 -0
  81. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/base/triples_store_service.py +0 -0
  82. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/__init__.py +0 -0
  83. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/agent_client.py +0 -0
  84. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/base.py +0 -0
  85. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/config_client.py +0 -0
  86. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/document_embeddings_client.py +0 -0
  87. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/document_rag_client.py +0 -0
  88. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/embeddings_client.py +0 -0
  89. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/graph_embeddings_client.py +0 -0
  90. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/graph_rag_client.py +0 -0
  91. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/llm_client.py +0 -0
  92. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/prompt_client.py +0 -0
  93. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/row_embeddings_client.py +0 -0
  94. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/clients/triples_query_client.py +0 -0
  95. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/exceptions.py +0 -0
  96. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/__init__.py +0 -0
  97. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/__init__.py +0 -0
  98. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/ar.json +0 -0
  99. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/en.json +0 -0
  100. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/es.json +0 -0
  101. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/he.json +0 -0
  102. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/hi.json +0 -0
  103. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/pt.json +0 -0
  104. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/ru.json +0 -0
  105. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/sw.json +0 -0
  106. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/tr.json +0 -0
  107. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/i18n/packs/zh-cn.json +0 -0
  108. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/__init__.py +0 -0
  109. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/defs.py +0 -0
  110. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/document.py +0 -0
  111. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/identifier.py +0 -0
  112. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/organization.py +0 -0
  113. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/knowledge/publication.py +0 -0
  114. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/log_level.py +0 -0
  115. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/registry.py +0 -0
  116. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/__init__.py +0 -0
  117. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/agent.py +0 -0
  118. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/base.py +0 -0
  119. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/collection.py +0 -0
  120. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/config.py +0 -0
  121. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/diagnosis.py +0 -0
  122. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/document_loading.py +0 -0
  123. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/embeddings.py +0 -0
  124. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/embeddings_query.py +0 -0
  125. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/flow.py +0 -0
  126. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/knowledge.py +0 -0
  127. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/library.py +0 -0
  128. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/metadata.py +0 -0
  129. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/nlp_query.py +0 -0
  130. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/primitives.py +0 -0
  131. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/prompt.py +0 -0
  132. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/retrieval.py +0 -0
  133. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/rows_query.py +0 -0
  134. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/sparql_query.py +0 -0
  135. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/structured_query.py +0 -0
  136. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/text_completion.py +0 -0
  137. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/tool.py +0 -0
  138. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/messaging/translators/triples.py +0 -0
  139. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/objects/__init__.py +0 -0
  140. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/objects/field.py +0 -0
  141. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/objects/object.py +0 -0
  142. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/__init__.py +0 -0
  143. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/agent.py +0 -0
  144. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/namespaces.py +0 -0
  145. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/triples.py +0 -0
  146. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/uris.py +0 -0
  147. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/provenance/vocabulary.py +0 -0
  148. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/rdf.py +0 -0
  149. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/__init__.py +0 -0
  150. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/core/__init__.py +0 -0
  151. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/core/metadata.py +0 -0
  152. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/core/primitives.py +0 -0
  153. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/core/topic.py +0 -0
  154. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/__init__.py +0 -0
  155. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/document.py +0 -0
  156. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/embeddings.py +0 -0
  157. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/graph.py +0 -0
  158. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/knowledge.py +0 -0
  159. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/nlp.py +0 -0
  160. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/object.py +0 -0
  161. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/rows.py +0 -0
  162. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/knowledge/structured.py +0 -0
  163. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/agent.py +0 -0
  164. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/collection.py +0 -0
  165. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/config.py +0 -0
  166. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/diagnosis.py +0 -0
  167. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/flow.py +0 -0
  168. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/library.py +0 -0
  169. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/llm.py +0 -0
  170. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/lookup.py +0 -0
  171. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/nlp_query.py +0 -0
  172. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/prompt.py +0 -0
  173. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/query.py +0 -0
  174. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/retrieval.py +0 -0
  175. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/rows_query.py +0 -0
  176. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/sparql_query.py +0 -0
  177. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/storage.py +0 -0
  178. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/structured_query.py +0 -0
  179. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph/schema/services/tool_service.py +0 -0
  180. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph_base.egg-info/dependency_links.txt +0 -0
  181. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph_base.egg-info/entry_points.txt +0 -0
  182. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/trustgraph_base.egg-info/requires.txt +0 -0
  183. {trustgraph_base-2.4.4 → trustgraph_base-2.4.6}/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.4.4
3
+ Version: 2.4.6
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
@@ -49,21 +49,67 @@ class AsyncSocketClient:
49
49
  return f"ws://{url}"
50
50
 
51
51
  def _build_ws_url(self):
52
- ws_url = f"{self.url.rstrip('/')}/api/v1/socket"
53
- if self.token:
54
- ws_url = f"{ws_url}?token={self.token}"
55
- return ws_url
52
+ # /api/v1/socket uses the first-frame auth protocol — the
53
+ # token is sent as the first frame after connecting rather
54
+ # than in the URL. This avoids browser issues with 401 on
55
+ # the WebSocket handshake and lets long-lived sockets
56
+ # refresh credentials mid-session.
57
+ return f"{self.url.rstrip('/')}/api/v1/socket"
56
58
 
57
59
  async def connect(self):
58
- """Establish the persistent websocket connection."""
60
+ """Establish the persistent websocket connection and run the
61
+ first-frame auth handshake."""
59
62
  if self._connected:
60
63
  return
61
64
 
65
+ if not self.token:
66
+ raise ProtocolException(
67
+ "AsyncSocketClient requires a token for first-frame "
68
+ "auth against /api/v1/socket"
69
+ )
70
+
62
71
  ws_url = self._build_ws_url()
63
72
  self._connect_cm = websockets.connect(
64
73
  ws_url, ping_interval=20, ping_timeout=self.timeout
65
74
  )
66
75
  self._socket = await self._connect_cm.__aenter__()
76
+
77
+ # First-frame auth: send {"type":"auth","token":"..."} and
78
+ # wait for auth-ok / auth-failed. Run before starting the
79
+ # reader task so the response isn't consumed by the reader's
80
+ # id-based routing.
81
+ await self._socket.send(json.dumps({
82
+ "type": "auth", "token": self.token,
83
+ }))
84
+ try:
85
+ raw = await asyncio.wait_for(
86
+ self._socket.recv(), timeout=self.timeout,
87
+ )
88
+ except asyncio.TimeoutError:
89
+ await self._socket.close()
90
+ raise ProtocolException("Timeout waiting for auth response")
91
+
92
+ try:
93
+ resp = json.loads(raw)
94
+ except Exception:
95
+ await self._socket.close()
96
+ raise ProtocolException(
97
+ f"Unexpected non-JSON auth response: {raw!r}"
98
+ )
99
+
100
+ if resp.get("type") == "auth-ok":
101
+ self.workspace = resp.get("workspace", self.workspace)
102
+ elif resp.get("type") == "auth-failed":
103
+ await self._socket.close()
104
+ raise ProtocolException(
105
+ f"auth failure: {resp.get('error', 'unknown')}"
106
+ )
107
+ else:
108
+ await self._socket.close()
109
+ raise ProtocolException(
110
+ f"Unexpected auth response: {resp!r}"
111
+ )
112
+
67
113
  self._connected = True
68
114
  self._reader_task = asyncio.create_task(self._reader())
69
115
 
@@ -112,10 +112,10 @@ class SocketClient:
112
112
  return f"ws://{url}"
113
113
 
114
114
  def _build_ws_url(self):
115
- ws_url = f"{self.url.rstrip('/')}/api/v1/socket"
116
- if self.token:
117
- ws_url = f"{ws_url}?token={self.token}"
118
- return ws_url
115
+ # /api/v1/socket uses the first-frame auth protocol — the
116
+ # token is sent as the first frame after connecting rather
117
+ # than in the URL.
118
+ return f"{self.url.rstrip('/')}/api/v1/socket"
119
119
 
120
120
  def _get_loop(self):
121
121
  """Get or create the event loop, reusing across calls."""
@@ -132,15 +132,58 @@ class SocketClient:
132
132
  return self._loop
133
133
 
134
134
  async def _ensure_connected(self):
135
- """Lazily establish the persistent websocket connection."""
135
+ """Lazily establish the persistent websocket connection and
136
+ run the first-frame auth handshake."""
136
137
  if self._connected:
137
138
  return
138
139
 
140
+ if not self.token:
141
+ raise ProtocolException(
142
+ "SocketClient requires a token for first-frame auth "
143
+ "against /api/v1/socket"
144
+ )
145
+
139
146
  ws_url = self._build_ws_url()
140
147
  self._connect_cm = websockets.connect(
141
148
  ws_url, ping_interval=20, ping_timeout=self.timeout
142
149
  )
143
150
  self._socket = await self._connect_cm.__aenter__()
151
+
152
+ # First-frame auth — run before starting the reader so the
153
+ # auth-ok / auth-failed response isn't consumed by the reader
154
+ # loop's id-based routing.
155
+ await self._socket.send(json.dumps({
156
+ "type": "auth", "token": self.token,
157
+ }))
158
+ try:
159
+ raw = await asyncio.wait_for(
160
+ self._socket.recv(), timeout=self.timeout,
161
+ )
162
+ except asyncio.TimeoutError:
163
+ await self._socket.close()
164
+ raise ProtocolException("Timeout waiting for auth response")
165
+
166
+ try:
167
+ resp = json.loads(raw)
168
+ except Exception:
169
+ await self._socket.close()
170
+ raise ProtocolException(
171
+ f"Unexpected non-JSON auth response: {raw!r}"
172
+ )
173
+
174
+ if resp.get("type") == "auth-ok":
175
+ self.workspace = resp.get("workspace", self.workspace)
176
+ elif resp.get("type") == "auth-failed":
177
+ await self._socket.close()
178
+ raise ProtocolException(
179
+ f"auth failure: {resp.get('error', 'unknown')}"
180
+ )
181
+ else:
182
+ await self._socket.close()
183
+ raise ProtocolException(
184
+ f"Unexpected auth response: {resp!r}"
185
+ )
186
+
144
187
  self._connected = True
145
188
  self._reader_task = asyncio.create_task(self._reader())
146
189
 
@@ -0,0 +1,321 @@
1
+
2
+ import json
3
+
4
+ from . request_response_spec import RequestResponse, RequestResponseSpec
5
+ from .. schema import (
6
+ IamRequest, IamResponse,
7
+ UserInput, WorkspaceInput, ApiKeyInput,
8
+ )
9
+
10
+ IAM_TIMEOUT = 10
11
+
12
+
13
+ class IamClient(RequestResponse):
14
+ """Client for the IAM service request/response pub/sub protocol.
15
+
16
+ Mirrors ``ConfigClient``: a thin wrapper around ``RequestResponse``
17
+ that knows the IAM request / response schemas. Only the subset of
18
+ operations actually implemented by the server today has helper
19
+ methods here; callers that need an unimplemented operation can
20
+ build ``IamRequest`` and call ``request()`` directly.
21
+ """
22
+
23
+ async def _request(self, timeout=IAM_TIMEOUT, **kwargs):
24
+ resp = await self.request(
25
+ IamRequest(**kwargs),
26
+ timeout=timeout,
27
+ )
28
+ if resp.error:
29
+ raise RuntimeError(
30
+ f"{resp.error.type}: {resp.error.message}"
31
+ )
32
+ return resp
33
+
34
+ async def bootstrap(self, timeout=IAM_TIMEOUT):
35
+ """Initial-run IAM self-seed. Returns a tuple of
36
+ ``(admin_user_id, admin_api_key_plaintext)``. Both are empty
37
+ strings on repeat calls — the operation is a no-op once the
38
+ IAM tables are populated."""
39
+ resp = await self._request(
40
+ operation="bootstrap", timeout=timeout,
41
+ )
42
+ return resp.bootstrap_admin_user_id, resp.bootstrap_admin_api_key
43
+
44
+ async def resolve_api_key(self, api_key, timeout=IAM_TIMEOUT):
45
+ """Resolve a plaintext API key to its identity triple.
46
+
47
+ Returns ``(user_id, workspace, roles)`` or raises
48
+ ``RuntimeError`` with error type ``auth-failed`` if the key is
49
+ unknown / expired / revoked.
50
+
51
+ Note: the ``roles`` value is a regime-internal hint and is
52
+ not used by the gateway directly under the IAM contract;
53
+ all authorisation decisions go through ``authorise()``.
54
+ Returned here only for backward compatibility with callers
55
+ that haven't migrated."""
56
+ resp = await self._request(
57
+ operation="resolve-api-key",
58
+ api_key=api_key,
59
+ timeout=timeout,
60
+ )
61
+ return (
62
+ resp.resolved_user_id,
63
+ resp.resolved_workspace,
64
+ list(resp.resolved_roles),
65
+ )
66
+
67
+ async def authorise(self, identity_handle, capability,
68
+ resource, parameters, timeout=IAM_TIMEOUT):
69
+ """Ask the IAM regime whether ``identity_handle`` may perform
70
+ ``capability`` on ``resource`` given ``parameters``.
71
+
72
+ Implements the contract ``authorise(identity, capability,
73
+ resource, parameters) → (decision, ttl)``. Returns a tuple
74
+ ``(allow: bool, ttl_seconds: int)``. The TTL is the
75
+ regime's suggested cache lifetime for this decision; the
76
+ gateway honours it (clamped above by gateway-side policy)."""
77
+ resp = await self._request(
78
+ operation="authorise",
79
+ user_id=identity_handle,
80
+ capability=capability,
81
+ resource_json=json.dumps(resource or {}, sort_keys=True),
82
+ parameters_json=json.dumps(parameters or {}, sort_keys=True),
83
+ timeout=timeout,
84
+ )
85
+ return resp.decision_allow, resp.decision_ttl_seconds
86
+
87
+ async def authorise_many(self, identity_handle, checks,
88
+ timeout=IAM_TIMEOUT):
89
+ """Bulk authorise. ``checks`` is a list of dicts each
90
+ carrying ``capability``, ``resource``, and ``parameters``.
91
+ Returns a list of ``(allow, ttl)`` tuples in the same order."""
92
+ resp = await self._request(
93
+ operation="authorise-many",
94
+ user_id=identity_handle,
95
+ authorise_checks=json.dumps(list(checks), sort_keys=True),
96
+ timeout=timeout,
97
+ )
98
+ decisions = json.loads(resp.decisions_json or "[]")
99
+ return [(d.get("allow", False), d.get("ttl", 0)) for d in decisions]
100
+
101
+ async def create_user(self, workspace, user, actor="",
102
+ timeout=IAM_TIMEOUT):
103
+ """Create a user. ``user`` is a ``UserInput``."""
104
+ resp = await self._request(
105
+ operation="create-user",
106
+ workspace=workspace,
107
+ actor=actor,
108
+ user=user,
109
+ timeout=timeout,
110
+ )
111
+ return resp.user
112
+
113
+ async def list_users(self, workspace, actor="", timeout=IAM_TIMEOUT):
114
+ resp = await self._request(
115
+ operation="list-users",
116
+ workspace=workspace,
117
+ actor=actor,
118
+ timeout=timeout,
119
+ )
120
+ return list(resp.users)
121
+
122
+ async def create_api_key(self, workspace, key, actor="",
123
+ timeout=IAM_TIMEOUT):
124
+ """Create an API key. ``key`` is an ``ApiKeyInput``. Returns
125
+ ``(plaintext, record)`` — plaintext is returned once and the
126
+ caller is responsible for surfacing it to the operator."""
127
+ resp = await self._request(
128
+ operation="create-api-key",
129
+ workspace=workspace,
130
+ actor=actor,
131
+ key=key,
132
+ timeout=timeout,
133
+ )
134
+ return resp.api_key_plaintext, resp.api_key
135
+
136
+ async def list_api_keys(self, workspace, user_id, actor="",
137
+ timeout=IAM_TIMEOUT):
138
+ resp = await self._request(
139
+ operation="list-api-keys",
140
+ workspace=workspace,
141
+ actor=actor,
142
+ user_id=user_id,
143
+ timeout=timeout,
144
+ )
145
+ return list(resp.api_keys)
146
+
147
+ async def revoke_api_key(self, workspace, key_id, actor="",
148
+ timeout=IAM_TIMEOUT):
149
+ await self._request(
150
+ operation="revoke-api-key",
151
+ workspace=workspace,
152
+ actor=actor,
153
+ key_id=key_id,
154
+ timeout=timeout,
155
+ )
156
+
157
+ async def login(self, username, password, workspace="",
158
+ timeout=IAM_TIMEOUT):
159
+ """Validate credentials and return ``(jwt, expires_iso)``.
160
+ ``workspace`` is optional; defaults at the server to the
161
+ OSS default workspace."""
162
+ resp = await self._request(
163
+ operation="login",
164
+ workspace=workspace,
165
+ username=username,
166
+ password=password,
167
+ timeout=timeout,
168
+ )
169
+ return resp.jwt, resp.jwt_expires
170
+
171
+ async def get_signing_key_public(self, timeout=IAM_TIMEOUT):
172
+ """Return the active JWT signing public key in PEM. The
173
+ gateway calls this at startup and caches the result."""
174
+ resp = await self._request(
175
+ operation="get-signing-key-public",
176
+ timeout=timeout,
177
+ )
178
+ return resp.signing_key_public
179
+
180
+ async def change_password(self, user_id, current_password,
181
+ new_password, timeout=IAM_TIMEOUT):
182
+ await self._request(
183
+ operation="change-password",
184
+ user_id=user_id,
185
+ password=current_password,
186
+ new_password=new_password,
187
+ timeout=timeout,
188
+ )
189
+
190
+ async def reset_password(self, workspace, user_id, actor="",
191
+ timeout=IAM_TIMEOUT):
192
+ """Admin-driven password reset. Returns the plaintext
193
+ temporary password (returned once)."""
194
+ resp = await self._request(
195
+ operation="reset-password",
196
+ workspace=workspace,
197
+ actor=actor,
198
+ user_id=user_id,
199
+ timeout=timeout,
200
+ )
201
+ return resp.temporary_password
202
+
203
+ async def get_user(self, workspace, user_id, actor="",
204
+ timeout=IAM_TIMEOUT):
205
+ resp = await self._request(
206
+ operation="get-user",
207
+ workspace=workspace,
208
+ actor=actor,
209
+ user_id=user_id,
210
+ timeout=timeout,
211
+ )
212
+ return resp.user
213
+
214
+ async def update_user(self, workspace, user_id, user, actor="",
215
+ timeout=IAM_TIMEOUT):
216
+ resp = await self._request(
217
+ operation="update-user",
218
+ workspace=workspace,
219
+ actor=actor,
220
+ user_id=user_id,
221
+ user=user,
222
+ timeout=timeout,
223
+ )
224
+ return resp.user
225
+
226
+ async def disable_user(self, workspace, user_id, actor="",
227
+ timeout=IAM_TIMEOUT):
228
+ await self._request(
229
+ operation="disable-user",
230
+ workspace=workspace,
231
+ actor=actor,
232
+ user_id=user_id,
233
+ timeout=timeout,
234
+ )
235
+
236
+ async def enable_user(self, workspace, user_id, actor="",
237
+ timeout=IAM_TIMEOUT):
238
+ await self._request(
239
+ operation="enable-user",
240
+ workspace=workspace,
241
+ actor=actor,
242
+ user_id=user_id,
243
+ timeout=timeout,
244
+ )
245
+
246
+ async def delete_user(self, workspace, user_id, actor="",
247
+ timeout=IAM_TIMEOUT):
248
+ await self._request(
249
+ operation="delete-user",
250
+ workspace=workspace,
251
+ actor=actor,
252
+ user_id=user_id,
253
+ timeout=timeout,
254
+ )
255
+
256
+ async def create_workspace(self, workspace_record, actor="",
257
+ timeout=IAM_TIMEOUT):
258
+ resp = await self._request(
259
+ operation="create-workspace",
260
+ actor=actor,
261
+ workspace_record=workspace_record,
262
+ timeout=timeout,
263
+ )
264
+ return resp.workspace
265
+
266
+ async def list_workspaces(self, actor="", timeout=IAM_TIMEOUT):
267
+ resp = await self._request(
268
+ operation="list-workspaces",
269
+ actor=actor,
270
+ timeout=timeout,
271
+ )
272
+ return list(resp.workspaces)
273
+
274
+ async def get_workspace(self, workspace_id, actor="",
275
+ timeout=IAM_TIMEOUT):
276
+ from ..schema import WorkspaceInput
277
+ resp = await self._request(
278
+ operation="get-workspace",
279
+ actor=actor,
280
+ workspace_record=WorkspaceInput(id=workspace_id),
281
+ timeout=timeout,
282
+ )
283
+ return resp.workspace
284
+
285
+ async def update_workspace(self, workspace_record, actor="",
286
+ timeout=IAM_TIMEOUT):
287
+ resp = await self._request(
288
+ operation="update-workspace",
289
+ actor=actor,
290
+ workspace_record=workspace_record,
291
+ timeout=timeout,
292
+ )
293
+ return resp.workspace
294
+
295
+ async def disable_workspace(self, workspace_id, actor="",
296
+ timeout=IAM_TIMEOUT):
297
+ from ..schema import WorkspaceInput
298
+ await self._request(
299
+ operation="disable-workspace",
300
+ actor=actor,
301
+ workspace_record=WorkspaceInput(id=workspace_id),
302
+ timeout=timeout,
303
+ )
304
+
305
+ async def rotate_signing_key(self, actor="", timeout=IAM_TIMEOUT):
306
+ await self._request(
307
+ operation="rotate-signing-key",
308
+ actor=actor,
309
+ timeout=timeout,
310
+ )
311
+
312
+
313
+ class IamClientSpec(RequestResponseSpec):
314
+ def __init__(self, request_name, response_name):
315
+ super().__init__(
316
+ request_name=request_name,
317
+ request_schema=IamRequest,
318
+ response_name=response_name,
319
+ response_schema=IamResponse,
320
+ impl=IamClient,
321
+ )
@@ -0,0 +1 @@
1
+ __version__ = "2.4.6"
@@ -15,6 +15,7 @@ from .translators.library import LibraryRequestTranslator, LibraryResponseTransl
15
15
  from .translators.document_loading import DocumentTranslator, TextDocumentTranslator
16
16
  from .translators.config import ConfigRequestTranslator, ConfigResponseTranslator
17
17
  from .translators.flow import FlowRequestTranslator, FlowResponseTranslator
18
+ from .translators.iam import IamRequestTranslator, IamResponseTranslator
18
19
  from .translators.prompt import PromptRequestTranslator, PromptResponseTranslator
19
20
  from .translators.tool import ToolRequestTranslator, ToolResponseTranslator
20
21
  from .translators.embeddings_query import (
@@ -85,11 +86,17 @@ TranslatorRegistry.register_service(
85
86
  )
86
87
 
87
88
  TranslatorRegistry.register_service(
88
- "flow",
89
- FlowRequestTranslator(),
89
+ "flow",
90
+ FlowRequestTranslator(),
90
91
  FlowResponseTranslator()
91
92
  )
92
93
 
94
+ TranslatorRegistry.register_service(
95
+ "iam",
96
+ IamRequestTranslator(),
97
+ IamResponseTranslator()
98
+ )
99
+
93
100
  TranslatorRegistry.register_service(
94
101
  "prompt",
95
102
  PromptRequestTranslator(),