ai-coding-gym-mcp 0.1.0__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.
- {ai_coding_gym_mcp-0.1.0.dist-info → ai_coding_gym_mcp-0.1.1.dist-info}/METADATA +1 -1
- ai_coding_gym_mcp-0.1.1.dist-info/RECORD +6 -0
- server.py +3 -25
- ai_coding_gym_mcp-0.1.0.dist-info/RECORD +0 -6
- {ai_coding_gym_mcp-0.1.0.dist-info → ai_coding_gym_mcp-0.1.1.dist-info}/WHEEL +0 -0
- {ai_coding_gym_mcp-0.1.0.dist-info → ai_coding_gym_mcp-0.1.1.dist-info}/entry_points.txt +0 -0
- {ai_coding_gym_mcp-0.1.0.dist-info → ai_coding_gym_mcp-0.1.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
server.py,sha256=wuol2aas5zY1-DP6c5JMfcve46xYPdX95ygo_pCCqEs,17875
|
|
2
|
+
ai_coding_gym_mcp-0.1.1.dist-info/METADATA,sha256=sGOqY3YC9Xwck1o0au2DeiQHsGM-puJnTGYzyEPg12Q,6377
|
|
3
|
+
ai_coding_gym_mcp-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
4
|
+
ai_coding_gym_mcp-0.1.1.dist-info/entry_points.txt,sha256=O_Ya91fge6V-bwpf4oace2eFB2asJVEE4Oe3fWcL6dY,50
|
|
5
|
+
ai_coding_gym_mcp-0.1.1.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
|
|
6
|
+
ai_coding_gym_mcp-0.1.1.dist-info/RECORD,,
|
server.py
CHANGED
|
@@ -33,7 +33,7 @@ CONFIGURE_TOOL = Tool(
|
|
|
33
33
|
name="configure",
|
|
34
34
|
description="Configure global settings for the MCP server. Generates an SSH key pair locally, "
|
|
35
35
|
"sends the public key to the server, and receives your repository name. "
|
|
36
|
-
"Set your user_id
|
|
36
|
+
"Set your user_id once. "
|
|
37
37
|
"These values will be used as defaults for all fetch and submit operations.",
|
|
38
38
|
inputSchema={
|
|
39
39
|
"type": "object",
|
|
@@ -42,20 +42,12 @@ CONFIGURE_TOOL = Tool(
|
|
|
42
42
|
"type": "string",
|
|
43
43
|
"description": "Your user ID for authentication with the backend server"
|
|
44
44
|
},
|
|
45
|
-
"server_url": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "Backend server URL (e.g., 'https://api.example.com')"
|
|
48
|
-
},
|
|
49
|
-
"api_key": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "API key for backend authentication (optional)"
|
|
52
|
-
},
|
|
53
45
|
"workspace_dir": {
|
|
54
46
|
"type": "string",
|
|
55
47
|
"description": "Default workspace directory for cloning repositories (optional)"
|
|
56
48
|
}
|
|
57
49
|
},
|
|
58
|
-
"required": ["user_id"
|
|
50
|
+
"required": ["user_id"]
|
|
59
51
|
}
|
|
60
52
|
)
|
|
61
53
|
|
|
@@ -208,11 +200,10 @@ def run_git_command(cmd: str, cwd: str, key_path: Optional[Path] = None) -> subp
|
|
|
208
200
|
# Tool implementations
|
|
209
201
|
async def configure(
|
|
210
202
|
user_id: str,
|
|
211
|
-
server_url: str,
|
|
212
|
-
api_key: Optional[str] = None,
|
|
213
203
|
workspace_dir: Optional[str] = None
|
|
214
204
|
) -> str:
|
|
215
205
|
"""Configure global settings for the MCP server."""
|
|
206
|
+
server_url = DEFAULT_SERVER_URL
|
|
216
207
|
try:
|
|
217
208
|
# Generate SSH key pair
|
|
218
209
|
private_key_path, public_key = generate_ssh_key_pair(user_id)
|
|
@@ -224,9 +215,6 @@ async def configure(
|
|
|
224
215
|
"public_key": public_key
|
|
225
216
|
}
|
|
226
217
|
|
|
227
|
-
if api_key:
|
|
228
|
-
payload["api_key"] = api_key
|
|
229
|
-
|
|
230
218
|
response = requests.post(api_endpoint, json=payload, timeout=30)
|
|
231
219
|
response.raise_for_status()
|
|
232
220
|
data = response.json()
|
|
@@ -241,9 +229,6 @@ async def configure(
|
|
|
241
229
|
config_store["repo_name"] = repo_name
|
|
242
230
|
config_store["private_key_path"] = str(private_key_path)
|
|
243
231
|
|
|
244
|
-
if api_key:
|
|
245
|
-
config_store["api_key"] = api_key
|
|
246
|
-
|
|
247
232
|
if workspace_dir:
|
|
248
233
|
config_store["workspace_dir"] = workspace_dir
|
|
249
234
|
|
|
@@ -252,7 +237,6 @@ async def configure(
|
|
|
252
237
|
User ID: {user_id}
|
|
253
238
|
Server URL: {server_url}
|
|
254
239
|
Repository: {repo_name}
|
|
255
|
-
API Key: {'Set' if api_key else 'Not set'}
|
|
256
240
|
Workspace: {workspace_dir or 'Default (./workspace)'}
|
|
257
241
|
SSH Key: {private_key_path}
|
|
258
242
|
|
|
@@ -448,10 +432,6 @@ async def submit_solution(
|
|
|
448
432
|
"timestamp": datetime.now().isoformat()
|
|
449
433
|
}
|
|
450
434
|
|
|
451
|
-
# Add API key if configured
|
|
452
|
-
if config_store.get("api_key"):
|
|
453
|
-
payload["api_key"] = config_store["api_key"]
|
|
454
|
-
|
|
455
435
|
response = requests.post(api_endpoint, json=payload, timeout=30)
|
|
456
436
|
response.raise_for_status()
|
|
457
437
|
|
|
@@ -485,8 +465,6 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]:
|
|
|
485
465
|
if name == "configure":
|
|
486
466
|
result = await configure(
|
|
487
467
|
user_id=arguments["user_id"],
|
|
488
|
-
server_url=arguments["server_url"],
|
|
489
|
-
api_key=arguments.get("api_key"),
|
|
490
468
|
workspace_dir=arguments.get("workspace_dir")
|
|
491
469
|
)
|
|
492
470
|
return [TextContent(type="text", text=result)]
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
server.py,sha256=4MZVe8BZFE-qSua-fzBD8hHNwEur7nPqklcmfIwR15I,18691
|
|
2
|
-
ai_coding_gym_mcp-0.1.0.dist-info/METADATA,sha256=bLTu2JVY10OYjrfPl3EzuZ06nvxVGhdIytgOexsap20,6377
|
|
3
|
-
ai_coding_gym_mcp-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
4
|
-
ai_coding_gym_mcp-0.1.0.dist-info/entry_points.txt,sha256=O_Ya91fge6V-bwpf4oace2eFB2asJVEE4Oe3fWcL6dY,50
|
|
5
|
-
ai_coding_gym_mcp-0.1.0.dist-info/top_level.txt,sha256=StKOSmRhvWS5IPcvhsDRbtxUTEofJgYFGOu5AAJdSWo,7
|
|
6
|
-
ai_coding_gym_mcp-0.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|