pub struct StoreCommandHost { /* private fields */ }Expand description
Store-backed CommandHost shared by embedded and durable hosts.
One instance is built per command dispatch. Its assembled context is
memoized so turn_context() and completion share one store resolution.
Implementations§
Source§impl StoreCommandHost
impl StoreCommandHost
Sourcepub fn new(
session_id: SessionId,
harness_store: Arc<dyn HarnessStore>,
agent_store: Arc<dyn AgentStore>,
session_store: Arc<dyn SessionStore>,
message_retriever: Arc<dyn MessageRetriever>,
provider_store: Arc<dyn ProviderStore>,
capability_registry: CapabilityRegistry,
driver_registry: DriverRegistry,
) -> Self
pub fn new( session_id: SessionId, harness_store: Arc<dyn HarnessStore>, agent_store: Arc<dyn AgentStore>, session_store: Arc<dyn SessionStore>, message_retriever: Arc<dyn MessageRetriever>, provider_store: Arc<dyn ProviderStore>, capability_registry: CapabilityRegistry, driver_registry: DriverRegistry, ) -> Self
Construct a command host from org-scoped runtime stores and registries.
Sourcepub fn with_image_resolver(self, image_resolver: Arc<dyn ImageResolver>) -> Self
pub fn with_image_resolver(self, image_resolver: Arc<dyn ImageResolver>) -> Self
Resolve image_file references for provider conversion.
pub fn with_file_resolver(self, file_resolver: Arc<dyn FileResolver>) -> Self
Sourcepub fn with_file_store(self, file_store: Arc<dyn SessionFileSystem>) -> Self
pub fn with_file_store(self, file_store: Arc<dyn SessionFileSystem>) -> Self
Supply the session filesystem used by dynamic prompt capabilities.
Sourcepub fn with_assembled_context(self, assembled: AssembledTurnContext) -> Self
pub fn with_assembled_context(self, assembled: AssembledTurnContext) -> Self
Seed a context already assembled by the dispatching host.
Trait Implementations§
Source§impl CommandHost for StoreCommandHost
impl CommandHost for StoreCommandHost
Source§fn turn_context<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandTurnContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn turn_context<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandTurnContext>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Assemble the credential-free context a main turn would see.
Source§fn completion<'life0, 'async_trait>(
&'life0 self,
request: SessionCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<SessionCompletion, SessionCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn completion<'life0, 'async_trait>(
&'life0 self,
request: SessionCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<SessionCompletion, SessionCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run a tool-less completion against the resolved session model.
Source§fn completion_stream<'life0, 'async_trait>(
&'life0 self,
request: SessionCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<SessionCompletionStream, SessionCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn completion_stream<'life0, 'async_trait>(
&'life0 self,
request: SessionCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<SessionCompletionStream, SessionCompletionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream a tool-less completion. The default advertises an unsupported
capability so commands can fall back to
Self::completion.Auto Trait Implementations§
impl !Freeze for StoreCommandHost
impl !RefUnwindSafe for StoreCommandHost
impl !UnwindSafe for StoreCommandHost
impl Send for StoreCommandHost
impl Sync for StoreCommandHost
impl Unpin for StoreCommandHost
impl UnsafeUnpin for StoreCommandHost
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