kodit 0.3.17__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of kodit might be problematic. Click here for more details.
- {kodit-0.3.17 → kodit-0.4.1}/Dockerfile +1 -16
- {kodit-0.3.17 → kodit-0.4.1}/PKG-INFO +3 -2
- kodit-0.4.1/docs/demos/go-simple-microservice/index.md +112 -0
- kodit-0.4.1/docs/demos/knock-knock-auth/index.md +154 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/index.md +111 -1
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/openapi.json +217 -1
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/configuration/index.md +58 -21
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/deployment/docker-compose.yaml +2 -6
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/deployment/kubernetes.yaml +3 -11
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/indexing/index.md +0 -120
- {kodit-0.3.17 → kodit-0.4.1}/pyproject.toml +2 -1
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/_version.py +16 -3
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/app.py +6 -1
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/queue_service.py +5 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/config.py +11 -16
- kodit-0.4.1/src/kodit/infrastructure/api/v1/__init__.py +5 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/routers/__init__.py +2 -1
- kodit-0.4.1/src/kodit/infrastructure/api/v1/routers/queue.py +76 -0
- kodit-0.4.1/src/kodit/infrastructure/api/v1/schemas/queue.py +35 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/embedding_factory.py +10 -16
- kodit-0.4.1/src/kodit/infrastructure/embedding/embedding_providers/litellm_embedding_provider.py +163 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/enrichment/enrichment_factory.py +7 -16
- kodit-0.3.17/src/kodit/infrastructure/enrichment/openai_enrichment_provider.py → kodit-0.4.1/src/kodit/infrastructure/enrichment/litellm_enrichment_provider.py +70 -60
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/git/git_utils.py +7 -1
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/log.py +6 -0
- kodit-0.4.1/tests/kodit/application/services/queue_service_get_task_test.py +63 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/config_test.py +0 -31
- kodit-0.4.1/tests/kodit/infrastructure/embedding/embedding_factory_test.py +47 -0
- kodit-0.4.1/tests/kodit/infrastructure/embedding/embedding_provider/litellm_embedding_provider_test.py +388 -0
- kodit-0.3.17/tests/kodit/infrastructure/embedding/test_openai_socket_providers.py → kodit-0.4.1/tests/kodit/infrastructure/embedding/test_litellm_socket_providers.py +69 -11
- kodit-0.4.1/tests/kodit/infrastructure/enrichment/enrichment_factory_test.py +44 -0
- kodit-0.4.1/tests/kodit/infrastructure/enrichment/enrichment_provider/litellm_enrichment_provider_test.py +392 -0
- {kodit-0.3.17 → kodit-0.4.1}/uv.lock +369 -6
- kodit-0.3.17/docs/demos/go-simple-microservice/index.md +0 -1829
- kodit-0.3.17/docs/demos/knock-knock-auth/index.md +0 -336
- kodit-0.3.17/src/kodit/infrastructure/api/v1/__init__.py +0 -5
- kodit-0.3.17/src/kodit/infrastructure/embedding/embedding_providers/openai_embedding_provider.py +0 -183
- kodit-0.3.17/tests/kodit/infrastructure/embedding/embedding_factory_test.py +0 -85
- kodit-0.3.17/tests/kodit/infrastructure/embedding/embedding_provider/openai_embedding_provider_test.py +0 -367
- kodit-0.3.17/tests/kodit/infrastructure/enrichment/enrichment_factory_test.py +0 -190
- kodit-0.3.17/tests/kodit/infrastructure/enrichment/enrichment_provider/openai_enrichment_provider_test.py +0 -405
- {kodit-0.3.17 → kodit-0.4.1}/.claude/commands/debug.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.claude/commands/new-requirement.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.claude/commands/refactor.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.claude/commands/update-docs.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.claude/settings.json +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.cursor/rules/kodit.mdc +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.cursor/rules/style.mdc +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.dockerignore +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/CODE_OF_CONDUCT.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/CONTRIBUTING.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/dependabot.yml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/docker.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/docs.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/pull_request.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/pypi-test.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/pypi.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.github/workflows/test.yaml +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.gitignore +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.python-version +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.vscode/launch.json +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/.vscode/settings.json +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/CLAUDE.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/LICENSE +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/Makefile +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/README.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/alembic.ini +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/_index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/demos/_index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/developer/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/getting-started/_index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/getting-started/installation/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/getting-started/integration/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/getting-started/quick-start/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/_index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/templates/_content.md.j2 +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/templates/_example.md.j2 +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/templates/_object_schema.md.j2 +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/templates/_security_scheme.md.j2 +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/api/templates/api_doc_template.md.j2 +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/deployment/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/hosted-kodit/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/mcp/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/sync/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/docs/reference/telemetry/index.md +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/.gitignore +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/factories/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/factories/code_indexing_factory.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/auto_indexing_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/code_indexing_application_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/indexing_worker_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/application/services/sync_scheduler.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/cli.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/cli_utils.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/database.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/entities.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/errors.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/interfaces.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/protocols.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/bm25_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/embedding_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/enrichment_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/index_query_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/services/index_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/domain/value_objects.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/base.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/exceptions.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/generated_endpoints.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/index_client.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/client/search_client.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/middleware/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/middleware/auth.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/dependencies.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/routers/indexes.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/routers/search.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/schemas/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/schemas/context.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/schemas/index.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/api/v1/schemas/search.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/bm25/bm25_factory.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/bm25/local_bm25_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/bm25/vectorchord_bm25_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/cloning/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/cloning/git/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/cloning/git/working_copy.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/cloning/metadata.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/embedding_providers/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/embedding_providers/batching.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/embedding_providers/hash_embedding_provider.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/embedding_providers/local_embedding_provider.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/local_vector_search_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/embedding/vectorchord_vector_search_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/enrichment/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/enrichment/local_enrichment_provider.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/enrichment/null_enrichment_provider.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/enrichment/utils.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/git/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/ignore/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/ignore/ignore_pattern_provider.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/indexing/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/indexing/fusion_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/mappers/index_mapper.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/mappers/task_mapper.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/slicing/language_detection_service.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/slicing/slicer.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/sqlalchemy/embedding_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/sqlalchemy/entities.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/sqlalchemy/index_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/sqlalchemy/task_repository.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/ui/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/ui/progress.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/infrastructure/ui/spinner.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/mcp.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/middleware.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/README +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/env.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/script.py.mako +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/4073b33f9436_add_file_processing_flag.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/4552eb3f23ce_add_summary.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/7c3bbc2ab32b_add_embeddings_table.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/85155663351e_initial.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/9cf0e87de578_add_queue.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/9e53ea8bb3b0_add_authors.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/migrations/versions/c3f5137d30f5_index_all_the_things.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/reporting.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/utils/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/utils/dump_openapi.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/utils/generate_api_paths.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/src/kodit/utils/path_utils.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/conftest.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/docker-smoke.sh +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/experiments/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/experiments/cline_prompt_tests/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/experiments/cline_prompt_tests/cline_prompt.txt +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/experiments/cline_prompt_tests/cline_prompt_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/app_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/code_indexing_application_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/services/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/services/auto_indexing_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/services/indexing_worker_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/services/queue_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/application/services/sync_scheduler_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/cli_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/bm25_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/embedding_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/enrichment_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/entities_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/language_detection_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/services/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/services/index_service_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/domain/value_objects_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/e2e.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/bm25/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/bm25/local_bm25_repository_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/bm25/vectorchord_bm25_repository_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/cloning/git_cloning/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/cloning/git_cloning/working_copy_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/batching_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/embedding_provider/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/embedding_provider/hash_embedding_provider_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/embedding_provider/local_embedding_provider_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/local_vector_search_repository_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/test_embedding_integration.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/embedding/vectorchord_vector_search_repository_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/enrichment/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/enrichment/enrichment_provider/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/enrichment/enrichment_provider/local_enrichment_provider_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/enrichment/enrichment_provider/null_enrichment_provider_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/enrichment/utils_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/mappers/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/mappers/index_mapper_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/c/main.c +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/c/models.c +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/c/models.h +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/c/utils.c +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/c/utils.h +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/cpp/main.cpp +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/cpp/models.cpp +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/cpp/models.hpp +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/cpp/utils.cpp +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/cpp/utils.hpp +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/csharp/Main.cs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/csharp/Models.cs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/csharp/Utils.cs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/css/components.css +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/css/main.css +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/css/utilities.css +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/go/main.go +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/go/models.go +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/go/utils.go +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/html/components.html +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/html/forms.html +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/html/main.html +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/java/Main.java +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/java/Models.java +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/java/Utils.java +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/javascript/main.js +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/javascript/models.js +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/javascript/utils.js +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/python/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/python/main.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/python/models.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/python/utils.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/rust/main.rs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/rust/models.rs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/data/rust/utils.rs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/slicing/slicer_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/csharp.cs +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/golang.go +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/javascript.js +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/knock_knock_server.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/python.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/snippets/typescript.tsx +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/sqlalchemy/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/infrastructure/sqlalchemy/embedding_repository_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/log_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/kodit/mcp_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/performance/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/performance/similarity.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/smoke.sh +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/utils/__init__.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/utils/path_utils_test.py +0 -0
- {kodit-0.3.17 → kodit-0.4.1}/tests/vectorchord-smoke.sh +0 -0
|
@@ -78,23 +78,8 @@ EOT
|
|
|
78
78
|
|
|
79
79
|
ENV PATH=/app/bin:$PATH
|
|
80
80
|
|
|
81
|
-
# Don't run your app as root.
|
|
82
|
-
RUN <<EOT
|
|
83
|
-
groupadd -r app
|
|
84
|
-
useradd -r -d /app -g app -N app
|
|
85
|
-
EOT
|
|
86
|
-
|
|
87
|
-
STOPSIGNAL SIGINT
|
|
88
|
-
|
|
89
|
-
# Configure a default data directory so the app can write to it and volumes can be mounted to it
|
|
90
|
-
RUN mkdir -p /data && chown -R app:app /data
|
|
91
|
-
ENV DATA_DIR=/data
|
|
92
|
-
|
|
93
|
-
USER app
|
|
94
81
|
WORKDIR /app
|
|
95
|
-
|
|
96
82
|
ENTRYPOINT ["/app/bin/kodit"]
|
|
97
83
|
|
|
98
84
|
# Copy the pre-built `/app` directory to the runtime container
|
|
99
|
-
|
|
100
|
-
COPY --from=build --chown=app:app /app /app
|
|
85
|
+
COPY --from=build /app /app
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kodit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
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/
|
|
@@ -35,7 +35,8 @@ Requires-Dist: gitpython>=3.1.44
|
|
|
35
35
|
Requires-Dist: hf-xet>=1.1.2
|
|
36
36
|
Requires-Dist: httpx-retries>=0.3.2
|
|
37
37
|
Requires-Dist: httpx>=0.28.1
|
|
38
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: litellm>=1.75.8
|
|
39
|
+
Requires-Dist: openai==1.99.9
|
|
39
40
|
Requires-Dist: pathspec>=0.12.1
|
|
40
41
|
Requires-Dist: pydantic-settings>=2.9.1
|
|
41
42
|
Requires-Dist: pystemmer>=3.0.0
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Kodit Demo: Simple Go Microservice"
|
|
3
|
+
linkTitle: Microservices
|
|
4
|
+
description: A simple demo of Kodit on a multi-repo microservices example in Go.
|
|
5
|
+
weight: 2
|
|
6
|
+
tags:
|
|
7
|
+
- demo
|
|
8
|
+
- go
|
|
9
|
+
- microservices
|
|
10
|
+
- cline
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
When code is spread across repositories, like when developing microservices, it can be
|
|
14
|
+
hard for coding assistants to know what APIs to call or what data structures to use.
|
|
15
|
+
|
|
16
|
+
This example demonstrates using Kodit to index and expose critical microservice
|
|
17
|
+
information to quickly develop new services in a microservice environment.
|
|
18
|
+
|
|
19
|
+
You'll see that with Kodit the AI assistant delivers:
|
|
20
|
+
|
|
21
|
+
- Faster overall implementation
|
|
22
|
+
- Fewer mistakes
|
|
23
|
+
- Fewer tokens used
|
|
24
|
+
|
|
25
|
+
## Example: Building Microservices
|
|
26
|
+
|
|
27
|
+
Here is the prompt I used to build my new microservice:
|
|
28
|
+
|
|
29
|
+
> Develop a new Go microservice that exposes functionality for a notional "shipping"
|
|
30
|
+
> department. They need to list current orders from the orders
|
|
31
|
+
> microservice and get the user's information for each order. This should then expose a rest API to list out today's orders and where they need > to be shipped. It should also have an API to update an order status to say it has been shipped.
|
|
32
|
+
>
|
|
33
|
+
> Use internal Go libraries only for this.
|
|
34
|
+
|
|
35
|
+
## Initial Results in Cline
|
|
36
|
+
|
|
37
|
+
Without Kodit, the AI assistant attempted to rebuild a new mock microservice to test
|
|
38
|
+
against, despite not asking for it. Here is a short extract from the [full transcript](https://gist.github.com/philwinder/75b0d3120176cf3f17464e2b57c8727e#file-before_cline_without_kodit-txt):
|
|
39
|
+
|
|
40
|
+
> The Go microservice for the shipping department has been developed and is running on port 8082. It exposes two REST API endpoints:
|
|
41
|
+
>
|
|
42
|
+
> - GET /orders/today: Lists today's orders with user information and shipping addresses by fetching data from the orders microservice.
|
|
43
|
+
> - POST /orders/{id}/ship: Updates the status of an order to "shipped" by sending a request to the orders microservice.
|
|
44
|
+
>
|
|
45
|
+
> A mock orders microservice has also been created and is running on port 8081 to
|
|
46
|
+
> support testing. It provides endpoints to list orders, get user
|
|
47
|
+
> information, and update order status.
|
|
48
|
+
>
|
|
49
|
+
> Both services are running concurrently and ready for integration testing.
|
|
50
|
+
|
|
51
|
+
Without the knowledge of the other pre-existing microservices the AI
|
|
52
|
+
assistant has incorrectly built new mock microservices to fulfil the original request.
|
|
53
|
+
It has also used incorrect APIs.
|
|
54
|
+
|
|
55
|
+
## Results When Adding Kodit to Cline
|
|
56
|
+
|
|
57
|
+
Now let's index the microservices and try again:
|
|
58
|
+
|
|
59
|
+
1. Start afresh. Delete your data directory or your database.
|
|
60
|
+
2. Index the [users
|
|
61
|
+
microservice](https://gist.github.com/philwinder/db2e17413332844fa4b14971ae5adb34):
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
kodit index https://gist.github.com/philwinder/db2e17413332844fa4b14971ae5adb34.git
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
3. Index the [orders
|
|
68
|
+
microservice](https://gist.github.com/philwinder/7aa38185e20433c04c533f2b28f4e217):
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
kodit index https://gist.github.com/philwinder/7aa38185e20433c04c533f2b28f4e217.git
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
4. Launch the MCP server:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
kodit serve
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
5. [Connect Cline](/kodit/getting-started/integration/index.md).
|
|
81
|
+
|
|
82
|
+
With Kodit, cline is able to query for relevant microservices. The net result (with a
|
|
83
|
+
few iterations of fixing the code!) is a new microservice that correctly calls the other
|
|
84
|
+
microservices to obtain information. ([Full transcript](https://gist.github.com/philwinder/75b0d3120176cf3f17464e2b57c8727e#file-after_cline_adding_kodit-txt))
|
|
85
|
+
|
|
86
|
+
For example, here's the code generated to get users:
|
|
87
|
+
|
|
88
|
+
```go
|
|
89
|
+
// getUsers calls the user microservice to get the list of users.
|
|
90
|
+
// It assumes the user service is running on localhost:8080 and provides a JSON array of users.
|
|
91
|
+
func getUsers() ([]User, error) {
|
|
92
|
+
resp, err := http.Get("<http://localhost:8080/users>")
|
|
93
|
+
if err != nil {
|
|
94
|
+
return nil, err
|
|
95
|
+
}
|
|
96
|
+
defer resp.Body.Close()
|
|
97
|
+
body, err := io.ReadAll(resp.Body)
|
|
98
|
+
if err != nil {
|
|
99
|
+
return nil, err
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
var users []User
|
|
103
|
+
err = json.Unmarshal(body, &users)
|
|
104
|
+
if err != nil {
|
|
105
|
+
return nil, err
|
|
106
|
+
}
|
|
107
|
+
return users, nil
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Note how it knows that users are coming from a separate microservice and has even
|
|
112
|
+
generated compliant structs to parse the response.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Kodit Demo: Proprietary Auth Patterns"
|
|
3
|
+
linkTitle: Proprietary Code
|
|
4
|
+
description: A demo of Kodit where knowledge of proprietary code is required.
|
|
5
|
+
weight: 1
|
|
6
|
+
tags:
|
|
7
|
+
- demo
|
|
8
|
+
- auth
|
|
9
|
+
- cursor
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
A common feature of private codebases is proprietary code to achieve a certain
|
|
13
|
+
task. For example, you might a specific way to request data from your data lake, or a
|
|
14
|
+
specific format to use when using a common API.
|
|
15
|
+
|
|
16
|
+
This example uses the analogy of a proprietary authentication mechanism. I have a super
|
|
17
|
+
secret server with sensitive data. It is protected with a [custom auth implementation](https://gist.github.com/cbf0bd1f3338ddf9f98879148d2d752d)
|
|
18
|
+
that requires the user to "knock three times" before they get access.
|
|
19
|
+
|
|
20
|
+
You'll see that with Kodit the AI assistant delivers:
|
|
21
|
+
|
|
22
|
+
- Faster overall implementation
|
|
23
|
+
- Fewer mistakes
|
|
24
|
+
- Fewer tokens used
|
|
25
|
+
|
|
26
|
+
## Initial Results With Cursor
|
|
27
|
+
|
|
28
|
+
Without Kodit, an AI assistant makes an average assumption about what the auth might
|
|
29
|
+
look like, based upon the context provided by the user. The transcript is below. You can
|
|
30
|
+
see that Cursor doesn't have a chance.
|
|
31
|
+
|
|
32
|
+
### Original Cursor Response
|
|
33
|
+
|
|
34
|
+
> **User**
|
|
35
|
+
>
|
|
36
|
+
> Write a python script that is able to access my super secret knock knock api on localhost:8000/secret.
|
|
37
|
+
>
|
|
38
|
+
> **Cursor**
|
|
39
|
+
>
|
|
40
|
+
> I'll help you create a Python script to interact with your local knock knock API. I'll create a script that makes a > request to the specified endpoint.
|
|
41
|
+
>
|
|
42
|
+
> Let me write a script that uses the `requests` library to make HTTP requests to your local API:
|
|
43
|
+
>
|
|
44
|
+
> ```python
|
|
45
|
+
> import requests
|
|
46
|
+
>
|
|
47
|
+
> def access_secret_api():
|
|
48
|
+
> try:
|
|
49
|
+
> # Make a GET request to the secret endpoint
|
|
50
|
+
> response = requests.get('http://localhost:8000/secret')
|
|
51
|
+
>
|
|
52
|
+
> # Check if the request was successful
|
|
53
|
+
> response.raise_for_status()
|
|
54
|
+
>
|
|
55
|
+
> # Print the response
|
|
56
|
+
> print("Response from secret API:", response.text)
|
|
57
|
+
>
|
|
58
|
+
> except requests.exceptions.RequestException as e:
|
|
59
|
+
> print(f"Error accessing the API: {e}")
|
|
60
|
+
>
|
|
61
|
+
> if __name__ == "__main__":
|
|
62
|
+
> access_secret_api()
|
|
63
|
+
> ```
|
|
64
|
+
>
|
|
65
|
+
> I've created a Python script that will:
|
|
66
|
+
>
|
|
67
|
+
> 1. Make a GET request to `http://localhost:8000/secret`
|
|
68
|
+
> 2. Handle any potential errors that might occur during the request
|
|
69
|
+
> 3. Print the response from the API if successful
|
|
70
|
+
>
|
|
71
|
+
> To run this script, you'll need to have the `requests` library installed. You can install it using pip:
|
|
72
|
+
|
|
73
|
+
## Results When Adding Kodit to Cursor
|
|
74
|
+
|
|
75
|
+
Now let's index the code for my secret server and then leverage Kodit in Cursor.
|
|
76
|
+
|
|
77
|
+
1. Start afresh. Delete your data directory or your database.
|
|
78
|
+
2. Index the [server code](https://gist.github.com/cbf0bd1f3338ddf9f98879148d2d752d): `kodit index https://gist.github.com/cbf0bd1f3338ddf9f98879148d2d752d.git`
|
|
79
|
+
3. Launch the MCP server: `kodit serve`kodit
|
|
80
|
+
4. Connect Cursor.
|
|
81
|
+
|
|
82
|
+
The results are shown below. Cursor has correctly queried Kodit, which has responded with examples of the super secret auth implementation. This lead to cursor producing valid, working code that adhered to our esoteric auth implementation!
|
|
83
|
+
|
|
84
|
+
Here is the result of running the generated code:
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
uv run temp.py
|
|
88
|
+
Knock 1: Knock 1 received (token: sAQmj2uFrRxc-e9blSCfFg)
|
|
89
|
+
Knock 2: Knock 2 received (token: sAQmj2uFrRxc-e9blSCfFg)
|
|
90
|
+
Knock 3: Knock 3 received (token: sAQmj2uFrRxc-e9blSCfFg)
|
|
91
|
+
Secret area: {'message': 'Welcome to the secret area!', 'secret': 'The answer is 42'}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Kodit Cursor Response
|
|
95
|
+
|
|
96
|
+
> **User**
|
|
97
|
+
>
|
|
98
|
+
> Write a python script that is able to access my super secret knock knock api on localhost:8000/secret.
|
|
99
|
+
>
|
|
100
|
+
> **Cursor**
|
|
101
|
+
>
|
|
102
|
+
> Based on the information found in the codebase, your "super secret knock knock API" on `localhost:8000/secret` requires a > special authentication flow:
|
|
103
|
+
>
|
|
104
|
+
> 1. You must make 3 POST requests to `/knock`. Each time, you use the same token (provided in the response) in the > Authorization header as a Bearer token.
|
|
105
|
+
> 2. After 3 knocks, you can access `/secret` with a GET request, using the same token in the Authorization header.
|
|
106
|
+
>
|
|
107
|
+
> Would you like a Python script that automates this entire process (performs the 3 knocks and then accesses the secret), > or do you want just an example of how to access `/secret` assuming you already have a valid token?
|
|
108
|
+
>
|
|
109
|
+
> **User**
|
|
110
|
+
>
|
|
111
|
+
> the whole process.
|
|
112
|
+
>
|
|
113
|
+
> **Cursor**
|
|
114
|
+
>
|
|
115
|
+
> ```python
|
|
116
|
+
> import requests
|
|
117
|
+
>
|
|
118
|
+
> BASE_URL = "http://localhost:8000"
|
|
119
|
+
> KNOCKS_REQUIRED = 3
|
|
120
|
+
>
|
|
121
|
+
> def knock_and_get_secret():
|
|
122
|
+
> token = None
|
|
123
|
+
> headers = {}
|
|
124
|
+
> for i in range(KNOCKS_REQUIRED):
|
|
125
|
+
> if token:
|
|
126
|
+
> headers = {"Authorization": f"Bearer {token}"}
|
|
127
|
+
> else:
|
|
128
|
+
> headers = {}
|
|
129
|
+
> resp = requests.post(f"{BASE_URL}/knock", headers=headers)
|
|
130
|
+
> resp.raise_for_status()
|
|
131
|
+
> data = resp.json()
|
|
132
|
+
> token = data["token"]
|
|
133
|
+
> print(f"Knock {i+1}: {data['message']} (token: {token})")
|
|
134
|
+
>
|
|
135
|
+
> # Now access the secret
|
|
136
|
+
> headers = {"Authorization": f"Bearer {token}"}
|
|
137
|
+
> resp = requests.get(f"{BASE_URL}/secret", headers=headers)
|
|
138
|
+
> if resp.status_code == 200:
|
|
139
|
+
> print("Secret area:", resp.json())
|
|
140
|
+
> else:
|
|
141
|
+
> print("Failed to access secret:", resp.status_code, resp.text)
|
|
142
|
+
>
|
|
143
|
+
> if __name__ == "__main__":
|
|
144
|
+
> knock_and_get_secret()
|
|
145
|
+
>
|
|
146
|
+
> ```
|
|
147
|
+
>
|
|
148
|
+
> I've written a Python script in `temp.py` that automates the entire process:
|
|
149
|
+
>
|
|
150
|
+
> - It performs 3 POST requests to `/knock`, passing the token as required.
|
|
151
|
+
> - After the third knock, it makes a GET request to `/secret` with the token.
|
|
152
|
+
> - The script prints out the secret or any error message.
|
|
153
|
+
>
|
|
154
|
+
> You just need to have the `requests` library installed (`pip install requests`) to run this script. Let me know if you > want any adjustments or further explanation!
|
|
@@ -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.3.
|
|
15
|
+
Current version: 0.3.18
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
18
|
|
|
@@ -126,6 +126,58 @@ Delete an index.
|
|
|
126
126
|
|
|
127
127
|
- 404: Index not found
|
|
128
128
|
|
|
129
|
+
### GET /api/v1/queue
|
|
130
|
+
|
|
131
|
+
List all tasks in the queue.
|
|
132
|
+
|
|
133
|
+
Optionally filter by task type.
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
#### Parameters
|
|
137
|
+
|
|
138
|
+
| Name | Type | Required | Description |
|
|
139
|
+
|------|------|----------|-------------|
|
|
140
|
+
| task_type | | False | |
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
#### Responses
|
|
144
|
+
|
|
145
|
+
- 200: Successful Response
|
|
146
|
+
|
|
147
|
+
[TaskListResponse](#tasklistresponse)
|
|
148
|
+
|
|
149
|
+
- 500: Internal server error
|
|
150
|
+
|
|
151
|
+
- 401: Unauthorized
|
|
152
|
+
|
|
153
|
+
- 422: Invalid request
|
|
154
|
+
|
|
155
|
+
### GET /api/v1/queue/{task_id}
|
|
156
|
+
|
|
157
|
+
Get details of a specific task in the queue.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
#### Parameters
|
|
161
|
+
|
|
162
|
+
| Name | Type | Required | Description |
|
|
163
|
+
|------|------|----------|-------------|
|
|
164
|
+
| task_id | string | True | |
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
#### Responses
|
|
168
|
+
|
|
169
|
+
- 200: Successful Response
|
|
170
|
+
|
|
171
|
+
[TaskResponse](#taskresponse)
|
|
172
|
+
|
|
173
|
+
- 500: Internal server error
|
|
174
|
+
|
|
175
|
+
- 401: Unauthorized
|
|
176
|
+
|
|
177
|
+
- 422: Invalid request
|
|
178
|
+
|
|
179
|
+
- 404: Task not found
|
|
180
|
+
|
|
129
181
|
### POST /api/v1/search
|
|
130
182
|
|
|
131
183
|
Search code snippets with filters matching MCP tool.
|
|
@@ -351,6 +403,64 @@ Snippet data for JSON:API responses.
|
|
|
351
403
|
| attributes | | |
|
|
352
404
|
|
|
353
405
|
|
|
406
|
+
### TaskAttributes
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
Task attributes for JSON:API responses.
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
| Field | Type | Description |
|
|
413
|
+
|-------|------|-------------|
|
|
414
|
+
| type | string | |
|
|
415
|
+
| priority | integer | |
|
|
416
|
+
| payload | object | |
|
|
417
|
+
| created_at | | |
|
|
418
|
+
| updated_at | | |
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
### TaskData
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
Task data for JSON:API responses.
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
| Field | Type | Description |
|
|
428
|
+
|-------|------|-------------|
|
|
429
|
+
| type | string | |
|
|
430
|
+
| id | string | |
|
|
431
|
+
| attributes | | |
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
### TaskListResponse
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
JSON:API response for task list.
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
| Field | Type | Description |
|
|
441
|
+
|-------|------|-------------|
|
|
442
|
+
| data | array | |
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
### TaskResponse
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
JSON:API response for single task.
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
| Field | Type | Description |
|
|
452
|
+
|-------|------|-------------|
|
|
453
|
+
| data | | |
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
### TaskType
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
Task type.
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
354
464
|
### ValidationError
|
|
355
465
|
|
|
356
466
|
|
|
@@ -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.3.
|
|
6
|
+
"version": "0.3.18"
|
|
7
7
|
},
|
|
8
8
|
"paths": {
|
|
9
9
|
"/healthz": {
|
|
@@ -197,6 +197,110 @@
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
+
"/api/v1/queue": {
|
|
201
|
+
"get": {
|
|
202
|
+
"tags": [
|
|
203
|
+
"queue"
|
|
204
|
+
],
|
|
205
|
+
"summary": "List Queue Tasks",
|
|
206
|
+
"description": "List all tasks in the queue.\n\nOptionally filter by task type.",
|
|
207
|
+
"operationId": "list_queue_tasks_api_v1_queue_get",
|
|
208
|
+
"security": [
|
|
209
|
+
{
|
|
210
|
+
"Header (X-API-KEY)": []
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"parameters": [
|
|
214
|
+
{
|
|
215
|
+
"name": "task_type",
|
|
216
|
+
"in": "query",
|
|
217
|
+
"required": false,
|
|
218
|
+
"schema": {
|
|
219
|
+
"anyOf": [
|
|
220
|
+
{
|
|
221
|
+
"$ref": "#/components/schemas/TaskType"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "null"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"title": "Task Type"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"responses": {
|
|
232
|
+
"200": {
|
|
233
|
+
"description": "Successful Response",
|
|
234
|
+
"content": {
|
|
235
|
+
"application/json": {
|
|
236
|
+
"schema": {
|
|
237
|
+
"$ref": "#/components/schemas/TaskListResponse"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"500": {
|
|
243
|
+
"description": "Internal server error"
|
|
244
|
+
},
|
|
245
|
+
"401": {
|
|
246
|
+
"description": "Unauthorized"
|
|
247
|
+
},
|
|
248
|
+
"422": {
|
|
249
|
+
"description": "Invalid request"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"/api/v1/queue/{task_id}": {
|
|
255
|
+
"get": {
|
|
256
|
+
"tags": [
|
|
257
|
+
"queue"
|
|
258
|
+
],
|
|
259
|
+
"summary": "Get Queue Task",
|
|
260
|
+
"description": "Get details of a specific task in the queue.",
|
|
261
|
+
"operationId": "get_queue_task_api_v1_queue__task_id__get",
|
|
262
|
+
"security": [
|
|
263
|
+
{
|
|
264
|
+
"Header (X-API-KEY)": []
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"parameters": [
|
|
268
|
+
{
|
|
269
|
+
"name": "task_id",
|
|
270
|
+
"in": "path",
|
|
271
|
+
"required": true,
|
|
272
|
+
"schema": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"title": "Task Id"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"responses": {
|
|
279
|
+
"200": {
|
|
280
|
+
"description": "Successful Response",
|
|
281
|
+
"content": {
|
|
282
|
+
"application/json": {
|
|
283
|
+
"schema": {
|
|
284
|
+
"$ref": "#/components/schemas/TaskResponse"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"500": {
|
|
290
|
+
"description": "Internal server error"
|
|
291
|
+
},
|
|
292
|
+
"401": {
|
|
293
|
+
"description": "Unauthorized"
|
|
294
|
+
},
|
|
295
|
+
"422": {
|
|
296
|
+
"description": "Invalid request"
|
|
297
|
+
},
|
|
298
|
+
"404": {
|
|
299
|
+
"description": "Task not found"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
200
304
|
"/api/v1/search": {
|
|
201
305
|
"post": {
|
|
202
306
|
"tags": [
|
|
@@ -692,6 +796,118 @@
|
|
|
692
796
|
"title": "SnippetData",
|
|
693
797
|
"description": "Snippet data for JSON:API responses."
|
|
694
798
|
},
|
|
799
|
+
"TaskAttributes": {
|
|
800
|
+
"properties": {
|
|
801
|
+
"type": {
|
|
802
|
+
"type": "string",
|
|
803
|
+
"title": "Type"
|
|
804
|
+
},
|
|
805
|
+
"priority": {
|
|
806
|
+
"type": "integer",
|
|
807
|
+
"title": "Priority"
|
|
808
|
+
},
|
|
809
|
+
"payload": {
|
|
810
|
+
"additionalProperties": true,
|
|
811
|
+
"type": "object",
|
|
812
|
+
"title": "Payload"
|
|
813
|
+
},
|
|
814
|
+
"created_at": {
|
|
815
|
+
"anyOf": [
|
|
816
|
+
{
|
|
817
|
+
"type": "string",
|
|
818
|
+
"format": "date-time"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"type": "null"
|
|
822
|
+
}
|
|
823
|
+
],
|
|
824
|
+
"title": "Created At"
|
|
825
|
+
},
|
|
826
|
+
"updated_at": {
|
|
827
|
+
"anyOf": [
|
|
828
|
+
{
|
|
829
|
+
"type": "string",
|
|
830
|
+
"format": "date-time"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
"type": "null"
|
|
834
|
+
}
|
|
835
|
+
],
|
|
836
|
+
"title": "Updated At"
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"type": "object",
|
|
840
|
+
"required": [
|
|
841
|
+
"type",
|
|
842
|
+
"priority",
|
|
843
|
+
"payload",
|
|
844
|
+
"created_at",
|
|
845
|
+
"updated_at"
|
|
846
|
+
],
|
|
847
|
+
"title": "TaskAttributes",
|
|
848
|
+
"description": "Task attributes for JSON:API responses."
|
|
849
|
+
},
|
|
850
|
+
"TaskData": {
|
|
851
|
+
"properties": {
|
|
852
|
+
"type": {
|
|
853
|
+
"type": "string",
|
|
854
|
+
"title": "Type",
|
|
855
|
+
"default": "task"
|
|
856
|
+
},
|
|
857
|
+
"id": {
|
|
858
|
+
"type": "string",
|
|
859
|
+
"title": "Id"
|
|
860
|
+
},
|
|
861
|
+
"attributes": {
|
|
862
|
+
"$ref": "#/components/schemas/TaskAttributes"
|
|
863
|
+
}
|
|
864
|
+
},
|
|
865
|
+
"type": "object",
|
|
866
|
+
"required": [
|
|
867
|
+
"id",
|
|
868
|
+
"attributes"
|
|
869
|
+
],
|
|
870
|
+
"title": "TaskData",
|
|
871
|
+
"description": "Task data for JSON:API responses."
|
|
872
|
+
},
|
|
873
|
+
"TaskListResponse": {
|
|
874
|
+
"properties": {
|
|
875
|
+
"data": {
|
|
876
|
+
"items": {
|
|
877
|
+
"$ref": "#/components/schemas/TaskData"
|
|
878
|
+
},
|
|
879
|
+
"type": "array",
|
|
880
|
+
"title": "Data"
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
"type": "object",
|
|
884
|
+
"required": [
|
|
885
|
+
"data"
|
|
886
|
+
],
|
|
887
|
+
"title": "TaskListResponse",
|
|
888
|
+
"description": "JSON:API response for task list."
|
|
889
|
+
},
|
|
890
|
+
"TaskResponse": {
|
|
891
|
+
"properties": {
|
|
892
|
+
"data": {
|
|
893
|
+
"$ref": "#/components/schemas/TaskData"
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
"type": "object",
|
|
897
|
+
"required": [
|
|
898
|
+
"data"
|
|
899
|
+
],
|
|
900
|
+
"title": "TaskResponse",
|
|
901
|
+
"description": "JSON:API response for single task."
|
|
902
|
+
},
|
|
903
|
+
"TaskType": {
|
|
904
|
+
"type": "integer",
|
|
905
|
+
"enum": [
|
|
906
|
+
1
|
|
907
|
+
],
|
|
908
|
+
"title": "TaskType",
|
|
909
|
+
"description": "Task type."
|
|
910
|
+
},
|
|
695
911
|
"ValidationError": {
|
|
696
912
|
"properties": {
|
|
697
913
|
"loc": {
|