mcp-code-indexer 1.0.7__py3-none-any.whl → 1.0.8__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.
- mcp_code_indexer/database/database.py +21 -0
- mcp_code_indexer/server/mcp_server.py +16 -4
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/METADATA +1 -1
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/RECORD +8 -8
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/WHEEL +0 -0
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/entry_points.txt +0 -0
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/licenses/LICENSE +0 -0
- {mcp_code_indexer-1.0.7.dist-info → mcp_code_indexer-1.0.8.dist-info}/top_level.txt +0 -0
@@ -189,6 +189,27 @@ class DatabaseManager:
|
|
189
189
|
)
|
190
190
|
await db.commit()
|
191
191
|
|
192
|
+
async def update_project(self, project: Project) -> None:
|
193
|
+
"""Update an existing project record."""
|
194
|
+
async with self.get_connection() as db:
|
195
|
+
await db.execute(
|
196
|
+
"""
|
197
|
+
UPDATE projects
|
198
|
+
SET name = ?, remote_origin = ?, upstream_origin = ?, aliases = ?, last_accessed = ?
|
199
|
+
WHERE id = ?
|
200
|
+
""",
|
201
|
+
(
|
202
|
+
project.name,
|
203
|
+
project.remote_origin,
|
204
|
+
project.upstream_origin,
|
205
|
+
json.dumps(project.aliases),
|
206
|
+
project.last_accessed,
|
207
|
+
project.id
|
208
|
+
)
|
209
|
+
)
|
210
|
+
await db.commit()
|
211
|
+
logger.debug(f"Updated project: {project.id}")
|
212
|
+
|
192
213
|
# File description operations
|
193
214
|
|
194
215
|
async def create_file_description(self, file_desc: FileDescription) -> None:
|
@@ -283,10 +283,9 @@ class MCPCodeIndexServer:
|
|
283
283
|
folder_path = arguments["folderPath"]
|
284
284
|
branch = arguments.get("branch", "main")
|
285
285
|
|
286
|
-
# Create project ID from identifiers (
|
287
|
-
|
288
|
-
|
289
|
-
id_source = f"{project_name}:{remote_key}:{upstream_key}:{folder_path}"
|
286
|
+
# Create project ID from stable identifiers only (name + folder path)
|
287
|
+
# This ensures consistent project IDs regardless of whether remote_origin/upstream_origin are provided
|
288
|
+
id_source = f"{project_name}:{folder_path}"
|
290
289
|
project_id = hashlib.sha256(id_source.encode()).hexdigest()[:16]
|
291
290
|
|
292
291
|
# Check if project exists, create if not
|
@@ -315,6 +314,19 @@ class MCPCodeIndexServer:
|
|
315
314
|
# Update last accessed time
|
316
315
|
await self.db_manager.update_project_access_time(project_id)
|
317
316
|
|
317
|
+
# Update remote/upstream origins if provided and different from existing
|
318
|
+
should_update = False
|
319
|
+
if remote_origin and project.remote_origin != remote_origin:
|
320
|
+
project.remote_origin = remote_origin
|
321
|
+
should_update = True
|
322
|
+
if upstream_origin and project.upstream_origin != upstream_origin:
|
323
|
+
project.upstream_origin = upstream_origin
|
324
|
+
should_update = True
|
325
|
+
|
326
|
+
if should_update:
|
327
|
+
await self.db_manager.update_project(project)
|
328
|
+
logger.debug(f"Updated project metadata for {project_name}")
|
329
|
+
|
318
330
|
# Check if upstream inheritance is needed for existing project
|
319
331
|
if upstream_origin and await self.db_manager.check_upstream_inheritance_needed(project):
|
320
332
|
try:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: mcp-code-indexer
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.8
|
4
4
|
Summary: MCP server that tracks file descriptions across codebases, enabling AI agents to efficiently navigate and understand code through searchable summaries and token-aware overviews.
|
5
5
|
Author: MCP Code Indexer Contributors
|
6
6
|
Maintainer: MCP Code Indexer Contributors
|
@@ -6,17 +6,17 @@ mcp_code_indexer/main.py,sha256=Rou-mAN9-12PPP8jC7dIs2_UNambJuC2F8BF--j-0m8,3715
|
|
6
6
|
mcp_code_indexer/merge_handler.py,sha256=lJR8eVq2qSrF6MW9mR3Fy8UzrNAaQ7RsI2FMNXne3vQ,14692
|
7
7
|
mcp_code_indexer/token_counter.py,sha256=WrifOkbF99nWWHlRlhCHAB2KN7qr83GOHl7apE-hJcE,8460
|
8
8
|
mcp_code_indexer/database/__init__.py,sha256=aPq_aaRp0aSwOBIq9GkuMNjmLxA411zg2vhdrAuHm-w,38
|
9
|
-
mcp_code_indexer/database/database.py,sha256=
|
9
|
+
mcp_code_indexer/database/database.py,sha256=ROGdosQSADI7EytNkdC4RauPD9zLtHTO1mQ8SxsmPVo,18755
|
10
10
|
mcp_code_indexer/database/models.py,sha256=3wOxHKb6j3zKPWFSwB5g1TLpI507vLNZcqsxZR4VuRs,5528
|
11
11
|
mcp_code_indexer/middleware/__init__.py,sha256=p-mP0pMsfiU2yajCPvokCUxUEkh_lu4XJP1LyyMW2ug,220
|
12
12
|
mcp_code_indexer/middleware/error_middleware.py,sha256=v6jaHmPxf3qerYdb85X1tHIXLxgcbybpitKVakFLQTA,10109
|
13
13
|
mcp_code_indexer/server/__init__.py,sha256=16xMcuriUOBlawRqWNBk6niwrvtv_JD5xvI36X1Vsmk,41
|
14
|
-
mcp_code_indexer/server/mcp_server.py,sha256=
|
14
|
+
mcp_code_indexer/server/mcp_server.py,sha256=DpAQ-A_creN5qGr584Xy4I0MvHHZ73r4_p9ly-iyhZ4,37888
|
15
15
|
mcp_code_indexer/tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4,sha256=Ijkht27pm96ZW3_3OFE-7xAPtR0YyTWXoRO8_-hlsqc,1681126
|
16
16
|
mcp_code_indexer/tools/__init__.py,sha256=m01mxML2UdD7y5rih_XNhNSCMzQTz7WQ_T1TeOcYlnE,49
|
17
|
-
mcp_code_indexer-1.0.
|
18
|
-
mcp_code_indexer-1.0.
|
19
|
-
mcp_code_indexer-1.0.
|
20
|
-
mcp_code_indexer-1.0.
|
21
|
-
mcp_code_indexer-1.0.
|
22
|
-
mcp_code_indexer-1.0.
|
17
|
+
mcp_code_indexer-1.0.8.dist-info/licenses/LICENSE,sha256=JN9dyPPgYwH9C-UjYM7FLNZjQ6BF7kAzpF3_4PwY4rY,1086
|
18
|
+
mcp_code_indexer-1.0.8.dist-info/METADATA,sha256=EeCYxDxbAQxi_UgeiGuVzkpxx4j_6E7R_66EdHL6mF8,11930
|
19
|
+
mcp_code_indexer-1.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
20
|
+
mcp_code_indexer-1.0.8.dist-info/entry_points.txt,sha256=8HqWOw1Is7jOP1bvIgaSwouvT9z_Boe-9hd4NzyJOhY,68
|
21
|
+
mcp_code_indexer-1.0.8.dist-info/top_level.txt,sha256=yKYCM-gMGt-cnupGfAhnZaoEsROLB6DQ1KFUuyKx4rw,17
|
22
|
+
mcp_code_indexer-1.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|