Skip to content

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

chore: remove dead code and suppress unused warnings

Steven Enamakel8844ba76e6e1
diff --git a/crates/openhuman-core/src/config/schemas/helpers.rs b/crates/openhuman-core/src/config/schemas/helpers.rs
index 71b9cadff5..e1b67726ea 100644
--- a/crates/openhuman-core/src/config/schemas/helpers.rs
+++ b/crates/openhuman-core/src/config/schemas/helpers.rs
@@ -285,7 +285,6 @@ pub fn optional_json(name: &'static str, comment: &'static str) -> FieldSchema {
}
}
-#[allow(dead_code)]
pub fn required_string(name: &'static str, comment: &'static str) -> FieldSchema {
FieldSchema {
name,
diff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rs
index 84184f482c..b540aba55c 100644
--- a/crates/openhuman-core/src/lib.rs
+++ b/crates/openhuman-core/src/lib.rs
@@ -48,6 +48,9 @@
// depth of 128 (E0275). Raising the limit is the standard remedy for deep async
// type recursion and costs nothing at runtime.
#![recursion_limit = "256"]
+// These modules define the public API surface for agent features.
+// Many types/functions are intended for future use or integration with the frontend.
+#![allow(dead_code)]
pub mod agent;
pub mod backend;
diff --git a/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs b/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs
index 03810f706c..29b02546b0 100644
--- a/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs
+++ b/crates/openhuman-core/src/memory/display_name_and_vault_rpc_tests.rs
@@ -56,17 +56,6 @@ fn sanitize_basename_replaces_windows_illegal_characters() {
assert_eq!(sanitize_basename("safe-name.md"), "safe-name.md");
}
-#[test]
-fn parse_source_kind_str_accepts_known_values_only() {
- assert_eq!(parse_source_kind_str("chat"), Some(SourceKind::Chat));
- assert_eq!(parse_source_kind_str("email"), Some(SourceKind::Email));
- assert_eq!(
- parse_source_kind_str("document"),
- Some(SourceKind::Document)
- );
- assert_eq!(parse_source_kind_str("unknown"), None);
-}
-
#[tokio::test]
async fn obsidian_status_registered_when_override_config_lists_content_root() {
let (_tmp, cfg) = test_config();
diff --git a/crates/openhuman-core/src/memory/read_rpc/mod.rs b/crates/openhuman-core/src/memory/read_rpc/mod.rs
index 9c5eb16a7f..c922974429 100644
--- a/crates/openhuman-core/src/memory/read_rpc/mod.rs
+++ b/crates/openhuman-core/src/memory/read_rpc/mod.rs
@@ -41,11 +41,6 @@ pub use types::{
};
pub use vault::{obsidian_vault_status_rpc, vault_health_check_rpc};
-#[allow(dead_code)]
-pub(crate) fn parse_source_kind_str(s: &str) -> Option<tinymemory_api::chunks::SourceKind> {
- tinymemory_api::chunks::SourceKind::parse(s).ok()
-}
-
// Re-exports for `read_rpc_tests.rs`, which drives this module with
// `use super::*;`.
//
diff --git a/crates/openhuman-core/src/platform/socket/models.rs b/crates/openhuman-core/src/platform/socket/models.rs
index 49e1e7435c..317b15f59a 100644
--- a/crates/openhuman-core/src/platform/socket/models.rs
+++ b/crates/openhuman-core/src/platform/socket/models.rs
@@ -31,44 +31,3 @@ impl Default for SocketState {
}
}
}
-
-/// Generic socket message wrapper
-#[allow(dead_code)]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct SocketMessage {
- pub event: String,
- pub data: serde_json::Value,
-}
-
-/// MCP request structure (JSON-RPC 2.0)
-#[allow(dead_code)]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct McpRequest {
- pub jsonrpc: String,
- pub id: serde_json::Value,
- pub method: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub params: Option<serde_json::Value>,
-}
-
-/// MCP response structure (JSON-RPC 2.0)
-#[allow(dead_code)]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct McpResponse {
- pub jsonrpc: String,
- pub id: serde_json::Value,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub result: Option<serde_json::Value>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub error: Option<McpError>,
-}
-
-/// MCP error structure
-#[allow(dead_code)]
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct McpError {
- pub code: i32,
- pub message: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub data: Option<serde_json::Value>,
-}