pub struct KernelRuntime { /* private fields */ }Implementations§
Source§impl KernelRuntime
impl KernelRuntime
pub fn new( config: RuntimeConfig, event_store: Arc<dyn EventStorePort>, provider: Arc<dyn ModelProviderPort>, tool_harness: Arc<dyn ToolHarnessPort>, approvals: Arc<dyn ApprovalPort>, policy_gate: Arc<dyn PolicyGatePort>, ) -> Self
pub fn with_turn_middlewares( config: RuntimeConfig, event_store: Arc<dyn EventStorePort>, provider: Arc<dyn ModelProviderPort>, tool_harness: Arc<dyn ToolHarnessPort>, approvals: Arc<dyn ApprovalPort>, policy_gate: Arc<dyn PolicyGatePort>, turn_middlewares: Vec<Arc<dyn TurnMiddleware>>, ) -> Self
pub async fn create_session( &self, owner: impl Into<String>, policy: PolicySet, model_routing: ModelRouting, ) -> Result<SessionManifest>
pub async fn create_session_with_id( &self, session_id: SessionId, owner: impl Into<String>, policy: PolicySet, model_routing: ModelRouting, ) -> Result<SessionManifest>
pub fn session_exists(&self, session_id: &SessionId) -> bool
Sourcepub fn list_sessions(&self) -> Vec<SessionManifest>
pub fn list_sessions(&self) -> Vec<SessionManifest>
List all in-memory sessions with summary metadata.
pub fn root_path(&self) -> &Path
pub async fn tick( &self, session_id: &SessionId, input: TickInput, ) -> Result<TickOutput>
pub async fn tick_on_branch( &self, session_id: &SessionId, branch_id: &BranchId, input: TickInput, ) -> Result<TickOutput>
pub async fn create_branch( &self, session_id: &SessionId, branch_id: BranchId, from_branch: Option<BranchId>, fork_sequence: Option<u64>, ) -> Result<BranchInfo>
pub async fn list_branches( &self, session_id: &SessionId, ) -> Result<Vec<BranchInfo>>
pub async fn merge_branch( &self, session_id: &SessionId, source_branch: BranchId, target_branch: BranchId, ) -> Result<BranchMergeResult>
pub async fn resolve_approval( &self, session_id: &SessionId, approval_id: Uuid, approved: bool, actor: impl Into<String>, ) -> Result<()>
pub fn subscribe_events(&self) -> Receiver<EventRecord>
Sourcepub fn event_sender(&self) -> Sender<EventRecord>
pub fn event_sender(&self) -> Sender<EventRecord>
Get a clone of the broadcast sender for injecting ephemeral events (e.g., streaming text deltas from the provider).
pub async fn record_external_event( &self, session_id: &SessionId, kind: EventKind, ) -> Result<()>
pub async fn record_external_event_on_branch( &self, session_id: &SessionId, branch_id: &BranchId, kind: EventKind, ) -> Result<()>
pub async fn read_events( &self, session_id: &SessionId, from_sequence: u64, limit: usize, ) -> Result<Vec<EventRecord>>
pub async fn read_events_on_branch( &self, session_id: &SessionId, branch_id: &BranchId, from_sequence: u64, limit: usize, ) -> Result<Vec<EventRecord>>
Trait Implementations§
Source§impl Clone for KernelRuntime
impl Clone for KernelRuntime
Source§fn clone(&self) -> KernelRuntime
fn clone(&self) -> KernelRuntime
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KernelRuntime
impl !RefUnwindSafe for KernelRuntime
impl Send for KernelRuntime
impl Sync for KernelRuntime
impl Unpin for KernelRuntime
impl UnsafeUnpin for KernelRuntime
impl !UnwindSafe for KernelRuntime
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request