feat(tasks): bundle local skills into sha256-verified zip artifacts#2923
feat(tasks): bundle local skills into sha256-verified zip artifacts#2923tatoalo wants to merge 1 commit into
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "feat(tasks): bundle local skills into sh..." | Re-trigger Greptile |
259d373 to
e8dec75
Compare
bf42454 to
b44c3b4
Compare
|
| bundleLocalSkill( | ||
| input: BundleLocalSkillInput, | ||
| ): Promise<BundleLocalSkillOutput> { | ||
| return bundleLocalSkill({ | ||
| name: input.name, | ||
| source: input.source, | ||
| skillPath: input.path, | ||
| }); |
There was a problem hiding this comment.
Missing
resolveKnownSkillDir guard allows arbitrary filesystem bundling
Every other method that accepts a skillPath — getSkillContents, readSkillFile, saveSkillManifest, etc. — first passes it through resolveKnownSkillDir (or resolveWritableSkillDir), which validates that the path sits under a known skill root. That guard's own comment says "This keeps the contents/readFile endpoints from becoming arbitrary-filesystem reads." bundleLocalSkill skips that guard entirely, so any caller can provide an arbitrary path (e.g. ~/.ssh) containing a SKILL.md and receive the full directory base64-encoded in the response. The fix is to call resolveKnownSkillDir on input.path before forwarding it to the bundler.
Rule Used: When implementing new features, ensure that owners... (source)
Learned From
PostHog/posthog#31236

Problem
for cloud tasks, local skill invocations only sent the slash command text. User-local and repo-local skills were available in the local editor but not in the cloud sandbox
Changes
let's bundle uploadable local skills into zip artifacts with SHA-256 metadata and send them through the existing cloud artifact upload flow.
install
skill_bundleartifacts in the agent server before prompt delivery, inject the bundled skill instructions for the invoked turn, and suppress the raw slash command from the model-facing prompt so local skills behave like actual skills rather than unsupported commandsrefresh slash command metadata when a follow-up command is submitted, so newly created local skills can be selected and invoked without starting a brand-new task.
closes #2260