@tinycloud/mcp 0.9.1-beta.2 → 0.10.0-beta.11

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
@@ -775,14 +775,15 @@ var RemoteTenantStore = class {
775
775
  did: tenant.sessionDid,
776
776
  callback: callback.toString(),
777
777
  host: this.#config.nodeHost,
778
- jwk: Buffer.from(JSON.stringify(publicJwk(tenant.jwk))).toString("base64url"),
778
+ jwk: Buffer.from(JSON.stringify((0, import_node_sdk2.publicJwk)(tenant.jwk))).toString("base64url"),
779
779
  permissions: Buffer.from(JSON.stringify({
780
780
  permissions: pending.permissions,
781
781
  reason: [
782
782
  pending.kind === "bootstrap" ? "Connect this TinyCloud account to the hosted MCP delegate." : (0, import_tc_apps.tcAppsApprovalReason)(pending.permissions) ?? "Approve the exact capabilities requested by the TinyCloud MCP operation.",
783
783
  // Owner DIDs come from the verified OpenKey access token of the MCP
784
- // client that created this link, never from the link itself.
785
- ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}; approve only if that is you.`]
784
+ // client that created this link, never from the link itself. The
785
+ // callback refuses a signer outside them, so the approver isn't asked to check.
786
+ ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
786
787
  ].join(" ")
787
788
  })).toString("base64url"),
788
789
  expiry: this.#config.delegationExpiry
@@ -1390,11 +1391,6 @@ function sessionFromCallback(data, privateJwk) {
1390
1391
  signature: data.signature
1391
1392
  };
1392
1393
  }
1393
- function publicJwk(jwk) {
1394
- const copy = { ...jwk };
1395
- for (const field of ["d", "p", "q", "dp", "dq", "qi", "oth", "k"]) delete copy[field];
1396
- return copy;
1397
- }
1398
1394
  function samePrincipal(left, right) {
1399
1395
  if (typeof left !== "string") return false;
1400
1396
  try {
@@ -1882,6 +1878,16 @@ var TOOL_BINDINGS = [
1882
1878
  destructiveHint: true,
1883
1879
  openWorldHint: false,
1884
1880
  surfaces: ["hosted", "public"]
1881
+ },
1882
+ {
1883
+ name: "tinycloud_apps_move",
1884
+ operationId: "tinycloud.apps.move",
1885
+ operationVersion: 1,
1886
+ readOnlyHint: false,
1887
+ idempotentHint: true,
1888
+ destructiveHint: false,
1889
+ openWorldHint: false,
1890
+ surfaces: ["hosted"]
1885
1891
  }
1886
1892
  ];
1887
1893
  var definitions = new Map(generatedCatalog.operations.map((operation) => [
@@ -1974,7 +1980,7 @@ function outcomeCode(result) {
1974
1980
  // package.json
1975
1981
  var package_default = {
1976
1982
  name: "@tinycloud/mcp",
1977
- version: "0.9.1-beta.2",
1983
+ version: "0.10.0-beta.11",
1978
1984
  description: "TinyCloud delegated operations MCP server",
1979
1985
  keywords: [
1980
1986
  "tinycloud",
@@ -2045,9 +2051,9 @@ var package_default = {
2045
2051
  dependencies: {
2046
2052
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2047
2053
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2048
- "@tinycloud/node-sdk": "3.12.0-beta.2",
2054
+ "@tinycloud/node-sdk": "3.12.0-beta.5",
2049
2055
  "@tinycloud/node-sdk-wasm": "1.7.8",
2050
- "@tinycloud/operations": "0.8.1-beta.2",
2056
+ "@tinycloud/operations": "0.9.0-beta.8",
2051
2057
  jose: "6.2.4"
2052
2058
  },
2053
2059
  devDependencies: {
@@ -2369,10 +2375,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2369
2375
  try {
2370
2376
  const destination = await store.approvalRedirect(requiredState(url));
2371
2377
  return Response.redirect(destination, 302);
2372
- } catch {
2378
+ } catch (error) {
2379
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2380
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2373
2381
  if (request.headers.get("accept")?.includes("text/html")) {
2374
2382
  return new Response(
2375
- '<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>TinyCloud approval unavailable</title><main><h1>This approval link is unavailable</h1><p>It may have expired or already been used. No new approval was accepted through this link.</p><p>Return to the conversation that requested access. In ChatGPT, select @TinyCloud and ask it to continue your original request. If access is still needed, it can provide a fresh approval link.</p><p>If you declined access, no further approval is required. Never paste passwords, codes or approval links into support messages.</p></main></html>',
2383
+ '<!doctype html><html lang="en"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>TinyCloud approval unavailable</title><main><h1>This approval link is unavailable</h1><p>It may have expired or already been used. Go back to the assistant that sent it and ask it to connect TinyCloud again.</p><p>If you declined access, no further approval is required. Never paste passwords, codes or approval links into support messages.</p></main></html>',
2376
2384
  {
2377
2385
  status: 400,
2378
2386
  headers: {