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
docs(rules): drop origin from the rule context docs
Steven Enamakel457fb47fdaeb
diff --git a/crates/openhuman-core/src/tools/rules/mod.rs b/crates/openhuman-core/src/tools/rules/mod.rsindex cacdfe205f..6549dfcd30 100644--- a/crates/openhuman-core/src/tools/rules/mod.rs+++ b/crates/openhuman-core/src/tools/rules/mod.rs@@ -14,7 +14,9 @@//! tool, so adding one can only narrow.//!//! The context the rules' `when` conditions match is built by-//! [`rule_context`]: `channel`, `agent` and `origin`.+//! [`rule_context`]: the session's `channel` and `agent`. The turn's origin is+//! not used: the host-rendered catalogue is cached per session, so the rules+//! must decide the same way on every turn.mod ops;diff --git a/crates/openhuman-core/src/tools/rules/ops_tests.rs b/crates/openhuman-core/src/tools/rules/ops_tests.rsindex 73e0a59e16..63fa9ac0ef 100644--- a/crates/openhuman-core/src/tools/rules/ops_tests.rs+++ b/crates/openhuman-core/src/tools/rules/ops_tests.rs@@ -193,3 +193,22 @@ fn a_child_without_parent_rules_takes_the_operator_layer() {assert!(!visible(&child.rules, "shell", &child.context));assert!(child_rule_policy(None, None, &definition("worker")).is_none());}++#[test]+fn an_operator_layer_cannot_be_named_into_an_agent_layer() {+ let mut config = Config::default();+ config.tool_rules = tinytools::ToolRules::from_allow_deny(Vec::<String>::new(), ["shell"])+ .named("agent:baseline");+ let set = session_rule_set(Some(&config), None);+ assert_eq!(set.layers[0].name.as_deref(), Some("config:agent:baseline"));+ let parent = turn_rule_policy(+ Arc::new(set),+ rule_context(None, Some("orchestrator"), None),+ );++ let child = child_rule_policy(Some(&parent), None, &definition("worker")).expect("rules");+ assert!(+ !visible(&child.rules, "shell", &child.context),+ "the operator layer is still inherited whatever its author named it"+ );+}diff --git a/gitbooks/developing/architecture/agent-harness.md b/gitbooks/developing/architecture/agent-harness.mdindex 3cdeb91f06..a9f7f0d45a 100644--- a/gitbooks/developing/architecture/agent-harness.md+++ b/gitbooks/developing/architecture/agent-harness.md@@ -288,7 +288,7 @@ reason = "Only the GitHub MCP server is approved."[[tool_rules.rules]]effect = "deny"match = { name = "shell" }-when = { channel = "telegram" } # context: channel, agent, origin+when = { channel = "telegram" } # context: channel, agent```How rules behave: