@burdenoff/mcp-libs 2026.703.1 → 2026.703.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/modules/atheletebridge/index.cjs +4 -4
- package/dist/modules/atheletebridge/index.cjs.map +1 -1
- package/dist/modules/atheletebridge/index.js +4 -4
- package/dist/modules/atheletebridge/index.js.map +1 -1
- package/dist/modules/integrations/index.cjs +43 -9
- package/dist/modules/integrations/index.cjs.map +1 -1
- package/dist/modules/integrations/index.js +43 -9
- package/dist/modules/integrations/index.js.map +1 -1
- package/dist/modules/scheduler/index.cjs +5 -5
- package/dist/modules/scheduler/index.cjs.map +1 -1
- package/dist/modules/scheduler/index.js +5 -5
- package/dist/modules/scheduler/index.js.map +1 -1
- package/dist/modules/vibecontrols/index.cjs +848 -0
- package/dist/modules/vibecontrols/index.cjs.map +1 -1
- package/dist/modules/vibecontrols/index.js +634 -1
- package/dist/modules/vibecontrols/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/modules/integrations/operations.ts","../../../src/modules/integrations/tools.ts","../../../src/modules/integrations/index.ts"],"names":[],"mappings":";;;;AAAO,IAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAStB,IAAM,YAAA,GAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQrB,IAAM,eAAA,GAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASxB,IAAM,cAAA,GAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQvB,IAAM,iBAAA,GAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQ1B,IAAM,iBAAA,GAAoB;AAAA;AAAA;AAAA;AAAA,CAAA;AAM1B,IAAM,oBAAA,GAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,yBAAA,CAA0B,MAAA,EAAQ,KAAK,KAAK,CAAA;AAE5C,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,oBAAA,GAAQ","file":"index.js","sourcesContent":["export const GET_PROVIDERS = `\n query GetProviders($filter: ProviderFilterInput, $pagination: IntegrationsPaginationInput) {\n getProviders(filter: $filter, pagination: $pagination) {\n items { id key name category authType isEnabled }\n total hasMore\n }\n }\n`;\n\nexport const GET_PROVIDER = `\n query GetProvider($id: ID!) {\n getProvider(id: $id) {\n id key name authType category connectionCount\n }\n }\n`;\n\nexport const GET_CONNECTIONS = `\n query GetConnections($filter: ConnectionFilterInput, $pagination: IntegrationsPaginationInput) {\n getConnections(filter: $filter, pagination: $pagination) {\n items { id name providerId status grantedScopes }\n total hasMore\n }\n }\n`;\n\nexport const GET_CONNECTION = `\n query GetConnection($id: ID!) {\n getConnection(id: $id) {\n id name providerId status externalAccountEmail credentialSource\n }\n }\n`;\n\nexport const CREATE_CONNECTION = `\n mutation CreateConnection($input: CreateConnectionInput!) {\n createConnection(input: $input) {\n id name status providerId\n }\n }\n`;\n\nexport const DELETE_CONNECTION = `\n mutation DeleteConnection($id: ID!, $deleteVaultSecret: Boolean) {\n deleteConnection(id: $id, deleteVaultSecret: $deleteVaultSecret)\n }\n`;\n\nexport const GET_INTEGRATION_LOGS = `\n query GetIntegrationLogs($filter: LogFilterInput, $pagination: IntegrationsPaginationInput) {\n getIntegrationLogs(filter: $filter, pagination: $pagination) {\n items { id action level message createdAt }\n total hasMore\n }\n }\n`;\n\nexport const UPDATE_CONNECTION = `\n mutation UpdateConnection($id: ID!, $input: UpdateConnectionInput!) {\n updateConnection(id: $id, input: $input) { id name status }\n }\n`;\n\nexport const REVOKE_CONNECTION = `\n mutation RevokeConnection($connectionId: ID!) {\n revokeConnection(connectionId: $connectionId) { id name status }\n }\n`;\n\nexport const TEST_CONNECTION = `\n mutation TestConnection($connectionId: ID!) {\n testConnection(connectionId: $connectionId) { success message latencyMs }\n }\n`;\n\nexport const LINK_INTEGRATION_TO_CHANNEL = `\n mutation LinkIntegrationToChannel($channelId: String!, $connectionId: ID!, $organizationId: String!) {\n linkIntegrationToChannel(channelId: $channelId, connectionId: $connectionId, organizationId: $organizationId) {\n id name status channelId organizationId\n }\n }\n`;\n\nexport const REFRESH_CONNECTION_TOKEN = `\n mutation RefreshConnectionToken($connectionId: ID!) {\n refreshConnectionToken(connectionId: $connectionId) { id status }\n }\n`;\n\nexport const AUTHENTICATE_API_KEY = `\n mutation AuthenticateWithApiKey($input: ApiKeyAuthInput!) {\n authenticateWithApiKey(input: $input) { id name status }\n }\n`;\n\nexport const AUTHENTICATE_BASIC = `\n mutation AuthenticateWithBasicAuth($input: BasicAuthInput!) {\n authenticateWithBasicAuth(input: $input) { id name status }\n }\n`;\n\nexport const AUTHENTICATE_BEARER = `\n mutation AuthenticateWithBearerToken($input: BearerTokenAuthInput!) {\n authenticateWithBearerToken(input: $input) { id name status }\n }\n`;\n\nexport const INITIATE_OAUTH = `\n mutation InitiateOAuth($input: InitiateOAuthInput!) {\n initiateOAuth(input: $input) { redirectUrl state }\n }\n`;\n\nexport const COMPLETE_OAUTH = `\n mutation CompleteOAuth($input: CompleteOAuthInput!) {\n completeOAuth(input: $input) { id name status }\n }\n`;\n\nexport const GET_PROVIDER_BY_KEY = `\n query GetProviderByKey($key: String!) {\n getProviderByKey(key: $key) { id key name authType category connectionCount isEnabled }\n }\n`;\n\nexport const GET_PROVIDER_CATALOG = `\n query GetProviderCatalog($pagination: IntegrationsPaginationInput) {\n getProviderCatalog(pagination: $pagination) {\n items { id key name category authType isEnabled }\n total hasMore\n }\n }\n`;\n\nexport const GET_CONNECTIONS_BY_PROVIDER = `\n query GetConnectionsByProvider($providerId: ID!, $pagination: IntegrationsPaginationInput) {\n getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {\n items { id name providerId status grantedScopes }\n total hasMore\n }\n }\n`;\n\nexport const ENABLE_PROVIDER = `\n mutation EnableProvider($id: ID!) {\n enableProvider(id: $id) { id key name isEnabled }\n }\n`;\n\nexport const DISABLE_PROVIDER = `\n mutation DisableProvider($id: ID!) {\n disableProvider(id: $id) { id key name isEnabled }\n }\n`;\n\nexport const TAG_CONNECTION = `\n mutation TagConnection($input: TagConnectionInput!) {\n tagConnection(input: $input) { id entityId tagId source }\n }\n`;\n\nexport const UNTAG_CONNECTION = `\n mutation UntagConnection($input: UntagConnectionInput!) {\n untagConnection(input: $input)\n }\n`;\n\nexport const REPLACE_CONNECTION_TAGS = `\n mutation ReplaceConnectionTags($input: ReplaceConnectionTagsInput!) {\n replaceConnectionTags(input: $input) { id entityId tagId source }\n }\n`;\n\nexport const GET_CONNECTION_TAGS = `\n query GetConnectionTags($input: GetConnectionTagsInput!) {\n getConnectionTags(input: $input) { id entityId tagId source assignedAt }\n }\n`;\n","/**\n * Integrations MCP tools — providers, connections, logs.\n * Surface mirrors cli-sdk/src/modules/integrations/commands.ts.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport * as ops from './operations.js';\n\ninterface ProviderRow {\n id: string;\n key: string;\n name: string;\n category?: string;\n authType?: string;\n isEnabled?: boolean;\n}\n\ninterface ConnectionRow {\n id: string;\n name: string;\n providerId: string;\n status?: string;\n grantedScopes?: string[];\n}\n\ninterface IntegrationLog {\n id: string;\n action: string;\n level: string;\n message: string;\n createdAt: string;\n}\n\nexport function registerIntegrationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Providers ───────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_list')),\n {\n title: 'List Integration Providers',\n description: 'List integration providers with optional category/enabled filters.',\n inputSchema: {\n category: z.string().optional().describe('Filter by category (will be uppercased)'),\n enabled: z.boolean().optional().describe('Filter by enabled flag'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ category, enabled, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (category !== undefined) filter.category = category.toUpperCase();\n if (enabled !== undefined) filter.isEnabled = enabled;\n const data = await ctx.gql.workspace.request<{\n getProviders: { items: ProviderRow[]; total: number; hasMore: boolean };\n }>(ops.GET_PROVIDERS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getProviders);\n } catch (error) {\n ctx.logger.error('integrations_providers_list failed', { error: String(error) });\n return errorResult(\n `Failed to list providers: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_get')),\n {\n title: 'Get Integration Provider',\n description: 'Get an integration provider by ID.',\n inputSchema: { id: z.string().describe('Provider ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getProvider: ProviderRow | null }>(\n ops.GET_PROVIDER,\n { id },\n );\n if (!data.getProvider) return errorResult(`Provider ${id} not found`);\n return jsonResult(data.getProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_get failed', { error: String(error) });\n return errorResult(\n `Failed to get provider: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connections ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_list')),\n {\n title: 'List Connections',\n description: 'List provider connections (OAuth + credential).',\n inputSchema: {\n provider: z.string().optional().describe('Filter by provider ID'),\n status: z.string().optional().describe('Filter by status (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ provider, status, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (provider !== undefined) filter.providerId = provider;\n if (status !== undefined) filter.status = status.toUpperCase();\n const data = await ctx.gql.workspace.request<{\n getConnections: { items: ConnectionRow[]; total: number; hasMore: boolean };\n }>(ops.GET_CONNECTIONS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getConnections);\n } catch (error) {\n ctx.logger.error('integrations_connections_list failed', { error: String(error) });\n return errorResult(\n `Failed to list connections: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_get')),\n {\n title: 'Get Connection',\n description: 'Get a connection by ID.',\n inputSchema: { id: z.string().describe('Connection ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getConnection: ConnectionRow | null }>(\n ops.GET_CONNECTION,\n { id },\n );\n if (!data.getConnection) return errorResult(`Connection ${id} not found`);\n return jsonResult(data.getConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_get failed', { error: String(error) });\n return errorResult(\n `Failed to get connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_add')),\n {\n title: 'Create Connection',\n description: 'Create a connection (provider id required; credentials stored in vault).',\n inputSchema: {\n name: z.string().describe('Connection name'),\n provider: z.string().describe('Provider ID'),\n scopes: z.array(z.string()).optional().describe('Granted scopes'),\n },\n },\n async ({ name, provider, scopes }) => {\n try {\n const input: Record<string, unknown> = { name, providerId: provider };\n if (scopes !== undefined) input.grantedScopes = scopes;\n const data = await ctx.gql.workspace.request<{ createConnection: ConnectionRow }>(\n ops.CREATE_CONNECTION,\n { input },\n );\n return jsonResult(data.createConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_add failed', { error: String(error) });\n return errorResult(\n `Failed to create connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_delete')),\n {\n title: 'Delete Connection',\n description: 'Delete a connection. Use keepSecret=true to retain the vault secret.',\n inputSchema: {\n id: z.string().describe('Connection ID'),\n keepSecret: z.boolean().optional().describe('Keep vault secret (default false)'),\n },\n },\n async ({ id, keepSecret }) => {\n try {\n const data = await ctx.gql.workspace.request<{ deleteConnection: boolean }>(\n ops.DELETE_CONNECTION,\n { id, deleteVaultSecret: !keepSecret },\n );\n return jsonResult({ deleted: data.deleteConnection, connectionId: id });\n } catch (error) {\n ctx.logger.error('integrations_connections_delete failed', { error: String(error) });\n return errorResult(\n `Failed to delete connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connections (extras) ────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_update')),\n {\n title: 'Update Connection',\n description: 'Update a connection (name, description, config JSON object).',\n inputSchema: {\n id: z.string().describe('Connection ID'),\n name: z.string().optional(),\n description: z.string().optional(),\n config: z.record(z.string(), z.unknown()).optional(),\n },\n },\n async ({ id, name, description, config }) => {\n try {\n const input: Record<string, unknown> = {};\n if (name !== undefined) input.name = name;\n if (description !== undefined) input.description = description;\n if (config !== undefined) input.config = config;\n if (Object.keys(input).length === 0) {\n return errorResult('Provide at least one of name, description, config');\n }\n const data = await ctx.gql.workspace.request<{ updateConnection: ConnectionRow }>(\n ops.UPDATE_CONNECTION,\n { id, input },\n );\n return jsonResult(data.updateConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_update failed', { error: String(error) });\n return errorResult(\n `Failed to update connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_revoke')),\n {\n title: 'Revoke Connection',\n description: 'Revoke a connection — invalidates tokens and marks as REVOKED.',\n inputSchema: { connectionId: z.string().describe('Connection ID') },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ revokeConnection: ConnectionRow }>(\n ops.REVOKE_CONNECTION,\n { connectionId },\n );\n return jsonResult(data.revokeConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_revoke failed', { error: String(error) });\n return errorResult(\n `Failed to revoke connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_test')),\n {\n title: 'Test Connection',\n description: 'Health/auth probe for a connection; returns success/message/latencyMs.',\n inputSchema: { connectionId: z.string().describe('Connection ID') },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n testConnection: { success: boolean; message: string; latencyMs?: number };\n }>(ops.TEST_CONNECTION, { connectionId });\n return jsonResult(data.testConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_test failed', { error: String(error) });\n return errorResult(\n `Failed to test connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_link_channel')),\n {\n title: 'Link Connection to Channel',\n description: 'Link an integration connection to a channel for DM/notification routing.',\n inputSchema: {\n channelId: z.string(),\n connectionId: z.string(),\n organizationId: z.string(),\n },\n },\n async ({ channelId, connectionId, organizationId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n linkIntegrationToChannel: ConnectionRow;\n }>(ops.LINK_INTEGRATION_TO_CHANNEL, { channelId, connectionId, organizationId });\n return jsonResult(data.linkIntegrationToChannel);\n } catch (error) {\n ctx.logger.error('integrations_connections_link_channel failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to link connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_refresh_token')),\n {\n title: 'Refresh Connection Token',\n description: 'Force a token refresh for an OAuth connection.',\n inputSchema: { connectionId: z.string() },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n refreshConnectionToken: ConnectionRow;\n }>(ops.REFRESH_CONNECTION_TOKEN, { connectionId });\n return jsonResult(data.refreshConnectionToken);\n } catch (error) {\n ctx.logger.error('integrations_connections_refresh_token failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to refresh token: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Auth flows ──────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_api_key')),\n {\n title: 'Authenticate Connection (API Key)',\n description: 'Attach an API key to an existing connection.',\n inputSchema: { connectionId: z.string(), apiKey: z.string() },\n },\n async ({ connectionId, apiKey }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithApiKey: ConnectionRow;\n }>(ops.AUTHENTICATE_API_KEY, { input: { connectionId, apiKey } });\n return jsonResult(data.authenticateWithApiKey);\n } catch (error) {\n ctx.logger.error('integrations_auth_api_key failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_basic')),\n {\n title: 'Authenticate Connection (Basic Auth)',\n description: 'Attach Basic Auth credentials to an existing connection.',\n inputSchema: {\n connectionId: z.string(),\n username: z.string(),\n password: z.string(),\n },\n },\n async ({ connectionId, username, password }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithBasicAuth: ConnectionRow;\n }>(ops.AUTHENTICATE_BASIC, { input: { connectionId, username, password } });\n return jsonResult(data.authenticateWithBasicAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_basic failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_bearer')),\n {\n title: 'Authenticate Connection (Bearer Token)',\n description: 'Attach a Bearer token to an existing connection.',\n inputSchema: { connectionId: z.string(), token: z.string() },\n },\n async ({ connectionId, token }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithBearerToken: ConnectionRow;\n }>(ops.AUTHENTICATE_BEARER, { input: { connectionId, token } });\n return jsonResult(data.authenticateWithBearerToken);\n } catch (error) {\n ctx.logger.error('integrations_auth_bearer failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_oauth_start')),\n {\n title: 'Initiate OAuth Flow',\n description: 'Start an OAuth flow; returns redirectUrl + state for the client to use.',\n inputSchema: {\n connectionId: z.string(),\n redirectUri: z.string(),\n scopes: z.array(z.string()).optional(),\n },\n },\n async ({ connectionId, redirectUri, scopes }) => {\n try {\n const input: Record<string, unknown> = { connectionId, redirectUri };\n if (scopes !== undefined) input.scopes = scopes;\n const data = await ctx.gql.workspace.request<{\n initiateOAuth: { redirectUrl: string; state: string };\n }>(ops.INITIATE_OAUTH, { input });\n return jsonResult(data.initiateOAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_oauth_start failed', { error: String(error) });\n return errorResult(\n `Failed to initiate OAuth: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_oauth_complete')),\n {\n title: 'Complete OAuth Flow',\n description: 'Complete an OAuth flow with code+state returned by the IdP.',\n inputSchema: {\n connectionId: z.string(),\n code: z.string(),\n redirectUri: z.string(),\n state: z.string(),\n },\n },\n async ({ connectionId, code, redirectUri, state }) => {\n try {\n const data = await ctx.gql.workspace.request<{ completeOAuth: ConnectionRow }>(\n ops.COMPLETE_OAUTH,\n { input: { connectionId, code, redirectUri, state } },\n );\n return jsonResult(data.completeOAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_oauth_complete failed', { error: String(error) });\n return errorResult(\n `Failed to complete OAuth: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Providers (extras) ──────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_get_by_key')),\n {\n title: 'Get Provider By Key',\n description: 'Look up an integration provider by its string key (e.g. github, slack).',\n inputSchema: { key: z.string() },\n },\n async ({ key }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getProviderByKey: ProviderRow | null }>(\n ops.GET_PROVIDER_BY_KEY,\n { key },\n );\n if (!data.getProviderByKey) return errorResult(`Provider ${key} not found`);\n return jsonResult(data.getProviderByKey);\n } catch (error) {\n ctx.logger.error('integrations_providers_get_by_key failed', { error: String(error) });\n return errorResult(\n `Failed to get provider: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_catalog')),\n {\n title: 'Provider Catalog',\n description: 'Browseable catalog of integration providers (paginated).',\n inputSchema: { limit: z.number().optional() },\n },\n async ({ limit }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n getProviderCatalog: { items: ProviderRow[]; total: number; hasMore: boolean };\n }>(ops.GET_PROVIDER_CATALOG, { pagination: { limit: limit ?? 100, offset: 0 } });\n return jsonResult(data.getProviderCatalog);\n } catch (error) {\n ctx.logger.error('integrations_providers_catalog failed', { error: String(error) });\n return errorResult(\n `Failed to get catalog: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_connections')),\n {\n title: 'Connections By Provider',\n description: 'List all connections that belong to a given provider.',\n inputSchema: { providerId: z.string(), limit: z.number().optional() },\n },\n async ({ providerId, limit }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n getConnectionsByProvider: { items: ConnectionRow[]; total: number; hasMore: boolean };\n }>(ops.GET_CONNECTIONS_BY_PROVIDER, {\n providerId,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getConnectionsByProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_connections failed', { error: String(error) });\n return errorResult(\n `Failed to list: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_enable')),\n {\n title: 'Enable Provider',\n description: 'Enable an integration provider in this workspace.',\n inputSchema: { id: z.string() },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ enableProvider: ProviderRow }>(\n ops.ENABLE_PROVIDER,\n { id },\n );\n return jsonResult(data.enableProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_enable failed', { error: String(error) });\n return errorResult(\n `Failed to enable: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_disable')),\n {\n title: 'Disable Provider',\n description: 'Disable an integration provider in this workspace.',\n inputSchema: { id: z.string() },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ disableProvider: ProviderRow }>(\n ops.DISABLE_PROVIDER,\n { id },\n );\n return jsonResult(data.disableProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_disable failed', { error: String(error) });\n return errorResult(\n `Failed to disable: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connection tags ─────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_tag_add')),\n {\n title: 'Tag Connection',\n description: 'Add a tag assignment to a connection.',\n inputSchema: {\n entityId: z.string(),\n tagId: z.string(),\n source: z.string().optional(),\n },\n },\n async ({ entityId, tagId, source }) => {\n try {\n const input: Record<string, unknown> = { entityId, tagId };\n if (source !== undefined) input.source = source;\n const data = await ctx.gql.workspace.request<{ tagConnection: unknown }>(\n ops.TAG_CONNECTION,\n { input },\n );\n return jsonResult(data.tagConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_add failed', { error: String(error) });\n return errorResult(\n `Failed to tag: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_tag_remove')),\n {\n title: 'Untag Connection',\n description: 'Remove a tag assignment from a connection.',\n inputSchema: { entityId: z.string(), tagId: z.string() },\n },\n async ({ entityId, tagId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ untagConnection: boolean }>(\n ops.UNTAG_CONNECTION,\n { input: { entityId, tagId } },\n );\n return jsonResult({ removed: data.untagConnection });\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_remove failed', { error: String(error) });\n return errorResult(\n `Failed to untag: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_tag_replace')),\n {\n title: 'Replace Connection Tags',\n description: 'Replace all tag assignments on a connection.',\n inputSchema: { entityId: z.string(), tagIds: z.array(z.string()) },\n },\n async ({ entityId, tagIds }) => {\n try {\n const data = await ctx.gql.workspace.request<{ replaceConnectionTags: unknown }>(\n ops.REPLACE_CONNECTION_TAGS,\n { input: { entityId, tagIds } },\n );\n return jsonResult(data.replaceConnectionTags);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_replace failed', { error: String(error) });\n return errorResult(\n `Failed to replace tags: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_tag_list')),\n {\n title: 'List Connection Tags',\n description: 'List tag assignments on a connection.',\n inputSchema: { entityId: z.string() },\n },\n async ({ entityId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getConnectionTags: unknown }>(\n ops.GET_CONNECTION_TAGS,\n { input: { entityId } },\n );\n return jsonResult(data.getConnectionTags);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_list failed', { error: String(error) });\n return errorResult(\n `Failed to list tags: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Logs ────────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_logs')),\n {\n title: 'Integration Audit Logs',\n description: 'List integration audit logs with optional filters.',\n inputSchema: {\n connection: z.string().optional().describe('Filter by connection ID'),\n level: z.string().optional().describe('INFO|WARN|ERROR (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ connection, level, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (connection !== undefined) filter.connectionId = connection;\n if (level !== undefined) filter.level = level.toUpperCase();\n const data = await ctx.gql.workspace.request<{\n getIntegrationLogs: { items: IntegrationLog[]; total: number; hasMore: boolean };\n }>(ops.GET_INTEGRATION_LOGS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getIntegrationLogs);\n } catch (error) {\n ctx.logger.error('integrations_logs failed', { error: String(error) });\n return errorResult(\n `Failed to get integration logs: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Integrations module — providers, connections, audit logs.\n * Surface mirrors cli-sdk/src/modules/integrations/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerIntegrationsTools } from './tools.js';\n\nconst integrationsModule: McpModule = {\n id: 'integrations',\n version: '0.0.1',\n displayName: 'Integrations',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerIntegrationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default integrationsModule;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/modules/integrations/operations.ts","../../../src/modules/integrations/tools.ts","../../../src/modules/integrations/index.ts"],"names":[],"mappings":";;;;AAAO,IAAM,aAAA,GAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAStB,IAAM,YAAA,GAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AAQrB,IAAM,eAAA,GAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAAA;AASxB,IAAM,cAAA,GAAiB;AAAA;AAAA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,QAAmB,GAAA,EAAqC;AAC/D,IAAA,MAAM,QAAkB,EAAC;AACzB,IAAA,MAAM,KAAA,GAAQ,CAAC,CAAA,KAAsB;AACnC,MAAA,KAAA,CAAM,KAAK,CAAC,CAAA;AACZ,MAAA,OAAO,CAAA;AAAA,IACT,CAAA;AAEA,IAAA,yBAAA,CAA0B,MAAA,EAAQ,KAAK,KAAK,CAAA;AAE5C,IAAA,OAAO,EAAE,KAAA,EAAO,SAAA,EAAW,EAAC,EAAG,OAAA,EAAS,EAAC,EAAE;AAAA,EAC7C;AACF,CAAA;AAEA,IAAO,oBAAA,GAAQ","file":"index.js","sourcesContent":["export const GET_PROVIDERS = `\n query GetProviders($filter: ProviderFilterInput, $pagination: IntegrationsPaginationInput) {\n getProviders(filter: $filter, pagination: $pagination) {\n items { id key name category authType isEnabled }\n total hasMore\n }\n }\n`;\n\nexport const GET_PROVIDER = `\n query GetProvider($id: ID!) {\n getProvider(id: $id) {\n id key name authType category connectionCount\n }\n }\n`;\n\nexport const GET_CONNECTIONS = `\n query GetConnections($filter: ConnectionFilterInput, $pagination: IntegrationsPaginationInput) {\n getConnections(filter: $filter, pagination: $pagination) {\n items { id name providerId status grantedScopes }\n total hasMore\n }\n }\n`;\n\nexport const GET_CONNECTION = `\n query GetConnection($id: ID!) {\n getConnection(id: $id) {\n id name providerId status externalAccountEmail credentialSource\n }\n }\n`;\n\nexport const CREATE_CONNECTION = `\n mutation CreateConnection($input: CreateConnectionInput!) {\n createConnection(input: $input) {\n id name status providerId\n }\n }\n`;\n\nexport const DELETE_CONNECTION = `\n mutation DeleteConnection($id: ID!, $deleteVaultSecret: Boolean) {\n deleteConnection(id: $id, deleteVaultSecret: $deleteVaultSecret)\n }\n`;\n\nexport const GET_INTEGRATION_LOGS = `\n query GetIntegrationLogs($filter: LogFilterInput, $pagination: IntegrationsPaginationInput) {\n getIntegrationLogs(filter: $filter, pagination: $pagination) {\n items { id action level message createdAt }\n total hasMore\n }\n }\n`;\n\nexport const GET_CONNECTION_LOGS = `\n query GetConnectionLogs($connectionId: ID!, $pagination: IntegrationsPaginationInput) {\n getConnectionLogs(connectionId: $connectionId, pagination: $pagination) {\n items { id action level message createdAt }\n total hasMore\n }\n }\n`;\n\nexport const UPDATE_CONNECTION = `\n mutation UpdateConnection($id: ID!, $input: UpdateConnectionInput!) {\n updateConnection(id: $id, input: $input) { id name status }\n }\n`;\n\nexport const REVOKE_CONNECTION = `\n mutation RevokeConnection($connectionId: ID!) {\n revokeConnection(connectionId: $connectionId) { id name status }\n }\n`;\n\nexport const TEST_CONNECTION = `\n mutation TestConnection($connectionId: ID!) {\n testConnection(connectionId: $connectionId) { success message latencyMs }\n }\n`;\n\nexport const LINK_INTEGRATION_TO_CHANNEL = `\n mutation LinkIntegrationToChannel($channelId: String!, $connectionId: ID!, $organizationId: String!) {\n linkIntegrationToChannel(channelId: $channelId, connectionId: $connectionId, organizationId: $organizationId) {\n id name status channelId organizationId\n }\n }\n`;\n\nexport const REFRESH_CONNECTION_TOKEN = `\n mutation RefreshConnectionToken($connectionId: ID!) {\n refreshConnectionToken(connectionId: $connectionId) { id status }\n }\n`;\n\nexport const AUTHENTICATE_API_KEY = `\n mutation AuthenticateWithApiKey($input: ApiKeyAuthInput!) {\n authenticateWithApiKey(input: $input) { id name status }\n }\n`;\n\nexport const AUTHENTICATE_BASIC = `\n mutation AuthenticateWithBasicAuth($input: BasicAuthInput!) {\n authenticateWithBasicAuth(input: $input) { id name status }\n }\n`;\n\nexport const AUTHENTICATE_BEARER = `\n mutation AuthenticateWithBearerToken($input: BearerTokenAuthInput!) {\n authenticateWithBearerToken(input: $input) { id name status }\n }\n`;\n\nexport const INITIATE_OAUTH = `\n mutation InitiateOAuth($input: InitiateOAuthInput!) {\n initiateOAuth(input: $input) { redirectUrl state }\n }\n`;\n\nexport const COMPLETE_OAUTH = `\n mutation CompleteOAuth($input: CompleteOAuthInput!) {\n completeOAuth(input: $input) { id name status }\n }\n`;\n\nexport const GET_PROVIDER_BY_KEY = `\n query GetProviderByKey($key: String!) {\n getProviderByKey(key: $key) { id key name authType category connectionCount isEnabled }\n }\n`;\n\nexport const GET_PROVIDER_CATALOG = `\n query GetProviderCatalog($pagination: IntegrationsPaginationInput) {\n getProviderCatalog(pagination: $pagination) {\n items { id key name category authType isEnabled }\n total hasMore\n }\n }\n`;\n\nexport const GET_CONNECTIONS_BY_PROVIDER = `\n query GetConnectionsByProvider($providerId: ID!, $pagination: IntegrationsPaginationInput) {\n getConnectionsByProvider(providerId: $providerId, pagination: $pagination) {\n items { id name providerId status grantedScopes }\n total hasMore\n }\n }\n`;\n\nexport const ENABLE_PROVIDER = `\n mutation EnableProvider($id: ID!) {\n enableProvider(id: $id) { id key name isEnabled }\n }\n`;\n\nexport const DISABLE_PROVIDER = `\n mutation DisableProvider($id: ID!) {\n disableProvider(id: $id) { id key name isEnabled }\n }\n`;\n\nexport const TAG_CONNECTION = `\n mutation TagConnection($input: TagConnectionInput!) {\n tagConnection(input: $input) { id entityId tagId source }\n }\n`;\n\nexport const UNTAG_CONNECTION = `\n mutation UntagConnection($input: UntagConnectionInput!) {\n untagConnection(input: $input)\n }\n`;\n\nexport const REPLACE_CONNECTION_TAGS = `\n mutation ReplaceConnectionTags($input: ReplaceConnectionTagsInput!) {\n replaceConnectionTags(input: $input) { id entityId tagId source }\n }\n`;\n\nexport const GET_CONNECTION_TAGS = `\n query GetConnectionTags($input: GetConnectionTagsInput!) {\n getConnectionTags(input: $input) { id entityId tagId source assignedAt }\n }\n`;\n","/**\n * Integrations MCP tools — providers, connections, logs.\n * Surface mirrors cli-sdk/src/modules/integrations/commands.ts.\n */\n\nimport { z } from 'zod';\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { jsonResult, errorResult, mcpToolName, type McpContext } from '../../core/index.js';\nimport * as ops from './operations.js';\n\ninterface ProviderRow {\n id: string;\n key: string;\n name: string;\n category?: string;\n authType?: string;\n isEnabled?: boolean;\n}\n\ninterface ConnectionRow {\n id: string;\n name: string;\n providerId: string;\n status?: string;\n grantedScopes?: string[];\n}\n\ninterface IntegrationLog {\n id: string;\n action: string;\n level: string;\n message: string;\n createdAt: string;\n}\n\nexport function registerIntegrationsTools(\n server: McpServer,\n ctx: McpContext,\n track: (n: string) => string,\n): void {\n // ── Providers ───────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_list')),\n {\n title: 'List Integration Providers',\n description: 'List integration providers with optional category/enabled filters.',\n inputSchema: {\n category: z.string().optional().describe('Filter by category (will be uppercased)'),\n enabled: z.boolean().optional().describe('Filter by enabled flag'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ category, enabled, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (category !== undefined) filter.category = category.toUpperCase();\n if (enabled !== undefined) filter.isEnabled = enabled;\n const data = await ctx.gql.workspace.request<{\n getProviders: { items: ProviderRow[]; total: number; hasMore: boolean };\n }>(ops.GET_PROVIDERS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getProviders);\n } catch (error) {\n ctx.logger.error('integrations_providers_list failed', { error: String(error) });\n return errorResult(\n `Failed to list providers: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_get')),\n {\n title: 'Get Integration Provider',\n description: 'Get an integration provider by ID.',\n inputSchema: { id: z.string().describe('Provider ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getProvider: ProviderRow | null }>(\n ops.GET_PROVIDER,\n { id },\n );\n if (!data.getProvider) return errorResult(`Provider ${id} not found`);\n return jsonResult(data.getProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_get failed', { error: String(error) });\n return errorResult(\n `Failed to get provider: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connections ─────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_list')),\n {\n title: 'List Connections',\n description: 'List provider connections (OAuth + credential).',\n inputSchema: {\n provider: z.string().optional().describe('Filter by provider ID'),\n status: z.string().optional().describe('Filter by status (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ provider, status, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (provider !== undefined) filter.providerId = provider;\n if (status !== undefined) filter.status = status.toUpperCase();\n const data = await ctx.gql.workspace.request<{\n getConnections: { items: ConnectionRow[]; total: number; hasMore: boolean };\n }>(ops.GET_CONNECTIONS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getConnections);\n } catch (error) {\n ctx.logger.error('integrations_connections_list failed', { error: String(error) });\n return errorResult(\n `Failed to list connections: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_get')),\n {\n title: 'Get Connection',\n description: 'Get a connection by ID.',\n inputSchema: { id: z.string().describe('Connection ID') },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getConnection: ConnectionRow | null }>(\n ops.GET_CONNECTION,\n { id },\n );\n if (!data.getConnection) return errorResult(`Connection ${id} not found`);\n return jsonResult(data.getConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_get failed', { error: String(error) });\n return errorResult(\n `Failed to get connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_add')),\n {\n title: 'Create Connection',\n description: 'Create a connection (provider id required; credentials stored in vault).',\n inputSchema: {\n name: z.string().describe('Connection name'),\n provider: z.string().describe('Provider ID'),\n scopes: z.array(z.string()).optional().describe('Granted scopes'),\n },\n },\n async ({ name, provider, scopes }) => {\n try {\n const input: Record<string, unknown> = { name, providerId: provider };\n if (scopes !== undefined) input.grantedScopes = scopes;\n const data = await ctx.gql.workspace.request<{ createConnection: ConnectionRow }>(\n ops.CREATE_CONNECTION,\n { input },\n );\n return jsonResult(data.createConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_add failed', { error: String(error) });\n return errorResult(\n `Failed to create connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_delete')),\n {\n title: 'Delete Connection',\n description: 'Delete a connection. Use keepSecret=true to retain the vault secret.',\n inputSchema: {\n id: z.string().describe('Connection ID'),\n keepSecret: z.boolean().optional().describe('Keep vault secret (default false)'),\n },\n },\n async ({ id, keepSecret }) => {\n try {\n const data = await ctx.gql.workspace.request<{ deleteConnection: boolean }>(\n ops.DELETE_CONNECTION,\n { id, deleteVaultSecret: !keepSecret },\n );\n return jsonResult({ deleted: data.deleteConnection, connectionId: id });\n } catch (error) {\n ctx.logger.error('integrations_connections_delete failed', { error: String(error) });\n return errorResult(\n `Failed to delete connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connections (extras) ────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_update')),\n {\n title: 'Update Connection',\n description: 'Update a connection (name, description, config JSON object).',\n inputSchema: {\n id: z.string().describe('Connection ID'),\n name: z.string().optional(),\n description: z.string().optional(),\n config: z.record(z.string(), z.unknown()).optional(),\n },\n },\n async ({ id, name, description, config }) => {\n try {\n const input: Record<string, unknown> = {};\n if (name !== undefined) input.name = name;\n if (description !== undefined) input.description = description;\n if (config !== undefined) input.config = config;\n if (Object.keys(input).length === 0) {\n return errorResult('Provide at least one of name, description, config');\n }\n const data = await ctx.gql.workspace.request<{ updateConnection: ConnectionRow }>(\n ops.UPDATE_CONNECTION,\n { id, input },\n );\n return jsonResult(data.updateConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_update failed', { error: String(error) });\n return errorResult(\n `Failed to update connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_revoke')),\n {\n title: 'Revoke Connection',\n description: 'Revoke a connection — invalidates tokens and marks as REVOKED.',\n inputSchema: { connectionId: z.string().describe('Connection ID') },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ revokeConnection: ConnectionRow }>(\n ops.REVOKE_CONNECTION,\n { connectionId },\n );\n return jsonResult(data.revokeConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_revoke failed', { error: String(error) });\n return errorResult(\n `Failed to revoke connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_test')),\n {\n title: 'Test Connection',\n description: 'Health/auth probe for a connection; returns success/message/latencyMs.',\n inputSchema: { connectionId: z.string().describe('Connection ID') },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n testConnection: { success: boolean; message: string; latencyMs?: number };\n }>(ops.TEST_CONNECTION, { connectionId });\n return jsonResult(data.testConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_test failed', { error: String(error) });\n return errorResult(\n `Failed to test connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_link_to_channel')),\n {\n title: 'Link Connection to Channel',\n description: 'Link an integration connection to a channel for DM/notification routing.',\n inputSchema: {\n channelId: z.string(),\n connectionId: z.string(),\n organizationId: z.string(),\n },\n },\n async ({ channelId, connectionId, organizationId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n linkIntegrationToChannel: ConnectionRow;\n }>(ops.LINK_INTEGRATION_TO_CHANNEL, { channelId, connectionId, organizationId });\n return jsonResult(data.linkIntegrationToChannel);\n } catch (error) {\n ctx.logger.error('integrations_connections_link_channel failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to link connection: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_connections_refresh_token')),\n {\n title: 'Refresh Connection Token',\n description: 'Force a token refresh for an OAuth connection.',\n inputSchema: { connectionId: z.string() },\n },\n async ({ connectionId }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n refreshConnectionToken: ConnectionRow;\n }>(ops.REFRESH_CONNECTION_TOKEN, { connectionId });\n return jsonResult(data.refreshConnectionToken);\n } catch (error) {\n ctx.logger.error('integrations_connections_refresh_token failed', {\n error: String(error),\n });\n return errorResult(\n `Failed to refresh token: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Auth flows ──────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_api_key')),\n {\n title: 'Authenticate Connection (API Key)',\n description: 'Attach an API key to an existing connection.',\n inputSchema: { connectionId: z.string(), apiKey: z.string() },\n },\n async ({ connectionId, apiKey }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithApiKey: ConnectionRow;\n }>(ops.AUTHENTICATE_API_KEY, { input: { connectionId, apiKey } });\n return jsonResult(data.authenticateWithApiKey);\n } catch (error) {\n ctx.logger.error('integrations_auth_api_key failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_basic')),\n {\n title: 'Authenticate Connection (Basic Auth)',\n description: 'Attach Basic Auth credentials to an existing connection.',\n inputSchema: {\n connectionId: z.string(),\n username: z.string(),\n password: z.string(),\n },\n },\n async ({ connectionId, username, password }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithBasicAuth: ConnectionRow;\n }>(ops.AUTHENTICATE_BASIC, { input: { connectionId, username, password } });\n return jsonResult(data.authenticateWithBasicAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_basic failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_bearer')),\n {\n title: 'Authenticate Connection (Bearer Token)',\n description: 'Attach a Bearer token to an existing connection.',\n inputSchema: { connectionId: z.string(), token: z.string() },\n },\n async ({ connectionId, token }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n authenticateWithBearerToken: ConnectionRow;\n }>(ops.AUTHENTICATE_BEARER, { input: { connectionId, token } });\n return jsonResult(data.authenticateWithBearerToken);\n } catch (error) {\n ctx.logger.error('integrations_auth_bearer failed', { error: String(error) });\n return errorResult(\n `Failed to authenticate: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_oauth_initiate')),\n {\n title: 'Initiate OAuth Flow',\n description: 'Start an OAuth flow; returns redirectUrl + state for the client to use.',\n inputSchema: {\n connectionId: z.string(),\n redirectUri: z.string(),\n scopes: z.array(z.string()).optional(),\n },\n },\n async ({ connectionId, redirectUri, scopes }) => {\n try {\n const input: Record<string, unknown> = { connectionId, redirectUri };\n if (scopes !== undefined) input.scopes = scopes;\n const data = await ctx.gql.workspace.request<{\n initiateOAuth: { redirectUrl: string; state: string };\n }>(ops.INITIATE_OAUTH, { input });\n return jsonResult(data.initiateOAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_oauth_start failed', { error: String(error) });\n return errorResult(\n `Failed to initiate OAuth: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_auth_oauth_complete')),\n {\n title: 'Complete OAuth Flow',\n description: 'Complete an OAuth flow with code+state returned by the IdP.',\n inputSchema: {\n connectionId: z.string(),\n code: z.string(),\n redirectUri: z.string(),\n state: z.string(),\n },\n },\n async ({ connectionId, code, redirectUri, state }) => {\n try {\n const data = await ctx.gql.workspace.request<{ completeOAuth: ConnectionRow }>(\n ops.COMPLETE_OAUTH,\n { input: { connectionId, code, redirectUri, state } },\n );\n return jsonResult(data.completeOAuth);\n } catch (error) {\n ctx.logger.error('integrations_auth_oauth_complete failed', { error: String(error) });\n return errorResult(\n `Failed to complete OAuth: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Providers (extras) ──────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_get_by_key')),\n {\n title: 'Get Provider By Key',\n description: 'Look up an integration provider by its string key (e.g. github, slack).',\n inputSchema: { key: z.string() },\n },\n async ({ key }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getProviderByKey: ProviderRow | null }>(\n ops.GET_PROVIDER_BY_KEY,\n { key },\n );\n if (!data.getProviderByKey) return errorResult(`Provider ${key} not found`);\n return jsonResult(data.getProviderByKey);\n } catch (error) {\n ctx.logger.error('integrations_providers_get_by_key failed', { error: String(error) });\n return errorResult(\n `Failed to get provider: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_catalog')),\n {\n title: 'Provider Catalog',\n description: 'Browseable catalog of integration providers (paginated).',\n inputSchema: { limit: z.number().optional() },\n },\n async ({ limit }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n getProviderCatalog: { items: ProviderRow[]; total: number; hasMore: boolean };\n }>(ops.GET_PROVIDER_CATALOG, { pagination: { limit: limit ?? 100, offset: 0 } });\n return jsonResult(data.getProviderCatalog);\n } catch (error) {\n ctx.logger.error('integrations_providers_catalog failed', { error: String(error) });\n return errorResult(\n `Failed to get catalog: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_by_provider')),\n {\n title: 'Connections By Provider',\n description: 'List all connections that belong to a given provider.',\n inputSchema: { providerId: z.string(), limit: z.number().optional() },\n },\n async ({ providerId, limit }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n getConnectionsByProvider: { items: ConnectionRow[]; total: number; hasMore: boolean };\n }>(ops.GET_CONNECTIONS_BY_PROVIDER, {\n providerId,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getConnectionsByProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_connections failed', { error: String(error) });\n return errorResult(\n `Failed to list: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_enable')),\n {\n title: 'Enable Provider',\n description: 'Enable an integration provider in this workspace.',\n inputSchema: { id: z.string() },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ enableProvider: ProviderRow }>(\n ops.ENABLE_PROVIDER,\n { id },\n );\n return jsonResult(data.enableProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_enable failed', { error: String(error) });\n return errorResult(\n `Failed to enable: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_providers_disable')),\n {\n title: 'Disable Provider',\n description: 'Disable an integration provider in this workspace.',\n inputSchema: { id: z.string() },\n },\n async ({ id }) => {\n try {\n const data = await ctx.gql.workspace.request<{ disableProvider: ProviderRow }>(\n ops.DISABLE_PROVIDER,\n { id },\n );\n return jsonResult(data.disableProvider);\n } catch (error) {\n ctx.logger.error('integrations_providers_disable failed', { error: String(error) });\n return errorResult(\n `Failed to disable: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Connection tags ─────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_tags_add')),\n {\n title: 'Tag Connection',\n description: 'Add a tag assignment to a connection.',\n inputSchema: {\n entityId: z.string(),\n tagId: z.string(),\n source: z.string().optional(),\n },\n },\n async ({ entityId, tagId, source }) => {\n try {\n const input: Record<string, unknown> = { entityId, tagId };\n if (source !== undefined) input.source = source;\n const data = await ctx.gql.workspace.request<{ tagConnection: unknown }>(\n ops.TAG_CONNECTION,\n { input },\n );\n return jsonResult(data.tagConnection);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_add failed', { error: String(error) });\n return errorResult(\n `Failed to tag: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_tags_remove')),\n {\n title: 'Untag Connection',\n description: 'Remove a tag assignment from a connection.',\n inputSchema: { entityId: z.string(), tagId: z.string() },\n },\n async ({ entityId, tagId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ untagConnection: boolean }>(\n ops.UNTAG_CONNECTION,\n { input: { entityId, tagId } },\n );\n return jsonResult({ removed: data.untagConnection });\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_remove failed', { error: String(error) });\n return errorResult(\n `Failed to untag: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_tags_replace')),\n {\n title: 'Replace Connection Tags',\n description: 'Replace all tag assignments on a connection.',\n inputSchema: { entityId: z.string(), tagIds: z.array(z.string()) },\n },\n async ({ entityId, tagIds }) => {\n try {\n const data = await ctx.gql.workspace.request<{ replaceConnectionTags: unknown }>(\n ops.REPLACE_CONNECTION_TAGS,\n { input: { entityId, tagIds } },\n );\n return jsonResult(data.replaceConnectionTags);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_replace failed', { error: String(error) });\n return errorResult(\n `Failed to replace tags: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_tags_list')),\n {\n title: 'List Connection Tags',\n description: 'List tag assignments on a connection.',\n inputSchema: { entityId: z.string() },\n },\n async ({ entityId }) => {\n try {\n const data = await ctx.gql.workspace.request<{ getConnectionTags: unknown }>(\n ops.GET_CONNECTION_TAGS,\n { input: { entityId } },\n );\n return jsonResult(data.getConnectionTags);\n } catch (error) {\n ctx.logger.error('integrations_connections_tag_list failed', { error: String(error) });\n return errorResult(\n `Failed to list tags: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n // ── Logs ────────────────────────────────────────────────────────────────\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_integration_logs')),\n {\n title: 'Integration Audit Logs',\n description: 'List integration audit logs with optional filters.',\n inputSchema: {\n connection: z.string().optional().describe('Filter by connection ID'),\n level: z.string().optional().describe('INFO|WARN|ERROR (will be uppercased)'),\n limit: z.number().optional().describe('Page size (default 100)'),\n },\n },\n async ({ connection, level, limit }) => {\n try {\n const filter: Record<string, unknown> = {};\n if (connection !== undefined) filter.connectionId = connection;\n if (level !== undefined) filter.level = level.toUpperCase();\n const data = await ctx.gql.workspace.request<{\n getIntegrationLogs: { items: IntegrationLog[]; total: number; hasMore: boolean };\n }>(ops.GET_INTEGRATION_LOGS, {\n filter: Object.keys(filter).length > 0 ? filter : undefined,\n pagination: { limit: limit ?? 100, offset: 0 },\n });\n return jsonResult(data.getIntegrationLogs);\n } catch (error) {\n ctx.logger.error('integrations_integration_logs failed', { error: String(error) });\n return errorResult(\n `Failed to get integration logs: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n\n server.registerTool(\n track(mcpToolName(ctx.productName, 'integrations_logs')),\n {\n title: 'Connection Audit Logs',\n description: 'List audit logs for a specific integration connection.',\n inputSchema: {\n connection: z.string().describe('Connection ID (required)'),\n limit: z.number().optional().describe('Page size (default 100)'),\n offset: z.number().optional().describe('Offset (default 0)'),\n },\n },\n async ({ connection, limit, offset }) => {\n try {\n const data = await ctx.gql.workspace.request<{\n getConnectionLogs: { items: IntegrationLog[]; total: number; hasMore: boolean };\n }>(ops.GET_CONNECTION_LOGS, {\n connectionId: connection,\n pagination: { limit: limit ?? 100, offset: offset ?? 0 },\n });\n return jsonResult(data.getConnectionLogs);\n } catch (error) {\n ctx.logger.error('integrations_logs failed', { error: String(error) });\n return errorResult(\n `Failed to get connection logs: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n },\n );\n}\n","/**\n * Integrations module — providers, connections, audit logs.\n * Surface mirrors cli-sdk/src/modules/integrations/.\n */\n\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext, McpModule, ModuleRegistration } from '../../core/index.js';\nimport { registerIntegrationsTools } from './tools.js';\n\nconst integrationsModule: McpModule = {\n id: 'integrations',\n version: '0.0.1',\n displayName: 'Integrations',\n dependsOn: ['auth'],\n capabilities: { tools: {} },\n\n register(server: McpServer, ctx: McpContext): ModuleRegistration {\n const tools: string[] = [];\n const track = (n: string): string => {\n tools.push(n);\n return n;\n };\n\n registerIntegrationsTools(server, ctx, track);\n\n return { tools, resources: [], prompts: [] };\n },\n};\n\nexport default integrationsModule;\n"]}
|
|
@@ -873,7 +873,7 @@ function registerSchedulerTools(server, ctx, track) {
|
|
|
873
873
|
}
|
|
874
874
|
);
|
|
875
875
|
server.registerTool(
|
|
876
|
-
track(mcpToolName(ctx.productName, "
|
|
876
|
+
track(mcpToolName(ctx.productName, "scheduler_templates_create_from_template")),
|
|
877
877
|
{
|
|
878
878
|
title: "Create Schedule From Template",
|
|
879
879
|
description: "Instantiate a schedule from a template; optional overrides.",
|
|
@@ -944,7 +944,7 @@ function registerSchedulerTools(server, ctx, track) {
|
|
|
944
944
|
}
|
|
945
945
|
);
|
|
946
946
|
server.registerTool(
|
|
947
|
-
track(mcpToolName(ctx.productName, "
|
|
947
|
+
track(mcpToolName(ctx.productName, "scheduler_tags_add")),
|
|
948
948
|
{
|
|
949
949
|
title: "Tag Scheduled Job",
|
|
950
950
|
description: "Add a tag assignment to a scheduled job.",
|
|
@@ -972,7 +972,7 @@ function registerSchedulerTools(server, ctx, track) {
|
|
|
972
972
|
}
|
|
973
973
|
);
|
|
974
974
|
server.registerTool(
|
|
975
|
-
track(mcpToolName(ctx.productName, "
|
|
975
|
+
track(mcpToolName(ctx.productName, "scheduler_tags_remove")),
|
|
976
976
|
{
|
|
977
977
|
title: "Untag Scheduled Job",
|
|
978
978
|
description: "Remove a tag assignment from a scheduled job.",
|
|
@@ -994,7 +994,7 @@ function registerSchedulerTools(server, ctx, track) {
|
|
|
994
994
|
}
|
|
995
995
|
);
|
|
996
996
|
server.registerTool(
|
|
997
|
-
track(mcpToolName(ctx.productName, "
|
|
997
|
+
track(mcpToolName(ctx.productName, "scheduler_tags_replace")),
|
|
998
998
|
{
|
|
999
999
|
title: "Replace Scheduled Job Tags",
|
|
1000
1000
|
description: "Replace all tag assignments on a scheduled job.",
|
|
@@ -1016,7 +1016,7 @@ function registerSchedulerTools(server, ctx, track) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
);
|
|
1018
1018
|
server.registerTool(
|
|
1019
|
-
track(mcpToolName(ctx.productName, "
|
|
1019
|
+
track(mcpToolName(ctx.productName, "scheduler_tags_list")),
|
|
1020
1020
|
{
|
|
1021
1021
|
title: "List Scheduled Job Tags",
|
|
1022
1022
|
description: "List tag assignments on a scheduled job.",
|