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

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.cjs CHANGED
@@ -273,6 +273,7 @@ function logToolCall(tool, code, startedAt, replayedGrants) {
273
273
  }
274
274
 
275
275
  // src/remote-store.ts
276
+ var import_sdk_core = require("@tinycloud/sdk-core");
276
277
  var import_node_crypto3 = require("crypto");
277
278
  var import_promises = require("fs/promises");
278
279
  var import_node_path = require("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",
@@ -775,6 +776,7 @@ var RemoteTenantStore = class {
775
776
  did: tenant.sessionDid,
776
777
  callback: callback.toString(),
777
778
  host: this.#config.nodeHost,
779
+ requesterOrigin: this.#config.publicUrl.origin,
778
780
  jwk: Buffer.from(JSON.stringify((0, import_node_sdk2.publicJwk)(tenant.jwk))).toString("base64url"),
779
781
  permissions: Buffer.from(JSON.stringify({
780
782
  permissions: pending.permissions,
@@ -1082,10 +1084,10 @@ var RemoteTenantStore = class {
1082
1084
  authMethod: "openkey",
1083
1085
  openkeyHost: this.#config.openkeyHost
1084
1086
  });
1085
- } else if (typeof profile.host === "string" && profile.host.replace(/\/+$/, "") === LEGACY_DEFAULT_NODE_HOST && this.#config.nodeHost.replace(/\/+$/, "") !== LEGACY_DEFAULT_NODE_HOST) {
1087
+ } 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
1088
  await secureWrite(profilePath, { ...profile, host: this.#config.nodeHost });
1087
1089
  process.stderr.write(
1088
- `[tinycloud-mcp-http] tenant node host migrated: from=${LEGACY_DEFAULT_NODE_HOST} to=${new URL(this.#config.nodeHost).origin}
1090
+ `[tinycloud-mcp-http] tenant node host migrated: from=${profile.host.replace(/\/+$/, "")} to=${new URL(this.#config.nodeHost).origin}
1089
1091
  `
1090
1092
  );
1091
1093
  }
@@ -1403,6 +1405,7 @@ function normalizeDid(value) {
1403
1405
  return value.split("#", 1)[0];
1404
1406
  }
1405
1407
  function sameNodeHost(left, right) {
1408
+ if (PRODUCTION_NODE_HOSTS.has(left) && (0, import_sdk_core.sameTinyCloudNode)(left, right)) return true;
1406
1409
  try {
1407
1410
  const normalize = (value) => {
1408
1411
  const url = new URL(value);
@@ -1970,7 +1973,7 @@ function outcomeCode(result) {
1970
1973
  // package.json
1971
1974
  var package_default = {
1972
1975
  name: "@tinycloud/mcp",
1973
- version: "0.10.0-beta.31",
1976
+ version: "0.10.0-beta.33",
1974
1977
  description: "TinyCloud delegated operations MCP server",
1975
1978
  keywords: [
1976
1979
  "tinycloud",
@@ -2041,9 +2044,10 @@ var package_default = {
2041
2044
  dependencies: {
2042
2045
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2043
2046
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2044
- "@tinycloud/node-sdk": "3.12.0-beta.23",
2047
+ "@tinycloud/node-sdk": "3.12.0-beta.24",
2048
+ "@tinycloud/sdk-core": "3.12.0-beta.24",
2045
2049
  "@tinycloud/node-sdk-wasm": "1.7.9-beta.0",
2046
- "@tinycloud/operations": "0.9.0-beta.27",
2050
+ "@tinycloud/operations": "0.9.0-beta.29",
2047
2051
  jose: "6.2.4"
2048
2052
  },
2049
2053
  devDependencies: {