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
//! Unified log file path management.
//!
//! This module provides utilities for building log file paths. There are two
//! naming conventions supported:
//!
//! 1. **Legacy naming** (pre-per-run-logging):
//! - `{prefix}_{agent}_{model_index}.log` (and with attempt suffix)
//! - Used for special-purpose logs like commit generation and conflict resolution
//! - These logs are written outside the per-run log directory structure
//!
//! 2. **Simplified naming** (per-run-logging):
//! - `{phase}_{index}.log` (with optional `_aN` attempt suffix)
//! - Used for main pipeline phase agent logs
//! - These logs are written under `.agent/logs-<run_id>/agents/`
//!
//! The legacy naming functions (`build_logfile_path`, `build_logfile_path_with_attempt`)
//! are kept for special cases where agent identity in the filename is useful (e.g., commit
//! message generation logs, conflict resolution logs) and for backward compatibility with
//! tooling that may parse legacy log filenames.
//!
//! ## Module Organization
//!
//! - [`naming`] - Log file name construction utilities
//! - [`attempt_discovery`] - Determine next attempt index for log files
//! - [`extraction`] - Parse agent names from log file paths
//! - [`lookup`] - Find and read the most recent log files
// Re-export public API
pub use ;
pub use extract_agent_name_from_logfile;
pub use ;
pub use ;