@salesforce/afv-skills 1.55.0 → 1.56.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 (220) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/SKILL.md +8 -0
  3. package/skills/agentforce-generate/references/actions-reference.md +2 -2
  4. package/skills/agentforce-generate/references/voice-modality-reference.md +51 -15
  5. package/skills/agentforce-generate/references/voice-telephony-cli.md +193 -0
  6. package/skills/agentforce-observe/SKILL.md +13 -9
  7. package/skills/agentforce-observe/references/ahm-alerts.md +193 -14
  8. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +24 -15
  9. package/skills/automation-sandbox-post-copy-config-generate/assets/config_template.json +11 -0
  10. package/skills/automation-sandbox-post-copy-config-generate/assets/json_schema.json +33 -1
  11. package/skills/automation-sandbox-post-copy-config-generate/references/configuration_catalog.md +32 -1
  12. package/skills/automation-sandbox-post-copy-configure/SKILL.md +75 -71
  13. package/skills/automation-sandbox-post-copy-configure/assets/scheduled_apex_template.apex +13 -0
  14. package/skills/automation-sandbox-post-copy-configure/examples/sample_scheduled_apex_config.json +13 -0
  15. package/skills/automation-sandbox-post-copy-configure/references/scheduled_apex_path.md +155 -0
  16. package/skills/automation-sandbox-post-copy-configure/scripts/build-scheduled-apex.mjs +62 -0
  17. package/skills/automation-sandbox-post-copy-configure/scripts/soql-escape-job-name.mjs +28 -0
  18. package/skills/consumer-goods-accruals-datakit-deploy/SKILL.md +383 -0
  19. package/skills/consumer-goods-accruals-datakit-deploy/scripts/setup.js +324 -0
  20. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/00-check-prerequisites.js +63 -0
  21. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/01-download-static-resource.js +100 -0
  22. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/02-replace-org-id.js +46 -0
  23. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/03-deploy-metadata.js +46 -0
  24. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/04-deploy-engine.js +198 -0
  25. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/05-deploy-tpm-accruals.js +231 -0
  26. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/06-create-dataspace.js +82 -0
  27. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/07-deploy-accruals-reports.js +517 -0
  28. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/08-deploy-ui.js +416 -0
  29. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/09-completion.js +44 -0
  30. package/skills/consumer-goods-accruals-datakit-deploy/scripts/steps/utils.js +514 -0
  31. package/skills/consumer-goods-sync-management-configure/SKILL.md +137 -0
  32. package/skills/consumer-goods-sync-management-configure/examples/scenarios.md +294 -0
  33. package/skills/consumer-goods-sync-management-configure/references/act1-setup-sync.md +333 -0
  34. package/skills/consumer-goods-sync-management-configure/references/act2-assign-users.md +324 -0
  35. package/skills/consumer-goods-sync-management-configure/references/act3-plan-verify.md +113 -0
  36. package/skills/consumer-goods-sync-management-configure/references/readiness-and-enablement.md +164 -0
  37. package/skills/consumer-goods-sync-management-configure/references/sync-management-app-install-backbone.md +159 -0
  38. package/skills/consumer-goods-sync-management-configure/references/transports-and-namespace.md +220 -0
  39. package/skills/consumer-goods-sync-management-configure/references/verify-and-smoke.md +175 -0
  40. package/skills/dx-org-analyze/SKILL.md +0 -1
  41. package/skills/dx-org-analyze/scripts/collect_org_data.py +2 -2
  42. package/skills/dx-org-analyze/scripts/compute_diff.py +2 -4
  43. package/skills/dx-org-analyze/scripts/introspect_org.py +4 -40
  44. package/skills/dx-org-manage/SKILL.md +6 -50
  45. package/skills/dx-org-manage/examples/README.md +10 -16
  46. package/skills/dx-org-manage/references/scratch-org-create.md +1 -1
  47. package/skills/dx-org-manage/references/scratch-org-operations.md +1 -1
  48. package/skills/dx-org-shape-manage/SKILL.md +4 -3
  49. package/skills/education-cloud-domain-configure/references/gotchas-extended.md +1 -0
  50. package/skills/experience-accessibility-validate/SKILL.md +8 -5
  51. package/skills/experience-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +1 -4
  52. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +0 -4
  53. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +20 -85
  54. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +4 -4
  55. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +0 -4
  56. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +2 -4
  57. package/skills/experience-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +0 -4
  58. package/skills/experience-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +4 -14
  59. package/skills/experience-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +9 -5
  60. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +1 -4
  61. package/skills/experience-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +0 -4
  62. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +0 -4
  63. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +0 -4
  64. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +0 -4
  65. package/skills/experience-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +0 -4
  66. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +0 -4
  67. package/skills/experience-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +1 -4
  68. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +1 -4
  69. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +1 -4
  70. package/skills/experience-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +1 -4
  71. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +4 -5
  72. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +1 -4
  73. package/skills/experience-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +0 -4
  74. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +104 -25
  75. package/skills/experience-lwc-accessibility-jest-run/assets/jest.config.js +4 -0
  76. package/skills/experience-lwc-accessibility-jest-run/assets/sa11y-jest-setup.js +5 -0
  77. package/skills/experience-ui-bundle-app-coordinate/SKILL.md +5 -5
  78. package/skills/experience-ui-bundle-features-generate/SKILL.md +65 -36
  79. package/skills/experience-ui-bundle-features-generate/references/angular/features.md +74 -0
  80. package/skills/experience-ui-bundle-features-generate/references/react/features.md +59 -0
  81. package/skills/experience-ui-bundle-features-generate/scripts/detect-framework.sh +73 -0
  82. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +2 -2
  83. package/skills/experience-ui-bundle-metadata-generate/SKILL.md +26 -14
  84. package/skills/experience-ui-bundle-metadata-generate/references/angular-metadata-generate.md +37 -0
  85. package/skills/experience-ui-bundle-metadata-generate/references/react-metadata-generate.md +32 -0
  86. package/skills/experience-ui-bundle-metadata-generate/scripts/detect-framework.sh +73 -0
  87. package/skills/experience-ui-bundle-metadata-generate/scripts/verify-bundle-location.sh +30 -8
  88. package/skills/field-service-data-capture-migrate/SKILL.md +391 -0
  89. package/skills/field-service-data-capture-migrate/assets/sample-legacy-flow.flow-meta.xml +163 -0
  90. package/skills/field-service-data-capture-migrate/references/architecture-notes.md +40 -0
  91. package/skills/field-service-data-capture-migrate/references/component-mapping.md +278 -0
  92. package/skills/field-service-data-capture-migrate/references/converter-builder-contract.md +183 -0
  93. package/skills/field-service-data-capture-migrate/references/dc-platform-rules.md +130 -0
  94. package/skills/field-service-data-capture-migrate/references/fsm-dc-capability-catalog.md +215 -0
  95. package/skills/field-service-data-capture-migrate/references/known-deploy-errors.md +36 -0
  96. package/skills/field-service-data-capture-migrate/references/migration-checklist.md +121 -0
  97. package/skills/field-service-data-capture-migrate/references/transformer-rules.md +132 -0
  98. package/skills/field-service-data-capture-migrate/scripts/analyze_flow.py +277 -0
  99. package/skills/field-service-data-capture-migrate/scripts/convert_to_dc_spec.py +1311 -0
  100. package/skills/field-service-data-capture-migrate/scripts/cud_analysis.py +402 -0
  101. package/skills/field-service-data-capture-migrate/scripts/deploy_flow.sh +230 -0
  102. package/skills/field-service-data-capture-migrate/scripts/discover_subflow_tree.py +230 -0
  103. package/skills/field-service-data-capture-migrate/scripts/flow_input.py +186 -0
  104. package/skills/field-service-data-capture-migrate/scripts/flow_xml_utils.py +39 -0
  105. package/skills/field-service-data-capture-migrate/scripts/fsm_dc_catalog.py +413 -0
  106. package/skills/field-service-data-capture-migrate/scripts/generate_summary.py +199 -0
  107. package/skills/field-service-data-capture-migrate/scripts/json_to_flow_xml.py +146 -0
  108. package/skills/field-service-data-capture-migrate/scripts/manual_review_flags.py +42 -0
  109. package/skills/field-service-data-capture-migrate/scripts/retrieve_flow_rest.sh +155 -0
  110. package/skills/field-service-data-capture-migrate/scripts/subflow_names.py +49 -0
  111. package/skills/field-service-data-capture-migrate/scripts/transform_flow.py +1661 -0
  112. package/skills/field-service-data-capture-migrate/scripts/validate_flow.sh +147 -0
  113. package/skills/field-service-data-capture-migrate/scripts/vendor/build_flow.py +1258 -0
  114. package/skills/life-sciences-fieldsalesrep-coordinate/SKILL.md +1 -1
  115. package/skills/life-sciences-fieldsalesrep-coordinate/references/orchestration-flow.md +1 -1
  116. package/skills/life-sciences-kam-coordinate/references/stage-5-data-and-plan-templates-overview.md +14 -1
  117. package/skills/mobile-apps-create/SKILL.md +1 -1
  118. package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/SKILL.md +7 -7
  119. package/skills/platform-sandbox-configure/SKILL.md +108 -133
  120. package/skills/platform-sandbox-configure/references/api-response-shapes.md +39 -0
  121. package/skills/platform-sandbox-configure/references/definition-file-approach.md +73 -0
  122. package/skills/platform-widget-generate/SKILL.md +26 -18
  123. package/skills/platform-widget-generate/examples/formulas.json +191 -0
  124. package/skills/platform-widget-generate/references/widget-formulas.md +123 -0
  125. package/skills/platform-widget-generate/references/widget-meta-directives.md +4 -4
  126. package/skills/sales-call-scoring-configure/SKILL.md +318 -0
  127. package/skills/sales-call-scoring-configure/assets/best-practice-competencies.json +67 -0
  128. package/skills/sales-call-scoring-configure/assets/ootb-competencies.json +58 -0
  129. package/skills/sales-call-scoring-configure/references/admin-communication.md +79 -0
  130. package/skills/sales-call-scoring-configure/references/competency-crud.md +130 -0
  131. package/skills/sales-call-scoring-configure/scripts/create-competency.sh +166 -0
  132. package/skills/sales-call-scoring-configure/scripts/create-custom-competency.sh +166 -0
  133. package/skills/sales-call-scoring-configure/scripts/edit-competency.sh +185 -0
  134. package/skills/sales-call-scoring-configure/scripts/edit-custom-competency.sh +190 -0
  135. package/skills/sales-call-scoring-configure/scripts/enable-call-scoring.sh +436 -0
  136. package/skills/sales-call-scoring-configure/scripts/get-competency.sh +72 -0
  137. package/skills/sales-call-scoring-configure/scripts/get-custom-competency.sh +78 -0
  138. package/skills/sales-call-scoring-configure/scripts/install-best-practice-competencies.sh +223 -0
  139. package/skills/sales-call-scoring-configure/scripts/install-ootb-competencies.sh +237 -0
  140. package/skills/sales-call-scoring-configure/scripts/list-competencies.sh +99 -0
  141. package/skills/sales-call-scoring-configure/scripts/shared/auth.sh +116 -0
  142. package/skills/sales-call-scoring-configure/scripts/shared/cap.sh +86 -0
  143. package/skills/sales-call-scoring-configure/scripts/shared/soap.sh +267 -0
  144. package/skills/sales-call-scoring-configure/scripts/shared/soql.sh +25 -0
  145. package/skills/sales-call-scoring-configure/scripts/toggle-competency.sh +112 -0
  146. package/skills/sales-call-scoring-configure/scripts/toggle-custom-competency.sh +125 -0
  147. package/skills/sales-call-scoring-configure/scripts/verify-ootb-competencies.sh +116 -0
  148. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +1 -0
  149. package/skills/service-de-channel-activate/SKILL.md +6 -5
  150. package/skills/service-de-channel-create/SKILL.md +3 -3
  151. package/skills/service-de-channel-routing-configure/SKILL.md +3 -3
  152. package/skills/service-de-channel-settings-configure/SKILL.md +195 -0
  153. package/skills/service-de-channel-settings-configure/references/channel-settings-facets.md +152 -0
  154. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/gotchas.md +3 -3
  155. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/language-keywords.md +4 -4
  156. package/skills/{service-de-channel-consent-configure → service-de-channel-settings-configure}/references/worked-examples.md +14 -14
  157. package/skills/service-de-headless-channel-configure/SKILL.md +6 -6
  158. package/skills/service-de-headless-channel-configure/references/worked-examples.md +1 -1
  159. package/skills/service-helpagent-coordinate/SKILL.md +3 -2
  160. package/skills/service-helpagent-coordinate/references/channel-voice.md +15 -4
  161. package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +49 -31
  162. package/skills/service-itsm-agentic-setup-agentforce-coordinate/examples/output-templates.md +71 -6
  163. package/skills/service-itsm-agentic-setup-agentforce-coordinate/scripts/verify-child-verdict.mjs +26 -4
  164. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +35 -10
  165. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +25 -5
  166. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +1 -1
  167. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +5 -5
  168. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +1 -1
  169. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +2 -2
  170. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +1 -1
  171. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +25 -15
  172. package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +8 -5
  173. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/report-format.md +4 -2
  174. package/skills/service-itsm-agentic-setup-employee-agent-configure/references/workflow-detail.md +1 -1
  175. package/skills/service-itsm-agentic-setup-employee-agent-configure/scripts/render-report.mjs +29 -16
  176. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +8 -5
  177. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/report-format.md +4 -2
  178. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/references/workflow-detail.md +1 -1
  179. package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/scripts/render-report.mjs +29 -16
  180. package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +138 -68
  181. package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +31 -15
  182. package/skills/service-itsm-agentic-setup-incident-management/references/incident-persona-psg.md +156 -0
  183. package/skills/service-itsm-agentic-setup-incident-management/references/incident-preferences.md +148 -0
  184. package/skills/service-itsm-agentic-setup-incident-management/references/major-incident-management.md +162 -0
  185. package/skills/service-itsm-agentic-setup-incident-management/references/service-mgmt-privilege.md +149 -0
  186. package/skills/service-itsm-agentic-setup-incident-sla-configure/SKILL.md +103 -89
  187. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/attach-milestone.json +2 -2
  188. package/skills/service-itsm-agentic-setup-incident-sla-configure/assets/predefined-incident-policy.json +21 -39
  189. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/milestone-patterns.md +3 -3
  190. package/skills/service-itsm-agentic-setup-incident-sla-configure/examples/output-templates.md +18 -1
  191. package/skills/service-itsm-agentic-setup-incident-sla-configure/references/mcp-invocation.md +63 -37
  192. package/skills/service-omni-attribute-routing-configure/SKILL.md +53 -0
  193. package/skills/service-omni-attribute-routing-configure/references/api-notes.md +7 -0
  194. package/skills/service-omni-attribute-routing-configure/scripts/configure-and-report.sh +224 -0
  195. package/skills/service-omni-attribute-routing-configure/scripts/tests/test_attribute_routing_contracts.py +137 -0
  196. package/skills/service-omni-channel-inventory-analyze/SKILL.md +96 -0
  197. package/skills/service-omni-channel-inventory-analyze/references/api-notes.md +52 -0
  198. package/skills/service-omni-channel-inventory-analyze/scripts/analyze.sh +185 -0
  199. package/skills/service-omni-channel-inventory-analyze/scripts/tests/_bootstrap.py +84 -0
  200. package/skills/service-omni-channel-inventory-analyze/scripts/tests/test_inventory_analyze_contracts.py +141 -0
  201. package/skills/service-omni-channel-limits-analyze/SKILL.md +70 -0
  202. package/skills/service-omni-channel-limits-analyze/references/api-notes.md +22 -0
  203. package/skills/service-omni-channel-limits-analyze/scripts/analyze.sh +159 -0
  204. package/skills/service-omni-channel-limits-analyze/scripts/tests/_bootstrap.py +87 -0
  205. package/skills/service-omni-channel-limits-analyze/scripts/tests/test_limits_analyze_contracts.py +99 -0
  206. package/skills/service-omni-channel-setup-coordinate/SKILL.md +12 -20
  207. package/skills/service-omni-channel-setup-coordinate/scripts/integration-driver.sh +55 -5
  208. package/skills/service-omni-channel-setup-coordinate/scripts/tests/test_omni_contracts.py +38 -0
  209. package/skills/service-omni-command-center-analyze/SKILL.md +2 -2
  210. package/skills/service-omni-command-center-analyze/scripts/analyze.sh +3 -3
  211. package/skills/dx-org-manage/examples/snapshots/error_output.json +0 -9
  212. package/skills/dx-org-manage/examples/snapshots/success_output.json +0 -15
  213. package/skills/dx-org-manage/references/cli_flags.md +0 -67
  214. package/skills/dx-org-manage/references/creating-snapshot.md +0 -103
  215. package/skills/dx-org-manage/references/snapshot_usage.md +0 -74
  216. package/skills/experience-accessibility-validate/scripts/contrast-ratio.py +0 -153
  217. package/skills/experience-lwc-accessibility-jest-run/references/running-sa11y-jest-tests.md +0 -205
  218. package/skills/experience-ui-bundle-features-generate/scripts/verify-react-bundle.sh +0 -14
  219. /package/skills/experience-ui-bundle-features-generate/references/{conflict-resolution-schema.json → common/conflict-resolution-schema.json} +0 -0
  220. /package/skills/{platform-agentsetup-categories-fetch → platform-agenticsetup-categories-get}/references/api-response-schema.md +0 -0
