@salesforce/afv-skills 1.56.0 → 1.57.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/package.json +1 -1
- package/skills/commerce-b2b-open-code-components-integrate/SKILL.md +1 -1
- package/skills/commerce-b2b-open-code-components-replace/SKILL.md +16 -16
- package/skills/dx-devops-project-manage/SKILL.md +1 -1
- package/skills/experience-cms-content-generate/SKILL.md +1 -1
- package/skills/experience-cms-content-render/SKILL.md +3 -3
- package/skills/experience-cms-content-render/assets/angular/MediaRenderer.component.ts +35 -7
- package/skills/experience-cms-content-render/assets/angular/cms-item.service.ts +13 -4
- package/skills/experience-cms-content-render/assets/react/MediaRenderer.tsx +30 -8
- package/skills/experience-cms-content-render/assets/react/useCmsItem.ts +14 -4
- package/skills/experience-cms-content-render/assets/shared/cmsCore.types.ts +11 -1
- package/skills/experience-cms-content-render/assets/shared/externalRefs.ts +1 -1
- package/skills/experience-cms-content-render/assets/shared/mediaLabels.ts +62 -0
- package/skills/experience-cms-content-render/references/init-scaffold.md +13 -6
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -1
- package/skills/experience-lwc-design-generate/SKILL.md +1 -1
- package/skills/experience-lwc-legacy-migrate/SKILL.md +212 -0
- package/skills/experience-lwc-legacy-migrate/assets/lo20-host-page-template.html +192 -0
- package/skills/experience-lwc-legacy-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
- package/skills/experience-lwc-legacy-migrate/references/lightning-out-2-system-reference.md +495 -0
- package/skills/experience-lwc-legacy-migrate/references/lightning-out-beta-to-2-migration.md +824 -0
- package/skills/experience-lwc-legacy-migrate/scripts/convert-lo-names.py +94 -0
- package/skills/experience-lwc-legacy-migrate/scripts/validate-lo20-page.py +133 -0
- package/skills/experience-ui-bundle-project-generate/SKILL.md +1 -1
- package/skills/integration-connectivity-connected-app-configure/SKILL.md +5 -5
- package/skills/integration-connectivity-generate/SKILL.md +10 -10
- package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +2 -2
- package/skills/platform-apex-test-generate/SKILL.md +1 -1
- package/skills/platform-apex-test-run/SKILL.md +1 -1
- package/skills/platform-custom-field-generate/SKILL.md +1 -1
- package/skills/platform-custom-lightning-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-object-generate/SKILL.md +1 -1
- package/skills/platform-custom-report-type-generate/SKILL.md +1 -1
- package/skills/platform-custom-setting-generate/SKILL.md +1 -1
- package/skills/platform-data-and-tooling-api-context-get/SKILL.md +1 -1
- package/skills/platform-data-manage/SKILL.md +10 -10
- package/skills/platform-flexipage-generate/SKILL.md +1 -1
- package/skills/platform-lightning-app-coordinate/SKILL.md +1 -1
- package/skills/platform-metadata-api-context-get/SKILL.md +1 -1
- package/skills/platform-metadata-retrieve/SKILL.md +1 -1
- package/skills/platform-permission-set-generate/SKILL.md +1 -1
- package/skills/platform-report-generate/SKILL.md +1 -1
- package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +4 -4
- package/skills/platform-sharing-owd-configure/SKILL.md +1 -1
- package/skills/platform-sharing-rules-generate/SKILL.md +1 -1
- package/skills/platform-soql-query/SKILL.md +1 -1
- package/skills/platform-value-set-generate/SKILL.md +1 -1
- package/skills/service-agentforce-human-escalation-configure/SKILL.md +4 -0
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +26 -6
- package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +5 -4
- package/skills/service-de-waba-integrate/SKILL.md +2 -1
- package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -0
- package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +29 -0
- package/skills/service-email-to-case-configure/SKILL.md +1 -1
|
@@ -6,12 +6,30 @@ import subprocess
|
|
|
6
6
|
import tempfile
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
|
-
# skills/ root is three levels up (.../<skill>/scripts/tests/_bootstrap.py).
|
|
9
|
+
# skills/ root is three levels up (.../<skill>/scripts/tests/_bootstrap.py). In the flat copy
|
|
10
|
+
# this is the repo's skills/ directory; in a plugin mirror it is that plugin's own bundled
|
|
11
|
+
# skills/ directory, which only contains its own roster.
|
|
10
12
|
SKILLS_ROOT = Path(__file__).resolve().parents[3]
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
def _find_flat_skills_root(start: Path) -> Path:
|
|
16
|
+
"""Walk up from this file to the repo's flat skills/ root, which bundles every skill
|
|
17
|
+
exactly once. Cross-skill references that aren't part of this skill's own plugin roster
|
|
18
|
+
(like the ITSM coordinator's verdict script below) must resolve here, not under
|
|
19
|
+
SKILLS_ROOT, since a plugin mirror's SKILLS_ROOT only contains its own bundled skills."""
|
|
20
|
+
for parent in start.parents:
|
|
21
|
+
candidate = parent / "skills" / "service-itsm-agentic-setup-agentforce-coordinate"
|
|
22
|
+
if candidate.is_dir():
|
|
23
|
+
return parent / "skills"
|
|
24
|
+
raise RuntimeError("could not locate the repo's flat skills/ root")
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
FLAT_SKILLS_ROOT = _find_flat_skills_root(Path(__file__).resolve())
|
|
28
|
+
|
|
12
29
|
SKILL_DIR = "service-agentforce-human-escalation-configure"
|
|
13
30
|
SCRIPT = f"{SKILL_DIR}/scripts/verify-and-configure.sh"
|
|
14
|
-
# The ITSM coordinator's advancement gate - exercised for the escalation verdict mapping.
|
|
31
|
+
# The ITSM coordinator's advancement gate - exercised for the escalation verdict mapping. Not
|
|
32
|
+
# bundled per-plugin, so resolved against FLAT_SKILLS_ROOT (see run_node's root parameter).
|
|
15
33
|
VERDICT_SCRIPT = "service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs"
|
|
16
34
|
|
|
17
35
|
# A fake `sf` that reports a PRODUCTION customer org so the safe_to_write guard must refuse.
|
|
@@ -220,11 +238,13 @@ def run(args, path_prefix=None, scrub_sf=False, extra_env=None):
|
|
|
220
238
|
return proc.returncode, (proc.stdout or "") + (proc.stderr or "")
|
|
221
239
|
|
|
222
240
|
|
|
223
|
-
def run_node(script_rel, args):
|
|
224
|
-
"""Run a bundled Node helper; return (returncode, stdout).
|
|
241
|
+
def run_node(script_rel, args, root=None):
|
|
242
|
+
"""Run a bundled Node helper; return (returncode, stdout). Pass `root=FLAT_SKILLS_ROOT`
|
|
243
|
+
for cross-skill scripts not bundled in this skill's own plugin roster."""
|
|
244
|
+
base = root if root is not None else SKILLS_ROOT
|
|
225
245
|
proc = subprocess.run(
|
|
226
|
-
["node", str(
|
|
227
|
-
capture_output=True, text=True, cwd=str(
|
|
246
|
+
["node", str(base / script_rel), *args],
|
|
247
|
+
capture_output=True, text=True, cwd=str(base),
|
|
228
248
|
)
|
|
229
249
|
return proc.returncode, (proc.stdout or "")
|
|
230
250
|
|
|
@@ -17,6 +17,7 @@ from pathlib import Path
|
|
|
17
17
|
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
|
18
18
|
from _bootstrap import ( # noqa: E402
|
|
19
19
|
SKILLS_ROOT,
|
|
20
|
+
FLAT_SKILLS_ROOT,
|
|
20
21
|
SKILL_DIR,
|
|
21
22
|
SCRIPT,
|
|
22
23
|
VERDICT_SCRIPT,
|
|
@@ -700,13 +701,13 @@ class NgaClassifierHardeningTests(unittest.TestCase):
|
|
|
700
701
|
|
|
701
702
|
class CoordinatorGateTests(unittest.TestCase):
|
|
702
703
|
def test_escalation_verdict_mapping(self):
|
|
703
|
-
rc, out = run_node(VERDICT_SCRIPT, ["escalation", "CONFIGURED"])
|
|
704
|
+
rc, out = run_node(VERDICT_SCRIPT, ["escalation", "CONFIGURED"], root=FLAT_SKILLS_ROOT)
|
|
704
705
|
self.assertEqual(rc, 0, out)
|
|
705
|
-
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "ALREADY-CONFIGURED"])
|
|
706
|
+
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "ALREADY-CONFIGURED"], root=FLAT_SKILLS_ROOT)
|
|
706
707
|
self.assertEqual(rc, 0)
|
|
707
|
-
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "INCOMPLETE"])
|
|
708
|
+
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "INCOMPLETE"], root=FLAT_SKILLS_ROOT)
|
|
708
709
|
self.assertEqual(rc, 1)
|
|
709
|
-
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "BLOCKED"])
|
|
710
|
+
rc, _ = run_node(VERDICT_SCRIPT, ["escalation", "BLOCKED"], root=FLAT_SKILLS_ROOT)
|
|
710
711
|
self.assertEqual(rc, 1)
|
|
711
712
|
|
|
712
713
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: service-de-waba-integrate
|
|
3
|
-
description: "Confirm the customer's WhatsApp Business Account is shared with Salesforce on Meta's side. Pure instruction + one user-confirmation prompt — no API calls, no token handling.
|
|
3
|
+
description: "Confirm the customer's WhatsApp Business Account is shared with Salesforce on Meta's side. TRIGGER when the user asks to link, share, or confirm sharing of a WhatsApp Business Account with Salesforce, or to verify Salesforce appears in the WABA's Partners list. Pure instruction + one user-confirmation prompt — no API calls, no token handling. Sharing happens in Meta Business Suite (UI-only; Meta has no Graph endpoint for this). Renders step-by-step instructions with Salesforce's Business Manager ID substituted in, then asks the user to confirm whether \"Salesforce\" appears in the WABA's Partners list. DO NOT TRIGGER when the user needs full end-to-end WhatsApp setup (use `service-de-headless-channel-configure`) or to insert the channel record itself (use `service-de-channel-create`)."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
6
|
minApiVersion: "67.0"
|
|
7
7
|
domains: ["Service"]
|
|
8
8
|
relatedSkills:
|
|
9
9
|
- "service-de-channel-create"
|
|
10
|
+
- "service-de-headless-channel-configure"
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
# Linking a WABA to Salesforce
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Verifies the target org's API version meets the minimum requirement.
|
|
3
|
+
# Usage: check-api-version.sh <min-version> <org-alias>
|
|
4
|
+
# Exits 0 if version >= min-version, exits 1 with error message otherwise.
|
|
5
|
+
|
|
6
|
+
MIN_VERSION="${1:?Usage: check-api-version.sh <min-version> <org-alias>}"
|
|
7
|
+
ORG_ALIAS="${2:?Usage: check-api-version.sh <min-version> <org-alias>}"
|
|
8
|
+
|
|
9
|
+
API_VERSION=$(sf org display --target-org "$ORG_ALIAS" --json 2>/dev/null | python3 -c "
|
|
10
|
+
import json, sys
|
|
11
|
+
try:
|
|
12
|
+
data = json.load(sys.stdin)
|
|
13
|
+
print(data.get('result', {}).get('apiVersion', ''))
|
|
14
|
+
except Exception:
|
|
15
|
+
print('')
|
|
16
|
+
")
|
|
17
|
+
|
|
18
|
+
if [ -z "$API_VERSION" ]; then
|
|
19
|
+
echo "ERROR: Could not determine API version for org '$ORG_ALIAS'."
|
|
20
|
+
exit 1
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if python3 -c "import sys; sys.exit(0 if float(sys.argv[1]) >= float(sys.argv[2]) else 1)" "$API_VERSION" "$MIN_VERSION"; then
|
|
24
|
+
echo "OK: Org API version $API_VERSION meets minimum $MIN_VERSION."
|
|
25
|
+
exit 0
|
|
26
|
+
else
|
|
27
|
+
echo "ERROR: Org API version $API_VERSION is below minimum $MIN_VERSION. Generate a sfdx-project.json with \"sourceApiVersion\": \"$MIN_VERSION\" in the metadata output folder."
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: service-email-to-case-configure
|
|
3
|
-
description: "Use to configure Salesforce Email-to-Case
|
|
3
|
+
description: "Use to configure Salesforce Email-to-Case headlessly via the Metadata API. Reads CaseSettings, applies the emailToCase config with updateMetadata, and verifies by re-reading. Also the entry point for attaching an Agentforce agent to Email-to-Case: configures the E2C base, then delegates agent creation and channel wiring. TRIGGER on set up/configure Email-to-Case, enable E2C routing addresses, add a routing address, or E2C with an Agentforce agent. DO NOT TRIGGER for the interactive Easy Setup wizard, On-Demand E2C only, general Case/web-to-case setup, or an agent with no E2C involved."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.1"
|
|
6
6
|
domains: ["Service", "Agentforce"]
|