// --------------------------------------------------------------------------- // One-off config migration — rewrite pre-canonical MCP integration `config` // blobs into the canonical placements model. Runs once per database (boot for // local/selfhost, out-of-band script for cloud); runtime code decodes ONLY // the canonical shape (`parseMcpIntegrationConfig`). // // Stored legacy families (all observed in real databases): // 1. singular `auth: {kind:"none"|"header"|"oauth2"}` (pre-array configs), // or a remote config with no auth field at all (open server) // 2. `authenticationTemplate` entries of the retired single-placement // shapes: `{slug, kind:"header", headerName, prefix?}` / // `{slug, kind:"query", paramName, prefix?}` // 3. openapi-shaped entries the v1→v2 migration wrote: // `{slug, type:"apiKey", headers/queryParams: