@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/index.js CHANGED
@@ -169,7 +169,8 @@ var TOOL_NAMES = [
169
169
  "tinycloud_apps_context",
170
170
  "tinycloud_apps_read",
171
171
  "tinycloud_apps_write",
172
- "tinycloud_apps_query"
172
+ "tinycloud_apps_query",
173
+ "tinycloud_apps_move"
173
174
  ];
174
175
  function invocationTargetForMcp(selection) {
175
176
  return {
@@ -426,6 +427,16 @@ var TOOL_BINDINGS = [
426
427
  destructiveHint: true,
427
428
  openWorldHint: false,
428
429
  surfaces: ["hosted", "public"]
430
+ },
431
+ {
432
+ name: "tinycloud_apps_move",
433
+ operationId: "tinycloud.apps.move",
434
+ operationVersion: 1,
435
+ readOnlyHint: false,
436
+ idempotentHint: true,
437
+ destructiveHint: false,
438
+ openWorldHint: false,
439
+ surfaces: ["hosted"]
429
440
  }
430
441
  ];
431
442
  var definitions = new Map(generatedCatalog.operations.map((operation) => [
@@ -518,7 +529,7 @@ function outcomeCode(result) {
518
529
  // package.json
519
530
  var package_default = {
520
531
  name: "@tinycloud/mcp",
521
- version: "0.9.1-beta.1",
532
+ version: "0.10.0-beta.10",
522
533
  description: "TinyCloud delegated operations MCP server",
523
534
  keywords: [
524
535
  "tinycloud",
@@ -589,9 +600,9 @@ var package_default = {
589
600
  dependencies: {
590
601
  "@modelcontextprotocol/node": "2.0.0-beta.5",
591
602
  "@modelcontextprotocol/server": "2.0.0-beta.5",
592
- "@tinycloud/node-sdk": "3.12.0-beta.1",
603
+ "@tinycloud/node-sdk": "3.12.0-beta.5",
593
604
  "@tinycloud/node-sdk-wasm": "1.7.8",
594
- "@tinycloud/operations": "0.8.1-beta.1",
605
+ "@tinycloud/operations": "0.9.0-beta.7",
595
606
  jose: "6.2.4"
596
607
  },
597
608
  devDependencies: {
@@ -993,6 +1004,7 @@ import {
993
1004
  UnsupportedSessionRestoreError,
994
1005
  isCapabilitySubset,
995
1006
  principalDidEquals,
1007
+ publicJwk,
996
1008
  siweRuntimeDelegation,
997
1009
  signedCompactUcanExpiry
998
1010
  } from "@tinycloud/node-sdk";
@@ -1500,8 +1512,9 @@ var RemoteTenantStore = class {
1500
1512
  reason: [
1501
1513
  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.",
1502
1514
  // Owner DIDs come from the verified OpenKey access token of the MCP
1503
- // client that created this link, never from the link itself.
1504
- ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}; approve only if that is you.`]
1515
+ // client that created this link, never from the link itself. The
1516
+ // callback refuses a signer outside them, so the approver isn't asked to check.
1517
+ ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
1505
1518
  ].join(" ")
1506
1519
  })).toString("base64url"),
1507
1520
  expiry: this.#config.delegationExpiry
@@ -2109,11 +2122,6 @@ function sessionFromCallback(data, privateJwk) {
2109
2122
  signature: data.signature
2110
2123
  };
2111
2124
  }
2112
- function publicJwk(jwk) {
2113
- const copy = { ...jwk };
2114
- for (const field of ["d", "p", "q", "dp", "dq", "qi", "oth", "k"]) delete copy[field];
2115
- return copy;
2116
- }
2117
2125
  function samePrincipal(left, right) {
2118
2126
  if (typeof left !== "string") return false;
2119
2127
  try {
@@ -2517,10 +2525,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2517
2525
  try {
2518
2526
  const destination = await store.approvalRedirect(requiredState(url));
2519
2527
  return Response.redirect(destination, 302);
2520
- } catch {
2528
+ } catch (error) {
2529
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2530
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2521
2531
  if (request.headers.get("accept")?.includes("text/html")) {
2522
2532
  return new Response(
2523
- '<!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>',
2533
+ '<!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>',
2524
2534
  {
2525
2535
  status: 400,
2526
2536
  headers: {