Arquitectura del ecosistema
El ecosistema mks-agentics tiene 5 componentes que deben estar vivos para los playbooks. Este diagrama muestra las conexiones entre ellos y por dónde fluye cada use case.
- gateway-server.js (bundle)
- update-gateway.sh (baked)
- supervisord autorestart=true
- a2a-mcp.js (bundle)
- update-a2a-mcp.sh (baked)
- wrapper /usr/local/bin/a2a-mcp
- anthropic-native protocol
- routing por model name + prefix
- SHA-256 hash storage
- atomic writes chmod 600
F1 — Verificar broker público
Broker health + autenticación
curl -s https://broker.gateway.mks2508.systems/healthz→ 200 OK Health check público sin authcurl -s https://broker.gateway.mks2508.systems/api/peers→ 401 Sin token JWT → rechazado- OIDC client_credentials → JWT válido →
GET /api/peers→ 200 + JSON array Con token JWT → autorizado GET /api/runners→ lista de runners conectados Verificar que hay al menos un runner (workspace container)
Verificación broker
# Health check público $ curl -s https://broker.gateway.mks2508.systems/healthz | jq . → {"status":"ok","uptime":3600} # Auth requerido para API $ curl -s https://broker.gateway.mks2508.systems/api/peers → {"error":"MISSING_TOKEN","message":"Authorization header required"} # Con JWT válido (client_credentials) $ curl -s https://broker.gateway.mks2508.systems/api/peers \ -H "Authorization: Bearer $JWT_TOKEN" | jq . → [ → {"id":"...","kind":"operator","name":"...","status":"running"}, → ... → ]
Para generar el JWT, se necesita:
OIDC_CLIENT_ID— cliente OIDC registrado en Pocket-IDOIDC_CLIENT_SECRET— secret del clienteOIDC_TOKEN_ENDPOINT—https://auth-provider.mks2508.systems/api/oidc/token
El cliente gateway-server-workspace-helsinki (46c6e32c-75c0-4428-b358-9104c688ebfc) existe en Pocket-ID.
Sus credenciales están en Coolify como env vars del servicio mks-backend.
Para smoke local, usar las credenciales del cliente mcp-standalone-mac-waxin en .env.brk-extract.local.
F2 — Verificar workspace container
Workspace container vivo + servicios
curl -s https://lab1-helsinki.api.mks2508.systems/health→ 200 OK Health del gateway-server dentro del workspacecurl -s https://lab1-helsinki.api.mks2508.systems/health→ body contiene 'gateway' Verificar que es el gateway-server, no code-serverdocker exec <container> which a2a-mcp→/usr/local/bin/a2a-mcpa2a-mcp wrapper existe en PATHdocker exec <container> cat /usr/local/bin/a2a-mcp→ script bash válido El wrapper apunta abun /opt/mks-agentics/agent2agent-mcp/a2a-mcp.jsdocker exec <container> test -f /opt/mks-agentics/agent2agent-mcp/a2a-mcp.js→ existe El bundle a2a-mcp.js fue descargado en startupdocker exec <container> supervisorctl status gateway→ RUNNING Gateway server está corriendo como servicio supervisadodocker exec <container> env | grep GATEWAY_BROKER_URL→https://broker.gateway.mks2508.systemsEnv var GATEWAY_BROKER_URL seteada en el containerdocker exec <container> env | grep OIDC_CLIENT_ID→ valor presente Credenciales OIDC inyectadas vía Coolify env vars
Variables de entorno requeridas en el workspace
| Variable | Valor | Necesaria para | Estado |
|---|---|---|---|
| GATEWAY_BROKER_URL | https://broker.gateway.mks2508.systems | a2a-mcp + cli-launcher | seteada |
| OIDC_ISSUER | https://auth-provider.mks2508.systems | OIDC token generation | seteada |
| OIDC_TOKEN_ENDPOINT | https://auth-provider.mks2508.systems/api/oidc/token | OIDC client_credentials | seteada |
| OIDC_CLIENT_ID | 46c6e32c-... | JWT para broker | seteada |
| OIDC_CLIENT_SECRET | (secret) | JWT para broker | seteada |
| GITHUB_TOKEN | ghp_... | Descargar bundles de GitHub Releases | seteada |
| MINIMAX_API_KEY | (secret) | Provider MiniMax | seteada |
| GLM_API_KEY | (secret) | Provider GLM | seteada |
| DEEPSEEK_API_KEY | (secret) | Provider DeepSeek | seteada |
El pipeline build-push-base-image.yml (#27881812954) falla en build-ubuntu-amd64
y build-arch por un symlink huérfano en mks-terminal/bin/mesh-drop:
chmod: cannot operate on dangling symlink '/home/developer/dotfiles/mks-terminal/bin/mesh-drop'
El fix es cambiar chmod +x .../bin/* por find .../bin -type f -exec chmod +x {} \;
en el Dockerfile.unified:649.
Impacto en playbooks: mientras el CI esté roto, la imagen Docker no se actualiza.
La imagen actual (pre-fix) ya tiene update-a2a-mcp.sh baked (commit b0acfb7 sí entró
en el último build verde). Los playbooks no están bloqueados — el workspace container
actual ya tiene a2a-mcp funcional.
F3 — Verificar proxy público
Proxy health + virtual key
curl -s https://proxy.gateway.mks2508.systems/health→ 200 OK Health del proxy públicocurl -s https://proxy.gateway.mks2508.systems/v1/providers→ 200 + provider list Lista de providers disponibles (data-plane, sin auth)curl -s https://proxy.gateway.mks2508.systems/v1/keys→ 401 (sin OIDC session) Control-plane requiere OIDC admin session
Virtual key para desarrollo local
# El proxy tiene dos modos de acceso: # # 1. Proxy público (proxy.gateway.mks2508.systems:443) # → Requiere virtual key sk-mks-* en header x-api-key # → Para producción / Tier-2 # # 2. Proxy local (127.0.0.1:3200) # → Sin auth si PROXY_AUTH_REQUIRED=false # → Para desarrollo local con cl minimax proxy # Para crear una virtual key (requiere OIDC admin session): $ gateway-proxyctl key create --label playbook-test → sk-mks-a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 # Verificar que la key funciona: $ curl -s https://proxy.gateway.mks2508.systems/v1/models \ -H "x-api-key: sk-mks-..." | jq .
F4 — Verificar claudio en Mac
Claudio modos + channels
claudio minimax --env --channels→ emite exports sin errores Verificar que mergea a2a MCP + dangerouslyLoadDevelopmentChannelsls ~/.claude-minimax/settings.json→ existe Provider dir creado con settings.jsonpython3 -c "import json; d=json.load(open('$HOME/.claude-minimax/settings.json')); print('agent2agent' in d.get('mcpServers',{}))"→ True a2a MCP mergeado en settings.json del provider dirpython3 -c "import json; d=json.load(open('$HOME/.claude-minimax/settings.json')); print(d.get('dangerouslyLoadDevelopmentChannels',[]))"→ ['server:agent2agent'] Channels habilitados en settings.jsoncl minimax --proxy --channels→ lanza Claude Code sin errores Smoke: Claude Code arranca con proxy + channels
Verificación del provider dir
# Verificar que claudio --channels mergeó correctamente $ python3 -c " import json d = json.load(open('$HOME/.claude-minimax/settings.json')) print('mcpServers:', json.dumps(d.get('mcpServers', {}), indent=2)) print('channels:', d.get('dangerouslyLoadDevelopmentChannels', [])) print('tengu_harbor:', d.get('cachedGrowthBookFeatures', {}).get('tengu_harbor')) " → mcpServers: { → "agent2agent": { → "command": "a2a-mcp", → "env": { → "GATEWAY_BASE_URL": "https://broker.gateway.mks2508.systems", → "A2A_CHANNEL_PUSH": "1" → } → } → } → channels: ['server:agent2agent'] → tengu_harbor: true
F5 — Verificación final
- Broker público responde healthz https://broker.gateway.mks2508.systems/healthz → 200
- Workspace container gateway-server responde https://lab1-helsinki.api.mks2508.systems/health → 200
- Proxy público responde https://proxy.gateway.mks2508.systems/health → 200
- a2a-mcp bundle existe en workspace Verificar que update-a2a-mcp.sh se ejecutó en el último boot
- CI Docker image verde Fix symlink mesh-drop en Dockerfile.unified:649
- Runner daemon en Mac para spawn-plane Necesario para UC4 (spawn local)
Configuración
Código
- cli-launcher.service.tssource
- entrypoint.shsource
- claudio index.tssource
- Dockerfile.unifiedsource
¿Está el broker respondiendo? crítico
Verificar con curl -s https://broker.gateway.mks2508.systems/healthz
¿Está el workspace container ejecutando gateway-server? necesario
Verificar con curl -s https://lab1-helsinki.api.mks2508.systems/health
supervisorctl status gateway dentro del container. Puede que GITHUB_TOKEN no esté seteado y el bundle no se descargó.¿Está a2a-mcp funcional en el workspace? UC3+
Verificar con docker exec <container> which a2a-mcp
Con P0 verde, se puede proceder a:
- UC1 — sesión básica con proxy (
cl minimax --proxy) - UC2 — gateway-web → workspace session
- UC3 — dos peers Mac con channels (requiere F4 verde)
- UC4 — spawn desde sesión Mac (requiere runner daemon)
- UC5 — E2E workspace completo (requiere todo lo anterior)