@topolo/mcp 0.4.8 → 0.4.9
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/dist/index.js +30 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -86,7 +86,7 @@ var SERVICES = {
|
|
|
86
86
|
mail: "https://mail.topolo.app",
|
|
87
87
|
mdm: "https://mdm.topolo.app",
|
|
88
88
|
messages: "https://messages.topolo.app",
|
|
89
|
-
nexus: "https://nexus
|
|
89
|
+
nexus: "https://nexus.topolo.app",
|
|
90
90
|
notify: "https://notify.topolo.app",
|
|
91
91
|
observability_watch: "https://observability-watch.topolo.app",
|
|
92
92
|
one: "https://www.topolo.app",
|
|
@@ -635,8 +635,10 @@ var APPLICATIONS = {
|
|
|
635
635
|
{
|
|
636
636
|
"name": "topolo-feed-api",
|
|
637
637
|
"kind": "worker",
|
|
638
|
-
"apiUrl":
|
|
639
|
-
"domains": [
|
|
638
|
+
"apiUrl": "https://feed-api.topolo.app",
|
|
639
|
+
"domains": [
|
|
640
|
+
"feed-api.topolo.app"
|
|
641
|
+
],
|
|
640
642
|
"routes": [],
|
|
641
643
|
"serviceId": null
|
|
642
644
|
},
|
|
@@ -1007,9 +1009,9 @@ var APPLICATIONS = {
|
|
|
1007
1009
|
{
|
|
1008
1010
|
"name": "topolo-nexus-gateway",
|
|
1009
1011
|
"kind": "worker",
|
|
1010
|
-
"apiUrl": "https://nexus
|
|
1012
|
+
"apiUrl": "https://nexus.topolo.app",
|
|
1011
1013
|
"domains": [
|
|
1012
|
-
"nexus
|
|
1014
|
+
"nexus.topolo.app"
|
|
1013
1015
|
],
|
|
1014
1016
|
"routes": [],
|
|
1015
1017
|
"serviceId": "nexus"
|
|
@@ -1369,8 +1371,10 @@ var APPLICATIONS = {
|
|
|
1369
1371
|
{
|
|
1370
1372
|
"name": "topolo-socialize-api",
|
|
1371
1373
|
"kind": "worker",
|
|
1372
|
-
"apiUrl":
|
|
1373
|
-
"domains": [
|
|
1374
|
+
"apiUrl": "https://socialize-api.topolo.app",
|
|
1375
|
+
"domains": [
|
|
1376
|
+
"socialize-api.topolo.app"
|
|
1377
|
+
],
|
|
1374
1378
|
"routes": [],
|
|
1375
1379
|
"serviceId": null
|
|
1376
1380
|
},
|
|
@@ -2214,10 +2218,14 @@ var TopoloClient = class _TopoloClient {
|
|
|
2214
2218
|
if (!serviceKey) {
|
|
2215
2219
|
throw new TopoloSdkError("unknown_service", "service is required");
|
|
2216
2220
|
}
|
|
2217
|
-
if (serviceKey === "auth") {
|
|
2221
|
+
if (serviceKey === "auth" || serviceKey === "developers") {
|
|
2218
2222
|
const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
|
|
2219
2223
|
if (overrideUrl) return { serviceKey, baseUrl: overrideUrl };
|
|
2220
|
-
|
|
2224
|
+
if (serviceKey === "developers") {
|
|
2225
|
+
const derived = deriveDevelopersFromAuth(resolveConfiguredServiceUrl("auth", this.serviceUrls));
|
|
2226
|
+
if (derived) return { serviceKey, baseUrl: derived };
|
|
2227
|
+
}
|
|
2228
|
+
return { serviceKey, baseUrl: DEFAULT_SERVICE_URLS[serviceKey] };
|
|
2221
2229
|
}
|
|
2222
2230
|
const live = await this.resolveLiveCallableService(serviceKey);
|
|
2223
2231
|
if (live) {
|
|
@@ -2257,7 +2265,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
2257
2265
|
if (!normalized) return null;
|
|
2258
2266
|
const configuredServiceId = resolveConfiguredServiceId(normalized, this.serviceIds);
|
|
2259
2267
|
if (configuredServiceId) return configuredServiceId;
|
|
2260
|
-
const authBase = resolveServiceUrl("
|
|
2268
|
+
const authBase = resolveServiceUrl("developers", this.serviceUrls);
|
|
2261
2269
|
const cacheKey = `${authBase}|${normalized}`;
|
|
2262
2270
|
const now = Date.now();
|
|
2263
2271
|
const cached = _TopoloClient.serviceIdCache.get(cacheKey);
|
|
@@ -2311,7 +2319,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
2311
2319
|
if (this.serviceCatalogCache && this.serviceCatalogCache.expiresAt > now) {
|
|
2312
2320
|
return this.serviceCatalogCache.entries;
|
|
2313
2321
|
}
|
|
2314
|
-
const res = await this.request({ service: "
|
|
2322
|
+
const res = await this.request({ service: "developers", method: "GET", path: "/api/services/catalog" });
|
|
2315
2323
|
const raw = res.data?.services ?? res.services;
|
|
2316
2324
|
if (!Array.isArray(raw)) {
|
|
2317
2325
|
throw new TopoloSdkError(
|
|
@@ -2542,6 +2550,17 @@ function serviceKeyCandidates2(slug) {
|
|
|
2542
2550
|
function normalizeLookupKey(value) {
|
|
2543
2551
|
return String(value || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
2544
2552
|
}
|
|
2553
|
+
function deriveDevelopersFromAuth(authUrl) {
|
|
2554
|
+
if (!authUrl) return null;
|
|
2555
|
+
try {
|
|
2556
|
+
const url = new URL(authUrl);
|
|
2557
|
+
if (!/^auth\./i.test(url.hostname)) return null;
|
|
2558
|
+
url.hostname = url.hostname.replace(/^auth\./i, "developers.");
|
|
2559
|
+
return url.origin;
|
|
2560
|
+
} catch {
|
|
2561
|
+
return null;
|
|
2562
|
+
}
|
|
2563
|
+
}
|
|
2545
2564
|
function catalogEntryMatches(entry, needle) {
|
|
2546
2565
|
return catalogEntryLookupKeys(entry).includes(needle);
|
|
2547
2566
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@topolo/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.9",
|
|
4
4
|
"description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"tsup": "^8.0.0",
|
|
25
25
|
"typescript": "^5.4.0",
|
|
26
26
|
"vitest": "^2.1.0",
|
|
27
|
-
"@topolo/sdk": "0.4.
|
|
27
|
+
"@topolo/sdk": "0.4.9"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=20"
|