feat(mcp): add build_and_deploy_service tool and update roadmap

This commit is contained in:
Chris Christiansen 2026-09-02 18:15:19 +00:00
parent a97f9c75b3
commit 6669f4ed99
2 changed files with 31 additions and 1 deletions

View File

@ -384,9 +384,10 @@ async def push_file(p):
return await _gitea_post(f"/repos/{repo}/contents/{path}", body)
# ---------------------------------------------------------------------------
# Memory Bank Tools
# Memory Bank & Deployment Tools
# ---------------------------------------------------------------------------
PROJECT_DIR = os.path.abspath("project")
PROD_BUILD_TRIGGER_ID = "cf42cbc7-a5e8-4724-a569-dbaac1b46a0b"
def _resolve_memory_path(file_name: str) -> str:
"""Resolves a file path and ensures it is within the project/ directory."""
@ -438,6 +439,22 @@ async def write_memory_bank(p: dict) -> dict:
logger.error(f"Error writing to memory bank file {file_name}: {e}", exc_info=True)
raise
async def build_and_deploy_service(p: dict) -> dict:
"""
Triggers the production build and deployment pipeline for the main service.
This action requires manual approval in the Google Cloud Console.
"""
branch_to_deploy = p.get("branch", "main")
logger.info(f"Triggering production deployment for branch: {branch_to_deploy}")
result = await trigger_build({
"trigger_id": PROD_BUILD_TRIGGER_ID,
"branch": branch_to_deploy,
"substitutions": p.get("substitutions", {})
})
return result
# ---------------------------------------------------------------------------
# Tool registry + MCP schema
# ---------------------------------------------------------------------------
@ -520,6 +537,7 @@ TOOLS = {
# Memory Bank
"read_memory_bank": (read_memory_bank, "Reads a file from the project memory bank.", {"type": "object", "properties": {"file_name": {"type": "string"}}, "required": ["file_name"]}),
"write_memory_bank": (write_memory_bank, "Writes a file to the project memory bank.", {"type": "object", "properties": {"file_name": {"type": "string"}, "content": {"type": "string"}}, "required": ["file_name", "content"]}),
"build_and_deploy_service": (build_and_deploy_service, "Triggers the production build & deployment pipeline.", {"type": "object", "properties": {"branch": {"type": "string"}}, "required": []}),
}
# ---------------------------------------------------------------------------

12
project/roadmap.md Normal file
View File

@ -0,0 +1,12 @@
# OSVx Project Roadmap
This document tracks the high-level goals and future development milestones for the OSVx platform.
## Phase 3: Memory Bank & Project Management
- [x] Implement `read_memory_bank` and `write_memory_bank` MCP tools.
- [x] Implement `build_and_deploy_service` MCP tool.
- [ ] Implement `get_project_status` and `append_project_task` MCP tools.
## Phase 4: Autonomous Operation
- [ ] Implement proactive project status reporting.
- [ ] Develop agentic workflows for self-healing and automated deployment.