@salesforce/b2c-dx-mcp 3.1.0 → 3.1.1
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/content/guidance/b2c-cli/b2c-docs/SKILL.md +8 -3
- package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +4 -4
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +21 -6
- package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +4 -4
- package/content/guidance/index.json +4 -4
- package/dist/commands/mcp.js +1 -1
- package/dist/services.d.ts +7 -5
- package/dist/services.js +19 -8
- package/dist/tools/adapter.js +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/CHANGELOG.md +8 -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-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-docs/SKILL.md +8 -3
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/SKILL.md +4 -4
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md +21 -6
- package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/SECURITY.md +4 -4
- 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/package.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/.codex-plugin/plugin.json +1 -1
- package/node_modules/@salesforce/b2c-agent-plugins/storefront-next/plugin.json +1 -1
- package/oclif.manifest.json +2 -2
- package/package.json +3 -3
|
@@ -17,7 +17,7 @@ Use the `b2c` CLI to search and read B2C Commerce documentation spanning multipl
|
|
|
17
17
|
|
|
18
18
|
- **Multi-corpus search** — Search across Script API, Developer Center guides, Salesforce Help (admin + merchandising), internal tooling docs (guides, CLI reference, MCP, and VS Code extension), job steps, and schemas in a unified index
|
|
19
19
|
- **Workspace-aware search** — Auto-detects project type (cartridges, SFRA, PWA Kit, Storefront Next) and boosts relevant documentation while de-boosting competing storefront frameworks
|
|
20
|
-
- **Category filtering** — Use `--category` to narrow results to a specific corpus (e.g., `commerce-api`, `pwa-kit-managed-runtime`, `sfra`, `script-api`, `help-admin`, `help-merchant`)
|
|
20
|
+
- **Category filtering** — Use `--category` to narrow results to a specific corpus (e.g., `commerce-api`, `pwa-kit-managed-runtime`, `sfra`, `script-api`, `help-admin`, `help-merchant`, `help-kb`)
|
|
21
21
|
- **Triage metadata** — Search results include `category`, `summary`, `keywords`, and `url` to help identify the right match without reading full content
|
|
22
22
|
- **Online content with local cache** — Script API, Developer Center guides, and Salesforce Help are fetched online when you read them and cached locally (memory + on-disk, 7-day TTL) so repeat reads avoid the network; graceful offline fallback shows the summary + headings + both URLs
|
|
23
23
|
- **Content-aware ranking** — BM25-style search indexes titles, section headings, summaries, and keywords for better recall on conceptual questions
|
|
@@ -54,6 +54,9 @@ b2c docs search "site import export" --category help-admin
|
|
|
54
54
|
# Search Salesforce Help — merchandising (catalogs, promotions, search, pricing)
|
|
55
55
|
b2c docs search "price book assignment" --category help-merchant
|
|
56
56
|
|
|
57
|
+
# Search Salesforce Help Knowledge Articles — troubleshooting, known issues, how-to answers
|
|
58
|
+
b2c docs search "code upload certificate hyperforce" --category help-kb
|
|
59
|
+
|
|
57
60
|
# Search tooling documentation
|
|
58
61
|
b2c docs search "authentication setup" --category tooling
|
|
59
62
|
b2c docs search "import set" --category tooling
|
|
@@ -153,6 +156,7 @@ b2c docs read pwa-kit-managed-runtime/getting-started
|
|
|
153
156
|
# Read Salesforce Help articles by namespaced ID
|
|
154
157
|
b2c docs read help-admin/b2c_site_import_export
|
|
155
158
|
b2c docs read help-merchant/b2c_creating_price_books
|
|
159
|
+
b2c docs read help-kb/002772125
|
|
156
160
|
|
|
157
161
|
# Read tooling guides
|
|
158
162
|
b2c docs read guide-authentication
|
|
@@ -239,10 +243,11 @@ xmllint --schema "$(b2c docs schema catalog --path)" my-catalog.xml --noout
|
|
|
239
243
|
| `job-step` | Standard (system) job step catalog | `ImportCatalog`, `ExportCatalog`, `job-steps` |
|
|
240
244
|
| `help-admin` | Salesforce Help — administration/ops (import/export, jobs, replication, security, Account Manager, permissions, logs, inventory) | `help-admin/b2c_site_import_export` |
|
|
241
245
|
| `help-merchant` | Salesforce Help — merchandising (catalogs, products, promotions, search, content, analytics, SEO) | `help-merchant/b2c_creating_price_books` |
|
|
246
|
+
| `help-kb` | Salesforce Help Knowledge Articles — troubleshooting, known issues, and how-to answers (keyed by article number) | `help-kb/002772125` |
|
|
242
247
|
|
|
243
|
-
> **URLs:** All categories except `job-step` carry both `url` (human .html page) and `sourceUrl` (machine-readable .md). For `help-admin`/`help-merchant`, `url` is the live help.salesforce.com article and content is read from `sourceUrl`. `job-step` entries have neither (content is bundled inline).
|
|
248
|
+
> **URLs:** All categories except `job-step` carry both `url` (human .html page) and `sourceUrl` (machine-readable .md). For `help-admin`/`help-merchant`/`help-kb`, `url` is the live help.salesforce.com article and content is read from `sourceUrl`. `job-step` entries have neither (content is bundled inline).
|
|
244
249
|
>
|
|
245
|
-
> **Caching:** Content for the online corpora (`script-api`, the guide categories, `help-admin`/`help-merchant`, `tooling`) is fetched on `docs read` and cached locally. Use `b2c docs cache` to inspect it and `b2c docs cache --clear` to purge it (forces a re-fetch).
|
|
250
|
+
> **Caching:** Content for the online corpora (`script-api`, the guide categories, `help-admin`/`help-merchant`/`help-kb`, `tooling`) is fetched on `docs read` and cached locally. Use `b2c docs cache` to inspect it and `b2c docs cache --clear` to purge it (forces a re-fetch).
|
|
246
251
|
|
|
247
252
|
## Common Script API Classes
|
|
248
253
|
|
|
@@ -60,10 +60,10 @@ b2c ecdn cache purge --zone my-zone --tag product-123 --tag category-456
|
|
|
60
60
|
b2c ecdn certificates list --zone my-zone
|
|
61
61
|
|
|
62
62
|
# add a new certificate
|
|
63
|
-
b2c ecdn certificates add --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
|
|
63
|
+
b2c ecdn certificates add --zone my-zone --hostname www.example.com --type custom --certificate-file ./cert.pem --private-key-file ./key.pem
|
|
64
64
|
|
|
65
65
|
# validate a custom hostname
|
|
66
|
-
b2c ecdn certificates validate --zone my-zone --
|
|
66
|
+
b2c ecdn certificates validate --zone my-zone --custom-hostname-id abc123
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Manage Rate Limiting Rules
|
|
@@ -92,7 +92,7 @@ b2c ecdn rate-limit delete --zone my-zone --rule-id 2c0fc9fa937b11eaa1b71c4d701a
|
|
|
92
92
|
b2c ecdn security get --zone my-zone
|
|
93
93
|
|
|
94
94
|
# update security settings
|
|
95
|
-
b2c ecdn security update --zone my-zone --
|
|
95
|
+
b2c ecdn security update --zone my-zone --security-level medium --always-use-https --tls13
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
### Speed Settings
|
|
@@ -102,7 +102,7 @@ b2c ecdn security update --zone my-zone --ssl-mode full --min-tls-version 1.2 --
|
|
|
102
102
|
b2c ecdn speed get --zone my-zone
|
|
103
103
|
|
|
104
104
|
# update speed settings
|
|
105
|
-
b2c ecdn speed update --zone my-zone --
|
|
105
|
+
b2c ecdn speed update --zone my-zone --brotli on --http3 on --webp on
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
## Additional Topics
|
|
@@ -41,17 +41,32 @@ b2c ecdn mrt-rules delete --zone my-zone
|
|
|
41
41
|
|
|
42
42
|
## mTLS Certificates
|
|
43
43
|
|
|
44
|
+
Code upload certificates enable two-factor (mTLS) code upload to staging instances (`_stg` tenants only). Upload a CA certificate to eCDN, then issue client certificates (`.p12`) signed by that CA for each user or pipeline. The CA private key must be kept secret (treat like a password); the CA certificate bundle must have a maximum validity of 1 year and be renewed before expiry. On Hyperforce, use the `staging-<realm>-<customer>.demandware.net` code upload hostname (not legacy `cert.staging.*`).
|
|
45
|
+
|
|
46
|
+
For the complete workflow, security guidance, and renewal instructions, see [Deploying to Hyperforce: Code Upload Certificates](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/hyperforce#code-upload-certificates).
|
|
47
|
+
|
|
44
48
|
```bash
|
|
45
|
-
#
|
|
46
|
-
b2c ecdn mtls
|
|
49
|
+
# interactive wizard: generate CA, upload, issue your client cert, update dw.json
|
|
50
|
+
b2c ecdn mtls setup
|
|
51
|
+
|
|
52
|
+
# non-interactive: generate CA + upload + issue first client cert
|
|
53
|
+
b2c ecdn mtls create --name code-upload --generate
|
|
54
|
+
b2c ecdn mtls create --name code-upload --generate --out-dir ./certs --client-name jsmith
|
|
47
55
|
|
|
48
|
-
#
|
|
49
|
-
b2c ecdn mtls create --name
|
|
56
|
+
# upload an existing CA
|
|
57
|
+
b2c ecdn mtls create --name code-upload --certificate-file ./ca.pem --private-key-file ./ca.key
|
|
58
|
+
|
|
59
|
+
# issue additional client certificates (local-only, no API call)
|
|
60
|
+
b2c ecdn mtls issue --ca-cert-file ./certs/ca.pem --ca-key-file ./certs/ca.key --name jane.doe
|
|
61
|
+
b2c ecdn mtls issue --ca-cert-file ca.pem --ca-key-file ca.key --name ci --output ci.p12 --days 90
|
|
62
|
+
|
|
63
|
+
# list uploaded CA certificates
|
|
64
|
+
b2c ecdn mtls list
|
|
50
65
|
|
|
51
|
-
# get
|
|
66
|
+
# get certificate details
|
|
52
67
|
b2c ecdn mtls get --certificate-id abc123
|
|
53
68
|
|
|
54
|
-
# delete
|
|
69
|
+
# delete a CA certificate (uploaded CA stops accepting client certs)
|
|
55
70
|
b2c ecdn mtls delete --certificate-id abc123
|
|
56
71
|
```
|
|
57
72
|
|
|
@@ -33,10 +33,10 @@ b2c ecdn waf migrate --zone my-zone
|
|
|
33
33
|
b2c ecdn firewall list --zone my-zone
|
|
34
34
|
|
|
35
35
|
# create a firewall rule
|
|
36
|
-
b2c ecdn firewall create --zone my-zone --description "Block bad bots" --
|
|
36
|
+
b2c ecdn firewall create --zone my-zone --description "Block bad bots" --expression '(cf.client.bot)' --actions block
|
|
37
37
|
|
|
38
38
|
# update a firewall rule
|
|
39
|
-
b2c ecdn firewall update --zone my-zone --rule-id abc123 --
|
|
39
|
+
b2c ecdn firewall update --zone my-zone --rule-id abc123 --actions managed_challenge
|
|
40
40
|
|
|
41
41
|
# reorder firewall rules
|
|
42
42
|
b2c ecdn firewall reorder --zone my-zone --rule-ids id1,id2,id3
|
|
@@ -49,7 +49,7 @@ b2c ecdn firewall reorder --zone my-zone --rule-ids id1,id2,id3
|
|
|
49
49
|
b2c ecdn rate-limit list --zone my-zone
|
|
50
50
|
|
|
51
51
|
# create a rate limiting rule
|
|
52
|
-
b2c ecdn rate-limit create --zone my-zone --description "API rate limit" --
|
|
52
|
+
b2c ecdn rate-limit create --zone my-zone --description "API rate limit" --expression '(http.request.uri.path matches "^/api/")' --characteristics cf.unique_visitor_id --action block --period 60 --requests-per-period 100 --mitigation-timeout 600
|
|
53
53
|
|
|
54
54
|
# delete a rate limiting rule
|
|
55
55
|
b2c ecdn rate-limit delete --zone my-zone --rule-id abc123
|
|
@@ -62,7 +62,7 @@ b2c ecdn rate-limit delete --zone my-zone --rule-id abc123
|
|
|
62
62
|
b2c ecdn page-shield notifications list
|
|
63
63
|
|
|
64
64
|
# create a notification webhook
|
|
65
|
-
b2c ecdn page-shield notifications create --url https://example.com/webhook --secret my-secret --zones zone1,zone2
|
|
65
|
+
b2c ecdn page-shield notifications create --webhook-url https://example.com/webhook --secret my-secret --zones zone1,zone2
|
|
66
66
|
|
|
67
67
|
# list Page Shield policies (zone level)
|
|
68
68
|
b2c ecdn page-shield policies list --zone my-zone
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"files": [
|
|
179
179
|
{
|
|
180
180
|
"path": "SKILL.md",
|
|
181
|
-
"bytes":
|
|
181
|
+
"bytes": 17746
|
|
182
182
|
}
|
|
183
183
|
]
|
|
184
184
|
},
|
|
@@ -193,15 +193,15 @@
|
|
|
193
193
|
"files": [
|
|
194
194
|
{
|
|
195
195
|
"path": "references/ADVANCED.md",
|
|
196
|
-
"bytes":
|
|
196
|
+
"bytes": 3709
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
"path": "references/SECURITY.md",
|
|
200
|
-
"bytes":
|
|
200
|
+
"bytes": 2213
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"path": "SKILL.md",
|
|
204
|
-
"bytes":
|
|
204
|
+
"bytes": 4863
|
|
205
205
|
}
|
|
206
206
|
]
|
|
207
207
|
},
|
package/dist/commands/mcp.js
CHANGED
|
@@ -200,7 +200,7 @@ export default class McpServerCommand extends BaseCommand {
|
|
|
200
200
|
'docs-topics': Flags.string({
|
|
201
201
|
description: 'Limit the documentation exposed by the docs tools to these categories (comma-separated allowlist). ' +
|
|
202
202
|
'Options: script-api, job-step, commerce-api, pwa-kit-managed-runtime, sfnext, sfra, b2c-commerce, tooling, ' +
|
|
203
|
-
'help-admin, help-merchant. ' +
|
|
203
|
+
'help-admin, help-merchant, help-kb. ' +
|
|
204
204
|
'Bounds the whole docs corpus; per-call category/storefront narrow within it. Unknown names are ignored.',
|
|
205
205
|
env: 'SFCC_DOCS_TOPICS',
|
|
206
206
|
}),
|
package/dist/services.d.ts
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*
|
|
20
20
|
* ## Resolution Pattern
|
|
21
21
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* B2C instance and MRT auth are resolved for each tool call, so edits to project
|
|
23
|
+
* configuration are picked up without restarting the server.
|
|
24
24
|
*
|
|
25
25
|
* **B2C Instance** (for WebDAV/OCAPI tools):
|
|
26
26
|
* - Flags (highest priority) merged with dw.json (auto-discovered or via --config)
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
import fs from 'node:fs';
|
|
40
40
|
import type { B2CInstance } from '@salesforce/b2c-tooling-sdk';
|
|
41
41
|
import type { AuthStrategy } from '@salesforce/b2c-tooling-sdk/auth';
|
|
42
|
-
import type
|
|
42
|
+
import { type ResolvedB2CConfig } from '@salesforce/b2c-tooling-sdk/config';
|
|
43
43
|
import type { ConfigurationResolutionSource, ProjectDirectoryInfo, ToolResolution } from './tools/project-context.js';
|
|
44
44
|
import { WebDavClient, type CustomApisClient, type MetricsClient, type ScapiSchemasClient } from '@salesforce/b2c-tooling-sdk/clients';
|
|
45
45
|
/**
|
|
@@ -101,13 +101,13 @@ export interface ServicesResolutionInputs {
|
|
|
101
101
|
export declare class Services {
|
|
102
102
|
/**
|
|
103
103
|
* Pre-resolved B2C instance for WebDAV/OCAPI operations.
|
|
104
|
-
* Resolved
|
|
104
|
+
* Resolved for this tool call from server flags and project configuration.
|
|
105
105
|
* Undefined if no B2C instance configuration was available.
|
|
106
106
|
*/
|
|
107
107
|
readonly b2cInstance?: B2CInstance;
|
|
108
108
|
/**
|
|
109
109
|
* Pre-resolved MRT configuration (auth, project, environment, origin).
|
|
110
|
-
* Resolved
|
|
110
|
+
* Resolved for this tool call from server flags and MRT configuration.
|
|
111
111
|
*/
|
|
112
112
|
readonly mrtConfig: MrtConfig;
|
|
113
113
|
/**
|
|
@@ -310,6 +310,8 @@ export declare class Services {
|
|
|
310
310
|
* @returns Resolved absolute path
|
|
311
311
|
*/
|
|
312
312
|
resolveWithProjectDirectory(pathArg?: string, projectDirectoryOverride?: string): string;
|
|
313
|
+
/** Run a tool with its resolved safety policy, without changing other calls. */
|
|
314
|
+
runWithSafety<T>(callback: () => T): T;
|
|
313
315
|
/**
|
|
314
316
|
* Get file or directory stats.
|
|
315
317
|
*
|
package/dist/services.js
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
*
|
|
25
25
|
* ## Resolution Pattern
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
27
|
+
* B2C instance and MRT auth are resolved for each tool call, so edits to project
|
|
28
|
+
* configuration are picked up without restarting the server.
|
|
29
29
|
*
|
|
30
30
|
* **B2C Instance** (for WebDAV/OCAPI tools):
|
|
31
31
|
* - Flags (highest priority) merged with dw.json (auto-discovered or via --config)
|
|
@@ -44,7 +44,9 @@
|
|
|
44
44
|
import fs from 'node:fs';
|
|
45
45
|
import path from 'node:path';
|
|
46
46
|
import os from 'node:os';
|
|
47
|
-
import {
|
|
47
|
+
import { getB2CConfigDirectory } from '@salesforce/b2c-tooling-sdk/config';
|
|
48
|
+
import { SafetyGuard, resolveEffectiveSafetyConfig, loadGlobalSafetyConfig } from '@salesforce/b2c-tooling-sdk/safety';
|
|
49
|
+
import { createCustomApisClient, createMetricsClient, createScapiSchemasClient, toOrganizationId, WebDavClient, globalMiddlewareRegistry, createSafetyMiddleware, } from '@salesforce/b2c-tooling-sdk/clients';
|
|
48
50
|
function createToolResolution(config, inputs) {
|
|
49
51
|
const configuredProjectDirectory = config.values.projectDirectory;
|
|
50
52
|
const projectDirectory = inputs?.projectDirectory ??
|
|
@@ -87,13 +89,13 @@ function createToolResolution(config, inputs) {
|
|
|
87
89
|
export class Services {
|
|
88
90
|
/**
|
|
89
91
|
* Pre-resolved B2C instance for WebDAV/OCAPI operations.
|
|
90
|
-
* Resolved
|
|
92
|
+
* Resolved for this tool call from server flags and project configuration.
|
|
91
93
|
* Undefined if no B2C instance configuration was available.
|
|
92
94
|
*/
|
|
93
95
|
b2cInstance;
|
|
94
96
|
/**
|
|
95
97
|
* Pre-resolved MRT configuration (auth, project, environment, origin).
|
|
96
|
-
* Resolved
|
|
98
|
+
* Resolved for this tool call from server flags and MRT configuration.
|
|
97
99
|
*/
|
|
98
100
|
mrtConfig;
|
|
99
101
|
/**
|
|
@@ -339,9 +341,6 @@ export class Services {
|
|
|
339
341
|
listDirectory(dirPath) {
|
|
340
342
|
return fs.readdirSync(dirPath, { withFileTypes: true });
|
|
341
343
|
}
|
|
342
|
-
// ============================================
|
|
343
|
-
// SCAPI Helper Methods
|
|
344
|
-
// ============================================
|
|
345
344
|
/**
|
|
346
345
|
* Read a file from the filesystem.
|
|
347
346
|
*
|
|
@@ -352,6 +351,9 @@ export class Services {
|
|
|
352
351
|
readFile(filePath, encoding = 'utf8') {
|
|
353
352
|
return fs.readFileSync(filePath, { encoding });
|
|
354
353
|
}
|
|
354
|
+
// ============================================
|
|
355
|
+
// SCAPI Helper Methods
|
|
356
|
+
// ============================================
|
|
355
357
|
/**
|
|
356
358
|
* Resolve a path relative to the current working directory.
|
|
357
359
|
*
|
|
@@ -414,6 +416,15 @@ export class Services {
|
|
|
414
416
|
}
|
|
415
417
|
return path.resolve(projectDir, pathArg);
|
|
416
418
|
}
|
|
419
|
+
/** Run a tool with its resolved safety policy, without changing other calls. */
|
|
420
|
+
runWithSafety(callback) {
|
|
421
|
+
const environment = Object.fromEntries(['SFCC_SAFETY_LEVEL', 'SFCC_SAFETY_CONFIRM', 'SFCC_SAFETY_CONFIG'].map((name) => [
|
|
422
|
+
name,
|
|
423
|
+
this.getEnvironmentVariable(name),
|
|
424
|
+
]));
|
|
425
|
+
const guard = new SafetyGuard(resolveEffectiveSafetyConfig(this.resolvedConfig.values.safety, loadGlobalSafetyConfig(getB2CConfigDirectory(), environment, this.resolution.projectDirectory.path), environment));
|
|
426
|
+
return globalMiddlewareRegistry.runWithOverrides([{ name: 'cli-safety-guard', getMiddleware: () => createSafetyMiddleware(guard) }], callback);
|
|
427
|
+
}
|
|
417
428
|
/**
|
|
418
429
|
* Get file or directory stats.
|
|
419
430
|
*
|
package/dist/tools/adapter.js
CHANGED
|
@@ -271,7 +271,7 @@ export function createToolAdapter(options, loadServices, serverContext) {
|
|
|
271
271
|
executionResolution.directories[name] = value;
|
|
272
272
|
},
|
|
273
273
|
};
|
|
274
|
-
const output = await execute(args, context);
|
|
274
|
+
const output = await services.runWithSafety(() => execute(args, context));
|
|
275
275
|
// 6. Format output
|
|
276
276
|
const result = formatOutput(output);
|
|
277
277
|
return resolution ? attachResolution(result, executionResolution) : result;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @salesforce/b2c-agent-plugins
|
|
2
2
|
|
|
3
|
+
## 1.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#713](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/713) [`b9972c9`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/b9972c9b9db69b2b2b7c2229250d9aa9b4c665e3) - Added Salesforce Help Knowledge Articles for B2C Commerce — troubleshooting, known issues, and how-to answers (administration: 135, developer support: 92, merchandising: 89, operations and security: 29, performance: 20, Composable Storefront: 16) — as a new `help-kb` docs category, available in the `b2c docs` CLI and MCP docs tools. (Thanks [@clavery](https://github.com/clavery)!)
|
|
8
|
+
|
|
9
|
+
- [#711](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/pull/711) [`c6ed31d`](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/commit/c6ed31d3f71553e1fb921c7e4106fb81086afb7d) - Updated the eCDN skill to cover the new code upload certificate workflow and fixed outdated flags in its certificate, security, speed, firewall, rate limit, and Page Shield examples. (Thanks [@clavery](https://github.com/clavery)!)
|
|
10
|
+
|
|
3
11
|
## 1.10.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -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.10.
|
|
4
|
+
"version": "1.10.1",
|
|
5
5
|
"description": "B2C Commerce development skills including Custom API development guides.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Salesforce"
|
|
@@ -17,7 +17,7 @@ Use the `b2c` CLI to search and read B2C Commerce documentation spanning multipl
|
|
|
17
17
|
|
|
18
18
|
- **Multi-corpus search** — Search across Script API, Developer Center guides, Salesforce Help (admin + merchandising), internal tooling docs (guides, CLI reference, MCP, and VS Code extension), job steps, and schemas in a unified index
|
|
19
19
|
- **Workspace-aware search** — Auto-detects project type (cartridges, SFRA, PWA Kit, Storefront Next) and boosts relevant documentation while de-boosting competing storefront frameworks
|
|
20
|
-
- **Category filtering** — Use `--category` to narrow results to a specific corpus (e.g., `commerce-api`, `pwa-kit-managed-runtime`, `sfra`, `script-api`, `help-admin`, `help-merchant`)
|
|
20
|
+
- **Category filtering** — Use `--category` to narrow results to a specific corpus (e.g., `commerce-api`, `pwa-kit-managed-runtime`, `sfra`, `script-api`, `help-admin`, `help-merchant`, `help-kb`)
|
|
21
21
|
- **Triage metadata** — Search results include `category`, `summary`, `keywords`, and `url` to help identify the right match without reading full content
|
|
22
22
|
- **Online content with local cache** — Script API, Developer Center guides, and Salesforce Help are fetched online when you read them and cached locally (memory + on-disk, 7-day TTL) so repeat reads avoid the network; graceful offline fallback shows the summary + headings + both URLs
|
|
23
23
|
- **Content-aware ranking** — BM25-style search indexes titles, section headings, summaries, and keywords for better recall on conceptual questions
|
|
@@ -54,6 +54,9 @@ b2c docs search "site import export" --category help-admin
|
|
|
54
54
|
# Search Salesforce Help — merchandising (catalogs, promotions, search, pricing)
|
|
55
55
|
b2c docs search "price book assignment" --category help-merchant
|
|
56
56
|
|
|
57
|
+
# Search Salesforce Help Knowledge Articles — troubleshooting, known issues, how-to answers
|
|
58
|
+
b2c docs search "code upload certificate hyperforce" --category help-kb
|
|
59
|
+
|
|
57
60
|
# Search tooling documentation
|
|
58
61
|
b2c docs search "authentication setup" --category tooling
|
|
59
62
|
b2c docs search "import set" --category tooling
|
|
@@ -153,6 +156,7 @@ b2c docs read pwa-kit-managed-runtime/getting-started
|
|
|
153
156
|
# Read Salesforce Help articles by namespaced ID
|
|
154
157
|
b2c docs read help-admin/b2c_site_import_export
|
|
155
158
|
b2c docs read help-merchant/b2c_creating_price_books
|
|
159
|
+
b2c docs read help-kb/002772125
|
|
156
160
|
|
|
157
161
|
# Read tooling guides
|
|
158
162
|
b2c docs read guide-authentication
|
|
@@ -239,10 +243,11 @@ xmllint --schema "$(b2c docs schema catalog --path)" my-catalog.xml --noout
|
|
|
239
243
|
| `job-step` | Standard (system) job step catalog | `ImportCatalog`, `ExportCatalog`, `job-steps` |
|
|
240
244
|
| `help-admin` | Salesforce Help — administration/ops (import/export, jobs, replication, security, Account Manager, permissions, logs, inventory) | `help-admin/b2c_site_import_export` |
|
|
241
245
|
| `help-merchant` | Salesforce Help — merchandising (catalogs, products, promotions, search, content, analytics, SEO) | `help-merchant/b2c_creating_price_books` |
|
|
246
|
+
| `help-kb` | Salesforce Help Knowledge Articles — troubleshooting, known issues, and how-to answers (keyed by article number) | `help-kb/002772125` |
|
|
242
247
|
|
|
243
|
-
> **URLs:** All categories except `job-step` carry both `url` (human .html page) and `sourceUrl` (machine-readable .md). For `help-admin`/`help-merchant`, `url` is the live help.salesforce.com article and content is read from `sourceUrl`. `job-step` entries have neither (content is bundled inline).
|
|
248
|
+
> **URLs:** All categories except `job-step` carry both `url` (human .html page) and `sourceUrl` (machine-readable .md). For `help-admin`/`help-merchant`/`help-kb`, `url` is the live help.salesforce.com article and content is read from `sourceUrl`. `job-step` entries have neither (content is bundled inline).
|
|
244
249
|
>
|
|
245
|
-
> **Caching:** Content for the online corpora (`script-api`, the guide categories, `help-admin`/`help-merchant`, `tooling`) is fetched on `docs read` and cached locally. Use `b2c docs cache` to inspect it and `b2c docs cache --clear` to purge it (forces a re-fetch).
|
|
250
|
+
> **Caching:** Content for the online corpora (`script-api`, the guide categories, `help-admin`/`help-merchant`/`help-kb`, `tooling`) is fetched on `docs read` and cached locally. Use `b2c docs cache` to inspect it and `b2c docs cache --clear` to purge it (forces a re-fetch).
|
|
246
251
|
|
|
247
252
|
## Common Script API Classes
|
|
248
253
|
|
|
@@ -60,10 +60,10 @@ b2c ecdn cache purge --zone my-zone --tag product-123 --tag category-456
|
|
|
60
60
|
b2c ecdn certificates list --zone my-zone
|
|
61
61
|
|
|
62
62
|
# add a new certificate
|
|
63
|
-
b2c ecdn certificates add --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
|
|
63
|
+
b2c ecdn certificates add --zone my-zone --hostname www.example.com --type custom --certificate-file ./cert.pem --private-key-file ./key.pem
|
|
64
64
|
|
|
65
65
|
# validate a custom hostname
|
|
66
|
-
b2c ecdn certificates validate --zone my-zone --
|
|
66
|
+
b2c ecdn certificates validate --zone my-zone --custom-hostname-id abc123
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Manage Rate Limiting Rules
|
|
@@ -92,7 +92,7 @@ b2c ecdn rate-limit delete --zone my-zone --rule-id 2c0fc9fa937b11eaa1b71c4d701a
|
|
|
92
92
|
b2c ecdn security get --zone my-zone
|
|
93
93
|
|
|
94
94
|
# update security settings
|
|
95
|
-
b2c ecdn security update --zone my-zone --
|
|
95
|
+
b2c ecdn security update --zone my-zone --security-level medium --always-use-https --tls13
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
### Speed Settings
|
|
@@ -102,7 +102,7 @@ b2c ecdn security update --zone my-zone --ssl-mode full --min-tls-version 1.2 --
|
|
|
102
102
|
b2c ecdn speed get --zone my-zone
|
|
103
103
|
|
|
104
104
|
# update speed settings
|
|
105
|
-
b2c ecdn speed update --zone my-zone --
|
|
105
|
+
b2c ecdn speed update --zone my-zone --brotli on --http3 on --webp on
|
|
106
106
|
```
|
|
107
107
|
|
|
108
108
|
## Additional Topics
|
package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/ADVANCED.md
CHANGED
|
@@ -41,17 +41,32 @@ b2c ecdn mrt-rules delete --zone my-zone
|
|
|
41
41
|
|
|
42
42
|
## mTLS Certificates
|
|
43
43
|
|
|
44
|
+
Code upload certificates enable two-factor (mTLS) code upload to staging instances (`_stg` tenants only). Upload a CA certificate to eCDN, then issue client certificates (`.p12`) signed by that CA for each user or pipeline. The CA private key must be kept secret (treat like a password); the CA certificate bundle must have a maximum validity of 1 year and be renewed before expiry. On Hyperforce, use the `staging-<realm>-<customer>.demandware.net` code upload hostname (not legacy `cert.staging.*`).
|
|
45
|
+
|
|
46
|
+
For the complete workflow, security guidance, and renewal instructions, see [Deploying to Hyperforce: Code Upload Certificates](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/hyperforce#code-upload-certificates).
|
|
47
|
+
|
|
44
48
|
```bash
|
|
45
|
-
#
|
|
46
|
-
b2c ecdn mtls
|
|
49
|
+
# interactive wizard: generate CA, upload, issue your client cert, update dw.json
|
|
50
|
+
b2c ecdn mtls setup
|
|
51
|
+
|
|
52
|
+
# non-interactive: generate CA + upload + issue first client cert
|
|
53
|
+
b2c ecdn mtls create --name code-upload --generate
|
|
54
|
+
b2c ecdn mtls create --name code-upload --generate --out-dir ./certs --client-name jsmith
|
|
47
55
|
|
|
48
|
-
#
|
|
49
|
-
b2c ecdn mtls create --name
|
|
56
|
+
# upload an existing CA
|
|
57
|
+
b2c ecdn mtls create --name code-upload --certificate-file ./ca.pem --private-key-file ./ca.key
|
|
58
|
+
|
|
59
|
+
# issue additional client certificates (local-only, no API call)
|
|
60
|
+
b2c ecdn mtls issue --ca-cert-file ./certs/ca.pem --ca-key-file ./certs/ca.key --name jane.doe
|
|
61
|
+
b2c ecdn mtls issue --ca-cert-file ca.pem --ca-key-file ca.key --name ci --output ci.p12 --days 90
|
|
62
|
+
|
|
63
|
+
# list uploaded CA certificates
|
|
64
|
+
b2c ecdn mtls list
|
|
50
65
|
|
|
51
|
-
# get
|
|
66
|
+
# get certificate details
|
|
52
67
|
b2c ecdn mtls get --certificate-id abc123
|
|
53
68
|
|
|
54
|
-
# delete
|
|
69
|
+
# delete a CA certificate (uploaded CA stops accepting client certs)
|
|
55
70
|
b2c ecdn mtls delete --certificate-id abc123
|
|
56
71
|
```
|
|
57
72
|
|
package/node_modules/@salesforce/b2c-agent-plugins/b2c-cli/skills/b2c-ecdn/references/SECURITY.md
CHANGED
|
@@ -33,10 +33,10 @@ b2c ecdn waf migrate --zone my-zone
|
|
|
33
33
|
b2c ecdn firewall list --zone my-zone
|
|
34
34
|
|
|
35
35
|
# create a firewall rule
|
|
36
|
-
b2c ecdn firewall create --zone my-zone --description "Block bad bots" --
|
|
36
|
+
b2c ecdn firewall create --zone my-zone --description "Block bad bots" --expression '(cf.client.bot)' --actions block
|
|
37
37
|
|
|
38
38
|
# update a firewall rule
|
|
39
|
-
b2c ecdn firewall update --zone my-zone --rule-id abc123 --
|
|
39
|
+
b2c ecdn firewall update --zone my-zone --rule-id abc123 --actions managed_challenge
|
|
40
40
|
|
|
41
41
|
# reorder firewall rules
|
|
42
42
|
b2c ecdn firewall reorder --zone my-zone --rule-ids id1,id2,id3
|
|
@@ -49,7 +49,7 @@ b2c ecdn firewall reorder --zone my-zone --rule-ids id1,id2,id3
|
|
|
49
49
|
b2c ecdn rate-limit list --zone my-zone
|
|
50
50
|
|
|
51
51
|
# create a rate limiting rule
|
|
52
|
-
b2c ecdn rate-limit create --zone my-zone --description "API rate limit" --
|
|
52
|
+
b2c ecdn rate-limit create --zone my-zone --description "API rate limit" --expression '(http.request.uri.path matches "^/api/")' --characteristics cf.unique_visitor_id --action block --period 60 --requests-per-period 100 --mitigation-timeout 600
|
|
53
53
|
|
|
54
54
|
# delete a rate limiting rule
|
|
55
55
|
b2c ecdn rate-limit delete --zone my-zone --rule-id abc123
|
|
@@ -62,7 +62,7 @@ b2c ecdn rate-limit delete --zone my-zone --rule-id abc123
|
|
|
62
62
|
b2c ecdn page-shield notifications list
|
|
63
63
|
|
|
64
64
|
# create a notification webhook
|
|
65
|
-
b2c ecdn page-shield notifications create --url https://example.com/webhook --secret my-secret --zones zone1,zone2
|
|
65
|
+
b2c ecdn page-shield notifications create --webhook-url https://example.com/webhook --secret my-secret --zones zone1,zone2
|
|
66
66
|
|
|
67
67
|
# list Page Shield policies (zone level)
|
|
68
68
|
b2c ecdn page-shield policies list --zone my-zone
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "b2c-ops",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.1",
|
|
5
5
|
"description": "B2C Commerce operator and administrator runbooks for job health, checkout and failed orders, and incident triage.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Salesforce"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "storefront-next",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.1",
|
|
5
5
|
"description": "Storefront Next development skills for building React 19 storefronts on Salesforce B2C Commerce.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Salesforce"
|
package/oclif.manifest.json
CHANGED
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
"type": "option"
|
|
445
445
|
},
|
|
446
446
|
"docs-topics": {
|
|
447
|
-
"description": "Limit the documentation exposed by the docs tools to these categories (comma-separated allowlist). Options: script-api, job-step, commerce-api, pwa-kit-managed-runtime, sfnext, sfra, b2c-commerce, tooling, help-admin, help-merchant. Bounds the whole docs corpus; per-call category/storefront narrow within it. Unknown names are ignored.",
|
|
447
|
+
"description": "Limit the documentation exposed by the docs tools to these categories (comma-separated allowlist). Options: script-api, job-step, commerce-api, pwa-kit-managed-runtime, sfnext, sfra, b2c-commerce, tooling, help-admin, help-merchant, help-kb. Bounds the whole docs corpus; per-call category/storefront narrow within it. Unknown names are ignored.",
|
|
448
448
|
"env": "SFCC_DOCS_TOPICS",
|
|
449
449
|
"name": "docs-topics",
|
|
450
450
|
"hasDynamicHelp": false,
|
|
@@ -462,5 +462,5 @@
|
|
|
462
462
|
"enableJsonFlag": false
|
|
463
463
|
}
|
|
464
464
|
},
|
|
465
|
-
"version": "3.1.
|
|
465
|
+
"version": "3.1.1"
|
|
466
466
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/b2c-dx-mcp",
|
|
3
3
|
"description": "MCP server for B2C Commerce developer experience tools",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.1",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": "SalesforceCommerceCloud/b2c-developer-tooling",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"ts-morph": "27.0.2",
|
|
81
81
|
"yaml": "2.9.0",
|
|
82
82
|
"zod": "4.5.4",
|
|
83
|
-
"@salesforce/b2c-agent-plugins": "1.10.
|
|
84
|
-
"@salesforce/b2c-tooling-sdk": "2.
|
|
83
|
+
"@salesforce/b2c-agent-plugins": "1.10.1",
|
|
84
|
+
"@salesforce/b2c-tooling-sdk": "2.2.0"
|
|
85
85
|
},
|
|
86
86
|
"bundledDependencies": [
|
|
87
87
|
"@modelcontextprotocol/server",
|