[1/5] Aitools: state tracking, manifest source, directory rename#4810
Open
simonfaltum wants to merge 2 commits intomainfrom
Open
[1/5] Aitools: state tracking, manifest source, directory rename#4810simonfaltum wants to merge 2 commits intomainfrom
simonfaltum wants to merge 2 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
9 tasks
Suggested reviewersBased on git history of the changed files, these people are best suited to review:
Confidence: high Eligible reviewersBased on CODEOWNERS, these people or teams could also review: @databricks/eng-apps-devex, @lennartkats-db Suggestions based on git history of 6 changed files (3 scored). See CODEOWNERS for path-specific ownership rules. |
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.
PR Stack
This is part of the aitools feature-complete initiative. PRs should be reviewed and merged in order.
Manifest v2 PR: (pending in databricks-agent-skills)
Why
The aitools skills installer has no state tracking. There's no record of what was installed, at what version, or when. This blocks every lifecycle command (update, uninstall, version). The manifest fetching logic is also hardcoded with no abstraction for testing.
Changes
Before: Skills install to
~/.databricks/agent-skills/with no state file.FetchManifestis inlined ininstaller.gowith a hardcoded ref and no way to mock it in tests.Now:
InstallStatetype withLoadState/SaveState(atomic write via temp+rename) for tracking installed skills, release ref, and timestampsManifestSourceinterface withGitHubManifestSource, separating manifest fetching from install logic. Enables test mocking.FetchLatestReleaseto discover newest release from GitHub API. Falls back to pinned ref on network failure.SkillMeta(Experimental,Description,MinCLIVer) with omitempty for backward compat with v1 manifests.databricks/agent-skillsto.databricks/aitools/skillsHasDatabricksSkillsInstalledfor the old pathNo behavior changes to existing commands except the directory path.
Test plan
LoadStatereturns nil, nil for nonexistent fileSaveState+LoadStateroundtrip preserves all fields including optional onesSaveStatecreates nested directories, writes trailing newlineLoadStatereturns error for corrupt JSONGlobalSkillsDirresolves correctlyProjectSkillsDirreturns ErrNotImplementedHasDatabricksSkillsInstalleddetects legacy path