Files
magpie/docs
yetone 97dfed0f3e library: a site's well-known kit of skills is one group, by the lock's sourceBaseUrl (#1862)
WardLu (#1862): skills that `npx skills add` got from a site's
/.well-known/agent-skills/ index were one group per skill. That was
Feishu's lark-base, lark-doc and lark-sheets, and Fish Audio's
fish-audio-api and fish-audio-sdk. readSkillLock grouped them by each
skill's own sourceUrl (".../lark-base.tar.gz", ".../fish-audio-api/skill.md").

Now a lock entry with sourceType "well-known" is grouped by its
sourceBaseUrl, read as host/path (wellKnownBase/siteOf):
- the user, query and trailing slash are dropped, and the host is
  lower-cased without "www.";
- so Feishu's three are open.feishu.cn/lark-cli/skills/regular and Fish
  Audio's two are docs.fish.audio;
- a kit on the same host with a different base URL stays apart. Hosts are
  not merged.

Fallbacks:
- an older lock with no sourceBaseUrl takes the part of its sourceUrl
  before /.well-known/;
- an entry with neither is grouped by its sourceUrl, as before.

Two things this new key would otherwise get wrong:
- Group again (RegroupSkills) tried every owner/repo-shaped key on GitHub.
  A kit one folder down a site (docs.example.com/kit) has that shape, so a
  key whose owner has a dot is skipped now. GitHub owners have no dot.
- the heading's link sent a key with no path ("docs.fish.audio") to
  github.com. repoURL now opens it at https://docs.fish.audio.

Run:
- go test ./internal/library (all pass). New TestWellKnownKitGrouped uses
  the issue's base and source URLs for 3 Feishu + 2 Fish Audio skills, plus
  another kit on open.feishu.cn, an entry with no base, and a
  docs.example.com/kit kit that Group again must not fetch.
  - With the well-known branch disabled it fails, with the reporter's five
    one-skill groups.
  - With the dot check removed it fails on a GitHub fetch.
- new TestWellKnownBase: a table of base and source forms.
- skill-repo-groups.test.cjs now has a docs.fish.audio group that opens the
  site. It fails with origin/main's assets, which say "on GitHub". It and
  skill-regroup/skill-groups pass in chromium and webkit.
- gofmt -l; go vet for darwin, linux -tags nogui and windows on
  internal/library.

Not run: the reporter's real ~/.agents/.skill-lock.json. The issue quotes
only these three fields of it. A row's own link still isn't its sourceUrl.
2026-10-13 04:32:20 +08:00
..