pub struct TranscriptsConfig {
pub default_ttl_secs: Option<i64>,
pub archive_grace_secs: Option<i64>,
pub namespaces: Option<HashMap<String, TranscriptNamespaceConfig>>,
pub max_decompressed_bytes: Option<usize>,
}Expand description
[transcripts] block in config.toml — per-namespace TTL and
archive grace overrides for the I3 lifecycle sweeper.
[transcripts]
default_ttl_secs = 2592000 # 30 days; archive after this when memories all expired
archive_grace_secs = 604800 # 7 days; prune this long after archive
[transcripts.namespaces."team/audit"]
default_ttl_secs = 31536000 # 1 year — compliance retention override
[transcripts.namespaces."ephemeral/*"]
default_ttl_secs = 86400 # 1 day — short-lived scratchpadResolution: the sweeper picks the longest-prefix matching namespace
override (with literal "*" patterns last), falls back to the
global default_ttl_secs / archive_grace_secs on this struct,
and finally to the compiled defaults above.
Fields§
§default_ttl_secs: Option<i64>Global default seconds-since-creation before the sweeper
considers a transcript archive-eligible. None → compiled
default (DEFAULT_TRANSCRIPT_TTL_SECS = 30 days).
archive_grace_secs: Option<i64>Global default seconds an archived transcript lingers before
the prune phase deletes it. None → compiled default
(DEFAULT_TRANSCRIPT_ARCHIVE_GRACE_SECS = 7 days).
namespaces: Option<HashMap<String, TranscriptNamespaceConfig>>Per-namespace overrides keyed by namespace pattern. Patterns
are matched literally first; a trailing /* selects every
child namespace under the prefix; the bare "*" is the
catch-all and is consulted last.
max_decompressed_bytes: Option<usize>v0.7.0 I1 cap (#628 agent-3 follow-up): the maximum number of
bytes a single transcript may decompress to before
transcripts::fetch rejects it as a decompression bomb. None
→ compiled default (crate::transcripts::MAX_DECOMPRESSED_BYTES
= 16 MiB). Operators with legitimately larger transcripts
raise the cap explicitly; the cap is per-call, so concurrent
fetches consume up to N × this value of transient memory.
Implementations§
Source§impl TranscriptsConfig
impl TranscriptsConfig
Sourcepub fn resolve(&self, namespace: &str) -> ResolvedTranscriptLifecycle
pub fn resolve(&self, namespace: &str) -> ResolvedTranscriptLifecycle
Resolve the lifecycle parameters for namespace.
Precedence:
- Exact match in
namespaces(e.g."team/audit"). - Longest matching prefix pattern ending in
/*(e.g."team/*"matches"team/eng"and"team/eng/inner"). - Bare
"*"wildcard. - The struct-level
default_ttl_secs/archive_grace_secs. - The compiled defaults
(
DEFAULT_TRANSCRIPT_TTL_SECS/DEFAULT_TRANSCRIPT_ARCHIVE_GRACE_SECS).
Each field is resolved independently — a per-namespace override
that only sets default_ttl_secs inherits the global
archive_grace_secs. Non-positive values fall through to the
next layer; positive values are clamped to
MAX_TRANSCRIPT_LIFECYCLE_SECS so the resolved Duration
addition can never overflow chrono.
Sourcepub fn auto_extract_for(&self, namespace: &str) -> bool
pub fn auto_extract_for(&self, namespace: &str) -> bool
v0.7 I5 — resolve the auto_extract opt-in for namespace.
Same precedence walk as Self::resolve but folds the
boolean field of TranscriptNamespaceConfig::auto_extract:
- Exact match.
- Longest-prefix
prefix/*match. - Bare wildcard
"*". false(default off — matches the “every reference hook ships off-by-default” lesson from G10/G11).
The R5 reference extractor (tools/transcript-extractor/)
reads this flag at the namespace gate before doing any LLM
work, so a namespace that hasn’t opted in pays the cost of
one HashMap lookup per pre_store fire and nothing more.
Trait Implementations§
Source§impl Clone for TranscriptsConfig
impl Clone for TranscriptsConfig
Source§fn clone(&self) -> TranscriptsConfig
fn clone(&self) -> TranscriptsConfig
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 TranscriptsConfig
impl Debug for TranscriptsConfig
Source§impl Default for TranscriptsConfig
impl Default for TranscriptsConfig
Source§fn default() -> TranscriptsConfig
fn default() -> TranscriptsConfig
Source§impl<'de> Deserialize<'de> for TranscriptsConfig
impl<'de> Deserialize<'de> for TranscriptsConfig
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>,
Auto Trait Implementations§
impl Freeze for TranscriptsConfig
impl RefUnwindSafe for TranscriptsConfig
impl Send for TranscriptsConfig
impl Sync for TranscriptsConfig
impl Unpin for TranscriptsConfig
impl UnsafeUnpin for TranscriptsConfig
impl UnwindSafe for TranscriptsConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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