pub struct AgentConfig {
pub db_path: PathBuf,
pub sessions_dir: PathBuf,
pub hints_dir: PathBuf,
pub acceptance_window_minutes: i64,
pub score_recompute_interval_secs: u64,
pub top_k: usize,
pub classifier: Option<Arc<dyn TaskClassifier>>,
}Expand description
Runtime config for the agent loop.
Fields§
§db_path: PathBufSQLite path. Default: default_db_path() (caller-provided).
sessions_dir: PathBufRoot containing <dir>/<session>.jsonl files. Default: ~/.claude/projects.
hints_dir: PathBufWhere to write <session>.md hint files. Default: ~/.claude/hints.
acceptance_window_minutes: i64How long after a suggestion a matching tool_use still counts as
“accepted”. Default: 60 minutes.
score_recompute_interval_secs: u64How often the engine recomputes tool_scores (seconds).
top_k: usizeNumber of recommendations to write into the hint file.
classifier: Option<Arc<dyn TaskClassifier>>Optional task classifier. None ⇒ raw user text is sent to the
recommender verbatim (default). When set, every UserText event is
piped through the classifier first; non-task messages are dropped and
real tasks are rewritten into a focused query before embedding.
Implementations§
Source§impl AgentConfig
impl AgentConfig
pub fn new(db_path: PathBuf, sessions_dir: PathBuf, hints_dir: PathBuf) -> Self
pub fn with_classifier(self, classifier: Arc<dyn TaskClassifier>) -> Self
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentConfig
impl !RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl !UnwindSafe for AgentConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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