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/openhuman/agent/task_dispatcher/executor.rs,src/openhuman/cron/scheduler.rs

Steven Enamakeld7bfdd636e2b
diff --git a/src/openhuman/agent/task_dispatcher/executor.rs b/src/openhuman/agent/task_dispatcher/executor.rs
index 69a7bed453..304741f5b1 100644
--- a/src/openhuman/agent/task_dispatcher/executor.rs
+++ b/src/openhuman/agent/task_dispatcher/executor.rs
@@ -222,7 +222,7 @@ pub(super) async fn run_autonomous(
.profile
.as_ref()
.and_then(|p| p.memory_sources.clone());
- let run = tinymemory_core::source_scope::with_source_scope(
+ let run = crate::openhuman::memory::source_scope::with_source_scope(
memory_scope,
crate::openhuman::agent::turn_origin::with_origin(
crate::openhuman::agent::turn_origin::AgentTurnOrigin::Cli,
diff --git a/src/openhuman/cron/scheduler.rs b/src/openhuman/cron/scheduler.rs
index 3dfb8e6b65..f8031f843e 100644
--- a/src/openhuman/cron/scheduler.rs
+++ b/src/openhuman/cron/scheduler.rs
@@ -928,7 +928,7 @@ async fn run_agent_job(config: &Config, job: &CronJob) -> (bool, String, Option<
source:
crate::openhuman::agent::turn_origin::TrustedAutomationSource::Cron,
};
- let turn = tinymemory_core::source_scope::with_source_scope(
+ let turn = crate::openhuman::memory::source_scope::with_source_scope(
profile.and_then(|profile| profile.memory_sources),
crate::openhuman::agent::turn_origin::with_origin(
origin,
diff --git a/src/openhuman/memory/guard/families.rs b/src/openhuman/memory/guard/families.rs
index b1d9219bd7..d8a3063507 100644
--- a/src/openhuman/memory/guard/families.rs
+++ b/src/openhuman/memory/guard/families.rs
@@ -398,7 +398,7 @@ impl MemoryTree for GuardedTree {
/// `ListChunksQuery.source_scope`, which reaches SQL *before* `LIMIT`.
///
/// The ambient allowlist
- /// ([`source_scope::current_source_scope`](tinymemory_core::source_scope::current_source_scope))
+ /// ([`source_scope::current_source_scope`](crate::openhuman::memory::source_scope::current_source_scope))
/// is therefore read at this boundary and passed down, rather than being
/// applied to the returned rows. An explicit `scope` argument may only
/// *narrow* it: the two are intersected by
diff --git a/src/openhuman/memory/guard/families_tests.rs b/src/openhuman/memory/guard/families_tests.rs
index e31b312f9c..7d3a5a8d7c 100644
--- a/src/openhuman/memory/guard/families_tests.rs
+++ b/src/openhuman/memory/guard/families_tests.rs
@@ -13,7 +13,7 @@ use crate::openhuman::memory::guard::test_support::{
};
use crate::openhuman::security::live_policy;
use crate::openhuman::security::policy::{AutonomyLevel, SecurityPolicy};
-use tinymemory_core::source_scope::with_source_scope;
+use crate::openhuman::memory::source_scope::with_source_scope;
fn ingest_request(content: &str) -> IngestRequest {
IngestRequest {
diff --git a/src/openhuman/memory/guard/policy.rs b/src/openhuman/memory/guard/policy.rs
index db59e74113..16770e0676 100644
--- a/src/openhuman/memory/guard/policy.rs
+++ b/src/openhuman/memory/guard/policy.rs
@@ -46,7 +46,7 @@ use crate::openhuman::security::egress::emit_external_transfer;
use crate::openhuman::security::egress::types::{DataKind, EgressDescriptor, EgressReason};
use crate::openhuman::security::live_policy;
use crate::openhuman::security::policy::ToolOperation;
-use tinymemory_core::source_scope::current_source_scope;
+use crate::openhuman::memory::source_scope::current_source_scope;
/// Prefix on every guard-authored error message, so a refusal that surfaces to
/// a caller is attributable to the guard rather than to the driver underneath.
diff --git a/src/openhuman/memory/guard/policy_tests.rs b/src/openhuman/memory/guard/policy_tests.rs
index c7d443f91c..44c2ad61d0 100644
--- a/src/openhuman/memory/guard/policy_tests.rs
+++ b/src/openhuman/memory/guard/policy_tests.rs
@@ -5,7 +5,7 @@ use std::sync::Arc;
use crate::openhuman::security::live_policy;
use crate::openhuman::security::policy::{AutonomyLevel, SecurityPolicy};
-use tinymemory_core::source_scope::with_source_scope;
+use crate::openhuman::memory::source_scope::with_source_scope;
use crate::openhuman::memory::guard::test_support::{embedded_policy, external_policy};
diff --git a/src/openhuman/memory/guard/provider_tests.rs b/src/openhuman/memory/guard/provider_tests.rs
index e225b4ba3b..3f4a9fb6cd 100644
--- a/src/openhuman/memory/guard/provider_tests.rs
+++ b/src/openhuman/memory/guard/provider_tests.rs
@@ -23,7 +23,7 @@ use crate::openhuman::memory::guard::test_support::{
RecordingProvider,
};
use crate::openhuman::memory::guard::GuardPolicy;
-use tinymemory_core::source_scope::with_source_scope;
+use crate::openhuman::memory::source_scope::with_source_scope;
fn budgeted(recall_max_chars: usize, capture_max_chars: usize) -> GuardPolicy {
GuardPolicy::new(
diff --git a/src/openhuman/memory/source_scope.rs b/src/openhuman/memory/source_scope.rs
index 64eee166fd..46ad5da306 100644
--- a/src/openhuman/memory/source_scope.rs
+++ b/src/openhuman/memory/source_scope.rs
@@ -3,7 +3,7 @@
//! # Why this is here and not in a tinymemory crate
//!
//! The engine has a task-local of the same shape
-//! (`tinymemory_core::source_scope`), and for a while this host simply used it.
+//! (`crate::openhuman::memory::source_scope`), and for a while this host simply used it.
//! That only worked because the host linked the engine. Once memory is reached
//! through the loadable TinyMemory module, it stops working *silently*: the
//! module is a separately compiled `cdylib` with its own statics, so a
diff --git a/src/openhuman/memory/tools/search/chunk_context.rs b/src/openhuman/memory/tools/search/chunk_context.rs
index f077e580da..d88d778eb8 100644
--- a/src/openhuman/memory/tools/search/chunk_context.rs
+++ b/src/openhuman/memory/tools/search/chunk_context.rs
@@ -98,7 +98,7 @@ impl Tool for MemoryChunkContextTool {
// Per-profile memory-source gate: if the target chunk belongs to a
// source the active profile didn't allow, surface nothing (its window
// shares the same source). Non-source chunks always pass.
- if !tinymemory_core::source_scope::chunk_source_allowed(&target.metadata.tags, &source_id) {
+ if !crate::openhuman::memory::source_scope::chunk_source_allowed(&target.metadata.tags, &source_id) {
return Ok(ToolResult::success(
"Chunk is from a memory source not available to the active agent profile.",
));
diff --git a/src/openhuman/memory/tree/retrieval/rpc.rs b/src/openhuman/memory/tree/retrieval/rpc.rs
index d44fa25a51..af3e94f365 100644
--- a/src/openhuman/memory/tree/retrieval/rpc.rs
+++ b/src/openhuman/memory/tree/retrieval/rpc.rs
@@ -443,7 +443,7 @@ mod tests {
#[tokio::test]
async fn cover_window_rpc_honors_profile_source_scope() {
- use tinymemory_core::source_scope::with_source_scope;
+ use crate::openhuman::memory::source_scope::with_source_scope;
let (_tmp, cfg) = test_config();
// Two memory-source chunks in different sources, both inside the window.
let mut allowed = sample_chunk("slack:#eng", 0);
diff --git a/src/openhuman/skills/runtime/run_machinery.rs b/src/openhuman/skills/runtime/run_machinery.rs
index 22711f152e..ed0a5982ea 100644
--- a/src/openhuman/skills/runtime/run_machinery.rs
+++ b/src/openhuman/skills/runtime/run_machinery.rs
@@ -21,7 +21,7 @@ async fn with_profile_memory_source_scope<F, T>(
where
F: std::future::Future<Output = T>,
{
- tinymemory_core::source_scope::with_source_scope(
+ crate::openhuman::memory::source_scope::with_source_scope(
active_profile.and_then(|profile| profile.memory_sources.clone()),
fut,
)
@@ -385,7 +385,7 @@ mod tests {
profile.memory_sources = Some(vec!["slack:#eng".into(), "github:openhuman".into()]);
let visible = with_profile_memory_source_scope(Some(&profile), async {
- tinymemory_core::source_scope::current_source_scope()
+ crate::openhuman::memory::source_scope::current_source_scope()
})
.await;
@@ -397,7 +397,7 @@ mod tests {
]))
);
assert_eq!(
- tinymemory_core::source_scope::current_source_scope(),
+ crate::openhuman::memory::source_scope::current_source_scope(),
None,
"workflow scope must not leak after the run future finishes"
);
diff --git a/src/openhuman/web_chat/run_task.rs b/src/openhuman/web_chat/run_task.rs
index feb30e1eca..68e7d74864 100644
--- a/src/openhuman/web_chat/run_task.rs
+++ b/src/openhuman/web_chat/run_task.rs
@@ -258,7 +258,7 @@ pub(crate) async fn run_chat_task(
let turn = Box::pin(agent.run_single(message));
let result = match crate::openhuman::agent::tinyagents::thread_context::with_thread_id(
thread_id.to_string(),
- tinymemory_core::source_scope::with_source_scope(profile.memory_sources.clone(), turn),
+ crate::openhuman::memory::source_scope::with_source_scope(profile.memory_sources.clone(), turn),
)
.await
{