1ccacad63281094de8a3372d5a507d38f9969e5c
4
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
33ccc61884 |
library: one market skill from a huge repository installs alone; GitHub's file list is never cut (#2794)
Adding clean-code from sickn33/agentic-awesome-skills in the market failed with "GitHub's list of sickn33/agentic-awesome-skills's files wasn't understood: unexpected end of JSON input" (CaiusLuo; stablyai/ orca the same, ye4241). The repository's download is over 200 MB, so its skills are fetched file by file from GitHub's list of its files (#1941), and that list is 11.3 MB: apiGet cut every answer at 8 MB and dropped the read's error, so JSON was handed a cut-off body. From ye4241's patch on the issue (made on |
||
|
|
aa6a0d6b20 |
library: one skill over 200 MB is left out, not the whole repository (#2062)
mikubaka88/CCFA-Skills couldn't be installed at all: "the skills in ... are
too big to install (over 200 MB)". The repository is over the 200 MB
tarball cap, so fetchSkillFiles fetched it file by file, and that refused
the whole repository once the files summed past 200 MB. One skill,
ccf-paper-writer, is 297 MB on its own (exemplar paper PDFs, llava-4d.pdf
alone 46.8 MB); the other 16 are small.
The 200 MB limit per skill stays: a skill is copied into every agent that
gets one as a copy, and treeOf stops comparing at 256 MB, so a 297 MB skill
can't be told current or edited. What changes is that one such skill no
longer blocks the rest:
- fetchSkillFiles sums each skill's files (the deepest skill folder a file
is under) and leaves out a skill over maxFetch; its files are never
asked for. Only when every skill is over it does it fail as before.
- The left-out skills reach ProbeSkills as Probe.Left (path, size), kept
per temp folder and taken once (tookLeftOut).
- The GUI's probe names each under the list ("{name} is too big to
install: 283 MB, over the 200 MB a skill may be"), or in place of "No
skills there" when nothing else is left; zh, zh-TW, ja, de. The TUI says
it in its flash.
- docs/subsystems/library.md says how a big repository is fetched.
Run:
- Real: probe of mikubaka88/CCFA-Skills under a sandbox HOME lists 16
skills and leaves out ccf-paper-writer (296736735 bytes). Not installed
into a real agent.
- gofmt -l internal/: clean. go vet ./internal/gateway ./internal/library
./internal/tui on darwin, GOOS=linux -tags nogui, GOOS=windows (set -o
pipefail): clean.
- go test -count=1 ./internal/library ./internal/tui: ok.
- TestOneSkillTooBigLeavesTheOthers (new): fails with the per-skill
leave-out turned off by hand, passes with it.
TestTooBigRepositoryChecksWhatArrives now makes every skill too big.
- skill-too-big.test.cjs (new), chromium and webkit, en 980 and zh,
zh-TW, ja 440, de 420, plus every-skill-too-big: 14/14; red (0/7 in
chromium) with client.js at origin/main. skill-*.test.cjs 190/190 and
library-*.test.cjs 484/484 in both engines.
|
||
|
|
776c255f56 |
library: a market skill kept only in a repository's .claude/skills installs (#1964, UFO404)
The market lists ui-ux-pro-max from nextlevelbuilder/ui-ux-pro-max-skill, whose SKILL.md is only at .claude/skills/ui-ux-pro-max. candidates() skipped every hidden folder, so the install said "has no skill ui-ux-pro-max any more". candidates() now looks into a hidden folder only for its skills folder (.claude/skills, .agents/skills, .codex/skills ...), the same agent folders the skills CLI behind skills.sh reads. A skill found there that the repository also has outside hidden folders (that repo keeps brand, design, slides... in both .claude/skills and cli/assets/skills) is listed once, as the one outside, as the skills CLI does by name. skillDirsIn, which the new-skills check reads from GitHub's tree, follows the same rule, so the two paths agree. A hidden folder that isn't an agent's skills folder (skills/.hidden, .claude-plugin/x) is still skipped. TestSkillsFromATooBigRepository (#1941) expected hindsight's own .claude/skills/ship-it to be left out; it is listed now, as the skills CLI lists it. Run: - TestMarketInstallsASkillKeptInClaudesFolder, with the repository's real paths. On the old code it fails with "has no skill ui-ux-pro-max any more". Turning off the de-duplication and the skills-folder rule by hand each turns it red. - A throwaway test (not committed) installing ui-ux-pro-max from the real GitHub repository in a sandbox HOME: installed, candidates are the six cli/assets skills plus .claude/skills/ui-ux-pro-max. - go test ./internal/library (nogui), gofmt -l, go vet for darwin, linux and windows. Not tried: the GUI Market page itself. |
||
|
|
4794de398e |
library: a skill installs from a repository too big to download whole, by fetching only its skills' folders (#1941, Goalonez)
What changed: fetch still downloads a repository as one codeload
tarball first. When its files pass the 200 MB limit (untar's errTooBig),
it now falls back to fetchSkillFiles: one request to GitHub's API for
the repository's file list (git/trees?recursive=1), then every file in
a folder with a SKILL.md, from raw.githubusercontent.com, each checked
against the git hash the list gives. The repository's folders are made
empty, so candidates, origin, a probe of a subfolder and an update check
read the result as they read a whole download. The 200 MB limit now
applies to what is actually fetched: skills that are themselves over it
still say so. A private repository's files come from the API's
git/blobs with the Settings token (it never goes to raw). A repository
found too big is remembered for the run, so the install after its probe,
and update checks, don't download 150 MB again before falling back.
gitTree's entries gained mode, sha and size (named gitEntry).
Why: vectorize-io/hindsight keeps its skills (a few hundred KB) beside
an app; its tarball is 188 MB gzipped, 253 MB unpacked, so any skill
in it failed with "the repository is too big to install skills from".
What was run:
- Real repo, sandbox HOME, no token: on the old code ProbeSkills
("https://github.com/vectorize-io/hindsight") fails with "too big"
after 34s. With the fix it lists all 15 skills (skills/*, the
integrations' skills; .claude/skills hidden as before) in 32s, and
installing skills/hindsight-docs writes its 160 files, the same count
GitHub's tree lists.
- New TestSkillsFromATooBigRepository and
TestTooBigRepositoryChecksWhatArrives (httptest stand-ins for codeload,
the API and raw, laid out as hindsight is, paths and tree entries
from its real listing). With the fallback taken out both fail with
"the repository is too big to install skills from (over 200 MB)".
They check raw is never asked for a file outside a skill, codeload
is asked once across two probes, a file that doesn't match its hash
is refused, and skills over the limit themselves still error.
- go test -tags nogui ./internal/library (ok, 141s); -race -count=10
-run TooBig (ok); gofmt -l clean; go vet, GOOS=linux and
GOOS=windows go vet -tags nogui ./internal/library clean.
Not tried: a private repository over the limit against real GitHub
(covered only by reading: raw 404 -> git/blobs with the token).
|