lorebase-store 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.
- lorebase_store-0.4.0/LICENSE +201 -0
- lorebase_store-0.4.0/PKG-INFO +44 -0
- lorebase_store-0.4.0/README.md +13 -0
- lorebase_store-0.4.0/migrations/versions/0048_open_conflicts_by_element.py +41 -0
- lorebase_store-0.4.0/pyproject.toml +50 -0
- lorebase_store-0.4.0/src/lorebase_store/__init__.py +1 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/audit.py +2 -1
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/merging/service.py +3 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/proposals.py +8 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/__init__.py +2 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/merges.py +71 -2
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_models.py +1 -1
- lorebase_store-0.3.0/PKG-INFO +0 -13
- lorebase_store-0.3.0/pyproject.toml +0 -29
- lorebase_store-0.3.0/src/lorebase_store/__init__.py +0 -1
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/.gitignore +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/alembic.ini +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/env.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/script.py.mako +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0001_initial_schema.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0002_merge_attempt_details.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0003_webhooks.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0004_defer_revision_references.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0005_security_definer_reads.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0006_api_key_usage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0007_document_extraction.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0008_definer_argument_checks.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0009_api_key_networks.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0010_overlay_branches.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0011_branch_scoped_search_index.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0012_overlay_neighborhood_lookups.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0013_web_sessions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0014_embedding_jobs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0015_append_only_audit_log.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0016_sealed_webhook_keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0017_background_branch_copies.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0018_search_lexicon.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0019_vault_bindings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0020_outbox_consumers.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0021_schema_suggestions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0022_read_audit_and_shared_rate_limits.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0023_agent_trace.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0024_embedding_template_keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0025_snapshot_refs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0026_plain_reverse_link_index.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0027_vault_rotation_and_tombstones.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0028_operation_deferred_events.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0029_agent_trace_sessions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0030_path_fanout.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0031_branch_builds.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0032_lineage_revisions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0033_vault_moved_tokens.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0034_inference_endpoint_modes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0035_search_truncation.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0036_lineage_maps.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0037_bm25_search.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0038_reconciliation_candidates.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0039_reconciliation_lookups.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0040_source_written.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0041_document_versions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0042_proposal_kinds.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0043_source_last_seen.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0044_mat_records_object_hash_index.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0045_value_index.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0046_vocabulary_and_coverage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0047_value_index_limits.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/approval_rules.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/api_keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/checkpoints.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/grants.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/principals.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/scope.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/sessions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/unit.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/auth/usage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/blobs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/bm25.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/bulk.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/bundle.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/changefeed.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/changes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/errors.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/migrations.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/pipeline.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/commit/schema.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/coverage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/db.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/definer.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/digests.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/duplicates.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/embeddings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/endpoint_modes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/items.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/materialize.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/modes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/proposal.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/extraction/review.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/gc.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/indexes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/jobs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/keyring.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/layout.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/apply.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/background.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/branch.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/build.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/derived.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/lineage_backfill.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/links.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/overlay.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/paths.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/rebuild.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/rows.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/sensitivity.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/snapshot.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/stale.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/materialize/verify.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/merging/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/merging/attempts.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/merging/lineage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/merging/preserved.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/migrations.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/base.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/enums.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/governance.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/ingestion.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/materialized.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/queues.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/reconciliation.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/tracing.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/versioning.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/models/webhooks.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/nodestore.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/objectstore.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/outbox_events.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/delimited.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/postgres.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/record_files.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/records.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/profiling/sql_databases.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/ratelimit.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/reads.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/reconciliation.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/replicas.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/changesets.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/deferred_events.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/documents.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/domains.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/events.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/index_view.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/invocations.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/materializations.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/materialized.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/proposal_items.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/proposals.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/provenance.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/quotes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/reconciliation_candidates.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/refs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/revisions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/scope.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/source_runs.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/source_written.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/repositories/suggestions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/resolve_misses.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/runtime.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/schema_cache.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/settings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/storage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/telemetry.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/testing.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/tracing.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/traverse.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/values.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/quotes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/rotation.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/settings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/store.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/vault/transfer.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/__init__.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/delivery.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/repository.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/settings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/src/lorebase_store/webhooks/signing.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/conftest.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_audit_append_only_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_audit_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_audit_streams_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_principals_api_keys_grants_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_rls_scope.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/auth/test_sessions_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/conftest.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/read_support.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/support.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_approval_rules.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_background_branches.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_background_pace.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_bm25.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_bundle.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_bundle_limits.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_bundle_vault.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_bundle_vault_values.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_commit.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_commit_helpers.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_definer_checks.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_derived.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_document_quotes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_ef_search.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_endpoint_modes_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_extraction_items.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_extraction_modes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_gc.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_indexes.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_jobs_depth.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_lineage_backfill.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_materialize.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_merging.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_migration_revisions.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_nodestore.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_outbox_events.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_outbox_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_overlay.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_profiling.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_profiling_record_files.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_profiling_records.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_profiling_sql.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_ratelimit_buckets_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_reads.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_reconciliation_candidates_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_reconciliation_wrapping.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_replicas.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_repositories.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_schema_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_search_bm25.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_sensitivity_refresh.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_settings.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_storage.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_suggestion_fold.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_suggestion_repository_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_traverse.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_values.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_vault.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_webhook_keys.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_webhook_keys_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_webhook_timeouts_integration.py +0 -0
- {lorebase_store-0.3.0 → lorebase_store-0.4.0}/tests/test_webhooks.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,44 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: lorebase-store
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Lorebase store: persistence, repositories, migrations and materializer
|
|
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: alembic>=1.13
|
|
23
|
+
Requires-Dist: asyncpg>=0.29
|
|
24
|
+
Requires-Dist: cryptography>=42
|
|
25
|
+
Requires-Dist: lorebase-core<0.5,>=0.4
|
|
26
|
+
Requires-Dist: lorebase-platform<0.5,>=0.4
|
|
27
|
+
Requires-Dist: opentelemetry-api>=1.25
|
|
28
|
+
Requires-Dist: pgvector>=0.3
|
|
29
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.30
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# lorebase-store
|
|
33
|
+
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
The persistence layer of Lorebase on Postgres with pgvector: repositories, Alembic migrations (shipped in the wheel) and the materializer of branch heads.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pip install lorebase-store
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
It is a library of the other Lorebase packages and has no command of its own.
|
|
43
|
+
|
|
44
|
+
Documentation: [Store schema notes](https://aantenore.github.io/lorebase/store-schema-notes/) and the [documentation site](https://aantenore.github.io/lorebase/). License: Apache-2.0.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# lorebase-store
|
|
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
|
+
The persistence layer of Lorebase on Postgres with pgvector: repositories, Alembic migrations (shipped in the wheel) and the materializer of branch heads.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
pip install lorebase-store
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
It is a library of the other Lorebase packages and has no command of its own.
|
|
12
|
+
|
|
13
|
+
Documentation: [Store schema notes](https://aantenore.github.io/lorebase/store-schema-notes/) and the [documentation site](https://aantenore.github.io/lorebase/). License: Apache-2.0.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Open Conflicts by element (design 6.10).
|
|
2
|
+
|
|
3
|
+
A read of a Record can ask whether a Conflict about it waits for a decision in an open
|
|
4
|
+
Proposal. `conflicts` was only reachable by attempt, so that question would scan every
|
|
5
|
+
Conflict of every conflicted attempt. The partial index `ix_conflicts_open_element` over
|
|
6
|
+
`(domain_id, partition, element_key)` holds the unresolved Conflicts only: resolved rows, the
|
|
7
|
+
bulk of a table that keeps merged attempts, are left out, and the lookup of one Record is one
|
|
8
|
+
probe that finds nothing in the common case.
|
|
9
|
+
|
|
10
|
+
Revision ID: 0048
|
|
11
|
+
Revises: 0047
|
|
12
|
+
Create Date: 2026-11-13 09:00:00.000000
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
from collections.abc import Sequence
|
|
18
|
+
|
|
19
|
+
import sqlalchemy as sa
|
|
20
|
+
from alembic import op
|
|
21
|
+
|
|
22
|
+
revision: str = "0048"
|
|
23
|
+
down_revision: str | Sequence[str] | None = "0047"
|
|
24
|
+
branch_labels: str | Sequence[str] | None = None
|
|
25
|
+
depends_on: str | Sequence[str] | None = None
|
|
26
|
+
|
|
27
|
+
TABLE = "conflicts"
|
|
28
|
+
INDEX = "ix_conflicts_open_element"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def upgrade() -> None:
|
|
32
|
+
op.create_index(
|
|
33
|
+
INDEX,
|
|
34
|
+
TABLE,
|
|
35
|
+
["domain_id", "partition", "element_key"],
|
|
36
|
+
postgresql_where=sa.text("resolved_by IS NULL"),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def downgrade() -> None:
|
|
41
|
+
op.drop_index(INDEX, table_name=TABLE)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "lorebase-store"
|
|
3
|
+
version = "0.4.0"
|
|
4
|
+
description = "Lorebase store: persistence, repositories, migrations and materializer"
|
|
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
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"lorebase-core>=0.4,<0.5",
|
|
22
|
+
"lorebase-platform>=0.4,<0.5",
|
|
23
|
+
"sqlalchemy[asyncio]>=2.0.30",
|
|
24
|
+
"asyncpg>=0.29",
|
|
25
|
+
"alembic>=1.13",
|
|
26
|
+
"pgvector>=0.3",
|
|
27
|
+
"opentelemetry-api>=1.25",
|
|
28
|
+
"cryptography>=42", # AES-GCM and HKDF of lorebase_store.keyring
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[dependency-groups]
|
|
32
|
+
dev = ["testcontainers[postgres]>=4.8"]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
Homepage = "https://github.com/aantenore/lorebase"
|
|
36
|
+
Documentation = "https://aantenore.github.io/lorebase/"
|
|
37
|
+
Repository = "https://github.com/aantenore/lorebase"
|
|
38
|
+
Changelog = "https://github.com/aantenore/lorebase/blob/main/CHANGELOG.md"
|
|
39
|
+
Issues = "https://github.com/aantenore/lorebase/issues"
|
|
40
|
+
|
|
41
|
+
[build-system]
|
|
42
|
+
requires = ["hatchling>=1.27"]
|
|
43
|
+
build-backend = "hatchling.build"
|
|
44
|
+
|
|
45
|
+
[tool.hatch.build.targets.wheel]
|
|
46
|
+
packages = ["src/lorebase_store"]
|
|
47
|
+
|
|
48
|
+
# Ship the Alembic environment so installed services can resolve the expected head revisions.
|
|
49
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
50
|
+
"migrations" = "lorebase_store/_migrations"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0"
|
|
@@ -33,6 +33,7 @@ from enum import Enum, StrEnum
|
|
|
33
33
|
from typing import Any
|
|
34
34
|
|
|
35
35
|
from sqlalchemy import ColumnElement, insert, select, text
|
|
36
|
+
from sqlalchemy.dialects.postgresql import distinct_on
|
|
36
37
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
37
38
|
|
|
38
39
|
from lorebase_core.canonical import jcs_bytes
|
|
@@ -279,7 +280,7 @@ class AuditRepository:
|
|
|
279
280
|
model = self._model
|
|
280
281
|
statement = (
|
|
281
282
|
select(model.domain_id, model.seq, model.entry_hash)
|
|
282
|
-
.
|
|
283
|
+
.ext(distinct_on(model.domain_id))
|
|
283
284
|
.order_by(model.domain_id, model.seq.desc())
|
|
284
285
|
)
|
|
285
286
|
async with rls_scope(self._session, bypass=True):
|
|
@@ -822,6 +822,9 @@ def _summary(computation: AttemptComputation) -> dict[str, Any]:
|
|
|
822
822
|
def _conflict_row(state: ConflictState, stored: Mapping[str, ResolutionRow]) -> ConflictRow:
|
|
823
823
|
conflict = state.conflict
|
|
824
824
|
payload = conflict.model_dump(mode="json")
|
|
825
|
+
if payload.get("provenance") is None:
|
|
826
|
+
# Stored only when the merge knew who changed a side: other payloads keep their shape.
|
|
827
|
+
payload.pop("provenance", None)
|
|
825
828
|
payload["members"] = list(state.members)
|
|
826
829
|
if state.rejected:
|
|
827
830
|
payload["details"] = {**payload.get("details", {}), "rejected": REJECTED_DETAIL}
|
|
@@ -169,6 +169,14 @@ class Conflict(Base):
|
|
|
169
169
|
ondelete="CASCADE",
|
|
170
170
|
),
|
|
171
171
|
UniqueConstraint("domain_id", "attempt_id", "fingerprint"),
|
|
172
|
+
# Reads that ask whether a Record has a Conflict waiting for a decision (design 6.10).
|
|
173
|
+
Index(
|
|
174
|
+
"ix_conflicts_open_element",
|
|
175
|
+
"domain_id",
|
|
176
|
+
"partition",
|
|
177
|
+
"element_key",
|
|
178
|
+
postgresql_where=text("resolved_by IS NULL"),
|
|
179
|
+
),
|
|
172
180
|
)
|
|
173
181
|
|
|
174
182
|
domain_id: Mapped[DomainKey]
|
|
@@ -48,6 +48,7 @@ from lorebase_store.repositories.merges import (
|
|
|
48
48
|
MergeAttemptRepository,
|
|
49
49
|
MergeAttemptRow,
|
|
50
50
|
PartitionFilter,
|
|
51
|
+
PendingConflictRow,
|
|
51
52
|
ResolutionRepository,
|
|
52
53
|
ResolutionRow,
|
|
53
54
|
)
|
|
@@ -142,6 +143,7 @@ __all__ = [
|
|
|
142
143
|
"MergeOutcome",
|
|
143
144
|
"OutboxRepository",
|
|
144
145
|
"PartitionFilter",
|
|
146
|
+
"PendingConflictRow",
|
|
145
147
|
"PgRevisionGraph",
|
|
146
148
|
"PreservedRow",
|
|
147
149
|
"ProposalChecks",
|
|
@@ -14,13 +14,15 @@ from datetime import datetime
|
|
|
14
14
|
from typing import Any
|
|
15
15
|
|
|
16
16
|
from sqlalchemy import Select, Table, delete, func, insert, or_, select, update
|
|
17
|
+
from sqlalchemy.dialects.postgresql import distinct_on
|
|
17
18
|
from sqlalchemy.dialects.postgresql import insert as pg_insert
|
|
18
19
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
19
20
|
|
|
20
21
|
from lorebase_store.bulk import chunks
|
|
21
22
|
from lorebase_store.models import metadata
|
|
22
|
-
from lorebase_store.models.enums import MergeAttemptStatus
|
|
23
|
+
from lorebase_store.models.enums import MergeAttemptStatus, ProposalStatus
|
|
23
24
|
|
|
25
|
+
PROPOSALS: Table = metadata.tables["proposals"]
|
|
24
26
|
ATTEMPTS: Table = metadata.tables["merge_attempts"]
|
|
25
27
|
CONFLICTS: Table = metadata.tables["conflicts"]
|
|
26
28
|
RESOLUTIONS: Table = metadata.tables["conflict_resolutions"]
|
|
@@ -68,6 +70,20 @@ class ConflictRow:
|
|
|
68
70
|
return self.resolved_by is not None
|
|
69
71
|
|
|
70
72
|
|
|
73
|
+
@dataclass(frozen=True, slots=True)
|
|
74
|
+
class PendingConflictRow:
|
|
75
|
+
"""An open Conflict about one element, as a reader of the target branch is told: the
|
|
76
|
+
Proposal it blocks, its id and code, the Attribute (None for a Conflict about the whole
|
|
77
|
+
element) and the hash of the competing element on the Proposal's source side."""
|
|
78
|
+
|
|
79
|
+
proposal_id: str
|
|
80
|
+
source_ref: str
|
|
81
|
+
fingerprint: str
|
|
82
|
+
code: str
|
|
83
|
+
attribute_id: str | None
|
|
84
|
+
competing_hash: str | None
|
|
85
|
+
|
|
86
|
+
|
|
71
87
|
@dataclass(frozen=True, slots=True)
|
|
72
88
|
class ResolutionRow:
|
|
73
89
|
fingerprint: str
|
|
@@ -149,7 +165,7 @@ class MergeAttemptRepository:
|
|
|
149
165
|
return {}
|
|
150
166
|
result = await self._session.execute(
|
|
151
167
|
select(ATTEMPTS)
|
|
152
|
-
.
|
|
168
|
+
.ext(distinct_on(ATTEMPTS.c.proposal_id))
|
|
153
169
|
.where(
|
|
154
170
|
ATTEMPTS.c.domain_id == self._domain,
|
|
155
171
|
ATTEMPTS.c.proposal_id.in_(list(proposal_ids)),
|
|
@@ -347,6 +363,59 @@ class ConflictRepository:
|
|
|
347
363
|
)
|
|
348
364
|
return frozenset((await self._session.execute(query)).scalars())
|
|
349
365
|
|
|
366
|
+
async def pending(
|
|
367
|
+
self, target: str, partition: str, element_key: str
|
|
368
|
+
) -> list[PendingConflictRow]:
|
|
369
|
+
"""The open Conflicts about one element in the open Proposals into `target`.
|
|
370
|
+
|
|
371
|
+
Only the current attempt of a Proposal counts (`conflicted`: a recomputation marks the
|
|
372
|
+
earlier ones `stale`, closing the Proposal `abandoned`). The lookup starts from the
|
|
373
|
+
partial index of unresolved Conflicts (`ix_conflicts_open_element`), so a Record
|
|
374
|
+
nobody contests costs one index probe.
|
|
375
|
+
"""
|
|
376
|
+
query = (
|
|
377
|
+
select(
|
|
378
|
+
ATTEMPTS.c.proposal_id,
|
|
379
|
+
PROPOSALS.c.source_ref,
|
|
380
|
+
CONFLICTS.c.id,
|
|
381
|
+
CONFLICTS.c.code,
|
|
382
|
+
CONFLICTS.c.attribute_id,
|
|
383
|
+
CONFLICTS.c.payload["theirs_hash"].astext.label("competing_hash"),
|
|
384
|
+
)
|
|
385
|
+
.join(
|
|
386
|
+
ATTEMPTS,
|
|
387
|
+
(ATTEMPTS.c.domain_id == CONFLICTS.c.domain_id)
|
|
388
|
+
& (ATTEMPTS.c.id == CONFLICTS.c.attempt_id),
|
|
389
|
+
)
|
|
390
|
+
.join(
|
|
391
|
+
PROPOSALS,
|
|
392
|
+
(PROPOSALS.c.domain_id == ATTEMPTS.c.domain_id)
|
|
393
|
+
& (PROPOSALS.c.id == ATTEMPTS.c.proposal_id),
|
|
394
|
+
)
|
|
395
|
+
.where(
|
|
396
|
+
CONFLICTS.c.domain_id == self._domain,
|
|
397
|
+
CONFLICTS.c.partition == partition,
|
|
398
|
+
CONFLICTS.c.element_key == element_key,
|
|
399
|
+
CONFLICTS.c.resolved_by.is_(None),
|
|
400
|
+
ATTEMPTS.c.status == MergeAttemptStatus.CONFLICTED,
|
|
401
|
+
PROPOSALS.c.status == ProposalStatus.OPEN,
|
|
402
|
+
PROPOSALS.c.target_ref == target,
|
|
403
|
+
)
|
|
404
|
+
.order_by(ATTEMPTS.c.proposal_id, CONFLICTS.c.id)
|
|
405
|
+
)
|
|
406
|
+
result = await self._session.execute(query)
|
|
407
|
+
return [
|
|
408
|
+
PendingConflictRow(
|
|
409
|
+
proposal_id=row.proposal_id,
|
|
410
|
+
source_ref=row.source_ref,
|
|
411
|
+
fingerprint=row.id,
|
|
412
|
+
code=row.code,
|
|
413
|
+
attribute_id=row.attribute_id,
|
|
414
|
+
competing_hash=row.competing_hash,
|
|
415
|
+
)
|
|
416
|
+
for row in result
|
|
417
|
+
]
|
|
418
|
+
|
|
350
419
|
|
|
351
420
|
class ResolutionRepository:
|
|
352
421
|
"""Resolutions of the Proposals of one Domain, by Conflict fingerprint."""
|
lorebase_store-0.3.0/PKG-INFO
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: lorebase-store
|
|
3
|
-
Version: 0.3.0
|
|
4
|
-
Summary: Lorebase store: persistence, repositories, migrations and materializer
|
|
5
|
-
Requires-Python: >=3.12
|
|
6
|
-
Requires-Dist: alembic>=1.13
|
|
7
|
-
Requires-Dist: asyncpg>=0.29
|
|
8
|
-
Requires-Dist: cryptography>=42
|
|
9
|
-
Requires-Dist: lorebase-core<0.4,>=0.3
|
|
10
|
-
Requires-Dist: lorebase-platform<0.4,>=0.3
|
|
11
|
-
Requires-Dist: opentelemetry-api>=1.25
|
|
12
|
-
Requires-Dist: pgvector>=0.3
|
|
13
|
-
Requires-Dist: sqlalchemy[asyncio]>=2.0.30
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "lorebase-store"
|
|
3
|
-
version = "0.3.0"
|
|
4
|
-
description = "Lorebase store: persistence, repositories, migrations and materializer"
|
|
5
|
-
requires-python = ">=3.12"
|
|
6
|
-
dependencies = [
|
|
7
|
-
"lorebase-core>=0.3,<0.4",
|
|
8
|
-
"lorebase-platform>=0.3,<0.4",
|
|
9
|
-
"sqlalchemy[asyncio]>=2.0.30",
|
|
10
|
-
"asyncpg>=0.29",
|
|
11
|
-
"alembic>=1.13",
|
|
12
|
-
"pgvector>=0.3",
|
|
13
|
-
"opentelemetry-api>=1.25",
|
|
14
|
-
"cryptography>=42", # AES-GCM and HKDF of lorebase_store.keyring
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
[dependency-groups]
|
|
18
|
-
dev = ["testcontainers[postgres]>=4.8"]
|
|
19
|
-
|
|
20
|
-
[build-system]
|
|
21
|
-
requires = ["hatchling"]
|
|
22
|
-
build-backend = "hatchling.build"
|
|
23
|
-
|
|
24
|
-
[tool.hatch.build.targets.wheel]
|
|
25
|
-
packages = ["src/lorebase_store"]
|
|
26
|
-
|
|
27
|
-
# Ship the Alembic environment so installed services can resolve the expected head revisions.
|
|
28
|
-
[tool.hatch.build.targets.wheel.force-include]
|
|
29
|
-
"migrations" = "lorebase_store/_migrations"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.3.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0002_merge_attempt_details.py
RENAMED
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0004_defer_revision_references.py
RENAMED
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0005_security_definer_reads.py
RENAMED
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0007_document_extraction.py
RENAMED
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0008_definer_argument_checks.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0011_branch_scoped_search_index.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0015_append_only_audit_log.py
RENAMED
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0016_sealed_webhook_keys.py
RENAMED
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0017_background_branch_copies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0021_schema_suggestions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0024_embedding_template_keys.py
RENAMED
|
File without changes
|
|
File without changes
|
{lorebase_store-0.3.0 → lorebase_store-0.4.0}/migrations/versions/0026_plain_reverse_link_index.py
RENAMED
|
File without changes
|