deepline 0.1.305 → 0.1.306
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/play-runtime/durable-receipt-execution.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/row-isolation.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +13 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -157,7 +157,7 @@ export const SDK_RELEASE = {
|
|
|
157
157
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
158
158
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
159
159
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
160
|
-
version: '0.1.
|
|
160
|
+
version: '0.1.306',
|
|
161
161
|
contracts: {
|
|
162
162
|
api: {
|
|
163
163
|
name: 'sdk-http-api',
|
|
@@ -69,6 +69,12 @@ function isInFlightRuntimeReceipt(
|
|
|
69
69
|
export function runtimeReceiptFailureKindForError(
|
|
70
70
|
error: unknown,
|
|
71
71
|
): WorkReceiptFailureKind {
|
|
72
|
+
// A failed ownership check means the runner cannot prove whether the
|
|
73
|
+
// invocation gateway or a newer attempt owns/completed the side effect. It
|
|
74
|
+
// must never stamp that receipt terminal: a later fenced Play Run attempt
|
|
75
|
+
// first reconciles the invocation receipt, then replays or reclaims safely.
|
|
76
|
+
if (error instanceof RuntimeReceiptLeaseLostError) return 'repairable';
|
|
77
|
+
|
|
72
78
|
const toolFailureKind = getToolHttpErrorReceiptFailureKind(error);
|
|
73
79
|
if (toolFailureKind) return toolFailureKind;
|
|
74
80
|
|
|
@@ -832,6 +838,13 @@ export async function executeWithDurableRuntimeReceipt<T>(input: {
|
|
|
832
838
|
if (input.shouldPersistFailure?.(error) === false) {
|
|
833
839
|
throw error;
|
|
834
840
|
}
|
|
841
|
+
// The ownership is uncertain, so neither `fail` nor `release` is safe.
|
|
842
|
+
// Let the attempt-level cleanup and the receipt lease fence reconcile this
|
|
843
|
+
// on the next Play Run attempt. In particular, never replace a possibly
|
|
844
|
+
// completed invocation with a terminal error from the old owner.
|
|
845
|
+
if (error instanceof RuntimeReceiptLeaseLostError) {
|
|
846
|
+
throw error;
|
|
847
|
+
}
|
|
835
848
|
if (
|
|
836
849
|
isPlayExecutionSuspendedError(error) ||
|
|
837
850
|
isPlayRowExecutionSuspendedError(error)
|
|
@@ -100,7 +100,24 @@ export type PlayRunnerBudgetChargeResult = {
|
|
|
100
100
|
export interface PlayRunnerContextConfig {
|
|
101
101
|
executorToken?: string;
|
|
102
102
|
baseUrl?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Runtime API origin reachable from a customer-code sandbox. Production sends
|
|
105
|
+
* execution traffic directly to the app; preview may use the combined gateway
|
|
106
|
+
* because the preview app requires a protection-bypass credential.
|
|
107
|
+
*/
|
|
108
|
+
executionGatewayBaseUrl?: string | null;
|
|
103
109
|
receiptGatewayBaseUrl?: string | null;
|
|
110
|
+
/**
|
|
111
|
+
* Request execution through the relay's durable invocation fence. This is
|
|
112
|
+
* required when the execution relay and receipt gateway have different
|
|
113
|
+
* origins, where the legacy same-origin inference cannot apply.
|
|
114
|
+
*/
|
|
115
|
+
requestDurableInvocationFence?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Preserves the explicit fence capability for callers that validate an
|
|
118
|
+
* ambiguous dispatched provider request before allowing a retry.
|
|
119
|
+
*/
|
|
120
|
+
durableInvocationFence?: boolean;
|
|
104
121
|
runtimeTestFaultHeader?: string | null;
|
|
105
122
|
vercelProtectionBypassToken?: string | null;
|
|
106
123
|
integrationMode?: 'live' | 'eval_stub' | 'fixture';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isHardBillingToolHttpError, ToolHttpError } from './tool-http-errors';
|
|
2
|
+
import { RuntimeReceiptLeaseLostError } from './durable-receipt-execution';
|
|
2
3
|
import { isRuntimePersistenceCircuitOpenError } from './persistence-latch';
|
|
3
4
|
import { isWorkspaceStorageNotReadyFailure } from './run-failure';
|
|
4
5
|
|
|
@@ -33,6 +34,10 @@ export function isAbortLikeError(error: unknown): boolean {
|
|
|
33
34
|
*/
|
|
34
35
|
export function isRowIsolationExemptError(error: unknown): boolean {
|
|
35
36
|
if (isAbortLikeError(error)) return true;
|
|
37
|
+
// Receipt ownership loss is a control-plane uncertainty, not a provider row
|
|
38
|
+
// result. Propagate it to the one fenced Play Run task so its normal retry
|
|
39
|
+
// path can reconcile/replay the durable invocation before any redelivery.
|
|
40
|
+
if (error instanceof RuntimeReceiptLeaseLostError) return true;
|
|
36
41
|
// A remote tool can return arbitrary provider/database wording. Its message
|
|
37
42
|
// must never be mistaken for a failure of the runner's own receipt or sheet
|
|
38
43
|
// persistence plane. Hard Deepline billing denials are the sole typed tool
|
|
@@ -362,10 +362,22 @@ function remoteRuntimeContextForDaytona(
|
|
|
362
362
|
'Daytona execution requires DEEPLINE_RUNTIME_RECEIPT_GATEWAY_URL. Refusing to put app credentials or database sessions in the customer-code sandbox.',
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
|
+
const executionGatewayBaseUrl =
|
|
366
|
+
context.executionGatewayBaseUrl?.trim() || gatewayBaseUrl;
|
|
365
367
|
return {
|
|
366
368
|
...context,
|
|
367
|
-
|
|
369
|
+
// Receipt ownership and runner terminal publication must stay on the Fly
|
|
370
|
+
// receipt gateway. Production execution calls go to the separate relay,
|
|
371
|
+
// keeping a blue/green receipt-gateway deploy out of long provider calls.
|
|
372
|
+
// Protected preview apps intentionally fall back to the combined gateway.
|
|
373
|
+
baseUrl: executionGatewayBaseUrl,
|
|
374
|
+
executionGatewayBaseUrl,
|
|
368
375
|
receiptGatewayBaseUrl: gatewayBaseUrl,
|
|
376
|
+
// The execution relay owns the Postgres-backed invocation fence even though
|
|
377
|
+
// receipt control traffic has a different origin. This must stay explicit:
|
|
378
|
+
// origin equality was only a legacy shortcut for the combined gateway.
|
|
379
|
+
requestDurableInvocationFence: true,
|
|
380
|
+
durableInvocationFence: true,
|
|
369
381
|
vercelProtectionBypassToken: null,
|
|
370
382
|
dbSessionStrategy: 'gateway_only',
|
|
371
383
|
preloadedDbSessions: undefined,
|
package/dist/cli/index.js
CHANGED
|
@@ -1037,7 +1037,7 @@ var SDK_RELEASE = {
|
|
|
1037
1037
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
1038
1038
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
1039
1039
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
1040
|
-
version: "0.1.
|
|
1040
|
+
version: "0.1.306",
|
|
1041
1041
|
contracts: {
|
|
1042
1042
|
api: {
|
|
1043
1043
|
name: "sdk-http-api",
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1022,7 +1022,7 @@ var SDK_RELEASE = {
|
|
|
1022
1022
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
1023
1023
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
1024
1024
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
1025
|
-
version: "0.1.
|
|
1025
|
+
version: "0.1.306",
|
|
1026
1026
|
contracts: {
|
|
1027
1027
|
api: {
|
|
1028
1028
|
name: "sdk-http-api",
|
package/dist/index.js
CHANGED
|
@@ -760,7 +760,7 @@ var SDK_RELEASE = {
|
|
|
760
760
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
761
761
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
762
762
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
763
|
-
version: "0.1.
|
|
763
|
+
version: "0.1.306",
|
|
764
764
|
contracts: {
|
|
765
765
|
api: {
|
|
766
766
|
name: "sdk-http-api",
|
package/dist/index.mjs
CHANGED
|
@@ -686,7 +686,7 @@ var SDK_RELEASE = {
|
|
|
686
686
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
687
687
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
688
688
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
689
|
-
version: "0.1.
|
|
689
|
+
version: "0.1.306",
|
|
690
690
|
contracts: {
|
|
691
691
|
api: {
|
|
692
692
|
name: "sdk-http-api",
|