@salesforce/b2c-dx-mcp 3.2.0 → 3.3.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/bin/run.js +5 -9
- package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/content/guidance/b2c/b2c-onboarding/SKILL.md +4 -4
- package/content/guidance/b2c/b2c-ordering/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-querying-data/SKILL.md +2 -2
- package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +3 -3
- package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +6 -6
- package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/content/guidance/b2c-cli/b2c-cip/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/content/guidance/b2c-cli/b2c-config/SKILL.md +31 -21
- package/content/guidance/b2c-cli/b2c-content/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-debug/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-docs/SKILL.md +23 -2
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +1 -1
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +1 -1
- package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +3 -3
- package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-sites/SKILL.md +1 -1
- package/content/guidance/b2c-cli/b2c-slas/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +2 -2
- package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +1 -1
- package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +4 -4
- package/content/guidance/index.json +935 -258
- package/content/guidance/mcp/{cip → b2c-mcp-cip}/SKILL.md +10 -8
- package/content/guidance/mcp/{b2c-config → b2c-mcp-config}/SKILL.md +10 -9
- package/content/guidance/mcp/{debugger → b2c-mcp-debugger}/SKILL.md +9 -8
- package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/SKILL.md +81 -10
- package/content/guidance/mcp/{server → b2c-mcp-server}/SKILL.md +49 -25
- package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
- package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +86 -79
- package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/content/guidance/storefront-next/sfnext-components/SKILL.md +98 -136
- package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
- package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +116 -113
- package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +100 -150
- package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +83 -97
- package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +73 -97
- package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +96 -131
- package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
- package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
- package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +152 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/content/guidance/storefront-next/sfnext-performance/SKILL.md +75 -105
- package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +103 -116
- package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
- package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/content/guidance/storefront-next/sfnext-routing/SKILL.md +86 -143
- package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
- package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
- package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
- package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
- package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +80 -89
- package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
- package/content/guidance/storefront-next/sfnext-testing/SKILL.md +105 -138
- package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
- package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
- package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/dist/commands/mcp.d.ts +8 -2
- package/dist/commands/mcp.js +54 -20
- package/dist/guidance.d.ts +4 -1
- package/dist/guidance.js +23 -5
- package/dist/registry.d.ts +2 -1
- package/dist/registry.js +3 -3
- package/dist/server.d.ts +10 -0
- package/dist/server.js +21 -0
- package/dist/skill-references.js +5 -5
- package/dist/tools/cartridges/index.js +1 -0
- package/dist/tools/cip/index.js +6 -3
- package/dist/tools/diagnostics/debug-capture-at-breakpoint.js +1 -1
- package/dist/tools/diagnostics/debug-set-breakpoints.js +1 -1
- package/dist/tools/diagnostics/debug-start-session.js +1 -1
- package/dist/tools/scapi/execution-registry.js +9 -9
- package/dist/tools/scapi/index.d.ts +4 -1
- package/dist/tools/scapi/index.js +4 -2
- package/dist/tools/scapi/scapi-code.d.ts +2 -2
- package/dist/tools/scapi/scapi-code.js +17 -61
- package/dist/utils/types.d.ts +6 -0
- package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +20 -0
- package/node_modules/@salesforce/b2c-agent-plugins/README.md +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-onboarding/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-ordering/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-querying-data/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/SKILL.md +6 -6
- package/node_modules/@salesforce/b2c-agent-plugins/b2c/skills/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +8 -9
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-cip/references/SALES_ANALYSIS.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-config/SKILL.md +31 -21
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-content/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-debug/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-docs/SKILL.md +23 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-job/references/IMPORT.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-metrics/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-mrt/SKILL.md +3 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-custom/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-scapi-schemas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-site-import-export/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-sites/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-slas/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-checkout-triage/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-job-health/SKILL.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/SKILL.md +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-order-failure-triage/references/order-evidence.md +2 -2
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-ops/skills/b2c-production-triage/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/README.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/SKILL.md +76 -73
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/evals/trigger-evals.json +12 -10
- package/node_modules/@salesforce/b2c-agent-plugins/figma-to-sfnext-pagedesigner/skills/figma-to-sfnext-pagedesigner/references/PAGE-DESIGNER-SFN.md +49 -74
- package/node_modules/@salesforce/b2c-agent-plugins/package.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/README.md +43 -22
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +9 -6
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/SKILL.md +103 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-accessibility/references/checklist.md +64 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/SKILL.md +91 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/SKILL.md +86 -79
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/COOKIES.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/SKILL.md +67 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/SKILL.md +98 -136
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/STORYBOOK.md +54 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/SKILL.md +116 -113
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/SKILL.md +100 -150
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/SCAPI-FETCHER.md +23 -77
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/SKILL.md +83 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-deployment/references/MRT-DEPLOYMENT.md +37 -68
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/SKILL.md +73 -97
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/BASE-AUDIT.md +47 -44
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-extensions/references/EXTENSION-EXAMPLES.md +49 -86
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/SKILL.md +59 -114
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +53 -90
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/SKILL.md +96 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-i18n/references/locale-config.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/SKILL.md +101 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-overview/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/SKILL.md +152 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/COMPONENT-REGISTRY.md +86 -53
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/DECORATOR-PATTERNS.md +119 -131
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/SKILL.md +75 -105
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/SKILL.md +103 -116
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -99
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/SKILL.md +70 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/SKILL.md +121 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/SKILL.md +86 -143
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/ROUTE-CONVENTIONS.md +51 -51
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/SKILL.md +126 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/SKILL.md +129 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-security/references/TURNSTILE.md +43 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/SKILL.md +95 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/SKILL.md +80 -89
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-state-management/references/PATTERNS.md +45 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/SKILL.md +105 -138
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/E2E.md +38 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/STORYBOOK-PATTERNS.md +73 -94
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/SKILL.md +104 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/evals/trigger-evals.json +5 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next-figma/skills/sfnext-create-figma-kit/SKILL.md +3 -3
- package/oclif.manifest.json +21 -4
- package/package.json +3 -3
- package/content/guidance/storefront-next/sfnext-create-component/SKILL.md +0 -195
- package/content/guidance/storefront-next/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-create-vertical/SKILL.md +0 -135
- package/content/guidance/storefront-next/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/content/guidance/storefront-next/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/content/guidance/storefront-next/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/content/guidance/storefront-next/sfnext-custom-apis/SKILL.md +0 -221
- package/content/guidance/storefront-next/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/content/guidance/storefront-next/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/content/guidance/storefront-next/sfnext-scapi-management/SKILL.md +0 -203
- package/content/guidance/storefront-next/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/SKILL.md +0 -195
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-component/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/SKILL.md +0 -135
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/COMPONENT-AUTHORING.md +0 -206
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/PROJECT-STRUCTURE.md +0 -43
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TOKEN-SYSTEM.md +0 -130
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-create-vertical/references/TROUBLESHOOTING.md +0 -34
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/SKILL.md +0 -221
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-custom-apis/references/WORKFLOW-EXAMPLES.md +0 -294
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-data-fetching/references/LOADER-PATTERNS.md +0 -102
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-project-setup/references/ENV-VARIABLES.md +0 -82
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/SKILL.md +0 -203
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/evals/trigger-evals.json +0 -12
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/skills/sfnext-scapi-management/references/CLI-COMMANDS.md +0 -122
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-apis.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/custom-properties.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/jobs.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/products.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/promotions.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/saving.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/snippets.md +0 -0
- /package/content/guidance/mcp/{scapi → b2c-mcp-scapi}/references/tokens.md +0 -0
- /package/content/guidance/mcp/{server → b2c-mcp-server}/references/files.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Discover and run CIP reports or analytics SQL for sales, merchandising, and technical operations
|
|
2
|
+
name: b2c-mcp-cip
|
|
3
|
+
description: Required before cip_query. Discover and run CIP reports or analytics SQL for sales, merchandising, and technical operations; resolve warehouse access, bound results, and interpret site/date scope.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CIP analytics
|
|
@@ -8,7 +8,7 @@ description: Discover and run CIP reports or analytics SQL for sales, merchandis
|
|
|
8
8
|
Use CIP for warehouse analytics: sales, products, promotions, search, payments,
|
|
9
9
|
traffic, inventory, and API/controller trends. Use SCAPI for current records;
|
|
10
10
|
logs/metrics for immediate diagnosis.
|
|
11
|
-
Read this skill once through resources or `skills_read` (`mcp/cip`), then pass
|
|
11
|
+
Read this skill once through resources or `skills_read` (`mcp/b2c-mcp-cip`), then pass
|
|
12
12
|
`skillRead: true` to `cip_query`. Discovery needs no acknowledgment.
|
|
13
13
|
|
|
14
14
|
## Choose and discover
|
|
@@ -42,13 +42,13 @@ Reports & Dashboards data tracking enabled on supported 26.1+ environments.
|
|
|
42
42
|
No data or rejected access does not establish zero sales or a healthy system.
|
|
43
43
|
|
|
44
44
|
Missing values: `config_inspect` with masking; ask the user if the target cannot
|
|
45
|
-
be determined. [MCP configuration](skill://mcp/b2c-config/SKILL.md) explains resolution.
|
|
45
|
+
be determined. [MCP configuration](skill://mcp/b2c-mcp-config/SKILL.md) explains resolution.
|
|
46
46
|
For CLI equivalents, configuration, host selection, and availability caveats:
|
|
47
47
|
[existing CIP skill](skill://b2c-cli/b2c-cip/SKILL.md) (`skills_read` ID `b2c-cli/b2c-cip`)
|
|
48
|
-
and
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
and the analytics guide (`docs_read({query: "guide-analytics-reports-cip-ccac"})`,
|
|
49
|
+
[online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/analytics-reports-cip-ccac.md)), plus the CLI reference
|
|
50
|
+
(`cli-cip`, [online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/cip.md)).
|
|
51
|
+
Read these conditionally, not as extra prerequisites.
|
|
52
52
|
Official [JDBC setup and limits](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/jdbc_access_guide.html).
|
|
53
53
|
|
|
54
54
|
## Query and interpret
|
|
@@ -84,3 +84,5 @@ Read further only for an unresolved question:
|
|
|
84
84
|
[starter queries](skill://b2c-cli/b2c-cip/references/STARTER_QUERIES.md), not the whole file.
|
|
85
85
|
Stop when the report and evidence answer the task; no follow-up skill read is required.
|
|
86
86
|
For incidents, correlate trends with logs and the relevant `b2c-ops` runbook.
|
|
87
|
+
|
|
88
|
+
Other MCP workflows and runbooks: [skill index](skill://mcp/b2c-mcp-server/SKILL.md#skill-index).
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: b2c-config
|
|
3
|
-
description: MCP configuration, authentication
|
|
2
|
+
name: b2c-mcp-config
|
|
3
|
+
description: Resolve B2C MCP configuration, authentication, and external access grants with masked inspection. Use for setup, credential, or wrong-target issues; routine config_inspect needs no skill read.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# MCP Configuration
|
|
7
7
|
|
|
8
|
-
For MCP installation
|
|
8
|
+
For MCP installation, tool selection, or other MCP workflows, see the
|
|
9
|
+
[server skill index](skill://mcp/b2c-mcp-server/SKILL.md#skill-index).
|
|
9
10
|
|
|
10
11
|
## Inspect resolved values
|
|
11
12
|
|
|
@@ -72,15 +73,15 @@ pages; follow returned `nextOffset` when the needed topic lies later in an artic
|
|
|
72
73
|
From the same project, `b2c setup inspect --json` uses the same resolver and
|
|
73
74
|
default masking. Match the environment, `--config`, and `--instance` selections
|
|
74
75
|
when comparing results. For CLI setup or configuration commands, consult
|
|
75
|
-
[b2c-cli/b2c-config](skill://b2c-cli/b2c-config/SKILL.md)
|
|
76
|
-
|
|
76
|
+
[b2c-cli/b2c-config](skill://b2c-cli/b2c-config/SKILL.md) or the shared
|
|
77
|
+
configuration documentation below.
|
|
77
78
|
For authentication specifically, `skills_read({id: "b2c-cli/b2c-config", section: "authentication"})`.
|
|
78
79
|
CLI browser-login instructions do not enable SCAPI Admin code-mode user auth.
|
|
79
80
|
|
|
80
81
|
## Further reading
|
|
81
82
|
|
|
82
|
-
Read only for the configuration issue at hand:
|
|
83
|
+
Read with `docs_read({query: ID})`, only for the configuration issue at hand:
|
|
83
84
|
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
85
|
+
- MCP configuration: `mcp-configuration` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/configuration.md))
|
|
86
|
+
- Shared configuration and precedence: `guide-configuration` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.md))
|
|
87
|
+
- Authentication setup: `guide-authentication` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication.md))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: b2c-mcp-debugger
|
|
3
|
+
description: Debug B2C Commerce server-side scripts with the MCP debugger tools, using bounded breakpoint capture, request triggering, state inspection, and reliable session cleanup.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# MCP Debugger Usage
|
|
@@ -54,18 +54,19 @@ next breakpoint or request completion. End sessions explicitly.
|
|
|
54
54
|
A timeout leaves the breakpoint armed. Check sessions for a late halt; end with
|
|
55
55
|
`clear_breakpoints: true` when finished. Do not leave an unbounded capture waiting.
|
|
56
56
|
- Configuration still unexplained after `config_inspect`: consult
|
|
57
|
-
[MCP configuration](skill://mcp/b2c-config/SKILL.md).
|
|
57
|
+
[MCP configuration](skill://mcp/b2c-mcp-config/SKILL.md).
|
|
58
58
|
- Missing BM permission/access key: `docs_read({query: "mcp-security"})` for debugger
|
|
59
59
|
requirements; `guide-authentication` for WebDAV key setup. For other setup issues,
|
|
60
60
|
`docs_search` with the specific error. If docs tools are unavailable, use
|
|
61
|
-
[debugger access](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/security#debugger)
|
|
62
|
-
and [WebDAV key setup](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication#webdav-access).
|
|
61
|
+
[debugger access](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/security.md#debugger)
|
|
62
|
+
and [WebDAV key setup](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication.md#webdav-access).
|
|
63
63
|
General WebDAV OAuth instructions do not apply to the debugger.
|
|
64
64
|
- Before repeating a failed request, check whether it already changed state.
|
|
65
65
|
|
|
66
66
|
## CLI or IDE, when requested
|
|
67
67
|
|
|
68
68
|
For terminal debugging use `b2c debug cli`; for a DAP client use `b2c debug`.
|
|
69
|
-
For those workflows, read [b2c-cli/b2c-debug](skill://b2c-cli/b2c-debug/SKILL.md)
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
For those workflows, read [b2c-cli/b2c-debug](skill://b2c-cli/b2c-debug/SKILL.md) or the
|
|
70
|
+
CLI debugger reference (`docs_read({query: "cli-debug"})`, [online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/debug.md)).
|
|
71
|
+
|
|
72
|
+
Other MCP workflows and runbooks: [skill index](skill://mcp/b2c-mcp-server/SKILL.md#skill-index).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Discover standard and live custom SCAPI contracts, compose Admin requests, and verify changes
|
|
2
|
+
name: b2c-mcp-scapi
|
|
3
|
+
description: Required before scapi_search or scapi_execute. Discover standard and live custom SCAPI contracts, compose Admin and Shopper requests, and verify changes under configured authentication and Safety Mode.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SCAPI Code Mode
|
|
@@ -8,13 +8,80 @@ description: Discover standard and live custom SCAPI contracts, compose Admin re
|
|
|
8
8
|
Prefer dedicated tools. Otherwise discover with `scapi_search`, compose with
|
|
9
9
|
`scapi_execute`. Use JavaScript async arrow functions; no TypeScript or imports.
|
|
10
10
|
Warehouse reports/SQL use `cip_discover` / `cip_query`, not code mode;
|
|
11
|
-
see [CIP analytics](skill://mcp/cip/SKILL.md).
|
|
11
|
+
see [CIP analytics](skill://mcp/b2c-mcp-cip/SKILL.md).
|
|
12
12
|
Use code mode for API discovery, request composition, and result processing.
|
|
13
13
|
Use terminal/file tools for local development, builds, and filesystem work.
|
|
14
14
|
Filesystem APIs, subprocesses, worker threads, and native addons are restricted.
|
|
15
15
|
Read this skill once via resources or `skills_read`,
|
|
16
16
|
then pass `skillRead: true`. This does not authorize mutations.
|
|
17
17
|
|
|
18
|
+
## Code objects
|
|
19
|
+
|
|
20
|
+
Write JavaScript against these objects, not TypeScript.
|
|
21
|
+
|
|
22
|
+
`scapi_search`:
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
interface Operation {
|
|
26
|
+
api: string;
|
|
27
|
+
operationId: string;
|
|
28
|
+
summary?: string;
|
|
29
|
+
parameters: Array<{name: string; in: string; required?: boolean; schema?: unknown}>;
|
|
30
|
+
requestBody?: {required?: boolean; content: Record<string, {schema: any}>};
|
|
31
|
+
responses?: Record<string, unknown>;
|
|
32
|
+
security: Array<Record<string, string[]>>;
|
|
33
|
+
auth: {types: string[]; schemes: string[]; executable: boolean}; // runtime support, not access
|
|
34
|
+
}
|
|
35
|
+
declare const spec: {
|
|
36
|
+
apis: Array<{id: string; apiFamily: string; apiName: string; apiVersion: string; authTypes: string[]}>;
|
|
37
|
+
paths: Record<string, Record<string, Operation>>; // full paths, lowercase HTTP methods
|
|
38
|
+
};
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`scapi_execute` (`async (input) => ...` receives the tool's `input`):
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
declare const organizationId: string | undefined; // resolved tenant
|
|
45
|
+
declare const siteId: string | undefined; // configured site
|
|
46
|
+
declare const scapi: {
|
|
47
|
+
request(options: {
|
|
48
|
+
method: string;
|
|
49
|
+
path: string;
|
|
50
|
+
query?: Record<string, unknown>;
|
|
51
|
+
body?: unknown;
|
|
52
|
+
}): Promise<{status: number; ok: boolean; data: any; diagnostic?: {code: string; message: string}}>;
|
|
53
|
+
};
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Both tools also expose `codemode.search`/`codemode.describe`; `codemode.run` and
|
|
57
|
+
`auth.*` are execute-only. See [Reusable workflows](#reusable-workflows) and [Authentication](#authentication).
|
|
58
|
+
|
|
59
|
+
Search examples:
|
|
60
|
+
|
|
61
|
+
```js
|
|
62
|
+
// Find product operations
|
|
63
|
+
async () =>
|
|
64
|
+
Object.entries(spec.paths)
|
|
65
|
+
.filter(([path]) => path.startsWith('/product/products/'))
|
|
66
|
+
.flatMap(([path, methods]) =>
|
|
67
|
+
Object.entries(methods).map(([method, op]) => ({method, path, operationId: op.operationId})),
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
// Inspect only fields needed for creation
|
|
71
|
+
async () => {
|
|
72
|
+
const op = spec.paths['/product/products/v1/organizations/{organizationId}/products/{productId}'].put;
|
|
73
|
+
const body = op.requestBody.content['application/json'].schema;
|
|
74
|
+
const fields = [...new Set([...(body.required ?? []), 'name', 'owningCatalogId', 'onlineFlag'])];
|
|
75
|
+
return {
|
|
76
|
+
parameters: op.parameters,
|
|
77
|
+
required: body.required,
|
|
78
|
+
fields: Object.fromEntries(fields.map((k) => [k, body.properties[k]])),
|
|
79
|
+
auth: op.auth,
|
|
80
|
+
security: op.security,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
|
|
18
85
|
## Discover
|
|
19
86
|
|
|
20
87
|
Discovery defaults to the bundled standard contracts offline; no credentials needed.
|
|
@@ -22,7 +89,9 @@ Pass `schemas: "live"` to search the configured tenant's Schemas API contracts
|
|
|
22
89
|
instead: tenant `c_*` properties, custom APIs, and APIs newer than the bundle.
|
|
23
90
|
Live search needs `sfcc.scapi-schemas`, uses the same project context as
|
|
24
91
|
`scapi_execute`, and caches per tenant for the server session (`refresh: true` refetches). Contracts that
|
|
25
|
-
failed to load are listed in `schemaFailures`.
|
|
92
|
+
failed to load are listed in `schemaFailures`. APIs with `origin: "local"` are
|
|
93
|
+
developer-supplied beta contracts (`--scapi-schemas`). They replace the bundled and live versions in search and
|
|
94
|
+
execution. Schemas and responses can be huge.
|
|
26
95
|
Return only what the next decision needs:
|
|
27
96
|
|
|
28
97
|
1. Find APIs/operations through `spec.apis`/`spec.paths`; return method/path/operationId.
|
|
@@ -106,16 +175,16 @@ and `ShopperToken` operations use their declared `c_*` scopes. [Custom API workf
|
|
|
106
175
|
- Unsupported: registered-shopper-only operations (`RegisteredShopperToken`),
|
|
107
176
|
trusted-system/agent on-behalf tokens, and SLAS itself (`shopper/auth/v1`).
|
|
108
177
|
`auth.slas({flow: 'registered', ...})` exports a registered token for external clients.
|
|
109
|
-
SLAS admin roles differ: [
|
|
178
|
+
SLAS admin roles differ: `docs_read({query: "cli-slas"})` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/slas.md)).
|
|
110
179
|
- HTTP 401/403 retain `status`/`data` plus `diagnostic`; preserve these.
|
|
111
180
|
A 403 alone does not prove missing scopes.
|
|
112
181
|
|
|
113
|
-
For missing values or wrong targets, read [MCP configuration](skill://mcp/b2c-config/SKILL.md)
|
|
114
|
-
(`skills_read` ID `mcp/b2c-config`). For external client/role/tenant-filter setup,
|
|
182
|
+
For missing values or wrong targets, read [MCP configuration](skill://mcp/b2c-mcp-config/SKILL.md)
|
|
183
|
+
(`skills_read` ID `mcp/b2c-mcp-config`). For external client/role/tenant-filter setup,
|
|
115
184
|
use `docs_read({query: "guide-authentication"})`; official Admin authorization:
|
|
116
185
|
`commerce-api/authorization-for-admin-apis`, scope definitions: `commerce-api/auth-z-scope-catalog`.
|
|
117
186
|
For other access questions, search `docs_search` with the specific error and API.
|
|
118
|
-
If docs are unavailable, use the [authentication guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication).
|
|
187
|
+
If docs are unavailable, use the [authentication guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication.md).
|
|
119
188
|
These are conditional setup references, not additional prerequisite reads.
|
|
120
189
|
|
|
121
190
|
## Compose and verify
|
|
@@ -198,6 +267,8 @@ For explicit save requests, see [saving](references/saving.md).
|
|
|
198
267
|
|
|
199
268
|
No CLI code-mode equivalent. For missing settings such as promotion discounts,
|
|
200
269
|
consider [XML archives](skill://b2c-cli/b2c-site-import-export/SKILL.md)
|
|
201
|
-
([
|
|
270
|
+
(`docs_read({query: "cli-jobs"})`, [online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/jobs.md)).
|
|
202
271
|
[Platform reference](https://developer.salesforce.com/docs/commerce/commerce-api/references).
|
|
203
|
-
|
|
272
|
+
Configuration/access: `docs_read({query: "mcp-configuration"})` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/configuration.md)).
|
|
273
|
+
|
|
274
|
+
Other MCP workflows and runbooks: [skill index](skill://mcp/b2c-mcp-server/SKILL.md#skill-index).
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: server
|
|
3
|
-
description: B2C MCP
|
|
2
|
+
name: b2c-mcp-server
|
|
3
|
+
description: Index and setup for the B2C Commerce MCP server, covering toolset selection, tool choice by task, and the skill catalog. Use to enable tools, pick the right tool, or find the skill that covers a B2C task.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# B2C MCP Server
|
|
7
7
|
|
|
8
|
+
## Skill index
|
|
9
|
+
|
|
10
|
+
Read only the skill that matches the task; each links its own references.
|
|
11
|
+
|
|
12
|
+
| Task | Skill |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| Commerce API reads/writes (required before `scapi_search` / `scapi_execute`) | `skill://mcp/b2c-mcp-scapi/SKILL.md` |
|
|
15
|
+
| Warehouse reports and SQL (required before `cip_query`) | `skill://mcp/b2c-mcp-cip/SKILL.md` |
|
|
16
|
+
| Configuration, credentials, access grants, wrong target | `skill://mcp/b2c-mcp-config/SKILL.md` |
|
|
17
|
+
| Server-side script debugging | `skill://mcp/b2c-mcp-debugger/SKILL.md` |
|
|
18
|
+
| Instance files and selected cartridge uploads | [files](references/files.md) |
|
|
19
|
+
| Production incident or unknown operational signal | `skill://b2c-ops/b2c-production-triage/SKILL.md` |
|
|
20
|
+
| Failed or late jobs | `skill://b2c-ops/b2c-job-health/SKILL.md` |
|
|
21
|
+
| Checkout or order failures | `skill://b2c-ops/b2c-checkout-triage/SKILL.md`, `skill://b2c-ops/b2c-order-failure-triage/SKILL.md` |
|
|
22
|
+
| Anything else | `skill://index` |
|
|
23
|
+
|
|
24
|
+
Every skill and reference file is readable as an MCP resource
|
|
25
|
+
(`skill://<collection>/<skill>/<file>`) or with `skills_read({uri})`.
|
|
26
|
+
Collections: `b2c` (platform/cartridges), `b2c-cli` (CLI), `b2c-ops`
|
|
27
|
+
(operator/admin runbooks), `storefront-next` (storefronts), `mcp` (server/tool
|
|
28
|
+
workflows). Search with `skills_read({query, collection})` or browse `skill://index`.
|
|
29
|
+
|
|
8
30
|
## Server configuration and tool availability
|
|
9
31
|
|
|
10
32
|
Use the client's tool discovery before concluding a tool is unavailable.
|
|
@@ -40,7 +62,7 @@ Use launch arguments/environment for server settings, not project `.env` or `dw.
|
|
|
40
62
|
## Tool choice and project configuration
|
|
41
63
|
|
|
42
64
|
- Call `config_inspect` directly with the task's `projectDirectory`; secrets are
|
|
43
|
-
masked. For resolution issues: [B2C config](skill://mcp/b2c-config/SKILL.md).
|
|
65
|
+
masked. For resolution issues: [B2C config](skill://mcp/b2c-mcp-config/SKILL.md).
|
|
44
66
|
CLI equivalent, when requested: `b2c setup inspect`.
|
|
45
67
|
- Deploy cartridges: `cartridge_deploy`; CLI scripts/extra flags: `b2c code deploy`.
|
|
46
68
|
Confirm instance/version and preserve returned `resolution`. Use `files` for
|
|
@@ -50,37 +72,37 @@ Use launch arguments/environment for server settings, not project `.env` or `dw.
|
|
|
50
72
|
exact text by HTTP byte range or downloads to `outputPath`; `webdav_put` uploads
|
|
51
73
|
`content` or `sourcePath`. Prefer these over a terminal for supported transfers.
|
|
52
74
|
[File choices and limits](references/files.md).
|
|
53
|
-
- Debug: [MCP debugger](skill://mcp/debugger/SKILL.md). CLI/IDE only when requested.
|
|
75
|
+
- Debug: [MCP debugger](skill://mcp/b2c-mcp-debugger/SKILL.md). CLI/IDE only when requested.
|
|
54
76
|
- Prefer dedicated tools for their workflows. For other Commerce API tasks,
|
|
55
77
|
use `scapi_search` / `scapi_execute`: products, campaigns, promotions, jobs,
|
|
56
|
-
code versions, site cartridge paths, and more. Read [the SCAPI skill](skill://mcp/scapi/SKILL.md)
|
|
78
|
+
code versions, site cartridge paths, and more. Read [the SCAPI skill](skill://mcp/b2c-mcp-scapi/SKILL.md)
|
|
57
79
|
first; its task map and built-in snippets cover recurring operations.
|
|
58
80
|
- Custom API scaffold: `b2c scaffold generate custom-api`; no MCP equivalent.
|
|
59
81
|
- API/product documentation: `docs_search` / `docs_read`.
|
|
60
82
|
- Warehouse analytics: `cip_discover` for reports/metadata, `cip_query` for report
|
|
61
|
-
or SQL execution. Read [CIP analytics](skill://mcp/cip/SKILL.md) before execution.
|
|
83
|
+
or SQL execution. Read [CIP analytics](skill://mcp/b2c-mcp-cip/SKILL.md) before execution.
|
|
62
84
|
Prefer CIP for sales/merchandising/technical trends; SCAPI for current records.
|
|
63
|
-
- Operations or incidents:
|
|
64
|
-
`skills_read` with `collection: "b2c-ops"` and
|
|
65
|
-
|
|
66
|
-
relevant references. Runbooks guide evidence and handoff, not authorization
|
|
85
|
+
- Operations or incidents: start with the matching `b2c-ops` runbook from the
|
|
86
|
+
[skill index](#skill-index), or `skills_read` with `collection: "b2c-ops"` and
|
|
87
|
+
the task query. Read only relevant references. Runbooks guide evidence and handoff, not authorization
|
|
67
88
|
to rerun jobs or change data. CLI fallback is appropriate for an uncovered
|
|
68
89
|
signal when terminal access is available; a skill does not supply that access.
|
|
69
90
|
|
|
70
91
|
Do not infer tool names from CLI commands. Check a mutation's outcome before
|
|
71
92
|
retrying after missing output.
|
|
72
93
|
|
|
73
|
-
##
|
|
94
|
+
## Loading skills
|
|
74
95
|
|
|
75
|
-
|
|
76
|
-
`
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
detail for observed conditions:
|
|
83
|
-
`skills_read`. Skills are
|
|
96
|
+
If the client lists this server's skills, load them through it. Otherwise read
|
|
97
|
+
`skill://` URIs as MCP resources, or with `skills_read({uri})`.
|
|
98
|
+
Use a skill's listed name or URI; do not derive names from the server name.
|
|
99
|
+
Relative links resolve against the linking skill's directory.
|
|
100
|
+
Skills cite documentation IDs as `b2c docs read <id>` or `docs_read({query: "<id>"})`;
|
|
101
|
+
read them with `docs_read({query: "<id>"})` (no terminal needed). Online links
|
|
102
|
+
point to the same pages as Markdown.
|
|
103
|
+
Result `skillReferences` point to optional detail for observed conditions:
|
|
104
|
+
read the URI, or pass its URI and `section` to `skills_read`. Skills are
|
|
105
|
+
directory-agnostic.
|
|
84
106
|
|
|
85
107
|
Tools needing a skill name it in their description; no universal read is
|
|
86
108
|
required. Resource and tool reads are equivalent; do not read both.
|
|
@@ -91,9 +113,11 @@ When scripting tool calls, emit `structuredContent` when present, otherwise
|
|
|
91
113
|
|
|
92
114
|
## Setup references
|
|
93
115
|
|
|
94
|
-
|
|
95
|
-
|
|
116
|
+
Documentation IDs below are read with `docs_read({query: ID})`.
|
|
117
|
+
|
|
118
|
+
- Credentials, external grants, or access failures: [MCP configuration](skill://mcp/b2c-mcp-config/SKILL.md),
|
|
119
|
+
`skills_read({id: "mcp/b2c-mcp-config", section: "setup-and-access"})`.
|
|
96
120
|
It maps setup issues to exact documentation IDs; no universal setup read is needed.
|
|
97
|
-
- [Client installation](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/installation)
|
|
98
|
-
-
|
|
99
|
-
-
|
|
121
|
+
- [Client installation](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/installation.md)
|
|
122
|
+
- Launch configuration: `mcp-configuration` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/configuration.md))
|
|
123
|
+
- Capabilities and toolsets: `mcp-toolsets` ([online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/toolsets.md))
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sfnext-accessibility
|
|
3
|
+
description: >-
|
|
4
|
+
Build and fix accessible UI in a Storefront Next storefront (WCAG 2.1 AA): jsx-a11y lint findings, missing accessible names and labels, form error association, dialog focus management, aria-live status messages, keyboard behavior, color contrast, and verifying fixes with Storybook a11y/play() tests and the e2e axe scan with its baseline. Use for "accessibility", "a11y", "WCAG", "screen reader", "aria-label", "focus trap", "axe violation", pnpm lint:a11y, pnpm a11y, a11y-baseline.json, skip-a11y, STORYBOOK_A11Y_TEST_MODE, or an accessibility audit finding to fix. Do not use for general lint/typecheck gates (use `storefront-next:sfnext-quality-gates`), writing non-accessibility tests (use `storefront-next:sfnext-testing`), or color/token design (use `storefront-next:sfnext-theming`).
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Storefront Next Accessibility
|
|
8
|
+
|
|
9
|
+
Target: WCAG 2.1 AA. Accessibility is checked at three levels, cheapest first:
|
|
10
|
+
|
|
11
|
+
| Level | Tool | Catches |
|
|
12
|
+
|-------|------|---------|
|
|
13
|
+
| Lint | OxLint `jsx-a11y` (`pnpm lint`, `pnpm lint:a11y`) | Missing alt/labels, invalid ARIA, non-interactive handlers, ambiguous link text |
|
|
14
|
+
| Component | Storybook a11y addon (axe) and `play()` assertions | Contrast and name/role issues in a rendered state; focus, live regions, dialog behavior |
|
|
15
|
+
| Page | e2e axe scan (`pnpm a11y`) against `e2e/a11y-baseline.json` | Page composition, layout, mobile vs desktop |
|
|
16
|
+
|
|
17
|
+
Some things no scanner finds: focus order, meaning carried by color alone, 200%/400% zoom reflow, and what a screen reader actually announces. Those need keyboard testing, a story `play()` assertion of the DOM facts behind them, or a human with assistive technology.
|
|
18
|
+
|
|
19
|
+
## Author accessibly by default
|
|
20
|
+
|
|
21
|
+
1. Use the project's building blocks; they are already accessible in the general case:
|
|
22
|
+
- Radix-based primitives in `src/components/ui/` (dialog, dropdown-menu, sheet, tooltip, ...).
|
|
23
|
+
- `FormLabel`/`FormControl`/`FormMessage` from `@/components/ui/form` and the wrappers in `src/components/form-fields/` (they wire `aria-describedby` and invalid state from form context).
|
|
24
|
+
- `src/components/product-image` and `src/components/dynamic-image` (alt text), `src/components/radio-card` (grouped options), `src/components/skip-link.tsx` (first focusable element, targets `#main-content`), `src/components/announcement-banner`.
|
|
25
|
+
2. Icon-only controls need a translated accessible name: `<Button aria-label={t('close')}>`. Decorative icons get `aria-hidden="true"` and must not be focusable.
|
|
26
|
+
3. Every input needs a real label; errors must be programmatically associated and announced (form-field wrappers do this).
|
|
27
|
+
4. Use semantic elements first (`button`, `a`, `ul`, `h1..h6`); add ARIA only to fill gaps. Keep one `h1` per page and do not skip levels.
|
|
28
|
+
5. Status changes that happen without navigation (cart updates, promo applied, errors) need an `aria-live` region (`role="status"` or `role="alert"`); the message must be rendered into an existing live region or the region must exist before content changes.
|
|
29
|
+
6. Dialogs and drawers: focus moves in on open, is trapped, returns to the trigger on close, `Escape` closes. Use the Radix dialog primitives rather than hand-rolling.
|
|
30
|
+
7. Respect `prefers-reduced-motion` (see `src/components/fade-through-image` and `product-zoom-modal` for the pattern).
|
|
31
|
+
8. Keep visible focus styles; do not remove outlines without a replacement from the theme tokens.
|
|
32
|
+
9. Do not "fix" `role="list"` on a `ul`: it is deliberate (Tailwind's `list-style: none` removes list semantics in Safari + VoiceOver), and the lint config allows it.
|
|
33
|
+
|
|
34
|
+
## Fix the right layer
|
|
35
|
+
|
|
36
|
+
Before editing a shared primitive, check the call site.
|
|
37
|
+
|
|
38
|
+
- Call-site fix (most common): the primitive is correct but the caller passed no `aria-label`, a meaningless `alt`, or bypassed `FormLabel`. Fix the caller.
|
|
39
|
+
- Primitive fix: the shared component itself emits inaccessible markup. One change cascades to every usage, so keep it small and re-run the component's stories and snapshots.
|
|
40
|
+
- Many findings citing one primitive usually means one call-site pattern to correct, not a broken primitive.
|
|
41
|
+
|
|
42
|
+
## Reproduce, fix, confirm
|
|
43
|
+
|
|
44
|
+
Do not call something fixed from reading code. Capture a failing signal first, then the same check passing afterwards.
|
|
45
|
+
|
|
46
|
+
1. Name the state: default, form-error, modal-open, out-of-stock, focus-after-action, zoomed. Many violations only exist after interaction, which is why default-page scans come back clean.
|
|
47
|
+
2. Reproduce:
|
|
48
|
+
- Lint rule: `pnpm lint:a11y`.
|
|
49
|
+
- Rendered axe rule: run the story with `STORYBOOK_A11Y_TEST_MODE=error` via `pnpm storybook:test --type=a11y`, or add the scenario to the e2e a11y specs.
|
|
50
|
+
- Focus/label/live-region issues: write a `play()` assertion (next section) and watch it fail.
|
|
51
|
+
3. Fix at the right layer.
|
|
52
|
+
4. Re-run the same check; also run the component's snapshot (`pnpm storybook:test --type=snapshot`, `--update` only after reviewing the diff) and `pnpm lint`.
|
|
53
|
+
5. Never add a suppression (disabled axe rule, `oxlint-disable`, `aria-hidden`) just to turn a check green. A suppression is acceptable only when it targets a node you do not control and the reason is written next to it.
|
|
54
|
+
|
|
55
|
+
## Storybook: a11y addon and play() assertions
|
|
56
|
+
|
|
57
|
+
- Default addon mode is `todo` (violations are shown, not failing). `pnpm storybook:test --type=a11y` runs in error mode, so violations fail. `STORYBOOK_DISABLE_A11Y=true` turns it off.
|
|
58
|
+
- Opt one story file into strict mode: spread `{ a11y: { test: 'error' } }` into `parameters` (see `src/components/checkout/storybook/checkout-strict-a11y-parameters.ts`).
|
|
59
|
+
- Tag `skip-a11y` excludes a story from a11y runs. Use it rarely and comment why.
|
|
60
|
+
- Assert accessible outcomes, not CSS classes:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
play: async ({ canvasElement }) => {
|
|
64
|
+
await waitForStorybookReady(canvasElement);
|
|
65
|
+
const body = within(canvasElement.ownerDocument.body); // Radix portals render into <body>
|
|
66
|
+
const dialog = body.getByRole('dialog');
|
|
67
|
+
await expect(dialog).toBeInTheDocument();
|
|
68
|
+
await expect(body.getAllByRole('textbox')[0]).toHaveFocus();
|
|
69
|
+
await expect(body.getByRole('textbox', { name: /email/i })).toBeInTheDocument(); // label association
|
|
70
|
+
await expect(body.getByRole('status')).toHaveTextContent(/saved/i); // live region populated
|
|
71
|
+
},
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
A working reference is `src/components/login/stories/otp-modal.stories.tsx`. Imports: `expect, within, userEvent` from `storybook/test`; `waitForStorybookReady` from `@storybook/test-utils`. Tag the story `interaction` so it runs under `--type=interaction`.
|
|
75
|
+
|
|
76
|
+
## e2e axe scan and baseline
|
|
77
|
+
|
|
78
|
+
`pnpm a11y` runs axe (WCAG 2.1 A/AA tags) over key pages at desktop and mobile viewports and compares with `e2e/a11y-baseline.json`. CI fails when critical or serious violations increase or a new critical/serious rule appears; moderate and minor regressions are logged but do not block.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pnpm a11y # scan and compare with baseline
|
|
82
|
+
pnpm --dir e2e a11y:report # or from e2e/: markdown + HTML report of violations
|
|
83
|
+
pnpm --dir e2e a11y:update-baseline # after fixing: ratchet the baseline down, review the diff, commit
|
|
84
|
+
pnpm a11y:scan-coverage # checks that every page route is scanned or explicitly allowlisted
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- Never hand-edit the baseline; regenerate it.
|
|
88
|
+
- New pages: add a `Scenario` in `e2e/src/specs/core/a11y/` (public, account or orders spec), then run `a11y:update-baseline`. Details: `e2e/docs/a11y.md`.
|
|
89
|
+
- The dev server must be running (`pnpm dev`) or use `--mode=local` as described in `storefront-next:sfnext-testing`.
|
|
90
|
+
|
|
91
|
+
## Translated text
|
|
92
|
+
|
|
93
|
+
`jsx-a11y/anchor-ambiguous-text` only sees literal JSX text. A link whose text comes from `t('...')` is never checked, so review link and label copy in `src/locales/*/translations.json` for "click here"/"read more" style text, in every locale you ship. See `storefront-next:sfnext-i18n`.
|
|
94
|
+
|
|
95
|
+
More checklists (states, keyboard, pages to spot check): [references/checklist.md](references/checklist.md).
|
|
96
|
+
|
|
97
|
+
## Related Skills
|
|
98
|
+
|
|
99
|
+
- `storefront-next:sfnext-quality-gates` - lint config and pre-PR checklist
|
|
100
|
+
- `storefront-next:sfnext-testing` - story, unit and e2e test mechanics
|
|
101
|
+
- `storefront-next:sfnext-components` - component and form-field conventions
|
|
102
|
+
- `storefront-next:sfnext-theming` - color tokens and contrast
|
|
103
|
+
- `storefront-next:sfnext-i18n` - translated labels and link text
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Accessibility checklists
|
|
2
|
+
|
|
3
|
+
## Classify a finding
|
|
4
|
+
|
|
5
|
+
| Question | If yes |
|
|
6
|
+
|----------|--------|
|
|
7
|
+
| Is there a DOM fact a scanner or assertion can check (missing name, unlabeled input, empty live region, `aria-hidden` on focusable, duplicate id, empty heading, contrast)? | Automatable. Reproduce with axe (story a11y run or e2e scan) and fix. |
|
|
8
|
+
| Is it about focus landing in the right place, roving arrow keys, trap/return, live region populated? | Has a DOM correlate. Assert it in a story `play()`. |
|
|
9
|
+
| Is it reading order, meaning conveyed by color alone, zoom/reflow at 200% to 400%, or exactly what VoiceOver/NVDA speaks? | Manual. Test with the keyboard, browser zoom and a screen reader; record the result. Do not close it as "cannot reproduce" because a scanner is clean. |
|
|
10
|
+
|
|
11
|
+
For "status message is not announced": if a live region should exist in the DOM, it is assertable; if the claim is purely about speech output, test with assistive technology.
|
|
12
|
+
|
|
13
|
+
## States to exercise
|
|
14
|
+
|
|
15
|
+
Scan or assert in each relevant state, not only the settled default:
|
|
16
|
+
|
|
17
|
+
- default
|
|
18
|
+
- form-error (submit empty or invalid)
|
|
19
|
+
- modal, drawer or menu open
|
|
20
|
+
- out-of-stock / unavailable variant
|
|
21
|
+
- after an action (focus after add-to-cart, after closing a dialog)
|
|
22
|
+
- zoomed to 400% / narrow viewport
|
|
23
|
+
- mobile and desktop viewports
|
|
24
|
+
- reduced motion enabled
|
|
25
|
+
|
|
26
|
+
Prefer states that do not depend on live catalog data for repeatable checks; data-dependent states (out-of-stock, specific content) can differ between local and CI backends.
|
|
27
|
+
|
|
28
|
+
## Keyboard pass (per page or component)
|
|
29
|
+
|
|
30
|
+
- Tab order follows the visual order; nothing focusable is hidden; a visible focus indicator is always present.
|
|
31
|
+
- All controls operable with Enter/Space; menus, tabs, carousels and swatch groups support arrow keys as expected.
|
|
32
|
+
- `Escape` closes dialogs and popovers; focus returns to the trigger.
|
|
33
|
+
- No keyboard trap outside intentional modal containment.
|
|
34
|
+
- The skip link is the first Tab stop and moves focus to `#main-content`.
|
|
35
|
+
|
|
36
|
+
## Forms
|
|
37
|
+
|
|
38
|
+
- Each field has a visible label associated through `FormLabel` or `htmlFor`.
|
|
39
|
+
- Error text is associated (`aria-describedby`) and the field is `aria-invalid`; on a failed submit, move focus to the first invalid field or an error summary (verify the behavior of the form you are editing).
|
|
40
|
+
- Required state is conveyed in text, not color alone.
|
|
41
|
+
- Autocomplete attributes are set for address, email and payment fields.
|
|
42
|
+
|
|
43
|
+
## Images and media
|
|
44
|
+
|
|
45
|
+
- Product and content images use `ProductImage`/`DynamicImage` with meaningful alt text; decorative images use empty alt.
|
|
46
|
+
- Icon-only buttons have translated accessible names.
|
|
47
|
+
- Carousels: labelled region, pause/controls reachable by keyboard, reduced motion respected.
|
|
48
|
+
|
|
49
|
+
## Content and structure
|
|
50
|
+
|
|
51
|
+
- One `h1` per page; headings in order.
|
|
52
|
+
- Landmarks (`header`, `nav`, `main`, `footer`) present once each with labels where repeated.
|
|
53
|
+
- Link text makes sense out of context, in every locale.
|
|
54
|
+
- Lists use list markup; keep `role="list"` on styled `ul` (Safari + VoiceOver).
|
|
55
|
+
|
|
56
|
+
## Where to run what
|
|
57
|
+
|
|
58
|
+
| Goal | Command |
|
|
59
|
+
|------|---------|
|
|
60
|
+
| Lint-level a11y only | `pnpm lint:a11y` |
|
|
61
|
+
| Rendered component violations | `pnpm storybook:test --type=a11y` |
|
|
62
|
+
| Focus/aria behavior | `pnpm storybook:test --type=interaction` |
|
|
63
|
+
| Full-page scan vs baseline | `pnpm a11y` |
|
|
64
|
+
| Report with HTML snippets for tickets | `pnpm --dir e2e a11y:report` |
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sfnext-analytics-consent
|
|
3
|
+
description: >-
|
|
4
|
+
Storefront Next analytics: engagement adapters (Einstein, Active Data, Data 360), adding a custom adapter, tracking consent gating, PageViewTracker, useAnalytics events, and first-touch attribution (dw_attribution). Use when configuring engagement.adapters in config.server.ts, writing an adapter with hasConsent, registering it in initializeEngagementAdapters, wiring the consent banner (trackingConsent, consentCategories, dw_dnt), firing trackViewProduct/trackCartItemAdd events, debugging why no analytics events are sent, or passing campaign attribution to orders. Do not use for general config loading or env vars (use `storefront-next:sfnext-configuration`), CSP/script allowlisting of third-party tags (use `storefront-next:sfnext-security`), or SEO meta/JSON-LD (use `storefront-next:sfnext-seo`).
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Storefront Next Analytics and Consent
|
|
8
|
+
|
|
9
|
+
Events flow: component -> `useAnalytics()` -> event mediator (`@salesforce/storefront-next-runtime/events`) -> each registered engagement adapter. Every adapter checks shopper consent before sending. Read `docs/README-ADAPTER-PATTERN-GUIDE.md` and `docs/README-CONSENT-TRACKING.md` in your project for the full guides; where they disagree with the code, trust the code (paths below were verified).
|
|
10
|
+
|
|
11
|
+
## Where things live
|
|
12
|
+
|
|
13
|
+
| Concern | Location |
|
|
14
|
+
|---|---|
|
|
15
|
+
| Adapter config | `engagement.adapters.*` in `config.server.ts` |
|
|
16
|
+
| Adapter types, store, `hasConsent`, `buildConsentPreferences` | `@/lib/adapters` (`src/lib/adapters/engagement/`) |
|
|
17
|
+
| Registration of built-in adapters | `src/lib/adapters/engagement/register.ts` (`initializeEngagementAdapters`) |
|
|
18
|
+
| Built-in adapters | `einstein.ts`, `active-data.ts`, `data360.ts` in the same folder |
|
|
19
|
+
| Page view tracking | `src/analytics/page-view-tracker.tsx` (`PageViewTracker`, mounted in `src/root.tsx`) |
|
|
20
|
+
| Event hooks | `@/hooks/use-analytics`, `@/hooks/use-tracking-consent` |
|
|
21
|
+
| Attribution | `src/lib/attribution.ts`, `@/hooks/use-attribution`, `src/middlewares/attribution-forwarding.server.ts` |
|
|
22
|
+
|
|
23
|
+
## Configure built-in adapters
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
// config.server.ts
|
|
27
|
+
engagement: {
|
|
28
|
+
adapters: {
|
|
29
|
+
einstein: { enabled: true, consentCategory: 'analytics', host, einsteinId, realm, siteId, isProduction: false,
|
|
30
|
+
eventToggles: { view_page: true, view_product: true /* ... */ } },
|
|
31
|
+
data360: { enabled: true, consentCategory: 'analytics', appSourceId, tenantId, siteId, webStoreId: 'sfnext', eventToggles: { /* ... */ } },
|
|
32
|
+
activeData: { enabled: true, /* see config.server.ts */ },
|
|
33
|
+
},
|
|
34
|
+
analytics: {
|
|
35
|
+
trackingConsent: { enabled: true, defaultTrackingConsent: TrackingConsent.Declined,
|
|
36
|
+
consentCategories: ['necessary', 'analytics', 'marketing', 'personalization'] },
|
|
37
|
+
pageViewsBlocklist: [/* paths that must not emit view_page */],
|
|
38
|
+
},
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- The shipped IDs (einsteinId, realm, tenantId, ...) are sample values. Replace them with your own before go-live, or set `enabled: false`.
|
|
43
|
+
- An adapter with `consentCategory: 'analytics'` sends nothing unless `'analytics'` is in `trackingConsent.consentCategories`.
|
|
44
|
+
- `eventToggles` turns individual event types on or off per adapter. Data 360 ships only view/impression events enabled.
|
|
45
|
+
- The `einstein` and `data360` adapter blocks, and `activeData.enabled` / `activeData.eventToggles`, are protected config paths and cannot be overridden with `PUBLIC__` env vars; edit `config.server.ts` and rebuild. Other keys follow the `PUBLIC__app__engagement__...` pattern (see `storefront-next:sfnext-configuration`).
|
|
46
|
+
|
|
47
|
+
## Fire events
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { useAnalytics } from '@/hooks/use-analytics';
|
|
51
|
+
|
|
52
|
+
const { trackViewProduct, trackCartItemAdd } = useAnalytics();
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`useAnalytics` returns `trackViewPage`, `trackViewProduct`, `trackCartItemAdd`, `trackCheckoutStart`, `trackCheckoutStep`, `trackViewSearch`, `trackViewCategory`, `trackClickProductIn{Category,Search,Recommender}`, `trackViewRecommender`, search-suggestion and wishlist trackers. On the server these are no-ops, so call them from effects or event handlers. Check the hook source for exact argument shapes before calling.
|
|
56
|
+
|
|
57
|
+
## Consent
|
|
58
|
+
|
|
59
|
+
Consent is read from the auth session (`dw_dnt` cookie) by `useTrackingConsent()`, converted to a `ConsentPreferences` array by `buildConsentPreferences(trackingConsent, consentCategories, isTrackingConsentEnabled)`, and passed to every adapter. While consent is undetermined or declined, no events are sent.
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
import { useTrackingConsent } from '@/hooks/use-tracking-consent';
|
|
63
|
+
import { TrackingConsent } from '@/types/tracking-consent';
|
|
64
|
+
|
|
65
|
+
const { shouldShowBanner, setTrackingConsent } = useTrackingConsent();
|
|
66
|
+
setTrackingConsent(TrackingConsent.Accepted);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Granular per-category consent (for example from a CMP) means replacing the binary banner logic that feeds `buildConsentPreferences`; adapters already gate per `consentCategory`.
|
|
70
|
+
|
|
71
|
+
## Add a custom adapter
|
|
72
|
+
|
|
73
|
+
See [references/CUSTOM-ADAPTER.md](references/CUSTOM-ADAPTER.md). In short: implement `createMyAdapter(config): EngagementAdapter` using `hasConsent`, register it with `addAdapter('my-adapter', ...)` inside `initializeEngagementAdapters`, and add `engagement.adapters.myAdapter` config (the config type allows extra keys).
|
|
74
|
+
|
|
75
|
+
## Attribution
|
|
76
|
+
|
|
77
|
+
A first-touch `dw_attribution` cookie captures allow-listed landing/referrer params (see `LANDING_PARAM_ALLOWLIST` in `src/lib/attribution.ts`). `attributionForwardingMiddleware` forwards it on order creation. Add a parameter by extending the allowlist; cookie size is capped (`MAX_ATTRIBUTION_COOKIE_VALUE_LENGTH`).
|
|
78
|
+
|
|
79
|
+
## Troubleshooting
|
|
80
|
+
|
|
81
|
+
- No events at all: consent not accepted, `'analytics'` missing from `consentCategories`, adapter `enabled: false`, or the path is in `pageViewsBlocklist`. Startup logs a warning when consent categories are empty.
|
|
82
|
+
- Custom adapter never fires: it was not registered in `initializeEngagementAdapters`, or `eventToggles[eventType]` is falsy.
|
|
83
|
+
- Third-party script or beacon blocked: CSP, see `storefront-next:sfnext-security`.
|
|
84
|
+
|
|
85
|
+
## Related Skills
|
|
86
|
+
|
|
87
|
+
- `storefront-next:sfnext-configuration` - config.server.ts, env overrides
|
|
88
|
+
- `storefront-next:sfnext-security` - CSP for analytics endpoints
|
|
89
|
+
- `storefront-next:sfnext-authentication` - session/cookies behind `dw_dnt`
|
|
90
|
+
- `storefront-next:sfnext-testing` - testing adapters and hooks
|
|
91
|
+
- `storefront-next:sfnext-seo` - page metadata and structured data
|