deepline 0.3.69 → 0.3.70
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.
|
@@ -199,7 +199,7 @@ export const SDK_RELEASE = {
|
|
|
199
199
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
200
200
|
// getters keep their established compatibility behavior.
|
|
201
201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
202
|
-
version: '0.3.
|
|
202
|
+
version: '0.3.70',
|
|
203
203
|
updateSummary:
|
|
204
204
|
'Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.',
|
|
205
205
|
packageCapabilities: {
|
|
@@ -3662,6 +3662,27 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
3662
3662
|
};
|
|
3663
3663
|
}
|
|
3664
3664
|
|
|
3665
|
+
/**
|
|
3666
|
+
* A Deepline admission limit is decided before provider dispatch; the
|
|
3667
|
+
* execute endpoint also releases its billing reservation on that path.
|
|
3668
|
+
* Reclaim only this explicit, structured failure. A timeout, unreadable
|
|
3669
|
+
* body, provider error, or unknown receipt can follow billable provider
|
|
3670
|
+
* work and must remain behind its durable idempotency fence.
|
|
3671
|
+
*/
|
|
3672
|
+
private canRetryWithoutProviderDispatch(
|
|
3673
|
+
receipt: RuntimeStepReceipt,
|
|
3674
|
+
): boolean {
|
|
3675
|
+
const failure = receipt.errorPayload;
|
|
3676
|
+
return (
|
|
3677
|
+
receipt.status === 'failed' &&
|
|
3678
|
+
failure?.schemaVersion === 1 &&
|
|
3679
|
+
failure.origin === 'deepline' &&
|
|
3680
|
+
failure.category === 'rate_limit' &&
|
|
3681
|
+
failure.code === 'RATE_LIMIT' &&
|
|
3682
|
+
failure.retryable === true
|
|
3683
|
+
);
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3665
3686
|
/**
|
|
3666
3687
|
* Dispatch a batched runtime-step-receipt request in bounded chunks and
|
|
3667
3688
|
* concatenate the aligned result arrays back into one array positioned
|
|
@@ -11010,6 +11031,22 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
11010
11031
|
);
|
|
11011
11032
|
for (const [key, receipt] of claimed) claims.set(key, receipt);
|
|
11012
11033
|
}
|
|
11034
|
+
const safeFailedKeys = receipts.flatMap((receipt) => {
|
|
11035
|
+
const claimed = claims.get(receipt.resultReceiptKey);
|
|
11036
|
+
return claimed && this.canRetryWithoutProviderDispatch(claimed)
|
|
11037
|
+
? [receipt.resultReceiptKey]
|
|
11038
|
+
: [];
|
|
11039
|
+
});
|
|
11040
|
+
if (safeFailedKeys.length > 0) {
|
|
11041
|
+
const refreshed = await this.claimRuntimeStepReceipts(
|
|
11042
|
+
safeFailedKeys,
|
|
11043
|
+
this.currentReceiptOwnerRunId,
|
|
11044
|
+
false,
|
|
11045
|
+
false,
|
|
11046
|
+
true,
|
|
11047
|
+
);
|
|
11048
|
+
for (const [key, receipt] of refreshed) claims.set(key, receipt);
|
|
11049
|
+
}
|
|
11013
11050
|
return await recordsFor(
|
|
11014
11051
|
receipts.map((receipt) => receipt.resultReceiptKey),
|
|
11015
11052
|
claims,
|
|
@@ -12238,6 +12275,23 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
12238
12275
|
for (const [receiptKey, claim] of failedRefreshClaims) {
|
|
12239
12276
|
claims.set(receiptKey, claim);
|
|
12240
12277
|
}
|
|
12278
|
+
const safeFailedReceiptKeys = [...claims]
|
|
12279
|
+
.filter(([, claim]) =>
|
|
12280
|
+
this.canRetryWithoutProviderDispatch(claim),
|
|
12281
|
+
)
|
|
12282
|
+
.map(([receiptKey]) => receiptKey);
|
|
12283
|
+
if (safeFailedReceiptKeys.length > 0) {
|
|
12284
|
+
const refreshed = await this.claimRuntimeStepReceipts(
|
|
12285
|
+
safeFailedReceiptKeys,
|
|
12286
|
+
this.currentReceiptOwnerRunId,
|
|
12287
|
+
false,
|
|
12288
|
+
false,
|
|
12289
|
+
true,
|
|
12290
|
+
);
|
|
12291
|
+
for (const [receiptKey, claim] of refreshed) {
|
|
12292
|
+
claims.set(receiptKey, claim);
|
|
12293
|
+
}
|
|
12294
|
+
}
|
|
12241
12295
|
const claimedRequests: ToolCallRequest[] = [...localOnlyRequests];
|
|
12242
12296
|
const durableRecoveredRequests: ToolCallRequest[] = [];
|
|
12243
12297
|
const resolveRequestsFromReceipt = async (
|
|
@@ -13377,8 +13431,7 @@ export class PlayContextImpl implements ScalarPlayAuthoringRuntimeContext {
|
|
|
13377
13431
|
);
|
|
13378
13432
|
}
|
|
13379
13433
|
const materialized = lifecycle.materialized!;
|
|
13380
|
-
const selectedResponse =
|
|
13381
|
-
lifecycle.finishResponse ?? lifecycle.pollResponse;
|
|
13434
|
+
const selectedResponse = lifecycle.finishResponse ?? lifecycle.pollResponse;
|
|
13382
13435
|
return {
|
|
13383
13436
|
...selectedResponse,
|
|
13384
13437
|
status:
|
package/dist/cli/index.js
CHANGED
|
@@ -1214,7 +1214,7 @@ var SDK_RELEASE = {
|
|
|
1214
1214
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1215
1215
|
// getters keep their established compatibility behavior.
|
|
1216
1216
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1217
|
-
version: "0.3.
|
|
1217
|
+
version: "0.3.70",
|
|
1218
1218
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
1219
1219
|
packageCapabilities: {
|
|
1220
1220
|
updatePreferences: 1
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1199,7 +1199,7 @@ var SDK_RELEASE = {
|
|
|
1199
1199
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
1200
1200
|
// getters keep their established compatibility behavior.
|
|
1201
1201
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
1202
|
-
version: "0.3.
|
|
1202
|
+
version: "0.3.70",
|
|
1203
1203
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
1204
1204
|
packageCapabilities: {
|
|
1205
1205
|
updatePreferences: 1
|
package/dist/index.js
CHANGED
|
@@ -832,7 +832,7 @@ var SDK_RELEASE = {
|
|
|
832
832
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
833
833
|
// getters keep their established compatibility behavior.
|
|
834
834
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
835
|
-
version: "0.3.
|
|
835
|
+
version: "0.3.70",
|
|
836
836
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
837
837
|
packageCapabilities: {
|
|
838
838
|
updatePreferences: 1
|
package/dist/index.mjs
CHANGED
|
@@ -744,7 +744,7 @@ var SDK_RELEASE = {
|
|
|
744
744
|
// available at toolResponse.rawV2 while toolResponse.raw and all declared
|
|
745
745
|
// getters keep their established compatibility behavior.
|
|
746
746
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
747
|
-
version: "0.3.
|
|
747
|
+
version: "0.3.70",
|
|
748
748
|
updateSummary: "Automatic CLI updates are now enabled by default. To opt out, run `deepline settings autoupdate off`; use `deepline settings autoupdate on` to re-enable updates or `deepline settings autoupdate pin <version>` to hold an exact release. This release also adds raw-v2 tool responses at toolResponse.rawV2 while preserving existing toolResponse.raw and declared getters.",
|
|
749
749
|
packageCapabilities: {
|
|
750
750
|
updatePreferences: 1
|