lorebase-keeper 0.3.0__tar.gz → 0.4.0__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 (261) hide show
  1. lorebase_keeper-0.4.0/LICENSE +201 -0
  2. lorebase_keeper-0.4.0/PKG-INFO +53 -0
  3. lorebase_keeper-0.4.0/README.md +12 -0
  4. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/pyproject.toml +26 -5
  5. lorebase_keeper-0.4.0/src/lorebase_keeper/__init__.py +1 -0
  6. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/records.py +47 -2
  7. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/sensitivity.py +4 -2
  8. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/views.py +24 -0
  9. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/proposals.py +32 -1
  10. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/read.py +52 -7
  11. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/proposal_reads.py +4 -3
  12. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_proposal_read_authorization.py +14 -0
  13. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_proposals_postgres.py +113 -0
  14. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_routes.py +21 -0
  15. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_sensitivity.py +142 -1
  16. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_proposals.py +62 -2
  17. lorebase_keeper-0.3.0/PKG-INFO +0 -23
  18. lorebase_keeper-0.3.0/src/lorebase_keeper/__init__.py +0 -1
  19. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/.gitignore +0 -0
  20. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/__main__.py +0 -0
  21. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/__init__.py +0 -0
  22. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/budget.py +0 -0
  23. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/context.py +0 -0
  24. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/explain.py +0 -0
  25. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/feed.py +0 -0
  26. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/markdown.py +0 -0
  27. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/pack.py +0 -0
  28. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/agents/settings.py +0 -0
  29. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/app.py +0 -0
  30. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/__init__.py +0 -0
  31. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/api_keys.py +0 -0
  32. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/audit.py +0 -0
  33. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/cache.py +0 -0
  34. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/config.py +0 -0
  35. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/deps.py +0 -0
  36. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/keyring.py +0 -0
  37. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/oidc.py +0 -0
  38. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/permissions.py +0 -0
  39. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/ports.py +0 -0
  40. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/principals.py +0 -0
  41. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/provider.py +0 -0
  42. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/rbac.py +0 -0
  43. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/read_audit.py +0 -0
  44. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/runtime.py +0 -0
  45. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/auth/sessions.py +0 -0
  46. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/bootstrap.py +0 -0
  47. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/client_address.py +0 -0
  48. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/context.py +0 -0
  49. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/db.py +0 -0
  50. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/deps.py +0 -0
  51. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/errors.py +0 -0
  52. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/health.py +0 -0
  53. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/__init__.py +0 -0
  54. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/config.py +0 -0
  55. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/markdown.py +0 -0
  56. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/models.py +0 -0
  57. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/report.py +0 -0
  58. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/kindhealth/scan.py +0 -0
  59. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/middleware.py +0 -0
  60. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/pagination.py +0 -0
  61. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/__init__.py +0 -0
  62. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/bucket.py +0 -0
  63. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/config.py +0 -0
  64. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/enforce.py +0 -0
  65. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/limiter.py +0 -0
  66. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/quotas.py +0 -0
  67. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/ratelimit/shared.py +0 -0
  68. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/readiness.py +0 -0
  69. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/__init__.py +0 -0
  70. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/caching.py +0 -0
  71. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/compiler.py +0 -0
  72. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/coverage.py +0 -0
  73. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/cursors.py +0 -0
  74. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/diff.py +0 -0
  75. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/graph.py +0 -0
  76. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/history.py +0 -0
  77. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/lenses.py +0 -0
  78. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/misses.py +0 -0
  79. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/points.py +0 -0
  80. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/problems.py +0 -0
  81. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/record_history.py +0 -0
  82. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/requests.py +0 -0
  83. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/resolve.py +0 -0
  84. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/runtime.py +0 -0
  85. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/search.py +0 -0
  86. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/settings.py +0 -0
  87. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/snapshots.py +0 -0
  88. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/tree.py +0 -0
  89. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/reading/visibility.py +0 -0
  90. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/__init__.py +0 -0
  91. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/admin.py +0 -0
  92. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/agents.py +0 -0
  93. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/branches.py +0 -0
  94. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/derivations.py +0 -0
  95. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/documents.py +0 -0
  96. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/domain_api.py +0 -0
  97. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/domains.py +0 -0
  98. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/events.py +0 -0
  99. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/kind_health.py +0 -0
  100. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/operations.py +0 -0
  101. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/proposal_items.py +0 -0
  102. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/reconciliation.py +0 -0
  103. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/revisions.py +0 -0
  104. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/schema.py +0 -0
  105. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/schema_inference.py +0 -0
  106. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/schema_suggestions.py +0 -0
  107. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/sessions.py +0 -0
  108. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/source_preview.py +0 -0
  109. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/sources.py +0 -0
  110. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/trace.py +0 -0
  111. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/vault.py +0 -0
  112. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/webhooks.py +0 -0
  113. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/routes/whoami.py +0 -0
  114. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/__init__.py +0 -0
  115. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/agent_writes.py +0 -0
  116. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/branches.py +0 -0
  117. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/config.py +0 -0
  118. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/derivation_preview.py +0 -0
  119. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/document_urls.py +0 -0
  120. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/documents.py +0 -0
  121. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/domains.py +0 -0
  122. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/errors.py +0 -0
  123. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/operation_catalog.py +0 -0
  124. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/operation_events.py +0 -0
  125. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/operations.py +0 -0
  126. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/pii_import.py +0 -0
  127. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/proposals.py +0 -0
  128. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/reads.py +0 -0
  129. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/reconciliation.py +0 -0
  130. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/reconciliation_settle.py +0 -0
  131. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/schema.py +0 -0
  132. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/schema_inference.py +0 -0
  133. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/schema_suggestions.py +0 -0
  134. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/source_preview.py +0 -0
  135. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/services/stewards.py +0 -0
  136. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/settings.py +0 -0
  137. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/__init__.py +0 -0
  138. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/capture.py +0 -0
  139. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/config.py +0 -0
  140. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/explain.py +0 -0
  141. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/middleware.py +0 -0
  142. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/notes.py +0 -0
  143. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/src/lorebase_keeper/tracing/recorder.py +0 -0
  144. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/conftest.py +0 -0
  145. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/snapshots/context_pack.md +0 -0
  146. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/snapshots/context_pack_trimmed.md +0 -0
  147. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/snapshots/explain_part.md +0 -0
  148. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/test_budget.py +0 -0
  149. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/test_lenses.py +0 -0
  150. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/test_rendering.py +0 -0
  151. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/test_scope.py +0 -0
  152. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/agents/test_settings.py +0 -0
  153. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/conftest.py +0 -0
  154. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_admin.py +0 -0
  155. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_api_key_authentication.py +0 -0
  156. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_api_keys.py +0 -0
  157. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_audit.py +0 -0
  158. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_auth_failure_limits.py +0 -0
  159. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_bootstrap.py +0 -0
  160. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_oidc.py +0 -0
  161. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_quotas.py +0 -0
  162. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_rate_limits.py +0 -0
  163. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_rbac.py +0 -0
  164. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_read_audit.py +0 -0
  165. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_read_authorization.py +0 -0
  166. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_schema_inference_access.py +0 -0
  167. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/auth/test_sessions.py +0 -0
  168. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/conftest.py +0 -0
  169. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/conftest.py +0 -0
  170. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/read_fixtures.py +0 -0
  171. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/resolve_shop.py +0 -0
  172. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/snapshots/context_supplier_s1001.md +0 -0
  173. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/snapshots/explain_supplier_s1001.md +0 -0
  174. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/supply.py +0 -0
  175. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_agent_trace_postgres.py +0 -0
  176. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_agent_trace_rbac_postgres.py +0 -0
  177. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_agents_api.py +0 -0
  178. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_auth_postgres.py +0 -0
  179. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_change_feed.py +0 -0
  180. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_coverage_api.py +0 -0
  181. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_derivation_preview_api.py +0 -0
  182. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_derivations_postgres.py +0 -0
  183. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_derived_sensitivity_api.py +0 -0
  184. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_document_versions_api.py +0 -0
  185. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_documents_api.py +0 -0
  186. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_expressions_postgres.py +0 -0
  187. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_extraction_vault_edits.py +0 -0
  188. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_health_postgres.py +0 -0
  189. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_invisible_kinds.py +0 -0
  190. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_limits_postgres.py +0 -0
  191. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_operation_events_postgres.py +0 -0
  192. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_overlay_reads_postgres.py +0 -0
  193. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_path_derivations_postgres.py +0 -0
  194. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_read_api.py +0 -0
  195. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_read_authorization.py +0 -0
  196. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_read_replicas_postgres.py +0 -0
  197. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_read_timing.py +0 -0
  198. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_readiness_postgres.py +0 -0
  199. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_record_history_api.py +0 -0
  200. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_record_lineage_api.py +0 -0
  201. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_resolve_api.py +0 -0
  202. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_schema_suggestions_api.py +0 -0
  203. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_search_bm25_postgres.py +0 -0
  204. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_search_presets_postgres.py +0 -0
  205. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_search_tuning_postgres.py +0 -0
  206. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_sensitivity_api.py +0 -0
  207. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_sessions_postgres.py +0 -0
  208. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_source_preview_api.py +0 -0
  209. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_sources_api.py +0 -0
  210. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/test_time_travel_api.py +0 -0
  211. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/conftest.py +0 -0
  212. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_agent_writes_postgres.py +0 -0
  213. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_domains_branches_postgres.py +0 -0
  214. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_operations_postgres.py +0 -0
  215. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_pii_import_postgres.py +0 -0
  216. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_reconciliation_postgres.py +0 -0
  217. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_schema_postgres.py +0 -0
  218. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_sensitivity_writes_postgres.py +0 -0
  219. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_stewards_postgres.py +0 -0
  220. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_webhook_clearances_postgres.py +0 -0
  221. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/integration/writes/test_webhook_sealing_postgres.py +0 -0
  222. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/kindhealth/test_health_reports.py +0 -0
  223. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/ratelimit/test_rate_limit_buckets.py +0 -0
  224. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/ratelimit/test_shared_store.py +0 -0
  225. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/snapshots/located_trait.sql +0 -0
  226. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/snapshots/part_include.sql +0 -0
  227. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/snapshots/part_relations.sql +0 -0
  228. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/snapshots/supplier_filter_keyset.sql +0 -0
  229. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/snapshots/supplier_foreign_key.sql +0 -0
  230. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_caching.py +0 -0
  231. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_compiler.py +0 -0
  232. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_misses.py +0 -0
  233. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_resolve.py +0 -0
  234. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_settings.py +0 -0
  235. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/reading/test_visibility.py +0 -0
  236. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_agent_writes.py +0 -0
  237. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_client_address.py +0 -0
  238. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_conventions.py +0 -0
  239. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_cors.py +0 -0
  240. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_derivation_preview.py +0 -0
  241. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_document_urls.py +0 -0
  242. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_domain_routes.py +0 -0
  243. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_errors.py +0 -0
  244. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_health.py +0 -0
  245. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_main.py +0 -0
  246. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_operation_events.py +0 -0
  247. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_operations.py +0 -0
  248. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_pii_import.py +0 -0
  249. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_read_replicas.py +0 -0
  250. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_readiness_migrations.py +0 -0
  251. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_reconciliation.py +0 -0
  252. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_request_id.py +0 -0
  253. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_schema_changes.py +0 -0
  254. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_schema_inference.py +0 -0
  255. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_schema_search.py +0 -0
  256. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_security_headers.py +0 -0
  257. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_settings.py +0 -0
  258. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/test_source_preview.py +0 -0
  259. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/tracing/test_capture.py +0 -0
  260. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/tracing/test_trace_fields.py +0 -0
  261. {lorebase_keeper-0.3.0 → lorebase_keeper-0.4.0}/tests/tracing/test_trace_middleware.py +0 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Antonio Antenore
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.5
2
+ Name: lorebase-keeper
3
+ Version: 0.4.0
4
+ Summary: Lorebase Keeper: REST API service
5
+ Project-URL: Homepage, https://github.com/aantenore/lorebase
6
+ Project-URL: Documentation, https://aantenore.github.io/lorebase/
7
+ Project-URL: Repository, https://github.com/aantenore/lorebase
8
+ Project-URL: Changelog, https://github.com/aantenore/lorebase/blob/main/CHANGELOG.md
9
+ Project-URL: Issues, https://github.com/aantenore/lorebase/issues
10
+ Author: Antonio Antenore
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: knowledge-graph,mcp,ontology,postgres,versioning
14
+ Classifier: Development Status :: 2 - Pre-Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Database
21
+ Requires-Python: >=3.12
22
+ Requires-Dist: asyncpg>=0.29
23
+ Requires-Dist: fastapi>=0.115
24
+ Requires-Dist: httpx>=0.27
25
+ Requires-Dist: lorebase-core<0.5,>=0.4
26
+ Requires-Dist: lorebase-platform<0.5,>=0.4
27
+ Requires-Dist: lorebase-store<0.5,>=0.4
28
+ Requires-Dist: opentelemetry-api>=1.25
29
+ Requires-Dist: pgvector>=0.3
30
+ Requires-Dist: pydantic>=2.7
31
+ Requires-Dist: pyjwt[crypto]>=2.8
32
+ Requires-Dist: python-multipart>=0.0.9
33
+ Requires-Dist: uvicorn>=0.30
34
+ Provides-Extra: mssql
35
+ Requires-Dist: pymssql>=2.3; extra == 'mssql'
36
+ Provides-Extra: mysql
37
+ Requires-Dist: asyncmy>=0.2.10; extra == 'mysql'
38
+ Provides-Extra: parquet
39
+ Requires-Dist: pyarrow>=15; extra == 'parquet'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # lorebase-keeper
43
+
44
+ Part of [Lorebase](https://github.com/aantenore/lorebase), an open-source ontology platform: a versioned, governed knowledge graph on Postgres with git-like branching and three-way merge.
45
+
46
+ Keeper, the REST API service of Lorebase: schema, records, branches, merges, Proposals, search and the read API agents use.
47
+
48
+ ```sh
49
+ uv tool install lorebase-keeper # or: pip install lorebase-keeper
50
+ lorebase-keeper --help
51
+ ```
52
+
53
+ Documentation: [Deployment](https://aantenore.github.io/lorebase/deployment/) and the [documentation site](https://aantenore.github.io/lorebase/). License: Apache-2.0.
@@ -0,0 +1,12 @@
1
+ # lorebase-keeper
2
+
3
+ Part of [Lorebase](https://github.com/aantenore/lorebase), an open-source ontology platform: a versioned, governed knowledge graph on Postgres with git-like branching and three-way merge.
4
+
5
+ Keeper, the REST API service of Lorebase: schema, records, branches, merges, Proposals, search and the read API agents use.
6
+
7
+ ```sh
8
+ uv tool install lorebase-keeper # or: pip install lorebase-keeper
9
+ lorebase-keeper --help
10
+ ```
11
+
12
+ Documentation: [Deployment](https://aantenore.github.io/lorebase/deployment/) and the [documentation site](https://aantenore.github.io/lorebase/). License: Apache-2.0.
@@ -1,12 +1,26 @@
1
1
  [project]
2
2
  name = "lorebase-keeper"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "Lorebase Keeper: REST API service"
5
5
  requires-python = ">=3.12"
6
+ readme = "README.md"
7
+ license = "Apache-2.0"
8
+ license-files = ["LICENSE"]
9
+ authors = [{ name = "Antonio Antenore" }]
10
+ keywords = ["ontology", "knowledge-graph", "mcp", "postgres", "versioning"]
11
+ classifiers = [
12
+ "Development Status :: 2 - Pre-Alpha",
13
+ "Intended Audience :: Developers",
14
+ "Operating System :: OS Independent",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ "Programming Language :: Python :: 3.12",
18
+ "Topic :: Database",
19
+ ]
6
20
  dependencies = [
7
- "lorebase-core>=0.3,<0.4",
8
- "lorebase-store>=0.3,<0.4",
9
- "lorebase-platform>=0.3,<0.4",
21
+ "lorebase-core>=0.4,<0.5",
22
+ "lorebase-store>=0.4,<0.5",
23
+ "lorebase-platform>=0.4,<0.5",
10
24
  "fastapi>=0.115",
11
25
  "uvicorn>=0.30",
12
26
  "pydantic>=2.7",
@@ -26,8 +40,15 @@ mssql = ["pymssql>=2.3"] # SQL Server sources of POST schema:infer
26
40
  [project.scripts]
27
41
  lorebase-keeper = "lorebase_keeper.__main__:main"
28
42
 
43
+ [project.urls]
44
+ Homepage = "https://github.com/aantenore/lorebase"
45
+ Documentation = "https://aantenore.github.io/lorebase/"
46
+ Repository = "https://github.com/aantenore/lorebase"
47
+ Changelog = "https://github.com/aantenore/lorebase/blob/main/CHANGELOG.md"
48
+ Issues = "https://github.com/aantenore/lorebase/issues"
49
+
29
50
  [build-system]
30
- requires = ["hatchling"]
51
+ requires = ["hatchling>=1.27"]
31
52
  build-backend = "hatchling.build"
32
53
 
33
54
  [tool.hatch.build.targets.wheel]
@@ -0,0 +1 @@
1
+ __version__ = "0.4.0"
@@ -9,7 +9,7 @@ snapshot of the Revision (`reading.snapshots`) for everything else.
9
9
  from __future__ import annotations
10
10
 
11
11
  from collections import defaultdict
12
- from collections.abc import Mapping, Sequence
12
+ from collections.abc import Awaitable, Callable, Mapping, Sequence
13
13
  from dataclasses import dataclass
14
14
  from typing import Any
15
15
 
@@ -52,6 +52,7 @@ from lorebase_keeper.reading.tree import TreeReader
52
52
  from lorebase_keeper.reading.views import (
53
53
  AggregateCount,
54
54
  AggregateOut,
55
+ ConflictInProgressOut,
55
56
  LineageOut,
56
57
  LinkCountOut,
57
58
  LinkOut,
@@ -66,7 +67,7 @@ from lorebase_keeper.tracing.explain import explain
66
67
  from lorebase_store.indexes import plan_indexes
67
68
  from lorebase_store.materialize.rows import record_title, split_link_key
68
69
  from lorebase_store.reads import hydrate_records, links_to_record
69
- from lorebase_store.repositories import ProvenanceRepository
70
+ from lorebase_store.repositories import ConflictRepository, ProvenanceRepository
70
71
 
71
72
 
72
73
  @dataclass(frozen=True, slots=True)
@@ -177,6 +178,50 @@ async def get_record(
177
178
  return record, fetched
178
179
 
179
180
 
181
+ async def conflicts_in_progress(
182
+ session: AsyncSession,
183
+ point: ReadPoint,
184
+ kind: Kind,
185
+ key: str,
186
+ *,
187
+ may_read_source: Callable[[str], Awaitable[bool]],
188
+ ) -> list[ConflictInProgressOut]:
189
+ """The open Conflicts about the Record `(kind, key)` in the open Proposals into the branch
190
+ read (one lookup by element in the index of unresolved Conflicts).
191
+
192
+ An entry tells that a Proposal exists and what it contests, so it is listed only to a
193
+ caller who may read that Proposal (`may_read_source` tells for its source branch; the
194
+ target branch is the one read) and the Attribute's values: a Conflict about an Attribute
195
+ the caller's schema leaves out or whose values the caller sees masked is dropped.
196
+ """
197
+ rows = await ConflictRepository(session, point.domain.id).pending(
198
+ point.branch, kind_partition(kind.id), key
199
+ )
200
+ pending: list[ConflictInProgressOut] = []
201
+ readable: dict[str, bool] = {}
202
+ for row in rows:
203
+ name: str | None = None
204
+ if row.attribute_id is not None:
205
+ attribute = kind.attributes.get(row.attribute_id)
206
+ if attribute is None or point.masking.hidden(attribute, [kind.id]):
207
+ continue
208
+ name = attribute.api_name
209
+ if row.source_ref not in readable:
210
+ readable[row.source_ref] = await may_read_source(row.source_ref)
211
+ if not readable[row.source_ref]:
212
+ continue
213
+ pending.append(
214
+ ConflictInProgressOut(
215
+ proposal_id=row.proposal_id,
216
+ conflict_id=row.fingerprint,
217
+ code=row.code,
218
+ attribute=name,
219
+ competing_hash=row.competing_hash,
220
+ )
221
+ )
222
+ return pending
223
+
224
+
180
225
  async def link_counts(
181
226
  session: AsyncSession,
182
227
  runtime: ReadRuntime,
@@ -862,8 +862,9 @@ def mask_conflict(
862
862
  payload: Mapping[str, Any], schema: Schema | None, masking: Masking
863
863
  ) -> dict[str, Any]:
864
864
  """A stored Conflict with the values the caller may not read masked: the three versions
865
- of a sensitive Attribute (with the message and details, which may quote them), or the
866
- sensitive entries of whole value maps."""
865
+ of a sensitive Attribute (with the message and details, which may quote them, and the
866
+ provenance of the sides, which says who changed the value, from which Source and when),
867
+ or the sensitive entries of whole value maps."""
867
868
  out = dict(payload)
868
869
  located = _element_attributes(schema, str(payload.get("partition", "")))
869
870
  if located is None:
@@ -874,6 +875,7 @@ def mask_conflict(
874
875
  out[name] = masking.masked
875
876
  out["message"] = "The versions of a sensitive Attribute differ."
876
877
  out["details"] = {}
878
+ out.pop("provenance", None)
877
879
  return out
878
880
  if payload.get("attribute") is None:
879
881
  attributes, kinds = located
@@ -40,6 +40,24 @@ class LineageOut(BaseModel):
40
40
  at: datetime | None = None
41
41
 
42
42
 
43
+ class ConflictInProgressOut(BaseModel):
44
+ """A Conflict about a Record that waits for a decision in an open Proposal into the branch
45
+ read: the value served is the one already merged, and a competing change is pending."""
46
+
47
+ proposal_id: str = Field(description="The open Proposal whose merge has the Conflict.")
48
+ conflict_id: str = Field(description="The Conflict id (its fingerprint) in that Proposal.")
49
+ code: str = Field(description="Conflict code, such as `DV1`.")
50
+ attribute: str | None = Field(
51
+ default=None,
52
+ description="Api name of the contested Attribute; null when the whole Record is "
53
+ "contested (deleted on one side and changed on the other).",
54
+ )
55
+ competing_hash: str | None = Field(
56
+ default=None,
57
+ description="Hash of the competing Record on the Proposal's source side.",
58
+ )
59
+
60
+
43
61
  class RecordOut(BaseModel):
44
62
  """A Record with values keyed by Attribute api name."""
45
63
 
@@ -56,6 +74,12 @@ class RecordOut(BaseModel):
56
74
 
57
75
  class RecordResponse(Served):
58
76
  record: RecordOut
77
+ conflict_in_progress: list[ConflictInProgressOut] | None = Field(
78
+ default=None,
79
+ description="Open Conflicts about the Record in Proposals into the branch read; set "
80
+ "by `conflicts=true` on a read of one Record at the branch head (empty when nothing "
81
+ "is pending), null otherwise.",
82
+ )
59
83
 
60
84
 
61
85
  class RecordPage(Served):
@@ -265,14 +265,45 @@ class AttemptOut(BaseModel):
265
265
  auto_resolutions: list[dict[str, Any]]
266
266
 
267
267
 
268
+ class SideProvenanceOut(BaseModel):
269
+ """Who or what last changed the Attribute of a Conflict on one side, and when."""
270
+
271
+ provenance_id: str = Field(description="Provenance entry of the change.")
272
+ at: datetime = Field(description="When the change was made.")
273
+ actor: str | None = Field(default=None, description="Who wrote the provenance entry.")
274
+ origin: str | None = Field(
275
+ default=None, description="Origin type: `source_sync`, `operation`, `extraction`, ..."
276
+ )
277
+ source: str | None = Field(default=None, description="Source id, for a Source sync.")
278
+ principal: str | None = Field(default=None, description="Principal, for an Operation.")
279
+ labels: list[str] = Field(
280
+ default_factory=list, description="Origin labels an `authority` ranking matches."
281
+ )
282
+
283
+
284
+ class ConflictProvenanceOut(BaseModel):
285
+ """The provenance of the two competing sides; null for a side of unknown Lineage."""
286
+
287
+ ours: SideProvenanceOut | None = None
288
+ theirs: SideProvenanceOut | None = None
289
+
290
+
268
291
  class ConflictOut(BaseModel):
269
- """A Conflict (core `Conflict`) with its id, state and members."""
292
+ """A Conflict (core `Conflict`) with its id, state and members.
293
+
294
+ `provenance` is set on Attribute Conflicts (`DV1`, `DV3`) whose merge knew the Lineage of
295
+ at least one side, and null otherwise.
296
+ """
270
297
 
271
298
  model_config = {"extra": "allow"}
272
299
 
273
300
  id: str
274
301
  status: Literal["open", "resolved"]
275
302
  resolution: dict[str, Any] | None = None
303
+ provenance: ConflictProvenanceOut | None = Field(
304
+ default=None,
305
+ description="Who or what changed each side and when; null when the merge did not know it.",
306
+ )
276
307
 
277
308
 
278
309
  class ConflictsOut(AttemptOut):
@@ -14,6 +14,7 @@ resolved. POST reads carry an `ETag` too.
14
14
  from __future__ import annotations
15
15
 
16
16
  import json
17
+ from collections.abc import Awaitable, Callable
17
18
  from typing import Annotated, Any
18
19
 
19
20
  from fastapi import APIRouter, Depends, Query, Request, Response
@@ -97,8 +98,16 @@ def _mark(response: Response, point: ReadPoint, body: BaseModel) -> None:
97
98
 
98
99
 
99
100
  async def _answer(
100
- request: Request, runtime: ReadRuntime, point: ReadPoint, produce: Any, session: AsyncSession
101
+ request: Request,
102
+ runtime: ReadRuntime,
103
+ point: ReadPoint,
104
+ produce: Any,
105
+ session: AsyncSession,
106
+ *,
107
+ state: str = "",
101
108
  ) -> Response:
109
+ """`state` names what the body depends on that the Revision does not fix (the open
110
+ Conflicts a read asked for): it joins the cache key and the ETag."""
102
111
  return await respond(
103
112
  request,
104
113
  runtime.cache,
@@ -107,7 +116,7 @@ async def _answer(
107
116
  produce=produce,
108
117
  time_travel=not point.materialized,
109
118
  headers={REVISION_HEADER: point.revision_hex},
110
- variant=point.variant,
119
+ variant="|".join(part for part in (point.variant, state) if part),
111
120
  disclose=point.disclosure(session, runtime).send,
112
121
  )
113
122
 
@@ -245,6 +254,16 @@ async def list_record_links(
245
254
  return await _answer(request, runtime, point, produce, session)
246
255
 
247
256
 
257
+ def _may_read_proposal_source(access: ReadGuard) -> Callable[[str], Awaitable[bool]]:
258
+ """Whether the caller reads a Proposal whose target branch it reads: `data.read` on the
259
+ source branch too, or grants narrowed to Kinds (which cover every branch)."""
260
+
261
+ async def may(source_ref: str) -> bool:
262
+ return await access.may(source_ref) or bool(await access.granted_kinds())
263
+
264
+ return may
265
+
266
+
248
267
  @router.get(
249
268
  f"{BASE}/kinds/{{kind}}/records/{{key}}",
250
269
  summary="Get a Record by key",
@@ -263,22 +282,48 @@ async def get_record(
263
282
  at: At = None,
264
283
  links: Annotated[bool, Query(description="Add Link counts per Relation.")] = False,
265
284
  lineage: Annotated[bool, Query(description="Add the provenance of each value.")] = False,
285
+ conflicts: Annotated[
286
+ bool,
287
+ Query(
288
+ description="Add `conflict_in_progress`: the open Conflicts about the Record in "
289
+ "Proposals into the branch read. Branch head only (ignored with `at`)."
290
+ ),
291
+ ] = False,
266
292
  ) -> Response:
267
- """One Record, optionally with its Link counts and the lineage of its values."""
268
- if at is None and (
269
- unchanged := await unchanged_head(session, runtime, access, request, branch=branch)
293
+ """One Record, optionally with its Link counts, the lineage of its values and the
294
+ Conflicts about it that wait for a decision.
295
+
296
+ While a merge is stuck on a Conflict nothing is committed, so the Record keeps the value
297
+ already merged. `conflicts=true` lists the Conflicts of open Proposals into the branch
298
+ that touch the Record (Proposal, Conflict, Attribute, hash of the competing Record). They
299
+ change without a new Revision, so such a read is not answered from the head Revision
300
+ alone: the pending Conflicts are looked up on every request and are part of its `ETag`.
301
+ """
302
+ watch = conflicts and at is None
303
+ if (
304
+ at is None
305
+ and not watch
306
+ and (unchanged := await unchanged_head(session, runtime, access, request, branch=branch))
270
307
  ):
271
308
  return unchanged
272
309
  point = await resolve_point(session, runtime, access, branch=branch, at=at)
273
310
  found = records.require_kind(point, kind)
311
+ pending = (
312
+ await records.conflicts_in_progress(
313
+ session, point, found, key, may_read_source=_may_read_proposal_source(access)
314
+ )
315
+ if watch
316
+ else None
317
+ )
274
318
 
275
319
  async def produce() -> RecordResponse:
276
320
  record, _ = await records.get_record(
277
321
  session, runtime, point, found, key, links=links, lineage=lineage
278
322
  )
279
- return RecordResponse(**served(point), record=record)
323
+ return RecordResponse(**served(point), record=record, conflict_in_progress=pending)
280
324
 
281
- return await _answer(request, runtime, point, produce, session)
325
+ state = fingerprint("conflicts", [p.model_dump() for p in pending]) if pending else ""
326
+ return await _answer(request, runtime, point, produce, session, state=state)
282
327
 
283
328
 
284
329
  @router.get(
@@ -206,16 +206,17 @@ class ConflictVisibility:
206
206
  return any(i in text for i in self.left_out)
207
207
 
208
208
  def scrub(self, payload: dict[str, Any]) -> dict[str, Any]:
209
- """`payload` without the values of Attributes left out, and without a message or
210
- details naming something left out."""
209
+ """`payload` without the values of Attributes left out, and without a message,
210
+ details or provenance naming something left out."""
211
211
  if not self.left_out:
212
212
  return payload
213
213
  out = dict(payload)
214
214
  for name in (*_CONFLICT_SIDES, "values"):
215
215
  out[name] = _without(out.get(name), self.left_out)
216
- if self.names_left_out([out.get("message"), out.get("details")]):
216
+ if self.names_left_out([out.get("message"), out.get("details"), out.get("provenance")]):
217
217
  out["message"] = "The versions differ."
218
218
  out["details"] = {}
219
+ out.pop("provenance", None)
219
220
  return out
220
221
 
221
222
 
@@ -273,4 +273,18 @@ def test_record_level_conflicts_lose_values_and_messages_left_out() -> None:
273
273
  assert scrubbed["theirs"] == {"values": {}}
274
274
  assert scrubbed["details"] == {}
275
275
  assert supplier.id not in scrubbed["message"]
276
+ assert "provenance" not in scrubbed
276
277
  assert ConflictVisibility(None, UNCLEARED).scrub(payload) == payload
278
+
279
+
280
+ def test_provenance_naming_something_left_out_is_dropped() -> None:
281
+ hidden = "src_01JB8Z00000000000000000042"
282
+ stamp = {"provenance_id": "prv_1", "at": "2026-03-01T10:00:00+00:00", "source": hidden}
283
+ payload = {"ours": 1, "theirs": 2, "message": "m", "details": {}}
284
+ stamped = {**payload, "provenance": {"ours": stamp, "theirs": None}}
285
+ seen = ConflictVisibility(None, UNCLEARED, frozenset({hidden}))
286
+ scrubbed = seen.scrub(stamped)
287
+ assert "provenance" not in scrubbed
288
+ assert hidden not in str(scrubbed)
289
+ other = ConflictVisibility(None, UNCLEARED, frozenset({"knd_other"}))
290
+ assert other.scrub(stamped)["provenance"] == stamped["provenance"]