@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
@@ -7,9 +7,11 @@ The targets are the DX Inspector environments, **not** the orgs authorized on th
7
7
  ## 1. Run the resolver
8
8
 
9
9
  ```bash
10
- bash <skill_dir>/scripts/resolve-environment.sh <source-org-alias> [identifier]
10
+ bash scripts/resolve-environment.sh "<source-org-alias>" ["<identifier>"] [--check-sessions]
11
11
  ```
12
12
 
13
+ Add `--check-sessions` when showing the list (section 4). It probes each workspace login that belongs to a listed environment with one cheap query and fills `session`. Leave it off when only resolving a target for Deploy or Connect: the session probes are skipped there (the per-user sign-in check and the hub read still run, in parallel with a timeout), so that path needs no extra org calls.
14
+
13
15
  `<source-org-alias>` is the alias the user named, else the default org from `sf org display --json`. Pass `identifier` exactly as the user gave it. It accepts:
14
16
 
15
17
  | The user gives | Example |
@@ -22,10 +24,10 @@ bash <skill_dir>/scripts/resolve-environment.sh <source-org-alias> [identifier]
22
24
  The script runs `SELECT Id, Name, NamedCredential, OrgType, IsExpired, OrgUrl, OrgIdentifier FROM DevopsEnvironment ORDER BY Name` and prints one JSON document:
23
25
 
24
26
  - `source`: `alias`, `username`, `orgId`, `instanceUrl` of the source org.
25
- - `environments[]`: each row with `state` of `selectable`, `expired`, or `unauthenticated`.
27
+ - `environments[]`: each row with `state` (`selectable`, `expired`, `unauthenticated`) and the workspace fields. `workspaceAlias` is `registered`, `missing`, or `unknown`, and `workspaceAliasName` is the `sf` alias that holds the login (named like the environment, or any alias on the same org). `session` is `valid`, `expired`, or `unknown` (only with `--check-sessions`; `unknown` also covers a probe that timed out). `userAuth` is `configured`, `notConfigured`, or `unknown`: whether the **current user** has signed in to that environment (rows are shared by everyone with access to the dev org, the login is per user; `unknown` means the check failed, never treated as not signed in). `aliasConflict` is `true` when an alias named like the environment points at a different org. `readiness` combines them: `ready`, `needs-sync`, `needs-refresh`, `alias-conflict`, `needs-my-signin`, `needs-signin`, `retired`, or `unverified`. `needs-my-signin` wins over every sync state: the row is connected, but not by this user. Aliases are never used to choose a target.
26
28
  - With an identifier: `matchStatus`, `matches[]`, `match`, and `sourceMatched`.
27
29
 
28
- The Lifecycle Center org's own row is never returned (see `hub-org.md`).
30
+ The Lifecycle Center org's own row is never in `environments[]`. The resolver reports it separately as `hub` (`label`, `url`, `userAuth`, `workspaceAlias` as `registered`, `missing`, `conflict` or `unknown`, `cliAlias`, `isDeployTarget: false`), present only when the hub is connected: its row exists or its credential is readable (see `hub-org.md`).
29
31
 
30
32
  ## 2. If the script fails
31
33
 
@@ -34,7 +36,7 @@ It exits `1` and prints one reason on stderr. Say only what the reason supports:
34
36
  | Script says | Tell the user | Then |
35
37
  |---|---|---|
36
38
  | `DevOps Center not enabled or no access` | "DX Inspector isn't enabled for this org or user, so there are no environments to list or deploy to. An admin needs to enable it." | Stop. Do not run another query, do not fall back to `sf org list`, and do not offer a deploy. |
37
- | `query failed, not an enablement problem` | The error in plain words (often an expired session). | Tell them to reconnect the source org (in Builder Central use the Reconnect prompt; running the CLI locally, `sf org login web --alias <alias>`), then try again. Never say DX Inspector is disabled. |
39
+ | `query failed, not an enablement problem` | The error in plain words (often an expired session). | Tell them to reconnect the source org (in Builder Central use the Reconnect prompt; running the CLI locally, `sf org login web --alias "<alias>"`), then try again. Never say DX Inspector is disabled. |
38
40
  | `unexpected query result` | The environment lookup returned something unreadable. | Report that and stop. Do not guess a list. |
39
41
  | `cannot read source org` | The source org is not authorized on this machine. | Ask which org they build in. If it is not authorized, reconnect it the same way as above, then start again. |
40
42
  | `jq required` | `jq` is missing from the environment. | Report it and stop. |
@@ -52,43 +54,67 @@ It exits `1` and prints one reason on stderr. Say only what the reason supports:
52
54
  | `not-connected` | Not in DX Inspector. Offer to connect it (`connect-org.md`). If the identifier was an alias, URL, or org id, carry it into the connect flow so only the missing inputs are asked. |
53
55
  | `none-requested` | No target named: show the list (section 4). |
54
56
 
55
- When the identifier is an alias that is not connected, `sf org display --target-org <alias> --json` gives its URL, which sets the `orgType` by the host table in `connect-org.md`. Use the alias as the suggested environment name (letters only) and still ask the user to confirm the type if the host does not decide it.
57
+ When the identifier is an alias that is not connected, `sf org display --target-org "<alias>" --json` gives its URL, which sets the `orgType` by the host table in `connect-org.md`. Use the alias as the suggested environment name and still ask the user to confirm the type if the host does not decide it.
56
58
 
57
59
  ## 4. Show the list
58
60
 
59
- A numbered table with the columns `#`, `Name`, `Type`, `URL`, `Org id`, `Status`:
61
+ Show the orgs the user can use, then say in one line what is left out.
62
+
63
+ **Table** (columns `#`, `Name`, `Type`, `URL`, `Org id`): one row per environment with `state = selectable`. **Never list the current (source) org.** It is not a deploy target, so leave out any row with `isSource: true` and do not append a row for `source`. Mention the current org only if the user asks about it (section 5).
60
64
 
