@tinycloud/mcp 0.10.0-beta.50 → 0.10.0-beta.51
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 +3 -1
- package/dist/cli.cjs +2 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -1
- package/dist/cli.js.map +1 -1
- package/dist/http-cli.cjs +11 -6
- package/dist/http-cli.cjs.map +1 -1
- package/dist/http-cli.js +11 -6
- package/dist/http-cli.js.map +1 -1
- package/dist/http.cjs +11 -6
- package/dist/http.cjs.map +1 -1
- package/dist/http.js +11 -6
- package/dist/http.js.map +1 -1
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +2 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/dist/tools.cjs +1 -0
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +2 -0
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +1 -0
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/http.js
CHANGED
|
@@ -1942,6 +1942,7 @@ function registerTinyCloudTools(server, selection, validator) {
|
|
|
1942
1942
|
validator
|
|
1943
1943
|
);
|
|
1944
1944
|
const annotations = {
|
|
1945
|
+
...selection.annotationTitles === true ? { title: operation.title } : {},
|
|
1945
1946
|
readOnlyHint: binding.readOnlyHint,
|
|
1946
1947
|
idempotentHint: binding.idempotentHint,
|
|
1947
1948
|
destructiveHint: binding.destructiveHint,
|
|
@@ -2008,7 +2009,7 @@ function outcomeCode(result) {
|
|
|
2008
2009
|
// package.json
|
|
2009
2010
|
var package_default = {
|
|
2010
2011
|
name: "@tinycloud/mcp",
|
|
2011
|
-
version: "0.10.0-beta.
|
|
2012
|
+
version: "0.10.0-beta.51",
|
|
2012
2013
|
description: "TinyCloud delegated operations MCP server",
|
|
2013
2014
|
keywords: [
|
|
2014
2015
|
"tinycloud",
|
|
@@ -2111,6 +2112,7 @@ var MCP_CORS_EXPOSED_HEADERS = "WWW-Authenticate, Mcp-Session-Id, Mcp-Protocol-V
|
|
|
2111
2112
|
var LOCAL_CLI_PACKAGE = ["@tinycloud", "cli"].join("/");
|
|
2112
2113
|
var LOCAL_MCP_PACKAGE = ["@tinycloud", "mcp"].join("/");
|
|
2113
2114
|
var RESTRICTED_ADDRESS_PREFIXES = ["chatgpt", "claude", "grok", "muse"];
|
|
2115
|
+
var ANNOTATION_TITLE_PREFIXES = /* @__PURE__ */ new Set(["claude"]);
|
|
2114
2116
|
function createHostedMcpApp(config) {
|
|
2115
2117
|
if (config.nativeServiceCredential !== void 0 && Buffer.byteLength(config.nativeServiceCredential, "utf8") < 32) {
|
|
2116
2118
|
throw new Error("TC_MCP_NATIVE_SERVICE_CREDENTIAL must contain at least 32 bytes.");
|
|
@@ -2128,7 +2130,7 @@ function createHostedMcpApp(config) {
|
|
|
2128
2130
|
nativeServiceCredential: void 0,
|
|
2129
2131
|
stateDir: join3(config.stateDir, prefix),
|
|
2130
2132
|
approvalPath: connectUrl.pathname
|
|
2131
|
-
}, restrictedUrl, "public", statusFor(restrictedUrl));
|
|
2133
|
+
}, restrictedUrl, "public", statusFor(restrictedUrl), ANNOTATION_TITLE_PREFIXES.has(prefix));
|
|
2132
2134
|
surfaces.push(restricted);
|
|
2133
2135
|
for (const owned of [
|
|
2134
2136
|
restrictedUrl,
|
|
@@ -2146,7 +2148,7 @@ function createHostedMcpApp(config) {
|
|
|
2146
2148
|
}
|
|
2147
2149
|
};
|
|
2148
2150
|
}
|
|
2149
|
-
function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
2151
|
+
function createHostedSurface(config, resourceUrl, surface, tokenStatus, annotationTitles = false) {
|
|
2150
2152
|
const connectPath = config.approvalPath ?? "/connect";
|
|
2151
2153
|
const callbackPath = `${connectPath}/callback`;
|
|
2152
2154
|
const issuer = String(config.oauthMetadata.issuer);
|
|
@@ -2186,6 +2188,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2186
2188
|
explicitProfile: true,
|
|
2187
2189
|
allowOwnerProfile: false,
|
|
2188
2190
|
stateRoot,
|
|
2191
|
+
annotationTitles,
|
|
2189
2192
|
...nativeOwner === void 0 ? {} : {
|
|
2190
2193
|
allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"]
|
|
2191
2194
|
},
|
|
@@ -2194,7 +2197,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2194
2197
|
transformOperationResult: (result, invocation) => store.decorateAuthorityResult(subject, ownerDids, result, invocation)
|
|
2195
2198
|
} : {}
|
|
2196
2199
|
}, validator);
|
|
2197
|
-
if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface);
|
|
2200
|
+
if (nativeOwner === void 0) registerConnectTool(server, validator, store, identity, surface, annotationTitles);
|
|
2198
2201
|
return server;
|
|
2199
2202
|
}, {
|
|
2200
2203
|
legacy: "stateless",
|
|
@@ -2541,7 +2544,8 @@ Local alternative: install \`${LOCAL_CLI_PACKAGE}\` and \`${LOCAL_MCP_PACKAGE}\`
|
|
|
2541
2544
|
close: () => handler.close()
|
|
2542
2545
|
};
|
|
2543
2546
|
}
|
|
2544
|
-
function registerConnectTool(server, validator, store, identity, surface) {
|
|
2547
|
+
function registerConnectTool(server, validator, store, identity, surface, annotationTitles) {
|
|
2548
|
+
const title = "Connect TinyCloud";
|
|
2545
2549
|
const inputSchema = fromJsonSchema2({ type: "object", properties: {}, additionalProperties: false }, validator);
|
|
2546
2550
|
const outputSchema = fromJsonSchema2({
|
|
2547
2551
|
type: "object",
|
|
@@ -2557,11 +2561,12 @@ function registerConnectTool(server, validator, store, identity, surface) {
|
|
|
2557
2561
|
server.registerTool(
|
|
2558
2562
|
"tinycloud_connect",
|
|
2559
2563
|
{
|
|
2560
|
-
title
|
|
2564
|
+
title,
|
|
2561
2565
|
description: "Check the hosted delegate connection and return a one-time OpenKey approval URL when setup is required.",
|
|
2562
2566
|
inputSchema,
|
|
2563
2567
|
outputSchema,
|
|
2564
2568
|
annotations: {
|
|
2569
|
+
...annotationTitles ? { title } : {},
|
|
2565
2570
|
readOnlyHint: false,
|
|
2566
2571
|
idempotentHint: true,
|
|
2567
2572
|
destructiveHint: false,
|