@salesforce/afv-skills 1.68.0 → 1.69.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/afcc-setup-coordinate/SKILL.md +348 -0
- package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
- package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
- package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
- package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
- package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
- package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
- package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
- package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
- package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
- package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
- package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
- package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
- package/skills/commerce-react-storefront-create/SKILL.md +54 -21
- package/skills/dx-lifecycle-center/SKILL.md +24 -18
- package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
- package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
- package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
- package/skills/dx-lifecycle-center/references/deploy.md +3 -3
- package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
- package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
- package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
- package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +2 -3
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
- package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
- package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
- package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
- package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
- package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
- package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
- package/skills/experience-afv-analytics-query/SKILL.md +239 -0
- package/skills/experience-afv-analytics-query/references/references.md +176 -0
- package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
- package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
- package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
- package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
- package/skills/experience-app-mcp-generate/SKILL.md +174 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
- package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
- package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
- package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
- package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
- package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
- package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
- package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
- package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
- package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
- package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
- package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
- package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
- package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
- package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
- package/skills/platform-custom-field-generate/SKILL.md +24 -16
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
- package/skills/platform-custom-setting-generate/SKILL.md +1 -0
- package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
- package/skills/platform-flexipage-generate/SKILL.md +7 -10
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
- package/skills/platform-policy-rule-generate/SKILL.md +9 -7
- package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
- package/skills/platform-report-generate/SKILL.md +20 -1
- package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
- package/skills/platform-report-generate/references/verification-checklist.md +12 -0
- package/skills/service-digital-engagement-channel-configure/SKILL.md +44 -107
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
- package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
- package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
- package/skills/service-e911-configure/SKILL.md +242 -0
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
- package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
- package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
- package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
- package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
- package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
- package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
- package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
- package/skills/experience-content-media-image-generate/SKILL.md +0 -83
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
- package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"definition": "tile/widget",
|
|
3
|
-
"children": [
|
|
4
|
-
{
|
|
5
|
-
"definition": "tile/container",
|
|
6
|
-
"attributes": {
|
|
7
|
-
"id": "dx-lifecycle-center--connect-sign-in--v1",
|
|
8
|
-
"label": "Lifecycle Center connection"
|
|
9
|
-
},
|
|
10
|
-
"children": [
|
|
11
|
-
{
|
|
12
|
-
"definition": "tile/text",
|
|
13
|
-
"attributes": {
|
|
14
|
-
"text": "Sign in to Lifecycle Center",
|
|
15
|
-
"variant": "h3"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"definition": "tile/spacer",
|
|
20
|
-
"attributes": {
|
|
21
|
-
"size": "sm"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"definition": "tile/text",
|
|
26
|
-
"attributes": {
|
|
27
|
-
"text": "Sign in to your Lifecycle Center org as a user with the DevOps Center User permission set, allow access, and confirm access when your working org asks. Then come back here and reply done."
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"definition": "tile/spacer",
|
|
32
|
-
"attributes": {
|
|
33
|
-
"size": "md"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"definition": "tile/button",
|
|
38
|
-
"attributes": {
|
|
39
|
-
"label": "Connect to Lifecycle Center org",
|
|
40
|
-
"variant": "primary",
|
|
41
|
-
"actions": {
|
|
42
|
-
"click": [
|
|
43
|
-
{
|
|
44
|
-
"definition": "action/openLink",
|
|
45
|
-
"attributes": {
|
|
46
|
-
"url": "{!$attrs.signInUrl}",
|
|
47
|
-
"target": "_blank"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"title": "Connect to Lifecycle Center org",
|
|
4
|
-
"description": "Sign-in card: a heading, the steps to follow, and one button that opens the Lifecycle Center sign-in page in a new tab.",
|
|
5
|
-
"properties": {
|
|
6
|
-
"attributes": {
|
|
7
|
-
"lightning:type": "lightning__objectType",
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"required": [
|
|
10
|
-
"signInUrl"
|
|
11
|
-
],
|
|
12
|
-
"properties": {
|
|
13
|
-
"signInUrl": {
|
|
14
|
-
"lightning:type": "lightning__multilineTextType",
|
|
15
|
-
"title": "Sign-in URL",
|
|
16
|
-
"description": "The redirectUrl from the setupNamedCredential POST after the & fix, unmodified."
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Check a filled widget tree against the chat-card v1 rules before widget.sh prints it.
|
|
2
|
-
# Prints nothing when the card may be shown, otherwise one line, "<reason>: <detail>".
|
|
3
|
-
# root a bare tile/widget with one tile/container child, id "<skill>--<card>--v<N>"
|
|
4
|
-
# tiles only the tiles in allowed; a node has only definition, attributes and children
|
|
5
|
-
# action only a button has actions: one click, either action/openLink (an allowed URL,
|
|
6
|
-
# target _blank) or action/sendMessage (literal text, 1-2000 characters)
|
|
7
|
-
# url https, a host that is or ends in salesforce.com, force.com or salesforce.mil, no spaces,
|
|
8
|
-
# no "&" left in it
|
|
9
|
-
# table 1-6 plain columns (no link or typed columns), at most 25 rows of text cells
|
|
10
|
-
# secret no session id, access or refresh token, OAuth code or bearer token anywhere
|
|
11
|
-
# expr no "{!" anywhere: a card is literal, nothing is left for a renderer to evaluate
|
|
12
|
-
# limits at most 80 nodes and depth 8 (widget.sh checks the size)
|
|
13
|
-
# Usage: jq -r -f card-policy.jq <filled tree> (add --arg all 1 to list every problem)
|
|
14
|
-
def allowed: ["tile/container", "tile/column", "tile/row", "tile/text", "tile/badge", "tile/icon",
|
|
15
|
-
"tile/separator", "tile/spacer", "tile/table", "tile/list", "tile/listItem", "tile/callout",
|
|
16
|
-
"tile/progress", "tile/code", "tile/button"];
|
|
17
|
-
def allowed_url: type == "string" and length <= 2000 and (test("\\s") | not) and (contains("&") | not)
|
|
18
|
-
and test("^https://([A-Za-z0-9-]+\\.)*(salesforce\\.com|force\\.com|salesforce\\.mil)(:[0-9]+)?([/?#]|$)");
|
|
19
|
-
def secret: test("[?&#](sid|access_token|refresh_token|code)=|00D[A-Za-z0-9]{12,15}![A-Za-z0-9._-]{16,}|Bearer\\s+[A-Za-z0-9._~+/-]{16,}"; "i");
|
|
20
|
-
def nodes: .children[]? | recurse(.children[]?);
|
|
21
|
-
def depth: if ((.children // []) | length) == 0 then 0 else 1 + ([.children[] | depth] | max) end;
|
|
22
|
-
def action_problems:
|
|
23
|
-
if .attributes.actions == null then
|
|
24
|
-
if .definition == "tile/button" then "action: a button needs attributes.actions.click" else empty end
|
|
25
|
-
elif .definition != "tile/button" then "action: only tile/button may have actions"
|
|
26
|
-
elif (.attributes.actions | type) != "object" or (.attributes.actions | keys) != ["click"]
|
|
27
|
-
or (.attributes.actions.click | type) != "array" or (.attributes.actions.click | length) != 1
|
|
28
|
-
then "action: a button needs exactly one click action"
|
|
29
|
-
else .attributes.actions.click[0] as $a
|
|
30
|
-
| if $a.definition == "action/openLink" then
|
|
31
|
-
if ($a.attributes.url | allowed_url) | not then "url: an openLink URL is not https on a Salesforce host, or still has &"
|
|
32
|
-
elif $a.attributes.target != "_blank" then "action: openLink must open a new tab (_blank)"
|
|
33
|
-
else empty end
|
|
34
|
-
elif $a.definition == "action/sendMessage" then
|
|
35
|
-
if ($a.attributes.content | type) != "string" or ($a.attributes.content | length) < 1
|
|
36
|
-
or ($a.attributes.content | length) > 2000
|
|
37
|
-
then "action: sendMessage needs 1-2000 characters of text" else empty end
|
|
38
|
-
else "action: \($a.definition) is not allowed" end
|
|
39
|
-
end;
|
|
40
|
-
def table_problems:
|
|
41
|
-
if .definition != "tile/table" then empty else .attributes as $t
|
|
42
|
-
| (if ($t.columns | type) != "array" or ($t.columns | length) < 1 or ($t.columns | length) > 6
|
|
43
|
-
then "table: 1-6 columns" else empty end),
|
|
44
|
-
(if [$t.columns[]? | select(type != "object" or .columnType != null)] != []
|
|
45
|
-
then "table: no link or typed columns" else empty end),
|
|
46
|
-
(if ($t.rows | type) != "array" or ($t.rows | length) > 25 then "table: at most 25 rows" else empty end),
|
|
47
|
-
(if [$t.rows[]? | select(type != "object" or ([.[] | select(type != "string")] != []))] != []
|
|
48
|
-
then "table: every row is an object of text cells" else empty end)
|
|
49
|
-
end;
|
|
50
|
-
def node_problems:
|
|
51
|
-
if type != "object" then "tiles: a child is not a tile"
|
|
52
|
-
else
|
|
53
|
-
(keys - ["definition", "attributes", "children"]) as $extra
|
|
54
|
-
| (if $extra != [] then "tiles: \(.definition) has \($extra | join(", "))" else empty end),
|
|
55
|
-
(.definition as $d | if any(allowed[]; . == $d) then empty else "tiles: \($d // "a node with no definition") is not allowed" end),
|
|
56
|
-
action_problems, table_problems
|
|
57
|
-
end;
|
|
58
|
-
|
|
59
|
-
[ (if .definition != "tile/widget" or (keys - ["definition", "children"]) != []
|
|
60
|
-
or (.children | length) != 1 or .children[0].definition != "tile/container"
|
|
61
|
-
or ((.children[0].attributes.id // "") | test("^[a-z0-9-]+--[a-z0-9-]+--v[0-9]+$") | not)
|
|
62
|
-
then "root: a bare tile/widget with one tile/container, id <skill>--<card>--v<N>" else empty end),
|
|
63
|
-
(nodes | node_problems),
|
|
64
|
-
([nodes] | length | if . > 80 then "limits: \(.) nodes, more than 80" else empty end),
|
|
65
|
-
(depth | if . > 8 then "limits: depth \(.), more than 8" else empty end),
|
|
66
|
-
([.. | strings | select(secret)] | length | if . > 0 then "secret: \(.) value(s) look like a session id or token" else empty end),
|
|
67
|
-
([.. | strings | select(test("\\{!"))] | length | if . > 0 then "expr: \(.) value(s) contain {!" else empty end)
|
|
68
|
-
]
|
|
69
|
-
| if length == 0 then empty
|
|
70
|
-
elif $ARGS.named.all != null then join("; ")
|
|
71
|
-
else .[0] + (if length > 1 then " (and \(length - 1) more)" else "" end) end
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Fill an HXL widget template (<name>.json) with the values in $attrs, the way
|
|
2
|
-
# mosaic-json-core evaluates the same bindings, so the result has no expressions left:
|
|
3
|
-
# "{!$attrs.k}" as the whole string -> the value itself, any JSON type
|
|
4
|
-
# "... {!$attrs.k} ..." inside a string -> the value as text
|
|
5
|
-
# "meta": {"if": "{!$attrs.k}"} -> the node stays only when k is true
|
|
6
|
-
# Any other expression or meta key, a missing attr, or a "{!" in a value is an error.
|
|
7
|
-
# A v68.0 envelope ({"type": "lightning__agentforceWidget", "contentBody": {"widgetBody": ...}})
|
|
8
|
-
# is unwrapped first, so the result is always the bare tile/widget tree.
|
|
9
|
-
# Usage: jq -c --argjson attrs '<json object>' -f fill-widget.jq <name>.json
|
|
10
|
-
def binding: "\\{!\\$attrs\\.(?<k>[A-Za-z0-9_]+)\\}";
|
|
11
|
-
def attr($k): if $attrs | has($k) then $attrs[$k] else error("missing attr: \($k)") end;
|
|
12
|
-
def fill:
|
|
13
|
-
if test("^" + binding + "$") then attr(capture("^" + binding + "$").k)
|
|
14
|
-
else gsub(binding; attr(.k) | tostring) end;
|
|
15
|
-
def keep:
|
|
16
|
-
if (.meta | type) != "object" then true
|
|
17
|
-
elif (.meta | keys) != ["if"] then error("unsupported meta: \(.meta | keys | join(","))")
|
|
18
|
-
elif (.meta.if | type) == "string" then (.meta.if | fill) == true
|
|
19
|
-
else .meta.if == true end;
|
|
20
|
-
def prune: if (.children | type) == "array" then .children |= map(select(keep) | prune) else . end;
|
|
21
|
-
|
|
22
|
-
(if .type == "lightning__agentforceWidget" then .contentBody.widgetBody else . end)
|
|
23
|
-
| if [.. | strings | select(gsub(binding; "") | test("\\{!"))] != [] then error("unsupported expression in template")
|
|
24
|
-
elif .meta != null then error("meta is not allowed on the root")
|
|
25
|
-
else . end
|
|
26
|
-
| prune
|
|
27
|
-
| walk(if type == "object" and has("definition") then del(.meta) else . end)
|
|
28
|
-
| walk(if type == "string" then fill else . end)
|
|
29
|
-
| if [.. | strings | select(test("\\{!"))] != [] then error("a value contains {!") else . end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# Fill one of this skill's HXL widgets (assets/widgets/<name>/<name>.json), check it
|
|
3
|
-
# with card-policy.jq, and print one line for the chat:
|
|
4
|
-
# CARD_JSON {"nodes": <tree>} call render_widget once with exactly this JSON as its arguments
|
|
5
|
-
# CARD_UNAVAILABLE <reason> show no card; give the same facts in text instead
|
|
6
|
-
# Usage: widget.sh <name> '<attrs json>' (connect-org.md, Steps 2 and 5, hub mode)
|
|
7
|
-
# Always exits 0: the card is optional, the facts the other scripts print are not.
|
|
8
|
-
set -uo pipefail
|
|
9
|
-
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
10
|
-
NAME="${1:-}" ATTRS="${2:-}"
|
|
11
|
-
MAX_BYTES="${CARD_MAX_BYTES:-8192}"
|
|
12
|
-
TEMPLATE="$HERE/../assets/widgets/$NAME/$NAME.json"
|
|
13
|
-
unavailable() { echo "CARD_UNAVAILABLE $1"; exit 0; }
|
|
14
|
-
if ! [[ "$NAME" =~ ^[a-z0-9-]+$ ]] || [ ! -f "$TEMPLATE" ]; then
|
|
15
|
-
unavailable "template: no widget named '$NAME'"
|
|
16
|
-
fi
|
|
17
|
-
if ! TREE=$(jq -c --argjson attrs "$ATTRS" -f "$HERE/fill-widget.jq" "$TEMPLATE" 2>&1); then
|
|
18
|
-
TREE=${TREE%%$'\n'*}
|
|
19
|
-
unavailable "fill: ${TREE##*): }"
|
|
20
|
-
fi
|
|
21
|
-
if ! PROBLEM=$(printf '%s' "$TREE" | jq -r -f "$HERE/card-policy.jq" 2>/dev/null); then
|
|
22
|
-
unavailable "policy: the check failed"
|
|
23
|
-
fi
|
|
24
|
-
[ -z "$PROBLEM" ] || unavailable "$PROBLEM"
|
|
25
|
-
ARGS=$(printf '%s' "$TREE" | jq -c '{nodes: .}')
|
|
26
|
-
BYTES=$(printf '%s' "$ARGS" | wc -c | tr -d ' ')
|
|
27
|
-
[ "$BYTES" -le "$MAX_BYTES" ] || unavailable "size: $BYTES bytes, more than $MAX_BYTES"
|
|
28
|
-
echo "CARD_JSON $ARGS"
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: experience-content-media-image-generate
|
|
3
|
-
description: "Generates high-fidelity visual assets, logos, and UI mockups using the media-management MCP server. Trigger this skill whenever the user asks to generate an image, create a logo, produce a hero banner, design a UI icon, or build a visual asset. It is explicitly designed to handle technical specifications including file formats (PNG, JPEG, WEBP), specific dimensions (e.g. 1024x1024), and transparency requirements. Use this skill when the user needs to integrate generated imagery into application code or web pages. It ensures consistent output quality and provides a standardized SVG fallback if the generation tool is unavailable."
|
|
4
|
-
metadata:
|
|
5
|
-
version: "1.0"
|
|
6
|
-
domains: ["Experience"]
|
|
7
|
-
cliTools:
|
|
8
|
-
- tool: ["jq"]
|
|
9
|
-
semver: ">=1.6.0"
|
|
10
|
-
- tool: ["sf"]
|
|
11
|
-
semver: ">=2.0.0"
|
|
12
|
-
mcpTools:
|
|
13
|
-
media-management:
|
|
14
|
-
tools: ["create_image"]
|
|
15
|
-
semver: ">=1.0.0"
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
# Generating Images
|
|
19
|
-
|
|
20
|
-
## Goal
|
|
21
|
-
|
|
22
|
-
To programmatically generate, download, and preview visual assets requested by the user, ensuring specific format and quality standards are met while providing a robust fallback mechanism.
|
|
23
|
-
|
|
24
|
-
## Workflow
|
|
25
|
-
|
|
26
|
-
1. Check if the `media-management` MCP server is configured and its `create_image` tool is available.
|
|
27
|
-
2. If available, use `create_image` to generate the image.
|
|
28
|
-
3. If not available, use the placeholder fallback below.
|
|
29
|
-
|
|
30
|
-
## MCP: media-management
|
|
31
|
-
|
|
32
|
-
**Tool:** `create_image`
|
|
33
|
-
|
|
34
|
-
Check your available tools. If `create_image` is present, use it as the primary image generation method — pass the natural language prompt and applicable parameters from the table below. (`media-management` here refers to the MCP server name, not this skill.)
|
|
35
|
-
|
|
36
|
-
If `create_image` is not in your tool list, the `media-management` MCP is not configured — use the placeholder fallback below.
|
|
37
|
-
|
|
38
|
-
## Image Generation Parameters
|
|
39
|
-
|
|
40
|
-
Use these defaults unless the user specifies otherwise:
|
|
41
|
-
|
|
42
|
-
| Parameter | Default | Options |
|
|
43
|
-
|---|---|---|
|
|
44
|
-
| `model` | `Standard` | `Standard`, `Premium` |
|
|
45
|
-
| `size` | `auto` | `auto`, `1024x1024`, `1536x1024`, `1024x1536` (pick closest to user-requested size) |
|
|
46
|
-
| `quality` | `medium` | `low`, `medium`, `high` |
|
|
47
|
-
| `outputCompression` | `75` | `0–100` (webp/jpeg only) |
|
|
48
|
-
| `outputFormat` | `webp` | `webp`, `jpeg`, `png` |
|
|
49
|
-
| `background` | `auto` | `auto`, `transparent`, `opaque` |
|
|
50
|
-
|
|
51
|
-
**Format rule:** If `outputFormat` is `png`, set `outputCompression` to `100`.
|
|
52
|
-
|
|
53
|
-
## After Successful Generation
|
|
54
|
-
|
|
55
|
-
Run `download-image.sh` (located in this skill's `scripts/` directory) to download and preview the image:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
bash scripts/download-image.sh \
|
|
59
|
-
--url "<image_url_from_response>" \
|
|
60
|
-
--id "<responseId>" \
|
|
61
|
-
--format "<outputFormat>" \
|
|
62
|
-
--preview
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The script handles credential retrieval, download, and VS Code preview. Pass `--output-dir <dir>` to override the default `generatedimages/` directory.
|
|
66
|
-
|
|
67
|
-
**Never resize or post-process the generated image with external tools.** To control display dimensions, use CSS properties (e.g. `width`, `height`, `object-fit`) at the point of use.
|
|
68
|
-
|
|
69
|
-
## Fallback: Use placeholder URL
|
|
70
|
-
|
|
71
|
-
If image generation fails or is not enabled, return the following URL as the image source — do not download it, do not save it locally:
|
|
72
|
-
|
|
73
|
-
```yaml
|
|
74
|
-
https://cdn.scs.static.lightning.force.com/content/assets/d5222d4a11e6c2b735152d7eea824ce4/placeholder.svg
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Use this URL directly wherever the image is referenced in code (e.g. as a `src` attribute or CSS `url()`).
|
|
78
|
-
|
|
79
|
-
## Placeholder Policy
|
|
80
|
-
|
|
81
|
-
There is only one placeholder URL. Do not download it, modify it, or generate alternative placeholders using Python, ImageMagick, or any other tool.
|
|
82
|
-
|
|
83
|
-
If the user requests a placeholder of a specific size or format, inform them that only this placeholder URL is available and direct them to use CSS properties (e.g. `width`, `height`, `object-fit`) to scale it at the point of use.
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
usage() {
|
|
5
|
-
cat <<EOF
|
|
6
|
-
Usage: $(basename "$0") --url <image_url> --id <response_id> --format <output_format> [--output-dir <dir>] [--preview]
|
|
7
|
-
|
|
8
|
-
Required:
|
|
9
|
-
--url URL of the generated image to download
|
|
10
|
-
--id Response ID used as the output filename
|
|
11
|
-
--format Output format (webp, jpeg, png)
|
|
12
|
-
|
|
13
|
-
Optional:
|
|
14
|
-
--output-dir Directory to save the image (default: generatedimages)
|
|
15
|
-
--preview Open the image in VS Code after download
|
|
16
|
-
EOF
|
|
17
|
-
exit 1
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
OUTPUT_DIR="generatedimages"
|
|
21
|
-
PREVIEW=false
|
|
22
|
-
URL=""
|
|
23
|
-
RESPONSE_ID=""
|
|
24
|
-
FORMAT=""
|
|
25
|
-
|
|
26
|
-
while [[ $# -gt 0 ]]; do
|
|
27
|
-
case "$1" in
|
|
28
|
-
--url) URL="$2"; shift 2 ;;
|
|
29
|
-
--id) RESPONSE_ID="$2"; shift 2 ;;
|
|
30
|
-
--format) FORMAT="$2"; shift 2 ;;
|
|
31
|
-
--output-dir) OUTPUT_DIR="$2"; shift 2 ;;
|
|
32
|
-
--preview) PREVIEW=true; shift ;;
|
|
33
|
-
*) usage ;;
|
|
34
|
-
esac
|
|
35
|
-
done
|
|
36
|
-
|
|
37
|
-
if [[ -z "$URL" || -z "$RESPONSE_ID" || -z "$FORMAT" ]]; then
|
|
38
|
-
usage
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
case "$FORMAT" in
|
|
42
|
-
webp|jpeg|png) ;;
|
|
43
|
-
*) echo "Error: invalid format '$FORMAT'. Must be webp, jpeg, or png." >&2; exit 1 ;;
|
|
44
|
-
esac
|
|
45
|
-
|
|
46
|
-
if [[ "$RESPONSE_ID" == */* || "$RESPONSE_ID" == *..* ]]; then
|
|
47
|
-
echo "Error: invalid response ID '$RESPONSE_ID'. Must not contain '/' or '..'." >&2
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
|
|
51
|
-
if [[ ! "$URL" =~ ^https:// ]]; then
|
|
52
|
-
echo "Error: URL must start with https://" >&2
|
|
53
|
-
exit 1
|
|
54
|
-
fi
|
|
55
|
-
|
|
56
|
-
TARGET_ORG=$(sf config get target-org --json | jq -r '.result[0].value')
|
|
57
|
-
|
|
58
|
-
if [[ -z "$TARGET_ORG" || "$TARGET_ORG" == "null" ]]; then
|
|
59
|
-
echo "Error: no target-org configured. Run 'sf config set target-org <org>'" >&2
|
|
60
|
-
exit 1
|
|
61
|
-
fi
|
|
62
|
-
|
|
63
|
-
ACCESS_TOKEN=$(sf org display --target-org "$TARGET_ORG" --json | jq -r '.result.accessToken')
|
|
64
|
-
|
|
65
|
-
if [[ -z "$ACCESS_TOKEN" || "$ACCESS_TOKEN" == "null" ]]; then
|
|
66
|
-
echo "Error: failed to retrieve access token for org '$TARGET_ORG'" >&2
|
|
67
|
-
exit 1
|
|
68
|
-
fi
|
|
69
|
-
|
|
70
|
-
mkdir -p "$OUTPUT_DIR"
|
|
71
|
-
|
|
72
|
-
OUTPUT_FILE="${OUTPUT_DIR}/${RESPONSE_ID}.${FORMAT}"
|
|
73
|
-
|
|
74
|
-
if ! curl -fsS -H "Authorization: Bearer $ACCESS_TOKEN" -o "$OUTPUT_FILE" -- "$URL"; then
|
|
75
|
-
rm -f "$OUTPUT_FILE"
|
|
76
|
-
echo "Error: failed to download image from $URL" >&2
|
|
77
|
-
exit 1
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
echo "$OUTPUT_FILE"
|
|
81
|
-
|
|
82
|
-
if [[ "$PREVIEW" == true ]]; then
|
|
83
|
-
code "$OUTPUT_FILE"
|
|
84
|
-
fi
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: experience-content-media-stock-image-search
|
|
3
|
-
description: "Searches for and downloads ethically-licensed stock images via the media-management MCP server. Use this skill whenever a user wants an image, photo, or picture — for BOTH requests to find existing imagery (\"find a stock image\", \"search for a photo of X\", \"get a royalty-free image\", \"find an ethical image\", editorial/news photography) AND requests phrased ambiguously as creating or generating one (\"create an image of a sunset\", \"generate a picture of a team meeting\", \"make me a mountain image\") — treat these as stock search requests, since this skill searches a stock photo library, it does not generate images. Do NOT offer alternative search methods or ask the user to pick one. Does not apply to searching internal CMS / Data Cloud media (use experience-search-coordinate). Does not apply when the user explicitly asks for AI-generated, synthetic, or computer-generated imagery — this skill only searches licensed stock photography and has no image-generation capability."
|
|
4
|
-
metadata:
|
|
5
|
-
version: "1.0"
|
|
6
|
-
domains: ["Experience"]
|
|
7
|
-
relatedSkills:
|
|
8
|
-
- "experience-search-coordinate"
|
|
9
|
-
cliTools:
|
|
10
|
-
- tool: ["python3"]
|
|
11
|
-
semver: ">=3.10.0"
|
|
12
|
-
- tool: ["sf"]
|
|
13
|
-
semver: ">=2.0.0"
|
|
14
|
-
mcpTools:
|
|
15
|
-
media-management:
|
|
16
|
-
tools:
|
|
17
|
-
- "download_stock_image"
|
|
18
|
-
- "search_stock_images"
|
|
19
|
-
semver: ">=1.0.0"
|
|
20
|
-
allowed-tools: |
|
|
21
|
-
mcp__media_management__search_stock_images
|
|
22
|
-
mcp__media_management__download_stock_image
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
# Stock Image Search
|
|
26
|
-
|
|
27
|
-
## When to Trigger This Skill
|
|
28
|
-
|
|
29
|
-
Trigger immediately — without asking the user to choose a search method — whenever the user wants an image, photo, or picture. This covers **both**:
|
|
30
|
-
|
|
31
|
-
- **Finding existing imagery:** "find a stock image", "search for a photo of X", "get a royalty-free image", "find an ethical image", editorial or news photography
|
|
32
|
-
- **Requests phrased ambiguously as creating or generating:** "create an image of a sunset", "generate a picture of a team meeting", "make me a mountain image" — treat these as stock search requests; this skill searches a stock photo library, it does not generate images.
|
|
33
|
-
|
|
34
|
-
In all of these cases, search the stock library — this is the tool for obtaining an image. **Do NOT offer alternative search methods** (hybrid search, user-provided URL/path, etc.) and **do NOT ask the user to pick one.**
|
|
35
|
-
|
|
36
|
-
**Does not apply to:**
|
|
37
|
-
- Searching internal CMS / Data Cloud media (use `experience-search-coordinate`)
|
|
38
|
-
- Requests that explicitly ask for AI-generated, synthetic, or computer-generated imagery — this skill only searches licensed stock photography and has no image-generation capability
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
## Step 1 — Search
|
|
43
|
-
|
|
44
|
-
**MCP tool:** `search_stock_images` (server: `media-management`)
|
|
45
|
-
**Timeout:** 30 seconds
|
|
46
|
-
|
|
47
|
-
| Parameter | Required | Default | Notes |
|
|
48
|
-
|--------------|----------|-------------|------------------------------------------------------------------------------------|
|
|
49
|
-
| `query` | ✅ Yes | — | Natural language search phrase (e.g. "sunset over ocean", "business meeting"), max 500 chars |
|
|
50
|
-
| `searchType` | No | `Creative` | `Creative` (royalty-free stock), `Editorial` (rights-managed news/event imagery) |
|
|
51
|
-
| `orientation`| No | _(none)_ | `Horizontal`, `Vertical`, `Square`, `PanoramicHorizontal`, `PanoramicVertical` |
|
|
52
|
-
| `sortOrder` | No | `BestMatch` | `BestMatch`, `MostPopular`, `Newest` |
|
|
53
|
-
| `pageSize` | No | `5` | 1–100 |
|
|
54
|
-
| `page` | No | `1` | 1-indexed, must be >= 1 |
|
|
55
|
-
|
|
56
|
-
**Smart keyword extraction:** If the query is longer than 20 words or returns no results, the tool automatically extracts short keyword phrases via LLM and retries. The `effectiveQuery` field in the response shows what was actually sent to the search service (`null` if the original query was used unchanged).
|
|
57
|
-
|
|
58
|
-
**Response fields:**
|
|
59
|
-
|
|
60
|
-
| Field | Notes |
|
|
61
|
-
|-------------------|----------------------------------------------------------------------------------------------|
|
|
62
|
-
| `images[]` | List of results (see item fields below) |
|
|
63
|
-
| `totalCount` | Total matches across all pages |
|
|
64
|
-
| `page` | Current page (1-indexed) |
|
|
65
|
-
| `pageSize` | Results per page |
|
|
66
|
-
| `searchRequestId` | Internal correlation ID. Server-managed; not passed back through the MCP download tool. Safe to surface in debug output if useful. |
|
|
67
|
-
| `effectiveQuery` | Keywords actually sent to the search service. Null if the original query was used unchanged. |
|
|
68
|
-
| `errorMessage` | Non-null if the search failed |
|
|
69
|
-
|
|
70
|
-
**Each `images[]` item:**
|
|
71
|
-
|
|
72
|
-
| Field | Notes |
|
|
73
|
-
|----------------|----------------------------------------------------------------------|
|
|
74
|
-
| `assetId` | Stock asset ID — required for download. Safe to display alongside the result if useful. |
|
|
75
|
-
| `title` | Image title |
|
|
76
|
-
| `caption` | Image description |
|
|
77
|
-
| `thumbnailUrl` | Small preview URL — use for grid display |
|
|
78
|
-
| `previewUrl` | Larger comp/preview URL — use for tile display |
|
|
79
|
-
| `width` | Max width in pixels |
|
|
80
|
-
| `height` | Max height in pixels |
|
|
81
|
-
| `licenseModel` | e.g. `royaltyfree`, `rightsmanaged` |
|
|
82
|
-
| `artist` | Contributor/artist name |
|
|
83
|
-
| `collection` | Collection name |
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Step 2 — Present Results, then STOP
|
|
88
|
-
|
|
89
|
-
Render a numbered list with an inline thumbnail for each result, using `thumbnailUrl` for the image and `previewUrl` as the click-through link (clicking the thumbnail opens the full preview in the browser):
|
|
90
|
-
|
|
91
|
-
```text
|
|
92
|
-
1. [](<previewUrl>)
|
|
93
|
-
**<title>** — <artist>, <width>×<height>, <licenseModel>
|
|
94
|
-
2. ...
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
This is standard markdown image-in-link syntax (`[](previewUrl)`) — it renders an actual thumbnail, not just a text link, and clicking it navigates to `previewUrl`. If a client doesn't render markdown images, this degrades gracefully to a linked title.
|
|
98
|
-
|
|
99
|
-
Prefix the list with `Searched for: <effectiveQuery>` only if `effectiveQuery` is non-null and differs from the user's original query.
|
|
100
|
-
|
|
101
|
-
**End the turn here. Do not auto-download, do not write files, do not ask a follow-up question.** Agentforce injects its own selection UI — a question or auto-select causes a duplicate "double ask". Do not pick a result on behalf of the user.
|
|
102
|
-
|
|
103
|
-
**Non-interactive mode** (scheduled/headless, no user present): pick `images[0]` from the results and note the auto-selection in the report. Then proceed directly to Step 3.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Step 3 — Download (billed)
|
|
108
|
-
|
|
109
|
-
⚠️ **Each call licenses the image and spends a stock-image download credit. Only invoke after the user explicitly selects an image (or in non-interactive mode, as noted above).**
|
|
110
|
-
|
|
111
|
-
**Before calling `download_stock_image`, verify:**
|
|
112
|
-
- [ ] User has explicitly named or numbered the image they want (or non-interactive mode is confirmed)
|
|
113
|
-
- [ ] This is not an automatic retry of a previous download
|
|
114
|
-
|
|
115
|
-
**MCP tool:** `download_stock_image` (server: `media-management`)
|
|
116
|
-
**Timeout:** 60 seconds
|
|
117
|
-
|
|
118
|
-
| Parameter | Required | Default | Notes |
|
|
119
|
-
|-------------|----------|---------|----------------------------------------------------------------------------------------------------|
|
|
120
|
-
| `assetId` | ✅ Yes | — | Stock asset ID from the prior `search_stock_images` result, max 50 chars |
|
|
121
|
-
| `size` | No | `comp` | `comp` (web-quality composite, default), `medium_jpg`, `largest` (full res, can exceed 100 MB), max 50 chars |
|
|
122
|
-
|
|
123
|
-
Use `largest` only when the user explicitly asks for full/original resolution.
|
|
124
|
-
|
|
125
|
-
**Response fields:**
|
|
126
|
-
|
|
127
|
-
| Field | Notes |
|
|
128
|
-
|------------------------------|-----------------------------------------------------------------------|
|
|
129
|
-
| `assetId` | Stock asset ID that was downloaded |
|
|
130
|
-
| `managedContentBodyId` | Salesforce record ID where image bytes are stored |
|
|
131
|
-
| `parentContentGenAiOutputId` | Record tracking the download request |
|
|
132
|
-
| `childContentGenAiOutputId` | Record linking the request to the persisted body |
|
|
133
|
-
| `byteCount` | Size of the persisted image in bytes |
|
|
134
|
-
| `format` | Resolved image format (e.g. `jpg`, `png`, `eps`, `tiff`, `svg`) |
|
|
135
|
-
| `url` | **URL to the persisted image** — use this to download or preview it |
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Step 4 — Download to Client and Preview
|
|
140
|
-
|
|
141
|
-
After a successful `download_stock_image` call, download the image locally and open it in VS Code.
|
|
142
|
-
|
|
143
|
-
**You MUST use `download-stock-image.py` for this. Do not use `curl`, `wget`, or any other tool.**
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
python3 scripts/download-stock-image.py \
|
|
147
|
-
--url "<url from download response>" \
|
|
148
|
-
--id "<assetId>" \
|
|
149
|
-
--format "<format from download response>" \
|
|
150
|
-
--preview
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
The script retrieves org credentials via the `sf` CLI (`sf config get target-org` and `sf org auth show-access-token`), downloads the image with `Authorization: Bearer <accessToken>` to `stockimages/<assetId>.<format>`, and opens it in VS Code if `--preview` is passed.
|
|
154
|
-
|
|
155
|
-
Pass `--output-dir <path>` to override the default `stockimages/` directory.
|
|
156
|
-
|
|
157
|
-
**Never resize or post-process the image.** Use CSS (`width`, `height`, `object-fit`) to control display dimensions.
|
|
158
|
-
|
|
159
|
-
**Vector/binary formats (`eps`, `tiff`):** always pass the exact `format` returned by the download response — never substitute a format like `jpg` to work around a validation error; the file bytes won't match the extension and the file will appear corrupted. VS Code cannot render `eps`/`tiff` previews, so the script skips `--preview` for those formats automatically and still reports the saved path.
|
|
160
|
-
|
|
161
|
-
---
|
|
162
|
-
|
|
163
|
-
## Step 5 — Report Back
|
|
164
|
-
|
|
165
|
-
After a successful download, tell the user:
|
|
166
|
-
- Image title and artist
|
|
167
|
-
- Local path to the saved image (printed by the script)
|
|
168
|
-
- `managedContentBodyId`
|
|
169
|
-
- Attribution: `{artist} · {collection}` (use the attribution string returned by the download response when present)
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## Fallbacks & Errors
|
|
174
|
-
|
|
175
|
-
| Situation | Action |
|
|
176
|
-
|------------------------------------|------------------------------------------------------------------------------|
|
|
177
|
-
| `errorMessage` non-null in search | Show it; suggest a simpler query or different `searchType`/`orientation` |
|
|
178
|
-
| `images` empty | Suggest broader keywords; try switching `Editorial` vs `Creative` |
|
|
179
|
-
| `effectiveQuery` differs | Inform user what the search service actually received |
|
|
180
|
-
| MCP tools unavailable | Use the placeholder URL below — do not download or save |
|
|
181
|
-
| Download fails | Show error; do NOT retry automatically — confirm with user first (each retry is billed) |
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## Placeholder
|
|
186
|
-
|
|
187
|
-
If `search_stock_images` and `download_stock_image` are both unavailable, use this URL directly as `src` or CSS `url()`:
|
|
188
|
-
|
|
189
|
-
```text
|
|
190
|
-
https://cdn.scs.static.lightning.force.com/content/assets/d5222d4a11e6c2b735152d7eea824ce4/placeholder.svg
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
**Placeholder policy:** There is only one placeholder URL. Do not download it, modify it, or generate alternative placeholders using Python, ImageMagick, or any other tool. If the user asks for a placeholder of a specific size or format, tell them only this URL is available and direct them to use CSS to scale it at the point of use.
|