mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-12 02:49:15 +08:00
Merge branch 'main' into wr/renameTopicToSubagent
This commit is contained in:
commit
0d97ace046
41
.github/dependabot.yml
vendored
Normal file
41
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
ignore:
|
||||
- dependency-name: "@salesforce/ui-bundle-template-app-react-sample-b2e"
|
||||
- dependency-name: "@salesforce/ui-bundle-template-app-react-sample-b2x"
|
||||
- dependency-name: "@salesforce/webapp-template-app-react-sample-b2e-experimental"
|
||||
- dependency-name: "@salesforce/webapp-template-app-react-sample-b2x-experimental"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/samples/ui-bundle-template-app-react-sample-b2e"
|
||||
open-pull-requests-limit: 0
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/samples/ui-bundle-template-app-react-sample-b2x"
|
||||
open-pull-requests-limit: 0
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/samples/webapp-template-app-react-sample-b2e-experimental"
|
||||
open-pull-requests-limit: 0
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/samples/webapp-template-app-react-sample-b2x-experimental"
|
||||
open-pull-requests-limit: 0
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/samples/native-mobile-rental-tenant-app"
|
||||
open-pull-requests-limit: 0
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
19
.github/workflows/sync-react-samples.yml
vendored
19
.github/workflows/sync-react-samples.yml
vendored
@ -13,9 +13,6 @@ name: Sync React samples from npm
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Nightly at 02:00 UTC
|
||||
- cron: "0 2 * * *"
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
@ -128,20 +125,16 @@ jobs:
|
||||
if: steps.skip.outputs.skip != 'true'
|
||||
id: pr-meta
|
||||
run: |
|
||||
PARTS=""
|
||||
BODY=""
|
||||
|
||||
if [ "${{ steps.skip.outputs.b2e_changed }}" = "true" ]; then
|
||||
PARTS="${PARTS}b2e-${{ steps.npm-version-b2e.outputs.latest }}"
|
||||
BODY="${BODY}- **B2E** \`@salesforce/ui-bundle-template-app-react-sample-b2e\`: ${{ steps.current-version-b2e.outputs.current || 'none' }} → ${{ steps.npm-version-b2e.outputs.latest }}"$'\n'
|
||||
fi
|
||||
if [ "${{ steps.skip.outputs.b2x_changed }}" = "true" ]; then
|
||||
if [ -n "$PARTS" ]; then PARTS="${PARTS}-"; fi
|
||||
PARTS="${PARTS}b2x-${{ steps.npm-version-b2x.outputs.latest }}"
|
||||
BODY="${BODY}- **B2X** \`@salesforce/ui-bundle-template-app-react-sample-b2x\`: ${{ steps.current-version-b2x.outputs.current || 'none' }} → ${{ steps.npm-version-b2x.outputs.latest }}"$'\n'
|
||||
fi
|
||||
|
||||
echo "branch=chore/sync-react-samples-${PARTS}" >> $GITHUB_OUTPUT
|
||||
echo "branch=chore/sync-react-samples" >> $GITHUB_OUTPUT
|
||||
|
||||
# Multi-line body via heredoc
|
||||
{
|
||||
@ -155,15 +148,7 @@ jobs:
|
||||
echo "EOFBODY"
|
||||
} >> $GITHUB_OUTPUT
|
||||
|
||||
TITLE="chore: sync React samples from npm"
|
||||
if [ "${{ steps.skip.outputs.b2e_changed }}" = "true" ] && [ "${{ steps.skip.outputs.b2x_changed }}" = "true" ]; then
|
||||
TITLE="chore: sync React B2E (${{ steps.npm-version-b2e.outputs.latest }}) & B2X (${{ steps.npm-version-b2x.outputs.latest }}) samples from npm"
|
||||
elif [ "${{ steps.skip.outputs.b2e_changed }}" = "true" ]; then
|
||||
TITLE="chore: sync React B2E sample from npm @ ${{ steps.npm-version-b2e.outputs.latest }}"
|
||||
else
|
||||
TITLE="chore: sync React B2X sample from npm @ ${{ steps.npm-version-b2x.outputs.latest }}"
|
||||
fi
|
||||
echo "title=${TITLE}" >> $GITHUB_OUTPUT
|
||||
echo "title=chore: sync React samples from npm" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create PR on version change
|
||||
if: steps.skip.outputs.skip != 'true'
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
## [1.7.3](https://github.com/forcedotcom/afv-library/compare/1.7.2...1.7.3) (2026-04-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* @W-21829588 : Custom Lightning Type Skills Fixes ([#191](https://github.com/forcedotcom/afv-library/issues/191)) ([6f39dd4](https://github.com/forcedotcom/afv-library/commit/6f39dd4047fe59ad635dfe66acae52fdae2a4dbc))
|
||||
|
||||
|
||||
|
||||
## [1.7.2](https://github.com/forcedotcom/afv-library/compare/1.7.1...1.7.2) (2026-04-22)
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@salesforce/afv-skills",
|
||||
"version": "1.7.2",
|
||||
"version": "1.7.3",
|
||||
"description": "Salesforce skills for Agentforce Vibes",
|
||||
"license": "CC-BY-NC-4.0",
|
||||
"files": [
|
||||
|
||||
@ -20,6 +20,7 @@ Use this skill when you need to:
|
||||
Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the Lightning Platform (including Einstein Agent actions) to describe structured inputs/outputs and drive editor/renderer experiences.
|
||||
|
||||
## Configuration
|
||||
- **Choose referenced CLT pattern for nested objects** - When you need a **reusable** or **separately deployed** nested type, create a CLT for that shape and reference it with `"lightning:type": "c__<CLTName>"`. That string is the referenced type’s **`lightning:type` value / FQN / registered identifier** — not the JSON Schema `title`.
|
||||
- **Choose standard Lightning types** when the structure is simple and can be expressed with properties and supported primitive `lightning:type` identifiers.
|
||||
- **Choose Apex class types** (`@apexClassType/...`) when the structure already exists server-side and you want the Apex class to define the shape.
|
||||
- **Include editor/renderer config** only when you need custom UI behavior (custom LWC input/output components). Otherwise, omit.
|
||||
@ -33,7 +34,7 @@ Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the
|
||||
- `"unevaluatedProperties"` is enforced as `false` by the CLT metaschema. Do not set it to `true`.
|
||||
- **Root object schemas MUST NOT include** `"examples"` when `"unevaluatedProperties": false` is set.
|
||||
- **Nested objects (inside `properties`) MUST NOT set** `"lightning:type": "lightning__objectType"`.
|
||||
- Nested objects should be plain JSON Schema objects (`type`, `properties`, optional `required`, optional `unevaluatedProperties`).
|
||||
- Nested objects can be: references to other CLTs using `c__<CLTName>` syntax.
|
||||
- **List/array properties are highly restricted by the CLT metaschema**:
|
||||
- **CRITICAL LIMITATION**: the CLT metaschema may reject the `items` keyword entirely. Treat `items` as **disallowed by default**.
|
||||
- **Root-level arrays** (direct children of the root `properties`):
|
||||
@ -96,8 +97,13 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
||||
2. **Draft `schema.json`**
|
||||
- Start with the root object structure (required root fields).
|
||||
- Add `properties` using valid primitive `lightning:type` identifiers.
|
||||
- For nested objects: omit `lightning:type` and keep keywords minimal.
|
||||
- For nested-object properties, use **CLT Reference pattern**:
|
||||
- `"lightning:type": "c__<CLTName>"` to reference another CLT
|
||||
- The referenced CLT must be deployed to the org before the parent CLT.
|
||||
- For Apex-based nested objects: Use `@apexClassType/...` when structure exists server-side.
|
||||
- If the prompt explicitly requires true nested object output, prefer an **Apex-based CLT** (`@apexClassType/...`) for deploy-safe nested structures.
|
||||
- For arrays: follow the strict list rules (avoid `items`; avoid `lightning:type` on nested arrays).
|
||||
- Before deployment, verify exact `lightning:type` spellings (for example, use `lightning__richTextType`, not misspelled variants).
|
||||
3. **(Optional) Draft `editor.json`** (only if custom UI is required)
|
||||
- **Supported shape:** Top-level `editor` object with `editor.componentOverrides` and `editor.layout`.
|
||||
- Top-level `editor` object.
|
||||
@ -159,6 +165,7 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
||||
</LightningComponentBundle>
|
||||
```
|
||||
7. **Deploy and validate**
|
||||
- Run a final schema sanity check before deploy: valid `lightning:type` names, required fields present, and no disallowed keywords.
|
||||
- Deploy the bundle using your org's standard metadata deployment flow (e.g. Salesforce CLI or IDE). The MCP client or tooling in use should provide or integrate with the appropriate deploy/retrieve commands for Lightning Type bundles.
|
||||
- Validate incrementally: if deployment fails, remove disallowed keywords first (especially `examples`, `items`, nested `lightning:type`).
|
||||
|
||||
@ -166,7 +173,9 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
||||
| Error / Symptom | Likely Cause | Fix |
|
||||
|---|---|---|
|
||||
| Schema validation fails due to unknown keyword | `unevaluatedProperties: false` + disallowed keyword (commonly `examples`, `items`) | Remove the offending keyword; keep schema minimal |
|
||||
| Nested object validation failure | Nested object includes `lightning:type: lightning__objectType` | Remove `lightning:type` from nested objects |
|
||||
| Nested object validation failure | Org/channel validation rejects nested object typing in `LightningTypeBundle` | Use CLT reference (`c__<CLTName>`) or Apex class types |
|
||||
| Invalid CLT reference | Referenced CLT doesn't exist in org or incorrect syntax | Deploy the referenced CLT first; `c__<CLTName>` must match the referenced type’s **`lightning:type` value / FQN / registered identifier**, not `title` |
|
||||
| Invalid or misspelled `lightning:type` (for example, `lightning__richtextType` instead of `lightning__richTextType`) | Incorrect generated type name | Cross-check all `lightning:type` values against supported type names and correct them before deployment |
|
||||
| Array property rejected | Use of `items` (or `lightning:type` in nested arrays) rejected by validator | For nested arrays: keep only `type: "array"`. For root arrays: use minimal structure; remove `items` if rejected |
|
||||
| Apex-based CLT rejected | Extra fields added (e.g., `type`, `properties`) | Use only `title`, optional `description`, and `lightning:type` |
|
||||
| Editor config rejected | Use of invalid patterns (`es_property_editors/inputList`, `itemSchema`) or unrecognized top-level keys | Use `editor.componentOverrides` and `editor.layout`; keep config minimal |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user