@salesforce/afv-skills 1.67.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.
Files changed (258) hide show
  1. package/README.md +55 -5
  2. package/package.json +1 -1
  3. package/skills/afcc-setup-coordinate/SKILL.md +348 -0
  4. package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
  5. package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
  6. package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
  7. package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
  8. package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
  9. package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
  10. package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
  11. package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
  12. package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
  13. package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
  14. package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
  15. package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
  16. package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
  17. package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
  18. package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
  19. package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
  20. package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
  21. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
  22. package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
  23. package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
  24. package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
  25. package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
  26. package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
  27. package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
  28. package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
  29. package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
  30. package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
  31. package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
  32. package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
  33. package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
  34. package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
  35. package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
  36. package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
  37. package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
  38. package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
  39. package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
  40. package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
  41. package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
  42. package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
  43. package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
  44. package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
  45. package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
  46. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
  47. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
  48. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
  49. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
  50. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
  51. package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
  52. package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
  53. package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
  54. package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
  55. package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
  56. package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
  57. package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
  58. package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
  59. package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
  60. package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
  61. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
  62. package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
  63. package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
  64. package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
  65. package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
  66. package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +140 -0
  67. package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +93 -0
  68. package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
  69. package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
  70. package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
  71. package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
  72. package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +354 -0
  73. package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
  74. package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
  75. package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
  76. package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
  77. package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
  78. package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +367 -379
  79. package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +23 -6
  80. package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +483 -796
  81. package/skills/commerce-react-storefront-create/SKILL.md +54 -21
  82. package/skills/dx-lifecycle-center/SKILL.md +22 -13
  83. package/skills/dx-lifecycle-center/examples/workflows.md +54 -17
  84. package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
  85. package/skills/dx-lifecycle-center/references/connect-org.md +62 -12
  86. package/skills/dx-lifecycle-center/references/deploy.md +3 -3
  87. package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
  88. package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
  89. package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
  90. package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
  91. package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
  92. package/skills/dx-org-devhub-configure/SKILL.md +85 -84
  93. package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
  94. package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
  95. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
  96. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
  97. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
  98. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +88 -0
  99. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +167 -0
  100. package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
  101. package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
  102. package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
  103. package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
  104. package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
  105. package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
  106. package/skills/dx-scratch-def-configure/SKILL.md +163 -0
  107. package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
  108. package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
  109. package/skills/dx-scratch-def-configure/references/features.json +3270 -0
  110. package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
  111. package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
  112. package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
  113. package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
  114. package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
  115. package/skills/education-cloud-domain-configure/SKILL.md +1 -1
  116. package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
  117. package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
  118. package/skills/experience-afv-analytics-query/SKILL.md +239 -0
  119. package/skills/experience-afv-analytics-query/references/references.md +176 -0
  120. package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
  121. package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
  122. package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
  123. package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
  124. package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
  125. package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
  126. package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
  127. package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
  128. package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
  129. package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
  130. package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
  131. package/skills/experience-app-mcp-generate/SKILL.md +174 -0
  132. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
  133. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
  134. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
  135. package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
  136. package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
  137. package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
  138. package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
  139. package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
  140. package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
  141. package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
  142. package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
  143. package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
  144. package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
  145. package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
  146. package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
  147. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
  148. package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
  149. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
  150. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
  151. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
  152. package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
  153. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
  154. package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
  155. package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
  156. package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
  157. package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
  158. package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
  159. package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
  160. package/skills/experience-design-validate/SKILL.md +1 -1
  161. package/skills/experience-search-coordinate/SKILL.md +18 -12
  162. package/skills/experience-search-coordinate/references/content-route.md +79 -1
  163. package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
  164. package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
  165. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
  166. package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
  167. package/skills/platform-apex-generate/SKILL.md +14 -11
  168. package/skills/platform-apex-test-generate/SKILL.md +2 -1
  169. package/skills/platform-custom-field-generate/SKILL.md +24 -16
  170. package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
  171. package/skills/platform-custom-setting-generate/SKILL.md +1 -0
  172. package/skills/platform-datamask-run/SKILL.md +52 -71
  173. package/skills/platform-datamask-run/references/api-surface.md +10 -4
  174. package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
  175. package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
  176. package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
  177. package/skills/platform-dataspace-access-configure/SKILL.md +43 -10
  178. package/skills/platform-flexipage-generate/SKILL.md +7 -10
  179. package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
  180. package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
  181. package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
  182. package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
  183. package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
  184. package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
  185. package/skills/platform-policy-rule-generate/SKILL.md +85 -231
  186. package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
  187. package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
  188. package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
  189. package/skills/platform-policy-rule-generate/references/conjunction-expression.md +30 -0
  190. package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
  191. package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +99 -0
  192. package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
  193. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
  194. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +5 -0
  195. package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
  196. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
  197. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +5 -0
  198. package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
  199. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
  200. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +5 -0
  201. package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
  202. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
  203. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +5 -0
  204. package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
  205. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
  206. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +5 -0
  207. package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
  208. package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
  209. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +18 -11
  210. package/skills/platform-policy-rule-generate/references/policy-shapes.md +107 -0
  211. package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
  212. package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
  213. package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
  214. package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
  215. package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
  216. package/skills/platform-policy-rule-generate/references/templates-advanced.md +5 -3
  217. package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
  218. package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
  219. package/skills/platform-policy-rule-generate/references/templates.md +2 -2
  220. package/skills/platform-policy-rule-generate/references/ui-compatibility.md +36 -18
  221. package/skills/platform-report-generate/SKILL.md +29 -5
  222. package/skills/platform-report-generate/references/chart-types.md +26 -2
  223. package/skills/platform-report-generate/references/column-names.md +43 -0
  224. package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
  225. package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
  226. package/skills/platform-report-generate/references/verification-checklist.md +22 -2
  227. package/skills/service-digital-engagement-channel-configure/SKILL.md +49 -110
  228. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +35 -0
  229. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
  230. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
  231. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
  232. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  233. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +128 -28
  234. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
  235. package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
  236. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
  237. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
  238. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
  239. package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
  240. package/skills/service-e911-configure/SKILL.md +242 -0
  241. package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
  242. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
  243. package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
  244. package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
  245. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
  246. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
  247. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
  248. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
  249. package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
  250. package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
  251. package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
  252. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
  253. package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
  254. package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
  255. package/skills/experience-content-media-image-generate/SKILL.md +0 -83
  256. package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
  257. package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
  258. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
