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