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