@salesforce/afv-skills 1.62.0 → 1.64.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 (138) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-offline-experimentation-run/SKILL.md +253 -0
  3. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +796 -0
  4. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +111 -0
  5. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +1053 -0
  6. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +21 -11
  7. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +10 -0
  8. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
  9. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +44 -1
  10. package/skills/automation-sandbox-post-copy-configure/SKILL.md +132 -124
  11. package/skills/automation-sandbox-post-copy-configure/references/flow_activation_path.md +151 -0
  12. package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +55 -9
  13. package/skills/consumer-goods-promotion-bo-api-deploy/SKILL.md +54 -107
  14. package/skills/consumer-goods-promotion-bo-api-deploy/assets/set-comment-value/payloads/copy.json +1 -1
  15. package/skills/consumer-goods-promotion-bo-api-deploy/references/conventions-and-payload-rules.md +82 -5
  16. package/skills/consumer-goods-promotion-bo-api-deploy/references/generate-and-wire.md +35 -2
  17. package/skills/consumer-goods-promotion-bo-api-deploy/references/preflight-and-seed-queries.md +149 -0
  18. package/skills/consumer-goods-promotion-bo-api-deploy/references/smoke-and-verify.md +17 -1
  19. package/skills/dx-devops-conflict-resolve/SKILL.md +1 -5
  20. package/skills/dx-devops-pipeline-manage/SKILL.md +1 -5
  21. package/skills/dx-devops-project-manage/SKILL.md +1 -5
  22. package/skills/dx-devops-promote/SKILL.md +1 -5
  23. package/skills/dx-devops-request-status/SKILL.md +1 -5
  24. package/skills/dx-lifecycle-center/SKILL.md +120 -0
  25. package/skills/dx-lifecycle-center/examples/workflows.md +175 -0
  26. package/skills/dx-lifecycle-center/references/connect-api.md +123 -0
  27. package/skills/dx-lifecycle-center/references/connect-org.md +184 -0
  28. package/skills/dx-lifecycle-center/references/deploy.md +153 -0
  29. package/skills/dx-lifecycle-center/references/error-handling.md +21 -0
  30. package/skills/dx-lifecycle-center/references/hub-org.md +37 -0
  31. package/skills/dx-lifecycle-center/references/list-orgs.md +99 -0
  32. package/skills/dx-lifecycle-center/references/request-body.md +75 -0
  33. package/skills/dx-lifecycle-center/references/troubleshooting.md +31 -0
  34. package/skills/dx-lifecycle-center/scripts/poll-deploy-status.sh +200 -0
  35. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +120 -0
  36. package/skills/dx-org-devhub-configure/SKILL.md +1 -3
  37. package/skills/dx-org-shape-manage/SKILL.md +1 -5
  38. package/skills/dx-org-snapshot-manage/SKILL.md +1 -3
  39. package/skills/education-cloud-academic-calendar-generate/SKILL.md +1 -3
  40. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -3
  41. package/skills/education-cloud-domain-configure/SKILL.md +1 -3
  42. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -3
  43. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -5
  44. package/skills/experience-ui-bundle-2gp-deploy/SKILL.md +1 -3
  45. package/skills/experience-ui-bundle-features-generate/SKILL.md +1 -5
  46. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +1 -3
  47. package/skills/field-service-data-capture-migrate/SKILL.md +1 -3
  48. package/skills/insurance-brokerage-agency-billing-configure/SKILL.md +1 -3
  49. package/skills/marketing-message-test/SKILL.md +1 -3
  50. package/skills/nonprofit-fundraising-configure/SKILL.md +240 -0
  51. package/skills/nonprofit-fundraising-configure/references/gotchas.md +26 -0
  52. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +678 -0
  53. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +35 -0
  54. package/skills/nonprofit-volunteer-management-model-get/SKILL.md +166 -0
  55. package/skills/nonprofit-volunteer-management-model-get/references/entities.md +315 -0
  56. package/skills/nonprofit-volunteer-management-model-get/references/relationships.md +175 -0
  57. package/skills/nonprofit-volunteer-management-model-get/references/themes.md +143 -0
  58. package/skills/nonprofit-volunteer-management-records-create/SKILL.md +121 -0
  59. package/skills/nonprofit-volunteer-management-records-create/references/field-guide.md +284 -0
  60. package/skills/nonprofit-volunteer-management-records-create/references/mcp-invocation.md +248 -0
  61. package/skills/nonprofit-volunteer-management-records-create/references/review-format.md +140 -0
  62. package/skills/nonprofit-volunteer-management-records-create/scripts/expand-series.py +632 -0
  63. package/skills/nonprofit-volunteer-management-records-create/scripts/render-review-table.py +419 -0
  64. package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_expand_series.py +690 -0
  65. package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_render_review_table.py +421 -0
  66. package/skills/nonprofit-volunteer-management-structure-generate/SKILL.md +119 -0
  67. package/skills/nonprofit-volunteer-management-structure-generate/references/configuration-decisions.md +159 -0
  68. package/skills/nonprofit-volunteer-management-structure-generate/references/discovery-interview.md +137 -0
  69. package/skills/nonprofit-volunteer-management-structure-generate/references/edge-cases.md +48 -0
  70. package/skills/nonprofit-volunteer-management-structure-generate/references/mcp-invocation.md +75 -0
  71. package/skills/nonprofit-volunteer-management-structure-generate/references/plan-output.md +141 -0
  72. package/skills/platform-custom-field-generate/SKILL.md +1 -0
  73. package/skills/platform-custom-field-generate/references/advanced-picklists.md +5 -5
  74. package/skills/platform-custom-metadata-type-generate/SKILL.md +3 -0
  75. package/skills/platform-custom-object-generate/SKILL.md +4 -0
  76. package/skills/platform-custom-setting-generate/SKILL.md +3 -0
  77. package/skills/platform-datamask-run/SKILL.md +1 -5
  78. package/skills/platform-permission-set-generate/SKILL.md +3 -0
  79. package/skills/platform-salesforce-connect-adapter-generate/SKILL.md +1 -3
  80. package/skills/platform-sandbox-configure/SKILL.md +1 -3
  81. package/skills/platform-value-set-generate/SKILL.md +3 -0
  82. package/skills/sales-call-scoring-configure/SKILL.md +1 -5
  83. package/skills/service-agentforce-channel-configure/SKILL.md +1 -3
  84. package/skills/service-agentforce-human-escalation-configure/SKILL.md +1 -3
  85. package/skills/service-catalog-template-coordinate/SKILL.md +1 -3
  86. package/skills/service-concierge-portal-generate/SKILL.md +1 -3
  87. package/skills/service-email-to-case-configure/SKILL.md +1 -5
  88. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -3
  89. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -3
  90. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -3
  91. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -3
  92. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +1 -3
  93. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -5
  94. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +1 -3
  95. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +1 -3
  96. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +1 -3
  97. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -3
  98. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -3
  99. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +1 -0
  100. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +1 -0
  101. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -3
  102. package/skills/service-itsm-agentic-setup-uel-user-create/SKILL.md +1 -9
  103. package/skills/service-itsm-incident-mgmt-configure/SKILL.md +1 -5
  104. package/skills/service-itsm-incident-priority-configure/SKILL.md +1 -3
  105. package/skills/service-itsm-slack-itservice-configure/SKILL.md +1 -3
  106. package/skills/service-itsm-swarming-configure/SKILL.md +1 -3
  107. package/skills/service-itsm-teams-configure/SKILL.md +1 -3
  108. package/skills/service-itsm-teams-debug/SKILL.md +1 -3
  109. package/skills/service-itsm-teams-employee-agent-configure/SKILL.md +1 -3
  110. package/skills/service-itsm-teams-itdesk-configure/SKILL.md +1 -3
  111. package/skills/service-itsm-teams-itservice-configure/SKILL.md +1 -3
  112. package/skills/service-native-voice-recording-transcription-configure/SKILL.md +1 -3
  113. package/skills/service-omni-agent-users-create/SKILL.md +1 -3
  114. package/skills/service-omni-agent-work-sharing-configure/SKILL.md +1 -3
  115. package/skills/service-omni-attribute-routing-configure/SKILL.md +1 -3
  116. package/skills/service-omni-base-settings-configure/SKILL.md +1 -3
  117. package/skills/service-omni-channel-inventory-analyze/SKILL.md +1 -3
  118. package/skills/service-omni-channel-limits-analyze/SKILL.md +1 -3
  119. package/skills/service-omni-channel-setup-coordinate/SKILL.md +1 -3
  120. package/skills/service-omni-command-center-analyze/SKILL.md +1 -3
  121. package/skills/service-omni-command-center-configure/SKILL.md +1 -3
  122. package/skills/service-omni-permission-set-assign/SKILL.md +1 -3
  123. package/skills/service-omni-presence-status-deploy/SKILL.md +1 -3
  124. package/skills/service-omni-presence-user-config-deploy/SKILL.md +1 -3
  125. package/skills/service-omni-queue-deploy/SKILL.md +1 -3
  126. package/skills/service-omni-queue-members-assign/SKILL.md +1 -3
  127. package/skills/service-omni-queue-routing-config-deploy/SKILL.md +1 -3
  128. package/skills/service-omni-routing-flow-deploy/SKILL.md +1 -3
  129. package/skills/service-omni-service-channel-configure/SKILL.md +1 -3
  130. package/skills/service-omni-sidebar-configure/SKILL.md +1 -3
  131. package/skills/service-omni-skills-based-routing-configure/SKILL.md +1 -3
  132. package/skills/service-omni-supervisor-config-deploy/SKILL.md +1 -3
  133. package/skills/service-omni-supervisor-permset-assign/SKILL.md +1 -3
  134. package/skills/service-omni-supervisor-surface-deploy/SKILL.md +1 -3
  135. package/skills/service-omni-supervisor-users-create/SKILL.md +1 -3
  136. package/skills/service-omni-work-skill-routing-configure/SKILL.md +1 -3
  137. package/skills/field-service-setup-orchestrator-get/SKILL.md +0 -47
  138. package/skills/tableau-next-asset-create/README.md +0 -65
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env bash
2
+ # Resolve an SFAP access token (JWT, sfap_api scope) for SFAP AI Gateway calls.
3
+ # Adapted from the dx-apexguru-scan skill's resolve-token.sh.
4
+ #
5
+ # Usage: bash resolve-token.sh [--org <alias>]
6
+ #
7
+ # Output (stdout, single line JSON):
8
+ # {"baseUrl":"https://test.api.salesforce.com/ai/gpt/v1","tokenFile":"/tmp/...","source":"...","env":"...","coreTenantId":"..."}
9
+ # The JWT itself is written to a 0600 temp file (path in tokenFile); never printed to stdout.
10
+ # On failure: {"error":"...","hint":"..."} and exit 1.
11
+ set -euo pipefail
12
+
13
+ ORG_ALIAS=""
14
+ while [ $# -gt 0 ]; do
15
+ case "$1" in
16
+ --org) ORG_ALIAS="${2:-}"; shift 2 ;;
17
+ *) shift ;;
18
+ esac
19
+ done
20
+
21
+ TOKEN=""
22
+ SOURCE=""
23
+
24
+ # Derive JWT from sf CLI org via <instanceUrl>/ide/auth
25
+ if command -v sf >/dev/null 2>&1 && command -v jq >/dev/null 2>&1 && command -v curl >/dev/null 2>&1; then
26
+ ORG_ARGS=()
27
+ [ -n "$ORG_ALIAS" ] && ORG_ARGS=(--target-org "$ORG_ALIAS")
28
+
29
+ INSTANCE_URL=""
30
+ ORG_ID=""
31
+ if ORG_JSON="$(sf org display ${ORG_ARGS[@]+"${ORG_ARGS[@]}"} --json 2>/dev/null)"; then
32
+ INSTANCE_URL="$(printf '%s' "$ORG_JSON" | jq -r '.result.instanceUrl // empty')"
33
+ ORG_ID="$(printf '%s' "$ORG_JSON" | jq -r '.result.id // empty')"
34
+ fi
35
+
36
+ FRONTDOOR_URL=""
37
+ if OPEN_JSON="$(sf org open ${ORG_ARGS[@]+"${ORG_ARGS[@]}"} --url-only --json 2>/dev/null)"; then
38
+ FRONTDOOR_URL="$(printf '%s' "$OPEN_JSON" | jq -r '.result.url // empty')"
39
+ fi
40
+
41
+ if [ -n "$INSTANCE_URL" ] && [ -n "$FRONTDOOR_URL" ]; then
42
+ COOKIE_JAR="$(mktemp "${TMPDIR:-/tmp}/offexp-sid.XXXXXX")"
43
+ chmod 600 "$COOKIE_JAR"
44
+ trap 'rm -f "$COOKIE_JAR"' EXIT
45
+
46
+ curl -sS -c "$COOKIE_JAR" -L -o /dev/null "$FRONTDOOR_URL" 2>/dev/null || true
47
+ SID="$(awk -F'\t' 'tolower($6)=="sid"{print $7}' "$COOKIE_JAR" 2>/dev/null | head -1)"
48
+
49
+ if [ -n "$SID" ]; then
50
+ AUTH_JSON="$(curl -sS "${INSTANCE_URL%/}/ide/auth" -H "Authorization: Bearer $SID" 2>/dev/null || true)"
51
+ CANDIDATE="$(printf '%s' "$AUTH_JSON" | jq -r '.jwt // empty' 2>/dev/null || true)"
52
+ if [ -n "$CANDIDATE" ] && [ "$CANDIDATE" != "null" ]; then
53
+ TOKEN="$CANDIDATE"
54
+ SOURCE="sf-cli:/ide/auth${ORG_ALIAS:+ (org=$ORG_ALIAS)}"
55
+ fi
56
+ fi
57
+ rm -f "$COOKIE_JAR"; trap - EXIT
58
+ fi
59
+ fi
60
+
61
+ if [ -z "$TOKEN" ]; then
62
+ printf '{"error":"no SFAP token found","hint":"Authenticate to an org first: sf org login web -a <alias>"}\n'
63
+ exit 1
64
+ fi
65
+
66
+ # Detect environment from the JWT's issuer or sfap_rh claim
67
+ PAYLOAD=$(printf '%s' "$TOKEN" | cut -d. -f2 | tr '_-' '/+')
68
+ MOD=$((${#PAYLOAD} % 4))
69
+ if [ $MOD -eq 2 ]; then PAYLOAD="${PAYLOAD}=="; elif [ $MOD -eq 3 ]; then PAYLOAD="${PAYLOAD}="; fi
70
+ DECODED=$(printf '%s' "$PAYLOAD" | base64 -d 2>/dev/null || printf '%s' "$PAYLOAD" | base64 -D 2>/dev/null)
71
+
72
+ ISS=$(printf '%s' "$DECODED" | jq -r '.iss // empty' 2>/dev/null || true)
73
+ SFAP_RH=$(printf '%s' "$DECODED" | jq -r '.sfap_rh // empty' 2>/dev/null || true)
74
+
75
+ # Determine environment and base URL
76
+ DETECTED_ENV="prod"
77
+ if echo "$ISS$SFAP_RH" | grep -qi 'test1\|test\b'; then
78
+ DETECTED_ENV="test"
79
+ elif echo "$ISS$SFAP_RH" | grep -qi 'stage'; then
80
+ DETECTED_ENV="stage"
81
+ elif echo "$ISS$SFAP_RH" | grep -qi 'dev\b'; then
82
+ DETECTED_ENV="dev"
83
+ fi
84
+
85
+ case "$DETECTED_ENV" in
86
+ test) API_HOST="test.api.salesforce.com" ;;
87
+ stage) API_HOST="stage.api.salesforce.com" ;;
88
+ dev) API_HOST="dev.api.salesforce.com" ;;
89
+ *) API_HOST="api.salesforce.com" ;;
90
+ esac
91
+ BASE_URL="https://${API_HOST}/ai/gpt/v1"
92
+
93
+ # Build core tenant ID from the org's instance name
94
+ INSTANCE_NAME=""
95
+ if [ -n "$ISS" ]; then
96
+ # Extract instance hint from issuer URL (e.g. test1 from orgfarm-xxx.test1.my.pc-rnd.salesforce.com)
97
+ INSTANCE_NAME=$(echo "$ISS" | grep -oE '(test1|na[0-9]+|cs[0-9]+|eu[0-9]+)' | head -1 || true)
98
+ fi
99
+ CORE_TENANT_ID=""
100
+ if [ -n "$ORG_ID" ] && [ -n "$INSTANCE_NAME" ]; then
101
+ CORE_TENANT_ID="core/falcon${INSTANCE_NAME}-core4/${ORG_ID}"
102
+ fi
103
+
104
+ # Write JWT to secure temp file
105
+ TOKEN_FILE="$(mktemp "${TMPDIR:-/tmp}/offexp-jwt.XXXXXX")"
106
+ chmod 600 "$TOKEN_FILE"
107
+ printf '%s' "$TOKEN" > "$TOKEN_FILE"
108
+
109
+ jq -cn --arg baseUrl "$BASE_URL" --arg tokenFile "$TOKEN_FILE" --arg source "$SOURCE" \
110
+ --arg env "$DETECTED_ENV" --arg coreTenantId "$CORE_TENANT_ID" \
111
+ '{baseUrl:$baseUrl, tokenFile:$tokenFile, source:$source, env:$env, coreTenantId:$coreTenantId}'