Skip to content

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

refactor(flows): simplify workflow retrieval logic

Steven Enamakel0f3c66c6f813
diff --git a/crates/openhuman-core/src/flows/authoring_host.rs b/crates/openhuman-core/src/flows/authoring_host.rs
index 33089c4208..048de8b5c9 100644
--- a/crates/openhuman-core/src/flows/authoring_host.rs
+++ b/crates/openhuman-core/src/flows/authoring_host.rs
@@ -226,8 +226,7 @@ impl DraftPromotionCallbacks {
.await?
}
};
- let workflow: catalog::Workflow = crate::flows::store::roundtrip(outcome.value)
- .map_err(|error| error.to_string())?;
+ let workflow: catalog::Workflow = outcome.value;
Ok(SavePromotedDraftResponse::Ok(
catalog::SavePromotedDraftResult {
workflow,
diff --git a/crates/openhuman-core/src/flows/ops/run_management.rs b/crates/openhuman-core/src/flows/ops/run_management.rs
index 9424de4db1..5b25afca92 100644
--- a/crates/openhuman-core/src/flows/ops/run_management.rs
+++ b/crates/openhuman-core/src/flows/ops/run_management.rs
@@ -128,10 +128,7 @@ async fn get_run_with_storage(
storage,
id: run_id.to_owned(),
};
- let run: Option<WireFlowRun> = catalog_call(config, wire::members::GET_RUN, request).await?;
- run.map(crate::flows::store::roundtrip)
- .transpose()
- .map_err(|error| error.to_string())
+ catalog_call(config, wire::members::GET_RUN, request).await
}
async fn catalog_call<T, A>(config: &Config, member: &'static str, args: A) -> Result<T, String>