@@ -48,7 +48,7 @@ Apex edits, and permission-set assignment are real, side-effecting writes.
48
48
 
49
49
  | Thing | Value |
50
50
  |---|---|
51
- | Repo clone URL | `https://github.com/trailheadapps/commerce-b2b-headless.git` (ask for an existing clone first; a new clone goes to a user-confirmed path under the cwd — Step 3) |
51
+ | Repo clone URL | `https://github.com/trailheadapps/commerce-b2b-headless.git` (Step 3) |
52
52
  | UI Bundle dir (`$BUNDLE`) | `force-app/main/default/uiBundles/commerceb2bheadless` |
53
53
  | WebStore config file | `$BUNDLE/src/config/commerce.ts` |
54
54
  | Registration Apex | `UIBundleRegistration.cls` (in the repo's Apex classes folder) |
@@ -61,14 +61,9 @@ Apex edits, and permission-set assignment are real, side-effecting writes.
61
61
  ## The four values you must set
62
62
 
63
63
  Everything else in the repo is portable. These four are environment-specific — resolve each against
64
- the target org, then write it into the file. Steps 4a–4d below do this.
65
-
66
- | # | Value | File / symbol | Prefix |
67
- |---|---|---|---|
68
- | 1 | WebStore Id | `commerce.ts` → `WEBSTORE_ID` | `0ZE` |
69
- | 2 | Default BuyerGroup Id | `UIBundleRegistration.cls` → `DEFAULT_BUYER_GROUP_ID` | `0ZI` |
70
- | 3 | Buyer permission set group | `UIBundleRegistration.cls` → `BUYER_PERMISSION_SET_GROUP` (DeveloperName) | — |
71
- | 4 | Vite org alias (optional) | `vite.config.ts` → `salesforce({ orgAlias: '…' })` | — |
64
+ the target org, then write it into the file (Steps 4a–4d): the **WebStore Id** (`0ZE…`), the default
65
+ **BuyerGroup Id** (`0ZI…`), the buyer **permission set group** DeveloperName, and the optional Vite
66
+ **org alias**.
72
67
 
73
68
  ---
74
69
 
@@ -87,7 +82,14 @@ If the user gave an org alias, use it. Otherwise list what's connected and ask w
87
82
  sf org list --json | jq -r '.result.nonScratchOrgs[]?.alias, .result.scratchOrgs[]?.alias'
88
83
  ```
89
84
 
90
- Confirm it's reachable: `sf org display --target-org <alias>`. If not connected, log in:
85
+ Confirm it's reachable. Do **not** run bare `sf org display` — it prints the org's access token into
86
+ the conversation. Project only the non-secret fields:
87
+
88
+ ```bash
89
+ sf org display --target-org <alias> --json | jq -r '.result | "\(.connectedStatus) \(.instanceUrl) API \(.apiVersion)"'
90
+ ```
91
+
92
+ Expect `Connected`. If it prints anything else, log in:
91
93
  `sf org login web --alias <alias> --instance-url https://<my-domain>.my.salesforce.com`.
92
94
 
93
95
  ### Step 2 — Discover the org's WebStores, let the user pick
@@ -142,6 +144,14 @@ If the clone fails with "Repository not found" or an auth prompt, the user's Git
142
144
  see the repo — don't stop; ask for a URL they can reach (e.g. their fork) or an existing local
143
145
  clone, and continue from there. Set `$REPO` to the confirmed path.
144
146
 
147
+ Either way, show the user the code Step 5 will build and run on this machine, and get their OK unless
148
+ the origin is `trailheadapps/commerce-b2b-headless` on github.com (any URL form).
149
+
150
+ ```bash
151
+ git -C "$REPO" remote get-url origin | sed -E 's#(://)[^/@]*@#\1#' # credentials stripped
152
+ git -C "$REPO" log -1 --date=short --format='%h %cd'
153
+ ```
154
+
145
155
  Either way, the repo is a **reference implementation you adapt**, not a drop-in — the placeholder
146
156
  edits below are mandatory. Skim `$REPO/README.md` to
147
157
  confirm you're on a compatible version if anything looks different from the Fixed-facts table.
@@ -187,14 +197,36 @@ falls back to `65.0`, which mismatches newer orgs and 401s every authenticated r
187
197
 
188
198
  ### Step 5 — Build the UI Bundle, then hand off the deploy
189
199
 
190
- The `dist/` is what gets shipped, and the WebStore Id (Step 4a) is baked into it at build time. Build from
191
- inside the bundle, deleting any existing `dist/` first — if the build fails partway, a leftover
192
- `dist/` from an earlier build (old or placeholder values baked in) would otherwise deploy silently.
193
- Confirm the chosen WebStore Id made it into the bundle before deploying:
200
+ The `dist/` is what gets shipped, with the WebStore Id (Step 4a) baked in at build time. Build inside
201
+ the bundle and delete any existing `dist/` first — if the build fails partway, an earlier build's
202
+ `dist/` (old or placeholder values) would otherwise deploy silently. Confirm the chosen WebStore Id
203
+ made it into the bundle before deploying.
204
+
205
+ **First, check the clone holds nothing but your Step 4 edits** — the install and build run the repo's
206
+ scripts and `vite.config.ts` on this machine. With `REPO` set to the repo's absolute path:
207
+
208
+ ```bash
209
+ ( set -eu -o pipefail
210
+ cd "${REPO:?}"
211
+ D=force-app/main/default; U=$D/uiBundles/commerceb2bheadless
212
+ ok="( M|M |MM) ($U/src/config/commerce\.ts|$U/vite\.config\.ts|$D/classes/UIBundleRegistration\.cls)"
213
+ ok="$ok|!! ($U/(node_modules|dist)(/.*)?|\.sf(dx)?/|.*\.tsbuildinfo)"
214
+ left=$( { git status --porcelain --ignored -unormal --ignore-submodules=none
215
+ git ls-files -v | sed -n 's/^[^H] /hidden-by-index-flag: /p'; } | { grep -vE "^($ok)\$" || [ $? = 1 ]; } )
216
+ [ -z "$left" ] || { printf 'GATE FAIL:\n%s\n' "$left"; exit 1; }
217
+ echo "GATE PASS" )
218
+ ```
219
+
220
+ Only `GATE PASS` lets you continue; `GATE FAIL`, an error, or no output is a **STOP** — show the user
221
+ the output and go on only if they confirm each item (say, the Chatter change from an earlier run).
222
+ Then skim `git diff HEAD`: only the Step 4 values should differ. This doesn't vet the repo's code,
223
+ `.git` hooks, or install scripts.
224
+
225
+ Install with `npm ci`, not `npm install`: it installs exactly what the committed `package-lock.json`
226
+ pins and fails rather than resolve anything new. If it fails, stop and tell the user.
194
227
 
195
228
  ```bash
196
- cd $REPO && npm install
197
- cd $BUNDLE && npm install && rm -rf dist && npm run build # tsc -b && vite build → fresh dist/
229
+ cd "$REPO/force-app/main/default/uiBundles/commerceb2bheadless" && rm -rf dist && npm ci && npm run build # tsc -b && vite build → fresh dist/
198
230
  grep -l '<0ZE…>' dist/assets/*.js >/dev/null && echo "WebStore Id baked"
199
231
  ```
200
232
 
@@ -286,7 +318,7 @@ Report the `siteUrl` as **"here is your hosted React Storefront"**. If `status`
286
318
  site needs publishing — direct the user to **Setup → Digital Experiences → All Sites →
287
319
  commerceb2bheadless → Publish** (Experience Builder), then re-fetch the URL. If the endpoint returns
288
320
  nothing, construct the fallback `https://<my-domain>.my.site.com/commerceb2bheadless` — the path is
289
- the site name, not the `vforcesite` prefix. Get `<my-domain>` from `sf org display`'s instance URL;
321
+ the site name, not the `vforcesite` prefix. Get `<my-domain>` from the `instanceUrl` Step 1 printed;
290
322
  non-production instances use a different site-domain suffix, so tell the user to verify the URL in
291
323
  All Sites.
292
324
 
@@ -298,14 +330,15 @@ If the four values are already set (Step 4 done), the repo's own orchestrator do
298
330
  permset in one go:
299
331
 
300
332
  ```bash
301
- cd $REPO && npm run setup -- --target-org <alias> --skip-dev --skip-data
333
+ cd "$REPO" && npm run setup -- --target-org <alias> --skip-dev --skip-data
302
334
  ```
303
335
 
304
336
  Caveats — it does **not** replace the placeholders and it assigns `UIBundleApexAccess` to the
305
337
  **current user**, not the guest user, so you **still** run Step 4 before it and Step 6 (the guest
306
- assignment) after it. Drop `--skip-dev` only if the user wants the local Vite dev server
307
- (`localhost:5173`) instead of / in addition to the hosted site. If the bundle has no GraphQL
308
- codegen wired, add `--skip-graphql`.
338
+ assignment) after it. Run Step 3's origin print and Step 5's check before it too: it runs the repo's
339
+ code and installs with `npm install`, not `npm ci`. Drop `--skip-dev` only if the user wants the
340
+ local Vite dev server (`localhost:5173`) instead of / in addition to the hosted site. If the bundle
341
+ has no GraphQL codegen wired, add `--skip-graphql`.
309
342
 
