feat(build): package capsule-declared Skill assets#1282
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Packages capsule-declared skill assets into Rust-built .capsule archives and ensures guest-visible filesystem errors preserve typed semantics (not-found / permission-denied) so runtimes can safely distinguish optional-absent inputs from real I/O failures. This aligns Rust capsule builds with the existing principal-scoped introspection mirror so skills can be discovered from installed capsule metadata without per-principal copy hooks.
Changes:
- Parse synthesized/merged
Capsule.tomlfor[[skill]].fileentries and include those files in the capsule archive at their declared relative paths (with traversal/absolute/out-of-tree validation and deterministic deduping). - Preserve typed guest error codes for native
std::io::ErrorKind::{NotFound, PermissionDenied}when wrapped byastrid_vfs::VfsError::Io. - Add/extend regression tests for archive packaging, introspection mirroring of declarative assets, and error-code mapping; document the behavior in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/astrid-capsule/src/engine/wasm/host/fs/mod.rs | Map VfsError::Io not-found/permission-denied into typed guest ErrorCodes and add regression tests. |
| crates/astrid-capsule-install/src/principal_introspection.rs | Clarify security/docs to include declarative public assets in the mirror and extend mirroring tests to cover a skill asset. |
| crates/astrid-build/src/rust.rs | Resolve and validate [[skill]].file assets and pass them into archive packing; add packaging/traversal/symlink-escape tests. |
| CHANGELOG.md | Document the new skill-asset packaging behavior and typed error mapping under [Unreleased]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joshuajbouw
force-pushed
the
feat/capsule-declared-skill-assets
branch
from
July 19, 2026 20:04
6526edd to
39b34aa
Compare
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.
Linked Issue
Closes #1281
Summary
Makes
[[skill]]a real distributable capsule asset for Rust-built capsules and preserves typed filesystem absence at the guest boundary. This lets an agent runtime discover workflows from its installed capsule introspection view without per-principal lifecycle-hook copies.Changes
[[skill]].filedeclarationsVerification
cargo test -p astrid-build— 20 passedcargo test -p astrid-capsule-install principal_introspection— 5 passedcargo test -p astrid-capsule error_mapping_tests— 2 passedcargo clippy -p astrid-build -p astrid-capsule-install -p astrid-capsule --all-features -- -D warningscargo fmt --all -- --checkSKILL.mdassets and passed AOS's archive-level validatorNo public API or wire shape changes. No release, version bump, channel promotion, or crates.io publication was triggered.
Checklist
[Unreleased]