@salesforce/afv-skills 1.31.0 → 1.32.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/agentforce-bot-upgrade/SKILL.md +217 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +242 -0
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +128 -0
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +208 -0
- package/skills/agentforce-bot-upgrade/references/input-contract.md +101 -0
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +113 -0
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +78 -0
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +67 -0
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +33 -0
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +116 -0
- package/skills/dx-devops-work-item-manage/SKILL.md +270 -0
- package/skills/dx-devops-work-item-manage/examples/common-workflows.md +479 -0
- package/skills/dx-devops-work-item-manage/references/cli-commands.md +476 -0
- package/skills/dx-org-manage/SKILL.md +8 -5
- package/skills/dx-org-trial-expiration-check/SKILL.md +239 -0
- package/skills/dx-org-trial-expiration-check/scripts/check_expiration.sh +588 -0
- package/skills/experience-ui-bundle-app-coordinate/SKILL.md +12 -9
- package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +29 -5
- package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +1 -1
- package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.sh +30 -0
- package/skills/experience-ui-bundle-features-generate/SKILL.md +86 -11
- package/skills/experience-ui-bundle-features-generate/references/conflict-resolution-schema.json +20 -0
- package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +14 -0
- package/skills/experience-ui-bundle-frontend-generate/SKILL.md +6 -1
- package/skills/experience-ui-bundle-frontend-generate/references/component.md +34 -1
- package/skills/experience-ui-bundle-frontend-generate/references/page.md +1 -1
- package/skills/experience-ui-bundle-project-generate/SKILL.md +111 -0
- package/skills/experience-ui-bundle-project-generate/scripts/flatten-project.mjs +33 -0
- package/skills/platform-custom-lightning-type-generate/SKILL.md +9 -14
- package/skills/platform-custom-lightning-type-generate/references/widget-rendition.md +27 -111
- package/skills/platform-lightning-type-widget-coordinate/SKILL.md +214 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +80 -0
- package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +75 -0
- package/skills/platform-lightning-type-widget-coordinate/references/build-plan-format.md +67 -0
- package/skills/platform-lightning-type-widget-coordinate/references/lightning-type-discovery.md +124 -0
- package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +130 -0
- package/skills/platform-sharing-owd-configure/SKILL.md +142 -0
- package/skills/platform-sharing-owd-configure/examples/get_owd_output.md +38 -0
- package/skills/platform-sharing-owd-configure/examples/update_owd_output.md +44 -0
- package/skills/platform-sharing-owd-configure/references/access_levels.md +49 -0
- package/skills/platform-sharing-owd-configure/references/metadata_api_approach.md +69 -0
- package/skills/platform-sharing-rules-generate/SKILL.md +89 -19
- package/skills/platform-sharing-rules-generate/examples/test-cases.md +381 -0
- package/skills/platform-widget-generate/SKILL.md +241 -0
- package/skills/platform-widget-generate/examples/conditional.json +73 -0
- package/skills/platform-widget-generate/examples/list-with-foreach.json +66 -0
- package/skills/platform-widget-generate/examples/single-object.json +64 -0
- package/skills/platform-widget-generate/references/schema-from-lightning-type.md +76 -0
- package/skills/platform-widget-generate/references/widget-bundle-layout.md +116 -0
- package/skills/platform-widget-generate/references/widget-meta-directives.md +130 -0
- package/skills/sales-agentforce-pipeline-management-configure/SKILL.md +268 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/field-completion-template.genAiPromptTemplate-meta.xml +141 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/pipeline_management_flow.flow-meta.xml +548 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.agent +2938 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sales_management_agent.bundle-meta.xml +4 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/sfdx-project.json +12 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/bant.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/meddic.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/assets/stage-descriptions/spiced.txt +11 -0
- package/skills/sales-agentforce-pipeline-management-configure/examples/custom-prompt-instructions.md +317 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/admin-communication.md +355 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/agent-creation.md +383 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/auth-and-cli.md +146 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/automation-matrix.md +23 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/autonomous-updates.md +215 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/canonical-agent-path.md +75 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/data-sources.md +155 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompt-template.md +120 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/field-completion-prompts.md +149 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flags.md +13 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/flow-clone-from-template.md +447 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/metadata-inventory.md +330 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/opportunity-stages.md +246 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/repair-diagnostics.md +265 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/setup-order.md +263 -0
- package/skills/sales-agentforce-pipeline-management-configure/references/soap-api-enablement.md +528 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/CHANGES.md +180 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/README.md +56 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/add-field-suggestion.sh +679 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-agent.sh +302 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/create-flow.sh +250 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/define-agent-access.sh +430 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/deploy-settings.sh +77 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-deal-agent.sh +241 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/enable-prerequisites.sh +538 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/flow-debug-and-verify.sh +385 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/retrieve-settings.sh +131 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/setup-all.sh +2791 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-bundle-publish.sh +189 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/agent-detection.sh +239 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/flow-builder.sh +238 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/psg.sh +48 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/soap.sh +140 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/stage-descriptions.sh +448 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/shared/test-opp.sh +166 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-all.sh +636 -0
- package/skills/sales-agentforce-pipeline-management-configure/scripts/verify-prompt-generation.sh +346 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# test-opp.sh — shared test-opportunity + grounding-note resolution for the two
|
|
4
|
+
# admin verification scripts (flow-debug-and-verify.sh and
|
|
5
|
+
# verify-prompt-generation.sh).
|
|
6
|
+
#
|
|
7
|
+
# The skill invokes those two scripts SEPARATELY (prompt path vs. flow path), but
|
|
8
|
+
# both must converge on ONE shared test Opportunity and ONE shared grounding Note
|
|
9
|
+
# so a suggestion generated on one path is visible on the other and duplicates
|
|
10
|
+
# never pile up. Keeping this logic in a single sourced lib is what guarantees the
|
|
11
|
+
# two stay byte-for-byte identical (they drifted before this was extracted).
|
|
12
|
+
#
|
|
13
|
+
# Contract:
|
|
14
|
+
# - Sourced, not executed. Relies on the CALLER having defined:
|
|
15
|
+
# * $ORG_ALIAS (target org)
|
|
16
|
+
# * log_info / log_pass / log_warn (helpers — resolved at call time)
|
|
17
|
+
# - Honors optional env var $PM_GROUNDING_NOTE: an agent/LLM-composed grounding
|
|
18
|
+
# note body. When set it is what grounds the AI suggestion; absent, a generic
|
|
19
|
+
# literal is used so standalone runs still work (a contextless note grounds on
|
|
20
|
+
# nothing and returns an empty suggestion, making a working setup look broken).
|
|
21
|
+
# - resolve_test_opportunity sets the global OPP_ID (empty if none could be
|
|
22
|
+
# resolved) and seeds/refreshes the grounding note on it.
|
|
23
|
+
#
|
|
24
|
+
# NOTE: no `set -euo pipefail` here — the caller owns shell options. Every sf/jq
|
|
25
|
+
# pipeline is guarded with `|| echo ""` so a transient CLI/network blip can't trip
|
|
26
|
+
# the caller's `set -e` and abort the whole verification run.
|
|
27
|
+
|
|
28
|
+
# Canonical name for the reusable test opp. The `[PM-TEST]` prefix makes every
|
|
29
|
+
# opp this tooling creates findable in one place (Opportunity WHERE Name LIKE
|
|
30
|
+
# '[PM-TEST]%') so they can be spotted/cleaned up and never confused with real
|
|
31
|
+
# pipeline in Flow Builder's Debug record picker or Pipeline Inspection.
|
|
32
|
+
PM_TEST_OPP_NAME='[PM-TEST] Test Pipeline Verification Opp'
|
|
33
|
+
# Title of the grounding note this tooling manages (used to find/refresh it).
|
|
34
|
+
PM_GROUNDING_NOTE_TITLE='PM grounding note'
|
|
35
|
+
# base64 of "Test grounding data for Pipeline Management verification." — the
|
|
36
|
+
# fallback body when the driver passes no PM_GROUNDING_NOTE.
|
|
37
|
+
PM_GROUNDING_NOTE_FALLBACK_B64='VGVzdCBncm91bmRpbmcgZGF0YSBmb3IgUGlwZWxpbmUgTWFuYWdlbWVudCB2ZXJpZmljYXRpb24u'
|
|
38
|
+
|
|
39
|
+
# Resolve the shared test opportunity, setting the global OPP_ID.
|
|
40
|
+
# 1. Reuse the stable [PM-TEST] opp if one exists (and roll its CloseDate +30d
|
|
41
|
+
# so it stays flow-eligible over repeated sessions).
|
|
42
|
+
# 2. Else create it (owner = current user; Pipeline Inspection is owner-scoped,
|
|
43
|
+
# so a suggestion on someone else's opp is invisible to the admin verifying).
|
|
44
|
+
# 3. Else fall back to any user-owned open opp.
|
|
45
|
+
# 4. Seed or refresh the grounding note against whichever opp resolved.
|
|
46
|
+
resolve_test_opportunity() {
|
|
47
|
+
local current_user_id close_date stage_label opp_values
|
|
48
|
+
|
|
49
|
+
current_user_id=$(NO_COLOR=1 FORCE_COLOR=0 sf org display user --target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.id // empty' 2>/dev/null || echo "")
|
|
50
|
+
|
|
51
|
+
# macOS/BSD `date -v+30d`; GNU `date -d '+30 days'`. Empty => skip create/roll.
|
|
52
|
+
close_date=$(date -v+30d '+%Y-%m-%d' 2>/dev/null || date -d '+30 days' '+%Y-%m-%d' 2>/dev/null || echo "")
|
|
53
|
+
|
|
54
|
+
# 1) Reuse the stable, prefixed test opp if it exists.
|
|
55
|
+
if [[ -n "$current_user_id" ]]; then
|
|
56
|
+
OPP_ID=$(sf data query -q "SELECT Id FROM Opportunity WHERE Name='${PM_TEST_OPP_NAME}' AND OwnerId='${current_user_id}' AND IsClosed=false AND CloseDate>=TODAY AND CloseDate<=NEXT_N_DAYS:90 ORDER BY CreatedDate DESC LIMIT 1" \
|
|
57
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.records[0].Id // empty' || echo "")
|
|
58
|
+
if [[ -n "$OPP_ID" ]]; then
|
|
59
|
+
log_pass "Reusing existing test opportunity: $OPP_ID ($PM_TEST_OPP_NAME)"
|
|
60
|
+
# Roll CloseDate forward so the reused opp keeps meeting the flow's
|
|
61
|
+
# "CloseDate within 90 days" eligibility filter across sessions.
|
|
62
|
+
if [[ -n "$close_date" ]]; then
|
|
63
|
+
if sf data update record --sobject Opportunity --record-id "$OPP_ID" \
|
|
64
|
+
--values "CloseDate='${close_date}'" --target-org "$ORG_ALIAS" --json 2>/dev/null >/dev/null; then
|
|
65
|
+
log_info "Rolled CloseDate to ${close_date}"
|
|
66
|
+
else
|
|
67
|
+
log_warn "Could not roll CloseDate on $OPP_ID (continuing)"
|
|
68
|
+
fi
|
|
69
|
+
fi
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# 2) Create the prefixed test opp if none exists yet.
|
|
74
|
+
if [[ -z "${OPP_ID:-}" && -n "$close_date" ]]; then
|
|
75
|
+
stage_label=$(sf data query -q "SELECT MasterLabel FROM OpportunityStage WHERE IsActive=true AND IsClosed=false ORDER BY SortOrder LIMIT 1" \
|
|
76
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.records[0].MasterLabel // empty')
|
|
77
|
+
# Skip creation if the stage label contains a single quote — it would break
|
|
78
|
+
# --values parsing.
|
|
79
|
+
if [[ -n "$stage_label" ]] && [[ "$stage_label" != *"'"* ]]; then
|
|
80
|
+
opp_values="Name='${PM_TEST_OPP_NAME}' StageName='${stage_label}' CloseDate='${close_date}'"
|
|
81
|
+
[[ -n "$current_user_id" ]] && opp_values="${opp_values} OwnerId='${current_user_id}'"
|
|
82
|
+
OPP_ID=$(sf data create record --sobject Opportunity --values "$opp_values" \
|
|
83
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.id // empty' || echo "")
|
|
84
|
+
[[ -n "$OPP_ID" ]] && log_pass "Created test opportunity: $OPP_ID ($PM_TEST_OPP_NAME)"
|
|
85
|
+
fi
|
|
86
|
+
fi
|
|
87
|
+
|
|
88
|
+
# 3) Fall back to a user-owned open opp (owner filter only when user is known).
|
|
89
|
+
if [[ -z "${OPP_ID:-}" ]]; then
|
|
90
|
+
if [[ -n "$current_user_id" ]]; then
|
|
91
|
+
OPP_ID=$(sf data query -q "SELECT Id FROM Opportunity WHERE OwnerId='${current_user_id}' AND IsClosed=false AND CloseDate>=TODAY AND CloseDate<=NEXT_N_DAYS:90 ORDER BY LastModifiedDate DESC LIMIT 1" \
|
|
92
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.records[0].Id // empty' || echo "")
|
|
93
|
+
else
|
|
94
|
+
OPP_ID=$(sf data query -q "SELECT Id FROM Opportunity WHERE IsClosed=false AND CloseDate>=TODAY AND CloseDate<=NEXT_N_DAYS:90 ORDER BY LastModifiedDate DESC LIMIT 1" \
|
|
95
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.records[0].Id // empty' || echo "")
|
|
96
|
+
fi
|
|
97
|
+
[[ -n "$OPP_ID" ]] && log_pass "Using opportunity: $OPP_ID"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
# 4) Seed / refresh the grounding note against the FINALLY-resolved opp so a
|
|
101
|
+
# freshly created opp, a reused opp, AND a fallback opp all end up grounded.
|
|
102
|
+
[[ -n "${OPP_ID:-}" ]] && seed_grounding_note "$OPP_ID"
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# Ensure the shared grounding note exists (and matches the driver's note) on the
|
|
106
|
+
# given opp. Idempotent: seeds when absent, refreshes only when the composed note
|
|
107
|
+
# differs from what's stored, and otherwise leaves the existing note untouched.
|
|
108
|
+
seed_grounding_note() {
|
|
109
|
+
local opp_id="$1"
|
|
110
|
+
local note_b64 existing_doc_id existing_content note_id
|
|
111
|
+
|
|
112
|
+
# base64 line-wraps at 76 cols on macOS/BSD; `tr -d '\n'` keeps it single-line
|
|
113
|
+
# (GNU's `-w0` isn't portable).
|
|
114
|
+
if [[ -n "${PM_GROUNDING_NOTE:-}" ]]; then
|
|
115
|
+
note_b64=$(printf '%s' "$PM_GROUNDING_NOTE" | base64 | tr -d '\n')
|
|
116
|
+
else
|
|
117
|
+
note_b64="$PM_GROUNDING_NOTE_FALLBACK_B64"
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
# Find a grounding note this tooling previously seeded on the opp. ContentNote's
|
|
121
|
+
# own 069-prefix Id IS the ContentDocumentId, so the link's ContentDocumentId is
|
|
122
|
+
# the note's Id. `|| echo ""` keeps a query blip from tripping the caller's set -e.
|
|
123
|
+
existing_doc_id=$(sf data query -q "SELECT ContentDocumentId FROM ContentDocumentLink WHERE LinkedEntityId='${opp_id}' AND ContentDocument.Title='${PM_GROUNDING_NOTE_TITLE}' ORDER BY ContentDocument.CreatedDate DESC LIMIT 1" \
|
|
124
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.records[0].ContentDocumentId // empty' || echo "")
|
|
125
|
+
|
|
126
|
+
if [[ -n "$existing_doc_id" ]]; then
|
|
127
|
+
# A grounding note already exists. Refresh it ONLY when the driver passed a
|
|
128
|
+
# note whose content differs from what's stored — otherwise reuse it so we
|
|
129
|
+
# don't churn the note (and its ContentVersion history) every run.
|
|
130
|
+
# ContentNote.Content is a base64Url BLOB field: SOQL returns the REST *path*
|
|
131
|
+
# to the blob, not the bytes, so we fetch the decoded body via that endpoint
|
|
132
|
+
# and compare it to the raw PM_GROUNDING_NOTE plaintext (not base64).
|
|
133
|
+
if [[ -n "${PM_GROUNDING_NOTE:-}" ]]; then
|
|
134
|
+
existing_content=$(sf api request rest "/services/data/v64.0/sobjects/ContentNote/${existing_doc_id}/Content" \
|
|
135
|
+
--target-org "$ORG_ALIAS" 2>/dev/null || echo "")
|
|
136
|
+
if [[ -n "$existing_content" && "$existing_content" != "$PM_GROUNDING_NOTE" ]]; then
|
|
137
|
+
# ContentNote.Content isn't reliably updatable in place (it's
|
|
138
|
+
# ContentVersion-backed), so replace by delete + recreate: dropping the
|
|
139
|
+
# ContentDocument cascades its link and versions.
|
|
140
|
+
sf data delete record --sobject ContentDocument --record-id "$existing_doc_id" \
|
|
141
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null >/dev/null || true
|
|
142
|
+
existing_doc_id=""
|
|
143
|
+
log_info "Grounding note changed — refreshing it on $opp_id"
|
|
144
|
+
else
|
|
145
|
+
log_info "Reusing existing grounding note on $opp_id"
|
|
146
|
+
fi
|
|
147
|
+
else
|
|
148
|
+
log_info "Reusing existing grounding note on $opp_id"
|
|
149
|
+
fi
|
|
150
|
+
fi
|
|
151
|
+
|
|
152
|
+
# Seed when none exists (fresh opp) or the stale one was just dropped above.
|
|
153
|
+
if [[ -z "$existing_doc_id" ]]; then
|
|
154
|
+
note_id=$(sf data create record --sobject ContentNote \
|
|
155
|
+
--values "Title='${PM_GROUNDING_NOTE_TITLE}' Content='${note_b64}'" \
|
|
156
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null | jq -r '.result.id // empty' || echo "")
|
|
157
|
+
if [[ -n "$note_id" ]]; then
|
|
158
|
+
sf data create record --sobject ContentDocumentLink \
|
|
159
|
+
--values "ContentDocumentId='${note_id}' LinkedEntityId='${opp_id}' ShareType='V'" \
|
|
160
|
+
--target-org "$ORG_ALIAS" --json 2>/dev/null >/dev/null || true
|
|
161
|
+
log_info "Seeded ContentNote for grounding on test opportunity"
|
|
162
|
+
else
|
|
163
|
+
log_warn "Could not seed grounding ContentNote (Notes may not be enabled on this org) — suggestion quality may be lower"
|
|
164
|
+
fi
|
|
165
|
+
fi
|
|
166
|
+
}
|