310
343
  ## Troubleshooting (from the repo README)
311
344
 
@@ -1,10 +1,13 @@
1
1
  ---
2
2
  name: dx-lifecycle-center
3
- description: "Lifecycle Center for DX Inspector and Builder Central. Use this skill first for four jobs: (A) list the orgs connected to DX Inspector; (B) connect a new org (sandbox or scratch, production, OrgFarm) as a deploy target; (C) connect or check the Lifecycle Center org, also written LifecycleCenter org, lifecycle-center, ALMDevOpsCenterHub, DevOps Center hub, or Hub org; (D) deploy, validate, or quick-deploy components that already exist in the user's org to a connected org, and poll a simple-deploy requestId. TRIGGER on: show, list, or pick connected orgs or environments; connect, add, log in to, or repair an org; connect the Lifecycle Center org; deploy, validate, or push components to another org, URL, org id, alias, or environment name. Short asks like \"connect a new org\", \"which orgs can I deploy to\", or \"deploy to my sandbox\" match. These deploys move components from the connected source org to another org, not local project files."
3
+ description: "Lifecycle Center for DX Inspector and Builder Central. Four jobs: (A) list the orgs connected to DX Inspector; (B) connect a new org (sandbox or scratch, production, OrgFarm) as a deploy target; (C) connect or check the Lifecycle Center org, also written LifecycleCenter, lifecycle-center, ALMDevOpsCenterHub, or Hub org; (D) deploy, validate, or quick-deploy components that already exist in the user's org to a connected org, and poll a simple-deploy requestId. TRIGGER on: show, list, or pick connected orgs or environments; connect, add, log in to, or repair an org; connect the Lifecycle Center org; deploy, validate, push, or publish components (metadata) to another org, URL, org id, alias, or environment name. Short asks like \"connect a new org\" or \"deploy to my sandbox\" match. NOT for promoting work items (dx-devops-promote), local source deploys (platform-metadata-deploy), or publishing sites or packages. Deploys move components between orgs, not local files."
4
4
  metadata:
5
5
  version: "1.0"
6
6
  domains: ["Developer Experience"]
7
7
  minApiVersion: "67.0"
