@salesforce/afv-skills 1.10.0 → 1.12.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 (26) hide show
  1. package/package.json +1 -1
  2. package/skills/applying-cms-brand/SKILL.md +170 -0
  3. package/skills/implementing-ui-bundle-agentforce-conversation-client/SKILL.md +114 -198
  4. package/skills/implementing-ui-bundle-agentforce-conversation-client/references/agent-id-resolution.md +46 -0
  5. package/skills/implementing-ui-bundle-agentforce-conversation-client/references/style-tokens.md +18 -6
  6. package/skills/integrating-b2b-commerce-open-code-components/SKILL.md +166 -0
  7. package/skills/running-code-analyzer/SKILL.md +499 -0
  8. package/skills/running-code-analyzer/examples/README.md +38 -0
  9. package/skills/running-code-analyzer/examples/basic-scan-output.json +92 -0
  10. package/skills/running-code-analyzer/examples/command-variations.md +333 -0
  11. package/skills/running-code-analyzer/examples/fix-application-before-after.md +142 -0
  12. package/skills/running-code-analyzer/examples/large-scan-output.json +67 -0
  13. package/skills/running-code-analyzer/examples/security-focused-output.json +95 -0
  14. package/skills/running-code-analyzer/references/command-examples.md +27 -0
  15. package/skills/running-code-analyzer/references/engine-reference.md +34 -0
  16. package/skills/running-code-analyzer/references/error-handling.md +29 -0
  17. package/skills/running-code-analyzer/references/flag-reference.md +96 -0
  18. package/skills/running-code-analyzer/references/quick-start.md +28 -0
  19. package/skills/running-code-analyzer/references/special-behaviors.md +83 -0
  20. package/skills/running-code-analyzer/references/vendor-file-handling.md +239 -0
  21. package/skills/running-code-analyzer/scripts/apply-fixes.js +86 -0
  22. package/skills/running-code-analyzer/scripts/discover-fixes.js +34 -0
  23. package/skills/running-code-analyzer/scripts/filter-violations.js +405 -0
  24. package/skills/running-code-analyzer/scripts/parse-results.js +59 -0
  25. package/skills/running-code-analyzer/scripts/summarize-fixes.js +32 -0
  26. package/skills/running-code-analyzer/scripts/verify-execution.sh +28 -0
@@ -19,8 +19,14 @@ For the complete and always up-to-date list of all style tokens, see the tables
19
19
 
20
20
  | Token name | UI area themed |
21
21
  | --------------------- | --------------------------- |
22
- | `fabBackground` | FAB button background color |
23
- | `containerBackground` | Chat container background |
22
+ | `fabBackground` | FAB button background color |
23
+ | `fabForegroundColor` | FAB button text color |
24
+ | `fabFontSize` | FAB button text font size |
25
+ | `fabBorderRadius` | FAB button border radius |
26
+ | `floatingButtonImage` | FAB button custom icon image URL (img tag) |
27
+ | `floatingButtonImageAlt` | FAB button custom icon image alt text |
28
+ | `floatingButtonLabel` | FAB button label text |
29
+ | `containerBackground` | Chat container background |
24
30
  | `headerBackground` | Header background |
25
31
  | `containerWidth` | Chat container width |
26
32
  | `chatBorderRadius` | Chat border radius |
@@ -30,7 +36,9 @@ For the complete and always up-to-date list of all style tokens, see the tables
30
36
 
31
37
  | Token name | UI area themed |
32
38
  | ------------------------------- | ---------------------------------- |
33
- | `headerBlockBackground` | Header block background |
39
+ | `headerBlockBackground` | Header block background |
40
+ | `headerImageUrl` | Header custom icon image URL (img tag) |
41
+ | `headerImageAlt` | Header custom icon image alt text |
34
42
  | `headerBlockBorderBottomWidth` | Header border bottom width |
35
43
  | `headerBlockBorderBottomStyle` | Header border bottom style |
36
44
  | `headerBlockBorderBottomColor` | Header border bottom color |
