@salesforce/b2c-dx-mcp 3.2.1 → 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/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,5 +1,5 @@
|
|
|
1
|
-
import { ScapiLiveSchemaCache, ScapiShopperSessions } from '@salesforce/b2c-tooling-sdk/scapi';
|
|
1
|
+
import { ScapiLiveSchemaCache, ScapiShopperSessions, type ScapiSchemaDocument } from '@salesforce/b2c-tooling-sdk/scapi';
|
|
2
2
|
import type { McpTool } from '../../utils/types.js';
|
|
3
3
|
import type { ServicesLoader } from '../adapter.js';
|
|
4
4
|
import { ScapiExecutionRegistry } from './execution-registry.js';
|
|
5
|
-
export declare function createScapiCodeTools(loadServices: ServicesLoader, snippetDirectory?: string, registry?: ScapiExecutionRegistry, schemaCache?: ScapiLiveSchemaCache, shopperSessions?: ScapiShopperSessions): McpTool[];
|
|
5
|
+
export declare function createScapiCodeTools(loadServices: ServicesLoader, snippetDirectory?: string, registry?: ScapiExecutionRegistry, schemaCache?: ScapiLiveSchemaCache, shopperSessions?: ScapiShopperSessions, localSchemas?: readonly ScapiSchemaDocument[]): McpTool[];
|
|
@@ -17,64 +17,16 @@ const code = z
|
|
|
17
17
|
.min(1)
|
|
18
18
|
.max(32_768)
|
|
19
19
|
.describe('JavaScript async arrow function. Return concise JSON. No filesystem or shell access.');
|
|
20
|
-
const
|
|
21
|
-
const
|
|
20
|
+
const SCAPI_SKILL_REQUIRED = 'SCAPI_SKILL_REQUIRED: Read skill://mcp/b2c-mcp-scapi/SKILL.md through resources or skills_read, then retry with skillRead: true.';
|
|
21
|
+
const skillRead = z
|
|
22
|
+
.literal(true, { error: SCAPI_SKILL_REQUIRED })
|
|
23
|
+
.describe('Required. Set true only after reading skill://mcp/b2c-mcp-scapi/SKILL.md (MCP resource, or skills_read({uri})).');
|
|
22
24
|
function requireScapiSkill(read) {
|
|
23
25
|
if (read !== true)
|
|
24
|
-
throw new Error(
|
|
26
|
+
throw new Error(SCAPI_SKILL_REQUIRED);
|
|
25
27
|
}
|
|
26
|
-
const searchDescription = `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Schemas can be huge. Find operation IDs/paths first; then select required and task fields, not whole trees. Local refs expand; recursive/deep refs remain $ref.
|
|
30
|
-
|
|
31
|
-
Code objects (write JavaScript, not these types):
|
|
32
|
-
interface Operation {
|
|
33
|
-
api: string; operationId: string; summary?: string;
|
|
34
|
-
parameters: Array<{name: string; in: string; required?: boolean; schema?: unknown}>;
|
|
35
|
-
requestBody?: {required?: boolean; content: Record<string, {schema: any}>};
|
|
36
|
-
responses?: Record<string, unknown>;
|
|
37
|
-
security: Array<Record<string, string[]>>;
|
|
38
|
-
auth: {types: string[]; schemes: string[]; executable: boolean}; // runtime support, not access
|
|
39
|
-
}
|
|
40
|
-
declare const spec: {
|
|
41
|
-
apis: Array<{id: string; apiFamily: string; apiName: string; apiVersion: string; authTypes: string[]}>;
|
|
42
|
-
paths: Record<string, Record<string, Operation>>; // full paths, lowercase HTTP methods
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
Examples:
|
|
46
|
-
// Find product operations
|
|
47
|
-
async () => Object.entries(spec.paths)
|
|
48
|
-
.filter(([path]) => path.startsWith('/product/products/'))
|
|
49
|
-
.flatMap(([path, methods]) => Object.entries(methods)
|
|
50
|
-
.map(([method, op]) => ({method, path, operationId: op.operationId})))
|
|
51
|
-
|
|
52
|
-
// Inspect only fields needed for creation
|
|
53
|
-
async () => {
|
|
54
|
-
const op = spec.paths['/product/products/v1/organizations/{organizationId}/products/{productId}'].put;
|
|
55
|
-
const body = op.requestBody.content['application/json'].schema;
|
|
56
|
-
const fields = [...new Set([...(body.required ?? []), 'name', 'owningCatalogId', 'onlineFlag'])];
|
|
57
|
-
return {parameters: op.parameters, required: body.required,
|
|
58
|
-
fields: Object.fromEntries(fields.map(k => [k, body.properties[k]])), auth: op.auth, security: op.security};
|
|
59
|
-
}`;
|
|
60
|
-
const executeDescription = `Read, create, update, or delete Commerce records through SCAPI Admin or Shopper APIs when no dedicated tool fits. Discover endpoints with scapi_search; operations found with schemas:"live" (including custom APIs) are callable here for the same tenant. Otherwise fetch a custom API's live contract through scapi.request() in the same program first. Auth is automatic; Shopper APIs run as a guest whose session (basket) persists per site. JSON only; no binary transfers.
|
|
61
|
-
Read skill://mcp/scapi/SKILL.md first.
|
|
62
|
-
|
|
63
|
-
Reuse workflows with await codemode.run(name, input); describe first. async (input) receives input. Completed executionId enables scapi_snippet_save.
|
|
64
|
-
Safety confirmation uses MCP elicitation. Protocol retries resume retained code; never replay it. Approval has no server deadline. Decline or cancel terminates execution without rollback. action:cancel needs executionId only (plus skillRead).
|
|
65
|
-
|
|
66
|
-
Available in your code:
|
|
67
|
-
declare const organizationId: string | undefined; // resolved tenant
|
|
68
|
-
declare const siteId: string | undefined; // configured site
|
|
69
|
-
declare const scapi: {
|
|
70
|
-
request(options: {method: string; path: string; query?: Record<string, unknown>; body?: unknown}):
|
|
71
|
-
Promise<{status: number; ok: boolean; data: any; diagnostic?: {code: string; message: string}}>;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
Compose dependent requests; await each. Responses can be huge: filter/map/slice; return counts, selected rows and verification. Preserve failures. HTTP failures return ok:false; transport/auth/safety failures throw. SDK safety governs scapi.request. fetch/WebSocket are disabled. Optional auth.accountManager()/auth.slas() export tokens for external clients; see skill. Check writes before retrying.
|
|
75
|
-
|
|
76
|
-
Example: inspect a campaign's promotions
|
|
77
|
-
async () => codemode.run('builtin/campaign-promotions', {campaignId: 'selected-campaign', limit: 4})`;
|
|
28
|
+
const searchDescription = `Requires reading skill://mcp/b2c-mcp-scapi/SKILL.md first. Search SCAPI Admin/Shopper OpenAPI contracts by running JavaScript over \`spec\`, to find the operationId, path, inputs and scopes for a Commerce API task when no dedicated tool fits. Use cip_* for analytics and webdav_* for files. Searches the bundled contracts by default (offline, no credentials); schemas:"live" fetches the current contracts from the configured instance instead, including tenant c_* fields, custom APIs and APIs newer than the bundle.`;
|
|
29
|
+
const executeDescription = `Requires reading skill://mcp/b2c-mcp-scapi/SKILL.md first. Run any SCAPI Admin or Shopper API operation (reads, writes, searches and actions) through scapi.request() in JavaScript. Covers most developer, merchant and administrator tasks: catalogs, products, pricing, promotions, orders, customers, inventory, sites, jobs, code versions, observability, and storefront flows such as baskets. Use it whenever no more specific tool fits. Find operations with scapi_search first. Auth is automatic; Shopper calls run as a per-site guest whose basket persists. Operations are governed by Safety Mode and may ask the user for confirmation.`;
|
|
78
30
|
function codeResult(data, resolution) {
|
|
79
31
|
const result = resolution ? attachResolution(jsonResult(data, 0), resolution, 0) : jsonResult(data, 0);
|
|
80
32
|
// Code-mode payloads are arbitrary JSON: retain provenance without duplicating the result.
|
|
@@ -93,7 +45,9 @@ function failure(error, resolution) {
|
|
|
93
45
|
isError: true,
|
|
94
46
|
};
|
|
95
47
|
}
|
|
96
|
-
export function createScapiCodeTools(loadServices, snippetDirectory, registry = new ScapiExecutionRegistry(), schemaCache = new ScapiLiveSchemaCache(), shopperSessions = new ScapiShopperSessions()) {
|
|
48
|
+
export function createScapiCodeTools(loadServices, snippetDirectory, registry = new ScapiExecutionRegistry(), schemaCache = new ScapiLiveSchemaCache(), shopperSessions = new ScapiShopperSessions(), localSchemas = []) {
|
|
49
|
+
// Developer-supplied contracts (--scapi-schemas) replace bundled and live ones with the same id.
|
|
50
|
+
const local = (api) => localSchemas.filter((document) => !api || document.entry.id === api);
|
|
97
51
|
// Retain only source for the last 50 completed executions, until this server ends.
|
|
98
52
|
const executions = new Map();
|
|
99
53
|
const searchInput = {
|
|
@@ -137,7 +91,7 @@ export function createScapiCodeTools(loadServices, snippetDirectory, registry =
|
|
|
137
91
|
{
|
|
138
92
|
name: 'scapi_search',
|
|
139
93
|
title: 'SCAPI Spec Search',
|
|
140
|
-
description: searchDescription
|
|
94
|
+
description: searchDescription,
|
|
141
95
|
inputSchema: searchInput,
|
|
142
96
|
toolsets: ['SCAPI', 'PWAV3', 'STOREFRONTNEXT'],
|
|
143
97
|
effect: 'read',
|
|
@@ -164,11 +118,12 @@ export function createScapiCodeTools(loadServices, snippetDirectory, registry =
|
|
|
164
118
|
refresh: input.refresh,
|
|
165
119
|
signal: context?.signal,
|
|
166
120
|
}));
|
|
121
|
+
documents = mergeScapiSchemas([], documents, local(input.api));
|
|
167
122
|
if (documents.length === 0 && failures.length === 0)
|
|
168
123
|
throw new Error('Unknown schema ID for this tenant. Omit api to discover available APIs.');
|
|
169
124
|
}
|
|
170
125
|
else {
|
|
171
|
-
documents = loadScapiSchemas().filter((document) => !input.api || document.entry.id === input.api);
|
|
126
|
+
documents = mergeScapiSchemas(loadScapiSchemas(), [], local()).filter((document) => !input.api || document.entry.id === input.api);
|
|
172
127
|
if (documents.length === 0)
|
|
173
128
|
throw new Error('Unknown schema ID. Omit api to discover available APIs, or use schemas:"live" for tenant and custom APIs.');
|
|
174
129
|
}
|
|
@@ -190,7 +145,7 @@ export function createScapiCodeTools(loadServices, snippetDirectory, registry =
|
|
|
190
145
|
{
|
|
191
146
|
name: 'scapi_execute',
|
|
192
147
|
title: 'SCAPI Code Executor',
|
|
193
|
-
description: executeDescription
|
|
148
|
+
description: executeDescription,
|
|
194
149
|
inputSchema: executeInput,
|
|
195
150
|
toolsets: ['SCAPI', 'PWAV3', 'STOREFRONTNEXT'],
|
|
196
151
|
effect: 'destructive',
|
|
@@ -241,8 +196,9 @@ export function createScapiCodeTools(loadServices, snippetDirectory, registry =
|
|
|
241
196
|
slasClientId: config.values.slasClientId,
|
|
242
197
|
slasClientSecret: config.values.slasClientSecret,
|
|
243
198
|
}),
|
|
244
|
-
// Live contracts discovered for this tenant replace bundled ones
|
|
245
|
-
|
|
199
|
+
// Live contracts discovered for this tenant replace bundled ones, and local ones replace both;
|
|
200
|
+
// the user owns their accuracy.
|
|
201
|
+
documents: mergeScapiSchemas(loadScapiSchemas(), tenant ? schemaCache.get(tenant) : [], localSchemas),
|
|
246
202
|
onSchema(document, customProperties) {
|
|
247
203
|
// Keep expanded tenant contracts from being replaced by unexpanded fetches.
|
|
248
204
|
if (tenant && (customProperties || document.entry.apiFamily === 'custom'))
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { ScapiSchemaDocument } from '@salesforce/b2c-tooling-sdk/scapi';
|
|
2
3
|
import type { z, ZodRawShape } from 'zod';
|
|
3
4
|
import type { Toolset } from './constants.js';
|
|
4
5
|
/**
|
|
@@ -64,4 +65,9 @@ export interface StartupFlags {
|
|
|
64
65
|
* corpus at startup; unset means all categories.
|
|
65
66
|
*/
|
|
66
67
|
docsTopics?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Developer-supplied SCAPI contracts loaded from `--scapi-schemas` / `SFCC_SCAPI_SCHEMAS`.
|
|
70
|
+
* They replace bundled and live contracts with the same id in scapi_search and scapi_execute.
|
|
71
|
+
*/
|
|
72
|
+
scapiSchemas?: readonly ScapiSchemaDocument[];
|
|
67
73
|
}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @salesforce/b2c-agent-plugins
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#738](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/738) [`1c73738`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/1c73738ce3c395738307653755692ffc357463c4) - The `storefront-next` and `figma-to-sfnext-pagedesigner` skills are updated for the October 2026 Storefront Next template. Code examples, commands, and project paths are corrected, and new skills cover security, SEO, analytics and consent, accessibility, quality gates, revalidation, and commerce features (24 skills). Skills were renamed or merged: `sfnext-create-vertical` → `sfnext-theming`, `sfnext-create-component` → `sfnext-components`, and `sfnext-scapi-management` + `sfnext-custom-apis` → `sfnext-scapi`. (Thanks [@clavery](https://github.com/clavery)!)
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#737](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/737) [`78df45a`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/78df45adae187b3ce3149b22c88456ba0583c835) - Updated the `b2c-config` skill for env file selection and Storefront Next fallback precedence. (Thanks [@clavery](https://github.com/clavery)!)
|
|
12
|
+
|
|
13
|
+
- [#739](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/739) [`86d42bc`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/86d42bc53c58020ca301df3e38d3cfa7ab0d4b04) - The `b2c-content` skill now points to `b2c-cli:b2c-config` for authentication setup instead of a skill that doesn't exist. (Thanks [@clavery](https://github.com/clavery)!)
|
|
14
|
+
|
|
15
|
+
- [#731](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/731) [`f692182`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/f69218247ce92a7af0dbbb49ca9d696f4ca4a3a4) - Documentation search now includes the B2C Commerce Solutions guides (bot management, caching strategies, flash-sale traffic, and industry solutions) in a new `commerce-solutions` category. (Thanks [@clavery](https://github.com/clavery)!)
|
|
16
|
+
|
|
17
|
+
- [#715](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/715) [`285bd55`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/285bd55bcbad048d343b3778eac4e1ef9b94cf97) - Add `b2c docs skill` to list, search, and read the agent skills bundled with the CLI, no plugin install required. Pass a skill, topic, or command (e.g. `b2c docs skill code deploy`); topic and command help now point to the covering skill. (Thanks [@clavery](https://github.com/clavery)!)
|
|
18
|
+
|
|
19
|
+
- [#734](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/734) [`bea5bdc`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/bea5bdc81ae9353848b38258de4e5a32a76da9ae) - The default `--mrt-backend` is now `legacy` (the MRT Cloud API) instead of `auto`. MRT commands no longer auto-detect and prefer the SCAPI backend unless you opt in. To restore the previous behavior — prefer SCAPI when short code, tenant ID, and client-credentials/JWT Bearer auth are configured, otherwise fall back to legacy — pass `--mrt-backend auto` (or set `MRT_BACKEND=auto` / `mrtBackend` in `dw.json`). Use `--mrt-backend scapi` to require SCAPI with no fallback. (Thanks [@kieran-sf](https://github.com/kieran-sf)!)
|
|
20
|
+
|
|
21
|
+
- [#731](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/731) [`f692182`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/f69218247ce92a7af0dbbb49ca9d696f4ca4a3a4) - Skills now refer to each other by name instead of relative paths, so links work wherever a skill is installed. Documentation links point to Markdown pages and include the `b2c docs read` ID for offline reading. (Thanks [@clavery](https://github.com/clavery)!)
|
|
22
|
+
|
|
3
23
|
## 1.10.3
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -76,6 +76,11 @@ Plugins listed in [`plugins.json`](./plugins.json) are zipped to `<name>-skills.
|
|
|
76
76
|
for MCP bundling and in both marketplaces for native installation.
|
|
77
77
|
- To make a new plugin installable via the B2C CLI, add it to [`plugins.json`](./plugins.json) and register a source in `packages/b2c-tooling-sdk/src/skills/sources.ts` (plus the `SkillSet` type in `types.ts`).
|
|
78
78
|
- Add a changeset targeting `@salesforce/b2c-agent-plugins` for any skill content changes.
|
|
79
|
+
- Skill references (enforced by `pnpm --filter @salesforce/b2c-dx-mcp run generate:guidance`):
|
|
80
|
+
- Relative links stay inside the skill directory (`references/X.md`, `../SKILL.md#section`).
|
|
81
|
+
- Refer to other skills by name ("see the `b2c-config` skill"), or by `skill://<collection>/<skill>/SKILL.md` in MCP skills. Never link another skill by relative path; skills install and serve independently.
|
|
82
|
+
- Link tooling docs to the Markdown page (`https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.md`) and add the docs ID: `` (`b2c docs read guide-configuration`) `` in plugin skills, `docs_read({query: "guide-configuration"})` in MCP skills.
|
|
83
|
+
- The frontmatter `name` must equal the directory name and follow the [Agent Skills naming rules](https://agentskills.io/specification#name-field).
|
|
79
84
|
|
|
80
85
|
See the repository [CLAUDE.md](../CLAUDE.md) and the [documentation skill](../.claude/skills/documentation/SKILL.md) for full contributor guidance.
|
|
81
86
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "b2c",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.11.0",
|
|
5
5
|
"description": "B2C Commerce development skills including Custom API development guides.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Salesforce"
|
|
@@ -165,5 +165,5 @@ alignment, or explicit recovery control matters more than atomic one-request orc
|
|
|
165
165
|
## Cross-References
|
|
166
166
|
|
|
167
167
|
- [B2C Hooks](../SKILL.md#headless-order-payment-use-the-order-pi-authorization-seam) — primary implementation guidance
|
|
168
|
-
-
|
|
168
|
+
- `b2c-ordering` skill — order statuses and Shopper Orders failure handling
|
|
169
169
|
- [OCAPI/SCAPI Hooks reference](./OCAPI-SCAPI-HOOKS.md) — hook signature list
|
|
@@ -44,7 +44,7 @@ This onboarding skill is part of the `b2c` plugin. For a full B2C Commerce setup
|
|
|
44
44
|
| `gemini-cli` | `gemini extensions install https://github.com/SalesforceCommerceCloud/b2c-developer-tooling` (run in terminal, not inside the CLI) |
|
|
45
45
|
| `other` | Use the file-copy installer below |
|
|
46
46
|
|
|
47
|
-
For clients without MCP-enabled plugin support, the `b2c-dx-mcp` server can be installed directly — see the [MCP installation docs](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/installation).
|
|
47
|
+
For clients without MCP-enabled plugin support, the `b2c-dx-mcp` server can be installed directly — see the [MCP installation docs](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/installation.md).
|
|
48
48
|
|
|
49
49
|
**Alternative — file-copy installer for any IDE** (also the right command to **update** already-installed skills or add a specific skill set):
|
|
50
50
|
|
|
@@ -149,6 +149,6 @@ Route by the answer:
|
|
|
149
149
|
|
|
150
150
|
## Reference
|
|
151
151
|
|
|
152
|
-
- B2C CLI reference: https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/
|
|
153
|
-
- Install guide: https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/
|
|
154
|
-
- Agent skills overview: https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/agent-skills
|
|
152
|
+
- B2C CLI reference: https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/index.md
|
|
153
|
+
- Install guide: https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/installation.md
|
|
154
|
+
- Agent skills overview: https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/agent-skills.md
|
|
@@ -106,7 +106,7 @@ server-side phase that creates, authorizes, and performs the Commerce-side place
|
|
|
106
106
|
or when the processor cannot participate in order-PI authorization. That hook runs inside order
|
|
107
107
|
creation's transaction: do not add a nested `Transaction.wrap`, and understand that `Status.ERROR`
|
|
108
108
|
rolls back the Commerce order but not an external gateway side effect. See
|
|
109
|
-
|
|
109
|
+
"Alternative: Authorize and Place in `order.afterPOST`" in the `b2c-hooks` skill.
|
|
110
110
|
|
|
111
111
|
## OrderMgr API Reference
|
|
112
112
|
|
|
@@ -388,4 +388,4 @@ exports.createOrderNo = function() {
|
|
|
388
388
|
|
|
389
389
|
## Related Skills
|
|
390
390
|
|
|
391
|
-
-
|
|
391
|
+
- `b2c-hooks` skill - Order hooks (calculate, payment, createOrderNo)
|
|
@@ -252,8 +252,8 @@ These APIs hit the database directly and are expensive on high-traffic pages. Re
|
|
|
252
252
|
|
|
253
253
|
## Related Skills
|
|
254
254
|
|
|
255
|
-
-
|
|
256
|
-
-
|
|
255
|
+
- `b2c-ordering` skill — Order lifecycle, status transitions, creation flows
|
|
256
|
+
- `b2c-custom-objects` skill — Custom object CRUD, OCAPI search queries
|
|
257
257
|
|
|
258
258
|
## Best Practices
|
|
259
259
|
|
|
@@ -6,12 +6,12 @@ description: Build backend integrations that sync data between B2C Commerce and
|
|
|
6
6
|
# SCAPI Admin APIs
|
|
7
7
|
|
|
8
8
|
Build backend integrations or manage Commerce data through standard Admin APIs.
|
|
9
|
-
Use
|
|
9
|
+
Use the `b2c-scapi-shopper` skill for storefront flows.
|
|
10
10
|
|
|
11
11
|
## Tool choice
|
|
12
12
|
|
|
13
13
|
When B2C MCP is available:
|
|
14
|
-
- Prefer a dedicated task tool. Otherwise read `skill://mcp/scapi/SKILL.md` once
|
|
14
|
+
- Prefer a dedicated task tool. Otherwise read `skill://mcp/b2c-mcp-scapi/SKILL.md` once
|
|
15
15
|
through resources or `skills_read`, then use `skillRead: true`.
|
|
16
16
|
- `scapi_search`: bundled standard contracts, offline. Find method/path/operationId,
|
|
17
17
|
then inspect selected parameters, fields, and security scopes. Return compact projections.
|
|
@@ -47,7 +47,7 @@ an external client, token flow, or bulk import. There is no CLI code-mode equiva
|
|
|
47
47
|
|
|
48
48
|
- [OAuth scopes](references/OAUTH-SCOPES.md): integration grants; compare with the operation's security.
|
|
49
49
|
- [Integration patterns](references/INTEGRATION-PATTERNS.md): ETL, sync, bulk import.
|
|
50
|
-
-
|
|
50
|
+
- `b2c-config` skill: CLI credentials and precedence.
|
|
51
51
|
- Official docs: `commerce-api/authorization-for-admin-apis`, `commerce-api/auth-z-scope-catalog`,
|
|
52
52
|
`commerce-api/timeouts-limits`, `commerce-api/throttle-rates`,
|
|
53
53
|
`commerce-api/inventory-impex-best-practices`.
|
|
@@ -49,7 +49,7 @@ b2c auth token --json
|
|
|
49
49
|
|
|
50
50
|
> **Tenant scope is required.** For any SCAPI Admin call (system APIs *and* custom Admin APIs), the token must carry both the tenant scope `SALESFORCE_COMMERCE_API:<tenant_id>` and the API-specific scopes — see [Dual Scope Requirement](#dual-scope-requirement) below. The SCAPI subcommands (`b2c scapi custom status`, `b2c scapi schemas list`) add the tenant scope automatically; `b2c auth token` and raw curl do not.
|
|
51
51
|
|
|
52
|
-
See
|
|
52
|
+
See the `b2c-config` skill for configuration details.
|
|
53
53
|
|
|
54
54
|
### Get Token Programmatically
|
|
55
55
|
|
|
@@ -430,9 +430,9 @@ Admin APIs have lower rate limits than Shopper APIs. See `docs_read commerce-api
|
|
|
430
430
|
|
|
431
431
|
## Related Skills
|
|
432
432
|
|
|
433
|
-
-
|
|
434
|
-
-
|
|
435
|
-
-
|
|
433
|
+
- `b2c-config` skill - Get admin tokens via CLI
|
|
434
|
+
- `b2c-scapi-shopper` skill - Shopper-facing APIs
|
|
435
|
+
- `b2c-scapi-schemas` skill - Browse OpenAPI schemas
|
|
436
436
|
|
|
437
437
|
## Reference Documentation
|
|
438
438
|
|
|
@@ -6,12 +6,12 @@ description: Call Shopper Commerce APIs (SCAPI) from headless storefronts and co
|
|
|
6
6
|
# Shopper Commerce APIs
|
|
7
7
|
|
|
8
8
|
Build storefront product, basket, checkout, customer, and context flows with SCAPI.
|
|
9
|
-
For backend management use
|
|
9
|
+
For backend management use the `b2c-scapi-admin` skill.
|
|
10
10
|
|
|
11
11
|
## Tool choice
|
|
12
12
|
|
|
13
13
|
When B2C MCP is available:
|
|
14
|
-
- Read `skill://mcp/scapi/SKILL.md` once through resources or `skills_read` before
|
|
14
|
+
- Read `skill://mcp/b2c-mcp-scapi/SKILL.md` once through resources or `skills_read` before
|
|
15
15
|
code-mode tools; pass `skillRead: true`.
|
|
16
16
|
- `scapi_search` with `authType: "shopper"` discovers bundled contracts offline.
|
|
17
17
|
Find method/path/operationId first, then selected inputs, response fields, and
|
|
@@ -40,8 +40,8 @@ These schema commands use live Schemas API access; MCP discovery is offline.
|
|
|
40
40
|
- Preserve basket/order state and handle errors explicitly. Page/filter responses
|
|
41
41
|
and return only fields needed by the next operation.
|
|
42
42
|
- For headless payment authorization, inspect
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
the order-PI hooks in the `b2c-hooks` skill ("Headless Order Payment") and the
|
|
44
|
+
order lifecycle in the `b2c-ordering` skill before choosing a placement flow.
|
|
45
45
|
|
|
46
46
|
## Conditional references
|
|
47
47
|
|
|
@@ -49,8 +49,8 @@ These schema commands use live Schemas API access; MCP discovery is offline.
|
|
|
49
49
|
- [Checkout](references/CHECKOUT-FLOW.md): basket-to-order workflow.
|
|
50
50
|
- [Common patterns](references/COMMON-PATTERNS.md): errors, pagination, field selection.
|
|
51
51
|
- [Scopes](references/SCOPES.md): Shopper grants by family.
|
|
52
|
-
-
|
|
53
|
-
-
|
|
52
|
+
- `b2c-slas` skill: CLI client management.
|
|
53
|
+
- `b2c-slas-auth-patterns` skill: OTP, passkeys, session bridge.
|
|
54
54
|
- Official docs: `commerce-api/use-shopper-api`, `commerce-api/slas`,
|
|
55
55
|
`commerce-api/work-with-baskets-orders`, `commerce-api/shopper-context-best-practices`,
|
|
56
56
|
`commerce-api/auth-z-scope-catalog`, `commerce-api/performance`.
|
|
@@ -50,7 +50,7 @@ b2c slas client create \
|
|
|
50
50
|
--redirect-uri http://localhost:3000/callback
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
See
|
|
53
|
+
See the `b2c-slas` skill for full client management.
|
|
54
54
|
|
|
55
55
|
### Get Guest Token
|
|
56
56
|
|
|
@@ -197,8 +197,7 @@ const order = await fetch(
|
|
|
197
197
|
> Treat the returned `NEW` order as success. On a deterministic payment failure, call
|
|
198
198
|
> `POST /orders/{orderNo}/actions/fail?reopenBasket=true` with an appropriate reason code. Preserve a
|
|
199
199
|
> `CREATED` order when provider state is indeterminate. See
|
|
200
|
-
>
|
|
201
|
-
> [b2c-ordering](../../b2c-ordering/SKILL.md). Confirm version-specific request fields with the Shopper
|
|
200
|
+
> "Headless Order Payment" in the `b2c-hooks` skill and the `b2c-ordering` skill. Confirm version-specific request fields with the Shopper
|
|
202
201
|
> Orders schema and hook signatures with `b2c docs read commerce-api/hook-method-details`.
|
|
203
202
|
|
|
204
203
|
### Shopper Customers
|
|
@@ -338,12 +337,12 @@ Find logs in Log Center under `scapi.verbose` category.
|
|
|
338
337
|
|
|
339
338
|
## Related Skills
|
|
340
339
|
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
-
|
|
345
|
-
-
|
|
346
|
-
-
|
|
340
|
+
- `b2c-slas` skill - Create and manage SLAS clients
|
|
341
|
+
- `b2c-slas-auth-patterns` skill - Advanced auth: OTP, passkeys, session bridge
|
|
342
|
+
- `b2c-scapi-schemas` skill - Browse OpenAPI schemas
|
|
343
|
+
- `b2c-custom-api-development` skill - Create custom endpoints
|
|
344
|
+
- `b2c-hooks` skill - Order-PI authorization hooks, default placement, and the single-phase `order.afterPOST` alternative
|
|
345
|
+
- `b2c-ordering` skill - Order lifecycle, status transitions, and failure handling
|
|
347
346
|
|
|
348
347
|
## Reference Documentation
|
|
349
348
|
|
|
@@ -11,7 +11,7 @@ immediate diagnosis. If `b2c` is unavailable, use `npx @salesforce/b2c-cli`.
|
|
|
11
11
|
## Choose the surface
|
|
12
12
|
|
|
13
13
|
- Prefer MCP `cip_discover` / `cip_query` when available. Read
|
|
14
|
-
`skill://mcp/cip/SKILL.md` before querying and pass `skillRead: true`.
|
|
14
|
+
`skill://mcp/b2c-mcp-cip/SKILL.md` before querying and pass `skillRead: true`.
|
|
15
15
|
Discovery/config inspection is ungated. No terminal or token export needed.
|
|
16
16
|
- Use CLI for explicit CLI requests, automation, or larger local CSV/JSON exports.
|
|
17
17
|
MCP limits results to 500 rows / 24 KB; `truncated` means incomplete output,
|
|
@@ -46,7 +46,7 @@ instruction to change the target instance. Non-production data requires 26.1+
|
|
|
46
46
|
can also need staging analytics. Dashboard: `https://ccac.stg.analytics.commercecloud.salesforce.com`.
|
|
47
47
|
|
|
48
48
|
Missing configuration/availability:
|
|
49
|
-
[analytics guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/analytics-reports-cip-ccac).
|
|
49
|
+
[analytics guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/analytics-reports-cip-ccac.md) (`b2c docs read guide-analytics-reports-cip-ccac`).
|
|
50
50
|
Resolution details: `b2c-cli/b2c-config`. Read only the relevant section.
|
|
51
51
|
|
|
52
52
|
## Discover and execute
|
|
@@ -111,6 +111,6 @@ Read a matching section only when the task needs it:
|
|
|
111
111
|
- Sales comparisons, gaps, latest activity: [SALES_ANALYSIS.md](references/SALES_ANALYSIS.md).
|
|
112
112
|
- Custom SQL patterns: [STARTER_QUERIES.md](references/STARTER_QUERIES.md).
|
|
113
113
|
- Unknown table family: [KNOWN_TABLES.md](references/KNOWN_TABLES.md), then live metadata.
|
|
114
|
-
- CLI options: [command reference](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/cip).
|
|
114
|
+
- CLI options: [command reference](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/cip.md) (`b2c docs read cli-cip`).
|
|
115
115
|
|
|
116
116
|
Stop once the requested result and material limitations are established.
|
|
@@ -47,4 +47,4 @@ For unresolved field meaning, consult the specific official table article:
|
|
|
47
47
|
[sales summary](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/jdbc_ccdw_aggr_sales_summary.html)
|
|
48
48
|
or [site dimension](https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/jdbc_ccdw_dim_site.html).
|
|
49
49
|
For access/availability, use the
|
|
50
|
-
[analytics guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/analytics-reports-cip-ccac).
|
|
50
|
+
[analytics guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/analytics-reports-cip-ccac.md) (`b2c docs read guide-analytics-reports-cip-ccac`).
|
|
@@ -22,19 +22,26 @@ The CLI **automatically detects** instance hostname, credentials, tenant ID, MRT
|
|
|
22
22
|
|
|
23
23
|
Sources, in resolution order (highest priority first):
|
|
24
24
|
|
|
25
|
-
1. **CLI flags and environment variables** — explicit values always win.
|
|
25
|
+
1. **CLI flags and environment variables** — explicit values always win. Shell variables win over the env file; toolkit variables (`SFCC_*`, `MRT_*`) in the project's `.env` (or the file selected with `--dotenv-file` / `SFCC_DOTENV_FILE`) come next.
|
|
26
26
|
2. **Plugin sources (high priority)** — custom configuration plugins (e.g., secret managers).
|
|
27
|
-
3. **`dw.json`** — selected by `--config` / `SFCC_CONFIG`, the
|
|
28
|
-
4.
|
|
29
|
-
5.
|
|
30
|
-
6.
|
|
27
|
+
3. **`dw.json`** — selected by `--config` / `SFCC_CONFIG`, the env file, the project-local file, or the shared global `dw.json`. Supports a single instance or a `configs[]` array with `active: true` / `-i <name>` selection.
|
|
28
|
+
4. **Storefront Next variables** — fallbacks that only fill fields missing from the selected `dw.json` entry (see below).
|
|
29
|
+
5. **`~/.mobify`** — home-directory file (MRT API key only).
|
|
30
|
+
6. **Plugin sources (low priority)**.
|
|
31
|
+
7. **`package.json`** under the `b2c` key — non-sensitive project defaults (e.g., `shortCode`, `clientId`, `mrtProject`). Sensitive fields like `clientSecret`/`password` are intentionally **not** allowed here.
|
|
32
|
+
|
|
33
|
+
Hostname protection applies between sources: if an env file's `SFCC_SERVER` differs from the selected `dw.json` entry's hostname, that whole entry is skipped (`HOSTNAME_MISMATCH` warning). If no source sets a tenant ID and the hostname is a sandbox hostname (`abcd-001.dx.commercecloud.salesforce.com`), the tenant ID is derived (`abcd_001`); a conflicting configured tenant ID produces a `TENANT_MISMATCH` warning. Conversely, if no source sets a hostname and the tenant ID is a sandbox tenant (`abcd_001`, including a Storefront Next `f_ecom_abcd_001` organization ID), the hostname is derived (`abcd-001.dx.commercecloud.salesforce.com`).
|
|
34
|
+
|
|
35
|
+
Use `--dotenv-file .env.staging` (or `SFCC_DOTENV_FILE`) to use another env file instead of `.env`; it replaces `.env` rather than layering on it. `--dotenv-file ""` uses no env file, and `--config ""` uses no `dw.json`.
|
|
31
36
|
|
|
32
37
|
For unexpected values, inspect resolved configuration and sources with `config_inspect` or `b2c setup inspect`.
|
|
33
38
|
|
|
34
39
|
### Storefront Next Environment Compatibility
|
|
35
40
|
|
|
36
41
|
The resolver accepts these Storefront Next variables as fallbacks, so a project
|
|
37
|
-
can reuse its existing B2C Commerce and SLAS configuration
|
|
42
|
+
can reuse its existing B2C Commerce and SLAS configuration. The `PUBLIC__app__*`
|
|
43
|
+
and `COMMERCE_API_SLAS_SECRET` variables rank below `dw.json`: with `-i stg`,
|
|
44
|
+
stg's own tenant, short code, site, and SLAS client are kept and these only fill gaps.
|
|
38
45
|
|
|
39
46
|
| Storefront Next variable | Resolved field | Default toolkit variable |
|
|
40
47
|
| -------------------------------------------- | ------------------ | ------------------------- |
|
|
@@ -46,7 +53,7 @@ can reuse its existing B2C Commerce and SLAS configuration:
|
|
|
46
53
|
| `MRT_PROJECT` | `mrtProject` | `MRT_PROJECT` |
|
|
47
54
|
| `MRT_TARGET` | `mrtEnvironment` | `MRT_ENVIRONMENT` |
|
|
48
55
|
|
|
49
|
-
Explicit flags
|
|
56
|
+
Explicit flags, default toolkit variables, and the selected `dw.json` entry win over these fallbacks. `MRT_PROJECT` and `MRT_TARGET` are toolkit variables and keep toolkit priority.
|
|
50
57
|
|
|
51
58
|
### Shared Global Default
|
|
52
59
|
|
|
@@ -58,16 +65,16 @@ b2c setup default-config get
|
|
|
58
65
|
b2c setup default-config unset
|
|
59
66
|
```
|
|
60
67
|
|
|
61
|
-
The configuration-file selection order is: explicit `--config`; process `SFCC_CONFIG`;
|
|
68
|
+
The configuration-file selection order is: explicit `--config`; process `SFCC_CONFIG`; env file `SFCC_CONFIG`; project-local `dw.json`; global default. The global file never replaces an explicit or project-local choice. An explicit path (`--config` / `SFCC_CONFIG`) is used on its own, without the global file; `setup inspect` notes when the global default is skipped.
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
A discovered project `dw.json` and the global `dw.json` form one instance catalog. `-i <name>` searches the primary file first and then the global file, with same-name primary entries shadowing global entries. Each selected instance is complete—its fields are not merged with a matching entry in the other file. Instance list/remove/set-active operate across both files; create writes to the primary file when present and otherwise to the global `dw.json`.
|
|
64
71
|
|
|
65
72
|
Without `-i`, an active primary instance wins. A root-level primary configuration with no `active` field is its implicit default; set its root to `active: false` to opt it out and allow an active/default global instance to be selected. `b2c setup inspect` shows both files in its Sources section and marks the selected file.
|
|
66
73
|
|
|
67
74
|
### MCP Project Context
|
|
68
75
|
|
|
69
|
-
For MCP installation or tool selection, use `mcp/server` when
|
|
70
|
-
available or the [MCP configuration guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/configuration).
|
|
76
|
+
For MCP installation or tool selection, use `mcp/b2c-mcp-server` when
|
|
77
|
+
available or the [MCP configuration guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/configuration.md) (`b2c docs read mcp-configuration`).
|
|
71
78
|
These are client launch settings; `config_inspect` reports B2C values and sources,
|
|
72
79
|
not enabled toolsets or client filters. Project `.env` does not select MCP tools.
|
|
73
80
|
|
|
@@ -75,7 +82,7 @@ Local MCP project tools accept `projectDirectory`. Tools that resolve B2C/MRT co
|
|
|
75
82
|
|
|
76
83
|
1. Parses `.env` from `projectDirectory`.
|
|
77
84
|
2. Applies all supported B2C/MRT environment variables from that file.
|
|
78
|
-
3. Selects a `dw.json`-format configuration file in this order: per-call `configPath`; startup `--config` / `SFCC_CONFIG`; project `.env` `SFCC_CONFIG`; `${projectDirectory}/dw.json`; shared global default.
|
|
85
|
+
3. Selects a `dw.json`-format configuration file in this order: per-call `configPath`; startup `--config` / `SFCC_CONFIG`; project `.env` `SFCC_CONFIG`; `${projectDirectory}/dw.json`; shared global default. An explicit path is used without the shared global default. Storefront Next variables from the project `.env` only fill gaps below `dw.json`.
|
|
79
86
|
4. Resolves relative per-call `configPath` and project `.env` `SFCC_CONFIG` values from `projectDirectory`.
|
|
80
87
|
5. Selects `instanceName`, when supplied, from the primary file first and then the shared global `dw.json`, without changing either file.
|
|
81
88
|
6. Continues through the normal tooling configuration sources, including registered plugin sources, MRT credentials, and `package.json`.
|
|
@@ -101,7 +108,9 @@ Field names in `dw.json` accept **both camelCase and kebab-case** — they're eq
|
|
|
101
108
|
|
|
102
109
|
Legacy aliases like `server` (for `hostname`) are also still supported. If a value isn't being picked up, casing is rarely the cause — check spelling, then run `b2c setup inspect` to see what the CLI actually parsed.
|
|
103
110
|
|
|
104
|
-
|
|
111
|
+
A JSON Schema for `dw.json` is published at `https://salesforcecommercecloud.github.io/b2c-developer-tooling/schemas/dw.schema.json` (the B2C DX VS Code extension applies it automatically). Add it as `"$schema"` in a `dw.json` for editor validation and completion.
|
|
112
|
+
|
|
113
|
+
For the full field reference, see the [Configuration guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/configuration.md) (`b2c docs read guide-configuration`).
|
|
105
114
|
|
|
106
115
|
## Authentication
|
|
107
116
|
|
|
@@ -227,7 +236,7 @@ b2c setup openshell --dry-run
|
|
|
227
236
|
openshell sandbox exec -n b2c-<instance> -- b2c code list
|
|
228
237
|
```
|
|
229
238
|
|
|
230
|
-
Edit `.openshell/<sandbox>/policy.yaml` and re-run to apply it; use `--recreate` after changing secrets or configuration. Add hosts with `--allow-host`. Only client credentials work in the sandbox (no browser login). See the [Agent Sandboxing guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/agent-sandboxing#openshell).
|
|
239
|
+
Edit `.openshell/<sandbox>/policy.yaml` and re-run to apply it; use `--recreate` after changing secrets or configuration. Add hosts with `--allow-host`. Only client credentials work in the sandbox (no browser login). See the [Agent Sandboxing guide](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/agent-sandboxing.md#openshell) (`b2c docs read guide-agent-sandboxing`).
|
|
231
240
|
|
|
232
241
|
## Managing Instances
|
|
233
242
|
|
|
@@ -319,12 +328,13 @@ Each value shows its source in brackets:
|
|
|
319
328
|
|
|
320
329
|
Values are resolved with this priority (highest to lowest):
|
|
321
330
|
|
|
322
|
-
1. CLI flags and environment variables
|
|
331
|
+
1. CLI flags and environment variables (shell, then env file `SFCC_*`/`MRT_*`)
|
|
323
332
|
2. Plugin sources (high priority)
|
|
324
333
|
3. dw.json file
|
|
325
|
-
4.
|
|
326
|
-
5.
|
|
327
|
-
6.
|
|
334
|
+
4. Storefront Next variables (fallbacks)
|
|
335
|
+
5. ~/.mobify file (MRT API key only)
|
|
336
|
+
6. Plugin sources (low priority)
|
|
337
|
+
7. package.json `b2c` key
|
|
328
338
|
|
|
329
339
|
When troubleshooting, check the source column to understand which configuration is taking precedence.
|
|
330
340
|
|
|
@@ -378,7 +388,7 @@ With this configuration, `b2c content list` and `b2c content export homepage` de
|
|
|
378
388
|
### Missing `tenantId` / `shortCode`
|
|
379
389
|
|
|
380
390
|
- These resolve from `dw.json`, `SFCC_TENANT_ID`/`SFCC_SHORTCODE`, or `package.json`. Run `b2c setup inspect` to see which source provided them.
|
|
381
|
-
- For sandboxes, `tenantId` is derived from the hostname (replace `-` with `_`): `zzxy-001.dx...` → `zzxy_001`.
|
|
391
|
+
- For sandboxes, `tenantId` is derived from the hostname (replace `-` with `_`): `zzxy-001.dx...` → `zzxy_001`. The reverse also applies: with a sandbox tenant ID and no hostname, the hostname is derived.
|
|
382
392
|
|
|
383
393
|
### MRT commands say "API key required"
|
|
384
394
|
|
|
@@ -395,7 +405,7 @@ With this configuration, `b2c content list` and `b2c content export homepage` de
|
|
|
395
405
|
|
|
396
406
|
### Wrong source taking precedence
|
|
397
407
|
|
|
398
|
-
- Review the priority list in "How the CLI Discovers Configuration" above. Common surprise: env vars (or a `.env` file) override `dw.json`.
|
|
408
|
+
- Review the priority list in "How the CLI Discovers Configuration" above. Common surprise: env vars (or a `.env` file) override `dw.json`, and an env file `SFCC_SERVER` with a different hostname skips the `dw.json` entry entirely. Storefront Next variables never override `dw.json`.
|
|
399
409
|
|
|
400
410
|
### Still stuck
|
|
401
411
|
|
|
@@ -435,7 +445,7 @@ curl -H "Authorization: Bearer $(b2c auth token)" \
|
|
|
435
445
|
|
|
436
446
|
The token is obtained using the `clientId` and `clientSecret` from your configuration (dw.json or environment variables). If only `clientId` is configured, or `--user-auth` is used, an implicit OAuth flow is used (browser-based).
|
|
437
447
|
|
|
438
|
-
**Note:** This command returns **admin** tokens for OCAPI/Admin APIs. For **shopper** tokens (SLAS), see the
|
|
448
|
+
**Note:** This command returns **admin** tokens for OCAPI/Admin APIs. For **shopper** tokens (SLAS), see the `b2c-slas` skill.
|
|
439
449
|
|
|
440
450
|
> **Calling SCAPI Admin APIs (system or custom)?** The token must carry the tenant scope `SALESFORCE_COMMERCE_API:<tenant_id>` **plus** the API-specific scopes. `b2c auth token` does not add the tenant scope for you (unlike the SCAPI subcommands such as `b2c scapi custom status`), so pass it explicitly:
|
|
441
451
|
>
|
|
@@ -163,7 +163,7 @@ See `b2c content --help` for a full list of available commands and options in th
|
|
|
163
163
|
## Troubleshooting
|
|
164
164
|
|
|
165
165
|
- **"Library is required"** -- Set `--library` flag or configure `content-library` in `dw.json`.
|
|
166
|
-
- **Authentication errors** -- Inspect resolved configuration first. SCAPI needs client-credentials or JWT authentication with `sfcc.jobs.rw` and the tenant scope; browser login is OCAPI/WebDAV-only. Use `b2c-cli:b2c-
|
|
166
|
+
- **Authentication errors** -- Inspect resolved configuration first. SCAPI needs client-credentials or JWT authentication with `sfcc.jobs.rw` and the tenant scope; browser login is OCAPI/WebDAV-only. Use `b2c-cli:b2c-config` for setup. `--library-file` skips the remote export job; add `--offline` to skip asset downloads too.
|
|
167
167
|
- **Library not found** -- Verify the library ID matches exactly. For site-private libraries, add `--site-library`.
|
|
168
168
|
- **No content found** -- Check that the page/content IDs exist. Use `b2c content list` to discover available IDs.
|
|
169
169
|
- **Timeout errors** -- Large libraries may exceed the default timeout. Use `--timeout <seconds>` to increase it.
|