kodit 0.0.1__py3-none-any.whl → 0.1.1__py3-none-any.whl
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/_version.py +2 -2
- kodit/alembic/README +1 -0
- kodit/alembic/__init__.py +1 -0
- kodit/alembic/env.py +83 -0
- kodit/alembic/script.py.mako +30 -0
- kodit/alembic/versions/85155663351e_initial.py +82 -0
- kodit/alembic/versions/__init__.py +1 -0
- kodit/cli.py +122 -0
- kodit/database.py +85 -0
- kodit/indexing/__init__.py +1 -0
- kodit/indexing/models.py +43 -0
- kodit/indexing/repository.py +132 -0
- kodit/indexing/service.py +153 -0
- kodit/logging.py +9 -0
- kodit/retreival/__init__.py +1 -0
- kodit/retreival/repository.py +76 -0
- kodit/retreival/service.py +30 -0
- kodit/sources/__init__.py +1 -0
- kodit/sources/models.py +71 -0
- kodit/sources/repository.py +110 -0
- kodit/sources/service.py +208 -0
- {kodit-0.0.1.dist-info → kodit-0.1.1.dist-info}/METADATA +47 -1
- kodit-0.1.1.dist-info/RECORD +32 -0
- kodit/mcp_test.py +0 -66
- kodit-0.0.1.dist-info/RECORD +0 -15
- {kodit-0.0.1.dist-info → kodit-0.1.1.dist-info}/WHEEL +0 -0
- {kodit-0.0.1.dist-info → kodit-0.1.1.dist-info}/entry_points.txt +0 -0
- {kodit-0.0.1.dist-info → kodit-0.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kodit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.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/
|
|
@@ -17,6 +17,9 @@ Classifier: Intended Audience :: Developers
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Topic :: Software Development :: Code Generators
|
|
19
19
|
Requires-Python: >=3.12
|
|
20
|
+
Requires-Dist: aiofiles>=24.1.0
|
|
21
|
+
Requires-Dist: aiosqlite>=0.20.0
|
|
22
|
+
Requires-Dist: alembic>=1.15.2
|
|
20
23
|
Requires-Dist: asgi-correlation-id>=4.3.4
|
|
21
24
|
Requires-Dist: better-exceptions>=0.3.3
|
|
22
25
|
Requires-Dist: click>=8.1.8
|
|
@@ -27,7 +30,50 @@ Requires-Dist: httpx-retries>=0.3.2
|
|
|
27
30
|
Requires-Dist: httpx>=0.28.1
|
|
28
31
|
Requires-Dist: mcp>=1.6.0
|
|
29
32
|
Requires-Dist: posthog>=4.0.1
|
|
33
|
+
Requires-Dist: pytable-formatter>=0.1.1
|
|
34
|
+
Requires-Dist: sqlalchemy[asyncio]>=2.0.40
|
|
30
35
|
Requires-Dist: structlog>=25.3.0
|
|
36
|
+
Requires-Dist: tdqm>=0.0.1
|
|
37
|
+
Requires-Dist: uritools>=5.0.0
|
|
31
38
|
Description-Content-Type: text/markdown
|
|
32
39
|
|
|
33
40
|
# kodit
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
Please choose your preferred installation method. They all ultimately install the kodit
|
|
45
|
+
cli, which contains the kodit MCP server and other tools to manage your data sources.
|
|
46
|
+
|
|
47
|
+
### Docker
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
docker run -it --rm registry.helix.ml/helix/kodit:latest
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Always replace latest with a specific version.
|
|
54
|
+
|
|
55
|
+
### pipx
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
pipx install kodit
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### homebrew
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
brew install helixml/kodit/kodit
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### uv
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
uv tool install kodit
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### pip
|
|
74
|
+
|
|
75
|
+
Use this if you want to use kodit as a python library:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
pip install kodit
|
|
79
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
|
|
2
|
+
kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
|
|
3
|
+
kodit/_version.py,sha256=Mmxse1R0ki5tjz9qzU8AQyqUsLt8nTyCAbYQp8R87PU,511
|
|
4
|
+
kodit/app.py,sha256=FBAeeOz2CICvVN_27iMq9wEF9y8d1IDl0WmkEnM_M_U,699
|
|
5
|
+
kodit/cli.py,sha256=2hNz05I6vryhkGqwMXlg_GKVAzhMmS_v8H2Nl6oxBZ4,5696
|
|
6
|
+
kodit/database.py,sha256=aHiBYoHToNR66n7AH4_yzh1rRbcezZdMpCyE9od749E,2297
|
|
7
|
+
kodit/logging.py,sha256=dQr4YXVH8_B52V0wXbBrn_HvH4QpO-fsi0C3JPWzn0Y,5022
|
|
8
|
+
kodit/mcp.py,sha256=Sg7Waes9Z7HYzdglspG92dGhTVtb1lEaEKW-vlaUCXg,1488
|
|
9
|
+
kodit/middleware.py,sha256=NHLrqq20ZtPTE9esX9HD3z7EKi56_QTFxBlkdq0JDzQ,2138
|
|
10
|
+
kodit/sse.py,sha256=UgwXJUeFq5D5S9KYKVVg4m6P0-_QHnJOCRRQB8XNR-M,2259
|
|
11
|
+
kodit/alembic/README,sha256=ISVtAOvqvKk_5ThM5ioJE-lMkvf9IbknFUFVU_vPma4,58
|
|
12
|
+
kodit/alembic/__init__.py,sha256=lP5MuwlyWRMO6UcDWnQcQ3G-GYHcFb6rl9gYPHJ1sjo,40
|
|
13
|
+
kodit/alembic/env.py,sha256=Uf3dh6oSECR2cHR8JWwiZuDYq2fhrZGsYo-0VpY_dvU,2273
|
|
14
|
+
kodit/alembic/script.py.mako,sha256=zWziKtiwYKEWuwPV_HBNHwa9LCT45_bi01-uSNFaOOE,703
|
|
15
|
+
kodit/alembic/versions/85155663351e_initial.py,sha256=Cg7zlF871o9ShV5rQMQ1v7hRV7fI59veDY9cjtTrs-8,3306
|
|
16
|
+
kodit/alembic/versions/__init__.py,sha256=9-lHzptItTzq_fomdIRBegQNm4Znx6pVjwD4MiqRIdo,36
|
|
17
|
+
kodit/indexing/__init__.py,sha256=cPyi2Iej3G1JFWlWr7X80_UrsMaTu5W5rBwgif1B3xo,75
|
|
18
|
+
kodit/indexing/models.py,sha256=sZIhGwvL4Dw0QTWFxrjfWctSLkAoDT6fv5DlGz8-Fr8,1258
|
|
19
|
+
kodit/indexing/repository.py,sha256=GeRpgRNOZunEKtzkkqkJWlOaR8cpGMX4rI_puDdB8WY,4006
|
|
20
|
+
kodit/indexing/service.py,sha256=COiOCNmZN0QKgazXB4dEpHnL1pi002td6n7PRo0d17I,4985
|
|
21
|
+
kodit/retreival/__init__.py,sha256=33PhJU-3gtsqYq6A1UkaLNKbev_Zee9Lq6dYC59-CsA,69
|
|
22
|
+
kodit/retreival/repository.py,sha256=WJQiePfeuwnj8Vy6dqF4bhNhsWqH9VspjN2zlvYQWvY,2273
|
|
23
|
+
kodit/retreival/service.py,sha256=Iy9IBLhohQmypeOs0hDEjgr1hsr0xtaiMqjIzykFWrY,727
|
|
24
|
+
kodit/sources/__init__.py,sha256=1NTZyPdjThVQpZO1Mp1ColVsS7sqYanOVLqnoqV9Ipo,83
|
|
25
|
+
kodit/sources/models.py,sha256=xb42CaNDO1CUB8SIW-xXMrB6Ji8cFw-yeJ550xBEg9Q,2398
|
|
26
|
+
kodit/sources/repository.py,sha256=mGJrHWH6Uo8YABdoojHFbzaf_jW-2ywJpAHIa1gnc3U,3401
|
|
27
|
+
kodit/sources/service.py,sha256=z35sDvwI_lSeODz-tIRHnfkJti_scdI_XOmP2XlopK4,6713
|
|
28
|
+
kodit-0.1.1.dist-info/METADATA,sha256=81XOTbiqcMoia4RU-p6aA6ZmdYa1jWYzpJPkBwpIosc,2019
|
|
29
|
+
kodit-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
30
|
+
kodit-0.1.1.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
|
|
31
|
+
kodit-0.1.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
32
|
+
kodit-0.1.1.dist-info/RECORD,,
|
kodit/mcp_test.py
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"""Tests for the MCP server implementation."""
|
|
2
|
-
|
|
3
|
-
from multiprocessing import Process
|
|
4
|
-
|
|
5
|
-
import httpx
|
|
6
|
-
import pytest
|
|
7
|
-
import uvicorn
|
|
8
|
-
from httpx_retries import Retry, RetryTransport
|
|
9
|
-
from mcp import ClientSession
|
|
10
|
-
from mcp.client.sse import sse_client
|
|
11
|
-
|
|
12
|
-
from kodit.app import app
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def run_server() -> None:
|
|
16
|
-
"""Run the uvicorn server in a separate process."""
|
|
17
|
-
config = uvicorn.Config(app, host="127.0.0.1", port=8000, log_level="error")
|
|
18
|
-
server = uvicorn.Server(config)
|
|
19
|
-
server.run()
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
async def wait_for_server() -> None:
|
|
23
|
-
"""Wait for the server to start."""
|
|
24
|
-
retry = Retry(total=5, backoff_factor=0.5)
|
|
25
|
-
transport = RetryTransport(retry=retry)
|
|
26
|
-
|
|
27
|
-
async with httpx.AsyncClient(transport=transport) as client:
|
|
28
|
-
response = await client.get("http://127.0.0.1:8000/")
|
|
29
|
-
assert response.status_code == 200
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@pytest.mark.asyncio
|
|
33
|
-
async def test_mcp_client_connection() -> None:
|
|
34
|
-
"""Test connecting to the MCP server using ClientSession."""
|
|
35
|
-
server_process = None
|
|
36
|
-
try:
|
|
37
|
-
# Start the server in a separate process
|
|
38
|
-
server_process = Process(target=run_server, daemon=True)
|
|
39
|
-
server_process.start()
|
|
40
|
-
|
|
41
|
-
# Ping the server with requests, wait for it to start
|
|
42
|
-
await wait_for_server()
|
|
43
|
-
|
|
44
|
-
# The sse_client returns read and write streams, not a client object
|
|
45
|
-
async with (
|
|
46
|
-
sse_client("http://127.0.0.1:8000/sse/") as (
|
|
47
|
-
read_stream,
|
|
48
|
-
write_stream,
|
|
49
|
-
),
|
|
50
|
-
ClientSession(read_stream, write_stream) as session,
|
|
51
|
-
):
|
|
52
|
-
# Initialize the connection
|
|
53
|
-
await session.initialize()
|
|
54
|
-
|
|
55
|
-
# List available tools
|
|
56
|
-
tools_result = await session.list_tools()
|
|
57
|
-
# Check that we got a proper tools result with a tools attribute
|
|
58
|
-
assert hasattr(tools_result, "tools")
|
|
59
|
-
# Verify we can see the 'retrieve_relevant_snippets' tool
|
|
60
|
-
tool_names = [tool.name for tool in tools_result.tools]
|
|
61
|
-
assert "retrieve_relevant_snippets" in tool_names
|
|
62
|
-
finally:
|
|
63
|
-
# Due to https://github.com/modelcontextprotocol/python-sdk/issues/514, mcp
|
|
64
|
-
# doesn't shut down the server when requested. So we have to force kill it.
|
|
65
|
-
server_process.kill()
|
|
66
|
-
server_process.join(timeout=1)
|
kodit-0.0.1.dist-info/RECORD
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
|
|
2
|
-
kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
|
|
3
|
-
kodit/_version.py,sha256=vgltXBYF55vNcC2regxjGN0_cbebmm8VgcDdQaDapWQ,511
|
|
4
|
-
kodit/app.py,sha256=FBAeeOz2CICvVN_27iMq9wEF9y8d1IDl0WmkEnM_M_U,699
|
|
5
|
-
kodit/cli.py,sha256=jmEQlN34PXow9ui60aoCs84G5e3tX1T9C4-BV8zsnoU,2037
|
|
6
|
-
kodit/logging.py,sha256=zAkU8J_hI8eDZ6AhRdVjC7Kppp9fuP9HEzWczWPrpy4,4622
|
|
7
|
-
kodit/mcp.py,sha256=Sg7Waes9Z7HYzdglspG92dGhTVtb1lEaEKW-vlaUCXg,1488
|
|
8
|
-
kodit/mcp_test.py,sha256=ztpNdy6b_pTzzWQbNMSpmpjsYYjLr8igAtawFD_-_QM,2293
|
|
9
|
-
kodit/middleware.py,sha256=NHLrqq20ZtPTE9esX9HD3z7EKi56_QTFxBlkdq0JDzQ,2138
|
|
10
|
-
kodit/sse.py,sha256=UgwXJUeFq5D5S9KYKVVg4m6P0-_QHnJOCRRQB8XNR-M,2259
|
|
11
|
-
kodit-0.0.1.dist-info/METADATA,sha256=JrdJv8HdNmDE6Kap53M3AOS_9gayyraEgQNeMSyUVgQ,1229
|
|
12
|
-
kodit-0.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
13
|
-
kodit-0.0.1.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
|
|
14
|
-
kodit-0.0.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
15
|
-
kodit-0.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|