halo-agent 0.1.1

Halo Agent and Workflow execution kernel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Concrete processing implementations. Model use, persistence and graph
//! orchestration remain explicit caller choices.
pub mod chunker;
mod extraction;
pub use extraction::{LocalLoader, graph, raptor};
pub mod parser;
pub mod transformer;

use crate::{Cancellation, document::Error};

pub(super) fn check_cancelled(cancellation: &Cancellation) -> Result<(), Error> {
    if cancellation.is_cancelled() {
        Err(Error::new("CANCELLED", "document processing cancelled"))
    } else {
        Ok(())
    }
}