Skip to content

Commit f708f8d

Browse files
committed
fix: invalid refs fixed
1 parent e0b61c5 commit f708f8d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

internal/ai/skills/download.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func DownloadPlugin(targetDir, ref string) (string, error) {
3838
// downloadViaZip fetches the commit SHA first, downloads and extracts the ZIP archive,
3939
// then promotes the plugins/auth0 subtree into targetDir.
4040
func downloadViaZip(targetDir, ref string) (string, error) {
41-
sha, err := fetchCommitSHA(ref)
41+
sha, err := FetchCommitSHA(ref)
4242
if err != nil {
4343
return "", err
4444
}
@@ -63,7 +63,7 @@ func downloadViaZip(targetDir, ref string) (string, error) {
6363

6464
// GitHub flattens "/" in ref names to "-" in archive root directory names.
6565
archiveRef := strings.ReplaceAll(ref, "/", "-")
66-
subtreeSrc := filepath.Join(tmpUnzipDir, "auth0-agent-skills-"+archiveRef, filepath.FromSlash(pluginSubtreePath))
66+
subtreeSrc := filepath.Join(tmpUnzipDir, "agent-skills-"+archiveRef, filepath.FromSlash(pluginSubtreePath))
6767

6868
if err := checkHasSkills(subtreeSrc); err != nil {
6969
return "", err
@@ -99,7 +99,7 @@ func checkHasSkills(dir string) error {
9999
}
100100

101101
// fetchCommitSHA fetches the latest commit SHA for ref from the GitHub API.
102-
func fetchCommitSHA(ref string) (string, error) {
102+
func FetchCommitSHA(ref string) (string, error) {
103103
req, err := http.NewRequest(http.MethodGet, agentSkillsAPI+ref, nil)
104104
if err != nil {
105105
return "", err

internal/cli/skills.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func runInstallFast(_ *cli) error {
183183

184184
// Write the global lock file.
185185
now := time.Now()
186-
lock := &skills.Lock{
186+
versionConfig := &skills.VersionConfig{
187187
Repo: skillsPluginRepo,
188188
Ref: skillsPluginRef,
189189
CommitSHA: commitSHA,
@@ -194,7 +194,7 @@ func runInstallFast(_ *cli) error {
194194
Agents: installedAgents,
195195
Scope: skills.ScopeGlobal,
196196
}
197-
if writeErr := skills.WriteLock(lockPath, lock); writeErr != nil {
197+
if writeErr := skills.WriteLock(lockPath, versionConfig); writeErr != nil {
198198
fmt.Fprintf(os.Stderr, "warning: could not write lock file: %v\n", writeErr)
199199
}
200200

0 commit comments

Comments
 (0)