@tinycloud/mcp 0.10.0-beta.3 → 0.10.0-beta.31
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/README.md +33 -14
- package/dist/cli.cjs +6 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +6 -6
- package/dist/cli.js.map +1 -1
- package/dist/http-cli.cjs +16 -17
- package/dist/http-cli.cjs.map +1 -1
- package/dist/http-cli.js +16 -16
- package/dist/http-cli.js.map +1 -1
- package/dist/http.cjs +16 -17
- package/dist/http.cjs.map +1 -1
- package/dist/http.js +16 -16
- package/dist/http.js.map +1 -1
- package/dist/index.cjs +16 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +6 -6
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.js.map +1 -1
- package/dist/tools.cjs +2 -2
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.js +2 -2
- package/dist/tools.js.map +1 -1
- package/generated/mcp-facts.json +16 -0
- package/package.json +4 -4
- package/skills/tinycloud-delegated-secrets/SKILL.md +4 -2
package/dist/index.js
CHANGED
|
@@ -393,7 +393,7 @@ var TOOL_BINDINGS = [
|
|
|
393
393
|
operationVersion: 1,
|
|
394
394
|
readOnlyHint: false,
|
|
395
395
|
idempotentHint: true,
|
|
396
|
-
destructiveHint:
|
|
396
|
+
destructiveHint: false,
|
|
397
397
|
openWorldHint: false,
|
|
398
398
|
surfaces: ["hosted", "public"]
|
|
399
399
|
},
|
|
@@ -423,7 +423,7 @@ var TOOL_BINDINGS = [
|
|
|
423
423
|
operationVersion: 1,
|
|
424
424
|
readOnlyHint: false,
|
|
425
425
|
idempotentHint: true,
|
|
426
|
-
destructiveHint:
|
|
426
|
+
destructiveHint: false,
|
|
427
427
|
openWorldHint: false,
|
|
428
428
|
surfaces: ["hosted", "public"]
|
|
429
429
|
}
|
|
@@ -518,7 +518,7 @@ function outcomeCode(result) {
|
|
|
518
518
|
// package.json
|
|
519
519
|
var package_default = {
|
|
520
520
|
name: "@tinycloud/mcp",
|
|
521
|
-
version: "0.10.0-beta.
|
|
521
|
+
version: "0.10.0-beta.31",
|
|
522
522
|
description: "TinyCloud delegated operations MCP server",
|
|
523
523
|
keywords: [
|
|
524
524
|
"tinycloud",
|
|
@@ -589,9 +589,9 @@ var package_default = {
|
|
|
589
589
|
dependencies: {
|
|
590
590
|
"@modelcontextprotocol/node": "2.0.0-beta.5",
|
|
591
591
|
"@modelcontextprotocol/server": "2.0.0-beta.5",
|
|
592
|
-
"@tinycloud/node-sdk": "3.12.0-beta.
|
|
593
|
-
"@tinycloud/node-sdk-wasm": "1.7.
|
|
594
|
-
"@tinycloud/operations": "0.9.0-beta.
|
|
592
|
+
"@tinycloud/node-sdk": "3.12.0-beta.23",
|
|
593
|
+
"@tinycloud/node-sdk-wasm": "1.7.9-beta.0",
|
|
594
|
+
"@tinycloud/operations": "0.9.0-beta.27",
|
|
595
595
|
jose: "6.2.4"
|
|
596
596
|
},
|
|
597
597
|
devDependencies: {
|
|
@@ -993,6 +993,7 @@ import {
|
|
|
993
993
|
UnsupportedSessionRestoreError,
|
|
994
994
|
isCapabilitySubset,
|
|
995
995
|
principalDidEquals,
|
|
996
|
+
publicJwk,
|
|
996
997
|
siweRuntimeDelegation,
|
|
997
998
|
signedCompactUcanExpiry
|
|
998
999
|
} from "@tinycloud/node-sdk";
|
|
@@ -1500,8 +1501,9 @@ var RemoteTenantStore = class {
|
|
|
1500
1501
|
reason: [
|
|
1501
1502
|
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
1503
|
// Owner DIDs come from the verified OpenKey access token of the MCP
|
|
1503
|
-
// client that created this link, never from the link itself.
|
|
1504
|
-
|
|
1504
|
+
// client that created this link, never from the link itself. The
|
|
1505
|
+
// callback refuses a signer outside them, so the approver isn't asked to check.
|
|
1506
|
+
...pending.ownerDids.length === 0 ? [] : [`Requested by TinyCloud account ${pending.ownerDids.join(", ")}.`]
|
|
1505
1507
|
].join(" ")
|
|
1506
1508
|
})).toString("base64url"),
|
|
1507
1509
|
expiry: this.#config.delegationExpiry
|
|
@@ -2109,11 +2111,6 @@ function sessionFromCallback(data, privateJwk) {
|
|
|
2109
2111
|
signature: data.signature
|
|
2110
2112
|
};
|
|
2111
2113
|
}
|
|
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
2114
|
function samePrincipal(left, right) {
|
|
2118
2115
|
if (typeof left !== "string") return false;
|
|
2119
2116
|
try {
|
|
@@ -2220,6 +2217,7 @@ function samePendingRequest(pending, expected) {
|
|
|
2220
2217
|
// src/http.ts
|
|
2221
2218
|
var REQUIRED_SCOPE = "tinycloud:mcp";
|
|
2222
2219
|
var MCP_CORS_ALLOWED_HEADERS = "Authorization, Content-Type, Accept, Mcp-Protocol-Version, Mcp-Session-Id, Last-Event-ID, Mcp-Method, Mcp-Name";
|
|
2220
|
+
var MCP_CORS_EXPOSED_HEADERS = "WWW-Authenticate, Mcp-Session-Id, Mcp-Protocol-Version";
|
|
2223
2221
|
var LOCAL_CLI_PACKAGE = ["@tinycloud", "cli"].join("/");
|
|
2224
2222
|
var LOCAL_MCP_PACKAGE = ["@tinycloud", "mcp"].join("/");
|
|
2225
2223
|
function createHostedMcpApp(config) {
|
|
@@ -2517,10 +2515,12 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
|
|
|
2517
2515
|
try {
|
|
2518
2516
|
const destination = await store.approvalRedirect(requiredState(url));
|
|
2519
2517
|
return Response.redirect(destination, 302);
|
|
2520
|
-
} catch {
|
|
2518
|
+
} catch (error) {
|
|
2519
|
+
const reason = error instanceof ApprovalRequestError ? error.detail : "unknown";
|
|
2520
|
+
writeDiagnostic(`connect rejected: reason=${reason} path=${connectPath}`);
|
|
2521
2521
|
if (request.headers.get("accept")?.includes("text/html")) {
|
|
2522
2522
|
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.
|
|
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. 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
2524
|
{
|
|
2525
2525
|
status: 400,
|
|
2526
2526
|
headers: {
|
|
@@ -2731,7 +2731,7 @@ function mcpCors(response, request) {
|
|
|
2731
2731
|
if (request.headers.has("origin")) {
|
|
2732
2732
|
headers.set("access-control-allow-origin", "*");
|
|
2733
2733
|
headers.set("access-control-allow-methods", "GET, POST, DELETE, OPTIONS");
|
|
2734
|
-
headers.set("access-control-expose-headers",
|
|
2734
|
+
headers.set("access-control-expose-headers", MCP_CORS_EXPOSED_HEADERS);
|
|
2735
2735
|
if (request.method === "OPTIONS") headers.set("access-control-allow-headers", MCP_CORS_ALLOWED_HEADERS);
|
|
2736
2736
|
}
|
|
2737
2737
|
return new Response(response.body, { status: response.status, statusText: response.statusText, headers });
|