kodit 0.3.3__tar.gz → 0.3.5__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.3.5/.claude/commands/update-docs.md +79 -0
- {kodit-0.3.3 → kodit-0.3.5}/CLAUDE.md +12 -7
- {kodit-0.3.3 → kodit-0.3.5}/PKG-INFO +10 -4
- {kodit-0.3.3 → kodit-0.3.5}/README.md +9 -3
- {kodit-0.3.3 → kodit-0.3.5}/docs/_index.md +8 -3
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/configuration/index.md +28 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/deployment/docker-compose.yaml +5 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/deployment/kubernetes.yaml +6 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/indexing/index.md +82 -13
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/mcp/index.md +17 -6
- kodit-0.3.5/docs/reference/sync/index.md +79 -0
- {kodit-0.3.3 → kodit-0.3.5}/pyproject.toml +5 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/_version.py +2 -2
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/app.py +23 -4
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/application/factories/code_indexing_factory.py +2 -24
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/application/services/code_indexing_application_service.py +10 -2
- kodit-0.3.5/src/kodit/application/services/sync_scheduler.py +128 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/cli.py +103 -28
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/config.py +15 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/index_service.py +25 -66
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/value_objects.py +10 -22
- kodit-0.3.5/src/kodit/infrastructure/slicing/__init__.py +1 -0
- kodit-0.3.5/src/kodit/infrastructure/slicing/language_detection_service.py +18 -0
- kodit-0.3.5/src/kodit/infrastructure/slicing/slicer.py +894 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/sqlalchemy/index_repository.py +29 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +6 -4
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/versions/4552eb3f23ce_add_summary.py +4 -4
- kodit-0.3.5/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +55 -0
- kodit-0.3.5/src/kodit/migrations/versions/85155663351e_initial.py +98 -0
- kodit-0.3.5/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +50 -0
- kodit-0.3.5/tests/kodit/application/services/__init__.py +1 -0
- kodit-0.3.5/tests/kodit/application/services/test_sync_scheduler.py +396 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/application/test_code_indexing_application_service.py +24 -58
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/services/index_service_test.py +3 -27
- kodit-0.3.5/tests/kodit/infrastructure/slicing/__init__.py +1 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/__init__.py +1 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/c/main.c +72 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/c/models.c +75 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/c/models.h +99 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/c/utils.c +17 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/c/utils.h +33 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/cpp/main.cpp +85 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/cpp/models.cpp +39 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/cpp/models.hpp +98 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/cpp/utils.cpp +40 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/cpp/utils.hpp +56 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/csharp/Main.cs +52 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/csharp/Models.cs +89 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/csharp/Utils.cs +85 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/css/components.css +428 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/css/main.css +259 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/css/utilities.css +456 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/go/main.go +79 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/go/models.go +75 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/go/utils.go +45 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/html/components.html +165 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/html/forms.html +344 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/html/main.html +72 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/java/Main.java +75 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/java/Models.java +108 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/java/Utils.java +74 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/javascript/main.js +66 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/javascript/models.js +87 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/javascript/utils.js +61 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/python/__init__.py +1 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/python/main.py +55 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/python/models.py +54 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/python/utils.py +27 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/rust/main.rs +58 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/rust/models.rs +84 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/data/rust/utils.rs +50 -0
- kodit-0.3.5/tests/kodit/infrastructure/slicing/slicer_test.py +830 -0
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/__init__.py +0 -1
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/factories.py +0 -13
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/language_detection_service.py +0 -39
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/csharp.scm +0 -12
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/go.scm +0 -26
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/java.scm +0 -12
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/javascript.scm +0 -24
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/python.scm +0 -22
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/languages/typescript.scm +0 -25
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/snippet_extraction_factory.py +0 -67
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/snippet_query_provider.py +0 -44
- kodit-0.3.3/src/kodit/infrastructure/snippet_extraction/tree_sitter_snippet_extractor.py +0 -182
- kodit-0.3.3/src/kodit/infrastructure/sqlalchemy/file_repository.py +0 -78
- kodit-0.3.3/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -47
- kodit-0.3.3/src/kodit/migrations/versions/85155663351e_initial.py +0 -82
- kodit-0.3.3/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -44
- {kodit-0.3.3 → kodit-0.3.5}/.claude/commands/debug.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.claude/commands/new-requirement.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.claude/commands/refactor.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.claude/settings.json +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.cursor/rules/style.mdc +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.dockerignore +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/dependabot.yml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/docker.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/docs.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.github/workflows/test.yaml +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.gitignore +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.python-version +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.vscode/launch.json +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/.vscode/settings.json +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/Dockerfile +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/LICENSE +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/alembic.ini +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/MIGRATION_TO_INDEX_AGGREGATE.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/demos/_index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/demos/go-simple-microservice/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/demos/knock-knock-auth/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/developer/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/getting-started/_index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/_index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/deployment/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/.gitignore +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/application/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/application/factories/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/application/services/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/database.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/entities.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/errors.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/interfaces.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/protocols.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/bm25_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/embedding_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/enrichment_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/domain/services/index_query_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/bm25/bm25_factory.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/bm25/local_bm25_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/cloning/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/cloning/git/working_copy.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/cloning/metadata.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_factory.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_providers/batching.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/local_vector_search_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/enrichment/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/enrichment/enrichment_factory.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/enrichment/local_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/enrichment/null_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/enrichment/openai_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/git/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/git/git_utils.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/ignore/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/indexing/auto_indexing_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/indexing/fusion_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/indexing/indexing_factory.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/mappers/index_mapper.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/sqlalchemy/embedding_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/sqlalchemy/entities.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/ui/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/ui/progress.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/infrastructure/ui/spinner.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/log.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/mcp.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/middleware.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/README +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/env.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/reporting.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/utils/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/src/kodit/utils/path_utils.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/conftest.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/docker-smoke.sh +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/experiments/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/experiments/cline_prompt_tests/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/experiments/cline_prompt_tests/cline_prompt.txt +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/experiments/cline_prompt_tests/cline_prompt_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/application/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/cli_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/config_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/bm25_domain_service_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/enrichment_domain_service_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/entities_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/services/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/test_embedding_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/test_language_mapping.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/domain/test_multi_search_result.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/e2e.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/bm25/local_bm25_repository_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/bm25/vectorchord_bm25_repository_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/cloning/git_cloning/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/cloning/git_cloning/working_copy_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/embedding_factory_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/embedding_provider/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/embedding_provider/test_hash_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/embedding_provider/test_local_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/embedding_provider/test_openai_embedding_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/test_batching.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/test_embedding_integration.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/test_local_vector_search_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/embedding/test_vectorchord_vector_search_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/enrichment_provider/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/enrichment_provider/test_local_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/enrichment_provider/test_null_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/enrichment_provider/test_openai_enrichment_provider.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/enrichment/test_enrichment_factory.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/indexing/test_auto_indexing_service.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/mappers/test_index_mapper.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/csharp.cs +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/golang.go +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/javascript.js +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/knock_knock_server.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/python.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/snippets/typescript.tsx +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/infrastructure/sqlalchemy/test_embedding_repository.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/log_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/performance/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/performance/similarity.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/smoke.sh +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/utils/__init__.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/utils/test_path_utils.py +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/tests/vectorchord-smoke.sh +0 -0
- {kodit-0.3.3 → kodit-0.3.5}/uv.lock +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Update Documentation Based on Recent Code Changes
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Analyze recent commits in the current Git branch and update relevant documentation to reflect code changes.
|
|
6
|
+
|
|
7
|
+
## Steps to Complete
|
|
8
|
+
|
|
9
|
+
### 1. Analyze Recent Commits
|
|
10
|
+
|
|
11
|
+
- Run `git log --oneline -n 20` to view the last 20 commits on the current branch, or
|
|
12
|
+
all commits if it is not the main branch.
|
|
13
|
+
- For each commit, run `git show --name-status <commit-hash>` to see which files were modified
|
|
14
|
+
- Focus on commits that modified source code files (`.js`, `.py`, `.ts`, `.java`, `.go`, `.rs`, etc.)
|
|
15
|
+
|
|
16
|
+
### 2. Identify Code Changes
|
|
17
|
+
|
|
18
|
+
For each modified source file in recent commits:
|
|
19
|
+
|
|
20
|
+
- Examine the diff using `git diff <commit-hash>^ <commit-hash> -- <file-path>`
|
|
21
|
+
- Identify:
|
|
22
|
+
- New functions or methods added
|
|
23
|
+
- Functions or methods removed or renamed
|
|
24
|
+
- Changes to function signatures (parameters, return types)
|
|
25
|
+
- New classes or modules
|
|
26
|
+
- Changes to public APIs
|
|
27
|
+
- New configuration options or environment variables
|
|
28
|
+
- Breaking changes
|
|
29
|
+
|
|
30
|
+
### 3. Update README.md
|
|
31
|
+
|
|
32
|
+
Check if the README.md needs updates for:
|
|
33
|
+
|
|
34
|
+
- **Installation instructions**: If dependencies or setup steps changed
|
|
35
|
+
- **Usage examples**: If APIs or interfaces changed
|
|
36
|
+
- **Configuration**: If new environment variables or config options were added
|
|
37
|
+
- **Features list**: If new features were implemented
|
|
38
|
+
- **Quick start guide**: If the basic usage pattern changed
|
|
39
|
+
|
|
40
|
+
### 4. Update Documentation in /docs
|
|
41
|
+
|
|
42
|
+
For each markdown file in the `docs/` folder:
|
|
43
|
+
|
|
44
|
+
- Check if it references any of the changed code
|
|
45
|
+
- Update:
|
|
46
|
+
- API documentation with new/changed function signatures
|
|
47
|
+
- Code examples that may no longer work
|
|
48
|
+
- Configuration guides if settings changed
|
|
49
|
+
- Architecture diagrams if structural changes occurred
|
|
50
|
+
- Migration guides if there are breaking changes
|
|
51
|
+
|
|
52
|
+
### 5. Create or Update Specific Docs
|
|
53
|
+
|
|
54
|
+
Based on the changes found:
|
|
55
|
+
|
|
56
|
+
- If new features were added without documentation, create new doc files
|
|
57
|
+
- If breaking changes exist, create or update a migration guide
|
|
58
|
+
- If new APIs were added, ensure they have proper documentation
|
|
59
|
+
|
|
60
|
+
### 6. Verify Documentation Accuracy
|
|
61
|
+
|
|
62
|
+
- Ensure all code examples in documentation are up-to-date
|
|
63
|
+
- Check that any referenced file paths still exist
|
|
64
|
+
- Verify that installation and setup instructions still work
|
|
65
|
+
|
|
66
|
+
## Output Required
|
|
67
|
+
|
|
68
|
+
1. Summary of commits analyzed and significant changes found
|
|
69
|
+
2. List of documentation files updated with brief description of changes
|
|
70
|
+
3. Any new documentation files created
|
|
71
|
+
4. Warnings about potentially outdated documentation that needs manual review
|
|
72
|
+
|
|
73
|
+
## Important Notes
|
|
74
|
+
|
|
75
|
+
- Focus on user-facing changes that affect how people use Kodit
|
|
76
|
+
- Don't document internal implementation details unless they affect the public API
|
|
77
|
+
- Keep documentation concise and example-driven
|
|
78
|
+
- If unsure about a change's impact, flag it for manual review
|
|
79
|
+
- Ensure all documentation follows the existing style and format in the repository
|
|
@@ -50,18 +50,23 @@ The codebase follows Domain-Driven Design (DDD) with clean architecture:
|
|
|
50
50
|
|
|
51
51
|
### Key Components
|
|
52
52
|
|
|
53
|
-
**Indexing Pipeline:**
|
|
53
|
+
**Advanced Indexing Pipeline:**
|
|
54
54
|
|
|
55
|
-
1. Clone/read source code
|
|
56
|
-
2.
|
|
57
|
-
3.
|
|
58
|
-
4.
|
|
55
|
+
1. Clone/read source code with Git metadata extraction
|
|
56
|
+
2. Language detection for 20+ programming languages
|
|
57
|
+
3. Advanced snippet extraction using Tree-sitter with dependency analysis
|
|
58
|
+
4. Build call graphs and import maps for context-aware extraction
|
|
59
|
+
5. Generate embeddings and BM25 indices
|
|
60
|
+
6. Store in database with selective reindexing for performance
|
|
59
61
|
|
|
60
|
-
**Search System:**
|
|
62
|
+
**Advanced Search System:**
|
|
61
63
|
|
|
62
|
-
- Hybrid search combining semantic (embeddings) and keyword (BM25)
|
|
64
|
+
- Hybrid search combining semantic (embeddings) and keyword (BM25) with Reciprocal Rank Fusion
|
|
65
|
+
- Multi-dimensional filtering: language, author, date range, source, file path
|
|
66
|
+
- Context-aware results with dependency tracking and usage examples
|
|
63
67
|
- Multiple providers: local models, OpenAI, custom APIs
|
|
64
68
|
- Configurable via environment variables
|
|
69
|
+
- Support for 20+ programming languages including HTML/CSS
|
|
65
70
|
|
|
66
71
|
**MCP Server:**
|
|
67
72
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kodit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.5
|
|
4
4
|
Summary: Code indexing for better AI code generation
|
|
5
5
|
Project-URL: Homepage, https://docs.helixml.tech/kodit/
|
|
6
6
|
Project-URL: Documentation, https://docs.helixml.tech/kodit/
|
|
@@ -92,13 +92,17 @@ code. This index is used to build a snippet library, ready for ingestion into an
|
|
|
92
92
|
|
|
93
93
|
- Index local directories and public Git repositories
|
|
94
94
|
- Build comprehensive snippet libraries for LLM ingestion
|
|
95
|
-
- Support for
|
|
96
|
-
-
|
|
95
|
+
- Support for 20+ programming languages including Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, C#, HTML/CSS, and more
|
|
96
|
+
- Advanced code analysis with dependency tracking and call graph generation
|
|
97
|
+
- Intelligent snippet extraction with context-aware dependencies
|
|
98
|
+
- Efficient indexing with selective reindexing (only processes modified files)
|
|
97
99
|
- Privacy first: respects .gitignore and .noindex files
|
|
98
100
|
- **NEW in 0.3**: Auto-indexing configuration for shared server deployments
|
|
99
101
|
- **NEW in 0.3**: Enhanced Git provider support including Azure DevOps
|
|
100
102
|
- **NEW in 0.3**: Index private repositories via a PAT
|
|
101
103
|
- **NEW in 0.3**: Improved progress monitoring and reporting during indexing
|
|
104
|
+
- **NEW in 0.3**: Advanced code slicing infrastructure with Tree-sitter parsing
|
|
105
|
+
- **NEW in 0.4**: Automatic periodic sync to keep indexes up-to-date
|
|
102
106
|
|
|
103
107
|
### MCP Server
|
|
104
108
|
|
|
@@ -111,7 +115,9 @@ intent. Kodit has been tested to work well with:
|
|
|
111
115
|
- [Cursor](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cursor)
|
|
112
116
|
- [Cline](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cline)
|
|
113
117
|
- Please contribute more instructions! ... any other assistant is likely to work ...
|
|
114
|
-
- **New in 0.3**:
|
|
118
|
+
- **New in 0.3**: Advanced search filters by source, language, author, date range, and file path
|
|
119
|
+
- **New in 0.3**: Hybrid search combining BM25 keyword search with semantic search
|
|
120
|
+
- **New in 0.4**: Enhanced MCP tools with rich context parameters and metadata
|
|
115
121
|
|
|
116
122
|
### Enterprise Ready
|
|
117
123
|
|
|
@@ -39,13 +39,17 @@ code. This index is used to build a snippet library, ready for ingestion into an
|
|
|
39
39
|
|
|
40
40
|
- Index local directories and public Git repositories
|
|
41
41
|
- Build comprehensive snippet libraries for LLM ingestion
|
|
42
|
-
- Support for
|
|
43
|
-
-
|
|
42
|
+
- Support for 20+ programming languages including Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, C#, HTML/CSS, and more
|
|
43
|
+
- Advanced code analysis with dependency tracking and call graph generation
|
|
44
|
+
- Intelligent snippet extraction with context-aware dependencies
|
|
45
|
+
- Efficient indexing with selective reindexing (only processes modified files)
|
|
44
46
|
- Privacy first: respects .gitignore and .noindex files
|
|
45
47
|
- **NEW in 0.3**: Auto-indexing configuration for shared server deployments
|
|
46
48
|
- **NEW in 0.3**: Enhanced Git provider support including Azure DevOps
|
|
47
49
|
- **NEW in 0.3**: Index private repositories via a PAT
|
|
48
50
|
- **NEW in 0.3**: Improved progress monitoring and reporting during indexing
|
|
51
|
+
- **NEW in 0.3**: Advanced code slicing infrastructure with Tree-sitter parsing
|
|
52
|
+
- **NEW in 0.4**: Automatic periodic sync to keep indexes up-to-date
|
|
49
53
|
|
|
50
54
|
### MCP Server
|
|
51
55
|
|
|
@@ -58,7 +62,9 @@ intent. Kodit has been tested to work well with:
|
|
|
58
62
|
- [Cursor](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cursor)
|
|
59
63
|
- [Cline](https://docs.helix.ml/kodit/getting-started/integration/#integration-with-cline)
|
|
60
64
|
- Please contribute more instructions! ... any other assistant is likely to work ...
|
|
61
|
-
- **New in 0.3**:
|
|
65
|
+
- **New in 0.3**: Advanced search filters by source, language, author, date range, and file path
|
|
66
|
+
- **New in 0.3**: Hybrid search combining BM25 keyword search with semantic search
|
|
67
|
+
- **New in 0.4**: Enhanced MCP tools with rich context parameters and metadata
|
|
62
68
|
|
|
63
69
|
### Enterprise Ready
|
|
64
70
|
|
|
@@ -49,13 +49,16 @@ code. This index is used to build a snippet library, ready for ingestion into an
|
|
|
49
49
|
|
|
50
50
|
- Index local directories and public Git repositories
|
|
51
51
|
- Build comprehensive snippet libraries for LLM ingestion
|
|
52
|
-
- Support for
|
|
53
|
-
-
|
|
52
|
+
- Support for 20+ programming languages including Python, JavaScript/TypeScript, Java, Go, Rust, C/C++, C#, HTML/CSS, and more
|
|
53
|
+
- Advanced code analysis with dependency tracking and call graph generation
|
|
54
|
+
- Intelligent snippet extraction with context-aware dependencies
|
|
55
|
+
- Efficient indexing with selective reindexing (only processes modified files)
|
|
54
56
|
- Privacy first: respects .gitignore and .noindex files
|
|
55
57
|
- **NEW in 0.3**: Auto-indexing configuration for shared server deployments
|
|
56
58
|
- **NEW in 0.3**: Enhanced Git provider support including Azure DevOps
|
|
57
59
|
- **NEW in 0.3**: Index private repositories via a PAT
|
|
58
60
|
- **NEW in 0.3**: Improved progress monitoring and reporting during indexing
|
|
61
|
+
- **NEW in 0.4**: Advanced code slicing infrastructure with Tree-sitter parsing
|
|
59
62
|
|
|
60
63
|
### MCP Server
|
|
61
64
|
|
|
@@ -68,7 +71,9 @@ intent. Kodit has been tested to work well with:
|
|
|
68
71
|
- [Cursor](./getting-started/integration/index.md#integration-with-cursor)
|
|
69
72
|
- [Cline](./getting-started/integration/index.md#integration-with-cline)
|
|
70
73
|
- Please contribute more instructions! ... any other assistant is likely to work ...
|
|
71
|
-
- **New in 0.3**:
|
|
74
|
+
- **New in 0.3**: Advanced search filters by source, language, author, date range, and file path
|
|
75
|
+
- **New in 0.3**: Hybrid search combining BM25 keyword search with semantic search
|
|
76
|
+
- **New in 0.3**: Enhanced MCP tools with rich context parameters and metadata
|
|
72
77
|
|
|
73
78
|
### Enterprise Ready
|
|
74
79
|
|
|
@@ -117,6 +117,34 @@ DB_URL=postgresql+asyncpg://postgres:mysecretpassword@localhost:5432/kodit
|
|
|
117
117
|
DEFAULT_SEARCH_PROVIDER=vectorchord
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
+
## Configuring Sync
|
|
121
|
+
|
|
122
|
+
### Periodic Sync Configuration
|
|
123
|
+
|
|
124
|
+
Kodit can automatically sync all indexed codebases at regular intervals to keep them up-to-date with the latest changes. This is especially useful for server deployments where multiple users are working with the same codebases.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
# Enable/disable periodic sync (default: true)
|
|
128
|
+
SYNC_PERIODIC_ENABLED=true
|
|
129
|
+
|
|
130
|
+
# Sync interval in seconds (default: 1800 = 30 minutes)
|
|
131
|
+
SYNC_PERIODIC_INTERVAL_SECONDS=1800
|
|
132
|
+
|
|
133
|
+
# Number of retry attempts for failed syncs (default: 3)
|
|
134
|
+
SYNC_PERIODIC_RETRY_ATTEMPTS=3
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
The sync scheduler will:
|
|
138
|
+
- Run automatically in the background when the server starts
|
|
139
|
+
- Sync all existing indexes at the configured interval
|
|
140
|
+
- Handle failures gracefully with retry logic
|
|
141
|
+
- Log detailed progress and results
|
|
142
|
+
- Shut down cleanly when the server stops
|
|
143
|
+
|
|
144
|
+
{{< info >}}
|
|
145
|
+
**Note**: The sync scheduler only syncs existing indexes. It does not create new indexes for repositories that haven't been indexed yet.
|
|
146
|
+
{{< /info >}}
|
|
147
|
+
|
|
120
148
|
## Configuring Enrichment
|
|
121
149
|
|
|
122
150
|
### Default Enrichment Provider
|
|
@@ -34,6 +34,11 @@ services:
|
|
|
34
34
|
AUTO_INDEXING_SOURCES_1_URI: https://github.com/fastapi/fastapi
|
|
35
35
|
AUTO_INDEXING_SOURCES_2_URI: https://github.com/helix-ml/kodit
|
|
36
36
|
|
|
37
|
+
# Sync configuration
|
|
38
|
+
SYNC_PERIODIC_ENABLED: true
|
|
39
|
+
SYNC_PERIODIC_INTERVAL_SECONDS: 1800 # 30 minutes
|
|
40
|
+
SYNC_PERIODIC_RETRY_ATTEMPTS: 3
|
|
41
|
+
|
|
37
42
|
vectorchord:
|
|
38
43
|
image: tensorchord/vchord-suite:pg17-20250601
|
|
39
44
|
environment:
|
|
@@ -81,6 +81,12 @@ spec:
|
|
|
81
81
|
value: "https://github.com/pydantic/pydantic"
|
|
82
82
|
- name: AUTO_INDEXING_SOURCES_1_URI
|
|
83
83
|
value: "https://github.com/helix-ml/kodit"
|
|
84
|
+
- name: SYNC_PERIODIC_ENABLED
|
|
85
|
+
value: "true"
|
|
86
|
+
- name: SYNC_PERIODIC_INTERVAL_SECONDS
|
|
87
|
+
value: "1800" # 30 minutes
|
|
88
|
+
- name: SYNC_PERIODIC_RETRY_ATTEMPTS
|
|
89
|
+
value: "3"
|
|
84
90
|
ports:
|
|
85
91
|
- containerPort: 8080
|
|
86
92
|
readinessProbe:
|
|
@@ -209,26 +209,51 @@ Kodit respects [standard ignore patterns](#ignore-patterns):
|
|
|
209
209
|
- **`.gitignore`**: Standard Git ignore patterns
|
|
210
210
|
- **`.noindex`**: Custom ignore patterns for Kodit (uses gitignore syntax)
|
|
211
211
|
|
|
212
|
-
### Supported
|
|
212
|
+
### Supported Programming Languages
|
|
213
213
|
|
|
214
|
-
Kodit automatically detects and processes files based on their extensions:
|
|
214
|
+
Kodit automatically detects and processes files based on their extensions. The following languages are supported with advanced Tree-sitter parsing:
|
|
215
215
|
|
|
216
|
-
| Language | Extensions |
|
|
217
|
-
|
|
218
|
-
| Python | `.py` |
|
|
219
|
-
| JavaScript | `.js`, `.jsx` |
|
|
220
|
-
| TypeScript | `.ts`, `.tsx` |
|
|
221
|
-
|
|
|
222
|
-
|
|
|
216
|
+
| Language | Extensions | Features |
|
|
217
|
+
|----------|------------|----------|
|
|
218
|
+
| Python | `.py`, `.pyw`, `.pyx`, `.pxd` | Function/method extraction, import analysis, call graph |
|
|
219
|
+
| JavaScript | `.js`, `.jsx`, `.mjs` | Function extraction, ES6 modules, JSX support |
|
|
220
|
+
| TypeScript | `.ts`, `.tsx` | Type definitions, interfaces, decorators |
|
|
221
|
+
| Java | `.java` | Method declarations, constructors, class hierarchies |
|
|
222
|
+
| Go | `.go` | Function/method extraction, package imports |
|
|
223
|
+
| Rust | `.rs` | Function definitions, trait implementations |
|
|
224
|
+
| C/C++ | `.c`, `.h`, `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hxx` | Function definitions, header includes |
|
|
225
|
+
| C# | `.cs` | Method declarations, using directives, constructors |
|
|
226
|
+
| HTML | `.html`, `.htm` | Element extraction with ID/class identification |
|
|
227
|
+
| CSS | `.css`, `.scss`, `.sass`, `.less` | Rule extraction, selector analysis, keyframes |
|
|
223
228
|
|
|
224
|
-
### Snippet Extraction
|
|
229
|
+
### Advanced Snippet Extraction
|
|
225
230
|
|
|
226
|
-
Kodit uses
|
|
231
|
+
Kodit uses a sophisticated Tree-sitter-based slicing system to intelligently extract code snippets with context:
|
|
232
|
+
|
|
233
|
+
#### Core Features
|
|
227
234
|
|
|
228
235
|
- **Functions and Methods**: Complete function definitions with their bodies
|
|
229
236
|
- **Classes**: Class definitions and their methods
|
|
230
237
|
- **Imports**: Import statements for context
|
|
231
238
|
- **Dependencies**: Ancestor classes and functions that the snippet depends on
|
|
239
|
+
- **Call Graph Analysis**: Builds relationships between functions to understand dependencies
|
|
240
|
+
- **Context-Aware Extraction**: Includes related functions and usage examples
|
|
241
|
+
- **Topological Sorting**: Orders dependencies for optimal LLM consumption
|
|
242
|
+
|
|
243
|
+
#### Smart Dependency Tracking
|
|
244
|
+
|
|
245
|
+
- **Import Maps**: Tracks import statements and their usage
|
|
246
|
+
- **Function Calls**: Identifies which functions call which others
|
|
247
|
+
- **Reverse Dependencies**: Finds all callers of a given function
|
|
248
|
+
- **Usage Examples**: Includes examples of how functions are used in the codebase
|
|
249
|
+
|
|
250
|
+
#### Language-Specific Extraction
|
|
251
|
+
|
|
252
|
+
- **Python**: Decorators, async functions, class inheritance
|
|
253
|
+
- **JavaScript/TypeScript**: Arrow functions, async/await, ES6 modules
|
|
254
|
+
- **Java**: Annotations, generics, inheritance hierarchies
|
|
255
|
+
- **Go**: Interfaces, struct methods, package organization
|
|
256
|
+
- **HTML/CSS**: Elements with semantic context, CSS rules and selectors
|
|
232
257
|
|
|
233
258
|
## Configuration
|
|
234
259
|
|
|
@@ -269,9 +294,35 @@ DEFAULT_ENDPOINT_API_KEY=sk-your-api-key
|
|
|
269
294
|
|
|
270
295
|
## Advanced Features
|
|
271
296
|
|
|
272
|
-
### Re-indexing
|
|
297
|
+
### Selective Re-indexing
|
|
298
|
+
|
|
299
|
+
Kodit includes intelligent re-indexing that only processes files that have been modified:
|
|
300
|
+
|
|
301
|
+
#### How It Works
|
|
302
|
+
|
|
303
|
+
- **SHA256 Change Detection**: Compares file content hashes to detect changes
|
|
304
|
+
- **File Status Tracking**: Tracks files as CLEAN, MODIFIED, or DELETED
|
|
305
|
+
- **Incremental Updates**: Only re-processes changed files, improving performance for large codebases
|
|
306
|
+
- **Metadata Preservation**: Maintains file metadata and Git information
|
|
307
|
+
|
|
308
|
+
#### Benefits
|
|
309
|
+
|
|
310
|
+
- **Performance**: Dramatically faster re-indexing for large repositories
|
|
311
|
+
- **Resource Efficiency**: Reduces CPU and memory usage during updates
|
|
312
|
+
- **Consistency**: Ensures only actual changes trigger re-processing
|
|
313
|
+
- **Scalability**: Enables efficient handling of large, frequently-updated codebases
|
|
314
|
+
|
|
315
|
+
#### Usage
|
|
273
316
|
|
|
274
|
-
|
|
317
|
+
Re-indexing automatically uses selective processing when you re-index an existing source:
|
|
318
|
+
|
|
319
|
+
```sh
|
|
320
|
+
# Re-index with selective processing
|
|
321
|
+
kodit index /path/to/existing/source
|
|
322
|
+
|
|
323
|
+
# Or for Git repositories
|
|
324
|
+
kodit index https://github.com/username/repo.git
|
|
325
|
+
```
|
|
275
326
|
|
|
276
327
|
### Progress Monitoring
|
|
277
328
|
|
|
@@ -281,6 +332,24 @@ Kodit shows progress during indexing operations:
|
|
|
281
332
|
- Snippet extraction progress
|
|
282
333
|
- Index building progress (BM25, embeddings)
|
|
283
334
|
|
|
335
|
+
### Automatic Sync
|
|
336
|
+
|
|
337
|
+
For server deployments, Kodit includes an automatic sync scheduler that keeps your indexes up-to-date:
|
|
338
|
+
|
|
339
|
+
- **Periodic sync**: Automatically re-indexes all existing sources at configurable intervals
|
|
340
|
+
- **Failure handling**: Gracefully handles sync failures with retry logic
|
|
341
|
+
- **Background operation**: Runs in the background without blocking the MCP server
|
|
342
|
+
- **Configurable timing**: Adjust sync frequency based on your needs
|
|
343
|
+
|
|
344
|
+
See the [Sync Configuration](/kodit/reference/sync/index.md) documentation for detailed setup instructions.
|
|
345
|
+
|
|
346
|
+
The sync scheduler is enabled by default and will:
|
|
347
|
+
|
|
348
|
+
- Start automatically when you run `kodit serve`
|
|
349
|
+
- Sync all existing indexes every 30 minutes by default
|
|
350
|
+
- Log detailed progress and results
|
|
351
|
+
- Retry failed operations up to 3 times by default
|
|
352
|
+
|
|
284
353
|
## Privacy and Security
|
|
285
354
|
|
|
286
355
|
### Local Processing
|
|
@@ -53,21 +53,30 @@ The search tool accepts the following parameters:
|
|
|
53
53
|
| `related_file_paths` | list[Path] | Absolute paths to relevant files | `["/path/to/auth.py"]` |
|
|
54
54
|
| `related_file_contents` | list[string] | Contents of relevant files | `["def authenticate(): ..."]` |
|
|
55
55
|
| `keywords` | list[string] | Relevant keywords for the search | `["authentication", "jwt", "login"]` |
|
|
56
|
-
| `language` | string \| None | Filter by programming language | `"python"`, `"go"`, `"javascript"` |
|
|
56
|
+
| `language` | string \| None | Filter by programming language (20+ supported) | `"python"`, `"go"`, `"javascript"`, `"html"`, `"css"` |
|
|
57
57
|
| `author` | string \| None | Filter by author name | `"john.doe"` |
|
|
58
58
|
| `created_after` | string \| None | Filter by creation date (YYYY-MM-DD) | `"2023-01-01"` |
|
|
59
59
|
| `created_before` | string \| None | Filter by creation date (YYYY-MM-DD) | `"2023-12-31"` |
|
|
60
60
|
| `source_repo` | string \| None | Filter by source repository | `"github.com/example/repo"` |
|
|
61
|
+
| `file_path` | string \| None | Filter by file path pattern | `"src/"`, `"*.test.py"` |
|
|
61
62
|
|
|
62
|
-
### Search Functionality
|
|
63
|
+
### Advanced Search Functionality
|
|
63
64
|
|
|
64
|
-
The search tool combines multiple search strategies:
|
|
65
|
+
The search tool combines multiple search strategies with sophisticated ranking:
|
|
65
66
|
|
|
66
|
-
1. **Keyword Search** -
|
|
67
|
-
2. **Semantic Code Search** - Uses embeddings to find semantically similar code
|
|
67
|
+
1. **BM25 Keyword Search** - Advanced keyword matching with relevance scoring
|
|
68
|
+
2. **Semantic Code Search** - Uses embeddings to find semantically similar code patterns
|
|
68
69
|
3. **Semantic Text Search** - Uses embeddings to find code matching natural language descriptions
|
|
70
|
+
4. **Reciprocal Rank Fusion (RRF)** - Intelligently combines results from multiple search strategies
|
|
71
|
+
5. **Context-Aware Filtering** - Advanced filtering by language, author, date, source, and file path
|
|
72
|
+
6. **Dependency-Aware Results** - Returns code snippets with their dependencies and usage examples
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
#### Enhanced Result Quality
|
|
75
|
+
|
|
76
|
+
- **Smart Snippet Selection**: Returns functions with their dependencies and context
|
|
77
|
+
- **Rich Metadata**: Each result includes file path, language, author, and creation date
|
|
78
|
+
- **Usage Examples**: Includes examples of how functions are used in the codebase
|
|
79
|
+
- **Topological Ordering**: Dependencies are ordered for optimal LLM consumption
|
|
71
80
|
|
|
72
81
|
## Filtering Capabilities
|
|
73
82
|
|
|
@@ -81,6 +90,8 @@ Filter results by programming language:
|
|
|
81
90
|
> "I need to create a web server in Python. Please search for Flask or FastAPI examples and show me the best practices."
|
|
82
91
|
> "I'm working on a Go microservice. Can you search for Go-specific patterns for handling HTTP requests and database connections?"
|
|
83
92
|
> "I need JavaScript examples for form validation. Please search for modern JavaScript/TypeScript validation patterns."
|
|
93
|
+
> "I'm building a responsive layout. Please search for CSS Grid and Flexbox examples in our stylesheets."
|
|
94
|
+
> "I need HTML form examples. Please search for form elements with proper accessibility attributes."
|
|
84
95
|
|
|
85
96
|
### Author Filtering
|
|
86
97
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Sync
|
|
3
|
+
description: Automatic synchronization of indexed codebases
|
|
4
|
+
weight: 3
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Kodit includes an automatic sync scheduler that keeps your indexed codebases up-to-date with the latest changes. This is especially useful for server deployments where multiple users are working with the same codebases.
|
|
8
|
+
|
|
9
|
+
## How Sync Works
|
|
10
|
+
|
|
11
|
+
The sync scheduler runs as a background service that:
|
|
12
|
+
|
|
13
|
+
1. **Periodically checks** all existing indexes at a configurable interval
|
|
14
|
+
2. **Syncs each index** by pulling the latest changes from the source repository
|
|
15
|
+
3. **Updates the search index** with any new or modified code snippets
|
|
16
|
+
4. **Handles failures gracefully** with configurable retry attempts
|
|
17
|
+
5. **Logs detailed progress** for monitoring and debugging
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
### Environment Variables
|
|
22
|
+
|
|
23
|
+
Configure the sync scheduler using these environment variables:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Enable/disable periodic sync (default: true)
|
|
27
|
+
SYNC_PERIODIC_ENABLED=true
|
|
28
|
+
|
|
29
|
+
# Sync interval in seconds (default: 1800 = 30 minutes)
|
|
30
|
+
SYNC_PERIODIC_INTERVAL_SECONDS=1800
|
|
31
|
+
|
|
32
|
+
# Number of retry attempts for failed syncs (default: 3)
|
|
33
|
+
SYNC_PERIODIC_RETRY_ATTEMPTS=3
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Common Configuration Examples
|
|
37
|
+
|
|
38
|
+
#### Quick Development Setup
|
|
39
|
+
|
|
40
|
+
For rapid development with frequent changes:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
SYNC_PERIODIC_ENABLED=true
|
|
44
|
+
SYNC_PERIODIC_INTERVAL_SECONDS=300 # 5 minutes
|
|
45
|
+
SYNC_PERIODIC_RETRY_ATTEMPTS=1
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Production Server Setup
|
|
49
|
+
|
|
50
|
+
For production deployments with stable codebases:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
SYNC_PERIODIC_ENABLED=true
|
|
54
|
+
SYNC_PERIODIC_INTERVAL_SECONDS=3600 # 1 hour
|
|
55
|
+
SYNC_PERIODIC_RETRY_ATTEMPTS=3
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Disable Sync
|
|
59
|
+
|
|
60
|
+
If you prefer to sync manually:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
SYNC_PERIODIC_ENABLED=false
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Limitations
|
|
67
|
+
|
|
68
|
+
- **Only syncs existing indexes**: The sync scheduler does not create new indexes for repositories that haven't been indexed yet
|
|
69
|
+
- **Sequential processing**: Indexes are synced one at a time to avoid overwhelming the system
|
|
70
|
+
- **No conflict resolution**: If there are conflicts during sync, the operation may fail and require manual intervention
|
|
71
|
+
|
|
72
|
+
## Manual Sync
|
|
73
|
+
|
|
74
|
+
You can also manually sync indexes using the CLI:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Sync all indexes
|
|
78
|
+
kodit index --sync
|
|
79
|
+
```
|
|
@@ -104,6 +104,11 @@ source = ["src"]
|
|
|
104
104
|
branch = true
|
|
105
105
|
omit = []
|
|
106
106
|
|
|
107
|
+
[tool.ruff]
|
|
108
|
+
exclude = [
|
|
109
|
+
"tests/kodit/infrastructure/slicing/data/**/*.py",
|
|
110
|
+
]
|
|
111
|
+
|
|
107
112
|
[tool.ruff.lint]
|
|
108
113
|
ignore = [
|
|
109
114
|
"ANN401", # Opinionated warning on disallowing dynamically typed expressions
|
|
@@ -6,28 +6,47 @@ from contextlib import asynccontextmanager
|
|
|
6
6
|
from asgi_correlation_id import CorrelationIdMiddleware
|
|
7
7
|
from fastapi import FastAPI
|
|
8
8
|
|
|
9
|
+
from kodit.application.services.sync_scheduler import SyncSchedulerService
|
|
9
10
|
from kodit.config import AppContext
|
|
10
11
|
from kodit.infrastructure.indexing.auto_indexing_service import AutoIndexingService
|
|
11
12
|
from kodit.mcp import mcp
|
|
12
13
|
from kodit.middleware import ASGICancelledErrorMiddleware, logging_middleware
|
|
13
14
|
|
|
14
|
-
# Global
|
|
15
|
+
# Global services
|
|
15
16
|
_auto_indexing_service: AutoIndexingService | None = None
|
|
17
|
+
_sync_scheduler_service: SyncSchedulerService | None = None
|
|
16
18
|
|
|
17
19
|
|
|
18
20
|
@asynccontextmanager
|
|
19
21
|
async def app_lifespan(_: FastAPI) -> AsyncIterator[None]:
|
|
20
|
-
"""Manage application lifespan for auto-indexing."""
|
|
21
|
-
global _auto_indexing_service # noqa: PLW0603
|
|
22
|
-
|
|
22
|
+
"""Manage application lifespan for auto-indexing and sync."""
|
|
23
|
+
global _auto_indexing_service, _sync_scheduler_service # noqa: PLW0603
|
|
24
|
+
|
|
23
25
|
app_context = AppContext()
|
|
24
26
|
db = await app_context.get_db()
|
|
27
|
+
|
|
28
|
+
# Start auto-indexing service
|
|
25
29
|
_auto_indexing_service = AutoIndexingService(
|
|
26
30
|
app_context=app_context,
|
|
27
31
|
session_factory=db.session_factory,
|
|
28
32
|
)
|
|
29
33
|
await _auto_indexing_service.start_background_indexing()
|
|
34
|
+
|
|
35
|
+
# Start sync scheduler service
|
|
36
|
+
if app_context.sync.enabled:
|
|
37
|
+
_sync_scheduler_service = SyncSchedulerService(
|
|
38
|
+
app_context=app_context,
|
|
39
|
+
session_factory=db.session_factory,
|
|
40
|
+
)
|
|
41
|
+
_sync_scheduler_service.start_periodic_sync(
|
|
42
|
+
interval_seconds=app_context.sync.interval_seconds
|
|
43
|
+
)
|
|
44
|
+
|
|
30
45
|
yield
|
|
46
|
+
|
|
47
|
+
# Stop services
|
|
48
|
+
if _sync_scheduler_service:
|
|
49
|
+
await _sync_scheduler_service.stop_periodic_sync()
|
|
31
50
|
if _auto_indexing_service:
|
|
32
51
|
await _auto_indexing_service.stop()
|
|
33
52
|
|
|
@@ -13,7 +13,7 @@ from kodit.domain.services.index_query_service import IndexQueryService
|
|
|
13
13
|
from kodit.domain.services.index_service import (
|
|
14
14
|
IndexDomainService,
|
|
15
15
|
)
|
|
16
|
-
from kodit.domain.value_objects import LanguageMapping
|
|
16
|
+
from kodit.domain.value_objects import LanguageMapping
|
|
17
17
|
from kodit.infrastructure.bm25.bm25_factory import bm25_repository_factory
|
|
18
18
|
from kodit.infrastructure.embedding.embedding_factory import (
|
|
19
19
|
embedding_domain_service_factory,
|
|
@@ -31,15 +31,9 @@ from kodit.infrastructure.enrichment.null_enrichment_provider import (
|
|
|
31
31
|
NullEnrichmentProvider,
|
|
32
32
|
)
|
|
33
33
|
from kodit.infrastructure.indexing.fusion_service import ReciprocalRankFusionService
|
|
34
|
-
from kodit.infrastructure.
|
|
35
|
-
create_snippet_query_provider,
|
|
36
|
-
)
|
|
37
|
-
from kodit.infrastructure.snippet_extraction.language_detection_service import (
|
|
34
|
+
from kodit.infrastructure.slicing.language_detection_service import (
|
|
38
35
|
FileSystemLanguageDetectionService,
|
|
39
36
|
)
|
|
40
|
-
from kodit.infrastructure.snippet_extraction.tree_sitter_snippet_extractor import (
|
|
41
|
-
TreeSitterSnippetExtractor,
|
|
42
|
-
)
|
|
43
37
|
from kodit.infrastructure.sqlalchemy.embedding_repository import (
|
|
44
38
|
SqlAlchemyEmbeddingRepository,
|
|
45
39
|
)
|
|
@@ -63,17 +57,9 @@ def create_code_indexing_application_service(
|
|
|
63
57
|
|
|
64
58
|
# Create infrastructure services
|
|
65
59
|
language_detector = FileSystemLanguageDetectionService(language_map)
|
|
66
|
-
query_provider = create_snippet_query_provider()
|
|
67
60
|
|
|
68
|
-
# Create snippet extractors
|
|
69
|
-
method_extractor = TreeSitterSnippetExtractor(query_provider)
|
|
70
|
-
|
|
71
|
-
snippet_extractors = {
|
|
72
|
-
SnippetExtractionStrategy.METHOD_BASED: method_extractor,
|
|
73
|
-
}
|
|
74
61
|
index_domain_service = IndexDomainService(
|
|
75
62
|
language_detector=language_detector,
|
|
76
|
-
snippet_extractors=snippet_extractors,
|
|
77
63
|
enrichment_service=enrichment_service,
|
|
78
64
|
clone_dir=app_context.get_clone_dir(),
|
|
79
65
|
)
|
|
@@ -136,17 +122,9 @@ def create_fast_test_code_indexing_application_service(
|
|
|
136
122
|
|
|
137
123
|
# Create infrastructure services
|
|
138
124
|
language_detector = FileSystemLanguageDetectionService(language_map)
|
|
139
|
-
query_provider = create_snippet_query_provider()
|
|
140
|
-
|
|
141
|
-
# Create snippet extractors
|
|
142
|
-
method_extractor = TreeSitterSnippetExtractor(query_provider)
|
|
143
125
|
|
|
144
|
-
snippet_extractors = {
|
|
145
|
-
SnippetExtractionStrategy.METHOD_BASED: method_extractor,
|
|
146
|
-
}
|
|
147
126
|
index_domain_service = IndexDomainService(
|
|
148
127
|
language_detector=language_detector,
|
|
149
|
-
snippet_extractors=snippet_extractors,
|
|
150
128
|
enrichment_service=enrichment_service,
|
|
151
129
|
clone_dir=app_context.get_clone_dir(),
|
|
152
130
|
)
|