@ateam-ai/mcp 0.4.38 → 0.4.40
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 +12 -2
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -1066,6 +1066,10 @@ export const tools = [
|
|
|
1066
1066
|
type: "boolean",
|
|
1067
1067
|
description: "Opt into FULL REPLACE: wipe the connector dir and write only the provided `files`. Default: false (= merge with GitHub state at `ref`). Use with intent — sending an incomplete file set with replace:true will break the connector.",
|
|
1068
1068
|
},
|
|
1069
|
+
force: {
|
|
1070
|
+
type: "boolean",
|
|
1071
|
+
description: "RECOVERY: respawn the connector + re-inject its CURRENT env even when the source is UNCHANGED. Normally an unchanged-source upload no-ops (unchanged:true) and leaves the process running. But a connector spawned before a shared-secret rotation keeps the STALE secret — it still lists tools (looks healthy) yet 401s on every per-actor call, with no recovery short of a fake source edit. Use `ateam_upload_connector(solution_id, connector_id, github:true, force:true)` to pull the current source and force a fresh respawn (which picks up the current secret). Default: false.",
|
|
1072
|
+
},
|
|
1069
1073
|
},
|
|
1070
1074
|
required: ["solution_id", "connector_id"],
|
|
1071
1075
|
},
|
|
@@ -4307,11 +4311,16 @@ const handlers = {
|
|
|
4307
4311
|
const id = c.id || c.connector_id || c.name;
|
|
4308
4312
|
const connected = c.status === "connected" || c.connected === true || c.ok === true || c.healthy === true;
|
|
4309
4313
|
const tools = Array.isArray(c.tools) ? c.tools.length : (typeof c.tools === "number" ? c.tools : (c.toolCount ?? c.tool_count));
|
|
4310
|
-
|
|
4314
|
+
// OPEN-30(c): a connector can be connected + list tools yet 401 on every
|
|
4315
|
+
// per-actor call (stale/rotated credential). Surface Core's auth marker.
|
|
4316
|
+
const auth_error = c.auth_error || c.authError || null;
|
|
4317
|
+
return { id, connected, tools, ...(auth_error ? { auth_error } : {}) };
|
|
4311
4318
|
});
|
|
4312
4319
|
for (const c of out.connectors) {
|
|
4313
4320
|
if (!c.connected) gaps.push(`connector '${c.id}' not connected`);
|
|
4314
4321
|
else if (c.tools === 0) gaps.push(`connector '${c.id}' connected but discovered 0 tools`);
|
|
4322
|
+
// Connected + tools > 0 but auth failing = the silent OPEN-30 failure — flag it.
|
|
4323
|
+
if (c.auth_error) gaps.push(`connector '${c.id}' connected but auth failing (${c.auth_error}) — per-actor calls 401; refresh its credential (ateam_upload_connector github:true force:true)`);
|
|
4315
4324
|
}
|
|
4316
4325
|
} catch (e) {
|
|
4317
4326
|
out.connectors = { error: e.message };
|
|
@@ -4464,7 +4473,7 @@ const handlers = {
|
|
|
4464
4473
|
return del(`/deploy/solutions/${solution_id}/connectors/${connector_id}`, sid);
|
|
4465
4474
|
},
|
|
4466
4475
|
|
|
4467
|
-
ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace }, sid) => {
|
|
4476
|
+
ateam_upload_connector: async ({ solution_id, connector_id, github, files, ref, replace, force }, sid) => {
|
|
4468
4477
|
// OPEN-32: accept content_base64 per file (single-line, escape-safe) and
|
|
4469
4478
|
// decode it to plain content here, so an agent can upload a multi-file
|
|
4470
4479
|
// connector without hand-escaping ~90KB of HTML/JS/JSON in one tool call —
|
|
@@ -4501,6 +4510,7 @@ const handlers = {
|
|
|
4501
4510
|
files: normFiles,
|
|
4502
4511
|
...(ref ? { ref } : {}),
|
|
4503
4512
|
...(replace === true ? { replace: true } : {}),
|
|
4513
|
+
...(force === true ? { force: true } : {}),
|
|
4504
4514
|
};
|
|
4505
4515
|
const url = `/deploy/solutions/${solution_id}/connectors/${connector_id}/upload`;
|
|
4506
4516
|
let kicked;
|