8
+ relatedSkills:
9
+ - "dx-devops-promote"
10
+ - "platform-metadata-deploy"
8
11
  cliTools:
9
12
  - tool: ["jq"]
10
13
  semver: ">=1.6"
@@ -20,7 +23,7 @@ This skill manages which orgs a user can deploy to, and deploys to them. Everyth
20
23
 
21
24
  | Op | Name | What it does | Details |
22
25
  |---|---|---|---|
23
- | **A** | List orgs | Shows the orgs connected to DX Inspector (the deploy targets), or the current org's details. Also resolves a target the user names. | `references/list-orgs.md` |
26
+ | **A** | List orgs | Shows the orgs connected to DX Inspector (the deploy targets) and whether each is ready in this workspace, or the current org's details. Also resolves a target the user names. | `references/list-orgs.md` |
24
27
  | **B** | Connect an org | Connects a new sandbox or scratch, production, or OrgFarm org as a deploy target, or repairs a half-finished connection. The user signs in through a link. | `references/connect-org.md` |
25
28
  | **C** | Lifecycle Center org | Connects, repairs, or checks the Lifecycle Center org (credential `ALMDevOpsCenterHub`). | `references/hub-org.md` |
26
29
  | **D** | Deploy | Deploys, validates, or quick-deploys components from the source org to a connected target, then polls to the end. | `references/deploy.md` |
@@ -34,7 +37,7 @@ Connect (B) and deploy or quick deploy (D) change an org, so they wait for the u
34
37
  | Source org | The org the user built in. Use the alias they name, else the default org from `sf org display --json`. Components must already exist in it. |
35
38
  | DX Inspector environment | A `DevopsEnvironment` record in the source org with a Named Credential. The deploy targets are exactly these records. |
36
39
  | Deploy target | An environment in state `selectable`. An `expired` or `unauthenticated` environment is not a target. |
37
- | Lifecycle Center org | The Lifecycle Center hub. A separate connection that is never a deploy target. |
40
+ | Lifecycle Center org | The Lifecycle Center hub. A separate connection that is never a deploy target; it is shown in a list only when connected, labelled Lifecycle Center (Production Org). |
38
41
 
39
42
  ## Routing (deterministic)
40
43
 
@@ -43,9 +46,9 @@ Scripts and references are paths inside this skill's folder (the folder that hol
43
46
  | # | The request | Operation |
44
47
  |---|---|---|
45
48
  | 1 | Names the Lifecycle Center org, in any request, however it is spelled: "Lifecycle Center", "lifecyclecenter", "lifecycle-center", "lifecycle_center" (matching rules in `references/hub-org.md`) | **C** |
46
- | 2 | Deploy, validate, quick deploy, or push components to an org, URL, org id, alias, or environment name; or gives a `requestId` or validation id | **D** |
49
+ | 2 | Deploy, validate, quick deploy, push, or publish components (metadata) to an org, URL, org id, alias, or environment name; or gives a `requestId` or validation id | **D** |
47
50
  | 3 | Show, list, or pick connected orgs or environments; "which orgs can I deploy to"; the current org's details | **A** |
48
- | 4 | Connect, add, log in to, reconnect, or repair an org or its credential | **B** |
51
+ | 4 | Connect, add, log in to, reconnect, or repair an org or its credential; **sync**, **refresh**, or **re-sync** an org's workspace access; or a `sf` command on a connected org failed with `Session expired or invalid` / `INVALID_SESSION_ID` | **B** (the sync procedure, `references/connect-org.md`) |
49
52
  | 5 | Anything else about connected orgs or DX Inspector environments | **A** |
50
53
 
51
54
  The Lifecycle Center org rule (1) has two exclusions: "Dev Hub" is never the Lifecycle Center org, and plural phrases such as "DevOps Center orgs", "DX Inspector orgs", "environments", or "orgs connected to DX Inspector" are not the Lifecycle Center org; route them by rules 2 to 5. Details: `references/hub-org.md`.
@@ -54,7 +57,7 @@ The Lifecycle Center org rule (1) has two exclusions: "Dev Hub" is never the Lif
54
57
 
55
58
  | Operation | Action words (any form: "deploy", "deploying", "deployment") | Object words |
56
59
  |---|---|---|
57
- | **D** | deploy, deployment, validate, validation, check only, dry run, quick deploy, quickdeploy, push, send, ship, move, copy, release, add or install (when the object is a component) | components, metadata, classes, flows, objects, or a named org as the destination ("to", "into", "onto") |
60
+ | **D** | deploy, deployment, validate, validation, check only, dry run, quick deploy, quickdeploy, push, send, ship, move, copy, release, publish, add or install (when the object is a component, never a site, article or package version) | components, metadata, classes, flows, objects, or a named org as the destination ("to", "into", "onto") |
58
61
  | **B** | connect, connection, add, link, hook up, hookup, authorize, authenticate, log in, login, sign in, set up, setup, register, onboard, reconnect, repair, fix, refresh | org, environment, env, sandbox, scratch, production, prod, orgfarm, org farm |
59
62
  | **A** | show, list, see, view, display, which, what, pick, choose, available | orgs, environments, envs, targets, connections, "where can I deploy" |
60
63
 
@@ -62,24 +65,27 @@ A request with a **D** action word and a destination, or that names a component
62
65
 
63
66
  A request that mixes jobs (for example "connect my sandbox and deploy AccountService to it") takes the lowest-numbered match, here **D**, which runs **B** itself when the target is not connected.
64
67
 
65
- **Vague prompts.** If the message is only "deploy", "push my changes", "connect an org", or similar, do not guess and do not call any API. Ask exactly one question that fixes the first missing input:
68
+ **Vague prompts.** If the message is only "deploy", "push my changes", "publish my changes", "connect an org", or similar, do not guess and do not call any API. Ask exactly one question that fixes the first missing input:
66
69
 
67
70
  | Intent | Ask, in this order |
68
71
  |---|---|
69
72
  | Deploy | 1. Which components? (`references/deploy.md`, Step 1) 2. Which target org? |
