@ateam-ai/mcp 0.4.29 → 0.4.30
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 +26 -8
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -102,14 +102,14 @@ function _summarizeDef(def) {
|
|
|
102
102
|
...(def.connectors && { connectors: pick(def.connectors, "id") }),
|
|
103
103
|
...(def.platform_connectors && { platform_connectors: pick(def.platform_connectors, "id") }),
|
|
104
104
|
...(def.ui_plugins && { ui_plugins: pick(def.ui_plugins, "id") }),
|
|
105
|
-
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
...(def.
|
|
111
|
-
...((Array.isArray(def.
|
|
112
|
-
_tools_note:
|
|
105
|
+
// OPEN-20: `tools` here are the DECLARED tools only. A skill's REAL callable
|
|
106
|
+
// set also includes every tool of each connector in `connectors[]` — Core
|
|
107
|
+
// auto-imports those at deploy, so they're callable at runtime even though
|
|
108
|
+
// they're NOT listed here. So this summary UNDER-reports the toolset; don't
|
|
109
|
+
// read a connector tool's absence as "missing".
|
|
110
|
+
...(def.tools && { tools_declared: pick(def.tools, "name") }),
|
|
111
|
+
...((Array.isArray(def.connectors) && def.connectors.length > 0) && {
|
|
112
|
+
_tools_note: `Callable tools = tools_declared + ALL tools from linked connectors [${pick(def.connectors, "id").join(", ")}] (Core auto-imports them at deploy — NOT listed above). For the real runtime set use ateam_get_solution(view:"connectors_health") or a live ateam_test_skill; a connector tool (e.g. 'connector.foo.get') is callable via the LINK even if it isn't in tools_declared.`,
|
|
113
113
|
}),
|
|
114
114
|
_fields: Object.keys(def),
|
|
115
115
|
_note: "compact summary — pass include_definition:true to ateam_patch for the full definition.",
|
|
@@ -3159,6 +3159,7 @@ const handlers = {
|
|
|
3159
3159
|
ateam_patch: async ({ solution_id, target, skill_id, updates, test_message, dry_run, source, include_definition }, sid) => {
|
|
3160
3160
|
const phases = [];
|
|
3161
3161
|
let isNewSkill = false;
|
|
3162
|
+
let _connectorToolPush = null;
|
|
3162
3163
|
const _diff = { arrays_merged: [], arrays_replaced: [], scalars_changed: [], sections_replaced: [] };
|
|
3163
3164
|
|
|
3164
3165
|
// Two backing stores, chosen EXPLICITLY by `source` (never inferred):
|
|
@@ -3258,6 +3259,18 @@ const handlers = {
|
|
|
3258
3259
|
const field = key.replace(/_push$/, "");
|
|
3259
3260
|
const { parent, leaf } = _resolveDottedField(patched, field);
|
|
3260
3261
|
parent[leaf] = [...(Array.isArray(parent[leaf]) ? parent[leaf] : []), ...value];
|
|
3262
|
+
// Record the merge so a successful push is NOT reported as an empty
|
|
3263
|
+
// diff / silent no-op (OPEN-21 reporting gap).
|
|
3264
|
+
_diff.arrays_merged.push({ field, added: value.length });
|
|
3265
|
+
// OPEN-21: a connector's tools are granted by LINKING the connector
|
|
3266
|
+
// (connectors_push), NOT by pushing a definition into tools[]. Flag an
|
|
3267
|
+
// obviously connector-served push so we can redirect the agent.
|
|
3268
|
+
if (field === "tools") {
|
|
3269
|
+
const connectorish = value
|
|
3270
|
+
.filter((t) => t?.source?.type === "mcp_bridge" || (typeof t?.name === "string" && t.name.endsWith(":*")))
|
|
3271
|
+
.map((t) => t?.name).filter(Boolean);
|
|
3272
|
+
if (connectorish.length) _connectorToolPush = connectorish;
|
|
3273
|
+
}
|
|
3261
3274
|
} else if (key.endsWith("_delete")) {
|
|
3262
3275
|
if (!Array.isArray(value)) {
|
|
3263
3276
|
return { ok: false, phase: "patch", error: `${key} requires an array of names/ids (got ${typeof value}). Pass {"${key}": ["name1", "name2"]}.` };
|
|
@@ -3516,6 +3529,11 @@ const handlers = {
|
|
|
3516
3529
|
...(include_definition
|
|
3517
3530
|
? { patched }
|
|
3518
3531
|
: { patched_summary: _summarizeDef(patched) }),
|
|
3532
|
+
_diff,
|
|
3533
|
+
...(_connectorToolPush && {
|
|
3534
|
+
_connector_tool_hint:
|
|
3535
|
+
`Heads up: ${_connectorToolPush.join(", ")} look like CONNECTOR-served tools. A skill gains a connector's tools by LINKING the connector — updates:{ "connectors_push": ["<connector-id>"] } — NOT by pushing a definition into tools[]; Core auto-imports the connector's live tools at deploy. tools_push is only for the skill's OWN tool definitions.`,
|
|
3536
|
+
}),
|
|
3519
3537
|
...(isNewSkill && { created_skill: skill_id }),
|
|
3520
3538
|
...(redeployResult && { redeploy: redeployResult }),
|
|
3521
3539
|
...(widget_health && { widget_health }),
|