pub struct SystemRef {
pub uri: String,
pub sha256: String,
pub size_bytes: u64,
pub mode: SystemRefMode,
}Expand description
GH #31: a by-reference pointer to a baked system_prompt too large to
inline into WorkerPayload.system — the fetch-time alternative chosen
by Engine::fetch_worker_payload{,_trusted} once the rendered string
exceeds SystemRefConfig.threshold_bytes. Carries enough to let a
SubAgent (or any caller re-emitting this payload) fetch and verify the
referenced content without re-deriving it from engine state.
Fields§
§uri: StringScheme-qualified location of the full system_prompt body.
mode: File carries a file://<path> URI (the exact path
SystemRefMode::File wrote to). mode: Http carries only the
path portion the engine can construct on its own
(/v1/worker/prompt/system?task_id=<id>&attempt=<n>) — see
SystemRefMode::Http’s doc for why the engine cannot fill in
scheme/host itself, and who is responsible for doing so.
sha256: StringLowercase hex-encoded SHA-256 digest of the full referenced
system_prompt string (the same bytes size_bytes measures),
letting a fetcher verify the content it retrieves from uri
matches what was baked at dispatch time.
size_bytes: u64Byte length of the referenced system_prompt content itself (not
of uri, not of any wrapper/envelope around it).
mode: SystemRefModeWhich delivery mechanism uri uses — see SystemRefMode.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SystemRef
impl<'de> Deserialize<'de> for SystemRef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SystemRef
impl JsonSchema for SystemRef
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for SystemRef
Auto Trait Implementations§
impl Freeze for SystemRef
impl RefUnwindSafe for SystemRef
impl Send for SystemRef
impl Sync for SystemRef
impl Unpin for SystemRef
impl UnsafeUnpin for SystemRef
impl UnwindSafe for SystemRef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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