rusty-haystack 0.7.1__tar.gz → 0.7.2__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 (182) hide show
  1. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/Cargo.lock +17 -5
  2. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/Cargo.toml +1 -1
  3. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/PKG-INFO +1 -1
  4. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/Cargo.toml +1 -1
  5. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/Cargo.toml +3 -2
  6. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/app.rs +46 -4
  7. rusty_haystack-0.7.2/haystack-server/src/his_provider.rs +24 -0
  8. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/his_store.rs +24 -0
  9. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/lib.rs +2 -0
  10. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/data.rs +1 -1
  11. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/his.rs +5 -4
  12. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/system.rs +1 -1
  13. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/state.rs +3 -3
  14. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/tests/federation_integration.rs +2 -2
  15. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/Cargo.toml +3 -3
  16. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/README.md +0 -0
  17. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/auth.rs +0 -0
  18. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/client.rs +0 -0
  19. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/error.rs +0 -0
  20. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/lib.rs +0 -0
  21. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/tls.rs +0 -0
  22. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/transport/http.rs +0 -0
  23. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/transport/mod.rs +0 -0
  24. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-client/src/transport/ws.rs +0 -0
  25. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/Cargo.toml +0 -0
  26. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/benches/benchmarks.rs +0 -0
  27. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/defs.trio +0 -0
  28. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/tz_map.txt +0 -0
  29. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/units.txt +0 -0
  30. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.attrs.xeto +0 -0
  31. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.equips.xeto +0 -0
  32. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.examples.xeto +0 -0
  33. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.points.elec.xeto +0 -0
  34. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.points.xeto +0 -0
  35. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.protocols.xeto +0 -0
  36. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/ph.xeto +0 -0
  37. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.api.xeto +0 -0
  38. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.comp.xeto +0 -0
  39. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.files.xeto +0 -0
  40. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.template.xeto +0 -0
  41. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/data/xeto/sys.xeto +0 -0
  42. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/auth.rs +0 -0
  43. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/arrow_ipc.rs +0 -0
  44. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/csv.rs +0 -0
  45. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/de.rs +0 -0
  46. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/error.rs +0 -0
  47. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/mod.rs +0 -0
  48. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/ser.rs +0 -0
  49. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/hbf/varint.rs +0 -0
  50. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/mod.rs +0 -0
  51. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/v3.rs +0 -0
  52. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/json/v4.rs +0 -0
  53. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/mod.rs +0 -0
  54. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/rdf.rs +0 -0
  55. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/shared.rs +0 -0
  56. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/encoder.rs +0 -0
  57. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/mod.rs +0 -0
  58. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/trio/parser.rs +0 -0
  59. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/encoder.rs +0 -0
  60. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/mod.rs +0 -0
  61. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/codecs/zinc/parser.rs +0 -0
  62. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/data/dict.rs +0 -0
  63. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/data/grid.rs +0 -0
  64. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/data/list.rs +0 -0
  65. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/data/mod.rs +0 -0
  66. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/expr/ast.rs +0 -0
  67. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/expr/eval.rs +0 -0
  68. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/expr/mod.rs +0 -0
  69. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/expr/parser.rs +0 -0
  70. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/filter/ast.rs +0 -0
  71. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/filter/eval.rs +0 -0
  72. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/filter/mod.rs +0 -0
  73. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/filter/parser.rs +0 -0
  74. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/adjacency.rs +0 -0
  75. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/bitmap.rs +0 -0
  76. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/changelog.rs +0 -0
  77. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/columnar.rs +0 -0
  78. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/csr.rs +0 -0
  79. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/entity_graph.rs +0 -0
  80. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/mod.rs +0 -0
  81. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/query_planner.rs +0 -0
  82. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/shared.rs +0 -0
  83. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/snapshot.rs +0 -0
  84. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/structural.rs +0 -0
  85. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/subscriber.rs +0 -0
  86. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/graph/value_index.rs +0 -0
  87. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/coord.rs +0 -0
  88. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/datetime.rs +0 -0
  89. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/kind.rs +0 -0
  90. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/mod.rs +0 -0
  91. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/number.rs +0 -0
  92. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/ref_.rs +0 -0
  93. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/singletons.rs +0 -0
  94. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/symbol.rs +0 -0
  95. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/tz.rs +0 -0
  96. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/units.rs +0 -0
  97. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/uri.rs +0 -0
  98. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/kinds/xstr.rs +0 -0
  99. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/lib.rs +0 -0
  100. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/conjunct.rs +0 -0
  101. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/def.rs +0 -0
  102. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/graph_validation.rs +0 -0
  103. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/lib.rs +0 -0
  104. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/mod.rs +0 -0
  105. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/namespace.rs +0 -0
  106. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/taxonomy.rs +0 -0
  107. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/trio_loader.rs +0 -0
  108. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/ontology/validation.rs +0 -0
  109. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/serde_impls.rs +0 -0
  110. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/ast.rs +0 -0
  111. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/bundled.rs +0 -0
  112. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/export.rs +0 -0
  113. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/fitting.rs +0 -0
  114. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/lexer.rs +0 -0
  115. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/loader.rs +0 -0
  116. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/mod.rs +0 -0
  117. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/parser.rs +0 -0
  118. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/resolver.rs +0 -0
  119. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/src/xeto/spec.rs +0 -0
  120. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/tests/e2e.rs +0 -0
  121. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/tests/graph_integration.rs +0 -0
  122. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-core/tests/ontology_integration.rs +0 -0
  123. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/benches/benchmarks.rs +0 -0
  124. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/benches/federation.rs +0 -0
  125. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/actions.rs +0 -0
  126. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/auth/mod.rs +0 -0
  127. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/auth/users.rs +0 -0
  128. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/connector.rs +0 -0
  129. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/content.rs +0 -0
  130. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/demo.rs +0 -0
  131. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/domain_scope.rs +0 -0
  132. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/error.rs +0 -0
  133. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/federation.rs +0 -0
  134. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/about.rs +0 -0
  135. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/changes.rs +0 -0
  136. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/defs.rs +0 -0
  137. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/federation.rs +0 -0
  138. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/formats.rs +0 -0
  139. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/graph.rs +0 -0
  140. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/invoke.rs +0 -0
  141. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/libs.rs +0 -0
  142. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/mod.rs +0 -0
  143. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/nav.rs +0 -0
  144. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/ops_handler.rs +0 -0
  145. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/point_write.rs +0 -0
  146. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/rdf.rs +0 -0
  147. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/read.rs +0 -0
  148. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ops/watch.rs +0 -0
  149. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/session/affinity.rs +0 -0
  150. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/session/mod.rs +0 -0
  151. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/session/peek.rs +0 -0
  152. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/session/profile.rs +0 -0
  153. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/session/working_set.rs +0 -0
  154. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/haystack-server/src/ws.rs +0 -0
  155. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/pyproject.toml +0 -0
  156. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/README.md +0 -0
  157. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/rusty_haystack.pyi +0 -0
  158. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/auth.rs +0 -0
  159. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/client.rs +0 -0
  160. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/codecs.rs +0 -0
  161. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/convert.rs +0 -0
  162. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/data.rs +0 -0
  163. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/exceptions.rs +0 -0
  164. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/expr.rs +0 -0
  165. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/filter.rs +0 -0
  166. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/graph.rs +0 -0
  167. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/kinds.rs +0 -0
  168. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/lib.rs +0 -0
  169. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/ontology.rs +0 -0
  170. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/server.rs +0 -0
  171. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/src/units.rs +0 -0
  172. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/__init__.py +0 -0
  173. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/conftest.py +0 -0
  174. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_auth.py +0 -0
  175. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_codecs.py +0 -0
  176. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_data.py +0 -0
  177. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_exceptions.py +0 -0
  178. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_filter.py +0 -0
  179. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_graph.py +0 -0
  180. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_kinds.py +0 -0
  181. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_ontology.py +0 -0
  182. {rusty_haystack-0.7.1 → rusty_haystack-0.7.2}/rusty-haystack/tests/test_server.py +0 -0
