runner.rs: Plan in Reihenfolge Modell/Aufgabe/Wiederholung, Aufwärmen je Modell, frische Sandbox pro Lauf, check.sh im selben Container, Abbruch und Fortsetzen über die Datenbank. store.rs: Schema nach SPEC 8, Lauf und Schritte in einer Transaktion. Agent-Loop bekommt Abbruchflag. Ende-zu-Ende gegen srv04 mit qwen3:0.6b grün; Fortsetzen überspringt fertige Läufe. 38 Unit-Tests grün. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
46 lines
1.3 KiB
Rust
46 lines
1.3 KiB
Rust
mod agent;
|
|
mod config;
|
|
mod runner;
|
|
mod store;
|
|
mod sandbox;
|
|
mod tasks;
|
|
|
|
use config::Paths;
|
|
use tauri::{Manager, State};
|
|
|
|
/// Aufgelöste Pfade, einmal beim Start ermittelt.
|
|
pub struct AppPaths(pub Paths);
|
|
|
|
#[tauri::command]
|
|
fn get_paths(paths: State<'_, AppPaths>) -> Paths {
|
|
paths.0.clone()
|
|
}
|
|
|
|
#[tauri::command]
|
|
fn load_tasks(paths: State<'_, AppPaths>) -> tasks::LoadReport {
|
|
tasks::load_all(&paths.0.tasks_dir)
|
|
}
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_opener::init())
|
|
.setup(|app| {
|
|
let config_dir = app
|
|
.path()
|
|
.app_config_dir()
|
|
.map_err(|e| format!("Konfigurationsordner nicht ermittelbar: {e}"))?;
|
|
let default_data_dir = app
|
|
.path()
|
|
.app_data_dir()
|
|
.map_err(|e| format!("Datenordner nicht ermittelbar: {e}"))?;
|
|
let (paths, cfg) = config::load_or_create(&config_dir, &default_data_dir)?;
|
|
app.manage(AppPaths(paths));
|
|
app.manage(cfg);
|
|
Ok(())
|
|
})
|
|
.invoke_handler(tauri::generate_handler![get_paths, load_tasks])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|