@@ -80,6 +88,8 @@ For the complete and always up-to-date list of all style tokens, see the tables
80
88
  | Token name | UI area themed |
81
89
  | -------------------------------- | ------------------------------------------------------- |
82
90
  | `messageBlockBorderRadius` | Message block border radius |
91
+ | `agentAvatarUrl` | Agent avatar custom image URL (img tag) |
92
+ | `agentAvatarAltText` | Agent avatar custom image alt text |
83
93
  | `avatarDisplay` | Avatar display property (e.g. `block`, `none`) |
84
94
  | `hideMessageActions` | Message actions display (e.g. `block`, `none` to hide) |
85
95
  | `hideCopyAction` | Copy action button display (e.g. `inline-flex`, `none`) |
@@ -146,7 +156,7 @@ Use `renderingConfig.showAvatar` to control whether avatars are rendered in mess
146
156
  | `messageInputScrollbarColor` | Message input scrollbar color |
147
157
  | `messageInputActionsWidth` | Message input actions width |
148
158
  | `messageInputActionsPaddingRight` | Message input actions right padding |
149
- | `messageInputFooterPlaceholderText` | Message input placeholder text color |
159
+ | `messageInputFooterPlaceholderTextColor` | Message input placeholder text color |
150
160
  | `messageInputPlaceholderFontWeight` | Placeholder font weight |
151
161
  | `messageInputErrorTextColor` | Message input error text color |
152
162
  | `messageInputActionsGap` | Message input actions gap |
@@ -170,13 +180,15 @@ Use `renderingConfig.showAvatar` to control whether avatars are rendered in mess
170
180
  | Token name | UI area themed |
171
181
  | ---------------------- | ---------------------------- |
172
182
  | `errorBlockBackground` | Error block background color |
183
+ | `errorBlockIconColor` | Error block icon color |
173
184
 
174
185
  ## Token Categories
175
186
 
176
187
  Style tokens are organized by UI area:
177
188
 
178
- - **Header** : background, text color, hover, active, focus, border, font family
179
- - **Messages** : colors, padding, margins, border radius, fonts, body width
189
+ - **Container/FAB** : background, border radius, custom icon image (img tag), alt text
190
+ - **Header** : background, text color, hover, active, focus, border, font family, custom icon image (img tag), alt text
191
+ - **Messages** : colors, padding, margins, border radius, fonts, body width, custom agent avatar image (img tag), alt text
180
192
  - **Inbound messages** : background, text color, width, alignment, hover
181
193
  - **Outbound messages** : background, text color, width, alignment, margin
