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
fix(core): scope cache and gate keys by tenant instead of defaults
Steven Enamakel06670b82a181
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rsindex 6f90f15087..4e1f37c05e 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs@@ -382,7 +382,7 @@ pub(crate) async fn record_awaiting_input(// A pause is deliverable to the parent, but it is not the task's final// completion. Use an independent key for every pause so resumed work can// pause again and still eventually record under the original task id.- let pause_record_id = task_id.clone(); // regression proof: shared completion key+ let pause_record_id = awaiting_input_record_id(&task_id);let summary = crate::agent::orchestration::tools::awaiting_user::awaiting_user_envelope(&task_id,&agent_id,diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown.rs b/crates/openhuman-core/src/agent_runs/context_breakdown.rsindex 84bd32b883..1820aeef42 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown.rs@@ -96,10 +96,10 @@ struct ReportCacheKey {fn report_cache_key(tenant: Tenant, agent_id: &str, config: &Config) -> ReportCacheKey {ReportCacheKey {- tenant: Tenant::default(), // regression proof: agent-only report key+ tenant,agent_id: agent_id.to_string(),- workspace_dir: Default::default(),- config_path: Default::default(),+ workspace_dir: config.workspace_dir.clone(),+ config_path: config.config_path.clone(),}}diff --git a/crates/openhuman-core/src/plan_review/gate.rs b/crates/openhuman-core/src/plan_review/gate.rsindex 8ebcf67787..247d47b1bf 100644--- a/crates/openhuman-core/src/plan_review/gate.rs+++ b/crates/openhuman-core/src/plan_review/gate.rs@@ -99,7 +99,7 @@ impl PlanReviewGate {// Requests run under a derived agent context, while the profile's UI// decides and replays them from its profile-level context. Share the// profile's gate entries across its agents, but isolate other profiles.- let scope = Tenant::default() /* regression proof: shared plan-review scope */;+ let scope = tenant.profile_only();let request_key = (scope.clone(), request_id.clone());self.waiters.lock().insert(request_key.clone(), tx);if let Some(tid) = thread_id.clone() {@@ -190,7 +190,7 @@ impl PlanReviewGate {tenant: &Tenant,thread_id: &str,) -> Option<ParkedReview> {- let scope = Tenant::default() /* regression proof: shared plan-review scope */;+ let scope = tenant.profile_only();let key = (scope.clone(), thread_id.to_string());let request_id = self.thread_to_request.lock().get(&key)?.clone();self.parked.lock().get(&(scope, request_id)).cloned()@@ -207,7 +207,7 @@ impl PlanReviewGate {let sender = self.waiters.lock()- .remove(&(Tenant::default() /* regression proof: shared plan-review scope */, request_id.to_string()));+ .remove(&(tenant.profile_only(), request_id.to_string()));match sender {Some(tx) => tx.send(resolution).is_ok(),None => {@@ -228,7 +228,7 @@ impl PlanReviewGate {thread_id: &str,resolution: PlanReviewResolution,) -> bool {- let scope = Tenant::default() /* regression proof: shared plan-review scope */;+ let scope = tenant.profile_only();let request_id = self.thread_to_request.lock()