@salesforce/afv-skills 1.67.0 → 1.69.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/README.md +55 -5
- package/package.json +1 -1
- package/skills/afcc-setup-coordinate/SKILL.md +348 -0
- package/skills/afcc-setup-coordinate/assets/console-app/AFCC_Service_Console.app-meta.xml +19 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Admin.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/console-app/Standard.profile-meta.xml +8 -0
- package/skills/afcc-setup-coordinate/assets/gap_report_template.md +35 -0
- package/skills/afcc-setup-coordinate/assets/org_profile_template.json +16 -0
- package/skills/afcc-setup-coordinate/references/gotchas.md +22 -0
- package/skills/afcc-setup-coordinate/scripts/audit_org.sh +159 -0
- package/skills/agentforce-bot-upgrade/SKILL.md +117 -66
- package/skills/agentforce-bot-upgrade/assets/_vendored/agent-spec-template.md +139 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-design-and-spec-creation.md +1211 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-script-core-language.md +1390 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-subagent-map-diagrams.md +341 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-user-setup.md +672 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agent-validation-and-debugging.md +904 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/agentscript-toolchain.md +112 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/architecture-patterns.md +277 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/common-control-flow-pitfalls.md +255 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-actions-sequencing.md +198 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/control-flow-lifecycle-side-effects.md +87 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/data-library-reference.md +891 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/instruction-resolution.md +658 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/org-setup-for-adl.md +551 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/patterns-by-requirement.md +88 -0
- package/skills/agentforce-bot-upgrade/references/_vendored/posture-and-determinism.md +215 -0
- package/skills/agentforce-bot-upgrade/references/extraction-blueprint.md +11 -4
- package/skills/agentforce-bot-upgrade/references/generate-agent-spec.md +19 -3
- package/skills/agentforce-bot-upgrade/references/handoff-output-format.md +82 -52
- package/skills/agentforce-bot-upgrade/references/input-contract.md +8 -8
- package/skills/agentforce-bot-upgrade/references/mapping-rules.md +19 -6
- package/skills/agentforce-bot-upgrade/references/post-conversion-enhancements-reference.md +65 -6
- package/skills/agentforce-bot-upgrade/references/quality-checklist.md +4 -4
- package/skills/agentforce-bot-upgrade/references/sf-cli-bot-reference.md +17 -3
- package/skills/agentforce-hyperclassifier-configure/README.md +24 -0
- package/skills/agentforce-hyperclassifier-configure/SKILL.md +111 -0
- package/skills/agentforce-hyperclassifier-configure/assets/customer-org.env.example +4 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_descriptions.json +8 -0
- package/skills/agentforce-hyperclassifier-configure/assets/sample_evals.csv +17 -0
- package/skills/agentforce-hyperclassifier-configure/references/api-contract.md +41 -0
- package/skills/agentforce-hyperclassifier-configure/references/authentication.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/evaluation.md +46 -0
- package/skills/agentforce-hyperclassifier-configure/references/installation.md +35 -0
- package/skills/agentforce-hyperclassifier-configure/references/onboarding.md +93 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/__init__.py +1 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/client.py +219 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/eca.py +178 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/evaluation.py +207 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/onboarding.py +191 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hcopt/optimizer.py +187 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/hyperclassifier.py +111 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/report_hyperclassifier.py +149 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/setup_hyperclassifier.py +74 -0
- package/skills/agentforce-hyperclassifier-configure/scripts/tests/test_hyperclassifier_skill.py +887 -0
- package/skills/agentforce-offline-experimentation-run/SKILL.md +14 -22
- package/skills/agentforce-offline-experimentation-run/scripts/bt_compare.py +81 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_fetch.py +358 -0
- package/skills/agentforce-offline-experimentation-run/scripts/bt_patch_agent.py +110 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/__init__.py +34 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentpatch.py +483 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/agentsrc.py +565 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/cache.py +95 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/compare.py +617 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/fetch.py +1012 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/judge.py +140 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/messages.py +93 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/patch.py +327 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/redact.py +40 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/results.py +288 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/scoring.py +340 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/sfap.py +354 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/splits.py +136 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/stdm.py +98 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/tokens.py +173 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/units.py +199 -0
- package/skills/agentforce-offline-experimentation-run/scripts/btlib/versions.py +194 -0
- package/skills/agentforce-offline-experimentation-run/scripts/build_report.py +367 -379
- package/skills/agentforce-offline-experimentation-run/scripts/resolve-token.sh +23 -6
- package/skills/agentforce-offline-experimentation-run/scripts/sfap_replay.py +483 -796
- package/skills/commerce-react-storefront-create/SKILL.md +54 -21
- package/skills/dx-lifecycle-center/SKILL.md +22 -13
- package/skills/dx-lifecycle-center/examples/workflows.md +54 -17
- package/skills/dx-lifecycle-center/references/connect-api.md +33 -4
- package/skills/dx-lifecycle-center/references/connect-org.md +62 -12
- package/skills/dx-lifecycle-center/references/deploy.md +3 -3
- package/skills/dx-lifecycle-center/references/hub-org.md +19 -3
- package/skills/dx-lifecycle-center/references/list-orgs.md +50 -24
- package/skills/dx-lifecycle-center/references/troubleshooting.md +22 -1
- package/skills/dx-lifecycle-center/scripts/hub-get.sh +41 -0
- package/skills/dx-lifecycle-center/scripts/resolve-environment.sh +151 -4
- package/skills/dx-org-devhub-configure/SKILL.md +85 -84
- package/skills/dx-org-devhub-configure/examples/status-output.md +25 -2
- package/skills/dx-org-devhub-configure/scripts/devhub.sh +265 -140
- package/skills/dx-org-devhub-configure/scripts/test-devhub.sh +100 -15
- package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +63 -0
- package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +252 -0
- package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +88 -0
- package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +167 -0
- package/skills/dx-packaging-push-upgrade-configure/README.md +47 -0
- package/skills/dx-packaging-push-upgrade-configure/SKILL.md +355 -0
- package/skills/dx-packaging-push-upgrade-configure/references/best-practices.md +61 -0
- package/skills/dx-packaging-push-upgrade-configure/references/cli-reference.md +148 -0
- package/skills/dx-packaging-push-upgrade-configure/references/objects.md +106 -0
- package/skills/dx-packaging-push-upgrade-configure/references/soql-recipes.md +144 -0
- package/skills/dx-scratch-def-configure/SKILL.md +163 -0
- package/skills/dx-scratch-def-configure/examples/confirm-card.md +53 -0
- package/skills/dx-scratch-def-configure/examples/report-recipes.md +100 -0
- package/skills/dx-scratch-def-configure/references/features.json +3270 -0
- package/skills/dx-scratch-def-configure/references/project-scratch-def.schema.json +1841 -0
- package/skills/dx-scratch-def-configure/references/settings-map.json +682 -0
- package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1306 -0
- package/skills/dx-scratch-def-configure/scripts/requirements.txt +3 -0
- package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +848 -0
- package/skills/education-cloud-domain-configure/SKILL.md +1 -1
- package/skills/education-cloud-multi-campus-configure/SKILL.md +1 -1
- package/skills/education-cloud-student-recruitment-agent-configure/SKILL.md +1 -1
- package/skills/experience-afv-analytics-query/SKILL.md +239 -0
- package/skills/experience-afv-analytics-query/references/references.md +176 -0
- package/skills/experience-app-mcp-delivery-generate/SKILL.md +142 -0
- package/skills/experience-app-mcp-delivery-generate/references/eca-consumer-key.md +26 -0
- package/skills/experience-app-mcp-delivery-generate/references/mcp-config-delivery.md +38 -0
- package/skills/experience-app-mcp-delivery-generate/references/plugin-format-and-publishing.md +80 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/discover_mcp_context.mjs +114 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_mcp_config.mjs +27 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/generate_plugin.mjs +184 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/mcp_config.mjs +57 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/preflight.mjs +109 -0
- package/skills/experience-app-mcp-delivery-generate/scripts/retrieve_eca_consumer_key.mjs +143 -0
- package/skills/experience-app-mcp-generate/SKILL.md +174 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.eca-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaGlblOauth-meta.xml +15 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauth-meta.xml +6 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME__.ecaOauthPlcy-meta.xml +12 -0
- package/skills/experience-app-mcp-generate/assets/__ECA_NAME___defaultPolicy.ecaPlcy-meta.xml +7 -0
- package/skills/experience-app-mcp-generate/assets/__MCP_SERVER_NAME__.mcpServerDefinition-meta.xml +5 -0
- package/skills/experience-app-mcp-generate/references/eca-fields.md +76 -0
- package/skills/experience-app-mcp-generate/references/mcp-objects.md +66 -0
- package/skills/experience-app-mcp-generate/references/tool-bindings.md +85 -0
- package/skills/experience-app-mcp-generate/references/troubleshooting.md +41 -0
- package/skills/experience-app-mcp-generate/references/ui-frameworks.md +19 -0
- package/skills/experience-app-mcp-generate/references/widget-resources.md +96 -0
- package/skills/experience-app-mcp-generate/scripts/activate_server.mjs +166 -0
- package/skills/experience-app-mcp-generate/scripts/check_setup_progress.mjs +212 -0
- package/skills/experience-app-mcp-generate/scripts/list_sites.mjs +211 -0
- package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +407 -0
- package/skills/experience-app-mcp-generate/scripts/preflight.mjs +127 -0
- package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +144 -0
- package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +64 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_prompts.mjs +145 -0
- package/skills/experience-app-mcp-generate/scripts/retrieve_existing_tools.mjs +72 -0
- package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +195 -0
- package/skills/experience-app-mcp-generate/scripts/utils/callback_url.mjs +36 -0
- package/skills/experience-app-mcp-generate/scripts/utils/developer_name.mjs +9 -0
- package/skills/experience-app-mcp-generate/scripts/utils/eca_check.mjs +156 -0
- package/skills/experience-app-mcp-generate/scripts/utils/metadata_path.mjs +13 -0
- package/skills/experience-app-mcp-generate/scripts/verify_server.mjs +118 -0
- package/skills/experience-cms-content-type-generate/SKILL.md +1 -1
- package/skills/experience-design-validate/SKILL.md +1 -1
- package/skills/experience-search-coordinate/SKILL.md +18 -12
- package/skills/experience-search-coordinate/references/content-route.md +79 -1
- package/skills/field-service-data-capture-migrate/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/SKILL.md +1 -1
- package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +52 -4
- package/skills/nonprofit-fundraising-configure/references/permission-targeting.md +19 -2
- package/skills/platform-apex-generate/SKILL.md +14 -11
- package/skills/platform-apex-test-generate/SKILL.md +2 -1
- package/skills/platform-custom-field-generate/SKILL.md +24 -16
- package/skills/platform-custom-metadata-type-generate/SKILL.md +1 -0
- package/skills/platform-custom-setting-generate/SKILL.md +1 -0
- package/skills/platform-datamask-run/SKILL.md +52 -71
- package/skills/platform-datamask-run/references/api-surface.md +10 -4
- package/skills/platform-datamask-run/references/policy-authoring.md +56 -7
- package/skills/platform-datamask-run/references/run-and-abort.md +17 -10
- package/skills/platform-datamask-run/scripts/poll-job.sh +15 -25
- package/skills/platform-dataspace-access-configure/SKILL.md +43 -10
- package/skills/platform-flexipage-generate/SKILL.md +7 -10
- package/skills/platform-flexipage-generate/references/mcp_action_examples.md +42 -38
- package/skills/platform-metadata-discovery-get/SKILL.md +185 -0
- package/skills/platform-metadata-discovery-get/references/api-map.md +25 -0
- package/skills/platform-metadata-discovery-get/references/h360-routes.md +30 -0
- package/skills/platform-metadata-discovery-get/references/scoped-soql.md +52 -0
- package/skills/platform-metadata-grounding-get/SKILL.md +170 -0
- package/skills/platform-policy-rule-generate/SKILL.md +85 -231
- package/skills/platform-policy-rule-generate/references/condition-model.md +47 -0
- package/skills/platform-policy-rule-generate/references/condition-templates.md +89 -0
- package/skills/platform-policy-rule-generate/references/conjunction-compiler.md +25 -0
- package/skills/platform-policy-rule-generate/references/conjunction-expression.md +30 -0
- package/skills/platform-policy-rule-generate/references/consumer-all.md +9 -0
- package/skills/platform-policy-rule-generate/references/consumer-datacloud-ui.md +99 -0
- package/skills/platform-policy-rule-generate/references/deploy-errors.md +24 -36
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitionSets/ExistsJoinRLS.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/ExistsJoinRLS/policyRuleDefinitions/ExistsJoinRLS_Rule_1.policyRuleDefinition +91 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitionSets/FieldReadDeny.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/FieldReadDeny/policyRuleDefinitions/FieldReadDeny_Rule_1.policyRuleDefinition +72 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitionSets/LastCharactersFieldMasking.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/LastCharactersFieldMasking/policyRuleDefinitions/LastCharactersFieldMasking_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitionSets/PrincipalFieldMatchRLS.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/PrincipalFieldMatchRLS/policyRuleDefinitions/PrincipalFieldMatchRLS_Rule_1.policyRuleDefinition +77 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/package.xml +12 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitionSets/TaggedObjectAccess.policyRuleDefinitionSet +5 -0
- package/skills/platform-policy-rule-generate/references/examples/TaggedObjectAccess/policyRuleDefinitions/TaggedObjectAccess_Rule_1.policyRuleDefinition +65 -0
- package/skills/platform-policy-rule-generate/references/headless-transport.md +87 -0
- package/skills/platform-policy-rule-generate/references/policy-schema-full.md +18 -11
- package/skills/platform-policy-rule-generate/references/policy-shapes.md +107 -0
- package/skills/platform-policy-rule-generate/references/principal-expression.md +31 -0
- package/skills/platform-policy-rule-generate/references/reference-resolution.md +51 -0
- package/skills/platform-policy-rule-generate/references/resource-expression.md +48 -0
- package/skills/platform-policy-rule-generate/references/runtime-context.md +9 -0
- package/skills/platform-policy-rule-generate/references/templates-access.md +11 -9
- package/skills/platform-policy-rule-generate/references/templates-advanced.md +5 -3
- package/skills/platform-policy-rule-generate/references/templates-record.md +37 -22
- package/skills/platform-policy-rule-generate/references/templates-transform.md +10 -8
- package/skills/platform-policy-rule-generate/references/templates.md +2 -2
- package/skills/platform-policy-rule-generate/references/ui-compatibility.md +36 -18
- package/skills/platform-report-generate/SKILL.md +29 -5
- package/skills/platform-report-generate/references/chart-types.md +26 -2
- package/skills/platform-report-generate/references/column-names.md +43 -0
- package/skills/platform-report-generate/references/errors-and-troubleshooting.md +1 -1
- package/skills/platform-report-generate/references/summary-formulas-sorting-limits.md +118 -0
- package/skills/platform-report-generate/references/verification-checklist.md +22 -2
- package/skills/service-digital-engagement-channel-configure/SKILL.md +49 -110
- package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +35 -0
- package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +58 -0
- package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +2 -2
- package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
- package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +128 -28
- package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +16 -20
- package/skills/service-digital-engagement-channel-configure/references/prechat_params.md +10 -0
- package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +38 -0
- package/skills/service-digital-engagement-channel-configure/references/user_verification.md +9 -0
- package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +4 -4
- package/skills/service-digital-engagement-channel-configure/scripts/normalize-channel-name.sh +12 -7
- package/skills/service-e911-configure/SKILL.md +242 -0
- package/skills/service-itsm-agentic-setup-agent-runtime-access-assign/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-coordinate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-agentforce-studio-validate/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-employee-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-fulfiller-agent-configure/SKILL.md +1 -1
- package/skills/service-itsm-agentic-setup-incident-management/SKILL.md +47 -44
- package/skills/service-itsm-agentic-setup-incident-management/examples/output-templates.md +110 -83
- package/skills/service-itsm-agentic-setup-incident-management/references/manage-incidents-with-ai.md +7 -3
- package/skills/service-itsm-agentic-setup-incident-management/references/priority-matrix.md +7 -5
- package/skills/service-itsm-agentic-setup-incident-management/references/sla-milestones.md +2 -2
- package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +437 -0
- package/skills/service-itsm-agentic-setup-itsm-agentforce-permset-assign/SKILL.md +1 -1
- package/skills/agentforce-bot-upgrade/references/planner-workflow-reference.md +0 -78
- package/skills/experience-content-media-image-generate/SKILL.md +0 -83
- package/skills/experience-content-media-image-generate/scripts/download-image.sh +0 -84
- package/skills/experience-content-media-stock-image-search/SKILL.md +0 -193
- package/skills/experience-content-media-stock-image-search/scripts/download-stock-image.py +0 -102
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# `sf package push-upgrade` — CLI reference
|
|
2
|
+
|
|
3
|
+
Verified against `@salesforce/cli` 2.145.6 (`sf package push-upgrade <cmd> --help`). Re-run
|
|
4
|
+
`--help` to confirm flags on newer CLI versions. All commands target the **Dev Hub / package-owning
|
|
5
|
+
org** via `-v/--target-dev-hub` (or the `target-dev-hub` config var).
|
|
6
|
+
|
|
7
|
+
Common global flags on every subcommand: `--json`, `--flags-dir <dir>`, `--api-version <value>`.
|
|
8
|
+
|
|
9
|
+
### Surviving CLI drift
|
|
10
|
+
|
|
11
|
+
The CLI has two output contracts with **opposite** stability — treat them differently:
|
|
12
|
+
|
|
13
|
+
- **`--json`** is the machine contract. Keys map to the `PackagePushRequest` API fields and change
|
|
14
|
+
rarely (with deprecation). **Parse this** whenever the skill reads output programmatically. The
|
|
15
|
+
documented key sets below were captured from live `--json` runs.
|
|
16
|
+
- **The human table** is display-only. Column order, labels, and even which columns appear (e.g. the
|
|
17
|
+
`Num Orgs *` decorations) are presentation and can change in any CLI release. **Never parse the
|
|
18
|
+
table.**
|
|
19
|
+
- **Flags** can also change. If a command errors or output looks unexpected, run
|
|
20
|
+
`sf package push-upgrade <cmd> --help` to re-verify against the installed CLI version rather than
|
|
21
|
+
trusting this file — this reference is a snapshot, `--help` is ground truth.
|
|
22
|
+
- For counts/rollups the skill needs, prefer **direct object queries** (`PackagePushJob GROUP BY
|
|
23
|
+
Status`) over anything the CLI only surfaces in its table — object fields are the stable source.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## schedule — create a push upgrade request
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
sf package push-upgrade schedule -v <devhub> -p <04t> [-l <orgIds> | -f <csv>] [-t <UTC>] [--migrate-to-2gp]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
| Flag | Required | Meaning |
|
|
34
|
+
|------|----------|---------|
|
|
35
|
+
| `-p, --package <04t>` | yes | Package **version** ID (starts `04t`) the orgs are upgraded **to**. Must be an active, non-beta version. |
|
|
36
|
+
| `-v, --target-dev-hub <alias>` | yes | Dev Hub that owns the package. |
|
|
37
|
+
| `-l, --org-list <ids>` | one of -l/-f | Comma-separated subscriber org IDs to upgrade. |
|
|
38
|
+
| `-f, --org-file <csv>` | one of -l/-f | CSV file, **one org ID per line, no header**. All listed orgs must have a version **lower** than `--package`. |
|
|
39
|
+
| `-t, --start-time <UTC>` | no | Earliest UTC datetime Salesforce should attempt the upgrade, e.g. `"2026-08-11T09:00:00"`. Omit to start ASAP. |
|
|
40
|
+
| `--migrate-to-2gp` | no | Push-migrate orgs that have the **1GP** version installed to the converted 2GP version. |
|
|
41
|
+
|
|
42
|
+
Returns a **push request ID** (starts `0DV`). Capture it.
|
|
43
|
+
|
|
44
|
+
**Output (verified via `--json`).** `result` is a single object with keys `PushRequestId` (the `0DV` —
|
|
45
|
+
note the key is `PushRequestId`, not `Id`), `ScheduledStartTime`, and `Status`. A freshly scheduled
|
|
46
|
+
request comes back with status **`Pending`** (not `Created`) when a future `--start-time` is set. Parse
|
|
47
|
+
`PushRequestId` from `--json` rather than scraping the table. **`ScheduledStartTime` is populated only
|
|
48
|
+
when you pass `--start-time`** — for an ASAP schedule (no `--start-time`) it can be **absent/null** in
|
|
49
|
+
the response, so don't rely on it being present in the immediate case.
|
|
50
|
+
|
|
51
|
+
Examples:
|
|
52
|
+
```bash
|
|
53
|
+
# At a specific time, from a CSV
|
|
54
|
+
sf package push-upgrade schedule --package 04txyz --start-time "2024-12-06T21:00:00" \
|
|
55
|
+
--org-file upgrade-orgs.csv --target-dev-hub myHub
|
|
56
|
+
|
|
57
|
+
# As soon as possible
|
|
58
|
+
sf package push-upgrade schedule --package 04txyz --org-file upgrade-orgs.csv --target-dev-hub myHub
|
|
59
|
+
|
|
60
|
+
# 1GP -> 2GP push migration
|
|
61
|
+
sf package push-upgrade schedule --migrate-to-2gp --package 04txyz \
|
|
62
|
+
--start-time "2024-12-06T21:00:00" --org-file upgrade-orgs.csv --target-dev-hub myHub
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Schedule-time validation failures write a local log and create no job rows.** If `schedule` rejects
|
|
66
|
+
the request — e.g. `INVALID_OPERATION: The specified SubscriberOrganizationKey is not eligible to
|
|
67
|
+
receive this upgrade` for a non-subscriber or otherwise ineligible org id — the CLI writes an error log
|
|
68
|
+
to `<cwd>/job_errors/push_request_<id>_errors.log` (relative to your **current working directory**, so
|
|
69
|
+
it can land in your repo), and the resulting `PackagePushRequest` is stranded at `Created` with **zero
|
|
70
|
+
`PackagePushJob` rows**. Nothing is queryable: `PackagePushJob`/`PackagePushError` return no rows for
|
|
71
|
+
this failure mode, so the request's error lives **only** in `schedule`'s exit code / stderr / `--json`
|
|
72
|
+
output and that local log file. Check `schedule`'s own result — don't rely on SOQL polling to reveal a
|
|
73
|
+
schedule-time rejection.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## list — status of push requests for a package
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
sf package push-upgrade list -v <devhub> -p <033> [-l <days>] [-s <status>] [--show-push-migrations-only]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
| Flag | Required | Meaning |
|
|
84
|
+
|------|----------|---------|
|
|
85
|
+
| `-p, --package <033>` | yes | **Package** ID (starts `033`, not the 04t version) to report on. |
|
|
86
|
+
| `-v, --target-dev-hub <alias>` | yes* | Dev Hub. Not required if `target-dev-hub` config is set. |
|
|
87
|
+
| `-l, --scheduled-last-days <n>` | no | Only requests scheduled within the last *n* days. |
|
|
88
|
+
| `-s, --status <value>` | no | Filter by `Created`, `Cancelled`, `Pending`, `In Progress`, `Failed`, or `Succeeded`. |
|
|
89
|
+
| `--show-push-migrations-only` | no | Only 1GP→2GP push-migration requests. |
|
|
90
|
+
|
|
91
|
+
All filters are AND-ed. Example:
|
|
92
|
+
```bash
|
|
93
|
+
sf package push-upgrade list --package 033xyz --scheduled-last-days 30 --target-dev-hub myHub
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Output — parse `--json`, not the table.** `--json` `result` is an **array** of records; each record's
|
|
97
|
+
stable keys (verified via `--json`): `Id`, `PackageVersionId`, `PackageVersion`, `Status`,
|
|
98
|
+
`ScheduledStartTime`, `StartTime`, `EndTime`, `IsMigration`. The human table additionally shows
|
|
99
|
+
display-only decorations such as `Num Orgs Scheduled` / `Num Orgs Upgraded Fail` / `Num Orgs Upgraded
|
|
100
|
+
Success` and a version name/number — these are **not** in `--json` and their columns/labels can change
|
|
101
|
+
between CLI versions. For a durable per-status org rollup, query `PackagePushJob GROUP BY Status`
|
|
102
|
+
(see `soql-recipes.md`) rather than scraping the table.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## report — detail for one push request
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
sf package push-upgrade report -v <devhub> -i <0DV>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Flag | Required | Meaning |
|
|
113
|
+
|------|----------|---------|
|
|
114
|
+
| `-i, --push-request-id <0DV>` | yes | The request ID returned by `schedule`. |
|
|
115
|
+
| `-v, --target-dev-hub <alias>` | yes* | Dev Hub (or config var). |
|
|
116
|
+
|
|
117
|
+
**Output — parse `--json`.** `--json` `result` is a **single object** with stable keys (verified):
|
|
118
|
+
`Id`, `PackageVersionId`, `PackageVersion`, `Status`, `ScheduledStartTime`, `StartTime`, `EndTime`,
|
|
119
|
+
`DurationSeconds`. (Note the shape differs from `list`: `report` returns one object with
|
|
120
|
+
`DurationSeconds`; `list` returns an array with `IsMigration`.) `report` gives request-level status
|
|
121
|
+
only — for per-org detail and errors, go to `PackagePushJob` / `PackagePushError`.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## abort — cancel a scheduled push request
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
sf package push-upgrade abort -v <devhub> -i <0DV>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
| Flag | Required | Meaning |
|
|
132
|
+
|------|----------|---------|
|
|
133
|
+
| `-i, --push-request-id <0DV>` | yes | Request to cancel. |
|
|
134
|
+
| `-v, --target-dev-hub <alias>` | yes* | Dev Hub (or config var). |
|
|
135
|
+
|
|
136
|
+
Only requests with status **`Created` or `Pending`** can be aborted. In-progress or completed
|
|
137
|
+
requests cannot.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Enablement / eligibility (from docs)
|
|
142
|
+
|
|
143
|
+
- **2GP managed:** available only for packages that **passed AppExchange security review**; enable the
|
|
144
|
+
feature by logging a **Salesforce Partner Community support case**. CLI + API (no UI).
|
|
145
|
+
- **Unlocked:** push upgrades enabled by default. CLI + API.
|
|
146
|
+
- **1GP managed:** API + UI only (no CLI schedule); use `--migrate-to-2gp` when pushing the converted
|
|
147
|
+
2GP version onto 1GP installs.
|
|
148
|
+
- Scheduling requires the **Create and Update Second-Generation Packages** user permission.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Push upgrade — object reference
|
|
2
|
+
|
|
3
|
+
All live on the **Dev Hub / License Management Org**, not subscriber orgs.
|
|
4
|
+
|
|
5
|
+
**Query with the standard data API — NOT `--use-tooling-api`.** `PackageSubscriber`,
|
|
6
|
+
`PackagePushRequest`, `PackagePushJob`, and `PackagePushError` return "sObject type not supported"
|
|
7
|
+
under the Tooling API; query them with plain `sf data query --target-org <devhub> --query "..."`.
|
|
8
|
+
`MetadataPackage` and `MetadataPackageVersion` work under either API — use the standard one for
|
|
9
|
+
consistency. (Field lists below were verified via `sf sobject describe`, which works on both APIs and
|
|
10
|
+
is not a guarantee the object is Tooling-queryable — the query itself is.)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## PackageSubscriber — who has the package installed
|
|
15
|
+
|
|
16
|
+
The discovery object. One row per org/package install.
|
|
17
|
+
|
|
18
|
+
| Field | Type | Notes |
|
|
19
|
+
|-------|------|-------|
|
|
20
|
+
| `Id` | id | |
|
|
21
|
+
| `MetadataPackageId` | reference | The **033** package ID. Filter on this to scope to your package. |
|
|
22
|
+
| `MetadataPackageVersionId` | reference | The **04t** version the subscriber currently has. Compare to your target to find orgs that are behind. |
|
|
23
|
+
| `InstalledStatus` | picklist | `i` = installed, `u` = not installed / uninstalled. Filter `= 'i'`. |
|
|
24
|
+
| `OrgKey` | string | **The org ID that goes in the schedule CSV / `--org-list`.** |
|
|
25
|
+
| `OrgName` | string | Subscriber org name. |
|
|
26
|
+
| `OrgType` | picklist | `Production`, `Sandbox`. Pilot in sandboxes first. |
|
|
27
|
+
| `OrgStatus` | picklist | `Active`, `Demo`, `Free`, `Inactive`, `Trial`. Usually skip `Inactive`. |
|
|
28
|
+
| `InstanceName` | string | Instance (e.g. `NA123`) — useful proxy for time-zone batching. |
|
|
29
|
+
| `ParentOrg` | string | Parent org key (sandboxes trace to a parent). |
|
|
30
|
+
| `IsCustomUpgradeAllowed` | boolean | Whether custom upgrade handling is allowed. |
|
|
31
|
+
| `CustomUpgradeType` | picklist | `None`, `BlockedBySubscriber`. |
|
|
32
|
+
| `HasRestrictionEnabled` | boolean | `true` = subscriber has restricted push upgrades — **exclude these**; pushing to them errors. |
|
|
33
|
+
| `SystemModstamp` | datetime | |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## MetadataPackageVersion — resolve/validate the target version
|
|
38
|
+
|
|
39
|
+
| Field | Type | Notes |
|
|
40
|
+
|-------|------|-------|
|
|
41
|
+
| `Id` | id | The **04t** version ID. |
|
|
42
|
+
| `MetadataPackageId` | reference | The **033** package. |
|
|
43
|
+
| `Name` | string | Version name. |
|
|
44
|
+
| `MajorVersion` / `MinorVersion` / `PatchVersion` / `BuildNumber` | int | Compare against subscriber versions to confirm "strictly higher". |
|
|
45
|
+
| `ReleaseState` | picklist | `Beta`, `Released`. Push target must be `Released`. |
|
|
46
|
+
| `IsDeprecated` | boolean | Must be `false`. |
|
|
47
|
+
| `SystemModstamp` | datetime | |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## PackagePushRequest — one scheduled push (the `0DV`)
|
|
52
|
+
|
|
53
|
+
| Field | Type | Notes |
|
|
54
|
+
|-------|------|-------|
|
|
55
|
+
| `Id` | id | The **0DV** request ID. |
|
|
56
|
+
| `PackageVersionId` | reference | Target 04t version. |
|
|
57
|
+
| `ScheduledStartTime` | datetime | The UTC start you requested (null = ASAP). |
|
|
58
|
+
| `Status` | picklist | `Created`, `Pending`, `InProgress`, `Succeeded`, `Failed`, `Canceled`. |
|
|
59
|
+
| `StartTime` / `EndTime` | datetime | Actual execution window. |
|
|
60
|
+
| `DurationSeconds` | int | |
|
|
61
|
+
| `IsMigration` | boolean | `true` for 1GP→2GP push migrations. |
|
|
62
|
+
| `SystemModstamp` | datetime | |
|
|
63
|
+
|
|
64
|
+
Note: CLI `--status` filter shows `Cancelled`/`In Progress` (spacing); the object picklist uses
|
|
65
|
+
`Canceled`/`InProgress`.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## PackagePushJob — one per org within a request
|
|
70
|
+
|
|
71
|
+
| Field | Type | Notes |
|
|
72
|
+
|-------|------|-------|
|
|
73
|
+
| `Id` | id | |
|
|
74
|
+
| `PackagePushRequestId` | reference | Parent **0DV** request. |
|
|
75
|
+
| `SubscriberOrganizationKey` | string | The org this job targets (matches `PackageSubscriber.OrgKey`). |
|
|
76
|
+
| `Status` | picklist | `Created`, `Pending`, `InProgress`, `Succeeded`, `Failed`, `Canceled`. |
|
|
77
|
+
| `StartTime` / `EndTime` | datetime | |
|
|
78
|
+
| `DurationSeconds` | int | |
|
|
79
|
+
| `IsMigration` | boolean | |
|
|
80
|
+
| `SystemModstamp` | datetime | |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## PackagePushError — failure detail, attached to a job
|
|
85
|
+
|
|
86
|
+
| Field | Type | Notes |
|
|
87
|
+
|-------|------|-------|
|
|
88
|
+
| `Id` | id | |
|
|
89
|
+
| `PackagePushJobId` | reference | Parent job. |
|
|
90
|
+
| `ErrorSeverity` | picklist | `Warning`, `Error`. |
|
|
91
|
+
| `ErrorType` | picklist | `DeployError`, `ApexTestFailure`, `LockingFailure`, `IneligibleUpgrade`, … |
|
|
92
|
+
| `ErrorTitle` | string | Short label. |
|
|
93
|
+
| `ErrorMessage` | string | Human-readable message. |
|
|
94
|
+
| `ErrorDetails` | string | Extended detail / stack. |
|
|
95
|
+
| `SystemModstamp` | datetime | |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## ID prefix cheat sheet
|
|
100
|
+
|
|
101
|
+
| Prefix | Object |
|
|
102
|
+
|--------|--------|
|
|
103
|
+
| `033` | MetadataPackage (the package) — used by `push-upgrade list`. |
|
|
104
|
+
| `04t` | MetadataPackageVersion (the version) — the push **target**, `push-upgrade schedule --package`. |
|
|
105
|
+
| `0DV` | PackagePushRequest — returned by `schedule`, consumed by `report`/`abort`. |
|
|
106
|
+
| `00D` | Subscriber org ID — the `OrgKey` values in the CSV. |
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# SOQL recipes — subscribers & monitoring
|
|
2
|
+
|
|
3
|
+
Run all with `sf data query --target-org <devhub> --query "..."` (the **standard** data API — do **not**
|
|
4
|
+
add `--use-tooling-api`; the push objects return "sObject type not supported" under Tooling).
|
|
5
|
+
Add `--result-format csv` to pipe straight toward a CSV (strip the header before feeding `--org-file`).
|
|
6
|
+
|
|
7
|
+
Placeholders: `<033>` = package ID, `<04t>` = target version ID, `<0DV>` = push request ID.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Discover subscribers
|
|
12
|
+
|
|
13
|
+
### All currently-installed subscribers for a package
|
|
14
|
+
```sql
|
|
15
|
+
SELECT OrgKey, OrgName, OrgType, OrgStatus, InstanceName,
|
|
16
|
+
MetadataPackageVersionId, InstalledStatus, HasRestrictionEnabled, CustomUpgradeType
|
|
17
|
+
FROM PackageSubscriber
|
|
18
|
+
WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Eligible production orgs, excluding restricted and already-on-target
|
|
22
|
+
```sql
|
|
23
|
+
SELECT OrgKey, OrgName, OrgStatus, InstanceName, MetadataPackageVersionId
|
|
24
|
+
FROM PackageSubscriber
|
|
25
|
+
WHERE MetadataPackageId = '<033>'
|
|
26
|
+
AND InstalledStatus = 'i'
|
|
27
|
+
AND OrgType = 'Production'
|
|
28
|
+
AND OrgStatus != 'Inactive'
|
|
29
|
+
AND HasRestrictionEnabled = false
|
|
30
|
+
AND CustomUpgradeType != 'BlockedBySubscriber'
|
|
31
|
+
AND MetadataPackageVersionId != '<04t>'
|
|
32
|
+
```
|
|
33
|
+
> `OrgType` (Production/Sandbox) and `OrgStatus` (Active/Demo/Free/Inactive/Trial) are **independent**
|
|
34
|
+
> — a Production org can be `Trial`, `Demo`, or `Free`, not just `Active`. Don't whitelist
|
|
35
|
+
> `OrgStatus = 'Active'` or you'll silently drop paying-but-non-`Active` production subscribers. Exclude
|
|
36
|
+
> only what you mean to (typically `Inactive`), and select `OrgStatus` so you can eyeball the mix.
|
|
37
|
+
|
|
38
|
+
### Sandboxes only (pilot batch)
|
|
39
|
+
```sql
|
|
40
|
+
SELECT OrgKey, OrgName, InstanceName, MetadataPackageVersionId
|
|
41
|
+
FROM PackageSubscriber
|
|
42
|
+
WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i' AND OrgType = 'Sandbox'
|
|
43
|
+
AND HasRestrictionEnabled = false
|
|
44
|
+
AND CustomUpgradeType != 'BlockedBySubscriber'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Restricted / blocked orgs (report, then exclude from pushes)
|
|
48
|
+
```sql
|
|
49
|
+
SELECT OrgKey, OrgName, HasRestrictionEnabled, CustomUpgradeType
|
|
50
|
+
FROM PackageSubscriber
|
|
51
|
+
WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
|
|
52
|
+
AND (HasRestrictionEnabled = true OR CustomUpgradeType = 'BlockedBySubscriber')
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Orgs on a specific old version (target a known-bad build)
|
|
56
|
+
```sql
|
|
57
|
+
SELECT OrgKey, OrgName, OrgType, InstanceName
|
|
58
|
+
FROM PackageSubscriber
|
|
59
|
+
WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
|
|
60
|
+
AND MetadataPackageVersionId = '<04t-old-version>'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Count by org type (population sanity check)
|
|
64
|
+
```sql
|
|
65
|
+
SELECT OrgType, COUNT(Id) total
|
|
66
|
+
FROM PackageSubscriber
|
|
67
|
+
WHERE MetadataPackageId = '<033>' AND InstalledStatus = 'i'
|
|
68
|
+
GROUP BY OrgType
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> Note: `PackageSubscriber` has **no version-comparison operator** — you can only filter version by
|
|
72
|
+
> exact `MetadataPackageVersionId`. To push only to orgs *strictly below* the target, resolve each
|
|
73
|
+
> distinct installed version's numbers via `MetadataPackageVersion` and exclude any at/above the
|
|
74
|
+
> target before building the CSV.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Resolve / validate versions
|
|
79
|
+
|
|
80
|
+
### Released versions of a package, newest first
|
|
81
|
+
```sql
|
|
82
|
+
SELECT Id, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber, ReleaseState, IsDeprecated
|
|
83
|
+
FROM MetadataPackageVersion
|
|
84
|
+
WHERE MetadataPackageId = '<033>' AND ReleaseState = 'Released'
|
|
85
|
+
ORDER BY MajorVersion DESC, MinorVersion DESC, PatchVersion DESC, BuildNumber DESC
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Validate a single target version
|
|
89
|
+
```sql
|
|
90
|
+
SELECT Id, MetadataPackageId, Name, MajorVersion, MinorVersion, PatchVersion, BuildNumber,
|
|
91
|
+
ReleaseState, IsDeprecated
|
|
92
|
+
FROM MetadataPackageVersion
|
|
93
|
+
WHERE Id = '<04t>'
|
|
94
|
+
```
|
|
95
|
+
Target is valid only if `ReleaseState = 'Released'` and `IsDeprecated = false`.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Monitor push requests
|
|
100
|
+
|
|
101
|
+
### Recent requests for a package
|
|
102
|
+
```sql
|
|
103
|
+
SELECT Id, PackageVersionId, Status, ScheduledStartTime, StartTime, EndTime, DurationSeconds, IsMigration
|
|
104
|
+
FROM PackagePushRequest
|
|
105
|
+
WHERE PackageVersionId IN (
|
|
106
|
+
SELECT Id FROM MetadataPackageVersion WHERE MetadataPackageId = '<033>'
|
|
107
|
+
)
|
|
108
|
+
ORDER BY ScheduledStartTime DESC
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Jobs (per-org) for one request
|
|
112
|
+
```sql
|
|
113
|
+
SELECT Id, SubscriberOrganizationKey, Status, StartTime, EndTime, DurationSeconds
|
|
114
|
+
FROM PackagePushJob
|
|
115
|
+
WHERE PackagePushRequestId = '<0DV>'
|
|
116
|
+
ORDER BY Status
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Job status rollup for one request
|
|
120
|
+
```sql
|
|
121
|
+
SELECT Status, COUNT(Id) total
|
|
122
|
+
FROM PackagePushJob
|
|
123
|
+
WHERE PackagePushRequestId = '<0DV>'
|
|
124
|
+
GROUP BY Status
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Errors for a request (join through jobs)
|
|
128
|
+
```sql
|
|
129
|
+
SELECT PackagePushJobId, ErrorSeverity, ErrorType, ErrorTitle, ErrorMessage, ErrorDetails
|
|
130
|
+
FROM PackagePushError
|
|
131
|
+
WHERE PackagePushJobId IN (
|
|
132
|
+
SELECT Id FROM PackagePushJob WHERE PackagePushRequestId = '<0DV>'
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Errors grouped by type (decide what to re-push)
|
|
137
|
+
```sql
|
|
138
|
+
SELECT ErrorType, ErrorSeverity, COUNT(Id) total
|
|
139
|
+
FROM PackagePushError
|
|
140
|
+
WHERE PackagePushJobId IN (
|
|
141
|
+
SELECT Id FROM PackagePushJob WHERE PackagePushRequestId = '<0DV>'
|
|
142
|
+
)
|
|
143
|
+
GROUP BY ErrorType, ErrorSeverity
|
|
144
|
+
```
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dx-scratch-def-configure
|
|
3
|
+
description: "Drafts a schema-valid Salesforce DX scratch-def from natural language. Preview first (confirmation card, do not write). A later edit — including a write that also changes the draft — is another preview. Write only on consent that this draft is unchanged: invoke this skill and apply via its helper — never hand-write JSON with Write. Writes config/<purpose>-scratch-def.json (default purpose project) under an existing SF DX project that already has config/ (never creates config/). Grounds features on the PUBLIC config-values catalog: put product names (like Revenue Cloud) in features as-is. Use to author/validate a scratch-def or layer features onto a shape or snapshot. Also use for trial, shape-only, snapshot-only, underspecified, missing config/ (ask for the SF DX project path), or batch multi-def asks: invoke this skill, STOP, write report.md on disk (chat is not a substitute; do not skip the skill). Does not create orgs or enable Dev Hub. Not for dx-org-manage, dx-org-devhub-configure, or SKU work."
|
|
4
|
+
allowed-tools: Read, Write, Bash(python3), Bash(python)
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.0"
|
|
7
|
+
domains: ["Developer Experience"]
|
|
8
|
+
relatedSkills:
|
|
9
|
+
- "dx-org-devhub-configure"
|
|
10
|
+
- "dx-org-manage"
|
|
11
|
+
- "dx-org-shape-manage"
|
|
12
|
+
- "dx-org-snapshot-manage"
|
|
13
|
+
- "platform-trial-org-create"
|
|
14
|
+
cliTools:
|
|
15
|
+
- tool: ["python3", "python"]
|
|
16
|
+
semver: ">=3.8.0"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Configure Scratch Org Definition File
|
|
20
|
+
|
|
21
|
+
This skill writes `config/<purpose>-scratch-def.json` (default
|
|
22
|
+
`config/project-scratch-def.json`) from a product ask. It does **not** create
|
|
23
|
+
the org. Never `mkdir config`.
|
|
24
|
+
|
|
25
|
+
Every turn writes `report.md` on disk. Chat is not a substitute. Then exactly
|
|
26
|
+
one of these happens:
|
|
27
|
+
|
|
28
|
+
| Mode | When | What the user gets |
|
|
29
|
+
|------|------|--------------------|
|
|
30
|
+
| **Stop** | Trial, shape-only, shape/snapshot + features with no id, missing project, unclear ask, batch, other-user path | The next step, named. No scratch-def file. |
|
|
31
|
+
| **Preview** | First generate (including just-write / skip-preview) or a revision, and the project already has `config/` | A draft + Write file?. Nothing is written yet. |
|
|
32
|
+
| **Write** | They accept this draft **unchanged** (this preview, as drafted). This turn may restate it; no prior chat required. | The file. Name dx-org-manage. |
|
|
33
|
+
|
|
34
|
+
## CRITICAL first gate (before any helper)
|
|
35
|
+
|
|
36
|
+
First matching row wins. Copy that recipe into `report.md`.
|
|
37
|
+
|
|
38
|
+
Never Skill() another skill. Never run `sf`. Name the next skill in `report.md` only.
|
|
39
|
+
|
|
40
|
+
STOP: write `report.md` on disk. Chat is not a substitute. Skip the helper
|
|
41
|
+
and skip scratch-def JSON.
|
|
42
|
+
|
|
43
|
+
Consent is accepting this draft, **unchanged** — not a closed list of yes-words.
|
|
44
|
+
Accepting this draft (this preview, as drafted) and asking to write is consent:
|
|
45
|
+
apply; reconstruct if they restate the same draft; do not ask Write file?.
|
|
46
|
+
A first generate is Preview even if they say write or skip preview.
|
|
47
|
+
A different edition, product, or setting is a change: preview.
|
|
48
|
+
|
|
49
|
+
| If the ask is… | Then |
|
|
50
|
+
|----------------|------|
|
|
51
|
+
| Shape or snapshot **lifecycle alone** (no features to layer), including "use my org shape only" | STOP. Name dx-org-shape-manage or dx-org-snapshot-manage. |
|
|
52
|
+
| Trial / trialforce / "trial org definition" | STOP. Name platform-trial-org-create. Do **not** skip this skill. |
|
|
53
|
+
| Underspecified ("I need a scratch def") — no edition and no products/clouds/features | STOP. Ask the two questions below. If `config/` is also missing, include the Missing-project question. Do not invent an edition. |
|
|
54
|
+
| Another user's laptop / no readable workspace path | STOP. Cannot read another user's machine. Ask for a readable workspace path. |
|
|
55
|
+
| Batch generation (multiple def files in one turn), e.g. "Generate 5 def files for different personas" | STOP. Batch generation is not supported yet — offer to make the first one. |
|
|
56
|
+
| WRITE-eligible (imperative generate with edition and/or products/features, or shape/snapshot **+ features**) but cwd has **no** `config/` | STOP. Ask the Missing-project question (folder that **already** contains `config/`). Do **not** create `config/`. |
|
|
57
|
+
| Shape/snapshot **+ features**, root resolved, user omitted `sourceOrg` or snapshot id/name | STOP. Write `report.md` on disk. Ask for the id. Name dx-org-shape-manage / dx-org-snapshot-manage to list. Resume this skill with the id. |
|
|
58
|
+
| User revises the draft — this turn names a **different** edition, products, settings, or other edits, including a write request that also changes the draft, and root resolved | This turn's wording is the full draft. Preview it. Do not require a prior file or earlier chat. **Do not** apply yet. |
|
|
59
|
+
| User consents that this preview is the draft they want written, **unchanged** (this preview, as drafted), and root resolved | Write it. Reconstruct if this turn restates the same draft. No prior chat required. See **Write**. |
|
|
60
|
+
| Shape/snapshot **+ features**, root resolved, user supplied the id, and this turn is not consent to write | Preview it. **Do not** apply yet. |
|
|
61
|
+
| Imperative generate that names edition and/or products/features (one def), including a first-turn write or skip-preview ask, root resolved, and this turn is not consent to write | Preview it. **Do not** apply yet. |
|
|
62
|
+
|
|
63
|
+
Underspecified questions: (1) what are you building/demoing? (2) which products/clouds?
|
|
64
|
+
|
|
65
|
+
Missing-project question: What is the path to your Salesforce DX project (the directory that already contains a config folder)?
|
|
66
|
+
|
|
67
|
+
## Preview
|
|
68
|
+
|
|
69
|
+
Show the confirmation card (see `examples/confirm-card.md`, or
|
|
70
|
+
`artifacts/examples/confirm-card.md` when packaged). Put **schema-valid JSON**
|
|
71
|
+
in chat alongside `report.md` (never inside it): the helper `document`. Ask
|
|
72
|
+
Write file? in `report.md`. **Do not** apply yet. Do not name dx-org-manage
|
|
73
|
+
until they consent to write.
|
|
74
|
+
|
|
75
|
+
## Write
|
|
76
|
+
|
|
77
|
+
One `apply` only — no preview, no second card, no Write file?. Reconstruct
|
|
78
|
+
if this turn restates the same draft (no in-context copy). `--out config/<purpose>-scratch-def.json`
|
|
79
|
+
(default `config/project-scratch-def.json`). Report the path + a one-line
|
|
80
|
+
summary + the **final written JSON in chat**. Name dx-org-manage
|
|
81
|
+
(dx-org-devhub-configure if Dev Hub is off).
|
|
82
|
+
|
|
83
|
+
## Outcome report (always)
|
|
84
|
+
|
|
85
|
+
**Read** `examples/report-recipes.md` (or `artifacts/examples/report-recipes.md`
|
|
86
|
+
when packaged) and copy the matching recipe. First line: `# Scratch Def Report`.
|
|
87
|
+
Plain prose — never the backtick character. Spell next-skill names as plain
|
|
88
|
+
words (dx-org-shape-manage, platform-trial-org-create).
|
|
89
|
+
|
|
90
|
+
Omit cache date, shipped-snapshot, jsonschema, and dropped-token notes from
|
|
91
|
+
`report.md` unless the helper warned this turn.
|
|
92
|
+
|
|
93
|
+
## Steps
|
|
94
|
+
|
|
95
|
+
1. Run the CRITICAL first gate. If it is STOP, write `report.md` and stop here.
|
|
96
|
+
|
|
97
|
+
2. On WRITE-eligible asks, **resolve the SF DX project root before any helper**:
|
|
98
|
+
cwd with `config/` is the root; otherwise the Missing-config STOP row.
|
|
99
|
+
|
|
100
|
+
3. Resolve the helper by absolute path:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
HELPER="<skill_dir>/scripts/lib_scratch_def.py"
|
|
104
|
+
[ -f "$HELPER" ] || HELPER="<skill_dir>/artifacts/scripts/lib_scratch_def.py"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
4. **One helper call per turn** from the SF DX project root. Keep the draft in
|
|
108
|
+
**chat/tool context**. Pass the draft on stdin with a quoted heredoc
|
|
109
|
+
(`<<'EOF'`). Invoke `python3` when that binary exists; otherwise `python`.
|
|
110
|
+
- Preview (generate or a revision of the draft):
|
|
111
|
+
```bash
|
|
112
|
+
python3 "$HELPER" preview <<'EOF'
|
|
113
|
+
{"edition":"Developer","features":["API"]}
|
|
114
|
+
EOF
|
|
115
|
+
```
|
|
116
|
+
- After consent that this draft is what they want, unchanged:
|
|
117
|
+
```bash
|
|
118
|
+
python3 "$HELPER" apply --out config/<purpose>-scratch-def.json <<'EOF'
|
|
119
|
+
…same draft JSON…
|
|
120
|
+
EOF
|
|
121
|
+
```
|
|
122
|
+
(default `config/project-scratch-def.json`). `--out` writes the scratch-def.
|
|
123
|
+
If the helper warns `jsonschema not installed`, ask the user to install
|
|
124
|
+
(`python3 -m pip install jsonschema` or `python -m pip install jsonschema`).
|
|
125
|
+
On success, retry this same helper call once. If they decline or install fails,
|
|
126
|
+
keep this result — do **not** block preview/apply.
|
|
127
|
+
Do **not** Read `references/features.json` or `settings-map.json` into chat.
|
|
128
|
+
Do not Grep them to pick extra tokens.
|
|
129
|
+
|
|
130
|
+
5. Put the user's product, cloud, and feature words in the `features` array
|
|
131
|
+
as-is (for example Revenue Cloud, not a guessed token list). Use lower
|
|
132
|
+
camelCase settings keys. The helper maps each string to at most one PUBLIC
|
|
133
|
+
token and enriches required settings. Do not add catalog tokens the user
|
|
134
|
+
did not name.
|
|
135
|
+
|
|
136
|
+
6. Write `report.md` on disk. Put chat JSON and the card per Preview / Write.
|
|
137
|
+
|
|
138
|
+
Unknown token: drop it and warn in report.md.
|
|
139
|
+
|
|
140
|
+
## Before you finish
|
|
141
|
+
|
|
142
|
+
- [ ] `report.md` exists on disk and matches a recipe
|
|
143
|
+
- [ ] Preview / revision (including write + change): this turn's wording is the full draft; card + document JSON in chat; asked Write file?; **Do not** apply yet
|
|
144
|
+
- [ ] Consent unchanged (this preview, as drafted; no prior chat required): `apply`; file + final JSON in chat; no Write file?; name dx-org-manage
|
|
145
|
+
- [ ] WRITE turns: root resolved; one helper call; features array is the user's words
|
|
146
|
+
- [ ] report.md mentions cache date, jsonschema, or dropped tokens only when the helper warned this turn
|
|
147
|
+
|
|
148
|
+
## Notes
|
|
149
|
+
|
|
150
|
+
Catalog: each helper invocation loads maps into process memory from:
|
|
151
|
+
|
|
152
|
+
1. Today's `cache/public-config-values-YYYY-MM-DD.json` if usable.
|
|
153
|
+
2. Else GET live PUBLIC config-values markdown; on success write today's cache file.
|
|
154
|
+
3. Else newest usable prior dated file in `cache/`. report.md: that date
|
|
155
|
+
(only when this fallback fired).
|
|
156
|
+
4. Else shipped snapshot JSON `references/features.json` + `settings-map.json`
|
|
157
|
+
(`artifacts/references/` when packaged). Backup. report.md: shipped snapshot
|
|
158
|
+
(only when this fallback fired).
|
|
159
|
+
|
|
160
|
+
Every helper call (`preview` and `apply`) may write today's cache file under
|
|
161
|
+
`cache/` before the user confirms the scratch-def. Add `cache/` to `.gitignore`.
|
|
162
|
+
Treat cache JSON as generated. Delete is safe: the next call refetches if
|
|
163
|
+
today's file is missing. Feature tokens come from this catalog.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Example confirm card (Generate)
|
|
2
|
+
|
|
3
|
+
Show this card in chat with the preview JSON. Do not put the JSON in report.md.
|
|
4
|
+
|
|
5
|
+
Intent paraphrase: Developer-edition scratch-def for a B2B Revenue Cloud
|
|
6
|
+
project. Features are what the helper mapped from the user's words — not
|
|
7
|
+
extra catalog tokens.
|
|
8
|
+
|
|
9
|
+
- Edition: Developer
|
|
10
|
+
- Features: CoreCpq
|
|
11
|
+
- Settings enriched:
|
|
12
|
+
- revenueManagementSettings.enableCoreCPQ = true
|
|
13
|
+
- Output path (after confirm): config/project-scratch-def.json
|
|
14
|
+
|
|
15
|
+
**Required in the chat reply (not in report.md):** show the schema-valid
|
|
16
|
+
helper `document` as a fenced JSON block. Example:
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"edition": "Developer",
|
|
21
|
+
"features": [
|
|
22
|
+
"CoreCpq"
|
|
23
|
+
],
|
|
24
|
+
"settings": {
|
|
25
|
+
"revenueManagementSettings": {
|
|
26
|
+
"enableCoreCPQ": true
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Write file?
|
|
33
|
+
|
|
34
|
+
Write only if they accept this preview unchanged. A first generate that says
|
|
35
|
+
write or skip preview still uses this card. Write + change → preview
|
|
36
|
+
again, do not apply. After they accept: apply, show the **final written JSON**
|
|
37
|
+
in chat.
|
|
38
|
+
|
|
39
|
+
Pass the user's product or cloud words in the features array as-is.
|
|
40
|
+
|
|
41
|
+
## Shape + features variant
|
|
42
|
+
|
|
43
|
+
User supplied sourceOrg (or snapshot id/name).
|
|
44
|
+
|
|
45
|
+
- sourceOrg: 00D000000000001AAA
|
|
46
|
+
- Features: Communities, API
|
|
47
|
+
- Settings: communitiesSettings.enableNetworksEnabled = true
|
|
48
|
+
- Output path (after confirm): config/project-scratch-def.json
|
|
49
|
+
|
|
50
|
+
**Required in chat:** fenced JSON of preview `document` (sourceOrg + features +
|
|
51
|
+
enriched settings).
|
|
52
|
+
|
|
53
|
+
Write file?
|