Skip to main content

abyss_agent_hook/config/
content.rs

1//! Content-retention policy applied after Harness and protocol detection.
2
3use serde::{Deserialize, Serialize};
4
5/// Independent content retention controls for Harness usage events.
6#[derive(Debug, Clone, Deserialize, Serialize)]
7#[expect(
8    clippy::struct_excessive_bools,
9    reason = "the policy contract intentionally exposes four independent switches"
10)]
11#[serde(default, deny_unknown_fields)]
12pub struct HarnessUsageContentConfig {
13    /// Whether provider token counters are retained.
14    pub token_usage: bool,
15    /// Whether conversation request/response text is retained.
16    pub conversation_text: bool,
17    /// Whether tool call and tool result content is retained.
18    pub tool_calls: bool,
19    /// Whether image metadata and attachments are retained.
20    pub images: bool,
21}
22
23impl Default for HarnessUsageContentConfig {
24    fn default() -> Self {
25        Self {
26            token_usage: true,
27            conversation_text: true,
28            tool_calls: true,
29            images: true,
30        }
31    }
32}