@ractive-ch/tab-mcp 0.3.0 → 0.3.1

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/main.js CHANGED
@@ -601,7 +601,7 @@ function installCrashLogging(logger, exit = (code) => process.exit(code)) {
601
601
  };
602
602
  }
603
603
  // package.json
604
- var version = "0.3.0";
604
+ var version = "0.3.1";
605
605
 
606
606
  // src/address.ts
607
607
  var BASE32_ALPHABET = "abcdefghijklmnopqrstuvwxyz234567";
@@ -4493,7 +4493,7 @@ function startRelay(options, hooks) {
4493
4493
  }
4494
4494
  function checkVersion(req, body, rpcId) {
4495
4495
  const header = req.headers.get("mcp-protocol-version");
4496
- if (body["method"] === "initialize") {
4496
+ if (body["method"] === "initialize" && !(header === MCP_PROTOCOL_VERSION && metaVersion(body) === MCP_PROTOCOL_VERSION)) {
4497
4497
  const params = body["params"];
4498
4498
  const requested = typeof params?.["protocolVersion"] === "string" ? params["protocolVersion"] : header ?? null;
4499
4499
  return rpcError(400, rpcId, -32022, `Unsupported protocol version: ${String(requested)}. This server supports only ${MCP_PROTOCOL_VERSION}.`, corsHeaders, { supported: [MCP_PROTOCOL_VERSION], requested });
@@ -4916,5 +4916,5 @@ var shutdown = () => {
4916
4916
  process.on("SIGTERM", shutdown);
4917
4917
  process.on("SIGINT", shutdown);
4918
4918
 
4919
- //# debugId=16AE1B87E7D1BB3C64756E2164756E21
4919
+ //# debugId=AF054075C7A2C5E764756E2164756E21
4920
4920
  //# sourceMappingURL=main.js.map