pub struct MemoryConfig {
pub provider: MemoryProviderKind,
pub window: usize,
pub context_tokens: Option<u32>,
pub soul_file: Option<String>,
pub note_nudge_interval: usize,
pub extract_notes_on_close: bool,
pub disclosure: MemoryDisclosure,
}Expand description
Memory management stored under [memory] in newt.toml.
Fields§
§provider: MemoryProviderKindWhich memory provider to activate.
window: usizeTurns retained by RollingWindow. Default: 20.
context_tokens: Option<u32>Explicit context-token budget for TokenBudget / Summarizing — a
deliberate user override that wins over everything else (Step 18.2,
#247). When unset, the budget derives from the empirical capability
cache (max_ok_input else safe_context in
model-capabilities.json); the static default
(DEFAULT_CONTEXT_TOKENS, 8,192) applies only when neither exists.
soul_file: Option<String>Explicit path to a soul file (overrides workspace + global resolution).
Default: auto-resolve from .newt/soul.md → ~/.newt/soul.md.
note_nudge_interval: usizeUser turns without an organic save_note call before the in-band
memory nudge is appended to the next user message (Step 19.3, #248).
0 disables the nudge. Default: 10.
extract_notes_on_close: boolEnd-of-conversation note extraction (Step 19.4, #248): when true,
closing a conversation (/new or a clean exit) runs ONE synchronous
tools-disabled completion that distills at most 3 durable facts into
NOTES.md through the scanned save_note write path. Default: false
— the pass is optional and costs one completion per close.
disclosure: MemoryDisclosureHow memory is disclosed to the model (progressive-disclosure memory,
Workstream A MVP, #319). Frozen (the default) is today’s behavior
exactly: NOTES are frozen verbatim into the system prompt and the
memory_fetch tool is not wired. Index opts in to the budgeted
memory INDEX (note titles/ids instead of full bodies) plus the
memory_fetch tool that pulls a body on demand. This is a context-cost
facet, never an authorization knob.
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
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 MemoryConfig
impl Debug for MemoryConfig
Source§impl Default for MemoryConfig
impl Default for MemoryConfig
Source§impl<'de> Deserialize<'de> for MemoryConfigwhere
MemoryConfig: Default,
impl<'de> Deserialize<'de> for MemoryConfigwhere
MemoryConfig: Default,
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>,
impl Eq for MemoryConfig
Source§impl PartialEq for MemoryConfig
impl PartialEq for MemoryConfig
Source§fn eq(&self, other: &MemoryConfig) -> bool
fn eq(&self, other: &MemoryConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for MemoryConfig
impl Serialize for MemoryConfig
impl StructuralPartialEq for MemoryConfig
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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