toolcraft 0.0.533 → 0.0.535

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.95",
101
+ "version": "0.1.96",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.533",
116
+ "version": "0.0.535",
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.533",
126
+ "version": "0.0.535",
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.95",
101
+ "version": "0.1.96",
102
102
  "license": "MIT"
103
103
  },
104
104
  {
@@ -113,7 +113,7 @@
113
113
  },
114
114
  {
115
115
  "name": "toolcraft",
116
- "version": "0.0.533",
116
+ "version": "0.0.535",
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.533",
126
+ "version": "0.0.535",
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.95",
21
+ "version": "0.1.96",
22
22
  "license": "MIT"
23
23
  },
24
24
  {
@@ -1,5 +1,5 @@
1
1
  export async function readBoundedResponseText(response, maxBytes, readers, signal) {
2
- if (!Number.isSafeInteger(maxBytes) || maxBytes < 1)
2
+ if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 1))
3
3
  throw new Error("HTTP response byte limit must be a positive safe integer");
4
4
  if (signal?.aborted) {
5
5
  void response.body?.cancel().catch(() => undefined);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-http-mcp-server",
3
- "version": "0.1.95",
3
+ "version": "0.1.96",
4
4
  "description": "Minimal MCP server over HTTP built on tiny-stdio-mcp-server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -72,7 +72,8 @@ Static HTTP headers are copied and validated when the transport is constructed,
72
72
  before OAuth callbacks run. Invalid headers fail without reflecting their values.
73
73
  Use `snapshotHttpTransportHeaders(headers)` to apply the same ownership and safe
74
74
  validation when preparing a registry before constructing transports.
75
- `maxResponseBytes` bounds a complete JSON body or each SSE event (default 16 MiB).
75
+ `maxResponseBytes` bounds a complete JSON body or each SSE event (default 16 MiB);
76
+ explicit `Infinity` removes the byte budget.
76
77
  Before deserialization, HTTP JSON-RPC messages also have fixed per-message limits:
77
78
  100,000 nodes (including keys), 64 container levels, 4 MiB of decoded UTF-16
78
79
  strings, and an 8 MiB allocation estimate (128 bytes per node plus string storage).
@@ -170,7 +171,7 @@ OAuth provider inputs receive the originating request's `signal`, covering heade
170
171
  | `fetch` | `(input, init?) => Promise<Response>` | Custom fetch implementation. |
171
172
  | `oauth` | `OAuthClientProviderOptions` | Enables OAuth authorization handling. |
172
173
  | `oauthDiscoveryCache` | `OAuthDiscoveryCache` | Optional shared metadata cache. |
173
- | `maxResponseBytes` | `number` | Maximum JSON/error body or retained SSE event bytes; defaults to 16 MiB and must be a positive safe integer. |
174
+ | `maxResponseBytes` | `number` | Maximum JSON/error body or retained SSE event bytes; defaults to 16 MiB and accepts a positive safe integer or `Infinity`. |
174
175
 
175
176
  ### `StdioTransportOptions`
176
177
 
@@ -214,7 +214,7 @@ var HttpResponseMessages = class {
214
214
  function isJsonValue(value, options = {}) {
215
215
  const maxNodes = options.maxNodes ?? 1e4;
216
216
  const maxDepth = options.maxDepth ?? 64;
217
- if (!Number.isSafeInteger(maxNodes) || maxNodes < 1)
217
+ if (maxNodes !== Infinity && (!Number.isSafeInteger(maxNodes) || maxNodes < 1))
218
218
  throw new Error("maxNodes must be a positive safe integer");
219
219
  if (!Number.isSafeInteger(maxDepth) || maxDepth < 0 || maxDepth > 256)
220
220
  throw new Error("maxDepth must be an integer between 0 and 256");
@@ -5106,7 +5106,7 @@ function generateCodeChallenge(verifier) {
5106
5106
 
5107
5107
  // ../mcp-oauth/dist/http-response.js
5108
5108
  async function readBoundedResponseText(response, maxBytes, readers, signal) {
5109
- if (!Number.isSafeInteger(maxBytes) || maxBytes < 1)
5109
+ if (maxBytes !== Infinity && (!Number.isSafeInteger(maxBytes) || maxBytes < 1))
5110
5110
  throw new Error("HTTP response byte limit must be a positive safe integer");
5111
5111
  if (signal?.aborted) {
5112
5112
  void response.body?.cancel().catch(() => void 0);
@@ -7841,7 +7841,7 @@ var HttpTransport = class {
7841
7841
  onWarning,
7842
7842
  maxResponseBytes = 16 * 1024 * 1024
7843
7843
  }) {
7844
- if (!Number.isSafeInteger(maxResponseBytes) || maxResponseBytes < 1)
7844
+ if (maxResponseBytes !== Infinity && (!Number.isSafeInteger(maxResponseBytes) || maxResponseBytes < 1))
7845
7845
  throw new Error("HTTP response byte limit must be a positive safe integer");
7846
7846
  try {
7847
7847
  const target = new URL(url);
@@ -8584,7 +8584,7 @@ var SseParser = class {
8584
8584
  constructor(maxEventBytes = 16 * 1024 * 1024, acceptEndpoint = false) {
8585
8585
  this.maxEventBytes = maxEventBytes;
8586
8586
  this.acceptEndpoint = acceptEndpoint;
8587
- if (!Number.isSafeInteger(maxEventBytes) || maxEventBytes < 1)
8587
+ if (maxEventBytes !== Infinity && (!Number.isSafeInteger(maxEventBytes) || maxEventBytes < 1))
8588
8588
  throw new Error("SSE event byte limit must be a positive safe integer");
8589
8589
  }
8590
8590
  maxEventBytes;
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "toolcraft-schema",
11
- "version": "0.0.533",
11
+ "version": "0.0.535",
12
12
  "license": "MIT"
13
13
  }
14
14
  ]
@@ -99,7 +99,7 @@ fetching.
99
99
  `isJsonValue(value, options)` checks JSON data without invoking getters or
100
100
  serialization hooks. It rejects cycles, sparse arrays, non-finite numbers and
101
101
  non-JSON prototypes. Defaults bound the tree to 10,000 nodes and depth 64.
102
- Use `maxNodes` for larger bounded documents, or `maxDepth` (0–256) to choose a
102
+ Use `maxNodes` for larger bounded documents (`Infinity` removes the node budget), or `maxDepth` (0–256) to choose a
103
103
  depth budget. Shared objects count once for each occurrence in the JSON tree;
104
104
  options never change other calls' budgets.
105
105
 
@@ -8,7 +8,7 @@ export function Json(options = {}) {
8
8
  export function isJsonValue(value, options = {}) {
9
9
  const maxNodes = options.maxNodes ?? 10_000;
10
10
  const maxDepth = options.maxDepth ?? 64;
11
- if (!Number.isSafeInteger(maxNodes) || maxNodes < 1)
11
+ if (maxNodes !== Infinity && (!Number.isSafeInteger(maxNodes) || maxNodes < 1))
12
12
  throw new Error("maxNodes must be a positive safe integer");
13
13
  if (!Number.isSafeInteger(maxDepth) || maxDepth < 0 || maxDepth > 256)
14
14
  throw new Error("maxDepth must be an integer between 0 and 256");
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft-schema",
3
- "version": "0.0.533",
3
+ "version": "0.0.535",
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.533",
3
+ "version": "0.0.535",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -162,7 +162,7 @@
162
162
  "yaml"
163
163
  ],
164
164
  "optionalDependencies": {
165
- "toolcraft-schema": "0.0.533",
165
+ "toolcraft-schema": "0.0.535",
166
166
  "toolcraft-design": "*",
167
167
  "@poe-code/frontmatter": "*",
168
168
  "@poe-code/agent-mcp-config": "*",