70
- | Connect | 1. "Is it a sandbox or scratch org, a production org, or an OrgFarm org?" 2. What short name (letters only) should the environment have? |
73
+ | Connect | 1. "Is it a sandbox or scratch org, a production org, or an OrgFarm org?" 2. What short name should the environment have? |
71
74
  | Not clear which | "Do you want to connect an org or deploy components?" |
72
75
 
73
76
  A bare "deploy" with no DX Inspector context is a question, not a deploy.
74
77
 
75
78
  ## Rules that always apply
76
79
 
77
- - Targets come from the DX Inspector environments in the source org, never from `sf org list` or local aliases.
80
+ - Targets come from the DX Inspector environments in the source org, never from `sf org list` or local aliases. (A connect also registers the environment name as a workspace alias for the user's convenience; that does not make aliases a source of targets.)
78
81
  - Never deploy to a target that is not `selectable`, never to the source org, and never to the Lifecycle Center org.
79
- - The Lifecycle Center org never appears in a list and is not mentioned while listing. It is discussed only when the user asks about it.
80
- - Confirm before every call that changes an org: connect (`connect-org.md`, Step 1) and deploy (`deploy.md`, Step 4). `validate` is the only mode that needs no confirmation.
82
+ - The Lifecycle Center org appears in a list only when it is connected, as one labelled row, Lifecycle Center (Production Org), with no button, never a deploy target and never in Sync all. When it is not connected the list does not mention it.
83
+ - Confirm before every call that changes an org: connect (`connect-org.md`, Step 1) and deploy (`deploy.md`, Step 4). `validate` is the only mode that needs no confirmation. A click on a Sync / Refresh button, or an explicit ask to sync, is the confirmation for a workspace sync; listing never syncs by itself.
84
+ - A timeout (`TARGET_ORG_AUTHENTICATION_TIMEOUT`) is transient: retry once after about 10 seconds yourself, then stop. Only a 401 or 403 means the sign-in is stale.
81
85
  - When a connect started from a deploy and finishes, tell the user the org is connected and that you are continuing the deploy, then ask for the deploy confirmation. Connecting never deploys by itself.
82
86
  - A sandbox and a scratch org are the same type (`SANDBOX`). Treat their URLs alike.
87
+ - **Always double-quote an org alias in a shell command.** Environment names may contain spaces (`Dev 12 Org`), so write `--target-org "Dev 12 Org"`, never `--target-org Dev 12 Org`. Quote every alias, name or id taken from user input or from the resolver output, in every `sf` command and script argument.
88
+ - **Fix what can be fixed yourself.** An error a retry or a sync can clear (expired session, timeout, a missing workspace alias on an org the task needs) is handled in place: sync or retry, then carry on with the task and say what you did in one line. Do not hand the user a button or a question for it. Ask only when the fix needs them: a browser sign-in, a name clash, or an org-changing action they have not asked for.
83
89
  - Make one attempt per API call. Never retry in a loop, resubmit after a timeout, or invent an id, credential name, or status.
84
90
  - Never ask for, print, or pass an access token. Never show row ids or credential names.
85
91
  - Never say a browser was opened. Give the login link and wait for the user to reply **done**.
@@ -90,7 +96,8 @@ A bare "deploy" with no DX Inspector context is a question, not a deploy.
90
96
 
91
97
  | After | Reply with |
92
98
  |---|---|
93
- | **A** list | Only the table and the closing sentence (`list-orgs.md`, section 4). No raw JSON, no extra offers. |
99
+ | **A** list | The table of usable orgs, the action buttons (Sync / Re-sync / Refresh, plus Sync all N when two or more need it), the one left-out line when needed, and the closing sentence (`list-orgs.md`, section 4). No raw JSON, no status column, no other offers. |
100
+ | **B** sync (button click or failed `sf` command) | One line per org (synced, timed out, sign-in needed, name clash, or not available), then the list again. No sign-in link for a timeout (`connect-org.md`, *Sync workspace access*). |
94
101
  | **A** not enabled | The one-sentence message in `list-orgs.md`, section 2. Nothing else. |
95
102
  | **B** connect | The sign-in layout with a button-style link (`connect-org.md`, Step 2), then after **done** the connected layout: environment name, org host, type, and status (`connect-org.md`, Step 5). |
96
103
  | **C** | The exact sentences in `hub-org.md`. When connecting, the same sign-in and connected layouts as B, in hub form. |
@@ -103,7 +110,8 @@ A bare "deploy" with no DX Inspector context is a question, not a deploy.
103
110
  | The list or target lookup fails | `references/list-orgs.md`, section 2 |
104
111
  | A connect step fails | `references/troubleshooting.md` |
105
112
  | A deploy or validate fails | `references/error-handling.md` |
106
- | The target login is stale | Reconnect that environment (`references/connect-org.md`, repair path), then ask before retrying |
113
+ | The target login is stale | Sync it first (`references/connect-org.md`, *Sync workspace access*) and retry the step yourself. Only a 401/403 that a sync cannot fix needs the user's sign-in (repair path), and after it you retry without asking |
114
+ | A `sf` command on a connected org says the session expired | Sync that org's workspace access (`references/connect-org.md`, *Sync workspace access*), then retry the command once |
107
115
 
108
116
  ## References
109
117
 
@@ -117,4 +125,5 @@ A bare "deploy" with no DX Inspector context is a question, not a deploy.
117
125
  - `references/error-handling.md`: deploy error codes.
118
126
  - `examples/workflows.md`: worked prompts for each operation.
119
127
  - `scripts/resolve-environment.sh`: read-only list and identifier resolver.
128
+ - `scripts/hub-get.sh`: read-only GET against the Lifecycle Center org through its credential (`references/hub-org.md`).
120
129
  - `scripts/poll-deploy-status.sh`: read-only status poller. Reads the Simple Deploy endpoint and `DevopsRequestInfo`, and reports component errors on failure.
@@ -12,7 +12,7 @@ Worked prompts, grouped by operation (`SKILL.md`, Operations). Listing, status c
12
12
  bash scripts/resolve-environment.sh my-dev-org
13
13
  ```
14
14
 
15
- Reply with only the table and the closing sentence (`references/list-orgs.md`, section 4). The Lifecycle Center org is not in it and is not mentioned.
15
+ Run the resolver with `--check-sessions`. Reply with the table of usable orgs, the action buttons (Sync / Re-sync / Refresh, and **Sync all N** when two or more rows need it), the one left-out line when some rows are `needs-signin` or `retired`, and the closing sentence (`references/list-orgs.md`, section 4). There is no status column. The Lifecycle Center org is not part of the deploy targets. The list never syncs by itself.
16
16
 
17
17
  **A2. "What org am I in?"**
18
18
 
@@ -20,7 +20,7 @@ Answer from the `source` block: alias, username, URL, and org id. Nothing else.
20
20
 
21
21
  **A3. The query fails because the session expired.**
22
22
 
23
- The script reports "query failed, not an enablement problem". Say the error plainly and tell them to reconnect the source org (Reconnect prompt in Builder Central, or `sf org login web --alias <alias>` on a local CLI), then try again. Never say DX Inspector is disabled.
23
+ The script reports "query failed, not an enablement problem". Say the error plainly and tell them to reconnect the source org (Reconnect prompt in Builder Central, or `sf org login web --alias "<alias>"` on a local CLI), then try again. Never say DX Inspector is disabled.
24
24
 
25
25
  **A4. The query fails because DX Inspector is off.**
26
26
 
@@ -28,7 +28,23 @@ The script reports "DevOps Center not enabled or no access". Reply only: "DX Ins
28
28
 
29
29
  **A5. "Show my DevOps Center orgs."**
30
30
 
31
- The phrase is plural, so it is not the Lifecycle Center org. List the environments (A1) and do not mention the hub.
31
+ The phrase is plural, so it is not the Lifecycle Center org. List the environments (A1). The hub appears only as its labelled row, when connected.
32
+
33
+ **A6. Org connected in DX Inspector, not in Builder Central.**
34
+
35
+ The row is listed (the list reads DX Inspector environments) but the resolver says `needs-sync`: no workspace CLI alias exists. The row gets a **Sync `<name>`** button. A click sends `Sync workspace access for <name>`, which runs the sync procedure (`references/connect-org.md`, *Sync workspace access*): one PATCH with `?registerWorkspaceAlias=true`, no sign-in, a check after about 5 seconds, then the list again.
36
+
37
+ **A7. "Sync all" with a mix of states.**
38
+
39
+ Three rows: `QA` needs-sync, `UAT` needs-refresh, `Prod` ready. Buttons: **Sync all 2**, **Refresh UAT**, **Sync QA**, **Re-sync Prod**. Sync all runs QA then UAT, one PATCH each and never in parallel, and reports one line each. A failure on one does not stop the other.
40
+
41
+ **A8. Name clash.**
42
+
43
+ An alias named `UAT` already points at a different org, so the row is `alias-conflict` and gets **Fix name UAT**. Do not PATCH: it would overwrite the other org's alias. Offer `sf alias unset UAT` then a sync, or connecting under another name.
44
+
45
+ **A9. The user replies with an action.**
46
+
47
+ The actions under the table are plain text. A reply such as `Sync DevSand` or `Sync all 3` is the confirmation: run the sync procedure for those rows, then show the list again.
32
48
 
33
49
  ---
34
50
 
@@ -36,11 +52,11 @@ The phrase is plural, so it is not the Lifecycle Center org. List the environmen
36
52
 
37
53
  **B1. "Connect a new sandbox."**
38
54
 
39
- 1. Ask for the environment name (letters only). The type is `SANDBOX`; confirm it.
55
+ 1. Ask for the environment name. The type is `SANDBOX`; confirm it.
40
56
  2. Check the org is not already connected (`references/connect-org.md`, Step 0).
41
57
  3. After the user confirms, `POST /connect/devops/environment`.
42
- 4. Give the `redirectUrl` as a clickable link and wait for **done**. Never say a browser was opened.
43
- 5. `PATCH /connect/devops/environment/<id>`, then list again and confirm the new row shows its URL and org id.
58
+ 4. Show the sign-in as in `connect-org.md` Step 2 and wait for **done**. Never say a browser was opened.
59
+ 5. `PATCH /connect/devops/environment/<id>?registerWorkspaceAlias=true --body '{}'` (the CLI rejects a PATCH with no body), then list again and confirm the new row shows its URL and org id (if the resolver reports `needs-sync`, wait about 5 seconds once and check again; if it still does, say the org is connected and deployable but has no CLI alias here).
44
60
 
45
61
  **B2. "Connect https://mydomain--qa.sandbox.my.salesforce.com."**
46
62
 
@@ -60,16 +76,15 @@ The row shows as not authenticated. Do not POST again. Get a fresh link with `GE
60
76
 
61
77
  **B6. What the user sees while connecting.**
62
78
 
63
- Sign-in (Step 2):
79
+ Sign-in (Step 2), a heading, one line of instructions, and a single **Sign in to `QA`** link that opens the login page:
64
80
 
65
81
  > **Connect `QA`**
66
82
  >
67
- > **[Sign in to `QA` →](https://mydomain--qa.sandbox.my.salesforce.com/services/oauth2/authorize?...)**
68
- >
69
- > 1. Sign in with the user DX Inspector should act as, and approve access.
70
- > 2. Come back here and reply **done**.
83
+ > Sign in with the user DX Inspector should act as, and approve access. Then come back here and reply **done**.
71
84
  >
72
- > Link not working? Copy it: `https://mydomain--qa.sandbox.my.salesforce.com/services/oauth2/authorize?...`
85
+ > `[ Sign in to QA ]`
86
+
87
+ The link is the full `redirectUrl`, also repeated once as "Link not working? Copy it".
73
88
 
74
89
  Connected (Step 5):
75
90
 
@@ -81,6 +96,22 @@ Connected (Step 5):
81
96
 
82
97
  The Lifecycle Center org uses the same two layouts with its own heading, button text, and a Hub type column.
83
98
 
99
+ **B7. "sf command failed: Session expired or invalid" on `--target-org "QA"`.**
100
+
101
+ Run the sync procedure for `QA`: resolve the row from the alias, PATCH once with `?registerWorkspaceAlias=true`, check after about 5 seconds, then retry the command once. If the PATCH fails with 401 or 403, the stored sign-in is stale: show a fresh sign-in link, wait for **done**, PATCH once. If the alias is not a DX Inspector environment, offer to connect it; do not PATCH anything. Never retry with another alias or `default-org`.
102
+
103
+ **B8. The PATCH times out.**
104
+
105
+ `TARGET_ORG_AUTHENTICATION_TIMEOUT` (408/504) is transient. Wait about 10 seconds and PATCH once more. If it times out again, say "`QA` didn't respond in time. Try again in a few minutes." Do not show a sign-in button and do not call the credential stale.
106
+
107
+ **B9. Sync succeeds but the alias never appears.**
108
+
109
+ The PATCH returns success, yet the resolver still says `needs-sync` after one repeat. Registration is best effort on the server: the feature may be off for the org, no workspace may be running, or the name has spaces (Core may still skip those) or is `default-org`. Say the org is connected and deploys work, but its CLI alias isn't available here. Stop; do not loop.
110
+
111
+ **B10. Environment name with a space.**
112
+
113
+ "Connect `My UAT`." Accept `My UAT` as is. If the sync leaves it `needs-sync`, Core skipped the spaced name: say the org is connected but has no CLI alias, and offer `MyUAT` only as an optional rename. Every command uses `--target-org "My UAT"`.
114
+
84
115
  ---
85
116
 
86
117
  ## C. Lifecycle Center org
@@ -97,7 +128,7 @@ These are spelling variants of the same name. Normalize (lowercase, drop spaces
97
128
 
98
129
  **C6. Wording variants of the other operations.**
99
130
 
100
- After normalizing, these route the same way as the plain phrase: "Pls push AccountService into my QA-sandbox", "ship my flows to prod", "deployment to org-farm env", "dry run to my sandbox" → **D**. "Hook up a new scratch-org", "add sandbx", "sign in to prod", "set up an orgfarm env" → **B** (scratch and `sandbx` are `SANDBOX`, prod is `PRODUCTION`). "which envs can I use", "show linked orgs", "where can I deploy" → **A**.
131
+ After normalizing, these route the same way as the plain phrase: "Pls push AccountService into my QA-sandbox", "ship my flows to prod", "publish AccountService to my QA sandbox", "deployment to org-farm env", "dry run to my sandbox" → **D**. "Hook up a new scratch-org", "add sandbx", "sign in to prod", "set up an orgfarm env" → **B** (scratch and `sandbx` are `SANDBOX`, prod is `PRODUCTION`). "which envs can I use", "show linked orgs", "where can I deploy" → **A**.
101
132
 
102
133
  **C2. "Is the Lifecycle Center org connected?"**
103
134
 
@@ -109,7 +140,7 @@ Make no API call. Ask: "Do you mean the Lifecycle Center org, or a different org
109
140
 
110
141
  **C4. "Why isn't the Lifecycle Center org in my list?"**
111
142
 
112
- Say it is the Lifecycle Center hub, kept separate from deploy targets, and is never part of the deploy list.
143
+ Say it is the Lifecycle Center hub, kept separate from deploy targets, and is never a deploy target.
113
144
 
114
145
  ---
115
146
 
@@ -143,7 +174,7 @@ Make no API call. Ask one question: which components to deploy. Then ask for the
143
174
  State what you will validate, then submit with `"isCheckDeploy": true` (`references/request-body.md`), then:
144
175
 
145
176
  ```bash
146
- bash scripts/poll-deploy-status.sh <requestId> my-dev-org 10 100
177
+ bash scripts/poll-deploy-status.sh <requestId> "my-dev-org" 10 100
147
178
  # Exit codes: 0 succeeded, 2 failed or not found, 3 timeout, 1 usage or call error (4 only with --once)
148
179
  ```
149
180
 
@@ -154,13 +185,13 @@ On success, report the validation id from `metadata.deployId` and offer a quick
154
185
  Skip the component and target steps. Poll once:
155
186
 
156
187
  ```bash
157
- bash scripts/poll-deploy-status.sh --once <requestId> my-dev-org
188
+ bash scripts/poll-deploy-status.sh --once <requestId> "my-dev-org"
158
189
  # Exit 4 means still processing: report the status and step
159
190
  ```
160
191
 
161
192
  **D9. The deploy takes more than 2 minutes.**
162
193
 
163
- The poll exits `3`. Reply: "Your deploy is still running. Request id: `<requestId>`. Send me this id and I'll check its status." Stop polling. When the user sends the id, run `bash scripts/poll-deploy-status.sh --once <requestId> my-dev-org` and report the status in plain language.
194
+ The poll exits `3`. Reply: "Your deploy is still running. Request id: `<requestId>`. Send me this id and I'll check its status." Stop polling. When the user sends the id, run `bash scripts/poll-deploy-status.sh --once <requestId> "my-dev-org"` and report the status in plain language.
164
195
 
165
196
  **D8. The user gives only an id starting `0Af`.**
166
197
 
@@ -173,3 +204,9 @@ Deploy to the first, report, then ask before starting the second. Each target ge
173
204
  **D7. The target answers `Bad_OAuth_Token` or `TARGET_ORG_SESSION_EXPIRED`.**
174
205
 
175
206
  The stored login for that environment is stale. Say so, reconnect that environment (`references/connect-org.md`, repair path), and ask before trying the deploy again.
207
+
208
+ ### A10. Org connected by another user
209
+
210
+ User: "list my orgs". The resolver returns `UatOrg` with `userAuth: notConfigured` (`needs-my-signin`) and `DevSand` as `needs-sync`.
211
+
212
+ Reply: the table, then buttons **Sign in as me: UatOrg** and **Sync DevSand**, and the line "1 org was connected by someone else; sign in to use it." No Sync button for UatOrg, and it is not in Sync all. On the sign-in click, run the repair path (fresh link, login as this user, PATCH once), then rebuild the list.
@@ -15,7 +15,7 @@ Part of the DevOps Center Connect API (v67.0).
15
15
  | Method | Path | Body | Result |
16
16
  |---|---|---|---|
17
17
  | POST | `/connect/devops/environment` | `{envName, orgType, isDevEnv?, replaceEnvironmentId?}` | `{id, name, namedCredential, externalCredential, redirectUrl, orgType, isDevEnv}` |
18
- | PATCH | `/connect/devops/environment/{id}` | none | `{id, organizationId, orgUrl, status, message}` after the login. `name` and `namedCredential` are not returned; keep them from the POST |
18
+ | PATCH | `/connect/devops/environment/{id}` | optional query `registerWorkspaceAlias=true` (connect only) | `{id, organizationId, orgUrl, status, message}` after the login. `name` and `namedCredential` are not returned; keep them from the POST |
19
19
  | GET | `/connect/devops/environment/{id}` | none | The environment, with a fresh `redirectUrl` pinned to the row's org URL: use it for the repair link |
20
20
  | DELETE | `/connect/devops/environment/{id}` | none | Removes the NC/EC and the row |
21
21
 
@@ -66,8 +66,37 @@ The POST is **idempotent**: existing NCs and ECs are reused. Errors inside steps
66
66
 
67
67
  Error wrapping: `DOCE_AUTHENTICATION_FAILED:<msg>` or `DOCE_AUTH_UNKNOWN_ERROR:<msg>` (500), and `INVALID_INPUT` (400).
68
68
 
69
+ ### Workspace alias registration (`registerWorkspaceAlias=true`)
70
+
71
+ After the PATCH commits, Core resolves the running workspace (the local container when the local-workspace gate is open, else the user's remote workspace and its proxy token), gets a fresh access token and instance URL from the Named Credential, and posts them from a background thread:
72
+
73
+ ```text
74
+ POST {workspaceUrl}/auth-service/v1/auths/
75
+ { "alias": "<envName>", "accessToken": "...", "instanceUrl": "...", "setDefault": false }
76
+ ```
77
+
78
+ It retries up to 10 times on 502, 503, or 504 while the workspace boots and stops at once on any other error. Failures are logged and swallowed, so the PATCH response never shows them. The auth service validates the token against the org, stores the login in `~/.sfdx/<username>.json`, and maps the alias; an existing username just gets its token updated. To check from inside the workspace (never print the token):
79
+
80
+ ```bash
81
+ sf alias list
82
+ sf org list --json # the environment name appears as an alias
83
+ ```
84
+
85
+ Builder Central itself registers only the signed-in org, as `default`. It does not create aliases for DevOps environments, so this PATCH is the only way a connected environment gets one. A token that has expired shows as `Session expired or invalid` on `sf`: repeat the PATCH once to overwrite it.
86
+
87
+ Two logins can go stale, and they are fixed differently:
88
+
89
+ | Login | Held by | Stale shows as | Fix |
90
+ |---|---|---|---|
91
+ | Workspace alias token | The workspace auth-service (`~/.sfdx`) | `sf` says `Session expired or invalid`; `resolve-environment.sh --check-sessions` reports `needs-refresh` | Repeat the PATCH once (no browser) |
92
+ | DX Inspector credential | The Named Credential and External Credential in the source org | Only at deploy time (`Bad_OAuth_Token`, `TARGET_ORG_SESSION_EXPIRED`), or the PATCH itself fails on auth | Repair path: sign-in button, login, PATCH |
93
+
94
+ The PATCH reads its token from the Named Credential, so a stale DX Inspector credential can never be fixed by repeating it; that is why a PATCH that fails on auth moves to the repair path.
95
+
69
96
  ### PATCH: finalize after the OAuth login
70
97
 
98
+ `/connect/devops/environment/{id}` also accepts the optional query `registerWorkspaceAlias=true`. When set, after the steps below Core registers the environment name as an org alias in the caller's running Builder Central workspace (same auth store as `default-org`). It is best effort and never changes the response or fails the PATCH.
99
+
71
100
  Server behavior (`updateNamedCredentialsForDevops`):
72
101
 
73
102
  1. Returns `404 Named credential does not exist: <name>` if the NC is missing.
@@ -88,18 +117,18 @@ Use the standard Named Credentials Connect API in the dev org:
88
117
  ```bash
89
118
  # External credential and its per-user principal status
90
119
  sf api request rest "/services/data/v<ver>/named-credentials/external-credentials/<name>" \
91
- --target-org <dev-org-alias>
120
+ --target-org "<dev-org-alias>"
92
121
  # → principals[].principalType == "PerUserPrincipal", principals[].authenticationStatus == "Configured" | "NotConfigured"
93
122
 
94
123
  # Named credential callout URL
95
124
  sf api request rest "/services/data/v<ver>/named-credentials/named-credential-setup/<name>" \
96
- --target-org <dev-org-alias>
125
+ --target-org "<dev-org-alias>"
97
126
  # → calloutUrl (placeholder login host before PATCH, org My Domain after); calloutStatus "Enabled"
98
127
 
99
128
  # List named credentials (diagnostics only; deploy targets come from DevopsEnvironment)
100
129
  sf data query --use-tooling-api \
101
130
  --query "SELECT DeveloperName FROM NamedCredential ORDER BY CreatedDate DESC" \
102
- --target-org <dev-org-alias> --json
131
+ --target-org "<dev-org-alias>" --json
103
132
  ```
104
133
 
105
134
  Tooling `NamedCredential.Endpoint` is `null` for these `SecuredEndpoint` credentials, so always read `calloutUrl` from the `named-credential-setup` GET. DevOps-created target credentials match `<letters>_<millis>`. Never build the deploy-target list from this query.