Skip to content

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

chore: files changed crates/openhuman-core/src/memory/README.md,crates/openhuman-core/src/memory/sch

Steven Enamakel31f039089563
diff --git a/crates/openhuman-core/src/memory/README.md b/crates/openhuman-core/src/memory/README.md
index 8d395d19c7..10c0a39714 100644
--- a/crates/openhuman-core/src/memory/README.md
+++ b/crates/openhuman-core/src/memory/README.md
@@ -303,7 +303,8 @@ The agent `memory` tool applies the same confinement and overwrites any
| [`files.rs`](./files.rs) | Owner-only (0600 / 0700 on unix) writes of the local state files. |
| [`tools.rs`](./tools.rs) | The single `memory` agent tool; citations are collected by `web_chat`. |
| [`bus.rs`](./bus.rs) | The cron subscriber and the pending-deletions subscriber. |
-| [`schemas.rs`](./schemas.rs), [`schemas/defs.rs`](./schemas/defs.rs), [`schemas/handlers.rs`](./schemas/handlers.rs) | The `openhuman.memory_*` controller schemas and thin handlers. |
+| [`schemas.rs`](./schemas.rs), [`schemas/defs.rs`](./schemas/defs.rs), [`schemas/defs/`](./schemas/defs/) | The `openhuman.memory_*` controller schemas, split by controller group with shared field helpers. |
+| [`schemas/handlers.rs`](./schemas/handlers.rs) | Thin handlers using the shared parse, config-load, operation and result-serialization path. |
| [`types.rs`](./types.rs) | RPC request and view shapes; contract types are re-exported from `tinymemory_api`. |
| [`error.rs`](./error.rs) | `MemoryError` and the seven stable error codes. |
| [`status.rs`](./status.rs) | The memory row of `subsystems.status`. |
diff --git a/crates/openhuman-core/src/memory/schemas/defs/brain.rs b/crates/openhuman-core/src/memory/schemas/defs/brain.rs
index 71b8bf2907..1d07d2b25f 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/brain.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/brain.rs
@@ -1,4 +1,4 @@
-use super::common::{out, req, opt, limit};
+use super::common::{limit, opt, out, req};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -28,7 +28,11 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
inputs: vec![
opt("path", TypeSchema::String, "A local file to read."),
opt("text", TypeSchema::String, "Text to file."),
- opt("source", TypeSchema::String, "The source to file under (default: from the format, markdown for text)."),
+ opt(
+ "source",
+ TypeSchema::String,
+ "The source to file under (default: from the format, markdown for text).",
+ ),
opt("title", TypeSchema::String, "A title."),
],
outputs: out("{id, source, replayed}"),
diff --git a/crates/openhuman-core/src/memory/schemas/defs/conversations.rs b/crates/openhuman-core/src/memory/schemas/defs/conversations.rs
index 7a3000e1a9..0b0c072232 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/conversations.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/conversations.rs
@@ -15,13 +15,19 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "conversations_backfill_status",
description: "Progress of storing past chats, and how many threads and turns from before turn logging are still unstored.",
inputs: vec![],
- outputs: out("{state: {phase, threads_total, threads_done, turns_stored, items_stored, error?, finished_at?}, pending_threads, pending_turns}"),
+ outputs: out(
+ "{state: {phase, threads_total, threads_done, turns_stored, items_stored, error?, finished_at?}, pending_threads, pending_turns}",
+ ),
}),
"conversations_backfill_start" => Some(ControllerSchema {
namespace: "memory",
function: "conversations_backfill_start",
description: "Store past chats (turns from before turn logging) as the main agent's conversations, in the background. Uploads chat history to the selected engine, so it requires consent: true.",
- inputs: vec![req("consent", TypeSchema::Bool, "The user agreed to upload past chats to the engine.")],
+ inputs: vec![req(
+ "consent",
+ TypeSchema::Bool,
+ "The user agreed to upload past chats to the engine.",
+ )],
outputs: out("Same as memory_conversations_backfill_status."),
}),
_ => None,
diff --git a/crates/openhuman-core/src/memory/schemas/defs/engine.rs b/crates/openhuman-core/src/memory/schemas/defs/engine.rs
index 09158c0aa8..cb1cc40611 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/engine.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/engine.rs
@@ -1,4 +1,4 @@
-use super::common::{out, req, opt};
+use super::common::{opt, out, req};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -22,10 +22,22 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "engine_set",
description: "Select a memory engine, optionally setting its endpoint and API key.",
inputs: vec![
- req("engine", TypeSchema::String, "Engine id: tinyhumans or cortexdb."),
- opt("endpoint", TypeSchema::String, "Endpoint URL; empty clears it."),
- opt("api_key", TypeSchema::String, "API key (cortexdb); empty removes it. Stored in the credential store, never in config."),
- ],
+ req(
+ "engine",
+ TypeSchema::String,
+ "Engine id: tinyhumans or cortexdb.",
+ ),
+ opt(
+ "endpoint",
+ TypeSchema::String,
+ "Endpoint URL; empty clears it.",
+ ),
+ opt(
+ "api_key",
+ TypeSchema::String,
+ "API key (cortexdb); empty removes it. Stored in the credential store, never in config.",
+ ),
+ ],
outputs: out("Same as memory_engine_get."),
}),
_ => None,
diff --git a/crates/openhuman-core/src/memory/schemas/defs/jobs.rs b/crates/openhuman-core/src/memory/schemas/defs/jobs.rs
index 1ce42fb595..698abe84a9 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/jobs.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/jobs.rs
@@ -1,4 +1,4 @@
-use super::common::{out, opt};
+use super::common::{opt, out};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -14,7 +14,11 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
namespace: "memory",
function: "jobs_run",
description: "Run queued background jobs now: one by id, or every pending one.",
- inputs: vec![opt("id", TypeSchema::String, "One job; every pending job when omitted.")],
+ inputs: vec![opt(
+ "id",
+ TypeSchema::String,
+ "One job; every pending job when omitted.",
+ )],
outputs: out("{runs: JobRun[]}"),
}),
_ => None,
diff --git a/crates/openhuman-core/src/memory/schemas/defs/migration.rs b/crates/openhuman-core/src/memory/schemas/defs/migration.rs
index b8a51e0680..3b4ee91123 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/migration.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/migration.rs
@@ -1,4 +1,4 @@
-use super::common::{out, opt};
+use super::common::{opt, out};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -14,7 +14,11 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
namespace: "memory",
function: "migration_start",
description: "Move memory from before the per-user layout now. takeover: true agrees to take a legacy tree other accounts on this machine may share.",
- inputs: vec![opt("takeover", TypeSchema::Bool, "Consent to take a shared legacy tree.")],
+ inputs: vec![opt(
+ "takeover",
+ TypeSchema::Bool,
+ "Consent to take a shared legacy tree.",
+ )],
outputs: out("{state: MigrationState, running: bool, interrupted: bool}"),
}),
"migration_status" => Some(ControllerSchema {
diff --git a/crates/openhuman-core/src/memory/schemas/defs/policy.rs b/crates/openhuman-core/src/memory/schemas/defs/policy.rs
index 4766166c11..73b77afc50 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/policy.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/policy.rs
@@ -1,4 +1,4 @@
-use super::common::{out, opt};
+use super::common::{opt, out};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -8,25 +8,81 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "policy_get",
description: "The memory lifecycle's policy: turn logging, the per-turn pack and its budgets, and the root and agent id work outside an agent resolves to.",
inputs: vec![],
- outputs: out("{log_conversations, recall: {enabled, budget_tokens, learnings_limit, brain_limit, history_limit, team_limit, build_beliefs_every, pre_turn_timeout_ms, date_hint, compaction_timeout_ms, build_delay_secs}, root, agent_id, host_bound}"),
+ outputs: out(
+ "{log_conversations, recall: {enabled, budget_tokens, learnings_limit, brain_limit, history_limit, team_limit, build_beliefs_every, pre_turn_timeout_ms, date_hint, compaction_timeout_ms, build_delay_secs}, root, agent_id, host_bound}",
+ ),
}),
"policy_set" => Some(ControllerSchema {
namespace: "memory",
function: "policy_set",
description: "Change the memory lifecycle's policy.",
inputs: vec![
- opt("log_conversations", TypeSchema::Bool, "Log every turn to the acting agent's conversations."),
- opt("recall_enabled", TypeSchema::Bool, "Give every turn a memory pack."),
- opt("budget_tokens", TypeSchema::BoundedU64 { min: 100, max: 16_000 }, "The pack's size in tokens."),
- opt("learnings_limit", TypeSchema::BoundedU64 { min: 0, max: 50 }, "Learnings and built beliefs per pack."),
- opt("brain_limit", TypeSchema::BoundedU64 { min: 0, max: 50 }, "Brain documents per pack."),
- opt("history_limit", TypeSchema::BoundedU64 { min: 0, max: 50 }, "This agent's earlier turns per pack."),
- opt("team_limit", TypeSchema::BoundedU64 { min: 0, max: 50 }, "Other agents' turns per pack; 0 leaves them out."),
- opt("build_beliefs_every", TypeSchema::BoundedU64 { min: 0, max: 1000 }, "Turns between belief builds; 0 turns them off."),
- opt("pre_turn_timeout_ms", TypeSchema::BoundedU64 { min: 100, max: 30_000 }, "How long a turn waits for its pack."),
- opt("date_hint", TypeSchema::Bool, "Use a small model call to identify dates in each turn."),
- opt("compaction_timeout_ms", TypeSchema::U64, "How long compaction waits for recalled context, in milliseconds."),
- opt("build_delay_secs", TypeSchema::U64, "How long queued belief builds wait for newer writes, in seconds; must fit within the supported date range."),
+ opt(
+ "log_conversations",
+ TypeSchema::Bool,
+ "Log every turn to the acting agent's conversations.",
+ ),
+ opt(
+ "recall_enabled",
+ TypeSchema::Bool,
+ "Give every turn a memory pack.",
+ ),
+ opt(
+ "budget_tokens",
+ TypeSchema::BoundedU64 {
+ min: 100,
+ max: 16_000,
+ },
+ "The pack's size in tokens.",
+ ),
+ opt(
+ "learnings_limit",
+ TypeSchema::BoundedU64 { min: 0, max: 50 },
+ "Learnings and built beliefs per pack.",
+ ),
+ opt(
+ "brain_limit",
+ TypeSchema::BoundedU64 { min: 0, max: 50 },
+ "Brain documents per pack.",
+ ),
+ opt(
+ "history_limit",
+ TypeSchema::BoundedU64 { min: 0, max: 50 },
+ "This agent's earlier turns per pack.",
+ ),
+ opt(
+ "team_limit",
+ TypeSchema::BoundedU64 { min: 0, max: 50 },
+ "Other agents' turns per pack; 0 leaves them out.",
+ ),
+ opt(
+ "build_beliefs_every",
+ TypeSchema::BoundedU64 { min: 0, max: 1000 },
+ "Turns between belief builds; 0 turns them off.",
+ ),
+ opt(
+ "pre_turn_timeout_ms",
+ TypeSchema::BoundedU64 {
+ min: 100,
+ max: 30_000,
+ },
+ "How long a turn waits for its pack.",
+ ),
+ opt(
+ "date_hint",
+ TypeSchema::Bool,
+ "Use a small model call to identify dates in each turn.",
+ ),
+ opt(
+ "compaction_timeout_ms",
+ TypeSchema::U64,
+ "How long compaction waits for recalled context, in milliseconds.",
+ ),
+ opt(
+ "build_delay_secs",
+ TypeSchema::U64,
+ "How long queued belief builds wait for newer writes, in seconds; must fit within the supported date range.",
+ ),
],
outputs: out("Same as memory_policy_get."),
}),
@@ -35,11 +91,25 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "pack_preview",
description: "The memory pack a turn would be given (with a query) or a session would start with (without one). Reads only.",
inputs: vec![
- opt("query", TypeSchema::String, "What the turn says; omit to preview a session start."),
- opt("thread_id", TypeSchema::String, "Session start: the thread being resumed."),
- opt("agent_id", TypeSchema::String, "The memory agent to preview as; the default agent when omitted."),
+ opt(
+ "query",
+ TypeSchema::String,
+ "What the turn says; omit to preview a session start.",
+ ),
+ opt(
+ "thread_id",
+ TypeSchema::String,
+ "Session start: the thread being resumed.",
+ ),
+ opt(
+ "agent_id",
+ TypeSchema::String,
+ "The memory agent to preview as; the default agent when omitted.",
+ ),
],
- outputs: out("{agent_id, root, mode: turn|session, pack: {markdown, tokens, refs, sections, skipped, engine}}"),
+ outputs: out(
+ "{agent_id, root, mode: turn|session, pack: {markdown, tokens, refs, sections, skipped, engine}}",
+ ),
}),
_ => None,
}
diff --git a/crates/openhuman-core/src/memory/schemas/defs/retrieval.rs b/crates/openhuman-core/src/memory/schemas/defs/retrieval.rs
index dddcc1caff..a831a1037d 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/retrieval.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/retrieval.rs
@@ -1,4 +1,4 @@
-use super::common::{out, req, opt, limit, filter, reach, path, cursor};
+use super::common::{cursor, filter, limit, opt, out, path, reach, req};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -7,7 +7,11 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
namespace: "memory",
function: "recall",
description: "Ask memory a question; returns an answer with citations.",
- inputs: vec![req("question", TypeSchema::String, "The question."), filter(), limit()],
+ inputs: vec![
+ req("question", TypeSchema::String, "The question."),
+ filter(),
+ limit(),
+ ],
outputs: out("{answer, citations: Citation[], model?}"),
}),
"fetch" => Some(ControllerSchema {
@@ -15,12 +19,16 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "fetch",
description: "Raw retrieval over stored items, filtered by metadata.",
inputs: vec![
- req("query", TypeSchema::String, "What to search for."),
- opt("mode", TypeSchema::String, "keyword | vector | hybrid; limited to the engine's fetch_modes."),
- filter(),
- limit(),
- cursor(),
- ],
+ req("query", TypeSchema::String, "What to search for."),
+ opt(
+ "mode",
+ TypeSchema::String,
+ "keyword | vector | hybrid; limited to the engine's fetch_modes.",
+ ),
+ filter(),
+ limit(),
+ cursor(),
+ ],
outputs: out("{hits: Hit[], next_cursor?}"),
}),
"learn" => Some(ControllerSchema {
@@ -28,25 +36,44 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "learn",
description: "Store a learning.",
inputs: vec![
- req("text", TypeSchema::String, "The learning."),
- opt("kind", TypeSchema::String, "preference | fact | procedure | correction | other (default fact)."),
- opt("confidence", TypeSchema::F64, "Confidence in 0..=1 (default 0.8)."),
- opt("meta", TypeSchema::Json, "MemoryMeta to attach."),
- ],
+ req("text", TypeSchema::String, "The learning."),
+ opt(
+ "kind",
+ TypeSchema::String,
+ "preference | fact | procedure | correction | other (default fact).",
+ ),
+ opt(
+ "confidence",
+ TypeSchema::F64,
+ "Confidence in 0..=1 (default 0.8).",
+ ),
+ opt("meta", TypeSchema::Json, "MemoryMeta to attach."),
+ ],
outputs: out("{id}"),
}),
"forget" => Some(ControllerSchema {
namespace: "memory",
function: "forget",
description: "Remove items by id.",
- inputs: vec![req("ids", TypeSchema::Array(Box::new(TypeSchema::String)), "Item ids."), reach()],
+ inputs: vec![
+ req(
+ "ids",
+ TypeSchema::Array(Box::new(TypeSchema::String)),
+ "Item ids.",
+ ),
+ reach(),
+ ],
outputs: out("{forgotten: number}"),
}),
"erase_all" => Some(ControllerSchema {
namespace: "memory",
function: "erase_all",
description: "Erase all memory the bound engine holds, for good. On the hosted engine this erases the account's entire hosted memory.",
- inputs: vec![req("confirm", TypeSchema::Bool, "Must be true: nothing erased comes back.")],
+ inputs: vec![req(
+ "confirm",
+ TypeSchema::Bool,
+ "Must be true: nothing erased comes back.",
+ )],
outputs: out("{erased_scopes: number}"),
}),
"items_list" => Some(ControllerSchema {
@@ -58,7 +85,11 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
limit(),
cursor(),
path(),
- opt("preview", TypeSchema::Bool, "Snippet listing: a conversation or chunked document may carry only its start; read it whole with items_get."),
+ opt(
+ "preview",
+ TypeSchema::Bool,
+ "Snippet listing: a conversation or chunked document may carry only its start; read it whole with items_get.",
+ ),
],
outputs: out("{items: Hit[], next_cursor?}"),
}),
@@ -70,16 +101,36 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
req("facet", TypeSchema::String, "The facet to group by."),
path(),
filter(),
- opt("limit", TypeSchema::BoundedU64 { min: 1, max: 500 }, "Most buckets, largest first (default 50)."),
- opt("scan_limit", TypeSchema::BoundedU64 { min: 1, max: 50_000 }, "Most items a listing-based engine reads (default 5000)."),
+ opt(
+ "limit",
+ TypeSchema::BoundedU64 { min: 1, max: 500 },
+ "Most buckets, largest first (default 50).",
+ ),
+ opt(
+ "scan_limit",
+ TypeSchema::BoundedU64 {
+ min: 1,
+ max: 50_000,
+ },
+ "Most items a listing-based engine reads (default 5000).",
+ ),
],
- outputs: out("{facet, buckets: {value, count}[], total, missing, more_buckets, truncated}"),
+ outputs: out(
+ "{facet, buckets: {value, count}[], total, missing, more_buckets, truncated}",
+ ),
}),
"items_get" => Some(ControllerSchema {
namespace: "memory",
function: "items_get",
description: "Read stored items whole by id, in the order asked; unknown ids are left out.",
- inputs: vec![req("ids", TypeSchema::Array(Box::new(TypeSchema::String)), "Item ids (1 to 200)."), reach()],
+ inputs: vec![
+ req(
+ "ids",
+ TypeSchema::Array(Box::new(TypeSchema::String)),
+ "Item ids (1 to 200).",
+ ),
+ reach(),
+ ],
outputs: out("{items: Hit[]}"),
}),
_ => None,
diff --git a/crates/openhuman-core/src/memory/schemas/defs/sources.rs b/crates/openhuman-core/src/memory/schemas/defs/sources.rs
index 92f97dddc2..be6ae61938 100644
--- a/crates/openhuman-core/src/memory/schemas/defs/sources.rs
+++ b/crates/openhuman-core/src/memory/schemas/defs/sources.rs
@@ -1,4 +1,4 @@
-use super::common::{out, req, opt};
+use super::common::{opt, out, req};
use crate::core::ControllerSchema;
pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
@@ -15,12 +15,35 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "sources_add",
description: "Add a document source.",
inputs: vec![
- req("kind", TypeSchema::String, "folder | file | link | github | rss | composio."),
- req("target", TypeSchema::String, "Path, URL, owner/repo, feed URL or Composio toolkit."),
- opt("label", TypeSchema::String, "Display label (default: the target)."),
- opt("schedule_mins", TypeSchema::BoundedU64 { min: 15, max: u64::from(u32::MAX) }, "Minutes between scheduled syncs; omit for on demand only."),
- opt("namespace", TypeSchema::String, "Layout root to file the documents under, e.g. `team:acme`; the configured root (shared by every agent) when omitted."),
- ],
+ req(
+ "kind",
+ TypeSchema::String,
+ "folder | file | link | github | rss | composio.",
+ ),
+ req(
+ "target",
+ TypeSchema::String,
+ "Path, URL, owner/repo, feed URL or Composio toolkit.",
+ ),
+ opt(
+ "label",
+ TypeSchema::String,
+ "Display label (default: the target).",
+ ),
+ opt(
+ "schedule_mins",
+ TypeSchema::BoundedU64 {
+ min: 15,
+ max: u64::from(u32::MAX),
+ },
+ "Minutes between scheduled syncs; omit for on demand only.",
+ ),
+ opt(
+ "namespace",
+ TypeSchema::String,
+ "Layout root to file the documents under, e.g. `team:acme`; the configured root (shared by every agent) when omitted.",
+ ),
+ ],
outputs: out("{source: Source}"),
}),
"sources_remove" => Some(ControllerSchema {
@@ -28,16 +51,24 @@ pub(super) fn schema(function: &str) -> Option<ControllerSchema> {
function: "sources_remove",
description: "Remove a document source.",
inputs: vec![
- req("id", TypeSchema::String, "Source id."),
- opt("forget_items", TypeSchema::Bool, "Also forget everything it stored."),
- ],
+ req("id", TypeSchema::String, "Source id."),
+ opt(
+ "forget_items",
+ TypeSchema::Bool,
+ "Also forget everything it stored.",
+ ),
+ ],
outputs: out("{removed: boolean}"),
}),
"sources_sync" => Some(ControllerSchema {
namespace: "memory",
function: "sources_sync",
description: "Start syncing one source, or all of them.",
- inputs: vec![opt("id", TypeSchema::String, "Source id; every source when omitted.")],
+ inputs: vec![opt(
+ "id",
+ TypeSchema::String,
+ "Source id; every source when omitted.",
+ )],
outputs: out("{started: string[]}"),
}),
_ => None,
diff --git a/crates/openhuman-core/src/memory/schemas/handlers.rs b/crates/openhuman-core/src/memory/schemas/handlers.rs
index dd20059147..4191682faa 100644
--- a/crates/openhuman-core/src/memory/schemas/handlers.rs
+++ b/crates/openhuman-core/src/memory/schemas/handlers.rs
@@ -4,9 +4,9 @@
use std::future::Future;
use crate::config::Config;
+use crate::core::Outcome;
use crate::core::all::ControllerFuture;
use crate::core::runtime::DispatchCtx;
-use crate::core::Outcome;
use crate::memory::error::{MemoryError, MemoryResult};
use crate::memory::explore::{ExploreParams, ItemsGetParams};
use crate::memory::lifecycle::views::{self, JobsRunParams, PackPreviewParams, PolicySetParams};
@@ -18,9 +18,9 @@ use crate::memory::types::{
SourcesSyncView,
};
use crate::memory::{backfill, brain, confine, engine, import, layout_migration, ops, sources};
-use serde::de::DeserializeOwned;
use serde::Serialize;
-use serde_json::{json, Map, Value};
+use serde::de::DeserializeOwned;
+use serde_json::{Map, Value, json};
/// The operation run after the common request parsing and config load.
trait RpcOperation<P, R>: Send + 'static {
diff --git a/crates/openhuman-rpc/src/server/http/health_tests.rs b/crates/openhuman-rpc/src/server/http/health_tests.rs
index dcb7372700..bf3dc5408e 100644
--- a/crates/openhuman-rpc/src/server/http/health_tests.rs
+++ b/crates/openhuman-rpc/src/server/http/health_tests.rs
@@ -8,7 +8,7 @@ struct RawSchemaDump<'a> {
#[tokio::test]
async fn get_schema_memory_entries_match_the_pre_refactor_raw_bytes() {
- use axum::body::{to_bytes, Body};
+ use axum::body::{Body, to_bytes};
use axum::http::{Request, StatusCode};
use sha2::{Digest, Sha256};
use tower::ServiceExt;
@@ -34,7 +34,11 @@ async fn get_schema_memory_entries_match_the_pre_refactor_raw_bytes() {
(value["namespace"] == "memory").then_some(method.get())
})
.collect();
- assert_eq!(memory_methods.len(), 35, "all memory controller schemas appear");
+ assert_eq!(
+ memory_methods.len(),
+ 35,
+ "all memory controller schemas appear"
+ );
let mut memory_bytes = Vec::new();
for method in &memory_methods {
@@ -53,8 +57,7 @@ async fn get_schema_memory_entries_match_the_pre_refactor_raw_bytes() {
"memory schema methods' raw byte count"
);
assert_eq!(
- memory_digest,
- "7b1b15f7e40cc7f4e6b767ea8eb4d17e49c5a3a5c6250164a733af828ec22783",
+ memory_digest, "7b1b15f7e40cc7f4e6b767ea8eb4d17e49c5a3a5c6250164a733af828ec22783",
"memory schema methods' raw SHA-256"
);
}