@kadoa/mcp 0.6.1 → 0.6.2
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 +13 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -45981,12 +45981,21 @@ function registerTools(server, ctx, capabilities) {
|
|
|
45981
45981
|
});
|
|
45982
45982
|
}
|
|
45983
45983
|
if (ctx.principal.type === "kadoa") {
|
|
45984
|
-
const user = await
|
|
45984
|
+
const [user, teams] = await Promise.all([
|
|
45985
|
+
ctx.client.user.getCurrentUser(),
|
|
45986
|
+
ctx.client.listTeams()
|
|
45987
|
+
]);
|
|
45988
|
+
const activeTeam = teams.find((team) => team.id === ctx.principal.teamId);
|
|
45989
|
+
if (!activeTeam) {
|
|
45990
|
+
throw new Error("The active team is unavailable for this credential. Reconnect and choose a team.");
|
|
45991
|
+
}
|
|
45985
45992
|
return jsonResult({
|
|
45986
45993
|
email: user.email,
|
|
45987
45994
|
authMethod: ctx.principal.actor ? `Kadoa Assistant (delegated via ${ctx.principal.actor.sub})` : "Kadoa access token",
|
|
45988
|
-
|
|
45989
|
-
|
|
45995
|
+
team: {
|
|
45996
|
+
name: activeTeam.name,
|
|
45997
|
+
...activeTeam.memberRole ? { memberRole: activeTeam.memberRole } : {}
|
|
45998
|
+
},
|
|
45990
45999
|
scopes: ctx.principal.scopes
|
|
45991
46000
|
});
|
|
45992
46001
|
}
|
|
@@ -48170,7 +48179,7 @@ var package_default;
|
|
|
48170
48179
|
var init_package = __esm(() => {
|
|
48171
48180
|
package_default = {
|
|
48172
48181
|
name: "@kadoa/mcp",
|
|
48173
|
-
version: "0.6.
|
|
48182
|
+
version: "0.6.2",
|
|
48174
48183
|
description: "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
|
|
48175
48184
|
type: "module",
|
|
48176
48185
|
main: "dist/index.js",
|