pub struct RecoverOpts {
pub host: HostKind,
pub transcript_override: Option<PathBuf>,
pub since_iso: Option<String>,
pub namespace: Option<String>,
pub limit: usize,
pub dry_run: bool,
pub quiet: bool,
pub agent_id: String,
}Expand description
Per-call recovery options. Both surfaces (CLI + MCP) build one
of these from their respective Args / Request shapes and pass
it into recover_from_transcript.
Fields§
§host: HostKindWhich host’s transcript format + path-resolver arm to use.
transcript_override: Option<PathBuf>Explicit transcript path; when None, the resolver walks
the per-host candidate set and picks the most-recent.
since_iso: Option<String>Filter to lines whose timestamp is at or after this RFC3339
instant. When None, recovery starts from the
most-recent-memory_store watermark for this agent_id.
namespace: Option<String>Namespace to land recovered memories in. When None,
defaults to the agent’s resolved default namespace per
AppConfig.
limit: usizeMaximum number of transcript lines to atomise this run.
Excess lines are skipped + counted under
lines_skipped_limit. Defaults to DEFAULT_RECOVER_LIMIT.
dry_run: boolWhen true, parse the transcript and emit the report but
write nothing to the DB. Used by --dry-run for operator
inspection.
quiet: boolWhen true, drop every memory_id from memories_created
except the first QUIET_MEMORY_ID_PREVIEW_CAP; bounds the
JSON payload for SessionStart-hook log capture.
agent_id: Stringagent_id to attribute recovered memories to. Resolved from the calling surface (CLI flag / MCP CallerContext / config).
Implementations§
Source§impl RecoverOpts
impl RecoverOpts
Sourcepub fn for_session_start_hook(host: HostKind, agent_id: String) -> Self
pub fn for_session_start_hook(host: HostKind, agent_id: String) -> Self
Sensible defaults for SessionStart-hook integration.
Callers override agent_id (required) and any other field
that diverges from the hook-friendly defaults.
Trait Implementations§
Source§impl Clone for RecoverOpts
impl Clone for RecoverOpts
Source§fn clone(&self) -> RecoverOpts
fn clone(&self) -> RecoverOpts
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 Freeze for RecoverOpts
impl RefUnwindSafe for RecoverOpts
impl Send for RecoverOpts
impl Sync for RecoverOpts
impl Unpin for RecoverOpts
impl UnsafeUnpin for RecoverOpts
impl UnwindSafe for RecoverOpts
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> 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