@ateam-ai/mcp 0.4.14 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/tools.js +29 -2
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -2017,6 +2017,32 @@ export default {
|
|
|
2017
2017
|
});
|
|
2018
2018
|
}
|
|
2019
2019
|
|
|
2020
|
+
// Emit a manifest.json with the render block the platform requires. A plugin
|
|
2021
|
+
// is only DISCOVERABLE + RENDERABLE if it appears in the connector's
|
|
2022
|
+
// ui.listPlugins / ui.getPlugin output WITH a render.{ mode, iframeUrl?,
|
|
2023
|
+
// reactNative? } — dropping the HTML/TSX files alone is NOT enough. This
|
|
2024
|
+
// manifest is the source of truth for that block; connectors whose
|
|
2025
|
+
// ui.listPlugins is generated from ui-dist/<plugin>/manifest.json pick it up
|
|
2026
|
+
// automatically, and for connectors with a HARDCODED plugin list (e.g.
|
|
2027
|
+
// personal-assistant-ui-mcp) copy this render block into their ui.getPlugin.
|
|
2028
|
+
const mode = k === "iframe" ? "iframe" : k === "rn" ? "react-native" : "adaptive";
|
|
2029
|
+
const render = { mode };
|
|
2030
|
+
if (k === "iframe" || k === "adaptive") render.iframeUrl = `/ui/${pluginName}/index.html`;
|
|
2031
|
+
if (k === "rn" || k === "adaptive") render.reactNative = { component: pluginName };
|
|
2032
|
+
const prettyName = pluginName.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
2033
|
+
files.push({
|
|
2034
|
+
path: `ui-dist/${pluginName}/manifest.json`,
|
|
2035
|
+
content: JSON.stringify({
|
|
2036
|
+
id: pluginName,
|
|
2037
|
+
name: prettyName,
|
|
2038
|
+
version: "1.0.0",
|
|
2039
|
+
description: `${prettyName} plugin — replace with your real description.`,
|
|
2040
|
+
render,
|
|
2041
|
+
channels: ["command"],
|
|
2042
|
+
capabilities: { commands: [] },
|
|
2043
|
+
}, null, 2) + "\n",
|
|
2044
|
+
});
|
|
2045
|
+
|
|
2020
2046
|
return files;
|
|
2021
2047
|
}
|
|
2022
2048
|
|
|
@@ -3899,8 +3925,9 @@ const handlers = {
|
|
|
3899
3925
|
k === "iframe" || k === "adaptive"
|
|
3900
3926
|
? `Edit ui-dist/${plugin_name}/index.html — replace the placeholder UI.`
|
|
3901
3927
|
: null,
|
|
3902
|
-
`
|
|
3903
|
-
|
|
3928
|
+
`A manifest.json (with the required render block) was written to ui-dist/${plugin_name}/manifest.json.`,
|
|
3929
|
+
`⚠️ REQUIRED to render: the plugin must appear in this connector's ui.listPlugins / ui.getPlugin output WITH that render block. Dropping the files alone does NOT register it. If the connector has a HARDCODED plugin list (e.g. personal-assistant-ui-mcp: UI_PLUGINS[] + PLUGIN_MANIFESTS{} in server.js), add this plugin there — copy the render block from the manifest.json. Verify with ateam_get_solution(solution_id, "connectors_health") or ateam_get_widget_catalog after deploy.`,
|
|
3930
|
+
`Then declare it at solution level (ui_plugins[]) so a skill can open it via sys.focusUiPlugin — see ateam_get_spec(topic:"widgets").`,
|
|
3904
3931
|
].filter(Boolean),
|
|
3905
3932
|
};
|
|
3906
3933
|
},
|