@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-cli.js CHANGED
@@ -277,6 +277,7 @@ function logToolCall(tool, code, startedAt, replayedGrants) {
277
277
  }
278
278
 
279
279
  // src/remote-store.ts
280
+ import { sameTinyCloudNode } from "@tinycloud/sdk-core";
280
281
  import { createHmac, randomBytes, timingSafeEqual as timingSafeEqual2 } from "crypto";
281
282
  import { chmod, mkdir, readFile, readdir, rename, rm, writeFile } from "fs/promises";
282
283
  import { dirname, join } from "path";
@@ -369,7 +370,7 @@ var NATIVE_GRANT_IMPORT_REJECTION_CODES = /* @__PURE__ */ new Set([
369
370
  "DELEGATION_HOST_MISMATCH",
370
371
  "DELEGATION_REJECTED"
371
372
  ]);
372
- var LEGACY_DEFAULT_NODE_HOST = "https://node.tinycloud.xyz";
373
+ var PRODUCTION_NODE_HOSTS = /* @__PURE__ */ new Set(["https://node.tinycloud.xyz", "https://tee.node.tinycloud.xyz"]);
373
374
  var BOOTSTRAP_PERMISSIONS = [
374
375
  {
375
376
  service: "tinycloud.kv",
@@ -1099,10 +1100,10 @@ var RemoteTenantStore = class {
1099
1100
  authMethod: "openkey",
1100
1101
  openkeyHost: this.#config.openkeyHost
1101
1102
  });
1102
- } else if (typeof profile.host === "string" && profile.host.replace(/\/+$/, "") === LEGACY_DEFAULT_NODE_HOST && this.#config.nodeHost.replace(/\/+$/, "") !== LEGACY_DEFAULT_NODE_HOST) {
1103
+ } 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(/\/+$/, "")) {
1103
1104
  await secureWrite(profilePath, { ...profile, host: this.#config.nodeHost });
1104
1105
  process.stderr.write(
1105
- `[tinycloud-mcp-http] tenant node host migrated: from=${LEGACY_DEFAULT_NODE_HOST} to=${new URL(this.#config.nodeHost).origin}
1106
+ `[tinycloud-mcp-http] tenant node host migrated: from=${profile.host.replace(/\/+$/, "")} to=${new URL(this.#config.nodeHost).origin}
1106
1107
  `
1107
1108
  );
1108
1109
  }
@@ -1420,6 +1421,7 @@ function normalizeDid(value) {
1420
1421
  return value.split("#", 1)[0];
1421
1422
  }
1422
1423
  function sameNodeHost(left, right) {
1424
+ if (PRODUCTION_NODE_HOSTS.has(left) && sameTinyCloudNode(left, right)) return true;
1423
1425
  try {
1424
1426
  const normalize = (value) => {
1425
1427
  const url = new URL(value);
@@ -1986,7 +1988,7 @@ function outcomeCode(result) {
1986
1988
  // package.json
1987
1989
  var package_default = {
1988
1990
  name: "@tinycloud/mcp",
1989
- version: "0.10.0-beta.31",
1991
+ version: "0.10.0-beta.32",
1990
1992
  description: "TinyCloud delegated operations MCP server",
1991
1993
  keywords: [
1992
1994
  "tinycloud",
@@ -2057,9 +2059,10 @@ var package_default = {
2057
2059
  dependencies: {
2058
2060
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2059
2061
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2060
- "@tinycloud/node-sdk": "3.12.0-beta.23",
2062
+ "@tinycloud/node-sdk": "3.12.0-beta.24",
2063
+ "@tinycloud/sdk-core": "3.12.0-beta.24",
2061
2064
  "@tinycloud/node-sdk-wasm": "1.7.9-beta.0",
2062
- "@tinycloud/operations": "0.9.0-beta.27",
2065
+ "@tinycloud/operations": "0.9.0-beta.28",
2063
2066
  jose: "6.2.4"
2064
2067
  },
2065
2068
  devDependencies: {