182
194
  - **Input** : colors, borders, fonts, padding, buttons, scrollbar, textarea, actions
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: integrating-b2b-commerce-open-code-components
3
+ description: "Integrate Salesforce B2B Commerce open source components from GitHub into B2B Commerce stores. Use when users mention \"integrate open code components\", \"open source B2B commerce\", \"add open code components\", \"forcedotcom/b2b-commerce-open-source-components\", or want to add open source commerce components to their store. Copies all components and labels so they become available in Experience Builder."
4
+ license: LICENSE.txt has complete terms
5
+ allowed-tools: Bash(git clone:*) Bash(cp:*) Read
6
+ metadata:
7
+ version: "1.0"
8
+ ---
9
+
10
+ ## When to Use This Skill
11
+
12
+ Use this skill when you need to:
13
+ - Integrate all open source B2B Commerce components into a store
14
+ - Add open source components to a new or existing B2B Commerce store
15
+ - Make open code components available in Experience Builder
16
+
17
+ ## Rules
18
+
19
+ 1. **Always explain before executing.** Before running any command, you MUST tell the user what the command does and why you are running it. Never just show a raw command and ask for permission. The user should be able to read your explanation and understand the purpose before approving.
20
+
21
+ ## Overview
22
+
23
+ This skill copies all open source B2B Commerce components from the official Salesforce repository (https://github.com/forcedotcom/b2b-commerce-open-source-components) into a B2B Commerce store's site metadata. After integration, the components appear in the Experience Builder component palette.
24
+
25
+ ---
26
+
27
+ ## Startup Flow
28
+
29
+ When this skill is triggered, perform these checks automatically before copying.
30
+
31
+ ### Check 0: Resolve Package Directory
32
+
33
+ Read `sfdx-project.json` and pick the active package directory. Extract `packageDirectories[]` and use the entry with `"default": true`; if no entry is flagged default, use the first entry. Use this value as `<package-dir>` everywhere below. If `sfdx-project.json` is missing or has no `packageDirectories`, tell the user and abort.
34
+
35
+ ### Check 1: Open Source Repository
36
+
37
+ Verify the repo is cloned at `.tmp/b2b-commerce-open-source-components`:
38
+
39
+ 1. **If directory does not exist:** Tell user: "I'm cloning the official B2B Commerce open source components repository from GitHub into a local `.tmp/` folder. This gives us access to all the open code components."
40
+ Then run: `git clone https://github.com/forcedotcom/b2b-commerce-open-source-components .tmp/b2b-commerce-open-source-components`
41
+ 2. **If directory exists** and contains `force-app/main/default/sfdc_cms__lwc` and `sfdc_cms__label`, present options:
42
+ > "Open source repository is already cloned. How would you like to proceed?"
43
+ > 1. **Reuse existing** — Use the already cloned repository
44
+ > 2. **Re-clone** — Remove and clone fresh from GitHub
45
+ 3. **If directory exists but structure is invalid:** Tell user: "The cloned repository has an unexpected structure. I'll remove it and clone a fresh copy."
46
+ Then remove and re-clone.
47
+ 4. **If clone fails:** inform user and abort
48
+
49
+ ### Check 2: Store and Site Metadata
50
+
51
+ Verify a store is selected and site metadata is available locally:
52
+
53
+ 1. Tell user: "I'm checking if your project already has B2B store metadata locally."
54
+ Check if `<package-dir>/main/default/digitalExperiences/site/` contains any store directories.
55
+ 2. **If store metadata exists:** use it. If multiple stores found, ask user to select one.
56
+ 3. **If no store metadata found:** Try retrieving from the connected org before delegating:
57
+ 1. Run `sf org list` (or check `sf config get target-org`) to find a connected org. Ask the user to confirm or pick one if more than one.
58
+ 2. List `DigitalExperienceBundle` site bundles in that org with `sf org list metadata --metadata-type DigitalExperienceBundle --target-org <alias>`. Filter to `site/*` entries.
59
+ 3. If at least one site bundle exists, ask the user which to use, then run:
60
+ `sf project retrieve start --metadata "DigitalExperienceBundle:site/<storeName>" --target-org <alias>`
61
+ The bundle lands at `<package-dir>/main/default/digitalExperiences/site/<storeName>/`.
62
+ 4. **Only if no connected org is available, or no site bundles are found, or retrieve fails:** delegate to the **creating-b2b-commerce-store** skill.
63
+
64
+ **Required state** after all checks:
65
+ - **Package dir** — the value resolved in Check 0 (e.g., `force-app`)
66
+ - **Store name** — the selected `fullName` value (e.g., `My_B2B_Store1`)
67
+ - **Site metadata path** — `<package-dir>/main/default/digitalExperiences/site/<store-name>/`
68
+ - **Repo path** — `.tmp/b2b-commerce-open-source-components/`
69
+
70
+ ---
71
+
72
+ ## Integration Task
73
+
74
+ Copy all components and labels from cloned repo to site directory:
75
+
76
+ - **Source:** `.tmp/b2b-commerce-open-source-components/force-app/main/default/sfdc_cms__lwc/*` and `sfdc_cms__label/*` (the open source repo's own layout — always `force-app`)
77
+ - **Destination:** `<package-dir>/main/default/digitalExperiences/site/<store-name>/sfdc_cms__lwc/` and `sfdc_cms__label/` (`<package-dir>` resolved in Check 0)
78
+
79
+ **Steps:**
80
+
81
+ 1. Tell user: "I'm checking if open code components already exist in your store's site metadata."
82
+ Check if destination directories already contain files.
83
+ 2. If files exist, present options:
84
+ > "Components already exist in **{store-name}**. How would you like to proceed?"
85
+ > 1. **Overwrite all** — Replace all existing components with latest from repo
86
+ > 2. **Copy only new** — Skip existing components, copy only ones not yet present
87
+ 3. Tell user: "I'm now copying all open code LWC components from the cloned repository into your store's site metadata directory."
88
+ Copy all component directories from source to destination.
89
+ 4. Tell user: "I'm copying the associated label files that these components need."
90
+ Copy all label directories from source to destination.
91
+ 5. Report: "Copied X components and Y label sets"
92
+
93
+ **Output:**
94
+ ```
95
+ ✅ Integration Complete!
96
+
97
+ Copied: X components and Y label sets to <store-name>
98
+
99
+ Next Steps:
100
+ 1. Deploy: sf project deploy start -d <package-dir>/main/default/digitalExperiences/site/<store-name>
101
+ 2. Open Experience Builder and use new components from the palette
102
+ 3. Publish your site when ready
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Example Interaction
108
+
109
+ **User:** "Integrate open code components to my store"
110
+
111
+ **Agent:** "I'm checking if the open source components repository is already cloned locally..."
112
+
113
+ **Agent:** _(repo exists)_
114
+ > "Open source repository is already cloned. How would you like to proceed?"
115
+ > 1. **Reuse existing** — Use the already cloned repository
116
+ > 2. **Re-clone** — Remove and clone fresh from GitHub
117
+
118
+ **User:** "1"
119
+
120
+ **Agent:** "I'm checking if your project already has B2B store metadata locally..."
121
+ - ✓ Found store metadata for My_B2B_Store1
122
+
123
+ **Agent:** "I'm checking if open code components already exist in your store's site metadata..."
124
+
125
+ **Agent:** _(files exist)_
126
+ > "Components already exist in **My_B2B_Store1**. How would you like to proceed?"
127
+ > 1. **Overwrite all** — Replace all existing components with latest from repo
128
+ > 2. **Copy only new** — Skip existing components, copy only ones not yet present
129
+
130
+ **User:** "1"
131
+
132
+ **Agent:** "I'm now copying all open code LWC components from the cloned repository into your store's site metadata directory..."
133
+ **Agent:** "I'm copying the associated label files that these components need..."
134
+ - ✓ Copied 45 components and 38 label sets
135
+
136
+ ```
137
+ ✅ Integration Complete!
138
+
139
+ Copied: 45 components and 38 label sets to My_B2B_Store1
140
+
141
+ Next Steps:
142
+ 1. Deploy: sf project deploy start -d force-app/main/default/digitalExperiences/site/My_B2B_Store1
143
+ 2. Open Experience Builder and use new components from the palette
144
+ 3. Publish your site when ready
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Error Handling
150
+
151
+ | Error | Message | Action |
152
+ |-------|---------|--------|
153
+ | Store not found | "Store '{name}' not found in org." | List stores again |
154
+ | Git clone failed | "Failed to clone repository. Check internet connection." | Retry or abort |
155
+ | Invalid repo structure | "Repository structure has changed. Expected sfdc_cms__lwc and sfdc_cms__label." | Warn user, abort |
156
+ | File copy failed | "Failed to copy files. Check file permissions." | Show error details |
157
+
158
+ ---
159
+
160
+ ## Verification Checklist
161
+
162
+ - [ ] Startup Flow completed: repo cloned, store metadata available
163
+ - [ ] Components copied to correct destination path (`sfdc_cms__lwc/`)
164
+ - [ ] Labels copied to correct destination path (`sfdc_cms__label/`)
165
+ - [ ] No file permission errors during copy
166
+ - [ ] Deployment command provided and user informed about testing