Skip to content

The agent that grows with you

fix(desktop): plugin install no longer fails its own wire contract (#119254)

Siddharth Balyand826001ae58e
diff --git a/apps/shared/src/gateway-contract.generated.ts b/apps/shared/src/gateway-contract.generated.ts
index c4035818f1b..4d795cdf2ea 100644
--- a/apps/shared/src/gateway-contract.generated.ts
+++ b/apps/shared/src/gateway-contract.generated.ts
@@ -3873,6 +3873,7 @@ export interface PluginsManageResult {
plugin_name?: string | null
warnings?: string[] | null
missing_env?: string[] | null
+ python_dependencies?: string[] | null
after_install_path?: string | null
enabled?: boolean | null
sha?: string | null
diff --git a/apps/shared/src/gateway-contract.openrpc.json b/apps/shared/src/gateway-contract.openrpc.json
index 60c30ea202f..0733ce1bcff 100644
--- a/apps/shared/src/gateway-contract.openrpc.json
+++ b/apps/shared/src/gateway-contract.openrpc.json
@@ -19853,6 +19853,21 @@
"default": null,
"title": "Missing Env"
},
+ "python_dependencies": {
+ "anyOf": [
+ {
+ "items": {
+ "type": "string"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "title": "Python Dependencies"
+ },
"after_install_path": {
"anyOf": [
{
diff --git a/tests/tui_gateway/test_plugins_manage_install.py b/tests/tui_gateway/test_plugins_manage_install.py
index 22b503ecae4..784ac5c3430 100644
--- a/tests/tui_gateway/test_plugins_manage_install.py
+++ b/tests/tui_gateway/test_plugins_manage_install.py
@@ -7,10 +7,14 @@ from tui_gateway import server
def test_plugins_manage_install_success():
+ # The real ``dashboard_install_plugin`` ok payload, key for key. Under HERMES_TEST_ISOLATION the
+ # dispatcher validates the result against ``PluginsManageResult`` (extra=forbid), so a key the
+ # installer emits but the contract lacks fails here instead of only in the desktop's errors.log.
payload = {
"ok": True,
"plugin_name": "hello-world",
"warnings": [],
+ "python_dependencies": [],
"missing_env": [],
"after_install_path": None,
"enabled": True,
diff --git a/tui_gateway/contracts/tools_mcp_plugins.py b/tui_gateway/contracts/tools_mcp_plugins.py
index c46603830fc..5ca8a9a53fd 100644
--- a/tui_gateway/contracts/tools_mcp_plugins.py
+++ b/tui_gateway/contracts/tools_mcp_plugins.py
@@ -691,6 +691,8 @@ class PluginsManageResult(Result):
plugin_name: str | None = None
warnings: list[str] | None = None
missing_env: list[str] | None = None
+ # ``install`` → the manifest's ``python_dependencies`` the installer applied (``[]`` when none).
+ python_dependencies: list[str] | None = None
after_install_path: str | None = None
enabled: bool | None = None
sha: str | None = None