@ateam-ai/mcp 0.4.89 → 0.4.91

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 +2 -2
  2. package/src/tools.js +36 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ateam-ai/mcp",
3
- "version": "0.4.89",
3
+ "version": "0.4.91",
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",
@@ -13,7 +13,7 @@
13
13
  "start:http": "node src/index.js --http",
14
14
  "dev": "node --watch src/index.js",
15
15
  "dev:http": "node --watch src/index.js --http",
16
- "test": "node test/session-isolation.test.mjs && node test/widget-protocol.test.mjs && node test/actor-binding.test.mjs && node test/spec-topics.test.mjs && node test/example-types.test.mjs && node --test test/deploy-status-truth.test.mjs && node --test test/connector-source-provenance.test.mjs"
16
+ "test": "node test/session-isolation.test.mjs && node test/widget-protocol.test.mjs && node test/actor-binding.test.mjs && node test/spec-topics.test.mjs && node test/example-types.test.mjs && node --test test/deploy-status-truth.test.mjs && node --test test/connector-source-provenance.test.mjs && node --test test/bootstrap-base-url.test.mjs"
17
17
  },
18
18
  "keywords": [
19
19
  "mcp",
package/src/tools.js CHANGED
@@ -3176,11 +3176,25 @@ function chainTreeOf(resp) {
3176
3176
  // is the difference between proving behaviour and matching a string that a
3177
3177
  // rename would quietly satisfy.
3178
3178
  export const handlers = {
3179
- ateam_bootstrap: async () => ({
3179
+ // (_args, sid) the SESSION ID IS LOAD-BEARING HERE.
3180
+ //
3181
+ // getBaseUrl(sessionId) resolves per-session first (api.js:326-339): a caller
3182
+ // that passed `url` to ateam_auth is talking to THAT api, and the session
3183
+ // holds it. Bootstrap called it with NO argument, so it skipped the
3184
+ // per-session and bearer branches every time and reported the process
3185
+ // DEFAULT — https://api.ateam-ai.com.
3186
+ //
3187
+ // The result was a tool that says PROD while the session is authenticated to
3188
+ // DEV, in the one field whose whole job is to tell you which environment you
3189
+ // are on. Observed live: a session working entirely against
3190
+ // dev-api.ateam-ai.com was told base_url: https://api.ateam-ai.com, and had
3191
+ // to learn from deploy errors which environment it was actually on. The
3192
+ // dangerous direction is the mirror image — believing you are on dev.
3193
+ ateam_bootstrap: async (_args, sid) => ({
3180
3194
  runtime: {
3181
3195
  ateam_mcp_version: MCP_VERSION,
3182
- base_url: getBaseUrl(),
3183
- _note: "The version of the ateam-mcp process actually serving this call, and the API it talks to. If a fix looks missing, check this FIRST — a local MCP process keeps running the code it loaded at session start, so a pushed/published fix is not live until the process restarts.",
3196
+ base_url: getBaseUrl(sid),
3197
+ _note: "The version of the ateam-mcp process actually serving this call, and the API THIS SESSION talks to (per-session, as set by ateam_auth's `url`). If a fix looks missing, check this FIRST — a local MCP process keeps running the code it loaded at session start, so a pushed/published fix is not live until the process restarts.",
3184
3198
  },
3185
3199
  platform_positioning: {
3186
3200
  name: "A-Team",
@@ -3926,10 +3940,29 @@ export const handlers = {
3926
3940
  }
3927
3941
 
3928
3942
  // Phase 2.5: Restart connectors that have source code (upload triggers stop+start)
3943
+ //
3944
+ // A runtime:"device" connector is SKIPPED. It has authored source — the RN
3945
+ // bundle (rn-src/, package.json, the esbuild config) — so it looks like an
3946
+ // ordinary connector to a loop that only asks "does it have files?". But
3947
+ // there is no server process to restart: the bundle ships to the phone.
3948
+ // Uploading it here 409s on the merge and then health marked the connector
3949
+ // "error", failing a deploy whose connector was working as designed.
3950
+ //
3951
+ // Classified from the DECLARED connectors[], which the caller authored —
3952
+ // not by asking Core. Same ownership rule the Builder now follows.
3953
+ const deviceConnectorIds = new Set(
3954
+ (connectors || [])
3955
+ .filter((c) => c && typeof c === "object" && c.runtime === "device" && c.id)
3956
+ .map((c) => c.id),
3957
+ );
3929
3958
  if (effectiveMcpStore && Object.keys(effectiveMcpStore).length > 0) {
3930
3959
  const connectorResults = [];
3931
3960
  for (const [connId, files] of Object.entries(effectiveMcpStore)) {
3932
3961
  if (!Array.isArray(files) || files.length === 0) continue;
3962
+ if (deviceConnectorIds.has(connId)) {
3963
+ connectorResults.push({ id: connId, ok: true, tools: 0, skipped: "device_runtime" });
3964
+ continue;
3965
+ }
3933
3966
  try {
3934
3967
  const uploadResult = await post(
3935
3968
  `/deploy/solutions/${solutionId}/connectors/${connId}/upload`,