chore(platform): configure OSVX MCP endpoint
This commit is contained in:
parent
aee859b3ba
commit
3ddc0c50a6
|
|
@ -1,6 +1,11 @@
|
|||
# This file overrides .gitignore for gcloud commands.
|
||||
# We want to ignore most .json files (like service accounts), but not our test payload.
|
||||
# Keep Cloud Build uploads aligned with repository exclusions.
|
||||
#!include:.gitignore
|
||||
|
||||
# Never upload local JSON credentials; retain the intentional test payload.
|
||||
*.json
|
||||
!a2h2a-test-payload.json
|
||||
|
||||
# Ignore the Spire directory to avoid permission errors during source upload.
|
||||
# Local build/runtime directories.
|
||||
node_modules/
|
||||
.git/
|
||||
spire-1.15.3/
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ steps:
|
|||
--platform=managed \
|
||||
--no-allow-unauthenticated \
|
||||
--service-account=jason-vauger@$PROJECT_ID.iam.gserviceaccount.com \
|
||||
--set-env-vars=GOOGLE_CLOUD_PROJECT=$PROJECT_ID,STATIC_BUCKET=opax-vauco-static,CLOUD_RUN_SERVICE=osvauco-agent,CLOUD_BUILD_TRIGGER_ID=${_OSVAUCO_TRIGGER_ID},OPAX_IAP_CLIENT_ID=357036551735-kq8nt7ld38hfqlcfb3n52ef7tala4meo.apps.googleusercontent.com \
|
||||
--set-env-vars=OSVX_MCP_URL=https://osvx-mcp-zjbqp3prqq-uc.a.run.app,GOOGLE_CLOUD_PROJECT=$PROJECT_ID,STATIC_BUCKET=opax-vauco-static,CLOUD_RUN_SERVICE=osvauco-agent,CLOUD_BUILD_TRIGGER_ID=${_OSVAUCO_TRIGGER_ID},OPAX_IAP_CLIENT_ID=357036551735-kq8nt7ld38hfqlcfb3n52ef7tala4meo.apps.googleusercontent.com \
|
||||
--update-secrets=MCP_SECRET=mcp-server-key:latest,GITEA_TOKEN=gitea-token:latest,GITHUB_PAT=github-pat:latest \
|
||||
--memory=512Mi \
|
||||
--cpu=1 \
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import os
|
|||
from datetime import datetime
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
OPAX_BASE_URL = os.getenv('OPAX_BASE_URL', 'https://opax.vauco.no')
|
||||
OSVX_MCP_URL = os.getenv('OSVX_MCP_URL')
|
||||
MCP_SECRET = os.getenv('MCP_SECRET')
|
||||
|
||||
# MCP Tool Registry - alle tools som krever A2H2A
|
||||
|
|
@ -47,7 +47,9 @@ A2H2A_TOOLS = {
|
|||
|
||||
class A2H2AClient:
|
||||
def __init__(self):
|
||||
self.base_url = OPAX_BASE_URL
|
||||
if not OSVX_MCP_URL:
|
||||
raise ValueError("OSVX_MCP_URL environment variable not set.")
|
||||
self.base_url = OSVX_MCP_URL
|
||||
self.headers = {
|
||||
'X-MCP-Secret': MCP_SECRET,
|
||||
'Content-Type': 'application/json'
|
||||
|
|
|
|||
|
|
@ -22,8 +22,11 @@ class OpaxClient:
|
|||
Guardrail-sjekk kjøres automatisk før hvert kall.
|
||||
"""
|
||||
|
||||
def __init__(self, base_url: str = "https://opax.vauco.no", guardrails=None):
|
||||
self.base_url = base_url.rstrip("/")
|
||||
def __init__(self, guardrails=None):
|
||||
OSVX_MCP_URL = os.getenv('OSVX_MCP_URL')
|
||||
if not OSVX_MCP_URL:
|
||||
raise ValueError("OSVX_MCP_URL environment variable not set.")
|
||||
self.base_url = OSVX_MCP_URL.rstrip("/")
|
||||
self.guardrails = guardrails
|
||||
self._token: str = ""
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user