61
- - One row per entry in `environments[]`, then the **source org** as the last row. A row with `isSource: true` is the source org: show it once, as that last row, never as a selectable environment.
65
+ - **Lifecycle Center row.** When `hub` is present and `hub.userAuth` is `configured`, add one last row: Name `Lifecycle Center (Production Org)`, Type `Production`, URL from `hub.url`, Org id `—`. Follow the table with: "Lifecycle Center (Production Org) is the Lifecycle Center hub. It is not a deploy target." It gets no button and is never in Sync all. If `hub` is null or not `configured`, say nothing about it.
62
66
  - Always include the `Org id` column. Write `—` for any empty cell.
63
- - The source org's `Type` is always `—`: `source` carries no org type, so never infer one.
64
- - Never show row ids or credential names.
65
- - If several rows share a name, tell them apart by URL.
67
+ - **Same org under several names.** Environments are separate connections, so two or more can point at one org (same `Org id`). Keep each row, but add one line after the table: "`<A>`, `<B>` and `<C>` are three connections to the same org (`<Org id>`)." Tell the user this whenever they ask to copy or move something between two of them: it would do nothing or create a duplicate, so offer a genuinely different org instead.
68
+ - Never show row ids or credential names. If several rows share a name, tell them apart by URL.
69
+ - There is no status column. The state is shown as the **action button** under the table (below), so the user fixes a row with one click instead of reading a status.
66
70
 
67
- | Row | Status column |
68
- |---|---|
69
- | `state = selectable` | Selectable |
70
- | `state = expired` | Retired or replaced |
71
- | `state = unauthenticated` | Not authenticated |
72
- | The source org | `<alias> (current org, source)`. It is the source, so it is **not** a deploy target. If the user picks it, explain that and ask for another. |
71
+ **Where the list comes from.** Rows are the DX Inspector environments, so an org connected in DX Inspector (the Lifecycle Center UI) is listed even though it was never connected from Builder Central chat. Such an org has a credential but **no workspace CLI alias**, so `sf ... --target-org "<name>"` fails here until it is synced. An org connected from Builder Central chat gets both the row and the alias. The buttons cover both cases.
72
+
73
+ **Actions.** Under the table, offer one text action per selectable row, plus the batch action, as a short list. The user replying with the action (or the message shown) is their confirmation. The label depends on `readiness`:
74
+
75
+ | `readiness` | Button label | Message sent on click | What the click does |
76
+ |---|---|---|---|
77
+ | `needs-sync` | Sync `<name>` | `Sync workspace access for <name>` | Sync procedure (`connect-org.md`, *Sync workspace access*) |
78
+ | `unverified` | Sync `<name>` | same | same |
79
+ | `needs-refresh` | Refresh `<name>` | `Refresh workspace access for <name>` | same procedure |
80
+ | `ready` | Re-sync `<name>` | `Sync workspace access for <name>` | same procedure (safe: it overwrites the same alias with a fresh token) |
81
+ | `alias-conflict` | Fix name `<name>` | `Fix the workspace alias name for <name>` | Do **not** PATCH. Explain the clash and offer `sf alias unset` or a different name (`troubleshooting.md`) |
82
+ | `needs-my-signin` | Sign in as me: `<name>` | `Sign me in to <name>` | Per-user sign-in: repair path in `connect-org.md` (fresh link, login as this user, PATCH once). No sync before it; a sync would fail with 401/403 |
83
+ | `needs-signin` | Finish sign-in `<name>` | `Finish connecting <name>` | Repair path in `connect-org.md` |
84
+ | `retired` | none | | Not repairable; goes in the left-out line |
85
+
86
+ - When **two or more** rows are `needs-sync`, `needs-refresh`, or `unverified`, add a first button **Sync all N** (message `Sync workspace access for all connected orgs`). The batch runs the sync procedure for each of those rows in turn, one PATCH each, never in parallel, and reports one line per org.
87
+ - The source org row has no button.
88
+ - **Orgs connected by someone else.** Everyone with access to the dev org sees the same environments, but the sign-in belongs to one user. A `needs-my-signin` row is listed with its "Sign in as me" button, and one line goes after the table: "N orgs were connected by someone else; sign in to use them." Never offer Sync (or include the row in Sync all) for such a row. Do not claim it is unusable: deploys use the signed-in user's credential, so it is not deployable for this user until they sign in.
89
+ - No selectable row needs an action: skip the list. Otherwise, if the list would be long, add one sentence after the table naming the rows that need syncing and asking if they want them synced.
90
+ - Deploys run through DX Inspector's credential, not the workspace alias, so a row that needs a sync is still deployable. Say so only if the user asks.
91
+ - **Never sync by itself while listing.** A list is read-only. The sync runs only after a button click or an explicit request.
92
+
93
+ After a click the agent runs the procedure, then **shows the list again**, so the user sees the result. The list is rebuilt from a fresh resolver run, not from memory.
94
+
95
+ **Left-out line** (only if any row is `needs-signin` or `retired`; one sentence, placed after the table): "Not shown as usable: `<name>` (sign-in not finished), `<name>` (retired or replaced)." Details only if the user asks.
96
+
97
+ **Example** (table, then the button row):
98
+
99
+ | # | Name | Type | URL | Org id |
100
+ |---|---|---|---|---|
101
+ | 1 | MySandbox | Sandbox | mydomain--mysandbox.sandbox.my.salesforce.com | 00D5g000001AbCd |
102
+ | 2 | QaSandbox | Sandbox | mydomain--qa.sandbox.my.salesforce.com | 00D5g000001QqQq |
73
103
 
74
- Example:
104
+ The current org (`my-alias`) is not listed. Buttons: **Sync all 2**, **Re-sync MySandbox**, **Refresh QaSandbox**.
75
105
 
76
- | # | Name | Type | URL | Org id | Status |
77
- |---|---|---|---|---|---|
78
- | 1 | MySandbox | Sandbox | mydomain--mysandbox.sandbox.my.salesforce.com | 00D5g000001AbCd | Selectable |
79
- | 2 | OldSandbox | Sandbox | mydomain--old.sandbox.my.salesforce.com | — | Retired or replaced |
80
- | 3 | my-alias *(current org, source)* | — | mydomain.my.salesforce.com | 00D5g000001XyZw | — |
106
+ Not shown as usable: OldSandbox (retired or replaced).
81
107
 
82
108
  End the list with exactly this sentence and nothing after it:
83
109
 
84
110
  > Want to deploy to an org that isn't listed? I can help you connect a new one.
