@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.
Files changed (55) hide show
  1. package/package.json +1 -1
  2. package/skills/commerce-b2b-open-code-components-integrate/SKILL.md +1 -1
  3. package/skills/commerce-b2b-open-code-components-replace/SKILL.md +16 -16
  4. package/skills/dx-devops-project-manage/SKILL.md +1 -1
  5. package/skills/experience-cms-content-generate/SKILL.md +1 -1
  6. package/skills/experience-cms-content-render/SKILL.md +3 -3
  7. package/skills/experience-cms-content-render/assets/angular/MediaRenderer.component.ts +35 -7
  8. package/skills/experience-cms-content-render/assets/angular/cms-item.service.ts +13 -4
  9. package/skills/experience-cms-content-render/assets/react/MediaRenderer.tsx +30 -8
  10. package/skills/experience-cms-content-render/assets/react/useCmsItem.ts +14 -4
  11. package/skills/experience-cms-content-render/assets/shared/cmsCore.types.ts +11 -1
  12. package/skills/experience-cms-content-render/assets/shared/externalRefs.ts +1 -1
  13. package/skills/experience-cms-content-render/assets/shared/mediaLabels.ts +62 -0
  14. package/skills/experience-cms-content-render/references/init-scaffold.md +13 -6
  15. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -1
  16. package/skills/experience-lwc-design-generate/SKILL.md +1 -1
  17. package/skills/experience-lwc-legacy-migrate/SKILL.md +212 -0
  18. package/skills/experience-lwc-legacy-migrate/assets/lo20-host-page-template.html +192 -0
  19. package/skills/experience-lwc-legacy-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
  20. package/skills/experience-lwc-legacy-migrate/references/lightning-out-2-system-reference.md +495 -0
  21. package/skills/experience-lwc-legacy-migrate/references/lightning-out-beta-to-2-migration.md +824 -0
  22. package/skills/experience-lwc-legacy-migrate/scripts/convert-lo-names.py +94 -0
  23. package/skills/experience-lwc-legacy-migrate/scripts/validate-lo20-page.py +133 -0
  24. package/skills/experience-ui-bundle-project-generate/SKILL.md +1 -1
  25. package/skills/integration-connectivity-connected-app-configure/SKILL.md +5 -5
  26. package/skills/integration-connectivity-generate/SKILL.md +10 -10
  27. package/skills/integration-connectivity-generate/scripts/configure-named-credential.sh +2 -2
  28. package/skills/platform-apex-test-generate/SKILL.md +1 -1
  29. package/skills/platform-apex-test-run/SKILL.md +1 -1
  30. package/skills/platform-custom-field-generate/SKILL.md +1 -1
  31. package/skills/platform-custom-lightning-type-generate/SKILL.md +1 -1
  32. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -1
  33. package/skills/platform-custom-object-generate/SKILL.md +1 -1
  34. package/skills/platform-custom-report-type-generate/SKILL.md +1 -1
  35. package/skills/platform-custom-setting-generate/SKILL.md +1 -1
  36. package/skills/platform-data-and-tooling-api-context-get/SKILL.md +1 -1
  37. package/skills/platform-data-manage/SKILL.md +10 -10
  38. package/skills/platform-flexipage-generate/SKILL.md +1 -1
  39. package/skills/platform-lightning-app-coordinate/SKILL.md +1 -1
  40. package/skills/platform-metadata-api-context-get/SKILL.md +1 -1
  41. package/skills/platform-metadata-retrieve/SKILL.md +1 -1
  42. package/skills/platform-permission-set-generate/SKILL.md +1 -1
  43. package/skills/platform-report-generate/SKILL.md +1 -1
  44. package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +4 -4
  45. package/skills/platform-sharing-owd-configure/SKILL.md +1 -1
  46. package/skills/platform-sharing-rules-generate/SKILL.md +1 -1
  47. package/skills/platform-soql-query/SKILL.md +1 -1
  48. package/skills/platform-value-set-generate/SKILL.md +1 -1
  49. package/skills/service-agentforce-human-escalation-configure/SKILL.md +4 -0
  50. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +26 -6
  51. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +5 -4
  52. package/skills/service-de-waba-integrate/SKILL.md +2 -1
  53. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -0
  54. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +29 -0
  55. 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(SKILLS_ROOT / script_rel), *args],
227
- capture_output=True, text=True, cwd=str(SKILLS_ROOT),
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. The actual sharing happens in Meta Business Suite (UI-only; Meta provides no Graph endpoint to automate this step). 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."
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
@@ -10,6 +10,8 @@ metadata:
10
10
  - "platform-permission-set-generate"
11
11
  - "service-digital-engagement-channel-configure"
12
12
  cliTools:
13
+ - tool: ["python3"]
14
+ semver: ">=3.8"
13
15
  - tool: ["sf"]
14
16
  semver: ">=2.0.0"
15
17
  ---
@@ -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 in a headless flow via the Metadata API. Reads the current CaseSettings, applies the desired emailToCase configuration with the updateMetadata CRUD call, and verifies by re-reading. Also the entry point when the user wants an Agentforce service agent on Email-to-Case: this skill configures the E2C base, then delegates agent creation and channel wiring. Start here even when no agent exists yet. TRIGGER when the user says set up Email-to-Case, configure email to case, enable Email-to-Case routing addresses, add an email routing address, Email-to-Case Metadata API, or set up Email-to-Case with an Agentforce service agent (attach an agent to an email routing address). DO NOT TRIGGER when the user needs the interactive Service Easy Setup wizard for E2cEasy addresses, when configuring On-Demand Email-to-Case only, for general Case object or web-to-case setup, or when only creating an Agentforce agent with no Email-to-Case involved."
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"]