aitools: add --scope flag, deprecate --project/--global#5234
Open
jamesbroadhead wants to merge 3 commits into
Open
aitools: add --scope flag, deprecate --project/--global#5234jamesbroadhead wants to merge 3 commits into
jamesbroadhead wants to merge 3 commits into
Conversation
Replace the two-boolean --project/--global pair on install/update/uninstall/list with --scope=project|global (and --scope=both on update/list). The old booleans keep working with a cobra deprecation warning so existing scripts continue to run; they'll be removed in a later release. Why now: aitools just left experimental in this PR, so this is the cheapest moment to fix the interface before external scripts start to depend on the two-boolean shape. An enum is friendlier for agent-driven invocations than a pair of booleans with implicit precedence. Co-authored-by: Isaac
Pin down the contract for non-interactive callers (CI, agents) by documenting that an unset --agents flag means "install for every detected agent" outside a TTY. The selected list is already logged to stderr via PrintInstallingFor before the install runs, so callers can verify what was picked. Co-authored-by: Isaac
Contributor
Approval status: pending
|
6 tasks
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.
Summary
Split out from #4917. While that PR keeps responsibility for moving the aitools skills-management surface out of
experimental/, this PR makes the user-facing interface changes that should land at the same moment:--scope=project|globalflag oninstall/update/uninstall/list, with--scope=bothaccepted byupdateandlist.--projectand--globalare marked deprecated via cobra'sDeprecatedproperty: hidden from--help, emit a stderr deprecation warning when used, continue to function so existing scripts don't break. They're slated for removal in a later release.--scopecombined with--project/--globalis rejected up front with an actionable error.install's--helpnow documents the non-interactive--agentsauto-detect contract so callers know what gets picked.Stacked on #4917. Base will rebase to
mainonce that lands. Splitting because (a) #4917 is otherwise a pure file move and reviewers asked to keep it that way, and (b) the interface change has its own product question (boolean pair vs. enum) worth landing as a discrete unit.Why land this with the rename
aitools is being declared a stable top-level surface in #4917. This is the cheapest moment to fix the two-boolean shape before external scripts depend on it. An enum is also better for agent-driven invocations than two booleans with implicit precedence:
--scope=project|global|bothis one flag with valid values, not two flags with order-dependent semantics.Surface
Test plan
databricks aitools install --scope=projectand--scope=globalgo to the right destinationdatabricks aitools install --scope=botherrors with a clear messagedatabricks aitools install --projectstill works and prints the deprecation warning to stderrdatabricks aitools install --scope=global --projecterrors with the conflict messagedatabricks aitools list --scope=bothshows both scopes (equivalent to no flag)databricks aitools install --helpno longer shows--project/--global;--scopeis documented;--agentsauto-detect behavior is describedTestParseScopeFlag(table-driven on the translation),TestInstallScopeFlag,TestListScopeFlag— all greenThis pull request was AI-assisted by Isaac.