85
111
 
86
- Do not add any other offer, summary, or follow-up.
112
+ Do not add any other offer, summary, or follow-up. The action buttons are the only addition.
87
113
 
88
114
  | Situation | Reply instead of the table |
89
115
  |---|---|
90
116
  | No environments | "No environments are connected to DX Inspector in `<source-org-alias>` yet." Then the closing sentence. |
91
- | Every environment is expired or unauthenticated | "None of the connected environments can accept a deploy right now: <names and reasons>." Then the closing sentence. |
117
+ | No row has `state = selectable` | "None of the connected environments can accept a deploy right now: <names and reasons>." Then the closing sentence. |
92
118
 
93
119
  ## 5. Current-org details
94
120
 
@@ -14,10 +14,15 @@ Explain each problem to the user in plain language. Never echo raw JSON or token
14
14
  | User can't use the credential | Missing **Access DevOps Center Named Credentials** (`AccessDevOpsCenterNamedCredentials`) | Assign that permission set to the user in the dev org. |
15
15
  | Hub PATCH returns `404 Named credential does not exist` | POST never created the NC, or the name differs | Re-check the exact name (case-sensitive) and re-run Step 1. |
16
16
  | Hub PATCH returns `DOCE_CONNECTION_UPDATE_FAILED` | The `userinfo` callout failed, usually because the OAuth token is missing or expired | Confirm the principal is `Configured`, then re-run Steps 1–4. The user's saved DX Inspector selections were cleared, so they must pick them again. |
17
- | Deploy environment PATCH returns `TARGET_ORG_AUTHENTICATION_STATUS_CHECK_FAILED` (401/403), `TARGET_ORG_AUTHENTICATION_TIMEOUT` (408/504), or `TARGET_ORG_UNKNOWN_ERROR` (includes "Environment record not found" and "does not have a named credential") | The login is missing or expired, the callout timed out, or the id is wrong | Confirm the principal is `Configured` and the `id` is the POST's. Give a fresh link and PATCH once. Do not loop. |
17
+ | Deploy environment PATCH returns `TARGET_ORG_AUTHENTICATION_TIMEOUT` (408/504) | The target org or its login service did not answer in time. This says nothing about the credential | Wait about 10 seconds and PATCH once more. If it times out again, tell the user the org didn't respond and to try later. Do not give a sign-in link and do not delete or recreate anything. |
18
+ | Deploy environment PATCH returns `TARGET_ORG_AUTHENTICATION_STATUS_CHECK_FAILED` (401/403) | The login is missing, expired, or revoked | Confirm the principal is `Configured` and the `id` is the POST's. Give a fresh link and PATCH once. Do not loop. |
19
+ | Deploy environment PATCH returns `TARGET_ORG_UNKNOWN_ERROR` (includes "Environment record not found" and "does not have a named credential") | The id is wrong, or the connect never finished | Re-resolve the id from the environment list. If the row has no credential, use the repair path. Do not loop. |
18
20
  | PATCH `calloutUrl` or `orgUrl` is still a login host | Unexpected `userinfo` response | Stop and report. Do not hand the NC to deploy. |
19
21
  | Hub mode: `doceConnectionType` fails | The hub user lacks **DevOps Center User** | Assign the permission set in the Lifecycle Center org, then re-run the check. |
20
22
  | Deploy: `TARGET_ORG_SESSION_EXPIRED` or `Bad_OAuth_Token` | The target refresh token was revoked or expired. A stale token is not visible in the environment list; it only shows at deploy time | Repair: fresh link from `GET /connect/devops/environment/<id>`, user logs in, PATCH once. |
23
+ | Connected, but `sf ... --target-org "<name>"` says the alias is unknown | The alias POST is best effort and its failure is swallowed (no running workspace, workspace still booting past the retries, or the environment name was blank, had spaces, or was `default-org`) | Repeat the connect PATCH with `?registerWorkspaceAlias=true` and `--body '{}'` once, then re-check with `resolve-environment.sh`. If it is still missing, say the org is connected and deploys still work, and stop. |
24
+ | `sf` with the alias says `Session expired or invalid` (also `INVALID_SESSION_ID`, `RefreshTokenAuthError`) | The token the workspace holds is short-lived and was not refreshed. This is the workspace login, not the DX Inspector credential | Map the alias to its environment, say "Your workspace login to `<name>` expired", repeat the same PATCH once (no browser needed), then retry the failed command once. If the PATCH fails on auth, the DX Inspector login is stale: repair path (fresh sign-in link, login, PATCH). Never retry with another org's alias or `default-org`. |
25
+ | Environment shows `alias-conflict` | An `sf` alias with the environment name already points at a different org in this workspace. Repeating the PATCH would overwrite that alias | Do not repeat the PATCH. Ask the user to remove or rename the other alias (`sf alias unset "<name>"`), or reconnect under a different name. |
21
26
  | Environment shows `unauthenticated` (empty `OrgUrl` or `OrgIdentifier`) | The connect never finished: POST ran but login or PATCH did not | Same repair: fresh link, login, PATCH once. Do not POST again. |
22
27
  | `Doce Hub Environment` row is missing from the environment list | By design: the resolver drops the hub row (credential `ALMDevOpsCenterHub`, empty `OrgUrl`) because it is the Lifecycle Center hub, not a deploy target | Nothing to repair. To deploy to that org, connect it as a deploy target with the Environment API. |
23
28
  | Environment shows `expired` | `IsExpired` is set when an environment is retired or replaced by a swap; it is not an OAuth expiry | Do not repair it. Pick another environment or connect a new one. |
@@ -29,3 +34,19 @@ Explain each problem to the user in plain language. Never echo raw JSON or token
29
34
  **Hub:** delete both the **Named Credential** and the **External Credential** named `ALMDevOpsCenterHub` in Setup → Named Credentials (and the External Credentials tab), and run the skill again.
30
35
 
31
36
  For the hub, the **Remove DevOps Center Connection** option in DX Inspector does the same teardown.
