Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/TEST-COVERAGE-MATRIX.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil
| 11.1.2 | Actionable Item Extraction | VU | `app/src/components/intelligence/__tests__/utils.test.ts` (this PR) | ✅ | Was ❌ |
| 11.1.3 | Analyze Trigger | WD | `app/test/e2e/specs/insights-dashboard.spec.ts` mounts the route (this PR); explicit analyze-handler invocation TBD | 🟡 | Route mounts and search/filter UI assert — full analyze trigger flow tracked as follow-up |
| 11.1.4 | MCP stdio server | RU | `src/openhuman/mcp_server/` | ✅ | Read-only initialize/tools/list/tools/call plus stdio framing; binary smoke in PR validation |
| 11.1.5 | Global tool registry | RI | `src/openhuman/tool_registry/`, `tests/json_rpc_e2e.rs` | ✅ | Read-only MCP/controller discovery with routes, schemas, version, allowed agents, and health |
Comment thread
coderabbitai[bot] marked this conversation as resolved.

### 11.2 Insights Dashboard

Expand Down Expand Up @@ -476,11 +477,11 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil

| Status | Count |
| ---------------- | ------------------------------------------------ |
| ✅ Covered | 64 |
| ✅ Covered | 65 |
| 🟡 Partial | 27 |
| ❌ Missing | 27 |
| 🚫 Manual smoke | 11 |
| **Total leaves** | **129 explicit + nested = 200 product features** |
| **Total leaves** | **130 explicit + nested = 201 product features** |

PR-A delta: 13 leaves moved from ❌ → ✅ via 5 WDIO specs + 2 Vitest + 1 Rust integration test.
Remaining gaps tracked under sub-issues #965 (process), #966 (docs), #967 (tools), #968 (auth/perm), #969 (settings), #970 (rewards), #971 (manual smoke).
21 changes: 18 additions & 3 deletions gitbooks/developing/mcp-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ accepts optional `source_kinds`, `source_ids`, `entity_ids`, `since_ms`,
`until_ms`, `query`, `k`, and `offset`. `tree.top_entities` accepts optional
`kind` and `k`. `tree.list_sources` accepts an optional `user_email_hint`.

## Tool Registry

The HTTP JSON-RPC server also exposes a read-only global tool registry for
agents and dashboards that need discovery metadata without opening an MCP stdio
session:

| RPC method | Purpose |
| --- | --- |
| `openhuman.tool_registry_list` | List MCP stdio tools and controller-backed tools with stable `tool_id`, route, version, input/output schemas, allowed agents, tags, enabled state, and health. |
| `openhuman.tool_registry_get` | Return one registry entry by `tool_id`, for example `memory.search` or `tools.web_search`. |

The registry is discovery-only. It does not change tool dispatch or permission
checks; MCP calls still go through `tools/call`, and controller-backed tools
still route through their existing JSON-RPC methods.

## Smoke Test

```bash
Expand All @@ -46,9 +61,9 @@ printf '%s\n' \
| openhuman-core mcp
```

The response should include `capabilities.tools` from `initialize` and all six
tool names from `tools/list`. A successful run writes exactly two compact JSON
response lines to stdout; the `notifications/initialized` message is a
The response should include `capabilities.tools` from `initialize` and the
curated tool names from `tools/list`. A successful run writes exactly two compact
JSON response lines to stdout; the `notifications/initialized` message is a
notification and has no response.

