Function
record_result
(
root: &Path,
context: &HookContext,
agent: &str,
display: &str,
verb: &str,
result: Result<T, E>,
)
Source from the content-addressed store, hash-verified
| 35 | } |
| 36 | |
| 37 | pub fn record_result<T, E: std::fmt::Display>( |
| 38 | root: &Path, |
| 39 | context: &HookContext, |
| 40 | agent: &str, |
| 41 | display: &str, |
| 42 | verb: &str, |
| 43 | result: Result<T, E>, |
| 44 | ) -> Result<T, E> { |
| 45 | atomic_agent::hook_log::record_result(context, agent, display, verb, result, |event| { |
| 46 | append(root, event) |
| 47 | }) |
| 48 | } |
| 49 | |
| 50 | pub fn read(root: &Path) -> CliResult<Option<HookHealth>> { |
| 51 | let Some(service) = Service::open_root(root)? else { |
Tested by
no test coverage detected