37
+
38
+ ## Org connected in DX Inspector, not in Builder Central
39
+
40
+ An environment connected through the DX Inspector UI (Lifecycle Center) has a `DevopsEnvironment` row and a credential but no workspace alias. It appears in the list with a **Sync** button; `sf ... --target-org "<name>"` fails until it is synced (`connect-org.md`, *Sync workspace access*). No sign-in is needed while the credential is `Configured`.
41
+
42
+ ## Alias registration does not happen even after a sync
43
+
44
+ The PATCH succeeds but the alias never appears. The causes are on the server and invisible to the CLI: the feature gate is closed for the org, no workspace is running for the user, or the environment name is blank, contains whitespace, or is `default-org` in any casing. Repeat the sync once. If it still shows `needs-sync`, say the org is connected and deployable but has no CLI alias here, and stop.
45
+
46
+ ## Org listed, but connected by another user
47
+
48
+ | Symptom | Cause | Fix |
49
+ |---|---|---|
50
+ | Row shows `needs-my-signin` (`userAuth: notConfigured`) | DX Inspector environments are shared by everyone with access to the dev org, but the OAuth login is per user and this user has not signed in | Use the "Sign in as me" button: fresh sign-in link, log in **as this user**, PATCH once (repair path in `connect-org.md`). Do not sync first |
51
+ | Sync or deploy returns 401/403 on an org someone else connected | Same cause, found late | Treat as `needs-my-signin` |
52
+ | `userAuth: unknown` on every row | The credential status call failed (API version, permission, network) | List as usual; if a click then fails with 401/403, go to the row above |
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+ # Read-only GET against the Lifecycle Center org through the DX Inspector credential (ALMDevOpsCenterHub).
3
+ # No workspace alias and no record change: the call runs as the signed-in user, from the source org.
4
+ #
5
+ # Usage: hub-get.sh <source-org-alias> </services/data/vNN.N/...path?query>
6
+ # Prints the response body (JSON) on stdout. Exit codes: 0 HTTP 2xx, 1 usage / not 2xx / call failed.
7
+ set -uo pipefail
8
+
9
+ command -v jq >/dev/null || { echo "jq required" >&2; exit 1; }
10
+ SRC="${1:-}"; REQ="${2:-}"
11
+ [ -n "$SRC" ] && [ -n "$REQ" ] || { echo "usage: hub-get.sh <source-org-alias> </services/data/vNN.N/...>" >&2; exit 1; }
12
+ case "$REQ" in */../*|*/..|*%2e%2e*|*%2E%2E*) echo "path must not contain .." >&2; exit 1 ;; esac
13
+ printf '%s' "$REQ" | grep -Eq '^/services/data/v[0-9]+\.[0-9]+/' || { echo "path must start with /services/data/v<version>/" >&2; exit 1; }
14
+ # The path goes into an Apex string literal: allow only URL-safe characters (no quotes, backslashes, or whitespace).
15
+ printf '%s' "$REQ" | grep -Eq "^[A-Za-z0-9/._~%+=&?,:*()-]+$" || { echo "path has characters that are not allowed (encode spaces as %20 and quotes as %27)" >&2; exit 1; }
16
+
17
+ apex=$(mktemp "${TMPDIR:-/tmp}/hub-get.XXXXXX") || exit 1
18
+ trap 'rm -f "$apex"' EXIT
19
+ cat > "$apex" <<APEX
20
+ HttpRequest r = new HttpRequest();
21
+ r.setEndpoint('callout:ALMDevOpsCenterHub${REQ}');
22
+ r.setMethod('GET');
23
+ r.setHeader('Accept', 'application/json');
24
+ HttpResponse s = new Http().send(r);
25
+ System.debug('HUBGET ' + s.getStatusCode() + ' ' + EncodingUtil.base64Encode(Blob.valueOf(s.getBody())));
26
+ APEX
27
+ # One retry after a short pause covers a refreshing session or a transient hub error.
28
+ for attempt in 1 2; do
29
+ out=$(env FORCE_COLOR=0 SF_CLI_DISABLE_AUTOUPDATE=true sf apex run --file "$apex" --target-org "$SRC" --json 2>/dev/null) && \
30
+ line=$(printf '%s' "$out" | jq -r '.result.logs // ""' | grep -o 'HUBGET [0-9]* [A-Za-z0-9+/=]*' | head -1) || line=""
31
+ case "$line" in "HUBGET 5"*|"HUBGET 408"*|"") [ "$attempt" = 1 ] && { sleep 3; continue; } ;; esac
32
+ break
33
+ done
34
+ [ -n "$line" ] || { echo "no response captured; the callout failed (session expired, Apex not permitted, or the credential is not usable for this user): $(printf '%s' "$out" | jq -r '.result.exceptionMessage // .message // "unknown"' 2>/dev/null | head -c 200)" >&2; exit 1; }
35
+ code=$(printf '%s' "$line" | cut -d' ' -f2)
36
+ b64=$(printf '%s' "$line" | cut -d' ' -f3)
37
+ body=$(printf '%s' "$b64" | base64 -d 2>/dev/null || printf '%s' "$b64" | base64 -D 2>/dev/null)
38
+ # A truncated debug log decodes to partial JSON: never return it as a success.
39
+ printf '%s' "$body" | jq -e . >/dev/null 2>&1 || { echo "response was cut off or is not JSON; narrow the query (add LIMIT)" >&2; exit 1; }
40
+ printf '%s\n' "$body"
41
+ case "$code" in 2??) exit 0 ;; *) echo "hub returned HTTP $code" >&2; exit 1 ;; esac
@@ -3,8 +3,13 @@
3
3
  # identifier (alias, username, My Domain URL, 15/18-char org id, or environment name)
4
4
  # to one of them. Read-only. Prints one JSON document on stdout.
5
5
  #
6
- # Usage: resolve-environment.sh <source-org-alias> [identifier] [--rows-file <file>]
7
- # --rows-file read the DevopsEnvironment query result JSON from a file (tests)
6
+ # Usage: resolve-environment.sh <source-org-alias> [identifier] [--rows-file <file>] [--user-auth-file <file>] [--check-sessions]
7
+ # --rows-file read the DevopsEnvironment query result JSON from a file (tests)
8
+ # --user-auth-file read the per-user sign-in map (named credential -> configured | notConfigured | unknown)
9
+ # from a file instead of calling the org (tests)
10
+ # --check-sessions probe each workspace login that belongs to a listed environment with one
11
+ # cheap query (SELECT Id FROM Organization LIMIT 1) and report .session
12
+ # (valid / expired / unknown). Off by default: one org call per login.
8
13
  #
