@salesforce/afv-skills 1.68.0 → 1.70.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 (284) hide show
  1. package/package.json +1 -1
  2. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  3. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  7. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  8. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  9. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  10. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  11. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  12. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  27. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  28. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  29. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  30. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  31. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  32. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  33. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  34. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  35. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  36. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  37. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  40. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  45. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  55. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +23 -31
  56. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +2 -1
  57. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +118 -2
  58. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +2 -2
  59. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +9 -2
  60. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +12 -1
  61. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  62. package/skills/data360-code-extension-generate/SKILL.md +160 -252
  63. package/skills/data360-code-extension-generate/references/README.md +34 -172
  64. package/skills/data360-code-extension-generate/references/environment-setup.md +198 -0
  65. package/skills/data360-code-extension-generate/references/mcp-integration.md +36 -0
  66. package/skills/data360-code-extension-generate/references/quick-reference.md +132 -202
  67. package/skills/data360-code-extension-generate/references/run-logs.md +31 -0
  68. package/skills/data360-code-extension-generate/references/schema-discovery.md +45 -0
  69. package/skills/data360-code-extension-generate/references/troubleshooting.md +45 -0
  70. package/skills/data360-code-extension-generate/scripts/check_env.sh +197 -0
  71. package/skills/data360-code-extension-generate/scripts/venv_hook.sh +22 -0
  72. package/skills/dx-devops-work-item-manage/SKILL.md +24 -8
  73. package/skills/dx-devops-work-item-manage/examples/common-workflows.md +32 -0
  74. package/skills/dx-devops-work-item-manage/references/review-api.md +95 -0
  75. package/skills/dx-lifecycle-center/SKILL.md +24 -18
  76. package/skills/dx-lifecycle-center/examples/workflows.md +57 -34
  77. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  78. package/skills/dx-lifecycle-center/references/connect-org.md +59 -28
  79. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  80. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  81. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  82. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  83. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  84. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  85. package/skills/dx-org-manage/SKILL.md +12 -12
  86. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +1 -3
  87. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +1 -3
  88. package/skills/dx-org-manage/references/opening-org.md +1 -1
  89. package/skills/dx-org-manage/references/scratch-org-operations.md +15 -20
  90. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  91. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  92. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +3 -4
  93. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +10 -7
  94. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  95. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  96. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  97. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  98. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  99. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  100. package/skills/education-cloud-academic-calendar-generate/SKILL.md +2 -2
  101. package/skills/education-cloud-course-catalog-migrate/SKILL.md +1 -1
  102. package/skills/education-cloud-domain-configure/references/domain-features/recruitment-admissions.md +8 -7
  103. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -0
  104. package/skills/education-cloud-multi-campus-configure/references/error_handling.md +7 -6
  105. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +2 -0
  106. package/skills/education-cloud-student-recruitment-agent-configure/references/customer-narration.md +2 -0
  107. package/skills/education-cloud-student-recruitment-agent-configure/references/flows.md +1 -1
  108. package/skills/education-cloud-student-recruitment-agent-configure/references/grounding.md +5 -4
  109. package/skills/education-cloud-student-recruitment-agent-configure/references/permissions.md +1 -1
  110. package/skills/education-cloud-student-recruitment-agent-configure/references/prerequisites.md +1 -1
  111. package/skills/education-cloud-student-recruitment-agent-configure/references/routing.md +1 -1
  112. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  113. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  114. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  115. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  116. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  117. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  118. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  119. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  120. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  121. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  122. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  123. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  124. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  125. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  126. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  127. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  128. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  129. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  130. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  131. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  132. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  133. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  134. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  135. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  136. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  137. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  138. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  139. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  140. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  141. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  142. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  143. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  144. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  145. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  146. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  147. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  148. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  149. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  150. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  151. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  152. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  153. package/skills/experience-cms-content-type-generate/SKILL.md +8 -7
  154. package/skills/experience-cms-content-type-generate/references/agent-checklist.md +3 -3
  155. package/skills/experience-cms-content-type-generate/references/anti-patterns.md +2 -2
  156. package/skills/experience-cms-content-type-generate/references/discovery-details.md +1 -1
  157. package/skills/experience-cms-content-type-generate/references/retrieve-and-reconcile.md +5 -9
  158. package/skills/experience-ui-bundle-custom-app-generate/scripts/resolve-uibundle-path.mjs +10 -0
  159. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +2 -2
  160. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +2 -2
  161. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +1 -1
  162. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1 -1
  163. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +2 -2
  164. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +2 -2
  165. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  166. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  167. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  168. package/skills/platform-custom-application-generate/SKILL.md +97 -104
  169. package/skills/platform-custom-application-generate/references/app-properties.md +52 -0
  170. package/skills/platform-custom-application-generate/references/app-visibility.md +19 -0
  171. package/skills/platform-custom-application-generate/references/utility-bar.md +55 -0
  172. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  173. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  174. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  175. package/skills/platform-datamask-run/SKILL.md +1 -1
  176. package/skills/platform-datamask-run/references/policy-authoring.md +41 -18
  177. package/skills/platform-dataspace-access-configure/SKILL.md +25 -10
  178. package/skills/platform-dsar-policy-manage/SKILL.md +7 -6
  179. package/skills/platform-dsar-policy-manage/references/export-and-history.md +10 -8
  180. package/skills/platform-dsar-policy-manage/references/report-format.md +4 -2
  181. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  182. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  183. package/skills/platform-metadata-grounding-get/SKILL.md +7 -7
  184. package/skills/platform-policy-rule-generate/SKILL.md +9 -7
  185. package/skills/platform-policy-rule-generate/references/condition-model.md +3 -3
  186. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +9 -1
  187. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +9 -1
  188. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +1 -2
  189. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +1 -2
  190. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +1 -2
  191. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +1 -2
  192. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +1 -0
  193. package/skills/platform-policy-rule-generate/references/headless-transport.md +2 -2
  194. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +1 -1
  195. package/skills/platform-policy-rule-generate/references/policy-shapes.md +33 -0
  196. package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
  197. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +5 -5
  198. package/skills/platform-report-generate/SKILL.md +29 -8
  199. package/skills/platform-report-generate/references/column-names.md +12 -1
  200. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  201. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  202. package/skills/platform-report-generate/references/verification-checklist.md +12 -0
  203. package/skills/platform-sharing-rules-generate/SKILL.md +12 -3
  204. package/skills/platform-sharing-rules-generate/references/rule-types.md +1 -0
  205. package/skills/service-agentforce-channel-configure/SKILL.md +6 -3
  206. package/skills/service-agentforce-channel-configure/references/agent-wiring.md +5 -3
  207. package/skills/service-agentforce-channel-configure/references/channel-branch-email.md +24 -15
  208. package/skills/service-agentforce-channel-configure/references/input-validation.md +23 -0
  209. package/skills/service-agentforce-channel-configure/references/live-traffic-gate.md +13 -7
  210. package/skills/service-agentforce-channel-configure/references/queue-resolution.md +3 -1
  211. package/skills/service-agentforce-human-escalation-configure/references/_vendored/input-validation.md +23 -0
  212. package/skills/service-agentforce-human-escalation-configure/references/_vendored/queue-resolution.md +146 -0
  213. package/skills/service-agentforce-human-escalation-configure/references/escalation-mechanism.md +1 -1
  214. package/skills/service-agentforce-human-escalation-configure/scripts/tests/_bootstrap.py +42 -11
  215. package/skills/service-agentforce-human-escalation-configure/scripts/tests/test_escalation_contracts.py +45 -0
  216. package/skills/service-agentforce-human-escalation-configure/scripts/verify-and-configure.sh +23 -9
  217. package/skills/service-de-channel-activate/SKILL.md +10 -10
  218. package/skills/service-de-channel-activate/references/gotchas.md +4 -4
  219. package/skills/service-de-channel-activate/references/phone-verification.md +43 -19
  220. package/skills/service-de-channel-create/SKILL.md +1 -1
  221. package/skills/service-de-channel-create/references/facebook.md +1 -1
  222. package/skills/service-de-channel-create/references/whatsapp.md +33 -6
  223. package/skills/service-de-channel-routing-configure/SKILL.md +5 -1
  224. package/skills/service-de-channel-routing-configure/references/gotchas.md +3 -1
  225. package/skills/service-de-channel-routing-configure/references/named-queue.md +39 -0
  226. package/skills/service-de-channel-settings-configure/SKILL.md +3 -1
  227. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +2 -2
  228. package/skills/service-de-channel-settings-configure/references/gotchas.md +12 -1
  229. package/skills/service-de-headless-channel-configure/SKILL.md +68 -74
  230. package/skills/service-de-headless-channel-configure/references/gotchas.md +6 -2
  231. package/skills/service-de-headless-channel-configure/references/inputs.md +19 -0
  232. package/skills/service-de-headless-channel-configure/references/output-envelopes.md +23 -1
  233. package/skills/service-de-headless-channel-configure/references/partial-success.md +1 -0
  234. package/skills/service-de-headless-channel-configure/references/requested-settings.md +55 -0
  235. package/skills/service-de-headless-channel-configure/references/worked-examples.md +35 -1
  236. package/skills/service-digital-engagement-channel-configure/SKILL.md +45 -108
  237. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +2 -0
  238. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  239. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  240. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  241. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  242. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +18 -14
  243. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +17 -21
  244. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  245. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  246. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  247. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  248. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  249. package/skills/service-digital-engagement-deployment-configure/SKILL.md +2 -2
  250. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +4 -2
  251. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +1 -1
  252. package/skills/service-e911-configure/SKILL.md +242 -0
  253. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  254. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  255. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  256. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  257. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  258. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  259. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  260. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  261. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  262. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  263. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  264. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  265. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  266. package/skills/service-omni-command-center-configure/SKILL.md +1 -1
  267. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  268. package/skills/data360-schema-get/SKILL.md +0 -388
  269. package/skills/data360-schema-get/references/README.md +0 -191
  270. package/skills/data360-schema-get/scripts/get_dlo_schema.py +0 -244
  271. package/skills/data360-schema-get/scripts/get_dmo_schema.py +0 -233
  272. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/connect-connected.json +0 -65
  273. package/skills/dx-lifecycle-center/assets/widgets/connect-connected/schema.json +0 -32
  274. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/connect-sign-in.json +0 -57
  275. package/skills/dx-lifecycle-center/assets/widgets/connect-sign-in/schema.json +0 -21
  276. package/skills/dx-lifecycle-center/scripts/card-policy.jq +0 -71
  277. package/skills/dx-lifecycle-center/scripts/fill-widget.jq +0 -29
  278. package/skills/dx-lifecycle-center/scripts/widget.sh +0 -28
  279. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  280. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  281. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  282. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
  283. package/skills/field-service-prework-brief-deployer-configure/SKILL.md +0 -646
  284. package/skills/field-service-voice-to-form-configure/SKILL.md +0 -650