@@ -38,7 +38,7 @@ CMDB is gated by a 4-layer stack. Every CMDB Connect API checks `orgHasCMDBEnabl
38
38
  ```text
39
39
  Layer 0 Org SKU / license Org perm ITSrvcsCnfgMgmnt must already be granted (edition/
40
40
  license/template). NOT settable by any API — verify only.
41
- Layer 1 Tenant provisioning ITOM tenant must reach status PROVISIONED (async).
41
+ Layer 1 Tenant provisioning CMDB tenant must reach status PROVISIONED (async).
42
42
  Layer 2 Feature enable Enable feature service-cloud-itsm-cmdb-integration. This is
43
43
  what internally sets CMDBEnabled and lifts the 403 gate.
44
44
  Layer 3 User access Assign the PSL + CMDB permission sets to the user(s).
@@ -85,7 +85,7 @@ CMDB is enabled in ordered layers. Each must succeed before the next:
85
85
  | # | Layer | What it does | Status |
86
86
  | --- | ------------------------ | ------------------------------------------------------------ | ------- |
87
87
  | 0 | License check | Confirm this org is licensed for CMDB (set by edition/license — can't be turned on) | Pending |
88
- | 1–2 | Provision & enable CMDB | Set up the CMDB service, then turn on the CMDB feature so it's available to use | Pending |
88
+ | 1–2 | Provision & enable CMDB | Set up the CMDB tenant, then turn on the CMDB feature so it's available to use | Pending |
89
89
  | 3 | Assign user access | Grant CMDB access to the chosen users | Pending |
90
90
  | 4 | Install content bundle | Install the CMDB Foundation (base) content | Pending |
91
91
  | 5 | Enable Asset Discovery | Turn on asset discovery and grant Discovery page access (final step — needs the steps above done first) | Pending |
@@ -13,7 +13,7 @@ Here are the features available for CMDB. Select one or more to configure:
13
13
  ┌───┬───────────────────────────────┬──────────────────────────────────────────────────┬──────────┐
14
14
  │ # │ Feature │ Description │ Status │
15
15
  ├───┼───────────────────────────────┼──────────────────────────────────────────────────┼──────────┤
16
- │ 1 │ CMDB feature enablement │ Verify org SKU, provision the ITOM tenant, and │ Not done │
16
+ │ 1 │ CMDB feature enablement │ Verify org SKU, provision the CMDB tenant, and │ Not done │
17
17
  │ │ │ turn on the service-cloud-cmdb feature │ │
18
18
  │ 2 │ CMDB Foundation bundle │ Install the CMDB Foundation base content bundle │ Not done │
19
19
  │ │ │ (CI types, layouts, sample records) │ │
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: service-itsm-agentic-setup-cmdb-discovery-configure
3
- description: "Enable CMDB Asset Discovery in Service Cloud ITSM against a production or sandbox org by turning on the service-cloud-itsm-discovery-integration feature, then grant a user the Discovery page by assigning the IT Service Discovery Manager permission set and its license — the final CMDB setup layer, run after the CMDB feature, user access, and content bundle are in place. Use when the user asks to enable CMDB discovery, turn on asset discovery, enable service-cloud-itsm-discovery-integration, grant Discovery page access, or assign the Discovery Manager permission set. Triggers on: enable CMDB discovery, turn on asset discovery, service-cloud-itsm-discovery-integration, assign Discovery Manager access, CMDB discovery not enabled. DO NOT TRIGGER when: the user wants to enable the base CMDB feature, provision the ITOM tenant, assign the four CMDB Configuration-Item permission sets, install a CMDB content bundle, or work with CMDB records directly — those are earlier CMDB layers."
3
+ description: "Enable CMDB Asset Discovery in Service Cloud ITSM against a production or sandbox org by turning on the service-cloud-itsm-discovery-integration feature, then grant a user the Discovery page by assigning the IT Service Discovery Manager permission set and its license — the final CMDB setup layer, run after the CMDB feature, user access, and content bundle are in place. Use when the user asks to enable CMDB discovery, turn on asset discovery, enable service-cloud-itsm-discovery-integration, grant Discovery page access, or assign the Discovery Manager permission set. Triggers on: enable CMDB discovery, turn on asset discovery, service-cloud-itsm-discovery-integration, assign Discovery Manager access, CMDB discovery not enabled. DO NOT TRIGGER when: the user wants to enable the base CMDB feature, provision the CMDB tenant, assign the four CMDB Configuration-Item permission sets, install a CMDB content bundle, or work with CMDB records directly — those are earlier CMDB layers."
4
4
  metadata:
5
- version: "1.0"
5
+ version: "1.1"
6
6
  domains: ["Service"]
7
7
  minApiVersion: "67.0"
8
8
  relatedSkills:
@@ -45,7 +45,7 @@ CMDB is enabled in ordered layers, each gated on the prior one:
45
45
 
46
46
  ```text
47
47
  Layer 0 Org SKU / license Org perm ITSrvcsCnfgMgmnt (verify only — no API can set it).
48
- Layer 1 Tenant provisioning ITOM tenant must reach status PROVISIONED (async).
48
+ Layer 1 Tenant provisioning CMDB tenant must reach status PROVISIONED (async).
49
49
  Layer 2 CMDB feature Enable service-cloud-itsm-cmdb-integration (lifts the 403 gate).
50
50
  Layer 3 User access Assign the PSL + CMDB permission sets to the user(s).
51
51
  Layer 4 Content bundle Install the CMDB Foundation (base) content bundle.
@@ -53,10 +53,14 @@ Layer 5 Asset Discovery Enable service-cloud-itsm-discovery-integration
53
53
  IT Service Discovery Manager permission set ← THIS SKILL
54
54
  ```
55
55
 
56
- Discovery is enabled **last**: it builds on the base CMDB feature and depends on the earlier layers
57
- being complete. The pre-check step below (`enableBlockedReasons`) is the authoritative signal that
58
- the prerequisites are met — if the base CMDB feature is not yet enabled, discovery cannot be enabled
59
- and the org reports a blocking reason rather than turning it on.
56
+ Discovery is *recommended* **last**, but it does **not** require the base CMDB feature to already be
57
+ on: the enable **cascade-enables** its dependency (the base CMDB feature) as part of turning Discovery
58
+ on, provided that feature's own prerequisites (e.g. a provisioned CMDB tenant) are met. The
59
+ `enableBlockedReasons` array in the pre-check is the authoritative blocker signal — a base CMDB feature
60
+ that is merely `NOT_ENABLED` appears under `dependencyStatuses` with **empty** `enableBlockedReasons`
61
+ and is **not** a blocker. So never tell the user a direct enable "will error out"; tell them it will
62
+ turn on CMDB first, then Discovery. Only a **non-empty** `enableBlockedReasons` (e.g. tenant not
63
+ provisioned) is a genuine unmet prerequisite that stops the enable.
60
64
 
61
65
  > **Enabling the feature lifts the org-level gate; the Discovery permission set gives a user the
62
66
  > Discovery page.** This skill does **both**: it turns Discovery on for the org (Step 2) and then
@@ -73,7 +77,7 @@ and the org reports a blocking reason rather than turning it on.
73
77
  - **In scope**: pre-checking, enabling, and verifying the `service-cloud-itsm-discovery-integration`
74
78
  feature; and — as a follow-up — assigning the **IT Service Discovery Manager** permission set (and its
75
79
  permission-set license) to the target user so they can access the Discovery page.
76
- - **Out of scope**: enabling the base CMDB feature / provisioning the tenant (Layer 2 —
80
+ - **Out of scope**: enabling the base CMDB feature / provisioning the CMDB tenant (Layer 2 —
77
81
  `service-itsm-agentic-setup-cmdb-configure`), assigning the four Configuration-Item permission sets
78
82
  for CMDB *data* access (Layer 3 — `service-itsm-agentic-setup-cmdb-access-assign`), bundle
79
83
  installation (Layer 4 — `service-itsm-agentic-setup-cmdb-bundle-deploy`), CMDB record CRUD, Service
@@ -139,11 +143,16 @@ dispatch_readonly({ "url": "/services/data/v67.0/connect/setup/discovery/feature
139
143
 
140
144
  - `status == ENABLED` → feature already on; skip to verification (Step 3), then proceed to the access
141
145
  follow-up (Steps 4–7).
142
- - `status == NOT_ENABLED` with `enableBlockedReasons: []` → clear to enable (Step 2).
146
+ - `status == NOT_ENABLED` with `enableBlockedReasons: []` → clear to enable (Step 2). **Before
147
+ confirming, inspect `dependencyStatuses`:** if the base CMDB feature
148
+ (`service-cloud-itsm-cmdb-integration`) is listed there as `NOT_ENABLED`, that is **not** a blocker —
149
+ enabling Discovery will **cascade-enable the base CMDB feature first, then Discovery**. Tell the user
150
+ exactly that ("this will turn on CMDB first, then Asset Discovery"). Do **not** warn that it "will
151
+ error out" or offer to "let it report the dependency error" — neither happens.
143
152
  - `enableBlockedReasons` non-empty → **STOP** and relay each reason to the user in plain language.
144
- These are prerequisites the org still needs — most commonly the base CMDB feature is not yet
145
- enabled. Point the user to the earlier CMDB setup skills (see "Common failures") and do **not**
146
- attempt the enable.
153
+ These are genuine unmet prerequisites the org still needs (e.g. the CMDB tenant is not provisioned,
154
+ so the base feature cannot be enabled). Point the user to the earlier CMDB setup skills (see "Common
155
+ failures") and do **not** attempt the enable.
147
156
  - `403 FUNCTIONALITY_NOT_ENABLED` on this GET → the base CMDB gate itself is still closed; the org
148
157
  needs `service-itsm-agentic-setup-cmdb-configure` first. Stop and route the user there.
149
158
 
@@ -232,7 +241,7 @@ Re-run the two Step 5 assignment queries. The user has Discovery page access onl
232
241
 
233
242
  | Constraint | Rationale |
234
243
  |-----------|-----------|
235
- | Run only after the base CMDB feature is enabled | Discovery is the final layer and depends on Layers 0–4; the pre-check `enableBlockedReasons` enforces this |
244
+ | Running after the base CMDB feature is recommended, not required | Discovery depends on the base CMDB feature, but the enable **cascade-enables** it when it is only `NOT_ENABLED` (empty `enableBlockedReasons`); message the cascade — never claim a direct enable "will error out". The pre-check `enableBlockedReasons` is what actually gates the enable |
236
245
  | Read the pre-check before enabling; verify with a read after enabling | The feature is stateful; the POST response can lag the real state |
237
246
  | Do not attempt the enable when `enableBlockedReasons` is non-empty | Those are unmet prerequisites — relay them and route the user to the earlier CMDB skills |
238
247
  | Always follow the enable with the Discovery-Manager assignment | The feature being on does not give any user the Discovery page; the permission set is what grants page access |
@@ -289,7 +298,8 @@ into what it means ("CMDB isn't fully set up yet"), rather than echoing the code
289
298
 
290
299
  | Symptom | Likely cause | What to tell the user |
291
300
  |---------|--------------|-----------------------|
292
- | Pre-check `enableBlockedReasons` non-empty | An earlier CMDB layer is incomplete (most often the base CMDB feature) | Relay each reason; finish CMDB setup first — run `service-itsm-agentic-setup-cmdb-configure` (base feature), then `-access-assign` (user access) and `-bundle-deploy` (content bundle), then retry discovery |
301
+ | Pre-check `enableBlockedReasons` non-empty | A deeper prerequisite is genuinely unmet (e.g. the CMDB tenant is not provisioned — note a base CMDB feature that is only `NOT_ENABLED` does **not** populate this array; it cascade-enables) | Relay each reason; finish CMDB setup first — run `service-itsm-agentic-setup-cmdb-configure` (provision tenant + base feature), then `-access-assign` (user access) and `-bundle-deploy` (content bundle), then retry discovery |
302
+ | Base CMDB feature was `NOT_ENABLED` before the discovery enable, and enabling discovery turned it on too | Expected — the discovery enable **cascade-enables** its base CMDB dependency; this is **not** a failure | Tell the user upfront (before enabling) that this will turn on CMDB first, then Discovery; never warn it "will error out" |
293
303
  | `403 FUNCTIONALITY_NOT_ENABLED` on the status GET | Base CMDB gate still closed (CMDB feature not enabled) | Not a discovery failure — enable the base CMDB feature first with `service-itsm-agentic-setup-cmdb-configure`, then retry |
294
304
  | Enable blocked (`enableBlockedReasons` non-empty) after a partial setup | Missing dependency the org still needs | Relay each reason; resolve those prerequisites, then retry |
295
305
  | Enable returned success but verification GET is not `ENABLED` | State lag or a downstream issue | Re-run the verification GET after a short wait; if it persists, treat it as not enabled and investigate |
@@ -305,7 +315,7 @@ into what it means ("CMDB isn't fully set up yet"), rather than echoing the code
305
315
 
306
316
  | When | Skill |
307
317
  |------|-------|
308
- | The base CMDB feature is not enabled yet (Discovery pre-check is blocked) | `service-itsm-agentic-setup-cmdb-configure` (Layers 0–2 — enable the base feature first, then return here) |
318
+ | The pre-check reports a genuine blocker (`enableBlockedReasons` non-empty — e.g. the CMDB tenant is not provisioned) | `service-itsm-agentic-setup-cmdb-configure` (Layers 0–2 — provision the tenant and enable the base feature, then return here). A base feature that is only `NOT_ENABLED` is **not** a blocker — Discovery cascade-enables it |
309
319
  | A user needs the underlying CMDB **data** roles (Configuration Item Reader / Owner / Type Reader / Type Manager) | `service-itsm-agentic-setup-cmdb-access-assign` (Layer 3 — CMDB data access, distinct from Discovery page access) |
310
320
 
311
321
  ---
@@ -2,7 +2,7 @@
2
2
  name: service-itsm-agentic-setup-employee-agent-configure
3
3
  description: "Create and activate an IT Service Employee agent as a Next-Gen Authoring (NGA) native agent from an ITSM Employee agent template's Agent Script, via the Salesforce CLI (sf): read the template, check idempotency, create the NGA bundle then publish and activate, verify live. Defaults to the broad IT Service Employee template; when the user names a specialized Employee template (Password Manager Assistance, Certificate Management, Onboarding, Hardware Request, and ~47 others catalogued in references/specialized-templates.md — all under the `svc_emp_intelligence__` namespace), pins that one instead. Idempotent per developer name. TRIGGER when the user asks to create/set up/provision/activate the Employee agent, the IT Service Employee agent, or a specialized Employee agent (password manager, certificate, onboarding, hardware request, etc.). DO NOT TRIGGER: prerequisite checks (service-itsm-agentic-setup-agentforce-studio-validate), CMDB CRUD, Fulfiller setup (service-itsm-agentic-setup-fulfiller-agent-configure)."
4
4
  metadata:
5
- version: "2.5"
5
+ version: "2.8"
6
6
  domains: ["Service", "Agentforce"]
7
7
  minApiVersion: "67.0"
8
8
  relatedSkills:
@@ -107,7 +107,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
107
107
  6. **Phase 5 — Publish.** `POST /nextgen-authoring/bundle-versions/<bundleVersionId>/publish --body '{}'` (empty body required). Success: `{ lastPublishedOn, publishedBotId, publishedBotVersionId }` — this call creates the underlying `BotDefinition`/`BotVersion`. Any error ⇒ surface verbatim; never activate an unpublished version.
108
108
  7. **Phase 6 — Activate.** `POST /nextgen-authoring/bundle-versions/<bundleVersionId>/activate --body '{}'`. Success returns an **empty body** — check exit code, do not parse a payload.
109
109
  8. **Phase 7 — Verify.** SOQL `BotDefinition WHERE Id='<id>'` (+ `BotVersions` subquery) and classify — `<id>` is the create path's `publishedBotId` (captured from Phase 5) or, on the ALREADY-CREATED / reactivation path, the **live matched Id the Phase-2 classifier returned** (its `botDefinitionId`/`agentId` output — the actual `BotDefinition.Id` of the matched record), **not** the Phase-1 template `botDefinitionId` (which is null on a `matchedBy:"developerName"` fallback hit → the verify would run `WHERE Id=''` and falsely report failure after a successful skip/activation). Confirm `exists:true, count:1, latestVersionStatus:"Active"`. Any discrepancy ⇒ report verbatim, do not fabricate success.
110
- 9. **Phase 8 — Aggregate verdict.** Emit CREATED / ALREADY-CREATED / ACTIVATED / FAILED (ACTIVATED on the Phase-2b path) + `BotDefinition` Id / bundle `id` by re-invoking `render-report.mjs` — the single source of report text. If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit stdout as the turn-side report.
110
+ 9. **Phase 8 — Aggregate verdict.** Emit CREATED / ALREADY-CREATED / ACTIVATED / FAILED (ACTIVATED on the Phase-2b path) by re-invoking `render-report.mjs` — the single source of report text. **Never surface internal record IDs** — the bundle version `id`, `publishedBotId`/`BotDefinition`, or `BotVersion` — in the verdict, chat narration, or the report; they are captured only to drive the publish/activate/verify calls and mean nothing to the admin. Report by status/name only ("created and activated"), never "Bundle created (version id …)" / "Published (BotDefinition …)". If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit stdout as the turn-side report.
111
+ 10. **Phase 9 — Runtime-access hand-off (REQUIRED on a live-agent verdict).** When the Phase-8 verdict is `CREATED`, `ALREADY-CREATED`, or `ACTIVATED` (a live agent now exists), raise an `AskUserQuestion` — the same enforced hand-off pattern as the Phase-1 prerequisite and Phase-2b reactivation offers — asking whether to set up the agent's **runtime access** now: _"The agent is live, but its actions call platform features (Prompt Templates, Data Cloud, Unified Catalog) a user can't run until access is granted, so it fails when opened. Set up runtime access now?"_. On **Yes**, delegate to `service-itsm-agentic-setup-agent-runtime-access-assign` (it runs its own target-user selection + confirm-to-write gate). On **No**, stop — the report's "set up access" next-step line stands as the record. Do **NOT** raise this on `PENDING CONFIRMATION`, `DECLINED`, or `FAILED` (no live agent to grant access to). This is an enforced `AskUserQuestion`, not report prose — `render-report.mjs` still emits its plain-language "set up access" line unchanged; the question is what guarantees the offer is actually made every time.
111
112
 
112
113
  ---
113
114
 
@@ -123,7 +124,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
123
124
  | Enumerate `BotDefinition` **with the `BotVersions` subquery**; skip create when Active; offer Phase-2b reactivation when Inactive — never silent skip, never duplicate create | Subquery is what distinguishes Active/Inactive; the server rejects a duplicate `DeveloperName` at publish (unique-constraint → bundle cleanup) but not the pre-provisioned broad agent, so this read is what turns a repeat into a graceful skip instead of a hard error |
124
125
  | **REQUIRED confirm-to-write checkpoint** before create sequence or reactivation call | Both change live org state — explicit user approval required |
125
126
  | On `hasAccess=false` / `403 FUNCTIONALITY_NOT_ENABLED`, offer the readiness hand-off — never enable features here; never call legacy `/connect/service-itsm/createAgent` | Enablement is a Setup-UI/admin action; `createAgent` produces a Setup-page bot with an external-link icon (wrong kind of agent for this skill) |
126
- | Report exact CLI response text on any error | Enables support to diagnose failures |
127
+ | **Never surface internal record IDs** — the bundle version `id` (`1bZ…`), `publishedBotId`/`BotDefinition` (`0Xx…`), `BotVersion` (`0Xv…`) — in chat narration, the confirm-to-write step, or the report; report progress and verdict by status/name only | These IDs are captured solely to drive the publish → activate → verify → verify-read calls; they are meaningless to an admin going through setup and only add noise. `render-report.mjs` renders status-only rows and defensively scrubs any ID; the model must likewise not echo them (never "Bundle created (version id 1bZ…)" / "Published (BotDefinition 0Xx…)") |
128
+ | Report exact CLI response text on any error | Enables support to diagnose failures — this is the one place a raw ID may appear, inside a verbatim error the user must relay to support |
127
129
 
128
130
  ---
129
131
 
@@ -137,7 +139,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
137
139
  - [ ] Bundle body built by `build-create-body.mjs`, POSTed via `--body @<file>` with the collected `developerName`/`label`; or write correctly skipped.
138
140
  - [ ] Same `bundleVersionId` (response `id`) used for publish + activate; reactivation used `POST /connect/bot-versions/<id>/activation`; legacy `createAgent` never called.
139
141
  - [ ] Phase-7 verify confirmed `BotDefinition` present + latest version Active.
140
- - [ ] Access token never extracted; final verdict + `BotDefinition`/bundle Id reported.
142
+ - [ ] On a live-agent verdict (CREATED / ALREADY-CREATED / ACTIVATED), the Phase-9 runtime-access hand-off was raised as an `AskUserQuestion` (delegating to `service-itsm-agentic-setup-agent-runtime-access-assign` on "yes"); NOT raised on PENDING CONFIRMATION / DECLINED / FAILED.
143
+ - [ ] Access token never extracted; final verdict reported with **no internal record IDs** (bundle version `id`, `publishedBotId`/`BotDefinition`, `BotVersion`) surfaced in chat, the confirm-to-write step, or the report — status/name only (raw IDs allowed only inside a verbatim error).
141
144
 
142
145
  ---
143
146
 
@@ -145,7 +148,7 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
145
148
 
146
149
  The report layout is generated deterministically by `scripts/render-report.mjs` — the single source of report text for both the chat turn and the harness's `${outputDir}/report.md`. Never hand-compose the layout in prose (A9); always shell out to the helper. Full rendered shape, report-state JSON schema, and checkpoint-write rules live in `references/report-format.md`.
147
150
 
148
- Terminal verdicts: `CREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED`. When `${outputDir}` is set, write at Phase 2, Phase 6 (or Phase 2b), and Phase 8 — each write overwrites the same file. Skip these writes in interactive/chat surfaces.
151
+ Terminal verdicts: `CREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED`. When `${outputDir}` is set, write at Phase 2, Phase 6 (or Phase 2b), and Phase 8 — each write overwrites the same file. Skip these writes in interactive/chat surfaces. The Phase-9 runtime-access hand-off fires after the Phase-8 report on a live-agent verdict; it does not change the verdict or re-render the report.
149
152
 
150
153
  ---
151
154
 
@@ -23,8 +23,8 @@ Stage 2 — install & activate the agent from its template:
23
23
  | Preflight | Studio hasAccess=<true/false/cannot-confirm>; template agentScript present=<yes/no>; verdict=<READY/NOT-READY/CANNOT-CONFIRM> |
24
24
  | Enumerate | target agent exists before write=<yes/no>; latest version status=<Active/Inactive/n/a>; verdict=<exists:...> |
25
25
  | Confirm-to-write | user-confirmed=<true/false/pending> |
26
- | Create bundle | <bundleVersionId=... / ALREADY-CREATED / skipped (reactivation path) / pending confirmation / FAILED> |
27
- | Publish | <publishedBotId=... / skipped / pending confirmation / FAILED> |
26
+ | Create bundle | <succeeded (created) / ALREADY-CREATED / skipped (reactivation path) / pending confirmation / FAILED> |
27
+ | Publish | <succeeded / skipped / pending confirmation / FAILED> |
28
28
  | Activate | <succeeded (created) / succeeded (reactivated existing) / skipped / pending confirmation / FAILED> |
29
29
  | Verify | <BotDefinition present: yes/no; latest version Active: yes/no / skipped> |
30
30
 
@@ -55,6 +55,8 @@ The caller writes `${SCRATCH_DIR}/report-state.json` and passes it as the first
55
55
 
56
56
  The helper enforces a validated verdict set and picks the `Next steps` line from the verdict, so the file never drifts from that shape.
57
57
 
58
+ **No internal record IDs in the report.** The stage rows carry status only — the bundle version `id`, `publishedBotId`/`BotDefinition`, and `BotVersion` are captured solely to drive the publish/activate/verify calls and are meaningless to an admin, so they are never displayed. The helper renders status-only rows and defensively scrubs any ID that a caller passes inside a stage-status string, so a report can never leak one regardless of the phase-state input. Do not add IDs back in turn-side narration either (never "Bundle created (version id …)" / "Published (BotDefinition …)").
59
+
58
60
  ## Checkpoint writes (harness / non-interactive runs)
59
61
 
60
62
  When `${outputDir}` is provided (via the harness's generated-file location directive), write the helper output to `${outputDir}/report.md` at three checkpoints so it always exists even when a run parks at a confirmation gate:
@@ -162,7 +162,7 @@ Confirm `exists:true` with `count:1`, and — on the create or reactivation path
162
162
 
163
163
  ## Phase 8 — Aggregate verdict
164
164
 
165
- Report the verdict (CREATED / ALREADY-CREATED / ACTIVATED / FAILED) and the resulting `BotDefinition` Id / bundle `id`. Use **ACTIVATED** when Phase 2b's reactivation path was taken (existing agent found inactive, activated instead of creating new). Emit the final report by re-invoking `scripts/render-report.mjs` with the fully populated phase-state JSON. If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit the helper's stdout as the turn-side report.
165
+ Report the verdict (CREATED / ALREADY-CREATED / ACTIVATED / FAILED). Use **ACTIVATED** when Phase 2b's reactivation path was taken (existing agent found inactive, activated instead of creating new). **Do not surface internal record IDs** (the bundle version `id`, `publishedBotId`/`BotDefinition`, `BotVersion`) in the verdict, report, or chat narration — they drive the publish/activate/verify calls but mean nothing to the admin; report by status/name only. Emit the final report by re-invoking `scripts/render-report.mjs` with the fully populated phase-state JSON (it renders status-only rows and scrubs any stray ID). If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit the helper's stdout as the turn-side report.
166
166
 
167
167
  ```bash
168
168
  node "<skill_dir>/scripts/render-report.mjs" ${SCRATCH_DIR}/report-state.json "${outputDir}/report.md"
@@ -115,22 +115,28 @@ const gatedFallback = isPending
115
115
  : isFailed ? 'skipped'
116
116
  : 'pending';
117
117
 
118
- const bundleVersionId = field(state.bundleVersionId, '');
119
- const bundleVersionIdSuffix = bundleVersionId ? ` bundleVersionId=${bundleVersionId}` : '';
120
- const onBundleVersionId = bundleVersionId ? ` on bundleVersionId=${bundleVersionId}` : '';
121
-
122
- function withCreateSuffix(base) {
123
- if (base === 'pending' || base.startsWith('skipped') || base === 'pending confirmation') return base;
124
- return `${base}${bundleVersionIdSuffix}`;
125
- }
126
- function withPublishActivateSuffix(base) {
127
- if (base === 'pending' || base.startsWith('skipped') || base === 'pending confirmation') return base;
128
- return `${base}${onBundleVersionId}`;
118
+ // Internal record IDs (bundleVersionId `1bZ…`, BotDefinition `0Xx…`, BotVersion
119
+ // `0Xv…`) are meaningless to an admin and must never appear in the user-facing
120
+ // report — they are captured only to drive the publish/activate/verify calls.
121
+ // The stage rows carry status only; `scrubInternalIds` strips any ID a caller
122
+ // passed inside a status string, so the "single source of report text" stays
123
+ // ID-free regardless of input (belt-and-braces, like `cell` below).
124
+ function scrubInternalIds(s) {
125
+ return String(s)
126
+ // "bundleVersionId=1bZ…", "on bundleVersionId 1bZ…", "publishedBotId=0Xx…", "BotDefinition 0Xx…", …
127
+ .replace(/\s*\b(?:on\s+)?(?:bundleVersionId|bundleId|publishedBotId|publishedBotVersionId|botDefinitionId|BotDefinition|BotVersion|agentId)\b\s*[:=]?\s*[a-zA-Z0-9]{15,18}\b/g, '')
128
+ // any remaining bare Salesforce-ID token (15/18 alphanumeric, must contain a digit)
129
+ .replace(/\s*\b(?=[a-zA-Z0-9]*[0-9])[a-zA-Z0-9]{15}(?:[a-zA-Z0-9]{3})?\b/g, '')
130
+ // tidy separators orphaned by the removals above
131
+ .replace(/\s*[;,]\s*(?=[;,])/g, '')
132
+ .replace(/[;,\s]+$/g, '')
133
+ .replace(/\s{2,}/g, ' ')
134
+ .trim();
129
135
  }
130
136
 
131
- const createBundle = withCreateSuffix(field(state.createBundle, gatedFallback));
132
- const publish = withPublishActivateSuffix(field(state.publish, gatedFallback));
133
- const activate = withPublishActivateSuffix(field(state.activate, gatedFallback));
137
+ const createBundle = scrubInternalIds(field(state.createBundle, gatedFallback));
138
+ const publish = scrubInternalIds(field(state.publish, gatedFallback));
139
+ const activate = scrubInternalIds(field(state.activate, gatedFallback));
134
140
  const verifyFallback = isDeclined || isPending || isFailed
135
141
  ? 'skipped'
136
142
  : isAlready
@@ -145,8 +151,15 @@ if (
145
151
  ) {
146
152
  verify = `${verify}; exists:true; latestVersionStatus=Active`;
147
153
  }
148
-
149
- const reason = String(state.reason ?? '').trim();
154
+ verify = scrubInternalIds(verify);
155
+
156
+ // `reason` is the FAILED/DECLINED-path field most likely to carry a raw upstream
157
+ // platform error (e.g. an INSUFFICIENT_ACCESS message quoting a BotDefinitionId),
158
+ // so it gets the same scrub as the stage rows above — an internal record ID must
159
+ // never reach the user-facing report/chat (CWE-200/209). Scrubbing here, before
160
+ // NEXT_STEPS, also keeps the FAILED next-step's `reason ? …` branch consistent
161
+ // with what is actually shown in the Reason line.
162
+ const reason = scrubInternalIds(String(state.reason ?? '').trim());
150
163
 
151
164
  // The "set up access" next step below is the handoff to the
152
165
  // `service-itsm-agentic-setup-agent-runtime-access-assign` skill (declared in
@@ -2,7 +2,7 @@
2
2
  name: service-itsm-agentic-setup-fulfiller-agent-configure
3
3
  description: "Create and activate the IT Service Fulfiller agent as a Next-Gen Authoring (NGA) native agent from the shipped ITSM Fulfiller template's Agent Script, using the Salesforce CLI (sf): read the template, check idempotency, create the NGA bundle then publish and activate it, then verify it is live. Idempotent per developer name. The Fulfiller agent is the IT-technician-facing assistant for incident triage, case summarization, field updates, and related-record automations. Use when asked to create the Fulfiller agent, set up the IT Service Fulfiller agent, provision the fulfiller assistant, or activate the Fulfiller agent. Triggers: create fulfiller agent, set up fulfiller agent, provision fulfiller agent, activate fulfiller agent. DO NOT TRIGGER: checking org prerequisites (service-itsm-agentic-setup-agentforce-studio-validate), or CMDB CRUD."
4
4
  metadata:
5
- version: "3.7"
5
+ version: "3.10"
6
6
  domains: ["Service", "Agentforce"]
7
7
  minApiVersion: "67.0"
8
8
  relatedSkills:
@@ -136,7 +136,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
136
136
  7. **Phase 5 — Publish.** `POST /nextgen-authoring/bundle-versions/<bundleVersionId>/publish --body '{}'` (empty body required). Success: `{ lastPublishedOn, publishedBotId, publishedBotVersionId }` — this call creates the underlying `BotDefinition`/`BotVersion`. Any error ⇒ surface verbatim; never activate an unpublished version.
137
137
  8. **Phase 6 — Activate.** `POST /nextgen-authoring/bundle-versions/<bundleVersionId>/activate --body '{}'` captured to `${SCRATCH_DIR}/activate-response.json`, then `node "<skill_dir>/scripts/classify-activate-result.mjs" ${SCRATCH_DIR}/activate-response.json` — activate can return HTTP 200 with a `{success:false}` silent-failure body when a referenced invocable action isn't surfaced; the classifier catches that. `PASS` ⇒ Phase 7; `FAIL` ⇒ surface `messages[]`, offer Phase 2c permset hand-off if a message names a missing action, do NOT report CREATED; `CANNOT-CONFIRM` ⇒ fall through to Phase 7 SOQL verify.
138
138
  9. **Phase 7 — Verify.** SOQL `BotDefinition WHERE Id='<id>'` (+ `BotVersions` subquery) and classify — `<id>` is the create path's `publishedBotId` (captured from Phase 5) or, on the ALREADY-CREATED / reactivation path, the **live matched Id the Phase-2 classifier returned** (its `botDefinitionId`/`agentId` output — the actual `BotDefinition.Id` of the matched record), **not** the Phase-1 template `botDefinitionId` (which is always null for the Fulfiller, so on any existing-agent hit the verify would run `WHERE Id=''` and falsely report failure after a successful skip/activation). Confirm `exists:true, count:1, latestVersionStatus:"Active"`. Any discrepancy ⇒ report verbatim, do not fabricate success.
139
- 10. **Phase 8 — Aggregate verdict.** Emit CREATED / ALREADY-CREATED / ACTIVATED / FAILED (ACTIVATED on the Phase-2b path) + `BotDefinition` Id / bundle `id` by re-invoking `render-report.mjs` — the single source of report text. If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit stdout as the turn-side report.
139
+ 10. **Phase 8 — Aggregate verdict.** Emit CREATED / ALREADY-CREATED / ACTIVATED / FAILED (ACTIVATED on the Phase-2b path) by re-invoking `render-report.mjs` — the single source of report text. **Never surface internal record IDs** — the bundle version `id`, `publishedBotId`/`BotDefinition`, or `BotVersion` — in the verdict, chat narration, or the report; they are captured only to drive the publish/activate/verify calls and mean nothing to the admin. Report by status/name only ("created and activated"), never "Bundle created (version id …)" / "Published (BotDefinition …)". If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit stdout as the turn-side report.
140
+ 11. **Phase 9 — Runtime-access hand-off (REQUIRED on a live-agent verdict).** When the Phase-8 verdict is `CREATED`, `ALREADY-CREATED`, or `ACTIVATED` (a live agent now exists), raise an `AskUserQuestion` — the same enforced hand-off pattern as the Phase-1 prerequisite and Phase-2c permset offers — asking whether to set up the agent's **runtime access** now: _"The agent is live, but its actions call platform features (Prompt Templates, Data Cloud, Unified Catalog) a user can't run until access is granted, so it fails when opened. Set up runtime access now?"_. On **Yes**, delegate to `service-itsm-agentic-setup-agent-runtime-access-assign` (it runs its own target-user selection + confirm-to-write gate). On **No**, stop — the report's "set up access" next-step line stands as the record. Do **NOT** raise this on `PENDING CONFIRMATION`, `DECLINED`, or `FAILED` (no live agent to grant access to). This is an enforced `AskUserQuestion`, not report prose — `render-report.mjs` still emits its plain-language "set up access" line unchanged; the question is what guarantees the offer is actually made every time.
140
141
 
141
142
  ---
142
143
 
@@ -152,7 +153,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
152
153
  | Enumerate `BotDefinition` **with the `BotVersions` subquery**; skip create when Active; offer Phase-2b reactivation when Inactive — never silent skip, never duplicate create | Subquery is what distinguishes Active/Inactive; the server rejects a duplicate `DeveloperName` at publish (unique-constraint → bundle cleanup), so this read is what turns a repeat into a graceful skip instead of that hard error |
153
154
  | **REQUIRED confirm-to-write checkpoint** before create sequence or reactivation call | Both change live org state — explicit user approval required |
154
155
  | On `hasAccess=false` / `403 FUNCTIONALITY_NOT_ENABLED`, offer the readiness hand-off — never enable features here; never call legacy `/connect/service-itsm/createAgent` | Enablement is a Setup-UI/admin action; `createAgent` produces a Setup-page bot with an external-link icon (wrong kind of agent for this skill) |
155
- | Report exact CLI response text on any error | Enables support to diagnose failures |
156
+ | **Never surface internal record IDs** — the bundle version `id` (`1bZ…`), `publishedBotId`/`BotDefinition` (`0Xx…`), `BotVersion` (`0Xv…`) — in chat narration, the confirm-to-write step, or the report; report progress and verdict by status/name only | These IDs are captured solely to drive the publish → activate → verify → verify-read calls; they are meaningless to an admin going through setup and only add noise. `render-report.mjs` renders status-only rows and defensively scrubs any ID; the model must likewise not echo them (never "Bundle created (version id 1bZ…)" / "Published (BotDefinition 0Xx…)") |
157
+ | Report exact CLI response text on any error | Enables support to diagnose failures — this is the one place a raw ID may appear, inside a verbatim error the user must relay to support |
156
158
 
157
159
  ---
158
160
 
@@ -165,7 +167,8 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
165
167
  - [ ] Bundle body built by `build-create-body.mjs`, POSTed via `--body @<file>` with the collected `developerName`/`label`; or write correctly skipped.
166
168
  - [ ] Same `bundleVersionId` (response `id`) used for publish + activate; reactivation used `POST /connect/bot-versions/<id>/activation`; legacy `createAgent` never called.
167
169
  - [ ] Phase-7 verify confirmed `BotDefinition` present + latest version Active.
168
- - [ ] Access token never extracted; final verdict + `BotDefinition`/bundle Id reported.
170
+ - [ ] On a live-agent verdict (CREATED / ALREADY-CREATED / ACTIVATED), the Phase-9 runtime-access hand-off was raised as an `AskUserQuestion` (delegating to `service-itsm-agentic-setup-agent-runtime-access-assign` on "yes"); NOT raised on PENDING CONFIRMATION / DECLINED / FAILED.
171
+ - [ ] Access token never extracted; final verdict reported with **no internal record IDs** (bundle version `id`, `publishedBotId`/`BotDefinition`, `BotVersion`) surfaced in chat, the confirm-to-write step, or the report — status/name only (raw IDs allowed only inside a verbatim error).
169
172
 
170
173
  ---
171
174
 
@@ -173,7 +176,7 @@ Substitute `<alias>` with the collected target org and `<developerName>` / `<lab
173
176
 
174
177
  The report layout is generated deterministically by `scripts/render-report.mjs` — the single source of report text for both the chat turn and the harness's `${outputDir}/report.md`. Never hand-compose the layout in prose (A9); always shell out to the helper. Full rendered shape, report-state JSON schema, and checkpoint-write rules live in `references/report-format.md`.
175
178
 
176
- Terminal verdicts: `CREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED`. When `${outputDir}` is set, write at Phase 3, Phase 6 (or Phase 2b), and Phase 8 — each write overwrites the same file. Skip these writes in interactive/chat surfaces.
179
+ Terminal verdicts: `CREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED`. When `${outputDir}` is set, write at Phase 3, Phase 6 (or Phase 2b), and Phase 8 — each write overwrites the same file. Skip these writes in interactive/chat surfaces. The Phase-9 runtime-access hand-off fires after the Phase-8 report on a live-agent verdict; it does not change the verdict or re-render the report.
177
180
 
178
181
  ---
179
182
 
@@ -19,8 +19,8 @@ Stage 2 — install & activate the agent from its template:
19
19
  | Preflight | Studio hasAccess=<true/false/cannot-confirm>; template agentScript present=<yes/no>; verdict=<READY/NOT-READY/CANNOT-CONFIRM> |
20
20
  | Enumerate | target agent exists before write=<yes/no>; latest version status=<Active/Inactive/n/a>; verdict=<exists:...> |
21
21
  | Confirm-to-write | user-confirmed=<true/false/pending> |
22
- | Create bundle | <bundleVersionId=... / ALREADY-CREATED / skipped (reactivation path) / pending confirmation / skipped / FAILED> |
23
- | Publish | <publishedBotId=... / skipped / pending confirmation / FAILED> |
22
+ | Create bundle | <succeeded (created) / ALREADY-CREATED / skipped (reactivation path) / pending confirmation / skipped / FAILED> |
23
+ | Publish | <succeeded / skipped / pending confirmation / FAILED> |
24
24
  | Activate | <succeeded (created) / succeeded (reactivated existing) / skipped / pending confirmation / FAILED> |
25
25
  | Verify | <BotDefinition present: yes/no; latest version Active: yes/no / skipped / pending> |
26
26
 
@@ -33,6 +33,8 @@ Next steps:
33
33
 
34
34
  The helper enforces a validated verdict set and picks the `Next steps` line from the verdict, so the file never drifts from that shape.
35
35
 
36
+ **No internal record IDs in the report.** The stage rows carry status only — the bundle version `id`, `publishedBotId`/`BotDefinition`, and `BotVersion` are captured solely to drive the publish/activate/verify calls and are meaningless to an admin, so they are never displayed. The helper renders status-only rows and defensively scrubs any ID that a caller passes inside a stage-status string, so a report can never leak one regardless of the phase-state input. Do not add IDs back in turn-side narration either (never "Bundle created (version id …)" / "Published (BotDefinition …)").
37
+
36
38
  ## Checkpoint writes (harness / non-interactive runs)
37
39
 
38
40
  When `${outputDir}` is provided (via the harness's generated-file location directive), invoke the helper at three checkpoints so a report always exists even when a run parks at a confirmation gate:
@@ -142,7 +142,7 @@ Confirm `exists:true` with `count:1`, and — on the create or reactivation path
142
142
 
143
143
  ## Phase 8 — Aggregate verdict
144
144
 
145
- Report CREATED / ALREADY-CREATED / ACTIVATED / FAILED plus the `BotDefinition` Id / bundle `id`. Use **ACTIVATED** when Phase 2b's reactivation path was taken (existing agent found inactive, activated instead of creating new). Emit the final report by re-invoking `scripts/render-report.mjs` — the single source of report text. If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit the helper's stdout as the turn-side report.
145
+ Report CREATED / ALREADY-CREATED / ACTIVATED / FAILED. Use **ACTIVATED** when Phase 2b's reactivation path was taken (existing agent found inactive, activated instead of creating new). **Do not surface internal record IDs** (the bundle version `id`, `publishedBotId`/`BotDefinition`, `BotVersion`) in the verdict, report, or chat narration — they drive the publish/activate/verify calls but mean nothing to the admin; report by status/name only. Emit the final report by re-invoking `scripts/render-report.mjs` — the single source of report text (it renders status-only rows and scrubs any stray ID). If `${outputDir}` was provided, overwrite `${outputDir}/report.md`; otherwise emit the helper's stdout as the turn-side report.
146
146
 
147
147
  ```bash
148
148
  node "<skill_dir>/scripts/render-report.mjs" ${SCRATCH_DIR}/report-state.json "${outputDir}/report.md"
@@ -111,22 +111,28 @@ const gatedFallback = isPending
111
111
  : isFailed ? 'skipped'
112
112
  : 'pending';
113
113
 
114
- const bundleVersionId = field(state.bundleVersionId, '');
115
- const bundleVersionIdSuffix = bundleVersionId ? ` bundleVersionId=${bundleVersionId}` : '';
116
- const onBundleVersionId = bundleVersionId ? ` on bundleVersionId=${bundleVersionId}` : '';
117
-
118
- function withCreateSuffix(base) {
119
- if (base === 'pending' || base.startsWith('skipped') || base === 'pending confirmation') return base;
120
- return `${base}${bundleVersionIdSuffix}`;
121
- }
122
- function withPublishActivateSuffix(base) {
123
- if (base === 'pending' || base.startsWith('skipped') || base === 'pending confirmation') return base;
124
- return `${base}${onBundleVersionId}`;
114
+ // Internal record IDs (bundleVersionId `1bZ…`, BotDefinition `0Xx…`, BotVersion
115
+ // `0Xv…`) are meaningless to an admin and must never appear in the user-facing
116
+ // report — they are captured only to drive the publish/activate/verify calls.
117
+ // The stage rows carry status only; `scrubInternalIds` strips any ID a caller
118
+ // passed inside a status string, so the "single source of report text" stays
119
+ // ID-free regardless of input (belt-and-braces, like `cell` below).
120
+ function scrubInternalIds(s) {
121
+ return String(s)
122
+ // "bundleVersionId=1bZ…", "on bundleVersionId 1bZ…", "publishedBotId=0Xx…", "BotDefinition 0Xx…", …
123
+ .replace(/\s*\b(?:on\s+)?(?:bundleVersionId|bundleId|publishedBotId|publishedBotVersionId|botDefinitionId|BotDefinition|BotVersion|agentId)\b\s*[:=]?\s*[a-zA-Z0-9]{15,18}\b/g, '')
124
+ // any remaining bare Salesforce-ID token (15/18 alphanumeric, must contain a digit)
125
+ .replace(/\s*\b(?=[a-zA-Z0-9]*[0-9])[a-zA-Z0-9]{15}(?:[a-zA-Z0-9]{3})?\b/g, '')
126
+ // tidy separators orphaned by the removals above
127
+ .replace(/\s*[;,]\s*(?=[;,])/g, '')
128
+ .replace(/[;,\s]+$/g, '')
129
+ .replace(/\s{2,}/g, ' ')
130
+ .trim();
125
131
  }
126
132
 
127
- const createBundle = withCreateSuffix(field(state.createBundle, gatedFallback));
128
- const publish = withPublishActivateSuffix(field(state.publish, gatedFallback));
129
- const activate = withPublishActivateSuffix(field(state.activate, gatedFallback));
133
+ const createBundle = scrubInternalIds(field(state.createBundle, gatedFallback));
134
+ const publish = scrubInternalIds(field(state.publish, gatedFallback));
135
+ const activate = scrubInternalIds(field(state.activate, gatedFallback));
130
136
  const verifyFallback = isDeclined || isPending || isFailed
131
137
  ? 'skipped'
132
138
  : isAlready
@@ -141,8 +147,15 @@ if (
141
147
  ) {
142
148
  verify = `${verify}; exists:true; latestVersionStatus=Active`;
143
149
  }
144
-
145
- const reason = String(state.reason ?? '').trim();
150
+ verify = scrubInternalIds(verify);
151
+
152
+ // `reason` is the FAILED/DECLINED-path field most likely to carry a raw upstream
153
+ // platform error (e.g. an INSUFFICIENT_ACCESS message quoting a BotDefinitionId),
154
+ // so it gets the same scrub as the stage rows above — an internal record ID must
155
+ // never reach the user-facing report/chat (CWE-200/209). Scrubbing here, before
156
+ // NEXT_STEPS, also keeps the FAILED next-step's `reason ? …` branch consistent
157
+ // with what is actually shown in the Reason line.
158
+ const reason = scrubInternalIds(String(state.reason ?? '').trim());
146
159
 
147
160
  // The "set up access" next step below is the handoff to the
148
161
  // `service-itsm-agentic-setup-agent-runtime-access-assign` skill (declared in