deepline 0.1.250 → 0.1.251
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/context.ts +90 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +15 -0
- package/dist/cli/index.js +11 -13
- package/dist/cli/index.mjs +11 -13
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -113,7 +113,7 @@ export const SDK_RELEASE = {
|
|
|
113
113
|
// runtime intentionally no longer compiles at publish or launch time.
|
|
114
114
|
// 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
|
|
115
115
|
// deploy-time artifact migration. Play authoring now has one CJS contract.
|
|
116
|
-
version: '0.1.
|
|
116
|
+
version: '0.1.251',
|
|
117
117
|
apiContract: '2026-07-cjs-absurd-only-play-runtime-hard-cutover',
|
|
118
118
|
supportPolicy: {
|
|
119
119
|
minimumSupported: '0.1.53',
|
|
@@ -1542,13 +1542,17 @@ export class PlayContextImpl {
|
|
|
1542
1542
|
this.#options.workflowId &&
|
|
1543
1543
|
this.#options.runId
|
|
1544
1544
|
) {
|
|
1545
|
-
const
|
|
1546
|
-
|
|
1547
|
-
|
|
1545
|
+
const url = `${this.#options.baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_API_COMPAT_PATH}`;
|
|
1546
|
+
const requestId = `ctx-secret-${crypto.randomUUID()}`;
|
|
1547
|
+
const startedAt = Date.now();
|
|
1548
|
+
let response: Response;
|
|
1549
|
+
try {
|
|
1550
|
+
response = await fetch(url, {
|
|
1548
1551
|
method: 'POST',
|
|
1549
1552
|
headers: {
|
|
1550
1553
|
Authorization: `Bearer ${this.#options.executorToken}`,
|
|
1551
1554
|
'Content-Type': 'application/json',
|
|
1555
|
+
'x-deepline-request-id': requestId,
|
|
1552
1556
|
...(await this.vercelProtectionHeaders()),
|
|
1553
1557
|
},
|
|
1554
1558
|
body: JSON.stringify({
|
|
@@ -1556,11 +1560,89 @@ export class PlayContextImpl {
|
|
|
1556
1560
|
name: auth.secret.name,
|
|
1557
1561
|
playName: this.#options.playName,
|
|
1558
1562
|
}),
|
|
1559
|
-
}
|
|
1560
|
-
)
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1563
|
+
});
|
|
1564
|
+
} catch (error) {
|
|
1565
|
+
const diagnostic = describeTransportError(error);
|
|
1566
|
+
this.log(
|
|
1567
|
+
`[runtime.secret_resolution_failure] ${JSON.stringify({
|
|
1568
|
+
stage: 'transport',
|
|
1569
|
+
secret_name: auth.secret.name,
|
|
1570
|
+
gateway_origin: transportGatewayOriginForDiagnostic(url),
|
|
1571
|
+
request_id: requestId,
|
|
1572
|
+
elapsed_ms: Date.now() - startedAt,
|
|
1573
|
+
error: diagnostic,
|
|
1574
|
+
})}`,
|
|
1575
|
+
);
|
|
1576
|
+
throw new Error(
|
|
1577
|
+
`Secret ${auth.secret.name} resolution transport failed (request_id=${requestId}): ${diagnostic.message ?? 'unknown transport error'}`,
|
|
1578
|
+
);
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
const responseDiagnostic = {
|
|
1582
|
+
stage: response.ok ? 'invalid_response' : 'http_response',
|
|
1583
|
+
secret_name: auth.secret.name,
|
|
1584
|
+
gateway_origin: transportGatewayOriginForDiagnostic(url),
|
|
1585
|
+
request_id: requestId,
|
|
1586
|
+
elapsed_ms: Date.now() - startedAt,
|
|
1587
|
+
http_status: response.status,
|
|
1588
|
+
status_text: response.statusText || null,
|
|
1589
|
+
content_type: response.headers.get('content-type'),
|
|
1590
|
+
server: response.headers.get('server'),
|
|
1591
|
+
vercel_request_id:
|
|
1592
|
+
response.headers.get('x-vercel-id') ??
|
|
1593
|
+
response.headers.get('x-vercel-request-id'),
|
|
1594
|
+
response_request_id: response.headers.get('x-deepline-request-id'),
|
|
1595
|
+
error_code: response.headers.get('x-deepline-error-code'),
|
|
1596
|
+
retry_after: response.headers.get('retry-after'),
|
|
1597
|
+
};
|
|
1598
|
+
if (!response.ok) {
|
|
1599
|
+
this.log(
|
|
1600
|
+
`[runtime.secret_resolution_failure] ${JSON.stringify(responseDiagnostic)}`,
|
|
1601
|
+
);
|
|
1602
|
+
throw new Error(
|
|
1603
|
+
`Secret ${auth.secret.name} is not available to this run (resolution status=${response.status}, request_id=${requestId}).`,
|
|
1604
|
+
);
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
let payload: unknown;
|
|
1608
|
+
try {
|
|
1609
|
+
payload = await response.json();
|
|
1610
|
+
} catch (error) {
|
|
1611
|
+
this.log(
|
|
1612
|
+
`[runtime.secret_resolution_failure] ${JSON.stringify({
|
|
1613
|
+
...responseDiagnostic,
|
|
1614
|
+
response_kind: 'invalid_json',
|
|
1615
|
+
parse_error_name:
|
|
1616
|
+
error instanceof Error ? error.name : typeof error,
|
|
1617
|
+
})}`,
|
|
1618
|
+
);
|
|
1619
|
+
throw new Error(
|
|
1620
|
+
`Secret ${auth.secret.name} is not available to this run (invalid resolution response, request_id=${requestId}).`,
|
|
1621
|
+
);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
value =
|
|
1625
|
+
payload &&
|
|
1626
|
+
typeof payload === 'object' &&
|
|
1627
|
+
!Array.isArray(payload) &&
|
|
1628
|
+
typeof (payload as { value?: unknown }).value === 'string'
|
|
1629
|
+
? (payload as { value: string }).value
|
|
1630
|
+
: null;
|
|
1631
|
+
if (!value) {
|
|
1632
|
+
this.log(
|
|
1633
|
+
`[runtime.secret_resolution_failure] ${JSON.stringify({
|
|
1634
|
+
...responseDiagnostic,
|
|
1635
|
+
response_kind:
|
|
1636
|
+
payload === null
|
|
1637
|
+
? 'null'
|
|
1638
|
+
: Array.isArray(payload)
|
|
1639
|
+
? 'array'
|
|
1640
|
+
: typeof payload,
|
|
1641
|
+
})}`,
|
|
1642
|
+
);
|
|
1643
|
+
throw new Error(
|
|
1644
|
+
`Secret ${auth.secret.name} is not available to this run (missing resolution value, request_id=${requestId}).`,
|
|
1645
|
+
);
|
|
1564
1646
|
}
|
|
1565
1647
|
} else {
|
|
1566
1648
|
throw new Error(
|
|
@@ -53,6 +53,13 @@ const RUNTIME_RECEIPT_GATEWAY_TRANSPORT_RETRY_PATTERN =
|
|
|
53
53
|
/AppRuntimeApiTransportError: App runtime API transport exhausted action=(?:get|claim|mark|complete|fail|heartbeat|release|skip)_runtime_step_receipts?/i;
|
|
54
54
|
const RUNTIME_API_TRANSPORT_RETRY_PATTERN =
|
|
55
55
|
/\bRuntime API request to .+ failed before receiving a response:\s*(?:fetch failed|connection (?:terminated|timed out|closed|reset)|ECONNRESET|ETIMEDOUT|ECONNREFUSED)\b/i;
|
|
56
|
+
// The ready fence precedes customer play execution. A failed detached start is
|
|
57
|
+
// safe to retry only when the runner never wrote its ready marker or attempted
|
|
58
|
+
// the start acknowledgement, and Daytona has no exit evidence. This covers a
|
|
59
|
+
// transient Daytona control-plane blind spot where the accepted command cannot
|
|
60
|
+
// be inspected, while keeping post-start and crash failures terminal.
|
|
61
|
+
const RUNTIME_SANDBOX_UNSTARTED_RETRY_PATTERN =
|
|
62
|
+
/DaytonaRunnerInitializationError:\s*RUNTIME_SANDBOX_START_FAILED[\s\S]*Marker diagnosis:\s*ready_marker_unavailable[\s\S]*"readyMarkerObserved"\s*:\s*false[\s\S]*"startAcknowledgementAttempted"\s*:\s*false[\s\S]*"exitCode"\s*:\s*null[\s\S]*"exitCodeFile"\s*:\s*null/i;
|
|
56
63
|
const DAYTONA_INFRASTRUCTURE_RETRY_PATTERN =
|
|
57
64
|
/\b(?:Request failed with status code (?:408|429|500|502|503|504)|ECONNRESET|ECONNREFUSED|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|fetch failed|socket hang up|Daytona sandbox create failed across|Daytona sandbox create did not complete)\b/i;
|
|
58
65
|
|
|
@@ -446,6 +453,7 @@ export function retryableRuntimeInitializationFailureReason(
|
|
|
446
453
|
| 'runtime_postgres_connect'
|
|
447
454
|
| 'runtime_api_transport'
|
|
448
455
|
| 'runtime_receipt_gateway_transport'
|
|
456
|
+
| 'runtime_sandbox_unstarted'
|
|
449
457
|
| null {
|
|
450
458
|
if (result.status !== 'failed') return null;
|
|
451
459
|
if (RUNTIME_POSTGRES_CONNECT_RETRY_PATTERN.test(result.error)) {
|
|
@@ -455,6 +463,13 @@ export function retryableRuntimeInitializationFailureReason(
|
|
|
455
463
|
return 'runtime_receipt_gateway_transport';
|
|
456
464
|
}
|
|
457
465
|
const rowsProcessed = Number(result.stats?.rowsProcessed ?? 0);
|
|
466
|
+
if (
|
|
467
|
+
rowsProcessed === 0 &&
|
|
468
|
+
result.steps.length === 0 &&
|
|
469
|
+
RUNTIME_SANDBOX_UNSTARTED_RETRY_PATTERN.test(result.error)
|
|
470
|
+
) {
|
|
471
|
+
return 'runtime_sandbox_unstarted';
|
|
472
|
+
}
|
|
458
473
|
if (
|
|
459
474
|
rowsProcessed === 0 &&
|
|
460
475
|
result.steps.length === 0 &&
|
package/dist/cli/index.js
CHANGED
|
@@ -632,7 +632,7 @@ var SDK_RELEASE = {
|
|
|
632
632
|
// runtime intentionally no longer compiles at publish or launch time.
|
|
633
633
|
// 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
|
|
634
634
|
// deploy-time artifact migration. Play authoring now has one CJS contract.
|
|
635
|
-
version: "0.1.
|
|
635
|
+
version: "0.1.251",
|
|
636
636
|
apiContract: "2026-07-cjs-absurd-only-play-runtime-hard-cutover",
|
|
637
637
|
supportPolicy: {
|
|
638
638
|
minimumSupported: "0.1.53",
|
|
@@ -24450,7 +24450,7 @@ function renderAvailableToolsText(payload) {
|
|
|
24450
24450
|
const returned = asFiniteNumber(payload.returned) ?? tools.length;
|
|
24451
24451
|
const total = asFiniteNumber(payload.total);
|
|
24452
24452
|
const lines = [
|
|
24453
|
-
total !== void 0 ? `
|
|
24453
|
+
total !== void 0 ? `Monitor types you can deploy (${returned} of ${total}):` : "Monitor types you can deploy:"
|
|
24454
24454
|
];
|
|
24455
24455
|
let currentProvider;
|
|
24456
24456
|
for (const raw of tools) {
|
|
@@ -24485,7 +24485,7 @@ function renderAvailableToolsText(payload) {
|
|
|
24485
24485
|
" See monitors already deployed in this workspace:",
|
|
24486
24486
|
" deepline monitors list",
|
|
24487
24487
|
" Validate a monitor definition before deploying:",
|
|
24488
|
-
` deepline monitors check '{"key":"my-
|
|
24488
|
+
` deepline monitors check '{"key":"my-monitor","tool":"<provider.tool>","payload":{...}}'`
|
|
24489
24489
|
);
|
|
24490
24490
|
return `${lines.join("\n")}
|
|
24491
24491
|
`;
|
|
@@ -24789,7 +24789,7 @@ Examples:
|
|
|
24789
24789
|
deepline monitors deploy --file monitor.json
|
|
24790
24790
|
deepline monitors list --status all --json
|
|
24791
24791
|
deepline monitors get my-monitor --json
|
|
24792
|
-
deepline monitors update my-monitor '{"
|
|
24792
|
+
deepline monitors update my-monitor '{"name":"Interested replies"}' --json
|
|
24793
24793
|
deepline monitors delete my-monitor --dry-run
|
|
24794
24794
|
deepline monitors reactivate my-monitor --dry-run
|
|
24795
24795
|
`
|
|
@@ -24879,8 +24879,8 @@ Examples:
|
|
|
24879
24879
|
`
|
|
24880
24880
|
Notes:
|
|
24881
24881
|
Read-only validation. <definition> is a JSON object with key, tool, payload,
|
|
24882
|
-
and optional controls (Deepline lifecycle metadata,
|
|
24883
|
-
|
|
24882
|
+
and optional controls (Deepline lifecycle metadata). Pass it positionally,
|
|
24883
|
+
via --file <path>, or
|
|
24884
24884
|
from stdin with --file -. Does not deploy or spend credits.
|
|
24885
24885
|
|
|
24886
24886
|
Examples:
|
|
@@ -24899,9 +24899,8 @@ Examples:
|
|
|
24899
24899
|
`
|
|
24900
24900
|
Notes:
|
|
24901
24901
|
Mutates workspace state and may spend Deepline credits. <definition> is a JSON
|
|
24902
|
-
object with key, tool, payload, and optional controls
|
|
24903
|
-
|
|
24904
|
-
from stdin with --file -.
|
|
24902
|
+
object with key, tool, payload, and optional controls. Pass it positionally,
|
|
24903
|
+
via --file <path>, or from stdin with --file -.
|
|
24905
24904
|
--dry-run validates the definition and shows the plan (deploy cost in Deepline
|
|
24906
24905
|
credits when the server reports it, plus any existing monitors that may
|
|
24907
24906
|
already cover this scope) WITHOUT deploying. Exits 0 when valid, 7 when not.
|
|
@@ -24924,12 +24923,11 @@ Examples:
|
|
|
24924
24923
|
"after",
|
|
24925
24924
|
`
|
|
24926
24925
|
Notes:
|
|
24927
|
-
Mutates workspace state. <patch> is a JSON object of fields to update
|
|
24928
|
-
|
|
24929
|
-
via --file <path>, or from stdin with --file -.
|
|
24926
|
+
Mutates workspace state. <patch> is a JSON object of fields to update. Pass it
|
|
24927
|
+
positionally, via --file <path>, or from stdin with --file -.
|
|
24930
24928
|
|
|
24931
24929
|
Examples:
|
|
24932
|
-
deepline monitors update my-monitor '{"
|
|
24930
|
+
deepline monitors update my-monitor '{"name":"Interested replies"}' --json
|
|
24933
24931
|
deepline monitors update my-monitor --file patch.json
|
|
24934
24932
|
`
|
|
24935
24933
|
).option(
|
package/dist/cli/index.mjs
CHANGED
|
@@ -617,7 +617,7 @@ var SDK_RELEASE = {
|
|
|
617
617
|
// runtime intentionally no longer compiles at publish or launch time.
|
|
618
618
|
// 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
|
|
619
619
|
// deploy-time artifact migration. Play authoring now has one CJS contract.
|
|
620
|
-
version: "0.1.
|
|
620
|
+
version: "0.1.251",
|
|
621
621
|
apiContract: "2026-07-cjs-absurd-only-play-runtime-hard-cutover",
|
|
622
622
|
supportPolicy: {
|
|
623
623
|
minimumSupported: "0.1.53",
|
|
@@ -24486,7 +24486,7 @@ function renderAvailableToolsText(payload) {
|
|
|
24486
24486
|
const returned = asFiniteNumber(payload.returned) ?? tools.length;
|
|
24487
24487
|
const total = asFiniteNumber(payload.total);
|
|
24488
24488
|
const lines = [
|
|
24489
|
-
total !== void 0 ? `
|
|
24489
|
+
total !== void 0 ? `Monitor types you can deploy (${returned} of ${total}):` : "Monitor types you can deploy:"
|
|
24490
24490
|
];
|
|
24491
24491
|
let currentProvider;
|
|
24492
24492
|
for (const raw of tools) {
|
|
@@ -24521,7 +24521,7 @@ function renderAvailableToolsText(payload) {
|
|
|
24521
24521
|
" See monitors already deployed in this workspace:",
|
|
24522
24522
|
" deepline monitors list",
|
|
24523
24523
|
" Validate a monitor definition before deploying:",
|
|
24524
|
-
` deepline monitors check '{"key":"my-
|
|
24524
|
+
` deepline monitors check '{"key":"my-monitor","tool":"<provider.tool>","payload":{...}}'`
|
|
24525
24525
|
);
|
|
24526
24526
|
return `${lines.join("\n")}
|
|
24527
24527
|
`;
|
|
@@ -24825,7 +24825,7 @@ Examples:
|
|
|
24825
24825
|
deepline monitors deploy --file monitor.json
|
|
24826
24826
|
deepline monitors list --status all --json
|
|
24827
24827
|
deepline monitors get my-monitor --json
|
|
24828
|
-
deepline monitors update my-monitor '{"
|
|
24828
|
+
deepline monitors update my-monitor '{"name":"Interested replies"}' --json
|
|
24829
24829
|
deepline monitors delete my-monitor --dry-run
|
|
24830
24830
|
deepline monitors reactivate my-monitor --dry-run
|
|
24831
24831
|
`
|
|
@@ -24915,8 +24915,8 @@ Examples:
|
|
|
24915
24915
|
`
|
|
24916
24916
|
Notes:
|
|
24917
24917
|
Read-only validation. <definition> is a JSON object with key, tool, payload,
|
|
24918
|
-
and optional controls (Deepline lifecycle metadata,
|
|
24919
|
-
|
|
24918
|
+
and optional controls (Deepline lifecycle metadata). Pass it positionally,
|
|
24919
|
+
via --file <path>, or
|
|
24920
24920
|
from stdin with --file -. Does not deploy or spend credits.
|
|
24921
24921
|
|
|
24922
24922
|
Examples:
|
|
@@ -24935,9 +24935,8 @@ Examples:
|
|
|
24935
24935
|
`
|
|
24936
24936
|
Notes:
|
|
24937
24937
|
Mutates workspace state and may spend Deepline credits. <definition> is a JSON
|
|
24938
|
-
object with key, tool, payload, and optional controls
|
|
24939
|
-
|
|
24940
|
-
from stdin with --file -.
|
|
24938
|
+
object with key, tool, payload, and optional controls. Pass it positionally,
|
|
24939
|
+
via --file <path>, or from stdin with --file -.
|
|
24941
24940
|
--dry-run validates the definition and shows the plan (deploy cost in Deepline
|
|
24942
24941
|
credits when the server reports it, plus any existing monitors that may
|
|
24943
24942
|
already cover this scope) WITHOUT deploying. Exits 0 when valid, 7 when not.
|
|
@@ -24960,12 +24959,11 @@ Examples:
|
|
|
24960
24959
|
"after",
|
|
24961
24960
|
`
|
|
24962
24961
|
Notes:
|
|
24963
|
-
Mutates workspace state. <patch> is a JSON object of fields to update
|
|
24964
|
-
|
|
24965
|
-
via --file <path>, or from stdin with --file -.
|
|
24962
|
+
Mutates workspace state. <patch> is a JSON object of fields to update. Pass it
|
|
24963
|
+
positionally, via --file <path>, or from stdin with --file -.
|
|
24966
24964
|
|
|
24967
24965
|
Examples:
|
|
24968
|
-
deepline monitors update my-monitor '{"
|
|
24966
|
+
deepline monitors update my-monitor '{"name":"Interested replies"}' --json
|
|
24969
24967
|
deepline monitors update my-monitor --file patch.json
|
|
24970
24968
|
`
|
|
24971
24969
|
).option(
|
package/dist/index.js
CHANGED
|
@@ -431,7 +431,7 @@ var SDK_RELEASE = {
|
|
|
431
431
|
// runtime intentionally no longer compiles at publish or launch time.
|
|
432
432
|
// 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
|
|
433
433
|
// deploy-time artifact migration. Play authoring now has one CJS contract.
|
|
434
|
-
version: "0.1.
|
|
434
|
+
version: "0.1.251",
|
|
435
435
|
apiContract: "2026-07-cjs-absurd-only-play-runtime-hard-cutover",
|
|
436
436
|
supportPolicy: {
|
|
437
437
|
minimumSupported: "0.1.53",
|
package/dist/index.mjs
CHANGED
|
@@ -361,7 +361,7 @@ var SDK_RELEASE = {
|
|
|
361
361
|
// runtime intentionally no longer compiles at publish or launch time.
|
|
362
362
|
// 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
|
|
363
363
|
// deploy-time artifact migration. Play authoring now has one CJS contract.
|
|
364
|
-
version: "0.1.
|
|
364
|
+
version: "0.1.251",
|
|
365
365
|
apiContract: "2026-07-cjs-absurd-only-play-runtime-hard-cutover",
|
|
366
366
|
supportPolicy: {
|
|
367
367
|
minimumSupported: "0.1.53",
|