@salesforce/afv-skills 1.13.0 → 1.15.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.
- package/package.json +3 -3
- package/skills/applying-slds/SKILL.md +322 -0
- package/skills/applying-slds/checklists.md +83 -0
- package/skills/applying-slds/examples.md +283 -0
- package/skills/applying-slds/guidance/README.md +83 -0
- package/skills/applying-slds/guidance/blueprints-index.md +213 -0
- package/skills/applying-slds/guidance/icons-guidance.md +186 -0
- package/skills/applying-slds/guidance/overviews/borders.md +236 -0
- package/skills/applying-slds/guidance/overviews/color.md +266 -0
- package/skills/applying-slds/guidance/overviews/display-density.md +366 -0
- package/skills/applying-slds/guidance/overviews/icons.md +240 -0
- package/skills/applying-slds/guidance/overviews/illustrations.md +235 -0
- package/skills/applying-slds/guidance/overviews/shadows.md +176 -0
- package/skills/applying-slds/guidance/overviews/spacing.md +216 -0
- package/skills/applying-slds/guidance/overviews/typography.md +323 -0
- package/skills/applying-slds/guidance/overviews/utilities.md +542 -0
- package/skills/applying-slds/guidance/slds-development-guide.md +288 -0
- package/skills/applying-slds/guidance/styling-hooks/borders.md +202 -0
- package/skills/applying-slds/guidance/styling-hooks/color/expressive-palette-hooks.md +153 -0
- package/skills/applying-slds/guidance/styling-hooks/color/index.md +171 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/accent-hooks.md +204 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/feedback-hooks.md +768 -0
- package/skills/applying-slds/guidance/styling-hooks/color/semantic/surface-hooks.md +337 -0
- package/skills/applying-slds/guidance/styling-hooks/color/system-hooks.md +132 -0
- package/skills/applying-slds/guidance/styling-hooks/index.md +327 -0
- package/skills/applying-slds/guidance/styling-hooks/shadows.md +238 -0
- package/skills/applying-slds/guidance/styling-hooks/spacing.md +254 -0
- package/skills/applying-slds/guidance/styling-hooks/typography.md +448 -0
- package/skills/applying-slds/guidance/utilities/alignment.md +119 -0
- package/skills/applying-slds/guidance/utilities/borders.md +131 -0
- package/skills/applying-slds/guidance/utilities/box.md +125 -0
- package/skills/applying-slds/guidance/utilities/color.md +165 -0
- package/skills/applying-slds/guidance/utilities/dark-mode.md +111 -0
- package/skills/applying-slds/guidance/utilities/description-list.md +168 -0
- package/skills/applying-slds/guidance/utilities/floats.md +117 -0
- package/skills/applying-slds/guidance/utilities/grid.md +264 -0
- package/skills/applying-slds/guidance/utilities/horizontal-list.md +110 -0
- package/skills/applying-slds/guidance/utilities/hyphenation.md +84 -0
- package/skills/applying-slds/guidance/utilities/index.md +205 -0
- package/skills/applying-slds/guidance/utilities/interactions.md +89 -0
- package/skills/applying-slds/guidance/utilities/layout.md +109 -0
- package/skills/applying-slds/guidance/utilities/line-clamp.md +131 -0
- package/skills/applying-slds/guidance/utilities/margin.md +155 -0
- package/skills/applying-slds/guidance/utilities/media-object.md +161 -0
- package/skills/applying-slds/guidance/utilities/name-value-list.md +152 -0
- package/skills/applying-slds/guidance/utilities/padding.md +155 -0
- package/skills/applying-slds/guidance/utilities/position.md +177 -0
- package/skills/applying-slds/guidance/utilities/print.md +114 -0
- package/skills/applying-slds/guidance/utilities/scrollable.md +126 -0
- package/skills/applying-slds/guidance/utilities/sizing.md +190 -0
- package/skills/applying-slds/guidance/utilities/themes.md +121 -0
- package/skills/applying-slds/guidance/utilities/truncate.md +127 -0
- package/skills/applying-slds/guidance/utilities/typography.md +166 -0
- package/skills/applying-slds/guidance/utilities/vertical-list.md +166 -0
- package/skills/applying-slds/guidance/utilities/visibility.md +228 -0
- package/skills/applying-slds/metadata/README.md +84 -0
- package/skills/applying-slds/metadata/blueprints/components/accordion.yaml +304 -0
- package/skills/applying-slds/metadata/blueprints/components/activity-timeline.yaml +92 -0
- package/skills/applying-slds/metadata/blueprints/components/alert.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/app-launcher.yaml +94 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar-group.yaml +81 -0
- package/skills/applying-slds/metadata/blueprints/components/avatar.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/badges.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/brand-band.yaml +198 -0
- package/skills/applying-slds/metadata/blueprints/components/breadcrumbs.yaml +95 -0
- package/skills/applying-slds/metadata/blueprints/components/builder-header.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/button-groups.yaml +82 -0
- package/skills/applying-slds/metadata/blueprints/components/button-icons.yaml +295 -0
- package/skills/applying-slds/metadata/blueprints/components/buttons.yaml +230 -0
- package/skills/applying-slds/metadata/blueprints/components/cards.yaml +124 -0
- package/skills/applying-slds/metadata/blueprints/components/carousel.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/chat.yaml +179 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button-group.yaml +192 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-button.yaml +204 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox-toggle.yaml +177 -0
- package/skills/applying-slds/metadata/blueprints/components/checkbox.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/color-picker.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/combobox.yaml +136 -0
- package/skills/applying-slds/metadata/blueprints/components/counter.yaml +147 -0
- package/skills/applying-slds/metadata/blueprints/components/data-tables.yaml +157 -0
- package/skills/applying-slds/metadata/blueprints/components/datepickers.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/datetime-picker.yaml +155 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-composer.yaml +201 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-form-footer.yaml +161 -0
- package/skills/applying-slds/metadata/blueprints/components/docked-utility-bar.yaml +175 -0
- package/skills/applying-slds/metadata/blueprints/components/drop-zone.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/dueling-picklist.yaml +196 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-icons.yaml +128 -0
- package/skills/applying-slds/metadata/blueprints/components/dynamic-menu.yaml +141 -0
- package/skills/applying-slds/metadata/blueprints/components/expandable-section.yaml +115 -0
- package/skills/applying-slds/metadata/blueprints/components/expression.yaml +143 -0
- package/skills/applying-slds/metadata/blueprints/components/feeds.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/file-selector.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/files.yaml +119 -0
- package/skills/applying-slds/metadata/blueprints/components/form-element.yaml +145 -0
- package/skills/applying-slds/metadata/blueprints/components/global-header.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/global-navigation.yaml +100 -0
- package/skills/applying-slds/metadata/blueprints/components/icons.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/illustration.yaml +205 -0
- package/skills/applying-slds/metadata/blueprints/components/input.yaml +151 -0
- package/skills/applying-slds/metadata/blueprints/components/list-builder.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/lookups.yaml +132 -0
- package/skills/applying-slds/metadata/blueprints/components/map.yaml +118 -0
- package/skills/applying-slds/metadata/blueprints/components/menus.yaml +134 -0
- package/skills/applying-slds/metadata/blueprints/components/modals.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/notifications.yaml +88 -0
- package/skills/applying-slds/metadata/blueprints/components/page-headers.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/panels.yaml +149 -0
- package/skills/applying-slds/metadata/blueprints/components/path.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/picklist.yaml +125 -0
- package/skills/applying-slds/metadata/blueprints/components/pills.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/popovers.yaml +120 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-bar.yaml +110 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-indicator.yaml +133 -0
- package/skills/applying-slds/metadata/blueprints/components/progress-ring.yaml +102 -0
- package/skills/applying-slds/metadata/blueprints/components/prompt.yaml +126 -0
- package/skills/applying-slds/metadata/blueprints/components/publishers.yaml +178 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-button-group.yaml +172 -0
- package/skills/applying-slds/metadata/blueprints/components/radio-group.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/rich-text-editor.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-notifications.yaml +188 -0
- package/skills/applying-slds/metadata/blueprints/components/scoped-tabs.yaml +97 -0
- package/skills/applying-slds/metadata/blueprints/components/select.yaml +127 -0
- package/skills/applying-slds/metadata/blueprints/components/setup-assistant.yaml +152 -0
- package/skills/applying-slds/metadata/blueprints/components/slider.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/spinners.yaml +135 -0
- package/skills/applying-slds/metadata/blueprints/components/split-view.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/summary-detail.yaml +103 -0
- package/skills/applying-slds/metadata/blueprints/components/tabs.yaml +138 -0
- package/skills/applying-slds/metadata/blueprints/components/textarea.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/tiles.yaml +108 -0
- package/skills/applying-slds/metadata/blueprints/components/timepicker.yaml +111 -0
- package/skills/applying-slds/metadata/blueprints/components/toast.yaml +154 -0
- package/skills/applying-slds/metadata/blueprints/components/tooltips.yaml +107 -0
- package/skills/applying-slds/metadata/blueprints/components/tree-grid.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trees.yaml +116 -0
- package/skills/applying-slds/metadata/blueprints/components/trial-bar.yaml +112 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-navigation.yaml +130 -0
- package/skills/applying-slds/metadata/blueprints/components/vertical-tabs.yaml +140 -0
- package/skills/applying-slds/metadata/blueprints/components/visual-picker.yaml +150 -0
- package/skills/applying-slds/metadata/blueprints/components/welcome-mat.yaml +136 -0
- package/skills/applying-slds/metadata/hooks-index.json +6272 -0
- package/skills/applying-slds/metadata/icon-metadata.json +38466 -0
- package/skills/applying-slds/metadata/utilities-index.json +21912 -0
- package/skills/applying-slds/references/component-selection.md +112 -0
- package/skills/applying-slds/references/icons-decision-guide.md +124 -0
- package/skills/applying-slds/references/styling-decision-guide.md +228 -0
- package/skills/applying-slds/references/utilities-quick-ref.md +125 -0
- package/skills/applying-slds/scripts/search-blueprints.cjs +117 -0
- package/skills/applying-slds/scripts/search-hooks.cjs +139 -0
- package/skills/applying-slds/scripts/search-icons.cjs +174 -0
- package/skills/applying-slds/scripts/search-utilities.cjs +161 -0
- package/skills/building-ui-bundle-app/SKILL.md +33 -8
- package/skills/generating-custom-application/SKILL.md +1 -1
- package/skills/generating-custom-lightning-type/SKILL.md +17 -39
- package/skills/generating-custom-lightning-type/assets/primitive-types-and-constraints.md +41 -0
- package/skills/generating-custom-lightning-type/references/widget-rendition.md +124 -0
- package/skills/generating-ui-bundle-custom-app/SKILL.md +93 -0
- package/skills/generating-ui-bundle-custom-app/docs/configure-metadata-custom-application.md +70 -0
- package/skills/generating-ui-bundle-metadata/SKILL.md +39 -1
- package/skills/investigating-agentforce-architecture/README.md +156 -0
- package/skills/investigating-agentforce-architecture/SKILL.md +230 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_sobject.yaml +16 -0
- package/skills/investigating-agentforce-architecture/assets/cli/describe_tooling_sobject.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/list_metadata_genaiprompttemplate.yaml +17 -0
- package/skills/investigating-agentforce-architecture/assets/cli/org_display.yaml +15 -0
- package/skills/investigating-agentforce-architecture/assets/cli/retrieve_genai_plugin.yaml +18 -0
- package/skills/investigating-agentforce-architecture/assets/cli/show_access_token.yaml +27 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/action_tree.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/data_flow.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/dependency_graph.mmd +19 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/invocation_sequence.mmd +20 -0
- package/skills/investigating-agentforce-architecture/assets/mermaid/planner_state.mmd +18 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/apex_class_bodies_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_definition_details.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/bot_version_lookup.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_by_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_ids_by_names.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_definition_view_by_durable_ids.soql +4 -0
- package/skills/investigating-agentforce-architecture/assets/soql/flow_metadata_by_id.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/functions_by_plugins.soql +5 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_attrs_by_parent_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_bundle_functions.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/planner_definition_by_agent_chain.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_functions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugin_instructions_by_plugin_ids.soql +3 -0
- package/skills/investigating-agentforce-architecture/assets/soql/plugins_by_planner.soql +4 -0
- package/skills/investigating-agentforce-architecture/references/architecture_sections.md +243 -0
- package/skills/investigating-agentforce-architecture/references/contract.json +244 -0
- package/skills/investigating-agentforce-architecture/references/soql_fields.md +512 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/__init__.py +1 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/fs_guard.py +329 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/paths.py +110 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-architecture/scripts/_shared/sql.py +10 -0
- package/skills/investigating-agentforce-architecture/scripts/cache_check.py +234 -0
- package/skills/investigating-agentforce-architecture/scripts/config.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/fetch_soql.py +689 -0
- package/skills/investigating-agentforce-architecture/scripts/finalize.py +295 -0
- package/skills/investigating-agentforce-architecture/scripts/main.py +2835 -0
- package/skills/investigating-agentforce-architecture/scripts/metadata_listing.py +265 -0
- package/skills/investigating-agentforce-architecture/scripts/parallel_retrieve.py +69 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_bundle.py +215 -0
- package/skills/investigating-agentforce-architecture/scripts/parse_wave.py +845 -0
- package/skills/investigating-agentforce-architecture/scripts/probe_channels.py +302 -0
- package/skills/investigating-agentforce-architecture/scripts/render_architecture.py +1043 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_bot.py +255 -0
- package/skills/investigating-agentforce-architecture/scripts/resolve_invocation_target.py +130 -0
- package/skills/investigating-agentforce-architecture/scripts/rest_client.py +763 -0
- package/skills/investigating-agentforce-architecture/scripts/retrieve_planner.py +13 -0
- package/skills/investigating-agentforce-architecture/scripts/sf_cli.py +242 -0
- package/skills/investigating-agentforce-architecture/scripts/soql_loader.py +253 -0
- package/skills/investigating-agentforce-architecture/scripts/summarize_tree.py +143 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/_bootstrap.py +23 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/fixtures/genai_payloads.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check.py +307 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_cache_check_main.py +283 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_config.py +115 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_end_to_end_fixture.py +651 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_finalize.py +278 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_flow_children_inflation.py +582 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_fs_guard.py +113 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_iterative_wave_b.py +478 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_main_pipeline.py +3359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parallel_retrieve.py +131 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_bundle.py +400 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave.py +644 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_classifiers.py +224 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_helpers.py +380 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_parse_wave_main.py +397 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_per_branch_visited.py +244 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_channels.py +359 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_probe_cli_recipes.py +185 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_render_architecture.py +810 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_bot.py +203 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_creds.py +157 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_resolve_invocation_target.py +145 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_rest_client.py +1253 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_runtime_override.py +100 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_sf_cli.py +261 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_signature_stamping.py +466 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_soql_loader.py +501 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_summarize_tree.py +241 -0
- package/skills/investigating-agentforce-architecture/scripts/tests/test_write_emit_ctx.py +480 -0
- package/skills/investigating-agentforce-architecture/tools/emit_env.py +157 -0
- package/skills/investigating-agentforce-architecture/tools/emit_result.py +262 -0
- package/skills/investigating-agentforce-architecture/tools/sanitize.py +33 -0
- package/skills/investigating-agentforce-architecture/tools/write_emit_ctx.py +332 -0
- package/skills/investigating-agentforce-d360/README.md +123 -0
- package/skills/investigating-agentforce-d360/SKILL.md +163 -0
- package/skills/investigating-agentforce-d360/assets/dc/app_generation.sql +51 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_category.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/content_quality.sql +41 -0
- package/skills/investigating-agentforce-d360/assets/dc/discover_sessions.sql +36 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback.sql +47 -0
- package/skills/investigating-agentforce-d360/assets/dc/feedback_details.sql +38 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_records.sql +45 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_llm.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_metadata.sql +44 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_request_tags.sql +42 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_requests.sql +89 -0
- package/skills/investigating-agentforce-d360/assets/dc/gateway_responses.sql +43 -0
- package/skills/investigating-agentforce-d360/assets/dc/generations.sql +52 -0
- package/skills/investigating-agentforce-d360/assets/dc/interactions.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messages.sql +53 -0
- package/skills/investigating-agentforce-d360/assets/dc/messaging_session.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/moment_interactions.sql +34 -0
- package/skills/investigating-agentforce-d360/assets/dc/moments.sql +39 -0
- package/skills/investigating-agentforce-d360/assets/dc/participants.sql +48 -0
- package/skills/investigating-agentforce-d360/assets/dc/sessions.sql +78 -0
- package/skills/investigating-agentforce-d360/assets/dc/steps.sql +64 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_associations.sql +46 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definition_associations.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/tag_definitions.sql +50 -0
- package/skills/investigating-agentforce-d360/assets/dc/tags.sql +37 -0
- package/skills/investigating-agentforce-d360/assets/dc/telemetry_spans.sql +55 -0
- package/skills/investigating-agentforce-d360/references/artifacts.md +50 -0
- package/skills/investigating-agentforce-d360/references/dc_dmo_fields.md +823 -0
- package/skills/investigating-agentforce-d360/references/dc_pipeline_contract.md +608 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/__init__.py +2 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/cli_override.py +98 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/fs_guard.py +334 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/paths.py +155 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/runtime.py +59 -0
- package/skills/investigating-agentforce-d360/scripts/_shared/sql.py +14 -0
- package/skills/investigating-agentforce-d360/scripts/assemble_dc.py +1624 -0
- package/skills/investigating-agentforce-d360/scripts/config.py +45 -0
- package/skills/investigating-agentforce-d360/scripts/dc.py +188 -0
- package/skills/investigating-agentforce-d360/scripts/discover_sessions.py +556 -0
- package/skills/investigating-agentforce-d360/scripts/fetch_dc.py +1045 -0
- package/skills/investigating-agentforce-d360/scripts/render_dc.py +1750 -0
- package/skills/investigating-agentforce-d360/scripts/resolve_session.py +264 -0
- package/skills/investigating-agentforce-d360/scripts/storage.py +92 -0
- package/skills/investigating-agentforce-d360/scripts/tests/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/_bootstrap.py +15 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/__init__.py +0 -0
- package/skills/investigating-agentforce-d360/scripts/tests/fixtures/synthetic_session.py +424 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_bootstrap_and_mode.py +115 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_gateway_direct_integration.py +158 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_helpers.py +287 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_assemble_dc_integration.py +247 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_dc_and_resolve_session.py +433 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions.py +458 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_discover_sessions_grep_ci.py +193 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_helpers.py +266 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_identity.py +528 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_main.py +251 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall.py +229 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_fetch_dc_waterfall_full.py +283 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_identity_coherence.py +327 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_branches.py +256 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_gateway_direct.py +130 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_helpers.py +291 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_integration.py +220 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_planner_llm_calls.py +284 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_render_dc_show_prompts_gating.py +215 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_from_disk.py +100 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_resolve_session_main.py +149 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_runtime_override.py +104 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape.py +95 -0
- package/skills/investigating-agentforce-d360/scripts/tests/test_session_shape_dropped_by_stdm.py +85 -0
- package/skills/managing-managed-event-subscription/SKILL.md +152 -0
- package/skills/managing-managed-event-subscription/assets/managed-event-subscription-template.xml +20 -0
- package/skills/managing-managed-event-subscription/references/delete-guide.md +57 -0
- package/skills/managing-managed-event-subscription/references/topic-name-formats.md +26 -0
- package/skills/managing-managed-event-subscription/references/update-constraints.md +30 -0
- package/skills/reviewing-lwc-mobile-offline/SKILL.md +168 -0
- package/skills/reviewing-lwc-mobile-offline/references/grounding.md +7 -0
- package/skills/reviewing-lwc-mobile-offline/references/inline-graphql.md +43 -0
- package/skills/reviewing-lwc-mobile-offline/references/komaci-eslint.md +125 -0
- package/skills/reviewing-lwc-mobile-offline/references/lwc-if.md +78 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/komaci.config.mjs +18 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/package.json +10 -0
- package/skills/reviewing-lwc-mobile-offline/scripts/run-komaci.sh +69 -0
- package/skills/uplifting-components-to-slds2/SKILL.md +3 -2
- package/skills/uplifting-components-to-slds2/references/color-hooks-decision-guide.md +30 -9
- package/skills/uplifting-components-to-slds2/references/examples.md +24 -6
- package/skills/using-mobile-native-capabilities/SKILL.md +182 -0
- package/skills/using-mobile-native-capabilities/references/app-review.md +68 -0
- package/skills/using-mobile-native-capabilities/references/ar-space-capture.md +125 -0
- package/skills/using-mobile-native-capabilities/references/barcode-scanner.md +219 -0
- package/skills/using-mobile-native-capabilities/references/base-capability.md +22 -0
- package/skills/using-mobile-native-capabilities/references/biometrics.md +90 -0
- package/skills/using-mobile-native-capabilities/references/calendar.md +213 -0
- package/skills/using-mobile-native-capabilities/references/contacts.md +232 -0
- package/skills/using-mobile-native-capabilities/references/document-scanner.md +342 -0
- package/skills/using-mobile-native-capabilities/references/geofencing.md +123 -0
- package/skills/using-mobile-native-capabilities/references/location.md +158 -0
- package/skills/using-mobile-native-capabilities/references/mobile-capabilities.md +30 -0
- package/skills/using-mobile-native-capabilities/references/nfc.md +181 -0
- package/skills/using-mobile-native-capabilities/references/payments.md +95 -0
- package/skills/validating-slds/SKILL.md +262 -0
- package/skills/validating-slds/references/quality-checks.md +308 -0
- package/skills/validating-slds/references/report-format.md +302 -0
- package/skills/validating-slds/scripts/analyze-quality.cjs +521 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: generating-custom-lightning-type
|
|
3
|
-
description: "Use this skill when users need to create Custom Lightning Types (CLTs) for Einstein Agent actions or structured input/output schemas. Trigger when users mention CLT, Custom Lightning Types, JSON schemas for agents, type definitions, lightning__objectType, or editor/renderer configurations. This is complex - always use this skill for CLT work."
|
|
3
|
+
description: "Use this skill when users need to create Custom Lightning Types (CLTs) for Einstein Agent actions or structured input/output schemas. Trigger when users mention CLT, Custom Lightning Types, Custom Lightning Types (CLTs) with widget/mosaic/fragment rendition/renderer, JSON schemas for agents, type definitions, lightning__objectType, or editor/renderer configurations. When widget renditions are requested, you MUST first read the widget-rendition.md reference file in this skill's references/ directory and follow its complete workflow. This is complex - always use this skill for CLT work."
|
|
4
4
|
metadata:
|
|
5
5
|
version: "1.0"
|
|
6
6
|
---
|
|
@@ -12,6 +12,7 @@ Use this skill when you need to:
|
|
|
12
12
|
- Generate JSON Schema-based type definitions for Lightning Platform
|
|
13
13
|
- Configure CLTs for Einstein Agent actions
|
|
14
14
|
- Set up editor and renderer configurations for custom UI
|
|
15
|
+
- Create CLTs with widget/mosaic/fragment rendition
|
|
15
16
|
- Troubleshoot deployment errors related to Custom Lightning Types
|
|
16
17
|
|
|
17
18
|
## Specification
|
|
@@ -28,6 +29,8 @@ Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the
|
|
|
28
29
|
- **Include editor/renderer config** only when you need custom UI behavior (custom LWC input/output components). Otherwise, omit.
|
|
29
30
|
|
|
30
31
|
## Critical Rules (Read First)
|
|
32
|
+
- **CRITICAL: NEVER include the `"$schema"` field in schema.json**
|
|
33
|
+
- Salesforce CLT validator WILL REJECT schemas with this field, even if it's a valid JSON Schema `$schema` declaration.
|
|
31
34
|
- **Root object schemas MUST include**:
|
|
32
35
|
- `"type": "object"`
|
|
33
36
|
- `"title"`
|
|
@@ -58,45 +61,15 @@ Custom Lightning Types (CLTs) are JSON Schema-based type definitions used by the
|
|
|
58
61
|
- **Object type validation**: the CLT root is validated to ensure `lightning:type` is exactly `lightning__objectType`.
|
|
59
62
|
|
|
60
63
|
## Primitive Types & Constraints
|
|
61
|
-
- `lightning__textType`
|
|
62
|
-
- Max length 255
|
|
63
|
-
- `lightning__multilineTextType`
|
|
64
|
-
- Max length 2000
|
|
65
|
-
- `lightning__richTextType`
|
|
66
|
-
- Max length 100000
|
|
67
|
-
- `lightning__urlType`
|
|
68
|
-
- Max length 2000
|
|
69
|
-
- Optional `lightning:allowedUrlSchemes` enum values: `https`, `http`, `relative`, `mailto`, `tel`
|
|
70
|
-
- `lightning__dateType`
|
|
71
|
-
- Data pattern: YYYY-MM-DD
|
|
72
|
-
- `lightning__timeType`
|
|
73
|
-
- Data pattern: HH:MM:SS.sssZ
|
|
74
|
-
- `lightning__dateTimeType`
|
|
75
|
-
- Data shape is an object with required `dateTime` and optional `timeZone`
|
|
76
|
-
- `lightning__numberType`
|
|
77
|
-
- Decimal numbers; optional `maximum`, `minimum`, `multipleOf`
|
|
78
|
-
- `lightning__integerType`
|
|
79
|
-
- Whole numbers only; optional `maximum`, `minimum`
|
|
80
|
-
- `lightning__booleanType`
|
|
81
|
-
- true/false
|
|
82
64
|
|
|
83
|
-
|
|
84
|
-
When strict validation is enabled (`unevaluatedProperties: false`), keep each property minimal and prefer only keywords known to be allowed:
|
|
85
|
-
- `title`, `description`, `einstein:description`
|
|
86
|
-
- `type` (when used, ensure it matches the chosen `lightning:type`)
|
|
87
|
-
- `lightning:type`
|
|
88
|
-
- `maximum`, `minimum`, `multipleOf` (numeric)
|
|
89
|
-
- `maxLength`, `minLength` (string)
|
|
90
|
-
- `const`, `enum`
|
|
91
|
-
- `lightning:textIndexed`, `lightning:supportsPersonalization`, `lightning:localizable`
|
|
92
|
-
- `lightning:uiOptions`, `lightning:allowedUrlSchemes`
|
|
93
|
-
- `lightning:tags` (metaschema restricts values; currently `flow` is the only known allowed tag)
|
|
65
|
+
When you need the full list of supported primitive `lightning:type` identifiers, their constraints, and the allowed property-level keywords, read `assets/primitive-types-and-constraints.md` in this skill's directory.
|
|
94
66
|
|
|
95
67
|
## Generation Workflow
|
|
96
68
|
1. **Confirm the CLT approach**
|
|
97
69
|
- If referencing Apex: capture the exact class reference (`@apexClassType/namespace__ClassName$InnerClass`).
|
|
98
70
|
- If using standard primitives: list the fields, their Lightning primitive types, and which fields are required.
|
|
99
71
|
2. **Draft `schema.json`**
|
|
72
|
+
- **DO NOT include `"$schema"` at the top**
|
|
100
73
|
- Start with the root object structure (required root fields).
|
|
101
74
|
- Add `properties` using valid primitive `lightning:type` identifiers.
|
|
102
75
|
- For nested-object properties, use **CLT Reference pattern**:
|
|
@@ -127,7 +100,7 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
|
|
127
100
|
- **Avoid known-invalid patterns**:
|
|
128
101
|
- Do not use `es_property_editors/inputList`.
|
|
129
102
|
- Do not use `itemSchema` attributes.
|
|
130
|
-
4. **(Optional) Draft `renderer.json`** (only if custom UI is required)
|
|
103
|
+
4. **(Optional) Draft `renderer.json`** (only if custom UI or mosaic rendition is required)
|
|
131
104
|
- **Supported shape:** Top-level `renderer` object with `renderer.componentOverrides` and `renderer.layout`.
|
|
132
105
|
- Top-level `renderer` object.
|
|
133
106
|
- Use `renderer.componentOverrides` for component overrides.
|
|
@@ -138,6 +111,15 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
|
|
138
111
|
- Use `{!$attrs.<name>}` in attribute mappings when binding schema data to custom renderer component attributes.
|
|
139
112
|
- **CRITICAL**: Attribute mappings like `{!$attrs.propertyName}` must reference properties that **actually exist** in your type schema. Referencing non-existent properties will fail validation.
|
|
140
113
|
- **Type matching**: Attribute values must match the expected type for the component. For example, if a component expects a string attribute, passing an integer will fail validation.
|
|
114
|
+
- **Widget renderer pattern** (for widget rendition):
|
|
115
|
+
- **When to use:** Use this when users request "mosaic", "widget", "fragment", or "cross-platform rendering" for their CLT.
|
|
116
|
+
- **Structure:** `renderer.componentOverrides["$"] = { "type": "mosaic", "definition": "tile/mosaic", "children": [ /* UEM tree of blocks and regions */ ] }`
|
|
117
|
+
- **REQUIRED workflow:**
|
|
118
|
+
- **STOP**: Do NOT attempt to create the widget renderer yourself.
|
|
119
|
+
- **MANDATORY FIRST STEP**: You MUST fetch the reference file `references/widget-rendition.md` located in this skill's directory before proceeding.
|
|
120
|
+
- Follow the complete workflow documented in `widget-rendition.md` using the generated CLT schema as the grounding schema.
|
|
121
|
+
- The `widget-rendition.md` reference contains the full widget generation workflow: discovering UEM blocks via discoverUiComponents, calling getUiComponentSchemas, building the UEM tree, and writing renderer.json.
|
|
122
|
+
- **Do not** attempt to generate widget rendition without first fetching the `widget-rendition.md` reference file.
|
|
141
123
|
- **Property-level override pattern**:
|
|
142
124
|
- `renderer.componentOverrides["<propertyName>"] = { "definition": "es_property_editors/outputText" | "es_property_editors/outputNumber" | "es_property_editors/outputImage" | ... }`. **Valid renderer components** (examples): `es_property_editors/outputText`, `es_property_editors/outputNumber`, `es_property_editors/outputImage`. Avoid input-style components in the renderer.
|
|
143
125
|
- **Layout pattern for renderer**:
|
|
@@ -166,11 +148,6 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
|
|
166
148
|
</targets>
|
|
167
149
|
</LightningComponentBundle>
|
|
168
150
|
```
|
|
169
|
-
7. **Deploy and validate**
|
|
170
|
-
- Run a final schema sanity check before deploy: valid `lightning:type` names, required fields present, and no disallowed keywords.
|
|
171
|
-
- 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.
|
|
172
|
-
- Validate incrementally: if deployment fails, remove disallowed keywords first (especially `examples`, `items`, nested `lightning:type`).
|
|
173
|
-
|
|
174
151
|
## Common Deployment Errors
|
|
175
152
|
| Error / Symptom | Likely Cause | Fix |
|
|
176
153
|
|---|---|---|
|
|
@@ -200,3 +177,4 @@ When strict validation is enabled (`unevaluatedProperties: false`), keep each pr
|
|
|
200
177
|
- [ ] Layout configurations use `lightning/propertyLayout` with ONLY the `property` attribute (no `label`, `title`, or other attributes)
|
|
201
178
|
- [ ] All attribute mappings (`{!$attrs.propertyName}`) reference properties that exist in the type schema
|
|
202
179
|
- [ ] Custom LWC components have correct targets in `-meta.xml`: `lightning__AgentforceInput` for editors, `lightning__AgentforceOutput` for renderers
|
|
180
|
+
- [ ] Root schema does NOT include `"$schema"` field
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Primitive Types & Constraints
|
|
2
|
+
|
|
3
|
+
Reference for all supported Lightning primitive types and their allowed constraints. Read this when authoring property-level `lightning:type` identifiers or determining which keywords are valid on a given property.
|
|
4
|
+
|
|
5
|
+
## Supported Types
|
|
6
|
+
|
|
7
|
+
- `lightning__textType`
|
|
8
|
+
- Max length 255
|
|
9
|
+
- `lightning__multilineTextType`
|
|
10
|
+
- Max length 2000
|
|
11
|
+
- `lightning__richTextType`
|
|
12
|
+
- Max length 100000
|
|
13
|
+
- `lightning__urlType`
|
|
14
|
+
- Max length 2000
|
|
15
|
+
- Optional `lightning:allowedUrlSchemes` enum values: `https`, `http`, `relative`, `mailto`, `tel`
|
|
16
|
+
- `lightning__dateType`
|
|
17
|
+
- Data pattern: YYYY-MM-DD
|
|
18
|
+
- `lightning__timeType`
|
|
19
|
+
- Data pattern: HH:MM:SS.sssZ
|
|
20
|
+
- `lightning__dateTimeType`
|
|
21
|
+
- Data shape is an object with required `dateTime` and optional `timeZone`
|
|
22
|
+
- `lightning__numberType`
|
|
23
|
+
- Decimal numbers; optional `maximum`, `minimum`, `multipleOf`
|
|
24
|
+
- `lightning__integerType`
|
|
25
|
+
- Whole numbers only; optional `maximum`, `minimum`
|
|
26
|
+
- `lightning__booleanType`
|
|
27
|
+
- true/false
|
|
28
|
+
|
|
29
|
+
## Allowed Property-Level Keywords
|
|
30
|
+
|
|
31
|
+
When strict validation is enabled (`unevaluatedProperties: false`), keep each property minimal and prefer only keywords known to be allowed:
|
|
32
|
+
|
|
33
|
+
- `title`, `description`, `einstein:description`
|
|
34
|
+
- `type` (when used, ensure it matches the chosen `lightning:type`)
|
|
35
|
+
- `lightning:type`
|
|
36
|
+
- `maximum`, `minimum`, `multipleOf` (numeric)
|
|
37
|
+
- `maxLength`, `minLength` (string)
|
|
38
|
+
- `const`, `enum`
|
|
39
|
+
- `lightning:textIndexed`, `lightning:supportsPersonalization`, `lightning:localizable`
|
|
40
|
+
- `lightning:uiOptions`, `lightning:allowedUrlSchemes`
|
|
41
|
+
- `lightning:tags` (metaschema restricts values; currently `flow` is the only known allowed tag)
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Widget Generation Guide
|
|
2
|
+
|
|
3
|
+
## 📋 Overview
|
|
4
|
+
Widgets 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 mosaic renditions for CLTs.
|
|
5
|
+
|
|
6
|
+
## 🎯 Purpose
|
|
7
|
+
Widgets render data in a structured and unified way across various Salesforce experiences like Slack, Mobile, LEX etc.
|
|
8
|
+
|
|
9
|
+
## Schema Grounding
|
|
10
|
+
Widget generation is **always schema-grounded** using a CLT's schema. The schema describes the data shape the widget should render. Extract property names, types, required vs optional, and nesting from the schema; then follow the full **Workflow** below, using this extracted structure to guide every step. Do not add or remove properties relative to the schema.
|
|
11
|
+
|
|
12
|
+
## ⚙️ Composition
|
|
13
|
+
A widget is a UEM (Unified Experience Model) tree of blocks and regions. The widget you return must follow the Typescript interfaces below:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
interface BlockType {
|
|
17
|
+
type: 'block'
|
|
18
|
+
definition: string // {namespace}/{blockName}
|
|
19
|
+
attributes?: Record<string, any>
|
|
20
|
+
children?: (BlockType | RegionType)[]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface RegionType {
|
|
24
|
+
type: 'region'
|
|
25
|
+
name: string
|
|
26
|
+
children: BlockType[]
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 🔧 Available Metadata Actions
|
|
32
|
+
|
|
33
|
+
### When to Use Each Action
|
|
34
|
+
|
|
35
|
+
#### discoverUiComponents
|
|
36
|
+
|
|
37
|
+
**Purpose:** Discover the palette of available blocks that can be used in widget composition.
|
|
38
|
+
|
|
39
|
+
**Use for:** Finding available blocks before building your widget structure.
|
|
40
|
+
|
|
41
|
+
**Input Parameters:**
|
|
42
|
+
- `actionName` (**required***): "discoverUiComponents"
|
|
43
|
+
- `metadataType` (**required**): "FRAGMENT"
|
|
44
|
+
- `parameters` (**required**): JSON object with the below fields
|
|
45
|
+
- `pageType` (**required**): "FRAGMENT"
|
|
46
|
+
- `pageContext` (optional): JSON object - not required for FRAGMENT type
|
|
47
|
+
- `searchQuery` (optional): String to filter components by name or description
|
|
48
|
+
|
|
49
|
+
**Returns:** List of components with:
|
|
50
|
+
- `definition`: Fully qualified name (e.g., "namespace/definiton")
|
|
51
|
+
- `description`: Component description
|
|
52
|
+
- `label`: Human-readable label
|
|
53
|
+
- `attributes`: Optional attribute metadata
|
|
54
|
+
|
|
55
|
+
#### getUiComponentSchemas
|
|
56
|
+
|
|
57
|
+
**Purpose:** Get detailed JSON schemas for component configuration, including property types, required vs optional fields, and validation rules.
|
|
58
|
+
|
|
59
|
+
**Use for:** You know which components you want but need to understand their properties before adding them to your widget.
|
|
60
|
+
|
|
61
|
+
**Input Parameters:**
|
|
62
|
+
- `actionName` (**required***): "getUiComponentSchemas"
|
|
63
|
+
- `metadataType` (**required**): "FRAGMENT"
|
|
64
|
+
- `parameters` (**required**): JSON object with the below fields
|
|
65
|
+
- `pageType` (**required**): "FRAGMENT"
|
|
66
|
+
- `componentDefinitions` (**required**): List of fully qualified names (e.g., ["namespace/definition"])
|
|
67
|
+
- **CRITICAL**: NEVER include "tile/mosaic" in this list. "tile/mosaic" is a container component used in renderer.json structure and **should not** be passed to getUiComponentSchemas
|
|
68
|
+
- `pageContext` (optional): JSON object - not required for FRAGMENT type
|
|
69
|
+
- `includeKnowledge` (optional): Boolean, defaults to true - includes additional component-specific guidance
|
|
70
|
+
|
|
71
|
+
**Returns:**
|
|
72
|
+
- `componentSchemas`: List of results (supports partial failures)
|
|
73
|
+
- **Success entries**: Contains JSON schema with property definitions, types, constraints
|
|
74
|
+
- **Failure entries**: Contains error message explaining why schema couldn't be retrieved
|
|
75
|
+
- `$defs`: Schema definitions and references (if schema transformation applied)
|
|
76
|
+
|
|
77
|
+
**Key Feature:** Supports partial failures - if some components can't be found, you still get schemas for the successful ones.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Attribute binding using placeholder syntax
|
|
82
|
+
|
|
83
|
+
- **Where to use:** When block properties must display or pass runtime data from the grounding schema, use the **Placeholder Syntax** below so that the runtime binds values into the widget. Check each block's schema (from `getUiComponentSchemas`) for the correct property name (e.g. `value`, `text`, `label`).
|
|
84
|
+
- **Placeholder Syntax:** Use `{!$attrs.<attrName>}` as the placeholder for each block property that should receive data.
|
|
85
|
+
`<attrName>` **must** match the property name from the grounding schema so that the runtime can resolve its value.
|
|
86
|
+
Example: for a schema property `title`, set the block property to `{!$attrs.title}`.
|
|
87
|
+
- **List / iterative data:** Only the children (list items) hold bound values; the parent list block does not. For each item inside a list (e.g. `tile/listItem`), use `{!$attrs.<listAttrName>.item}` so the runtime binds the current item. `<listAttrName>` MUST match the schema property name of the list. Example: for `icons`, use `"{!$attrs.icons.item}"` on the list item.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 💡Workflow
|
|
92
|
+
|
|
93
|
+
1. **Schema Parsing**
|
|
94
|
+
- Parse the schema and extract: property names, types, required vs optional, and nested structure. Use this as the **widget spec**.
|
|
95
|
+
|
|
96
|
+
2. **Discover Available Blocks** (**REQUIRED** - do NOT skip)
|
|
97
|
+
- Use **discoverUiComponents metadata action** above to explore what blocks are available.
|
|
98
|
+
- Use property types from the **widget spec** to inform `searchQuery` (e.g. text → "text", number → "number").
|
|
99
|
+
|
|
100
|
+
3. **Select Components**
|
|
101
|
+
- Choose blocks that can represent each property in the **widget spec** from the results of step 2.
|
|
102
|
+
|
|
103
|
+
4. **Get Component Schemas** (**REQUIRED** - do NOT skip)
|
|
104
|
+
- Use **getUiComponentSchemas metadata action** with the selected block definitions from step 3 and review block properties' metadata.
|
|
105
|
+
|
|
106
|
+
5. **Build Widget**
|
|
107
|
+
- Construct the UEM tree. Map each property in the **widget spec** to block properties and preserve order of the **widget spec**.
|
|
108
|
+
- For block properties that must show or pass runtime data, use the placeholder syntax (see **Attribute binding using placeholder syntax** above).
|
|
109
|
+
- Use block properties from the schemas retrieved in step 4.
|
|
110
|
+
|
|
111
|
+
6. **Write output to CLT Bundle**
|
|
112
|
+
- Always write to `lightningTypes/<TypeName>/lightningDesktopGenAi/renderer.json` (or the correct target subfolder for the product surface, e.g. `experienceBuilder/`, `lightningMobileGenAi/`, `enhancedWebChat/` when applicable).
|
|
113
|
+
Check **required root override pattern** below -
|
|
114
|
+
`renderer.componentOverrides["$"] = { "type": "mosaic", "definition": "tile/mosaic", "children": [ ... ] — array of UEM nodes - contains the widget UEM generated using the **Workflow** steps 1-5 above }`
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## ⚠️ Important Notes
|
|
119
|
+
|
|
120
|
+
- **widget spec** includes both required and optional attributes - review carefully to ensure valid configuration.
|
|
121
|
+
- When using **`execute_metadata_action`** tool, always supply **`parameters`** with the required fields above; missing `parameters` or required keys causes hard failures, not partial results.
|
|
122
|
+
- Block definitions always follow the `{namespace}/{blockName}` convention.
|
|
123
|
+
- Use the same definition format returned by `discoverUiComponents` when calling `getUiComponentSchemas`
|
|
124
|
+
- Placeholder syntax for non-list properties is `{!$attrs.<attrName>}` and for list properties is `{!$attrs.<listAttrName>.item}`.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generating-ui-bundle-custom-app
|
|
3
|
+
description: "MUST activate when the project contains a uiBundles/*/src/ directory and the task involves creating or configuring a Custom Application for hosting a UI bundle in Lightning Experience. Use this skill when creating a CustomApplication metadata record to surface the UI bundle in the App Launcher. Activate when files matching applications/*.app-meta.xml exist and need modification, or when the user wants to expose their app via the Lightning App Launcher without a Digital Experience Site. Do NOT use generating-custom-application for this — UI bundle apps do not use tabs, action overrides, or flexipages."
|
|
4
|
+
metadata:
|
|
5
|
+
version: "1.0"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Custom Application for React UI Bundles
|
|
9
|
+
Create and configure a Salesforce Custom Application that hosts a React UI bundle in Lightning Experience. This skill generates the CustomApplication metadata so the app appears in the Lightning App Launcher and can be accessed by internal users.
|
|
10
|
+
|
|
11
|
+
Custom Applications differ from Experience Sites: they don't need Networks, CustomSite, DigitalExperienceConfig, or DigitalExperienceBundle metadata. The Custom Application acts as a thin launcher entry that delegates rendering to the React UI bundle referenced by `uiBundle`.
|
|
12
|
+
|
|
13
|
+
## Required Properties
|
|
14
|
+
Resolve all properties before generating any metadata. Each has a fallback chain — work through each option in order until a value is found.
|
|
15
|
+
|
|
16
|
+
| Property | Format | How to Resolve |
|
|
17
|
+
|----------|--------|----------------|
|
|
18
|
+
| **appName** | `lowercamelcase` (e.g., `myInternalApp`) | The UI bundle name from `uiBundles/<name>/` directory |
|
|
19
|
+
| **appNamespace** | String | `namespace` in `sfdx-project.json` → `sf data query -q "SELECT NamespacePrefix FROM Organization" --target-org ${usernameOrAlias}` → default `c` |
|
|
20
|
+
| **appLabel** | Human-readable string | User-provided, or derive from appName by converting camelCase to Title Case |
|
|
21
|
+
|
|
22
|
+
The `appNamespace` and `appName` connect the Custom Application to the correct React UI bundle. In newer API versions this uses `<uiBundle>{appNamespace}__{appName}</uiBundle>`; in older versions it uses `<webApplication>{appName}</webApplication>`. Getting this wrong means the app launcher entry exists but shows a blank page. Step 2 of the workflow determines which field to use.
|
|
23
|
+
|
|
24
|
+
## Generation Workflow
|
|
25
|
+
### Step 1: Resolve All Required Properties
|
|
26
|
+
Determine values for all properties before constructing anything. Use the resolution strategies in the table above.
|
|
27
|
+
|
|
28
|
+
### Step 2: Query API Context (Version-Aware Field Discovery)
|
|
29
|
+
Call `salesforce-api-context` MCP tools to discover which fields exist for the target org's API version. This ensures the generated metadata is compatible with the user's Salesforce version.
|
|
30
|
+
|
|
31
|
+
**Required calls:**
|
|
32
|
+
1. Call `get_metadata_type_fields` for `CustomApplication` — check whether the `uiBundle` field exists
|
|
33
|
+
2. Call `get_metadata_type_fields` for `UIBundle` — check whether the `target` field exists
|
|
34
|
+
|
|
35
|
+
**Field resolution based on API response:**
|
|
36
|
+
|
|
37
|
+
| Field Check | If present | If absent (older API version) |
|
|
38
|
+
|-------------|-----------|-------------------------------|
|
|
39
|
+
| `CustomApplication.uiBundle` | Use `<uiBundle>{appNamespace}__{appName}</uiBundle>` | Use `<webApplication>{appName}</webApplication>` (no namespace) |
|
|
40
|
+
| `UIBundle.target` | Use `<target>CustomApplication</target>` | Omit the `<target>` element entirely |
|
|
41
|
+
|
|
42
|
+
If `salesforce-api-context` is unavailable after a real attempt, fall back to the newer field names (`uiBundle` + `target`).
|
|
43
|
+
|
|
44
|
+
### Step 3: Create the Project Structure
|
|
45
|
+
Create any files and directories that don't already exist:
|
|
46
|
+
|
|
47
|
+
| Metadata Type | Path |
|
|
48
|
+
|--------------|------|
|
|
49
|
+
| CustomApplication | `<sourceDir>/applications/{appName}.app-meta.xml` |
|
|
50
|
+
|
|
51
|
+
**Note:** `<sourceDir>` is determined from `sfdx-project.json`. Read `packageDirectories[]` and use the entry where `"default": true`; the full source directory is `<path>/main/default`. If no default is set, use the first entry. Commonly `force-app/main/default`, but this path is configurable.
|
|
52
|
+
|
|
53
|
+
### Step 4: Populate All Metadata Fields
|
|
54
|
+
Use the default template in the doc below. Values in `{braces}` are resolved property references — substitute them with the actual values from Step 1. Apply the field resolution from Step 2 to determine which XML elements to use.
|
|
55
|
+
|
|
56
|
+
| Metadata Type | Template Reference |
|
|
57
|
+
|--------------|-------------------|
|
|
58
|
+
| CustomApplication | [configure-metadata-custom-application.md](docs/configure-metadata-custom-application.md) |
|
|
59
|
+
|
|
60
|
+
### Execution Note for Step 4: Load and use the doc
|
|
61
|
+
- Agents MUST read the full contents of the docs/*.md file referenced in Step 4 before attempting to populate metadata fields.
|
|
62
|
+
- Read the file in full, replace placeholders (e.g. `{appName}`) with the resolved values, then use the expanded template to populate the metadata XML content.
|
|
63
|
+
- If Step 2 determined the older field names apply, substitute `<uiBundle>` with `<webApplication>` in the generated output.
|
|
64
|
+
|
|
65
|
+
### Step 5: Update UI Bundle Meta XML
|
|
66
|
+
If Step 2 confirmed the `target` field exists on `UIBundle`, add `<target>CustomApplication</target>` to the `.uibundle-meta.xml` file (skip if the field doesn't exist in the org's API version):
|
|
67
|
+
|
|
68
|
+
```xml
|
|
69
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
70
|
+
<UIBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
71
|
+
<masterLabel>{appName}</masterLabel>
|
|
72
|
+
<description>A Salesforce UI Bundle.</description>
|
|
73
|
+
<isActive>true</isActive>
|
|
74
|
+
<version>1</version>
|
|
75
|
+
<target>CustomApplication</target>
|
|
76
|
+
</UIBundle>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Step 6: Do Not Modify Non-Templated Properties
|
|
80
|
+
Do not modify any default property values for `CustomApplication` metadata that are not expressed as variables wrapped in `{braces}`.
|
|
81
|
+
|
|
82
|
+
## Verification Checklist
|
|
83
|
+
Before deploying, confirm:
|
|
84
|
+
|
|
85
|
+
- [ ] All required properties are resolved
|
|
86
|
+
- [ ] API context was queried to determine available fields (Step 2)
|
|
87
|
+
- [ ] `applications/{appName}.app-meta.xml` exists with correct content
|
|
88
|
+
- [ ] The bundle reference field matches the org's API version (`<uiBundle>` or `<webApplication>`)
|
|
89
|
+
- [ ] If `target` field is supported: `.uibundle-meta.xml` has `<target>CustomApplication</target>`
|
|
90
|
+
- [ ] Deployment validates successfully:
|
|
91
|
+
```bash
|
|
92
|
+
sf project deploy validate --metadata CustomApplication UIBundle --target-org ${usernameOrAlias}
|
|
93
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Configure Metadata: CustomApplication
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
This configuration file creates a **net-new, default** CustomApplication metadata record for a Lightning Experience app that hosts a React UI bundle. It is not intended to edit or modify an existing CustomApplication record. Use this template only when provisioning a brand-new Custom Application for a UI bundle.
|
|
5
|
+
|
|
6
|
+
## File Location
|
|
7
|
+
```
|
|
8
|
+
<sourceDir>/applications/{appName}.app-meta.xml
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Note:** Determine `<sourceDir>` from `sfdx-project.json` → `packageDirectories[]` → find the entry with `"default": true` → use its `path` value + `/main/default`. Commonly `force-app/main/default`, but this is configurable.
|
|
12
|
+
|
|
13
|
+
## Default Template (newer API versions — `uiBundle` field available)
|
|
14
|
+
```xml
|
|
15
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
16
|
+
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
17
|
+
<brand>
|
|
18
|
+
<headerColor>#0070D2</headerColor>
|
|
19
|
+
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
|
|
20
|
+
</brand>
|
|
21
|
+
<formFactors>Small</formFactors>
|
|
22
|
+
<formFactors>Large</formFactors>
|
|
23
|
+
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
|
|
24
|
+
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
|
|
25
|
+
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
|
|
26
|
+
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
|
|
27
|
+
<label>{appLabel}</label>
|
|
28
|
+
<navType>Standard</navType>
|
|
29
|
+
<uiBundle>{appNamespace}__{appName}</uiBundle>
|
|
30
|
+
<uiType>Lightning</uiType>
|
|
31
|
+
</CustomApplication>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Fallback Template (older API versions — `uiBundle` field NOT available)
|
|
35
|
+
```xml
|
|
36
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
37
|
+
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
38
|
+
<brand>
|
|
39
|
+
<headerColor>#0070D2</headerColor>
|
|
40
|
+
<shouldOverrideOrgTheme>false</shouldOverrideOrgTheme>
|
|
41
|
+
</brand>
|
|
42
|
+
<formFactors>Small</formFactors>
|
|
43
|
+
<formFactors>Large</formFactors>
|
|
44
|
+
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
|
|
45
|
+
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
|
|
46
|
+
<isNavTabPersistenceDisabled>false</isNavTabPersistenceDisabled>
|
|
47
|
+
<isOmniPinnedViewEnabled>false</isOmniPinnedViewEnabled>
|
|
48
|
+
<label>{appLabel}</label>
|
|
49
|
+
<navType>Standard</navType>
|
|
50
|
+
<webApplication>{appName}</webApplication>
|
|
51
|
+
<uiType>Lightning</uiType>
|
|
52
|
+
</CustomApplication>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Field Reference
|
|
56
|
+
|
|
57
|
+
| Field | Required | Version | Description |
|
|
58
|
+
|-------|----------|---------|-------------|
|
|
59
|
+
| `brand.headerColor` | Yes | All | Hex color for the app header bar in Lightning Experience. Default: `#0070D2` (Salesforce blue). |
|
|
60
|
+
| `brand.shouldOverrideOrgTheme` | Yes | All | Whether this app's branding overrides the org theme. Default: `false`. |
|
|
61
|
+
| `formFactors` | Yes | All | Supported form factors. Include both `Small` (mobile) and `Large` (desktop) for full coverage. |
|
|
62
|
+
| `isNavAutoTempTabsDisabled` | Yes | All | Disable auto-creation of temporary tabs. Default: `false`. |
|
|
63
|
+
| `isNavPersonalizationDisabled` | Yes | All | Disable user personalization of navigation. Default: `false`. |
|
|
64
|
+
| `isNavTabPersistenceDisabled` | Yes | All | Disable persistence of nav tabs across sessions. Default: `false`. |
|
|
65
|
+
| `isOmniPinnedViewEnabled` | Yes | All | Enable Omni-channel pinned view. Default: `false`. |
|
|
66
|
+
| `label` | Yes | All | Human-readable label shown in the App Launcher and app switcher. |
|
|
67
|
+
| `navType` | Yes | All | Navigation type. Use `Standard` for standard Lightning navigation. |
|
|
68
|
+
| `uiBundle` | Conditional | Newer | Namespace-qualified developer name of the UI bundle (`{appNamespace}__{appName}`). Use when `get_metadata_type_fields` confirms this field exists on `CustomApplication`. |
|
|
69
|
+
| `webApplication` | Conditional | Older | Developer name of the UI bundle (`{appName}`, no namespace). Use when `uiBundle` field is not available. |
|
|
70
|
+
| `uiType` | Yes | All | UI framework type. Must be `Lightning` for UI bundle apps. |
|
|
@@ -24,6 +24,7 @@ After generation:
|
|
|
24
24
|
1. Replace all default boilerplate — "React App", "Vite + React", default `<title>`, placeholder text
|
|
25
25
|
2. Populate the home page with real content (landing section, banners, hero, navigation)
|
|
26
26
|
3. Update navigation and placeholders (see the `building-ui-bundle-frontend` skill)
|
|
27
|
+
4. **Configure a hosting target** — a UI bundle without a `<target>` in its meta XML will not be visible in the org. Use `generating-ui-bundle-custom-app` for internal (App Launcher) apps or `generating-ui-bundle-site` for external (Experience Site) apps.
|
|
27
28
|
|
|
28
29
|
Always install dependencies before running any scripts in the UI bundle directory.
|
|
29
30
|
|
|
@@ -39,7 +40,44 @@ A UIBundle bundle lives under `uiBundles/<AppName>/` and must contain:
|
|
|
39
40
|
### Meta XML
|
|
40
41
|
|
|
41
42
|
Required fields: `masterLabel`, `version` (max 20 chars), `isActive` (boolean).
|
|
42
|
-
Optional: `description` (max 255 chars)
|
|
43
|
+
Optional: `description` (max 255 chars), `target`.
|
|
44
|
+
|
|
45
|
+
#### Target Field
|
|
46
|
+
|
|
47
|
+
The `<target>` element specifies where the UI bundle is hosted:
|
|
48
|
+
|
|
49
|
+
| Value | Use Case | Companion Metadata |
|
|
50
|
+
|-------|----------|-------------------|
|
|
51
|
+
| `Experience` | External-facing site via Digital Experience | Network, CustomSite, DigitalExperienceConfig, DigitalExperienceBundle |
|
|
52
|
+
| `CustomApplication` | Internal app via Lightning App Launcher | CustomApplication (`applications/*.app-meta.xml`) |
|
|
53
|
+
|
|
54
|
+
A `<target>` is **required** for the app to be accessible in a Salesforce org. A UI bundle deployed without a target will not appear anywhere — no App Launcher entry, no Experience Site URL. Always pair the bundle with one of:
|
|
55
|
+
- `generating-ui-bundle-site` (for `Experience` target)
|
|
56
|
+
- `generating-ui-bundle-custom-app` (for `CustomApplication` target)
|
|
57
|
+
|
|
58
|
+
**Example with Experience target:**
|
|
59
|
+
```xml
|
|
60
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
61
|
+
<UIBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
62
|
+
<masterLabel>propertyrentalapp</masterLabel>
|
|
63
|
+
<description>A Salesforce UI Bundle.</description>
|
|
64
|
+
<isActive>true</isActive>
|
|
65
|
+
<version>1</version>
|
|
66
|
+
<target>Experience</target>
|
|
67
|
+
</UIBundle>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Example with CustomApplication target:**
|
|
71
|
+
```xml
|
|
72
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
73
|
+
<UIBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
|
74
|
+
<masterLabel>propertymanagementapp</masterLabel>
|
|
75
|
+
<description>A Salesforce UI Bundle.</description>
|
|
76
|
+
<isActive>true</isActive>
|
|
77
|
+
<version>1</version>
|
|
78
|
+
<target>CustomApplication</target>
|
|
79
|
+
</UIBundle>
|
|
80
|
+
```
|
|
43
81
|
|
|
44
82
|
### ui-bundle.json
|
|
45
83
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# investigating-agentforce-architecture
|
|
2
|
+
|
|
3
|
+
Declared architecture snapshot for a single Agentforce agent: planner + topics + actions + flows + Apex + prompts + NGA plugins. Reads design-time metadata only (`BotDefinition` + `GenAi*` Tooling objects + Metadata API retrieve) — no runtime audit data.
|
|
4
|
+
|
|
5
|
+
Input: an `agent_api_name` (the `BotDefinition.DeveloperName`) and an org alias. Optional `agent_version_api_name` to pin a version; otherwise the active `BotVersion` resolves.
|
|
6
|
+
|
|
7
|
+
Output: two files under `~/.vibe/data/investigating-agentforce-architecture/<org_id15>/<agent>__<version>/` — a normalized `<agent>_<ver>_metadata_tree.json` and a human-readable `<agent>_<ver>_architecture.md`. Override with `--data-dir <path>` (other runtimes pass this to land artifacts under their own distribution layout).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Runtime budget
|
|
12
|
+
|
|
13
|
+
**30–45s typical, ≤60s hard cap** on the reference fixtures.
|
|
14
|
+
|
|
15
|
+
A naive sequential implementation (Metadata API retrieves only) would take 90–220s. Speedup: **3–5×**.
|
|
16
|
+
|
|
17
|
+
Scaling note: large bots with many flows scale approximately linearly in flow count. Each Flow metadata retrieve is an individual SOQL round-trip; a 20-flow bot takes proportionally longer than a 5-flow bot. The 7 planner-side Tooling SOQL fan-outs are constant-cost (single fan-out regardless of bot size); the flow/apex body fetch wave scales with ref count.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Prerequisites
|
|
22
|
+
|
|
23
|
+
| Tool | Why |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `sf` CLI (authenticated against the target org) | Shells `sf org display --target-org <alias> --json` for access token, and `sf sobject describe` for the 7-day channel probe |
|
|
26
|
+
| Python 3.10+ | `pathlib`, dataclasses, `\|` union types, `concurrent.futures` |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
Invoked conversationally through whatever skill-aware runtime hosts it. Example prompts:
|
|
33
|
+
|
|
34
|
+
| User says | Skill does |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `document the architecture of MyAgent in my-org-alias` | Resolve active version, fetch tree, render architecture.md + Mermaid |
|
|
37
|
+
| `draw the invocation graph for MySalesAgent v5 in my-org-alias-3` | Same, pinned to v5 |
|
|
38
|
+
| `what tools does MyAgent2 have in my-org-alias-2` | Fetch tree, surface the plugin/function inventory from the rendered architecture.md |
|
|
39
|
+
| `re-fetch the architecture of MyAgent — I think metadata changed` | Pass `--force` to bypass the cache |
|
|
40
|
+
|
|
41
|
+
See `SKILL.md` for the full flag table and sample prompts.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Directory layout
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
investigating-agentforce-architecture/
|
|
49
|
+
├── SKILL.md Skill contract (inputs, outputs, pipeline, invariants)
|
|
50
|
+
├── README.md This file
|
|
51
|
+
├── assets/
|
|
52
|
+
│ ├── soql/*.soql Tooling + Data SOQL templates
|
|
53
|
+
│ ├── cli/*.yaml sf CLI recipes (subprocess invocation specs)
|
|
54
|
+
│ └── mermaid/*.mmd Mermaid templates for the invocation graph
|
|
55
|
+
├── references/
|
|
56
|
+
│ ├── soql_fields.md Per-sObject field reference (13 sObjects)
|
|
57
|
+
│ ├── architecture_sections.md Section-by-section structure of the rendered architecture.md
|
|
58
|
+
│ └── contract.json metadata_tree.json schema contract
|
|
59
|
+
├── scripts/
|
|
60
|
+
│ ├── _shared/ Path helpers + fs_guard validators + sql escapers
|
|
61
|
+
│ ├── main.py Orchestrator entry point
|
|
62
|
+
│ ├── config.py Shared paths, cache TTLs, validated path builders
|
|
63
|
+
│ ├── soql_loader.py Template loader with fs_guard-validated substitution
|
|
64
|
+
│ ├── sf_cli.py sf CLI subprocess wrapper (yaml.safe_load + stderr redaction)
|
|
65
|
+
│ ├── rest_client.py urllib wrapper (Authorization-stripping redirect handler)
|
|
66
|
+
│ ├── resolve_bot.py BotDefinition + BotVersion + planner name lookup
|
|
67
|
+
│ ├── retrieve_planner.py Metadata retrieve for GenAiPlannerBundle + NGA plugins
|
|
68
|
+
│ ├── parallel_retrieve.py 7-channel parallel Tooling SOQL fan-out
|
|
69
|
+
│ ├── parse_bundle.py XML → normalized node shapes
|
|
70
|
+
│ ├── parse_wave.py BFS expansion of flow/apex/prompt refs
|
|
71
|
+
│ ├── probe_channels.py 7-day-TTL channel describe probe
|
|
72
|
+
│ ├── cache_check.py Asset-hash-aware cache freshness
|
|
73
|
+
│ ├── finalize.py Merge waves → metadata_tree.json
|
|
74
|
+
│ ├── render_architecture.py architecture.md + Mermaid graph
|
|
75
|
+
│ ├── resolve_invocation_target.py ID-prefix router for NGA InvocationTargets
|
|
76
|
+
│ └── tests/ Unit + integration tests (unittest)
|
|
77
|
+
└── tools/
|
|
78
|
+
├── emit_env.py Env-var emit helper (Phase 0.5)
|
|
79
|
+
├── emit_result.py Final RESULT block renderer
|
|
80
|
+
├── sanitize.py Stdin → safe-string filter
|
|
81
|
+
└── write_emit_ctx.py Per-phase ctx writer
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Architecture
|
|
87
|
+
|
|
88
|
+
### Channel strategy — SOQL-first
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Seed query: planner_definition_by_agent_chain (chain-LIKE lookup → planner id)
|
|
92
|
+
|
|
93
|
+
6 parallel Tooling SOQL channels (keyed on the resolved planner id):
|
|
94
|
+
- plugins_by_planner
|
|
95
|
+
- planner_bundle_functions (join)
|
|
96
|
+
- functions_by_plugins
|
|
97
|
+
- planner_attrs_by_parent_ids
|
|
98
|
+
- plugin_functions_by_plugin_ids (join)
|
|
99
|
+
- plugin_instructions_by_plugin_ids
|
|
100
|
+
|
|
101
|
+
+ Data API SOQL for Flow / Apex bodies (batched by id list)
|
|
102
|
+
+ Metadata retrieve ONLY for:
|
|
103
|
+
- GenAiPromptTemplate (prompt bodies)
|
|
104
|
+
- NGA external plugins (when planner is ConcurrentMultiAgentOrchestration etc.)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Most of the 3–5× speedup over a naive Metadata-API-only implementation comes from collapsing a sequential zip-retrieve chain into a single Tooling SOQL fan-out.
|
|
108
|
+
|
|
109
|
+
### Planner normalization — classic ReAct vs NGA
|
|
110
|
+
|
|
111
|
+
One tree shape, two planner families:
|
|
112
|
+
|
|
113
|
+
| `PlannerType` examples | Family | InvocationTarget style |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `ReactAiPlannerV1`, `SequentialPlannerIntentClassifier` | Classic ReAct | DeveloperName strings |
|
|
116
|
+
| `ConcurrentMultiAgentOrchestration`, `AnthropicCompatibleV1` | NGA | Sometimes 15/18-char Ids (ID-prefix routed) |
|
|
117
|
+
|
|
118
|
+
`resolve_invocation_target.py` routes NGA InvocationTargets by Salesforce ID prefix (`01p` → ApexClass, `301` → Flow, etc.). Unknown prefixes become `_unresolved[]` entries with `reason="unknown-id-prefix:<prefix>"` — never silently dropped.
|
|
119
|
+
|
|
120
|
+
### Cache layers
|
|
121
|
+
|
|
122
|
+
1. **Tree cache** — `metadata_tree.json` is reused unless `--force`. Cache key includes asset-hashes of every SOQL / YAML / Mermaid template shipped with the skill, so changing a template busts the cache automatically.
|
|
123
|
+
2. **Channel probe cache** — 7-day TTL on `sf sobject describe` results for the 13 sObjects the skill touches. `--reprobe` forces a refresh (needed after Salesforce quarterly releases that rename / remove fields). Mandatory-field gate: a probe that sees any mandatory field missing (per `probe_channels.MANDATORY_FIELDS`) flips `status: PROBE_FAILED` so the caller surfaces a clean error.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Key behaviors
|
|
128
|
+
|
|
129
|
+
### Idempotence
|
|
130
|
+
|
|
131
|
+
Re-running the same `(org, agent, version)` overwrites prior artifacts in place. Safe to run repeatedly during development.
|
|
132
|
+
|
|
133
|
+
### Partial-results surfacing
|
|
134
|
+
|
|
135
|
+
No silent drops. Any unresolved ref — unknown ID prefix, failed SOQL, missing describe field — lands in `_unresolved[]` with a `reason=...` string. Top-level `STATUS` is `OK` on a clean run, `PARTIAL_OK` when any channel degrades.
|
|
136
|
+
|
|
137
|
+
### Cycle handling
|
|
138
|
+
|
|
139
|
+
Per-branch ancestor-path cycle detection is the primary termination primitive: the same flow visited along its own ancestor chain emits `_cycle_back_to:<path>` instead of recursing. `MAX_BFS_DEPTH=20` is a defensive last-resort guard against pathological graphs that evade per-branch detection; real-world agents bottom out well before that.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Troubleshooting
|
|
144
|
+
|
|
145
|
+
| Symptom | Fix |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `sf org display failed` | Re-authenticate: `sf org login web --alias <alias>` |
|
|
148
|
+
| `INVALID_FIELD` from a SOQL asset | Salesforce renamed / removed the field in a quarterly release. Run with `--reprobe` to refresh the 7-day channel cache and pick up the new schema |
|
|
149
|
+
| `STATUS=PROBE_FAILED` on first run | Channel probe saw a mandatory field missing. Check `channels.json` under the probe cache dir for which sObject / field — may require org-side feature enablement |
|
|
150
|
+
| Tree for classic ReAct agent shows `_unresolved` entries for NGA plugins | Expected — the NGA external-plugin retrieve is skipped when the planner shape is classic. Those entries can be ignored |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Author
|
|
155
|
+
|
|
156
|
+
Raghul Jayagopal (RJ), Salesforce ANZ FDE.
|