fix: validate unique API name before generating authoring bundle @W-21258874@#327
Merged
WillieRuemmele merged 4 commits intomainfrom Feb 17, 2026
Merged
Conversation
Prevent overwriting existing local agent script bundles by checking if an authoring bundle with the same API name already exists on disk. Prompts the user to overwrite, enter a new name, or cancel. Adds --force-overwrite flag to skip the check in non-interactive usage.
jshackell-sfdc
approved these changes
Feb 13, 2026
WillieRuemmele
approved these changes
Feb 17, 2026
Contributor
QA Notes✅ : given ➜ ../../oss/plugin-agent/bin/run.js agent generate authoring-bundle
✔ Select an authoring bundle template Default template (Recommended)
✔ Enter the authoring bundle name ForQA
✔ Enter authoring bundle API name ForQA
✔ An authoring bundle with the API name "ForQA" already exists. Overwrite it? No
✔ Enter the authoring bundle name ForQA1
✔ Enter authoring bundle API name ForQA1
Generating authoring bundle: ForQA1... done
Authoring bundle "ForQA1" was generated successfully.✅ : cancel -> cancels command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Prevents overwriting existing local agent script bundles by checking if an authoring bundle with the same API name already exists on disk before generating a new one. When a duplicate is detected, the user is prompted to overwrite (yes), enter a new name (no), or cancel. A
--force-overwriteflag is also added for non-interactive usage.What issues does this PR fix or reference?
@W-21258874@
Functionality Before
Running
sf agent generate authoring-bundlewith an API name that already exists locally would silently overwrite the existing bundle files without warning.Functionality After
aiAuthoringBundles/<api-name>/directory already exists, the user is prompted: "An authoring bundle with the API name X already exists. Overwrite it? (y/N/cancel)"--force-overwriteflag skips the check entirelyTesting Setup Notes
sf agent generate authoring-bundle --no-spec --name "Test Agent" --api-name TestAgent --target-org <org>--force-overwritebypasses the prompt