@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/index.js CHANGED
@@ -518,7 +518,7 @@ function outcomeCode(result) {
518
518
  // package.json
519
519
  var package_default = {
520
520
  name: "@tinycloud/mcp",
521
- version: "0.10.0-beta.31",
521
+ version: "0.10.0-beta.32",
522
522
  description: "TinyCloud delegated operations MCP server",
523
523
  keywords: [
524
524
  "tinycloud",
@@ -589,9 +589,10 @@ var package_default = {
589
589
  dependencies: {
590
590
  "@modelcontextprotocol/node": "2.0.0-beta.5",
591
591
  "@modelcontextprotocol/server": "2.0.0-beta.5",
592
- "@tinycloud/node-sdk": "3.12.0-beta.23",
592
+ "@tinycloud/node-sdk": "3.12.0-beta.24",
593
+ "@tinycloud/sdk-core": "3.12.0-beta.24",
593
594
  "@tinycloud/node-sdk-wasm": "1.7.9-beta.0",
594
- "@tinycloud/operations": "0.9.0-beta.27",
595
+ "@tinycloud/operations": "0.9.0-beta.28",
595
596
  jose: "6.2.4"
596
597
  },
597
598
  devDependencies: {
@@ -980,6 +981,7 @@ function claims(token) {
980
981
  }
981
982
 
982
983
  // src/remote-store.ts
984
+ import { sameTinyCloudNode } from "@tinycloud/sdk-core";
983
985
  import { createHmac, randomBytes, timingSafeEqual as timingSafeEqual2 } from "crypto";
984
986
  import { chmod, mkdir, readFile, readdir, rename, rm, writeFile } from "fs/promises";
985
987
  import { dirname, join as join2 } from "path";
@@ -1072,7 +1074,7 @@ var NATIVE_GRANT_IMPORT_REJECTION_CODES = /* @__PURE__ */ new Set([
1072
1074
  "DELEGATION_HOST_MISMATCH",
1073
1075
  "DELEGATION_REJECTED"
1074
1076
  ]);
1075
- var LEGACY_DEFAULT_NODE_HOST = "https://node.tinycloud.xyz";
1077
+ var PRODUCTION_NODE_HOSTS = /* @__PURE__ */ new Set(["https://node.tinycloud.xyz", "https://tee.node.tinycloud.xyz"]);
1076
1078
  var BOOTSTRAP_PERMISSIONS = [
1077
1079
  {
1078
1080
  service: "tinycloud.kv",
@@ -1802,10 +1804,10 @@ var RemoteTenantStore = class {
1802
1804
  authMethod: "openkey",
1803
1805
  openkeyHost: this.#config.openkeyHost
1804
1806
  });
1805
- } else if (typeof profile.host === "string" && profile.host.replace(/\/+$/, "") === LEGACY_DEFAULT_NODE_HOST && this.#config.nodeHost.replace(/\/+$/, "") !== LEGACY_DEFAULT_NODE_HOST) {
1807
+ } 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(/\/+$/, "")) {
1806
1808
  await secureWrite(profilePath, { ...profile, host: this.#config.nodeHost });
1807
1809
  process.stderr.write(
1808
- `[tinycloud-mcp-http] tenant node host migrated: from=${LEGACY_DEFAULT_NODE_HOST} to=${new URL(this.#config.nodeHost).origin}
1810
+ `[tinycloud-mcp-http] tenant node host migrated: from=${profile.host.replace(/\/+$/, "")} to=${new URL(this.#config.nodeHost).origin}
1809
1811
  `
1810
1812
  );
1811
1813
  }
@@ -2123,6 +2125,7 @@ function normalizeDid(value) {
2123
2125
  return value.split("#", 1)[0];
2124
2126
  }
2125
2127
  function sameNodeHost(left, right) {
2128
+ if (PRODUCTION_NODE_HOSTS.has(left) && sameTinyCloudNode(left, right)) return true;
2126
2129
  try {
2127
2130
  const normalize = (value) => {
2128
2131
  const url = new URL(value);