@atlaskit/ads-mcp 0.21.1 → 1.1.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 +37 -0
- package/a11y-fixes/package.json +1 -8
- package/a11y-guidelines/package.json +1 -8
- package/dist/cjs/index.js +27 -1
- package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
- package/dist/cjs/tools/get-all-components/types.js +5 -1
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
- package/dist/cjs/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +206 -0
- package/dist/cjs/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +40 -0
- package/dist/cjs/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +22 -0
- package/dist/cjs/tools/get-atlaskit-hooks/types.js +5 -0
- package/dist/cjs/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +836 -0
- package/dist/cjs/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +40 -0
- package/dist/cjs/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +22 -0
- package/dist/cjs/tools/get-atlaskit-utilities/types.js +5 -0
- package/dist/cjs/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
- package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
- package/dist/cjs/tools/i18n-conversion/guide.js +7 -7
- package/dist/cjs/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
- package/dist/cjs/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +22 -0
- package/dist/cjs/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +11 -0
- package/dist/cjs/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +109 -0
- package/dist/cjs/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +22 -0
- package/dist/cjs/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +11 -0
- package/dist/cjs/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +111 -0
- package/dist/cjs/tools/types.js +1 -0
- package/dist/es2019/index.js +30 -0
- package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
- package/dist/es2019/tools/get-all-components/types.js +1 -0
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
- package/dist/es2019/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +200 -0
- package/dist/es2019/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +14 -0
- package/dist/es2019/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +21 -0
- package/dist/es2019/tools/get-atlaskit-hooks/types.js +1 -0
- package/dist/es2019/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +830 -0
- package/dist/es2019/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +14 -0
- package/dist/es2019/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +21 -0
- package/dist/es2019/tools/get-atlaskit-utilities/types.js +1 -0
- package/dist/es2019/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
- package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
- package/dist/es2019/tools/i18n-conversion/guide.js +7 -7
- package/dist/es2019/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
- package/dist/es2019/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +19 -0
- package/dist/es2019/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +5 -0
- package/dist/es2019/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +79 -0
- package/dist/es2019/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +19 -0
- package/dist/es2019/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +5 -0
- package/dist/es2019/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +81 -0
- package/dist/es2019/tools/types.js +0 -0
- package/dist/esm/index.js +27 -1
- package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
- package/dist/esm/tools/get-all-components/types.js +1 -0
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
- package/dist/esm/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +200 -0
- package/dist/esm/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +32 -0
- package/dist/esm/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +16 -0
- package/dist/esm/tools/get-atlaskit-hooks/types.js +1 -0
- package/dist/esm/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +830 -0
- package/dist/esm/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +32 -0
- package/dist/esm/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +16 -0
- package/dist/esm/tools/get-atlaskit-utilities/types.js +1 -0
- package/dist/esm/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
- package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
- package/dist/esm/tools/i18n-conversion/guide.js +7 -7
- package/dist/esm/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
- package/dist/esm/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +16 -0
- package/dist/esm/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +5 -0
- package/dist/esm/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +102 -0
- package/dist/esm/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +16 -0
- package/dist/esm/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +5 -0
- package/dist/esm/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +106 -0
- package/dist/esm/tools/types.js +0 -0
- package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
- package/dist/types/tools/get-all-components/types.d.ts +2 -1
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +1 -1
- package/dist/types/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.d.ts +10 -0
- package/dist/{types-ts4.5/tools/get-all-tokens/get-all-tokens-tool.d.ts → types/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.d.ts} +1 -1
- package/dist/{types-ts4.5/tools/analyze-a11y/list-analyze-a11y-tool.d.ts → types/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.d.ts} +1 -1
- package/dist/types/tools/get-atlaskit-hooks/types.d.ts +14 -0
- package/dist/types/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.d.ts +10 -0
- package/dist/{types-ts4.5/tools/get-all-components/get-all-components-tool.d.ts → types/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.d.ts} +1 -1
- package/dist/{types-ts4.5/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts → types/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.d.ts} +1 -1
- package/dist/types/tools/get-atlaskit-utilities/types.d.ts +41 -0
- package/dist/types/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +1 -1
- package/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +1 -1
- package/dist/{types-ts4.5/tools/get-all-icons/list-get-all-icons-tool.d.ts → types/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.d.ts} +1 -1
- package/dist/{types-ts4.5/tools/search-tokens/search-tokens-input-schema.d.ts → types/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.d.ts} +1 -1
- package/dist/types/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.d.ts +4 -0
- package/dist/{types-ts4.5/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts → types/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.d.ts} +1 -1
- package/dist/{types-ts4.5/tools/search-components/search-components-input-schema.d.ts → types/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.d.ts} +1 -1
- package/dist/types/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.d.ts +4 -0
- package/dist/types/tools/types.d.ts +12 -0
- package/i18n-conversion-guide/package.json +1 -8
- package/migration-registry/package.json +1 -8
- package/package.json +5 -13
- package/tools/analyze-a11y/package.json +1 -8
- package/tools/get-a11y-guidelines/package.json +1 -8
- package/tools/get-all-components/package.json +1 -8
- package/tools/get-all-icons/package.json +1 -8
- package/tools/get-all-tokens/package.json +1 -8
- package/tools/get-guidelines/package.json +1 -8
- package/tools/get-lint-rules/package.json +1 -8
- package/tools/i18n-conversion/package.json +1 -8
- package/tools/migration-guides/package.json +1 -8
- package/tools/plan/package.json +1 -8
- package/tools/search-components/package.json +1 -8
- package/tools/search-icons/package.json +1 -8
- package/tools/search-tokens/package.json +1 -8
- package/tools/suggest-a11y-fixes/package.json +1 -8
- package/dist/types-ts4.5/entry-points/a11y-fixes.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/a11y-guidelines.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/analyze-a11y.d.ts +0 -5
- package/dist/types-ts4.5/entry-points/get-a11y-guidelines.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/get-all-components.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/get-all-icons.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/get-all-tokens.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/get-atlaskit-components.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/get-guidelines.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/get-lint-rules.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/i18n-conversion-guide.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/i18n-conversion.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/migration-guides.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/migration-registry.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/plan.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/search-atlaskit-components.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/search-components.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/search-icons.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/search-tokens.d.ts +0 -3
- package/dist/types-ts4.5/entry-points/suggest-a11y-fixes.d.ts +0 -3
- package/dist/types-ts4.5/helpers/agent.d.ts +0 -3
- package/dist/types-ts4.5/helpers/analytics.d.ts +0 -21
- package/dist/types-ts4.5/helpers/clean-query.d.ts +0 -1
- package/dist/types-ts4.5/helpers/compute-multi-term-fuse-allocation.d.ts +0 -14
- package/dist/types-ts4.5/helpers/config-path.d.ts +0 -7
- package/dist/types-ts4.5/helpers/fuse-multi-term.d.ts +0 -26
- package/dist/types-ts4.5/helpers/index.d.ts +0 -3
- package/dist/types-ts4.5/helpers/send-operational-event.d.ts +0 -13
- package/dist/types-ts4.5/helpers/staff-id.d.ts +0 -1
- package/dist/types-ts4.5/helpers/validation.d.ts +0 -26
- package/dist/types-ts4.5/helpers/zod-to-json-schema.d.ts +0 -3
- package/dist/types-ts4.5/index.d.ts +0 -7
- package/dist/types-ts4.5/instructions.d.ts +0 -1
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +0 -17
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +0 -17
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +0 -1
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +0 -8
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/get-a11y-guidelines/guidelines.d.ts +0 -102
- package/dist/types-ts4.5/tools/get-all-components/components.codegen.d.ts +0 -10
- package/dist/types-ts4.5/tools/get-all-components/components.d.ts +0 -10
- package/dist/types-ts4.5/tools/get-all-components/list-get-all-components-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/get-all-components/load-all-components.d.ts +0 -2
- package/dist/types-ts4.5/tools/get-all-components/types.d.ts +0 -26
- package/dist/types-ts4.5/tools/get-all-icons/get-all-icons-tool.d.ts +0 -6
- package/dist/types-ts4.5/tools/get-all-icons/icons.d.ts +0 -11
- package/dist/types-ts4.5/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +0 -10
- package/dist/types-ts4.5/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +0 -6
- package/dist/types-ts4.5/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-input-schema.d.ts +0 -5
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +0 -13
- package/dist/types-ts4.5/tools/get-guidelines/list-get-guidelines-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +0 -6
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-tool.d.ts +0 -4
- package/dist/types-ts4.5/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +0 -13
- package/dist/types-ts4.5/tools/get-lint-rules/list-get-lint-rules-tool.d.ts +0 -19
- package/dist/types-ts4.5/tools/i18n-conversion/guide.d.ts +0 -5
- package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-input-schema.d.ts +0 -10
- package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/i18n-conversion/types.d.ts +0 -22
- package/dist/types-ts4.5/tools/migration-guides/get-available-migration-ids.d.ts +0 -12
- package/dist/types-ts4.5/tools/migration-guides/get-available-migrations-description.d.ts +0 -13
- package/dist/types-ts4.5/tools/migration-guides/list-migration-guides-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/migration-guides-input-schema.d.ts +0 -15
- package/dist/types-ts4.5/tools/migration-guides/migration-guides-tool.d.ts +0 -8
- package/dist/types-ts4.5/tools/migration-guides/migration-registry.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-multi-step.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-single-step.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-with-motion.d.ts +0 -2
- package/dist/types-ts4.5/tools/migration-guides/types.d.ts +0 -23
- package/dist/types-ts4.5/tools/plan/list-plan-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/plan/plan-input-schema.d.ts +0 -20
- package/dist/types-ts4.5/tools/plan/plan-tool.d.ts +0 -15
- package/dist/types-ts4.5/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +0 -11
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +0 -4
- package/dist/types-ts4.5/tools/search-components/list-search-components-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/search-components/search-components-tool.d.ts +0 -4
- package/dist/types-ts4.5/tools/search-icons/list-search-icons-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/search-icons/search-icons-input-schema.d.ts +0 -11
- package/dist/types-ts4.5/tools/search-icons/search-icons-tool.d.ts +0 -4
- package/dist/types-ts4.5/tools/search-tokens/list-search-tokens-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/search-tokens/search-tokens-tool.d.ts +0 -4
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/fixes.d.ts +0 -17
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/keywords.d.ts +0 -12
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +0 -2
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.d.ts +0 -17
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +0 -8
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.searchAtlaskitHooksTool = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _fuse = _interopRequireDefault(require("fuse.js"));
|
|
12
|
+
var _helpers = require("../../helpers");
|
|
13
|
+
var _atlaskitHooks = require("../get-atlaskit-hooks/atlaskit-hooks.codegen");
|
|
14
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
15
|
+
|
|
16
|
+
var buildHookResult = function buildHookResult(result) {
|
|
17
|
+
return {
|
|
18
|
+
name: result.name,
|
|
19
|
+
package: result.package,
|
|
20
|
+
description: result.description,
|
|
21
|
+
usageGuidelines: result.usageGuidelines,
|
|
22
|
+
keywords: result.keywords,
|
|
23
|
+
category: result.category,
|
|
24
|
+
parameters: result.parameters,
|
|
25
|
+
returns: result.returns
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
var searchAtlaskitHooksTool = exports.searchAtlaskitHooksTool = /*#__PURE__*/function () {
|
|
29
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
|
|
30
|
+
var terms, _ref$limit, limit, searchTerms, hooks, fuse, matchedItems;
|
|
31
|
+
return _regenerator.default.wrap(function (_context) {
|
|
32
|
+
while (1) switch (_context.prev = _context.next) {
|
|
33
|
+
case 0:
|
|
34
|
+
terms = _ref.terms, _ref$limit = _ref.limit, limit = _ref$limit === void 0 ? 2 : _ref$limit;
|
|
35
|
+
searchTerms = (0, _toConsumableArray2.default)(new Set(terms.filter(Boolean).map(_helpers.cleanQuery)));
|
|
36
|
+
if (searchTerms.length) {
|
|
37
|
+
_context.next = 1;
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
return _context.abrupt("return", {
|
|
41
|
+
content: [{
|
|
42
|
+
type: 'text',
|
|
43
|
+
text: '[]'
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
46
|
+
case 1:
|
|
47
|
+
hooks = _atlaskitHooks.atlaskitHooks;
|
|
48
|
+
fuse = new _fuse.default(hooks, {
|
|
49
|
+
keys: [{
|
|
50
|
+
name: 'name',
|
|
51
|
+
weight: 5
|
|
52
|
+
}, {
|
|
53
|
+
name: 'package',
|
|
54
|
+
weight: 3
|
|
55
|
+
}, {
|
|
56
|
+
name: 'category',
|
|
57
|
+
weight: 2
|
|
58
|
+
}, {
|
|
59
|
+
name: 'description',
|
|
60
|
+
weight: 2
|
|
61
|
+
}, {
|
|
62
|
+
name: 'keywords',
|
|
63
|
+
weight: 2
|
|
64
|
+
}, {
|
|
65
|
+
name: 'usageGuidelines',
|
|
66
|
+
weight: 2
|
|
67
|
+
}],
|
|
68
|
+
threshold: 0.4,
|
|
69
|
+
distance: 80,
|
|
70
|
+
minMatchCharLength: 3,
|
|
71
|
+
ignoreFieldNorm: true,
|
|
72
|
+
includeScore: true
|
|
73
|
+
});
|
|
74
|
+
matchedItems = (0, _helpers.mergeMultiTermFuseResults)({
|
|
75
|
+
searchTerms: searchTerms,
|
|
76
|
+
limit: limit,
|
|
77
|
+
search: function search(query) {
|
|
78
|
+
return fuse.search(query, {
|
|
79
|
+
limit: limit * searchTerms.length
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
if (matchedItems.length) {
|
|
84
|
+
_context.next = 2;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
return _context.abrupt("return", {
|
|
88
|
+
content: [{
|
|
89
|
+
type: 'text',
|
|
90
|
+
text: "Error: No Atlaskit hooks found for '".concat(terms.join(', '), "'.")
|
|
91
|
+
}]
|
|
92
|
+
});
|
|
93
|
+
case 2:
|
|
94
|
+
return _context.abrupt("return", {
|
|
95
|
+
content: [{
|
|
96
|
+
type: 'text',
|
|
97
|
+
text: JSON.stringify(matchedItems.map(buildHookResult))
|
|
98
|
+
}]
|
|
99
|
+
});
|
|
100
|
+
case 3:
|
|
101
|
+
case "end":
|
|
102
|
+
return _context.stop();
|
|
103
|
+
}
|
|
104
|
+
}, _callee);
|
|
105
|
+
}));
|
|
106
|
+
return function searchAtlaskitHooksTool(_x) {
|
|
107
|
+
return _ref2.apply(this, arguments);
|
|
108
|
+
};
|
|
109
|
+
}();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.listSearchAtlaskitUtilitiesTool = void 0;
|
|
7
|
+
var _helpers = require("../../helpers");
|
|
8
|
+
var _searchAtlaskitUtilitiesInputSchema = require("./search-atlaskit-utilities-input-schema");
|
|
9
|
+
/* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
|
|
10
|
+
|
|
11
|
+
var listSearchAtlaskitUtilitiesTool = exports.listSearchAtlaskitUtilitiesTool = {
|
|
12
|
+
name: 'atlaskit_search_utilities',
|
|
13
|
+
description: "Search for atlaskit utilities (functions, constants, types) by name, package, category, description, or keywords.\n\nWHEN TO USE:\nUse this when you want to find a utility but don't know its exact name or package.",
|
|
14
|
+
annotations: {
|
|
15
|
+
title: 'Search Atlaskit utilities',
|
|
16
|
+
readOnlyHint: true,
|
|
17
|
+
destructiveHint: false,
|
|
18
|
+
idempotentHint: true,
|
|
19
|
+
openWorldHint: true
|
|
20
|
+
},
|
|
21
|
+
inputSchema: (0, _helpers.zodToJsonSchema)(_searchAtlaskitUtilitiesInputSchema.searchAtlaskitUtilitiesInputSchema)
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.searchAtlaskitUtilitiesInputSchema = void 0;
|
|
7
|
+
var _zod = require("zod");
|
|
8
|
+
var searchAtlaskitUtilitiesInputSchema = exports.searchAtlaskitUtilitiesInputSchema = _zod.z.object({
|
|
9
|
+
terms: _zod.z.array(_zod.z.string()).describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, usageGuidelines). Example: `["debounce", "a11y", "storage"]`.'),
|
|
10
|
+
limit: _zod.z.number().default(2).describe('Max matches **per term** (default 2).').optional()
|
|
11
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.searchAtlaskitUtilitiesTool = void 0;
|
|
8
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _fuse = _interopRequireDefault(require("fuse.js"));
|
|
13
|
+
var _helpers = require("../../helpers");
|
|
14
|
+
var _atlaskitUtilities = require("../get-atlaskit-utilities/atlaskit-utilities.codegen");
|
|
15
|
+
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; }
|
|
16
|
+
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 */
|
|
17
|
+
var buildUtilityResult = function buildUtilityResult(result) {
|
|
18
|
+
return _objectSpread({
|
|
19
|
+
name: result.name,
|
|
20
|
+
package: result.package,
|
|
21
|
+
description: result.description,
|
|
22
|
+
usageGuidelines: result.usageGuidelines,
|
|
23
|
+
keywords: result.keywords,
|
|
24
|
+
category: result.category,
|
|
25
|
+
kind: result.kind
|
|
26
|
+
}, result.kind === 'function' ? {
|
|
27
|
+
signature: result.signature
|
|
28
|
+
} : {});
|
|
29
|
+
};
|
|
30
|
+
var searchAtlaskitUtilitiesTool = exports.searchAtlaskitUtilitiesTool = /*#__PURE__*/function () {
|
|
31
|
+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
|
|
32
|
+
var terms, _ref$limit, limit, searchTerms, utilities, fuse, matchedItems;
|
|
33
|
+
return _regenerator.default.wrap(function (_context) {
|
|
34
|
+
while (1) switch (_context.prev = _context.next) {
|
|
35
|
+
case 0:
|
|
36
|
+
terms = _ref.terms, _ref$limit = _ref.limit, limit = _ref$limit === void 0 ? 2 : _ref$limit;
|
|
37
|
+
searchTerms = (0, _toConsumableArray2.default)(new Set(terms.filter(Boolean).map(_helpers.cleanQuery)));
|
|
38
|
+
if (searchTerms.length) {
|
|
39
|
+
_context.next = 1;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
return _context.abrupt("return", {
|
|
43
|
+
content: [{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: '[]'
|
|
46
|
+
}]
|
|
47
|
+
});
|
|
48
|
+
case 1:
|
|
49
|
+
utilities = _atlaskitUtilities.atlaskitUtilities;
|
|
50
|
+
fuse = new _fuse.default(utilities, {
|
|
51
|
+
keys: [{
|
|
52
|
+
name: 'name',
|
|
53
|
+
weight: 5
|
|
54
|
+
}, {
|
|
55
|
+
name: 'package',
|
|
56
|
+
weight: 3
|
|
57
|
+
}, {
|
|
58
|
+
name: 'category',
|
|
59
|
+
weight: 2
|
|
60
|
+
}, {
|
|
61
|
+
name: 'description',
|
|
62
|
+
weight: 2
|
|
63
|
+
}, {
|
|
64
|
+
name: 'keywords',
|
|
65
|
+
weight: 2
|
|
66
|
+
}, {
|
|
67
|
+
name: 'usageGuidelines',
|
|
68
|
+
weight: 2
|
|
69
|
+
}],
|
|
70
|
+
threshold: 0.4,
|
|
71
|
+
distance: 80,
|
|
72
|
+
minMatchCharLength: 3,
|
|
73
|
+
ignoreFieldNorm: true,
|
|
74
|
+
includeScore: true
|
|
75
|
+
});
|
|
76
|
+
matchedItems = (0, _helpers.mergeMultiTermFuseResults)({
|
|
77
|
+
searchTerms: searchTerms,
|
|
78
|
+
limit: limit,
|
|
79
|
+
search: function search(query) {
|
|
80
|
+
return fuse.search(query, {
|
|
81
|
+
limit: limit * searchTerms.length
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
if (matchedItems.length) {
|
|
86
|
+
_context.next = 2;
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return _context.abrupt("return", {
|
|
90
|
+
content: [{
|
|
91
|
+
type: 'text',
|
|
92
|
+
text: "Error: No Atlaskit utilities found for '".concat(terms.join(', '), "'.")
|
|
93
|
+
}]
|
|
94
|
+
});
|
|
95
|
+
case 2:
|
|
96
|
+
return _context.abrupt("return", {
|
|
97
|
+
content: [{
|
|
98
|
+
type: 'text',
|
|
99
|
+
text: JSON.stringify(matchedItems.map(buildUtilityResult))
|
|
100
|
+
}]
|
|
101
|
+
});
|
|
102
|
+
case 3:
|
|
103
|
+
case "end":
|
|
104
|
+
return _context.stop();
|
|
105
|
+
}
|
|
106
|
+
}, _callee);
|
|
107
|
+
}));
|
|
108
|
+
return function searchAtlaskitUtilitiesTool(_x) {
|
|
109
|
+
return _ref2.apply(this, arguments);
|
|
110
|
+
};
|
|
111
|
+
}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/es2019/index.js
CHANGED
|
@@ -22,6 +22,10 @@ import { getAllTokensTool } from './tools/get-all-tokens/get-all-tokens-tool';
|
|
|
22
22
|
import { listGetAllTokensTool } from './tools/get-all-tokens/list-get-all-tokens-tool';
|
|
23
23
|
import { getAtlaskitComponentsTool } from './tools/get-atlaskit-components/get-atlaskit-components-tool';
|
|
24
24
|
import { listGetAtlaskitComponentsTool } from './tools/get-atlaskit-components/list-get-atlaskit-components-tool';
|
|
25
|
+
import { getAtlaskitHooksTool } from './tools/get-atlaskit-hooks/get-atlaskit-hooks-tool';
|
|
26
|
+
import { listGetAtlaskitHooksTool } from './tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool';
|
|
27
|
+
import { getAtlaskitUtilitiesTool } from './tools/get-atlaskit-utilities/get-atlaskit-utilities-tool';
|
|
28
|
+
import { listGetAtlaskitUtilitiesTool } from './tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool';
|
|
25
29
|
import { getGuidelinesInputSchema } from './tools/get-guidelines/get-guidelines-input-schema';
|
|
26
30
|
import { getGuidelinesTool } from './tools/get-guidelines/get-guidelines-tool';
|
|
27
31
|
import { listGetGuidelinesTool } from './tools/get-guidelines/list-get-guidelines-tool';
|
|
@@ -40,6 +44,12 @@ import { planTool } from './tools/plan/plan-tool';
|
|
|
40
44
|
import { listSearchAtlaskitComponentsTool } from './tools/search-atlaskit-components/list-search-atlaskit-components-tool';
|
|
41
45
|
import { searchAtlaskitComponentsInputSchema } from './tools/search-atlaskit-components/search-atlaskit-components-input-schema';
|
|
42
46
|
import { searchAtlaskitComponentsTool } from './tools/search-atlaskit-components/search-atlaskit-components-tool';
|
|
47
|
+
import { listSearchAtlaskitHooksTool } from './tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool';
|
|
48
|
+
import { searchAtlaskitHooksInputSchema } from './tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema';
|
|
49
|
+
import { searchAtlaskitHooksTool } from './tools/search-atlaskit-hooks/search-atlaskit-hooks-tool';
|
|
50
|
+
import { listSearchAtlaskitUtilitiesTool } from './tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool';
|
|
51
|
+
import { searchAtlaskitUtilitiesInputSchema } from './tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema';
|
|
52
|
+
import { searchAtlaskitUtilitiesTool } from './tools/search-atlaskit-utilities/search-atlaskit-utilities-tool';
|
|
43
53
|
import { listSearchComponentsTool } from './tools/search-components/list-search-components-tool';
|
|
44
54
|
import { searchComponentsInputSchema } from './tools/search-components/search-components-input-schema';
|
|
45
55
|
import { searchComponentsTool } from './tools/search-components/search-components-tool';
|
|
@@ -167,6 +177,26 @@ export const getToolRegistry = () => {
|
|
|
167
177
|
handler: searchAtlaskitComponentsTool,
|
|
168
178
|
inputSchema: searchAtlaskitComponentsInputSchema,
|
|
169
179
|
tool: listSearchAtlaskitComponentsTool
|
|
180
|
+
},
|
|
181
|
+
[listGetAtlaskitUtilitiesTool.name]: {
|
|
182
|
+
handler: getAtlaskitUtilitiesTool,
|
|
183
|
+
inputSchema: null,
|
|
184
|
+
tool: listGetAtlaskitUtilitiesTool
|
|
185
|
+
},
|
|
186
|
+
[listSearchAtlaskitUtilitiesTool.name]: {
|
|
187
|
+
handler: searchAtlaskitUtilitiesTool,
|
|
188
|
+
inputSchema: searchAtlaskitUtilitiesInputSchema,
|
|
189
|
+
tool: listSearchAtlaskitUtilitiesTool
|
|
190
|
+
},
|
|
191
|
+
[listGetAtlaskitHooksTool.name]: {
|
|
192
|
+
handler: getAtlaskitHooksTool,
|
|
193
|
+
inputSchema: null,
|
|
194
|
+
tool: listGetAtlaskitHooksTool
|
|
195
|
+
},
|
|
196
|
+
[listSearchAtlaskitHooksTool.name]: {
|
|
197
|
+
handler: searchAtlaskitHooksTool,
|
|
198
|
+
inputSchema: searchAtlaskitHooksInputSchema,
|
|
199
|
+
tool: listSearchAtlaskitHooksTool
|
|
170
200
|
}
|
|
171
201
|
};
|
|
172
202
|
return registry;
|