The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(skills): source workflow types from tinyskills
Steven Enamakeldd9afbf80cd9
diff --git a/crates/openhuman-core/src/agent/context/channels_prompt.rs b/crates/openhuman-core/src/agent/context/channels_prompt.rsindex d296316cbe..1c59983d25 100644--- a/crates/openhuman-core/src/agent/context/channels_prompt.rs+++ b/crates/openhuman-core/src/agent/context/channels_prompt.rs@@ -107,7 +107,7 @@ pub fn build_system_prompt(workspace_dir: &Path,model_name: &str,tools: &[(&str, &str)],- skills: &[crate::skills::Workflow],+ skills: &[tinyskills::Skill],bootstrap_max_chars: Option<usize>,channel_name: Option<&str>,) -> String {@@ -130,7 +130,7 @@ pub fn build_system_prompt_with_identity(workspace_dir: &Path,model_name: &str,tools: &[(&str, &str)],- skills: &[crate::skills::Workflow],+ skills: &[tinyskills::Skill],bootstrap_max_chars: Option<usize>,channel_name: Option<&str>,identity: PromptIdentityOverride<'_>,diff --git a/crates/openhuman-core/src/agent/context/channels_prompt_tests.rs b/crates/openhuman-core/src/agent/context/channels_prompt_tests.rsindex 3070d373e4..4ce6416b9b 100644--- a/crates/openhuman-core/src/agent/context/channels_prompt_tests.rs+++ b/crates/openhuman-core/src/agent/context/channels_prompt_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::skills::{Workflow, WorkflowFrontmatter, WorkflowScope};+use {tinyskills::Skill as Workflow, tinyskills::SkillFrontmatter as WorkflowFrontmatter, tinyskills::SkillScope as WorkflowScope};use tempfile::tempdir;fn skill(name: &str, location: Option<std::path::PathBuf>) -> Workflow {diff --git a/crates/openhuman-core/src/agent/harness/fork_context.rs b/crates/openhuman-core/src/agent/harness/fork_context.rsindex 334581962f..600b39b868 100644--- a/crates/openhuman-core/src/agent/harness/fork_context.rs+++ b/crates/openhuman-core/src/agent/harness/fork_context.rs@@ -13,7 +13,7 @@use crate::agent::progress::AgentProgress;use crate::agent::tinyagents::TurnModelSource;use crate::config::AgentConfig;-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};use std::collections::HashSet;use std::path::PathBuf;use std::sync::Arc;diff --git a/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs b/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rsindex 66c839c90d..c5a7c83831 100644--- a/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs+++ b/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs@@ -182,7 +182,7 @@ pub fn render_ambient_environment(ctx: &PromptContext<'_>) -> Result<String> {/// manufacture a full context when they only need the static text.fn empty_prompt_context_for_static_sections() -> PromptContext<'static> {static EMPTY_TOOLS: &[PromptTool<'static>] = &[];- static EMPTY_WORKFLOWS: &[crate::skills::Workflow] = &[];+ static EMPTY_WORKFLOWS: &[tinyskills::Skill] = &[];static EMPTY_INTEGRATIONS: &[ConnectedIntegration] = &[];// SAFETY: the &HashSet reference must outlive the returned context;// a leaked OnceLock-style allocation gives us a permanent 'staticdiff --git a/crates/openhuman-core/src/agent/prompts/types.rs b/crates/openhuman-core/src/agent/prompts/types.rsindex 77c3bb1e71..b8503f276b 100644--- a/crates/openhuman-core/src/agent/prompts/types.rs+++ b/crates/openhuman-core/src/agent/prompts/types.rs@@ -6,7 +6,7 @@//! the sibling `mod.rs` so type edits don't pull in the whole 2 000-line//! renderer.-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};use anyhow::Result;use std::path::Path;use tinytools::Tool;diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory_workflows.rs b/crates/openhuman-core/src/agent/session_host/builder/factory_workflows.rsindex 6fb763c992..0a03cf09af 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory_workflows.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory_workflows.rs@@ -1,7 +1,7 @@//! The skill and flow catalogue exposed to a newly constructed session.use crate::config::Config;-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};pub(super) fn session_workflows(config: &Config, host_only: bool) -> Vec<Workflow> {if host_only {diff --git a/crates/openhuman-core/src/agent/session_host/builder/setters.rs b/crates/openhuman-core/src/agent/session_host/builder/setters.rsindex 1748d6f576..ecd98d64e0 100644--- a/crates/openhuman-core/src/agent/session_host/builder/setters.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/setters.rs@@ -224,7 +224,7 @@ impl SessionHostBuilder {}/// Sets the skills available to the agent.- pub fn workflows(mut self, skills: Vec<crate::skills::Workflow>) -> Self {+ pub fn workflows(mut self, skills: Vec<tinyskills::Skill>) -> Self {self.workflows = Some(skills);self}diff --git a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rsindex 3f187b7cf4..49cbea0918 100644--- a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs+++ b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs@@ -347,7 +347,7 @@ impl OpenHumanTurnPrelude {// Event-driven metadata refresh keeps the steady-state hot path free// of the old per-turn filesystem scan.let latest = crate::skills::load_workflow_metadata(&self.workspace_dir);- let id = |workflow: &crate::skills::Workflow| {+ let id = |workflow: &tinyskills::Skill| {if workflow.dir_name.is_empty() {workflow.name.clone()} else {diff --git a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rsindex 6c2a9e6363..fd188f55d1 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs@@ -182,7 +182,7 @@ impl OpenHumanSessionHost {}/// The agent's loaded workflows, if any.- pub fn workflows(&self) -> &[crate::skills::Workflow] {+ pub fn workflows(&self) -> &[tinyskills::Skill] {&self.workflows}diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rsindex 0020b518e3..e17ea7fd75 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@ -174,7 +174,7 @@ struct OpenHumanTurnPreludeMutable {/// Distinguishes a new session from a resumed session whose recorded tool/// snapshot simply had no TinyJuice declarations.recorded_tool_snapshot_adopted: bool,- workflows: Vec<crate::skills::Workflow>,+ workflows: Vec<tinyskills::Skill>,composio_events: Option<tinybus::events::EventReceiver<crate::core::events::DomainEvent>>,skill_events: Option<tinybus::events::EventReceiver<crate::core::events::DomainEvent>>,/// The user-authored text of the in-flight turn, held until commit so thediff --git a/crates/openhuman-core/src/agent/session_host/types.rs b/crates/openhuman-core/src/agent/session_host/types.rsindex 66ffeeb7f7..8cefd68de9 100644--- a/crates/openhuman-core/src/agent/session_host/types.rs+++ b/crates/openhuman-core/src/agent/session_host/types.rs@@ -258,7 +258,7 @@ pub struct OpenHumanSessionHost {/// resolve their default cwd to its root. `None` preserves the shared/// `action_dir` cwd behaviour.pub(super) workspace_descriptor: Option<tinytools::WorkspaceDescriptor>,- pub(super) workflows: Vec<crate::skills::Workflow>,+ pub(super) workflows: Vec<tinyskills::Skill>,/// Last per-turn context block (active goal, running sub-agents) built for/// the current turn. Stored so it can be forwarded to subagents via/// `ParentExecutionContext`.@@ -568,7 +568,7 @@ pub struct SessionHostBuilder {/// Optional turn workspace descriptor forwarded to [`OpenHumanSessionHost`] at build time./// Defaults to `None` (shared `action_dir` cwd).pub(super) workspace_descriptor: Option<tinytools::WorkspaceDescriptor>,- pub(super) workflows: Option<Vec<crate::skills::Workflow>>,+ pub(super) workflows: Option<Vec<tinyskills::Skill>>,/// OpenHumanSessionHost workflows to surface in the prompt. Populated from `load_workflows`/// at session start; defaults to empty when not explicitly set.pub(super) post_turn_hooks: Vec<Arc<dyn PostTurnHook>>,diff --git a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rsindex b41a4d3adb..c6295c4186 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs@@ -73,7 +73,7 @@ use crate::agent::prompts::{PromptContext, PromptTool, SystemPromptBuilder, ToolCallFormat,};use crate::config::{Config, DEFAULT_MODEL};-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};/// Composes OpenHuman's system prompt for a TinyAgents turn.///diff --git a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rsindex 3e04b5207c..3e7b9d6e87 100644--- a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs@@ -14,7 +14,7 @@ use crate::channels::system_prompt::{ChannelPromptInputs, ChannelSystemPrompt};use crate::config::Config;use crate::inference::provider;use crate::security::SecurityPolicy;-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};use crate::tools;use anyhow::Result;use std::collections::HashMap;diff --git a/crates/openhuman-core/src/channels/system_prompt.rs b/crates/openhuman-core/src/channels/system_prompt.rsindex 6779b0ceb5..129327f8d8 100644--- a/crates/openhuman-core/src/channels/system_prompt.rs+++ b/crates/openhuman-core/src/channels/system_prompt.rs@@ -24,7 +24,7 @@ use crate::agent::context::channels_prompt::{build_system_prompt_with_identity, render_project_context, ProjectContextPlacement,PromptIdentityOverride,};-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};use std::collections::hash_map::DefaultHasher;use std::hash::{Hash, Hasher};use std::path::{Path, PathBuf};diff --git a/crates/openhuman-core/src/channels/tests/prompt.rs b/crates/openhuman-core/src/channels/tests/prompt.rsindex 16fe198fa0..b9c1d3bd41 100644--- a/crates/openhuman-core/src/channels/tests/prompt.rs+++ b/crates/openhuman-core/src/channels/tests/prompt.rs@@ -142,7 +142,7 @@ fn prompt_runtime_metadata() {#[test]fn prompt_skills_compact_list() {let ws = make_workspace();- let skills = vec![crate::skills::Workflow {+ let skills = vec![tinyskills::Skill {name: "code-review".into(),description: "Review code for bugs".into(),version: "1.0.0".into(),diff --git a/crates/openhuman-core/src/flows/catalogue.rs b/crates/openhuman-core/src/flows/catalogue.rsindex 10095f6a8b..194b334fa4 100644--- a/crates/openhuman-core/src/flows/catalogue.rs+++ b/crates/openhuman-core/src/flows/catalogue.rs@@ -32,7 +32,7 @@//! internals.use crate::config::Config;-use crate::skills::{Workflow, WorkflowScope};+use {tinyskills::Skill as Workflow, tinyskills::SkillScope as WorkflowScope};/// How many flows the catalogue will surface.///@@ -87,7 +87,7 @@ pub fn flow_entries(config: &Config) -> Vec<Workflow> {entries}-fn entry_for(flow: super::types::Flow) -> Workflow {+fn entry_for(flow: tinyflows_catalog::types::Flow) -> Workflow {Workflow {name: flow.name.clone(),// The flow id, because that is what `run_workflow` / `get_flow` take.@@ -105,7 +105,7 @@ fn entry_for(flow: super::types::Flow) -> Workflow {}/// A structural summary of the flow graph.-fn describe(flow: &super::types::Flow) -> String {+fn describe(flow: &tinyflows_catalog::types::Flow) -> String {describe_shape(flow)}@@ -114,7 +114,7 @@ fn describe(flow: &super::types::Flow) -> String {/// Deliberately structural — trigger, size, paused-ness — because that is all/// the record carries. See the module docs: inventing a purpose from node/// internals would read as authoritative and frequently be wrong.-fn describe_shape(flow: &super::types::Flow) -> String {+fn describe_shape(flow: &tinyflows_catalog::types::Flow) -> String {// Read out of the trigger node's free-form config, which is where the// engine keeps it — the same way `tinyflows`' own `trigger_kind` does.// A graph with zero or several triggers has no single answer, anddiff --git a/crates/openhuman-core/src/skills/bus.rs b/crates/openhuman-core/src/skills/bus.rsindex 8fe6cdac2f..7c259660a4 100644--- a/crates/openhuman-core/src/skills/bus.rs+++ b/crates/openhuman-core/src/skills/bus.rs@@ -13,7 +13,7 @@use crate::core::bus::BUS;use crate::core::events::DomainEvent;-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};use async_trait::async_trait;use std::sync::{Arc, OnceLock};use tinybus::EventHandler;diff --git a/crates/openhuman-core/src/skills/registry.rs b/crates/openhuman-core/src/skills/registry.rsindex a89d84aff4..24f76b1d25 100644--- a/crates/openhuman-core/src/skills/registry.rs+++ b/crates/openhuman-core/src/skills/registry.rs@@ -13,7 +13,7 @@ use std::path::Path;use serde::{Deserialize, Serialize};use crate::agent::harness::definition::{AgentDefinition, PromptSource};-use crate::skills::Workflow;+use {tinyskills::Skill as Workflow};/// One declared input — a parameter the skill needs, with a human description./// `required` inputs must be supplied at run time; `kind` is an optional typediff --git a/crates/openhuman-core/src/skills/schemas/mod.rs b/crates/openhuman-core/src/skills/schemas/mod.rsindex acdee1f489..4afcbeb922 100644--- a/crates/openhuman-core/src/skills/schemas/mod.rs+++ b/crates/openhuman-core/src/skills/schemas/mod.rs@@ -42,7 +42,7 @@ pub(crate) use wire_types::WorkflowSummary;// `Workflow` is used by the unit tests (skill_summary_round_trip_minimum_fields).#[cfg(test)]-pub(crate) use crate::skills::ops::Workflow;+pub(crate) use {tinyskills::Skill as Workflow};// `resolve_workspace_dir` is used by the `run_workflow` agent tool.pub(crate) use helpers::resolve_workspace_dir;diff --git a/crates/openhuman-core/src/skills/schemas/wire_types.rs b/crates/openhuman-core/src/skills/schemas/wire_types.rsindex 1f8ae88a45..504856a969 100644--- a/crates/openhuman-core/src/skills/schemas/wire_types.rs+++ b/crates/openhuman-core/src/skills/schemas/wire_types.rs@@ -6,10 +6,7 @@use serde::{Deserialize, Serialize};-use crate::skills::ops::{- CreateWorkflowParams, InstallWorkflowFromUrlParams, Workflow, WorkflowCreateInputDef,- WorkflowScope,-};+use {crate::skills::ops::CreateWorkflowParams, crate::skills::ops::InstallWorkflowFromUrlParams, tinyskills::Skill as Workflow, crate::skills::ops::WorkflowCreateInputDef, tinyskills::SkillScope as WorkflowScope};use crate::skills::ops_install::{ScanBlockedOutcome, SkillInstallOutcome};// ── Params ────────────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/skills/write_root_tests.rs b/crates/openhuman-core/src/skills/write_root_tests.rsindex 6a4b9f9e55..328baa8aff 100644--- a/crates/openhuman-core/src/skills/write_root_tests.rs+++ b/crates/openhuman-core/src/skills/write_root_tests.rs@@ -23,7 +23,7 @@ fn user_workflow(name: &str) -> CreateWorkflowParams {}}-fn names(workflows: &[crate::skills::Workflow]) -> Vec<String> {+fn names(workflows: &[tinyskills::Skill]) -> Vec<String> {workflows.iter().map(|workflow| workflow.name.clone())