@kadoa/mcp 0.3.7-rc.4 → 0.3.7-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49312,8 +49312,14 @@ function registerTools(server, ctx) {
|
|
|
49312
49312
|
if (ctx.teamId && ctx.supabaseJwt) {
|
|
49313
49313
|
const claims = decodeJwtClaims(ctx.supabaseJwt);
|
|
49314
49314
|
if (claims.activeTeamId && claims.activeTeamId !== ctx.teamId) {
|
|
49315
|
-
console.error(`[TEAM_SYNC] JWT active_team_id (${claims.activeTeamId}) != ctx.teamId (${ctx.teamId}), calling setActiveTeam`);
|
|
49315
|
+
console.error(`[TEAM_SYNC] JWT active_team_id (${claims.activeTeamId}) != ctx.teamId (${ctx.teamId}), calling setActiveTeam + refresh`);
|
|
49316
49316
|
await ctx.client.setActiveTeam(ctx.teamId);
|
|
49317
|
+
const newJwt = await refreshSupabaseJwt(ctx);
|
|
49318
|
+
if (newJwt) {
|
|
49319
|
+
console.error(`[TEAM_SYNC] OK: refreshed JWT now has active_team_id=${decodeJwtClaims(newJwt).activeTeamId}`);
|
|
49320
|
+
} else {
|
|
49321
|
+
console.error(`[TEAM_SYNC] WARN: JWT refresh failed after setActiveTeam, request will use stale JWT`);
|
|
49322
|
+
}
|
|
49317
49323
|
}
|
|
49318
49324
|
}
|
|
49319
49325
|
return await handler(...args);
|