@atlaskit/ads-mcp 0.20.2 → 0.20.4
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 +13 -0
- package/dist/cjs/entry-points/analyze-a11y.js +40 -0
- package/dist/cjs/entry-points/get-a11y-guidelines.js +26 -0
- package/dist/cjs/entry-points/get-all-components.js +19 -0
- package/dist/cjs/entry-points/get-all-icons.js +19 -0
- package/dist/cjs/entry-points/get-all-tokens.js +19 -0
- package/dist/cjs/entry-points/get-atlaskit-components.js +19 -0
- package/dist/cjs/entry-points/get-guidelines.js +26 -0
- package/dist/cjs/entry-points/get-lint-rules.js +26 -0
- package/dist/cjs/entry-points/i18n-conversion.js +26 -0
- package/dist/cjs/entry-points/migration-guides.js +26 -0
- package/dist/cjs/entry-points/plan.js +26 -0
- package/dist/cjs/entry-points/search-atlaskit-components.js +26 -0
- package/dist/cjs/entry-points/search-components.js +26 -0
- package/dist/cjs/entry-points/search-icons.js +26 -0
- package/dist/cjs/entry-points/search-tokens.js +26 -0
- package/dist/cjs/entry-points/suggest-a11y-fixes.js +26 -0
- package/dist/cjs/helpers/agent.js +9 -0
- package/dist/cjs/helpers/clean-query.js +10 -0
- package/dist/cjs/helpers/index.js +14 -11
- package/dist/cjs/helpers/send-operational-event.js +56 -0
- package/dist/cjs/helpers/validation.js +2 -2
- package/dist/cjs/helpers/zod-to-json-schema.js +12 -0
- package/dist/cjs/index.js +127 -85
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-input-schema.js +13 -0
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +13 -0
- package/dist/cjs/tools/analyze-a11y/analyze-a11y-tool.js +242 -0
- package/dist/cjs/tools/analyze-a11y/analyze-localhost-a11y-tool.js +214 -0
- package/dist/cjs/tools/analyze-a11y/generate-ads-fix-for-violation.js +32 -0
- package/dist/cjs/tools/analyze-a11y/list-analyze-a11y-tool.js +20 -0
- package/dist/cjs/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +20 -0
- package/dist/cjs/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +14 -0
- package/dist/cjs/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +1 -18
- package/dist/cjs/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +22 -0
- package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
- package/dist/cjs/tools/get-all-components/{index.js → get-all-components-tool.js} +1 -15
- package/dist/cjs/tools/get-all-components/list-get-all-components-tool.js +22 -0
- package/dist/cjs/tools/get-all-icons/{index.js → get-all-icons-tool.js} +1 -15
- package/dist/cjs/tools/get-all-icons/list-get-all-icons-tool.js +22 -0
- package/dist/cjs/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +1 -18
- package/dist/cjs/tools/get-all-tokens/list-get-all-tokens-tool.js +23 -0
- package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +1944 -0
- package/dist/cjs/tools/get-atlaskit-components/get-atlaskit-components-tool.js +40 -0
- package/dist/cjs/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +22 -0
- package/dist/cjs/tools/get-guidelines/get-guidelines-input-schema.js +11 -0
- package/dist/cjs/tools/get-guidelines/{index.js → get-guidelines-tool.js} +3 -20
- package/dist/cjs/tools/get-guidelines/list-get-guidelines-tool.js +22 -0
- package/dist/cjs/tools/get-lint-rules/get-lint-rules-input-schema.js +14 -0
- package/dist/cjs/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +3 -21
- package/dist/cjs/tools/get-lint-rules/list-get-lint-rules-tool.js +22 -0
- package/dist/cjs/tools/i18n-conversion/i18n-conversion-input-schema.js +12 -0
- package/dist/cjs/tools/i18n-conversion/i18n-conversion-tool.js +33 -0
- package/dist/cjs/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +5 -33
- package/dist/cjs/tools/migration-guides/get-available-migration-ids.js +22 -0
- package/dist/cjs/tools/migration-guides/get-available-migrations-description.js +25 -0
- package/dist/cjs/tools/migration-guides/list-migration-guides-tool.js +23 -0
- package/dist/cjs/tools/migration-guides/migration-guides-input-schema.js +17 -0
- package/dist/cjs/tools/migration-guides/{index.js → migration-guides-tool.js} +3 -24
- package/dist/cjs/tools/migration-guides/migration-registry.js +5 -2
- package/dist/cjs/tools/migration-guides/migrations/onboarding-jira-spotlight.js +29 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-multi-step.js +23 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-single-step.js +23 -0
- package/dist/cjs/tools/migration-guides/migrations/onboarding-with-motion.js +23 -0
- package/dist/cjs/tools/plan/list-plan-tool.js +22 -0
- package/dist/cjs/tools/plan/plan-input-schema.js +16 -0
- package/dist/cjs/tools/plan/{index.js → plan-tool.js} +28 -36
- package/dist/cjs/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +22 -0
- package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +11 -0
- package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-tool.js +114 -0
- package/dist/cjs/tools/search-components/list-search-components-tool.js +22 -0
- package/dist/cjs/tools/search-components/search-components-input-schema.js +13 -0
- package/dist/cjs/tools/search-components/{index.js → search-components-tool.js} +3 -19
- package/dist/cjs/tools/search-icons/list-search-icons-tool.js +22 -0
- package/dist/cjs/tools/search-icons/search-icons-input-schema.js +13 -0
- package/dist/cjs/tools/search-icons/{index.js → search-icons-tool.js} +3 -19
- package/dist/cjs/tools/search-tokens/list-search-tokens-tool.js +22 -0
- package/dist/cjs/tools/search-tokens/search-tokens-input-schema.js +13 -0
- package/dist/cjs/tools/search-tokens/{index.js → search-tokens-tool.js} +3 -19
- package/dist/cjs/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +22 -0
- package/dist/cjs/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +15 -0
- package/dist/cjs/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +1 -22
- package/dist/es2019/entry-points/analyze-a11y.js +5 -0
- package/dist/es2019/entry-points/get-a11y-guidelines.js +3 -0
- package/dist/es2019/entry-points/get-all-components.js +2 -0
- package/dist/es2019/entry-points/get-all-icons.js +2 -0
- package/dist/es2019/entry-points/get-all-tokens.js +2 -0
- package/dist/es2019/entry-points/get-atlaskit-components.js +2 -0
- package/dist/es2019/entry-points/get-guidelines.js +3 -0
- package/dist/es2019/entry-points/get-lint-rules.js +3 -0
- package/dist/es2019/entry-points/i18n-conversion.js +3 -0
- package/dist/es2019/entry-points/migration-guides.js +3 -0
- package/dist/es2019/entry-points/plan.js +3 -0
- package/dist/es2019/entry-points/search-atlaskit-components.js +3 -0
- package/dist/es2019/entry-points/search-components.js +3 -0
- package/dist/es2019/entry-points/search-icons.js +3 -0
- package/dist/es2019/entry-points/search-tokens.js +3 -0
- package/dist/es2019/entry-points/suggest-a11y-fixes.js +3 -0
- package/dist/es2019/helpers/agent.js +3 -0
- package/dist/es2019/helpers/clean-query.js +2 -0
- package/dist/es2019/helpers/index.js +2 -7
- package/dist/es2019/helpers/send-operational-event.js +49 -0
- package/dist/es2019/helpers/validation.js +1 -1
- package/dist/es2019/helpers/zod-to-json-schema.js +6 -0
- package/dist/es2019/index.js +138 -92
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
- package/dist/es2019/tools/analyze-a11y/analyze-a11y-tool.js +212 -0
- package/dist/es2019/tools/analyze-a11y/analyze-localhost-a11y-tool.js +163 -0
- package/dist/es2019/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
- package/dist/es2019/tools/analyze-a11y/list-analyze-a11y-tool.js +21 -0
- package/dist/es2019/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +23 -0
- package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
- package/dist/es2019/tools/get-a11y-guidelines/get-a11y-guidelines-tool.js +34 -0
- package/dist/es2019/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +23 -0
- package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
- package/dist/es2019/tools/get-all-components/get-all-components-tool.js +12 -0
- package/dist/es2019/tools/get-all-components/{index.js → list-get-all-components-tool.js} +1 -12
- package/dist/es2019/tools/get-all-icons/get-all-icons-tool.js +10 -0
- package/dist/es2019/tools/get-all-icons/{index.js → list-get-all-icons-tool.js} +2 -11
- package/dist/es2019/tools/get-all-tokens/get-all-tokens-tool.js +13 -0
- package/dist/es2019/tools/get-all-tokens/{index.js → list-get-all-tokens-tool.js} +2 -15
- package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +1938 -0
- package/dist/es2019/tools/get-atlaskit-components/get-atlaskit-components-tool.js +14 -0
- package/dist/es2019/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +21 -0
- package/dist/es2019/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
- package/dist/es2019/tools/get-guidelines/get-guidelines-tool.js +55 -0
- package/dist/es2019/tools/get-guidelines/{index.js → list-get-guidelines-tool.js} +2 -59
- package/dist/es2019/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
- package/dist/es2019/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -28
- package/dist/es2019/tools/get-lint-rules/list-get-lint-rules-tool.js +24 -0
- package/dist/es2019/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
- package/dist/es2019/tools/i18n-conversion/i18n-conversion-tool.js +11 -0
- package/dist/es2019/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +2 -14
- package/dist/es2019/tools/migration-guides/get-available-migration-ids.js +17 -0
- package/dist/es2019/tools/migration-guides/get-available-migrations-description.js +18 -0
- package/dist/es2019/tools/migration-guides/list-migration-guides-tool.js +25 -0
- package/dist/es2019/tools/migration-guides/migration-guides-input-schema.js +10 -0
- package/dist/es2019/tools/migration-guides/migration-guides-tool.js +39 -0
- package/dist/es2019/tools/migration-guides/migration-registry.js +4 -1
- package/dist/es2019/tools/migration-guides/migrations/onboarding-jira-spotlight.js +230 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-multi-step.js +179 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-single-step.js +120 -0
- package/dist/es2019/tools/migration-guides/migrations/onboarding-with-motion.js +120 -0
- package/dist/es2019/tools/plan/list-plan-tool.js +47 -0
- package/dist/es2019/tools/plan/plan-input-schema.js +9 -0
- package/dist/es2019/tools/plan/plan-tool.js +111 -0
- package/dist/es2019/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +19 -0
- package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
- package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-tool.js +84 -0
- package/dist/es2019/tools/search-components/list-search-components-tool.js +19 -0
- package/dist/es2019/tools/search-components/search-components-input-schema.js +6 -0
- package/dist/es2019/tools/search-components/{index.js → search-components-tool.js} +2 -21
- package/dist/es2019/tools/search-icons/list-search-icons-tool.js +25 -0
- package/dist/es2019/tools/search-icons/search-icons-input-schema.js +6 -0
- package/dist/es2019/tools/search-icons/{index.js → search-icons-tool.js} +2 -27
- package/dist/es2019/tools/search-tokens/list-search-tokens-tool.js +25 -0
- package/dist/es2019/tools/search-tokens/search-tokens-input-schema.js +6 -0
- package/dist/es2019/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -27
- package/dist/es2019/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +25 -0
- package/dist/es2019/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
- package/dist/es2019/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -30
- package/dist/esm/entry-points/analyze-a11y.js +5 -0
- package/dist/esm/entry-points/get-a11y-guidelines.js +3 -0
- package/dist/esm/entry-points/get-all-components.js +2 -0
- package/dist/esm/entry-points/get-all-icons.js +2 -0
- package/dist/esm/entry-points/get-all-tokens.js +2 -0
- package/dist/esm/entry-points/get-atlaskit-components.js +2 -0
- package/dist/esm/entry-points/get-guidelines.js +3 -0
- package/dist/esm/entry-points/get-lint-rules.js +3 -0
- package/dist/esm/entry-points/i18n-conversion.js +3 -0
- package/dist/esm/entry-points/migration-guides.js +3 -0
- package/dist/esm/entry-points/plan.js +3 -0
- package/dist/esm/entry-points/search-atlaskit-components.js +3 -0
- package/dist/esm/entry-points/search-components.js +3 -0
- package/dist/esm/entry-points/search-icons.js +3 -0
- package/dist/esm/entry-points/search-tokens.js +3 -0
- package/dist/esm/entry-points/suggest-a11y-fixes.js +3 -0
- package/dist/esm/helpers/agent.js +3 -0
- package/dist/esm/helpers/clean-query.js +4 -0
- package/dist/esm/helpers/index.js +2 -9
- package/dist/esm/helpers/send-operational-event.js +52 -0
- package/dist/esm/helpers/validation.js +1 -1
- package/dist/esm/helpers/zod-to-json-schema.js +6 -0
- package/dist/esm/index.js +65 -23
- package/dist/esm/tools/analyze-a11y/analyze-a11y-input-schema.js +7 -0
- package/dist/esm/tools/analyze-a11y/analyze-a11y-localhost-input-schema.js +7 -0
- package/dist/esm/tools/analyze-a11y/analyze-a11y-tool.js +235 -0
- package/dist/esm/tools/analyze-a11y/analyze-localhost-a11y-tool.js +207 -0
- package/dist/esm/tools/analyze-a11y/generate-ads-fix-for-violation.js +26 -0
- package/dist/esm/tools/analyze-a11y/list-analyze-a11y-tool.js +14 -0
- package/dist/esm/tools/analyze-a11y/list-analyze-localhost-a11y-tool.js +14 -0
- package/dist/esm/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.js +7 -0
- package/dist/esm/tools/get-a11y-guidelines/{index.js → get-a11y-guidelines-tool.js} +0 -17
- package/dist/esm/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.js +16 -0
- package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
- package/dist/esm/tools/get-all-components/{index.js → get-all-components-tool.js} +0 -15
- package/dist/esm/tools/get-all-components/list-get-all-components-tool.js +16 -0
- package/dist/esm/tools/get-all-icons/{index.js → get-all-icons-tool.js} +0 -15
- package/dist/esm/tools/get-all-icons/list-get-all-icons-tool.js +16 -0
- package/dist/esm/tools/get-all-tokens/{index.js → get-all-tokens-tool.js} +0 -17
- package/dist/esm/tools/get-all-tokens/list-get-all-tokens-tool.js +17 -0
- package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +1938 -0
- package/dist/esm/tools/get-atlaskit-components/get-atlaskit-components-tool.js +32 -0
- package/dist/esm/tools/get-atlaskit-components/list-get-atlaskit-components-tool.js +16 -0
- package/dist/esm/tools/get-guidelines/get-guidelines-input-schema.js +5 -0
- package/dist/esm/tools/get-guidelines/{index.js → get-guidelines-tool.js} +1 -19
- package/dist/esm/tools/get-guidelines/list-get-guidelines-tool.js +16 -0
- package/dist/esm/tools/get-lint-rules/get-lint-rules-input-schema.js +7 -0
- package/dist/esm/tools/get-lint-rules/{index.js → get-lint-rules-tool.js} +1 -19
- package/dist/esm/tools/get-lint-rules/list-get-lint-rules-tool.js +15 -0
- package/dist/esm/tools/i18n-conversion/i18n-conversion-input-schema.js +5 -0
- package/dist/esm/tools/i18n-conversion/i18n-conversion-tool.js +26 -0
- package/dist/esm/tools/i18n-conversion/{index.js → list-i18n-conversion-tool.js} +3 -30
- package/dist/esm/tools/migration-guides/get-available-migration-ids.js +17 -0
- package/dist/esm/tools/migration-guides/get-available-migrations-description.js +20 -0
- package/dist/esm/tools/migration-guides/list-migration-guides-tool.js +17 -0
- package/dist/esm/tools/migration-guides/migration-guides-input-schema.js +10 -0
- package/dist/esm/tools/migration-guides/{index.js → migration-guides-tool.js} +1 -23
- package/dist/esm/tools/migration-guides/migration-registry.js +4 -1
- package/dist/esm/tools/migration-guides/migrations/onboarding-jira-spotlight.js +23 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-multi-step.js +17 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-single-step.js +17 -0
- package/dist/esm/tools/migration-guides/migrations/onboarding-with-motion.js +17 -0
- package/dist/esm/tools/plan/list-plan-tool.js +16 -0
- package/dist/esm/tools/plan/plan-input-schema.js +9 -0
- package/dist/esm/tools/plan/{index.js → plan-tool.js} +24 -32
- package/dist/esm/tools/search-atlaskit-components/list-search-atlaskit-components-tool.js +16 -0
- package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +5 -0
- package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-tool.js +107 -0
- package/dist/esm/tools/search-components/list-search-components-tool.js +16 -0
- package/dist/esm/tools/search-components/search-components-input-schema.js +6 -0
- package/dist/esm/tools/search-components/{index.js → search-components-tool.js} +2 -18
- package/dist/esm/tools/search-icons/list-search-icons-tool.js +16 -0
- package/dist/esm/tools/search-icons/search-icons-input-schema.js +6 -0
- package/dist/esm/tools/search-icons/{index.js → search-icons-tool.js} +2 -18
- package/dist/esm/tools/search-tokens/list-search-tokens-tool.js +16 -0
- package/dist/esm/tools/search-tokens/search-tokens-input-schema.js +6 -0
- package/dist/esm/tools/search-tokens/{index.js → search-tokens-tool.js} +2 -18
- package/dist/esm/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.js +16 -0
- package/dist/esm/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.js +8 -0
- package/dist/esm/tools/suggest-a11y-fixes/{index.js → suggest-a11y-fixes-tool.js} +0 -21
- package/dist/types/entry-points/analyze-a11y.d.ts +5 -0
- package/dist/types/entry-points/get-a11y-guidelines.d.ts +3 -0
- package/dist/types/entry-points/get-all-components.d.ts +2 -0
- package/dist/types/entry-points/get-all-icons.d.ts +2 -0
- package/dist/types/entry-points/get-all-tokens.d.ts +2 -0
- package/dist/types/entry-points/get-atlaskit-components.d.ts +2 -0
- package/dist/types/entry-points/get-guidelines.d.ts +3 -0
- package/dist/types/entry-points/get-lint-rules.d.ts +3 -0
- package/dist/types/entry-points/i18n-conversion.d.ts +3 -0
- package/dist/types/entry-points/migration-guides.d.ts +3 -0
- package/dist/types/entry-points/plan.d.ts +3 -0
- package/dist/types/entry-points/search-atlaskit-components.d.ts +3 -0
- package/dist/types/entry-points/search-components.d.ts +3 -0
- package/dist/types/entry-points/search-icons.d.ts +3 -0
- package/dist/types/entry-points/search-tokens.d.ts +3 -0
- package/dist/types/entry-points/suggest-a11y-fixes.d.ts +3 -0
- package/dist/types/helpers/agent.d.ts +3 -0
- package/dist/types/helpers/clean-query.d.ts +1 -0
- package/dist/types/helpers/index.d.ts +2 -4
- package/dist/types/helpers/send-operational-event.d.ts +13 -0
- package/dist/types/helpers/zod-to-json-schema.d.ts +3 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
- package/dist/types/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
- package/dist/types/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
- package/dist/types/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
- package/dist/types/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
- package/dist/types/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
- package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
- package/dist/types/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
- package/dist/types/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
- package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
- package/dist/types/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/get-all-icons/index.d.ts → types/tools/get-all-icons/get-all-icons-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
- package/dist/types/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
- package/dist/types/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
- package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
- package/dist/types/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
- package/dist/types/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
- package/dist/types/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
- package/dist/types/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
- package/dist/types/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
- package/dist/types/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
- package/dist/types/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
- package/dist/types/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
- package/dist/types/tools/i18n-conversion/i18n-conversion-input-schema.d.ts +8 -0
- package/dist/types/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
- package/dist/types/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
- package/dist/types/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
- package/dist/types/tools/migration-guides/get-available-migrations-description.d.ts +13 -0
- package/dist/types/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
- package/dist/types/tools/migration-guides/migration-guides-input-schema.d.ts +11 -0
- package/dist/types/tools/migration-guides/migration-guides-tool.d.ts +8 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
- package/dist/types/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
- package/dist/types/tools/plan/list-plan-tool.d.ts +2 -0
- package/dist/types/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
- package/dist/types/tools/plan/plan-tool.d.ts +15 -0
- package/dist/types/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
- package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
- package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
- package/dist/types/tools/search-components/list-search-components-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/search-components/index.d.ts → types/tools/search-components/search-components-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-components/search-components-tool.d.ts +4 -0
- package/dist/types/tools/search-icons/list-search-icons-tool.d.ts +2 -0
- package/dist/{types-ts4.5/tools/search-icons/index.d.ts → types/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-icons/search-icons-tool.d.ts +4 -0
- package/dist/types/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
- package/dist/types/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
- package/dist/types/tools/search-tokens/search-tokens-tool.d.ts +4 -0
- package/dist/types/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
- package/dist/types/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
- package/dist/types/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
- package/dist/types-ts4.5/entry-points/analyze-a11y.d.ts +5 -0
- package/dist/types-ts4.5/entry-points/get-a11y-guidelines.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/get-all-components.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-all-icons.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-all-tokens.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-atlaskit-components.d.ts +2 -0
- package/dist/types-ts4.5/entry-points/get-guidelines.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/get-lint-rules.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/i18n-conversion.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/migration-guides.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/plan.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-atlaskit-components.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-components.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-icons.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/search-tokens.d.ts +3 -0
- package/dist/types-ts4.5/entry-points/suggest-a11y-fixes.d.ts +3 -0
- package/dist/types-ts4.5/helpers/agent.d.ts +3 -0
- package/dist/types-ts4.5/helpers/clean-query.d.ts +1 -0
- package/dist/types-ts4.5/helpers/index.d.ts +2 -4
- package/dist/types-ts4.5/helpers/send-operational-event.d.ts +13 -0
- package/dist/types-ts4.5/helpers/zod-to-json-schema.d.ts +3 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +17 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +17 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +1 -0
- package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-a11y-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-all-components/components.codegen.d.ts +1 -1
- package/dist/types-ts4.5/tools/get-all-components/{index.d.ts → get-all-components-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-components/list-get-all-components-tool.d.ts +2 -0
- package/dist/{types/tools/get-all-icons/index.d.ts → types-ts4.5/tools/get-all-icons/get-all-icons-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-icons/list-get-all-icons-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-all-tokens/{index.d.ts → get-all-tokens-tool.d.ts} +0 -2
- package/dist/types-ts4.5/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +10 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +6 -0
- package/dist/types-ts4.5/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-input-schema.d.ts +5 -0
- package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/get-guidelines/list-get-guidelines-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +6 -0
- package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/get-lint-rules/{index.d.ts → list-get-lint-rules-tool.d.ts} +0 -8
- package/dist/types-ts4.5/tools/i18n-conversion/{index.d.ts → i18n-conversion-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/get-available-migration-ids.d.ts +12 -0
- package/dist/types-ts4.5/tools/migration-guides/get-available-migrations-description.d.ts +13 -0
- package/dist/types-ts4.5/tools/migration-guides/list-migration-guides-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/{index.d.ts → migration-guides-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/migration-guides/migration-guides-tool.d.ts +8 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-multi-step.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-single-step.d.ts +2 -0
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-with-motion.d.ts +2 -0
- package/dist/types-ts4.5/tools/plan/list-plan-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/plan/{index.d.ts → plan-input-schema.d.ts} +3 -15
- package/dist/types-ts4.5/tools/plan/plan-tool.d.ts +15 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +11 -0
- package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-components/list-search-components-tool.d.ts +2 -0
- package/dist/{types/tools/search-components/index.d.ts → types-ts4.5/tools/search-components/search-components-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-components/search-components-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-icons/list-search-icons-tool.d.ts +2 -0
- package/dist/{types/tools/search-icons/index.d.ts → types-ts4.5/tools/search-icons/search-icons-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-icons/search-icons-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/search-tokens/list-search-tokens-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/search-tokens/{index.d.ts → search-tokens-input-schema.d.ts} +0 -3
- package/dist/types-ts4.5/tools/search-tokens/search-tokens-tool.d.ts +4 -0
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +2 -0
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/{index.d.ts → suggest-a11y-fixes-input-schema.d.ts} +0 -8
- package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +8 -0
- package/index.js +0 -2
- package/package.json +4 -9
- package/tools/analyze-a11y/package.json +5 -5
- package/tools/get-a11y-guidelines/package.json +5 -5
- package/tools/get-all-components/package.json +5 -5
- package/tools/get-all-icons/package.json +5 -5
- package/tools/get-all-tokens/package.json +5 -5
- package/tools/get-guidelines/package.json +5 -5
- package/tools/get-lint-rules/package.json +5 -5
- package/tools/i18n-conversion/package.json +5 -5
- package/tools/migration-guides/package.json +5 -5
- package/tools/plan/package.json +5 -5
- package/tools/search-components/package.json +5 -5
- package/tools/search-icons/package.json +5 -5
- package/tools/search-tokens/package.json +5 -5
- package/tools/suggest-a11y-fixes/package.json +5 -5
- package/dist/cjs/tools/analyze-a11y/index.js +0 -483
- package/dist/cjs/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -77
- package/dist/es2019/tools/analyze-a11y/index.js +0 -432
- package/dist/es2019/tools/get-a11y-guidelines/index.js +0 -58
- package/dist/es2019/tools/migration-guides/index.js +0 -69
- package/dist/es2019/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -646
- package/dist/es2019/tools/plan/index.js +0 -147
- package/dist/esm/tools/analyze-a11y/index.js +0 -478
- package/dist/esm/tools/migration-guides/migrations/onboarding-to-spotlight.js +0 -71
- package/dist/types/tools/analyze-a11y/index.d.ts +0 -48
- package/dist/types/tools/get-a11y-guidelines/index.d.ts +0 -16
- package/dist/types/tools/get-guidelines/index.d.ts +0 -13
- package/dist/types/tools/i18n-conversion/index.d.ts +0 -16
- package/dist/types/tools/migration-guides/index.d.ts +0 -19
- package/dist/types/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
- package/dist/types-ts4.5/tools/analyze-a11y/index.d.ts +0 -48
- package/dist/types-ts4.5/tools/get-a11y-guidelines/index.d.ts +0 -16
- package/dist/types-ts4.5/tools/get-guidelines/index.d.ts +0 -13
- package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-to-spotlight.d.ts +0 -5
package/dist/esm/index.js
CHANGED
|
@@ -5,23 +5,56 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
5
5
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
6
6
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
7
7
|
import { CallToolRequestSchema, ListToolsRequestSchema, McpError } from '@modelcontextprotocol/sdk/types.js';
|
|
8
|
-
import { sendOperationalEvent } from './helpers/
|
|
8
|
+
import { sendOperationalEvent } from './helpers/send-operational-event';
|
|
9
9
|
import { validateToolArguments } from './helpers/validation';
|
|
10
10
|
import { instructions } from './instructions';
|
|
11
|
-
import { analyzeA11yInputSchema
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
11
|
+
import { analyzeA11yInputSchema } from './tools/analyze-a11y/analyze-a11y-input-schema';
|
|
12
|
+
import { analyzeA11yLocalhostInputSchema } from './tools/analyze-a11y/analyze-a11y-localhost-input-schema';
|
|
13
|
+
import { analyzeA11yTool } from './tools/analyze-a11y/analyze-a11y-tool';
|
|
14
|
+
import { analyzeLocalhostA11yTool } from './tools/analyze-a11y/analyze-localhost-a11y-tool';
|
|
15
|
+
import { listAnalyzeA11yTool } from './tools/analyze-a11y/list-analyze-a11y-tool';
|
|
16
|
+
import { listAnalyzeLocalhostA11yTool } from './tools/analyze-a11y/list-analyze-localhost-a11y-tool';
|
|
17
|
+
import { getA11yGuidelinesInputSchema } from './tools/get-a11y-guidelines/get-a11y-guidelines-input-schema';
|
|
18
|
+
import { getA11yGuidelinesTool } from './tools/get-a11y-guidelines/get-a11y-guidelines-tool';
|
|
19
|
+
import { listGetA11yGuidelinesTool } from './tools/get-a11y-guidelines/list-get-a11y-guidelines-tool';
|
|
20
|
+
import { getAllComponentsTool } from './tools/get-all-components/get-all-components-tool';
|
|
21
|
+
import { listGetAllComponentsTool } from './tools/get-all-components/list-get-all-components-tool';
|
|
22
|
+
import { getAllIconsTool } from './tools/get-all-icons/get-all-icons-tool';
|
|
23
|
+
import { listGetAllIconsTool } from './tools/get-all-icons/list-get-all-icons-tool';
|
|
24
|
+
import { getAllTokensTool } from './tools/get-all-tokens/get-all-tokens-tool';
|
|
25
|
+
import { listGetAllTokensTool } from './tools/get-all-tokens/list-get-all-tokens-tool';
|
|
26
|
+
import { getAtlaskitComponentsTool } from './tools/get-atlaskit-components/get-atlaskit-components-tool';
|
|
27
|
+
import { listGetAtlaskitComponentsTool } from './tools/get-atlaskit-components/list-get-atlaskit-components-tool';
|
|
28
|
+
import { getGuidelinesInputSchema } from './tools/get-guidelines/get-guidelines-input-schema';
|
|
29
|
+
import { getGuidelinesTool } from './tools/get-guidelines/get-guidelines-tool';
|
|
30
|
+
import { listGetGuidelinesTool } from './tools/get-guidelines/list-get-guidelines-tool';
|
|
31
|
+
import { getLintRulesInputSchema } from './tools/get-lint-rules/get-lint-rules-input-schema';
|
|
32
|
+
import { getLintRulesTool } from './tools/get-lint-rules/get-lint-rules-tool';
|
|
33
|
+
import { listGetLintRulesTool } from './tools/get-lint-rules/list-get-lint-rules-tool';
|
|
34
|
+
import { i18nConversionInputSchema } from './tools/i18n-conversion/i18n-conversion-input-schema';
|
|
35
|
+
import { i18nConversionTool } from './tools/i18n-conversion/i18n-conversion-tool';
|
|
36
|
+
import { listI18nConversionTool } from './tools/i18n-conversion/list-i18n-conversion-tool';
|
|
37
|
+
import { listMigrationGuidesTool } from './tools/migration-guides/list-migration-guides-tool';
|
|
38
|
+
import { migrationGuidesInputSchema } from './tools/migration-guides/migration-guides-input-schema';
|
|
39
|
+
import { migrationGuidesTool } from './tools/migration-guides/migration-guides-tool';
|
|
40
|
+
import { listPlanTool } from './tools/plan/list-plan-tool';
|
|
41
|
+
import { planInputSchema } from './tools/plan/plan-input-schema';
|
|
42
|
+
import { planTool } from './tools/plan/plan-tool';
|
|
43
|
+
import { listSearchAtlaskitComponentsTool } from './tools/search-atlaskit-components/list-search-atlaskit-components-tool';
|
|
44
|
+
import { searchAtlaskitComponentsInputSchema } from './tools/search-atlaskit-components/search-atlaskit-components-input-schema';
|
|
45
|
+
import { searchAtlaskitComponentsTool } from './tools/search-atlaskit-components/search-atlaskit-components-tool';
|
|
46
|
+
import { listSearchComponentsTool } from './tools/search-components/list-search-components-tool';
|
|
47
|
+
import { searchComponentsInputSchema } from './tools/search-components/search-components-input-schema';
|
|
48
|
+
import { searchComponentsTool } from './tools/search-components/search-components-tool';
|
|
49
|
+
import { listSearchIconsTool } from './tools/search-icons/list-search-icons-tool';
|
|
50
|
+
import { searchIconsInputSchema } from './tools/search-icons/search-icons-input-schema';
|
|
51
|
+
import { searchIconsTool } from './tools/search-icons/search-icons-tool';
|
|
52
|
+
import { listSearchTokensTool } from './tools/search-tokens/list-search-tokens-tool';
|
|
53
|
+
import { searchTokensInputSchema } from './tools/search-tokens/search-tokens-input-schema';
|
|
54
|
+
import { searchTokensTool } from './tools/search-tokens/search-tokens-tool';
|
|
55
|
+
import { listSuggestA11yFixesTool } from './tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool';
|
|
56
|
+
import { suggestA11yFixesInputSchema } from './tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema';
|
|
57
|
+
import { suggestA11yFixesTool } from './tools/suggest-a11y-fixes/suggest-a11y-fixes-tool';
|
|
25
58
|
|
|
26
59
|
// eslint-disable-next-line import/no-extraneous-dependencies -- this uses require because not all node versions this package supports use the same import assertions/attributes
|
|
27
60
|
var pkgJson = require('@atlaskit/ads-mcp/package.json');
|
|
@@ -58,8 +91,8 @@ var generateLogger = function generateLogger(level) {
|
|
|
58
91
|
};
|
|
59
92
|
};
|
|
60
93
|
export var getToolRegistry = function getToolRegistry() {
|
|
61
|
-
var
|
|
62
|
-
|
|
94
|
+
var _registry;
|
|
95
|
+
var registry = (_registry = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_registry, listAnalyzeA11yTool.name, {
|
|
63
96
|
handler: analyzeA11yTool,
|
|
64
97
|
inputSchema: analyzeA11yInputSchema,
|
|
65
98
|
tool: listAnalyzeA11yTool
|
|
@@ -99,7 +132,7 @@ export var getToolRegistry = function getToolRegistry() {
|
|
|
99
132
|
handler: migrationGuidesTool,
|
|
100
133
|
inputSchema: migrationGuidesInputSchema,
|
|
101
134
|
tool: listMigrationGuidesTool
|
|
102
|
-
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
|
135
|
+
}), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_registry, listI18nConversionTool.name, {
|
|
103
136
|
handler: i18nConversionTool,
|
|
104
137
|
inputSchema: i18nConversionInputSchema,
|
|
105
138
|
tool: listI18nConversionTool
|
|
@@ -119,10 +152,19 @@ export var getToolRegistry = function getToolRegistry() {
|
|
|
119
152
|
handler: getLintRulesTool,
|
|
120
153
|
inputSchema: getLintRulesInputSchema,
|
|
121
154
|
tool: listGetLintRulesTool
|
|
122
|
-
})
|
|
155
|
+
}), listGetAtlaskitComponentsTool.name, {
|
|
156
|
+
handler: getAtlaskitComponentsTool,
|
|
157
|
+
inputSchema: null,
|
|
158
|
+
tool: listGetAtlaskitComponentsTool
|
|
159
|
+
}), listSearchAtlaskitComponentsTool.name, {
|
|
160
|
+
handler: searchAtlaskitComponentsTool,
|
|
161
|
+
inputSchema: searchAtlaskitComponentsInputSchema,
|
|
162
|
+
tool: listSearchAtlaskitComponentsTool
|
|
163
|
+
}));
|
|
164
|
+
return registry;
|
|
123
165
|
};
|
|
124
166
|
server.setRequestHandler(ListToolsRequestSchema, /*#__PURE__*/function () {
|
|
125
|
-
var
|
|
167
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(request, extra) {
|
|
126
168
|
var toolRegistry, tools;
|
|
127
169
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
128
170
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -151,13 +193,13 @@ server.setRequestHandler(ListToolsRequestSchema, /*#__PURE__*/function () {
|
|
|
151
193
|
}, _callee);
|
|
152
194
|
}));
|
|
153
195
|
return function (_x, _x2) {
|
|
154
|
-
return
|
|
196
|
+
return _ref.apply(this, arguments);
|
|
155
197
|
};
|
|
156
198
|
}());
|
|
157
199
|
|
|
158
200
|
// Handle tool execution
|
|
159
201
|
server.setRequestHandler(CallToolRequestSchema, /*#__PURE__*/function () {
|
|
160
|
-
var
|
|
202
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(request, extra) {
|
|
161
203
|
var toolRegistry, toolName, toolConfig, actionSubject, toolArguments, inputValidation, result, toolRegistryForError;
|
|
162
204
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
163
205
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -265,7 +307,7 @@ server.setRequestHandler(CallToolRequestSchema, /*#__PURE__*/function () {
|
|
|
265
307
|
}, _callee2, null, [[6, 20]]);
|
|
266
308
|
}));
|
|
267
309
|
return function (_x3, _x4) {
|
|
268
|
-
return
|
|
310
|
+
return _ref2.apply(this, arguments);
|
|
269
311
|
};
|
|
270
312
|
}());
|
|
271
313
|
function runServer() {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export var analyzeA11yInputSchema = z.object({
|
|
3
|
+
code: z.string().describe('Source code of a React component or JSX snippet to analyze (string content only—no file path).'),
|
|
4
|
+
componentName: z.string().optional().describe('Optional label for the component under review (for summaries and reports).'),
|
|
5
|
+
context: z.string().optional().describe('Optional: how the component is used (e.g. in a form, modal) to improve suggestions.'),
|
|
6
|
+
includePatternAnalysis: 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()
|
|
7
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export var analyzeA11yLocalhostInputSchema = z.object({
|
|
3
|
+
url: 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.'),
|
|
4
|
+
componentName: z.string().optional().describe('Optional label for reporting (e.g. feature or component under test).'),
|
|
5
|
+
context: z.string().optional().describe('Optional: route, user flow, or feature context for the analyzed page.'),
|
|
6
|
+
selector: 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.')
|
|
7
|
+
});
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
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; }
|
|
6
|
+
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) { _defineProperty(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; }
|
|
7
|
+
import axe from 'axe-core';
|
|
8
|
+
import { generateADSFixForViolation } from './generate-ads-fix-for-violation';
|
|
9
|
+
var accessibilityPatterns = [{
|
|
10
|
+
pattern: /<button[^>]*>(?!.*aria-label|.*>.*<\/button>)/g,
|
|
11
|
+
violation: 'Button without accessible text',
|
|
12
|
+
severity: 'error',
|
|
13
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Button solutions. Describe the issue as "button missing label", "empty button", or "button needs text".'
|
|
14
|
+
}, {
|
|
15
|
+
pattern: /<img[^>]*>(?!.*alt=)/g,
|
|
16
|
+
violation: 'Image without alt text',
|
|
17
|
+
severity: 'error',
|
|
18
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Image solutions. Describe the issue as "image missing alt", "missing alt text", or "image accessibility".'
|
|
19
|
+
}, {
|
|
20
|
+
pattern: /<div[^>]*onClick[^>]*>/g,
|
|
21
|
+
violation: 'Clickable div without accessibility',
|
|
22
|
+
severity: 'warning',
|
|
23
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS solutions. Describe the issue as "clickable div", "interactive div", or "div with click handler".'
|
|
24
|
+
}, {
|
|
25
|
+
pattern: /color:\s*['"]#[0-9a-fA-F]{3,6}['"]/g,
|
|
26
|
+
violation: 'Hardcoded color values',
|
|
27
|
+
severity: 'warning',
|
|
28
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "hardcoded colors", "hex colors", or "design tokens".'
|
|
29
|
+
}, {
|
|
30
|
+
pattern: /<input[^>]*>(?!.*id=)/g,
|
|
31
|
+
violation: 'Input without associated label',
|
|
32
|
+
severity: 'error',
|
|
33
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS form solutions. Describe the issue as "input missing label", "form field without label", or "unlabeled input".'
|
|
34
|
+
}, {
|
|
35
|
+
pattern: /<div[^>]*role="button"[^>]*>/g,
|
|
36
|
+
violation: 'Custom button without full accessibility',
|
|
37
|
+
severity: 'warning',
|
|
38
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for ADS Button/Focusable solutions. Describe the issue as "custom button", "div with button role", or "interactive element".'
|
|
39
|
+
}, {
|
|
40
|
+
pattern: /style=\{[^}]*color[^}]*\}/g,
|
|
41
|
+
violation: 'Inline color styles',
|
|
42
|
+
severity: 'warning',
|
|
43
|
+
suggestion: 'Use the ads_suggest_a11y_fixes tool for design token solutions. Describe the issue as "inline styles", "hardcoded colors", or "color tokens".'
|
|
44
|
+
}];
|
|
45
|
+
var adsGuidelines = {
|
|
46
|
+
buttons: {
|
|
47
|
+
title: 'Button Accessibility',
|
|
48
|
+
guidelines: ['Always provide accessible labels for buttons', 'Use Button component for standard interactions', 'Use Focusable component for custom interactive elements', 'Avoid disabled buttons with tooltips', 'Ensure focus indicators are visible']
|
|
49
|
+
},
|
|
50
|
+
forms: {
|
|
51
|
+
title: 'Form Accessibility',
|
|
52
|
+
guidelines: ['Use TextField component for consistent labeling', 'Associate labels with inputs using id and htmlFor', 'Provide clear error messages with aria-describedby', 'Use MessageWrapper for form validation announcements']
|
|
53
|
+
},
|
|
54
|
+
images: {
|
|
55
|
+
title: 'Image Accessibility',
|
|
56
|
+
guidelines: ['Use Image component with proper alt text', 'Keep alt text under 125 characters', 'Leave alt="" for decorative images', 'Describe the purpose, not just the content']
|
|
57
|
+
},
|
|
58
|
+
colors: {
|
|
59
|
+
title: 'Color and Contrast',
|
|
60
|
+
guidelines: ['Use design tokens for consistent contrast ratios', 'Never rely on color alone for information', 'Use color.text tokens for proper contrast', 'Test with high contrast mode']
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
function mapAxeViolationsToADSFixes(violations) {
|
|
64
|
+
return violations.map(function (violation) {
|
|
65
|
+
var adsFix = generateADSFixForViolation(violation);
|
|
66
|
+
return _objectSpread(_objectSpread({}, violation), {}, {
|
|
67
|
+
type: adsFix.title,
|
|
68
|
+
// Use the specific fix key that matches fixes.ts
|
|
69
|
+
adsFix: adsFix,
|
|
70
|
+
severity: violation.impact === 'critical' || violation.impact === 'serious' ? 'error' : 'warning'
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export var analyzeA11yTool = /*#__PURE__*/function () {
|
|
75
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
76
|
+
var code, componentName, context, _params$includePatter, includePatternAnalysis, violations, suggestions, axeResults, _axeResults$violation, _axeResults$passes, _axeResults$incomplet, results, adsViolations, relevantGuidelines, summary;
|
|
77
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
78
|
+
while (1) switch (_context.prev = _context.next) {
|
|
79
|
+
case 0:
|
|
80
|
+
code = params.code, componentName = params.componentName, context = params.context, _params$includePatter = params.includePatternAnalysis, includePatternAnalysis = _params$includePatter === void 0 ? true : _params$includePatter;
|
|
81
|
+
violations = [];
|
|
82
|
+
suggestions = [];
|
|
83
|
+
axeResults = {};
|
|
84
|
+
_context.prev = 4;
|
|
85
|
+
_context.next = 7;
|
|
86
|
+
return axe.run({
|
|
87
|
+
fromFrames: ['iframe', 'html']
|
|
88
|
+
});
|
|
89
|
+
case 7:
|
|
90
|
+
results = _context.sent;
|
|
91
|
+
// Process axe-core results
|
|
92
|
+
if (results.violations && results.violations.length > 0) {
|
|
93
|
+
adsViolations = mapAxeViolationsToADSFixes(results.violations);
|
|
94
|
+
violations.push.apply(violations, _toConsumableArray(adsViolations));
|
|
95
|
+
axeResults.violations = results.violations;
|
|
96
|
+
axeResults.passes = results.passes;
|
|
97
|
+
axeResults.incomplete = results.incomplete;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Include pattern-based analysis if requested
|
|
101
|
+
if (includePatternAnalysis) {
|
|
102
|
+
accessibilityPatterns.forEach(function (pattern) {
|
|
103
|
+
var matches = code.match(pattern.pattern);
|
|
104
|
+
if (matches) {
|
|
105
|
+
violations.push({
|
|
106
|
+
type: pattern.violation,
|
|
107
|
+
severity: pattern.severity,
|
|
108
|
+
count: matches.length,
|
|
109
|
+
suggestion: pattern.suggestion,
|
|
110
|
+
adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
|
|
111
|
+
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
|
|
112
|
+
source: 'pattern-analysis'
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Generate ADS-specific suggestions
|
|
119
|
+
if (violations.length > 0) {
|
|
120
|
+
suggestions.push({
|
|
121
|
+
title: 'Accessibility Improvements Needed',
|
|
122
|
+
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
123
|
+
violations: violations,
|
|
124
|
+
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Provide relevant ADS guidelines
|
|
129
|
+
relevantGuidelines = [];
|
|
130
|
+
if (code.includes('button') || code.includes('onClick')) {
|
|
131
|
+
relevantGuidelines.push(adsGuidelines.buttons);
|
|
132
|
+
}
|
|
133
|
+
if (code.includes('input') || code.includes('form')) {
|
|
134
|
+
relevantGuidelines.push(adsGuidelines.forms);
|
|
135
|
+
}
|
|
136
|
+
if (code.includes('img') || code.includes('image')) {
|
|
137
|
+
relevantGuidelines.push(adsGuidelines.images);
|
|
138
|
+
}
|
|
139
|
+
if (code.includes('color') || code.includes('style')) {
|
|
140
|
+
relevantGuidelines.push(adsGuidelines.colors);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Generate summary
|
|
144
|
+
summary = {
|
|
145
|
+
componentName: componentName || 'Unknown component',
|
|
146
|
+
totalViolations: violations.length,
|
|
147
|
+
severityBreakdown: {
|
|
148
|
+
error: violations.filter(function (v) {
|
|
149
|
+
return v.severity === 'error';
|
|
150
|
+
}).length,
|
|
151
|
+
warning: violations.filter(function (v) {
|
|
152
|
+
return v.severity === 'warning';
|
|
153
|
+
}).length
|
|
154
|
+
},
|
|
155
|
+
context: context || 'No additional context provided',
|
|
156
|
+
axeResults: {
|
|
157
|
+
violations: ((_axeResults$violation = axeResults.violations) === null || _axeResults$violation === void 0 ? void 0 : _axeResults$violation.length) || 0,
|
|
158
|
+
passes: ((_axeResults$passes = axeResults.passes) === null || _axeResults$passes === void 0 ? void 0 : _axeResults$passes.length) || 0,
|
|
159
|
+
incomplete: ((_axeResults$incomplet = axeResults.incomplete) === null || _axeResults$incomplet === void 0 ? void 0 : _axeResults$incomplet.length) || 0
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
return _context.abrupt("return", {
|
|
163
|
+
content: [{
|
|
164
|
+
type: 'text',
|
|
165
|
+
text: JSON.stringify({
|
|
166
|
+
summary: summary,
|
|
167
|
+
violations: violations,
|
|
168
|
+
suggestions: suggestions,
|
|
169
|
+
relevantGuidelines: relevantGuidelines,
|
|
170
|
+
axeResults: axeResults,
|
|
171
|
+
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
172
|
+
}, null, 2)
|
|
173
|
+
}]
|
|
174
|
+
});
|
|
175
|
+
case 20:
|
|
176
|
+
_context.prev = 20;
|
|
177
|
+
_context.t0 = _context["catch"](4);
|
|
178
|
+
// Fallback to pattern-based analysis if axe-core fails
|
|
179
|
+
// console.warn('Axe-core analysis failed, falling back to pattern analysis:', error);
|
|
180
|
+
|
|
181
|
+
// Run pattern analysis as fallback
|
|
182
|
+
accessibilityPatterns.forEach(function (pattern) {
|
|
183
|
+
var matches = code.match(pattern.pattern);
|
|
184
|
+
if (matches) {
|
|
185
|
+
violations.push({
|
|
186
|
+
type: pattern.violation,
|
|
187
|
+
severity: pattern.severity,
|
|
188
|
+
count: matches.length,
|
|
189
|
+
suggestion: pattern.suggestion,
|
|
190
|
+
adsFix: 'Use the ads_suggest_a11y_fixes tool for specific ADS component solutions',
|
|
191
|
+
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples',
|
|
192
|
+
source: 'pattern-analysis-fallback'
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
return _context.abrupt("return", {
|
|
197
|
+
content: [{
|
|
198
|
+
type: 'text',
|
|
199
|
+
text: JSON.stringify({
|
|
200
|
+
summary: {
|
|
201
|
+
componentName: componentName || 'Unknown component',
|
|
202
|
+
totalViolations: violations.length,
|
|
203
|
+
severityBreakdown: {
|
|
204
|
+
error: violations.filter(function (v) {
|
|
205
|
+
return v.severity === 'error';
|
|
206
|
+
}).length,
|
|
207
|
+
warning: violations.filter(function (v) {
|
|
208
|
+
return v.severity === 'warning';
|
|
209
|
+
}).length
|
|
210
|
+
},
|
|
211
|
+
context: context || 'No additional context provided',
|
|
212
|
+
note: 'Analysis completed using pattern matching (axe-core analysis failed)'
|
|
213
|
+
},
|
|
214
|
+
violations: violations,
|
|
215
|
+
suggestions: violations.length > 0 ? [{
|
|
216
|
+
title: 'Accessibility Improvements Needed',
|
|
217
|
+
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
218
|
+
violations: violations,
|
|
219
|
+
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
220
|
+
}] : [],
|
|
221
|
+
error: 'Axe-core analysis failed, used pattern-based analysis as fallback',
|
|
222
|
+
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
223
|
+
}, null, 2)
|
|
224
|
+
}]
|
|
225
|
+
});
|
|
226
|
+
case 24:
|
|
227
|
+
case "end":
|
|
228
|
+
return _context.stop();
|
|
229
|
+
}
|
|
230
|
+
}, _callee, null, [[4, 20]]);
|
|
231
|
+
}));
|
|
232
|
+
return function analyzeA11yTool(_x) {
|
|
233
|
+
return _ref.apply(this, arguments);
|
|
234
|
+
};
|
|
235
|
+
}();
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
|
+
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; }
|
|
6
|
+
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) { _defineProperty(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; }
|
|
7
|
+
import { AxePuppeteer } from '@axe-core/puppeteer';
|
|
8
|
+
import puppeteer from 'puppeteer';
|
|
9
|
+
import { generateADSFixForViolation } from './generate-ads-fix-for-violation';
|
|
10
|
+
var adsGuidelines = {
|
|
11
|
+
buttons: {
|
|
12
|
+
title: 'Button Accessibility',
|
|
13
|
+
guidelines: ['Always provide accessible labels for buttons', 'Use Button component for standard interactions', 'Use Focusable component for custom interactive elements', 'Avoid disabled buttons with tooltips', 'Ensure focus indicators are visible']
|
|
14
|
+
},
|
|
15
|
+
forms: {
|
|
16
|
+
title: 'Form Accessibility',
|
|
17
|
+
guidelines: ['Use TextField component for consistent labeling', 'Associate labels with inputs using id and htmlFor', 'Provide clear error messages with aria-describedby', 'Use MessageWrapper for form validation announcements']
|
|
18
|
+
},
|
|
19
|
+
images: {
|
|
20
|
+
title: 'Image Accessibility',
|
|
21
|
+
guidelines: ['Use Image component with proper alt text', 'Keep alt text under 125 characters', 'Leave alt="" for decorative images', 'Describe the purpose, not just the content']
|
|
22
|
+
},
|
|
23
|
+
colors: {
|
|
24
|
+
title: 'Color and Contrast',
|
|
25
|
+
guidelines: ['Use design tokens for consistent contrast ratios', 'Never rely on color alone for information', 'Use color.text tokens for proper contrast', 'Test with high contrast mode']
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
function mapAxeViolationsToADSFixes(violations) {
|
|
29
|
+
return violations.map(function (violation) {
|
|
30
|
+
var adsFix = generateADSFixForViolation(violation);
|
|
31
|
+
return _objectSpread(_objectSpread({}, violation), {}, {
|
|
32
|
+
type: adsFix.title,
|
|
33
|
+
// Use the specific fix key that matches fixes.ts
|
|
34
|
+
adsFix: adsFix,
|
|
35
|
+
severity: violation.impact === 'critical' || violation.impact === 'serious' ? 'error' : 'warning'
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export var analyzeLocalhostA11yTool = /*#__PURE__*/function () {
|
|
40
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
41
|
+
var url, componentName, context, selector, violations, suggestions, axeResults, browser, page, _axeResults$violation, _axeResults$passes, _axeResults$incomplet, elementExists, availableElements, axePuppeteer, results, adsViolations, relevantGuidelines, summary;
|
|
42
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
43
|
+
while (1) switch (_context.prev = _context.next) {
|
|
44
|
+
case 0:
|
|
45
|
+
url = params.url, componentName = params.componentName, context = params.context, selector = params.selector;
|
|
46
|
+
violations = [];
|
|
47
|
+
suggestions = [];
|
|
48
|
+
axeResults = {};
|
|
49
|
+
_context.next = 6;
|
|
50
|
+
return puppeteer.launch();
|
|
51
|
+
case 6:
|
|
52
|
+
browser = _context.sent;
|
|
53
|
+
_context.next = 9;
|
|
54
|
+
return browser.newPage();
|
|
55
|
+
case 9:
|
|
56
|
+
page = _context.sent;
|
|
57
|
+
_context.prev = 10;
|
|
58
|
+
_context.next = 13;
|
|
59
|
+
return page.goto(url, {
|
|
60
|
+
waitUntil: 'networkidle0'
|
|
61
|
+
});
|
|
62
|
+
case 13:
|
|
63
|
+
if (!selector) {
|
|
64
|
+
_context.next = 22;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
_context.next = 16;
|
|
68
|
+
return page.$(selector);
|
|
69
|
+
case 16:
|
|
70
|
+
elementExists = _context.sent;
|
|
71
|
+
if (elementExists) {
|
|
72
|
+
_context.next = 22;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
_context.next = 20;
|
|
76
|
+
return page.evaluate(function () {
|
|
77
|
+
var elements = Array.from(document.querySelectorAll('[id]'));
|
|
78
|
+
return elements.map(function (el) {
|
|
79
|
+
return "#".concat(el.id);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
case 20:
|
|
83
|
+
availableElements = _context.sent;
|
|
84
|
+
throw new Error("Element with selector \"".concat(selector, "\" not found on the page after waiting. Available elements: ").concat(availableElements.join(', ')));
|
|
85
|
+
case 22:
|
|
86
|
+
// Run axe-core accessibility analysis
|
|
87
|
+
axePuppeteer = new AxePuppeteer(page); // If selector is provided, analyze only that element
|
|
88
|
+
if (selector) {
|
|
89
|
+
axePuppeteer.include(selector);
|
|
90
|
+
}
|
|
91
|
+
_context.next = 26;
|
|
92
|
+
return axePuppeteer.analyze();
|
|
93
|
+
case 26:
|
|
94
|
+
results = _context.sent;
|
|
95
|
+
if (results.violations && results.violations.length > 0) {
|
|
96
|
+
adsViolations = mapAxeViolationsToADSFixes(results.violations);
|
|
97
|
+
violations.push.apply(violations, _toConsumableArray(adsViolations));
|
|
98
|
+
axeResults.violations = results.violations;
|
|
99
|
+
axeResults.passes = results.passes;
|
|
100
|
+
axeResults.incomplete = results.incomplete;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Generate ADS-specific suggestions
|
|
104
|
+
if (violations.length > 0) {
|
|
105
|
+
suggestions.push({
|
|
106
|
+
title: 'Accessibility Improvements Needed',
|
|
107
|
+
description: "Found ".concat(violations.length, " accessibility issues in your code."),
|
|
108
|
+
violations: violations,
|
|
109
|
+
nextSteps: ['Review each violation and apply the suggested fixes', 'Use ADS components instead of custom implementations', 'Test with screen readers and keyboard navigation', 'Run automated accessibility tests']
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Provide relevant ADS guidelines
|
|
114
|
+
relevantGuidelines = [];
|
|
115
|
+
if (url.includes('button') || url.includes('onClick')) {
|
|
116
|
+
relevantGuidelines.push(adsGuidelines.buttons);
|
|
117
|
+
}
|
|
118
|
+
if (url.includes('input') || url.includes('form')) {
|
|
119
|
+
relevantGuidelines.push(adsGuidelines.forms);
|
|
120
|
+
}
|
|
121
|
+
if (url.includes('img') || url.includes('image')) {
|
|
122
|
+
relevantGuidelines.push(adsGuidelines.images);
|
|
123
|
+
}
|
|
124
|
+
if (url.includes('color') || url.includes('style')) {
|
|
125
|
+
relevantGuidelines.push(adsGuidelines.colors);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Generate summary
|
|
129
|
+
summary = {
|
|
130
|
+
url: url,
|
|
131
|
+
selector: selector || 'Entire page analyzed',
|
|
132
|
+
componentName: componentName || 'Unknown component',
|
|
133
|
+
totalViolations: violations.length,
|
|
134
|
+
severityBreakdown: {
|
|
135
|
+
error: violations.filter(function (v) {
|
|
136
|
+
return v.severity === 'error';
|
|
137
|
+
}).length,
|
|
138
|
+
warning: violations.filter(function (v) {
|
|
139
|
+
return v.severity === 'warning';
|
|
140
|
+
}).length
|
|
141
|
+
},
|
|
142
|
+
context: context || 'No additional context provided',
|
|
143
|
+
axeResults: {
|
|
144
|
+
violations: ((_axeResults$violation = axeResults.violations) === null || _axeResults$violation === void 0 ? void 0 : _axeResults$violation.length) || 0,
|
|
145
|
+
passes: ((_axeResults$passes = axeResults.passes) === null || _axeResults$passes === void 0 ? void 0 : _axeResults$passes.length) || 0,
|
|
146
|
+
incomplete: ((_axeResults$incomplet = axeResults.incomplete) === null || _axeResults$incomplet === void 0 ? void 0 : _axeResults$incomplet.length) || 0
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
_context.next = 37;
|
|
150
|
+
return browser.close();
|
|
151
|
+
case 37:
|
|
152
|
+
return _context.abrupt("return", {
|
|
153
|
+
content: [{
|
|
154
|
+
type: 'text',
|
|
155
|
+
text: JSON.stringify({
|
|
156
|
+
summary: summary,
|
|
157
|
+
violations: violations,
|
|
158
|
+
suggestions: suggestions,
|
|
159
|
+
relevantGuidelines: relevantGuidelines,
|
|
160
|
+
axeResults: axeResults,
|
|
161
|
+
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
162
|
+
}, null, 2)
|
|
163
|
+
}]
|
|
164
|
+
});
|
|
165
|
+
case 40:
|
|
166
|
+
_context.prev = 40;
|
|
167
|
+
_context.t0 = _context["catch"](10);
|
|
168
|
+
_context.next = 44;
|
|
169
|
+
return browser.close();
|
|
170
|
+
case 44:
|
|
171
|
+
return _context.abrupt("return", {
|
|
172
|
+
content: [{
|
|
173
|
+
type: 'text',
|
|
174
|
+
text: JSON.stringify({
|
|
175
|
+
summary: {
|
|
176
|
+
url: url,
|
|
177
|
+
selector: selector || 'Entire page analyzed',
|
|
178
|
+
componentName: componentName || 'Unknown component',
|
|
179
|
+
totalViolations: violations.length,
|
|
180
|
+
severityBreakdown: {
|
|
181
|
+
error: violations.filter(function (v) {
|
|
182
|
+
return v.severity === 'error';
|
|
183
|
+
}).length,
|
|
184
|
+
warning: violations.filter(function (v) {
|
|
185
|
+
return v.severity === 'warning';
|
|
186
|
+
}).length
|
|
187
|
+
},
|
|
188
|
+
context: context || 'No additional context provided',
|
|
189
|
+
note: 'Analysis failed to run on the provided URL'
|
|
190
|
+
},
|
|
191
|
+
violations: violations,
|
|
192
|
+
suggestions: [],
|
|
193
|
+
error: String(_context.t0),
|
|
194
|
+
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference https://atlassian.design/llms-a11y.txt for detailed guidelines', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
195
|
+
}, null, 2)
|
|
196
|
+
}]
|
|
197
|
+
});
|
|
198
|
+
case 45:
|
|
199
|
+
case "end":
|
|
200
|
+
return _context.stop();
|
|
201
|
+
}
|
|
202
|
+
}, _callee, null, [[10, 40]]);
|
|
203
|
+
}));
|
|
204
|
+
return function analyzeLocalhostA11yTool(_x) {
|
|
205
|
+
return _ref.apply(this, arguments);
|
|
206
|
+
};
|
|
207
|
+
}();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Helper function to provide ADS-specific guidance for axe-core violations
|
|
2
|
+
export function generateADSFixForViolation(violation) {
|
|
3
|
+
var id = violation.id,
|
|
4
|
+
description = violation.description,
|
|
5
|
+
help = violation.help,
|
|
6
|
+
tags = violation.tags;
|
|
7
|
+
|
|
8
|
+
// Provide general guidance without trying to map to specific fixes.ts keys
|
|
9
|
+
var adsFix = "Use the ads_suggest_a11y_fixes tool to get specific ADS component solutions. Describe the issue using the violation details: \"".concat(help, "\" or in your own words (e.g., \"button has no text\", \"missing alt text\", \"form field needs label\").");
|
|
10
|
+
return {
|
|
11
|
+
title: help,
|
|
12
|
+
// Use axe-core's human-readable description
|
|
13
|
+
description: description,
|
|
14
|
+
adsFix: adsFix,
|
|
15
|
+
example: 'The ads_suggest_a11y_fixes tool provides detailed code examples and ADS component solutions',
|
|
16
|
+
violationId: id,
|
|
17
|
+
axeHelp: help,
|
|
18
|
+
tags: tags,
|
|
19
|
+
wcagTags: tags.filter(function (tag) {
|
|
20
|
+
return tag.startsWith('wcag');
|
|
21
|
+
}),
|
|
22
|
+
// Extract WCAG compliance info
|
|
23
|
+
reference: "https://atlassian.design/llms-a11y.txt",
|
|
24
|
+
recommendations: ['Use ADS components for better accessibility out of the box', 'Reference the ads_suggest_a11y_fixes tool for specific solutions', 'Test with keyboard navigation and screen readers', 'Use automated accessibility testing tools']
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
|
|
2
|
+
import { analyzeA11yInputSchema } from './analyze-a11y-input-schema';
|
|
3
|
+
export var listAnalyzeA11yTool = {
|
|
4
|
+
name: 'ads_analyze_a11y',
|
|
5
|
+
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.",
|
|
6
|
+
annotations: {
|
|
7
|
+
title: 'Analyze accessibility (code string)',
|
|
8
|
+
readOnlyHint: true,
|
|
9
|
+
destructiveHint: false,
|
|
10
|
+
idempotentHint: true,
|
|
11
|
+
openWorldHint: true
|
|
12
|
+
},
|
|
13
|
+
inputSchema: zodToJsonSchema(analyzeA11yInputSchema)
|
|
14
|
+
};
|