saktum 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/saktum.mjs +138 -54
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saktum",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "Test MCP servers in one command: conformance, sign-in, security (OWASP MCP Top 10), agent experience, context cost and performance.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
package/saktum.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // Saktum Check 0.1.0 (private beta). Licensed Apache-2.0; bundled dependencies keep their own licences.
2
+ // Saktum Check 0.1.3 (private beta). Licensed Apache-2.0; bundled dependencies keep their own licences.
3
3
  import { createRequire as __saktumCreateRequire } from "node:module";
4
4
  const require = __saktumCreateRequire(import.meta.url);
5
5
  var __create = Object.create;
@@ -13435,9 +13435,9 @@ var require_data = __commonJS({
13435
13435
  }
13436
13436
  });
13437
13437
 
13438
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js
13438
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js
13439
13439
  var require_utils = __commonJS({
13440
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/utils.js"(exports, module) {
13440
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/utils.js"(exports, module) {
13441
13441
  "use strict";
13442
13442
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
13443
13443
  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);
@@ -13669,6 +13669,37 @@ var require_utils = __commonJS({
13669
13669
  }
13670
13670
  return output.join("");
13671
13671
  }
13672
+ function removeDotSegmentsRelative(path) {
13673
+ if (path === "" || path[0] === "/") {
13674
+ return removeDotSegments(path);
13675
+ }
13676
+ const segments = path.split("/");
13677
+ const last = segments.length - 1;
13678
+ const output = [];
13679
+ let trailingDirectory = false;
13680
+ for (let i = 0; i <= last; i++) {
13681
+ const segment = segments[i];
13682
+ if (segment === "." || segment === "..") {
13683
+ if (segment === "..") {
13684
+ if (output.length !== 0 && output[output.length - 1] !== "..") {
13685
+ output.pop();
13686
+ } else {
13687
+ output.push("..");
13688
+ }
13689
+ }
13690
+ trailingDirectory = i === last;
13691
+ } else {
13692
+ output.push(segment);
13693
+ }
13694
+ }
13695
+ if (trailingDirectory && output[output.length - 1] !== "..") {
13696
+ output.push("");
13697
+ }
13698
+ if (output.length === 0 || output[0] === "" || output[0].includes(":")) {
13699
+ output.unshift(".");
13700
+ }
13701
+ return output.join("/");
13702
+ }
13672
13703
  var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
13673
13704
  var HOST_DELIM_RE = /[@/?#:]/g;
13674
13705
  var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
@@ -13929,6 +13960,7 @@ var require_utils = __commonJS({
13929
13960
  encodeFragment,
13930
13961
  escapePreservingEscapes,
13931
13962
  removeDotSegments,
13963
+ removeDotSegmentsRelative,
13932
13964
  isIPv4,
13933
13965
  isUUID,
13934
13966
  normalizeIPv6,
@@ -13937,9 +13969,9 @@ var require_utils = __commonJS({
13937
13969
  }
13938
13970
  });
13939
13971
 
13940
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js
13972
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js
13941
13973
  var require_schemes = __commonJS({
13942
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/lib/schemes.js"(exports, module) {
13974
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/lib/schemes.js"(exports, module) {
13943
13975
  "use strict";
13944
13976
  var { isUUID } = require_utils();
13945
13977
  var URN_REG = /^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu;
@@ -14148,20 +14180,22 @@ var require_schemes = __commonJS({
14148
14180
  }
14149
14181
  });
14150
14182
 
14151
- // node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js
14183
+ // node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js
14152
14184
  var require_fast_uri = __commonJS({
14153
- "node_modules/.pnpm/fast-uri@3.1.8/node_modules/fast-uri/index.js"(exports, module) {
14185
+ "node_modules/.pnpm/fast-uri@3.1.9/node_modules/fast-uri/index.js"(exports, module) {
14154
14186
  "use strict";
14155
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
14187
+ var { normalizeIPv6, removeDotSegments, removeDotSegmentsRelative, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
14156
14188
  var { SCHEMES, getSchemeHandler } = require_schemes();
14157
14189
  var VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;
14158
14190
  var MALFORMED_SCHEME_ERROR = "URI scheme is malformed.";
14159
- function decodeValidScheme(scheme) {
14160
- const decodedScheme = unescape(String(scheme));
14161
- if (!VALID_SCHEME.test(decodedScheme)) {
14191
+ var MALFORMED_HOST_ERROR = "URI host is malformed.";
14192
+ var FORBIDDEN_DOMAIN_HOST_CHARACTER = /[\0-\x20"#/:<>?@[\\\]^`{|}\x7F]/u;
14193
+ function validateScheme(scheme) {
14194
+ const stringScheme = String(scheme);
14195
+ if (!VALID_SCHEME.test(stringScheme)) {
14162
14196
  throw new TypeError(MALFORMED_SCHEME_ERROR);
14163
14197
  }
14164
- return decodedScheme;
14198
+ return stringScheme;
14165
14199
  }
14166
14200
  function normalize(uri, options) {
14167
14201
  if (typeof uri === "string") {
@@ -14198,6 +14232,9 @@ var require_fast_uri = __commonJS({
14198
14232
  const resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);
14199
14233
  const resolvedHost = resolved.host;
14200
14234
  const resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== "" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);
14235
+ if (hasForbiddenDomainHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP)) {
14236
+ throw new Error(MALFORMED_HOST_ERROR);
14237
+ }
14201
14238
  canonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);
14202
14239
  const encodedASCIIHost = resolvedHost && resolvedHost.indexOf("%") !== -1 && !new RegExp("\\P{ASCII}", "u").test(resolvedHost);
14203
14240
  if (resolved.error && !encodedASCIIHost) {
@@ -14239,14 +14276,15 @@ var require_fast_uri = __commonJS({
14239
14276
  if (relative.path[0] === "/") {
14240
14277
  target.path = removeDotSegments(relative.path);
14241
14278
  } else {
14242
- if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
14279
+ const baseHasAuthority = base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0;
14280
+ if (baseHasAuthority && !base.path) {
14243
14281
  target.path = "/" + relative.path;
14244
14282
  } else if (!base.path) {
14245
14283
  target.path = relative.path;
14246
14284
  } else {
14247
14285
  target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
14248
14286
  }
14249
- target.path = removeDotSegments(target.path);
14287
+ target.path = base.scheme === void 0 && !baseHasAuthority && target.path[0] !== "/" ? removeDotSegmentsRelative(target.path) : removeDotSegments(target.path);
14250
14288
  }
14251
14289
  target.query = relative.query;
14252
14290
  }
@@ -14284,12 +14322,13 @@ var require_fast_uri = __commonJS({
14284
14322
  const options = Object.assign({}, opts);
14285
14323
  const uriTokens = [];
14286
14324
  if (component.scheme) {
14287
- component.scheme = decodeValidScheme(component.scheme);
14325
+ component.scheme = validateScheme(component.scheme);
14288
14326
  }
14289
14327
  const schemeHandler = getSchemeHandler(options.scheme || component.scheme);
14290
14328
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
14291
14329
  const hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;
14292
- const pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;
14330
+ const schemelessReference = (component.scheme === void 0 || options.reference === "suffix") && !hasAuthority;
14331
+ const pathNoScheme = !options.skipEscape && schemelessReference;
14293
14332
  if (component.path !== void 0) {
14294
14333
  if (!options.skipEscape) {
14295
14334
  component.path = serializePathEncoding(component.path, pathNoScheme);
@@ -14298,7 +14337,7 @@ var require_fast_uri = __commonJS({
14298
14337
  }
14299
14338
  }
14300
14339
  if (options.reference !== "suffix" && component.scheme) {
14301
- component.scheme = decodeValidScheme(component.scheme);
14340
+ component.scheme = validateScheme(component.scheme);
14302
14341
  uriTokens.push(component.scheme, ":");
14303
14342
  }
14304
14343
  const authority = recomposeAuthority(component);
@@ -14314,9 +14353,9 @@ var require_fast_uri = __commonJS({
14314
14353
  if (component.path !== void 0) {
14315
14354
  let s = component.path;
14316
14355
  if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
14317
- s = removeDotSegments(s);
14356
+ s = schemelessReference && s[0] !== "/" ? removeDotSegmentsRelative(s) : removeDotSegments(s);
14318
14357
  }
14319
- if (pathNoScheme) {
14358
+ if (schemelessReference) {
14320
14359
  s = serializePathEncoding(s, true);
14321
14360
  }
14322
14361
  if (authority === void 0 && s[0] === "/" && s[1] === "/") {
@@ -14363,16 +14402,34 @@ var require_fast_uri = __commonJS({
14363
14402
  return hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);
14364
14403
  }
14365
14404
  function canonicalizeHost(parsed, options, schemeHandler, isIP) {
14405
+ if (hasForbiddenDomainHost(parsed, options, schemeHandler, isIP)) {
14406
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
14407
+ return true;
14408
+ }
14366
14409
  if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
14410
+ let url2;
14367
14411
  try {
14368
- parsed.host = new URL("http://" + parsed.host).hostname;
14412
+ url2 = new URL("http://" + parsed.host);
14369
14413
  } catch (e) {
14370
14414
  parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
14371
14415
  return true;
14372
14416
  }
14417
+ if (!isHostOnlyURL(url2)) {
14418
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
14419
+ return true;
14420
+ }
14421
+ parsed.host = url2.hostname;
14373
14422
  }
14374
14423
  return false;
14375
14424
  }
14425
+ function hasForbiddenDomainHost(parsed, options, schemeHandler, isIP) {
14426
+ return Boolean(
14427
+ parsed.host && isIP === false && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && FORBIDDEN_DOMAIN_HOST_CHARACTER.test(parsed.host)
14428
+ );
14429
+ }
14430
+ function isHostOnlyURL(url2) {
14431
+ return url2.username === "" && url2.password === "" && url2.port === "" && url2.pathname === "/" && url2.search === "" && url2.hash === "" && url2.hostname !== "";
14432
+ }
14376
14433
  function parseWithStatus(uri, opts) {
14377
14434
  const options = Object.assign({}, opts);
14378
14435
  const parsed = {
@@ -14427,9 +14484,8 @@ var require_fast_uri = __commonJS({
14427
14484
  parsed.query = matches[7];
14428
14485
  parsed.fragment = matches[8];
14429
14486
  if (parsed.scheme !== void 0) {
14430
- const decodedScheme = unescape(parsed.scheme);
14431
- if (VALID_SCHEME.test(decodedScheme)) {
14432
- parsed.scheme = decodedScheme.toLowerCase();
14487
+ if (VALID_SCHEME.test(parsed.scheme)) {
14488
+ parsed.scheme = parsed.scheme.toLowerCase();
14433
14489
  } else {
14434
14490
  parsed.error = parsed.error || MALFORMED_SCHEME_ERROR;
14435
14491
  malformedScheme = true;
@@ -14457,7 +14513,7 @@ var require_fast_uri = __commonJS({
14457
14513
  malformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);
14458
14514
  parsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();
14459
14515
  if (malformedIPLiteral) {
14460
- parsed.error = parsed.error || "URI host is malformed.";
14516
+ parsed.error = parsed.error || MALFORMED_HOST_ERROR;
14461
14517
  malformedAuthorityOrPort = true;
14462
14518
  }
14463
14519
  } else {
@@ -14485,7 +14541,7 @@ var require_fast_uri = __commonJS({
14485
14541
  if (!isIP) {
14486
14542
  host = normalizePercentEncoding(host.toLowerCase());
14487
14543
  }
14488
- parsed.host = reescapeHostDelimiters(host, isIP);
14544
+ parsed.host = isIP || options.scheme !== "null" ? reescapeHostDelimiters(host, isIP) : host;
14489
14545
  }
14490
14546
  if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
14491
14547
  if (parsed.path) {
@@ -25534,7 +25590,7 @@ var optionalProcessor = (schema, ctx, _json, params) => {
25534
25590
  seen.ref = def.innerType;
25535
25591
  };
25536
25592
 
25537
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
25593
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
25538
25594
  function isZ4Schema(s) {
25539
25595
  const schema = s;
25540
25596
  return !!schema._zod;
@@ -26746,7 +26802,7 @@ function date3(params) {
26746
26802
  return _coercedDate(ZodDate, params);
26747
26803
  }
26748
26804
 
26749
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
26805
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
26750
26806
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
26751
26807
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
26752
26808
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -28266,7 +28322,7 @@ var UrlElicitationRequiredError = class extends McpError {
28266
28322
  }
28267
28323
  };
28268
28324
 
28269
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
28325
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
28270
28326
  function isTerminal(status) {
28271
28327
  return status === "completed" || status === "failed" || status === "cancelled";
28272
28328
  }
@@ -28274,7 +28330,7 @@ function isTerminal(status) {
28274
28330
  // node_modules/.pnpm/zod-to-json-schema@3.25.2_zod@4.6.7/node_modules/zod-to-json-schema/dist/esm/parsers/string.js
28275
28331
  var ALPHA_NUMERIC = new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
28276
28332
 
28277
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
28333
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
28278
28334
  function getMethodLiteral(schema) {
28279
28335
  const shape = getObjectShape(schema);
28280
28336
  const methodSchema = shape?.method;
@@ -28295,7 +28351,7 @@ function parseWithCompat(schema, data) {
28295
28351
  return result.data;
28296
28352
  }
28297
28353
 
28298
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
28354
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
28299
28355
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
28300
28356
  var Protocol = class {
28301
28357
  constructor(_options) {
@@ -29272,7 +29328,7 @@ function mergeCapabilities(base, additional) {
29272
29328
  return result;
29273
29329
  }
29274
29330
 
29275
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
29331
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
29276
29332
  var import_ajv = __toESM(require_ajv(), 1);
29277
29333
  var import_ajv_formats = __toESM(require_dist2(), 1);
29278
29334
  function createDefaultAjvInstance() {
@@ -29340,7 +29396,7 @@ var AjvJsonSchemaValidator = class {
29340
29396
  }
29341
29397
  };
29342
29398
 
29343
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js
29399
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/client.js
29344
29400
  var ExperimentalClientTasks = class {
29345
29401
  constructor(_client) {
29346
29402
  this._client = _client;
@@ -29494,7 +29550,7 @@ var ExperimentalClientTasks = class {
29494
29550
  }
29495
29551
  };
29496
29552
 
29497
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
29553
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
29498
29554
  function assertToolsCallTaskCapability(requests, method, entityName) {
29499
29555
  if (!requests) {
29500
29556
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -29529,7 +29585,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
29529
29585
  }
29530
29586
  }
29531
29587
 
29532
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
29588
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js
29533
29589
  function applyElicitationDefaults(schema, data) {
29534
29590
  if (!schema || data === null || typeof data !== "object")
29535
29591
  return;
@@ -30040,12 +30096,12 @@ var Client = class extends Protocol {
30040
30096
  }
30041
30097
  };
30042
30098
 
30043
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
30099
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
30044
30100
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
30045
30101
  import process2 from "node:process";
30046
30102
  import { PassThrough } from "node:stream";
30047
30103
 
30048
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30104
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
30049
30105
  var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
30050
30106
  var ReadBuffer = class {
30051
30107
  constructor(options) {
@@ -30082,7 +30138,7 @@ function serializeMessage(message) {
30082
30138
  return JSON.stringify(message) + "\n";
30083
30139
  }
30084
30140
 
30085
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
30141
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js
30086
30142
  var DEFAULT_INHERITED_ENV_VARS = process2.platform === "win32" ? [
30087
30143
  "APPDATA",
30088
30144
  "HOMEDRIVE",
@@ -30253,7 +30309,7 @@ var StdioClientTransport = class {
30253
30309
  }
30254
30310
  };
30255
30311
 
30256
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
30312
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js
30257
30313
  var import_content_type = __toESM(require_content_type(), 1);
30258
30314
  function mediaTypeEssence(header) {
30259
30315
  if (!header) {
@@ -30270,7 +30326,7 @@ function mediaTypeEssence(header) {
30270
30326
  }
30271
30327
  }
30272
30328
 
30273
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js
30329
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/transport.js
30274
30330
  function normalizeHeaders(headers) {
30275
30331
  if (!headers)
30276
30332
  return {};
@@ -30402,7 +30458,7 @@ async function pkceChallenge(length) {
30402
30458
  };
30403
30459
  }
30404
30460
 
30405
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
30461
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
30406
30462
  var SafeUrlSchema = url().superRefine((val, ctx) => {
30407
30463
  if (!URL.canParse(val)) {
30408
30464
  ctx.addIssue({
@@ -30556,7 +30612,7 @@ var OAuthTokenRevocationRequestSchema = object2({
30556
30612
  token_type_hint: string2().optional()
30557
30613
  }).strip();
30558
30614
 
30559
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
30615
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
30560
30616
  function resourceUrlFromServerUrl(url2) {
30561
30617
  const resourceURL = typeof url2 === "string" ? new URL(url2) : new URL(url2.href);
30562
30618
  resourceURL.hash = "";
@@ -30576,7 +30632,7 @@ function checkResourceAllowed({ requestedResource, configuredResource }) {
30576
30632
  return requestedPath.startsWith(configuredPath);
30577
30633
  }
30578
30634
 
30579
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
30635
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/server/auth/errors.js
30580
30636
  var OAuthError = class extends Error {
30581
30637
  constructor(message, errorUri) {
30582
30638
  super(message);
@@ -30671,7 +30727,7 @@ var OAUTH_ERRORS = {
30671
30727
  [InvalidTargetError.errorCode]: InvalidTargetError
30672
30728
  };
30673
30729
 
30674
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
30730
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/auth.js
30675
30731
  var UnauthorizedError = class extends Error {
30676
30732
  constructor(message) {
30677
30733
  super(message ?? "Unauthorized");
@@ -31464,7 +31520,7 @@ var EventSourceParserStream = class extends TransformStream {
31464
31520
  }
31465
31521
  };
31466
31522
 
31467
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.1_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
31523
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.32.2_zod@4.6.7/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js
31468
31524
  var DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS = {
31469
31525
  initialReconnectionDelay: 1e3,
31470
31526
  maxReconnectionDelay: 3e4,
@@ -31874,7 +31930,7 @@ var StreamableHTTPClientTransport = class {
31874
31930
  };
31875
31931
 
31876
31932
  // packages/transports/dist/index.js
31877
- var USER_AGENT = "saktum-check/0.1.0 (+https://saktum.dev/check)";
31933
+ var USER_AGENT = "saktum-check/0.1.3 (+https://saktum.dev/check)";
31878
31934
  var LIMITS = { requestTimeoutMs: 1e4, connectTimeoutMs: 6e4, maxResponseChars: 5e6 };
31879
31935
  var LimitError = class extends Error {
31880
31936
  };
@@ -32004,7 +32060,7 @@ var INIT_BODY = JSON.stringify({
32004
32060
  jsonrpc: "2.0",
32005
32061
  id: 1,
32006
32062
  method: "initialize",
32007
- params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.1.0" } }
32063
+ params: { protocolVersion: "2025-06-18", capabilities: {}, clientInfo: { name: "saktum-trust-check-probe", version: "0.1.3" } }
32008
32064
  });
32009
32065
  async function httpRequest(url2, init = {}) {
32010
32066
  const t0 = Date.now();
@@ -32359,6 +32415,7 @@ var leakageAnalysers = {
32359
32415
  var LEAKAGE_NEEDS = { secrets: "tools", "error-leakage": "session" };
32360
32416
 
32361
32417
  // packages/testkit-core/dist/perf.js
32418
+ var LAUNCHERS = /^(npx|uvx|pipx|bunx|pnpx|npx\.cmd|uvx\.exe|pnpm|yarn|docker)$/i;
32362
32419
  var PERF_THRESHOLDS = { startupMs: 1e4, listMs: 2e3, listBytes: 2e5, rssMb: 500 };
32363
32420
  var kb = (n) => `${Math.round(n / 1024)} KB`;
32364
32421
  var perfAnalysers = {
@@ -32366,6 +32423,9 @@ var perfAnalysers = {
32366
32423
  if (perf?.initMs === void 0)
32367
32424
  return { status: "inconclusive", message: "Start-up time was not measured." };
32368
32425
  const what = target?.kind === "stdio" ? "Started and completed the handshake" : "Completed the handshake";
32426
+ const launcher = target?.kind === "stdio" && LAUNCHERS.test(target.command.split(/[\\/]/).pop() ?? "");
32427
+ if (launcher)
32428
+ return { status: "info", message: `${what} in ${perf.initMs} ms, including the time ${target.command.split(/[\\/]/).pop()} takes to resolve or download the package. Run again, or start the server directly, to measure its own start-up.` };
32369
32429
  const slow = perf.initMs > PERF_THRESHOLDS.startupMs;
32370
32430
  return { status: "info", message: `${what} in ${perf.initMs} ms.${slow ? " That is slow: agents and clients may time out." : ""}` };
32371
32431
  },
@@ -32382,8 +32442,10 @@ var perfAnalysers = {
32382
32442
  "perf-memory": ({ perf, target }) => {
32383
32443
  if (target?.kind !== "stdio")
32384
32444
  return { status: "skipped", message: "Memory and CPU are measured for local servers only." };
32445
+ if (process.platform === "win32")
32446
+ return { status: "skipped", message: "Memory and CPU are not measured on Windows yet." };
32385
32447
  if (perf?.rssMb === void 0)
32386
- return { status: "inconclusive", message: "Memory and CPU could not be measured on this platform." };
32448
+ return { status: "skipped", message: "Memory and CPU could not be measured on this platform." };
32387
32449
  const heavy = perf.rssMb > PERF_THRESHOLDS.rssMb;
32388
32450
  return { status: "info", message: `Uses ${perf.rssMb} MB of memory (including any launcher such as npx); averaged ${perf.cpuPct}% CPU since start-up.${heavy ? " That is a lot of memory for a tool server." : ""}` };
32389
32451
  },
@@ -32661,7 +32723,7 @@ function summarise(r, noGrade) {
32661
32723
  }
32662
32724
 
32663
32725
  // packages/testkit-core/dist/engine.js
32664
- var ENGINE_VERSION = "0.1.0";
32726
+ var ENGINE_VERSION = "0.1.3";
32665
32727
  var UNKNOWN_TOOL = "saktum_trust_check_no_such_tool";
32666
32728
  var INVALID_TOKEN = "saktum-check-deliberately-invalid-token";
32667
32729
  var BURST_REQUESTS = 20;
@@ -32852,6 +32914,12 @@ var LATER = {
32852
32914
  MCP09: "scan-config in v0.4",
32853
32915
  MCP10: "memory and over-sharing tests in v0.6"
32854
32916
  };
32917
+ var PARTIAL = {
32918
+ MCP02: "danger annotations only; scope tests in v0.2 to v0.6",
32919
+ MCP05: "schema validity only; active injection tests in v0.2",
32920
+ MCP06: "hidden-instruction scanning only; adversarial agent tests in v0.6",
32921
+ MCP08: "error handling only; audit trails need runtime receipts (Saktum gateway)"
32922
+ };
32855
32923
  function owaspCoverage(r) {
32856
32924
  return OWASP_MCP.map(([id, name]) => {
32857
32925
  const all = r.findings.filter((f) => (f.references ?? []).some((ref) => ref.includes(`OWASP MCP Top 10: ${id}`)));
@@ -32862,6 +32930,7 @@ function owaspCoverage(r) {
32862
32930
  name,
32863
32931
  tested: related.length,
32864
32932
  failed: related.filter((f) => f.status === "fail").length,
32933
+ partial: related.length ? PARTIAL[id] : void 0,
32865
32934
  later: related.length ? void 0 : notApplicable ? `not applicable here (${all[0].message?.replace(/\.$/, "").toLowerCase() ?? "skipped"})` : LATER[id] ?? "planned"
32866
32935
  };
32867
32936
  });
@@ -32902,8 +32971,10 @@ function renderTerminal(r) {
32902
32971
  }
32903
32972
  lines.push("");
32904
32973
  lines.push("OWASP MCP Top 10 coverage in this run:");
32905
- for (const c of owaspCoverage(r))
32906
- lines.push(` ${c.id} ${c.name.padEnd(48)} ${c.tested ? c.failed ? `\u2717 ${c.failed} of ${c.tested} failed` : `\u2713 ${c.tested} passed` : c.later?.startsWith("not applicable") ? c.later : `later: ${c.later}`}`);
32974
+ for (const c of owaspCoverage(r)) {
32975
+ const status = c.tested ? c.failed ? `\u2717 ${c.failed} of ${c.tested} failed` : `\u2713 ${c.tested} passed` : c.later?.startsWith("not applicable") ? c.later : `later: ${c.later}`;
32976
+ lines.push(` ${c.id} ${c.name.padEnd(48)} ${status}${c.partial ? ` (partial: ${c.partial})` : ""}`);
32977
+ }
32907
32978
  lines.push("");
32908
32979
  lines.push(SELF_SIGNED_NOTE);
32909
32980
  lines.push(DISCLAIMER);
@@ -32914,7 +32985,7 @@ function renderTerminal(r) {
32914
32985
  function renderHtml(r) {
32915
32986
  const e = (x) => escapeHtml(sanitizeText(x, 1e3));
32916
32987
  const rows = [...r.findings].sort((a, b) => rank(a.severity) - rank(b.severity)).map((f) => `<tr class="${e(f.status)}"><td>${e(SYMBOL[f.status])}</td><td>${e(f.severity)}</td><td><code>${e(f.check)}</code><br>${e(f.title)}</td><td>${e(f.message ?? "")}${f.evidence?.excerpt ? `<br><small>Evidence: ${e(f.evidence.excerpt)}</small>` : ""}${f.fix && f.status === "fail" ? `<br><strong>Fix:</strong> ${e(f.fix)}` : ""}</td></tr>`).join("\n");
32917
- const cov = owaspCoverage(r).map((c) => `<tr><td>${e(c.id)}</td><td>${e(c.name)}</td><td>${c.tested ? c.failed ? `\u2717 ${c.failed} of ${c.tested} failed` : `\u2713 ${c.tested} passed` : `Later: ${e(c.later ?? "planned")}`}</td></tr>`).join("");
32988
+ const cov = owaspCoverage(r).map((c) => `<tr><td>${e(c.id)}</td><td>${e(c.name)}</td><td>${c.tested ? c.failed ? `\u2717 ${c.failed} of ${c.tested} failed` : `\u2713 ${c.tested} passed` : e(c.later ?? "planned")}${c.partial ? ` <small>(partial: ${e(c.partial)})</small>` : ""}</td></tr>`).join("");
32918
32989
  return `<!doctype html><html lang="en"><head><meta charset="utf-8">
32919
32990
  <meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">
32920
32991
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -32931,10 +33002,22 @@ ${(r.summary ?? []).map((l) => `<p>${e(l)}</p>`).join("")}
32931
33002
 
32932
33003
  // packages/cli/dist/doctor.js
32933
33004
  import { spawn as spawn2, spawnSync } from "node:child_process";
33005
+ function quoteWin(a) {
33006
+ return /^[\w.:\/\\@=+-]+$/.test(a) ? a : `"${a.replace(/"/g, '\\"')}"`;
33007
+ }
33008
+ function spawnPlan(command, args, platform = process.platform) {
33009
+ if (platform !== "win32")
33010
+ return { command, args, shell: false };
33011
+ const bare = !/[\\/]/.test(command) && !/\.(exe|com)$/i.test(command);
33012
+ const script = /\.(cmd|bat)$/i.test(command);
33013
+ if (!bare && !script)
33014
+ return { command, args, shell: false };
33015
+ return { command: quoteWin(command), args: args.map(quoteWin), shell: true };
33016
+ }
32934
33017
  var mark = (ok) => ok === true ? "\u2713" : ok === false ? "\u2717" : "-";
32935
33018
  function has(cmd, args = ["--version"]) {
32936
- const exe = process.platform === "win32" ? `${cmd}.cmd` : cmd;
32937
- const r = spawnSync(exe, args, { encoding: "utf8", timeout: 8e3 });
33019
+ const plan = spawnPlan(cmd, args);
33020
+ const r = spawnSync(plan.command, plan.args, { encoding: "utf8", timeout: 8e3, shell: plan.shell, windowsHide: true });
32938
33021
  return r.status === 0 ? (r.stdout || r.stderr).trim().split("\n")[0] : void 0;
32939
33022
  }
32940
33023
  function hintsFrom(stderr) {
@@ -32963,7 +33046,8 @@ async function startProbe(t) {
32963
33046
  return new Promise((resolve) => {
32964
33047
  let stderr = "";
32965
33048
  let done = false;
32966
- const child = spawn2(t.command, t.args, { env: minimalEnv(t.env), cwd: t.cwd, stdio: ["pipe", "ignore", "pipe"] });
33049
+ const plan = spawnPlan(t.command, t.args);
33050
+ const child = spawn2(plan.command, plan.args, { env: minimalEnv(t.env), cwd: t.cwd, stdio: ["pipe", "ignore", "pipe"], shell: plan.shell, windowsHide: true });
32967
33051
  const finish2 = (exited, code) => {
32968
33052
  if (done)
32969
33053
  return;