Enhance MCP development features and introduce skills management
- Added configuration options for requiring human approval before applying LLM-generated MCP patches. - Updated Docker setup to include skills directory. - Integrated skills management into the backend, allowing for procedural guides and skill matching. - Refactored database initialization to apply Alembic migrations. - Enhanced task approval process to handle MCP patch applications with optional approval. - Introduced new schemas for skills and updated existing APIs to support skills functionality. This commit lays the groundwork for improved agent capabilities and better management of MCP development processes.
This commit is contained in:
@@ -351,7 +351,29 @@ async def decide_approval(
|
||||
approval.decided_by_id = user.id
|
||||
approval.decided_at = datetime.now(timezone.utc)
|
||||
|
||||
if body.approve and approval.tool_name == "mcp_git_push" and approval.tool_args:
|
||||
if body.approve and approval.tool_name == "mcp_apply_patch" and approval.tool_args:
|
||||
from app.mcp_manager.commands import enqueue_mcp_command
|
||||
|
||||
args = approval.tool_args
|
||||
result = await enqueue_mcp_command(
|
||||
"apply_patch",
|
||||
server=args.get("server"),
|
||||
timeout_seconds=180,
|
||||
task_id=task_id,
|
||||
tool_args=args,
|
||||
)
|
||||
if not result.get("ok"):
|
||||
raise HTTPException(
|
||||
status_code=502,
|
||||
detail=result.get("error", "MCP patch apply failed"),
|
||||
)
|
||||
await publish_event(
|
||||
task_id,
|
||||
"mcp_dev",
|
||||
result.get("summary") or f"MCP patch applied to {args.get('server')}",
|
||||
{"kind": "mcp_apply_patch", **result},
|
||||
)
|
||||
elif body.approve and approval.tool_name == "mcp_git_push" and approval.tool_args:
|
||||
from app.services import mcp_workspace
|
||||
|
||||
args = approval.tool_args
|
||||
|
||||
Reference in New Issue
Block a user