pub struct SystemRefConfig {
pub threshold_bytes: usize,
pub mode: SystemRefMode,
pub store_dir: PathBuf,
}Expand description
GH #31: server-side config for how a baked system_prompt too large
to inline is delivered instead — see Engine::fetch_worker_payload’s
threshold branch (crate::core::engine) for where this is consumed.
Single server-side setting, not per-request: every fetch of a given
(task_id, attempt) sees the same mode and threshold_bytes.
Fields§
§threshold_bytes: usizeByte length of the baked system string above which
Engine::fetch_worker_payload{,_trusted} switches from inlining
the value (WorkerPayload.system) to a reference
(WorkerPayload.system_ref). Default (25 * 1024, 25 KiB)
matches bp_doctor’s existing WARN threshold
(AGENT_MD_DEFAULT_WARN_BYTES in
crates/mlua-swarm-cli/src/mcp.rs) — the same SubAgent
context-window headroom rationale that threshold documents
applies here to inline-vs-reference delivery.
mode: SystemRefModeWhich crate::types::SystemRefMode an over-threshold response
uses to deliver its content.
store_dir: PathBufDirectory SystemRefMode::File writes rendered system bodies
into (<store_dir>/<task_id>-<attempt>.md). No eviction policy —
files accumulate for the process lifetime (explicitly out of
scope; see the risk note on Engine::fetch_worker_payload).
Trait Implementations§
Source§impl Clone for SystemRefConfig
impl Clone for SystemRefConfig
Source§fn clone(&self) -> SystemRefConfig
fn clone(&self) -> SystemRefConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemRefConfig
impl Debug for SystemRefConfig
Auto Trait Implementations§
impl Freeze for SystemRefConfig
impl RefUnwindSafe for SystemRefConfig
impl Send for SystemRefConfig
impl Sync for SystemRefConfig
impl Unpin for SystemRefConfig
impl UnsafeUnpin for SystemRefConfig
impl UnwindSafe for SystemRefConfig
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,
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