This commit is contained in:
jif-oai
2025-10-16 16:56:54 +01:00
parent c052b89333
commit ac2b3ec2bb
3 changed files with 20 additions and 1 deletions

View File

@@ -106,6 +106,15 @@ impl ProgressReporter for TerminalProgressReporter {
tracing::info!("Agent Message: {agent_msg:?}");
}
fn invalid_solver_signal(&self, raw_message: &str) {
let heading = "Warning".yellow().bold();
let body = format!(
"solver reply did not match expected JSON signal; got: {}",
raw_message
);
println!("{} {} {}", self.timestamp(), heading, body);
}
fn direction_request(&self, prompt: &str) {
let prompt_line = format!("{}", prompt.yellow());
self.print_exchange("solver", "director", vec![prompt_line], true);

View File

@@ -12,6 +12,9 @@ pub trait ProgressReporter: Send + Sync {
fn solver_event(&self, _event: &EventMsg) {}
fn role_event(&self, _role: &str, _event: &EventMsg) {}
fn solver_agent_message(&self, _message: &AgentMessageEvent) {}
/// Called when the solver emits a message that failed to parse as a valid
/// JSON signal according to the expected `solver_signal_schema`.
fn invalid_solver_signal(&self, _raw_message: &str) {}
fn direction_request(&self, _prompt: &str) {}
fn director_response(&self, _directive: &DirectiveResponse) {}
fn verification_request(&self, _claim_path: &str, _notes: Option<&str>) {}

View File

@@ -99,7 +99,14 @@ impl SolverRole {
Some(Self::final_delivery_schema()),
)
.await?;
let _ = session::await_first_idle(self.hub.as_ref(), &handle, Duration::from_secs(5), None)
// Allow more time for the solver to start emitting the
// finalization signal before timing out as "idle".
let _ = session::await_first_idle(
self.hub.as_ref(),
&handle,
Duration::from_secs(120),
None,
)
.await?;
Ok(())
}