Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl Default for AgentConfig {
/// enum to drive the agent loop and report status to observers.
///
/// ```text
/// Idle → Processing → WaitingForTool → Processing → → Completed/Failed
/// Idle → Processing → WaitingForTool → Processing → ... → Completed/Failed
/// ↘ Compacting ↗
/// ↘ Reflecting ↗
/// ```
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
//! - **[`core`]** — Foundational traits (`AgentObserver`) and error types.
//! - **[`loop_control`]** — Detection and intervention modules for agent loops.
//! - **[`stream`]** — Streaming event types for LLM API responses.
//! - **[`tool`]** — Tool trait, registry, and supporting types.

pub mod api_error;
pub mod builder;
pub mod core;
pub mod loop_control;
pub mod message;
pub mod stream;
pub mod tool;
2 changes: 1 addition & 1 deletion src/loop_control/convergence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ impl Default for ConvergenceConfig {
/// consecutive_count ─── how many similar responses in a row
/// similarity_score ──── highest Jaccard score among compared pairs
/// similar_responses ─── the response texts that triggered detection
/// action ────────────── what the caller should do (stop, warn, )
/// action ────────────── what the caller should do (stop, warn, ...)
/// ```
///
/// # Example
Expand Down
11 changes: 2 additions & 9 deletions src/loop_control/detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ pub enum DetectedPattern {
/// assert!(repetitions >= 3);
/// }
/// ```
///
/// See the surrounding documentation and cross-references for details.
LoopDetected {
/// Number of times the pattern has repeated.
///
Expand Down Expand Up @@ -213,8 +211,6 @@ pub enum DetectedPattern {
/// pair of responses (0.0–1.0).
/// - `consecutive_count` — how many consecutive response pairs exceeded
/// the threshold.
///
/// See the surrounding documentation and cross-references for details.
ConvergenceDetected {
/// Jaccard similarity score (0.0–1.0) of the most recent pair of
/// responses.
Expand Down Expand Up @@ -248,8 +244,6 @@ pub enum DetectedPattern {
///
/// Callers should simply continue the turn loop when they receive
/// this variant.
///
/// See the surrounding documentation and cross-references for details.
NoPattern,
}

Expand Down Expand Up @@ -351,7 +345,6 @@ pub struct DetectionConfig {
/// sufficient — typical loops repeat within 3–10 operations.
///
/// Default: **100**.
///
pub max_history: usize,

// ==================================================
Expand Down Expand Up @@ -657,7 +650,7 @@ pub struct DetectionStats {
/// }
///
/// // Record responses
/// dm.record_response("Working on step 1");
/// dm.record_response("Working on step 1...");
///
/// // Query at any time
/// let stats = dm.stats();
Expand Down Expand Up @@ -1436,7 +1429,7 @@ impl DetectionManager {
///
/// ```rust,ignore
/// dm.record_tool_call("Read", 42);
/// dm.record_response("Working on step 1");
/// dm.record_response("Working on step 1...");
/// dm.reset();
/// assert!(matches!(dm.check_current_pattern(), DetectedPattern::NoPattern));
/// assert_eq!(dm.stats().turns_analyzed, 0);
Expand Down
Loading
Loading