@opengeni/worker-bundle 1.4.2 → 1.4.4
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/activities/agent-turn/errors.d.ts +6 -0
- package/dist/activities/sandbox-lease.d.ts +5 -0
- package/dist/{activities-control-AKJZHDTY.js → activities-control-VRFS65FT.js} +12 -6
- package/dist/activities-control-VRFS65FT.js.map +1 -0
- package/dist/{activities-turn-AOXNE6BM.js → activities-turn-P2YAW2QW.js} +3 -3
- package/dist/{chunk-WVZQJBGD.js → chunk-BICGFGO7.js} +39 -2
- package/dist/{chunk-WVZQJBGD.js.map → chunk-BICGFGO7.js.map} +1 -1
- package/dist/{chunk-DCQ7XTXW.js → chunk-HVNNCWEU.js} +1 -1
- package/dist/chunk-HVNNCWEU.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/observability-metrics.d.ts +2 -2
- package/package.json +21 -21
- package/src/activities/agent-turn/errors.ts +54 -0
- package/src/activities/sandbox-lease.ts +17 -3
- package/src/observability-metrics.ts +2 -2
- package/dist/activities-control-AKJZHDTY.js.map +0 -1
- package/dist/chunk-DCQ7XTXW.js.map +0 -1
- /package/dist/{activities-turn-AOXNE6BM.js.map → activities-turn-P2YAW2QW.js.map} +0 -0
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
withFirstPartyTools,
|
|
102
102
|
wrapLazyTurnBoxWithRouting,
|
|
103
103
|
wrapTurnBoxWithRouting
|
|
104
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-BICGFGO7.js";
|
|
105
105
|
import {
|
|
106
106
|
StreamTimingMetrics,
|
|
107
107
|
makeMachineOpObserver,
|
|
@@ -134,7 +134,7 @@ import {
|
|
|
134
134
|
runtimeMetricsHooksForObservability,
|
|
135
135
|
sandboxAutomaticRecoveryOutcome,
|
|
136
136
|
turnLifecycleMetricsFor
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-HVNNCWEU.js";
|
|
138
138
|
import {
|
|
139
139
|
__export
|
|
140
140
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -41096,4 +41096,4 @@ export {
|
|
|
41096
41096
|
createTurnActivities,
|
|
41097
41097
|
createTurnActivitiesFromServices
|
|
41098
41098
|
};
|
|
41099
|
-
//# sourceMappingURL=activities-turn-
|
|
41099
|
+
//# sourceMappingURL=activities-turn-P2YAW2QW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
observabilityEventBusOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HVNNCWEU.js";
|
|
4
4
|
|
|
5
5
|
// src/activity-services.ts
|
|
6
6
|
import {
|
|
@@ -9179,6 +9179,7 @@ import {
|
|
|
9179
9179
|
RoutingWorkspaceRootChangedError,
|
|
9180
9180
|
RoutingBackendRecoveryRequiredError as RoutingBackendRecoveryRequiredError2,
|
|
9181
9181
|
ResponsesStreamingTerminalError,
|
|
9182
|
+
classifyModelStreamIdleTimeoutError,
|
|
9182
9183
|
SandboxMaterializationVerificationError,
|
|
9183
9184
|
materializationVerificationDiagnostic,
|
|
9184
9185
|
PROVIDER_QUOTA_EXHAUSTED_CODE,
|
|
@@ -10394,6 +10395,20 @@ function providerHttpStatus(error) {
|
|
|
10394
10395
|
}
|
|
10395
10396
|
return void 0;
|
|
10396
10397
|
}
|
|
10398
|
+
function isTransportTimeoutError(error) {
|
|
10399
|
+
let current = error;
|
|
10400
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10401
|
+
for (let depth = 0; depth < 8 && current && typeof current === "object"; depth += 1) {
|
|
10402
|
+
if (seen.has(current)) break;
|
|
10403
|
+
seen.add(current);
|
|
10404
|
+
const value = current;
|
|
10405
|
+
if (value.name === "TimeoutError" || value.message === "The operation timed out.") {
|
|
10406
|
+
return true;
|
|
10407
|
+
}
|
|
10408
|
+
current = value.cause;
|
|
10409
|
+
}
|
|
10410
|
+
return false;
|
|
10411
|
+
}
|
|
10397
10412
|
function isTransientProviderError(error) {
|
|
10398
10413
|
if (error instanceof ResponsesStreamingTerminalError) {
|
|
10399
10414
|
return error.category === "unavailable";
|
|
@@ -10757,6 +10772,28 @@ function baseAgentRunFailurePayload(error, options = {}) {
|
|
|
10757
10772
|
...mcpTransportDiagnostic ? { mcpTransportDiagnostic } : {}
|
|
10758
10773
|
};
|
|
10759
10774
|
}
|
|
10775
|
+
const streamIdle = classifyModelStreamIdleTimeoutError(error);
|
|
10776
|
+
if (streamIdle) {
|
|
10777
|
+
const seconds = streamIdle.idleTimeoutMs !== null ? Math.round(streamIdle.idleTimeoutMs / 1e3) : null;
|
|
10778
|
+
const window = seconds !== null ? ` for ${seconds}s` : "";
|
|
10779
|
+
return {
|
|
10780
|
+
error: streamIdle.kind === "progress" ? `The model provider stream stalled: only keepalive traffic and no response progress${window}. The same turn will retry after a short delay.` : `The model provider stopped sending response data${window}. The same turn will retry after a short delay.`,
|
|
10781
|
+
code: "provider_unavailable",
|
|
10782
|
+
retryable: true,
|
|
10783
|
+
timeoutClass: streamIdle.kind === "progress" ? "progress_stream" : "idle_stream",
|
|
10784
|
+
responseObserved: true,
|
|
10785
|
+
detail: streamIdle.message
|
|
10786
|
+
};
|
|
10787
|
+
}
|
|
10788
|
+
if (status === void 0 && isTransportTimeoutError(error)) {
|
|
10789
|
+
return {
|
|
10790
|
+
error: "The model provider connection timed out. The same turn will retry after a short delay.",
|
|
10791
|
+
code: "provider_unavailable",
|
|
10792
|
+
retryable: true,
|
|
10793
|
+
timeoutClass: "transport",
|
|
10794
|
+
detail: message
|
|
10795
|
+
};
|
|
10796
|
+
}
|
|
10760
10797
|
if (code === UNKNOWN_MODEL_FINISH_REASON_CODE) {
|
|
10761
10798
|
return {
|
|
10762
10799
|
error: "The model provider ended its response ambiguously. Partial output was not accepted as complete; the same turn will retry from durable history.",
|
|
@@ -11047,4 +11084,4 @@ export {
|
|
|
11047
11084
|
CODEX_USAGE_LIMIT_MAX_RESUME_MS,
|
|
11048
11085
|
classifyClaudeCredentialFailure
|
|
11049
11086
|
};
|
|
11050
|
-
//# sourceMappingURL=chunk-
|
|
11087
|
+
//# sourceMappingURL=chunk-BICGFGO7.js.map
|