@salesforce/afv-skills 1.7.1 → 1.7.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/afv-skills",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Salesforce skills for Agentforce Vibes",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "files": [
@@ -33,11 +33,12 @@ Universal routing skill for searching and retrieving existing images and media.
33
33
 
34
34
  When a user requests to find an image:
35
35
 
36
- **Your first response MUST be plain text only zero tool calls.** You MUST follow this sequence:
36
+ **Your first action MUST use the ask_followup_question tool to present search sources.**
37
+
38
+ 1. **Use ask_followup_question** to present available search sources as options
39
+ 2. **Receive the user's selection** from the tool response
40
+ 3. **Then** call the appropriate search tool based on their choice
37
41
 
38
- 1. **First response MUST be text only:** A numbered list of search sources for the user. No tool calls of any kind.
39
- 2. **Wait for user to reply** with their selected option number
40
- 3. **Only then** call the appropriate search tool (this is the FIRST tool call in the entire interaction)
41
42
 
42
43
  **Example of what NOT to do:**
43
44
  - ❌ Calling ANY tool before the user picks a source (MCP tools, file reads, descriptor checks, etc.)
@@ -279,7 +280,11 @@ Ask the user to provide:
279
280
 
280
281
  ## Presenting Search Results
281
282
 
282
- Parse the tool response and present **ALL** results as numbered options. Show the image title only — do not display the URL. When the user selects an option, use the URL internally to apply the image.
283
+ **Your action MUST use the `ask_followup_question` tool to present search results as options.**
284
+ 1. **Parse the tool response** — Extract all image results (title and source)
285
+ 2. **Use `ask_followup_question`** to present ALL results as selectable options. Show the image title only — do not display the URL.
286
+ 3. **Receive the user's selection** from the tool response
287
+ 4. **Then** apply the selected image
283
288
 
284
289
  ```
285
290
  I found 4 images. Which one would you like to use?
@@ -301,6 +306,7 @@ I found 4 images. Which one would you like to use?
301
306
 
302
307
  ## Applying the Selected Image
303
308
 
309
+
304
310
  After the user chooses:
305
311
 
306
312
  1. Confirm the selection with image name and URL
@@ -1,117 +0,0 @@
1
- ---
2
- name: generating-fragment
3
- description: "Use this skill when users need to create or edit Salesforce Fragments (reusable UI pieces). Trigger when users mention fragments, UEM blocks, reusable UI templates, structured rendering across Slack/Mobile/LEX, or block-based layouts. Also use when users want to create unified experience components. Always use this skill for any fragment work."
4
- ---
5
-
6
- ## When to Use This Skill
7
-
8
- Use this skill when you need to:
9
- - Create reusable UI fragments for Salesforce experiences
10
- - Generate Fragment metadata following UEM structure
11
- - Build fragments for Slack, Mobile, LEX, and other Salesforce experiences
12
- - Troubleshoot deployment errors related to Fragments
13
-
14
- ## Specification
15
-
16
- # Fragment Generation Guide
17
-
18
- ## 📋 Overview
19
- Fragments are reusable pieces of UI similar to templates, with placeholders for actual data values. The purpose of this file is to assist developers in creating and editing fragments.
20
-
21
- ## 🎯 Purpose
22
- Fragments render data in a structured and unified way across various Salesforce experiences like Slack, Mobile, LEX etc
23
-
24
- ## ⚙️ Composition
25
- A fragment is a UEM (Unified Experience Model) tree of blocks and regions. The fragment you return must follow the Typescript interfaces below:
26
-
27
- ```ts
28
- interface BlockType {
29
- type: 'block'
30
- definition: string // {namespace}/{blockName}
31
- attributes?: Record<string, any>
32
- children?: (BlockType | RegionType)[]
33
- }
34
-
35
- interface RegionType {
36
- type: 'region'
37
- name: string
38
- children: BlockType[]
39
- }
40
- ```
41
-
42
- ---
43
-
44
- ## 🔧 Available Metadata Actions
45
-
46
- ### When to Use Each Action
47
-
48
- #### discoverUiComponents
49
-
50
- **When:** You want to see what block components are available for fragments.
51
-
52
- **Purpose:** Discover the palette of available blocks that can be used in fragment composition.
53
-
54
- **Input Parameters:**
55
- - `pageType` (required): "FRAGMENT"
56
- - `pageContext` (optional): JSON object - not required for FRAGMENT type
57
- - `searchQuery` (optional): String to filter components by name or description
58
-
59
- **Returns:** List of components with:
60
- - `definition`: Fully qualified name (e.g., "namespace/definiton")
61
- - `description`: Component description
62
- - `label`: Human-readable label
63
- - `attributes`: Optional attribute metadata
64
-
65
- **Use for:** Finding available blocks before building your fragment structure.
66
-
67
- #### getUiComponentSchemas
68
-
69
- **When:** You know which components you want but need to understand their properties and attributes.
70
-
71
- **Purpose:** Get detailed JSON schemas for component configuration, including property types, required vs optional fields, and validation rules.
72
-
73
- **Input Parameters:**
74
- - `pageType` (required): "FRAGMENT"
75
- - `pageContext` (optional): JSON object - not required for FRAGMENT type
76
- - `componentDefinitions` (required): List of fully qualified names (e.g., ["namespace/definition"])
77
- - `includeKnowledge` (optional): Boolean, defaults to true - includes additional component-specific guidance
78
-
79
- **Returns:**
80
- - `componentSchemas`: List of results (supports partial failures)
81
- - **Success entries**: Contains JSON schema with property definitions, types, constraints
82
- - **Failure entries**: Contains error message explaining why schema couldn't be retrieved
83
- - `$defs`: Schema definitions and references (if schema transformation applied)
84
-
85
- **Use for:** Understanding how to configure component attributes before adding blocks to your fragment.
86
-
87
- **Key Feature:** Supports partial failures - if some components can't be found, you still get schemas for the successful ones.
88
-
89
- ---
90
-
91
- ## 💡 Typical Workflow
92
-
93
- 1. **Discover Available Blocks**
94
- - Use `discoverUiComponents` to explore what blocks are available
95
- - Optional: Use `searchQuery` to filter by keywords (e.g., "text", "button", "image")
96
-
97
- 2. **Select Components**
98
- - Choose blocks that fit your fragment requirements
99
- - Note their fully qualified definitions (e.g., "namespace/definition")
100
-
101
- 3. **Get Component Schemas**
102
- - Use `getUiComponentSchemas` with the selected component definitions
103
- - Review the JSON schemas to understand required and optional attributes
104
-
105
- 4. **Build Fragment**
106
- - Construct your fragment using the UEM tree structure
107
- - Configure block attributes according to the schemas
108
- - Use the TypeScript interfaces defined above
109
-
110
- ---
111
-
112
- ## ⚠️ Important Notes
113
-
114
- - Block definitions always follow the `{namespace}/{blockName}` convention
115
- - Use the same definition format returned by `discoverUiComponents` when calling `getUiComponentSchemas`
116
- - The FRAGMENT page type doesn't require additional `pageContext` parameters
117
- - Schemas include both required and optional attributes - review carefully to ensure valid configuration