@salesforce/afv-skills 1.37.0 → 1.38.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 (247) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/README.md +20 -3
  3. package/skills/agentforce-generate/SKILL.md +253 -440
  4. package/skills/agentforce-generate/assets/agent-spec-template.md +6 -2
  5. package/skills/agentforce-generate/assets/agents/order-service.agent +16 -12
  6. package/skills/agentforce-generate/assets/agents/production-faq.agent +4 -4
  7. package/skills/agentforce-generate/assets/agents/router-first.agent +5 -5
  8. package/skills/agentforce-generate/assets/agents/template-single-subagent.agent +4 -4
  9. package/skills/agentforce-generate/assets/agents/verification-gate.agent +8 -6
  10. package/skills/agentforce-generate/assets/agents/voice-knowledge-grounded.agent +9 -9
  11. package/skills/agentforce-generate/assets/agents/voice-service-agent.agent +7 -7
  12. package/skills/agentforce-generate/assets/patterns/README.md +3 -3
  13. package/skills/agentforce-generate/assets/patterns/action-callbacks.agent +5 -5
  14. package/skills/agentforce-generate/assets/patterns/advanced-input-bindings.agent +6 -8
  15. package/skills/agentforce-generate/assets/patterns/bidirectional-routing.agent +11 -13
  16. package/skills/agentforce-generate/assets/patterns/critical-input-collection.agent +11 -16
  17. package/skills/agentforce-generate/assets/patterns/lifecycle-events.agent +2 -3
  18. package/skills/agentforce-generate/assets/patterns/llm-controlled-actions.agent +6 -7
  19. package/skills/agentforce-generate/assets/patterns/open-gate-routing.agent +3 -3
  20. package/skills/agentforce-generate/assets/patterns/prompt-template-action.agent +14 -19
  21. package/skills/agentforce-generate/assets/patterns/system-instruction-overrides.agent +11 -20
  22. package/skills/agentforce-generate/references/actions-reference.md +2 -2
  23. package/skills/agentforce-generate/references/agent-audit-and-repair.md +135 -0
  24. package/skills/agentforce-generate/references/agent-audit-candidate-verification.md +160 -0
  25. package/skills/agentforce-generate/references/agent-audit-diagnostic-catalog.md +156 -0
  26. package/skills/agentforce-generate/references/agent-audit-diagnostics-actions-state.md +176 -0
  27. package/skills/agentforce-generate/references/agent-audit-diagnostics-architecture-evaluation.md +68 -0
  28. package/skills/agentforce-generate/references/agent-audit-diagnostics-instructions-routing.md +283 -0
  29. package/skills/agentforce-generate/references/agent-audit-evaluation-loop.md +191 -0
  30. package/skills/agentforce-generate/references/agent-audit-repair-report.md +143 -0
  31. package/skills/agentforce-generate/references/agent-audit-scope-path-review.md +180 -0
  32. package/skills/agentforce-generate/references/agent-design-and-spec-creation.md +105 -59
  33. package/skills/agentforce-generate/references/agent-script-core-language.md +144 -61
  34. package/skills/agentforce-generate/references/agent-subagent-map-diagrams.md +33 -23
  35. package/skills/agentforce-generate/references/agent-validation-and-debugging.md +37 -11
  36. package/skills/agentforce-generate/references/agentscript-toolchain.md +112 -0
  37. package/skills/agentforce-generate/references/architecture-patterns.md +81 -18
  38. package/skills/agentforce-generate/references/common-control-flow-pitfalls.md +255 -0
  39. package/skills/agentforce-generate/references/control-flow-actions-sequencing.md +198 -0
  40. package/skills/agentforce-generate/references/control-flow-lifecycle-side-effects.md +87 -0
  41. package/skills/agentforce-generate/references/examples.md +22 -22
  42. package/skills/agentforce-generate/references/instruction-resolution.md +123 -83
  43. package/skills/agentforce-generate/references/known-issues.md +1 -2
  44. package/skills/agentforce-generate/references/optimization-pattern-1-data-flow.md +4 -0
  45. package/skills/agentforce-generate/references/optimization-pattern-2-deterministic-logic.md +33 -0
  46. package/skills/agentforce-generate/references/optimization-pattern-3-reference-syntax.md +32 -3
  47. package/skills/agentforce-generate/references/optimization-pattern-4-escalation.md +2 -2
  48. package/skills/agentforce-generate/references/patterns-by-requirement.md +3 -1
  49. package/skills/agentforce-generate/references/posture-and-determinism.md +103 -22
  50. package/skills/agentforce-generate/references/reference-map.md +19 -3
  51. package/skills/agentforce-generate/references/scoring-rubric.md +1 -1
  52. package/skills/agentforce-generate/references/voice-latency-heuristics.md +4 -0
  53. package/skills/agentforce-generate/references/voice-modality-reference.md +4 -4
  54. package/skills/agentforce-generate/references/zen-of-agentscript.md +139 -23
  55. package/skills/agentforce-generate/scripts/agentscript-sdk-loader.mjs +133 -0
  56. package/skills/agentforce-generate/scripts/index-agent.mjs +141 -0
  57. package/skills/agentforce-generate/scripts/setup-agentscript-sdk.mjs +337 -0
  58. package/skills/automation-sandbox-post-copy-config-generate/SKILL.md +1 -1
  59. package/skills/automation-sandbox-post-copy-configure/SKILL.md +433 -0
  60. package/skills/automation-sandbox-post-copy-configure/assets/api_request_templates.json +89 -0
  61. package/skills/automation-sandbox-post-copy-configure/examples/sample_config_input.json +40 -0
  62. package/skills/automation-sandbox-post-copy-configure/examples/sample_execution_summary.md +79 -0
  63. package/skills/automation-sandbox-post-copy-configure/references/api_endpoints.md +273 -0
  64. package/skills/automation-sandbox-post-copy-configure/references/authentication.md +94 -0
  65. package/skills/automation-sandbox-post-copy-configure/references/execution_phasing.md +93 -0
  66. package/skills/automation-sandbox-post-copy-configure/references/rules_gotchas.md +35 -0
  67. package/skills/automation-sandbox-post-copy-configure/scripts/classify-patch-result.mjs +88 -0
  68. package/skills/automation-sandbox-post-copy-configure/scripts/map-metadata-key.mjs +98 -0
  69. package/skills/automation-sandbox-post-copy-configure/scripts/plan-phases.mjs +98 -0
  70. package/skills/automation-sandbox-post-copy-configure/scripts/resolve-target-org.mjs +56 -0
  71. package/skills/design-systems-slds-validate/SKILL.md +14 -13
  72. package/skills/dx-code-analyzer-custom-rule-create/examples/xpath-examples.md +1 -1
  73. package/skills/dx-code-analyzer-custom-rule-create/references/xpath-patterns-security.md +1 -1
  74. package/skills/dx-org-devhub-configure/SKILL.md +268 -0
  75. package/skills/dx-org-devhub-configure/examples/status-output.md +39 -0
  76. package/skills/dx-org-devhub-configure/scripts/devhub.sh +650 -0
  77. package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +116 -0
  78. package/skills/dx-org-manage/SKILL.md +135 -42
  79. package/skills/dx-org-manage/assets/derive-alias.sh +95 -0
  80. package/skills/dx-org-manage/assets/scratch-def.seed.json +6 -0
  81. package/skills/dx-org-manage/examples/README.md +1 -1
  82. package/skills/dx-org-manage/examples/scratch-orgs/delete_output.json +8 -0
  83. package/skills/dx-org-manage/examples/scratch-orgs/display_output.json +23 -0
  84. package/skills/dx-org-manage/examples/scratch-orgs/list_output.json +58 -0
  85. package/skills/dx-org-manage/examples/scratch-orgs/resume_output.json +38 -0
  86. package/skills/dx-org-manage/examples/scratch-orgs/success_definition_file.json +1 -1
  87. package/skills/dx-org-manage/examples/scratch-orgs/success_edition.json +1 -1
  88. package/skills/dx-org-manage/examples/scratch-orgs/success_shape.json +41 -0
  89. package/skills/dx-org-manage/examples/scratch-orgs/success_snapshot.json +1 -1
  90. package/skills/dx-org-manage/examples/snapshots/error_output.json +3 -3
  91. package/skills/dx-org-manage/references/creating-scratch-org.md +2 -2
  92. package/skills/dx-org-manage/references/creating-snapshot.md +1 -2
  93. package/skills/dx-org-manage/references/definition_file_options.md +24 -0
  94. package/skills/dx-org-manage/references/edition_types.md +10 -8
  95. package/skills/dx-org-manage/references/opening-org.md +11 -12
  96. package/skills/dx-org-manage/references/scratch-org-create.md +303 -0
  97. package/skills/dx-org-manage/references/scratch-org-operations.md +135 -0
  98. package/skills/experience-aura-lwc-migrate/SKILL.md +120 -0
  99. package/skills/experience-aura-lwc-migrate/references/aura-api-expert.md +170 -0
  100. package/skills/experience-aura-lwc-migrate/references/aura-data-expert.md +172 -0
  101. package/skills/experience-aura-lwc-migrate/references/aura-migration-guidelines.md +299 -0
  102. package/skills/experience-aura-lwc-migrate/references/aura-prd-framework.md +79 -0
  103. package/skills/experience-aura-lwc-migrate/references/aura-redundant-code-expert.md +24 -0
  104. package/skills/experience-aura-lwc-migrate/references/aura-reference-expert.md +140 -0
  105. package/skills/experience-aura-lwc-migrate/references/aura-resolver-expert.md +115 -0
  106. package/skills/experience-aura-lwc-migrate/references/aura-slots-expert.md +67 -0
  107. package/skills/experience-aura-lwc-migrate/references/aura-style-expert.md +62 -0
  108. package/skills/experience-aura-lwc-migrate/references/aura-to-lwc-completeness-checklist.md +188 -0
  109. package/skills/experience-aura-lwc-migrate/references/aura-values-expert.md +67 -0
  110. package/skills/experience-content-media-search/SKILL.md +17 -12
  111. package/skills/experience-content-media-stock-image-search/SKILL.md +192 -0
  112. package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +102 -0
  113. package/skills/experience-lds-best-practices-apply/SKILL.md +245 -0
  114. package/skills/experience-lds-best-practices-apply/references/adapter-apis.md +1640 -0
  115. package/skills/experience-lds-best-practices-apply/references/lds-data-consistency.md +126 -0
  116. package/skills/experience-lds-best-practices-apply/references/lds-expert.md +429 -0
  117. package/skills/experience-lds-best-practices-apply/references/lds-referential-integrity.md +322 -0
  118. package/skills/experience-lds-best-practices-apply/references/wire-adapter-types.md +1511 -0
  119. package/skills/experience-lds-graphql-generate/SKILL.md +222 -0
  120. package/skills/experience-lds-graphql-generate/references/generation-guide.md +236 -0
  121. package/skills/experience-lds-graphql-generate/references/generation-mutation.md +277 -0
  122. package/skills/experience-lds-graphql-generate/references/generation-query.md +237 -0
  123. package/skills/experience-lds-graphql-generate/scripts/fetch-lds-graphql-schema.sh +230 -0
  124. package/skills/experience-lds-graphql-generate/scripts/test-lds-graphql-query.sh +128 -0
  125. package/skills/experience-lwc-accessibility-validate/SKILL.md +112 -0
  126. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-1-1-non-text-content.md +88 -0
  127. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-i-lists.md +52 -0
  128. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-ii-tables.md +106 -0
  129. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-iii-form-labels.md +78 -0
  130. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-iv-regions.md +26 -0
  131. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-1-v-groups.md +66 -0
  132. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-3-5-identify-input.md +70 -0
  133. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-1-4-3-contrast.md +115 -0
  134. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-1-1-keyboard.md +47 -0
  135. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-4-4-link-purpose.md +39 -0
  136. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-4-6-headings-labels.md +50 -0
  137. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-1-pointer-gestures.md +54 -0
  138. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-2-pointer-cancellation.md +49 -0
  139. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-3-label-in-name.md +77 -0
  140. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-2-5-7-dragging-movement.md +45 -0
  141. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-2-1-on-focus.md +55 -0
  142. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-2-2-on-input.md +51 -0
  143. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-1-error-identification.md +84 -0
  144. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-2-labels-instructions.md +50 -0
  145. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-3-3-3-error-suggestion.md +64 -0
  146. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-i-name.md +105 -0
  147. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-ii-role.md +99 -0
  148. package/skills/experience-lwc-accessibility-validate/references/reviewers/sc-4-1-2-iii-value.md +97 -0
  149. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-1-1-non-text-content.md +83 -0
  150. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-1-use-of-color.md +62 -0
  151. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-10-resize-reflow.md +18 -0
  152. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-11-non-text-contrast.md +43 -0
  153. package/skills/experience-lwc-accessibility-validate/references/vision/sc-1-4-3-contrast.md +25 -0
  154. package/skills/experience-lwc-accessibility-validate/scripts/contrast-ratio.py +153 -0
  155. package/skills/experience-lwc-design-generate/SKILL.md +261 -0
  156. package/skills/experience-lwc-design-generate/references/figma-to-prd-blueprint.md +66 -0
  157. package/skills/experience-lwc-design-generate/references/prd-analysis-template.md +17 -0
  158. package/skills/experience-lwc-design-generate/scripts/check-component-name.sh +75 -0
  159. package/skills/experience-lwc-design-generate/scripts/detect-project-tools.sh +97 -0
  160. package/skills/experience-lwc-runtime-observe/SKILL.md +244 -0
  161. package/skills/experience-lwc-runtime-observe/examples/component-preview-and-dom.md +41 -0
  162. package/skills/experience-lwc-runtime-observe/scripts/extract-dom.sh +79 -0
  163. package/skills/experience-lwc-runtime-observe/scripts/open-frontdoor.sh +46 -0
  164. package/skills/experience-lwc-runtime-observe/scripts/verify-toolchain.sh +48 -0
  165. package/skills/experience-lwc-security-validate/SKILL.md +151 -0
  166. package/skills/experience-lwc-security-validate/examples/review-report.md +6 -0
  167. package/skills/experience-lwc-security-validate/examples/score-report.sarif.json +32 -0
  168. package/skills/experience-lwc-security-validate/references/lws-security-expert.md +986 -0
  169. package/skills/experience-lwc-security-validate/references/security-analysis.md +611 -0
  170. package/skills/experience-lwc-security-validate/scripts/check-lwc-import.sh +166 -0
  171. package/skills/experience-lwc-security-validate/scripts/validate-sarif.sh +131 -0
  172. package/skills/experience-ui-bundle-2gp-deploy/SKILL.md +454 -0
  173. package/skills/experience-ui-bundle-2gp-deploy/assets/CustomApplication.app-meta.xml +12 -0
  174. package/skills/experience-ui-bundle-2gp-deploy/assets/PermissionSet.permissionset-meta.xml +9 -0
  175. package/skills/experience-ui-bundle-2gp-deploy/scripts/find-bundle-package-dir.sh +53 -0
  176. package/skills/experience-ui-bundle-agentforce-client-generate/SKILL.md +104 -26
  177. package/skills/experience-ui-bundle-agentforce-client-generate/references/constraints.md +35 -24
  178. package/skills/experience-ui-bundle-agentforce-client-generate/references/examples.md +92 -1
  179. package/skills/experience-ui-bundle-agentforce-client-generate/references/style-tokens.md +2 -0
  180. package/skills/experience-ui-bundle-agentforce-client-generate/references/troubleshooting.md +14 -1
  181. package/skills/experience-ui-bundle-agentforce-client-generate/scripts/detect-framework.sh +67 -0
  182. package/skills/experience-ui-bundle-deploy/SKILL.md +83 -14
  183. package/skills/experience-ui-bundle-deploy/assets/Communities.settings-meta.xml +19 -0
  184. package/skills/experience-ui-bundle-deploy/assets/org-setup.config.template.json +5 -0
  185. package/skills/experience-ui-bundle-deploy/assets/social-login-auth-providers.apex +158 -0
  186. package/skills/experience-ui-bundle-deploy/references/config-scaffold.md +13 -1
  187. package/skills/experience-ui-bundle-deploy/references/social-login.md +179 -0
  188. package/skills/experience-ui-bundle-frontend-generate/SKILL.md +14 -0
  189. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +6 -5
  190. package/skills/experience-ui-bundle-mfa-configure/references/social-login.md +15 -7
  191. package/skills/experience-ui-bundle-salesforce-data-access/SKILL.md +41 -5
  192. package/skills/experience-ui-bundle-salesforce-data-access/references/caching.md +10 -22
  193. package/skills/experience-ui-bundle-salesforce-data-access/references/graphql-hand-authoring.md +4 -19
  194. package/skills/experience-ui-bundle-salesforce-data-access/references/migration.md +5 -0
  195. package/skills/experience-ui-bundle-salesforce-data-access/references/sdk-api.md +33 -150
  196. package/skills/mobile-platform-native-capabilities-integrate/references/nfc.md +35 -0
  197. package/skills/platform-apex-generate/SKILL.md +8 -7
  198. package/skills/platform-apex-test-generate/SKILL.md +3 -1
  199. package/skills/platform-apex-test-run/SKILL.md +9 -8
  200. package/skills/platform-lightning-type-widget-coordinate/SKILL.md +1 -1
  201. package/skills/platform-lightning-type-widget-coordinate/examples/existing-lightning-type-with-widget-prompt.md +1 -1
  202. package/skills/platform-lightning-type-widget-coordinate/examples/new-lightning-type-with-widget-prompt.md +1 -1
  203. package/skills/platform-lightning-type-widget-coordinate/references/validation-gates.md +3 -3
  204. package/skills/platform-mcp-tool-widget-coordinate/SKILL.md +43 -67
  205. package/skills/platform-mcp-tool-widget-coordinate/examples/action-name-source-prompt.md +1 -2
  206. package/skills/platform-mcp-tool-widget-coordinate/examples/apex-invocable-source-prompt.md +2 -3
  207. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-list-source-prompt.md +163 -0
  208. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-single-source-prompt.md +198 -0
  209. package/skills/platform-mcp-tool-widget-coordinate/examples/pasted-tool-output-prompt.md +0 -1
  210. package/skills/platform-mcp-tool-widget-coordinate/references/build-plan-format.md +17 -11
  211. package/skills/platform-mcp-tool-widget-coordinate/references/mcp-tool-output-discovery.md +48 -15
  212. package/skills/platform-mcp-tool-widget-coordinate/references/two-clt-modeling.md +73 -10
  213. package/skills/platform-mcp-tool-widget-coordinate/references/validation-gates.md +48 -8
  214. package/skills/platform-policy-rule-generate/SKILL.md +22 -12
  215. package/skills/platform-policy-rule-generate/references/deploy-errors.md +1 -1
  216. package/skills/platform-policy-rule-generate/references/policy-schema-full.md +8 -29
  217. package/skills/platform-policy-rule-generate/references/templates-advanced.md +1 -1
  218. package/skills/platform-sharing-owd-configure/SKILL.md +20 -8
  219. package/skills/platform-sharing-owd-configure/references/access_levels.md +14 -1
  220. package/skills/platform-sharing-rules-generate/SKILL.md +67 -35
  221. package/skills/platform-sharing-rules-generate/examples/create-cases.md +16 -17
  222. package/skills/platform-sharing-rules-generate/examples/delete-cases.md +34 -79
  223. package/skills/platform-sharing-rules-generate/examples/edit-cases.md +13 -26
  224. package/skills/platform-sharing-rules-generate/scripts/count-remaining-rules.sh +33 -0
  225. package/skills/platform-widget-generate/SKILL.md +3 -5
  226. package/skills/platform-widget-generate/examples/conditional.json +18 -13
  227. package/skills/platform-widget-generate/examples/list-with-foreach.json +2 -2
  228. package/skills/platform-widget-generate/examples/single-object.json +2 -2
  229. package/skills/platform-widget-generate/references/schema-from-lightning-type.md +27 -6
  230. package/skills/platform-widget-generate/references/widget-bundle-layout.md +4 -3
  231. package/skills/service-itsm-agentic-setup-cmdb-access-assign/SKILL.md +287 -0
  232. package/skills/service-itsm-agentic-setup-cmdb-access-assign/references/mcp-invocation.md +260 -0
  233. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/SKILL.md +252 -0
  234. package/skills/service-itsm-agentic-setup-cmdb-bundle-deploy/references/mcp-invocation.md +204 -0
  235. package/skills/service-itsm-agentic-setup-cmdb-configure/SKILL.md +259 -0
  236. package/skills/service-itsm-agentic-setup-cmdb-configure/references/mcp-invocation.md +188 -0
  237. package/skills/service-itsm-agentic-setup-cmdb-coordinate/SKILL.md +197 -0
  238. package/skills/service-itsm-agentic-setup-cmdb-coordinate/examples/output-templates.md +77 -0
  239. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/SKILL.md +316 -0
  240. package/skills/service-itsm-agentic-setup-cmdb-discovery-configure/references/mcp-invocation.md +221 -0
  241. package/skills/service-itsm-incident-priority-configure/SKILL.md +168 -0
  242. package/skills/service-itsm-incident-priority-configure/examples/matrix-operations.md +200 -0
  243. package/skills/service-itsm-incident-priority-configure/examples/render-matrix.md +54 -0
  244. package/skills/service-itsm-incident-priority-configure/examples/seed-full-matrix.md +52 -0
  245. package/skills/service-itsm-incident-priority-configure/references/sf-cli-invocation.md +264 -0
  246. package/skills/platform-mcp-tool-widget-coordinate/examples/nested-object-source-prompt.md +0 -191
  247. package/skills/platform-policy-rule-generate/references/fixtures-index.md +0 -29
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: experience-ui-bundle-agentforce-client-generate
3
- description: "Use this skill when the user asks to add, embed, integrate, configure, style, or remove an agent, chatbot, chat widget, conversation client, or AI assistant in a UI Bundle project. TRIGGER when: project contains a uiBundles/*/src/ directory and the task involves adding or modifying a chat widget, chatbot, or conversational AI; files under uiBundles/*/src/ import AgentforceConversationClient; user asks to add any chat or agent functionality to a page. DO NOT TRIGGER when: user wants to create a custom agent, chatbot, or chat widget component from scratch; the project has no uiBundles directory."
3
+ description: "Use this skill when the user asks to add, embed, integrate, configure, style, or remove an agent, chatbot, chat widget, conversation client, or AI assistant in a UI Bundle project (React or Angular). TRIGGER when: project contains a uiBundles/*/src/ directory and the task involves adding or modifying a chat widget, chatbot, or conversational AI; files under uiBundles/*/src/ import AgentforceConversationClient in React `.tsx`/`.jsx` files, or use the app-agentforce-conversation-client element in Angular `.html` templates and AgentforceConversationClientComponent in `.component.ts` files; user asks to add any chat or agent functionality to a page. DO NOT TRIGGER when: user wants to create a custom agent, chatbot, or chat widget component from scratch; the project has no uiBundles directory."
4
4
  metadata:
