Skip to content

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

feat(about_app): add catalog data and ops for about app

Steven Enamakel42a6465bff3b
diff --git a/crates/openhuman-core/src/platform/about_app/catalog_data.rs b/crates/openhuman-core/src/platform/about_app/catalog_data.rs
index d794785ee4..50fb58b675 100644
--- a/crates/openhuman-core/src/platform/about_app/catalog_data.rs
+++ b/crates/openhuman-core/src/platform/about_app/catalog_data.rs
@@ -31,12 +31,15 @@ const DESKTOP_TO_JEV: Option<CapabilityPrivacy> = Some(CapabilityPrivacy {
// Reply remixing sends the chat and the reply to the inference provider and
// Jev; background slang and meme research sends short queries derived from the
// chat to the configured web search provider and fetches GIF pages and media.
+// The `TINYMEMES_*` overrides can route the rewrite model, research and Jev
+// straight to OpenRouter, TypeSafe or OpenJEV instead.
const REMIX_TO_PROVIDERS: Option<CapabilityPrivacy> = Some(CapabilityPrivacy {
leaves_device: true,
data_kind: PrivacyDataKind::Raw,
destinations: &[
"Configured OpenHuman inference provider",
"TinyHumans OpenRouter Jev proxy",
+ "OpenRouter, TypeSafe or OpenJEV (only when a TINYMEMES_* override selects them)",
"Configured web search provider (research queries)",
"GIPHY and Imgflip (reaction GIF pages and media)",
],
diff --git a/crates/openhuman-core/src/platform/about_app/ops.rs b/crates/openhuman-core/src/platform/about_app/ops.rs
index 46a0f2e194..7e70a4896e 100644
--- a/crates/openhuman-core/src/platform/about_app/ops.rs
+++ b/crates/openhuman-core/src/platform/about_app/ops.rs
@@ -23,10 +23,11 @@ pub fn component_for_domain(domain: &str) -> Option<&'static str> {
/// `capability`, marked [`CapabilityStatus::Disabled`] when its component is
/// off in `components`.
pub fn apply_components(capability: Capability, components: &ComponentSet) -> Capability {
- // The sandbox capability lives in the shared `security` domain, so it is
- // matched by id.
+ // The sandbox and reply-remix capabilities live in the shared `security`
+ // and `conversation` domains, so they are matched by id.
let component = match capability.id {
"security.sandbox_backends" => Some("sandbox"),
+ "conversation.reply_remix" => Some("memes"),
_ => component_for_domain(capability.domain),
};
match component {
diff --git a/crates/openhuman-core/src/platform/about_app/ops_tests.rs b/crates/openhuman-core/src/platform/about_app/ops_tests.rs
index e21ace0e51..3aa57eebcb 100644
--- a/crates/openhuman-core/src/platform/about_app/ops_tests.rs
+++ b/crates/openhuman-core/src/platform/about_app/ops_tests.rs
@@ -54,3 +54,17 @@ fn sandbox_capability_shows_disabled_when_sandbox_component_is_off() {
);
assert_eq!(apply_components(cap, &off("voice")).status, cap.status);
}
+
+#[test]
+fn reply_remix_capability_shows_disabled_when_the_memes_component_is_off() {
+ let cap = super::super::lookup("conversation.reply_remix").expect("reply remix capability");
+ assert_ne!(cap.status, CapabilityStatus::Disabled);
+ assert_eq!(
+ apply_components(cap, &off("memes")).status,
+ CapabilityStatus::Disabled
+ );
+ // Other conversation capabilities do not follow the memes switch.
+ let send = super::super::lookup("conversation.send_text").expect("send_text");
+ assert_eq!(apply_components(send, &off("memes")).status, send.status);
+ assert_eq!(apply_components(cap, &off("voice")).status, cap.status);
+}