Skip to main content

ralph_workflow/
lib.rs

1//! Ralph workflow library for commit message parsing and validation.
2//!
3//! This library exposes the core functionality used by the ralph binary,
4//! including commit message extraction from LLM output.
5
6pub mod agents;
7pub mod app;
8pub mod banner;
9pub mod checkpoint;
10pub mod cli;
11pub mod common;
12pub mod config;
13pub mod diagnostics;
14pub mod executor;
15pub mod files;
16pub mod git_helpers;
17pub mod guidelines;
18pub mod interrupt;
19pub mod json_parser;
20pub mod language_detector;
21pub mod logger;
22pub mod phases;
23pub mod pipeline;
24pub mod platform;
25pub mod prompts;
26pub mod reducer;
27pub mod review_metrics;
28pub mod templates;
29pub mod workspace;
30
31// Re-export XML extraction and validation functions for use in integration tests
32pub use files::llm_output_extraction::extract_development_result_xml;
33pub use files::llm_output_extraction::extract_fix_result_xml;
34pub use files::llm_output_extraction::extract_issues_xml;
35pub use files::llm_output_extraction::validate_development_result_xml;
36pub use files::llm_output_extraction::validate_fix_result_xml;
37pub use files::llm_output_extraction::validate_issues_xml;
38
39// Deprecated: Use UIEvent::XmlOutput for user-facing XML display.
40// This re-export is kept for backward compatibility with tests and debugging.
41#[deprecated(
42    since = "0.8.0",
43    note = "Use UIEvent::XmlOutput for user-facing XML display. This function is kept for debugging/logging only."
44)]
45pub use files::llm_output_extraction::format_xml_for_display;
46
47// Re-export process executor
48pub use executor::{
49    AgentChild, AgentChildHandle, AgentCommandResult, AgentSpawnConfig, ProcessExecutor,
50    ProcessOutput, RealAgentChild, RealProcessExecutor,
51};
52
53// Re-export mock executor for test-utils feature
54#[cfg(any(test, feature = "test-utils"))]
55pub use executor::{MockAgentChild, MockProcessExecutor};