@ateam-ai/mcp 0.4.14 → 0.4.16

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.js +37 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.14",
3
+ "version": "0.4.16",
4
4
  "mcpName": "io.github.ariekogan/ateam-mcp",
5
5
  "description": "A-Team MCP Server — build, validate, and deploy multi-agent solutions from any AI environment",
6
6
  "type": "module",
package/src/tools.js CHANGED
@@ -771,11 +771,14 @@ export const tools = [
771
771
  "Eliminates ~50% of identical plugin boilerplate (imports, theme/bridge hooks, " +
772
772
  "postMessage protocol, default export shape). You then fill in the component body. " +
773
773
  "Use kind='iframe' for web-only, 'rn' for mobile-only, 'adaptive' for both. " +
774
- "Auto-discovery (Phase 5 of the strip) picks up the new plugin at next deploy " +
775
- "without a manifest declaration. " +
776
- "The scaffold MERGES into the existing connector (its server.js + other files are preserved) " +
777
- "works on both GitHub-backed and repo-less (locally-deployed) tenants; the merge base is the " +
778
- "GitHub repo when connected, otherwise the deployed connector source.",
774
+ "Also writes ui-dist/<plugin>/manifest.json with the required render block.\n\n" +
775
+ "⚠️ RENDERING IS NOT AUTOMATIC. At deploy, Phase 5 discovers plugins by calling each connector's " +
776
+ "ui.listPlugins + ui.getPlugin a plugin only appears (and renders) if the connector ADVERTISES it there " +
777
+ "with a render.{mode, iframeUrl?, reactNative?} block. Dropping the scaffold files alone does NOT register it. " +
778
+ "If the connector generates its plugin list from ui-dist/<plugin>/manifest.json, the emitted manifest is picked up automatically; " +
779
+ "if the connector has a HARDCODED list (e.g. personal-assistant-ui-mcp: UI_PLUGINS[] + PLUGIN_MANIFESTS{} in server.js), you MUST add this plugin there (copy the render block from the manifest.json). " +
780
+ "Verify after deploy with ateam_get_solution(solution_id, 'connectors_health') or ateam_get_widget_catalog. Then declare it at solution ui_plugins[] so a skill can open it via sys.focusUiPlugin (see ateam_get_spec topic:'widgets').\n\n" +
781
+ "The scaffold MERGES into the existing connector (server.js + other files preserved) — works on GitHub-backed AND repo-less tenants; merge base is the GitHub repo when connected, else the deployed connector source.",
779
782
  inputSchema: {
780
783
  type: "object",
781
784
  properties: {
@@ -2017,6 +2020,32 @@ export default {
2017
2020
  });
2018
2021
  }
2019
2022
 
2023
+ // Emit a manifest.json with the render block the platform requires. A plugin
2024
+ // is only DISCOVERABLE + RENDERABLE if it appears in the connector's
2025
+ // ui.listPlugins / ui.getPlugin output WITH a render.{ mode, iframeUrl?,
2026
+ // reactNative? } — dropping the HTML/TSX files alone is NOT enough. This
2027
+ // manifest is the source of truth for that block; connectors whose
2028
+ // ui.listPlugins is generated from ui-dist/<plugin>/manifest.json pick it up
2029
+ // automatically, and for connectors with a HARDCODED plugin list (e.g.
2030
+ // personal-assistant-ui-mcp) copy this render block into their ui.getPlugin.
2031
+ const mode = k === "iframe" ? "iframe" : k === "rn" ? "react-native" : "adaptive";
2032
+ const render = { mode };
2033
+ if (k === "iframe" || k === "adaptive") render.iframeUrl = `/ui/${pluginName}/index.html`;
2034
+ if (k === "rn" || k === "adaptive") render.reactNative = { component: pluginName };
2035
+ const prettyName = pluginName.replace(/-/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
2036
+ files.push({
2037
+ path: `ui-dist/${pluginName}/manifest.json`,
2038
+ content: JSON.stringify({
2039
+ id: pluginName,
2040
+ name: prettyName,
2041
+ version: "1.0.0",
2042
+ description: `${prettyName} plugin — replace with your real description.`,
2043
+ render,
2044
+ channels: ["command"],
2045
+ capabilities: { commands: [] },
2046
+ }, null, 2) + "\n",
2047
+ });
2048
+
2020
2049
  return files;
2021
2050
  }
2022
2051
 
@@ -3899,8 +3928,9 @@ const handlers = {
3899
3928
  k === "iframe" || k === "adaptive"
3900
3929
  ? `Edit ui-dist/${plugin_name}/index.html — replace the placeholder UI.`
3901
3930
  : null,
3902
- `Phase 5 auto-discovery will register the plugin at next deploy.`,
3903
- `Optional: drop a manifest.json next to the source for custom commands/capabilities.`,
3931
+ `A manifest.json (with the required render block) was written to ui-dist/${plugin_name}/manifest.json.`,
3932
+ `⚠️ 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.`,
3933
+ `Then declare it at solution level (ui_plugins[]) so a skill can open it via sys.focusUiPlugin — see ateam_get_spec(topic:"widgets").`,
3904
3934
  ].filter(Boolean),
3905
3935
  };
3906
3936
  },