@ateam-ai/mcp 0.4.27 → 0.4.29
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 +31 -3
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
get, post, patch, del,
|
|
13
13
|
setSessionCredentials, isAuthenticated, isExplicitlyAuthenticated,
|
|
14
14
|
getCredentials, parseApiKey, touchSession, getSessionContext,
|
|
15
|
-
setAuthOverride, switchTenant, isMasterMode, listTenants, getWhere,
|
|
15
|
+
setAuthOverride, switchTenant, isMasterMode, listTenants, getWhere, getBaseUrl,
|
|
16
16
|
} from "./api.js";
|
|
17
17
|
|
|
18
18
|
// Mutating / stateful tools whose result should carry a `_where` stamp
|
|
@@ -103,6 +103,14 @@ function _summarizeDef(def) {
|
|
|
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
105
|
...(def.tools && { tools: pick(def.tools, "name") }),
|
|
106
|
+
// OPEN-20: connector-imported tools don't all appear as literal entries in
|
|
107
|
+
// `tools` — they come from `toolbox_imports` and/or wildcard entries like
|
|
108
|
+
// "connector-id:*" that EXPAND to every tool of that connector at runtime.
|
|
109
|
+
// Surface both so an agent doesn't read a real runtime tool as "missing".
|
|
110
|
+
...(def.toolbox_imports && { toolbox_imports: pick(def.toolbox_imports, "connector_id") || def.toolbox_imports }),
|
|
111
|
+
...((Array.isArray(def.tools) && def.tools.some((t) => typeof (t?.name) === "string" && t.name.endsWith(":*"))) && {
|
|
112
|
+
_tools_note: "Entries ending ':*' (or toolbox_imports) grant ALL of that connector's tools at RUNTIME — the specific tool names (e.g. 'connector.foo.get') are callable even though they aren't listed literally here. Verify with a live test_skill / connectors_health, not this summary.",
|
|
113
|
+
}),
|
|
106
114
|
_fields: Object.keys(def),
|
|
107
115
|
_note: "compact summary — pass include_definition:true to ateam_patch for the full definition.",
|
|
108
116
|
};
|
|
@@ -332,7 +340,7 @@ export const tools = [
|
|
|
332
340
|
properties: {
|
|
333
341
|
topic: {
|
|
334
342
|
type: "string",
|
|
335
|
-
enum: ["overview", "skill", "solution", "enums", "connector-multi-user", "python_helpers", "widgets", "ui-plugins"],
|
|
343
|
+
enum: ["overview", "skill", "solution", "enums", "connector-multi-user", "python_helpers", "widgets", "ui-plugins", "actor-storage", "voice", "voice-native", "triggers", "sub-agent", "consumer-roles", "mobile-connector"],
|
|
336
344
|
description:
|
|
337
345
|
"What to fetch: 'overview' = API overview + endpoints, 'skill' = full skill spec, 'solution' = full solution spec, 'enums' = all enum values, 'connector-multi-user' = multi-user connector guide, 'python_helpers' = adas.* helper namespace for run_python_script orchestration (read this when designing personas that read state → call tools → checkpoint → status; without it, scripts hand-roll JSON parsing and tool delegation = 5-10x larger and brittler), 'widgets' = widget (UI plugin) spec: catalog model, how_to_use block shape (solution.json snippet + opener_call + persona_phrasing + binding_notes), and rules for declaring ui_plugins. Pair with ateam_get_widget_catalog for the live per-tenant inventory. 'ui-plugins' = the DEEP React Native (mobile) plugin build guide: author in rn-src/, compile with a build:rn esbuild script (format=cjs, target=es2015, external react/react-native/@adas/plugin-sdk) to rn-bundle/index.bundle.js, plain-object export — read this before authoring any MOBILE widget.",
|
|
338
346
|
},
|
|
@@ -1863,6 +1871,16 @@ const SPEC_PATHS = {
|
|
|
1863
1871
|
python_helpers: "/spec/python_helpers",
|
|
1864
1872
|
widgets: "/spec/widgets",
|
|
1865
1873
|
"ui-plugins": "/spec/ui-plugins",
|
|
1874
|
+
// Capability topics — MUST stay in sync with the capability catalog's
|
|
1875
|
+
// spec_topic values so every ateam_design_advisor `read_spec` pointer
|
|
1876
|
+
// resolves (was OPEN-19: advisor pointed at topics get_spec didn't accept).
|
|
1877
|
+
"actor-storage": "/spec/actor-storage",
|
|
1878
|
+
voice: "/spec/voice",
|
|
1879
|
+
"voice-native": "/spec/voice-native",
|
|
1880
|
+
triggers: "/spec/triggers",
|
|
1881
|
+
"sub-agent": "/spec/sub-agent",
|
|
1882
|
+
"consumer-roles": "/spec/consumer-roles",
|
|
1883
|
+
"mobile-connector": "/spec/mobile-connector",
|
|
1866
1884
|
};
|
|
1867
1885
|
|
|
1868
1886
|
const EXAMPLE_PATHS = {
|
|
@@ -2723,10 +2741,20 @@ const handlers = {
|
|
|
2723
2741
|
message: `Authenticated to tenant "${resolvedTenant}"${urlNote}. ${result.solutions?.length || 0} solution(s) found.`,
|
|
2724
2742
|
};
|
|
2725
2743
|
} catch (err) {
|
|
2744
|
+
// OPEN-18: a well-formed `adas_<tenant>_<hex>` key that's rejected is often
|
|
2745
|
+
// a key for the OTHER environment (a dev key against the prod base, or vice
|
|
2746
|
+
// versa). Surface the base we tried and, if it looks like that mismatch,
|
|
2747
|
+
// hint the dev-api retry — instead of a generic "invalid/unconfigured key".
|
|
2748
|
+
const base = getBaseUrl(sessionId) || "";
|
|
2749
|
+
const wellFormedKey = parseApiKey(api_key).isValid;
|
|
2750
|
+
const triedProd = /(?:^|\/\/)api\.ateam-ai\.com/.test(base);
|
|
2751
|
+
const hint = wellFormedKey && triedProd
|
|
2752
|
+
? ` This is a well-formed tenant key ("adas_${resolvedTenant}_…") but ${base} rejected it — if it's a DEV key, retry: ateam_auth(api_key, url:"https://dev-api.ateam-ai.com").`
|
|
2753
|
+
: ` (tried ${base || "the default base"})`;
|
|
2726
2754
|
return {
|
|
2727
2755
|
ok: false,
|
|
2728
2756
|
tenant: resolvedTenant,
|
|
2729
|
-
message: `Authentication failed: ${err.message}
|
|
2757
|
+
message: `Authentication failed: ${err.message}.${hint} The user can get a valid API key at https://mcp.ateam-ai.com/get-api-key`,
|
|
2730
2758
|
};
|
|
2731
2759
|
}
|
|
2732
2760
|
},
|