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
34 changes: 18 additions & 16 deletions crates/stubs/notebook-query/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ use serde::{Deserialize, Serialize};

#[cfg(feature = "planner")]
use lance_graph_planner::api::{Planner, PlanResult};
// ThinkingStyle from its canonical module, not the api re-export — the re-export was
// added to lance-graph after this pin, so importing from `api` breaks the build against
// the pinned lance-graph; `thinking::style` exists in every version.
// The 12-family orchestration space is `StyleFamily` (canonical type in
// lance_graph_contract::style_family, re-exported here). `ThinkingStyle` is now a
// deprecated alias for it, and the planner-local semantics (`cluster()`,
// `default_modulation()`) live on the `PlannerStyleExt` extension trait, which must be
// in scope for those method calls to resolve.
#[cfg(feature = "planner")]
use lance_graph_planner::thinking::style::ThinkingStyle;
use lance_graph_planner::thinking::style::{PlannerStyleExt, StyleFamily};

// ── Strategy Self-Check ──────────────────────────────────────────────────────

Expand Down Expand Up @@ -241,18 +243,18 @@ fn run_demo_analyses(planner: &Planner) -> Vec<DemoAnalysis> {
];

let all_styles = [
ThinkingStyle::Analytical,
ThinkingStyle::Convergent,
ThinkingStyle::Systematic,
ThinkingStyle::Creative,
ThinkingStyle::Divergent,
ThinkingStyle::Exploratory,
ThinkingStyle::Focused,
ThinkingStyle::Diffuse,
ThinkingStyle::Peripheral,
ThinkingStyle::Intuitive,
ThinkingStyle::Deliberate,
ThinkingStyle::Metacognitive,
StyleFamily::Analytical,
StyleFamily::Convergent,
StyleFamily::Systematic,
StyleFamily::Creative,
StyleFamily::Divergent,
StyleFamily::Exploratory,
StyleFamily::Focused,
StyleFamily::Diffuse,
StyleFamily::Peripheral,
StyleFamily::Intuitive,
StyleFamily::Deliberate,
StyleFamily::Metacognitive,
];

demo_queries.iter().map(|query| {
Expand Down
31 changes: 17 additions & 14 deletions crates/stubs/notebook-query/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ fn run_planner_with_options(
demonstrated_competence: Option<f64>,
) -> Option<PlannerInfo> {
use lance_graph_planner::api::Planner;
use lance_graph_planner::thinking::style::ThinkingStyle; // canonical path; api re-export postdates the pin
// The 12-family orchestration space is `StyleFamily`; `ThinkingStyle` is now a
// deprecated alias for it. This block only constructs variants, so the extension
// trait `PlannerStyleExt` is not needed here.
use lance_graph_planner::thinking::style::StyleFamily;

let planner = Planner::new();

Expand All @@ -374,19 +377,19 @@ fn run_planner_with_options(
} else if let Some(style_name) = style_override {
// Style override — parse the style name
let style = match style_name.to_lowercase().as_str() {
"analytical" => ThinkingStyle::Analytical,
"convergent" => ThinkingStyle::Convergent,
"systematic" => ThinkingStyle::Systematic,
"creative" => ThinkingStyle::Creative,
"divergent" => ThinkingStyle::Divergent,
"exploratory" => ThinkingStyle::Exploratory,
"focused" => ThinkingStyle::Focused,
"diffuse" => ThinkingStyle::Diffuse,
"peripheral" => ThinkingStyle::Peripheral,
"intuitive" => ThinkingStyle::Intuitive,
"deliberate" => ThinkingStyle::Deliberate,
"metacognitive" => ThinkingStyle::Metacognitive,
_ => ThinkingStyle::Analytical, // default fallback
"analytical" => StyleFamily::Analytical,
"convergent" => StyleFamily::Convergent,
"systematic" => StyleFamily::Systematic,
"creative" => StyleFamily::Creative,
"divergent" => StyleFamily::Divergent,
"exploratory" => StyleFamily::Exploratory,
"focused" => StyleFamily::Focused,
"diffuse" => StyleFamily::Diffuse,
"peripheral" => StyleFamily::Peripheral,
"intuitive" => StyleFamily::Intuitive,
"deliberate" => StyleFamily::Deliberate,
"metacognitive" => StyleFamily::Metacognitive,
_ => StyleFamily::Analytical, // default fallback
};
planner.plan_with_style(source, style)
} else {
Expand Down