Skip to content

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

fix(profiles): SaaS users can call threads.state_get

sanil-23ee9852cefdb4
diff --git a/crates/openhuman-core/src/profiles/surface.rs b/crates/openhuman-core/src/profiles/surface.rs
index cc83e969ed..ad69f88e56 100644
--- a/crates/openhuman-core/src/profiles/surface.rs
+++ b/crates/openhuman-core/src/profiles/surface.rs
@@ -52,6 +52,7 @@ pub const USER_METHODS: &[&str] = &[
"openhuman.threads_transcript_get",
"openhuman.threads_goal_get",
"openhuman.threads_todos_get",
+ "openhuman.threads_state_get",
// Turns on a user's own threads. Their events carry the user's agent and
// reach only that user's `/events` stream.
"openhuman.threads_generate_title",
diff --git a/crates/openhuman-core/src/profiles/surface_tests.rs b/crates/openhuman-core/src/profiles/surface_tests.rs
index 41b5387152..6bd4f94bad 100644
--- a/crates/openhuman-core/src/profiles/surface_tests.rs
+++ b/crates/openhuman-core/src/profiles/surface_tests.rs
@@ -152,6 +152,19 @@ fn delete_purge_and_the_channel_relay_are_open_to_users() {
}
}
+/// A user reads their own threads' live agent state: the goal, the plan, and
+/// the whole run state (goal, plan and the agent's notes) in one call.
+#[test]
+fn the_live_agent_state_reads_are_open_to_users() {
+ for method in [
+ "openhuman.threads_goal_get",
+ "openhuman.threads_todos_get",
+ "openhuman.threads_state_get",
+ ] {
+ assert!(visible_in(true, Scope::User, method, false), "{method}");
+ }
+}
+
#[cfg(feature = "channels")]
#[test]
fn users_still_cannot_mint_channel_threads() {