@@ -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 "&amp;" 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("&amp;") | 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 &amp;"
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. [![<title>](<thumbnailUrl>)](<previewUrl>)
93
- **<title>** — <artist>, <width>×<height>, <licenseModel>
94
- 2. ...
95
- ```
96
-
97
- This is standard markdown image-in-link syntax (`[![alt](thumbnailUrl)](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.
@@ -1,102 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Download a licensed stock image to the local filesystem using org credentials.
4
-
5
- Usage:
6
- python3 download-stock-image.py --url <image_url> --id <asset_id> --format <output_format> [--output-dir <dir>] [--preview]
7
- """
8
-
9
- import argparse
10
- import json
11
- import subprocess
12
- import sys
13
- import urllib.error
14
- import urllib.request
15
- from pathlib import Path
16
-
17
- ALLOWED_FORMATS = {"jpg", "jpeg", "png", "webp", "gif", "eps", "svg", "tiff", "tif"}
18
-
19
- # Formats VS Code can render in its built-in image preview. EPS/TIFF are
20
- # binary formats VS Code can't display — opening them shows a "damaged file"
21
- # error even though the download is fine, so --preview is skipped for these.
22
- PREVIEWABLE_FORMATS = {"jpg", "jpeg", "png", "webp", "gif", "svg"}
23
-
24
-
25
- def run_sf_json(cmd: list[str]) -> dict:
26
- result = subprocess.run(cmd, capture_output=True, text=True)
27
- if result.returncode != 0:
28
- print(f"Error: command failed: {' '.join(cmd)}\n{result.stderr}", file=sys.stderr)
29
- sys.exit(1)
30
- try:
31
- return json.loads(result.stdout)
32
- except json.JSONDecodeError as e:
33
- print(f"Error: failed to parse JSON from {' '.join(cmd)}: {e}", file=sys.stderr)
34
- sys.exit(1)
35
-
36
-
37
- def get_access_token() -> str:
38
- target_org_data = run_sf_json(["sf", "config", "get", "target-org", "--json"])
39
- target_org = (target_org_data.get("result") or [{}])[0].get("value")
40
- if not target_org:
41
- print("Error: no target-org configured", file=sys.stderr)
42
- sys.exit(1)
43
-
44
- token_data = run_sf_json(
45
- ["sf", "org", "auth", "show-access-token", "--target-org", target_org, "--no-prompt", "--json"]
46
- )
47
- access_token = (token_data.get("result") or {}).get("accessToken")
48
- if not access_token:
49
- print(f"Error: failed to retrieve access token for org '{target_org}'", file=sys.stderr)
50
- sys.exit(1)
51
- return access_token
52
-
53
-
54
- def main() -> None:
55
- parser = argparse.ArgumentParser(
56
- description="Download a licensed stock image using org credentials."
57
- )
58
- parser.add_argument("--url", required=True, help="URL of the licensed image to download")
59
- parser.add_argument("--id", required=True, dest="asset_id", help="Asset ID used as the output filename")
60
- parser.add_argument("--format", required=True, choices=sorted(ALLOWED_FORMATS), help="Image format")
61
- parser.add_argument("--output-dir", default="stockimages", help="Directory to save the image")
62
- parser.add_argument("--preview", action="store_true", help="Open the image in VS Code after download")
63
- args = parser.parse_args()
64
-
65
- if "/" in args.asset_id or ".." in args.asset_id:
66
- print(f"Error: invalid asset ID '{args.asset_id}'. Must not contain '/' or '..'.", file=sys.stderr)
67
- sys.exit(1)
68
-
69
- if not args.url.startswith("https://"):
70
- print("Error: URL must start with https://", file=sys.stderr)
71
- sys.exit(1)
72
-
73
- access_token = get_access_token()
74
-
75
- output_dir = Path(args.output_dir)
76
- output_dir.mkdir(parents=True, exist_ok=True)
77
- output_file = output_dir / f"{args.asset_id}.{args.format}"
78
-
79
- request = urllib.request.Request(
80
- args.url, headers={"Authorization": f"Bearer {access_token}"}
81
- )
82
- try:
83
- with urllib.request.urlopen(request) as response, open(output_file, "wb") as f:
84
- f.write(response.read())
85
- except (urllib.error.URLError, OSError) as e:
86
- print(f"Error: failed to download image from {args.url}: {e}", file=sys.stderr)
87
- sys.exit(1)
88
-
89
- print(output_file)
90
-
91
- if args.preview:
92
- if args.format in PREVIEWABLE_FORMATS:
93
- subprocess.run(["code", str(output_file)])
94
- else:
95
- print(
96
- f"Note: '{args.format}' is not previewable in VS Code; skipping --preview.",
97
- file=sys.stderr,
98
- )
99
-
100
-
101
- if __name__ == "__main__":
102
- main()