Add Discord role sync with role-centric architecture (#22)
* Add Discord role sync with role-centric architecture This refactors the access management to use a role-centric model where each role explicitly defines which platforms it exists on (GitHub, Discord, Google). Key changes: - Add Discord role sync via Pulumi Dynamic Provider - Replace groups.ts with roleIds.ts + roles.ts for type-safe role definitions - Use ROLE_IDS constants to prevent typos in memberOf references - Each role has platform-specific config (github/discord/google keys) - Discord-only roles (e.g., administrators) and GitHub-only roles (e.g., typescript-sdk-auth) are now explicitly modeled - Add PR preview workflow to show Pulumi changes before merge - Add test-config.ts for config structure validation - Fix typo: docs-maintaners -> docs-maintainers Discord roles will match existing server roles: - administrators, lead maintainers, core maintainers - sdk maintainers, working groups, interest groups - etc. Requires new GitHub secrets: - DISCORD_BOT_TOKEN - DISCORD_GUILD_ID * Fix GitHub team ordering and make Discord integration optional - Add topological sort for GitHub teams to ensure parent teams are created before child teams, fixing the registry-wg parentTeamId issue - Make Discord integration optional by using config.get() instead of config.require(), allowing CI preview to succeed without Discord secrets - Add sortRolesByGitHubDependency() utility function in config/utils.ts Claude-Generated-By: Claude Code (cli/claude-opus-4-5=20%) Claude-Steers: 2 Claude-Permission-Prompts: 1 Claude-Escapes: 0 * Reconcile Discord roles for listed users Replace per-role-membership approach with per-user role sync that: - Adds missing roles users should have - Removes managed roles users shouldn't have - Only touches roles defined in config (won't affect admin roles, etc.) Users not in config remain untouched. Claude-Generated-By: Claude Code (cli/claude-opus-4-5=100%) Claude-Steers: 4 Claude-Permission-Prompts: 1 Claude-Escapes: 0 * Fix descriptions to match existing resources * Cache Pulumi plugins and fix GITHUB_TOKEN for pulumi install * Remove accidentally committed state backup * Use github.token for pulumi install * Fix formatting Fix deploy: add pulumi login before config set Fix deploy: set PULUMI_CONFIG_PASSPHRASE_FILE for config commands Import existing docs-maintainers team (remove after deploy) Remove docs-maintainers import workaround Add docs-maintainers cleanup to state cleanup Add pulumi refresh before up to sync state with reality Rename Discord roles to add (synced) suffix Cleanup Makefile and add lead-maintainers GitHub team
This commit is contained in:
parent
f0336a9991
commit
f960494174
6 changed files with 1354 additions and 414 deletions
|
|
@ -1,187 +0,0 @@
|
|||
import { defineGroups } from './utils';
|
||||
|
||||
// NOTE: For GitHub teams, only the first memberOf will be used as the parent team.
|
||||
// GitHub only supports one parent team per team.
|
||||
//
|
||||
// Email groups (isEmailGroup: true) accept emails from anyone (including external users)
|
||||
// and notify group members for each email.
|
||||
//
|
||||
// Groups are created on all platforms (GitHub and Google) by default.
|
||||
// To limit a group to specific platforms, set the onlyOnPlatforms array (e.g., onlyOnPlatforms: ['google']).
|
||||
export const GROUPS = defineGroups([
|
||||
// MCP Organization Structure
|
||||
{
|
||||
name: 'steering-committee',
|
||||
description: 'MCP Steering Committee',
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'core-maintainers',
|
||||
description: 'Core maintainers',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'moderators',
|
||||
description: 'Community moderators',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'docs-maintaners',
|
||||
description: 'MCP docs maintainers',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'inspector-maintainers',
|
||||
description: 'MCP Inspector maintainers',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'mcpb-maintainers',
|
||||
description: 'MCPB (Model Context Protocol Bundle) maintainers',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
|
||||
// SDK Maintainers
|
||||
{
|
||||
name: 'sdk-maintainers',
|
||||
description: 'Authors and maintainers of official MCP SDKs',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'csharp-sdk',
|
||||
description: 'Official C# SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'go-sdk',
|
||||
description: 'The Go SDK Team',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'java-sdk',
|
||||
description: 'Official Java SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'kotlin-sdk',
|
||||
description: 'Official Kotlin SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'php-sdk',
|
||||
description: 'Official PHP SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'python-sdk',
|
||||
description: 'Official Python SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'python-sdk-auth',
|
||||
description: 'Auth related owners',
|
||||
memberOf: ['python-sdk'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'ruby-sdk',
|
||||
description: 'Official Ruby SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'rust-sdk',
|
||||
description: 'Official Rust SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'swift-sdk',
|
||||
description: 'Official Swift SDK maintainers',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'typescript-sdk',
|
||||
description: 'Official TypeScript SDK',
|
||||
memberOf: ['sdk-maintainers'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'typescript-sdk-auth',
|
||||
description: 'Code owners for auth in Typescript SDK',
|
||||
memberOf: ['typescript-sdk'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
|
||||
// Working Groups
|
||||
{
|
||||
name: 'working-groups',
|
||||
description: 'MCP Working Groups',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'auth-wg',
|
||||
description: 'Authentication Working Group',
|
||||
memberOf: ['working-groups'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'registry-wg',
|
||||
description: 'Official registry builders and maintainers',
|
||||
memberOf: ['working-groups'],
|
||||
},
|
||||
{
|
||||
name: 'security-wg',
|
||||
description: 'Security Working Group',
|
||||
memberOf: ['working-groups'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'transport-wg',
|
||||
description: 'Transport Working Group',
|
||||
memberOf: ['working-groups'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
|
||||
// Interest Groups
|
||||
{
|
||||
name: 'interest-groups',
|
||||
description: 'Interest Groups',
|
||||
memberOf: ['steering-committee'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
{
|
||||
name: 'ig-financial-services',
|
||||
description: 'Financial Services Interest Group',
|
||||
memberOf: ['interest-groups'],
|
||||
onlyOnPlatforms: ['github'],
|
||||
},
|
||||
|
||||
// Email-only groups
|
||||
{
|
||||
name: 'antitrust',
|
||||
description: 'Antitrust compliance contacts',
|
||||
isEmailGroup: true,
|
||||
onlyOnPlatforms: ['google'],
|
||||
},
|
||||
{
|
||||
name: 'catch-all',
|
||||
description: 'Catch-all email group',
|
||||
isEmailGroup: true,
|
||||
onlyOnPlatforms: ['google'],
|
||||
},
|
||||
] as const);
|
||||
|
|
@ -21,7 +21,7 @@ export const REPOSITORY_ACCESS: RepositoryAccess[] = [
|
|||
{ team: 'auth-wg', permission: 'push' },
|
||||
{ team: 'core-maintainers', permission: 'maintain' },
|
||||
{ team: 'csharp-sdk', permission: 'push' },
|
||||
{ team: 'docs-maintaners', permission: 'push' },
|
||||
{ team: 'docs-maintainers', permission: 'push' },
|
||||
{ team: 'go-sdk', permission: 'push' },
|
||||
{ team: 'ig-financial-services', permission: 'push' },
|
||||
{ team: 'interest-groups', permission: 'push' },
|
||||
|
|
@ -51,7 +51,7 @@ export const REPOSITORY_ACCESS: RepositoryAccess[] = [
|
|||
{ team: 'auth-wg', permission: 'triage' },
|
||||
{ team: 'core-maintainers', permission: 'maintain' },
|
||||
{ team: 'csharp-sdk', permission: 'triage' },
|
||||
{ team: 'docs-maintaners', permission: 'triage' },
|
||||
{ team: 'docs-maintainers', permission: 'triage' },
|
||||
{ team: 'go-sdk', permission: 'triage' },
|
||||
{ team: 'ig-financial-services', permission: 'triage' },
|
||||
{ team: 'interest-groups', permission: 'triage' },
|
||||
|
|
@ -113,7 +113,7 @@ export const REPOSITORY_ACCESS: RepositoryAccess[] = [
|
|||
{ team: 'auth-wg', permission: 'push' },
|
||||
{ team: 'core-maintainers', permission: 'maintain' },
|
||||
{ team: 'csharp-sdk', permission: 'triage' },
|
||||
{ team: 'docs-maintaners', permission: 'push' },
|
||||
{ team: 'docs-maintainers', permission: 'push' },
|
||||
{ team: 'go-sdk', permission: 'triage' },
|
||||
{ team: 'ig-financial-services', permission: 'triage' },
|
||||
{ team: 'interest-groups', permission: 'triage' },
|
||||
|
|
@ -143,7 +143,7 @@ export const REPOSITORY_ACCESS: RepositoryAccess[] = [
|
|||
{ team: 'auth-wg', permission: 'push' },
|
||||
{ team: 'core-maintainers', permission: 'maintain' },
|
||||
{ team: 'csharp-sdk', permission: 'push' },
|
||||
{ team: 'docs-maintaners', permission: 'push' },
|
||||
{ team: 'docs-maintainers', permission: 'push' },
|
||||
{ team: 'go-sdk', permission: 'push' },
|
||||
{ team: 'ig-financial-services', permission: 'push' },
|
||||
{ team: 'interest-groups', permission: 'push' },
|
||||
|
|
@ -176,7 +176,7 @@ export const REPOSITORY_ACCESS: RepositoryAccess[] = [
|
|||
{ team: 'auth-wg', permission: 'push' },
|
||||
{ team: 'core-maintainers', permission: 'admin' },
|
||||
{ team: 'csharp-sdk', permission: 'push' },
|
||||
{ team: 'docs-maintaners', permission: 'push' },
|
||||
{ team: 'docs-maintainers', permission: 'push' },
|
||||
{ team: 'go-sdk', permission: 'push' },
|
||||
{ team: 'java-sdk', permission: 'push' },
|
||||
{ team: 'kotlin-sdk', permission: 'push' },
|
||||
|
|
|
|||
75
src/config/roleIds.ts
Normal file
75
src/config/roleIds.ts
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* Role ID constants for type-safe role references.
|
||||
* Using constants prevents typos and enables autocomplete.
|
||||
*/
|
||||
export const ROLE_IDS = {
|
||||
// ===================
|
||||
// Organization Structure
|
||||
// ===================
|
||||
STEERING_COMMITTEE: 'steering-committee',
|
||||
CORE_MAINTAINERS: 'core-maintainers',
|
||||
LEAD_MAINTAINERS: 'lead-maintainers',
|
||||
MODERATORS: 'moderators',
|
||||
ADMINISTRATORS: 'administrators', // Discord only
|
||||
|
||||
// ===================
|
||||
// Maintainer Groups
|
||||
// ===================
|
||||
MAINTAINERS: 'maintainers',
|
||||
DOCS_MAINTAINERS: 'docs-maintainers',
|
||||
INSPECTOR_MAINTAINERS: 'inspector-maintainers',
|
||||
MCPB_MAINTAINERS: 'mcpb-maintainers',
|
||||
REFERENCE_SERVERS_MAINTAINERS: 'reference-servers-maintainers',
|
||||
REGISTRY_MAINTAINERS: 'registry-maintainers',
|
||||
USE_MCP_MAINTAINERS: 'use-mcp-maintainers',
|
||||
|
||||
// ===================
|
||||
// SDK Maintainers
|
||||
// ===================
|
||||
SDK_MAINTAINERS: 'sdk-maintainers',
|
||||
CSHARP_SDK: 'csharp-sdk',
|
||||
GO_SDK: 'go-sdk',
|
||||
JAVA_SDK: 'java-sdk',
|
||||
KOTLIN_SDK: 'kotlin-sdk',
|
||||
PHP_SDK: 'php-sdk',
|
||||
PYTHON_SDK: 'python-sdk',
|
||||
PYTHON_SDK_AUTH: 'python-sdk-auth', // GitHub only (CODEOWNERS)
|
||||
RUBY_SDK: 'ruby-sdk',
|
||||
RUST_SDK: 'rust-sdk',
|
||||
SWIFT_SDK: 'swift-sdk',
|
||||
TYPESCRIPT_SDK: 'typescript-sdk',
|
||||
TYPESCRIPT_SDK_AUTH: 'typescript-sdk-auth', // GitHub only (CODEOWNERS)
|
||||
|
||||
// ===================
|
||||
// Working Groups
|
||||
// ===================
|
||||
WORKING_GROUPS: 'working-groups',
|
||||
AUTH_WG: 'auth-wg',
|
||||
SECURITY_WG: 'security-wg',
|
||||
SERVER_IDENTITY_WG: 'server-identity-wg',
|
||||
TRANSPORT_WG: 'transport-wg',
|
||||
|
||||
// ===================
|
||||
// Interest Groups
|
||||
// ===================
|
||||
INTEREST_GROUPS: 'interest-groups',
|
||||
AGENTS_IG: 'agents-ig',
|
||||
AUTH_IG: 'auth-ig',
|
||||
CLIENT_IMPLEMENTOR_IG: 'client-implementor-ig',
|
||||
FINANCIAL_SERVICES_IG: 'financial-services-ig',
|
||||
|
||||
// ===================
|
||||
// Email Groups (Google only)
|
||||
// ===================
|
||||
ANTITRUST: 'antitrust',
|
||||
CATCH_ALL: 'catch-all',
|
||||
} as const;
|
||||
|
||||
export type RoleId = (typeof ROLE_IDS)[keyof typeof ROLE_IDS];
|
||||
|
||||
/**
|
||||
* Helper to check if a string is a valid RoleId at runtime.
|
||||
*/
|
||||
export function isValidRoleId(id: string): id is RoleId {
|
||||
return Object.values(ROLE_IDS).includes(id as RoleId);
|
||||
}
|
||||
316
src/config/roles.ts
Normal file
316
src/config/roles.ts
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
import { ROLE_IDS, type RoleId } from './roleIds';
|
||||
|
||||
/**
|
||||
* GitHub team configuration
|
||||
*/
|
||||
export interface GitHubConfig {
|
||||
/** Team name (usually matches role ID) */
|
||||
team: string;
|
||||
/** Parent team role ID */
|
||||
parent?: RoleId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Discord role configuration
|
||||
*/
|
||||
export interface DiscordConfig {
|
||||
/** Display name in Discord (can have spaces) */
|
||||
role: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Google Workspace group configuration
|
||||
*/
|
||||
export interface GoogleConfig {
|
||||
/** Group name (used as prefix for @modelcontextprotocol.io email) */
|
||||
group: string;
|
||||
/** If true, accepts emails from anyone including external users */
|
||||
isEmailGroup?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Role definition with platform-specific configurations.
|
||||
* A role only exists on platforms where it has a config key.
|
||||
*/
|
||||
export interface Role {
|
||||
id: RoleId;
|
||||
description: string;
|
||||
github?: GitHubConfig;
|
||||
discord?: DiscordConfig;
|
||||
google?: GoogleConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* All roles in the MCP organization.
|
||||
* Each role specifies which platforms it exists on via presence of config keys.
|
||||
*/
|
||||
export const ROLES: readonly Role[] = [
|
||||
// ===================
|
||||
// Organization Structure
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.STEERING_COMMITTEE,
|
||||
description: 'MCP Steering Committee',
|
||||
github: { team: 'steering-committee' },
|
||||
// No discord - this is a GitHub-only organizational container
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.ADMINISTRATORS,
|
||||
description: 'Discord server administrators',
|
||||
discord: { role: 'administrators (synced)' },
|
||||
// Discord only - no GitHub equivalent
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.LEAD_MAINTAINERS,
|
||||
description: 'Lead core maintainers',
|
||||
github: { team: 'lead-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
discord: { role: 'lead maintainers (synced)' },
|
||||
// Discord only for now - could add GitHub if needed
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.CORE_MAINTAINERS,
|
||||
description: 'Core maintainers',
|
||||
github: { team: 'core-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
discord: { role: 'core maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.MODERATORS,
|
||||
description: 'Community moderators',
|
||||
github: { team: 'moderators', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
discord: { role: 'community moderators (synced)' },
|
||||
},
|
||||
|
||||
// ===================
|
||||
// Maintainer Groups
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.MAINTAINERS,
|
||||
description: 'General maintainers',
|
||||
discord: { role: 'maintainers (synced)' },
|
||||
// Discord only - general maintainer role
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.DOCS_MAINTAINERS,
|
||||
description: 'MCP docs maintainers',
|
||||
github: { team: 'docs-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
// No discord role for docs maintainers
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.INSPECTOR_MAINTAINERS,
|
||||
description: 'MCP Inspector maintainers',
|
||||
github: { team: 'inspector-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
discord: { role: 'inspector maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.MCPB_MAINTAINERS,
|
||||
description: 'MCPB (Model Context Protocol Bundle) maintainers',
|
||||
github: { team: 'mcpb-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
// No discord role
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.REFERENCE_SERVERS_MAINTAINERS,
|
||||
description: 'Reference servers maintainers',
|
||||
discord: { role: 'reference servers maintainers (synced)' },
|
||||
// Discord only for now
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.REGISTRY_MAINTAINERS,
|
||||
description: 'Official registry builders and maintainers',
|
||||
github: { team: 'registry-wg', parent: ROLE_IDS.WORKING_GROUPS },
|
||||
discord: { role: 'registry maintainers (synced)' },
|
||||
google: { group: 'registry-wg' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.USE_MCP_MAINTAINERS,
|
||||
description: 'use-mcp maintainers',
|
||||
discord: { role: 'use-mcp maintainers (synced)' },
|
||||
// Discord only
|
||||
},
|
||||
|
||||
// ===================
|
||||
// SDK Maintainers
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.SDK_MAINTAINERS,
|
||||
description: 'Authors and maintainers of official MCP SDKs',
|
||||
github: { team: 'sdk-maintainers', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
discord: { role: 'sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.CSHARP_SDK,
|
||||
description: 'Official C# SDK maintainers',
|
||||
github: { team: 'csharp-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'c# sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.GO_SDK,
|
||||
description: 'The Go SDK Team',
|
||||
github: { team: 'go-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'go sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.JAVA_SDK,
|
||||
description: 'Official Java SDK maintainers',
|
||||
github: { team: 'java-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'java sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.KOTLIN_SDK,
|
||||
description: 'Official Kotlin SDK maintainers',
|
||||
github: { team: 'kotlin-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'kotlin sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.PHP_SDK,
|
||||
description: 'Official PHP SDK maintainers',
|
||||
github: { team: 'php-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'php sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.PYTHON_SDK,
|
||||
description: 'Official Python SDK maintainers',
|
||||
github: { team: 'python-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'python sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.PYTHON_SDK_AUTH,
|
||||
description: 'Python SDK auth code owners',
|
||||
github: { team: 'python-sdk-auth', parent: ROLE_IDS.PYTHON_SDK },
|
||||
// GitHub only - for CODEOWNERS
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.RUBY_SDK,
|
||||
description: 'Official Ruby SDK maintainers',
|
||||
github: { team: 'ruby-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'ruby sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.RUST_SDK,
|
||||
description: 'Official Rust SDK maintainers',
|
||||
github: { team: 'rust-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'rust sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.SWIFT_SDK,
|
||||
description: 'Official Swift SDK maintainers',
|
||||
github: { team: 'swift-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'swift sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.TYPESCRIPT_SDK,
|
||||
description: 'Official TypeScript SDK',
|
||||
github: { team: 'typescript-sdk', parent: ROLE_IDS.SDK_MAINTAINERS },
|
||||
discord: { role: 'typescript sdk maintainers (synced)' },
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.TYPESCRIPT_SDK_AUTH,
|
||||
description: 'Code owners for auth in Typescript SDK',
|
||||
github: { team: 'typescript-sdk-auth', parent: ROLE_IDS.TYPESCRIPT_SDK },
|
||||
// GitHub only - for CODEOWNERS
|
||||
},
|
||||
|
||||
// ===================
|
||||
// Working Groups
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.WORKING_GROUPS,
|
||||
description: 'MCP Working Groups',
|
||||
github: { team: 'working-groups', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
// No discord - organizational container
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.AUTH_WG,
|
||||
description: 'Authentication Working Group',
|
||||
github: { team: 'auth-wg', parent: ROLE_IDS.WORKING_GROUPS },
|
||||
// See AUTH_IG for Discord role
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.SECURITY_WG,
|
||||
description: 'Security Working Group',
|
||||
github: { team: 'security-wg', parent: ROLE_IDS.WORKING_GROUPS },
|
||||
// See interest group for Discord role
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.SERVER_IDENTITY_WG,
|
||||
description: 'Server Identity Working Group',
|
||||
discord: { role: 'server identity working group (synced)' },
|
||||
// Discord only for now
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.TRANSPORT_WG,
|
||||
description: 'Transport Working Group',
|
||||
github: { team: 'transport-wg', parent: ROLE_IDS.WORKING_GROUPS },
|
||||
discord: { role: 'transports working group (synced)' },
|
||||
},
|
||||
|
||||
// ===================
|
||||
// Interest Groups
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.INTEREST_GROUPS,
|
||||
description: 'Interest Groups',
|
||||
github: { team: 'interest-groups', parent: ROLE_IDS.STEERING_COMMITTEE },
|
||||
// No discord - organizational container
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.AGENTS_IG,
|
||||
description: 'Agents Interest Group',
|
||||
discord: { role: 'agents interest group (synced)' },
|
||||
// Discord only
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.AUTH_IG,
|
||||
description: 'Auth Interest Group',
|
||||
discord: { role: 'auth interest group (synced)' },
|
||||
// Discord only - separate from AUTH_WG which is GitHub
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.CLIENT_IMPLEMENTOR_IG,
|
||||
description: 'Client Implementor Interest Group',
|
||||
discord: { role: 'client implementor interest group (synced)' },
|
||||
// Discord only
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.FINANCIAL_SERVICES_IG,
|
||||
description: 'Financial Services Interest Group',
|
||||
github: { team: 'ig-financial-services', parent: ROLE_IDS.INTEREST_GROUPS },
|
||||
discord: { role: 'financial services interest group (synced)' },
|
||||
},
|
||||
|
||||
// ===================
|
||||
// Email Groups (Google only)
|
||||
// ===================
|
||||
{
|
||||
id: ROLE_IDS.ANTITRUST,
|
||||
description: 'Antitrust compliance contacts',
|
||||
google: { group: 'antitrust', isEmailGroup: true },
|
||||
// Google only
|
||||
},
|
||||
{
|
||||
id: ROLE_IDS.CATCH_ALL,
|
||||
description: 'Catch-all email group',
|
||||
google: { group: 'catch-all', isEmailGroup: true },
|
||||
// Google only
|
||||
},
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Get a role by ID
|
||||
*/
|
||||
export function getRole(id: RoleId): Role | undefined {
|
||||
return ROLES.find((r) => r.id === id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all roles that exist on a specific platform
|
||||
*/
|
||||
export function getRolesForPlatform(platform: 'github' | 'discord' | 'google'): Role[] {
|
||||
return ROLES.filter((r) => r[platform] !== undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a lookup map of roles by ID
|
||||
*/
|
||||
export function buildRoleLookup(): Map<RoleId, Role> {
|
||||
return new Map(ROLES.map((r) => [r.id, r]));
|
||||
}
|
||||
|
|
@ -1,85 +1,93 @@
|
|||
import type { Member } from './utils';
|
||||
import { ROLE_IDS } from './roleIds';
|
||||
|
||||
export const MEMBERS: readonly Member[] = [
|
||||
{
|
||||
github: '000-000-000-000-000',
|
||||
memberOf: ['core-maintainers'],
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'CodeWithKyrian',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'D-McAdams',
|
||||
memberOf: ['auth-wg'],
|
||||
memberOf: [ROLE_IDS.AUTH_WG],
|
||||
},
|
||||
{
|
||||
github: 'Kehrlann',
|
||||
memberOf: ['java-sdk'],
|
||||
memberOf: [ROLE_IDS.JAVA_SDK],
|
||||
},
|
||||
{
|
||||
github: 'Kludex',
|
||||
memberOf: ['python-sdk'],
|
||||
memberOf: [ROLE_IDS.PYTHON_SDK],
|
||||
},
|
||||
{
|
||||
github: 'Nyholm',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'Ololoshechkin',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'a-akimov',
|
||||
memberOf: ['docs-maintaners'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'aaronpk',
|
||||
memberOf: ['auth-wg'],
|
||||
memberOf: [ROLE_IDS.AUTH_WG],
|
||||
},
|
||||
{
|
||||
github: 'alexhancock',
|
||||
memberOf: ['rust-sdk'],
|
||||
memberOf: [ROLE_IDS.RUST_SDK],
|
||||
},
|
||||
{
|
||||
github: 'an-dustin',
|
||||
memberOf: ['security-wg'],
|
||||
memberOf: [ROLE_IDS.SECURITY_WG],
|
||||
},
|
||||
{
|
||||
github: 'ansaba',
|
||||
memberOf: ['go-sdk'],
|
||||
memberOf: [ROLE_IDS.GO_SDK],
|
||||
},
|
||||
{
|
||||
github: 'asklar',
|
||||
memberOf: ['mcpb-maintainers'],
|
||||
memberOf: [ROLE_IDS.MCPB_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'atesgoral',
|
||||
memberOf: ['ruby-sdk'],
|
||||
memberOf: [ROLE_IDS.RUBY_SDK],
|
||||
},
|
||||
{
|
||||
github: 'baxen',
|
||||
memberOf: ['rust-sdk'],
|
||||
memberOf: [ROLE_IDS.RUST_SDK],
|
||||
},
|
||||
{
|
||||
github: 'bhosmer-ant',
|
||||
memberOf: ['core-maintainers', 'docs-maintaners', 'moderators', 'python-sdk', 'typescript-sdk'],
|
||||
discord: '1272295077074567242',
|
||||
memberOf: [
|
||||
ROLE_IDS.CORE_MAINTAINERS,
|
||||
ROLE_IDS.DOCS_MAINTAINERS,
|
||||
ROLE_IDS.MODERATORS,
|
||||
ROLE_IDS.PYTHON_SDK,
|
||||
ROLE_IDS.TYPESCRIPT_SDK,
|
||||
],
|
||||
},
|
||||
{
|
||||
github: 'carlpeaslee',
|
||||
memberOf: ['swift-sdk'],
|
||||
memberOf: [ROLE_IDS.SWIFT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'chemicL',
|
||||
memberOf: ['java-sdk'],
|
||||
memberOf: [ROLE_IDS.JAVA_SDK],
|
||||
},
|
||||
{
|
||||
github: 'chr-hertel',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'cliffhall',
|
||||
memberOf: ['docs-maintaners', 'inspector-maintainers', 'moderators'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.INSPECTOR_MAINTAINERS, ROLE_IDS.MODERATORS],
|
||||
},
|
||||
{
|
||||
github: 'crondinini-ant',
|
||||
|
|
@ -87,271 +95,278 @@ export const MEMBERS: readonly Member[] = [
|
|||
},
|
||||
{
|
||||
github: 'dend',
|
||||
memberOf: ['csharp-sdk'],
|
||||
memberOf: [ROLE_IDS.CSHARP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'devcrocod',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'domdomegg',
|
||||
email: 'adam@modelcontextprotocol.io',
|
||||
memberOf: ['mcpb-maintainers', 'registry-wg'],
|
||||
memberOf: [ROLE_IDS.MCPB_MAINTAINERS, ROLE_IDS.REGISTRY_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'dsp-ant',
|
||||
email: 'david@modelcontextprotocol.io',
|
||||
discord: '166107790262272000', // Example Discord user ID - replace with real ID
|
||||
memberOf: [
|
||||
'auth-wg',
|
||||
'core-maintainers',
|
||||
'docs-maintaners',
|
||||
'go-sdk',
|
||||
'ig-financial-services',
|
||||
'moderators',
|
||||
'php-sdk',
|
||||
'python-sdk',
|
||||
'security-wg',
|
||||
'transport-wg',
|
||||
'typescript-sdk',
|
||||
ROLE_IDS.AUTH_WG,
|
||||
ROLE_IDS.CORE_MAINTAINERS,
|
||||
ROLE_IDS.DOCS_MAINTAINERS,
|
||||
ROLE_IDS.GO_SDK,
|
||||
ROLE_IDS.FINANCIAL_SERVICES_IG,
|
||||
ROLE_IDS.MODERATORS,
|
||||
ROLE_IDS.PHP_SDK,
|
||||
ROLE_IDS.PYTHON_SDK,
|
||||
ROLE_IDS.SECURITY_WG,
|
||||
ROLE_IDS.TRANSPORT_WG,
|
||||
ROLE_IDS.TYPESCRIPT_SDK,
|
||||
],
|
||||
},
|
||||
{
|
||||
github: 'e5l',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'eiriktsarpalis',
|
||||
memberOf: ['csharp-sdk'],
|
||||
memberOf: [ROLE_IDS.CSHARP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'evalstate',
|
||||
memberOf: ['docs-maintaners', 'moderators'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.MODERATORS],
|
||||
},
|
||||
{
|
||||
github: 'fabpot',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'felixrieseberg',
|
||||
memberOf: ['mcpb-maintainers'],
|
||||
memberOf: [ROLE_IDS.MCPB_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'felixweinberger',
|
||||
memberOf: ['python-sdk', 'security-wg', 'typescript-sdk'],
|
||||
memberOf: [ROLE_IDS.PYTHON_SDK, ROLE_IDS.SECURITY_WG, ROLE_IDS.TYPESCRIPT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'findleyr',
|
||||
memberOf: ['go-sdk'],
|
||||
memberOf: [ROLE_IDS.GO_SDK],
|
||||
},
|
||||
{
|
||||
github: 'halter73',
|
||||
memberOf: ['csharp-sdk'],
|
||||
memberOf: [ROLE_IDS.CSHARP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'ignatov',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'ihrpr',
|
||||
memberOf: ['docs-maintaners', 'python-sdk', 'typescript-sdk'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.PYTHON_SDK, ROLE_IDS.TYPESCRIPT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'jamadeo',
|
||||
memberOf: ['rust-sdk'],
|
||||
memberOf: [ROLE_IDS.RUST_SDK],
|
||||
},
|
||||
{
|
||||
github: 'jba',
|
||||
memberOf: ['go-sdk'],
|
||||
memberOf: [ROLE_IDS.GO_SDK],
|
||||
},
|
||||
{
|
||||
github: 'jenn-newton',
|
||||
memberOf: ['security-wg'],
|
||||
memberOf: [ROLE_IDS.SECURITY_WG],
|
||||
},
|
||||
{
|
||||
github: 'jerome3o-anthropic',
|
||||
memberOf: ['moderators'],
|
||||
memberOf: [ROLE_IDS.MODERATORS],
|
||||
},
|
||||
{
|
||||
github: 'joan-anthropic',
|
||||
memberOf: ['mcpb-maintainers'],
|
||||
memberOf: [ROLE_IDS.MCPB_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'jonathanhefner',
|
||||
memberOf: ['docs-maintaners', 'moderators', 'ruby-sdk'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.MODERATORS, ROLE_IDS.RUBY_SDK],
|
||||
},
|
||||
{
|
||||
github: 'jspahrsummers',
|
||||
email: 'justin@modelcontextprotocol.io',
|
||||
memberOf: ['core-maintainers'],
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'KKonstantinov',
|
||||
memberOf: ['inspector-maintainers', 'typescript-sdk'],
|
||||
memberOf: [ROLE_IDS.INSPECTOR_MAINTAINERS, ROLE_IDS.TYPESCRIPT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'koic',
|
||||
memberOf: ['ruby-sdk'],
|
||||
memberOf: [ROLE_IDS.RUBY_SDK],
|
||||
},
|
||||
{
|
||||
github: 'kpavlov',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'kurtisvg',
|
||||
memberOf: ['core-maintainers', 'transport-wg'],
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS, ROLE_IDS.TRANSPORT_WG],
|
||||
},
|
||||
{
|
||||
github: 'localden',
|
||||
memberOf: ['auth-wg', 'core-maintainers'],
|
||||
memberOf: [ROLE_IDS.AUTH_WG, ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'maheshmurag',
|
||||
memberOf: ['moderators'],
|
||||
memberOf: [ROLE_IDS.MODERATORS],
|
||||
},
|
||||
{
|
||||
github: 'markpollack',
|
||||
memberOf: ['java-sdk'],
|
||||
memberOf: [ROLE_IDS.JAVA_SDK],
|
||||
},
|
||||
{
|
||||
github: 'marshallofsound',
|
||||
memberOf: ['mcpb-maintainers'],
|
||||
memberOf: [ROLE_IDS.MCPB_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'mattt',
|
||||
memberOf: ['swift-sdk'],
|
||||
memberOf: [ROLE_IDS.SWIFT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'maxisbey',
|
||||
memberOf: ['python-sdk'],
|
||||
memberOf: [ROLE_IDS.PYTHON_SDK],
|
||||
},
|
||||
{
|
||||
github: 'mattzcarey',
|
||||
memberOf: ['typescript-sdk'],
|
||||
memberOf: [ROLE_IDS.TYPESCRIPT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'michaelneale',
|
||||
memberOf: ['rust-sdk'],
|
||||
memberOf: [ROLE_IDS.RUST_SDK],
|
||||
},
|
||||
{
|
||||
github: 'movetz',
|
||||
memberOf: ['swift-sdk'],
|
||||
memberOf: [ROLE_IDS.SWIFT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'mikekistler',
|
||||
memberOf: ['csharp-sdk'],
|
||||
memberOf: [ROLE_IDS.CSHARP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'nickcoai',
|
||||
memberOf: ['core-maintainers'],
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'nicolas-grekas',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'ochafik',
|
||||
memberOf: ['python-sdk', 'python-sdk-auth', 'typescript-sdk', 'typescript-sdk-auth'],
|
||||
memberOf: [
|
||||
ROLE_IDS.PYTHON_SDK,
|
||||
ROLE_IDS.PYTHON_SDK_AUTH,
|
||||
ROLE_IDS.TYPESCRIPT_SDK,
|
||||
ROLE_IDS.TYPESCRIPT_SDK_AUTH,
|
||||
],
|
||||
},
|
||||
{
|
||||
github: 'og-ant',
|
||||
memberOf: ['security-wg'],
|
||||
memberOf: [ROLE_IDS.SECURITY_WG],
|
||||
},
|
||||
{
|
||||
github: 'olaservo',
|
||||
memberOf: ['docs-maintaners', 'inspector-maintainers', 'moderators'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.INSPECTOR_MAINTAINERS, ROLE_IDS.MODERATORS],
|
||||
},
|
||||
{
|
||||
github: 'pcarleton',
|
||||
memberOf: [
|
||||
'core-maintainers',
|
||||
'python-sdk',
|
||||
'python-sdk-auth',
|
||||
'typescript-sdk',
|
||||
'typescript-sdk-auth',
|
||||
'auth-wg',
|
||||
ROLE_IDS.CORE_MAINTAINERS,
|
||||
ROLE_IDS.PYTHON_SDK,
|
||||
ROLE_IDS.PYTHON_SDK_AUTH,
|
||||
ROLE_IDS.TYPESCRIPT_SDK,
|
||||
ROLE_IDS.TYPESCRIPT_SDK_AUTH,
|
||||
ROLE_IDS.AUTH_WG,
|
||||
],
|
||||
},
|
||||
{
|
||||
github: 'pederhp',
|
||||
memberOf: ['ig-financial-services'],
|
||||
memberOf: [ROLE_IDS.FINANCIAL_SERVICES_IG],
|
||||
},
|
||||
{
|
||||
github: 'petery-ant',
|
||||
memberOf: ['security-wg'],
|
||||
memberOf: [ROLE_IDS.SECURITY_WG],
|
||||
},
|
||||
{
|
||||
github: 'pronskiy',
|
||||
memberOf: ['php-sdk'],
|
||||
memberOf: [ROLE_IDS.PHP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'pwwpche',
|
||||
memberOf: ['core-maintainers'],
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'rdimitrov',
|
||||
email: 'radoslav@modelcontextprotocol.io',
|
||||
memberOf: ['registry-wg'],
|
||||
memberOf: [ROLE_IDS.REGISTRY_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'sambhav',
|
||||
memberOf: ['ig-financial-services'],
|
||||
memberOf: [ROLE_IDS.FINANCIAL_SERVICES_IG],
|
||||
},
|
||||
{
|
||||
github: 'samthanawalla',
|
||||
memberOf: ['go-sdk'],
|
||||
memberOf: [ROLE_IDS.GO_SDK],
|
||||
},
|
||||
{
|
||||
github: 'sdubov',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'stephentoub',
|
||||
memberOf: ['csharp-sdk'],
|
||||
memberOf: [ROLE_IDS.CSHARP_SDK],
|
||||
},
|
||||
{
|
||||
github: 'stallent',
|
||||
memberOf: ['swift-sdk'],
|
||||
memberOf: [ROLE_IDS.SWIFT_SDK],
|
||||
},
|
||||
{
|
||||
github: 'tadasant',
|
||||
email: 'tadas@modelcontextprotocol.io',
|
||||
memberOf: ['moderators', 'registry-wg'],
|
||||
memberOf: [ROLE_IDS.MODERATORS, ROLE_IDS.REGISTRY_MAINTAINERS, ROLE_IDS.ADMINISTRATORS],
|
||||
},
|
||||
{
|
||||
github: 'tiginamaria',
|
||||
memberOf: ['kotlin-sdk'],
|
||||
memberOf: [ROLE_IDS.KOTLIN_SDK],
|
||||
},
|
||||
{
|
||||
github: 'toby',
|
||||
email: 'toby@modelcontextprotocol.io',
|
||||
memberOf: ['registry-wg'],
|
||||
memberOf: [ROLE_IDS.REGISTRY_MAINTAINERS],
|
||||
},
|
||||
{
|
||||
github: 'topherbullock',
|
||||
memberOf: ['ruby-sdk'],
|
||||
memberOf: [ROLE_IDS.RUBY_SDK],
|
||||
},
|
||||
{
|
||||
github: 'tzolov',
|
||||
memberOf: ['docs-maintaners', 'java-sdk'],
|
||||
memberOf: [ROLE_IDS.DOCS_MAINTAINERS, ROLE_IDS.JAVA_SDK],
|
||||
},
|
||||
{
|
||||
email: 'adamj@anthropic.com',
|
||||
memberOf: ['catch-all'],
|
||||
memberOf: [ROLE_IDS.CATCH_ALL],
|
||||
},
|
||||
{
|
||||
email: 'davidsp@anthropic.com',
|
||||
memberOf: ['antitrust'],
|
||||
memberOf: [ROLE_IDS.ANTITRUST],
|
||||
},
|
||||
{
|
||||
email: 'mattsamuels@anthropic.com',
|
||||
memberOf: ['antitrust'],
|
||||
memberOf: [ROLE_IDS.ANTITRUST],
|
||||
},
|
||||
{
|
||||
email: 'davideramian@anthropic.com',
|
||||
memberOf: ['antitrust'],
|
||||
memberOf: [ROLE_IDS.ANTITRUST],
|
||||
},
|
||||
{
|
||||
github: 'caitiem20',
|
||||
memberOf: ['core-maintainers'],
|
||||
discord: '1425586366288494722',
|
||||
memberOf: [ROLE_IDS.CORE_MAINTAINERS],
|
||||
},
|
||||
] as const;
|
||||
|
|
|
|||
|
|
@ -1,43 +1,71 @@
|
|||
import type { GROUPS } from './groups';
|
||||
import type { RoleId } from './roleIds';
|
||||
import type { Role } from './roles';
|
||||
|
||||
function isValidGroupName(name: string): boolean {
|
||||
return /^[a-z][a-z0-9-]*[a-z]$/.test(name);
|
||||
/**
|
||||
* A member of the MCP organization.
|
||||
* Members are assigned to roles via memberOf, and the role definitions
|
||||
* determine which platforms (GitHub, Discord, Google) they get access to.
|
||||
*/
|
||||
export interface Member {
|
||||
/** GitHub username */
|
||||
github?: string;
|
||||
/** Email address (for Google Workspace) */
|
||||
email?: string;
|
||||
/** Discord user ID (snowflake) */
|
||||
discord?: string;
|
||||
/** Roles this member belongs to */
|
||||
memberOf: readonly RoleId[];
|
||||
}
|
||||
|
||||
export type Platform = 'github' | 'google';
|
||||
/**
|
||||
* Sort roles by GitHub parent dependency (topological sort).
|
||||
* Ensures parent teams are created before child teams.
|
||||
*
|
||||
* This is necessary because when creating GitHub teams, we need the parent
|
||||
* team's ID. If we process roles in arbitrary order, a child team might be
|
||||
* processed before its parent, resulting in undefined parentTeamId.
|
||||
*/
|
||||
export function sortRolesByGitHubDependency(
|
||||
roles: readonly Role[],
|
||||
roleLookup: Map<RoleId, Role>
|
||||
): Role[] {
|
||||
const result: Role[] = [];
|
||||
const visited = new Set<RoleId>();
|
||||
|
||||
export function defineGroups<
|
||||
const T extends readonly {
|
||||
name: Lowercase<string>;
|
||||
description: string;
|
||||
memberOf?: readonly T[number]['name'][];
|
||||
isEmailGroup?: boolean;
|
||||
onlyOnPlatforms?: readonly Platform[];
|
||||
}[],
|
||||
>(groups: T) {
|
||||
for (const group of groups) {
|
||||
if (!isValidGroupName(group.name)) {
|
||||
throw new Error(
|
||||
`Invalid group name: ${group.name}. Must be lowercase alphanumeric with dashes, starting with a letter.`
|
||||
);
|
||||
function visit(role: Role): void {
|
||||
if (visited.has(role.id)) return;
|
||||
|
||||
// Only process roles with GitHub config
|
||||
if (!role.github) {
|
||||
visited.add(role.id);
|
||||
return;
|
||||
}
|
||||
|
||||
// Visit parent first if it exists and has GitHub config
|
||||
if (role.github.parent) {
|
||||
const parentRole = roleLookup.get(role.github.parent);
|
||||
if (parentRole) {
|
||||
visit(parentRole);
|
||||
}
|
||||
}
|
||||
|
||||
visited.add(role.id);
|
||||
result.push(role);
|
||||
}
|
||||
|
||||
return groups;
|
||||
for (const role of roles) {
|
||||
visit(role);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export type GroupKey = (typeof GROUPS)[number]['name'];
|
||||
|
||||
export interface Group {
|
||||
name: GroupKey;
|
||||
description: string;
|
||||
memberOf?: readonly GroupKey[];
|
||||
isEmailGroup?: boolean;
|
||||
onlyOnPlatforms?: readonly Platform[];
|
||||
}
|
||||
|
||||
export interface Member {
|
||||
github?: string;
|
||||
email?: string;
|
||||
memberOf: readonly GroupKey[];
|
||||
}
|
||||
// Re-export for convenience
|
||||
export { ROLE_IDS, type RoleId } from './roleIds';
|
||||
export {
|
||||
ROLES,
|
||||
type Role,
|
||||
type GitHubConfig,
|
||||
type DiscordConfig,
|
||||
type GoogleConfig,
|
||||
} from './roles';
|
||||
|
|
|
|||
Loading…
Reference in a new issue