Make aitools feature-complete: state, update, uninstall, version, list, command restructuring#4808
Closed
simonfaltum wants to merge 12 commits intomainfrom
Closed
Make aitools feature-complete: state, update, uninstall, version, list, command restructuring#4808simonfaltum wants to merge 12 commits intomainfrom
simonfaltum wants to merge 12 commits intomainfrom
Conversation
…tory Add state types (InstallState) with atomic load/save persistence, path resolution (GlobalSkillsDir, ProjectSkillsDir stub), ManifestSource interface with GitHub implementation, latest release discovery (FetchLatestRelease), and Clock abstraction. Extend SkillMeta with v2 fields (Experimental, Description, MinCLIVer). Refactor FetchManifest to delegate to GitHubManifestSource. Rename canonical skills directory from .databricks/agent-skills to .databricks/aitools/skills with backward-compat check for the old path. Co-authored-by: Isaac
- Rename SkillsRef->Release, LastChecked->LastUpdated (time.Time), simplify Skills to map[string]string, add IncludeExperimental and Scope fields. - Remove unused Clock/RealClock from source.go. - Add trailing newline to SaveState JSON output. - Improve FetchLatestRelease doc comment on error/fallback contract. - Document intentional DATABRICKS_SKILLS_REF duplication. Co-authored-by: Isaac
…nstall Introduces the core InstallSkillsForAgents function that handles: - Fetching manifest via ManifestSource interface - Filtering experimental skills and enforcing min_cli_version - Idempotent install (skips already-installed skills at same version) - Legacy install detection (skills on disk without state file) - State persistence after successful install - Concise output (two lines: installing header + summary) Adds interactive agent selection in cmd/skills.go using huh multi-select when multiple agents are detected in an interactive terminal. Preserves InstallAllSkills signature (func(context.Context) error) for the cmd/apps/init.go callback. Co-authored-by: Isaac
… assertion - Fix --experimental -> --include-experimental in error message - Merge new skills into existing state instead of overwriting - Move FetchManifest log from Info to Debug for concise output - Handle singular/plural in Installed N skill(s) message - Assert min_cli_version skip warning appears in test output Co-authored-by: Isaac
Adds three new commands to the aitools skill management: - `update`: Updates installed skills to latest release with --check (dry run), --force, and --no-new flags. Auto-adds new manifest skills by default. - `uninstall`: Removes all installed skills, symlinks from all registry agents, cleans orphaned symlinks, and deletes state file. - `version`: Shows installed version, skill count, staleness check against latest release. Co-authored-by: Isaac
…fety, output format - FetchLatestRelease returns (string, bool, error) so callers can distinguish real API responses from fallback defaults. Update and version commands use the authoritative flag to gate staleness checks. - Update now filters experimental and min_cli_version skills using the same logic as install. Warns when a skill is removed from the manifest. - Uninstall only removes symlinks pointing into the canonical skills dir, preserving user-managed directories and external symlinks. - FormatUpdateResult accepts a check flag to use "Would update" wording. - Version output matches the spec format (Databricks AI Tools header, skill count, staleness status on the same line). - Consistent "no install" messaging across update, uninstall, and version. - Added tests for removed-skill warning, experimental/min_cli_version filtering in update, check-mode output, and symlink-only uninstall. Co-authored-by: Isaac
Co-authored-by: Isaac
Add --skills, --agents, and --include-experimental flags to install command. Add --skills flag to update, uninstall, and version commands. Create new list command with detailed table output showing available/installed skills. Make skills subcommand hidden for backward compat while promoting flat command structure. Add selective uninstall support via UninstallOptions. Co-authored-by: Isaac
…ning - Always call SetArgs in skills install backward-compat alias (fixes Execute path inheriting parent args) - Add cobra.MaximumNArgs(1) to reject extra positional args - Remove dead installer.ListSkills function (replaced by list command) - Restore yellow color for "No agents detected" warning in install.go - Add Execute-path tests for skills install alias Co-authored-by: Isaac
Member
Author
|
Splitting into stacked PRs for easier review. See the PR stack linked from the individual PRs. |
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.
Why
The aitools skills installer has no state tracking, update mechanism, or uninstall capability. Users cannot check what version they have, see what is available, or manage their installation lifecycle. The command structure is nested under
skillswhich burns namespace for future component types.Changes
Before: Skills install to
~/.databricks/agent-skills/with no state tracking. Onlyskills installandskills listexist. No update, uninstall, or version commands. No filtering by experimental status or CLI version compatibility.Now:
.state.jsonrecords installed skills, versions, release ref, and timestamps. Atomic writes via temp+rename.GitHubManifestSourceimplementation with fallback to pinned ref on network failure..databricks/agent-skills/to.databricks/aitools/skills/(backward-compat check for old path).huhmulti-select, concise output.updatecommand:--check(dry run),--force,--no-newflags. Authoritative release detection with offline fallback.uninstallcommand: Removes skills, symlinks from all agent directories (full registry scan), orphaned symlink cleanup, state deletion. Selective uninstall via--skills.versioncommand: Shows installed version, skill count, staleness, last updated date. Graceful offline degradation.listcommand: Table output with skill names, versions, installed status, experimental tags. Sorted alphabetically.aitools install/update/uninstall/list/versionwith--skills,--agents,--include-experimentalflags. Hiddenskills install/listaliases for backward compat.InstallAllSkillssignature preserved:cmd/apps/init.gointegration works without changes.Test plan
skills installandskills listaliases workcmd/apps/init.gosignature checkgolangci-lint,make checks)