```text
Expand Down
1 change: 1 addition & 0 deletions scripts/feature-ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"11.1.2",
"11.1.3",
"11.1.4",
"11.1.5",
"11.2.1",
"11.2.2",
"11.2.3",
Expand Down
6 changes: 6 additions & 0 deletions src/core/all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ fn build_registered_controllers() -> Vec<RegisteredController> {
controllers.extend(crate::openhuman::workspace::all_workspace_registered_controllers());
// Skill tool registry
controllers.extend(crate::openhuman::tools::all_tools_registered_controllers());
// Unified read-only registry across MCP stdio tools and controller-backed tools
controllers.extend(crate::openhuman::tool_registry::all_tool_registry_registered_controllers());
// Document and knowledge graph storage
controllers.extend(crate::openhuman::memory::all_memory_registered_controllers());
// Memory tree ingestion layer (#707 — canonicalised chunks with provenance)
Expand Down Expand Up @@ -291,6 +293,7 @@ fn build_declared_controller_schemas() -> Vec<ControllerSchema> {
schemas.extend(crate::openhuman::skills::all_skills_controller_schemas());
schemas.extend(crate::openhuman::workspace::all_workspace_controller_schemas());
schemas.extend(crate::openhuman::tools::all_tools_controller_schemas());
schemas.extend(crate::openhuman::tool_registry::all_tool_registry_controller_schemas());
schemas.extend(crate::openhuman::memory::all_memory_controller_schemas());
schemas.extend(crate::openhuman::memory::all_memory_tree_controller_schemas());
schemas.extend(crate::openhuman::memory::all_retrieval_controller_schemas());
Expand Down Expand Up @@ -392,6 +395,9 @@ pub fn namespace_description(namespace: &str) -> Option<&'static str> {
"referral" => Some("Referral codes, stats, and apply flows via the hosted backend API."),
"billing" => Some("Subscription plan, payment links, and credit top-up via the backend."),
"team" => Some("Team member management, invites, and role changes via the backend."),
"tool_registry" => Some(
"Read-only discovery for MCP stdio tools and controller-backed tools, including routes, schemas, version, allowed agents, and health.",
),
"test" => Some(
"E2E test support — wipe sidecar state in-place between specs.",
),
Expand Down
1 change: 1 addition & 0 deletions src/core/all_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ fn namespace_description_known_namespaces() {
assert!(namespace_description("config").is_some());
assert!(namespace_description("health").is_some());
assert!(namespace_description("security").is_some());
assert!(namespace_description("tool_registry").is_some());
assert!(namespace_description("voice").is_some());
assert!(namespace_description("webhooks").is_some());
assert!(namespace_description("notification").is_some());
Expand Down
10 changes: 10 additions & 0 deletions src/openhuman/about_app/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,16 @@ const CAPABILITIES: &[Capability] = &[
status: CapabilityStatus::Beta,
privacy: LOCAL_RAW,
},
Capability {
id: "intelligence.tool_registry",
name: "Tool Registry",
domain: "intelligence",
category: CapabilityCategory::Intelligence,
description: "Discover OpenHuman's MCP stdio tools and controller-backed tools from one local registry, including versions, routes, input/output schemas, allowed agents, and health state.",
how_to: "Call openhuman.tool_registry_list over core JSON-RPC, or openhuman.tool_registry_get with a tool_id such as memory.search.",
status: CapabilityStatus::Beta,
privacy: LOCAL_RAW,
},
Capability {
id: "intelligence.orchestrator_worker_thread",
name: "Worker Thread Delegation",
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/about_app/catalog_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn catalog_includes_additional_user_facing_surfaces() {
"meet.join_call",
"meet_agent.live_loop",
"intelligence.mcp_server",
"intelligence.tool_registry",
] {
assert!(
ids.contains(expected),
Expand Down
1 change: 1 addition & 0 deletions src/openhuman/mcp_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ mod stdio;
mod tools;

pub use stdio::run_stdio_from_cli;
pub use tools::{tool_specs, McpToolSpec};
1 change: 1 addition & 0 deletions src/openhuman/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub mod text_input;
pub mod threads;
pub mod todos;
pub mod tokenjuice;
pub mod tool_registry;
pub mod tool_timeout;
pub mod tools;
pub mod tree_summarizer;
Expand Down
12 changes: 12 additions & 0 deletions src/openhuman/tool_registry/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//! Unified read-only tool registry for discovery across OpenHuman tool surfaces.

pub mod ops;
mod schemas;
mod types;

pub use ops::{get_tool, list_tools, registry_entries};
pub use schemas::{
all_controller_schemas as all_tool_registry_controller_schemas,
all_registered_controllers as all_tool_registry_registered_controllers,
};
pub use types::{ToolRegistryEntry, ToolRegistryHealth, ToolRegistryList, ToolRegistryTransport};
Loading
Loading