@@ -533,6 +533,17 @@ dependencies = [
533
533
  "regex-syntax",
534
534
  ]
535
535
 
536
+ [[package]]
537
+ name = "async-trait"
538
+ version = "0.1.89"
539
+ source = "registry+https://github.com/rust-lang/crates.io-index"
540
+ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
541
+ dependencies = [
542
+ "proc-macro2",
543
+ "quote",
544
+ "syn",
545
+ ]
546
+
536
547
  [[package]]
537
548
  name = "atoi"
538
549
  version = "2.0.0"
@@ -2515,7 +2526,7 @@ dependencies = [
2515
2526
 
2516
2527
  [[package]]
2517
2528
  name = "rusty-haystack"
2518
- version = "0.7.1"
2529
+ version = "0.7.2"
2519
2530
  dependencies = [
2520
2531
  "chrono",
2521
2532
  "pyo3",
@@ -2527,7 +2538,7 @@ dependencies = [
2527
2538
 
2528
2539
  [[package]]
2529
2540
  name = "rusty-haystack-cli"
2530
- version = "0.7.1"
2541
+ version = "0.7.2"
2531
2542
  dependencies = [
2532
2543
  "clap",
2533
2544
  "env_logger",
@@ -2541,7 +2552,7 @@ dependencies = [
2541
2552
 
2542
2553
  [[package]]
2543
2554
  name = "rusty-haystack-client"
2544
- version = "0.7.1"
2555
+ version = "0.7.2"
2545
2556
  dependencies = [
2546
2557
  "base64",
2547
2558
  "dashmap",
@@ -2563,7 +2574,7 @@ dependencies = [
2563
2574
 
2564
2575
  [[package]]
2565
2576
  name = "rusty-haystack-core"
2566
- version = "0.7.1"
2577
+ version = "0.7.2"
2567
2578
  dependencies = [
2568
2579
  "arrow",
2569
2580
  "base64",
@@ -2597,12 +2608,13 @@ dependencies = [
2597
2608
 
2598
2609
  [[package]]
2599
2610
  name = "rusty-haystack-server"
2600
- version = "0.7.1"
2611
+ version = "0.7.2"
2601
2612
  dependencies = [
2602
2613
  "actix-http",
2603
2614
  "actix-rt",
2604
2615
  "actix-web",
2605
2616
  "actix-ws",
2617
+ "async-trait",
2606
2618
  "base64",
2607
2619
  "chrono",
2608
2620
  "criterion",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["haystack-core", "rusty-haystack", "haystack-server", "haystack-client"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.7.1"
6
+ version = "0.7.2"
7
7
  edition = "2024"
8
8
  rust-version = "1.93"
9
9
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rusty-haystack
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -13,7 +13,7 @@ categories.workspace = true
13
13
  name = "haystack_client"
14
14
 
15
15
  [dependencies]
16
- haystack-core = { package = "rusty-haystack-core", version = "0.7.1", path = "../haystack-core", features = ["haystack-serde"] }
16
+ haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
17
17
  reqwest = { version = "0.13", features = ["rustls-no-provider"], default-features = false }
18
18
  rustls = { version = "0.23", features = ["ring", "tls12", "std"], default-features = false }
19
19
  tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] }
@@ -13,13 +13,14 @@ categories.workspace = true
13
13
  name = "haystack_server"
14
14
 
15
15
  [dependencies]
16
- haystack-core = { package = "rusty-haystack-core", version = "0.7.1", path = "../haystack-core", features = ["haystack-serde"] }
17
- haystack-client = { package = "rusty-haystack-client", version = "0.7.1", path = "../haystack-client" }
16
+ haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
17
+ haystack-client = { package = "rusty-haystack-client", version = "0.7.2", path = "../haystack-client" }
18
18
  actix-web = "=4.13.0"
19
19
  actix-http = "=3.12.0"
20
20
  actix-ws = "0.4"
21
21
  actix-rt = "2"
22
22
  chrono = { version = "0.4", features = ["serde"] }
23
+ async-trait = "0.1"
23
24
  serde = { version = "1.0", features = ["derive"] }
24
25
  serde_json = "1.0"
25
26
  toml = "1.0"
@@ -1,5 +1,7 @@
1
1
  //! Server builder and startup.
2
2
 
3
+ use std::sync::Arc;
4
+
3
5
  use actix_web::body::MessageBody;
4
6
  use actix_web::dev::{ServiceRequest, ServiceResponse};
5
7
  use actix_web::middleware::from_fn;
@@ -18,6 +20,8 @@ use crate::state::AppState;
18
20
  use crate::ws;
19
21
  use crate::ws::WatchManager;
20
22
 
23
+ type ConfigureFn = dyn Fn(&mut web::ServiceConfig) + Send + Sync + 'static;
24
+
21
25
  /// Builder for the Haystack HTTP server.
22
26
  pub struct HaystackServer {
23
27
  graph: SharedGraph,
@@ -25,6 +29,8 @@ pub struct HaystackServer {
25
29
  auth_manager: AuthManager,
26
30
  actions: ActionRegistry,
27
31
  federation: Federation,
32
+ custom_configures: Vec<Arc<ConfigureFn>>,
33
+ history_provider: Option<Box<dyn crate::his_provider::HistoryProvider>>,
28
34
  port: u16,
29
35
  host: String,
30
36
  }
@@ -38,6 +44,8 @@ impl HaystackServer {
38
44
  auth_manager: AuthManager::empty(),
39
45
  actions: ActionRegistry::new(),
40
46
  federation: Federation::new(),
47
+ custom_configures: Vec::new(),
48
+ history_provider: None,
41
49
  port: 8080,
42
50
  host: "127.0.0.1".to_string(),
43
51
  }
@@ -79,15 +87,40 @@ impl HaystackServer {
79
87
  self
80
88
  }
81
89
 
90
+ /// Register a custom route configuration function.
91
+ ///
92
+ /// The function receives a mutable `ServiceConfig` and can add routes,
93
+ /// scopes, and app data. Called during server startup.
94
+ pub fn with_configure<F>(mut self, f: F) -> Self
95
+ where
96
+ F: Fn(&mut web::ServiceConfig) + Send + Sync + 'static,
97
+ {
98
+ self.custom_configures.push(Arc::new(f));
99
+ self
100
+ }
101
+
102
+ /// Set the history storage provider (default: in-memory [`HisStore`]).
103
+ pub fn with_history_provider(
104
+ mut self,
105
+ provider: Box<dyn crate::his_provider::HistoryProvider>,
106
+ ) -> Self {
107
+ self.history_provider = Some(provider);
108
+ self
109
+ }
110
+
82
111
  /// Start the HTTP server. This blocks until the server is stopped.
83
112
  pub async fn run(self) -> std::io::Result<()> {
113
+ let his: Box<dyn crate::his_provider::HistoryProvider> = self
114
+ .history_provider
115
+ .unwrap_or_else(|| Box::new(HisStore::new()));
116
+
84
117
  let state = web::Data::new(AppState {
85
118
  graph: self.graph,
86
119
  namespace: parking_lot::RwLock::new(self.namespace),
87
120
  auth: self.auth_manager,
88
121
  watches: WatchManager::new(),
89
122
  actions: self.actions,
90
- his: HisStore::new(),
123
+ his,
91
124
  started_at: std::time::Instant::now(),
92
125
  federation: self.federation,
93
126
  });
@@ -95,15 +128,24 @@ impl HaystackServer {
95
128
  // Start federation background sync tasks
96
129
  let _sync_handles = state.federation.start_background_sync();
97
130
 
131
+ let custom_configures = self.custom_configures.clone();
132
+
98
133
  log::info!("Starting haystack-server on {}:{}", self.host, self.port);
99
134
 
100
135
  HttpServer::new(move || {
101
- App::new()
136
+ let mut app = App::new()
102
137
  .app_data(state.clone())
103
138
  .app_data(actix_web::web::PayloadConfig::default().limit(2 * 1024 * 1024))
104
139
  .wrap(from_fn(auth_middleware))
105
140
  .configure(ops::configure)
106
- .route("/api/ws", web::get().to(ws::ws_handler))
141
+ .route("/api/ws", web::get().to(ws::ws_handler));
142
+
143
+ for configure_fn in &custom_configures {
144
+ let f = Arc::clone(configure_fn);
145
+ app = app.configure(move |cfg| f(cfg));
146
+ }
147
+
148
+ app
107
149
  })
108
150
  .bind((self.host.as_str(), self.port))?
109
151
  .run()
@@ -307,7 +349,7 @@ permissions = ["read"]
307
349
  auth,
308
350
  watches: WatchManager::new(),
309
351
  actions: ActionRegistry::new(),
310
- his: HisStore::new(),
352
+ his: Box::new(HisStore::new()),
311
353
  started_at: std::time::Instant::now(),
312
354
  federation: Federation::new(),
313
355
  })
@@ -0,0 +1,24 @@
1
+ //! Pluggable history storage backend.
2
+ //!
3
+ //! The default implementation is [`HisStore`](crate::his_store::HisStore) (in-memory).
4
+ //! Implement this trait to back hisRead/hisWrite with a database.
5
+
6
+ use async_trait::async_trait;
7
+ use chrono::{DateTime, FixedOffset};
8
+
9
+ use crate::his_store::HisItem;
10
+
11
+ /// Trait for history storage backends.
12
+ #[async_trait]
13
+ pub trait HistoryProvider: Send + Sync + 'static {
14
+ /// Read historical items for an entity within the optional time range.
15
+ async fn his_read(
16
+ &self,
17
+ id: &str,
18
+ start: Option<DateTime<FixedOffset>>,
19
+ end: Option<DateTime<FixedOffset>>,
20
+ ) -> Vec<HisItem>;
21
+
22
+ /// Write historical items for an entity.
23
+ async fn his_write(&self, id: &str, items: Vec<HisItem>);
24
+ }
@@ -5,8 +5,11 @@ use std::collections::HashMap;
5
5
  use chrono::{DateTime, FixedOffset};
6
6
  use parking_lot::RwLock;
7
7
 
8
+ use async_trait::async_trait;
8
9
  use haystack_core::kinds::Kind;
9
10
 
11
+ use crate::his_provider::HistoryProvider;
12
+
10
13
  const MAX_ITEMS_PER_SERIES: usize = 1_000_000;
11
14
 
12
15
  /// A single historical data point: a timestamp and a value.
@@ -101,6 +104,11 @@ impl HisStore {
101
104
  .collect()
102
105
  }
103
106
 
107
+ /// Whether the store has no items for the given point.
108
+ pub fn is_empty(&self, id: &str) -> bool {
109
+ self.len(id) == 0
110
+ }
111
+
104
112
  /// Return the count of history items stored for a given point.
105
113
  pub fn len(&self, id: &str) -> usize {
106
114
  let map = self.items.read();
@@ -108,6 +116,22 @@ impl HisStore {
108
116
  }
109
117
  }
110
118
 
119
+ #[async_trait]
120
+ impl HistoryProvider for HisStore {
121
+ async fn his_read(
122
+ &self,
123
+ id: &str,
124
+ start: Option<DateTime<FixedOffset>>,
125
+ end: Option<DateTime<FixedOffset>>,
126
+ ) -> Vec<HisItem> {
127
+ self.read(id, start, end)
128
+ }
129
+
130
+ async fn his_write(&self, id: &str, items: Vec<HisItem>) {
131
+ self.write(id, items);
132
+ }
133
+ }
134
+
111
135
  #[cfg(test)]
112
136
  mod tests {
113
137
  use super::*;
@@ -39,6 +39,7 @@ pub mod demo;
39
39
  pub mod domain_scope;
40
40
  pub mod error;
41
41
  pub mod federation;
42
+ pub mod his_provider;
42
43
  pub mod his_store;
43
44
  pub mod ops;
44
45
  pub mod session;
@@ -48,3 +49,4 @@ pub mod ws;
48
49
  pub use app::HaystackServer;
49
50
  pub use domain_scope::DomainScope;
50
51
  pub use federation::Federation;
52
+ pub use his_provider::HistoryProvider;
@@ -159,7 +159,7 @@ mod tests {
159
159
  auth: AuthManager::empty(),
160
160
  watches: WatchManager::new(),
161
161
  actions: ActionRegistry::new(),
162
- his: HisStore::new(),
162
+ his: Box::new(HisStore::new()),
163
163
  started_at: std::time::Instant::now(),
164
164
  federation: crate::federation::Federation::new(),
165
165
  })
@@ -1,7 +1,8 @@
1
1
  //! The `hisRead` and `hisWrite` ops — historical time-series data.
2
2
  //!
3
- //! Backed by the in-memory [`HisStore`](crate::his_store::HisStore) stored
4
- //! in `AppState`.
3
+ //! Backed by a pluggable [`HistoryProvider`](crate::his_provider::HistoryProvider)
4
+ //! stored in `AppState`. The default provider is the in-memory
5
+ //! [`HisStore`](crate::his_store::HisStore).
5
6
  //!
6
7
  //! # hisRead
7
8
  //!
@@ -134,7 +135,7 @@ pub async fn handle_read(
134
135
  .map_err(|e| HaystackError::bad_request(format!("hisRead: bad range: {e}")))?;
135
136
 
136
137
  // Query the store.
137
- let items = state.his.read(&id, Some(start), Some(end));
138
+ let items = state.his.his_read(&id, Some(start), Some(end)).await;
138
139
 
139
140
  // Build response grid.
140
141
  let cols = vec![HCol::new("ts"), HCol::new("val")];
@@ -285,7 +286,7 @@ pub async fn handle_write(
285
286
  }
286
287
 
287
288
  let count = items.len();
288
- state.his.write(&id, items);
289
+ state.his.his_write(&id, items).await;
289
290
 
290
291
  log::info!("hisWrite: stored {} items for point {}", count, id);
291
292
  let grid = HGrid::new();
@@ -193,7 +193,7 @@ mod tests {
193
193
  auth: AuthManager::empty(),
194
194
  watches: WatchManager::new(),
195
195
  actions: ActionRegistry::new(),
196
- his: HisStore::new(),
196
+ his: Box::new(HisStore::new()),
197
197
  started_at: std::time::Instant::now(),
198
198
  federation: crate::federation::Federation::new(),
199
199
  })
@@ -6,7 +6,7 @@ use haystack_core::ontology::DefNamespace;
6
6
  use crate::actions::ActionRegistry;
7
7
  use crate::auth::AuthManager;
8
8
  use crate::federation::Federation;
9
- use crate::his_store::HisStore;
9
+ use crate::his_provider::HistoryProvider;
10
10
  use crate::ws::WatchManager;
11
11
 
12
12
  /// Shared application state injected into every Actix handler via `web::Data`.
@@ -21,8 +21,8 @@ pub struct AppState {
21
21
  pub watches: WatchManager,
22
22
  /// Action dispatch registry for the `invokeAction` op.
23
23
  pub actions: ActionRegistry,
24
- /// In-memory time-series history store for hisRead/hisWrite.
25
- pub his: HisStore,
24
+ /// Pluggable time-series history store for hisRead/hisWrite.
25
+ pub his: Box<dyn HistoryProvider>,
26
26
  /// Instant when the server was started, used for uptime calculation.
27
27
  pub started_at: std::time::Instant,
28
28
  /// Federation manager for remote connector queries.
@@ -42,7 +42,7 @@ fn test_app_state() -> web::Data<AppState> {
42
42
  auth: AuthManager::empty(),
43
43
  watches: WatchManager::new(),
44
44
  actions: ActionRegistry::new(),
45
- his: HisStore::new(),
45
+ his: Box::new(HisStore::new()),
46
46
  started_at: std::time::Instant::now(),
47
47
  federation: Federation::new(),
48
48
  })
@@ -58,7 +58,7 @@ fn test_app_state_with_federation(federation: Federation) -> web::Data<AppState>
58
58
  auth: AuthManager::empty(),
59
59
  watches: WatchManager::new(),
60
60
  actions: ActionRegistry::new(),
61
- his: HisStore::new(),
61
+ his: Box::new(HisStore::new()),
62
62
  started_at: std::time::Instant::now(),
63
63
  federation,
64
64
  })
@@ -9,9 +9,9 @@ name = "rusty_haystack"
9
9
  crate-type = ["cdylib"]
10
10
 
11
11
  [dependencies]
12
- haystack-core = { package = "rusty-haystack-core", version = "0.7.1", path = "../haystack-core", features = ["haystack-serde"] }
13
- haystack-client = { package = "rusty-haystack-client", version = "0.7.1", path = "../haystack-client" }
14
- haystack-server = { package = "rusty-haystack-server", version = "0.7.1", path = "../haystack-server" }
12
+ haystack-core = { package = "rusty-haystack-core", version = "0.7.2", path = "../haystack-core", features = ["haystack-serde"] }
13
+ haystack-client = { package = "rusty-haystack-client", version = "0.7.2", path = "../haystack-client" }
14
+ haystack-server = { package = "rusty-haystack-server", version = "0.7.2", path = "../haystack-server" }
15
15
  pyo3 = { version = "0.28", features = ["extension-module"] }
16
16
  chrono = "0.4"
17
17
  tokio = { version = "1", features = ["rt-multi-thread"] }
File without changes