@topolo/mcp 0.9.2 → 0.9.3

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/README.md CHANGED
@@ -168,10 +168,14 @@ relevant permissions, and new actions become discoverable/callable without an
168
168
  MCP release once the application publishes them.
169
169
 
170
170
  `topolo_read_action` and `topolo_call_action` accept an optional paired
171
- `resourceType` / `resourceId` context for app-local workspace boundaries. The
172
- SDK sends it as resource headers without changing the credential's personal or
173
- organization context. This lets agents address many workspaces independently;
174
- providing only one of the pair is rejected before the request is sent.
171
+ `resourceType` / `resourceId` context that scopes the call to one workspace (or
172
+ another cataloged resource alias). Workspaces are platform-owned — the record
173
+ lives once in TopoloAuth and a workspace belongs to exactly one app — so this
174
+ only selects which workspace the call is scoped to; it does not create or own
175
+ one. The SDK sends it as resource headers without changing the credential's
176
+ personal or organization context. This lets agents address many workspaces
177
+ independently; providing only one of the pair is rejected before the request is
178
+ sent.
175
179
 
176
180
  ## Safety rails
177
181
 
package/dist/dispatch.js CHANGED
@@ -203,7 +203,7 @@ var TOOLS = [
203
203
  properties: {
204
204
  actionId: { type: "string", minLength: 1 },
205
205
  input: { type: "object", additionalProperties: true },
206
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
206
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
207
207
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." }
208
208
  },
209
209
  required: ["actionId"],
@@ -235,7 +235,7 @@ var TOOLS = [
235
235
  properties: {
236
236
  actionId: { type: "string", minLength: 1 },
237
237
  input: { type: "object", additionalProperties: true },
238
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
238
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
239
239
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
240
240
  confirm: { type: "boolean" }
241
241
  },
@@ -296,7 +296,7 @@ var TOOLS = [
296
296
  properties: {
297
297
  actionId: { type: "string", minLength: 1 },
298
298
  input: { type: "object", additionalProperties: true },
299
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
299
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
300
300
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
301
301
  confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
302
302
  },
package/dist/http.js CHANGED
@@ -3098,9 +3098,9 @@ var require_data = __commonJS({
3098
3098
  }
3099
3099
  });
3100
3100
 
3101
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js
3101
+ // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js
3102
3102
  var require_utils = __commonJS({
3103
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/utils.js"(exports, module) {
3103
+ "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/utils.js"(exports, module) {
3104
3104
  "use strict";
3105
3105
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3106
3106
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
@@ -3411,9 +3411,9 @@ var require_utils = __commonJS({
3411
3411
  }
3412
3412
  });
3413
3413
 
3414
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js
3414
+ // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js
3415
3415
  var require_schemes = __commonJS({
3416
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3416
+ "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/lib/schemes.js"(exports, module) {
3417
3417
  "use strict";
3418
3418
  var { isUUID } = require_utils();
3419
3419
  var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
@@ -3621,9 +3621,9 @@ var require_schemes = __commonJS({
3621
3621
  }
3622
3622
  });
3623
3623
 
3624
- // ../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js
3624
+ // ../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js
3625
3625
  var require_fast_uri = __commonJS({
3626
- "../../node_modules/.pnpm/fast-uri@3.1.2/node_modules/fast-uri/index.js"(exports, module) {
3626
+ "../../node_modules/.pnpm/fast-uri@3.1.4/node_modules/fast-uri/index.js"(exports, module) {
3627
3627
  "use strict";
3628
3628
  var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3629
3629
  var { SCHEMES, getSchemeHandler } = require_schemes();
@@ -3764,6 +3764,7 @@ var require_fast_uri = __commonJS({
3764
3764
  return uriTokens.join("");
3765
3765
  }
3766
3766
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3767
+ var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
3767
3768
  function getParseError(parsed, matches) {
3768
3769
  if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3769
3770
  return 'URI path must start with "/" when authority is present.';
@@ -3793,6 +3794,11 @@ var require_fast_uri = __commonJS({
3793
3794
  uri = "//" + uri;
3794
3795
  }
3795
3796
  }
3797
+ const authorityMatch = uri.match(AUTHORITY_PREFIX);
3798
+ if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
3799
+ parsed.error = "URI authority must not contain a literal backslash.";
3800
+ malformedAuthorityOrPort = true;
3801
+ }
3796
3802
  const matches = uri.match(URI_PARSE);
3797
3803
  if (matches) {
3798
3804
  parsed.scheme = matches[1];
@@ -3836,7 +3842,7 @@ var require_fast_uri = __commonJS({
3836
3842
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
3837
3843
  if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
3838
3844
  try {
3839
- parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
3845
+ parsed.host = new URL("http://" + parsed.host).hostname;
3840
3846
  } catch (e) {
3841
3847
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
3842
3848
  }
@@ -16011,7 +16017,7 @@ var TOOLS = [
16011
16017
  properties: {
16012
16018
  actionId: { type: "string", minLength: 1 },
16013
16019
  input: { type: "object", additionalProperties: true },
16014
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
16020
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
16015
16021
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." }
16016
16022
  },
16017
16023
  required: ["actionId"],
@@ -16043,7 +16049,7 @@ var TOOLS = [
16043
16049
  properties: {
16044
16050
  actionId: { type: "string", minLength: 1 },
16045
16051
  input: { type: "object", additionalProperties: true },
16046
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
16052
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
16047
16053
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
16048
16054
  confirm: { type: "boolean" }
16049
16055
  },
@@ -16104,7 +16110,7 @@ var TOOLS = [
16104
16110
  properties: {
16105
16111
  actionId: { type: "string", minLength: 1 },
16106
16112
  input: { type: "object", additionalProperties: true },
16107
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
16113
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
16108
16114
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
16109
16115
  confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
16110
16116
  },
package/dist/index.js CHANGED
@@ -131,7 +131,9 @@ var APPLICATIONS = {
131
131
  "domains": [
132
132
  "admin.topolo.app"
133
133
  ],
134
- "routes": [],
134
+ "routes": [
135
+ "admin.topolo.app"
136
+ ],
135
137
  "appId": null
136
138
  },
137
139
  {
@@ -179,7 +181,7 @@ var APPLICATIONS = {
179
181
  "appDir": "TopoloAuth",
180
182
  "name": "topolo-auth",
181
183
  "packageName": "topolo-auth",
182
- "productionUrl": "https://auth.topolo.app/login",
184
+ "productionUrl": "https://auth.topolo.app",
183
185
  "services": [
184
186
  "auth"
185
187
  ],
@@ -215,7 +217,9 @@ var APPLICATIONS = {
215
217
  "domains": [
216
218
  "backup.topolo.app"
217
219
  ],
218
- "routes": [],
220
+ "routes": [
221
+ "backup.topolo.app"
222
+ ],
219
223
  "appId": "backup"
220
224
  }
221
225
  ]
@@ -267,9 +271,7 @@ var APPLICATIONS = {
267
271
  "domains": [
268
272
  "brand.topolo.app"
269
273
  ],
270
- "routes": [
271
- "brand.topolo.app"
272
- ],
274
+ "routes": [],
273
275
  "appId": "brand"
274
276
  },
275
277
  {
@@ -321,7 +323,9 @@ var APPLICATIONS = {
321
323
  "domains": [
322
324
  "bytes.topolo.app"
323
325
  ],
324
- "routes": [],
326
+ "routes": [
327
+ "bytes.topolo.app"
328
+ ],
325
329
  "appId": "bytes"
326
330
  },
327
331
  {
@@ -351,7 +355,9 @@ var APPLICATIONS = {
351
355
  "domains": [
352
356
  "calendar.topolo.app"
353
357
  ],
354
- "routes": [],
358
+ "routes": [
359
+ "calendar.topolo.app"
360
+ ],
355
361
  "appId": "calendar"
356
362
  },
357
363
  {
@@ -381,9 +387,7 @@ var APPLICATIONS = {
381
387
  "domains": [
382
388
  "campaigns.topolo.app"
383
389
  ],
384
- "routes": [
385
- "campaigns.topolo.app"
386
- ],
390
+ "routes": [],
387
391
  "appId": "campaigns"
388
392
  },
389
393
  {
@@ -473,7 +477,9 @@ var APPLICATIONS = {
473
477
  "domains": [
474
478
  "guest.topolo.app"
475
479
  ],
476
- "routes": [],
480
+ "routes": [
481
+ "guest.topolo.app"
482
+ ],
477
483
  "appId": null
478
484
  },
479
485
  {
@@ -483,7 +489,9 @@ var APPLICATIONS = {
483
489
  "domains": [
484
490
  "commerce.topolo.app"
485
491
  ],
486
- "routes": [],
492
+ "routes": [
493
+ "commerce.topolo.app"
494
+ ],
487
495
  "appId": "commerce"
488
496
  },
489
497
  {
@@ -493,7 +501,9 @@ var APPLICATIONS = {
493
501
  "domains": [
494
502
  "station-commerce.topolo.app"
495
503
  ],
496
- "routes": [],
504
+ "routes": [
505
+ "station-commerce.topolo.app"
506
+ ],
497
507
  "appId": null
498
508
  }
499
509
  ]
@@ -671,7 +681,9 @@ var APPLICATIONS = {
671
681
  "domains": [
672
682
  "docs.topolo.app"
673
683
  ],
674
- "routes": [],
684
+ "routes": [
685
+ "docs.topolo.app"
686
+ ],
675
687
  "appId": null
676
688
  },
677
689
  {
@@ -701,7 +713,9 @@ var APPLICATIONS = {
701
713
  "domains": [
702
714
  "feed-analytics-api.topolo.app"
703
715
  ],
704
- "routes": [],
716
+ "routes": [
717
+ "feed-analytics-api.topolo.app"
718
+ ],
705
719
  "appId": null
706
720
  },
707
721
  {
@@ -711,7 +725,9 @@ var APPLICATIONS = {
711
725
  "domains": [
712
726
  "feed-api.topolo.app"
713
727
  ],
714
- "routes": [],
728
+ "routes": [
729
+ "feed-api.topolo.app"
730
+ ],
715
731
  "appId": null
716
732
  },
717
733
  {
@@ -721,7 +737,9 @@ var APPLICATIONS = {
721
737
  "domains": [
722
738
  "feed.topolo.app"
723
739
  ],
724
- "routes": [],
740
+ "routes": [
741
+ "feed.topolo.app"
742
+ ],
725
743
  "appId": "feed"
726
744
  }
727
745
  ]
@@ -833,7 +851,9 @@ var APPLICATIONS = {
833
851
  "domains": [
834
852
  "home.topolo.app"
835
853
  ],
836
- "routes": [],
854
+ "routes": [
855
+ "home.topolo.app"
856
+ ],
837
857
  "appId": "home"
838
858
  },
839
859
  {
@@ -923,7 +943,9 @@ var APPLICATIONS = {
923
943
  "domains": [
924
944
  "learn.topolo.app"
925
945
  ],
926
- "routes": [],
946
+ "routes": [
947
+ "learn.topolo.app"
948
+ ],
927
949
  "appId": "learn"
928
950
  },
929
951
  {
@@ -1015,7 +1037,9 @@ var APPLICATIONS = {
1015
1037
  "domains": [
1016
1038
  "mdm.topolo.app"
1017
1039
  ],
1018
- "routes": [],
1040
+ "routes": [
1041
+ "mdm.topolo.app"
1042
+ ],
1019
1043
  "appId": "mdm"
1020
1044
  }
1021
1045
  ]
@@ -1037,7 +1061,9 @@ var APPLICATIONS = {
1037
1061
  "domains": [
1038
1062
  "messages.topolo.app"
1039
1063
  ],
1040
- "routes": [],
1064
+ "routes": [
1065
+ "messages.topolo.app"
1066
+ ],
1041
1067
  "appId": "messages"
1042
1068
  },
1043
1069
  {
@@ -1071,11 +1097,13 @@ var APPLICATIONS = {
1071
1097
  {
1072
1098
  "name": "topolo-nexus-dashboard",
1073
1099
  "kind": "worker",
1074
- "apiUrl": null,
1100
+ "apiUrl": "https://nexus.topolo.app",
1075
1101
  "domains": [
1076
1102
  "nexus.topolo.app"
1077
1103
  ],
1078
- "routes": [],
1104
+ "routes": [
1105
+ "nexus.topolo.app"
1106
+ ],
1079
1107
  "appId": null
1080
1108
  },
1081
1109
  {
@@ -1203,7 +1231,9 @@ var APPLICATIONS = {
1203
1231
  "domains": [
1204
1232
  "p2p.topolo.app"
1205
1233
  ],
1206
- "routes": [],
1234
+ "routes": [
1235
+ "p2p.topolo.app"
1236
+ ],
1207
1237
  "appId": "p2p"
1208
1238
  },
1209
1239
  {
@@ -1400,7 +1430,9 @@ var APPLICATIONS = {
1400
1430
  "domains": [
1401
1431
  "studio.topolo.app"
1402
1432
  ],
1403
- "routes": [],
1433
+ "routes": [
1434
+ "studio.topolo.app"
1435
+ ],
1404
1436
  "appId": "social_studio"
1405
1437
  },
1406
1438
  {
@@ -1438,7 +1470,9 @@ var APPLICATIONS = {
1438
1470
  "domains": [
1439
1471
  "socialize.topolo.app"
1440
1472
  ],
1441
- "routes": [],
1473
+ "routes": [
1474
+ "socialize.topolo.app"
1475
+ ],
1442
1476
  "appId": "socialize"
1443
1477
  },
1444
1478
  {
@@ -1448,7 +1482,9 @@ var APPLICATIONS = {
1448
1482
  "domains": [
1449
1483
  "socialize-api.topolo.app"
1450
1484
  ],
1451
- "routes": [],
1485
+ "routes": [
1486
+ "socialize-api.topolo.app"
1487
+ ],
1452
1488
  "appId": null
1453
1489
  },
1454
1490
  {
@@ -1508,7 +1544,9 @@ var APPLICATIONS = {
1508
1544
  "domains": [
1509
1545
  "status.topolo.app"
1510
1546
  ],
1511
- "routes": [],
1547
+ "routes": [
1548
+ "status.topolo.app"
1549
+ ],
1512
1550
  "appId": "status"
1513
1551
  }
1514
1552
  ]
@@ -1624,7 +1662,9 @@ var APPLICATIONS = {
1624
1662
  "domains": [
1625
1663
  "voice.topolo.app"
1626
1664
  ],
1627
- "routes": [],
1665
+ "routes": [
1666
+ "voice.topolo.app"
1667
+ ],
1628
1668
  "appId": "voice"
1629
1669
  },
1630
1670
  {
@@ -1675,7 +1715,9 @@ var APPLICATIONS = {
1675
1715
  "domains": [
1676
1716
  "web.topolo.app"
1677
1717
  ],
1678
- "routes": [],
1718
+ "routes": [
1719
+ "web.topolo.app"
1720
+ ],
1679
1721
  "appId": "web"
1680
1722
  }
1681
1723
  ]
@@ -1752,7 +1794,7 @@ var APPLICATION_REQUIREMENTS = [
1752
1794
  "Use TopoloAppMetricCard, TopoloAppEmptyState, TopoloAppStatusBadge, TopoloAppGrid, and TopoloAppSection for repeated app body patterns",
1753
1795
  "Keep visual QA fixtures available through visualQa=1 or __devpreview=1 so screenshot checks do not depend on live API state",
1754
1796
  "Keep mobile and desktop shell behavior aligned with the platform UI kit",
1755
- "Constrain app-owned workspace wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"
1797
+ "Constrain the app workspace-view layout wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"
1756
1798
  ]
1757
1799
  },
1758
1800
  {
@@ -3241,6 +3283,7 @@ function normalizeActionCatalogEntry(item) {
3241
3283
  permissionName: pickActionString(a.permission_name) ?? pickActionString(a.permissionName) ?? "",
3242
3284
  requiredPermission: pickActionString(a.required_permission) ?? pickActionString(a.requiredPermission) ?? "",
3243
3285
  authorizationMode: pickAuthorizationMode(a.authorization_mode ?? a.authorizationMode),
3286
+ allowedServices: stringArray(a.allowed_services ?? a.allowedServices),
3244
3287
  inputSchema: plainObject(a.input_schema ?? a.inputSchema),
3245
3288
  outputSchema: plainObject(a.output_schema ?? a.outputSchema),
3246
3289
  agentContract: plainObject(a.agent_contract ?? a.agentContract),
@@ -3262,7 +3305,7 @@ function pickAgentAccess(value) {
3262
3305
  return value === "auto" || value === "confirm" || value === "off" ? value : null;
3263
3306
  }
3264
3307
  function pickAuthorizationMode(value) {
3265
- return value === "runtime" ? "runtime" : "static";
3308
+ return value === "runtime" || value === "public" || value === "service" ? value : "static";
3266
3309
  }
3267
3310
  function plainObject(value) {
3268
3311
  return value && typeof value === "object" && !Array.isArray(value) ? value : {};
@@ -4009,7 +4052,7 @@ var TOOLS = [
4009
4052
  properties: {
4010
4053
  actionId: { type: "string", minLength: 1 },
4011
4054
  input: { type: "object", additionalProperties: true },
4012
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
4055
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
4013
4056
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." }
4014
4057
  },
4015
4058
  required: ["actionId"],
@@ -4041,7 +4084,7 @@ var TOOLS = [
4041
4084
  properties: {
4042
4085
  actionId: { type: "string", minLength: 1 },
4043
4086
  input: { type: "object", additionalProperties: true },
4044
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
4087
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
4045
4088
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
4046
4089
  confirm: { type: "boolean" }
4047
4090
  },
@@ -4102,7 +4145,7 @@ var TOOLS = [
4102
4145
  properties: {
4103
4146
  actionId: { type: "string", minLength: 1 },
4104
4147
  input: { type: "object", additionalProperties: true },
4105
- resourceType: { type: "string", description: "Optional app-local resource alias, such as workspace." },
4148
+ resourceType: { type: "string", description: "Optional resource-scoping alias published in the app resource catalog (e.g. workspace, brand, merchant)." },
4106
4149
  resourceId: { type: "string", description: "Resource id. Required when resourceType is provided." },
4107
4150
  confirm: { type: "boolean", description: "Include confirmation in the plan without executing the action." }
4108
4151
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topolo/mcp",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
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": {
@@ -36,7 +36,7 @@
36
36
  "@modelcontextprotocol/sdk": "^1.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@topolo/sdk": "^0.9.2"
39
+ "@topolo/sdk": "^0.9.4"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@topolo/sdk": "file:../topolo-sdk",