5
- version: "1.1"
5
+ version: "1.2"
6
6
  cliTools:
7
7
  - tool: ["npm"]
8
8
  semver: ">=9.0.0"
@@ -12,7 +12,14 @@ metadata:
12
12
 
13
13
  # Managing Agentforce Conversation Client
14
14
 
15
- **HARD CONSTRAINT:** NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing `<AgentforceConversationClient />` from `@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client` as documented below. If a requirement is unsupported by this component's props, state the limitation — do not improvise an alternative.
15
+ This skill is **framework-agnostic**: it supports both React and Angular UI Bundle apps. The Agentforce client ships as two feature packages that wrap the same Lightning Out glue — pick the one matching the app's framework (detected in Step 0):
16
+
17
+ | Framework | Feature package | Element | Component symbol |
18
+ |-----------|-----------------|---------|------------------|
19
+ | React | `@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client` | `<AgentforceConversationClient />` | `AgentforceConversationClient` |
20
+ | Angular | `@salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client` | `<app-agentforce-conversation-client>` | `AgentforceConversationClientComponent` |
21
+
22
+ **HARD CONSTRAINT:** NEVER create a custom agent, chatbot, or chat widget component. ALL such requests MUST be fulfilled by importing and rendering the existing framework-appropriate component (React `<AgentforceConversationClient />` or Angular `<app-agentforce-conversation-client>`) from its feature package as documented below. If a requirement is unsupported by the component's props/inputs, state the limitation — do not improvise an alternative.
16
23
 
