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
//! Per-tool filesystem operation records.
//!
//! A [`FileChange`] is attached to a [`super::ToolExecution`] so that
//! downstream consumers (audit log, TUI, persistent stats) can reconstruct
//! exactly which files each tool invocation touched and how.
use ;
use ;
/// A single filesystem operation performed by a tool.
///
/// The `operation` field is a free-form string (`"read"`, `"create"`,
/// `"modify"`, …) chosen by the emitting tool. Use the helper constructors
/// below rather than building the struct by hand.
///
/// # Examples
///
/// ```rust
/// use codetether_agent::telemetry::FileChange;
///
/// let r = FileChange::read("src/main.rs", Some((1, 20)));
/// assert_eq!(r.operation, "read");
/// assert!(r.summary().contains("src/main.rs"));
///
/// let c = FileChange::create("new.txt", "hello");
/// assert_eq!(c.size_bytes, Some(5));
/// ```