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 CHANGED
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.51",
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.329",
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.329",
126
+ "version": "0.0.330",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -98,7 +98,7 @@
98
98
  },
99
99
  {
100
100
  "name": "tiny-http-mcp-server",
101
- "version": "0.1.51",
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.329",
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.329",
126
+ "version": "0.0.330",
127
127
  "license": "MIT"
128
128
  },
129
129
  {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "name": "tiny-http-mcp-server",
21
- "version": "0.1.51",
21
+ "version": "0.1.52",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -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) {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.329",
11
+ "version": "0.0.330",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -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.dependentSchemas)) {
101
- for (const key of Object.keys(node.schema.dependentSchemas)) {
102
- const child = node.children.get(`dependentSchemas/${key}`);
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
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.329",
3
+ "version": "0.0.330",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.329",
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.329",
161
+ "toolcraft-schema": "0.0.330",
162
162
  "toolcraft-design": "*",
163
163
  "@poe-code/frontmatter": "*",
164
164
  "@poe-code/agent-mcp-config": "*",