pub struct Runtime {
pub store: Store,
pub skills: Vec<Skill>,
pub projects: Vec<Project>,
pub data_dir: String,
pub system_prompt: String,
pub channel: String,
pub project: Option<String>,
}Expand description
A configured Kernex runtime with all subsystems initialized.
Fields§
§store: StorePersistent memory store.
skills: Vec<Skill>Loaded skills from the data directory.
projects: Vec<Project>Loaded projects from the data directory.
data_dir: StringData directory path (expanded).
system_prompt: StringBase system prompt prepended to every request.
channel: StringCommunication channel identifier (e.g. “cli”, “api”, “slack”).
project: Option<String>Active project key for scoping memory and lessons.
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub async fn complete(
&self,
provider: &dyn Provider,
request: &Request,
) -> Result<Response, KernexError>
pub async fn complete( &self, provider: &dyn Provider, request: &Request, ) -> Result<Response, KernexError>
Send a request through the full runtime pipeline: build context from memory → enrich with skills → complete via provider → save exchange.
This is the high-level convenience method that wires together all Kernex subsystems in a single call.
Sourcepub async fn complete_with_needs(
&self,
provider: &dyn Provider,
request: &Request,
needs: &ContextNeeds,
) -> Result<Response, KernexError>
pub async fn complete_with_needs( &self, provider: &dyn Provider, request: &Request, needs: &ContextNeeds, ) -> Result<Response, KernexError>
Like complete, but with explicit control over which
context blocks are loaded from memory.
Auto Trait Implementations§
impl Freeze for Runtime
impl !RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl !UnwindSafe for Runtime
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