@topolo/mcp 0.11.3 → 0.11.4

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -8
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // src/index.ts
4
4
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
5
5
 
6
- // ../../node_modules/.pnpm/@topolo+sdk@0.11.3/node_modules/@topolo/sdk/dist/index.js
6
+ // ../../node_modules/.pnpm/@topolo+sdk@0.11.4/node_modules/@topolo/sdk/dist/index.js
7
7
  function applyAuthHeaders(headers, credential) {
8
8
  if (credential.kind === "api_key") {
9
9
  headers.set("X-Api-Key", credential.apiKey);
@@ -2004,11 +2004,12 @@ function compactExample(input) {
2004
2004
  function compactActionValidation(actionId, validation) {
2005
2005
  return { actionId, valid: validation.valid, errors: validation.errors };
2006
2006
  }
2007
- var ACTION_RESULT_MAX_DEPTH = 4;
2008
- var ACTION_RESULT_MAX_KEYS = 16;
2009
- var ACTION_RESULT_MAX_ITEMS = 5;
2010
- var ACTION_RESULT_MAX_SCALARS = 120;
2011
- var ACTION_RESULT_MAX_STRING = 512;
2007
+ var ACTION_RESULT_MAX_DEPTH = 3;
2008
+ var ACTION_RESULT_MAX_KEYS = 12;
2009
+ var ACTION_RESULT_MAX_ORDINARY_KEYS = 5;
2010
+ var ACTION_RESULT_MAX_ITEMS = 3;
2011
+ var ACTION_RESULT_MAX_SCALARS = 60;
2012
+ var ACTION_RESULT_MAX_STRING = 256;
2012
2013
  function resultKeyPriority(key) {
2013
2014
  if (/^(id|requestId|status|state|url|slug|name|title|version)$/i.test(key)) return 0;
2014
2015
  if (/(Id|Ids|Url|Uri|Status|State|Count|Total|Version|CreatedAt|UpdatedAt)$/i.test(key)) return 1;
@@ -2034,7 +2035,14 @@ function compactResultValue(value, depth, budget) {
2034
2035
  if (typeof value === "object") {
2035
2036
  const record = value;
2036
2037
  const allKeys = Object.keys(record);
2037
- const keys = allKeys.sort((left, right) => resultKeyPriority(left) - resultKeyPriority(right)).slice(0, ACTION_RESULT_MAX_KEYS);
2038
+ const ranked = allKeys.sort((left, right) => resultKeyPriority(left) - resultKeyPriority(right));
2039
+ const prioritized = ranked.filter((key) => resultKeyPriority(key) < 2);
2040
+ const ordinary = ranked.filter((key) => resultKeyPriority(key) === 2);
2041
+ const ordinaryLimit = depth === 0 ? ACTION_RESULT_MAX_ORDINARY_KEYS : prioritized.length ? 1 : ACTION_RESULT_MAX_ORDINARY_KEYS;
2042
+ const keys = [
2043
+ ...prioritized,
2044
+ ...ordinary.slice(0, ordinaryLimit)
2045
+ ].slice(0, ACTION_RESULT_MAX_KEYS);
2038
2046
  const compact = Object.fromEntries(keys.map((key) => [key, compactResultValue(record[key], depth + 1, budget)]));
2039
2047
  if (allKeys.length > keys.length) compact["_omittedKeys"] = allKeys.length - keys.length;
2040
2048
  return compact;
@@ -2266,7 +2274,7 @@ function createTopolo(options) {
2266
2274
  };
2267
2275
  }
2268
2276
 
2269
- // ../../node_modules/.pnpm/@topolo+sdk@0.11.3/node_modules/@topolo/sdk/dist/node/credential-store.js
2277
+ // ../../node_modules/.pnpm/@topolo+sdk@0.11.4/node_modules/@topolo/sdk/dist/node/credential-store.js
2270
2278
  import { mkdir, readFile, writeFile, chmod, rm, stat } from "fs/promises";
2271
2279
  import { existsSync } from "fs";
2272
2280
  import { homedir, platform } from "os";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/mcp",
3
- "version": "0.11.3",
4
- "topoloPublishedVersion": "0.11.3",
3
+ "version": "0.11.4",
4
+ "topoloPublishedVersion": "0.11.4",
5
5
  "description": "Model Context Protocol server for the Topolo platform. Exposes scope-gated tools that third-party agents (Claude, Codex, etc.) can call natively.",
6
6
  "license": "UNLICENSED",
7
7
  "author": "Topolo",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@modelcontextprotocol/sdk": "^1.0.0",
38
- "@topolo/sdk": "0.11.3"
38
+ "@topolo/sdk": "0.11.4"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^20.12.0",