@atlaskit/ads-mcp 0.18.0 → 0.19.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 +16 -0
- package/README.md +2 -2
- package/dist/cjs/helpers/fuse-multi-term.js +130 -0
- package/dist/cjs/helpers/index.js +15 -1
- package/dist/cjs/index.js +28 -14
- package/dist/cjs/instructions.js +1 -1
- package/dist/cjs/tools/analyze-a11y/index.js +12 -12
- package/dist/cjs/tools/get-a11y-guidelines/index.js +3 -3
- package/dist/cjs/tools/{get-components → get-all-components}/index.js +6 -6
- package/dist/cjs/tools/get-all-components/load-all-components.js +10 -0
- package/dist/cjs/tools/get-all-icons/index.js +1 -1
- package/dist/cjs/tools/get-all-tokens/index.js +1 -1
- package/dist/cjs/tools/get-guidelines/index.js +4 -4
- package/dist/cjs/tools/get-lint-rules/index.js +5 -5
- package/dist/cjs/tools/i18n-conversion/index.js +3 -3
- package/dist/cjs/tools/migration-guides/index.js +3 -3
- package/dist/cjs/tools/plan/index.js +13 -17
- package/dist/cjs/tools/search-components/index.js +44 -65
- package/dist/cjs/tools/search-icons/index.js +42 -68
- package/dist/cjs/tools/search-tokens/index.js +56 -43
- package/dist/cjs/tools/suggest-a11y-fixes/index.js +7 -7
- package/dist/es2019/helpers/fuse-multi-term.js +98 -0
- package/dist/es2019/helpers/index.js +1 -0
- package/dist/es2019/index.js +81 -83
- package/dist/es2019/instructions.js +2 -1
- package/dist/es2019/tools/analyze-a11y/index.js +28 -12
- package/dist/es2019/tools/get-a11y-guidelines/index.js +10 -3
- package/dist/es2019/tools/{get-components → get-all-components}/index.js +9 -4
- package/dist/es2019/tools/get-all-components/load-all-components.js +4 -0
- package/dist/es2019/tools/get-all-icons/index.js +6 -1
- package/dist/es2019/tools/get-all-tokens/index.js +6 -1
- package/dist/es2019/tools/get-guidelines/index.js +20 -7
- package/dist/es2019/tools/get-lint-rules/index.js +12 -8
- package/dist/es2019/tools/i18n-conversion/index.js +10 -13
- package/dist/es2019/tools/migration-guides/index.js +10 -4
- package/dist/es2019/tools/plan/index.js +25 -25
- package/dist/es2019/tools/search-components/index.js +42 -56
- package/dist/es2019/tools/search-icons/index.js +37 -62
- package/dist/es2019/tools/search-tokens/index.js +54 -45
- package/dist/es2019/tools/suggest-a11y-fixes/index.js +16 -7
- package/dist/esm/helpers/fuse-multi-term.js +122 -0
- package/dist/esm/helpers/index.js +1 -0
- package/dist/esm/index.js +28 -14
- package/dist/esm/instructions.js +1 -1
- package/dist/esm/tools/analyze-a11y/index.js +12 -12
- package/dist/esm/tools/get-a11y-guidelines/index.js +3 -3
- package/dist/esm/tools/{get-components → get-all-components}/index.js +5 -5
- package/dist/esm/tools/get-all-components/load-all-components.js +4 -0
- package/dist/esm/tools/get-all-icons/index.js +1 -1
- package/dist/esm/tools/get-all-tokens/index.js +1 -1
- package/dist/esm/tools/get-guidelines/index.js +4 -4
- package/dist/esm/tools/get-lint-rules/index.js +5 -5
- package/dist/esm/tools/i18n-conversion/index.js +3 -3
- package/dist/esm/tools/migration-guides/index.js +3 -3
- package/dist/esm/tools/plan/index.js +13 -17
- package/dist/esm/tools/search-components/index.js +45 -66
- package/dist/esm/tools/search-icons/index.js +43 -69
- package/dist/esm/tools/search-tokens/index.js +57 -44
- package/dist/esm/tools/suggest-a11y-fixes/index.js +7 -7
- package/dist/types/helpers/fuse-multi-term.d.ts +45 -0
- package/dist/types/helpers/index.d.ts +1 -0
- package/dist/types/instructions.d.ts +1 -1
- package/dist/types/tools/{get-components → get-all-components}/index.d.ts +2 -2
- package/dist/types/tools/plan/index.d.ts +1 -4
- package/dist/types/tools/search-components/index.d.ts +1 -4
- package/dist/types/tools/search-icons/index.d.ts +1 -4
- package/dist/types/tools/search-tokens/index.d.ts +1 -4
- package/dist/types-ts4.5/helpers/fuse-multi-term.d.ts +45 -0
- package/dist/types-ts4.5/helpers/index.d.ts +1 -0
- package/dist/types-ts4.5/instructions.d.ts +1 -1
- package/dist/types-ts4.5/tools/{get-components → get-all-components}/index.d.ts +2 -2
- package/dist/types-ts4.5/tools/plan/index.d.ts +1 -4
- package/dist/types-ts4.5/tools/search-components/index.d.ts +1 -4
- package/dist/types-ts4.5/tools/search-icons/index.d.ts +1 -4
- package/dist/types-ts4.5/tools/search-tokens/index.d.ts +1 -4
- package/package.json +5 -5
- package/dist/cjs/tools/get-components/load-all-components.js +0 -16
- package/dist/es2019/tools/get-components/load-all-components.js +0 -10
- package/dist/esm/tools/get-components/load-all-components.js +0 -10
- /package/dist/cjs/tools/{get-components → get-all-components}/components.codegen.js +0 -0
- /package/dist/cjs/tools/{get-components → get-all-components}/components.js +0 -0
- /package/dist/cjs/tools/{get-components → get-all-components}/types.js +0 -0
- /package/dist/es2019/tools/{get-components → get-all-components}/components.codegen.js +0 -0
- /package/dist/es2019/tools/{get-components → get-all-components}/components.js +0 -0
- /package/dist/es2019/tools/{get-components → get-all-components}/types.js +0 -0
- /package/dist/esm/tools/{get-components → get-all-components}/components.codegen.js +0 -0
- /package/dist/esm/tools/{get-components → get-all-components}/components.js +0 -0
- /package/dist/esm/tools/{get-components → get-all-components}/types.js +0 -0
- /package/dist/types/tools/{get-components → get-all-components}/components.codegen.d.ts +0 -0
- /package/dist/types/tools/{get-components → get-all-components}/components.d.ts +0 -0
- /package/dist/types/tools/{get-components → get-all-components}/load-all-components.d.ts +0 -0
- /package/dist/types/tools/{get-components → get-all-components}/types.d.ts +0 -0
- /package/dist/types-ts4.5/tools/{get-components → get-all-components}/components.codegen.d.ts +0 -0
- /package/dist/types-ts4.5/tools/{get-components → get-all-components}/components.d.ts +0 -0
- /package/dist/types-ts4.5/tools/{get-components → get-all-components}/load-all-components.d.ts +0 -0
- /package/dist/types-ts4.5/tools/{get-components → get-all-components}/types.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/ads-mcp
|
|
2
2
|
|
|
3
|
+
## 0.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a841a60987add`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a841a60987add) -
|
|
8
|
+
Overhaul search-icon, search-tokens, search-components, and plan tools to make empty messages, no
|
|
9
|
+
results, and fuzzy searching more consistent and better. Fixes token results such as border.radius
|
|
10
|
+
or font.size
|
|
11
|
+
|
|
12
|
+
## 0.18.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`1cd0ae6738030`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1cd0ae6738030) -
|
|
17
|
+
remove feature gate to use the most up to date components documentation
|
|
18
|
+
|
|
3
19
|
## 0.18.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ to help ensure your interfaces are accessible to all users.
|
|
|
54
54
|
|
|
55
55
|
- `ads_get_all_tokens` - Get all available design tokens for colors, spacing, typography, etc.
|
|
56
56
|
- `ads_search_tokens` - Search for specific design tokens by name, description, or example values
|
|
57
|
-
- `
|
|
57
|
+
- `ads_get_all_components` - Get all available components with basic information (full catalog)
|
|
58
58
|
- `ads_search_components` - Search for components by name, description, category, or package name
|
|
59
59
|
- `ads_get_all_icons` - Get all available icons from the design system
|
|
60
60
|
- `ads_search_icons` - Search for specific icons by name, keywords, or categorization
|
|
@@ -91,7 +91,7 @@ const designResources = await plan({
|
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
// Get all available items (fallback when search doesn't find what you need)
|
|
94
|
-
const allComponents = await
|
|
94
|
+
const allComponents = await get_all_components();
|
|
95
95
|
const allTokens = await get_all_tokens();
|
|
96
96
|
const allIcons = await get_all_icons();
|
|
97
97
|
```
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.computeMultiTermFuseAllocation = computeMultiTermFuseAllocation;
|
|
8
|
+
exports.mergeMultiTermFuseResults = mergeMultiTermFuseResults;
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
/**
|
|
14
|
+
* Allocation for multi-query Fuse search: each term alone, plus one spaced combined query.
|
|
15
|
+
*
|
|
16
|
+
* `poolMax = limit * termCount`. From each term we take up to `perTermTake` hits; the rest of the
|
|
17
|
+
* pool is filled from the spaced combined query.
|
|
18
|
+
*/
|
|
19
|
+
function computeMultiTermFuseAllocation(limit, termCount) {
|
|
20
|
+
if (termCount <= 1) return {
|
|
21
|
+
perTermTake: 1,
|
|
22
|
+
combinedTake: 0,
|
|
23
|
+
totalTake: 1
|
|
24
|
+
};
|
|
25
|
+
var perTermTake = Math.max(Math.round(limit / termCount), 1);
|
|
26
|
+
var combinedTake = Math.max(limit * termCount - termCount * perTermTake, 1);
|
|
27
|
+
var totalTake = Math.max(perTermTake * termCount + combinedTake, 1);
|
|
28
|
+
return {
|
|
29
|
+
perTermTake: perTermTake,
|
|
30
|
+
combinedTake: combinedTake,
|
|
31
|
+
totalTake: totalTake
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Runs `search` for each term (top `perTermTake`) and for `terms.join(' ')` (top `combinedTake`),
|
|
36
|
+
* merges pools, sorts globally by Fuse score, then returns the first `limit` **distinct** keys
|
|
37
|
+
* (later duplicate keys are skipped).
|
|
38
|
+
*
|
|
39
|
+
* Default `tokenKey` uses `item.name` when present; pass an explicit `tokenKey` for types without
|
|
40
|
+
* `name` (e.g. icons keyed by `componentName`).
|
|
41
|
+
*/
|
|
42
|
+
function mergeMultiTermFuseResults(_ref) {
|
|
43
|
+
var searchTerms = _ref.searchTerms,
|
|
44
|
+
limit = _ref.limit,
|
|
45
|
+
search = _ref.search,
|
|
46
|
+
_ref$tokenKey = _ref.tokenKey,
|
|
47
|
+
tokenKey = _ref$tokenKey === void 0 ? function (item) {
|
|
48
|
+
var _name;
|
|
49
|
+
return String((_name = item.name) !== null && _name !== void 0 ? _name : '');
|
|
50
|
+
} : _ref$tokenKey,
|
|
51
|
+
_ref$searchTermsJoin = _ref.searchTermsJoin,
|
|
52
|
+
searchTermsJoin = _ref$searchTermsJoin === void 0 ? ' ' : _ref$searchTermsJoin;
|
|
53
|
+
var n = searchTerms.length;
|
|
54
|
+
if (n === 0) {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
if (n === 1) {
|
|
58
|
+
return takeFirstUniqueKeys(sortByScoreAsc(toScoredHits(search(searchTerms[0]), tokenKey)), limit);
|
|
59
|
+
}
|
|
60
|
+
var _computeMultiTermFuse = computeMultiTermFuseAllocation(limit, n),
|
|
61
|
+
perTermTake = _computeMultiTermFuse.perTermTake,
|
|
62
|
+
combinedTake = _computeMultiTermFuse.combinedTake,
|
|
63
|
+
totalTake = _computeMultiTermFuse.totalTake;
|
|
64
|
+
var termsCombined = searchTerms.join(searchTermsJoin);
|
|
65
|
+
var pool = [];
|
|
66
|
+
var _iterator = _createForOfIteratorHelper(searchTerms),
|
|
67
|
+
_step;
|
|
68
|
+
try {
|
|
69
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
70
|
+
var term = _step.value;
|
|
71
|
+
pool.push.apply(pool, (0, _toConsumableArray2.default)(topRankedFromQuery(search, term, tokenKey, perTermTake)));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Combine the terms together and search as well.
|
|
75
|
+
} catch (err) {
|
|
76
|
+
_iterator.e(err);
|
|
77
|
+
} finally {
|
|
78
|
+
_iterator.f();
|
|
79
|
+
}
|
|
80
|
+
pool.push.apply(pool, (0, _toConsumableArray2.default)(topRankedFromQuery(search, termsCombined, tokenKey, combinedTake)));
|
|
81
|
+
|
|
82
|
+
// Grab the top combinations of all queries' results.
|
|
83
|
+
return takeFirstUniqueKeys(sortByScoreAsc(pool), totalTake);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Best `take` hits for one Fuse query (ranked by score, then slice).
|
|
88
|
+
*/
|
|
89
|
+
function topRankedFromQuery(search, query, tokenKey, take) {
|
|
90
|
+
return sortByScoreAsc(toScoredHits(search(query), tokenKey)).slice(0, take);
|
|
91
|
+
}
|
|
92
|
+
function toScoredHits(fuseHits, tokenKey) {
|
|
93
|
+
return fuseHits.map(function (hit) {
|
|
94
|
+
var _hit$score;
|
|
95
|
+
return {
|
|
96
|
+
item: hit.item,
|
|
97
|
+
score: (_hit$score = hit.score) !== null && _hit$score !== void 0 ? _hit$score : Number.POSITIVE_INFINITY,
|
|
98
|
+
key: tokenKey(hit.item)
|
|
99
|
+
};
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
function sortByScoreAsc(hits) {
|
|
103
|
+
return (0, _toConsumableArray2.default)(hits).sort(function (a, b) {
|
|
104
|
+
return a.score - b.score;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function takeFirstUniqueKeys(sortedHits, limit) {
|
|
108
|
+
var seen = new Set();
|
|
109
|
+
var out = [];
|
|
110
|
+
var _iterator2 = _createForOfIteratorHelper(sortedHits),
|
|
111
|
+
_step2;
|
|
112
|
+
try {
|
|
113
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
114
|
+
var h = _step2.value;
|
|
115
|
+
if (seen.has(h.key)) {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
seen.add(h.key);
|
|
119
|
+
out.push(h.item);
|
|
120
|
+
if (out.length >= limit) {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
} catch (err) {
|
|
125
|
+
_iterator2.e(err);
|
|
126
|
+
} finally {
|
|
127
|
+
_iterator2.f();
|
|
128
|
+
}
|
|
129
|
+
return out;
|
|
130
|
+
}
|
|
@@ -3,8 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.cleanQuery = void 0;
|
|
7
|
+
Object.defineProperty(exports, "computeMultiTermFuseAllocation", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _fuseMultiTerm.computeMultiTermFuseAllocation;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "mergeMultiTermFuseResults", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _fuseMultiTerm.mergeMultiTermFuseResults;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
exports.zodToJsonSchema = void 0;
|
|
7
20
|
var _zodToJsonSchema = require("zod-to-json-schema");
|
|
21
|
+
var _fuseMultiTerm = require("./fuse-multi-term");
|
|
8
22
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
9
23
|
|
|
10
24
|
var cleanQuery = exports.cleanQuery = function cleanQuery(query) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -16,14 +16,17 @@ var _validation = require("./helpers/validation");
|
|
|
16
16
|
var _instructions = require("./instructions");
|
|
17
17
|
var _analyzeA11y = require("./tools/analyze-a11y");
|
|
18
18
|
var _getA11yGuidelines = require("./tools/get-a11y-guidelines");
|
|
19
|
+
var _getAllComponents = require("./tools/get-all-components");
|
|
19
20
|
var _getAllIcons = require("./tools/get-all-icons");
|
|
20
21
|
var _getAllTokens = require("./tools/get-all-tokens");
|
|
21
|
-
var _getComponents = require("./tools/get-components");
|
|
22
22
|
var _getGuidelines = require("./tools/get-guidelines");
|
|
23
23
|
var _getLintRules = require("./tools/get-lint-rules");
|
|
24
24
|
var _i18nConversion = require("./tools/i18n-conversion");
|
|
25
25
|
var _migrationGuides = require("./tools/migration-guides");
|
|
26
26
|
var _plan = require("./tools/plan");
|
|
27
|
+
var _searchComponents = require("./tools/search-components");
|
|
28
|
+
var _searchIcons = require("./tools/search-icons");
|
|
29
|
+
var _searchTokens = require("./tools/search-tokens");
|
|
27
30
|
var _suggestA11yFixes = require("./tools/suggest-a11y-fixes");
|
|
28
31
|
/* eslint-disable no-console, import/extensions */
|
|
29
32
|
|
|
@@ -62,8 +65,8 @@ var generateLogger = function generateLogger(level) {
|
|
|
62
65
|
};
|
|
63
66
|
};
|
|
64
67
|
var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
65
|
-
var
|
|
66
|
-
|
|
68
|
+
var _ref;
|
|
69
|
+
return _ref = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref, _analyzeA11y.listAnalyzeA11yTool.name, {
|
|
67
70
|
handler: _analyzeA11y.analyzeA11yTool,
|
|
68
71
|
inputSchema: _analyzeA11y.analyzeA11yInputSchema,
|
|
69
72
|
tool: _analyzeA11y.listAnalyzeA11yTool
|
|
@@ -75,14 +78,26 @@ var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
|
75
78
|
handler: _getA11yGuidelines.getA11yGuidelinesTool,
|
|
76
79
|
inputSchema: _getA11yGuidelines.getA11yGuidelinesInputSchema,
|
|
77
80
|
tool: _getA11yGuidelines.listGetA11yGuidelinesTool
|
|
78
|
-
}),
|
|
79
|
-
handler:
|
|
81
|
+
}), _getAllComponents.listGetAllComponentsTool.name, {
|
|
82
|
+
handler: _getAllComponents.getAllComponentsTool,
|
|
80
83
|
inputSchema: null,
|
|
81
|
-
tool:
|
|
84
|
+
tool: _getAllComponents.listGetAllComponentsTool
|
|
82
85
|
}), _plan.listPlanTool.name, {
|
|
83
86
|
handler: _plan.planTool,
|
|
84
87
|
inputSchema: _plan.planInputSchema,
|
|
85
88
|
tool: _plan.listPlanTool
|
|
89
|
+
}), _searchComponents.listSearchComponentsTool.name, {
|
|
90
|
+
handler: _searchComponents.searchComponentsTool,
|
|
91
|
+
inputSchema: _searchComponents.searchComponentsInputSchema,
|
|
92
|
+
tool: _searchComponents.listSearchComponentsTool
|
|
93
|
+
}), _searchIcons.listSearchIconsTool.name, {
|
|
94
|
+
handler: _searchIcons.searchIconsTool,
|
|
95
|
+
inputSchema: _searchIcons.searchIconsInputSchema,
|
|
96
|
+
tool: _searchIcons.listSearchIconsTool
|
|
97
|
+
}), _searchTokens.listSearchTokensTool.name, {
|
|
98
|
+
handler: _searchTokens.searchTokensTool,
|
|
99
|
+
inputSchema: _searchTokens.searchTokensInputSchema,
|
|
100
|
+
tool: _searchTokens.listSearchTokensTool
|
|
86
101
|
}), _suggestA11yFixes.listSuggestA11yFixesTool.name, {
|
|
87
102
|
handler: _suggestA11yFixes.suggestA11yFixesTool,
|
|
88
103
|
inputSchema: _suggestA11yFixes.suggestA11yFixesInputSchema,
|
|
@@ -91,7 +106,7 @@ var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
|
91
106
|
handler: _migrationGuides.migrationGuidesTool,
|
|
92
107
|
inputSchema: _migrationGuides.migrationGuidesInputSchema,
|
|
93
108
|
tool: _migrationGuides.listMigrationGuidesTool
|
|
94
|
-
}), _i18nConversion.listI18nConversionTool.name, {
|
|
109
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ref, _i18nConversion.listI18nConversionTool.name, {
|
|
95
110
|
handler: _i18nConversion.i18nConversionTool,
|
|
96
111
|
inputSchema: _i18nConversion.i18nConversionInputSchema,
|
|
97
112
|
tool: _i18nConversion.listI18nConversionTool
|
|
@@ -103,7 +118,7 @@ var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
|
103
118
|
handler: _getAllTokens.getAllTokensTool,
|
|
104
119
|
inputSchema: null,
|
|
105
120
|
tool: _getAllTokens.listGetAllTokensTool
|
|
106
|
-
}),
|
|
121
|
+
}), _getAllIcons.listGetAllIconsTool.name, {
|
|
107
122
|
handler: _getAllIcons.getAllIconsTool,
|
|
108
123
|
inputSchema: null,
|
|
109
124
|
tool: _getAllIcons.listGetAllIconsTool
|
|
@@ -111,11 +126,10 @@ var getToolRegistry = exports.getToolRegistry = function getToolRegistry() {
|
|
|
111
126
|
handler: _getLintRules.getLintRulesTool,
|
|
112
127
|
inputSchema: _getLintRules.getLintRulesInputSchema,
|
|
113
128
|
tool: _getLintRules.listGetLintRulesTool
|
|
114
|
-
})
|
|
115
|
-
return baseTools;
|
|
129
|
+
});
|
|
116
130
|
};
|
|
117
131
|
server.setRequestHandler(_types.ListToolsRequestSchema, /*#__PURE__*/function () {
|
|
118
|
-
var
|
|
132
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(request, extra) {
|
|
119
133
|
var toolRegistry, tools;
|
|
120
134
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
121
135
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -144,13 +158,13 @@ server.setRequestHandler(_types.ListToolsRequestSchema, /*#__PURE__*/function ()
|
|
|
144
158
|
}, _callee);
|
|
145
159
|
}));
|
|
146
160
|
return function (_x, _x2) {
|
|
147
|
-
return
|
|
161
|
+
return _ref2.apply(this, arguments);
|
|
148
162
|
};
|
|
149
163
|
}());
|
|
150
164
|
|
|
151
165
|
// Handle tool execution
|
|
152
166
|
server.setRequestHandler(_types.CallToolRequestSchema, /*#__PURE__*/function () {
|
|
153
|
-
var
|
|
167
|
+
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(request, extra) {
|
|
154
168
|
var toolRegistry, toolName, toolConfig, actionSubject, toolArguments, inputValidation, result, toolRegistryForError;
|
|
155
169
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
156
170
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -258,7 +272,7 @@ server.setRequestHandler(_types.CallToolRequestSchema, /*#__PURE__*/function ()
|
|
|
258
272
|
}, _callee2, null, [[6, 20]]);
|
|
259
273
|
}));
|
|
260
274
|
return function (_x3, _x4) {
|
|
261
|
-
return
|
|
275
|
+
return _ref3.apply(this, arguments);
|
|
262
276
|
};
|
|
263
277
|
}());
|
|
264
278
|
function runServer() {
|
package/dist/cjs/instructions.js
CHANGED
|
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.instructions = void 0;
|
|
7
|
-
var instructions = exports.instructions = "\nYou are an expert in the Atlassian Design System (ADS).\nYou can search for tokens, icons, and components and return guidance on how to build user interfaces.\nYou have special accessibility knowledge and can ensure interfaces built with ADS components are accessible to all users.\nYou can analyze code for accessibility violations, provide specific fix suggestions, and offer guidance on accessibility best practices.\nThese tools will support you, but for deep research
|
|
7
|
+
var instructions = exports.instructions = "\nYou are an expert in the Atlassian Design System (ADS).\nYou can search for tokens, icons, and components and return guidance on how to build user interfaces.\nYou have special accessibility knowledge and can ensure interfaces built with ADS components are accessible to all users.\nYou can analyze code for accessibility violations, provide specific fix suggestions, and offer guidance on accessibility best practices.\nFor org-wide standards alongside ADS tools: pair Context Engine `get_accessibility_docs` with `ads_get_a11y_guidelines`, `get_content_standards_docs` with `ads_get_guidelines`, and `get_i18n_docs` with `ads_i18n_conversion_guide` (Traduki/i18n policy plus the bundled formatMessage refactor guide).\nThese tools will support you, but for deep research you may also fetch https://atlassian.design/llms.txt, https://atlassian.design/llms-a11y.txt, or https://atlassian.design/ directly.\n";
|
|
@@ -17,16 +17,16 @@ var _helpers = require("../../helpers");
|
|
|
17
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
19
19
|
var analyzeA11yInputSchema = exports.analyzeA11yInputSchema = _zod.z.object({
|
|
20
|
-
code: _zod.z.string().describe('React component
|
|
21
|
-
componentName: _zod.z.string().describe('
|
|
22
|
-
context: _zod.z.string().describe('
|
|
23
|
-
includePatternAnalysis: _zod.z.boolean().default(true).describe('
|
|
20
|
+
code: _zod.z.string().describe('Source code of a React component or JSX snippet to analyze (string content only—no file path).'),
|
|
21
|
+
componentName: _zod.z.string().optional().describe('Optional label for the component under review (for summaries and reports).'),
|
|
22
|
+
context: _zod.z.string().optional().describe('Optional: how the component is used (e.g. in a form, modal) to improve suggestions.'),
|
|
23
|
+
includePatternAnalysis: _zod.z.boolean().default(true).describe('When true (default), runs regex-based heuristics on the code string (e.g. unlabeled buttons, missing alt) in addition to other analysis.').optional()
|
|
24
24
|
});
|
|
25
25
|
var listAnalyzeA11yTool = exports.listAnalyzeA11yTool = {
|
|
26
26
|
name: 'ads_analyze_a11y',
|
|
27
|
-
description:
|
|
27
|
+
description: "Analyzes a **string of React/JSX** code for likely accessibility issues (heuristics and/or axe-related paths) and returns hints that often **point to** `ads_suggest_a11y_fixes` or generic axe/WCAG-style context\u2014not every finding maps to a specific ADS component fix.\n\nWHEN TO USE:\nYou have component source as text and want automated checks or heuristics before or during a code review.\n\nLIMITATIONS:\n- Does not replace testing in a real browser with assistive technologies or full keyboard traversal.\n- For rendered UI, `ads_analyze_localhost_a11y` (live URL + axe) is preferable when available\u2014it is **only exposed when this MCP runs locally**, not in the remote MCP deployment.",
|
|
28
28
|
annotations: {
|
|
29
|
-
title: 'Analyze
|
|
29
|
+
title: 'Analyze accessibility (code string)',
|
|
30
30
|
readOnlyHint: true,
|
|
31
31
|
destructiveHint: false,
|
|
32
32
|
idempotentHint: true,
|
|
@@ -35,16 +35,16 @@ var listAnalyzeA11yTool = exports.listAnalyzeA11yTool = {
|
|
|
35
35
|
inputSchema: (0, _helpers.zodToJsonSchema)(analyzeA11yInputSchema)
|
|
36
36
|
};
|
|
37
37
|
var analyzeA11yLocalhostInputSchema = exports.analyzeA11yLocalhostInputSchema = _zod.z.object({
|
|
38
|
-
url: _zod.z.string().describe('
|
|
39
|
-
componentName: _zod.z.string().optional().describe('
|
|
40
|
-
context: _zod.z.string().optional().describe('
|
|
41
|
-
selector: _zod.z.string().optional().describe('CSS selector to
|
|
38
|
+
url: _zod.z.string().describe('Fully qualified page URL to load (e.g. `http://localhost:9000` or a dev URL). Must be reachable from this MCP process.'),
|
|
39
|
+
componentName: _zod.z.string().optional().describe('Optional label for reporting (e.g. feature or component under test).'),
|
|
40
|
+
context: _zod.z.string().optional().describe('Optional: route, user flow, or feature context for the analyzed page.'),
|
|
41
|
+
selector: _zod.z.string().optional().describe('Optional CSS selector to scope axe analysis to a subtree (e.g. `#my-form`, `[data-testid="panel"]`). Omit to analyze the whole document.')
|
|
42
42
|
});
|
|
43
43
|
var listAnalyzeLocalhostA11yTool = exports.listAnalyzeLocalhostA11yTool = {
|
|
44
44
|
name: 'ads_analyze_localhost_a11y',
|
|
45
|
-
description: "
|
|
45
|
+
description: "Loads a **live URL** in a headless browser, runs **axe-core**, and returns violations with follow-up hints (often suggesting `ads_suggest_a11y_fixes`). Output is anchored in **axe** rule text; remediation may be generic or ADS-biased depending on the violation.\n\n**Availability:** This tool is only registered when the ADS MCP runs **on your machine** (local MCP). It is **not** available in the **remote** MCP offering\u2014use `ads_analyze_a11y` on source text there instead.\n\nWHEN TO USE:\nYou have a running app or storybook page and need automated accessibility results on **rendered** UI\u2014especially local or staging URLs.\n\nLIMITATIONS:\n- Does not replace manual testing with assistive technologies or keyboard-only navigation.\n- Requires network access to the URL from the environment running the MCP.",
|
|
46
46
|
annotations: {
|
|
47
|
-
title: 'Analyze
|
|
47
|
+
title: 'Analyze accessibility (live URL)',
|
|
48
48
|
readOnlyHint: true,
|
|
49
49
|
destructiveHint: false,
|
|
50
50
|
idempotentHint: true,
|
|
@@ -15,13 +15,13 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
16
16
|
var topics = Object.keys(_guidelines.accessibilityGuidelines);
|
|
17
17
|
var getA11yGuidelinesInputSchema = exports.getA11yGuidelinesInputSchema = _zod.z.object({
|
|
18
|
-
topic: _zod.z.string().optional().describe('
|
|
18
|
+
topic: _zod.z.string().optional().describe('ADS accessibility topic key. Omit to receive all topics and the full guideline bundle. Pass a valid key (see response \`availableTopics\`) or \`general\` for a focused overview when supported. Known topics: ' + topics.join(', ') + '.')
|
|
19
19
|
});
|
|
20
20
|
var listGetA11yGuidelinesTool = exports.listGetA11yGuidelinesTool = {
|
|
21
21
|
name: 'ads_get_a11y_guidelines',
|
|
22
|
-
description:
|
|
22
|
+
description: "Returns Atlassian Design System (ADS) accessibility guidance: best practices and patterns for buttons, interactions, color contrast, forms, and other design-system topics shipped in this tool.\n\nUse this alongside the Context Engine MCP tool `get_accessibility_docs` for Atlassian-wide accessibility standards (e.g. A11YKB); this tool supplies ADS-specific component and pattern guidance.\n\nWHEN TO USE:\nYou MUST call this when generating or substantially changing a new interactive or visual user interface built with ADS, or when you need topic-specific ADS guidance (e.g. focus, forms, motion).\n\nDO NOT rely on generic web accessibility advice alone\u2014ADS conventions may differ. Use `get_accessibility_docs` for org-wide standards and this tool for ADS-topic guidance.",
|
|
23
23
|
annotations: {
|
|
24
|
-
title: 'Get
|
|
24
|
+
title: 'Get ADS accessibility guidelines',
|
|
25
25
|
readOnlyHint: true,
|
|
26
26
|
destructiveHint: false,
|
|
27
27
|
idempotentHint: true,
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.listGetAllComponentsTool = exports.getAllComponentsTool = void 0;
|
|
8
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
10
|
var _zod = require("zod");
|
|
@@ -12,9 +12,9 @@ var _helpers = require("../../helpers");
|
|
|
12
12
|
var _loadAllComponents = require("./load-all-components");
|
|
13
13
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
name: '
|
|
17
|
-
description: "
|
|
15
|
+
var listGetAllComponentsTool = exports.listGetAllComponentsTool = {
|
|
16
|
+
name: 'ads_get_all_components',
|
|
17
|
+
description: "Returns **every** Atlassian Design System component record as separate JSON text chunks (full catalog; large payload).\n\nWHEN TO USE:\nLast resort when `ads_plan` / `ads_search_components` is insufficient and you must enumerate all components. Prefer search for normal component picking.\n\nNo parameters.",
|
|
18
18
|
annotations: {
|
|
19
19
|
title: 'Get all ADS components',
|
|
20
20
|
readOnlyHint: true,
|
|
@@ -24,7 +24,7 @@ var listGetComponentsTool = exports.listGetComponentsTool = {
|
|
|
24
24
|
},
|
|
25
25
|
inputSchema: (0, _helpers.zodToJsonSchema)(_zod.z.object({}))
|
|
26
26
|
};
|
|
27
|
-
var
|
|
27
|
+
var getAllComponentsTool = exports.getAllComponentsTool = /*#__PURE__*/function () {
|
|
28
28
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
29
29
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
30
30
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -45,7 +45,7 @@ var getComponentsTool = exports.getComponentsTool = /*#__PURE__*/function () {
|
|
|
45
45
|
}
|
|
46
46
|
}, _callee);
|
|
47
47
|
}));
|
|
48
|
-
return function
|
|
48
|
+
return function getAllComponentsTool() {
|
|
49
49
|
return _ref.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
}();
|
|
@@ -14,7 +14,7 @@ var _icons = require("./icons");
|
|
|
14
14
|
|
|
15
15
|
var listGetAllIconsTool = exports.listGetAllIconsTool = {
|
|
16
16
|
name: 'ads_get_all_icons',
|
|
17
|
-
description: "
|
|
17
|
+
description: "Returns **every** ADS icon record as separate JSON text chunks (full catalog; large payload).\n\nWHEN TO USE:\nLast resort when `ads_plan` / `ads_search_icons` is insufficient and you must enumerate all icons. Prefer search for normal icon picking.\n\nNo parameters.",
|
|
18
18
|
annotations: {
|
|
19
19
|
title: 'Get all ADS icons',
|
|
20
20
|
readOnlyHint: true,
|
|
@@ -15,7 +15,7 @@ var _helpers = require("../../helpers");
|
|
|
15
15
|
var inputSchema = _zod.z.object({});
|
|
16
16
|
var listGetAllTokensTool = exports.listGetAllTokensTool = {
|
|
17
17
|
name: 'ads_get_all_tokens',
|
|
18
|
-
description: "
|
|
18
|
+
description: "Returns **every** ADS design token from bundled metadata (name, example value, usage guidelines)\u2014one JSON object per token, **very large** output.\n\nWHEN TO USE:\nLast resort when `ads_plan` / `ads_search_tokens` cannot answer the question and you need the full list (e.g. exhaustive audit). Prefer targeted search for normal development.\n\nNo parameters.",
|
|
19
19
|
annotations: {
|
|
20
20
|
title: 'Get all ADS tokens',
|
|
21
21
|
readOnlyHint: true,
|
|
@@ -14,14 +14,14 @@ var _guidelinesStructuredContent = require("./guidelines-structured-content.code
|
|
|
14
14
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
15
15
|
|
|
16
16
|
var getGuidelinesInputSchema = exports.getGuidelinesInputSchema = _zod.z.object({
|
|
17
|
-
terms: _zod.z.array(_zod.z.string()).default([]).describe('
|
|
18
|
-
limit: _zod.z.number().default(1).describe('
|
|
17
|
+
terms: _zod.z.array(_zod.z.string()).default([]).describe('Search terms matched against guideline keywords and body (fuzzy). Examples: `["empty state", "voice tone"]`, `["color tokens", "spacing"]`, `["elevation", "grid"]`. Omit or use an empty array to return **all** guidelines as Markdown.').optional(),
|
|
18
|
+
limit: _zod.z.number().default(1).describe('Max matches **per term** when `terms` is non-empty (default 1). Ignored when returning all guidelines.').optional()
|
|
19
19
|
});
|
|
20
20
|
var listGetGuidelinesTool = exports.listGetGuidelinesTool = {
|
|
21
21
|
name: 'ads_get_guidelines',
|
|
22
|
-
description: "
|
|
22
|
+
description: "Returns Atlassian Design System (ADS) **foundations** guidelines as Markdown: the bundled design-system-docs foundations set (not component API docs).\n\nTOPIC COVERAGE:\n- **Content & UX writing**: messaging types (empty state, error, success, warning, info, feature discovery), voice and tone, inclusive language, grammar and style, date/time copy handoff, vocabulary pointers.\n- **Visual foundations**: color (roles, accents, palette, charts, pickers), borders and radius, elevation and z-index, spacing and layout primitives (box/inline/stack), grid, iconography, logos.\n- **Design tokens**: concepts, themes, migration, using tokens in code and in Figma.\n- **Typography**: typefaces, scale, applying text styles and tokens.\n- **Accessibility overview**: building accessible apps and related foundations pages bundled here.\n\nWhen working with content, use this tool alongside the Context Engine MCP tool `get_content_standards_docs` for Atlassian-wide content standards (CDSTD/BAIT-style org guidance); this tool supplies ADS-specific foundations.\n\nWHAT YOU GET:\n- With `terms`: fuzzy search over keywords and content; concatenated Markdown for matches.\n- Without `terms` (or empty): the full guideline set as Markdown.\n\nWHEN TO USE:\nUse this when you are **building or updating a visual interface**, **writing or reviewing user-facing copy**, or need to **answer foundations questions** about ADS: content patterns, visual appearance, design tokens, typography, spacing, color, grid, motion, and related topics shipped in this bundle.\n\nIt is **not** for picking a component\u2019s props or package (use `ads_plan` / `ads_search_components`) or for interactive accessibility rules and patterns (use `ads_get_a11y_guidelines`, with Context Engine `get_accessibility_docs` for org-wide a11y standards).",
|
|
23
23
|
annotations: {
|
|
24
|
-
title: 'Get ADS guidelines',
|
|
24
|
+
title: 'Get ADS guidelines (content, a11y, visual design, design tokens, typography)',
|
|
25
25
|
readOnlyHint: true,
|
|
26
26
|
destructiveHint: false,
|
|
27
27
|
idempotentHint: true,
|
|
@@ -14,15 +14,15 @@ var _lintRulesStructuredContent = require("./lint-rules-structured-content.codeg
|
|
|
14
14
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
15
15
|
|
|
16
16
|
var getLintRulesInputSchema = exports.getLintRulesInputSchema = _zod.z.object({
|
|
17
|
-
terms: _zod.z.array(_zod.z.string()).default([]).describe('
|
|
18
|
-
limit: _zod.z.number().default(1).describe('
|
|
19
|
-
exactName: _zod.z.boolean().default(false).describe('
|
|
17
|
+
terms: _zod.z.array(_zod.z.string()).default([]).describe('Search terms matched against rule name, description, and docs body (fuzzy unless \`exactName\` is true). Example: `["icon-label", "xcss", "design token"]`. Omit or empty: return **all** rules as JSON.').optional(),
|
|
18
|
+
limit: _zod.z.number().default(1).describe('Max matches **per term** when searching (default 1). Not used when returning all rules.').optional(),
|
|
19
|
+
exactName: _zod.z.boolean().default(false).describe('If true, resolve each term by **exact** ESLint rule name (case-insensitive). If false, fuzzy search across name, description, and content.').optional()
|
|
20
20
|
});
|
|
21
21
|
var listGetLintRulesTool = exports.listGetLintRulesTool = {
|
|
22
22
|
name: 'ads_get_lint_rules',
|
|
23
|
-
description: "
|
|
23
|
+
description: "Returns documentation for **Constellation** (Atlassian Design System) ESLint rules shipped with this MCP\u2014rule purpose, examples, and fixes where available.\n\nWHAT YOU GET:\n- No `terms`: JSON array of all rule payloads.\n- With `terms`: fuzzy search (or exact rule name when `exactName` is true); JSON for one or more matching rules.\n\nWHEN TO USE:\nExplaining or fixing an ESLint message from ADS rules (e.g. `icon-label`, `ensure-proper-xcss-usage`, `no-deprecated-apis`), or browsing rule docs without opening the repo. Prefer this over guessing from rule id alone.\n\nThis tool does not run ESLint; it only returns bundled documentation.",
|
|
24
24
|
annotations: {
|
|
25
|
-
title: 'Get ADS
|
|
25
|
+
title: 'Get ADS ESLint rule docs',
|
|
26
26
|
readOnlyHint: true,
|
|
27
27
|
destructiveHint: false,
|
|
28
28
|
idempotentHint: true,
|
|
@@ -13,13 +13,13 @@ var _guide = require("./guide");
|
|
|
13
13
|
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
14
14
|
|
|
15
15
|
var i18nConversionInputSchema = exports.i18nConversionInputSchema = _zod.z.object({
|
|
16
|
-
guide: _zod.z.enum(['hardcoded-string-to-formatmessage']).describe('
|
|
16
|
+
guide: _zod.z.enum(['hardcoded-string-to-formatmessage']).describe('Which bundled guide to return. Currently only `hardcoded-string-to-formatmessage` (JSX literals → `formatMessage` / intl patterns).')
|
|
17
17
|
});
|
|
18
18
|
var listI18nConversionTool = exports.listI18nConversionTool = {
|
|
19
19
|
name: 'ads_i18n_conversion_guide',
|
|
20
|
-
description: "
|
|
20
|
+
description: "Returns a **bundled** step-by-step guide for replacing hardcoded UI strings with `formatMessage` (and related patterns) using @atlassian/jira-intl or react-intl-next: message constants, placeholders, descriptions, and scope/limitations for systematic refactors.\n\nWhen working with i18n or hardcoded UI strings, use this tool alongside the Context Engine MCP tool `get_i18n_docs` for Atlassian-wide Traduki / i18n standards (message definition, extraction, pluralisation, formatting, workflow); this tool supplies the concrete hardcoded-string \u2192 `formatMessage` playbook bundled in ADS MCP.\n\nWHEN TO USE / TYPICAL TRIGGERS:\n- Refactoring JSX or TS literals to i18n; \"fix hardcoded string(s)\", \"convert hardcoded string in [file]\", \"literal string in JSX\".\n- \"Convert to i18n\", \"convert to formatMessage\", \"translate this string\", \"internationalize this string\", \"i18n this string\".\n- \"Use formatMessage\", \"use FormattedMessage\", \"wrap in formatMessage\", \"fix literal string\".\n- ESLint: `Literal string in JSX content should be internationalized. Use FormattedMessage or intl.formatMessage()`.\n- ESLint: `@atlassian/i18n/no-literal-string-in-jsx`.",
|
|
21
21
|
annotations: {
|
|
22
|
-
title: 'i18n
|
|
22
|
+
title: 'i18n conversion guide',
|
|
23
23
|
readOnlyHint: true,
|
|
24
24
|
destructiveHint: false,
|
|
25
25
|
idempotentHint: true,
|
|
@@ -16,12 +16,12 @@ var _registry = require("./registry");
|
|
|
16
16
|
var migrationIds = (0, _registry.getAvailableMigrationIds)();
|
|
17
17
|
var migrationDescriptions = (0, _registry.getAvailableMigrationsDescription)();
|
|
18
18
|
var migrationGuidesInputSchema = exports.migrationGuidesInputSchema = _zod.z.object({
|
|
19
|
-
migration: _zod.z.enum(migrationIds).describe(
|
|
20
|
-
description: _zod.z.enum(migrationDescriptions).describe(
|
|
19
|
+
migration: _zod.z.enum(migrationIds).describe('Migration id from the registry. Must match the guide you want (see tool description list).'),
|
|
20
|
+
description: _zod.z.enum(migrationDescriptions).describe('Human-readable migration label that pairs with `migration` in the schema—choose the entry that matches the selected id.')
|
|
21
21
|
});
|
|
22
22
|
var listMigrationGuidesTool = exports.listMigrationGuidesTool = {
|
|
23
23
|
name: 'ads_migration_guides',
|
|
24
|
-
description: "
|
|
24
|
+
description: "Returns a structured Atlassian Design System (ADS) **migration guide** for a known package or API migration (before/after examples, best practices, links).\n\nWHEN TO USE:\nYou are upgrading or refactoring code between ADS packages or APIs and need the official migration pattern for a specific id listed below.\n\nPass **both** `migration` and `description` using a **matching pair** from the enum (schema enforces valid combinations).\n\nAvailable migrations:\n".concat((0, _registry.getAvailableMigrationsDescription)()),
|
|
25
25
|
annotations: {
|
|
26
26
|
title: 'ADS Migration Guides',
|
|
27
27
|
readOnlyHint: true,
|