pub struct RuntimeBuilder { /* private fields */ }Expand description
Builder for constructing a Runtime with the desired configuration.
Implementations§
Source§impl RuntimeBuilder
impl RuntimeBuilder
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a new builder configured from environment variables.
Recognizes:
KERNEX_DATA_DIRKERNEX_DB_PATH(whensqlite-storefeature is enabled)KERNEX_SYSTEM_PROMPTKERNEX_CHANNELKERNEX_PROJECT
Sourcepub fn db_path(self, path: &str) -> Self
pub fn db_path(self, path: &str) -> Self
Set a custom database path (default: {data_dir}/memory.db).
Sourcepub fn system_prompt(self, prompt: &str) -> Self
pub fn system_prompt(self, prompt: &str) -> Self
Set the base system prompt.
Sourcepub fn hook_runner(self, runner: Arc<dyn HookRunner>) -> Self
pub fn hook_runner(self, runner: Arc<dyn HookRunner>) -> Self
Set a hook runner for tool lifecycle events.
Sourcepub fn permission_rules(self, rules: PermissionRules) -> Self
pub fn permission_rules(self, rules: PermissionRules) -> Self
Set declarative allow/deny permission rules for tool calls.
Sourcepub async fn build(self) -> Result<Runtime, KernexError>
pub async fn build(self) -> Result<Runtime, KernexError>
Build and initialize the runtime.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeBuilder
impl !RefUnwindSafe for RuntimeBuilder
impl Send for RuntimeBuilder
impl Sync for RuntimeBuilder
impl Unpin for RuntimeBuilder
impl UnsafeUnpin for RuntimeBuilder
impl !UnwindSafe for RuntimeBuilder
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