The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(skills): update run log pathing and logging logic
Steven Enamakel62a3002823dc
diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex 76f082291d..1e0a0f51e5 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -246,8 +246,8 @@ async fn await_run_outcome_returns_terminal_footer_then_auto_detaches() {// A finished run: header + DONE footer → await returns the outcome.let done = run_log::run_log_path(ws.path(), "triage-inbox", "run-done-1234");- std::fs::create_dir_all(done.parent().unwrap()).unwrap();run_log::write_header(+ ws.path(),&done,"triage-inbox","run-done-1234",@@ -256,10 +256,10 @@ async fn await_run_outcome_returns_terminal_footer_then_auto_detaches() {).await.unwrap();- run_log::write_footer(&done, "DONE", 1234, "inbox triaged: 12 archived")+ run_log::write_footer(ws.path(), &done, "DONE", 1234, "inbox triaged: 12 archived").await.unwrap();- let outcome = await_run_outcome(&done, Duration::from_secs(2))+ let outcome = await_run_outcome(ws.path(), &done, Duration::from_secs(2)).await.expect("terminal footer must be returned");assert_eq!(outcome.status, "DONE");@@ -269,6 +269,7 @@ async fn await_run_outcome_returns_terminal_footer_then_auto_detaches() {// auto-detach with None (what run_workflow turns into a run_id handle).let running = run_log::run_log_path(ws.path(), "triage-inbox", "run-live-5678");run_log::write_header(+ ws.path(),&running,"triage-inbox","run-live-5678",@@ -277,7 +278,7 @@ async fn await_run_outcome_returns_terminal_footer_then_auto_detaches() {).await.unwrap();- let detached = await_run_outcome(&running, Duration::from_millis(300)).await;+ let detached = await_run_outcome(ws.path(), &running, Duration::from_millis(300)).await;assert!(detached.is_none(),"a run with no terminal footer must auto-detach (None) past the wait budget"diff --git a/crates/openhuman-core/src/skills/run_log.rs b/crates/openhuman-core/src/skills/run_log.rsindex 1128dbe575..7f28fb818f 100644--- a/crates/openhuman-core/src/skills/run_log.rs+++ b/crates/openhuman-core/src/skills/run_log.rs@@ -1,13 +1,13 @@//! Per-run streaming logs for `skills_run`.//!-//! Each run writes a human-readable trace to-//! `<workspace>/skills/.runs/<skill>_<UTC-ts>_<run>.log`: a header (skill,-//! inputs, task prompt), one line per agent step (tool calls + results,-//! sub-agent lifecycle, iteration boundaries) streamed live off the agent's-//! [`AgentProgress`] channel, then a footer (status, duration, final output).+//! Each run writes a human-readable trace to a host-owned storage stream: a+//! header (skill, inputs, task prompt), one line per agent step (tool calls ++//! results, sub-agent lifecycle, iteration boundaries) streamed live off the+//! agent's [`AgentProgress`] channel, then a footer (status, duration, final+//! output). The historical `log_path` field carries an opaque stream id.//!-//! `.runs` is a sibling of the runtime skill *definitions* (`<workspace>/-//! skills/<id>/`) so run logs never collide with a skill-id directory.+//! The `skills.runs.` stream prefix keeps run logs separate from skill+//! definitions and other host streams.use std::collections::HashMap;use std::io;use std::path::{Path, PathBuf};diff --git a/crates/openhuman-core/src/skills/run_log_tests.rs b/crates/openhuman-core/src/skills/run_log_tests.rsindex 84b1e68686..f14a316671 100644--- a/crates/openhuman-core/src/skills/run_log_tests.rs+++ b/crates/openhuman-core/src/skills/run_log_tests.rs@@ -81,7 +81,7 @@ async fn host_written_log_parses_like_legacy_layout() {// must parse identically to logs written before the move.let tmp = tempfile::TempDir::new().unwrap();let path = run_log_path(tmp.path(), "triage-inbox", "run-abcdef123456");- assert!(path.starts_with(runs_dir(tmp.path())));+ assert!(path.to_string_lossy().starts_with("skills.runs."));write_header(tmp.path(),&path,@@ -100,5 +100,5 @@ async fn host_written_log_parses_like_legacy_layout() {assert_eq!(runs[0].duration_ms, Some(42));assert_eq!(read_terminal_outcome(tmp.path(), &path).unwrap().status, "DONE");- // A pre-existing log in the legacy format still parses.+ // The stream retains the same parsed run metadata as the old log format.}