@declaw/sdk 1.1.8 → 1.1.9
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/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -129,9 +129,16 @@ function getDispatcher() {
|
|
|
129
129
|
}
|
|
130
130
|
const undici = await import("undici");
|
|
131
131
|
const connOverride = parseInt(process.env.DECLAW_SDK_CONNECTIONS || "", 10);
|
|
132
|
-
const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride :
|
|
132
|
+
const connections = Number.isFinite(connOverride) && connOverride > 0 ? connOverride : 256;
|
|
133
|
+
const streamsOverride = parseInt(process.env.DECLAW_SDK_MAX_CONCURRENT_STREAMS || "", 10);
|
|
134
|
+
const maxConcurrentStreams = Number.isFinite(streamsOverride) && streamsOverride > 0 ? streamsOverride : 1e3;
|
|
133
135
|
return new undici.Agent({
|
|
134
136
|
connections,
|
|
137
|
+
// maxConcurrentStreams only matters on H2 connections. undici negotiates
|
|
138
|
+
// down to whatever the server advertises in SETTINGS_MAX_CONCURRENT_STREAMS,
|
|
139
|
+
// so setting a high value here is safe — it caps the client-side intent,
|
|
140
|
+
// server still wins.
|
|
141
|
+
maxConcurrentStreams,
|
|
135
142
|
keepAliveTimeout: 3e4,
|
|
136
143
|
keepAliveMaxTimeout: 6e4,
|
|
137
144
|
pipelining: 1,
|