pub struct ToolArtifactStore { /* private fields */ }Expand description
Host-owned Artifact service used by the Tool Runtime for large results.
The byte ceiling is independent from max_output_bytes: the latter is the
maximum inline context payload, while this is the hard storage ceiling.
Implementations§
Source§impl ToolArtifactStore
impl ToolArtifactStore
pub fn new( store: Arc<dyn BlobStore>, max_artifact_bytes: u64, summary_max_chars: usize, ) -> Result<Self, ToolArtifactError>
Sourcepub fn with_inline_output_limit(self, max_bytes: NonZeroU64) -> Self
pub fn with_inline_output_limit(self, max_bytes: NonZeroU64) -> Self
Spill validated results above this model-inline ceiling without reducing executor collection limits or the durable Artifact storage ceiling.
Sourcepub fn inline_output_limit(&self) -> Option<u64>
pub fn inline_output_limit(&self) -> Option<u64>
Maximum serialized inline result size, when configured by the Host.
Sourcepub fn with_hooks(self, hooks: Arc<HookRegistry>) -> Self
pub fn with_hooks(self, hooks: Arc<HookRegistry>) -> Self
Attaches the Host runtime hook registry to artifact lifecycle events.
The registry’s failure policy controls whether a hook rejection is
observational (FailOpen) or aborts the artifact operation
(FailClosed).
pub fn max_artifact_bytes(&self) -> u64
Sourcepub async fn resolve(
&self,
artifact: &ToolArtifact,
) -> Result<Vec<u8>, ToolArtifactError>
pub async fn resolve( &self, artifact: &ToolArtifact, ) -> Result<Vec<u8>, ToolArtifactError>
Resolves and verifies an immutable Artifact reference. A store cannot make corrupt or substituted bytes valid merely by returning metadata.
Trait Implementations§
Source§impl Clone for ToolArtifactStore
impl Clone for ToolArtifactStore
Source§fn clone(&self) -> ToolArtifactStore
fn clone(&self) -> ToolArtifactStore
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ToolArtifactStore
impl !UnwindSafe for ToolArtifactStore
impl Freeze for ToolArtifactStore
impl Send for ToolArtifactStore
impl Sync for ToolArtifactStore
impl Unpin for ToolArtifactStore
impl UnsafeUnpin for ToolArtifactStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.