@atlaskit/ads-mcp 0.9.1 → 0.10.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/helpers/analytics.js +2 -2
  3. package/dist/cjs/index.js +14 -9
  4. package/dist/cjs/tools/get-icons/icon-structured-content.codegen.js +2585 -0
  5. package/dist/cjs/tools/get-icons/index.js +133 -0
  6. package/dist/cjs/tools/get-tokens/index.js +15 -22
  7. package/dist/cjs/tools/get-tokens/token-structured-content.codegen.js +2261 -0
  8. package/dist/es2019/helpers/analytics.js +2 -2
  9. package/dist/es2019/index.js +13 -9
  10. package/dist/es2019/tools/analyze-a11y/index.js +1 -1
  11. package/dist/es2019/tools/get-icons/icon-structured-content.codegen.js +2579 -0
  12. package/dist/es2019/tools/get-icons/index.js +108 -0
  13. package/dist/es2019/tools/get-tokens/index.js +7 -22
  14. package/dist/es2019/tools/get-tokens/token-structured-content.codegen.js +2255 -0
  15. package/dist/esm/helpers/analytics.js +2 -2
  16. package/dist/esm/index.js +14 -9
  17. package/dist/esm/tools/get-icons/icon-structured-content.codegen.js +2579 -0
  18. package/dist/esm/tools/get-icons/index.js +126 -0
  19. package/dist/esm/tools/get-tokens/index.js +15 -22
  20. package/dist/esm/tools/get-tokens/token-structured-content.codegen.js +2255 -0
  21. package/dist/types/index.d.ts +0 -1
  22. package/dist/types/tools/get-icons/icon-structured-content.codegen.d.ts +13 -0
  23. package/dist/types/tools/get-icons/index.d.ts +35 -0
  24. package/dist/types/tools/get-tokens/index.d.ts +6 -4
  25. package/dist/types/tools/get-tokens/token-structured-content.codegen.d.ts +13 -0
  26. package/dist/types-ts4.5/index.d.ts +0 -1
  27. package/dist/types-ts4.5/tools/get-icons/icon-structured-content.codegen.d.ts +13 -0
  28. package/dist/types-ts4.5/tools/get-icons/index.d.ts +35 -0
  29. package/dist/types-ts4.5/tools/get-tokens/index.d.ts +6 -4
  30. package/dist/types-ts4.5/tools/get-tokens/token-structured-content.codegen.d.ts +13 -0
  31. package/package.json +5 -1
  32. package/dist/cjs/structured-content/formatters/token.js +0 -11
  33. package/dist/cjs/structured-content/types.js +0 -1
  34. package/dist/es2019/structured-content/formatters/token.js +0 -10
  35. package/dist/es2019/structured-content/types.js +0 -0
  36. package/dist/esm/structured-content/formatters/token.js +0 -5
  37. package/dist/esm/structured-content/types.js +0 -0
  38. package/dist/types/structured-content/formatters/token.d.ts +0 -2
  39. package/dist/types/structured-content/types.d.ts +0 -20
  40. package/dist/types-ts4.5/structured-content/formatters/token.d.ts +0 -2
  41. package/dist/types-ts4.5/structured-content/types.d.ts +0 -20
@@ -41,7 +41,7 @@ if (!isAnalyticsOptedOut) {
41
41
  subproduct: 'ads-mcp',
42
42
  flushInterval: 5000
43
43
  });
44
- } catch (error) {
44
+ } catch {
45
45
  // Analytics client not available or failed to initialize
46
46
  // Log the error but continue without analytics
47
47
  console.error('Could not initialize analytics client. This is normal as it is only intended to measure authenticated Atlassians');
@@ -80,7 +80,7 @@ export function sendOperationalEvent({
80
80
  }
81
81
  }
82
82
  });
83
- } catch (error) {
83
+ } catch {
84
84
  // Analytics errors should not prevent normal operation
85
85
  // Silently fail to avoid disrupting the main functionality
86
86
  console.error('Error sending operational event to analytics');
@@ -11,6 +11,7 @@ import { getA11yGuidelinesInputSchema, getA11yGuidelinesTool, listGetA11yGuideli
11
11
  import { getAllIconsTool, listGetAllIconsTool } from './tools/get-all-icons';
12
12
  import { getAllTokensTool, listGetAllTokensTool } from './tools/get-all-tokens';
13
13
  import { getComponentsTool, listGetComponentsTool } from './tools/get-components';
14
+ import { getIconsInputSchema, getIconsTool, listGetIconsTool } from './tools/get-icons';
14
15
  import { getTokensInputSchema, getTokensTool, listGetTokensTool } from './tools/get-tokens';
15
16
  import { listPlanTool, planInputSchema, planTool } from './tools/plan';
16
17
  import { listSuggestA11yFixesTool, suggestA11yFixesInputSchema, suggestA11yFixesTool } from './tools/suggest-a11y-fixes';
@@ -60,11 +61,6 @@ export const getToolRegistry = () => {
60
61
  inputSchema: getA11yGuidelinesInputSchema,
61
62
  tool: listGetA11yGuidelinesTool
62
63
  },
63
- [listGetAllIconsTool.name]: {
64
- handler: getAllIconsTool,
65
- inputSchema: null,
66
- tool: listGetAllIconsTool
67
- },
68
64
  [listGetComponentsTool.name]: {
69
65
  handler: getComponentsTool,
70
66
  inputSchema: null,
@@ -99,19 +95,29 @@ export const getToolRegistry = () => {
99
95
  }
100
96
  };
101
97
 
102
- // Conditionally add token tools based on feature flag
98
+ // Conditionally add token and icon tools based on feature flag
103
99
  if (fg('design_system_mcp_structured_content')) {
104
100
  baseTools[listGetTokensTool.name] = {
105
101
  handler: getTokensTool,
106
102
  inputSchema: getTokensInputSchema,
107
103
  tool: listGetTokensTool
108
104
  };
105
+ baseTools[listGetIconsTool.name] = {
106
+ handler: getIconsTool,
107
+ inputSchema: getIconsInputSchema,
108
+ tool: listGetIconsTool
109
+ };
109
110
  } else {
110
111
  baseTools[listGetAllTokensTool.name] = {
111
112
  handler: getAllTokensTool,
112
113
  inputSchema: null,
113
114
  tool: listGetAllTokensTool
114
115
  };
116
+ baseTools[listGetAllIconsTool.name] = {
117
+ handler: getAllIconsTool,
118
+ inputSchema: null,
119
+ tool: listGetAllIconsTool
120
+ };
115
121
  }
116
122
  return baseTools;
117
123
  };
@@ -244,6 +250,4 @@ async function runServer() {
244
250
  runServer().catch(error => {
245
251
  const errorMessage = error instanceof Error ? error.message : 'Unknown error';
246
252
  console.error(`Invalid input to ads-mcp: ${errorMessage}`);
247
- });
248
-
249
- // Export types for use by other packages
253
+ });
@@ -235,7 +235,7 @@ export const analyzeA11yTool = async params => {
235
235
  }, null, 2)
236
236
  }]
237
237
  };
238
- } catch (error) {
238
+ } catch {
239
239
  // Fallback to pattern-based analysis if axe-core fails
240
240
  // console.warn('Axe-core analysis failed, falling back to pattern analysis:', error);
241
241