@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-cli.cjs CHANGED
@@ -792,14 +792,15 @@ var RemoteTenantStore = class {
792
792
  did: tenant.sessionDid,
793
793
  callback: callback.toString(),
794
794
  host: this.#config.nodeHost,
795
- jwk: Buffer.from(JSON.stringify(publicJwk(tenant.jwk))).toString("base64url"),
795
+ jwk: Buffer.from(JSON.stringify((0, import_node_sdk2.publicJwk)(tenant.jwk))).toString("base64url"),
796
796
  permissions: Buffer.from(JSON.stringify({
797
797
  permissions: pending.permissions,
798
798
  reason: [
799
799
  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.",
800
800
  // Owner DIDs come from the verified OpenKey access token of the MCP
801
- // client that created this link, never from the link itself.
802
- ...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(", ")}.`]
803
804
  ].join(" ")
804
805
  })).toString("base64url"),
805
806
  expiry: this.#config.delegationExpiry
@@ -1407,11 +1408,6 @@ function sessionFromCallback(data, privateJwk) {
1407
1408
  signature: data.signature
1408
1409
  };
1409
1410
  }
1410
- function publicJwk(jwk) {
1411
- const copy = { ...jwk };
1412
- for (const field of ["d", "p", "q", "dp", "dq", "qi", "oth", "k"]) delete copy[field];
1413
- return copy;
1414
- }
1415
1411
  function samePrincipal(left, right) {
1416
1412
  if (typeof left !== "string") return false;
1417
1413
  try {
@@ -1899,6 +1895,16 @@ var TOOL_BINDINGS = [
1899
1895
  destructiveHint: true,
1900
1896
  openWorldHint: false,
1901
1897
  surfaces: ["hosted", "public"]
1898
+ },
1899
+ {
1900
+ name: "tinycloud_apps_move",
1901
+ operationId: "tinycloud.apps.move",
1902
+ operationVersion: 1,
1903
+ readOnlyHint: false,
1904
+ idempotentHint: true,
1905
+ destructiveHint: false,
1906
+ openWorldHint: false,
1907
+ surfaces: ["hosted"]
1902
1908
  }
1903
1909
  ];
1904
1910
  var definitions = new Map(generatedCatalog.operations.map((operation) => [
@@ -1991,7 +1997,7 @@ function outcomeCode(result) {
1991
1997
  // package.json
1992
1998
  var package_default = {
1993
1999
  name: "@tinycloud/mcp",
1994
- version: "0.9.1-beta.2",
2000
+ version: "0.10.0-beta.11",
1995
2001
  description: "TinyCloud delegated operations MCP server",
1996
2002
  keywords: [
1997
2003
  "tinycloud",
@@ -2062,9 +2068,9 @@ var package_default = {
2062
2068
  dependencies: {
2063
2069
  "@modelcontextprotocol/node": "2.0.0-beta.5",
2064
2070
  "@modelcontextprotocol/server": "2.0.0-beta.5",
2065
- "@tinycloud/node-sdk": "3.12.0-beta.2",
2071
+ "@tinycloud/node-sdk": "3.12.0-beta.5",
2066
2072
  "@tinycloud/node-sdk-wasm": "1.7.8",
2067
- "@tinycloud/operations": "0.8.1-beta.2",
2073
+ "@tinycloud/operations": "0.9.0-beta.8",
2068
2074
  jose: "6.2.4"
2069
2075
  },
2070
2076
  devDependencies: {
@@ -2386,10 +2392,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2386
2392
  try {
2387
2393
  const destination = await store.approvalRedirect(requiredState(url));
2388
2394
  return Response.redirect(destination, 302);
2389
- } catch {
2395
+ } catch (error) {
2396
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2397
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2390
2398
  if (request.headers.get("accept")?.includes("text/html")) {
2391
2399
  return new Response(
2392
- '<!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>',
2400
+ '<!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>',
2393
2401
  {
2394
2402
  status: 400,
2395
2403
  headers: {