pub struct DemocritusLoop { /* private fields */ }Expand description
The DEMOCRITUS continuous cognitive loop.
Runs every CognitiveTick cycle: Sense -> Embed -> Search -> Update -> Commit.
Implementations§
Source§impl DemocritusLoop
impl DemocritusLoop
Sourcepub fn new(
causal_graph: Arc<CausalGraph>,
hnsw: Arc<HnswService>,
impulse_queue: Arc<ImpulseQueue>,
crossref_store: Arc<CrossRefStore>,
embedding_provider: Arc<dyn EmbeddingProvider>,
config: DemocritusConfig,
) -> Self
pub fn new( causal_graph: Arc<CausalGraph>, hnsw: Arc<HnswService>, impulse_queue: Arc<ImpulseQueue>, crossref_store: Arc<CrossRefStore>, embedding_provider: Arc<dyn EmbeddingProvider>, config: DemocritusConfig, ) -> Self
Create a new DEMOCRITUS loop wired to the given ECC subsystems.
Sourcepub async fn tick(&self) -> DemocritusTickResult
pub async fn tick(&self) -> DemocritusTickResult
Execute one full tick cycle: Sense -> Embed -> Search -> Update -> Commit.
Returns a summary of what was processed. This is the method the
[CognitiveTick] loop should call on each cycle.
Sourcepub fn total_ticks(&self) -> u64
pub fn total_ticks(&self) -> u64
Total number of ticks executed.
Sourcepub fn total_nodes_added(&self) -> u64
pub fn total_nodes_added(&self) -> u64
Total number of causal nodes added across all ticks.
Sourcepub fn total_edges_added(&self) -> u64
pub fn total_edges_added(&self) -> u64
Total number of causal edges added across all ticks.
Auto Trait Implementations§
impl !Freeze for DemocritusLoop
impl !RefUnwindSafe for DemocritusLoop
impl Send for DemocritusLoop
impl Sync for DemocritusLoop
impl Unpin for DemocritusLoop
impl UnsafeUnpin for DemocritusLoop
impl !UnwindSafe for DemocritusLoop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more