pub struct ContextEngine { /* private fields */ }Implementations§
Source§impl ContextEngine
impl ContextEngine
pub fn new() -> Self
pub fn with_project_root(project_root: impl Into<PathBuf>) -> Self
pub fn from_server(server: LeanCtxServer) -> Self
pub fn server(&self) -> &LeanCtxServer
pub fn manifest(&self) -> Value
pub async fn call_tool_value( &self, name: &str, arguments: Option<Value>, ) -> Result<Value>
Sourcepub async fn call_tool_value_with_rights(
&self,
name: &str,
arguments: Option<Value>,
rights: State,
) -> Result<Value>
pub async fn call_tool_value_with_rights( &self, name: &str, arguments: Option<Value>, rights: State, ) -> Result<Value>
Self::call_tool_value under a caller’s session rights (process-v1
§9): the shared daemon runs a forwarded call with the rights of the
session that sent it, not with its own.
pub async fn call_tool_result( &self, name: &str, arguments: Option<Value>, ) -> Result<CallToolResult>
pub async fn call_tool_text( &self, name: &str, arguments: Option<Value>, ) -> Result<String>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ContextEngine
impl !RefUnwindSafe for ContextEngine
impl !UnwindSafe for ContextEngine
impl Forget for ContextEngine
impl Move for ContextEngine
impl Send for ContextEnginewhere
Arc<RwLock<SessionCache>>: Send,
Arc<RwLock<Arc<RwLock<SessionState>>>>: Send,
Arc<Mutex<HashMap<String, String>>>: Send,
Arc<RwLock<Vec<ToolCallRecord>>>: Send,
Arc<Atomic<usize>>: Send,
Arc<RwLock<Instant>>: Send,
Arc<RwLock<Option<String>>>: Send,
Arc<RwLock<Option<TaskEnvelopeV1>>>: Send,
Arc<HostReceiptAuthority>: Send,
Arc<Mutex<()>>: Send,
Arc<RwLock<String>>: Send,
Arc<AutonomyState>: Send,
Arc<RwLock<LoopDetector>>: Send,
Arc<RwLock<Option<WorkflowRun>>>: Send,
Arc<RwLock<ContextLedger>>: Send,
Arc<RwLock<PipelineStats>>: Send,
RawVecInner: Send,
Arc<ContextOsRuntime>: Send,
Arc<RwLock<ContextIrV1>>: Send,
Arc<ToolRegistry>: Send,
Arc<Atomic<bool>>: Send,
Arc<Atomic<i64>>: Send,
Arc<RwLock<Option<Peer<RoleServer>>>>: Send,
Arc<ShellApprovalState>: Send,
Arc<OnceCell<()>>: Send,
Arc<Atomic<u32>>: Send,
Arc<Mutex<Option<Bm25CacheEntry>>>: Send,
Arc<EvictionOrchestrator>: Send,
Arc<Atomic<u64>>: Send,
Arc<Atomic<u8>>: Send,
Arc<Mutex<bool>>: Send,
Atomic<i64>: Send,
impl Sync for ContextEnginewhere
Arc<RwLock<SessionCache>>: Sync,
Arc<RwLock<Arc<RwLock<SessionState>>>>: Sync,
Arc<Mutex<HashMap<String, String>>>: Sync,
Arc<RwLock<Vec<ToolCallRecord>>>: Sync,
Arc<Atomic<usize>>: Sync,
Arc<RwLock<Instant>>: Sync,
Arc<RwLock<Option<String>>>: Sync,
Arc<RwLock<Option<TaskEnvelopeV1>>>: Sync,
Arc<HostReceiptAuthority>: Sync,
Arc<Mutex<()>>: Sync,
Arc<RwLock<String>>: Sync,
Arc<AutonomyState>: Sync,
Arc<RwLock<LoopDetector>>: Sync,
Arc<RwLock<Option<WorkflowRun>>>: Sync,
Arc<RwLock<ContextLedger>>: Sync,
Arc<RwLock<PipelineStats>>: Sync,
RawVecInner: Sync,
Arc<ContextOsRuntime>: Sync,
Arc<RwLock<ContextIrV1>>: Sync,
Arc<ToolRegistry>: Sync,
Arc<Atomic<bool>>: Sync,
Arc<Atomic<i64>>: Sync,
Arc<RwLock<Option<Peer<RoleServer>>>>: Sync,
Arc<ShellApprovalState>: Sync,
Arc<OnceCell<()>>: Sync,
Arc<Atomic<u32>>: Sync,
Arc<Mutex<Option<Bm25CacheEntry>>>: Sync,
Arc<EvictionOrchestrator>: Sync,
Arc<Atomic<u64>>: Sync,
Arc<Atomic<u8>>: Sync,
Arc<Mutex<bool>>: Sync,
Atomic<i64>: Sync,
impl Unpin for ContextEnginewhere
Arc<RwLock<SessionCache>>: Unpin,
Arc<RwLock<Arc<RwLock<SessionState>>>>: Unpin,
Arc<Mutex<HashMap<String, String>>>: Unpin,
Arc<RwLock<Vec<ToolCallRecord>>>: Unpin,
Arc<Atomic<usize>>: Unpin,
Arc<RwLock<Instant>>: Unpin,
Arc<RwLock<Option<String>>>: Unpin,
Arc<RwLock<Option<TaskEnvelopeV1>>>: Unpin,
Arc<HostReceiptAuthority>: Unpin,
Arc<Mutex<()>>: Unpin,
Arc<RwLock<String>>: Unpin,
Arc<AutonomyState>: Unpin,
Arc<RwLock<LoopDetector>>: Unpin,
Arc<RwLock<Option<WorkflowRun>>>: Unpin,
Arc<RwLock<ContextLedger>>: Unpin,
Arc<RwLock<PipelineStats>>: Unpin,
*const u8 is !null: Unpin,
Arc<ContextOsRuntime>: Unpin,
Arc<RwLock<ContextIrV1>>: Unpin,
Arc<ToolRegistry>: Unpin,
Arc<Atomic<bool>>: Unpin,
Arc<Atomic<i64>>: Unpin,
Arc<RwLock<Option<Peer<RoleServer>>>>: Unpin,
Arc<ShellApprovalState>: Unpin,
Arc<OnceCell<()>>: Unpin,
Arc<Atomic<u32>>: Unpin,
Arc<Mutex<Option<Bm25CacheEntry>>>: Unpin,
Arc<EvictionOrchestrator>: Unpin,
Arc<Atomic<u64>>: Unpin,
Arc<Atomic<u8>>: Unpin,
Arc<Mutex<bool>>: Unpin,
Align8<i64>: Unpin,
impl UnsafeUnpin for ContextEnginewhere
*const ArcInner<RwLock<SessionCache>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<SessionCache>>>: UnsafeUnpin,
*const ArcInner<RwLock<Arc<RwLock<SessionState>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Arc<RwLock<SessionState>>>>>: UnsafeUnpin,
*const ArcInner<Mutex<HashMap<String, String>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<HashMap<String, String>>>>: UnsafeUnpin,
*const ArcInner<RwLock<Vec<ToolCallRecord>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Vec<ToolCallRecord>>>>: UnsafeUnpin,
*const ArcInner<Atomic<usize>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<usize>>>: UnsafeUnpin,
*const ArcInner<RwLock<Instant>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Instant>>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<String>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<String>>>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<TaskEnvelopeV1>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<TaskEnvelopeV1>>>>: UnsafeUnpin,
*const ArcInner<HostReceiptAuthority> is !null: UnsafeUnpin,
PhantomData<ArcInner<HostReceiptAuthority>>: UnsafeUnpin,
*const ArcInner<Mutex<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<()>>>: UnsafeUnpin,
*const ArcInner<RwLock<String>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<String>>>: UnsafeUnpin,
*const ArcInner<AutonomyState> is !null: UnsafeUnpin,
PhantomData<ArcInner<AutonomyState>>: UnsafeUnpin,
*const ArcInner<RwLock<LoopDetector>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<LoopDetector>>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<WorkflowRun>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<WorkflowRun>>>>: UnsafeUnpin,
*const ArcInner<RwLock<ContextLedger>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ContextLedger>>>: UnsafeUnpin,
*const ArcInner<RwLock<PipelineStats>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<PipelineStats>>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<ContextOsRuntime> is !null: UnsafeUnpin,
PhantomData<ArcInner<ContextOsRuntime>>: UnsafeUnpin,
*const ArcInner<RwLock<ContextIrV1>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<ContextIrV1>>>: UnsafeUnpin,
*const ArcInner<ToolRegistry> is !null: UnsafeUnpin,
PhantomData<ArcInner<ToolRegistry>>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
*const ArcInner<Atomic<i64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<i64>>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<Peer<RoleServer>>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<Peer<RoleServer>>>>>: UnsafeUnpin,
*const ArcInner<ShellApprovalState> is !null: UnsafeUnpin,
PhantomData<ArcInner<ShellApprovalState>>: UnsafeUnpin,
*const ArcInner<OnceCell<()>> is !null: UnsafeUnpin,
PhantomData<ArcInner<OnceCell<()>>>: UnsafeUnpin,
*const ArcInner<Atomic<u32>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u32>>>: UnsafeUnpin,
*const ArcInner<Mutex<Option<Bm25CacheEntry>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<Option<Bm25CacheEntry>>>>: UnsafeUnpin,
*const ArcInner<EvictionOrchestrator> is !null: UnsafeUnpin,
PhantomData<ArcInner<EvictionOrchestrator>>: UnsafeUnpin,
*const ArcInner<Atomic<u64>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u64>>>: UnsafeUnpin,
*const ArcInner<Atomic<u8>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<u8>>>: UnsafeUnpin,
*const ArcInner<Mutex<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Mutex<bool>>>: UnsafeUnpin,
Align8<i64>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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