9
14
  # Exit codes: 0 ok (check .match / .matchStatus), 1 usage or call error.
10
15
  set -uo pipefail
@@ -13,15 +18,19 @@ command -v jq >/dev/null || { echo "jq required" >&2; exit 1; }
13
18
  SRC="${1:-}"
14
19
  [ -n "$SRC" ] || { echo "usage: resolve-environment.sh <source-org-alias> [identifier] [--rows-file <file>]" >&2; exit 1; }
15
20
  shift
16
- IDENT=""; ROWS_FILE=""
21
+ IDENT=""; ROWS_FILE=""; USER_AUTH_FILE=""; CHECK_SESSIONS=0
17
22
  while [ $# -gt 0 ]; do
18
23
  case "$1" in
19
24
  --rows-file) [ $# -ge 2 ] || { echo "--rows-file needs a value" >&2; exit 1; }; ROWS_FILE="$2"; shift 2 ;;
20
- *) IDENT="$1"; shift ;;
25
+ --user-auth-file) [ $# -ge 2 ] || { echo "--user-auth-file needs a value" >&2; exit 1; }; USER_AUTH_FILE="$2"; shift 2 ;;
26
+ --check-sessions) CHECK_SESSIONS=1; shift ;;
27
+ -*) echo "unknown option $1" >&2; exit 1 ;;
28
+ *) [ -z "$IDENT" ] || { echo "one identifier only; quote a name with spaces: \"Dev 12 Org\"" >&2; exit 1; }; IDENT="$1"; shift ;;
21
29
  esac
22
30
  done
23
31
 
24
32
  sfj() { env FORCE_COLOR=0 SF_CLI_DISABLE_AUTOUPDATE=true "$@" 2>/dev/null; }
33
+ tmpd=$(mktemp -d); trap 'rm -rf "$tmpd"' EXIT
25
34
 
26
35
  # Source org (the org the user built in).
27
36
  src_json=$(sfj sf org display --target-org "$SRC" --json) \
@@ -49,6 +58,115 @@ fi
49
58
  printf '%s' "$rows_json" | jq -e '.result.records' >/dev/null 2>&1 \
50
59
  || { echo "unexpected query result" >&2; exit 1; }
51
60
 
