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
//! AI agent hook provisioning (PRD: AI Hooks).
//!
//! Distributes hook configurations across heterogeneous AI coding agents
//! (Claude Code, Cursor, Codex CLI, Windsurf, Cline, Continue) so that a
//! team can ship guard rails — e.g. block `rm -rf`, block `git push --force`,
//! block secret-bearing commits — through a single `jarvy.toml` section.
//!
//! # Architecture
//!
//! - [`config`] — Public `[ai_hooks]` schema (`AiHooksConfig`, `HookEntry`).
//! - [`event`] — Canonical event taxonomy + per-agent event mapping.
//! - [`library`] — Built-in, curated hook scripts (`block-rm-rf`, ...).
//! - [`agents`] — `AgentProvisioner` trait + per-agent implementations.
//! - [`runner`] — Top-level `apply` / `check` / `remove` orchestration.
//! - [`platform`] — Host detection + EncodedCommand PowerShell wrap.
//! - [`error`] — `AiHookError` type with stable `kind()` tags.
//!
//! # Trust model
//!
//! Library hooks are vetted Jarvy source. Custom hook entries (raw
//! `command` fields in `jarvy.toml`) run arbitrary shell with the user's
//! privileges — they are flagged by [`runner::audit_custom_commands`]
//! and require BOTH `allow_custom_commands = true` AND the config to be
//! [`config::ConfigOrigin::Local`] (i.e. not fetched via
//! `jarvy setup --from <url>`). The Remote origin tag is set by the
//! loader; a poisoned team `jarvy.toml` cannot lift the gate on its own.
pub use ;
pub use AiHookError;
pub use HookEvent;
pub use ;