17
24
  ## Prerequisites
18
25
 
@@ -21,20 +28,48 @@ Before the component will work, the following Salesforce settings must be config
21
28
  **Trusted domains (required only for local development):**
22
29
 
23
30
  - Setup → Session Settings → Trusted Domains for Inline Frames → Add your domain
24
- - Local development: `localhost:5173` (default Vite dev server port)
31
+ - Local development: `localhost:<dev-server-port>` — React (Vite) defaults to `localhost:5173`; the Angular template may use a different port (check the app's dev-server config, e.g. `localhost:5174`). Add whichever port the app actually runs on.
25
32
  - **Warning:** Remove this trusted domain entry before deploying to production.
26
33
 
27
34
  ## Instructions
28
35
 
36
+ ### Step 0: Detect the app framework
37
+
38
+ Determine whether the target UI Bundle app is **React** or **Angular** before doing anything else — it drives discovery, import, element syntax, and prop binding in every step below.
39
+
40
+ Run the bundled detector against the app (or uiBundle) root. It performs the detection deterministically and prints exactly one token — `react`, `angular`, `ambiguous`, or `unknown`:
41
+
42
+ ```bash
43
+ bash "<skill_dir>/scripts/detect-framework.sh" "<app-or-uiBundle-root>"
44
+ ```
45
+
46
+ The detector combines: an `angular.json` at/above the root; `@angular/core` / `react` in any non-`node_modules` `package.json`; and source-file signatures (`*.component.ts`, `app.routes.ts`, or `@Component`-decorated classes for Angular; `*.tsx`/`*.jsx` for React).
47
+
48
+ Act on the result:
49
+
50
+ - `react` or `angular` → use that framework. **Do NOT ask the user** — the detection is deterministic.
51
+ - `ambiguous` (both frameworks detected) or `unknown` (neither) → ask the user which framework the app uses before proceeding.
52
+
53
+ Carry the resolved framework through the remaining steps.
54
+
29
55
  ### Step 1: Check if component already exists
30
56
 
31
- Search for existing usage across all app files (not implementation files):
57
+ Search for existing usage across all app files (not implementation files). Use the grep for the detected framework:
32
58
 
59
+ **React:**
33
60
  ```bash
34
61
  grep -r "AgentforceConversationClient" --include="*.tsx" --include="*.jsx" --exclude-dir=node_modules
35
62
  ```
36
63
 
37
- **Important:** Look for React files that import and USE the component (for example, shared shells, route components, or feature pages). Do NOT open files named `AgentforceConversationClient.tsx` or `AgentforceConversationClient.jsx` - those are the component implementation.
64
+ **Angular:**
65
+ ```bash
66
+ grep -rn "app-agentforce-conversation-client" --include="*.html" --exclude-dir=node_modules
67
+ grep -rn "AgentforceConversationClientComponent" --include="*.ts" --exclude-dir=node_modules
68
+ ```
69
+
70
+ **Important:** Look for the files that USE the element (for example, shared shells/layouts, route components, or feature pages) — for Angular the `<app-agentforce-conversation-client>` tag lives in a `*.html` template and the component is registered in the host's `imports: [...]`. Do NOT open the component *implementation* files:
71
+ - React: `AgentforceConversationClient.tsx` / `AgentforceConversationClient.jsx`
72
+ - Angular: `conversation.ts`, `conversation.html`, `__inherit__conversation.ts`, `agentforce-embed.service.ts`
38
73
 
39
74
  **If multiple files found:** Ask the user which component file they are referring to. Do not proceed until clarified.
40
75
 
@@ -144,7 +179,9 @@ If the SOQL query fails, surface the error message from the response directly to
144
179
 
145
180
  ### Step 3: Canonical import strategy
146
181
 
147
- Use this import path by default in app code:
182
+ Use the import for the detected framework.
183
+
184
+ **React** — import the component by default in app code:
148
185
 
149
186
  ```tsx
150
187
  import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
@@ -156,9 +193,28 @@ If the package is not installed, install it:
156
193
  npm install @salesforce/ui-bundle-template-feature-react-agentforce-conversation-client
157
194
  ```
158
195
 
159
- Only use a local relative import (for example, `./components/AgentforceConversationClient`) when the user explicitly asks to use a patched/local component in that app.
196
+ **Angular** — import the standalone component **and register it in the host component's `imports` array** (Angular renders nothing without this registration — there is no React analogue):
197
+
198
+ ```ts
199
+ import { AgentforceConversationClientComponent } from "@salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client";
160
200
 
161
- Do not infer import path from file discovery alone. Prefer one consistent package import across the codebase.
201
+ @Component({
202
+ selector: "app-layout",
203
+ imports: [/* existing imports */, AgentforceConversationClientComponent],
204
+ templateUrl: "./app-layout.html",
205
+ })
206
+ export class AppLayoutComponent {}
207
+ ```
208
+
209
+ If the package is not installed, install it:
210
+
211
+ ```bash
212
+ npm install @salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client
213
+ ```
214
+
215
+ **Local/composed imports:** Only use a local relative import when the user explicitly asks to use a patched/local component, OR when the app is a composed UI Bundle that already inherits the feature file locally — React composed apps import from `./components/AgentforceConversationClient`, and Angular composed apps import `AgentforceConversationClientComponent` from the inherited feature file (for example `../../../features/agentforce/__inherit__conversation`). If the host already imports it that way, match the existing import rather than switching to the package.
216
+
217
+ Do not infer the import path from file discovery alone. Prefer one consistent import across the codebase.
162
218
 
163
219
  ### Step 4: Add or update component
164
220
 
@@ -169,32 +225,38 @@ Determine which sub-step applies:
169
225
 
170
226
  #### 4a — New installation
171
227
 
172
- 1. If the user already specified a target file, use that file. Otherwise, ask the user: _"Which file should I add the AgentforceConversationClient to?"_ Do NOT proceed until a target file is confirmed.
173
- 2. Read the target file to understand its existing imports and TSX structure.
174
- 3. Add the import at the top of the file, alongside existing imports. Use the canonical package import from Step 3:
175
-
176
- ```tsx
177
- import { AgentforceConversationClient } from "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client";
178
- ```
179
-
180
- 4. Insert the `<AgentforceConversationClient />` TSX into the component's return block. Place it as a sibling of existing content — do NOT wrap or restructure existing TSX. Use the real `agentId` obtained in Step 2. If no agentId was resolved (user skipped Step 2), use the placeholder:
228
+ 1. If the user already specified a target file, use that file. Otherwise, ask the user: _"Which file should I add the Agentforce Conversation Client to?"_ Do NOT proceed until a target file is confirmed. (React: a `*.tsx`/`*.jsx` component. Angular: the host component's `*.html` template — plus its `*.ts` for import + `imports: []` registration.)
229
+ 2. Read the target file(s) to understand the existing imports and template structure.
230
+ 3. Add the import from Step 3. **Angular additionally requires registering the component in the host `@Component({ imports: [...] })` array** — without this the element renders nothing.
231
+ 4. Insert the element as a sibling of existing content — do NOT wrap or restructure existing markup. Use the real `agentId` from Step 2, or the placeholder `<YOUR_AGENT_ID>` if the user skipped Step 2.
181
232
 
182
- **With resolved agentId:**
233
+ **React (JSX):**
183
234
  ```tsx
184
235
  <AgentforceConversationClient agentId="0Xx8X00000001AbCDE" />
185
236
  ```
186
237
 
187
- **Without resolved agentId (user skipped):**
188
- ```tsx
189
- <AgentforceConversationClient agentId="<YOUR_AGENT_ID>" />
238
+ **Angular (template):**
239
+ ```html
240
+ <app-agentforce-conversation-client agentId="0Xx8X00000001AbCDE" />
190
241
  ```
191
242
 
192
243
  5. Do NOT add any other code (wrappers, layout components, new functions) unless the user explicitly requests it.
193
244
 
245
+ > **Angular prop-binding rule (critical):** input *names* are identical to React, but binding syntax differs. A bare attribute is a **string**, so booleans/numbers/objects MUST use `[prop]` binding:
246
+ > - string → `agentId="0Xx..."`, `width="420px"` (plain attribute is fine)
247
+ > - boolean → `[inline]="true"`, `[headerEnabled]="false"` (NOT bare `inline`, which yields the string `""`)
248
+ > - number → `[width]="420"`
249
+ > - object → `[styleTokens]="{ headerBlockBackground: '#0176d3' }"`
250
+
251
+ **Verify before finishing (Angular):**
252
+
253
+ - [ ] Every non-string input (boolean/number/object) uses `[prop]` binding — no bare `inline`/`headerEnabled` attributes.
254
+ - [ ] `AgentforceConversationClientComponent` is registered in the host component's `@Component({ imports: [...] })` array (the element renders nothing without it).
255
+
194
256
  #### 4b — Update existing
195
257
 
196
258
  1. Read the file identified in Step 1.
197
- 2. Locate the existing `<AgentforceConversationClient ... />` TSX element.
259
+ 2. Locate the existing element (`<AgentforceConversationClient ... />` for React, `<app-agentforce-conversation-client ...>` for Angular).
198
260
  3. Apply **only** the changes the user requested. Rules:
199
261
  - **Add** new props that the user asked for.
200
262
  - **Change** prop values the user asked to update.
@@ -209,7 +271,7 @@ If the user reports an error after the component has been set up (e.g., "it's no
209
271
 
210
272
  ### Step 5: Configure props
211
273
 
212
- **Available props (use directly on component):**
274
+ **Available props/inputs (identical names in both frameworks; only the binding syntax differs — see the Angular rule in Step 4a):**
213
275
 
214
276
  - `agentId` (string, required) - Salesforce agent ID
215
277
  - `inline` (boolean) - `true` for inline mode, omit for floating
@@ -226,26 +288,42 @@ If the user reports an error after the component has been set up (e.g., "it's no
226
288
  Floating mode (default):
227
289
 
228
290
  ```tsx
291
+ // React
229
292
  <AgentforceConversationClient agentId="0Xx..." />
230
293
  ```
294
+ ```html
295
+ <!-- Angular -->
296
+ <app-agentforce-conversation-client agentId="0Xx..." />
297
+ ```
231
298
 
232
299
  Inline mode with dimensions:
233
300
 
234
301
  ```tsx
302
+ // React
235
303
  <AgentforceConversationClient agentId="0Xx..." inline width="420px" height="600px" />
236
304
  ```
305
+ ```html
306
+ <!-- Angular — boolean input needs [ ] binding -->
307
+ <app-agentforce-conversation-client agentId="0Xx..." [inline]="true" width="420px" height="600px" />
308
+ ```
237
309
 
238
310
  Adding or updating agent label:
239
311
 
240
312
  ```tsx
313
+ // React
241
314
  <AgentforceConversationClient agentId="0Xx..." agentLabel="<dummy-agent-label>" />
242
315
  ```
316
+ ```html
317
+ <!-- Angular -->
318
+ <app-agentforce-conversation-client agentId="0Xx..." agentLabel="<dummy-agent-label>" />
319
+ ```
243
320
 
244
321
  **Styling rules (mandatory):**
245
322
 
246
- - ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the `styleTokens` prop. There are no exceptions.
323
+ - ALL visual customization (colors, fonts, spacing, borders, radii, shadows) MUST go through the `styleTokens` prop/input. There are no exceptions.
247
324
  - ONLY use token names listed in the tables below. Do NOT invent custom token names.
248
- - NEVER apply styling via CSS files, `style` attributes, `className`, or wrapper elements. These approaches will not work and will be ignored by the component.
325
+ - NEVER apply styling via CSS files, `style` attributes, `className`/`class`, or wrapper elements. These approaches will not work and will be ignored by the component.
326
+ - Angular: pass tokens with `[styleTokens]="{ ... }"` binding (an object), not a bare attribute.
249
327
  - If the user requests a visual change that does not map to a token below, inform them that the change is not supported by the current token set.
250
328
 
251
329
  For the complete list of available style tokens, consult `references/style-tokens.md`.
@@ -4,27 +4,38 @@ This document lists all invalid approaches and patterns to avoid when working wi
4
4
 
5
5
  ## Never Edit Implementation Files
6
6
 
7
- **CRITICAL: Only edit files where the component is USED, never the component implementation itself.**
7
+ **CRITICAL: Only edit files where the component is USED, never the component implementation itself.** This applies to both React and Angular.
8
8
 
9
- - ✅ **DO edit**: Any React files that import and use `<AgentforceConversationClient />` (for example, shared shells, route components, or feature pages)
10
- - ❌ **DO NOT edit**: AgentforceConversationClient.tsx, AgentforceConversationClient.jsx, index.tsx, index.jsx, or any files inside:
9
+ - **DO edit**: Files that import and use the element (for example, shared shells/layouts, route components, or feature pages) — React `*.tsx`/`*.jsx`, Angular host `*.html` + its `*.ts`
10
+ - **DO NOT edit (React)**: `AgentforceConversationClient.tsx`, `AgentforceConversationClient.jsx`, `index.tsx`, `index.jsx`, or any files inside:
11
11
  - `node_modules/@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client/src/`
12
12
  - `packages/template/feature/feature-react-agentforce-conversation-client/src/`
13
13
  - `src/components/AgentforceConversationClient.tsx` (patched templates)
14
14
  - Any path containing `/components/AgentforceConversationClient.`
15
+ - **DO NOT edit (Angular)**: the feature component/service implementation:
16
+ - `node_modules/@salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client/`
17
+ - `packages/template/feature/feature-angular-agentforce-conversation-client/src/`
18
+ - `conversation.ts`, `conversation.html`, `agentforce-embed.service.ts`
19
+ - `__inherit__conversation.ts` (the composed-in feature copy — import it, don't edit it)
15
20
 
16
- **If you're reading a file named `AgentforceConversationClient.tsx`, you're in the wrong place. Stop and search for the USAGE instead.**
21
+ **If you're reading the component implementation (`AgentforceConversationClient.tsx`, `conversation.ts`, or `agentforce-embed.service.ts`), you're in the wrong place. Stop and search for the USAGE instead.**
17
22
 
18
23
  ## Invalid Props
19
24
 
20
- AgentforceConversationClient uses a flat prop API and does NOT accept these props:
25
+ The Agentforce client uses a flat prop/input API and does NOT accept these:
21
26
 
22
- - ❌ `containerStyle` - Use `width` and `height` props directly instead
23
- - ❌ `style` - Use `styleTokens` for theming
24
- - ❌ `className` - Not supported
25
- - ❌ Any standard React div props - This wraps an embedded iframe, not a div
27
+ - `containerStyle` - Use `width` and `height` directly instead
28
+ - `style` - Use `styleTokens` for theming
29
+ - `className` (React) / `class` (Angular) - Not supported for theming
30
+ - Any standard host-element/div props - This wraps an embedded iframe, not a div
26
31
 
27
- **Why:** The component is a wrapper around an embedded iframe using Lightning Out 2.0. Standard React styling props don't apply.
32
+ **Why:** The component is a wrapper around an embedded iframe using Lightning Out 2.0. Standard framework styling props don't apply.
33
+
34
+ ## Angular-Specific Anti-Patterns
35
+
36
+ - Forgetting to add `AgentforceConversationClientComponent` to the host `@Component({ imports: [...] })` — the `<app-agentforce-conversation-client>` element then renders nothing (Angular does not error on an unknown/unregistered element by default in this template setup).
37
+ - Passing booleans/numbers/objects as bare attributes: `inline`, `headerEnabled="false"`, `styleTokens="..."`. These become strings. Use property binding: `[inline]="true"`, `[headerEnabled]="false"`, `[styleTokens]="{ ... }"`.
38
+ - Editing `__inherit__conversation.ts` (the composed feature copy) — treat it as the component source and import from it, never modify it.
28
39
 
29
40
  ## Invalid Styling Approaches
30
41
 
@@ -32,13 +43,13 @@ AgentforceConversationClient uses a flat prop API and does NOT accept these prop
32
43
 
33
44
  Never use these approaches:
34
45
 
35
- - ❌ Creating CSS files (e.g., `agent-styles.css`, `theme.css`)
36
- - ❌ Creating `<style>` tags or internal stylesheets
37
- - ❌ Using `style` attribute on the component
38
- - ❌ Using `className` prop
39
- - ❌ Inline styles
40
- - ❌ CSS modules
41
- - ❌ Styled-components or any CSS-in-JS libraries
46
+ - Creating CSS files (e.g., `agent-styles.css`, `theme.css`)
47
+ - Creating `<style>` tags or internal stylesheets
48
+ - Using `style` attribute on the component
49
+ - Using `className` prop
50
+ - Inline styles
51
+ - CSS modules
52
+ - Styled-components or any CSS-in-JS libraries
42
53
 
43
54
  **Why:** The component controls its own internal styling through the `styleTokens` API. External CSS cannot reach into the embedded iframe.
44
55
 
@@ -46,10 +57,10 @@ Never use these approaches:
46
57
 
47
58
  Never do these:
48
59
 
49
- - ❌ Create custom chat UIs from scratch
50
- - ❌ Use third-party chat libraries (socket.io, WebSocket libraries, etc.)
51
- - ❌ Call `embedAgentforceClient` directly from `@salesforce/agentforce-conversation-client`
52
- - ❌ Build custom WebSocket or REST API chat implementations
60
+ - Create custom chat UIs from scratch
61
+ - Use third-party chat libraries (socket.io, WebSocket libraries, etc.)
62
+ - Call `embedAgentforceClient` directly from `@salesforce/agentforce-conversation-client`
63
+ - Build custom WebSocket or REST API chat implementations
53
64
 
54
65
  **Why:** The AgentforceConversationClient component is the official wrapper that handles authentication, Lightning Out 2.0 initialization, and all communication with Salesforce agents. Custom implementations will not work.
55
66
 
@@ -57,9 +68,9 @@ Never do these:
57
68
 
58
69
  When updating an existing component:
59
70
 
60
- - ❌ Delete and recreate the component
61
- - ❌ Remove all props and start over
62
- - ❌ Copy the entire component to a new file
71
+ - Delete and recreate the component
72
+ - Remove all props and start over
73
+ - Copy the entire component to a new file
63
74
 
64
75
  **Why:** This loses configuration, introduces errors, and creates unnecessary diffs. Always update props in place.
65
76
 
@@ -1,6 +1,16 @@
1
1
  # Additional Examples
2
2
 
3
- Essential examples for common patterns and combinations. All use flat props API.
3
+ Essential examples for common patterns and combinations. All use the flat props/inputs API.
4
+
5
+ **Framework note:** The examples below are shown in React (JSX). For Angular, use the `<app-agentforce-conversation-client>` element with property binding for non-string values — see the [Angular Equivalents](#angular-equivalents) section at the end. Translation rule:
6
+
7
+ | React | Angular |
8
+ |-------|---------|
9
+ | `<AgentforceConversationClient agentId="0Xx..." />` | `<app-agentforce-conversation-client agentId="0Xx..." />` |
10
+ | `inline` | `[inline]="true"` |
11
+ | `headerEnabled={false}` | `[headerEnabled]="false"` |
12
+ | `width="100%"` (string) | `width="100%"` (string attr is fine) |
13
+ | `styleTokens={{ ... }}` | `[styleTokens]="{ ... }"` |
4
14
 
5
15
  ---
6
16
 
@@ -129,4 +139,85 @@ export default function AgentChatHost() {
129
139
 
130
140
  ---
131
141
 
142
+ ## Angular Equivalents
143
+
144
+ Angular apps register the standalone component in the host and use property binding for booleans/numbers/objects.
145
+
146
+ ### Host component registration
147
+
148
+ ```ts
149
+ import { Component } from "@angular/core";
150
+ import { RouterOutlet } from "@angular/router";
151
+ import { AgentforceConversationClientComponent } from "@salesforce/ui-bundle-template-feature-angular-agentforce-conversation-client";
152
+
153
+ @Component({
154
+ selector: "app-layout",
155
+ imports: [RouterOutlet, AgentforceConversationClientComponent],
156
+ templateUrl: "./app-layout.html",
157
+ })
158
+ export class AppLayoutComponent {}
159
+ ```
160
+
161
+ ```html
162
+ <!-- app-layout.html -->
163
+ <router-outlet />
164
+ <app-agentforce-conversation-client agentId="0Xx..." />
165
+ ```
166
+
167
+ ### Inline in a sidebar
168
+
169
+ ```html
170
+ <aside style="width: 400px">
171
+ <app-agentforce-conversation-client agentId="0Xx..." [inline]="true" width="100%" height="100%" />
172
+ </aside>
173
+ ```
174
+
175
+ ### Full page
176
+
177
+ ```html
178
+ <h1>Customer Support</h1>
179
+ <app-agentforce-conversation-client agentId="0Xx..." [inline]="true" width="100%" height="600px" />
180
+ ```
181
+
182
+ ### Theming (object binding)
183
+
184
+ ```html
185
+ <app-agentforce-conversation-client
186
+ agentId="0Xx..."
187
+ [inline]="true"
188
+ width="500px"
189
+ height="700px"
190
+ [styleTokens]="{
191
+ headerBlockBackground: '#0176d3',
192
+ headerBlockTextColor: '#ffffff',
193
+ messageBlockInboundBackgroundColor: '#0176d3',
194
+ messageBlockInboundTextColor: '#ffffff',
195
+ messageInputFooterSendButton: '#0176d3'
196
+ }"
197
+ />
198
+ ```
199
+
200
+ ### Inline without header
201
+
202
+ ```html
203
+ <app-agentforce-conversation-client
204
+ agentId="0Xx..."
205
+ [inline]="true"
206
+ width="100%"
207
+ height="600px"
208
+ [headerEnabled]="false"
209
+ [styleTokens]="{ messageBlockBorderRadius: '12px' }"
210
+ />
211
+ ```
212
+
213
+ > For a large `styleTokens` object, bind to a component property instead of an inline literal:
214
+ > ```ts
215
+ > readonly tokens = { headerBlockBackground: "#0176d3", headerBlockTextColor: "#ffffff" };
216
+ > ```
217
+ > ```html
218
+ > <app-agentforce-conversation-client agentId="0Xx..." [styleTokens]="tokens" />
219
+ > ```
220
+
221
+ ---
222
+
132
223
  For complete style token reference, see `references/style-tokens.md` or `node_modules/@salesforce/agentforce-conversation-client/README.md`.
@@ -6,6 +6,8 @@ This document explains how to use `styleTokens` for theming and styling the Agen
6
6
 
7
7
  The `styleTokens` prop is the **ONLY** way to customize the appearance of the Agentforce conversation client. It accepts an object with style token keys and CSS values.
8
8
 
9
+ **Framework note:** The token names and values below are identical for React and Angular. Only the binding syntax differs — the examples in this file use React (`styleTokens={{ ... }}`); in Angular bind the same object with `[styleTokens]="{ ... }"` (or to a component property).
10
+
9
11
  ## Source of Truth
10
12
 
11
13
  For the complete and always up-to-date list of all style tokens, see the tables below:
@@ -8,11 +8,24 @@ Common issues when using the Agentforce Conversation Client.
8
8
 
9
9
  **Cause:** `agentId` was not passed.
10
10
 
11
- **Solution:** Pass `agentId` directly as a flat prop:
11
+ **Solution:** Pass `agentId` directly as a flat prop/input:
12
12
 
13
13
  ```tsx
14
+ // React
14
15
  <AgentforceConversationClient agentId="0Xx000000000000AAA" />
15
16
  ```
17
+ ```html
18
+ <!-- Angular -->
19
+ <app-agentforce-conversation-client agentId="0Xx000000000000AAA" />
20
+ ```
21
+
22
+ ---
23
+
24
+ ### (Angular) Element renders nothing / no chat appears
25
+
26
+ **Cause:** `AgentforceConversationClientComponent` was not registered in the host component's `@Component({ imports: [...] })`, so Angular ignores the `<app-agentforce-conversation-client>` tag. A second common cause is passing a boolean/object as a bare string attribute (e.g. `inline` instead of `[inline]="true"`).
27
+
28
+ **Solution:** Add the component to the host `imports` array, and use `[prop]` binding for booleans/numbers/objects.
16
29
 
17
30
  ---
18
31
 
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # detect-framework.sh — deterministic UI Bundle framework detector.
4
+ #
5
+ # Usage: bash detect-framework.sh [ROOT]
6
+ # ROOT app or uiBundle root to inspect (default: current directory)
7
+ #
8
+ # Prints exactly one of the following tokens to stdout, nothing else:
9
+ # react — React signals only
10
+ # angular — Angular signals only
11
+ # ambiguous — both React and Angular signals present
12
+ # unknown — neither framework detected
13
+ #
14
+ # Step 0 of the skill calls this and only asks the user which framework to use
15
+ # when the result is `ambiguous` or `unknown`.
16
+
17
+ set -u
18
+
19
+ ROOT="${1:-.}"
20
+ angular=0
21
+ react=0
22
+
23
+ # Resolve ROOT to an absolute path when possible (for the angular.json walk-up).
24
+ abs_root="$(cd "$ROOT" 2>/dev/null && pwd || true)"
25
+
26
+ # 1) angular.json at or above ROOT → Angular workspace.
27
+ dir="$abs_root"
28
+ while [ -n "$dir" ]; do
29
+ [ -f "$dir/angular.json" ] && angular=1
30
+ [ "$dir" = "/" ] && break
31
+ dir="$(dirname "$dir")"
32
+ done
33
+
34
+ # 2) package.json dependencies (excluding node_modules).
35
+ while IFS= read -r pkg; do
36
+ [ -z "$pkg" ] && continue
37
+ grep -q '"@angular/core"' "$pkg" 2>/dev/null && angular=1
38
+ grep -Eq '"react"[[:space:]]*:' "$pkg" 2>/dev/null && react=1
39
+ done <<EOF
40
+ $(find "$ROOT" -type d -name node_modules -prune -o -type f -name package.json -print 2>/dev/null)
41
+ EOF
42
+
43
+ # 3) Source-file signatures (excluding node_modules).
44
+ has_file() {
45
+ find "$ROOT" -type d -name node_modules -prune -o -type f -name "$1" -print 2>/dev/null | grep -q .
46
+ }
47
+
48
+ # Angular: component files, routing module, or @Component-decorated classes.
49
+ has_file '*.component.ts' && angular=1
50
+ has_file 'app.routes.ts' && angular=1
51
+ if grep -rls --exclude-dir=node_modules --include='*.ts' '@Component' "$ROOT" 2>/dev/null | grep -q .; then
52
+ angular=1
53
+ fi
54
+
55
+ # React: JSX/TSX source files.
56
+ has_file '*.tsx' && react=1
57
+ has_file '*.jsx' && react=1
58
+
59
+ if [ "$angular" -eq 1 ] && [ "$react" -eq 1 ]; then
60
+ echo ambiguous
61
+ elif [ "$angular" -eq 1 ]; then
62
+ echo angular
63
+ elif [ "$react" -eq 1 ]; then
64
+ echo react
65
+ else
66
+ echo unknown
67
+ fi