toolcraft 0.0.329 → 0.0.330
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/composition.json +3 -3
- package/dist/composition.json +3 -3
- package/node_modules/tiny-http-mcp-server/dist/composition.json +1 -1
- package/node_modules/tiny-http-mcp-server/package.json +1 -1
- package/node_modules/tiny-mcp-client/README.md +5 -0
- package/node_modules/tiny-mcp-client/dist/index.js +3 -0
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/toolcraft-schema/dist/json-schema/properties.js +4 -4
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +2 -2
package/composition.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "tiny-http-mcp-server",
|
|
101
|
-
"version": "0.1.
|
|
101
|
+
"version": "0.1.52",
|
|
102
102
|
"license": "MIT"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.330",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.330",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
package/dist/composition.json
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"name": "tiny-http-mcp-server",
|
|
101
|
-
"version": "0.1.
|
|
101
|
+
"version": "0.1.52",
|
|
102
102
|
"license": "MIT"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "toolcraft",
|
|
116
|
-
"version": "0.0.
|
|
116
|
+
"version": "0.0.330",
|
|
117
117
|
"license": "MIT"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"name": "toolcraft-schema",
|
|
126
|
-
"version": "0.0.
|
|
126
|
+
"version": "0.0.330",
|
|
127
127
|
"license": "MIT"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
@@ -22,6 +22,11 @@ console.log(result.structuredContent);
|
|
|
22
22
|
await client.close();
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
Omit `protocolVersion` for automatic modern discovery and legacy negotiation.
|
|
26
|
+
Set it to `"2025-03-26"` or `"2026-07-28"` to pin a protocol. A modern pin
|
|
27
|
+
rejects failed or timed-out discovery without sending legacy initialization.
|
|
28
|
+
Unsupported pins fail before connection setup.
|
|
29
|
+
|
|
25
30
|
`Tool` includes MCP `outputSchema` when a server advertises typed tool output.
|
|
26
31
|
`CallToolResult.structuredContent` preserves modern JSON values; legacy servers
|
|
27
32
|
require an object. Complete `content[]` blocks remain available in either case.
|
|
@@ -6685,6 +6685,8 @@ var McpClient = class {
|
|
|
6685
6685
|
}
|
|
6686
6686
|
async connect(transport, options = {}) {
|
|
6687
6687
|
options.signal?.throwIfAborted();
|
|
6688
|
+
if (this.options.protocolVersion !== void 0 && this.options.protocolVersion !== MCP_PROTOCOL_VERSION && this.options.protocolVersion !== "2026-07-28")
|
|
6689
|
+
throw new Error("Unsupported protocolVersion; use 2025-03-26 or 2026-07-28");
|
|
6688
6690
|
if (this.currentState !== "disconnected" && this.currentState !== "closed") {
|
|
6689
6691
|
throw new Error("MCP client is already connected");
|
|
6690
6692
|
}
|
|
@@ -6861,6 +6863,7 @@ var McpClient = class {
|
|
|
6861
6863
|
}, { signal: options.signal, timeoutMs: this.options.protocolVersion === "2026-07-28" ? this.options.requestTimeoutMs ?? 3e4 : Math.min(this.options.requestTimeoutMs ?? 3e4, 1e3) });
|
|
6862
6864
|
} catch (error) {
|
|
6863
6865
|
options.signal?.throwIfAborted();
|
|
6866
|
+
if (this.options.protocolVersion === "2026-07-28") throw error;
|
|
6864
6867
|
if (error instanceof McpError && [-32020, -32021, -32022].includes(error.code)) throw error;
|
|
6865
6868
|
}
|
|
6866
6869
|
if (discovery !== void 0) {
|
|
@@ -96,10 +96,10 @@ export function projectJsonSchemaProperties(schema, options = {}) {
|
|
|
96
96
|
visit(child);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
for (const keyword of ["then", "else", "dependentSchemas"]) {
|
|
100
|
-
if (keyword === "dependentSchemas" && isObject(node.schema
|
|
101
|
-
for (const key of Object.keys(node.schema
|
|
102
|
-
const child = node.children.get(
|
|
99
|
+
for (const keyword of ["then", "else", "dependentSchemas", "dependencies"]) {
|
|
100
|
+
if ((keyword === "dependentSchemas" || keyword === "dependencies") && isObject(node.schema[keyword])) {
|
|
101
|
+
for (const key of Object.keys(node.schema[keyword])) {
|
|
102
|
+
const child = node.children.get(`${keyword}/${key}`);
|
|
103
103
|
if (child)
|
|
104
104
|
visit(child);
|
|
105
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.330",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"yaml"
|
|
159
159
|
],
|
|
160
160
|
"optionalDependencies": {
|
|
161
|
-
"toolcraft-schema": "0.0.
|
|
161
|
+
"toolcraft-schema": "0.0.330",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|