@opengeni/worker-bundle 2.0.1 → 2.0.3-canary.36079201993001
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/failure-settlement.d.ts +1 -1
- package/dist/activities/agent-turn/history.d.ts +2 -0
- package/dist/activities/agent-turn/media-artifacts.d.ts +5 -3
- package/dist/activities/context-compaction.d.ts +10 -2
- package/dist/activities/retained-screenshots.d.ts +7 -2
- package/dist/activities/sandbox-lease.d.ts +3 -4
- package/dist/{activities-control-QA6OLRQY.js → activities-control-IVTL723D.js} +204 -23
- package/dist/activities-control-IVTL723D.js.map +1 -0
- package/dist/{activities-turn-YVVKCGAK.js → activities-turn-AJHDYNZU.js} +180 -58
- package/dist/activities-turn-AJHDYNZU.js.map +1 -0
- package/dist/{chunk-M3NVMF2V.js → chunk-JMO5ZUW3.js} +14 -7
- package/dist/{chunk-M3NVMF2V.js.map → chunk-JMO5ZUW3.js.map} +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/workflow-bundle.js +4 -1
- package/package.json +19 -19
- package/src/activities/agent-turn/compaction-prep.ts +52 -16
- package/src/activities/agent-turn/errors.ts +8 -3
- package/src/activities/agent-turn/failure-settlement.ts +40 -8
- package/src/activities/agent-turn/history.ts +14 -1
- package/src/activities/agent-turn/media-artifacts.ts +2 -1
- package/src/activities/agent-turn/sandbox-runtime.ts +25 -9
- package/src/activities/agent-turn/stream-attempt.ts +13 -2
- package/src/activities/context-compaction.ts +49 -14
- package/src/activities/knowledge-indexing.ts +133 -6
- package/src/activities/retained-screenshots.ts +82 -11
- package/src/activities/sandbox-lease.ts +141 -21
- package/src/sandbox-resume.ts +6 -0
- package/src/workflows/activities.ts +14 -1
- package/dist/activities-control-QA6OLRQY.js.map +0 -1
- package/dist/activities-turn-YVVKCGAK.js.map +0 -1
|
@@ -5049,7 +5049,8 @@ import {
|
|
|
5049
5049
|
import {
|
|
5050
5050
|
effectiveSandboxLifecycle,
|
|
5051
5051
|
sandboxArchiveCaptureTimeoutMs,
|
|
5052
|
-
sandboxLifecycleTransitionWaitMs
|
|
5052
|
+
sandboxLifecycleTransitionWaitMs,
|
|
5053
|
+
sandboxWarmRateMicrosPerSecond
|
|
5053
5054
|
} from "@opengeni/config";
|
|
5054
5055
|
import { randomUUID as randomUUID3 } from "crypto";
|
|
5055
5056
|
|
|
@@ -5711,6 +5712,10 @@ async function resumeBoxForTurn(services, ids, kind, holderId) {
|
|
|
5711
5712
|
holderId,
|
|
5712
5713
|
subjectId: ids.sessionId,
|
|
5713
5714
|
backend: ids.backend,
|
|
5715
|
+
warmBilling: {
|
|
5716
|
+
mode: settings.sandboxWarmBillingMode,
|
|
5717
|
+
rateMicrosPerSecond: sandboxWarmRateMicrosPerSecond(settings, ids.backend)
|
|
5718
|
+
},
|
|
5714
5719
|
os,
|
|
5715
5720
|
// IMAGE IS SHARED STATE (B3): thread the resolved image so the lease stamps it +
|
|
5716
5721
|
// conflicts on a live box already running a different image. A
|
|
@@ -5795,7 +5800,8 @@ async function resumeBoxForTurn(services, ids, kind, holderId) {
|
|
|
5795
5800
|
kind,
|
|
5796
5801
|
holderId,
|
|
5797
5802
|
expectedEpoch: heartbeat2.expectedEpoch,
|
|
5798
|
-
leaseTtlMs: heartbeat2.leaseTtlMs
|
|
5803
|
+
leaseTtlMs: heartbeat2.leaseTtlMs,
|
|
5804
|
+
billingMode: services.settings.sandboxWarmBillingMode
|
|
5799
5805
|
}).then(async (status) => {
|
|
5800
5806
|
if (heartbeat2 !== holderLeaseHeartbeat) return;
|
|
5801
5807
|
if (!status.holderAlive) {
|
|
@@ -8685,7 +8691,8 @@ import {
|
|
|
8685
8691
|
describeCompactionProviderRejection,
|
|
8686
8692
|
isMcpRequestTimeoutError,
|
|
8687
8693
|
isMcpTransportConnectivityError,
|
|
8688
|
-
|
|
8694
|
+
isModalTaskExecStartPreDispatchUnavailableError,
|
|
8695
|
+
isRoutingMutationOutcomeUnknownError,
|
|
8689
8696
|
RoutingWorkspaceRootChangedError,
|
|
8690
8697
|
SandboxMaterializationVerificationError,
|
|
8691
8698
|
materializationVerificationDiagnostic,
|
|
@@ -9250,7 +9257,7 @@ function providerRecoveryResult(input) {
|
|
|
9250
9257
|
};
|
|
9251
9258
|
}
|
|
9252
9259
|
const providerDelay = input.retryAfterMs !== null && input.retryAfterMs !== void 0 && Number.isFinite(input.retryAfterMs) && input.retryAfterMs > 0 ? Math.ceil(input.retryAfterMs) : null;
|
|
9253
|
-
const continueDelayMs = input.failureCode === "provider_rate_limited" ? providerDelay ?? PROVIDER_BACKPRESSURE_DELAY_MS : input.failureCode === "provider_unavailable" || input.failureCode === "upstream_connectivity_unavailable" || input.failureCode === "sandbox_command_start_unavailable" || input.failureCode === "mcp_transport_timeout" || input.failureCode === "mcp_transport_unavailable" || input.failureCode === POST_COMPACTION_CONTINUATION_EMPTY_CODE ? Math.max(
|
|
9260
|
+
const continueDelayMs = input.failureCode === "provider_rate_limited" ? providerDelay ?? PROVIDER_BACKPRESSURE_DELAY_MS : input.failureCode === "provider_unavailable" || input.failureCode === "upstream_connectivity_unavailable" || input.failureCode === "sandbox_command_start_unavailable" || input.failureCode === "mcp_transport_timeout" || input.failureCode === "mcp_transport_unavailable" || input.failureCode === "turn_execution_policy_definition_mismatch" || input.failureCode === POST_COMPACTION_CONTINUATION_EMPTY_CODE ? Math.max(
|
|
9254
9261
|
providerDelay ?? 0,
|
|
9255
9262
|
PROVIDER_CONNECTIVITY_BACKOFF_MS[Math.min(
|
|
9256
9263
|
Math.max(Math.trunc(input.attemptNumber) - 1, 0),
|
|
@@ -9724,9 +9731,9 @@ function baseAgentRunFailurePayload(error, options = {}) {
|
|
|
9724
9731
|
retryable: true
|
|
9725
9732
|
};
|
|
9726
9733
|
}
|
|
9727
|
-
if (
|
|
9734
|
+
if (!isRoutingMutationOutcomeUnknownError(error) && isModalTaskExecStartPreDispatchUnavailableError(error)) {
|
|
9728
9735
|
return {
|
|
9729
|
-
error: "The managed sandbox command
|
|
9736
|
+
error: "The managed sandbox command router was not ready before the command was sent. The same turn will retry after a short delay.",
|
|
9730
9737
|
code: "sandbox_command_start_unavailable",
|
|
9731
9738
|
retryable: true
|
|
9732
9739
|
};
|
|
@@ -10064,4 +10071,4 @@ export {
|
|
|
10064
10071
|
codexUsageLimitFailurePayload,
|
|
10065
10072
|
CODEX_USAGE_LIMIT_MAX_RESUME_MS
|
|
10066
10073
|
};
|
|
10067
|
-
//# sourceMappingURL=chunk-
|
|
10074
|
+
//# sourceMappingURL=chunk-JMO5ZUW3.js.map
|