/claim #1301
[!NOTE] Risk: Medium
- Adds a DB migration and changes how MCP tools, chat API keys, Vault, and E2E startup behave.
- Mistakes here could break MCP tool discovery, MCP App rendering, or BYOS/Vault credentials – reviewers should run tests and spot‑check the new flows.
This PR does two big things:
tools.meta)0099_tools_meta_mcp_apps.sql
meta jsonb column to tools to store MCP Apps metadata.Tool schema/model updated to read/write meta.mcp-client, mcp-server routes, McpServerModel, and ToolModel now:
_meta from discovery.tools.meta._meta (when present) so the frontend can understand tool‑level metadata for Apps.resources/read and UI resource proxyresources/read, not just tools./api/chat/agents/:agentId/mcp-app-resource:
ui:// URI, finds the corresponding MCP server + catalog item.frontend/src/components/chat/mcp-app-frame.tsx:
ui:// tool results safely.backend/src/routes/chat-api-keys.tsreadonly_vault) was enabled, CreateChatApiKey:
testProviderApiKey (which talks to Anthropic/OpenAI/Gemini).vaultSecretPath#vaultSecretKey in our own secret and rely on:
apiKey (non‑BYOS) we still call testProviderApiKey as before.Result: BYOS/Vault chat API keys can be created and updated even when external LLM endpoints are not reachable, and the E2E tests no longer flake on that path.
frontend/src/components/teams/team-vault-folder-dialog.ee.tsx
frontend/src/components/ui/input.tsx
forwardRef to the underlying <input>, so:
Input.ref.current.value.New scripts:
platform/scripts/run-e2e-vault.ps1platform/scripts/run-e2e-vault.shBehavior:
3000, 9000, 8200.dev/docker-compose.vault.ee.yml:
http://127.0.0.1:8200/v1/sys/health.secret using dev-root-token.platform/.env to backend/.env, wire frontend .env.development.local to http://127.0.0.1:9000.@backend dev), wait for /health.@frontend dev), wait for http://localhost:3000.credentials-with-vault Playwright project.archestra-vault container.Scripts:
platform/scripts/run-e2e-with-app.ps1platform/scripts/run-e2e-with-app.shBehavior:
platform/scripts/SETUP-DATABASE-NOW.ps1
0099_tools_meta_mcp_apps.sql.platform/scripts/setup-db*.ps1 and scripts/setup-db.sql
backend/src/standalone-scripts/setup-dev-db.ts
backend/scripts/dev-with-server.mjs
backend/dist/,tsdown,tsdown --watch and node dist/server.mjs in parallel.platform/e2e-tests/tests/ui/credentials-with-vault.ee.spec.ts
secret/data/teams)./api/features and skip when orchestrator-k8s-runtime is false.platform/e2e-tests/mock-vault.mjs
/v1/sys/health, /v1/secret/data/..., /v1/secret/metadata/... and list/read semantics.frontend/src/app/health/route.ts
/health route for environments that health‑check the Next.js app directly.127.0.0.1, and tests around config/proxying were adjusted accordingly so local dev and E2E use the same base URLs.platform/docs/TESTING.md (new)
SETUP-DATABASE-NOW.ps1, setup-db*.ps1, setup-dev-db.ts).run-e2e-with-app.*),run-e2e-vault.*),dev-for-e2e.*, test-all.ps1, backend dev-with-server.mjs).cd platform && pnpm test -- --runcd platform && .\scripts\run-e2e-with-app.ps1 (or ./scripts/run-e2e-with-app.sh)cd platform && .\scripts\run-e2e-vault.ps1 (or ./scripts/run-e2e-vault.sh)credentials-with-vault project passes; K8S self‑hosted MCP tests show as skipped if orchestrator-k8s-runtime is disabled.Matías J. Magni
@info3
Archestra
@archestra-ai