@atlaskit/ads-mcp 0.15.1 → 0.17.0
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/CHANGELOG.md +14 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/tools/get-guidelines/guidelines-structured-content.codegen.js +49 -0
- package/dist/cjs/tools/get-guidelines/index.js +99 -0
- package/dist/cjs/tools/get-icons/icon-mcp-structured-content.codegen.js +8 -0
- package/dist/cjs/tools/get-icons/icon-structured-content.codegen.js +2 -2
- package/dist/cjs/tools/get-icons/index.js +13 -13
- package/dist/cjs/tools/get-lint-rules/index.js +11 -11
- package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +94 -86
- package/dist/cjs/tools/get-tokens/index.js +12 -12
- package/dist/cjs/tools/get-tokens/token-mcp-structured-content.codegen.js +2356 -0
- package/dist/cjs/tools/i18n-conversion/guide.js +1 -1
- package/dist/es2019/index.js +6 -0
- package/dist/es2019/tools/get-guidelines/guidelines-structured-content.codegen.js +43 -0
- package/dist/es2019/tools/get-guidelines/index.js +78 -0
- package/dist/es2019/tools/get-icons/icon-mcp-structured-content.codegen.js +8 -0
- package/dist/es2019/tools/get-icons/icon-structured-content.codegen.js +2 -2
- package/dist/es2019/tools/get-icons/index.js +9 -9
- package/dist/es2019/tools/get-lint-rules/index.js +9 -9
- package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +93 -85
- package/dist/es2019/tools/get-tokens/index.js +9 -9
- package/dist/es2019/tools/get-tokens/token-mcp-structured-content.codegen.js +2350 -0
- package/dist/es2019/tools/i18n-conversion/guide.js +1 -1
- package/dist/esm/index.js +6 -0
- package/dist/esm/tools/get-guidelines/guidelines-structured-content.codegen.js +43 -0
- package/dist/esm/tools/get-guidelines/index.js +92 -0
- package/dist/esm/tools/get-icons/icon-mcp-structured-content.codegen.js +8 -0
- package/dist/esm/tools/get-icons/icon-structured-content.codegen.js +2 -2
- package/dist/esm/tools/get-icons/index.js +13 -13
- package/dist/esm/tools/get-lint-rules/index.js +12 -12
- package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +93 -85
- package/dist/esm/tools/get-tokens/index.js +12 -12
- package/dist/esm/tools/get-tokens/token-mcp-structured-content.codegen.js +2350 -0
- package/dist/esm/tools/i18n-conversion/guide.js +1 -1
- package/dist/types/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +13 -0
- package/dist/types/tools/get-guidelines/index.d.ts +13 -0
- package/dist/types/tools/get-icons/icon-mcp-structured-content.codegen.d.ts +13 -0
- package/dist/types/tools/get-icons/icon-structured-content.codegen.d.ts +1 -1
- package/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +4 -4
- package/dist/types/tools/get-tokens/token-mcp-structured-content.codegen.d.ts +13 -0
- package/dist/types-ts4.5/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +13 -0
- package/dist/types-ts4.5/tools/get-guidelines/index.d.ts +13 -0
- package/dist/types-ts4.5/tools/get-icons/icon-mcp-structured-content.codegen.d.ts +13 -0
- package/dist/types-ts4.5/tools/get-icons/icon-structured-content.codegen.d.ts +1 -1
- package/dist/types-ts4.5/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +4 -4
- package/dist/types-ts4.5/tools/get-tokens/token-mcp-structured-content.codegen.d.ts +13 -0
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
import Fuse from 'fuse.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { cleanQuery, zodToJsonSchema } from '../../helpers';
|
|
8
|
-
import {
|
|
8
|
+
import { iconMcpStructuredContent } from './icon-mcp-structured-content.codegen';
|
|
9
9
|
export var getIconsInputSchema = z.object({
|
|
10
10
|
terms: z.array(z.string()).default([]).describe('An array of search terms to find icons by name, keywords, or categorization, eg. `["search", "folder", "user"]`. If empty or not provided, returns all icons.').optional(),
|
|
11
11
|
limit: z.number().default(1).describe('Maximum number of results per search term in the array (default: 1)').optional(),
|
|
@@ -25,26 +25,26 @@ export var listGetIconsTool = {
|
|
|
25
25
|
};
|
|
26
26
|
export var getIconsTool = /*#__PURE__*/function () {
|
|
27
27
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
28
|
-
var _params$terms, terms, _params$limit, limit, _params$exactName, exactName, searchTerms, iconDocs,
|
|
28
|
+
var _params$terms, terms, _params$limit, limit, _params$exactName, exactName, searchTerms, iconDocs, _payload, exactNameMatches, _payload2, fuse, results, uniqueResults, matchedIcons, payload;
|
|
29
29
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
30
|
while (1) switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
32
32
|
_params$terms = params.terms, terms = _params$terms === void 0 ? [] : _params$terms, _params$limit = params.limit, limit = _params$limit === void 0 ? 1 : _params$limit, _params$exactName = params.exactName, exactName = _params$exactName === void 0 ? false : _params$exactName;
|
|
33
33
|
searchTerms = terms.filter(Boolean).map(cleanQuery);
|
|
34
|
-
iconDocs =
|
|
34
|
+
iconDocs = iconMcpStructuredContent.filter(function (icon) {
|
|
35
35
|
return icon.status === 'published';
|
|
36
|
-
}); // If no search terms provided, return all icons
|
|
36
|
+
}); // If no search terms provided, return all icons as JSON array
|
|
37
37
|
if (!(searchTerms.length === 0)) {
|
|
38
38
|
_context.next = 6;
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
_payload = iconDocs.map(function (icon) {
|
|
42
42
|
return icon.content;
|
|
43
|
-
})
|
|
43
|
+
});
|
|
44
44
|
return _context.abrupt("return", {
|
|
45
45
|
content: [{
|
|
46
46
|
type: 'text',
|
|
47
|
-
text:
|
|
47
|
+
text: JSON.stringify(_payload)
|
|
48
48
|
}]
|
|
49
49
|
});
|
|
50
50
|
case 6:
|
|
@@ -60,13 +60,13 @@ export var getIconsTool = /*#__PURE__*/function () {
|
|
|
60
60
|
}).filter(function (icon) {
|
|
61
61
|
return icon !== undefined;
|
|
62
62
|
}); // Return exact matches if found, or empty result if exactName is true
|
|
63
|
-
|
|
63
|
+
_payload2 = exactNameMatches.length === 1 ? exactNameMatches[0].content : exactNameMatches.map(function (icon) {
|
|
64
64
|
return icon.content;
|
|
65
|
-
})
|
|
65
|
+
});
|
|
66
66
|
return _context.abrupt("return", {
|
|
67
67
|
content: [{
|
|
68
68
|
type: 'text',
|
|
69
|
-
text:
|
|
69
|
+
text: JSON.stringify(_payload2)
|
|
70
70
|
}]
|
|
71
71
|
});
|
|
72
72
|
case 10:
|
|
@@ -107,13 +107,13 @@ export var getIconsTool = /*#__PURE__*/function () {
|
|
|
107
107
|
matchedIcons = uniqueResults.map(function (result) {
|
|
108
108
|
return result.item;
|
|
109
109
|
});
|
|
110
|
-
|
|
110
|
+
payload = matchedIcons.length === 1 ? matchedIcons[0].content : matchedIcons.map(function (icon) {
|
|
111
111
|
return icon.content;
|
|
112
|
-
})
|
|
112
|
+
});
|
|
113
113
|
return _context.abrupt("return", {
|
|
114
114
|
content: [{
|
|
115
115
|
type: 'text',
|
|
116
|
-
text:
|
|
116
|
+
text: JSON.stringify(payload)
|
|
117
117
|
}]
|
|
118
118
|
});
|
|
119
119
|
case 16:
|
|
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
import Fuse from 'fuse.js';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import { cleanQuery, zodToJsonSchema } from '../../helpers';
|
|
8
|
-
import {
|
|
8
|
+
import { lintRulesMcpStructuredContent } from './lint-rules-structured-content.codegen';
|
|
9
9
|
export var getLintRulesInputSchema = z.object({
|
|
10
10
|
terms: z.array(z.string()).default([]).describe('An array of search terms to find lint rules by name or description, eg. `["icon-label", "xcss", "design token"]`. If empty or not provided, returns all lint rules.').optional(),
|
|
11
11
|
limit: z.number().default(1).describe('Maximum number of results per search term in the array (default: 1)').optional(),
|
|
@@ -25,24 +25,24 @@ export var listGetLintRulesTool = {
|
|
|
25
25
|
};
|
|
26
26
|
export var getLintRulesTool = /*#__PURE__*/function () {
|
|
27
27
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
28
|
-
var _params$terms, terms, _params$limit, limit, _params$exactName, exactName, searchTerms, ruleDocs,
|
|
28
|
+
var _params$terms, terms, _params$limit, limit, _params$exactName, exactName, searchTerms, ruleDocs, _payload, exactNameMatches, _payload2, fuse, results, uniqueResults, matchedRules, payload;
|
|
29
29
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
30
30
|
while (1) switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
32
32
|
_params$terms = params.terms, terms = _params$terms === void 0 ? [] : _params$terms, _params$limit = params.limit, limit = _params$limit === void 0 ? 1 : _params$limit, _params$exactName = params.exactName, exactName = _params$exactName === void 0 ? false : _params$exactName;
|
|
33
33
|
searchTerms = terms.filter(Boolean).map(cleanQuery);
|
|
34
|
-
ruleDocs =
|
|
34
|
+
ruleDocs = lintRulesMcpStructuredContent; // If no search terms provided, return all rules as JSON array
|
|
35
35
|
if (!(searchTerms.length === 0)) {
|
|
36
36
|
_context.next = 6;
|
|
37
37
|
break;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
_payload = ruleDocs.map(function (rule) {
|
|
40
40
|
return rule.content;
|
|
41
|
-
})
|
|
41
|
+
});
|
|
42
42
|
return _context.abrupt("return", {
|
|
43
43
|
content: [{
|
|
44
44
|
type: 'text',
|
|
45
|
-
text:
|
|
45
|
+
text: JSON.stringify(_payload)
|
|
46
46
|
}]
|
|
47
47
|
});
|
|
48
48
|
case 6:
|
|
@@ -57,13 +57,13 @@ export var getLintRulesTool = /*#__PURE__*/function () {
|
|
|
57
57
|
}).filter(function (rule) {
|
|
58
58
|
return rule !== undefined;
|
|
59
59
|
});
|
|
60
|
-
|
|
60
|
+
_payload2 = exactNameMatches.length === 1 ? exactNameMatches[0].content : exactNameMatches.map(function (rule) {
|
|
61
61
|
return rule.content;
|
|
62
|
-
})
|
|
62
|
+
});
|
|
63
63
|
return _context.abrupt("return", {
|
|
64
64
|
content: [{
|
|
65
65
|
type: 'text',
|
|
66
|
-
text:
|
|
66
|
+
text: JSON.stringify(_payload2)
|
|
67
67
|
}]
|
|
68
68
|
});
|
|
69
69
|
case 10:
|
|
@@ -100,13 +100,13 @@ export var getLintRulesTool = /*#__PURE__*/function () {
|
|
|
100
100
|
matchedRules = uniqueResults.map(function (result) {
|
|
101
101
|
return result.item;
|
|
102
102
|
});
|
|
103
|
-
|
|
103
|
+
payload = matchedRules.length === 1 ? matchedRules[0].content : matchedRules.map(function (rule) {
|
|
104
104
|
return rule.content;
|
|
105
|
-
})
|
|
105
|
+
});
|
|
106
106
|
return _context.abrupt("return", {
|
|
107
107
|
content: [{
|
|
108
108
|
type: 'text',
|
|
109
|
-
text:
|
|
109
|
+
text: JSON.stringify(payload)
|
|
110
110
|
}]
|
|
111
111
|
});
|
|
112
112
|
case 16:
|