@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
@@ -43,7 +43,7 @@ if (!isAnalyticsOptedOut) {
43
43
  subproduct: 'ads-mcp',
44
44
  flushInterval: 5000
45
45
  });
46
- } catch (error) {
46
+ } catch (_unused) {
47
47
  // Analytics client not available or failed to initialize
48
48
  // Log the error but continue without analytics
49
49
  console.error('Could not initialize analytics client. This is normal as it is only intended to measure authenticated Atlassians');
@@ -82,7 +82,7 @@ export function sendOperationalEvent(_ref) {
82
82
  }, attributes)
83
83
  }
84
84
  });
85
- } catch (error) {
85
+ } catch (_unused2) {
86
86
  // Analytics errors should not prevent normal operation
87
87
  // Silently fail to avoid disrupting the main functionality
88
88
  console.error('Error sending operational event to analytics');
package/dist/esm/index.js CHANGED
@@ -14,6 +14,7 @@ import { getA11yGuidelinesInputSchema, getA11yGuidelinesTool, listGetA11yGuideli
14
14
  import { getAllIconsTool, listGetAllIconsTool } from './tools/get-all-icons';
15
15
  import { getAllTokensTool, listGetAllTokensTool } from './tools/get-all-tokens';
16
16
  import { getComponentsTool, listGetComponentsTool } from './tools/get-components';
17
+ import { getIconsInputSchema, getIconsTool, listGetIconsTool } from './tools/get-icons';
17
18
  import { getTokensInputSchema, getTokensTool, listGetTokensTool } from './tools/get-tokens';
18
19
  import { listPlanTool, planInputSchema, planTool } from './tools/plan';
19
20
  import { listSuggestA11yFixesTool, suggestA11yFixesInputSchema, suggestA11yFixesTool } from './tools/suggest-a11y-fixes';
@@ -53,7 +54,7 @@ var generateLogger = function generateLogger(level) {
53
54
  };
54
55
  };
55
56
  export var getToolRegistry = function getToolRegistry() {
56
- var baseTools = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, listAnalyzeA11yTool.name, {
57
+ var baseTools = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, listAnalyzeA11yTool.name, {
57
58
  handler: analyzeA11yTool,
58
59
  inputSchema: analyzeA11yInputSchema,
59
60
  tool: listAnalyzeA11yTool
@@ -65,10 +66,6 @@ export var getToolRegistry = function getToolRegistry() {
65
66
  handler: getA11yGuidelinesTool,
66
67
  inputSchema: getA11yGuidelinesInputSchema,
67
68
  tool: listGetA11yGuidelinesTool
68
- }), listGetAllIconsTool.name, {
69
- handler: getAllIconsTool,
70
- inputSchema: null,
71
- tool: listGetAllIconsTool
72
69
  }), listGetComponentsTool.name, {
73
70
  handler: getComponentsTool,
74
71
  inputSchema: null,
@@ -83,19 +80,29 @@ export var getToolRegistry = function getToolRegistry() {
83
80
  tool: listSuggestA11yFixesTool
84
81
  });
85
82
 
86
- // Conditionally add token tools based on feature flag
83
+ // Conditionally add token and icon tools based on feature flag
87
84
  if (fg('design_system_mcp_structured_content')) {
88
85
  baseTools[listGetTokensTool.name] = {
89
86
  handler: getTokensTool,
90
87
  inputSchema: getTokensInputSchema,
91
88
  tool: listGetTokensTool
92
89
  };
90
+ baseTools[listGetIconsTool.name] = {
91
+ handler: getIconsTool,
92
+ inputSchema: getIconsInputSchema,
93
+ tool: listGetIconsTool
94
+ };
93
95
  } else {
94
96
  baseTools[listGetAllTokensTool.name] = {
95
97
  handler: getAllTokensTool,
96
98
  inputSchema: null,
97
99
  tool: listGetAllTokensTool
98
100
  };
101
+ baseTools[listGetAllIconsTool.name] = {
102
+ handler: getAllIconsTool,
103
+ inputSchema: null,
104
+ tool: listGetAllIconsTool
105
+ };
99
106
  }
100
107
  return baseTools;
101
108
  };
@@ -281,6 +288,4 @@ function _runServer() {
281
288
  runServer().catch(function (error) {
282
289
  var errorMessage = error instanceof Error ? error.message : 'Unknown error';
283
290
  console.error("Invalid input to ads-mcp: ".concat(errorMessage));
284
- });
285
-
286
- // Export types for use by other packages
291
+ });