61
+ # Workspace logins: the aliases (and the org each one points at) that `sf ... --target-org <alias>` accepts
62
+ # here. Core registers an environment's name as an alias when its connect PATCH runs with
63
+ # registerWorkspaceAlias=true. An environment counts as present when an alias carries its name OR points
64
+ # at its org id (several environments can share one org). Local read, no org call.
65
+ # "null" = could not be read: workspace status is then reported as unknown.
66
+ aliases_json=$(sfj sf org list --skip-connection-status --json | jq -c \
67
+ '[.result | to_entries[] | .value | arrays[] | select(.alias != null) | {alias: .alias, orgId: ((.orgId // "")[0:15]), host: ((.instanceUrl // "") | sub("^https?://"; "") | sub("/.*$"; "") | ascii_downcase)}]' 2>/dev/null) || aliases_json=null
68
+ [ -n "$aliases_json" ] || aliases_json=null
69
+
70
+ # Optional session probe. One cheap query per login that belongs to a listed environment.
71
+ # A mapping alias -> valid | expired | unknown. A probe that times out or fails for any other reason is
72
+ # "unknown", never "expired": only a recognised session/refresh-token error counts as expired.
73
+ sessions_json='{}'
74
+ # Bound each probe to 20s with whatever is available (GNU timeout in the image, perl on macOS, else none).
75
+ if command -v timeout >/dev/null; then tmo="timeout 20"
76
+ elif command -v perl >/dev/null; then tmo="perl -e alarm(20);exec(@ARGV) --"
77
+ else tmo=""; fi
78
+ if [ "$CHECK_SESSIONS" = 1 ] && [ "$aliases_json" != null ]; then
79
+ want=$(printf '%s' "$rows_json" | jq -r '[.result.records[]? | (.OrgIdentifier // "")[0:15] | select(. != "")] | unique | .[]')
80
+ # Probes are independent, so run them side by side. Read line by line: an alias may contain spaces ("Dev 12 Org").
81
+ i=0
82
+ while IFS= read -r a; do
83
+ [ -n "$a" ] || continue
84
+ i=$((i+1)); printf '%s' "$a" > "$tmpd/s$i.k"
85
+ (
86
+ out=$(SF_TARGET_ORG="$a" SF_DISABLE_TELEMETRY=true sfj $tmo \
87
+ sf data query --target-org "$a" --json --query "SELECT Id FROM Organization LIMIT 1" </dev/null)
88
+ if printf '%s' "$out" | jq -e '.status == 0' >/dev/null 2>&1; then st=valid
89
+ elif printf '%s' "$out" | grep -Eiq 'INVALID_SESSION_ID|invalid_grant|RefreshTokenAuthError|Bad_OAuth_Token|expired access/refresh|Session expired or invalid'; then st=expired
90
+ else st=unknown; fi
91
+ printf '%s' "$st" > "$tmpd/s$i.v"
92
+ ) &
93
+ done < <(printf '%s' "$aliases_json" | jq -r --arg want "$want" \
94
+ '($want | split("\n")) as $w | .[] | select(.orgId as $o | $w | index($o)) | .alias')
95
+ wait
96
+ for k in "$tmpd"/s*.k; do
97
+ [ -f "$k" ] || continue
98
+ sessions_json=$(printf '%s' "$sessions_json" | jq -c --arg a "$(cat "$k")" --arg s "$(cat "${k%.k}.v" 2>/dev/null || echo unknown)" '. + {($a): $s}')
99
+ done
100
+ fi
101
+
102
+ # Hub credential read starts now and runs alongside the checks below (consumed at the hub step).
103
+ hub_ver="${DLC_API_VERSION:-68.0}"
104
+ if [ -z "$USER_AUTH_FILE" ]; then
105
+ ( sfj $tmo sf api request rest "/services/data/v${hub_ver}/named-credentials/named-credential-setup/ALMDevOpsCenterHub" --target-org "$SRC" </dev/null > "$tmpd/hub.nc"
106
+ sfj $tmo sf api request rest "/services/data/v${hub_ver}/named-credentials/external-credentials/ALMDevOpsCenterHub" --target-org "$SRC" </dev/null > "$tmpd/hub.ec" ) &
107
+ fi
108
+
109
+ # Per-user sign-in. DevopsEnvironment rows are shared by everyone with access to the dev org, but the OAuth
110
+ # token behind each one belongs to a single user (the external credential's PerUserPrincipal). Ask, for the
111
+ # user running this, whether each connected environment's principal is Configured. The external credential
112
+ # carries the same developer name as the row's named credential. A failed or unreadable check is "unknown",
113
+ # never "notConfigured": only an explicit NotConfigured counts.
114
+ user_auth_json='{}'
115
+ if [ -n "$USER_AUTH_FILE" ]; then
116
+ user_auth_json=$(cat "$USER_AUTH_FILE")
117
+ else
118
+ api_ver="${DLC_API_VERSION:-68.0}"
119
+ # One independent call per credential: run them side by side.
120
+ i=0
121
+ for nc in $(printf '%s' "$rows_json" | jq -r '.result.records[]? | select((.IsExpired // false) == false and (.OrgUrl // "") != "" and (.OrgIdentifier // "") != "")
122
+ | (.NamedCredential // "") | gsub("<[^>]*>"; "") | gsub("^\\s+|\\s+$"; "") | select(. != "" and . != "ALMDevOpsCenterHub")' | sort -u); do
123
+ i=$((i+1)); printf '%s' "$nc" > "$tmpd/u$i.k"
124
+ (
125
+ out=$(sfj $tmo sf api request rest "/services/data/v${api_ver}/named-credentials/external-credentials/${nc}" --target-org "$SRC" </dev/null)
126
+ st=$(printf '%s' "$out" | jq -r '[.principals[]? | select(.principalType == "PerUserPrincipal") | .authenticationStatus][0]
127
+ | if . == "Configured" then "configured" elif . == "NotConfigured" then "notConfigured" else "unknown" end' 2>/dev/null)
128
+ printf '%s' "${st:-unknown}" > "$tmpd/u$i.v"
129
+ ) &
130
+ done
131
+ wait
132
+ for k in "$tmpd"/u*.k; do
133
+ [ -f "$k" ] || continue
134
+ user_auth_json=$(printf '%s' "$user_auth_json" | jq -c --arg k "$(cat "$k")" --arg s "$(cat "${k%.k}.v" 2>/dev/null || echo unknown)" '. + {($k): $s}')
135
+ done
136
+ fi
137
+
138
+ # Lifecycle Center hub. Its row is dropped from environments[] (it is never a deploy target) but is reported
139
+ # separately as .hub so a list can show it, labelled. The hub counts as connected when its DevopsEnvironment row
140
+ # exists (made in DX Inspector) or its credential is readable (made by hub mode, which creates no row). The URL and
141
+ # this user's sign-in come from the credential. Unreadable pieces are null / "unknown".
142
+ hub_json=null
143
+ hub_name=$(printf '%s' "$rows_json" | jq -r '[.result.records[]? | select(((.NamedCredential // "") | gsub("<[^>]*>"; "") | gsub("^\\s+|\\s+$"; "")) == "ALMDevOpsCenterHub") | .Name][0] // ""')
144
+ hub_present=0; [ -n "$hub_name" ] && hub_present=1
145
+ hub_url=""; hub_auth=unknown
146
+ if [ -n "$USER_AUTH_FILE" ]; then
147
+ [ "$hub_present" = 1 ] && hub_auth=$(printf '%s' "$user_auth_json" | jq -r '.ALMDevOpsCenterHub // "unknown"')
148
+ else
149
+ wait
150
+ hub_url=$(jq -r '.calloutUrl // empty' "$tmpd/hub.nc" 2>/dev/null)
151
+ [ -n "$hub_url" ] && hub_present=1
152
+ if [ "$hub_present" = 1 ]; then
153
+ hub_auth=$(jq -r '[.principals[]? | select(.principalType == "PerUserPrincipal") | .authenticationStatus][0]
154
+ | if . == "Configured" then "configured" elif . == "NotConfigured" then "notConfigured" else "unknown" end' "$tmpd/hub.ec" 2>/dev/null)
155
+ fi
156
+ fi
157
+ if [ "$hub_present" = 1 ]; then
158
+ # CLI access by alias exists only if something registered the row's name as an alias here (Core skips names
159
+ # with spaces today). "conflict" = an alias of that name points at a different org than the hub.
160
+ hub_host=$(printf '%s' "$hub_url" | sed -E 's#^https?://##; s#[/?].*$##' | tr 'A-Z' 'a-z')
161
+ hub_alias=unknown
162
+ if [ "$aliases_json" != null ] && [ -n "$hub_name" ]; then
163
+ hub_alias=$(printf '%s' "$aliases_json" | jq -r --arg n "$hub_name" --arg h "$hub_host" \
164
+ '[.[] | select(.alias == $n)][0] as $x | if $x == null then "missing" elif ($h != "" and ($x.host // "") != "" and $x.host != $h) then "conflict" else "registered" end')
165
+ fi
166
+ hub_json=$(jq -nc --arg u "$hub_url" --arg a "${hub_auth:-unknown}" --arg w "$hub_alias" --arg n "$hub_name" \
167
+ '{label: "Lifecycle Center (Production Org)", url: (if $u == "" then null else $u end), userAuth: $a, workspaceAlias: $w, cliAlias: (if $n == "" then null else $n end), isDeployTarget: false}')
168
+ fi
169
+
52
170
  # Identifier -> comparable keys: org id (first 15), host, and a lowercase name.
53
171
  # Local alias or username: expand through `sf org display` to its org id and host.
54
172
  id15=""; host=""; name=""
@@ -73,6 +191,10 @@ fi
73
191
  jq -n \
74
192
  --argjson source "$source_obj" \
75
193
  --argjson rows "$rows_json" \
194
+ --argjson aliases "$aliases_json" \
195
+ --argjson sessions "$sessions_json" \
196
+ --argjson userauth "$user_auth_json" \
197
+ --argjson hub "$hub_json" \
76
198
  --arg ident "$IDENT" --arg id15 "$id15" --arg host "$host" --arg name "$name" '
77
199
  # setup and lightning hosts point at the same org as the My Domain host
78
200
  def norm: ascii_downcase | sub("^https?://"; "") | sub("[/?].*$"; "")
@@ -88,6 +210,15 @@ jq -n \
88
210
  def state: if (.IsExpired == true) then "expired"
89
211
  elif ((ncname == "") or (.OrgUrl // "") == "" or (.OrgIdentifier // "") == "") then "unauthenticated"
90
212
  else "selectable" end;
213
+ # The alias that gives this workspace a login for the environment: one named like it, else any alias on its org.
214
+ # A name match only counts when it points at the same org; an alias carrying the environment name, but on
215
+ # another org, is a collision (aliasConflict), never a login for this environment.
216
+ def namedAlias: (.Name // "") as $n | ([ $aliases[]? | select(.alias == $n) ][0]);
217
+ def aliasConflict: (namedAlias) as $a | ((.OrgIdentifier // "")[0:15]) as $o
218
+ | ($a != null and $o != "" and ($a.orgId // "") != "" and $a.orgId != $o);
219
+ def workspaceLogin: (.Name // "") as $n | ((.OrgIdentifier // "")[0:15]) as $o
220
+ | ( if aliasConflict then null else (namedAlias | if . == null then null else .alias end) end
221
+ // (if $o == "" then null else [ $aliases[]? | select(.orgId == $o) | .alias ][0] end) );
91
222
  [ ($rows.result.records // [])[] | select(ncname != "ALMDevOpsCenterHub" and ((.Name // "") != "Doce Hub Environment" or (.OrgUrl // "") != "")) ] as $recs
92
223
  | ($host | if . == "" then "" else norm end) as $h
93
224
  | [ $recs[] | {
@@ -96,6 +227,21 @@ jq -n \
96
227
  orgId: (.OrgIdentifier // null),
97
228
  namedCredential: (ncname | if . == "" then null else . end),
98
229
  state: state,
230
+ workspaceAlias: ( if $aliases == null then "unknown"
231
+ elif (workspaceLogin != null) then "registered"
232
+ else "missing" end ),
233
+ workspaceAliasName: (if $aliases == null then null else workspaceLogin end),
234
+ aliasConflict: (if $aliases == null then false else aliasConflict end),
235
+ userAuth: (if state == "selectable" then ($userauth[ncname] // "unknown") else null end),
236
+ session: ( (workspaceLogin) as $a | if $a == null then null else ($sessions[$a] // "unknown") end ),
237
+ readiness: ( if state == "expired" then "retired"
238
+ elif state == "unauthenticated" then "needs-signin"
239
+ elif ($userauth[ncname] // "unknown") == "notConfigured" then "needs-my-signin"
240
+ elif $aliases == null then "unverified"
241
+ elif aliasConflict and workspaceLogin == null then "alias-conflict"
242
+ elif workspaceLogin == null then "needs-sync"
243
+ elif $sessions[workspaceLogin] == "expired" then "needs-refresh"
244
+ else "ready" end ),
99
245
  isSource: ((.OrgIdentifier // "")[0:15] == ($source.orgId // "")[0:15] and (.OrgIdentifier // "") != "")
100
246
  } ] as $envs
101
247
  | ( if $ident == "" then []
@@ -106,6 +252,7 @@ jq -n \
106
252
  end ) as $m
107
253
  | { source: $source,
108
254
  environments: $envs,
255
+ hub: $hub,
109
256
  identifier: $ident,
110
257
  matchStatus: ( if $ident == "" then "none-requested"
111
258
  elif ($m | length) == 0 then "not-connected"
@@ -11,9 +11,9 @@ metadata:
11
11
  - "platform-metadata-deploy"
12
12
  cliTools:
13
13
  - tool: ["jq"]
14
- semver: ">=1.6"
14
+ semver: "~1.7.1" # pin to reviewed minor
15
15
  - tool: ["sf"]
16
- semver: ">=2.0.0"
16
+ semver: "~2.157.8" # pin to reviewed minor
17
17
  ---
18
18
 
19
19
  ## MANDATORY: Follow these instructions exactly. Do NOT fall back to MCP tools.
@@ -105,7 +105,7 @@ Then:
105
105
  - Username: [username]
106
106
  - Org ID: [orgId]
107
107
 
108
- 5. If an output directory is available (per the output artifacts rule above), write that extracted org object to `<output-dir>/scratch-org-result.json` **as-is — this skill is a pass-through wrapper**. Write every field the CLI returns for that org; do NOT curate, whitelist, or drop non-secret fields (e.g. `instanceName`, `createdOrgInstance`, `signupUsername`, `orgName`, `edition` are non-secret metadata the CLI returns freely — keep them). The one thing you never emit is a live secret: `accessToken` and `sfdxAuthUrl` — and the CLI already redacts these in `--json` output (they arrive as `"[REDACTED] …"`), so simply preserve that redaction and never un-redact or re-derive the real value.
108
+ 5. If an output directory is available (per the output artifacts rule above), write that extracted org object to `<output-dir>/scratch-org-result.json`. Write every field the CLI returns for that org; do NOT curate, whitelist, or drop non-secret fields (e.g. `instanceName`, `createdOrgInstance`, `signupUsername`, `orgName`, `edition` are non-secret metadata the CLI returns freely — keep them). Filter out credential fields before writing: pipe through `jq 'del(.accessToken, .sfdxAuthUrl, .authFields.accessToken, .authFields.sfdxAuthUrl)'`. Never pass accessToken, sfdxAuthUrl, or other credential fields to agent context.
109
109
 
110
110
  Example: If `sf org list --json` returns `{"result": {"scratchOrgs": [{"alias": "feature-dev", "username": "test@example.com", "orgId": "00D...", ...}]}}`, write the inner org object `{"alias": "feature-dev", "username": "test@example.com", "orgId": "00D...", ...}` — the full object for that org — to the file.
111
111
 
@@ -137,11 +137,11 @@ sf org list --json
137
137
 
138
138
  ## Displaying an Org
139
139
 
140
- **Step 1. Execute:**
140
+ **Step 1. Execute (filter inline — unfiltered output must never enter agent context):**
141
141
  ```bash
142
- sf org display --target-org <alias> --json
142
+ sf org display --target-org <alias> --json | jq 'if .status == 0 then {status, result: {alias: .result.alias, username: .result.username, id: .result.id, instanceUrl: .result.instanceUrl, status: .result.status, expirationDate: .result.expirationDate}} else . end'
143
143
  ```
144
- **Step 2. Report + write output:** report alias / username / orgId / instanceUrl / status / expiration. Write the **wrapped** `{status, result}` JSON to `<output-dir>/org-display-result.json` — do NOT unwrap. In any committed example/gold, `accessToken` and `sfdxAuthUrl` must be redacted (value begins with `[REDACTED]`).
144
+ **Step 2. Report + write output:** Write only the filtered JSON from Step 1 to `<output-dir>/org-display-result.json`. Never pass accessToken, sfdxAuthUrl, or other credential fields to agent context.
145
145
 
146
146
  **`--verbose`:** never add it and never run it from this skill — it returns `sfdxAuthUrl` (a refresh token) into agent context. If the user needs the auth URL, tell them to run `sf org display --verbose` themselves in their own terminal.
147
147
 
@@ -153,13 +153,13 @@ sf org display --target-org <alias> --json
153
153
 
154
154
  For a create that ran with `--async` or timed out (exit code 69).
155
155
 
156
- **Step 1. Execute:**
156
+ **Step 1. Execute (filter inline — unfiltered output must never enter agent context):**
157
157
  ```bash
158
- sf org resume scratch --job-id <id> --json
158
+ sf org resume scratch --job-id <id> --json | jq 'del(.result.accessToken, .result.sfdxAuthUrl, .result.authFields.accessToken, .result.authFields.sfdxAuthUrl)'
159
159
  ```
160
160
  If the user gave an explicit `--job-id`, use it; otherwise default to `--use-most-recent`. If there is no recent job, surface the CLI's not-found result unchanged and point the user to `sf org list` — do not invent a job id.
161
161
 
162
- **Step 2. Write output:** write the command's JSON as-is to `<output-dir>/scratch-org-resume-result.json`.
162
+ **Step 2. Write output:** write the filtered JSON from Step 1 to `<output-dir>/scratch-org-resume-result.json`.
163
163
 
164
164
  **Detail:** `references/scratch-org-operations.md`.
165
165
 
@@ -171,13 +171,13 @@ If the user gave an explicit `--job-id`, use it; otherwise default to `--use-mos
171
171
 
172
172
  **Step 1. Confirm before running.** Ask "Delete scratch org `X`?" and wait for confirmation, UNLESS the user already gave explicit deletion intent. If the target is the current default org, call that out in the confirmation (extra-guard).
173
173
 
174
- **Step 2. Execute** (only after confirmation):
174
+ **Step 2. Execute (filter inline — unfiltered output must never enter agent context)** (only after confirmation):
175
175
  ```bash
176
- sf org delete scratch --target-org <alias> --no-prompt --json
176
+ sf org delete scratch --target-org <alias> --no-prompt --json | jq 'del(.result.accessToken, .result.sfdxAuthUrl, .result.authFields.accessToken, .result.authFields.sfdxAuthUrl)'
177
177
  ```
178
178
  `--no-prompt` is passed *after* the skill's own confirmation, so the agent isn't left waiting on the CLI's interactive prompt.
179
179
 
180
- **Step 3. Write output:** write the command's JSON as-is to `<output-dir>/scratch-org-delete-result.json`.
180
+ **Step 3. Write output:** write the filtered JSON from Step 2 to `<output-dir>/scratch-org-delete-result.json`.
181
181
 
182
182
  **Detail:** `references/scratch-org-operations.md`.
183
183
 
@@ -17,7 +17,5 @@
17
17
  "signupUsername": "test-user@example.com",
18
18
  "alias": "feature-dev"
19
19
  },
20
- "warnings": [
21
- "Secrets are now hidden from 'sf org display' command output. Use the 'sf org auth' commands instead. As a temporary workaround, you can set SF_TEMP_SHOW_SECRETS=true to render these secrets. This workaround will be removed in an upcoming release."
22
- ]
20
+ "warnings": []
23
21
  }
@@ -35,7 +35,5 @@
35
35
  "warnings": [],
36
36
  "orgId": "00Dxx0000000001AAA"
37
37
  },
38
- "warnings": [
39
- "Secrets are now hidden from 'sf org create scratch --json' command output. Use the 'sf org auth' commands instead. As a temporary workaround, you can set SF_TEMP_SHOW_SECRETS=true to render these secrets. This workaround will be removed in an upcoming release."
40
- ]
38
+ "warnings": []
41
39
  }
@@ -134,7 +134,7 @@ sf org open --source-file force-app/main/default/classes/MyController.cls
134
134
  |-------|------------|
135
135
  | No target org found | Set default: `sf config set target-org <alias>` or specify `--target-org <alias>` |
136
136
  | Auth error | Re-authenticate: `sf org login web --alias <alias>` |
137
- | `--source-file` opens wrong page or throws `FlowIdNotFound` / `ApexClassIdNotFound` / `CustomObjectIdNotFound` | Metadata is not deployed in the org. Run `sf project deploy start --source-file <path> --target-org <alias>` first. FlexiPage silently falls back to org home; Flow/ApexClass/CustomObject throw an error. |
137
+ | `--source-file` opens wrong page or throws `FlowIdNotFound` / `ApexClassIdNotFound` / `CustomObjectIdNotFound` | Metadata is not deployed in the org. Tell the user: "This metadata is not deployed. Use `platform-metadata-deploy` to deploy it first, then retry the open command." Do NOT deploy from this skill -- deployment is out of scope. |
138
138
  | Metadata file opens wrong Builder | Verify the file extension matches the metadata type (e.g. `.flow-meta.xml` for Flow Builder) |
139
139
  | User wants the raw login URL | The skill never runs `--url-only` (it returns a live login token). Tell the user to run `sf org open --url-only` in their own terminal. |
140
140
  | Path not found / 404 | Verify the path is correct; some paths require specific permissions or licenses |