Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(observability): add README and restructure observability module

Steven Enamakel12e9517e0462
diff --git a/crates/openhuman-core/src/flows/tinyflows/README.md b/crates/openhuman-core/src/flows/tinyflows/README.md
index 4f14c22f4d..2ed5548061 100644
--- a/crates/openhuman-core/src/flows/tinyflows/README.md
+++ b/crates/openhuman-core/src/flows/tinyflows/README.md
@@ -66,7 +66,7 @@ security model); this README covers only the host seam.
`"flow"`, and `scope: "flow"` shares the `flow_namespace` the
`flow_memory_*` agent tools use.
- `observability.rs`: `tinyflows::observability::RunObserver` impls:
- `TracingRunObserver` (log-only) and `FlowRunObserver`, which persists live
+ `FlowRunObserver`, which persists live
steps via `flows::upsert_flow_run_step` and publishes
`DomainEvent::FlowRunProgress` twice per non-trigger node so the frontend
can render a run live.
diff --git a/crates/openhuman-core/src/flows/tinyflows/observability.rs b/crates/openhuman-core/src/flows/tinyflows/observability.rs
index a82fbf6199..4c8c92221d 100644
--- a/crates/openhuman-core/src/flows/tinyflows/observability.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/observability.rs
@@ -2,11 +2,9 @@
//! domain.
//!
//! `tinyflows` emits structured run/step records; the host decides what to do
-//! with them. Two observers live here:
+//! with them. The observer that lives here:
//!
-//! - [`TracingRunObserver`] — log-only, for `run_with_observer` call sites and
-//! as a simple example.
-//! - [`FlowRunObserver`] — the real one used by the durable run path (issue
+//! - [`FlowRunObserver`] — used by the durable run path (issue
//! G2, live run observation). It publishes a [`DomainEvent::FlowRunProgress`]
//! twice per non-trigger node — `running` when the node activates, then its
//! terminal `success`/`error` when it finishes — so the frontend socket
@@ -36,39 +34,6 @@ use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
use crate::flows::{upsert_flow_run_step, FlowRunStep};
-/// Logs run/step lifecycle events with grep-friendly `[flows]` prefixes.
-pub struct TracingRunObserver {
- pub run_label: String,
-}
-
-impl RunObserver for TracingRunObserver {
- fn on_run_start(&self, run_id: &str) {
- tracing::info!(target: "flows", run_label = %self.run_label, %run_id, "[flows] run start");
- }
-
- fn on_step_finish(&self, step: &ExecutionStep) {
- tracing::debug!(
- target: "flows",
- run_label = %self.run_label,
- node = %step.node_id,
- status = ?step.status,
- duration_ms = step.duration_ms,
- "[flows] step finished"
- );
- }
-
- fn on_run_finish(&self, run: &Run) {
- tracing::info!(
- target: "flows",
- run_label = %self.run_label,
- id = %run.id,
- status = ?run.status,
- steps = run.steps.len(),
- "[flows] run finish"
- );
- }
-}
-
/// Maps a live [`StepStatus`] to the stable `"success"`/`"error"` string
/// persisted on [`FlowRunStep::status`] and published on
/// [`DomainEvent::FlowRunProgress`]. `StepStatus` does not derive `PartialEq`,
diff --git a/crates/openhuman-core/src/flows/tinyflows/observability_tests.rs b/crates/openhuman-core/src/flows/tinyflows/observability_tests.rs
index 46f414ce20..30f8f2658a 100644
--- a/crates/openhuman-core/src/flows/tinyflows/observability_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/observability_tests.rs
@@ -2,27 +2,6 @@ use super::*;
use serde_json::Value;
use tinyflows::observability::RunStatus;
-#[test]
-fn callbacks_do_not_panic() {
- let observer = TracingRunObserver {
- run_label: "test".to_string(),
- };
- observer.on_run_start("run-1");
- observer.on_step_finish(&ExecutionStep {
- node_id: "n".to_string(),
- status: StepStatus::Success,
- output: Value::Null,
- duration_ms: 5,
- diagnostics: Vec::new(),
- transcript: Vec::new(),
- });
- observer.on_run_finish(&Run {
- id: "run-1".to_string(),
- status: RunStatus::Completed,
- steps: Vec::new(),
- });
-}
-
#[test]
fn step_status_maps_to_stable_strings() {
assert_eq!(step_status_str(&StepStatus::Success), "success");