kodit 0.1.13__py3-none-any.whl → 0.1.14__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.
- kodit/_version.py +2 -2
- kodit/mcp.py +21 -4
- {kodit-0.1.13.dist-info → kodit-0.1.14.dist-info}/METADATA +1 -1
- {kodit-0.1.13.dist-info → kodit-0.1.14.dist-info}/RECORD +7 -7
- {kodit-0.1.13.dist-info → kodit-0.1.14.dist-info}/WHEEL +0 -0
- {kodit-0.1.13.dist-info → kodit-0.1.14.dist-info}/entry_points.txt +0 -0
- {kodit-0.1.13.dist-info → kodit-0.1.14.dist-info}/licenses/LICENSE +0 -0
kodit/_version.py
CHANGED
kodit/mcp.py
CHANGED
|
@@ -53,7 +53,16 @@ async def mcp_lifespan(_: FastMCP) -> AsyncIterator[MCPContext]:
|
|
|
53
53
|
yield MCPContext(session=session, app_context=app_context)
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
mcp = FastMCP(
|
|
56
|
+
mcp = FastMCP(
|
|
57
|
+
"Kodit",
|
|
58
|
+
lifespan=mcp_lifespan,
|
|
59
|
+
# Note that instructions are not used by Cline.
|
|
60
|
+
instructions=(
|
|
61
|
+
"This server is used to assist with code generation by retrieving "
|
|
62
|
+
"code examples related to the user's intent."
|
|
63
|
+
"Call search() to retrieve relevant code examples."
|
|
64
|
+
),
|
|
65
|
+
)
|
|
57
66
|
|
|
58
67
|
|
|
59
68
|
@mcp.tool()
|
|
@@ -87,11 +96,19 @@ async def search(
|
|
|
87
96
|
),
|
|
88
97
|
],
|
|
89
98
|
) -> str:
|
|
90
|
-
"""Search for relevant
|
|
99
|
+
"""Search for pre-existing examples of relevant code.
|
|
91
100
|
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
⚠️ **ENFORCEMENT:**
|
|
102
|
+
For *every* user request that involves writing or modifying code (of any language or
|
|
103
|
+
domain), the assistant's *first* action **must** be to call the kodit.search MCP
|
|
104
|
+
tool. You may only produce or edit code *after* that tool call and its successful
|
|
105
|
+
result.
|
|
94
106
|
"""
|
|
107
|
+
# This docstring is used by the AI assistant to decide when to call the tool. If you
|
|
108
|
+
# want to update it, please make sure you thoroughly test the assistant's response
|
|
109
|
+
# to the updated tool call. See:
|
|
110
|
+
# tests/experiments/cline-prompt-regression-tests/cline_prompt_test.py
|
|
111
|
+
|
|
95
112
|
log = structlog.get_logger(__name__)
|
|
96
113
|
|
|
97
114
|
log.debug(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
kodit/.gitignore,sha256=ztkjgRwL9Uud1OEi36hGQeDGk3OLK1NfDEO8YqGYy8o,11
|
|
2
2
|
kodit/__init__.py,sha256=aEKHYninUq1yh6jaNfvJBYg-6fenpN132nJt1UU6Jxs,59
|
|
3
|
-
kodit/_version.py,sha256=
|
|
3
|
+
kodit/_version.py,sha256=O_r2EWoixTKREu-RyeL8e93UHfqprj1LCIlwiWXfHcg,513
|
|
4
4
|
kodit/app.py,sha256=Mr5BFHOHx5zppwjC4XPWVvHjwgl1yrKbUjTWXKubJQM,891
|
|
5
5
|
kodit/cli.py,sha256=VLoXFS1xJnQ0TLy3_cO8-B9tCb4NJHiYPfzZtHxpgRY,7784
|
|
6
6
|
kodit/config.py,sha256=TDcLt6fiJn9cI1PoO5AqBqsL_Bxmm9JV5GqRxhj1tLw,4202
|
|
7
7
|
kodit/database.py,sha256=kekSdyEATdb47jxzQemkSOXMNOwnUwmVVTpn9hYaDK8,2356
|
|
8
8
|
kodit/log.py,sha256=HU1OmuxO4FcVw61k4WW7Y4WM7BrDaeplw1PcBHhuIZY,5434
|
|
9
|
-
kodit/mcp.py,sha256=
|
|
9
|
+
kodit/mcp.py,sha256=ot5CIH240mSXK3sJcxTf4lBfthq0tcMS8XBGTaHY-n8,5088
|
|
10
10
|
kodit/middleware.py,sha256=I6FOkqG9-8RH5kR1-0ZoQWfE4qLCB8lZYv8H_OCH29o,2714
|
|
11
11
|
kodit/bm25/__init__.py,sha256=j8zyriNWhbwE5Lbybzg1hQAhANlU9mKHWw4beeUR6og,19
|
|
12
12
|
kodit/bm25/bm25.py,sha256=JtgJfsHz-2SHx96zxWjkPFSH7fXkahFMp01cDwl4YBg,2298
|
|
@@ -37,8 +37,8 @@ kodit/source/__init__.py,sha256=1NTZyPdjThVQpZO1Mp1ColVsS7sqYanOVLqnoqV9Ipo,83
|
|
|
37
37
|
kodit/source/source_models.py,sha256=xb42CaNDO1CUB8SIW-xXMrB6Ji8cFw-yeJ550xBEg9Q,2398
|
|
38
38
|
kodit/source/source_repository.py,sha256=0EksMpoLzdkfe8S4eeCm4Sf7TuxsOzOzaF4BBsMYo-4,3163
|
|
39
39
|
kodit/source/source_service.py,sha256=qBV9FCFQbJppeFrVo4uMgvC_mzWRIKldymp5yqLx9pw,9255
|
|
40
|
-
kodit-0.1.
|
|
41
|
-
kodit-0.1.
|
|
42
|
-
kodit-0.1.
|
|
43
|
-
kodit-0.1.
|
|
44
|
-
kodit-0.1.
|
|
40
|
+
kodit-0.1.14.dist-info/METADATA,sha256=acFpcf0ODyUSnA1hg4BPlLexpOEh-0yuaqsaWUNopOs,2349
|
|
41
|
+
kodit-0.1.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
42
|
+
kodit-0.1.14.dist-info/entry_points.txt,sha256=hoTn-1aKyTItjnY91fnO-rV5uaWQLQ-Vi7V5et2IbHY,40
|
|
43
|
+
kodit-0.1.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
44
|
+
kodit-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|