@tinycloud/mcp 0.9.1-beta.1 → 0.10.0-beta.10

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
@@ -290,6 +290,7 @@ import {
290
290
  UnsupportedSessionRestoreError,
291
291
  isCapabilitySubset,
292
292
  principalDidEquals,
293
+ publicJwk,
293
294
  siweRuntimeDelegation,
294
295
  signedCompactUcanExpiry
295
296
  } from "@tinycloud/node-sdk";
@@ -797,8 +798,9 @@ var RemoteTenantStore = class {
797
798
  reason: [
798
799
  pending.kind === "bootstrap" ? "Connect this TinyCloud account to the hosted MCP delegate." : tcAppsApprovalReason(pending.permissions) ?? "Approve the exact capabilities requested by the TinyCloud MCP operation.",
799
800
  // Owner DIDs come from the verified OpenKey access token of the MCP
800
- // client that created this link, never from the link itself.
801
- ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}; approve only if that is you.`]
801
+ // client that created this link, never from the link itself. The
802
+ // callback refuses a signer outside them, so the approver isn't asked to check.
803
+ ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
802
804
  ].join(" ")
803
805
  })).toString("base64url"),
804
806
  expiry: this.#config.delegationExpiry
@@ -1406,11 +1408,6 @@ function sessionFromCallback(data, privateJwk) {
1406
1408
  signature: data.signature
1407
1409
  };
1408
1410
  }
1409
- function publicJwk(jwk) {
1410
- const copy = { ...jwk };
1411
- for (const field of ["d", "p", "q", "dp", "dq", "qi", "oth", "k"]) delete copy[field];
1412
- return copy;
1413
- }
1414
1411
  function samePrincipal(left, right) {
1415
1412
  if (typeof left !== "string") return false;
1416
1413
  try {
@@ -1897,6 +1894,16 @@ var TOOL_BINDINGS = [
1897
1894
  destructiveHint: true,
1898
1895
  openWorldHint: false,
1899
1896
  surfaces: ["hosted", "public"]
1897
+ },
1898
+ {
1899
+ name: "tinycloud_apps_move",
1900
+ operationId: "tinycloud.apps.move",
1901
+ operationVersion: 1,
1902
+ readOnlyHint: false,
1903
+ idempotentHint: true,
1904
+ destructiveHint: false,
1905
+ openWorldHint: false,
1906
+ surfaces: ["hosted"]
1900
1907
  }
1901
1908
  ];
1902
1909
  var definitions = new Map(generatedCatalog.operations.map((operation) => [
@@ -1989,7 +1996,7 @@ function outcomeCode(result) {
1989
1996
  // package.json
1990
1997
  var package_default = {
1991
1998
  name: "@tinycloud/mcp",
1992
- version: "0.9.1-beta.1",
1999
+ version: "0.10.0-beta.10",
1993
2000
  description: "TinyCloud delegated operations MCP server",
1994
2001
  keywords: [
1995
2002
  "tinycloud",
@@ -2060,9 +2067,9 @@ var package_default = {
2060
2067
  dependencies: {
2061
2068
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2062
2069
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2063
- "@tinycloud/node-sdk": "3.12.0-beta.1",
2070
+ "@tinycloud/node-sdk": "3.12.0-beta.5",
2064
2071
  "@tinycloud/node-sdk-wasm": "1.7.8",
2065
- "@tinycloud/operations": "0.8.1-beta.1",
2072
+ "@tinycloud/operations": "0.9.0-beta.7",
2066
2073
  jose: "6.2.4"
2067
2074
  },
2068
2075
  devDependencies: {
@@ -2384,10 +2391,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2384
2391
  try {
2385
2392
  const destination = await store.approvalRedirect(requiredState(url));
2386
2393
  return Response.redirect(destination, 302);
2387
- } catch {
2394
+ } catch (error) {
2395
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2396
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2388
2397
  if (request.headers.get("accept")?.includes("text/html")) {
2389
2398
  return new Response(
2390
- '<!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>',
2399
+ '<!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>',
2391
2400
  {
2392
2401
  status: 400,
2393
2402
  headers: {