@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/index.cjs CHANGED
@@ -206,7 +206,8 @@ var TOOL_NAMES = [
206
206
  "tinycloud_apps_context",
207
207
  "tinycloud_apps_read",
208
208
  "tinycloud_apps_write",
209
- "tinycloud_apps_query"
209
+ "tinycloud_apps_query",
210
+ "tinycloud_apps_move"
210
211
  ];
211
212
  function invocationTargetForMcp(selection) {
212
213
  return {
@@ -463,6 +464,16 @@ var TOOL_BINDINGS = [
463
464
  destructiveHint: true,
464
465
  openWorldHint: false,
465
466
  surfaces: ["hosted", "public"]
467
+ },
468
+ {
469
+ name: "tinycloud_apps_move",
470
+ operationId: "tinycloud.apps.move",
471
+ operationVersion: 1,
472
+ readOnlyHint: false,
473
+ idempotentHint: true,
474
+ destructiveHint: false,
475
+ openWorldHint: false,
476
+ surfaces: ["hosted"]
466
477
  }
467
478
  ];
468
479
  var definitions = new Map(generatedCatalog.operations.map((operation) => [
@@ -555,7 +566,7 @@ function outcomeCode(result) {
555
566
  // package.json
556
567
  var package_default = {
557
568
  name: "@tinycloud/mcp",
558
- version: "0.9.1-beta.2",
569
+ version: "0.10.0-beta.11",
559
570
  description: "TinyCloud delegated operations MCP server",
560
571
  keywords: [
561
572
  "tinycloud",
@@ -626,9 +637,9 @@ var package_default = {
626
637
  dependencies: {
627
638
  "@modelcontextprotocol/node": "2.0.0-beta.5",
628
639
  "@modelcontextprotocol/server": "2.0.0-beta.5",
629
- "@tinycloud/node-sdk": "3.12.0-beta.2",
640
+ "@tinycloud/node-sdk": "3.12.0-beta.5",
630
641
  "@tinycloud/node-sdk-wasm": "1.7.8",
631
- "@tinycloud/operations": "0.8.1-beta.2",
642
+ "@tinycloud/operations": "0.9.0-beta.8",
632
643
  jose: "6.2.4"
633
644
  },
634
645
  devDependencies: {
@@ -1508,14 +1519,15 @@ var RemoteTenantStore = class {
1508
1519
  did: tenant.sessionDid,
1509
1520
  callback: callback.toString(),
1510
1521
  host: this.#config.nodeHost,
1511
- jwk: Buffer.from(JSON.stringify(publicJwk(tenant.jwk))).toString("base64url"),
1522
+ jwk: Buffer.from(JSON.stringify((0, import_node_sdk2.publicJwk)(tenant.jwk))).toString("base64url"),
1512
1523
  permissions: Buffer.from(JSON.stringify({
1513
1524
  permissions: pending.permissions,
1514
1525
  reason: [
1515
1526
  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.",
1516
1527
  // Owner DIDs come from the verified OpenKey access token of the MCP
1517
- // client that created this link, never from the link itself.
1518
- ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}; approve only if that is you.`]
1528
+ // client that created this link, never from the link itself. The
1529
+ // callback refuses a signer outside them, so the approver isn't asked to check.
1530
+ ...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
1519
1531
  ].join(" ")
1520
1532
  })).toString("base64url"),
1521
1533
  expiry: this.#config.delegationExpiry
@@ -2123,11 +2135,6 @@ function sessionFromCallback(data, privateJwk) {
2123
2135
  signature: data.signature
2124
2136
  };
2125
2137
  }
2126
- function publicJwk(jwk) {
2127
- const copy = { ...jwk };
2128
- for (const field of ["d", "p", "q", "dp", "dq", "qi", "oth", "k"]) delete copy[field];
2129
- return copy;
2130
- }
2131
2138
  function samePrincipal(left, right) {
2132
2139
  if (typeof left !== "string") return false;
2133
2140
  try {
@@ -2531,10 +2538,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
2531
2538
  try {
2532
2539
  const destination = await store.approvalRedirect(requiredState(url));
2533
2540
  return Response.redirect(destination, 302);
2534
- } catch {
2541
+ } catch (error) {
2542
+ const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
2543
+ writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
2535
2544
  if (request.headers.get("accept")?.includes("text/html")) {
2536
2545
  return new Response(
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. 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>',
2546
+ '<!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>',
2538
2547
  {
2539
2548
  status: 400,
2540
2549
  headers: {