@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.js
CHANGED
|
@@ -1521,14 +1521,27 @@ function toMcpToolResult(result, bindings = [], options = {}) {
|
|
|
1521
1521
|
serialized = JSON.stringify(canonical);
|
|
1522
1522
|
if ((options.readOnly === true || options.operationId === "tinycloud.apps.context" || options.operationId === "tinycloud.apps.query") && serialized.length > 1e5) {
|
|
1523
1523
|
const sql = options.operationId?.startsWith("tinycloud.sql.") || options.operationId === "tinycloud.apps.query";
|
|
1524
|
+
const readTool = options.operationId === "tinycloud.kv.get" || options.operationId === "tinycloud.sql.query" ? bindings.find((binding) => binding.operationId === "tinycloud.read") : void 0;
|
|
1524
1525
|
canonical = {
|
|
1525
1526
|
status: "error",
|
|
1526
1527
|
operation: canonical.operation,
|
|
1527
1528
|
context: canonical.context,
|
|
1528
1529
|
error: {
|
|
1529
1530
|
code: sql ? "SQL_RESULT_LIMIT_EXCEEDED" : "KV_RESPONSE_TOO_LARGE",
|
|
1530
|
-
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.",
|
|
1531
|
-
retryable: false
|
|
1531
|
+
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.",
|
|
1532
|
+
retryable: false,
|
|
1533
|
+
...readTool === void 0 ? {} : {
|
|
1534
|
+
details: {
|
|
1535
|
+
recovery: {
|
|
1536
|
+
action: "read_in_chunks",
|
|
1537
|
+
tool: readTool.name,
|
|
1538
|
+
operationId: "tinycloud.read",
|
|
1539
|
+
operationVersion: 1,
|
|
1540
|
+
resourceKind: sql ? "sql" : "kv",
|
|
1541
|
+
requiresCallerInput: true
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1532
1545
|
}
|
|
1533
1546
|
};
|
|
1534
1547
|
serialized = JSON.stringify(canonical);
|
|
@@ -1669,6 +1682,15 @@ var TOOL_BINDINGS = [
|
|
|
1669
1682
|
destructiveHint: false,
|
|
1670
1683
|
openWorldHint: false
|
|
1671
1684
|
},
|
|
1685
|
+
{
|
|
1686
|
+
name: "tinycloud_auth_read_scope",
|
|
1687
|
+
operationId: "tinycloud.auth.read_scope",
|
|
1688
|
+
operationVersion: 1,
|
|
1689
|
+
readOnlyHint: true,
|
|
1690
|
+
idempotentHint: true,
|
|
1691
|
+
destructiveHint: false,
|
|
1692
|
+
openWorldHint: false
|
|
1693
|
+
},
|
|
1672
1694
|
{
|
|
1673
1695
|
name: "tinycloud_auth_import",
|
|
1674
1696
|
operationId: "tinycloud.auth.import",
|
|
@@ -1717,6 +1739,15 @@ var TOOL_BINDINGS = [
|
|
|
1717
1739
|
destructiveHint: false,
|
|
1718
1740
|
openWorldHint: true
|
|
1719
1741
|
},
|
|
1742
|
+
{
|
|
1743
|
+
name: "tinycloud_read",
|
|
1744
|
+
operationId: "tinycloud.read",
|
|
1745
|
+
operationVersion: 1,
|
|
1746
|
+
readOnlyHint: true,
|
|
1747
|
+
idempotentHint: true,
|
|
1748
|
+
destructiveHint: false,
|
|
1749
|
+
openWorldHint: true
|
|
1750
|
+
},
|
|
1720
1751
|
{
|
|
1721
1752
|
name: "tinycloud_kv_head",
|
|
1722
1753
|
operationId: "tinycloud.kv.head",
|
|
@@ -1941,7 +1972,7 @@ function outcomeCode(result) {
|
|
|
1941
1972
|
// package.json
|
|
1942
1973
|
var package_default = {
|
|
1943
1974
|
name: "@tinycloud/mcp",
|
|
1944
|
-
version: "0.9.0-beta.
|
|
1975
|
+
version: "0.9.0-beta.5",
|
|
1945
1976
|
description: "TinyCloud delegated operations MCP server",
|
|
1946
1977
|
keywords: [
|
|
1947
1978
|
"tinycloud",
|
|
@@ -2014,7 +2045,7 @@ var package_default = {
|
|
|
2014
2045
|
"@modelcontextprotocol/server": "2.0.0-beta.5",
|
|
2015
2046
|
"@tinycloud/node-sdk": "3.11.0-beta.2",
|
|
2016
2047
|
"@tinycloud/node-sdk-wasm": "1.7.8",
|
|
2017
|
-
"@tinycloud/operations": "0.
|
|
2048
|
+
"@tinycloud/operations": "0.8.0-beta.3",
|
|
2018
2049
|
jose: "6.2.4"
|
|
2019
2050
|
},
|
|
2020
2051
|
devDependencies: {
|
|
@@ -2099,7 +2130,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2099
2130
|
{ name: MCP_SERVER_NAME, version: MCP_VERSION },
|
|
2100
2131
|
{
|
|
2101
2132
|
jsonSchemaValidator: validator,
|
|
2102
|
-
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,
|
|
2133
|
+
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."
|
|
2103
2134
|
}
|
|
2104
2135
|
);
|
|
2105
2136
|
registerTinyCloudTools(server, {
|
|
@@ -2109,7 +2140,7 @@ function createHostedSurface(config, resourceUrl, surface, tokenStatus) {
|
|
|
2109
2140
|
allowOwnerProfile: false,
|
|
2110
2141
|
stateRoot,
|
|
2111
2142
|
...nativeOwner === void 0 ? {} : {
|
|
2112
|
-
allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get"]
|
|
2143
|
+
allowedTools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"]
|
|
2113
2144
|
},
|
|
2114
2145
|
beforeOperation: nativeOwner === void 0 ? () => store.validateTenant(subject, ownerDids) : () => store.assertNativeGrantActive(nativeOwner),
|
|
2115
2146
|
...nativeOwner === void 0 ? {
|
|
@@ -2275,7 +2306,7 @@ Agentmap: ${new URL("/.well-known/ai-catalog.json", resourceUrl)}
|
|
|
2275
2306
|
{ service: "tinycloud.sql", space: "applications", path: "xyz.tinycloud.tinychat/connectors", actions: ["tinycloud.sql/read"] },
|
|
2276
2307
|
{ service: "tinycloud.kv", space: "applications", path: "xyz.tinycloud.tinychat/connectors/", actions: ["tinycloud.kv/get", "tinycloud.kv/list"] }
|
|
2277
2308
|
],
|
|
2278
|
-
tools: ["tinycloud_sql_query", "tinycloud_kv_get"],
|
|
2309
|
+
tools: ["tinycloud_sql_query", "tinycloud_kv_get", "tinycloud_read"],
|
|
2279
2310
|
errors: {
|
|
2280
2311
|
required: NATIVE_GRANT_REQUIRED,
|
|
2281
2312
|
expired: NATIVE_GRANT_EXPIRED,
|