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
use serde::{Deserialize, Serialize};
fn default_true() -> bool {
true
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct HooksConfig {
/// Whether the outbox `LedgerHook` runs. Default: true.
#[serde(default = "default_true")]
pub ledger: bool,
/// Whether `CompanionVoiceHook` runs.
/// `None` = auto-wire from `profile.companion.enabled`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub companion_voice: Option<bool>,
/// Whether `VoiceInputHook` runs.
/// `None` = auto-wire from `profile.voice.enabled`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub voice_input: Option<bool>,
/// Whether the agent's `bash` tool moves `rm` / `rmdir` / `unlink`
/// targets into its trash instead of deleting them. Default: true.
#[serde(default = "default_true")]
pub trash_guard: bool,
}
impl Default for HooksConfig {
fn default() -> Self {
Self {
ledger: true,
companion_voice: None,
voice_input: None,
trash_guard: true,
}
}
}