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
//! Hook execution system for cuenv
//!
//! This crate provides the core hook execution functionality, including:
//! - Hook definition and serialization
//! - Background hook execution with state tracking
//! - Approval-based security system
//! - Shell integration support
//!
//! # Overview
//!
//! The hooks system enables environment-triggered command execution:
//! - `onEnter` hooks run when entering a directory with a cuenv configuration
//! - `onExit` hooks run when leaving such a directory
//! - `prePush` hooks run before git push operations
//!
//! # Security
//!
//! All hook configurations must be approved by the user before execution.
//! This prevents malicious configurations from executing arbitrary commands.
//! In CI environments, hooks are auto-approved since the environment is
//! assumed to be already secured.
// TODO(hooks-docs): Add # Errors documentation to all fallible public functions
// Re-export error types at crate root
pub use ;
// Re-export types
pub use ;
// Re-export state management
pub use ;
// Re-export executor
pub use ;
// Re-export approval management
pub use ;