@tinycloud/mcp 0.9.0-beta.4 → 0.9.0-beta.5
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 +88 -5
- package/dist/cli.cjs +35 -4
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +35 -4
- package/dist/cli.js.map +1 -1
- package/dist/http-cli.cjs +38 -7
- package/dist/http-cli.cjs.map +1 -1
- package/dist/http-cli.js +38 -7
- package/dist/http-cli.js.map +1 -1
- package/dist/http.cjs +38 -7
- package/dist/http.cjs.map +1 -1
- package/dist/http.js +38 -7
- package/dist/http.js.map +1 -1
- package/dist/index.cjs +40 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -7
- package/dist/index.js.map +1 -1
- package/dist/results.cjs +15 -2
- package/dist/results.cjs.map +1 -1
- package/dist/results.js +15 -2
- package/dist/results.js.map +1 -1
- package/dist/server.cjs +35 -4
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +35 -4
- package/dist/server.js.map +1 -1
- package/dist/tools.cjs +35 -2
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +35 -2
- package/dist/tools.js.map +1 -1
- package/generated/mcp-facts.json +36 -0
- package/package.json +2 -2
- package/skills/tinycloud-delegated-secrets/SKILL.md +43 -8
package/dist/http-cli.js
CHANGED
|
@@ -1538,14 +1538,27 @@ function toMcpToolResult(result, bindings = [], options = {}) {
|
|
|
1538
1538
|
serialized = JSON.stringify(canonical);
|
|
1539
1539
|
if ((options.readOnly === true || options.operationId === "tinycloud.apps.context" || options.operationId === "tinycloud.apps.query") && serialized.length > 1e5) {
|
|
1540
1540
|
const sql = options.operationId?.startsWith("tinycloud.sql.") || options.operationId === "tinycloud.apps.query";
|
|
1541
|
+
const readTool = options.operationId === "tinycloud.kv.get" || options.operationId === "tinycloud.sql.query" ? bindings.find((binding) => binding.operationId === "tinycloud.read") : void 0;
|
|
1541
1542
|
canonical = {
|
|
1542
1543
|
status: "error",
|
|
1543
1544
|
operation: canonical.operation,
|
|
1544
1545
|
context: canonical.context,
|
|
1545
1546
|
error: {
|
|
1546
1547
|
code: sql ? "SQL_RESULT_LIMIT_EXCEEDED" : "KV_RESPONSE_TOO_LARGE",
|
|
1547
|
-
message: sql ? "The result exceeds 100,000 characters. Select fewer columns or rows, add a WHERE filter or a smaller LIMIT, or aggregate the data." : "The result exceeds 100,000 characters. Request fewer keys, narrow the prefix, or use a smaller page size.",
|
|
1548
|
-
retryable: false
|
|
1548
|
+
message: readTool !== void 0 ? `The serialized result exceeds the hosted 100,000-character limit. Use ${readTool.name} with the original ${sql ? "SQL query and parameters" : "space and key"} as a ${sql ? "sql" : "kv"} resource for complete, digest-bound pages.` : options.operationId === "tinycloud.read" ? "The serialized page exceeds the hosted 100,000-character limit. Reduce pageBytes while retaining the same resource and expected binding." : sql ? "The result exceeds 100,000 characters. Select fewer columns or rows, add a WHERE filter or a smaller LIMIT, or aggregate the data." : "The result exceeds 100,000 characters. Request fewer keys, narrow the prefix, or use a smaller page size.",
|
|
1549
|
+
retryable: false,
|
|
1550
|
+
...readTool === void 0 ? {} : {
|
|
1551
|
+
details: {
|
|
1552
|
+
recovery: {
|
|
1553
|
+
action: "read_in_chunks",
|
|
1554
|
+
tool: readTool.name,
|
|
1555
|
+
operationId: "tinycloud.read",
|
|
1556
|
+
operationVersion: 1,
|
|
1557
|
+
resourceKind: sql ? "sql" : "kv",
|
|
1558
|
+
requiresCallerInput: true
|
|
1559
|
+
}
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1549
1562
|
}
|
|
1550
1563
|
};
|
|
1551
1564
|
serialized = JSON.stringify(canonical);
|
|
@@ -1686,6 +1699,15 @@ var TOOL_BINDINGS = [
|
|
|
1686
1699
|
destructiveHint: false,
|
|
1687
1700
|
openWorldHint: false
|
|
1688
1701
|
},
|
|
1702
|
+
{
|
|
1703
|
+
name: "tinycloud_auth_read_scope",
|
|
1704
|
+
operationId: "tinycloud.auth.read_scope",
|
|
1705
|
+
operationVersion: 1,
|
|
1706
|
+
readOnlyHint: true,
|
|
1707
|
+
idempotentHint: true,
|
|
1708
|
+
destructiveHint: false,
|
|
1709
|
+
openWorldHint: false
|
|
1710
|
+
},
|
|
1689
1711
|
{
|
|
1690
1712
|
name: "tinycloud_auth_import",
|
|
1691
1713
|
operationId: "tinycloud.auth.import",
|
|
@@ -1734,6 +1756,15 @@ var TOOL_BINDINGS = [
|
|
|
1734
1756
|
destructiveHint: false,
|
|
1735
1757
|
openWorldHint: true
|
|
1736
1758
|
},
|
|
1759
|
+
{
|
|
1760
|
+
name: "tinycloud_read",
|
|
1761
|
+
operationId: "tinycloud.read",
|
|
1762
|
+
operationVersion: 1,
|
|
1763
|
+
readOnlyHint: true,
|
|
1764
|
+
idempotentHint: true,
|
|
1765
|
+
destructiveHint: false,
|
|
1766
|
+
openWorldHint: true
|
|
1767
|
+
},
|
|
1737
1768
|
{
|
|
1738
1769
|
name: "tinycloud_kv_head",
|
|
1739
1770
|
operationId: "tinycloud.kv.head",
|
|
@@ -1958,7 +1989,7 @@ function outcomeCode(result) {
|
|
|
1958
1989
|
// package.json
|
|
1959
1990
|
var package_default = {
|
|
1960
1991
|
name: "@tinycloud/mcp",
|
|
1961
|
-
version: "0.9.0-beta.
|
|
1992
|
+
version: "0.9.0-beta.5",
|
|
1962
1993
|
description: "TinyCloud delegated operations MCP server",
|
|
1963
1994
|
keywords: [
|
|
1964
1995
|
"tinycloud",
|
|
@@ -2031,7 +2062,7 @@ var package_default = {
|
|
|
2031
2062
|
"@modelcontextprotocol/server": "2.0.0-beta.5",
|
|
2032
2063
|
"@tinycloud/node-sdk": "3.11.0-beta.2",
|
|
2033
2064
|
"@tinycloud/node-sdk-wasm": "1.7.8",
|
|
2034
|
-
"@tinycloud/operations": "0.
|
|
2065
|
+
"@tinycloud/operations": "0.8.0-beta.3",
|
|
2035
2066
|
jose: "6.2.4"
|
|
2036
2067
|
},
|
|
2037
2068
|
devDependencies: {
|
|
@@ -2116,7 +2147,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2116
2147
|
{ name: MCP_SERVER_NAME, version: MCP_VERSION },
|
|
2117
2148
|
{
|
|
2118
2149
|
jsonSchemaValidator: validator,
|
|
2119
|
-
instructions: nativeOwner === void 0 ? surface === "public" ? "Use TinyCloud only for the user's requested task. Call tinycloud_connect first. If an operation returns authority_required, present approval.url and wait for the user's approval before retrying. If approval is declined, stop that operation. For personal records, call tinycloud_apps_context first. Never request or store passwords, API keys, authentication codes, government identifiers, payment-card data, or protected health information." : "Call tinycloud_connect first. If an operation returns authority_required,
|
|
2150
|
+
instructions: nativeOwner === void 0 ? surface === "public" ? "Use TinyCloud only for the user's requested task. Call tinycloud_connect first. If an operation returns authority_required, present approval.url and wait for the user's approval before retrying. If approval is declined, stop that operation. For personal records, call tinycloud_apps_context first. Never request or store passwords, API keys, authentication codes, government identifiers, payment-card data, or protected health information." : "Call tinycloud_connect first. If an operation returns authority_required, present approval.url and wait for approval before retrying unchanged. For personal records such as weight, workouts, goals or todos, call tinycloud_apps_context first. Other app data can be discovered with account-space listing, KV cursors and SQL schema/query tools without a knowledge bundle. If the user wants reusable read access, explicitly select prefixes/databases with tinycloud_auth_read_scope; never silently broaden a key read. Use tinycloud_read for complete bounded KV/SQL delivery and replay its continuation with the original resource." : "Use only the user's requested connector-transcript data. The signed TinyCloud grant authorizes read-only SQL and transcript KV reads. Use tinycloud_read for large values, retaining the original resource and returned digest-bound continuation."
|
|
2120
2151
|
}
|
|
2121
2152
|
);
|
|
2122
2153
|
registerTinyCloudTools(server, {
|
|
@@ -2126,7 +2157,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2126
2157
|
allowOwnerProfile: false,
|
|
2127
2158
|
stateRoot,
|
|
2128
2159
|
...nativeOwner === void 0 ? {} : {
|
|
2129
|
-
allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get"]
|
|
2160
|
+
allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"]
|
|
2130
2161
|
},
|
|
2131
2162
|
beforeOperation: nativeOwner === void 0 ? () => store.validateTenant(subject, ownerDids) : () => store.assertNativeGrantActive(nativeOwner),
|
|
2132
2163
|
...nativeOwner === void 0 ? {
|
|
@@ -2292,7 +2323,7 @@ Agentmap: ${new URL("/.well-known/ai-catalog.json", resourceUrl)}
|
|
|
2292
2323
|
{ service: "tinycloud.sql", space: "applications", path: "xyz.tinycloud.tinychat/connectors", actions: ["tinycloud.sql/read"] },
|
|
2293
2324
|
{ service: "tinycloud.kv", space: "applications", path: "xyz.tinycloud.tinychat/connectors/", actions: ["tinycloud.kv/get", "tinycloud.kv/list"] }
|
|
2294
2325
|
],
|
|
2295
|
-
tools: ["tinycloud_sql_query", "tinycloud_kv_get"],
|
|
2326
|
+
tools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"],
|
|
2296
2327
|
errors: {
|
|
2297
2328
|
required: NATIVE_GRANT_REQUIRED,
|
|
2298
2329
|
expired: NATIVE_GRANT_EXPIRED,
|