From c611186b8e14318242a268dc0be3188bff0aa26d Mon Sep 17 00:00:00 2001 From: "cyrus@tinyhumans.ai" Date: Thu, 28 May 2026 08:03:48 +0530 Subject: [PATCH 1/3] fix(rpc): register missing MCP and tool registry RPC handlers The five legacy method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW) were not registered in either the server-side or client-side alias tables: - openhuman.tool_registry_call (early mis-spelling of mcp_clients_tool_call) - openhuman.mcp_servers_list (old list method name) - openhuman.mcp_list (bare name before namespacing) - openhuman.mcp_clients_list (pre-canonical list method) - mcp_clients.list (dotted-namespace variant) Added symmetric aliases to both: - src/core/legacy_aliases.rs: server-side rewrite before dispatch (Tier 0 in dispatch.rs), so older shipped bundles calling the legacy names are silently routed to the canonical handlers without "unknown method" errors. - app/src/services/rpcMethods.ts: CORE_RPC_METHODS entries for the two canonical methods (mcp_clients_installed_list, mcp_clients_tool_call) and LEGACY_METHOD_ALIASES entries for all five legacy names, so newer frontend builds also normalise outgoing calls before they hit the wire. Added unit tests in rpcMethods.test.ts covering each legacy alias, the pass-through of canonical names, and a drift-guard that cross-checks CORE_RPC_METHODS entries against the mcp_registry/schemas.rs catalog. Closes #2789 --- app/src/services/__tests__/rpcMethods.test.ts | 50 ++++++++++++++++++- app/src/services/rpcMethods.ts | 9 ++++ src/core/legacy_aliases.rs | 19 +++++++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/app/src/services/__tests__/rpcMethods.test.ts b/app/src/services/__tests__/rpcMethods.test.ts index b9f03846c6..4859df8b7a 100644 --- a/app/src/services/__tests__/rpcMethods.test.ts +++ b/app/src/services/__tests__/rpcMethods.test.ts @@ -53,6 +53,48 @@ describe('rpcMethods catalog', () => { ); }); + describe('MCP client legacy alias resolution (Sentry CORE-RUST-DW/DV/DT/DS/DR)', () => { + test('mcp_clients.list resolves to mcp_clients_installed_list', () => { + expect(normalizeRpcMethod('mcp_clients.list')).toBe(CORE_RPC_METHODS.mcpClientsInstalledList); + }); + + test('openhuman.mcp_clients_list resolves to mcp_clients_installed_list', () => { + expect(normalizeRpcMethod('openhuman.mcp_clients_list')).toBe( + CORE_RPC_METHODS.mcpClientsInstalledList + ); + }); + + test('openhuman.mcp_list resolves to mcp_clients_installed_list', () => { + expect(normalizeRpcMethod('openhuman.mcp_list')).toBe( + CORE_RPC_METHODS.mcpClientsInstalledList + ); + }); + + test('openhuman.mcp_servers_list resolves to mcp_clients_installed_list', () => { + expect(normalizeRpcMethod('openhuman.mcp_servers_list')).toBe( + CORE_RPC_METHODS.mcpClientsInstalledList + ); + }); + + test('openhuman.tool_registry_call resolves to mcp_clients_tool_call', () => { + expect(normalizeRpcMethod('openhuman.tool_registry_call')).toBe( + CORE_RPC_METHODS.mcpClientsToolCall + ); + }); + + test('canonical mcp_clients_installed_list passes through unchanged', () => { + expect(normalizeRpcMethod('openhuman.mcp_clients_installed_list')).toBe( + 'openhuman.mcp_clients_installed_list' + ); + }); + + test('canonical mcp_clients_tool_call passes through unchanged', () => { + expect(normalizeRpcMethod('openhuman.mcp_clients_tool_call')).toBe( + 'openhuman.mcp_clients_tool_call' + ); + }); + }); + test('catalog canonical methods exist in core schema registry (drift guard)', () => { const schemaSources = [ fs.readFileSync( @@ -75,6 +117,10 @@ describe('rpcMethods catalog', () => { path.resolve(__dirname, '../../../../src/openhuman/embeddings/schemas.rs'), 'utf8' ), + fs.readFileSync( + path.resolve(__dirname, '../../../../src/openhuman/mcp_registry/schemas.rs'), + 'utf8' + ), ].join('\n'); for (const method of Object.values(CORE_RPC_METHODS)) { @@ -89,7 +135,9 @@ describe('rpcMethods catalog', () => { ? 'embeddings' : methodRoot.startsWith('providers_') ? 'providers' - : 'config'; + : methodRoot.startsWith('mcp_clients_') + ? 'mcp_clients' + : 'config'; const fnName = methodRoot.slice(`${namespace}_`.length); expect(schemaSources).toContain(`namespace: "${namespace}"`); expect(schemaSources).toContain(`function: "${fnName}"`); diff --git a/app/src/services/rpcMethods.ts b/app/src/services/rpcMethods.ts index a5cb50490f..8ea7e78b51 100644 --- a/app/src/services/rpcMethods.ts +++ b/app/src/services/rpcMethods.ts @@ -35,11 +35,20 @@ export const CORE_RPC_METHODS = { embeddingsClearApiKey: 'openhuman.embeddings_clear_api_key', embeddingsEmbed: 'openhuman.embeddings_embed', embeddingsTestConnection: 'openhuman.embeddings_test_connection', + mcpClientsInstalledList: 'openhuman.mcp_clients_installed_list', + mcpClientsToolCall: 'openhuman.mcp_clients_tool_call', } as const; export type CoreRpcMethod = (typeof CORE_RPC_METHODS)[keyof typeof CORE_RPC_METHODS]; export const LEGACY_METHOD_ALIASES: Record = { + // MCP clients — old method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW). + // See src/core/legacy_aliases.rs for the Rust-side mirror of this table. + 'mcp_clients.list': CORE_RPC_METHODS.mcpClientsInstalledList, + 'openhuman.mcp_clients_list': CORE_RPC_METHODS.mcpClientsInstalledList, + 'openhuman.mcp_list': CORE_RPC_METHODS.mcpClientsInstalledList, + 'openhuman.mcp_servers_list': CORE_RPC_METHODS.mcpClientsInstalledList, + 'openhuman.tool_registry_call': CORE_RPC_METHODS.mcpClientsToolCall, 'openhuman.get_analytics_settings': CORE_RPC_METHODS.configGetAnalyticsSettings, 'openhuman.get_composio_trigger_settings': CORE_RPC_METHODS.configGetComposioTriggerSettings, 'openhuman.get_config': CORE_RPC_METHODS.configGet, diff --git a/src/core/legacy_aliases.rs b/src/core/legacy_aliases.rs index bb9e476438..56aac40900 100644 --- a/src/core/legacy_aliases.rs +++ b/src/core/legacy_aliases.rs @@ -34,6 +34,25 @@ const LEGACY_ALIASES: &[(&str, &str)] = &[ "openhuman.get_runtime_flags", "openhuman.config_get_runtime_flags", ), + // MCP clients — old method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW). + // Callers used dotted namespace, bare `mcp_list`, `mcp_servers_list`, and + // `mcp_clients_list` before the canonical `mcp_clients_installed_list` was + // introduced in PR #2409. `tool_registry_call` was an early mis-spelling of + // `mcp_clients_tool_call` that shipped in at least one older bundle. + ("mcp_clients.list", "openhuman.mcp_clients_installed_list"), + ( + "openhuman.mcp_clients_list", + "openhuman.mcp_clients_installed_list", + ), + ("openhuman.mcp_list", "openhuman.mcp_clients_installed_list"), + ( + "openhuman.mcp_servers_list", + "openhuman.mcp_clients_installed_list", + ), + ( + "openhuman.tool_registry_call", + "openhuman.mcp_clients_tool_call", + ), ("openhuman.ping", "core.ping"), ( "openhuman.set_browser_allow_all", From 284901433dc349e42936aea06c04cbd984d94eb1 Mon Sep 17 00:00:00 2001 From: "cyrus@tinyhumans.ai" Date: Thu, 28 May 2026 11:33:47 +0530 Subject: [PATCH 2/3] ci: retrigger CI checks after cache-save flake on Windows runner From f5e94084aff8130c63463d8d82c3a5cbeb03b8d7 Mon Sep 17 00:00:00 2001 From: M3gA-Mind Date: Thu, 28 May 2026 18:27:11 +0530 Subject: [PATCH 3/3] fix(rpc): restore alphabetical order of legacy alias table entries `mcp_clients.list` starts with `m` so it must precede all `openhuman.*` entries (m < o); move it to the top of LEGACY_ALIASES. `openhuman.tool_registry_call` starts with `t` so it must follow `openhuman.set_browser_allow_all` (s < t); move it after that entry. Both were inserted inside the openhuman.get_* / openhuman.mcp_* block in the original commit, breaking the "kept alphabetical by legacy key" invariant stated in the module docstring. All 19 legacy_aliases unit tests pass including the frontend parity drift guard. --- src/core/legacy_aliases.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/core/legacy_aliases.rs b/src/core/legacy_aliases.rs index 56aac40900..e53e976e5a 100644 --- a/src/core/legacy_aliases.rs +++ b/src/core/legacy_aliases.rs @@ -21,6 +21,13 @@ /// Order doesn't matter for correctness, but is kept alphabetical by legacy /// key for easier diffing against the frontend table. const LEGACY_ALIASES: &[(&str, &str)] = &[ + // MCP clients — old method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW). + // Callers used dotted namespace, bare `mcp_list`, `mcp_servers_list`, and + // `mcp_clients_list` before the canonical `mcp_clients_installed_list` was + // introduced in PR #2409. `tool_registry_call` was an early mis-spelling of + // `mcp_clients_tool_call` that shipped in at least one older bundle. + // `mcp_clients.list` sorts before all `openhuman.*` entries (m < o). + ("mcp_clients.list", "openhuman.mcp_clients_installed_list"), ( "openhuman.get_analytics_settings", "openhuman.config_get_analytics_settings", @@ -34,12 +41,6 @@ const LEGACY_ALIASES: &[(&str, &str)] = &[ "openhuman.get_runtime_flags", "openhuman.config_get_runtime_flags", ), - // MCP clients — old method names that appeared in Sentry (CORE-RUST-DR/DS/DT/DV/DW). - // Callers used dotted namespace, bare `mcp_list`, `mcp_servers_list`, and - // `mcp_clients_list` before the canonical `mcp_clients_installed_list` was - // introduced in PR #2409. `tool_registry_call` was an early mis-spelling of - // `mcp_clients_tool_call` that shipped in at least one older bundle. - ("mcp_clients.list", "openhuman.mcp_clients_installed_list"), ( "openhuman.mcp_clients_list", "openhuman.mcp_clients_installed_list", @@ -49,15 +50,15 @@ const LEGACY_ALIASES: &[(&str, &str)] = &[ "openhuman.mcp_servers_list", "openhuman.mcp_clients_installed_list", ), - ( - "openhuman.tool_registry_call", - "openhuman.mcp_clients_tool_call", - ), ("openhuman.ping", "core.ping"), ( "openhuman.set_browser_allow_all", "openhuman.config_set_browser_allow_all", ), + ( + "openhuman.tool_registry_call", + "openhuman.mcp_clients_tool_call", + ), ( "openhuman.update_analytics_settings", "openhuman.config_update_analytics_settings",