Skip to content

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

chore: files changed crates/openhuman-core/src/channels/runtime/startup/start_channels.rs,crates/ope

Steven Enamakel22017ce31dbb
diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
index bdb2b69ac2..1ed442b39b 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
@@ -125,7 +125,7 @@ async fn start_channels_inner(mut config: Config, session: CancellationToken) ->
// Model, tools and the identity-refreshing system prompt (`turn_parts`),
// shared with the hosted-channel relay.
#[cfg(all(feature = "flows", feature = "skills"))]
- crate::skills::bundled::flow_authoring::prewarm(&dispatch, &config, None).await;
+ crate::skills::bundled::flow_authoring::schedule_prewarm(&dispatch, &config, None);
let parts = build_channel_turn_parts(&dispatch, &config, &security, PromptToolDescs::Fixed)?;
let model = parts.model.clone();
let workspace = config.workspace_dir.clone();
diff --git a/crates/openhuman-core/src/core/runtime/bootstrap.rs b/crates/openhuman-core/src/core/runtime/bootstrap.rs
index 233b97dfd2..101fd48428 100644
--- a/crates/openhuman-core/src/core/runtime/bootstrap.rs
+++ b/crates/openhuman-core/src/core/runtime/bootstrap.rs
@@ -34,11 +34,11 @@ pub(crate) async fn bootstrap_core_runtime(
};
let workspace_dir = cfg.workspace_dir.clone();
- // The workflow metadata loader is synchronous. Resolve the module-owned
- // flow-authoring files before any subscriber or session can snapshot it;
- // this optional prewarm is bounded and fails open for ordinary chat.
+ // The workflow metadata loader is synchronous. Start module-owned resource
+ // acquisition before any subscriber or session snapshots it, but keep the
+ // optional download outside the critical bootstrap path.
#[cfg(all(feature = "flows", feature = "skills"))]
- crate::skills::bundled::flow_authoring::prewarm(ctx, &cfg, Some(domains)).await;
+ crate::skills::bundled::flow_authoring::schedule_prewarm(ctx, &cfg, Some(domains));
// --- Legacy store import ---------------------------------------------
// With a storage backend installed, bring the workspace's per-domain
diff --git a/crates/openhuman-core/src/skills/ops_discover/api.rs b/crates/openhuman-core/src/skills/ops_discover/api.rs
index 3ce48bf399..1438925966 100644
--- a/crates/openhuman-core/src/skills/ops_discover/api.rs
+++ b/crates/openhuman-core/src/skills/ops_discover/api.rs
@@ -218,10 +218,17 @@ pub(crate) fn load_workflow_metadata_for_domains(
Some(_) => None,
None => discovery_home_dir(),
};
+ let gate = DiscoveryGate::from_config(ctx, config, domains);
+ #[cfg(feature = "flows")]
+ if gate.flow_authoring_enabled()
+ && flow_generation_for(&config.workspace_dir, &gate).is_none()
+ {
+ crate::skills::bundled::flow_authoring::schedule_prewarm(ctx, config, domains);
+ }
load_workflow_metadata_with_gate(
&config.workspace_dir,
home,
- DiscoveryGate::from_config(ctx, config, domains),
+ gate,
)
}