pub fn compose_package(
name: &str,
skill: &'static Dir<'static>,
shared: &'static Dir<'static>,
) -> Result<Vec<(String, &'static [u8])>, PackageError>Expand description
Compose one package from a skill directory and the shared source.
The closure is an allowlist: SKILL.md and the files directly under the
skill’s references/, then every shared artifact under references/.
A file outside the allowlist, or a reference name both sources claim, is
refused rather than dropped or shadowed, because either would ship a
package that differs from what its author wrote.
§Errors
PackageError::Unknown where the directory holds no SKILL.md,
PackageError::Unlisted for a file outside the allowlist, and
PackageError::Collision for a name both sources claim.