Skip to content

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

test(wire_golden_tests): update golden test fixture for memory tool changes

Steven Enamakel10c9b131c9c4
diff --git a/crates/openhuman-core/src/mcp/server/wire_golden_tests.rs b/crates/openhuman-core/src/mcp/server/wire_golden_tests.rs
index 29dacabd20..4df928acdb 100644
--- a/crates/openhuman-core/src/mcp/server/wire_golden_tests.rs
+++ b/crates/openhuman-core/src/mcp/server/wire_golden_tests.rs
@@ -234,7 +234,7 @@ const LINE_CASES: &[(&str, Option<&str>)] = &[
),
];
-const TOOLS_LIST_BASE: &str = r#"{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List the live core agent tool catalog that OpenHuman exposes to its orchestrator session.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"core.list_tools","title":"List Core Tools"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Emit the markdown tool-use instructions block that OpenHuman injects into prompt-guided agents.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"core.tool_instructions","title":"Get Tool Instructions"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List registered sub-agent definitions that the core can dispatch for specialized work.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"agent.list_subagents","title":"List Subagents"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Run a registered OpenHuman sub-agent directly from the core and return its final response.","inputSchema":{"additionalProperties":false,"properties":{"agent_id":{"description":"Registered sub-agent id (for example `planner`, `code_executor`, `critic`).","type":"string"},"prompt":{"description":"Task prompt for the sub-agent. Include the context it needs because this is a fresh session.","type":"string"}},"required":["agent_id","prompt"],"type":"object"},"name":"agent.run_subagent","title":"Run Subagent"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Keyword-search OpenHuman's local memory tree and return matching chunks ordered by recency. Every token in the query must appear in the stored chunk preview (ASCII case-insensitive, any order); punctuation between tokens does not matter. Results are preview-based, so zero hits do not prove that content is absent; try fewer/shorter tokens or `memory.recall` (semantic).","inputSchema":{"additionalProperties":false,"properties":{"k":{"description":"Maximum chunks to return. Defaults to 10; capped at 50.","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"Keywords; each must appear in the stored chunk preview (any order). Prefer a few short, distinctive tokens over long exact phrases; zero hits do not prove absence.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"memory.recall","title":"Search Memory"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Semantically recall local memory-tree chunks relevant to a natural-language query.","inputSchema":{"additionalProperties":false,"properties":{"k":{"description":"Maximum chunks to return. Defaults to 10; capped at 50.","maximum":50,"minimum":1,"type":"integer"},"query":{"description":"Natural-language query to embed and rerank against memory summaries.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"memory.recall","title":"Recall Memory"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Read one memory-tree chunk by id. Use this to inspect the source text behind search or recall results.","inputSchema":{"additionalProperties":false,"properties":{"chunk_id":{"description":"Chunk id returned by memory.search or memory.recall.","type":"string"}},"required":["chunk_id"],"type":"object"},"name":"tree.read_chunk","title":"Read Memory Chunk"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Paginated listing of memory-tree chunks in reverse-chronological order, with optional filters by source kind, source id, entity id, time window, and token-AND keyword. Every token must appear in the stored chunk preview (ASCII case-insensitive, any order; punctuation does not matter). Use this when the user wants to enumerate (\"what's recent in my Gmail\", \"show me everything from last week about Alice\") rather than search by query. Returns chunks plus a total match count for pagination.","inputSchema":{"additionalProperties":false,"properties":{"entity_ids":{"description":"Restrict to chunks referencing any of these canonical entity ids (e.g. `person:Alice`, `email:[email protected]`). Use `tree.top_entities` to discover these.","items":{"type":"string"},"type":"array"},"k":{"description":"Maximum chunks per page. Defaults to 10; capped at 50.","maximum":50,"minimum":1,"type":"integer"},"offset":{"description":"Pagination offset (number of rows to skip). Defaults to 0.","minimum":0,"type":"integer"},"query":{"description":"Keywords matched against the stored chunk preview; every token must appear (ASCII case-insensitive, any order; punctuation does not matter). Zero hits do not prove absence.","minLength":1,"type":"string"},"since_ms":{"description":"Inclusive lower bound on chunk timestamp, in milliseconds since Unix epoch.","minimum":0,"type":"integer"},"source_ids":{"description":"Restrict to specific logical source ids (e.g. a Slack channel id). Use `tree.list_sources` to discover these.","items":{"type":"string"},"type":"array"},"source_kinds":{"description":"Restrict to one or more source kinds (e.g. `email`, `chat`, `document`). Omit to include all kinds.","items":{"type":"string"},"type":"array"},"until_ms":{"description":"Inclusive upper bound on chunk timestamp, in milliseconds since Unix epoch.","minimum":0,"type":"integer"}},"required":[],"type":"object"},"name":"tree.browse","title":"Browse Memory"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List the most-referenced canonical entities (people, organizations, topics, emails) across the local memory tree. Call this for entity discovery before drilling in with `tree.browse` (passing `entity_ids`) or `memory.search`. Returns entities ordered by reference count.","inputSchema":{"additionalProperties":false,"properties":{"k":{"description":"Maximum entities to return. Defaults to 10; capped at 50.","maximum":50,"minimum":1,"type":"integer"},"kind":{"description":"Restrict to a single entity kind (`person`, `email`, `topic`, `org`, …). Omit to span all kinds.","minLength":1,"type":"string"}},"required":[],"type":"object"},"name":"tree.top_entities","title":"Top Memory Entities"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List every distinct ingest source (Gmail account, Slack channel, Notion workspace, email thread, …) that has data in the memory tree, with chunk counts and last-activity timestamps. Use this when the user asks \"what data sources do I have\" or to discover source ids to pass into `tree.browse`.","inputSchema":{"additionalProperties":false,"properties":{"user_email_hint":{"description":"When provided, the user's own email is stripped from email-thread display names so the other party shows up instead. Optional.","minLength":1,"type":"string"}},"required":[],"type":"object"},"name":"tree.list_sources","title":"List Memory Sources"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Create a new memory document from content. The document is stored in the specified namespace (default `mcp`) and can be retrieved via `memory.search` or `memory.recall`.","inputSchema":{"additionalProperties":false,"properties":{"content":{"description":"The text content to store as a memory document.","minLength":1,"type":"string"},"namespace":{"description":"Namespace to store the document in. Defaults to `mcp` when omitted.","minLength":1,"type":"string"},"tags":{"description":"Optional tags for categorisation and filtering.","items":{"type":"string"},"type":"array"},"title":{"description":"Human-readable title for the memory document.","minLength":1,"type":"string"}},"required":["title","content"],"type":"object"},"name":"memory.store","title":"Store Memory"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Append a note to an existing memory chunk by storing a linked annotation document. The note references the original chunk_id for provenance and can be retrieved alongside it.","inputSchema":{"additionalProperties":false,"properties":{"chunk_id":{"description":"ID of the memory chunk to annotate. Use an ID from memory.search or memory.recall results.","minLength":1,"type":"string"},"note_text":{"description":"The note text to attach to the chunk.","minLength":1,"type":"string"}},"required":["chunk_id","note_text"],"type":"object"},"name":"memory.note","title":"Annotate Memory Chunk"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Apply one or more category tags to an existing memory chunk. Stored as an upsertable tag-record document linked to the target chunk_id, so re-tagging the same chunk replaces the prior tag set rather than accumulating duplicate annotations. Differs from `memory.note` in that the payload is a categorical label list — queryable via the document `tags` field — rather than free-form text.","inputSchema":{"additionalProperties":false,"properties":{"chunk_id":{"description":"ID of the memory chunk to tag. Use an ID from `memory.search`, `memory.recall`, or `tree.browse` results.","minLength":1,"type":"string"},"tags":{"description":"One or more category labels to attach (e.g. `[\"todo\", \"q3-planning\"]`). Re-tagging the same chunk replaces the prior tag set; supply the complete desired set on each call.","items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"}},"required":["chunk_id","tags"],"type":"object"},"name":"tree.tag","title":"Tag Memory Chunk"}]}}"#;
+const TOOLS_LIST_BASE: &str = r#"{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List the live core agent tool catalog that OpenHuman exposes to its orchestrator session.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"core.list_tools","title":"List Core Tools"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Emit the markdown tool-use instructions block that OpenHuman injects into prompt-guided agents.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"core.tool_instructions","title":"Get Tool Instructions"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"List registered sub-agent definitions that the core can dispatch for specialized work.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"agent.list_subagents","title":"List Subagents"},{"annotations":{"destructiveHint":true,"idempotentHint":false,"openWorldHint":true,"readOnlyHint":false},"description":"Run a registered OpenHuman sub-agent directly from the core and return its final response.","inputSchema":{"additionalProperties":false,"properties":{"agent_id":{"description":"Registered sub-agent id (for example `planner`, `code_executor`, `critic`).","type":"string"},"prompt":{"description":"Task prompt for the sub-agent. Include the context it needs because this is a fresh session.","type":"string"}},"required":["agent_id","prompt"],"type":"object"},"name":"agent.run_subagent","title":"Run Subagent"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Ask OpenHuman's memory a natural-language question and get a synthesised answer with citations to the stored items it rests on. Read-only. Fails with MEMORY_OFF when no memory engine is usable.","inputSchema":{"additionalProperties":false,"properties":{"filter":{"additionalProperties":false,"description":"Metadata filter; every given field must match. An empty filter matches everything.","properties":{"agent_id":{"description":"Exact id of the agent that produced the item.","minLength":1,"type":"string"},"commit":{"description":"Exact commit.","minLength":1,"type":"string"},"file_path":{"description":"File path, exact or as a path prefix.","minLength":1,"type":"string"},"folder":{"description":"Folder, exact or as a path prefix.","minLength":1,"type":"string"},"kinds":{"description":"Item kinds to include; omit for all.","items":{"enum":["document","conversation","learning"],"type":"string"},"type":"array"},"language":{"description":"Exact language (`rust`, `python`, `en`, ...).","minLength":1,"type":"string"},"observed_after":{"description":"Inclusive lower bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"observed_before":{"description":"Exclusive upper bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"repo":{"description":"Exact repository, `owner/name` or a remote URL.","minLength":1,"type":"string"},"sources":{"description":"Source kinds to include; omit for all.","items":{"enum":["folder","file","link","github","rss","composio","conversation","agent","import"],"type":"string"},"type":"array"},"tags_any":{"description":"Match items carrying any one of these tags.","items":{"minLength":1,"type":"string"},"type":"array"},"thread_id":{"description":"Exact conversation thread id.","minLength":1,"type":"string"},"url":{"description":"Exact URL the item was read from.","minLength":1,"type":"string"},"workspace":{"description":"Exact workspace (absolute path or logical id).","minLength":1,"type":"string"}},"type":"object"},"limit":{"description":"Maximum citations to return. Defaults to 10; capped at 100.","maximum":100,"minimum":1,"type":"integer"},"question":{"description":"The question to answer from memory, in natural language.","minLength":1,"type":"string"}},"required":["question"],"type":"object"},"name":"memory.recall","title":"Recall Memory"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Raw retrieval over stored memory items: returns matching hits (text, metadata, score) best first, optionally narrowed by a metadata filter. `mode` must be one the active engine supports; both launch engines (`tinyhumans`, `cortexdb`) support only `hybrid`, so omit `mode` unless you know otherwise. Pass the returned `next_cursor` as `cursor` for the next page. Read-only.","inputSchema":{"additionalProperties":false,"properties":{"cursor":{"description":"`next_cursor` from the previous page.","minLength":1,"type":"string"},"filter":{"additionalProperties":false,"description":"Metadata filter; every given field must match. An empty filter matches everything.","properties":{"agent_id":{"description":"Exact id of the agent that produced the item.","minLength":1,"type":"string"},"commit":{"description":"Exact commit.","minLength":1,"type":"string"},"file_path":{"description":"File path, exact or as a path prefix.","minLength":1,"type":"string"},"folder":{"description":"Folder, exact or as a path prefix.","minLength":1,"type":"string"},"kinds":{"description":"Item kinds to include; omit for all.","items":{"enum":["document","conversation","learning"],"type":"string"},"type":"array"},"language":{"description":"Exact language (`rust`, `python`, `en`, ...).","minLength":1,"type":"string"},"observed_after":{"description":"Inclusive lower bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"observed_before":{"description":"Exclusive upper bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"repo":{"description":"Exact repository, `owner/name` or a remote URL.","minLength":1,"type":"string"},"sources":{"description":"Source kinds to include; omit for all.","items":{"enum":["folder","file","link","github","rss","composio","conversation","agent","import"],"type":"string"},"type":"array"},"tags_any":{"description":"Match items carrying any one of these tags.","items":{"minLength":1,"type":"string"},"type":"array"},"thread_id":{"description":"Exact conversation thread id.","minLength":1,"type":"string"},"url":{"description":"Exact URL the item was read from.","minLength":1,"type":"string"},"workspace":{"description":"Exact workspace (absolute path or logical id).","minLength":1,"type":"string"}},"type":"object"},"limit":{"description":"Maximum hits to return. Defaults to 10; capped at 100.","maximum":100,"minimum":1,"type":"integer"},"mode":{"description":"Retrieval mode. Must be one the active engine supports; both launch engines support only `hybrid`. Omit to use the engine's default.","enum":["keyword","vector","hybrid"],"type":"string"},"query":{"description":"What to search for.","minLength":1,"type":"string"}},"required":["query"],"type":"object"},"name":"memory.fetch","title":"Fetch Memory"},{"annotations":{"openWorldHint":false,"readOnlyHint":true},"description":"Page through stored memory items, newest first, optionally narrowed by a metadata filter. Use this to enumerate (\"what did I store last week\") rather than search by query. Pass the returned `next_cursor` as `cursor` for the next page. Read-only.","inputSchema":{"additionalProperties":false,"properties":{"cursor":{"description":"`next_cursor` from the previous page.","minLength":1,"type":"string"},"filter":{"additionalProperties":false,"description":"Metadata filter; every given field must match. An empty filter matches everything.","properties":{"agent_id":{"description":"Exact id of the agent that produced the item.","minLength":1,"type":"string"},"commit":{"description":"Exact commit.","minLength":1,"type":"string"},"file_path":{"description":"File path, exact or as a path prefix.","minLength":1,"type":"string"},"folder":{"description":"Folder, exact or as a path prefix.","minLength":1,"type":"string"},"kinds":{"description":"Item kinds to include; omit for all.","items":{"enum":["document","conversation","learning"],"type":"string"},"type":"array"},"language":{"description":"Exact language (`rust`, `python`, `en`, ...).","minLength":1,"type":"string"},"observed_after":{"description":"Inclusive lower bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"observed_before":{"description":"Exclusive upper bound on when the fact was observed (RFC 3339).","format":"date-time","type":"string"},"repo":{"description":"Exact repository, `owner/name` or a remote URL.","minLength":1,"type":"string"},"sources":{"description":"Source kinds to include; omit for all.","items":{"enum":["folder","file","link","github","rss","composio","conversation","agent","import"],"type":"string"},"type":"array"},"tags_any":{"description":"Match items carrying any one of these tags.","items":{"minLength":1,"type":"string"},"type":"array"},"thread_id":{"description":"Exact conversation thread id.","minLength":1,"type":"string"},"url":{"description":"Exact URL the item was read from.","minLength":1,"type":"string"},"workspace":{"description":"Exact workspace (absolute path or logical id).","minLength":1,"type":"string"}},"type":"object"},"limit":{"description":"Maximum items to return. Defaults to 10; capped at 100.","maximum":100,"minimum":1,"type":"integer"}},"required":[],"type":"object"},"name":"memory.list","title":"List Memory Items"},{"annotations":{"destructiveHint":false,"idempotentHint":false,"openWorldHint":false,"readOnlyHint":false},"description":"Store one explicit learning (a preference, fact, procedure or correction) in OpenHuman's memory. Returns the new item id. Adds an item; never modifies or removes existing ones.","inputSchema":{"additionalProperties":false,"properties":{"confidence":{"description":"Confidence in the learning, 0 to 1. Defaults to 0.8.","maximum":1,"minimum":0,"type":"number"},"kind":{"description":"What kind of learning this is. Defaults to `fact`.","enum":["preference","fact","procedure","correction","other"],"type":"string"},"text":{"description":"What was learned, as a self-contained statement.","minLength":1,"type":"string"}},"required":["text"],"type":"object"},"name":"memory.learn","title":"Learn Memory"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"openWorldHint":false,"readOnlyHint":false},"description":"Permanently remove memory items by id (ids come from memory.fetch, memory.list or the citations of memory.recall). Returns how many were forgotten. This cannot be undone.","inputSchema":{"additionalProperties":false,"properties":{"ids":{"description":"Ids of the memory items to remove permanently.","items":{"minLength":1,"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["ids"],"type":"object"},"name":"memory.forget","title":"Forget Memory"}]}}"#;
/// The resource catalog's ungated head. The tail depends on the `flows` and
/// `skills` features, so it is checked by shape rather than by bytes.