lorebase-keeper 0.2.3__tar.gz → 0.3.1__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_keeper-0.3.1/LICENSE +201 -0
- lorebase_keeper-0.3.1/PKG-INFO +53 -0
- lorebase_keeper-0.3.1/README.md +12 -0
- lorebase_keeper-0.3.1/pyproject.toml +55 -0
- lorebase_keeper-0.3.1/src/lorebase_keeper/__init__.py +1 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/context.py +100 -23
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/pack.py +25 -5
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/app.py +7 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/permissions.py +11 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/ports.py +2 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/scan.py +13 -46
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/readiness.py +50 -0
- lorebase_keeper-0.3.1/src/lorebase_keeper/reading/coverage.py +248 -0
- lorebase_keeper-0.3.1/src/lorebase_keeper/reading/lenses.py +70 -0
- lorebase_keeper-0.3.1/src/lorebase_keeper/reading/misses.py +228 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/requests.py +53 -1
- lorebase_keeper-0.3.1/src/lorebase_keeper/reading/resolve.py +877 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/runtime.py +11 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/search.py +213 -30
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/settings.py +193 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/views.py +124 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/agents.py +3 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/documents.py +280 -96
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/domain_api.py +4 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/domains.py +128 -12
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/operations.py +2 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/proposals.py +193 -116
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/read.py +85 -5
- lorebase_keeper-0.3.1/src/lorebase_keeper/routes/reconciliation.py +759 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/schema.py +18 -3
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/schema_suggestions.py +67 -11
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/agent_writes.py +16 -3
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/config.py +54 -9
- lorebase_keeper-0.3.1/src/lorebase_keeper/services/documents.py +386 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/domains.py +40 -6
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/operation_catalog.py +86 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/operations.py +85 -9
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/proposal_reads.py +107 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/proposals.py +322 -26
- lorebase_keeper-0.3.1/src/lorebase_keeper/services/reconciliation.py +1287 -0
- lorebase_keeper-0.3.1/src/lorebase_keeper/services/reconciliation_settle.py +84 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/schema.py +18 -4
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/schema_inference.py +4 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/schema_suggestions.py +76 -4
- lorebase_keeper-0.3.1/src/lorebase_keeper/services/stewards.py +240 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/settings.py +4 -0
- lorebase_keeper-0.3.1/tests/agents/test_lenses.py +267 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/conftest.py +7 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_proposal_read_authorization.py +3 -3
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_rbac.py +8 -1
- lorebase_keeper-0.3.1/tests/integration/resolve_shop.py +313 -0
- lorebase_keeper-0.3.1/tests/integration/test_coverage_api.py +347 -0
- lorebase_keeper-0.3.1/tests/integration/test_document_versions_api.py +245 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_read_api.py +4 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_readiness_postgres.py +41 -4
- lorebase_keeper-0.3.1/tests/integration/test_resolve_api.py +341 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_schema_suggestions_api.py +100 -0
- lorebase_keeper-0.3.1/tests/integration/test_search_presets_postgres.py +258 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_proposals_postgres.py +7 -0
- lorebase_keeper-0.3.1/tests/integration/writes/test_reconciliation_postgres.py +616 -0
- lorebase_keeper-0.3.1/tests/integration/writes/test_stewards_postgres.py +374 -0
- lorebase_keeper-0.3.1/tests/reading/test_misses.py +159 -0
- lorebase_keeper-0.3.1/tests/reading/test_resolve.py +127 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_health.py +2 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_proposals.py +44 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_read_replicas.py +9 -2
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_readiness_migrations.py +1 -1
- lorebase_keeper-0.3.1/tests/test_reconciliation.py +319 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_schema_inference.py +3 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_settings.py +2 -0
- lorebase_keeper-0.2.3/PKG-INFO +0 -21
- lorebase_keeper-0.2.3/pyproject.toml +0 -32
- lorebase_keeper-0.2.3/src/lorebase_keeper/__init__.py +0 -1
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/.gitignore +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/__main__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/budget.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/explain.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/feed.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/markdown.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/agents/settings.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/api_keys.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/audit.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/cache.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/config.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/deps.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/keyring.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/oidc.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/principals.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/provider.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/rbac.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/read_audit.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/runtime.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/auth/sessions.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/bootstrap.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/client_address.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/context.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/db.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/deps.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/errors.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/health.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/config.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/markdown.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/models.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/kindhealth/report.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/middleware.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/pagination.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/bucket.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/config.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/enforce.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/limiter.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/quotas.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/ratelimit/shared.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/caching.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/compiler.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/cursors.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/diff.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/graph.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/history.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/points.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/problems.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/record_history.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/records.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/sensitivity.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/snapshots.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/tree.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/reading/visibility.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/admin.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/branches.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/derivations.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/events.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/kind_health.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/proposal_items.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/revisions.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/schema_inference.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/sessions.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/source_preview.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/sources.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/trace.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/vault.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/webhooks.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/routes/whoami.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/branches.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/derivation_preview.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/document_urls.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/errors.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/operation_events.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/pii_import.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/reads.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/services/source_preview.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/__init__.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/capture.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/config.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/explain.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/middleware.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/notes.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/src/lorebase_keeper/tracing/recorder.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/conftest.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/snapshots/context_pack.md +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/snapshots/context_pack_trimmed.md +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/snapshots/explain_part.md +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/test_budget.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/test_rendering.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/test_scope.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/agents/test_settings.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_admin.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_api_key_authentication.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_api_keys.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_audit.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_auth_failure_limits.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_bootstrap.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_oidc.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_quotas.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_rate_limits.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_read_audit.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_read_authorization.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_schema_inference_access.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/auth/test_sessions.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/conftest.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/conftest.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/read_fixtures.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/snapshots/context_supplier_s1001.md +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/snapshots/explain_supplier_s1001.md +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/supply.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_agent_trace_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_agent_trace_rbac_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_agents_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_auth_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_change_feed.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_derivation_preview_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_derivations_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_derived_sensitivity_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_documents_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_expressions_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_extraction_vault_edits.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_health_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_invisible_kinds.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_limits_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_operation_events_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_overlay_reads_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_path_derivations_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_read_authorization.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_read_replicas_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_read_timing.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_record_history_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_record_lineage_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_search_bm25_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_search_tuning_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_sensitivity_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_sessions_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_source_preview_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_sources_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/test_time_travel_api.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/conftest.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_agent_writes_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_domains_branches_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_operations_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_pii_import_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_schema_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_sensitivity_writes_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_webhook_clearances_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/integration/writes/test_webhook_sealing_postgres.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/kindhealth/test_health_reports.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/ratelimit/test_rate_limit_buckets.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/ratelimit/test_shared_store.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/snapshots/located_trait.sql +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/snapshots/part_include.sql +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/snapshots/part_relations.sql +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/snapshots/supplier_filter_keyset.sql +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/snapshots/supplier_foreign_key.sql +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_caching.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_compiler.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_routes.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_sensitivity.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_settings.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/reading/test_visibility.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_agent_writes.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_client_address.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_conventions.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_cors.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_derivation_preview.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_document_urls.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_domain_routes.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_errors.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_main.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_operation_events.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_operations.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_pii_import.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_request_id.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_schema_changes.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_schema_search.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_security_headers.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/test_source_preview.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/tracing/test_capture.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/tests/tracing/test_trace_fields.py +0 -0
- {lorebase_keeper-0.2.3 → lorebase_keeper-0.3.1}/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.3.1
|
|
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.4,>=0.3
|
|
26
|
+
Requires-Dist: lorebase-platform<0.4,>=0.3
|
|
27
|
+
Requires-Dist: lorebase-store<0.4,>=0.3
|
|
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.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "lorebase-keeper"
|
|
3
|
+
version = "0.3.1"
|
|
4
|
+
description = "Lorebase Keeper: REST API service"
|
|
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.3,<0.4",
|
|
22
|
+
"lorebase-store>=0.3,<0.4",
|
|
23
|
+
"lorebase-platform>=0.3,<0.4",
|
|
24
|
+
"fastapi>=0.115",
|
|
25
|
+
"uvicorn>=0.30",
|
|
26
|
+
"pydantic>=2.7",
|
|
27
|
+
"opentelemetry-api>=1.25",
|
|
28
|
+
"asyncpg>=0.29", # readiness probe of the database (imported lazily)
|
|
29
|
+
"pgvector>=0.3", # vector column types of semantic search
|
|
30
|
+
"httpx>=0.27",
|
|
31
|
+
"PyJWT[crypto]>=2.8",
|
|
32
|
+
"python-multipart>=0.0.9", # form parser of Starlette: file uploads of POST schema:infer
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.optional-dependencies]
|
|
36
|
+
parquet = ["pyarrow>=15"] # Parquet uploads of POST schema:infer and schema:preview
|
|
37
|
+
mysql = ["asyncmy>=0.2.10"] # MySQL and MariaDB sources of POST schema:infer
|
|
38
|
+
mssql = ["pymssql>=2.3"] # SQL Server sources of POST schema:infer
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
lorebase-keeper = "lorebase_keeper.__main__:main"
|
|
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
|
+
|
|
50
|
+
[build-system]
|
|
51
|
+
requires = ["hatchling>=1.27"]
|
|
52
|
+
build-backend = "hatchling.build"
|
|
53
|
+
|
|
54
|
+
[tool.hatch.build.targets.wheel]
|
|
55
|
+
packages = ["src/lorebase_keeper"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.1"
|
|
@@ -45,6 +45,7 @@ from lorebase_keeper.agents.pack import (
|
|
|
45
45
|
from lorebase_keeper.agents.settings import ContextSettings
|
|
46
46
|
from lorebase_keeper.reading.compiler import record_columns
|
|
47
47
|
from lorebase_keeper.reading.history import REVISIONS
|
|
48
|
+
from lorebase_keeper.reading.lenses import resolve_lens, trait_kinds
|
|
48
49
|
from lorebase_keeper.reading.points import ReadPoint, not_found
|
|
49
50
|
from lorebase_keeper.reading.problems import invalid
|
|
50
51
|
from lorebase_keeper.reading.records import plan_query, require_kind, run_query
|
|
@@ -74,28 +75,77 @@ def timestamp(value: datetime | None) -> str | None:
|
|
|
74
75
|
|
|
75
76
|
@dataclass(frozen=True, slots=True)
|
|
76
77
|
class PackSettings:
|
|
78
|
+
"""What a request asks for once its lens is applied (design 8.8): members of the request
|
|
79
|
+
win over the lens's, which win over the settings."""
|
|
80
|
+
|
|
77
81
|
budget_tokens: int
|
|
78
82
|
depth: int
|
|
83
|
+
include_schema: bool = True
|
|
84
|
+
include_recent_changes: bool = True
|
|
85
|
+
include_lineage: bool = True
|
|
86
|
+
relations: tuple[str, ...] = ()
|
|
87
|
+
"""Relation ids of the lens, followed in both directions when the request names none."""
|
|
88
|
+
kinds: frozenset[str] | None = None
|
|
89
|
+
"""Ids of the Kinds that neighbors and `search` and `query` seeds are limited to, from the
|
|
90
|
+
request's `traits` or else the lens; `None`: no limit."""
|
|
91
|
+
capped: bool = False
|
|
92
|
+
"""A budget or depth of the lens was over the configured bounds and is served at them."""
|
|
79
93
|
|
|
80
94
|
|
|
81
95
|
def effective(
|
|
82
|
-
request: ContextRequest,
|
|
96
|
+
request: ContextRequest,
|
|
97
|
+
settings: ContextSettings,
|
|
98
|
+
runtime: ReadRuntime,
|
|
99
|
+
point: ReadPoint,
|
|
83
100
|
) -> PackSettings:
|
|
84
|
-
"""Budget and
|
|
85
|
-
|
|
86
|
-
|
|
101
|
+
"""Budget, depth, sections and Kinds of a request: its own members, else those of its
|
|
102
|
+
lens, else the settings. Values of the request over the configured bounds are 422; those
|
|
103
|
+
of a lens are served at the bounds (the pack says `capped`)."""
|
|
104
|
+
resolved = None if request.lens is None else resolve_lens(point, request.lens, "/body/lens")
|
|
105
|
+
lens = None if resolved is None else resolved.lens
|
|
106
|
+
capped = False
|
|
107
|
+
budget = request.budget_tokens
|
|
108
|
+
if budget is None:
|
|
109
|
+
budget = (lens.budget_tokens if lens else None) or settings.default_budget_tokens
|
|
110
|
+
if budget > settings.max_budget_tokens:
|
|
111
|
+
budget, capped = settings.max_budget_tokens, True
|
|
112
|
+
elif budget > settings.max_budget_tokens:
|
|
87
113
|
raise invalid(
|
|
88
114
|
"/body/budget_tokens", f"must not exceed {settings.max_budget_tokens}", "limit_exceeded"
|
|
89
115
|
)
|
|
90
|
-
depth = settings.default_depth if request.depth is None else request.depth
|
|
91
116
|
deepest = min(
|
|
92
117
|
settings.max_depth,
|
|
93
118
|
runtime.read.traverse.max_depth,
|
|
94
119
|
runtime.store_settings.traverse.max_depth,
|
|
95
120
|
)
|
|
96
|
-
|
|
121
|
+
depth = request.depth
|
|
122
|
+
if depth is None:
|
|
123
|
+
depth = settings.default_depth if lens is None or lens.depth is None else lens.depth
|
|
124
|
+
if depth > deepest:
|
|
125
|
+
depth, capped = deepest, True
|
|
126
|
+
elif depth > deepest:
|
|
97
127
|
raise invalid("/body/depth", f"must not exceed {deepest}", "limit_exceeded")
|
|
98
|
-
|
|
128
|
+
kinds: frozenset[str] | None = None
|
|
129
|
+
if request.traits is not None:
|
|
130
|
+
kinds = frozenset(k.id for k in trait_kinds(point, request.traits, "/body/traits"))
|
|
131
|
+
elif resolved is not None and resolved.kinds is not None:
|
|
132
|
+
kinds = frozenset(k.id for k in resolved.kinds)
|
|
133
|
+
|
|
134
|
+
def section(asked: bool | None, preset: bool | None) -> bool:
|
|
135
|
+
return asked if asked is not None else True if preset is None else preset
|
|
136
|
+
|
|
137
|
+
return PackSettings(
|
|
138
|
+
budget,
|
|
139
|
+
depth,
|
|
140
|
+
include_schema=section(request.include_schema, lens.include_schema if lens else None),
|
|
141
|
+
include_recent_changes=section(
|
|
142
|
+
request.include_recent_changes, lens.include_recent_changes if lens else None
|
|
143
|
+
),
|
|
144
|
+
include_lineage=section(request.include_lineage, lens.include_lineage if lens else None),
|
|
145
|
+
relations=lens.relations if lens else (),
|
|
146
|
+
kinds=kinds,
|
|
147
|
+
capped=capped,
|
|
148
|
+
)
|
|
99
149
|
|
|
100
150
|
|
|
101
151
|
# Seeds ----------------------------------------------------------------------------------------
|
|
@@ -107,8 +157,10 @@ async def seed_addresses(
|
|
|
107
157
|
point: ReadPoint,
|
|
108
158
|
request: ContextRequest,
|
|
109
159
|
settings: ContextSettings,
|
|
160
|
+
kinds: frozenset[str] | None = None,
|
|
110
161
|
) -> list[tuple[Kind, str]]:
|
|
111
|
-
"""`(Kind, key)` of the seeds, in request, query or ranking order, without repeats.
|
|
162
|
+
"""`(Kind, key)` of the seeds, in request, query or ranking order, without repeats.
|
|
163
|
+
`kinds` (ids) limits the Kinds of `query` and `search` seeds, never those of `refs`."""
|
|
112
164
|
cap = settings.max_seeds
|
|
113
165
|
found: list[tuple[str, str]] = []
|
|
114
166
|
if request.refs is not None:
|
|
@@ -129,11 +181,23 @@ async def seed_addresses(
|
|
|
129
181
|
session, runtime, point, plan, shape="context", cursor_pointer="/body/query/cursor"
|
|
130
182
|
)
|
|
131
183
|
found = [(item.kind, item.key) for item in page.items]
|
|
184
|
+
if kinds is not None:
|
|
185
|
+
allowed = {point.schema.kinds[k].api_name for k in kinds if k in point.schema.kinds}
|
|
186
|
+
found = [(kind, key) for kind, key in found if kind in allowed]
|
|
132
187
|
else:
|
|
133
188
|
assert request.search is not None
|
|
134
189
|
limit = min(cap, runtime.search.results.max_limit)
|
|
135
190
|
hits = await search(
|
|
136
|
-
session,
|
|
191
|
+
session,
|
|
192
|
+
runtime,
|
|
193
|
+
point,
|
|
194
|
+
SearchRequest(
|
|
195
|
+
q=request.search,
|
|
196
|
+
mode="lexical",
|
|
197
|
+
limit=limit,
|
|
198
|
+
traits=request.traits,
|
|
199
|
+
lens=request.lens,
|
|
200
|
+
),
|
|
137
201
|
)
|
|
138
202
|
found = [(hit.kind, hit.key) for hit in hits.items]
|
|
139
203
|
unique = list(dict.fromkeys(found))
|
|
@@ -203,8 +267,9 @@ async def surroundings(
|
|
|
203
267
|
seeds: Sequence[RecordOut],
|
|
204
268
|
request: ContextRequest,
|
|
205
269
|
settings: ContextSettings,
|
|
206
|
-
|
|
270
|
+
bounds: PackSettings,
|
|
207
271
|
) -> Surroundings:
|
|
272
|
+
depth = bounds.depth
|
|
208
273
|
if depth == 0 or not seeds:
|
|
209
274
|
return Surroundings((), (), False)
|
|
210
275
|
caps, walk = runtime.read.traverse, runtime.store_settings.traverse
|
|
@@ -216,7 +281,7 @@ async def surroundings(
|
|
|
216
281
|
point.schema,
|
|
217
282
|
[(require_kind(point, s.kind).id, s.key) for s in seeds],
|
|
218
283
|
depth=depth,
|
|
219
|
-
follow=_follow(point, request.relations),
|
|
284
|
+
follow=_follow(point, request.relations, bounds),
|
|
220
285
|
max_nodes=min(len(seeds) + settings.max_neighbors, caps.max_nodes, walk.max_nodes),
|
|
221
286
|
max_links=max(min(settings.max_links, caps.max_edges, walk.max_links), 1),
|
|
222
287
|
runtime=runtime.store,
|
|
@@ -264,14 +329,20 @@ async def surroundings(
|
|
|
264
329
|
return Surroundings(tuple(neighbors), ordered_links, found.truncated)
|
|
265
330
|
|
|
266
331
|
|
|
267
|
-
def _follow(
|
|
332
|
+
def _follow(
|
|
333
|
+
point: ReadPoint, names: list[str] | None, bounds: PackSettings | None = None
|
|
334
|
+
) -> dict[str, Direction]:
|
|
268
335
|
"""Relations to walk (id to direction): those named (forward or inverse api name; default:
|
|
269
|
-
all), in the directions named, between Kinds the caller may read.
|
|
336
|
+
those of the lens, else all), in the directions named, between Kinds the caller may read.
|
|
337
|
+
With `bounds.kinds`, a direction is walked only when it reaches a Kind of that set, so
|
|
338
|
+
other Kinds are neither returned nor walked through."""
|
|
270
339
|
schema = point.schema
|
|
271
340
|
wanted: dict[str, set[LinkDirection]] = defaultdict(set)
|
|
272
341
|
if names is None:
|
|
342
|
+
lens_relations = () if bounds is None else bounds.relations
|
|
273
343
|
for relation in schema.relations.values():
|
|
274
|
-
|
|
344
|
+
if not lens_relations or relation.id in lens_relations:
|
|
345
|
+
wanted[relation.id] = set(LinkDirection)
|
|
275
346
|
else:
|
|
276
347
|
for index, name in enumerate(names):
|
|
277
348
|
found = schema.relation_by_api_name(name)
|
|
@@ -284,6 +355,14 @@ def _follow(point: ReadPoint, names: list[str] | None) -> dict[str, Direction]:
|
|
|
284
355
|
ends = (schema.kinds.get(relation.from_kind), schema.kinds.get(relation.to_kind))
|
|
285
356
|
if any(kind is None or not point.scope.allows(kind.api_name) for kind in ends):
|
|
286
357
|
continue # Kinds the caller may not read are neither returned nor walked through
|
|
358
|
+
if bounds is not None and bounds.kinds is not None:
|
|
359
|
+
reached = {
|
|
360
|
+
LinkDirection.FORWARD: relation.to_kind,
|
|
361
|
+
LinkDirection.INVERSE: relation.from_kind,
|
|
362
|
+
}
|
|
363
|
+
directions = {d for d in directions if reached[d] in bounds.kinds}
|
|
364
|
+
if not directions:
|
|
365
|
+
continue
|
|
287
366
|
if len(directions) == 2:
|
|
288
367
|
follow[relation_id] = Direction.BOTH
|
|
289
368
|
else:
|
|
@@ -444,14 +523,14 @@ async def build_pack(
|
|
|
444
523
|
settings: ContextSettings,
|
|
445
524
|
) -> tuple[bytes, str]:
|
|
446
525
|
"""The rendered pack and its media type."""
|
|
447
|
-
bounds = effective(request, settings, runtime)
|
|
526
|
+
bounds = effective(request, settings, runtime, context.point)
|
|
448
527
|
point = await with_rows(session, runtime, context.point, "Context packs")
|
|
449
|
-
addresses = await seed_addresses(session, runtime, point, request, settings)
|
|
528
|
+
addresses = await seed_addresses(session, runtime, point, request, settings, bounds.kinds)
|
|
450
529
|
rows = await fetch_rows(session, point, addresses)
|
|
451
530
|
seeds = [record_out(point.schema, row, masking=point.masking) for row in rows]
|
|
452
|
-
around = await surroundings(session, runtime, point, seeds, request, settings, bounds
|
|
531
|
+
around = await surroundings(session, runtime, point, seeds, request, settings, bounds)
|
|
453
532
|
changes = None
|
|
454
|
-
if
|
|
533
|
+
if bounds.include_recent_changes:
|
|
455
534
|
records = list(addresses)
|
|
456
535
|
for neighbor in around.neighbors:
|
|
457
536
|
kind = point.schema.kind_by_api_name(neighbor.kind)
|
|
@@ -465,9 +544,7 @@ async def build_pack(
|
|
|
465
544
|
floor=context.floor,
|
|
466
545
|
limit=settings.recent_changes_max,
|
|
467
546
|
)
|
|
468
|
-
lineage = (
|
|
469
|
-
await lineage_items(session, runtime, point, rows) if request.include_lineage else None
|
|
470
|
-
)
|
|
547
|
+
lineage = await lineage_items(session, runtime, point, rows) if bounds.include_lineage else None
|
|
471
548
|
draft = Draft(
|
|
472
549
|
seeds=tuple(
|
|
473
550
|
SeedItem(
|
|
@@ -481,7 +558,7 @@ async def build_pack(
|
|
|
481
558
|
),
|
|
482
559
|
neighbors=around.neighbors,
|
|
483
560
|
links=around.links,
|
|
484
|
-
schema=
|
|
561
|
+
schema=bounds.include_schema,
|
|
485
562
|
changes=changes,
|
|
486
563
|
lineage=lineage,
|
|
487
564
|
)
|
|
@@ -499,7 +576,7 @@ async def build_pack(
|
|
|
499
576
|
draft,
|
|
500
577
|
budget_tokens=bounds.budget_tokens,
|
|
501
578
|
chars_per_token=settings.chars_per_token,
|
|
502
|
-
capped=around.capped,
|
|
579
|
+
capped=around.capped or bounds.capped,
|
|
503
580
|
)
|
|
504
581
|
if markdown:
|
|
505
582
|
# References are resolved when the pack is sent, from the envelope (never by
|
|
@@ -56,11 +56,28 @@ class ContextRequest(BaseModel):
|
|
|
56
56
|
depth: int | None = Field(default=None, ge=0, description="Neighborhood depth (0: none).")
|
|
57
57
|
relations: list[str] | None = Field(
|
|
58
58
|
default=None,
|
|
59
|
-
description="Relation api names to follow (forward or inverse); default: all
|
|
59
|
+
description="Relation api names to follow (forward or inverse); default: all, or the "
|
|
60
|
+
"Relations of `lens`.",
|
|
61
|
+
)
|
|
62
|
+
traits: list[str] | None = Field(
|
|
63
|
+
default=None,
|
|
64
|
+
description="Trait api names: with `search` or `query` seeds, only Records of the "
|
|
65
|
+
"Kinds implementing them (that the caller may read) become seeds, and only Records of "
|
|
66
|
+
"those Kinds are neighbors. Seeds named by `refs` are always kept.",
|
|
67
|
+
)
|
|
68
|
+
lens: str | None = Field(
|
|
69
|
+
default=None,
|
|
70
|
+
description="Lens api name (a read preset of the schema): its Relations, depth, "
|
|
71
|
+
"sections and budget are the defaults of this request, its Kinds and Traits limit "
|
|
72
|
+
"neighbors and `search` and `query` seeds like `traits`. Members given here win.",
|
|
73
|
+
)
|
|
74
|
+
include_schema: bool | None = Field(default=None, description="Default: the lens's, else true.")
|
|
75
|
+
include_recent_changes: bool | None = Field(
|
|
76
|
+
default=None, description="Default: the lens's, else true."
|
|
77
|
+
)
|
|
78
|
+
include_lineage: bool | None = Field(
|
|
79
|
+
default=None, description="Default: the lens's, else true."
|
|
60
80
|
)
|
|
61
|
-
include_schema: bool = True
|
|
62
|
-
include_recent_changes: bool = True
|
|
63
|
-
include_lineage: bool = True
|
|
64
81
|
since: str | None = Field(
|
|
65
82
|
default=None,
|
|
66
83
|
description="Revision id or tag: recent changes after it; default: the latest changes.",
|
|
@@ -167,7 +184,10 @@ class BudgetOut(_Out):
|
|
|
167
184
|
trimmed: list[TrimOut]
|
|
168
185
|
omitted: dict[str, int] = Field(description="Entries removed to fit, per section.")
|
|
169
186
|
over_budget: bool = Field(description="True when even the seed Records exceed the budget.")
|
|
170
|
-
capped: bool = Field(
|
|
187
|
+
capped: bool = Field(
|
|
188
|
+
description="True when graph caps cut the neighborhood, or a depth or budget of the "
|
|
189
|
+
"lens was served at the configured cap."
|
|
190
|
+
)
|
|
171
191
|
|
|
172
192
|
|
|
173
193
|
class ContextPackOut(_Out):
|
|
@@ -45,6 +45,7 @@ from lorebase_keeper.readiness import (
|
|
|
45
45
|
ReadinessCheck,
|
|
46
46
|
ReplicaCheck,
|
|
47
47
|
SearchBackendCheck,
|
|
48
|
+
VectorSearchCheck,
|
|
48
49
|
default_checks,
|
|
49
50
|
packaged_heads,
|
|
50
51
|
run_checks,
|
|
@@ -187,6 +188,8 @@ def create_app(
|
|
|
187
188
|
search_check = SearchBackendCheck(database.sessions, definer=definer)
|
|
188
189
|
if readiness_checks is None:
|
|
189
190
|
checks.append(search_check)
|
|
191
|
+
if database is not None and readiness_checks is None:
|
|
192
|
+
checks.append(VectorSearchCheck(database.sessions, search_settings(settings).semantic))
|
|
190
193
|
store = auth_store or (database.auth_store if database else None)
|
|
191
194
|
if keeper.auth.mode != "none" and store is None:
|
|
192
195
|
raise ConfigError(
|
|
@@ -219,7 +222,7 @@ def create_app(
|
|
|
219
222
|
traces = _trace_recorder(keeper.trace, database, trace_sink, telemetry)
|
|
220
223
|
|
|
221
224
|
@asynccontextmanager
|
|
222
|
-
async def lifespan(
|
|
225
|
+
async def lifespan(application: FastAPI) -> AsyncIterator[None]:
|
|
223
226
|
if search_check is not None:
|
|
224
227
|
found = (await run_checks([search_check], keeper.readiness.timeout_s))[
|
|
225
228
|
search_check.name
|
|
@@ -229,6 +232,9 @@ def create_app(
|
|
|
229
232
|
try:
|
|
230
233
|
yield
|
|
231
234
|
finally:
|
|
235
|
+
read_runtime = getattr(application.state, "read_runtime", None)
|
|
236
|
+
if read_runtime is not None and read_runtime.misses is not None:
|
|
237
|
+
await read_runtime.misses.aclose()
|
|
232
238
|
if reads is not None:
|
|
233
239
|
await reads.aclose()
|
|
234
240
|
if traces is not None:
|