Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

### Changed

- Internal: one `EngineSettings` and one apply step, #1515 part 3 (round 2 of the architecture deepening, #1523). `uteke_core::EngineSettings` holds `[tier]`, `[recall]`, `[dream]`, `[lifecycle]` and `[embed_fallback]`, and `FallbackSettings` is deserializable like the others; the CLI config and the server config embed it with `#[serde(flatten)]` instead of writing the five sections twice, and `Uteke::apply_settings` replaces the sequence of setters that the CLI and the server each repeated (the CLI no longer applies the fallback in a separate block; the server logs the dream and lifecycle settings on every start, not only when the section exists). MCP does not use it yet (next part). No behaviour change, checked by running the CLI and the server built from `develop` and from this branch on the same config with all five sections, a partial file and an invalid one.
- Internal: `[recall]` is read into one core type, #1515 part 2 (round 2 of the architecture deepening, #1523). `uteke_core::RecallSettings` owns the nine keys, their defaults and the `UTEKE_RECALL_*` / `UTEKE_GRAPH_*` overrides with their range checks (moved from the CLI, tested with an injected lookup); the CLI config uses it as its `[recall]` type and the server drops `RecallFileSection` and its `Option` chains. The server still does not read the `UTEKE_RECALL_*` variables: that is decided in the apply step of part 3. No behaviour change, checked by running the CLI and the server built from `develop` and from this branch with the same `[recall]` section and environment.
- Internal: `[tier]`, `[dream]` and `[lifecycle]` are read straight into the core types, #1515 part 1 (round 2 of the architecture deepening, #1523; the first step of closing #1355). `uteke_core::{TierConfig, DreamConfig, LifecycleConfig}` now implement `serde::Deserialize` (each key optional, the core default for the rest; negative tier days are still rejected), so the CLI config uses them as its section types and the server drops its three `Option` mirror structs and the field-by-field default chains. `[recall]` and `[embed_fallback]` follow in the next parts. No behaviour change.
- Internal, API: transports no longer reach into the store, #1521 (round 2 of the architecture deepening, #1523). `Uteke::store()` and `Uteke::graph_store()` are no longer public (a breaking change for crates that depend on `uteke-core`); `Uteke` offers `count_active`, `list_deprecated` and `graph()` (the knowledge graph) instead, and `store_for_tests()` exists behind the `test-support` feature for fixtures. The private module of the `Uteke` room operations is now `room_ops`, so it no longer shares a name with `memory::rooms`. No behaviour change.
Expand Down
14 changes: 7 additions & 7 deletions crates/uteke-cli/src/commands/recall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ pub(crate) fn run_recall(
// Resolve threshold: --min > --strict (→ config min_score_strict) > config min_score > 0.0
let min_score = match min {
Some(m) => m,
None if strict => config.recall.min_score_strict as f32,
None => config.recall.min_score as f32,
None if strict => config.engine.recall.min_score_strict as f32,
None => config.engine.recall.min_score as f32,
};

tracing::info!(
Expand All @@ -86,7 +86,7 @@ pub(crate) fn run_recall(
// Resolve strategy: --strategy flag > config [recall].default_strategy
// > built-in default ("hybrid"). Unknown values fall back to vector with
// a warning so a typo never silently changes recall semantics.
let strategy_name = strategy.unwrap_or(&config.recall.default_strategy);
let strategy_name = strategy.unwrap_or(&config.engine.recall.default_strategy);
let resolved_strategy = match RecallStrategy::from_str_opt(strategy_name) {
Some(s) => s,
None => {
Expand All @@ -101,13 +101,13 @@ pub(crate) fn run_recall(
// Some(true) = use config weight (0.15), Some(false) / --no-* = 0.0.
uteke.set_salience_recency_config(uteke_core::SalienceRecencyConfig {
salience_weight: match salience {
Some(true) => config.recall.salience_weight, // explicit --salience
Some(false) => 0.0, // explicit --no-salience
Some(true) => config.engine.recall.salience_weight, // explicit --salience
Some(false) => 0.0, // explicit --no-salience
None => uteke_core::SalienceRecencyConfig::default().salience_weight, // default 0.1
},
recency_weight: match recency {
Some(true) => config.recall.recency_weight, // explicit --recency
Some(false) => 0.0, // explicit --no-recency
Some(true) => config.engine.recall.recency_weight, // explicit --recency
Some(false) => 0.0, // explicit --no-recency
None => uteke_core::SalienceRecencyConfig::default().recency_weight, // default 0.1
},
});
Expand Down
2 changes: 1 addition & 1 deletion crates/uteke-cli/src/commands/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ pub(crate) fn run(
let effective_query = query.as_ref().or(query_flag.as_ref());
if let Some(q) = effective_query {
// Semantic recall — rank by relevance
let min_score = min.unwrap_or(config.recall.min_score as f32);
let min_score = min.unwrap_or(config.engine.recall.min_score as f32);
let results = uteke
.recall_room_semantic(room_id, q, *limit, author.as_deref(), min_score)
.map_err(|e| format!("Failed to recall room: {e}"))?;
Expand Down
Loading
Loading