Skip to content

fix: preserve URL scheme in well-known source identifier#670

Open
elliotllliu wants to merge 2 commits intovercel-labs:mainfrom
elliotllliu:fix/preserve-url-scheme-in-lock
Open

fix: preserve URL scheme in well-known source identifier#670
elliotllliu wants to merge 2 commits intovercel-labs:mainfrom
elliotllliu:fix/preserve-url-scheme-in-lock

Conversation

@elliotllliu
Copy link
Contributor

Summary

Fixes #666experimental_install fails for well-known skills because the source in skills-lock.json is missing the URL scheme.

Root Cause

WellKnownProvider.getSourceIdentifier() only returned the hostname (e.g. react-spectrum.adobe.com), stripping the https:// scheme. When experimental_install later passed this source to runAdd(), it tried to clone react-spectrum.adobe.com as a git repo, which fails.

Fix

Preserve the full URL with scheme in getSourceIdentifier():

Before: react-spectrum.adobe.com
After: https://react-spectrum.adobe.com

Testing

  • npx skills add https://react-spectrum.adobe.com stores https://react-spectrum.adobe.com as source
  • npx skills experimental_install successfully reinstalls the skill
  • www. prefix is still stripped for cleanliness

`getSourceIdentifier()` stripped the scheme from well-known URLs,
storing only the hostname (e.g. 'react-spectrum.adobe.com') in the
lock file. When `experimental_install` later passed this source
to `runAdd()`, it failed to clone because the string wasn't a
valid URL.

Now preserves the full scheme (e.g. 'https://react-spectrum.adobe.com')
so the source can be re-used directly for reinstallation.

Fixes vercel-labs#666
Tests now expect the full URL with scheme (e.g. 'https://example.com')
instead of hostname-only ('example.com'), matching the fix that
preserves the URL scheme for experimental_install compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: experimental_install does not respect and replaces https:// in skill source

1 participant