@protolabsai/proto 0.55.3 → 0.55.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/cli.js +49 -27
- package/package.json +2 -2
package/cli.js
CHANGED
|
@@ -146451,7 +146451,7 @@ var init_constants2 = __esm({
|
|
|
146451
146451
|
"packages/core/dist/src/core/openaiContentGenerator/constants.js"() {
|
|
146452
146452
|
"use strict";
|
|
146453
146453
|
init_esbuild_shims();
|
|
146454
|
-
DEFAULT_TIMEOUT =
|
|
146454
|
+
DEFAULT_TIMEOUT = 6e5;
|
|
146455
146455
|
DEFAULT_MAX_RETRIES = 3;
|
|
146456
146456
|
DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
|
|
146457
146457
|
DEFAULT_DASHSCOPE_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1";
|
|
@@ -155562,7 +155562,8 @@ var init_pipeline = __esm({
|
|
|
155562
155562
|
raiseAbortListenerCap(request3.config?.abortSignal);
|
|
155563
155563
|
return this.executeWithErrorHandling(request3, userPromptId, true, effectiveModel, async (openaiRequest, context2) => {
|
|
155564
155564
|
const stream2 = await this.client.chat.completions.create(openaiRequest, {
|
|
155565
|
-
signal: request3.config?.abortSignal
|
|
155565
|
+
signal: request3.config?.abortSignal,
|
|
155566
|
+
timeout: 0
|
|
155566
155567
|
});
|
|
155567
155568
|
return this.processStreamWithLogging(stream2, context2, request3);
|
|
155568
155569
|
});
|
|
@@ -167976,7 +167977,11 @@ var init_anthropicContentGenerator = __esm({
|
|
|
167976
167977
|
stream: true
|
|
167977
167978
|
};
|
|
167978
167979
|
const stream2 = await this.client.messages.create(streamingRequest, {
|
|
167979
|
-
signal: request3.config?.abortSignal
|
|
167980
|
+
signal: request3.config?.abortSignal,
|
|
167981
|
+
// Disable the client-level timeout for streaming requests. Same
|
|
167982
|
+
// rationale as the OpenAI pipeline: long agent turns can exceed
|
|
167983
|
+
// any fixed wall-clock timeout.
|
|
167984
|
+
timeout: 0
|
|
167980
167985
|
});
|
|
167981
167986
|
return this.processStreamWithSpan(stream2, span, startTime, modelId, logPrompts);
|
|
167982
167987
|
} catch (error40) {
|
|
@@ -168684,7 +168689,7 @@ __export(geminiContentGenerator_exports, {
|
|
|
168684
168689
|
createGeminiContentGenerator: () => createGeminiContentGenerator
|
|
168685
168690
|
});
|
|
168686
168691
|
function createGeminiContentGenerator(config2, gcConfig) {
|
|
168687
|
-
const version2 = "0.55.
|
|
168692
|
+
const version2 = "0.55.5";
|
|
168688
168693
|
const userAgent2 = config2.userAgent || `QwenCode/${version2} (${process.platform}; ${process.arch})`;
|
|
168689
168694
|
const baseHeaders = {
|
|
168690
168695
|
"User-Agent": userAgent2
|
|
@@ -169198,7 +169203,7 @@ var init_turn = __esm({
|
|
|
169198
169203
|
init_errors();
|
|
169199
169204
|
init_thoughtUtils();
|
|
169200
169205
|
init_streamStall();
|
|
169201
|
-
STREAM_STALL_TIMEOUT_MS = parseInt(process.env["PROTO_STREAM_STALL_TIMEOUT_MS"] ?? "
|
|
169206
|
+
STREAM_STALL_TIMEOUT_MS = parseInt(process.env["PROTO_STREAM_STALL_TIMEOUT_MS"] ?? "660000", 10);
|
|
169202
169207
|
(function(GeminiEventType2) {
|
|
169203
169208
|
GeminiEventType2["Content"] = "content";
|
|
169204
169209
|
GeminiEventType2["ToolCallRequest"] = "tool_call_request";
|
|
@@ -169319,16 +169324,7 @@ ${[...this.pendingCitations].sort().join("\n")}`
|
|
|
169319
169324
|
return;
|
|
169320
169325
|
}
|
|
169321
169326
|
if (e4 instanceof StreamStallError) {
|
|
169322
|
-
|
|
169323
|
-
type: GeminiEventType.Error,
|
|
169324
|
-
value: {
|
|
169325
|
-
error: {
|
|
169326
|
-
message: e4.message,
|
|
169327
|
-
status: void 0
|
|
169328
|
-
}
|
|
169329
|
-
}
|
|
169330
|
-
};
|
|
169331
|
-
return;
|
|
169327
|
+
throw e4;
|
|
169332
169328
|
}
|
|
169333
169329
|
const error40 = toFriendlyError(e4);
|
|
169334
169330
|
if (error40 instanceof UnauthorizedError) {
|
|
@@ -172580,6 +172576,13 @@ function trimToolErrorsFromContext(contents, maxTrimPairs = 6) {
|
|
|
172580
172576
|
}
|
|
172581
172577
|
return trimmed2;
|
|
172582
172578
|
}
|
|
172579
|
+
function isSdkTransportTimeoutError(error40) {
|
|
172580
|
+
if (!(error40 instanceof Error))
|
|
172581
|
+
return false;
|
|
172582
|
+
const msg = error40.message.toLowerCase();
|
|
172583
|
+
return msg.includes("request timed out") || msg.includes("request timeout") || msg.includes("connection timeout") || msg.includes("timed out") || error40.name === "TimeoutError" || // OpenAI SDK wraps transport timeouts with these codes
|
|
172584
|
+
error40.code === "ETIMEDOUT" || error40.code === "ESOCKETTIMEDOUT";
|
|
172585
|
+
}
|
|
172583
172586
|
function isSchemaDepthError(errorMessage) {
|
|
172584
172587
|
return errorMessage.includes("maximum schema depth exceeded");
|
|
172585
172588
|
}
|
|
@@ -172601,6 +172604,7 @@ var init_geminiChat = __esm({
|
|
|
172601
172604
|
init_tools();
|
|
172602
172605
|
init_chatCompressionService();
|
|
172603
172606
|
init_turn();
|
|
172607
|
+
init_streamStall();
|
|
172604
172608
|
init_loggers();
|
|
172605
172609
|
init_chatRecordingService();
|
|
172606
172610
|
init_types4();
|
|
@@ -172644,6 +172648,7 @@ var init_geminiChat = __esm({
|
|
|
172644
172648
|
this.type = type;
|
|
172645
172649
|
}
|
|
172646
172650
|
};
|
|
172651
|
+
__name(isSdkTransportTimeoutError, "isSdkTransportTimeoutError");
|
|
172647
172652
|
GeminiChat = class {
|
|
172648
172653
|
static {
|
|
172649
172654
|
__name(this, "GeminiChat");
|
|
@@ -172758,12 +172763,18 @@ var init_geminiChat = __esm({
|
|
|
172758
172763
|
await new Promise((res) => setTimeout(res, delayMs));
|
|
172759
172764
|
continue;
|
|
172760
172765
|
}
|
|
172761
|
-
const isTransientStreamError = error40 instanceof InvalidStreamError;
|
|
172766
|
+
const isTransientStreamError = error40 instanceof InvalidStreamError || error40 instanceof StreamStallError || isSdkTransportTimeoutError(error40);
|
|
172762
172767
|
if (isTransientStreamError && invalidStreamRetryCount < INVALID_STREAM_RETRY_CONFIG.maxRetries) {
|
|
172763
172768
|
invalidStreamRetryCount++;
|
|
172764
172769
|
const delayMs = INVALID_STREAM_RETRY_CONFIG.initialDelayMs * invalidStreamRetryCount;
|
|
172765
|
-
|
|
172766
|
-
|
|
172770
|
+
if (error40 instanceof StreamStallError) {
|
|
172771
|
+
debugLogger25.warn(`Stream stalled (retry ${invalidStreamRetryCount}/${INVALID_STREAM_RETRY_CONFIG.maxRetries}). Waiting ${delayMs / 1e3}s before retrying...`);
|
|
172772
|
+
} else if (isSdkTransportTimeoutError(error40)) {
|
|
172773
|
+
debugLogger25.warn(`SDK transport timeout (retry ${invalidStreamRetryCount}/${INVALID_STREAM_RETRY_CONFIG.maxRetries}). Waiting ${delayMs / 1e3}s before retrying...`);
|
|
172774
|
+
} else {
|
|
172775
|
+
debugLogger25.warn(`Invalid stream [${error40.type}] (retry ${invalidStreamRetryCount}/${INVALID_STREAM_RETRY_CONFIG.maxRetries}). Waiting ${delayMs / 1e3}s before retrying...`);
|
|
172776
|
+
}
|
|
172777
|
+
logContentRetry(self2.config, new ContentRetryEvent(invalidStreamRetryCount - 1, error40 instanceof StreamStallError ? "STREAM_STALL" : isSdkTransportTimeoutError(error40) ? "SDK_TRANSPORT_TIMEOUT" : error40.type, delayMs, model));
|
|
172767
172778
|
yield { type: StreamEventType.RETRY };
|
|
172768
172779
|
attempt--;
|
|
172769
172780
|
await new Promise((res) => setTimeout(res, delayMs));
|
|
@@ -172835,6 +172846,12 @@ var init_geminiChat = __esm({
|
|
|
172835
172846
|
if (lastError instanceof InvalidStreamError) {
|
|
172836
172847
|
const totalAttempts = invalidStreamRetryCount + 1;
|
|
172837
172848
|
logContentRetryFailure(self2.config, new ContentRetryFailureEvent(totalAttempts, lastError.type, model));
|
|
172849
|
+
} else if (lastError instanceof StreamStallError) {
|
|
172850
|
+
const totalAttempts = invalidStreamRetryCount + 1;
|
|
172851
|
+
logContentRetryFailure(self2.config, new ContentRetryFailureEvent(totalAttempts, "STREAM_STALL", model));
|
|
172852
|
+
} else if (isSdkTransportTimeoutError(lastError)) {
|
|
172853
|
+
const totalAttempts = invalidStreamRetryCount + 1;
|
|
172854
|
+
logContentRetryFailure(self2.config, new ContentRetryFailureEvent(totalAttempts, "SDK_TRANSPORT_TIMEOUT", model));
|
|
172838
172855
|
}
|
|
172839
172856
|
throw lastError;
|
|
172840
172857
|
}
|
|
@@ -202214,7 +202231,7 @@ var init_esm9 = __esm({
|
|
|
202214
202231
|
}
|
|
202215
202232
|
constructor(src, dest, opts) {
|
|
202216
202233
|
super(src, dest, opts);
|
|
202217
|
-
this.proxyErrors = (er2) => dest.emit("error", er2);
|
|
202234
|
+
this.proxyErrors = (er2) => this.dest.emit("error", er2);
|
|
202218
202235
|
src.on("error", this.proxyErrors);
|
|
202219
202236
|
}
|
|
202220
202237
|
};
|
|
@@ -202931,6 +202948,8 @@ var init_esm9 = __esm({
|
|
|
202931
202948
|
return: stop3,
|
|
202932
202949
|
[Symbol.asyncIterator]() {
|
|
202933
202950
|
return this;
|
|
202951
|
+
},
|
|
202952
|
+
[Symbol.asyncDispose]: async () => {
|
|
202934
202953
|
}
|
|
202935
202954
|
};
|
|
202936
202955
|
}
|
|
@@ -202966,6 +202985,8 @@ var init_esm9 = __esm({
|
|
|
202966
202985
|
return: stop3,
|
|
202967
202986
|
[Symbol.iterator]() {
|
|
202968
202987
|
return this;
|
|
202988
|
+
},
|
|
202989
|
+
[Symbol.dispose]: () => {
|
|
202969
202990
|
}
|
|
202970
202991
|
};
|
|
202971
202992
|
}
|
|
@@ -416974,7 +416995,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
416974
416995
|
// packages/cli/src/utils/version.ts
|
|
416975
416996
|
async function getCliVersion() {
|
|
416976
416997
|
const pkgJson = await getPackageJson();
|
|
416977
|
-
return "0.55.
|
|
416998
|
+
return "0.55.5";
|
|
416978
416999
|
}
|
|
416979
417000
|
__name(getCliVersion, "getCliVersion");
|
|
416980
417001
|
|
|
@@ -425174,7 +425195,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
425174
425195
|
|
|
425175
425196
|
// packages/cli/src/generated/git-commit.ts
|
|
425176
425197
|
init_esbuild_shims();
|
|
425177
|
-
var GIT_COMMIT_INFO = "
|
|
425198
|
+
var GIT_COMMIT_INFO = "7e7b1ffbe";
|
|
425178
425199
|
|
|
425179
425200
|
// packages/cli/src/utils/systemInfo.ts
|
|
425180
425201
|
async function getNpmVersion() {
|
|
@@ -494063,7 +494084,7 @@ var QwenAgent = class {
|
|
|
494063
494084
|
async initialize(args2) {
|
|
494064
494085
|
this.clientCapabilities = args2.clientCapabilities;
|
|
494065
494086
|
const authMethods = buildAuthMethods();
|
|
494066
|
-
const version2 = "0.55.
|
|
494087
|
+
const version2 = "0.55.5";
|
|
494067
494088
|
return {
|
|
494068
494089
|
protocolVersion: PROTOCOL_VERSION,
|
|
494069
494090
|
agentInfo: {
|
|
@@ -495160,11 +495181,12 @@ main().catch((error40) => {
|
|
|
495160
495181
|
*
|
|
495161
495182
|
* Stream stall detection — per-chunk idle watchdog for async generators.
|
|
495162
495183
|
*
|
|
495163
|
-
* The SDK's overall request timeout (
|
|
495164
|
-
*
|
|
495165
|
-
*
|
|
495166
|
-
* stream that *starts* and then
|
|
495167
|
-
* arriving) will not be detected
|
|
495184
|
+
* The SDK's overall request timeout (configurable via contentGenerator.timeout,
|
|
495185
|
+
* defaults to 600 s) covers the full lifetime of a request, but undici
|
|
495186
|
+
* body/header timeouts are explicitly disabled in runtimeFetchOptions.ts to
|
|
495187
|
+
* allow long streaming responses. This means a stream that *starts* and then
|
|
495188
|
+
* *freezes* (connection open, no more chunks arriving) will not be detected
|
|
495189
|
+
* until the full SDK wall clock fires.
|
|
495168
495190
|
*
|
|
495169
495191
|
* `withChunkTimeout` wraps any AsyncGenerator and races each `.next()` call
|
|
495170
495192
|
* against a per-chunk idle timer. If no chunk arrives within `timeoutMs`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protolabsai/proto",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.5",
|
|
4
4
|
"description": "proto - AI-powered coding agent",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bundled"
|
|
22
22
|
],
|
|
23
23
|
"config": {
|
|
24
|
-
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.55.
|
|
24
|
+
"sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.55.5"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {},
|
|
27
27
|
"optionalDependencies": {
|