Skip to content

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

chore: files changed src/core/runtime/builder.rs,src/openhuman/platform/startup/ops.rs

Steven Enamakeladf93e9c90e7
diff --git a/src/core/runtime/builder.rs b/src/core/runtime/builder.rs
index b75133176b..e11bd05977 100644
--- a/src/core/runtime/builder.rs
+++ b/src/core/runtime/builder.rs
@@ -616,6 +616,27 @@ impl CoreBuilder {
)
.await?;
+ // Materialise the skills compiled into this binary, into whichever
+ // workspace this host resolved.
+ //
+ // HERE, not in `run_workspace_migrations`, and that distinction cost a
+ // working feature: that function has exactly one caller, the RPC server
+ // boot in `jsonrpc.rs`. The CLI (`openhuman agent dump-prompt`), the TUI
+ // and `Harness` — the library front door — never reach it, so an
+ // embedder got a `workflow_builder` whose system prompt pointed at a
+ // reference manual that did not exist on its disk. `CoreBuilder::build`
+ // is the one path every host takes, including the RPC server.
+ //
+ // Not fallible, and cheap when current: one file read per bundle to
+ // compare digests. Failures are logged per skill inside `install`.
+ if let Ok(workspace_dir) = ctx.workspace_dir() {
+ crate::openhuman::skills::install_bundled_skills(&workspace_dir);
+ } else {
+ tracing::debug!(
+ "[skills][bundled] no workspace resolved at build; builtin skills not installed"
+ );
+ }
+
Ok(CoreRuntime {
ctx,
config,
diff --git a/src/openhuman/platform/startup/ops.rs b/src/openhuman/platform/startup/ops.rs
index 34c268baa9..b693990649 100644
--- a/src/openhuman/platform/startup/ops.rs
+++ b/src/openhuman/platform/startup/ops.rs
@@ -5,15 +5,6 @@ use std::path::Path;
/// Failures are logged and do not abort startup. Individual migration helpers
/// remain responsible for their own idempotency markers.
pub fn run_workspace_migrations(workspace_dir: &Path) {
- // Skills compiled into the binary, written out under
- // `<workspace>/.openhuman/builtin-skills/` so discovery finds them like any
- // other bundle. Here rather than in `init_workspace` because that is a
- // one-shot RPC: an existing workspace never runs it again, so an upgrade
- // that ships a new page would reach nobody. This runs on every core boot,
- // which is also every workspace switch (login/logout restarts the core),
- // and a bundle whose digest already matches is a single file read.
- crate::openhuman::skills::install_bundled_skills(workspace_dir);
-
match crate::openhuman::agent::harness::session::migrate_session_layout_if_needed(workspace_dir)
{
Ok(outcome) if outcome.already_done => {