From 6669f4ed992bec7a046396d6b40341870317af33 Mon Sep 17 00:00:00 2001 From: Chris Christiansen Date: Wed, 2 Sep 2026 18:15:19 +0000 Subject: [PATCH] feat(mcp): add build_and_deploy_service tool and update roadmap --- opax-mcp/server.py | 20 +++++++++++++++++++- project/roadmap.md | 12 ++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 project/roadmap.md diff --git a/opax-mcp/server.py b/opax-mcp/server.py index 50c7a9e..6e3e0c8 100644 --- a/opax-mcp/server.py +++ b/opax-mcp/server.py @@ -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": []}), } # --------------------------------------------------------------------------- diff --git a/project/roadmap.md b/project/roadmap.md new file mode 100644 index 0000000..b4c2c02 --- /dev/null +++ b/project/roadmap.md @@ -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.