Skip to main content

ContextAssemblyRuntime

Trait ContextAssemblyRuntime 

Source
pub trait ContextAssemblyRuntime: Send + Sync {
    // Required method
    fn assemble_from_batches<'life0, 'async_trait>(
        &'life0 self,
        candidate_batches: Vec<RecordBatch>,
    ) -> Pin<Box<dyn Future<Output = HirnResult<Vec<u8>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Per-query runtime bridge for the THINK context assembly operator.

Registered once per THINK query execution (with actor identity, config, and recall context captured at registration time), then looked up by key inside ContextAssemblyExec::execute().

The implementation in hirn-engine calls assemble_think_context and JSON-serialises the full ThinkAssemblyOutput (including decoded ScoredMemory records) so the operator can return a single opaque row.

Required Methods§

Source

fn assemble_from_batches<'life0, 'async_trait>( &'life0 self, candidate_batches: Vec<RecordBatch>, ) -> Pin<Box<dyn Future<Output = HirnResult<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Assemble context from scored candidate batches.

Receives the raw Arrow output from ContextBudgetExec (or McfaDefenseExec if MCFA defense is enabled). Returns opaque JSON bytes that the engine decodes into a fully-hydrated ThinkAssemblyOutput.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§