@salesforce/afv-skills 1.14.0 → 1.16.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 +1 -1
- package/skills/activating-datacloud/SKILL.md +0 -1
- package/skills/analyzing-omnistudio-dependencies/SKILL.md +0 -1
- 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-mobile-apps/SKILL.md +0 -1
- package/skills/building-omnistudio-callable-apex/SKILL.md +0 -1
- package/skills/building-omnistudio-datamapper/SKILL.md +0 -1
- package/skills/building-omnistudio-flexcard/SKILL.md +0 -1
- package/skills/building-omnistudio-integration-procedure/SKILL.md +0 -1
- package/skills/building-omnistudio-omniscript/SKILL.md +0 -1
- package/skills/building-sf-integrations/SKILL.md +0 -1
- package/skills/configuring-connected-apps/SKILL.md +0 -1
- package/skills/connecting-datacloud/SKILL.md +0 -1
- package/skills/creating-b2b-commerce-store/SKILL.md +0 -1
- package/skills/debugging-apex-logs/SKILL.md +0 -1
- package/skills/deploying-metadata/SKILL.md +0 -1
- package/skills/deploying-omnistudio-datapacks/SKILL.md +0 -1
- package/skills/developing-agentforce/SKILL.md +0 -1
- package/skills/fetching-salesforce-docs/SKILL.md +0 -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-lwc-components/SKILL.md +0 -1
- package/skills/generating-mermaid-diagrams/SKILL.md +0 -1
- package/skills/generating-visual-diagrams/SKILL.md +0 -1
- package/skills/handling-sf-data/SKILL.md +0 -1
- package/skills/harmonizing-datacloud/SKILL.md +0 -1
- package/skills/integrating-b2b-commerce-open-code-components/SKILL.md +0 -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/modeling-omnistudio-epc-catalog/SKILL.md +0 -1
- package/skills/observing-agentforce/SKILL.md +0 -1
- package/skills/orchestrating-datacloud/SKILL.md +0 -1
- package/skills/preparing-datacloud/SKILL.md +0 -1
- package/skills/querying-soql/SKILL.md +0 -1
- package/skills/retrieving-datacloud/SKILL.md +0 -1
- package/skills/running-apex-tests/SKILL.md +0 -1
- package/skills/running-code-analyzer/SKILL.md +0 -1
- package/skills/segmenting-datacloud/SKILL.md +0 -1
- package/skills/testing-agentforce/SKILL.md +0 -1
- 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/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
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
"""Tests for Section-7 signature stamping.
|
|
2
|
+
|
|
3
|
+
Previously, every flow and every Apex class in the rendered architecture
|
|
4
|
+
report's Section 7 showed `_Signature not captured._` because Wave B
|
|
5
|
+
fetched `SymbolTable` + `Flow.Metadata` but we never projected that data
|
|
6
|
+
onto the tree nodes the renderer reads. These tests pin the three
|
|
7
|
+
helpers that close the gap:
|
|
8
|
+
|
|
9
|
+
* `_derive_apex_signature` — SymbolTable → one-line method signature
|
|
10
|
+
* `_derive_flow_signature` — Flow.Metadata → `in:/out:` param list
|
|
11
|
+
* `_stamp_signatures` — walks the tree and writes `node["signature"]`
|
|
12
|
+
|
|
13
|
+
The renderer at `render_architecture.py` reads `node.get("signature")`
|
|
14
|
+
already; no renderer change was required.
|
|
15
|
+
"""
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
|
|
18
|
+
import unittest
|
|
19
|
+
|
|
20
|
+
from . import _bootstrap # noqa: F401
|
|
21
|
+
|
|
22
|
+
import main # type: ignore
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# ---------------------------------------------------------------------------
|
|
26
|
+
# _derive_apex_signature
|
|
27
|
+
# ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class DeriveApexSignatureTests(unittest.TestCase):
|
|
31
|
+
def test_invocable_method_is_preferred(self):
|
|
32
|
+
"""@InvocableMethod is what Flow / Agentforce actually call. If
|
|
33
|
+
present, it MUST be picked over any other method — otherwise the
|
|
34
|
+
rendered signature points at a private helper instead of the
|
|
35
|
+
public entry point."""
|
|
36
|
+
apex_row = {
|
|
37
|
+
"Name": "OrderLookup",
|
|
38
|
+
"SymbolTable": {
|
|
39
|
+
"methods": [
|
|
40
|
+
{
|
|
41
|
+
"name": "helper",
|
|
42
|
+
"returnType": "void",
|
|
43
|
+
"modifiers": ["private"],
|
|
44
|
+
"parameters": [{"name": "x", "type": "String"}],
|
|
45
|
+
"annotations": [],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "run",
|
|
49
|
+
"returnType": "List<Result>",
|
|
50
|
+
"modifiers": ["public", "static"],
|
|
51
|
+
"parameters": [
|
|
52
|
+
{"name": "input", "type": "List<Request>"},
|
|
53
|
+
],
|
|
54
|
+
"annotations": [{"name": "InvocableMethod"}],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
sig = main._derive_apex_signature(apex_row)
|
|
60
|
+
self.assertEqual(sig, "public static List<Result> run(List<Request> input)")
|
|
61
|
+
|
|
62
|
+
def test_no_invocable_falls_back_to_global(self):
|
|
63
|
+
"""Without `@InvocableMethod`, a `global` method wins over a
|
|
64
|
+
`private` helper."""
|
|
65
|
+
apex_row = {
|
|
66
|
+
"Name": "Utility",
|
|
67
|
+
"SymbolTable": {
|
|
68
|
+
"methods": [
|
|
69
|
+
{
|
|
70
|
+
"name": "privateHelper",
|
|
71
|
+
"returnType": "void",
|
|
72
|
+
"modifiers": ["private"],
|
|
73
|
+
"parameters": [],
|
|
74
|
+
"annotations": [],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "publicEntry",
|
|
78
|
+
"returnType": "String",
|
|
79
|
+
"modifiers": ["global"],
|
|
80
|
+
"parameters": [{"name": "id", "type": "Id"}],
|
|
81
|
+
"annotations": [],
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
}
|
|
86
|
+
sig = main._derive_apex_signature(apex_row)
|
|
87
|
+
self.assertEqual(sig, "global String publicEntry(Id id)")
|
|
88
|
+
|
|
89
|
+
def test_empty_symbol_table_returns_none(self):
|
|
90
|
+
"""`SymbolTable = null` is the common case for classes the org
|
|
91
|
+
couldn't compile a symbol table for. Must not raise, must return
|
|
92
|
+
None so the renderer falls back to the `_Signature not captured._`
|
|
93
|
+
placeholder."""
|
|
94
|
+
self.assertIsNone(
|
|
95
|
+
main._derive_apex_signature({"Name": "X", "SymbolTable": None})
|
|
96
|
+
)
|
|
97
|
+
self.assertIsNone(
|
|
98
|
+
main._derive_apex_signature({"Name": "X", "SymbolTable": {}})
|
|
99
|
+
)
|
|
100
|
+
self.assertIsNone(
|
|
101
|
+
main._derive_apex_signature(
|
|
102
|
+
{"Name": "X", "SymbolTable": {"methods": []}}
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
def test_no_candidate_methods_returns_none(self):
|
|
107
|
+
"""A class whose only method is private AND not invocable has no
|
|
108
|
+
sensible public signature to surface; return None rather than
|
|
109
|
+
expose internal detail."""
|
|
110
|
+
apex_row = {
|
|
111
|
+
"Name": "PrivateOnly",
|
|
112
|
+
"SymbolTable": {
|
|
113
|
+
"methods": [
|
|
114
|
+
{
|
|
115
|
+
"name": "hidden",
|
|
116
|
+
"returnType": "void",
|
|
117
|
+
"modifiers": ["private"],
|
|
118
|
+
"parameters": [],
|
|
119
|
+
"annotations": [],
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
self.assertIsNone(main._derive_apex_signature(apex_row))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
# ---------------------------------------------------------------------------
|
|
128
|
+
# _derive_flow_signature
|
|
129
|
+
# ---------------------------------------------------------------------------
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class DeriveFlowSignatureTests(unittest.TestCase):
|
|
133
|
+
def test_input_and_output_both_present(self):
|
|
134
|
+
"""Both sides rendered with ` | ` separator.
|
|
135
|
+
|
|
136
|
+
Flow.Metadata exposes a flat `variables[]` list; each item carries
|
|
137
|
+
boolean `isInput` / `isOutput` flags. We partition the list by
|
|
138
|
+
those flags rather than reading the non-existent
|
|
139
|
+
`inputParameters` / `outputParameters` fields.
|
|
140
|
+
"""
|
|
141
|
+
record = {
|
|
142
|
+
"Metadata": {
|
|
143
|
+
"variables": [
|
|
144
|
+
{"name": "caseId", "dataType": "String",
|
|
145
|
+
"isInput": True, "isOutput": False},
|
|
146
|
+
{"name": "priority", "dataType": "String",
|
|
147
|
+
"isInput": True, "isOutput": False},
|
|
148
|
+
{"name": "result", "dataType": "String",
|
|
149
|
+
"isInput": False, "isOutput": True},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
sig = main._derive_flow_signature(record)
|
|
154
|
+
self.assertEqual(
|
|
155
|
+
sig,
|
|
156
|
+
"in: caseId: String, priority: String | out: result: String",
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
def test_only_input_side(self):
|
|
160
|
+
"""outputs empty → only `in:` side rendered, no trailing ` | `."""
|
|
161
|
+
record = {
|
|
162
|
+
"Metadata": {
|
|
163
|
+
"variables": [
|
|
164
|
+
{"name": "caseId", "dataType": "String",
|
|
165
|
+
"isInput": True, "isOutput": False},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
}
|
|
169
|
+
sig = main._derive_flow_signature(record)
|
|
170
|
+
self.assertEqual(sig, "in: caseId: String")
|
|
171
|
+
|
|
172
|
+
def test_no_parameters_returns_none(self):
|
|
173
|
+
"""No variables at all → None (render falls back to placeholder)."""
|
|
174
|
+
record = {"Metadata": {"variables": []}}
|
|
175
|
+
self.assertIsNone(main._derive_flow_signature(record))
|
|
176
|
+
self.assertIsNone(main._derive_flow_signature({"Metadata": {}}))
|
|
177
|
+
self.assertIsNone(main._derive_flow_signature({}))
|
|
178
|
+
|
|
179
|
+
def test_collection_type_rendered_as_list(self):
|
|
180
|
+
"""`isCollection: True` on a variable → `List<DataType>` (and for
|
|
181
|
+
sObject variables, the `objectType` feeds the inner type rather
|
|
182
|
+
than the literal `SObject`; case-insensitive match on
|
|
183
|
+
`dataType`)."""
|
|
184
|
+
record = {
|
|
185
|
+
"Metadata": {
|
|
186
|
+
"variables": [
|
|
187
|
+
{
|
|
188
|
+
"name": "ids",
|
|
189
|
+
"dataType": "String",
|
|
190
|
+
"isCollection": True,
|
|
191
|
+
"isInput": True,
|
|
192
|
+
"isOutput": False,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"name": "cases",
|
|
196
|
+
"dataType": "sObject",
|
|
197
|
+
"objectType": "Case",
|
|
198
|
+
"isCollection": True,
|
|
199
|
+
"isInput": True,
|
|
200
|
+
"isOutput": False,
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "result",
|
|
204
|
+
"dataType": "SObject", # upper-case variant
|
|
205
|
+
"objectType": "Account",
|
|
206
|
+
"isInput": False,
|
|
207
|
+
"isOutput": True,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
}
|
|
212
|
+
sig = main._derive_flow_signature(record)
|
|
213
|
+
self.assertEqual(
|
|
214
|
+
sig,
|
|
215
|
+
"in: ids: List<String>, cases: List<Case> | out: result: Account",
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
def test_round_trip_variable_appears_on_both_sides(self):
|
|
219
|
+
"""A variable with `isInput: True` AND `isOutput: True` is a
|
|
220
|
+
round-trip — flows use this for parameters the caller passes in
|
|
221
|
+
and the flow mutates back out. It must appear on BOTH sides of
|
|
222
|
+
the rendered signature."""
|
|
223
|
+
record = {
|
|
224
|
+
"Metadata": {
|
|
225
|
+
"variables": [
|
|
226
|
+
{"name": "payload", "dataType": "String",
|
|
227
|
+
"isInput": True, "isOutput": True},
|
|
228
|
+
],
|
|
229
|
+
},
|
|
230
|
+
}
|
|
231
|
+
sig = main._derive_flow_signature(record)
|
|
232
|
+
self.assertEqual(
|
|
233
|
+
sig,
|
|
234
|
+
"in: payload: String | out: payload: String",
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
def test_derive_flow_signature_local_variables_ignored(self):
|
|
238
|
+
"""A variable with `isInput: False` AND `isOutput: False` is a
|
|
239
|
+
flow-local — it exists only inside the flow's execution and is
|
|
240
|
+
not part of its public surface. It must not appear in either
|
|
241
|
+
side of the signature."""
|
|
242
|
+
record = {
|
|
243
|
+
"Metadata": {
|
|
244
|
+
"variables": [
|
|
245
|
+
{"name": "scratch", "dataType": "String",
|
|
246
|
+
"isInput": False, "isOutput": False},
|
|
247
|
+
{"name": "caseId", "dataType": "String",
|
|
248
|
+
"isInput": True, "isOutput": False},
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
}
|
|
252
|
+
sig = main._derive_flow_signature(record)
|
|
253
|
+
self.assertEqual(sig, "in: caseId: String")
|
|
254
|
+
|
|
255
|
+
def test_derive_flow_signature_handlefaultfault_shape(self):
|
|
256
|
+
"""Real-org fixture modeled on `handleFlowFault` from the
|
|
257
|
+
my-org-alias org: 8 variables → 5 inputs, 3 outputs. Pins the
|
|
258
|
+
exact expected signature string end-to-end so that any future
|
|
259
|
+
regression in partitioning, rendering, or ordering surfaces
|
|
260
|
+
immediately."""
|
|
261
|
+
record = {
|
|
262
|
+
"Metadata": {
|
|
263
|
+
"variables": [
|
|
264
|
+
{"name": "alwaysLogError", "dataType": "Boolean",
|
|
265
|
+
"isCollection": False, "isInput": True,
|
|
266
|
+
"isOutput": False, "objectType": None},
|
|
267
|
+
{"name": "errorCode", "dataType": "String",
|
|
268
|
+
"isCollection": False, "isInput": False,
|
|
269
|
+
"isOutput": True, "objectType": None},
|
|
270
|
+
{"name": "errorMessage", "dataType": "String",
|
|
271
|
+
"isCollection": False, "isInput": False,
|
|
272
|
+
"isOutput": True, "objectType": None},
|
|
273
|
+
{"name": "flowFaultMessage", "dataType": "String",
|
|
274
|
+
"isCollection": False, "isInput": True,
|
|
275
|
+
"isOutput": False, "objectType": None},
|
|
276
|
+
{"name": "flowName", "dataType": "String",
|
|
277
|
+
"isCollection": False, "isInput": True,
|
|
278
|
+
"isOutput": False, "objectType": None},
|
|
279
|
+
{"name": "flowObject", "dataType": "String",
|
|
280
|
+
"isCollection": False, "isInput": True,
|
|
281
|
+
"isOutput": False, "objectType": None},
|
|
282
|
+
{"name": "flowSection", "dataType": "String",
|
|
283
|
+
"isCollection": False, "isInput": True,
|
|
284
|
+
"isOutput": False, "objectType": None},
|
|
285
|
+
{"name": "isFatal", "dataType": "Boolean",
|
|
286
|
+
"isCollection": False, "isInput": False,
|
|
287
|
+
"isOutput": True, "objectType": None},
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
}
|
|
291
|
+
sig = main._derive_flow_signature(record)
|
|
292
|
+
self.assertEqual(
|
|
293
|
+
sig,
|
|
294
|
+
"in: alwaysLogError: Boolean, flowFaultMessage: String, "
|
|
295
|
+
"flowName: String, flowObject: String, flowSection: String | "
|
|
296
|
+
"out: errorCode: String, errorMessage: String, isFatal: Boolean",
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
def test_derive_flow_signature_apex_type_uses_apexclass(self):
|
|
300
|
+
"""Apex-typed variables (e.g. Flow invocable action return rows)
|
|
301
|
+
carry the concrete class name in `apexClass`, not `dataType`
|
|
302
|
+
(which is the generic literal `Apex`). The signature MUST render
|
|
303
|
+
the concrete class so authors can trace the type back to real
|
|
304
|
+
code — `List<Apex>` is useless."""
|
|
305
|
+
record = {
|
|
306
|
+
"Metadata": {
|
|
307
|
+
"variables": [
|
|
308
|
+
{
|
|
309
|
+
"name": "OrgList",
|
|
310
|
+
"dataType": "Apex",
|
|
311
|
+
"apexClass": "CX_OrgSelector.Org",
|
|
312
|
+
"isCollection": True,
|
|
313
|
+
"isInput": False,
|
|
314
|
+
"isOutput": True,
|
|
315
|
+
},
|
|
316
|
+
],
|
|
317
|
+
},
|
|
318
|
+
}
|
|
319
|
+
sig = main._derive_flow_signature(record)
|
|
320
|
+
self.assertEqual(sig, "out: OrgList: List<CX_OrgSelector.Org>")
|
|
321
|
+
|
|
322
|
+
def test_derive_flow_signature_apex_type_without_apexclass_falls_through(self):
|
|
323
|
+
"""Defensive fallback: if `apexClass` is missing/blank on an
|
|
324
|
+
Apex-typed variable we render the literal `Apex` so the surface
|
|
325
|
+
still reports *something* — losing the signature entirely would
|
|
326
|
+
regress today's behavior."""
|
|
327
|
+
record = {
|
|
328
|
+
"Metadata": {
|
|
329
|
+
"variables": [
|
|
330
|
+
{
|
|
331
|
+
"name": "rows",
|
|
332
|
+
"dataType": "Apex",
|
|
333
|
+
"apexClass": None,
|
|
334
|
+
"isCollection": True,
|
|
335
|
+
"isInput": False,
|
|
336
|
+
"isOutput": True,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
},
|
|
340
|
+
}
|
|
341
|
+
sig = main._derive_flow_signature(record)
|
|
342
|
+
self.assertEqual(sig, "out: rows: List<Apex>")
|
|
343
|
+
|
|
344
|
+
def test_bare_metadata_dict_accepted(self):
|
|
345
|
+
"""Test convenience: callers can pass the `Metadata` dict
|
|
346
|
+
directly (what they'd get from `record["Metadata"]`) without
|
|
347
|
+
wrapping it in the outer Tooling row. Exercised by several
|
|
348
|
+
sibling tests; pin the contract explicitly."""
|
|
349
|
+
bare = {
|
|
350
|
+
"variables": [
|
|
351
|
+
{"name": "caseId", "dataType": "String",
|
|
352
|
+
"isInput": True, "isOutput": False},
|
|
353
|
+
],
|
|
354
|
+
}
|
|
355
|
+
sig = main._derive_flow_signature(bare)
|
|
356
|
+
self.assertEqual(sig, "in: caseId: String")
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
# ---------------------------------------------------------------------------
|
|
360
|
+
# _stamp_signatures — walks tree, writes node["signature"]
|
|
361
|
+
# ---------------------------------------------------------------------------
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
class StampSignaturesTests(unittest.TestCase):
|
|
365
|
+
def test_stamp_applies_to_tree(self):
|
|
366
|
+
"""APEX + FLOW nodes whose api_name matches the sigs dicts get
|
|
367
|
+
`node["signature"]` populated; unmatched nodes are left alone."""
|
|
368
|
+
tree_root = {
|
|
369
|
+
"kind": "AGENT",
|
|
370
|
+
"api_name": "MyAgent",
|
|
371
|
+
"children": [
|
|
372
|
+
{
|
|
373
|
+
"kind": "APEX",
|
|
374
|
+
"api_name": "OrderLookup",
|
|
375
|
+
"children": [],
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"kind": "APEX",
|
|
379
|
+
"api_name": "UnmatchedApex",
|
|
380
|
+
"children": [],
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "FLOW",
|
|
384
|
+
"api_name": "LookupOrder",
|
|
385
|
+
"children": [
|
|
386
|
+
{
|
|
387
|
+
"kind": "APEX",
|
|
388
|
+
"api_name": "OrderLookup",
|
|
389
|
+
"children": [],
|
|
390
|
+
},
|
|
391
|
+
],
|
|
392
|
+
},
|
|
393
|
+
],
|
|
394
|
+
}
|
|
395
|
+
apex_sigs = {
|
|
396
|
+
"OrderLookup": "public static List<Result> run(List<Request> input)",
|
|
397
|
+
}
|
|
398
|
+
flow_sigs = {
|
|
399
|
+
"LookupOrder": "in: caseId: String | out: result: String",
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
main._stamp_signatures(tree_root, apex_sigs, flow_sigs)
|
|
403
|
+
|
|
404
|
+
self.assertEqual(
|
|
405
|
+
tree_root["children"][0]["signature"],
|
|
406
|
+
"public static List<Result> run(List<Request> input)",
|
|
407
|
+
)
|
|
408
|
+
# Unmatched Apex stays bare.
|
|
409
|
+
self.assertNotIn("signature", tree_root["children"][1])
|
|
410
|
+
# Flow node gets its signature.
|
|
411
|
+
self.assertEqual(
|
|
412
|
+
tree_root["children"][2]["signature"],
|
|
413
|
+
"in: caseId: String | out: result: String",
|
|
414
|
+
)
|
|
415
|
+
# Apex nested under the flow also stamped.
|
|
416
|
+
self.assertEqual(
|
|
417
|
+
tree_root["children"][2]["children"][0]["signature"],
|
|
418
|
+
"public static List<Result> run(List<Request> input)",
|
|
419
|
+
)
|
|
420
|
+
# Root itself (neither APEX nor FLOW) is untouched.
|
|
421
|
+
self.assertNotIn("signature", tree_root)
|
|
422
|
+
|
|
423
|
+
def test_stamp_preserves_shared_utility_across_branches(self):
|
|
424
|
+
"""Shared utility flows (e.g. handleFlowFault referenced from N
|
|
425
|
+
places) must get the SAME signature stamped on every occurrence —
|
|
426
|
+
they reference the same FlowDefinition / ApexClass by name."""
|
|
427
|
+
tree_root = {
|
|
428
|
+
"kind": "AGENT",
|
|
429
|
+
"api_name": "Agent",
|
|
430
|
+
"children": [
|
|
431
|
+
{
|
|
432
|
+
"kind": "FLOW",
|
|
433
|
+
"api_name": "BranchA",
|
|
434
|
+
"children": [
|
|
435
|
+
{
|
|
436
|
+
"kind": "FLOW",
|
|
437
|
+
"api_name": "handleFlowFault",
|
|
438
|
+
"children": [],
|
|
439
|
+
},
|
|
440
|
+
],
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"kind": "FLOW",
|
|
444
|
+
"api_name": "BranchB",
|
|
445
|
+
"children": [
|
|
446
|
+
{
|
|
447
|
+
"kind": "FLOW",
|
|
448
|
+
"api_name": "handleFlowFault",
|
|
449
|
+
"children": [],
|
|
450
|
+
},
|
|
451
|
+
],
|
|
452
|
+
},
|
|
453
|
+
],
|
|
454
|
+
}
|
|
455
|
+
flow_sigs = {"handleFlowFault": "in: fault: String"}
|
|
456
|
+
main._stamp_signatures(tree_root, {}, flow_sigs)
|
|
457
|
+
|
|
458
|
+
stamp_a = tree_root["children"][0]["children"][0]["signature"]
|
|
459
|
+
stamp_b = tree_root["children"][1]["children"][0]["signature"]
|
|
460
|
+
self.assertEqual(stamp_a, "in: fault: String")
|
|
461
|
+
self.assertEqual(stamp_b, "in: fault: String")
|
|
462
|
+
self.assertEqual(stamp_a, stamp_b)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
if __name__ == "__main__":
|
|
466
|
+
unittest.main()
|