1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Community-skill installer (#140).
//!
//! Pulls user-authored skills from GitHub or direct tarball URLs, validates them
//! against a path-traversal- and size-bounded extractor, and writes them into
//! `<skills_dir>/<name>/`. No backend service, no auto-execution: every install
//! is gated by the per-domain [`crate::network_policy::NetworkPolicy`] and
//! validation rejects any tarball entry that escapes the destination directory.
//!
//! Public surface:
//!
//! * [`InstallSource`] — `github:owner/repo`, raw URL, or curated registry
//! name. Parsed from a single string with [`InstallSource::parse`].
//! * [`install`] / [`update`] / [`uninstall`] — async install, atomic update,
//! and clean uninstall. All three preserve a `.installed-from` marker so the
//! bundled `skill-creator` (which lacks the marker) is never touched.
//! * [`InstallOutcome`] — `Installed` / `NeedsApproval(host)` /
//! `NetworkDenied(host)`. The `NeedsApproval` variant is returned without
//! side effects so the caller (slash-command, runtime API, etc.) can route
//! through its own approval flow.
//!
//! # Hard rules
//!
//! * Validation extracts to a temp directory first. The destination path is
//! only created (via atomic rename) once the tarball clears every check.
//! Half-installed skills can never appear on disk.
//! * Path traversal rejection covers both `..` segments and absolute paths.
//! Symlinks inside the selected skill subtree are rejected — there's no use
//! case for them in a SKILL.md bundle and they're a notorious foothold for
//! escape. Multi-skill repository archives may contain unrelated symlinks
//! outside that selected subtree; those entries are ignored and never
//! extracted.
//! * No `+x` is granted on extracted files. The optional `/skill trust <name>`
//! command writes a `.trusted` marker; tool-execution gating is a separate
//! concern that lives next to the tool registry.
pub use ;
pub use ;
pub use ;
pub use ;