UNPKG

@mastercard/developers-agent-toolkit

Version:

Agent Toolkit for Mastercard Developers Platform

1 lines 33.3 kB
{"version":3,"sources":["../src/modelcontextprotocol/index.ts","../src/shared/tools/documentation/getDocumentation.ts","../src/shared/api/index.ts","../src/shared/tools/documentation/getDocumentationSection.ts","../src/shared/tools/documentation/getDocumentationPage.ts","../src/shared/tools/documentation/getOAuth10aGuide.ts","../src/shared/tools/documentation/getOpenBankingGuide.ts","../src/shared/tools/services/getServicesList.ts","../src/shared/tools/operations/getApiOperationList.ts","../src/shared/tools/operations/getApiOperationDetails.ts","../src/shared/tools/index.ts","../package.json"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { tools } from '@/shared/tools';\nimport { ToolContext } from '@/shared/types';\nimport { version } from '../../package.json';\n\nexport interface MastercardDevelopersAgentToolkitConfig {\n service?: string;\n apiSpecification?: string;\n}\n\nexport class MastercardDevelopersAgentToolkit extends McpServer {\n constructor(config: MastercardDevelopersAgentToolkitConfig = {}) {\n super({\n name: 'mastercard-developers-mcp',\n version: version,\n capabilities: {\n tools: {},\n },\n });\n\n this.registerAllTools(config);\n }\n\n private registerAllTools(config: MastercardDevelopersAgentToolkitConfig) {\n const context = buildContext(config);\n\n const availableTools = tools(context);\n const enabledTools = availableTools.filter((tool) => {\n // If serviceId is provided, disable the services list tool\n if (context.serviceId && tool.method === 'get-services-list') {\n return false;\n }\n\n return true;\n });\n\n enabledTools.forEach((tool) => {\n this.tool(\n tool.method,\n tool.description,\n tool.parameters.shape,\n async (params: any) => {\n try {\n const result = await tool.execute(params);\n return { content: [{ type: 'text' as const, text: result }] };\n } catch (error) {\n const message =\n error instanceof Error ? error.message : String(error);\n return {\n content: [\n { type: 'text' as const, text: message, isError: true },\n ],\n };\n }\n }\n );\n });\n }\n}\n\nexport function buildContext(\n config: MastercardDevelopersAgentToolkitConfig\n): ToolContext {\n const context: ToolContext = {};\n if (config.service != null) {\n const serviceId = parseServiceIdFromUrl(config.service);\n if (serviceId == null) {\n throw new Error(\n 'Invalid service URL provided. It should be in the format: https://developer.mastercard.com/<service-id>/documentation/**'\n );\n }\n\n context.serviceId = serviceId;\n } else if (config.apiSpecification != null) {\n const parsed = parseAPISpecificationPathAndServiceId(\n config.apiSpecification\n );\n if (parsed?.serviceId == null || parsed?.apiSpecificationPath == null) {\n throw new Error(\n 'Invalid API specification path provided. It should be in the format: https://static.developer.mastercard.com/content/<service-id>/swagger/<nested-file-path>.yaml'\n );\n }\n\n context.serviceId = parsed.serviceId;\n context.apiSpecificationPath = parsed.apiSpecificationPath;\n }\n\n return context;\n}\n\nfunction validateServiceId(serviceId: string): boolean {\n return /^[a-z]+(?:-[a-z0-9]+)*$/i.test(serviceId);\n}\n\nfunction parseServiceIdFromUrl(input: string): string | null {\n try {\n // Extract from https://developer.mastercard.com/<service-id>/documentation/**\n const url = new URL(input);\n\n if (url.hostname !== 'developer.mastercard.com') {\n return null;\n }\n\n const pathParts = url.pathname.split('/').filter((part) => part.length > 0);\n // Path should be: /<service-id>/documentation/...\n if (pathParts.length >= 2 && pathParts[1] === 'documentation') {\n const serviceId = pathParts[0];\n if (serviceId && validateServiceId(serviceId)) {\n return serviceId.toLowerCase();\n }\n }\n\n return null;\n } catch {\n // Not a valid URL, return null\n return null;\n }\n}\n\nfunction parseAPISpecificationPathAndServiceId(\n input: string\n): { serviceId: string; apiSpecificationPath: string } | null {\n try {\n // Try to parse as URL first\n const url = new URL(input);\n\n // Handle full URL: https://static.developer.mastercard.com/content/open-banking-us/swagger/openbanking-us.yaml\n if (url.hostname !== 'static.developer.mastercard.com') {\n return null;\n }\n const pathParts = url.pathname.split('/').filter((part) => part.length > 0);\n // Path should be: content/<service-id>/swagger/<nested-file-path>.yaml\n if (\n pathParts.length >= 4 &&\n pathParts[0] === 'content' &&\n pathParts[2] === 'swagger'\n ) {\n const serviceId = pathParts[1];\n const file = pathParts.slice(3).join('/');\n\n if (\n serviceId &&\n file &&\n validateServiceId(serviceId) &&\n file.endsWith('.yaml')\n ) {\n return {\n serviceId: serviceId.toLowerCase(),\n apiSpecificationPath: `/${serviceId.toLowerCase()}/swagger/${file}`,\n };\n }\n }\n\n return null;\n } catch {\n return null;\n }\n}\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (context: ToolContext): string => {\n const baseDescription = `Provides an overview of all available documentation for a specific Mastercard service\nincluding section titles, descriptions, and navigation links.`;\n\n if (context.serviceId) {\n return `${baseDescription}\n\nUses the configured service: ${context.serviceId}`;\n }\n\n return `${baseDescription}\n\nIt takes one argument:\n- serviceId (str): The unique identifier of the Mastercard service (e.g., 'send', 'loyalty', 'locations')`;\n};\n\nexport const getParameters = (context: ToolContext): z.ZodObject<any> => {\n if (context.serviceId) {\n return z.object({});\n }\n\n return z.object({\n serviceId: z\n .string()\n .min(1)\n .describe(\n \"The unique identifier of the Mastercard service (e.g., 'send', 'loyalty', 'locations')\"\n ),\n });\n};\n\nexport const execute = async (\n context: ToolContext,\n params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n const serviceId = context.serviceId || params.serviceId;\n return await api.getDocumentation(serviceId);\n};\n\nexport const getDocumentation = (context: ToolContext): Tool => ({\n method: 'get-documentation',\n name: 'Get Documentation',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport fetch from 'node-fetch';\n\nconst PathSchema = z\n .string()\n .min(1, 'Path must be a non-empty string')\n .startsWith('/', 'Path must start with /');\n\n/**\n * API client for Mastercard Developers Platform\n */\nexport class MastercardAPIClient {\n private readonly baseUrl = new URL('https://developer.mastercard.com/');\n\n /**\n * Makes HTTP request to the specified endpoint\n */\n private async request(\n endpoint: string,\n params?: Record<string, string>\n ): Promise<string> {\n const url = new URL(endpoint, this.baseUrl);\n\n // Ensure the constructed URL is still within the expected domain\n if (url.hostname !== this.baseUrl.hostname) {\n throw new Error('Invalid endpoint: URL hostname mismatch');\n }\n\n if (params) {\n const searchParams = new URLSearchParams(params);\n url.search = searchParams.toString();\n }\n\n const response = await fetch(url, {\n method: 'GET',\n headers: {\n 'User-Agent': 'mastercard-developers-mcp',\n },\n });\n\n if (!response.ok) {\n // Don't expose detailed error information\n throw new Error(\n `Request failed with status ${response.status} - ${url.toString()}`\n );\n }\n\n return response.text();\n }\n\n /**\n * Retrieve a list of all available Mastercard services\n */\n async listServices(): Promise<string> {\n return this.request('/llms.txt', { absolute_urls: 'false' });\n }\n\n /**\n * Get documentation overview for a specific service\n */\n async getDocumentation(serviceId: string): Promise<string> {\n return this.request(`/${serviceId}/documentation/llms.txt`, {\n absolute_urls: 'false',\n });\n }\n\n /**\n * Get content for a specific documentation section\n */\n async getDocumentationSection(\n serviceId: string,\n sectionId: string\n ): Promise<string> {\n return this.request(`/${serviceId}/documentation/llms-full.txt`, {\n absolute_urls: 'false',\n section_id: sectionId,\n });\n }\n\n /**\n * Get a specific documentation page\n */\n async getDocumentationPage(pagePath: string): Promise<string> {\n const validatedPath = PathSchema.parse(pagePath);\n return this.request(validatedPath);\n }\n\n /**\n * Get API operations for a specific API specification\n */\n async getApiOperations(apiSpecificationPath: string): Promise<string> {\n const validatedPath = PathSchema.parse(apiSpecificationPath);\n return this.request(validatedPath, { summary: 'true' });\n }\n\n /**\n * Get detailed information for a specific API operation\n */\n async getApiOperationDetails(\n apiSpecificationPath: string,\n method: string,\n path: string\n ): Promise<string> {\n const validatedApiPath = PathSchema.parse(apiSpecificationPath);\n return this.request(validatedApiPath, { method: method, path: path });\n }\n}\n\nconst api = new MastercardAPIClient();\nexport default api;\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (context: ToolContext): string => {\n const baseDescription = `\nRetrieves the complete content for a specific documentation section. \nIMPORTANT: A section is not a single page, but rather a collection of pages that are grouped together.\n`;\n\n if (context.serviceId) {\n return `${baseDescription}\n\nUses the configured service: ${context.serviceId}\n\nIt takes one argument:\n- sectionId (str): The specific section identifier within the service documentation (e.g., 'getting-started', 'api-reference')`;\n }\n\n return `${baseDescription}\n\nIt takes two arguments:\n- serviceId (str): The unique identifier of the Mastercard service (e.g., 'send', 'loyalty', 'locations')\n- sectionId (str): The specific section identifier within the service documentation (e.g., 'getting-started', 'api-reference')\n`;\n};\n\nexport const getParameters = (context: ToolContext): z.ZodObject<any> => {\n const baseParams = {\n sectionId: z\n .string()\n .min(1)\n .describe(\n \"The specific section identifier within the service documentation (e.g., 'getting-started', 'api-reference')\"\n ),\n };\n\n if (context.serviceId) {\n return z.object(baseParams);\n }\n\n return z.object({\n serviceId: z\n .string()\n .min(1)\n .describe(\n \"The unique identifier of the Mastercard service (e.g., 'send', 'loyalty', 'locations')\"\n ),\n ...baseParams,\n });\n};\n\nexport const execute = async (\n context: ToolContext,\n params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n const serviceId = context.serviceId || params.serviceId;\n return await api.getDocumentationSection(serviceId, params.sectionId);\n};\n\nexport const getDocumentationSection = (context: ToolContext): Tool => ({\n method: 'get-documentation-section-content',\n name: 'Get Documentation Section Content',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (_context: ToolContext): string => {\n return `Retrieves the complete content of a specific documentation page.\n\nTakes one argument:\n- pagePath (str): The full path to the documentation page (e.g., '/send/documentation/use-cases/index.md')`;\n};\n\nexport const getParameters = (_context: ToolContext): z.ZodObject<any> => {\n return z.object({\n pagePath: z\n .string()\n .min(1)\n .describe(\n \"The full path to the documentation page (e.g., '/send/documentation/use-cases/index.md')\"\n ),\n });\n};\n\nexport const execute = async (\n _context: ToolContext,\n params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n return await api.getDocumentationPage(params.pagePath);\n};\n\nexport const getDocumentationPage = (context: ToolContext): Tool => ({\n method: 'get-documentation-page',\n name: 'Get Documentation Page',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (_context: ToolContext): string => {\n return `Retrieves the comprehensive OAuth 1.0a integration guide including step-by-step instructions,\ncode examples, and best practices for Mastercard APIs.`;\n};\n\nexport const getParameters = (_context: ToolContext): z.ZodObject<any> => {\n return z.object({});\n};\n\nexport const execute = async (\n _context: ToolContext,\n _params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n return await api.getDocumentationPage(\n '/platform/documentation/authentication/using-oauth-1a-to-access-mastercard-apis/index.md'\n );\n};\n\nexport const getOAuth10aGuide = (context: ToolContext): Tool => ({\n method: 'get-oauth10a-integration-guide',\n name: 'Get OAuth 1.0a Integration Guide',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (_context: ToolContext): string => {\n return `Retrieves the comprehensive Open Banking integration guide including setup instructions,\nAPI usage examples, and implementation best practices.`;\n};\n\nexport const getParameters = (_context: ToolContext): z.ZodObject<any> => {\n return z.object({});\n};\n\nexport const execute = async (\n _context: ToolContext,\n _params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n return await api.getDocumentationPage(\n '/open-banking-us/documentation/quick-start-guide/index.md'\n );\n};\n\nexport const getOpenBankingGuide = (context: ToolContext): Tool => ({\n method: 'get-openbanking-integration-guide',\n name: 'Get Open Banking Integration Guide',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (_context: ToolContext): string => {\n return `Lists all available Mastercard Developers Products and Services with their basic information \nincluding title, description, and service id.\nIMPORTANT: The response contains both 'Products' (business offerings) and 'Services' (technical APIs with serviceIds). Use \"serviceId\" for each service for any tools that require serviceId as the parameter.\n`;\n};\n\nexport const getParameters = (_context: ToolContext): z.ZodObject<any> => {\n return z.object({});\n};\n\nexport const execute = async (\n _context: ToolContext,\n _params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n return await api.listServices();\n};\n\nexport const getServicesList = (context: ToolContext): Tool => ({\n method: 'get-services-list',\n name: 'Get Services List',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (context: ToolContext): string => {\n const baseDescription = `Provides a summary of all API operations for a specific Mastercard API \nspecification including HTTP methods, request paths, titles, and descriptions.`;\n\n if (context.apiSpecificationPath) {\n return `${baseDescription}\n\nUses the configured API specification: ${context.apiSpecificationPath}`;\n }\n\n return `${baseDescription}\n\nIt takes one argument:\n- apiSpecificationPath (str): The path to the API specification file e.g., '/open-banking-us/swagger/openbanking-us.yaml')`;\n};\n\nexport const getParameters = (context: ToolContext): z.ZodObject<any> => {\n if (context.apiSpecificationPath) {\n return z.object({});\n }\n\n return z.object({\n apiSpecificationPath: z\n .string()\n .describe(\n 'The path to the API specification file (e.g., /open-banking-us/swagger/openbanking-us.yaml)'\n ),\n });\n};\n\nexport const execute = async (\n context: ToolContext,\n params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n if (context.apiSpecificationPath) {\n return await api.getApiOperations(context.apiSpecificationPath);\n } else {\n return await api.getApiOperations(params.apiSpecificationPath);\n }\n};\n\nexport const getApiOperationList = (context: ToolContext): Tool => ({\n method: 'get-api-operation-list',\n name: 'Get API Operation List',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { z } from 'zod';\nimport { Tool, ToolContext } from '@/shared/types';\nimport api from '@/shared/api';\n\nconst getDescription = (context: ToolContext): string => {\n const baseDescription = `Provides detailed information about a specific API operation including parameter definitions,\nrequest and response schemas, and technical specifications for successful API calls.`;\n\n if (context.apiSpecificationPath) {\n return `${baseDescription}\n\nUses the configured API specification: ${context.apiSpecificationPath}\n\nIt takes two arguments:\n- method (str): The HTTP method of the operation (e.g., GET, POST, PUT, DELETE)\n- path (str): The API endpoint path from the specification (e.g., /payments, /accounts/{id})`;\n }\n\n return `${baseDescription}\n\nIt takes three arguments:\n- apiSpecificationPath (str): The path to the API specification file (e.g. The path would be /open-banking-us/swagger/openbanking-us.yaml for\nhttps://static.developer.mastercard.com/content/open-banking-us/swagger/openbanking-us.yaml,\nhttps://developer.mastercard.com/open-banking-us/swagger/openbanking-us.yaml,\nor /open-banking-us/swagger/openbanking-us.yaml)\n- method (str): The HTTP method of the operation (e.g., GET, POST, PUT, DELETE)\n- path (str): The API endpoint path from the specification (e.g., /payments, /accounts/{id})`;\n};\n\nexport const getParameters = (context: ToolContext): z.ZodObject<any> => {\n const baseParams = {\n method: z\n .string()\n .describe(\n 'The HTTP method of the operation (e.g., GET, POST, PUT, DELETE)'\n ),\n path: z\n .string()\n .describe(\n 'The API endpoint path from the specification (e.g., /payments, /accounts/{id})'\n ),\n };\n\n if (context.apiSpecificationPath) {\n return z.object(baseParams);\n }\n\n return z.object({\n apiSpecificationPath: z\n .string()\n .describe(\n 'The path to the API specification (e.g., /open-banking-us/swagger/openbanking-us.yaml)'\n ),\n ...baseParams,\n });\n};\n\nexport const execute = async (\n context: ToolContext,\n params: z.infer<ReturnType<typeof getParameters>>\n): Promise<string> => {\n if (context.apiSpecificationPath) {\n return await api.getApiOperationDetails(\n context.apiSpecificationPath,\n params.method,\n params.path\n );\n } else {\n return await api.getApiOperationDetails(\n params.apiSpecificationPath,\n params.method,\n params.path\n );\n }\n};\n\nexport const getApiOperationDetails = (context: ToolContext): Tool => ({\n method: 'get-api-operation-details',\n name: 'Get API Operation Details',\n description: getDescription(context),\n parameters: getParameters(context),\n execute: (params) => execute(context, params),\n});\n","import { Tool, ToolContext } from '@/shared/types';\n\n// Documentation tools\nimport { getDocumentation } from '@/shared/tools/documentation/getDocumentation';\nimport { getDocumentationSection } from '@/shared/tools/documentation/getDocumentationSection';\nimport { getDocumentationPage } from '@/shared/tools/documentation/getDocumentationPage';\nimport { getOAuth10aGuide } from '@/shared/tools/documentation/getOAuth10aGuide';\nimport { getOpenBankingGuide } from '@/shared/tools/documentation/getOpenBankingGuide';\n\n// Services tools\nimport { getServicesList } from '@/shared/tools/services/getServicesList';\n\n// Operations tools\nimport { getApiOperationList } from '@/shared/tools/operations/getApiOperationList';\nimport { getApiOperationDetails } from '@/shared/tools/operations/getApiOperationDetails';\n\nexport const tools = (context: ToolContext): Tool[] => [\n // Services\n getServicesList(context),\n\n // Documentation\n getDocumentation(context),\n getDocumentationSection(context),\n getDocumentationPage(context),\n getOAuth10aGuide(context),\n getOpenBankingGuide(context),\n\n // API Operations\n getApiOperationList(context),\n getApiOperationDetails(context),\n];\n","{\n \"version\": \"0.1.1\",\n \"name\": \"@mastercard/developers-agent-toolkit\",\n \"homepage\": \"https://github.com/mastercard/developers-agent-toolkit\",\n \"description\": \"Agent Toolkit for Mastercard Developers Platform\",\n \"author\": \"Mastercard\",\n \"license\": \"MIT\",\n \"scripts\": {\n \"build\": \"tsup\",\n \"clean\": \"rm -rf mcp\",\n \"test\": \"jest\",\n \"test:coverage\": \"jest --coverage\",\n \"lint\": \"eslint \\\"./**/*.ts*\\\"\",\n \"format\": \"prettier --write .\",\n \"format:check\": \"prettier --check .\",\n \"prepare\": \"cd .. && husky typescript/.husky\"\n },\n \"files\": [\n \"mcp/**/*\",\n \"LICENSE\",\n \"README.md\",\n \"VERSION\",\n \"package.json\"\n ],\n \"keywords\": [\n \"agent-toolkit\",\n \"mcp\",\n \"modelcontextprotocol\",\n \"mastercard\",\n \"mastercard-developers\"\n ],\n \"exports\": {\n \"./mcp\": {\n \"types\": \"./mcp/index.d.ts\",\n \"default\": \"./mcp/index.js\"\n }\n },\n \"engines\": {\n \"node\": \">=18\"\n },\n \"devDependencies\": {\n \"@eslint/compat\": \"^1.3.1\",\n \"@types/jest\": \"^29.5.14\",\n \"@types/node-fetch\": \"^2.6.12\",\n \"@typescript-eslint/eslint-plugin\": \"^8.38.0\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-import\": \"^2.32.0\",\n \"eslint-plugin-jest\": \"^28.14.0\",\n \"eslint-plugin-prettier\": \"^5.5.3\",\n \"husky\": \"^9.1.7\",\n \"jest\": \"^29.7.0\",\n \"lint-staged\": \"^16.1.2\",\n \"prettier\": \"^3.6.2\",\n \"ts-jest\": \"^29.2.5\",\n \"ts-node\": \"^10.9.2\",\n \"tsup\": \"^8.5.0\",\n \"typescript\": \"^5.8.3\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.11.3\",\n \"node-fetch\": \"^2.7.0\",\n \"zod\": \"^3.24.4\"\n },\n \"lint-staged\": {\n \"*.{mjs,js,jsx,ts,tsx}\": [\n \"prettier --ignore-unknown --ignore-path .gitignore --write\",\n \"eslint --cache --cache-strategy content --ext .js,.ts --fix\"\n ],\n \"*.{yml,json,md,html,css,scss,sass}\": [\n \"prettier --ignore-unknown --ignore-path .gitignore --write\"\n ]\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;;;ACA1B,SAAS,KAAAA,UAAS;;;ACAlB,SAAS,SAAS;AAClB,OAAO,WAAW;AAElB,IAAM,aAAa,EAChB,OAAO,EACP,IAAI,GAAG,iCAAiC,EACxC,WAAW,KAAK,wBAAwB;AAKpC,IAAM,sBAAN,MAA0B;AAAA,EACd,UAAU,IAAI,IAAI,mCAAmC;AAAA;AAAA;AAAA;AAAA,EAKtE,MAAc,QACZ,UACA,QACiB;AACjB,UAAM,MAAM,IAAI,IAAI,UAAU,KAAK,OAAO;AAG1C,QAAI,IAAI,aAAa,KAAK,QAAQ,UAAU;AAC1C,YAAM,IAAI,MAAM,yCAAyC;AAAA,IAC3D;AAEA,QAAI,QAAQ;AACV,YAAM,eAAe,IAAI,gBAAgB,MAAM;A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OAA8B;AAC3D,MAAI;AAEF,UAAM,MAAM,IAAI,IAAI,KAAK;AAEzB,QAAI,IAAI,aAAa,4BAA4B;AAC/C,aAAO;AAAA,IACT;AAEA,UAAM,YAAY,IAAI,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC;AAE1E,QAAI,UAAU,UAAU,KAAK,UAAU,CAAC,MAAM,iBAAiB;AAC7D,YAAM,YAAY,UAAU,CAAC;AAC7B,UAAI,aAAa,kBAAkB,SAAS,GAAG;AAC7C,eAAO,UAAU,YAAY;AAAA,MAC/B;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAQ;AAEN,WAAO;AAAA,EACT;AACF;AAEA,SAAS,sCACP,OAC4D;AAC5D,MAAI;AAEF,UAAM,MAAM,IAAI,IAAI,KAAK;AAGzB,QAAI,IAAI,aAAa,mCAAmC;AACtD,aAAO;AAAA,IACT;AACA,UAAM,YAAY,IAAI,SAAS,MAAM,GAAG,EAAE,OAAO,CAAC,SAAS,KAAK,SAAS,CAAC;AAE1E,QACE,UAAU,UAAU,KACpB,UAAU,CAAC,MAAM,aACjB,UAAU,CAAC,MAAM,WACjB;AACA,YAAM,YAAY,UAAU,CAAC;AAC7B,YAAM,OAAO,UAAU,MAAM,CAAC,EAAE,KAAK,GAAG;AAExC,UACE,aACA,QACA,kBAAkB,SAAS,KAC3B,KAAK,SAAS,OAAO,GACrB;AACA,eAAO;AAAA,UACL,WAAW,UAAU,YAAY;AAAA,UACjC,sBAAsB,IAAI,UAAU,YAAY,CAAC,YAAY,IAAI;AAAA,QACnE;AAAA,MACF;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":["z","z","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute","z","getDescription","getParameters","z","execute"]}