kodit 0.5.5__tar.gz → 0.5.7__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.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.5.5 → kodit-0.5.7}/PKG-INFO +1 -1
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/index.md +1 -1
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/openapi.json +4 -2
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/_version.py +2 -2
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/app.py +2 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/factories/server_factory.py +4 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/commit_indexing_application_service.py +276 -3
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/enrichment_query_service.py +37 -0
- kodit-0.5.7/src/kodit/domain/enrichments/architecture/database_schema/__init__.py +1 -0
- kodit-0.5.7/src/kodit/domain/enrichments/architecture/database_schema/database_schema.py +17 -0
- kodit-0.5.7/src/kodit/domain/enrichments/history/__init__.py +1 -0
- kodit-0.5.7/src/kodit/domain/enrichments/history/commit_description/__init__.py +1 -0
- kodit-0.5.7/src/kodit/domain/enrichments/history/commit_description/commit_description.py +17 -0
- kodit-0.5.7/src/kodit/domain/enrichments/history/history.py +18 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/protocols.py +15 -2
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/git_repository_service.py +36 -81
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/value_objects.py +4 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/git_python_adaptor.py +56 -5
- kodit-0.5.7/src/kodit/infrastructure/database_schema/__init__.py +1 -0
- kodit-0.5.7/src/kodit/infrastructure/database_schema/database_schema_detector.py +268 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/enrichment_v2_repository.py +29 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/commit_indexing_application_service_test.py +1 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/services/git_repository_service_test.py +3 -1
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git/git_python_adaptor_test.py +3 -7
- {kodit-0.5.5 → kodit-0.5.7}/tests/smoke.py +1 -1
- {kodit-0.5.5 → kodit-0.5.7}/.claude/commands/debug.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.claude/commands/new-requirement.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.claude/commands/refactor.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.claude/commands/update-docs.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.claude/settings.json +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.cursor/rules/style.mdc +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.dockerignore +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/dependabot.yml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/docker.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/docs.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.github/workflows/test.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.gitignore +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.python-version +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.vscode/launch.json +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/.vscode/settings.json +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/CLAUDE.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/Dockerfile +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/LICENSE +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/Makefile +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/README.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/alembic.ini +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/_index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/demos/_index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/demos/go-simple-microservice/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/demos/knock-knock-auth/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/developer/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/getting-started/_index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/_index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/templates/_content.md.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/templates/_example.md.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/templates/_object_schema.md.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/templates/_security_scheme.md.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/api/templates/api_doc_template.md.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/configuration/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/configuration/templates/template.j2 +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/deployment/docker-compose.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/deployment/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/deployment/kubernetes.yaml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/hosted-kodit/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/indexing/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/mcp/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/sync/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/docs/reference/troubleshooting/index.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/pyproject.toml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/.gitignore +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/factories/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/factories/reporting_factory.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/code_search_application_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/indexing_worker_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/queue_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/reporting.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/sync_scheduler.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/cli.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/cli_utils.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/config.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/database.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/architecture.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/discovery_notes.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/formatter.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/architecture/physical/physical.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/development/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/development/development.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/development/snippet/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/development/snippet/snippet.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/enricher.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/enrichment.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/request.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/response.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/api_docs.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/enrichments/usage/usage.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/entities/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/entities/git.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/errors.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/factories/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/factories/git_repo_factory.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/bm25_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/embedding_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/git_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/physical_architecture_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/services/task_status_query_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/tracking/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/tracking/resolution_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/domain/tracking/trackable.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/client/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/client/base.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/client/exceptions.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/client/generated_endpoints.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/client/search_client.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/middleware/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/middleware/auth.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/dependencies.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/query_params.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/commits.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/queue.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/repositories.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/routers/search.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/commit.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/context.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/enrichment.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/queue.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/search.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/snippet.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/tag.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/api/v1/schemas/task_status.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/bm25/local_bm25_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/cloning/git/working_copy.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_factory.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/batching.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/litellm_embedding_provider.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/local_vector_search_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/enricher_factory.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/litellm_enricher.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/local_enricher.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/null_enricher.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/enricher/utils.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/git/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/git/git_utils.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/ignore/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/indexing/fusion_service.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/mappers/task_mapper.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/mappers/task_status_mapper.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/physical_architecture/formatters/narrative_formatter.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/providers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/providers/async_batch_processor.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/providers/litellm_provider.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/reporting/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/reporting/db_progress.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/reporting/log_progress.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/reporting/telemetry_progress.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/slicing/api_doc_extractor.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/slicing/ast_analyzer.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/slicing/slicer.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/embedding_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/enrichment_association_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/entities.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_branch_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_commit_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_file_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/git_tag_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/query.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/task_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/task_status_repository.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/infrastructure/sqlalchemy/unit_of_work.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/log.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/mcp.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/middleware.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/README +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/env.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/04b80f802e0c_foreign_key_review.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/19f8c7faf8b9_add_generic_enrichment_type.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/4552eb3f23ce_add_summary.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/4b1a3b2c8fa5_refactor_git_tracking.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/7f15f878c3a1_add_new_git_entities.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/85155663351e_initial.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/9cf0e87de578_add_queue.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/b9cd1c3fd762_add_task_status.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/migrations/versions/f9e5ef5e688f_add_git_commits_number.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/py.typed +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/utils/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/utils/dump_config.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/utils/dump_openapi.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/utils/generate_api_paths.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/src/kodit/utils/path_utils.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/conftest.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/docker-smoke.sh +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/code_search_application_service_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/queue_service_get_task_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/queue_service_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/application/services/reporting_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/cli_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/bm25_service_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/embedding_service_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/entities_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/language_detection_service_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/domain/services/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/e2e.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/bm25/local_bm25_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git_cloning/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/cloning/git_cloning/working_copy_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/batching_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_factory_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/hash_embedding_provider_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/litellm_embedding_provider_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/embedding_provider/local_embedding_provider_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/embedding/test_litellm_socket_providers.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/enricher/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/enricher/null_enricher_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/detectors/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/detectors/docker_compose_detector_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/end_to_end_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/fixtures/simple_web_app/docker-compose.yml +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/formatters/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/physical_architecture/formatters/narrative_formatter_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/providers/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/providers/litellm_provider_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/api_doc_extractor_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/ast_analyzer_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/main.c +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/models.c +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/models.h +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/utils.c +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/c/utils.h +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/main.cpp +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/models.cpp +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/models.hpp +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/utils.cpp +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/cpp/utils.hpp +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Main.cs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Models.cs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/csharp/Utils.cs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/components.css +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/main.css +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/css/utilities.css +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/api/pkg/controller/filestore_test.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/main.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/models.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/go/utils.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/components.html +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/forms.html +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/html/main.html +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Main.java +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Models.java +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/java/Utils.java +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/main.js +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/models.js +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/javascript/utils.js +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/main.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/models.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/submodule/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/submodule/main.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/python/utils.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/main.rs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/models.rs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/data/rust/utils.rs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/slicing/slicer_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/csharp.cs +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/golang.go +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/javascript.js +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/knock_knock_server.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/python.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/snippets/typescript.tsx +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/embedding_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_branch_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_file_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/git_tag_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/task_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/infrastructure/sqlalchemy/task_status_repository_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/log_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/utils/__init__.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/utils/path_utils_test.py +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/tests/vectorchord-smoke.sh +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/understanding_architecture.md +0 -0
- {kodit-0.5.5 → kodit-0.5.7}/uv.lock +0 -0
|
@@ -12,7 +12,7 @@ look at the [hosted version](https://kodit.helix.ml/docs).
|
|
|
12
12
|
This is the REST API for the Kodit server. Please refer to the
|
|
13
13
|
[Kodit documentation](https://docs.helix.ml/kodit/) for more information.
|
|
14
14
|
|
|
15
|
-
Current version: 0.5.
|
|
15
|
+
Current version: 0.5.6
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "kodit API",
|
|
5
5
|
"description": "\nThis is the REST API for the Kodit server. Please refer to the\n[Kodit documentation](https://docs.helix.ml/kodit/) for more information.\n ",
|
|
6
|
-
"version": "0.5.
|
|
6
|
+
"version": "0.5.6"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/healthz": {
|
|
@@ -2496,7 +2496,9 @@
|
|
|
2496
2496
|
"kodit.commit.create_summary_enrichment",
|
|
2497
2497
|
"kodit.commit.create_summary_embeddings",
|
|
2498
2498
|
"kodit.commit.create_architecture_enrichment",
|
|
2499
|
-
"kodit.commit.create_public_api_docs"
|
|
2499
|
+
"kodit.commit.create_public_api_docs",
|
|
2500
|
+
"kodit.commit.create_commit_description",
|
|
2501
|
+
"kodit.commit.create_database_schema"
|
|
2500
2502
|
],
|
|
2501
2503
|
"title": "TaskOperation",
|
|
2502
2504
|
"description": "Task operation."
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.5.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 5,
|
|
31
|
+
__version__ = version = '0.5.7'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 5, 7)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -50,6 +50,9 @@ from kodit.infrastructure.bm25.vectorchord_bm25_repository import (
|
|
|
50
50
|
VectorChordBM25Repository,
|
|
51
51
|
)
|
|
52
52
|
from kodit.infrastructure.cloning.git.git_python_adaptor import GitPythonAdapter
|
|
53
|
+
from kodit.infrastructure.database_schema.database_schema_detector import (
|
|
54
|
+
DatabaseSchemaDetector,
|
|
55
|
+
)
|
|
53
56
|
from kodit.infrastructure.embedding.embedding_factory import (
|
|
54
57
|
embedding_domain_service_factory,
|
|
55
58
|
)
|
|
@@ -255,6 +258,7 @@ class ServerFactory:
|
|
|
255
258
|
text_search_service=self.text_search_service(),
|
|
256
259
|
embedding_repository=self.embedding_repository(),
|
|
257
260
|
architecture_service=self.architecture_service(),
|
|
261
|
+
database_schema_detector=DatabaseSchemaDetector(),
|
|
258
262
|
enrichment_v2_repository=self.enrichment_v2_repository(),
|
|
259
263
|
enricher_service=self.enricher(),
|
|
260
264
|
enrichment_association_repository=self.enrichment_association_repository(),
|
{kodit-0.5.5 → kodit-0.5.7}/src/kodit/application/services/commit_indexing_application_service.py
RENAMED
|
@@ -14,6 +14,9 @@ if TYPE_CHECKING:
|
|
|
14
14
|
from kodit.application.services.enrichment_query_service import (
|
|
15
15
|
EnrichmentQueryService,
|
|
16
16
|
)
|
|
17
|
+
from kodit.domain.enrichments.architecture.database_schema.database_schema import (
|
|
18
|
+
DatabaseSchemaEnrichment,
|
|
19
|
+
)
|
|
17
20
|
from kodit.domain.enrichments.architecture.physical.physical import (
|
|
18
21
|
PhysicalArchitectureEnrichment,
|
|
19
22
|
)
|
|
@@ -27,11 +30,20 @@ from kodit.domain.enrichments.enrichment import (
|
|
|
27
30
|
EnrichmentAssociation,
|
|
28
31
|
EnrichmentV2,
|
|
29
32
|
)
|
|
33
|
+
from kodit.domain.enrichments.history.commit_description.commit_description import (
|
|
34
|
+
CommitDescriptionEnrichment,
|
|
35
|
+
)
|
|
30
36
|
from kodit.domain.enrichments.request import (
|
|
31
37
|
EnrichmentRequest as GenericEnrichmentRequest,
|
|
32
38
|
)
|
|
33
39
|
from kodit.domain.entities import Task
|
|
34
|
-
from kodit.domain.entities.git import
|
|
40
|
+
from kodit.domain.entities.git import (
|
|
41
|
+
GitCommit,
|
|
42
|
+
GitFile,
|
|
43
|
+
GitRepo,
|
|
44
|
+
SnippetV2,
|
|
45
|
+
TrackingType,
|
|
46
|
+
)
|
|
35
47
|
from kodit.domain.factories.git_repo_factory import GitRepoFactory
|
|
36
48
|
from kodit.domain.protocols import (
|
|
37
49
|
EnrichmentAssociationRepository,
|
|
@@ -63,6 +75,9 @@ from kodit.domain.value_objects import (
|
|
|
63
75
|
TaskOperation,
|
|
64
76
|
TrackableType,
|
|
65
77
|
)
|
|
78
|
+
from kodit.infrastructure.database_schema.database_schema_detector import (
|
|
79
|
+
DatabaseSchemaDetector,
|
|
80
|
+
)
|
|
66
81
|
from kodit.infrastructure.slicing.api_doc_extractor import APIDocExtractor
|
|
67
82
|
from kodit.infrastructure.slicing.slicer import Slicer
|
|
68
83
|
from kodit.infrastructure.sqlalchemy import entities as db_entities
|
|
@@ -82,6 +97,73 @@ You are a professional software developer. You will be given a snippet of code.
|
|
|
82
97
|
Please provide a concise explanation of the code.
|
|
83
98
|
"""
|
|
84
99
|
|
|
100
|
+
COMMIT_DESCRIPTION_SYSTEM_PROMPT = """
|
|
101
|
+
You are a professional software developer. You will be given a git commit diff.
|
|
102
|
+
Please provide a concise description of what changes were made and why.
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
DATABASE_SCHEMA_SYSTEM_PROMPT = """
|
|
106
|
+
You are an expert database architect and documentation specialist.
|
|
107
|
+
Your task is to create clear, visual documentation of database schemas.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
DATABASE_SCHEMA_TASK_PROMPT = """
|
|
111
|
+
You will be provided with a database schema discovery report.
|
|
112
|
+
Please create comprehensive database schema documentation.
|
|
113
|
+
|
|
114
|
+
<schema_report>
|
|
115
|
+
{schema_report}
|
|
116
|
+
</schema_report>
|
|
117
|
+
|
|
118
|
+
**Return the following:**
|
|
119
|
+
|
|
120
|
+
## Entity List
|
|
121
|
+
|
|
122
|
+
For each table/entity, write one line:
|
|
123
|
+
- **[Table Name]**: [brief description of what it stores]
|
|
124
|
+
|
|
125
|
+
## Mermaid ERD
|
|
126
|
+
|
|
127
|
+
Create a Mermaid Entity Relationship Diagram showing:
|
|
128
|
+
- All entities (tables)
|
|
129
|
+
- Key relationships between entities (if apparent from names or common patterns)
|
|
130
|
+
- Use standard ERD notation
|
|
131
|
+
|
|
132
|
+
Example format:
|
|
133
|
+
```mermaid
|
|
134
|
+
erDiagram
|
|
135
|
+
User ||--o{{ Order : places
|
|
136
|
+
User {{
|
|
137
|
+
int id PK
|
|
138
|
+
string email
|
|
139
|
+
string name
|
|
140
|
+
}}
|
|
141
|
+
Order {{
|
|
142
|
+
int id PK
|
|
143
|
+
int user_id FK
|
|
144
|
+
datetime created_at
|
|
145
|
+
}}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If specific field details aren't available, show just the entity boxes and
|
|
149
|
+
relationships.
|
|
150
|
+
|
|
151
|
+
## Key Observations
|
|
152
|
+
|
|
153
|
+
Answer these questions in 1-2 sentences each:
|
|
154
|
+
1. What is the primary data model pattern (e.g., user-centric,
|
|
155
|
+
event-sourced, multi-tenant)?
|
|
156
|
+
2. What migration strategy is being used?
|
|
157
|
+
3. Are there any notable database design patterns or concerns?
|
|
158
|
+
|
|
159
|
+
## Rules:
|
|
160
|
+
- Be concise and focus on the high-level structure
|
|
161
|
+
- Infer reasonable relationships from table names when explicit information
|
|
162
|
+
isn't available
|
|
163
|
+
- If no database schema is found, state that clearly
|
|
164
|
+
- Keep entity descriptions to 10 words or less
|
|
165
|
+
"""
|
|
166
|
+
|
|
85
167
|
|
|
86
168
|
class CommitIndexingApplicationService:
|
|
87
169
|
"""Application service for commit indexing operations."""
|
|
@@ -103,6 +185,7 @@ class CommitIndexingApplicationService:
|
|
|
103
185
|
text_search_service: EmbeddingDomainService,
|
|
104
186
|
embedding_repository: SqlAlchemyEmbeddingRepository,
|
|
105
187
|
architecture_service: PhysicalArchitectureService,
|
|
188
|
+
database_schema_detector: DatabaseSchemaDetector,
|
|
106
189
|
enricher_service: Enricher,
|
|
107
190
|
enrichment_v2_repository: EnrichmentV2Repository,
|
|
108
191
|
enrichment_association_repository: EnrichmentAssociationRepository,
|
|
@@ -124,6 +207,7 @@ class CommitIndexingApplicationService:
|
|
|
124
207
|
self.text_search_service = text_search_service
|
|
125
208
|
self.embedding_repository = embedding_repository
|
|
126
209
|
self.architecture_service = architecture_service
|
|
210
|
+
self.database_schema_detector = database_schema_detector
|
|
127
211
|
self.enrichment_v2_repository = enrichment_v2_repository
|
|
128
212
|
self.enrichment_association_repository = enrichment_association_repository
|
|
129
213
|
self.enricher_service = enricher_service
|
|
@@ -191,11 +275,66 @@ class CommitIndexingApplicationService:
|
|
|
191
275
|
await self.process_architecture_discovery(repository_id, commit_sha)
|
|
192
276
|
elif task.type == TaskOperation.CREATE_PUBLIC_API_DOCS_FOR_COMMIT:
|
|
193
277
|
await self.process_api_docs(repository_id, commit_sha)
|
|
278
|
+
elif task.type == TaskOperation.CREATE_COMMIT_DESCRIPTION_FOR_COMMIT:
|
|
279
|
+
await self.process_commit_description(repository_id, commit_sha)
|
|
280
|
+
elif task.type == TaskOperation.CREATE_DATABASE_SCHEMA_FOR_COMMIT:
|
|
281
|
+
await self.process_database_schema(repository_id, commit_sha)
|
|
194
282
|
else:
|
|
195
283
|
raise ValueError(f"Unknown task type: {task.type}")
|
|
196
284
|
else:
|
|
197
285
|
raise ValueError(f"Unknown task type: {task.type}")
|
|
198
286
|
|
|
287
|
+
async def _process_files_in_batches(
|
|
288
|
+
self, cloned_path: Path, all_commits: list[GitCommit], batch_size: int = 100
|
|
289
|
+
) -> int:
|
|
290
|
+
"""Process file metadata for all commits in batches to avoid memory exhaustion.
|
|
291
|
+
|
|
292
|
+
This loads file metadata (paths, sizes, blob SHAs) in batches and saves them
|
|
293
|
+
incrementally to avoid holding millions of file objects in memory.
|
|
294
|
+
|
|
295
|
+
Args:
|
|
296
|
+
cloned_path: Path to the cloned repository
|
|
297
|
+
all_commits: List of all commits from scan
|
|
298
|
+
batch_size: Number of commits to process at once (default 100)
|
|
299
|
+
|
|
300
|
+
Returns:
|
|
301
|
+
Total number of files processed
|
|
302
|
+
|
|
303
|
+
"""
|
|
304
|
+
total_files = 0
|
|
305
|
+
commit_shas = [commit.commit_sha for commit in all_commits]
|
|
306
|
+
total_batches = (len(commit_shas) + batch_size - 1) // batch_size
|
|
307
|
+
|
|
308
|
+
self._log.info(
|
|
309
|
+
f"Processing files for {len(commit_shas)} commits "
|
|
310
|
+
f"in {total_batches} batches"
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
# Process commits in batches
|
|
314
|
+
for i in range(0, len(commit_shas), batch_size):
|
|
315
|
+
batch = commit_shas[i : i + batch_size]
|
|
316
|
+
batch_num = i // batch_size + 1
|
|
317
|
+
|
|
318
|
+
self._log.debug(
|
|
319
|
+
f"Processing batch {batch_num}/{total_batches} ({len(batch)} commits)"
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
# Get file metadata for this batch of commits
|
|
323
|
+
files = await self.scanner.process_files_for_commits_batch(
|
|
324
|
+
cloned_path, batch
|
|
325
|
+
)
|
|
326
|
+
|
|
327
|
+
# Save file metadata to database immediately
|
|
328
|
+
if files:
|
|
329
|
+
await self.git_file_repository.save_bulk(files)
|
|
330
|
+
total_files += len(files)
|
|
331
|
+
self._log.debug(
|
|
332
|
+
f"Batch {batch_num}: Saved {len(files)} files "
|
|
333
|
+
f"(total so far: {total_files})"
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
return total_files
|
|
337
|
+
|
|
199
338
|
async def process_clone_repo(self, repository_id: int) -> None:
|
|
200
339
|
"""Clone a repository."""
|
|
201
340
|
async with self.operation.create_child(
|
|
@@ -233,8 +372,11 @@ class CommitIndexingApplicationService:
|
|
|
233
372
|
await step.set_current(2, "Saving commits")
|
|
234
373
|
await self.git_commit_repository.save_bulk(scan_result.all_commits)
|
|
235
374
|
|
|
236
|
-
await step.set_current(3, "
|
|
237
|
-
await self.
|
|
375
|
+
await step.set_current(3, "Processing and saving files in batches")
|
|
376
|
+
total_files = await self._process_files_in_batches(
|
|
377
|
+
repo.cloned_path, scan_result.all_commits
|
|
378
|
+
)
|
|
379
|
+
self._log.info(f"Processed and saved {total_files} total files")
|
|
238
380
|
|
|
239
381
|
await step.set_current(4, "Saving branches")
|
|
240
382
|
if scan_result.branches:
|
|
@@ -798,6 +940,137 @@ class CommitIndexingApplicationService:
|
|
|
798
940
|
]
|
|
799
941
|
)
|
|
800
942
|
|
|
943
|
+
async def process_commit_description(
|
|
944
|
+
self, repository_id: int, commit_sha: str
|
|
945
|
+
) -> None:
|
|
946
|
+
"""Handle COMMIT_DESCRIPTION task - generate commit descriptions."""
|
|
947
|
+
async with self.operation.create_child(
|
|
948
|
+
TaskOperation.CREATE_COMMIT_DESCRIPTION_FOR_COMMIT,
|
|
949
|
+
trackable_type=TrackableType.KODIT_REPOSITORY,
|
|
950
|
+
trackable_id=repository_id,
|
|
951
|
+
) as step:
|
|
952
|
+
# Check if commit description already exists for this commit
|
|
953
|
+
if await self.enrichment_query_service.has_commit_description_for_commit(
|
|
954
|
+
commit_sha
|
|
955
|
+
):
|
|
956
|
+
await step.skip("Commit description already exists for commit")
|
|
957
|
+
return
|
|
958
|
+
|
|
959
|
+
# Get repository path
|
|
960
|
+
repo = await self.repo_repository.get(repository_id)
|
|
961
|
+
if not repo.cloned_path:
|
|
962
|
+
raise ValueError(f"Repository {repository_id} has never been cloned")
|
|
963
|
+
|
|
964
|
+
await step.set_total(3)
|
|
965
|
+
await step.set_current(1, "Getting commit diff")
|
|
966
|
+
|
|
967
|
+
# Get the diff for this commit
|
|
968
|
+
diff = await self.scanner.git_adapter.get_commit_diff(
|
|
969
|
+
repo.cloned_path, commit_sha
|
|
970
|
+
)
|
|
971
|
+
|
|
972
|
+
if not diff or len(diff.strip()) == 0:
|
|
973
|
+
await step.skip("No diff found for commit")
|
|
974
|
+
return
|
|
975
|
+
|
|
976
|
+
await step.set_current(2, "Enriching commit description with LLM")
|
|
977
|
+
|
|
978
|
+
# Enrich the diff through the enricher
|
|
979
|
+
enrichment_request = GenericEnrichmentRequest(
|
|
980
|
+
id=commit_sha,
|
|
981
|
+
text=diff,
|
|
982
|
+
system_prompt=COMMIT_DESCRIPTION_SYSTEM_PROMPT,
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
enriched_content = ""
|
|
986
|
+
async for response in self.enricher_service.enrich([enrichment_request]):
|
|
987
|
+
enriched_content = response.text
|
|
988
|
+
|
|
989
|
+
# Create and save commit description enrichment
|
|
990
|
+
enrichment = await self.enrichment_v2_repository.save(
|
|
991
|
+
CommitDescriptionEnrichment(
|
|
992
|
+
content=enriched_content,
|
|
993
|
+
)
|
|
994
|
+
)
|
|
995
|
+
if not enrichment or not enrichment.id:
|
|
996
|
+
raise ValueError(
|
|
997
|
+
f"Failed to save commit description enrichment for commit "
|
|
998
|
+
f"{commit_sha}"
|
|
999
|
+
)
|
|
1000
|
+
await self.enrichment_association_repository.save(
|
|
1001
|
+
CommitEnrichmentAssociation(
|
|
1002
|
+
enrichment_id=enrichment.id,
|
|
1003
|
+
entity_id=commit_sha,
|
|
1004
|
+
)
|
|
1005
|
+
)
|
|
1006
|
+
|
|
1007
|
+
await step.set_current(3, "Commit description enrichment completed")
|
|
1008
|
+
|
|
1009
|
+
async def process_database_schema(
|
|
1010
|
+
self, repository_id: int, commit_sha: str
|
|
1011
|
+
) -> None:
|
|
1012
|
+
"""Handle DATABASE_SCHEMA task - discover and document database schemas."""
|
|
1013
|
+
async with self.operation.create_child(
|
|
1014
|
+
TaskOperation.CREATE_DATABASE_SCHEMA_FOR_COMMIT,
|
|
1015
|
+
trackable_type=TrackableType.KODIT_REPOSITORY,
|
|
1016
|
+
trackable_id=repository_id,
|
|
1017
|
+
) as step:
|
|
1018
|
+
# Check if database schema already exists for this commit
|
|
1019
|
+
if await self.enrichment_query_service.has_database_schema_for_commit(
|
|
1020
|
+
commit_sha
|
|
1021
|
+
):
|
|
1022
|
+
await step.skip("Database schema already exists for commit")
|
|
1023
|
+
return
|
|
1024
|
+
|
|
1025
|
+
# Get repository path
|
|
1026
|
+
repo = await self.repo_repository.get(repository_id)
|
|
1027
|
+
if not repo.cloned_path:
|
|
1028
|
+
raise ValueError(f"Repository {repository_id} has never been cloned")
|
|
1029
|
+
|
|
1030
|
+
await step.set_total(3)
|
|
1031
|
+
await step.set_current(1, "Discovering database schemas")
|
|
1032
|
+
|
|
1033
|
+
# Discover database schemas
|
|
1034
|
+
schema_report = await self.database_schema_detector.discover_schemas(
|
|
1035
|
+
repo.cloned_path
|
|
1036
|
+
)
|
|
1037
|
+
|
|
1038
|
+
if "No database schemas detected" in schema_report:
|
|
1039
|
+
await step.skip("No database schemas found in repository")
|
|
1040
|
+
return
|
|
1041
|
+
|
|
1042
|
+
await step.set_current(2, "Enriching schema documentation with LLM")
|
|
1043
|
+
|
|
1044
|
+
# Enrich the schema report through the enricher
|
|
1045
|
+
enrichment_request = GenericEnrichmentRequest(
|
|
1046
|
+
id=commit_sha,
|
|
1047
|
+
text=DATABASE_SCHEMA_TASK_PROMPT.format(schema_report=schema_report),
|
|
1048
|
+
system_prompt=DATABASE_SCHEMA_SYSTEM_PROMPT,
|
|
1049
|
+
)
|
|
1050
|
+
|
|
1051
|
+
enriched_content = ""
|
|
1052
|
+
async for response in self.enricher_service.enrich([enrichment_request]):
|
|
1053
|
+
enriched_content = response.text
|
|
1054
|
+
|
|
1055
|
+
# Create and save database schema enrichment
|
|
1056
|
+
enrichment = await self.enrichment_v2_repository.save(
|
|
1057
|
+
DatabaseSchemaEnrichment(
|
|
1058
|
+
content=enriched_content,
|
|
1059
|
+
)
|
|
1060
|
+
)
|
|
1061
|
+
if not enrichment or not enrichment.id:
|
|
1062
|
+
raise ValueError(
|
|
1063
|
+
f"Failed to save database schema enrichment for commit {commit_sha}"
|
|
1064
|
+
)
|
|
1065
|
+
await self.enrichment_association_repository.save(
|
|
1066
|
+
CommitEnrichmentAssociation(
|
|
1067
|
+
enrichment_id=enrichment.id,
|
|
1068
|
+
entity_id=commit_sha,
|
|
1069
|
+
)
|
|
1070
|
+
)
|
|
1071
|
+
|
|
1072
|
+
await step.set_current(3, "Database schema enrichment completed")
|
|
1073
|
+
|
|
801
1074
|
async def _new_snippets_for_type(
|
|
802
1075
|
self, all_snippets: list[EnrichmentV2], embedding_type: EmbeddingType
|
|
803
1076
|
) -> list[EnrichmentV2]:
|
|
@@ -5,6 +5,9 @@ import structlog
|
|
|
5
5
|
from kodit.domain.enrichments.architecture.architecture import (
|
|
6
6
|
ENRICHMENT_TYPE_ARCHITECTURE,
|
|
7
7
|
)
|
|
8
|
+
from kodit.domain.enrichments.architecture.database_schema.database_schema import (
|
|
9
|
+
ENRICHMENT_SUBTYPE_DATABASE_SCHEMA,
|
|
10
|
+
)
|
|
8
11
|
from kodit.domain.enrichments.architecture.physical.physical import (
|
|
9
12
|
ENRICHMENT_SUBTYPE_PHYSICAL,
|
|
10
13
|
)
|
|
@@ -14,6 +17,10 @@ from kodit.domain.enrichments.development.snippet.snippet import (
|
|
|
14
17
|
ENRICHMENT_SUBTYPE_SNIPPET_SUMMARY,
|
|
15
18
|
)
|
|
16
19
|
from kodit.domain.enrichments.enrichment import EnrichmentAssociation, EnrichmentV2
|
|
20
|
+
from kodit.domain.enrichments.history.commit_description.commit_description import (
|
|
21
|
+
ENRICHMENT_SUBTYPE_COMMIT_DESCRIPTION,
|
|
22
|
+
)
|
|
23
|
+
from kodit.domain.enrichments.history.history import ENRICHMENT_TYPE_HISTORY
|
|
17
24
|
from kodit.domain.enrichments.usage.api_docs import ENRICHMENT_SUBTYPE_API_DOCS
|
|
18
25
|
from kodit.domain.enrichments.usage.usage import ENRICHMENT_TYPE_USAGE
|
|
19
26
|
from kodit.domain.protocols import (
|
|
@@ -215,6 +222,36 @@ class EnrichmentQueryService:
|
|
|
215
222
|
api_docs = await self.get_api_docs_for_commit(commit_sha)
|
|
216
223
|
return len(api_docs) > 0
|
|
217
224
|
|
|
225
|
+
async def get_commit_description_for_commit(
|
|
226
|
+
self, commit_sha: str
|
|
227
|
+
) -> list[EnrichmentV2]:
|
|
228
|
+
"""Get commit description enrichments for a commit."""
|
|
229
|
+
return await self.get_enrichments_for_commit(
|
|
230
|
+
commit_sha,
|
|
231
|
+
enrichment_type=ENRICHMENT_TYPE_HISTORY,
|
|
232
|
+
enrichment_subtype=ENRICHMENT_SUBTYPE_COMMIT_DESCRIPTION,
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
async def has_commit_description_for_commit(self, commit_sha: str) -> bool:
|
|
236
|
+
"""Check if a commit has commit description enrichments."""
|
|
237
|
+
commit_descriptions = await self.get_commit_description_for_commit(commit_sha)
|
|
238
|
+
return len(commit_descriptions) > 0
|
|
239
|
+
|
|
240
|
+
async def get_database_schema_for_commit(
|
|
241
|
+
self, commit_sha: str
|
|
242
|
+
) -> list[EnrichmentV2]:
|
|
243
|
+
"""Get database schema enrichments for a commit."""
|
|
244
|
+
return await self.get_enrichments_for_commit(
|
|
245
|
+
commit_sha,
|
|
246
|
+
enrichment_type=ENRICHMENT_TYPE_ARCHITECTURE,
|
|
247
|
+
enrichment_subtype=ENRICHMENT_SUBTYPE_DATABASE_SCHEMA,
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
async def has_database_schema_for_commit(self, commit_sha: str) -> bool:
|
|
251
|
+
"""Check if a commit has database schema enrichments."""
|
|
252
|
+
database_schemas = await self.get_database_schema_for_commit(commit_sha)
|
|
253
|
+
return len(database_schemas) > 0
|
|
254
|
+
|
|
218
255
|
async def associations_for_enrichments(
|
|
219
256
|
self, enrichments: list[EnrichmentV2]
|
|
220
257
|
) -> list[EnrichmentAssociation]:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Database schema enrichments."""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Database schema enrichment domain entity."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
from kodit.domain.enrichments.architecture.architecture import ArchitectureEnrichment
|
|
6
|
+
|
|
7
|
+
ENRICHMENT_SUBTYPE_DATABASE_SCHEMA = "database_schema"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class DatabaseSchemaEnrichment(ArchitectureEnrichment):
|
|
12
|
+
"""Enrichment containing database schema information for a commit."""
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def subtype(self) -> str | None:
|
|
16
|
+
"""Return the enrichment subtype."""
|
|
17
|
+
return ENRICHMENT_SUBTYPE_DATABASE_SCHEMA
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""History enrichments."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Commit description enrichments."""
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Commit description enrichment domain entity."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
|
|
5
|
+
from kodit.domain.enrichments.history.history import HistoryEnrichment
|
|
6
|
+
|
|
7
|
+
ENRICHMENT_SUBTYPE_COMMIT_DESCRIPTION = "commit_description"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@dataclass(frozen=True)
|
|
11
|
+
class CommitDescriptionEnrichment(HistoryEnrichment):
|
|
12
|
+
"""Enrichment containing a description of what a commit did."""
|
|
13
|
+
|
|
14
|
+
@property
|
|
15
|
+
def subtype(self) -> str | None:
|
|
16
|
+
"""Return the enrichment subtype."""
|
|
17
|
+
return ENRICHMENT_SUBTYPE_COMMIT_DESCRIPTION
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""History enrichment domain entity."""
|
|
2
|
+
|
|
3
|
+
from abc import ABC
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
|
|
6
|
+
from kodit.domain.enrichments.enrichment import CommitEnrichment
|
|
7
|
+
|
|
8
|
+
ENRICHMENT_TYPE_HISTORY = "history"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(frozen=True)
|
|
12
|
+
class HistoryEnrichment(CommitEnrichment, ABC):
|
|
13
|
+
"""Enrichment containing historical information for a commit."""
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def type(self) -> str:
|
|
17
|
+
"""Return the enrichment type."""
|
|
18
|
+
return ENRICHMENT_TYPE_HISTORY
|
|
@@ -4,6 +4,8 @@ from abc import ABC, abstractmethod
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any, Protocol, TypeVar
|
|
6
6
|
|
|
7
|
+
from git import Repo
|
|
8
|
+
|
|
7
9
|
from kodit.domain.enrichments.enrichment import EnrichmentAssociation, EnrichmentV2
|
|
8
10
|
from kodit.domain.entities import (
|
|
9
11
|
Task,
|
|
@@ -163,9 +165,16 @@ class GitAdapter(ABC):
|
|
|
163
165
|
|
|
164
166
|
@abstractmethod
|
|
165
167
|
async def get_commit_files(
|
|
166
|
-
self, local_path: Path, commit_sha: str
|
|
168
|
+
self, local_path: Path, commit_sha: str, repo: Repo
|
|
167
169
|
) -> list[dict[str, Any]]:
|
|
168
|
-
"""Get all files in a specific commit from the git tree.
|
|
170
|
+
"""Get all files in a specific commit from the git tree.
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
local_path: Path to the repository
|
|
174
|
+
commit_sha: SHA of the commit to get files for
|
|
175
|
+
repo: Repo object to reuse (avoids creating new Repo per commit)
|
|
176
|
+
|
|
177
|
+
"""
|
|
169
178
|
|
|
170
179
|
@abstractmethod
|
|
171
180
|
async def get_commit_file_data(
|
|
@@ -213,6 +222,10 @@ class GitAdapter(ABC):
|
|
|
213
222
|
) -> list[str]:
|
|
214
223
|
"""Get only commit SHAs for a branch (much faster than full commit data)."""
|
|
215
224
|
|
|
225
|
+
@abstractmethod
|
|
226
|
+
async def get_commit_diff(self, local_path: Path, commit_sha: str) -> str:
|
|
227
|
+
"""Get the diff for a specific commit."""
|
|
228
|
+
|
|
216
229
|
|
|
217
230
|
class SnippetRepositoryV2(ABC):
|
|
218
231
|
"""Repository for snippet operations."""
|