Repository navigation
feat(den): store skill files once and allow binary files up to 30 MiB - #7604
Merged
Merged
Conversation
… per skill
A skill version kept every supporting file's text inside its encrypted
payload column. That capped a skill at about 12.5 MB, allowed text only,
and made every skill listing load and hash every listed skill's files.
- New skill_file_blob table: each file's contents, encrypted at rest,
stored once per organization by sha256. A version lists its files as
{ path, sha256, size }, so listings never load contents and a version
that keeps a file reuses its row.
- Contents are written one file per statement before the version's
transaction, to stay within PlanetScale's query and transaction limits.
- Files can be any type: create_skill and update_skill take text or
base64. Limits are 10 MiB per file and 30 MiB per skill, matching
Anthropic's Agent Skills.
- get_skill describes binary files (and shows small images); their
skill:// resource returns the bytes.
- Versions that kept text inline still read, and move to storage on the
next save. Config exports carry contents so they import anywhere.
- Organization deletion removes the stored files.
Signed-off-by: Jalil <reachjalil@gmail.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
This branch was previously deployed
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.
What is this about?
Cloud skills can now carry any kind of file (images, fonts, office templates, scripts) up to 30 MiB per skill, the same size Anthropic's Agent Skills allow, so teams can bring their skills over intact.
What problem does it solve?
A skill could only hold text, at most 8 MiB, because every file lived inside one encrypted payload column. Every skill listing also loaded and hashed every file, so raising the limit would have slowed everyone's skill sync.
What was the situation before?
How is this implemented?
ee/packages/den-db: newskill_file_blobtable (migration 0206) holding contents encrypted at rest, keyed by organization and sha256.ee/apps/den-api/src/skill-file-blobs.ts: writes one file per statement before the version's transaction (PlanetScale query and transaction limits), and reads one file at a time, checked against its digest.{ path, sha256, size }. Versions that kept text inline still read, and move to storage on their next save.create_skill/update_skilltaketextorbase64.get_skilldescribes binary files and shows small images; theirskill://resource returns the bytes. Configuration exports carry contents. Organization deletion removes the files.What else changed?
Release note
Cloud skills can now include images, fonts, templates and other files, up to 30 MB per skill.
Evidence
No E2E.
ee/apps/den-api/test/api/skill-files.api.test.ts: before, a skill held at most 8 MiB of text. After, a 30 MiB skill with a binary file saves, reads back byte for byte, stores each file once, and older inline files still read.