@tinycloud/mcp 0.10.0-beta.5 → 0.10.0-beta.7

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
@@ -529,7 +529,7 @@ function outcomeCode(result) {
529
529
  // package.json
530
530
  var package_default = {
531
531
  name: "@tinycloud/mcp",
532
- version: "0.10.0-beta.5",
532
+ version: "0.10.0-beta.7",
533
533
  description: "TinyCloud delegated operations MCP server",
534
534
  keywords: [
535
535
  "tinycloud",
@@ -1511,8 +1511,9 @@ var RemoteTenantStore = class {
1511
1511
  reason: [
1512
1512
  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.",
1513
1513
  // Owner DIDs come from the verified OpenKey access token of the MCP
1514
- // client that created this link, never from the link itself.
1515
- ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}; approve only if that is you.`]
1514
+ // client that created this link, never from the link itself. The
1515
+ // callback refuses a signer outside them, so the approver isn't asked to check.
1516
+ ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
1516
1517
  ].join(" ")
1517
1518
  })).toString("base64url"),
1518
1519
  expiry: this.#config.delegationExpiry
@@ -2528,10 +2529,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2528
2529
  try {
2529
2530
  const destination = await store.approvalRedirect(requiredState(url));
2530
2531
  return Response.redirect(destination, 302);
2531
- } catch {
2532
+ } catch (error) {
2533
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2534
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2532
2535
  if (request.headers.get("accept")?.includes("text/html")) {
2533
2536
  return new Response(
2534
- '<!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>',
2537
+ '<!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>',
2535
2538
  {
2536
2539
  status: 400,
2537
2540
  headers: {