nix templates: factor harness-base.nix (shared scaffolding incl. gitconfig)
This commit is contained in:
parent
cb62e15d4f
commit
e1289a3e4c
11 changed files with 137 additions and 113 deletions
|
|
@ -80,7 +80,13 @@ async fn main() -> Result<()> {
|
|||
});
|
||||
match initial {
|
||||
LoginState::Online => {
|
||||
serve(&cli.socket, Duration::from_millis(poll_ms), login_state, bus).await
|
||||
serve(
|
||||
&cli.socket,
|
||||
Duration::from_millis(poll_ms),
|
||||
login_state,
|
||||
bus,
|
||||
)
|
||||
.await
|
||||
}
|
||||
LoginState::NeedsLogin => {
|
||||
// Partial-run mode: keep the harness alive (so the web UI
|
||||
|
|
@ -152,8 +158,7 @@ async fn serve(
|
|||
body: body.clone(),
|
||||
});
|
||||
let prompt = format_wake_prompt(&label, &from, &body);
|
||||
let outcome =
|
||||
drive_turn(&prompt, &mcp_config, &bus, mcp::Flavor::Agent).await;
|
||||
let outcome = drive_turn(&prompt, &mcp_config, &bus, mcp::Flavor::Agent).await;
|
||||
emit_turn_end(&bus, &outcome);
|
||||
}
|
||||
Ok(AgentResponse::Empty) => {}
|
||||
|
|
|
|||
|
|
@ -90,9 +90,7 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
});
|
||||
match initial {
|
||||
LoginState::Online => {
|
||||
serve(&cli.socket, Duration::from_millis(poll_ms), bus).await
|
||||
}
|
||||
LoginState::Online => serve(&cli.socket, Duration::from_millis(poll_ms), bus).await,
|
||||
LoginState::NeedsLogin => {
|
||||
tracing::warn!(
|
||||
claude_dir = %claude_dir.display(),
|
||||
|
|
@ -174,8 +172,7 @@ async fn serve(socket: &Path, interval: Duration, bus: Bus) -> Result<()> {
|
|||
body: body.clone(),
|
||||
});
|
||||
let prompt = format_wake_prompt(&label, &from, &body);
|
||||
let outcome =
|
||||
drive_turn(&prompt, &mcp_config, &bus, mcp::Flavor::Manager).await;
|
||||
let outcome = drive_turn(&prompt, &mcp_config, &bus, mcp::Flavor::Manager).await;
|
||||
emit_turn_end(&bus, &outcome);
|
||||
}
|
||||
Ok(ManagerResponse::Empty) => {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue