deepline 0.3.530 → 0.3.532
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +10 -8
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +95 -9
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-execution-relay.ts +139 -35
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/roll-receipt-gateway.ts +438 -38
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/commands/runtime-topology.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-machine-lifecycle.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/fly-transient-retry.ts +279 -20
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +615 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +16 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-progress.ts +26 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +27 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +317 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +129 -39
- package/dist/cli/auth-7YWTPQSQ.js +43 -0
- package/dist/cli/{auth-LRWNDQFT.mjs → auth-ZB3NN4E7.mjs} +5 -5
- package/dist/cli/{billing-5FDPWGCG.js → billing-32EF4HJM.js} +82 -82
- package/dist/cli/{billing-7T73MRYF.mjs → billing-5GGO7DQS.mjs} +7 -7
- package/dist/cli/{chunk-7WGMCOM6.js → chunk-2T7YE5UH.js} +2 -2
- package/dist/cli/{chunk-L4QR7CYL.js → chunk-2ZGZBN6D.js} +14 -14
- package/dist/cli/{chunk-J6XSBTEX.mjs → chunk-3NUYO5QO.mjs} +1 -1
- package/dist/cli/{chunk-MVF7ZBJX.mjs → chunk-47UF3DDN.mjs} +1 -1
- package/dist/cli/{chunk-2FLODRM2.js → chunk-4S3ONSLF.js} +13 -13
- package/dist/cli/{chunk-4WPIORJX.js → chunk-64CEFPF4.js} +1 -1
- package/dist/cli/{chunk-QI2LKPW5.mjs → chunk-6LBD6G6U.mjs} +2 -2
- package/dist/cli/{chunk-WWLIDAVT.js → chunk-7S3DJFW5.js} +11 -11
- package/dist/cli/{chunk-BVY4QRVT.mjs → chunk-AOAXIJL2.mjs} +82 -31
- package/dist/cli/{chunk-KUHH7RW4.js → chunk-AQHMHYXX.js} +44 -44
- package/dist/cli/{chunk-WAWOMHWO.mjs → chunk-B77ZRM6M.mjs} +2 -2
- package/dist/cli/{chunk-5B37ER3C.js → chunk-BQ2KAFVQ.js} +3 -3
- package/dist/cli/{chunk-VQMGCNX2.mjs → chunk-C6VCDDDD.mjs} +5 -5
- package/dist/cli/{chunk-3MAHDV5C.mjs → chunk-CRWX26LR.mjs} +1 -1
- package/dist/cli/{chunk-7E7CP5KA.js → chunk-CSMLW5VE.js} +4 -4
- package/dist/cli/{chunk-HCWPX2UP.mjs → chunk-DSNTHXR7.mjs} +2 -2
- package/dist/cli/{chunk-4VQ63Y6S.mjs → chunk-EJLCIQA4.mjs} +5 -5
- package/dist/cli/{chunk-7FCD34YS.mjs → chunk-EVXRQXNV.mjs} +3 -2
- package/dist/cli/{chunk-K4Y6CNFV.mjs → chunk-F2YLC4ZG.mjs} +1 -1
- package/dist/cli/{chunk-YI7QOP6L.js → chunk-FU4MMUGM.js} +16 -16
- package/dist/cli/{chunk-6NG3FRJB.mjs → chunk-GABQIZJR.mjs} +5 -5
- package/dist/cli/{chunk-V4EK7ZZX.js → chunk-GBVTSWL3.js} +98 -98
- package/dist/cli/{chunk-WYI3VMTO.js → chunk-H6OYTU2Y.js} +6 -6
- package/dist/cli/{chunk-C44RZGM5.js → chunk-HR2RDDAC.js} +26 -26
- package/dist/cli/{chunk-XNWS2WJG.mjs → chunk-HREGFD2I.mjs} +1 -1
- package/dist/cli/{chunk-GW76IDID.js → chunk-JJSJ47CA.js} +22 -22
- package/dist/cli/{chunk-32NTC5UD.js → chunk-KEE57BF2.js} +7 -7
- package/dist/cli/{chunk-SJQ7Z3NI.js → chunk-KQW27FSR.js} +132 -81
- package/dist/cli/{chunk-D7Y7I4EE.js → chunk-L5V5SLI7.js} +2 -2
- package/dist/cli/{chunk-VKVLJTW5.js → chunk-MHTKWZM3.js} +9 -9
- package/dist/cli/{chunk-EADHDZW2.js → chunk-NBIDYAN6.js} +6 -6
- package/dist/cli/{chunk-E6L3NEFV.js → chunk-NQDUXVBK.js} +41 -41
- package/dist/cli/{chunk-QWEPCX6L.mjs → chunk-O2A4C4WP.mjs} +2 -2
- package/dist/cli/{chunk-KEXGBXUG.js → chunk-O7JU5GUR.js} +5 -5
- package/dist/cli/{chunk-MVFKZQ7E.js → chunk-QZINISXP.js} +3 -3
- package/dist/cli/{chunk-YVLPGYRS.mjs → chunk-RRCSFOF3.mjs} +1 -1
- package/dist/cli/{chunk-A5MYJM4K.mjs → chunk-S2HHY26V.mjs} +2 -2
- package/dist/cli/{chunk-M4Q4LEMM.js → chunk-SMDX4BM5.js} +2 -2
- package/dist/cli/{chunk-5KX3TWBK.mjs → chunk-T2QY36E3.mjs} +1 -1
- package/dist/cli/{chunk-OUM2V7R6.mjs → chunk-TFWREZYG.mjs} +6 -6
- package/dist/cli/{chunk-QQ4LNSY5.mjs → chunk-THQPLSJD.mjs} +1 -1
- package/dist/cli/{chunk-MHR3XVJD.js → chunk-TS6XF2QP.js} +5 -5
- package/dist/cli/{chunk-WL6GAZBD.js → chunk-V6LUMGVI.js} +3 -2
- package/dist/cli/{chunk-5DJUNUHN.mjs → chunk-VCRCMK7M.mjs} +5 -5
- package/dist/cli/{chunk-VYSQ76RP.js → chunk-VHHD5D44.js} +7 -7
- package/dist/cli/{chunk-KI63L5H3.mjs → chunk-VIC2MI4W.mjs} +2 -2
- package/dist/cli/{chunk-ERMDXXP5.mjs → chunk-VN432I4S.mjs} +1 -1
- package/dist/cli/{chunk-LNZILMVK.mjs → chunk-VWEDIFHT.mjs} +4 -4
- package/dist/cli/{chunk-I2YXEHDO.mjs → chunk-VZKCZO4J.mjs} +3 -3
- package/dist/cli/{chunk-2LKVNWRA.mjs → chunk-W5KSUNTE.mjs} +10 -10
- package/dist/cli/{chunk-X547OW3I.js → chunk-WU33X2QL.js} +16 -16
- package/dist/cli/{chunk-2FLRKNME.mjs → chunk-YM6JAKYP.mjs} +2 -2
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-EFIEDJA2.js → csv-4JBCPMEH.js} +13 -13
- package/dist/cli/{csv-VY2S7KKV.mjs → csv-LM44ZFL3.mjs} +4 -4
- package/dist/cli/{db-D32CBDTN.mjs → db-IFJEGJ6M.mjs} +6 -6
- package/dist/cli/{db-3DLI5TYW.js → db-UVNXGK6L.js} +27 -27
- package/dist/cli/describe-AF73GGH6.js +50 -0
- package/dist/cli/{describe-6MYKK2P3.mjs → describe-TWTOPGII.mjs} +18 -18
- package/dist/cli/{executions-QG3DEEY3.js → executions-3I6RU7AO.js} +8 -8
- package/dist/cli/{executions-U6TPX4RX.mjs → executions-NEV2P5MX.mjs} +6 -6
- package/dist/cli/{feedback-YZ6H4VMQ.mjs → feedback-IO5ZAWKK.mjs} +6 -6
- package/dist/cli/{feedback-ZSPW6NXL.js → feedback-NHO56EWZ.js} +14 -14
- package/dist/cli/git-AOKC6WL3.js +25 -0
- package/dist/cli/{git-ENN72IK4.mjs → git-MQISNZ5F.mjs} +5 -5
- package/dist/cli/index.js +145 -145
- package/dist/cli/index.mjs +44 -44
- package/dist/cli/{legacy-noops-MNA6LWJU.mjs → legacy-noops-DNRJHNQB.mjs} +6 -6
- package/dist/cli/{legacy-noops-Q6EVYIGN.js → legacy-noops-SLAQE7HN.js} +9 -9
- package/dist/cli/{monitors-BUH54HXJ.js → monitors-JRNATYS2.js} +100 -100
- package/dist/cli/{monitors-KENWEEWC.mjs → monitors-NAX7SUAR.mjs} +7 -7
- package/dist/cli/{org-HWOHKYP3.mjs → org-34VCNPUD.mjs} +6 -6
- package/dist/cli/{org-AHWQJMV7.js → org-BHOREX5D.js} +86 -86
- package/dist/cli/{pages-Z5R7NYEF.js → pages-GB337AQG.js} +18 -18
- package/dist/cli/{pages-I7DYTCW6.mjs → pages-ZWVHNJOE.mjs} +6 -6
- package/dist/cli/{play-3LXZB4ED.js → play-DAUQ7OAO.js} +317 -317
- package/dist/cli/{play-ET7CRVWJ.mjs → play-GJ7OEYSB.mjs} +18 -18
- package/dist/cli/{providers-GZSAZVHZ.mjs → providers-KA2RKD6E.mjs} +6 -6
- package/dist/cli/{providers-ZV2E7NGX.js → providers-W7QY5FUK.js} +9 -9
- package/dist/cli/{quickstart-5746NBS2.mjs → quickstart-7KOAL3BD.mjs} +4 -4
- package/dist/cli/{quickstart-VJZAT4RY.js → quickstart-D4DPUR7R.js} +6 -6
- package/dist/cli/{run-WOQ6XMTT.mjs → run-AYJSQED7.mjs} +23 -23
- package/dist/cli/{run-WGUAVYZC.js → run-QFVN2WUQ.js} +41 -41
- package/dist/cli/search-JVCK5AB4.js +33 -0
- package/dist/cli/{search-NNPFJYEW.mjs → search-MEE7OV2B.mjs} +8 -8
- package/dist/cli/{search-output-65HDEEFS.mjs → search-output-G36JH6D6.mjs} +4 -4
- package/dist/cli/{search-output-K4ISMPKD.js → search-output-OW6UPOI6.js} +6 -6
- package/dist/cli/{secrets-NBKGWMF4.js → secrets-CJJQJUJC.js} +15 -15
- package/dist/cli/{secrets-RK44OV3X.mjs → secrets-OFNYIJT6.mjs} +6 -6
- package/dist/cli/{sessions-ULQJJN3J.mjs → sessions-B6VCVU4Z.mjs} +6 -6
- package/dist/cli/sessions-DXN6BQ7Q.js +22 -0
- package/dist/cli/{settings-IHNA7X3Y.js → settings-H4Q524LF.js} +86 -86
- package/dist/cli/{settings-V5ZRL2EF.mjs → settings-PPFLSXDP.mjs} +13 -13
- package/dist/cli/{setup-HTEBFMOQ.js → setup-SJAM7XHR.js} +78 -63
- package/dist/cli/{setup-54VZPJGM.mjs → setup-WI3WDRRE.mjs} +28 -13
- package/dist/cli/skills-6MNJK2VQ.js +37 -0
- package/dist/cli/{skills-3FCPWMHX.mjs → skills-QSRYGMG2.mjs} +8 -8
- package/dist/cli/tools-OT43MSZE.js +57 -0
- package/dist/cli/{tools-2NTDNUQT.mjs → tools-RUC4ULAD.mjs} +17 -17
- package/dist/cli/{update-25MTBTGU.mjs → update-DPWNL2UB.mjs} +10 -10
- package/dist/cli/update-PHOSO3TL.js +35 -0
- package/dist/cli/{views-37K4JNNS.js → views-CVDVQALA.js} +18 -18
- package/dist/cli/{views-OBE5LUSW.mjs → views-JP66QRA3.mjs} +6 -6
- package/dist/cli/{workflow-6YTIHHJH.js → workflow-JM6JUI7I.js} +17 -17
- package/dist/cli/{workflow-HAPCL4K6.mjs → workflow-MVTX2PY3.mjs} +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +108 -106
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-QFIXECQV.js +0 -43
- package/dist/cli/describe-U6HM52X6.js +0 -50
- package/dist/cli/git-OBV73OVY.js +0 -25
- package/dist/cli/search-IGHNMXI4.js +0 -33
- package/dist/cli/sessions-ZJNV4SEL.js +0 -22
- package/dist/cli/skills-ZCJ6FOOK.js +0 -37
- package/dist/cli/tools-Q75XC2BS.js +0 -57
- package/dist/cli/update-3G3GO7IE.js +0 -35
|
@@ -89,6 +89,13 @@ export const TOOL_EXECUTE_FENCED_PRE_DISPATCH_RATE_REFUSAL_MAX_ATTEMPTS =
|
|
|
89
89
|
(TOOL_EXECUTE_CUSTOMER_DB_STORAGE_UNAVAILABLE_MAX_ATTEMPTS - 1) -
|
|
90
90
|
3 * (TOOL_EXECUTE_TRANSIENT_HTTP_MAX_ATTEMPTS - 1) +
|
|
91
91
|
1;
|
|
92
|
+
// The billing plane could not open this call's charge, so the provider was
|
|
93
|
+
// never called (`billingUnavailableResponse` stamps
|
|
94
|
+
// `provider_request_dispatched: false`). Production saw these singly and
|
|
95
|
+
// intermittently (one org, 180 of 10,324 LeadMagic calls over 1.7 h on
|
|
96
|
+
// 2026-11-14, every one sent once and failed), so a short bounded wait
|
|
97
|
+
// recovers them: 1 s, 2 s, 4 s, 5 s between five sends.
|
|
98
|
+
export const TOOL_EXECUTE_BILLING_UNAVAILABLE_MAX_ATTEMPTS = 5;
|
|
92
99
|
export const TOOL_EXECUTE_TRANSPORT_MAX_ATTEMPTS = 3;
|
|
93
100
|
export const TOOL_EXECUTE_TRANSPORT_RETRY_DELAY_MS = 1_000;
|
|
94
101
|
// A sandbox lost new connections for about 97 seconds on 2026-10-30, and each
|
|
@@ -283,6 +290,7 @@ export type ToolExecuteHttpRetryDecision = {
|
|
|
283
290
|
| 'idempotency_in_progress'
|
|
284
291
|
| 'gateway_invocation_in_progress'
|
|
285
292
|
| 'customer_db_storage_unavailable'
|
|
293
|
+
| 'billing_unavailable_before_dispatch'
|
|
286
294
|
| 'retry_safe_transient_5xx'
|
|
287
295
|
| 'edge_gateway_transient'
|
|
288
296
|
| 'unsafe_transient_5xx'
|
|
@@ -465,6 +473,25 @@ function isCustomerDbStorageUnavailableResponse(input: {
|
|
|
465
473
|
);
|
|
466
474
|
}
|
|
467
475
|
|
|
476
|
+
/**
|
|
477
|
+
* The app could not open this call's charge because the billing plane was
|
|
478
|
+
* unavailable, and says so before any provider dispatch. Only the explicit
|
|
479
|
+
* `provider_request_dispatched: false` proof qualifies: an older app's body
|
|
480
|
+
* lacks it and keeps its old, non-retried classification.
|
|
481
|
+
*/
|
|
482
|
+
function isBillingUnavailableBeforeDispatchResponse(input: {
|
|
483
|
+
status: number;
|
|
484
|
+
bodyText: string;
|
|
485
|
+
}): boolean {
|
|
486
|
+
if (input.status !== 503) return false;
|
|
487
|
+
const body = parseJsonObject(input.bodyText);
|
|
488
|
+
return (
|
|
489
|
+
body?.code === 'BILLING_UNAVAILABLE' &&
|
|
490
|
+
body.failure_origin === 'deepline_billing' &&
|
|
491
|
+
body.provider_request_dispatched === false
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
|
|
468
495
|
function isConcurrencyBackpressureResponse(input: {
|
|
469
496
|
status: number;
|
|
470
497
|
bodyText: string;
|
|
@@ -592,6 +619,31 @@ export function providerServerErrorRetryDelayMs(input: {
|
|
|
592
619
|
);
|
|
593
620
|
}
|
|
594
621
|
|
|
622
|
+
/**
|
|
623
|
+
* Backoff after the billing plane could not open a charge: 1 s, 2 s, 4 s, then
|
|
624
|
+
* 5 s, each with ±20% jitter so rows refused together during a billing outage
|
|
625
|
+
* do not resend together, or the app's Retry-After when it is longer, never
|
|
626
|
+
* above 5 s.
|
|
627
|
+
*/
|
|
628
|
+
export function billingUnavailableRetryDelayMs(input: {
|
|
629
|
+
attempt: number;
|
|
630
|
+
retryAfterMs: number;
|
|
631
|
+
random?: () => number;
|
|
632
|
+
}): number {
|
|
633
|
+
const base = Math.min(
|
|
634
|
+
TOOL_EXECUTE_RETRY_DELAY_MAX_MS,
|
|
635
|
+
TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS * 2 ** Math.max(0, input.attempt - 1),
|
|
636
|
+
);
|
|
637
|
+
const spread =
|
|
638
|
+
1 +
|
|
639
|
+
((input.random ?? Math.random)() * 2 - 1) *
|
|
640
|
+
PROVIDER_SERVER_ERROR_RETRY_JITTER_RATIO;
|
|
641
|
+
return Math.min(
|
|
642
|
+
TOOL_EXECUTE_RETRY_DELAY_MAX_MS,
|
|
643
|
+
Math.max(input.retryAfterMs, Math.round(base * spread)),
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
|
|
595
647
|
/** Exponential backoff for edge gateway failures: 1 s, 2 s, 4 s, capped. */
|
|
596
648
|
function edgeGatewayRetryDelayMs(attempt: number): number {
|
|
597
649
|
return Math.min(
|
|
@@ -665,6 +717,8 @@ function decideToolExecuteHttpRetry(input: {
|
|
|
665
717
|
idempotencyInProgress?: boolean;
|
|
666
718
|
gatewayInvocationInProgress?: boolean;
|
|
667
719
|
customerDbStorageUnavailable?: boolean;
|
|
720
|
+
/** `isBillingUnavailableBeforeDispatchResponse`. */
|
|
721
|
+
billingUnavailableBeforeDispatch?: boolean;
|
|
668
722
|
concurrencyBackpressure?: boolean;
|
|
669
723
|
runtimeSchedulerCapacity?: boolean;
|
|
670
724
|
providerPacingWait?: boolean;
|
|
@@ -758,6 +812,20 @@ function decideToolExecuteHttpRetry(input: {
|
|
|
758
812
|
reason: 'customer_db_storage_unavailable',
|
|
759
813
|
};
|
|
760
814
|
}
|
|
815
|
+
// Nothing was sent to the provider, so a resend cannot repeat an effect.
|
|
816
|
+
// A fenced call stays out: each fenced resend opens a new gateway logical
|
|
817
|
+
// attempt, and a gateway built before this reason would refuse it as a
|
|
818
|
+
// conflict instead of the plain row failure it reports today.
|
|
819
|
+
if (
|
|
820
|
+
input.billingUnavailableBeforeDispatch &&
|
|
821
|
+
input.executionFenced !== true
|
|
822
|
+
) {
|
|
823
|
+
return {
|
|
824
|
+
retryable: true,
|
|
825
|
+
attemptCap: TOOL_EXECUTE_BILLING_UNAVAILABLE_MAX_ATTEMPTS,
|
|
826
|
+
reason: 'billing_unavailable_before_dispatch',
|
|
827
|
+
};
|
|
828
|
+
}
|
|
761
829
|
if (input.status >= 500 && input.status < 600) {
|
|
762
830
|
if (input.explicitRetryable === false) {
|
|
763
831
|
return {
|
|
@@ -841,6 +909,7 @@ export function createToolExecuteHttpFailureAttemptTracker(): ToolExecuteHttpFai
|
|
|
841
909
|
idempotency_in_progress: 0,
|
|
842
910
|
gateway_invocation_in_progress: 0,
|
|
843
911
|
customer_db_storage_unavailable: 0,
|
|
912
|
+
billing_unavailable_before_dispatch: 0,
|
|
844
913
|
retry_safe_transient_5xx: 0,
|
|
845
914
|
edge_gateway_transient: 0,
|
|
846
915
|
unsafe_transient_5xx: 0,
|
|
@@ -873,6 +942,11 @@ export function createToolExecuteHttpFailureAttemptTracker(): ToolExecuteHttpFai
|
|
|
873
942
|
status: input.status,
|
|
874
943
|
bodyText: input.bodyText ?? '',
|
|
875
944
|
}),
|
|
945
|
+
billingUnavailableBeforeDispatch:
|
|
946
|
+
isBillingUnavailableBeforeDispatchResponse({
|
|
947
|
+
status: input.status,
|
|
948
|
+
bodyText: input.bodyText ?? '',
|
|
949
|
+
}),
|
|
876
950
|
concurrencyBackpressure: isConcurrencyBackpressureResponse({
|
|
877
951
|
status: input.status,
|
|
878
952
|
bodyText: input.bodyText ?? '',
|
|
@@ -963,6 +1037,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
963
1037
|
isGatewayInvocationInProgressResponse(input);
|
|
964
1038
|
const customerDbStorageUnavailable =
|
|
965
1039
|
isCustomerDbStorageUnavailableResponse(input);
|
|
1040
|
+
const billingUnavailableBeforeDispatch =
|
|
1041
|
+
isBillingUnavailableBeforeDispatchResponse(input);
|
|
966
1042
|
const concurrencyBackpressure = isConcurrencyBackpressureResponse(input);
|
|
967
1043
|
const runtimeSchedulerCapacity = isRuntimeSchedulerCapacityResponse(input);
|
|
968
1044
|
const providerPacingWait = isProviderPacingWaitResponse(input);
|
|
@@ -982,6 +1058,7 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
982
1058
|
idempotencyInProgress,
|
|
983
1059
|
gatewayInvocationInProgress,
|
|
984
1060
|
customerDbStorageUnavailable,
|
|
1061
|
+
billingUnavailableBeforeDispatch,
|
|
985
1062
|
concurrencyBackpressure,
|
|
986
1063
|
runtimeSchedulerCapacity,
|
|
987
1064
|
providerPacingWait,
|
|
@@ -1056,6 +1133,7 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1056
1133
|
idempotencyInProgress,
|
|
1057
1134
|
gatewayInvocationInProgress,
|
|
1058
1135
|
customerDbStorageUnavailable,
|
|
1136
|
+
billingUnavailableBeforeDispatch,
|
|
1059
1137
|
concurrencyBackpressure,
|
|
1060
1138
|
runtimeSchedulerCapacity,
|
|
1061
1139
|
providerPacingWait,
|
|
@@ -1125,49 +1203,58 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1125
1203
|
TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS * input.attempt,
|
|
1126
1204
|
),
|
|
1127
1205
|
)
|
|
1128
|
-
: retryDecision.reason === '
|
|
1129
|
-
?
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
)
|
|
1133
|
-
: retryDecision.reason === '
|
|
1134
|
-
?
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1206
|
+
: retryDecision.reason === 'billing_unavailable_before_dispatch'
|
|
1207
|
+
? billingUnavailableRetryDelayMs({
|
|
1208
|
+
attempt: input.attempt,
|
|
1209
|
+
retryAfterMs,
|
|
1210
|
+
})
|
|
1211
|
+
: retryDecision.reason === 'runtime_scheduler_capacity'
|
|
1212
|
+
? Math.min(
|
|
1213
|
+
TOOL_EXECUTE_RETRY_DELAY_MAX_MS,
|
|
1214
|
+
Math.max(retryAfterMs, TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS),
|
|
1215
|
+
)
|
|
1216
|
+
: retryDecision.reason === 'provider_pacing_wait'
|
|
1217
|
+
? retryAfterMs
|
|
1218
|
+
: input.status === 429
|
|
1219
|
+
? hasRetryAfterHeader
|
|
1220
|
+
? providerOwnedRateLimit
|
|
1221
|
+
? // The provider's explicit deadline is authoritative. Attempt-
|
|
1222
|
+
// scaled fallback backoff is only for a bare 429; extending a
|
|
1223
|
+
// valid Retry-After by the attempt number needlessly idles this
|
|
1224
|
+
// row after the shared provider pacer has already enforced the
|
|
1225
|
+
// deadline for every caller using the credential.
|
|
1226
|
+
retryAfterMs
|
|
1227
|
+
: Math.max(
|
|
1228
|
+
retryAfterMs,
|
|
1229
|
+
TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS * input.attempt,
|
|
1230
|
+
)
|
|
1231
|
+
: Math.min(
|
|
1232
|
+
TOOL_EXECUTE_RATE_LIMIT_RETRY_DELAY_MAX_MS,
|
|
1233
|
+
Math.max(
|
|
1234
|
+
retryAfterMs,
|
|
1235
|
+
TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS * input.attempt,
|
|
1236
|
+
),
|
|
1147
1237
|
)
|
|
1148
|
-
:
|
|
1149
|
-
|
|
1150
|
-
|
|
1238
|
+
: retryDecision.reason === 'provider_server_error'
|
|
1239
|
+
? providerServerErrorRetryDelayMs({
|
|
1240
|
+
attempt: input.attempt,
|
|
1151
1241
|
retryAfterMs,
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
? providerServerErrorRetryDelayMs({
|
|
1157
|
-
attempt: input.attempt,
|
|
1158
|
-
retryAfterMs,
|
|
1159
|
-
})
|
|
1160
|
-
: retryDecision.reason === 'edge_gateway_transient'
|
|
1161
|
-
? edgeGatewayRetryDelayMs(input.attempt)
|
|
1162
|
-
: retryDecision.reason === 'idempotency_in_progress' &&
|
|
1163
|
-
!hasRetryAfterHeader
|
|
1164
|
-
? idempotencyInProgressRetryDelayMs(input.attempt)
|
|
1165
|
-
: retryDecision.reason === 'gateway_invocation_in_progress' &&
|
|
1242
|
+
})
|
|
1243
|
+
: retryDecision.reason === 'edge_gateway_transient'
|
|
1244
|
+
? edgeGatewayRetryDelayMs(input.attempt)
|
|
1245
|
+
: retryDecision.reason === 'idempotency_in_progress' &&
|
|
1166
1246
|
!hasRetryAfterHeader
|
|
1167
1247
|
? idempotencyInProgressRetryDelayMs(input.attempt)
|
|
1168
|
-
:
|
|
1169
|
-
|
|
1170
|
-
|
|
1248
|
+
: retryDecision.reason ===
|
|
1249
|
+
'gateway_invocation_in_progress' &&
|
|
1250
|
+
!hasRetryAfterHeader
|
|
1251
|
+
? idempotencyInProgressRetryDelayMs(input.attempt)
|
|
1252
|
+
: retryAfterMs > 0
|
|
1253
|
+
? Math.min(
|
|
1254
|
+
TOOL_EXECUTE_RETRY_DELAY_MAX_MS,
|
|
1255
|
+
retryAfterMs,
|
|
1256
|
+
)
|
|
1257
|
+
: TOOL_EXECUTE_RETRY_DELAY_FALLBACK_MS;
|
|
1171
1258
|
return {
|
|
1172
1259
|
...retryDecision,
|
|
1173
1260
|
...(acceptedOperationNeedsRecovery
|
|
@@ -1200,6 +1287,8 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1200
1287
|
retryDecision.reason !== 'concurrency_backpressure' &&
|
|
1201
1288
|
retryDecision.reason !== 'runtime_scheduler_capacity' &&
|
|
1202
1289
|
retryDecision.reason !== 'provider_pacing_wait' &&
|
|
1290
|
+
// Billing refused before dispatch: a wait, not a failed provider call.
|
|
1291
|
+
retryDecision.reason !== 'billing_unavailable_before_dispatch' &&
|
|
1203
1292
|
// Bounded per call by its attempt cap, and each call already charges
|
|
1204
1293
|
// the tool-call budget. The run-wide retry budget is a runaway guard
|
|
1205
1294
|
// whose breach is run-fatal; a provider outage across a large map must
|
|
@@ -1224,6 +1313,7 @@ export function classifyToolExecuteHttpFailure(input: {
|
|
|
1224
1313
|
// Only explicit pre-dispatch refusals permit automatic replay of an
|
|
1225
1314
|
// operation that does not declare ordinary transient retry safety.
|
|
1226
1315
|
knownNotDispatched:
|
|
1316
|
+
retryDecision.reason === 'billing_unavailable_before_dispatch' ||
|
|
1227
1317
|
runtimeSchedulerCapacity ||
|
|
1228
1318
|
concurrencyBackpressure ||
|
|
1229
1319
|
providerPacingWait ||
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkKQW27FSRjs = require('./chunk-KQW27FSR.js');
|
|
18
|
+
require('./chunk-KEE57BF2.js');
|
|
19
|
+
require('./chunk-BQ2KAFVQ.js');
|
|
20
|
+
require('./chunk-CSMLW5VE.js');
|
|
21
|
+
require('./chunk-T2N3B7IQ.js');
|
|
22
|
+
require('./chunk-XNYIZMNQ.js');
|
|
23
|
+
require('./chunk-SQWET4SL.js');
|
|
24
|
+
require('./chunk-64CEFPF4.js');
|
|
25
|
+
require('./chunk-OG64RBAC.js');
|
|
26
|
+
require('./chunk-COGTRVWW.js');
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
exports.EXIT_WORKSPACE_MISMATCH = _chunkKQW27FSRjs.EXIT_WORKSPACE_MISMATCH; exports.authStatusLine = _chunkKQW27FSRjs.authStatusLine; exports.clearPendingClaim = _chunkKQW27FSRjs.clearPendingClaim; exports.clearSatisfiedPendingClaim = _chunkKQW27FSRjs.clearSatisfiedPendingClaim; exports.handleRegister = _chunkKQW27FSRjs.handleRegister; exports.handleStatus = _chunkKQW27FSRjs.handleStatus; exports.handleWait = _chunkKQW27FSRjs.handleWait; exports.httpJson = _chunkKQW27FSRjs.httpJson; exports.readPendingAuthClaim = _chunkKQW27FSRjs.readPendingAuthClaim; exports.readStatusBanner = _chunkKQW27FSRjs.readStatusBanner; exports.registerAuthCommands = _chunkKQW27FSRjs.registerAuthCommands; exports.reportApprovalLinkShown = _chunkKQW27FSRjs.reportApprovalLinkShown; exports.reportSetupCompleted = _chunkKQW27FSRjs.reportSetupCompleted; exports.resolvePendingAuthClaimForResume = _chunkKQW27FSRjs.resolvePendingAuthClaimForResume; exports.statusBannerLine = _chunkKQW27FSRjs.statusBannerLine;
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
reportSetupCompleted,
|
|
15
15
|
resolvePendingAuthClaimForResume,
|
|
16
16
|
statusBannerLine
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-AOAXIJL2.mjs";
|
|
18
|
+
import "./chunk-S2HHY26V.mjs";
|
|
19
|
+
import "./chunk-VN432I4S.mjs";
|
|
20
|
+
import "./chunk-47UF3DDN.mjs";
|
|
21
21
|
import "./chunk-QNHHZ63P.mjs";
|
|
22
22
|
import "./chunk-DLIRSHV6.mjs";
|
|
23
23
|
import "./chunk-ZPGGW27Q.mjs";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-3NUYO5QO.mjs";
|
|
25
25
|
import "./chunk-WZYKRD7T.mjs";
|
|
26
26
|
import "./chunk-KRD6H754.mjs";
|
|
27
27
|
export {
|