Skip to content

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

refactor(flows): update tinyflows crate paths

Steven Enamakel8e4a215b8593
diff --git a/crates/openhuman-core/src/flows/ops/run_management.rs b/crates/openhuman-core/src/flows/ops/run_management.rs
index c8c10cf1f2..7472a8de4f 100644
--- a/crates/openhuman-core/src/flows/ops/run_management.rs
+++ b/crates/openhuman-core/src/flows/ops/run_management.rs
@@ -157,14 +157,14 @@ pub async fn flows_list_all_runs(
}
/// Manually prunes a flow's run history down to the retention cap
-/// ([`tinyflows_sqlite::flows::MAX_FLOW_RUNS_PER_FLOW`]), deleting only terminal runs outside the
+/// ([`tinyflows_drivers::catalog::MAX_FLOW_RUNS_PER_FLOW`]), deleting only terminal runs outside the
/// newest-N window. Never removes a `running` or `pending_approval` run — a
/// parked run must survive for a later `flows_resume`. Pruning also happens
/// automatically on every new-run insert; this RPC exposes it for an explicit
/// on-demand sweep (e.g. a maintenance action). Returns the number of runs
/// pruned.
pub async fn flows_prune_runs(config: &Config, flow_id: &str) -> Result<Outcome<Value>, String> {
- let keep = tinyflows_sqlite::flows::MAX_FLOW_RUNS_PER_FLOW;
+ let keep = tinyflows_drivers::catalog::MAX_FLOW_RUNS_PER_FLOW;
let pruned = store::prune_flow_runs(config, flow_id, keep).map_err(|e| e.to_string())?;
tracing::info!(target: "flows", flow_id, pruned, keep, "[flows] flows_prune_runs: manual retention sweep");
Ok(Outcome::single_log(
diff --git a/crates/openhuman-core/src/flows/ops/updates.rs b/crates/openhuman-core/src/flows/ops/updates.rs
index 2cedc5ac21..dbc3be6a57 100644
--- a/crates/openhuman-core/src/flows/ops/updates.rs
+++ b/crates/openhuman-core/src/flows/ops/updates.rs
@@ -1,13 +1,13 @@
use super::*;
-/// Maps a store-level [`FlowUpdateError`](tinyflows_sqlite::flows::FlowUpdateError) to the RPC
+/// Maps a store-level [`FlowUpdateError`](tinyflows_catalog::store::FlowUpdateError) to the RPC
/// error string. A concurrency conflict is encoded as a JSON object the UI can
/// parse (`{ code: "version_conflict", message, current }`) so it can offer a
/// reload/diff instead of silently clobbering; other variants are plain text.
-fn map_flow_update_error(e: tinyflows_sqlite::flows::FlowUpdateError) -> String {
+fn map_flow_update_error(e: tinyflows_catalog::store::FlowUpdateError) -> String {
match e {
- tinyflows_sqlite::flows::FlowUpdateError::NotFound => "flow not found".to_string(),
- tinyflows_sqlite::flows::FlowUpdateError::Conflict(current) => {
+ tinyflows_catalog::store::FlowUpdateError::NotFound => "flow not found".to_string(),
+ tinyflows_catalog::store::FlowUpdateError::Conflict(current) => {
serde_json::to_string(&json!({
"code": "version_conflict",
"message": "This flow changed since you loaded it. Reload to see the latest \
@@ -16,7 +16,7 @@ fn map_flow_update_error(e: tinyflows_sqlite::flows::FlowUpdateError) -> String
}))
.unwrap_or_else(|_| "version_conflict".to_string())
}
- tinyflows_sqlite::flows::FlowUpdateError::Store(err) => err.to_string(),
+ tinyflows_catalog::store::FlowUpdateError::Store(err) => err.to_string(),
}
}
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
index f9e8d6856f..e1bbe80d2b 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
@@ -12,7 +12,6 @@
use std::sync::Arc;
-use anyhow::Context;
use async_trait::async_trait;
use serde_json::{json, Value};
use tinyflows::caps::*;