@tinycloud/mcp 0.10.0-beta.31 → 0.10.0-beta.32

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/http.js CHANGED
@@ -260,6 +260,7 @@ function logToolCall(tool, code, startedAt, replayedGrants) {
260
260
  }
261
261
 
262
262
  // src/remote-store.ts
263
+ import { sameTinyCloudNode } from "@tinycloud/sdk-core";
263
264
  import { createHmac, randomBytes, timingSafeEqual as timingSafeEqual2 } from "crypto";
264
265
  import { chmod, mkdir, readFile, readdir, rename, rm, writeFile } from "fs/promises";
265
266
  import { dirname, join } from "path";
@@ -352,7 +353,7 @@ var NATIVE_GRANT_IMPORT_REJECTION_CODES = /* @__PURE__ */ new Set([
352
353
  "DELEGATION_HOST_MISMATCH",
353
354
  "DELEGATION_REJECTED"
354
355
  ]);
355
- var LEGACY_DEFAULT_NODE_HOST = "https://node.tinycloud.xyz";
356
+ var PRODUCTION_NODE_HOSTS = /* @__PURE__ */ new Set(["https://node.tinycloud.xyz", "https://tee.node.tinycloud.xyz"]);
356
357
  var BOOTSTRAP_PERMISSIONS = [
357
358
  {
358
359
  service: "tinycloud.kv",
@@ -1082,10 +1083,10 @@ var RemoteTenantStore = class {
1082
1083
  authMethod: "openkey",
1083
1084
  openkeyHost: this.#config.openkeyHost
1084
1085
  });
1085
- } else if (typeof profile.host === "string" && profile.host.replace(/\/+$/, "") === LEGACY_DEFAULT_NODE_HOST && this.#config.nodeHost.replace(/\/+$/, "") !== LEGACY_DEFAULT_NODE_HOST) {
1086
+ } else if (typeof profile.host === "string" && PRODUCTION_NODE_HOSTS.has(profile.host.replace(/\/+$/, "")) && PRODUCTION_NODE_HOSTS.has(this.#config.nodeHost.replace(/\/+$/, "")) && profile.host.replace(/\/+$/, "") !== this.#config.nodeHost.replace(/\/+$/, "")) {
1086
1087
  await secureWrite(profilePath, { ...profile, host: this.#config.nodeHost });
1087
1088
  process.stderr.write(
1088
- `[tinycloud-mcp-http] tenant node host migrated: from=${LEGACY_DEFAULT_NODE_HOST} to=${new URL(this.#config.nodeHost).origin}
1089
+ `[tinycloud-mcp-http] tenant node host migrated: from=${profile.host.replace(/\/+$/, "")} to=${new URL(this.#config.nodeHost).origin}
1089
1090
  `
1090
1091
  );
1091
1092
  }
@@ -1403,6 +1404,7 @@ function normalizeDid(value) {
1403
1404
  return value.split("#", 1)[0];
1404
1405
  }
1405
1406
  function sameNodeHost(left, right) {
1407
+ if (PRODUCTION_NODE_HOSTS.has(left) && sameTinyCloudNode(left, right)) return true;
1406
1408
  try {
1407
1409
  const normalize = (value) => {
1408
1410
  const url = new URL(value);
@@ -1969,7 +1971,7 @@ function outcomeCode(result) {
1969
1971
  // package.json
1970
1972
  var package_default = {
1971
1973
  name: "@tinycloud/mcp",
1972
- version: "0.10.0-beta.31",
1974
+ version: "0.10.0-beta.32",
1973
1975
  description: "TinyCloud delegated operations MCP server",
1974
1976
  keywords: [
1975
1977
  "tinycloud",
@@ -2040,9 +2042,10 @@ var package_default = {
2040
2042
  dependencies: {
2041
2043
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2042
2044
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2043
- "@tinycloud/node-sdk": "3.12.0-beta.23",
2045
+ "@tinycloud/node-sdk": "3.12.0-beta.24",
2046
+ "@tinycloud/sdk-core": "3.12.0-beta.24",
2044
2047
  "@tinycloud/node-sdk-wasm": "1.7.9-beta.0",
2045
- "@tinycloud/operations": "0.9.0-beta.27",
2048
+ "@tinycloud/operations": "0.9.0-beta.28",
2046
2049
  jose: "6.2.4"
2047
2050
  },
2048
2051
  devDependencies: {