deepline 0.1.183 → 0.1.184
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/apps/play-runner-workers/src/coordinator-entry.ts +16 -12
- package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +14 -18
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +2 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +10 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +21 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +2 -1
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +28 -11
- package/dist/bundling-sources/shared_libs/plays/static-pipeline.ts +38 -6
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.mjs +2 -2
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/plays/bundle-play-file.mjs +18 -4
- package/package.json +1 -1
|
@@ -61,6 +61,11 @@ import {
|
|
|
61
61
|
PLAY_RUNTIME_CONTRACT,
|
|
62
62
|
PLAY_RUNTIME_CONTRACT_HEADER,
|
|
63
63
|
} from '../../../shared_libs/play-runtime/runtime-contract';
|
|
64
|
+
import {
|
|
65
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
66
|
+
PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_COMPAT_PATH,
|
|
67
|
+
PLAY_RUNTIME_TAIL_LOG_COMPAT_PATH,
|
|
68
|
+
} from '../../../shared_libs/play-runtime/runtime-api-paths';
|
|
64
69
|
import {
|
|
65
70
|
decideWorkflowPlatformRetry,
|
|
66
71
|
PLATFORM_DEPLOY_WORKFLOW_RETRY_LIMIT,
|
|
@@ -1314,7 +1319,7 @@ async function markWorkflowRuntimeFailure(input: {
|
|
|
1314
1319
|
} satisfies PlayRunLedgerEvent,
|
|
1315
1320
|
],
|
|
1316
1321
|
});
|
|
1317
|
-
const url = `${baseUrl.replace(/\/$/, '')}
|
|
1322
|
+
const url = `${baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_API_COMPAT_PATH}`;
|
|
1318
1323
|
const backoffMs = [200, 500, 1500];
|
|
1319
1324
|
let lastError: unknown = null;
|
|
1320
1325
|
for (let attempt = 0; attempt <= backoffMs.length; attempt += 1) {
|
|
@@ -1376,7 +1381,7 @@ async function appendWorkflowChildCompletedRunEvent(input: {
|
|
|
1376
1381
|
} satisfies PlayRunLedgerEvent,
|
|
1377
1382
|
],
|
|
1378
1383
|
});
|
|
1379
|
-
const url = `${baseUrl.replace(/\/$/, '')}
|
|
1384
|
+
const url = `${baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_API_COMPAT_PATH}`;
|
|
1380
1385
|
const response = await fetch(url, { method: 'POST', headers, body });
|
|
1381
1386
|
if (!response.ok) {
|
|
1382
1387
|
throw new Error(
|
|
@@ -1797,7 +1802,7 @@ async function mintChildWorkflowExecutorToken(input: {
|
|
|
1797
1802
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
1798
1803
|
executorToken: input.parentExecutorToken,
|
|
1799
1804
|
baseUrl: input.baseUrl,
|
|
1800
|
-
path:
|
|
1805
|
+
path: PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_COMPAT_PATH,
|
|
1801
1806
|
headers: {
|
|
1802
1807
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
1803
1808
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
@@ -1913,7 +1918,7 @@ async function createChildRuntimeDbSession(input: {
|
|
|
1913
1918
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
1914
1919
|
executorToken: input.childExecutorToken,
|
|
1915
1920
|
baseUrl: input.baseUrl,
|
|
1916
|
-
path:
|
|
1921
|
+
path: PLAY_RUNTIME_API_COMPAT_PATH,
|
|
1917
1922
|
headers: {
|
|
1918
1923
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
1919
1924
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
@@ -2026,7 +2031,7 @@ async function registerChildRunWithRuntime(input: {
|
|
|
2026
2031
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
2027
2032
|
executorToken: input.childExecutorToken,
|
|
2028
2033
|
baseUrl: input.baseUrl,
|
|
2029
|
-
path:
|
|
2034
|
+
path: PLAY_RUNTIME_API_COMPAT_PATH,
|
|
2030
2035
|
headers: {
|
|
2031
2036
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
2032
2037
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
@@ -2076,7 +2081,7 @@ async function markRegisteredChildRunFailed(input: {
|
|
|
2076
2081
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
2077
2082
|
executorToken: input.childExecutorToken,
|
|
2078
2083
|
baseUrl: input.baseUrl,
|
|
2079
|
-
path:
|
|
2084
|
+
path: PLAY_RUNTIME_API_COMPAT_PATH,
|
|
2080
2085
|
headers: {
|
|
2081
2086
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
2082
2087
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
@@ -2133,7 +2138,7 @@ async function appendRegisteredChildRunTerminal(input: {
|
|
|
2133
2138
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
2134
2139
|
executorToken: input.childExecutorToken,
|
|
2135
2140
|
baseUrl: input.baseUrl,
|
|
2136
|
-
path:
|
|
2141
|
+
path: PLAY_RUNTIME_API_COMPAT_PATH,
|
|
2137
2142
|
headers: {
|
|
2138
2143
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
2139
2144
|
[PLAY_RUNTIME_CONTRACT_HEADER]: String(PLAY_RUNTIME_CONTRACT),
|
|
@@ -2195,7 +2200,7 @@ async function callRuntimeApiFromCoordinator(input: {
|
|
|
2195
2200
|
contract: PLAY_RUNTIME_CONTRACT,
|
|
2196
2201
|
executorToken: input.executorToken,
|
|
2197
2202
|
baseUrl: input.baseUrl,
|
|
2198
|
-
path:
|
|
2203
|
+
path: PLAY_RUNTIME_API_COMPAT_PATH,
|
|
2199
2204
|
body,
|
|
2200
2205
|
headers: {
|
|
2201
2206
|
'x-deepline-request-id': crypto.randomUUID(),
|
|
@@ -2376,8 +2381,7 @@ function validateChildSubmitBody(input: {
|
|
|
2376
2381
|
const { parentRunId, body } = input;
|
|
2377
2382
|
const manifest = body.manifest as PlayRuntimeManifest | undefined;
|
|
2378
2383
|
const governance = body.internalRunPlay as
|
|
2379
|
-
|
|
|
2380
|
-
| undefined;
|
|
2384
|
+
PlayCallGovernanceSnapshot | undefined;
|
|
2381
2385
|
const childPlayName =
|
|
2382
2386
|
typeof body.name === 'string' && body.name.trim()
|
|
2383
2387
|
? body.name.trim()
|
|
@@ -4191,7 +4195,7 @@ async function flushTailRunLogs(
|
|
|
4191
4195
|
return;
|
|
4192
4196
|
}
|
|
4193
4197
|
await fetch(
|
|
4194
|
-
`${env.DEEPLINE_API_BASE_URL}
|
|
4198
|
+
`${env.DEEPLINE_API_BASE_URL}${PLAY_RUNTIME_TAIL_LOG_COMPAT_PATH}`,
|
|
4195
4199
|
{
|
|
4196
4200
|
method: 'POST',
|
|
4197
4201
|
headers: {
|
|
@@ -5583,7 +5587,7 @@ export class TenantWorkflow extends WorkflowEntrypoint {
|
|
|
5583
5587
|
const runId = payload && typeof payload.runId === "string" ? payload.runId : "warmup";
|
|
5584
5588
|
const startedAt = Date.now();
|
|
5585
5589
|
if (this.env.RUNTIME_API) {
|
|
5586
|
-
await this.env.RUNTIME_API.fetch(new Request("https://deepline.runtime.internal
|
|
5590
|
+
await this.env.RUNTIME_API.fetch(new Request("https://deepline.runtime.internal${PLAY_RUNTIME_API_COMPAT_PATH}", {
|
|
5587
5591
|
method: "POST",
|
|
5588
5592
|
headers: { "content-type": "application/json" },
|
|
5589
5593
|
body: "{}"
|
|
@@ -173,6 +173,10 @@ import {
|
|
|
173
173
|
PLAY_RUNTIME_CONTRACT,
|
|
174
174
|
PLAY_RUNTIME_CONTRACT_HEADER,
|
|
175
175
|
} from '../../../shared_libs/play-runtime/runtime-contract';
|
|
176
|
+
import {
|
|
177
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
178
|
+
PLAY_RUNTIME_EGRESS_FETCH_COMPAT_PATH,
|
|
179
|
+
} from '../../../shared_libs/play-runtime/runtime-api-paths';
|
|
176
180
|
import { DYNAMIC_PLAY_WORKER_ARTIFACT_VERSION } from '../../../shared_libs/play-runtime/dynamic-worker-version';
|
|
177
181
|
import {
|
|
178
182
|
PLAY_RUNTIME_TEST_FAULT_HEADER,
|
|
@@ -783,7 +787,7 @@ async function fetchRuntimeApi(
|
|
|
783
787
|
? Math.max(1, Math.ceil(options.timeoutMsOverride))
|
|
784
788
|
: path === '/api/v2/plays/run'
|
|
785
789
|
? RUNTIME_API_PLAY_RUN_TIMEOUT_MS
|
|
786
|
-
: path ===
|
|
790
|
+
: path === PLAY_RUNTIME_EGRESS_FETCH_COMPAT_PATH
|
|
787
791
|
? RUNTIME_API_EGRESS_FETCH_TIMEOUT_MS
|
|
788
792
|
: /^\/api\/v2\/integrations\/[^/]+\/execute$/.test(path)
|
|
789
793
|
? RUNTIME_API_INTEGRATION_EXECUTE_TIMEOUT_MS
|
|
@@ -1326,7 +1330,7 @@ async function postRuntimeApi<T>(
|
|
|
1326
1330
|
try {
|
|
1327
1331
|
res = await fetchRuntimeApi(
|
|
1328
1332
|
baseUrl,
|
|
1329
|
-
|
|
1333
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
1330
1334
|
{
|
|
1331
1335
|
method: 'POST',
|
|
1332
1336
|
headers: {
|
|
@@ -2416,8 +2420,7 @@ type WorkerMapBlockedChunkSummary = {
|
|
|
2416
2420
|
};
|
|
2417
2421
|
|
|
2418
2422
|
type WorkerMapChunkSummary<T extends Record<string, unknown>> =
|
|
2419
|
-
|
|
2420
|
-
| WorkerMapBlockedChunkSummary;
|
|
2423
|
+
WorkerMapCompletedChunkSummary<T> | WorkerMapBlockedChunkSummary;
|
|
2421
2424
|
|
|
2422
2425
|
function serializeDurableStepValue<T>(value: T, depth = 0): T {
|
|
2423
2426
|
if (depth > 20 || value == null) return value;
|
|
@@ -2476,9 +2479,7 @@ type WorkerConditionalStepResolver = {
|
|
|
2476
2479
|
type WorkerStepProgramStep = {
|
|
2477
2480
|
name: string;
|
|
2478
2481
|
resolver:
|
|
2479
|
-
|
|
|
2480
|
-
| WorkerConditionalStepResolver
|
|
2481
|
-
| WorkerStepProgram;
|
|
2482
|
+
WorkerStepResolver | WorkerConditionalStepResolver | WorkerStepProgram;
|
|
2482
2483
|
};
|
|
2483
2484
|
|
|
2484
2485
|
type WorkerStepProgram = {
|
|
@@ -2856,7 +2857,7 @@ async function postRuntimeEgressFetch(
|
|
|
2856
2857
|
) {
|
|
2857
2858
|
const response = await fetchRuntimeApi(
|
|
2858
2859
|
req.baseUrl,
|
|
2859
|
-
|
|
2860
|
+
PLAY_RUNTIME_EGRESS_FETCH_COMPAT_PATH,
|
|
2860
2861
|
{
|
|
2861
2862
|
method: 'POST',
|
|
2862
2863
|
headers: {
|
|
@@ -3415,9 +3416,7 @@ function resolveSheetContractFromReq(
|
|
|
3415
3416
|
// `staticPipeline` field is what `resolveSheetContractForTableNamespace`
|
|
3416
3417
|
// expects. Reach in safely.
|
|
3417
3418
|
const snapshot = req.contractSnapshot as
|
|
3418
|
-
|
|
3419
|
-
| undefined
|
|
3420
|
-
| null;
|
|
3419
|
+
{ staticPipeline?: unknown } | undefined | null;
|
|
3421
3420
|
const pipeline = snapshot?.staticPipeline;
|
|
3422
3421
|
if (!pipeline || typeof pipeline !== 'object' || Array.isArray(pipeline)) {
|
|
3423
3422
|
return null;
|
|
@@ -3509,9 +3508,7 @@ async function releaseRuntimeLeasesOnTeardown(input: {
|
|
|
3509
3508
|
|
|
3510
3509
|
function staticPipelineFromReq(req: RunRequest): PlayStaticPipeline | null {
|
|
3511
3510
|
const snapshot = req.contractSnapshot as
|
|
3512
|
-
|
|
3513
|
-
| undefined
|
|
3514
|
-
| null;
|
|
3511
|
+
{ staticPipeline?: unknown } | undefined | null;
|
|
3515
3512
|
const pipeline = snapshot?.staticPipeline;
|
|
3516
3513
|
if (!pipeline || typeof pipeline !== 'object' || Array.isArray(pipeline)) {
|
|
3517
3514
|
return null;
|
|
@@ -4256,7 +4253,7 @@ function createMinimalWorkerCtx(
|
|
|
4256
4253
|
if (!auth) return {};
|
|
4257
4254
|
const response = await fetchRuntimeApi(
|
|
4258
4255
|
req.baseUrl,
|
|
4259
|
-
|
|
4256
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
4260
4257
|
{
|
|
4261
4258
|
method: 'POST',
|
|
4262
4259
|
headers: {
|
|
@@ -6996,8 +6993,7 @@ function createMinimalWorkerCtx(
|
|
|
6996
6993
|
// the small structural shape ChildPlayAwait needs; bridge it the
|
|
6997
6994
|
// same way the inline implementation did.
|
|
6998
6995
|
workflowStep: workflowStep as unknown as
|
|
6999
|
-
|
|
|
7000
|
-
| undefined,
|
|
6996
|
+
WorkflowStepLike | undefined,
|
|
7001
6997
|
workflowId,
|
|
7002
6998
|
playName: resolvedName,
|
|
7003
6999
|
key: normalizedKey,
|
|
@@ -8721,7 +8717,7 @@ export class TenantWorkflow extends WorkflowEntrypoint<
|
|
|
8721
8717
|
try {
|
|
8722
8718
|
const response = await fetchRuntimeApi(
|
|
8723
8719
|
req.baseUrl,
|
|
8724
|
-
|
|
8720
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
8725
8721
|
{
|
|
8726
8722
|
method: 'POST',
|
|
8727
8723
|
headers: {
|
|
@@ -105,10 +105,10 @@ export const SDK_RELEASE = {
|
|
|
105
105
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
106
106
|
// fields shipped in 0.1.153.
|
|
107
107
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
108
|
-
version: '0.1.
|
|
108
|
+
version: '0.1.184',
|
|
109
109
|
apiContract: '2026-06-dataset-handle-results-hard-cutover',
|
|
110
110
|
supportPolicy: {
|
|
111
|
-
latest: '0.1.
|
|
111
|
+
latest: '0.1.184',
|
|
112
112
|
minimumSupported: '0.1.53',
|
|
113
113
|
deprecatedBelow: '0.1.53',
|
|
114
114
|
commandMinimumSupported: [
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
PLAY_RUNTIME_CONTRACT,
|
|
37
37
|
PLAY_RUNTIME_CONTRACT_HEADER,
|
|
38
38
|
} from '@shared_libs/play-runtime/runtime-contract';
|
|
39
|
+
import { PLAY_RUNTIME_API_COMPAT_PATH } from '@shared_libs/play-runtime/runtime-api-paths';
|
|
39
40
|
import { PLAY_RUNTIME_TEST_FAULT_HEADER } from '@shared_libs/play-runtime/test-runtime-seams';
|
|
40
41
|
|
|
41
42
|
export type StoredPlayArtifactPayload = {
|
|
@@ -425,7 +426,7 @@ function sleep(ms: number): Promise<void> {
|
|
|
425
426
|
|
|
426
427
|
function resolveAppRuntimeApiUrl(context: WorkerRuntimeApiContext): string {
|
|
427
428
|
const baseUrl = context.baseUrl.trim().replace(/\/$/, '');
|
|
428
|
-
const url = new URL(`${baseUrl}
|
|
429
|
+
const url = new URL(`${baseUrl}${PLAY_RUNTIME_API_COMPAT_PATH}`);
|
|
429
430
|
const bypassToken = context.vercelProtectionBypassToken?.trim();
|
|
430
431
|
if (bypassToken) {
|
|
431
432
|
url.searchParams.set('x-vercel-set-bypass-cookie', 'true');
|
|
@@ -37,6 +37,10 @@ import {
|
|
|
37
37
|
RUNTIME_SCHEDULER_SCHEMA_OVERRIDE_HEADER,
|
|
38
38
|
SYNTHETIC_RUN_HEADER,
|
|
39
39
|
} from './coordinator-headers';
|
|
40
|
+
import {
|
|
41
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
42
|
+
PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_COMPAT_PATH,
|
|
43
|
+
} from './runtime-api-paths';
|
|
40
44
|
export {
|
|
41
45
|
RuntimeSheetRowsBlockedError,
|
|
42
46
|
type RuntimeSheetBlockedRowDetail,
|
|
@@ -1287,7 +1291,7 @@ export class PlayContextImpl {
|
|
|
1287
1291
|
| null
|
|
1288
1292
|
> {
|
|
1289
1293
|
const response = await fetch(
|
|
1290
|
-
`${this.runtimeApiBaseUrl()}
|
|
1294
|
+
`${this.runtimeApiBaseUrl()}${PLAY_RUNTIME_API_COMPAT_PATH}`,
|
|
1291
1295
|
{
|
|
1292
1296
|
method: 'POST',
|
|
1293
1297
|
headers: this.runtimeApiHeaders(),
|
|
@@ -1402,7 +1406,7 @@ export class PlayContextImpl {
|
|
|
1402
1406
|
this.#options.runId
|
|
1403
1407
|
) {
|
|
1404
1408
|
const response = await fetch(
|
|
1405
|
-
`${this.#options.baseUrl.replace(/\/$/, '')}
|
|
1409
|
+
`${this.#options.baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_API_COMPAT_PATH}`,
|
|
1406
1410
|
{
|
|
1407
1411
|
method: 'POST',
|
|
1408
1412
|
headers: {
|
|
@@ -1455,8 +1459,7 @@ export class PlayContextImpl {
|
|
|
1455
1459
|
artifactTableNamespace: string;
|
|
1456
1460
|
mapNodeId?: string | null;
|
|
1457
1461
|
explicitKey?:
|
|
1458
|
-
|
|
1459
|
-
| null;
|
|
1462
|
+
((row: Record<string, unknown>, index: number) => string) | null;
|
|
1460
1463
|
}): MapExecutionScope {
|
|
1461
1464
|
const mapInvocationId = `${input.logicalNamespace}:${this.mapInvocationIndex}`;
|
|
1462
1465
|
this.mapInvocationIndex += 1;
|
|
@@ -3003,8 +3006,7 @@ export class PlayContextImpl {
|
|
|
3003
3006
|
_key: string,
|
|
3004
3007
|
_items: PlayDatasetInput<T>,
|
|
3005
3008
|
_input?:
|
|
3006
|
-
|
|
3007
|
-
| RuntimeStepProgram,
|
|
3009
|
+
MapFieldDefinition<T, Record<string, unknown>> | RuntimeStepProgram,
|
|
3008
3010
|
_options?: DatasetOptions<T>,
|
|
3009
3011
|
): never {
|
|
3010
3012
|
void _key;
|
|
@@ -3090,8 +3092,7 @@ export class PlayContextImpl {
|
|
|
3090
3092
|
|
|
3091
3093
|
const userKeyOption = options?.key;
|
|
3092
3094
|
let explicitKeyResolver:
|
|
3093
|
-
|
|
3094
|
-
| null = null;
|
|
3095
|
+
((row: Record<string, unknown>, index: number) => string) | null = null;
|
|
3095
3096
|
if (userKeyOption !== undefined) {
|
|
3096
3097
|
explicitKeyResolver = (row, index) => {
|
|
3097
3098
|
const inputRow = stripFieldOutputs(row);
|
|
@@ -5255,7 +5256,7 @@ export class PlayContextImpl {
|
|
|
5255
5256
|
return this.#options.executorToken;
|
|
5256
5257
|
}
|
|
5257
5258
|
const response = await fetch(
|
|
5258
|
-
`${this.#options.baseUrl.replace(/\/$/, '')}
|
|
5259
|
+
`${this.#options.baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_COMPAT_PATH}`,
|
|
5259
5260
|
{
|
|
5260
5261
|
method: 'POST',
|
|
5261
5262
|
headers: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const PLAY_RUNTIME_API_COMPAT_PATH = '/api/v2/plays/internal/runtime';
|
|
2
|
+
export const PLAY_RUNTIME_API_CURRENT_PATH = '/api/v2/internal/play-runtime';
|
|
3
|
+
export const PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_COMPAT_PATH =
|
|
4
|
+
'/api/v2/plays/internal/child-executor-token';
|
|
5
|
+
export const PLAY_RUNTIME_CHILD_EXECUTOR_TOKEN_CURRENT_PATH =
|
|
6
|
+
'/api/v2/internal/play-runtime/child-executor-token';
|
|
7
|
+
export const PLAY_RUNTIME_TAIL_LOG_COMPAT_PATH =
|
|
8
|
+
'/api/v2/plays/internal/tail-log';
|
|
9
|
+
export const PLAY_RUNTIME_TAIL_LOG_CURRENT_PATH =
|
|
10
|
+
'/api/v2/internal/play-runtime/tail-log';
|
|
11
|
+
export const PLAY_RUNTIME_EGRESS_FETCH_COMPAT_PATH =
|
|
12
|
+
'/api/v2/plays/internal/egress-fetch';
|
|
13
|
+
export const PLAY_RUNTIME_EGRESS_FETCH_CURRENT_PATH =
|
|
14
|
+
'/api/v2/internal/play-runtime/egress-fetch';
|
|
15
|
+
|
|
16
|
+
export const PLAY_RUNTIME_HARNESS_ALLOWED_PATH_PREFIXES = [
|
|
17
|
+
PLAY_RUNTIME_API_COMPAT_PATH,
|
|
18
|
+
PLAY_RUNTIME_API_CURRENT_PATH,
|
|
19
|
+
'/api/v2/plays/',
|
|
20
|
+
'/api/v2/integrations/',
|
|
21
|
+
] as const;
|
|
@@ -95,6 +95,7 @@ import {
|
|
|
95
95
|
PLAY_RUNTIME_CONTRACT,
|
|
96
96
|
PLAY_RUNTIME_CONTRACT_HEADER,
|
|
97
97
|
} from './runtime-contract';
|
|
98
|
+
import { PLAY_RUNTIME_API_COMPAT_PATH } from './runtime-api-paths';
|
|
98
99
|
import {
|
|
99
100
|
PLAY_RUNTIME_SHEET_ATTEMPT_LEASE_TTL_MS,
|
|
100
101
|
PLAY_RUNTIME_WORK_RECEIPT_LEASE_TTL_MS,
|
|
@@ -456,7 +457,7 @@ function resolveRuntimeApiUrl(context: RuntimeApiContext): string {
|
|
|
456
457
|
throw new Error('Runner runtime API requires a baseUrl.');
|
|
457
458
|
}
|
|
458
459
|
const url = new URL(
|
|
459
|
-
`${baseUrl.replace(/\/$/, '')}
|
|
460
|
+
`${baseUrl.replace(/\/$/, '')}${PLAY_RUNTIME_API_COMPAT_PATH}`,
|
|
460
461
|
);
|
|
461
462
|
const bypassToken = context.vercelProtectionBypassToken?.trim();
|
|
462
463
|
if (bypassToken) {
|
|
@@ -475,7 +475,9 @@ export function extractDefinedPlayDescriptionForExport(
|
|
|
475
475
|
sourceCode: string,
|
|
476
476
|
exportName: string,
|
|
477
477
|
): string | null {
|
|
478
|
-
return
|
|
478
|
+
return (
|
|
479
|
+
extractDefinedPlayMetadata(sourceCode, exportName)?.description ?? null
|
|
480
|
+
);
|
|
479
481
|
}
|
|
480
482
|
|
|
481
483
|
type AstNode = {
|
|
@@ -548,7 +550,9 @@ function astArray(value: unknown): AstNode[] {
|
|
|
548
550
|
return Array.isArray(value) ? value.filter(isAstNode) : [];
|
|
549
551
|
}
|
|
550
552
|
|
|
551
|
-
function memberExpressionPath(
|
|
553
|
+
function memberExpressionPath(
|
|
554
|
+
node: AstNode | null | undefined,
|
|
555
|
+
): string[] | null {
|
|
552
556
|
const expression = unwrapStaticExpression(node);
|
|
553
557
|
if (!expression) return null;
|
|
554
558
|
if (expression.type === 'Identifier' && typeof expression.name === 'string') {
|
|
@@ -657,7 +661,9 @@ function buildPlayMetadataContext(ast: AstNode): PlayMetadataExtractionContext {
|
|
|
657
661
|
isAstNode(statement.declaration) &&
|
|
658
662
|
statement.declaration.type === 'VariableDeclaration'
|
|
659
663
|
) {
|
|
660
|
-
for (const declaration of astArray(
|
|
664
|
+
for (const declaration of astArray(
|
|
665
|
+
statement.declaration.declarations,
|
|
666
|
+
)) {
|
|
661
667
|
const name = getIdentifierName(declaration.id);
|
|
662
668
|
if (!name) continue;
|
|
663
669
|
const initializer = isAstNode(declaration.init)
|
|
@@ -708,7 +714,9 @@ function buildPlayMetadataContext(ast: AstNode): PlayMetadataExtractionContext {
|
|
|
708
714
|
return { declarations, namedExports, commonJsExports, defaultExport };
|
|
709
715
|
}
|
|
710
716
|
|
|
711
|
-
function unwrapStaticExpression(
|
|
717
|
+
function unwrapStaticExpression(
|
|
718
|
+
node: AstNode | null | undefined,
|
|
719
|
+
): AstNode | null {
|
|
712
720
|
let current = node ?? null;
|
|
713
721
|
while (
|
|
714
722
|
current &&
|
|
@@ -837,9 +845,7 @@ function stringPropertyFromObjectExpression(
|
|
|
837
845
|
|
|
838
846
|
if (property.type !== 'Property') continue;
|
|
839
847
|
if (propertyNameFromKey(property) !== propertyName) continue;
|
|
840
|
-
const propertyValue = property.shorthand
|
|
841
|
-
? property.key
|
|
842
|
-
: property.value;
|
|
848
|
+
const propertyValue = property.shorthand ? property.key : property.value;
|
|
843
849
|
value = staticStringFromExpression(
|
|
844
850
|
isAstNode(propertyValue) ? propertyValue : null,
|
|
845
851
|
context,
|
|
@@ -883,11 +889,16 @@ function playMetadataFromDefinePlayCall(
|
|
|
883
889
|
|
|
884
890
|
const args = astArray(expression.arguments);
|
|
885
891
|
const firstArg = args[0] ?? null;
|
|
886
|
-
const objectName = stringPropertyFromObjectExpression(
|
|
892
|
+
const objectName = stringPropertyFromObjectExpression(
|
|
893
|
+
firstArg,
|
|
894
|
+
'id',
|
|
895
|
+
context,
|
|
896
|
+
);
|
|
887
897
|
const name = objectName ?? staticStringFromExpression(firstArg, context);
|
|
888
898
|
|
|
889
899
|
let description =
|
|
890
|
-
stringPropertyFromObjectExpression(firstArg, 'description', context) ??
|
|
900
|
+
stringPropertyFromObjectExpression(firstArg, 'description', context) ??
|
|
901
|
+
null;
|
|
891
902
|
for (let index = args.length - 1; !description && index >= 2; index -= 1) {
|
|
892
903
|
description = stringPropertyFromObjectExpression(
|
|
893
904
|
args[index],
|
|
@@ -1608,7 +1619,10 @@ async function analyzeSourceGraph(
|
|
|
1608
1619
|
}
|
|
1609
1620
|
visited.add(absolutePath);
|
|
1610
1621
|
|
|
1611
|
-
const sourceCode = await readFile(
|
|
1622
|
+
const sourceCode = await readFile(
|
|
1623
|
+
/* turbopackIgnore: true */ absolutePath,
|
|
1624
|
+
'utf-8',
|
|
1625
|
+
);
|
|
1612
1626
|
localFiles.set(absolutePath, sourceCode);
|
|
1613
1627
|
|
|
1614
1628
|
if (extname(absolutePath).toLowerCase() === '.json') {
|
|
@@ -1645,7 +1659,10 @@ async function analyzeSourceGraph(
|
|
|
1645
1659
|
column,
|
|
1646
1660
|
});
|
|
1647
1661
|
if (resolved !== absoluteEntryFile && isPlaySourceFile(resolved)) {
|
|
1648
|
-
const importedSource = await readFile(
|
|
1662
|
+
const importedSource = await readFile(
|
|
1663
|
+
/* turbopackIgnore: true */ resolved,
|
|
1664
|
+
'utf-8',
|
|
1665
|
+
);
|
|
1649
1666
|
const importedPlayName = extractDefinedPlayName(importedSource);
|
|
1650
1667
|
if (!importedPlayName) {
|
|
1651
1668
|
throw new Error(
|
|
@@ -1022,8 +1022,13 @@ export function compileSheetContract(pipeline: PlayStaticPipeline): {
|
|
|
1022
1022
|
contract: PlaySheetContract | null;
|
|
1023
1023
|
errors: string[];
|
|
1024
1024
|
} {
|
|
1025
|
-
const errors =
|
|
1026
|
-
|
|
1025
|
+
const errors = Array.isArray(pipeline.sheetContractErrors)
|
|
1026
|
+
? [...pipeline.sheetContractErrors]
|
|
1027
|
+
: [];
|
|
1028
|
+
const tableNamespace =
|
|
1029
|
+
typeof pipeline.tableNamespace === 'string'
|
|
1030
|
+
? pipeline.tableNamespace.trim()
|
|
1031
|
+
: '';
|
|
1027
1032
|
if (!tableNamespace) {
|
|
1028
1033
|
return {
|
|
1029
1034
|
contract: null,
|
|
@@ -1032,6 +1037,34 @@ export function compileSheetContract(pipeline: PlayStaticPipeline): {
|
|
|
1032
1037
|
}
|
|
1033
1038
|
|
|
1034
1039
|
const columns: PlaySheetColumnContract[] = [];
|
|
1040
|
+
const inputFields = Array.isArray(pipeline.inputFields)
|
|
1041
|
+
? pipeline.inputFields.filter((field): field is string => {
|
|
1042
|
+
if (typeof field === 'string') return true;
|
|
1043
|
+
errors.push('Sheet contract ignored a non-string input field.');
|
|
1044
|
+
return false;
|
|
1045
|
+
})
|
|
1046
|
+
: [];
|
|
1047
|
+
const rowKeyFields = Array.isArray(pipeline.rowKeyFields)
|
|
1048
|
+
? pipeline.rowKeyFields.filter((field): field is string => {
|
|
1049
|
+
if (typeof field === 'string') return true;
|
|
1050
|
+
errors.push('Sheet contract ignored a non-string row key field.');
|
|
1051
|
+
return false;
|
|
1052
|
+
})
|
|
1053
|
+
: [];
|
|
1054
|
+
const fields = Array.isArray(pipeline.fields)
|
|
1055
|
+
? pipeline.fields.filter((field): field is string => {
|
|
1056
|
+
if (typeof field === 'string') return true;
|
|
1057
|
+
errors.push('Sheet contract ignored a non-string output field.');
|
|
1058
|
+
return false;
|
|
1059
|
+
})
|
|
1060
|
+
: [];
|
|
1061
|
+
const substeps = Array.isArray(pipeline.substeps) ? pipeline.substeps : [];
|
|
1062
|
+
if (!Array.isArray(pipeline.fields)) {
|
|
1063
|
+
errors.push('Sheet contract could not read static output fields.');
|
|
1064
|
+
}
|
|
1065
|
+
if (!Array.isArray(pipeline.substeps)) {
|
|
1066
|
+
errors.push('Sheet contract could not read static substeps.');
|
|
1067
|
+
}
|
|
1035
1068
|
|
|
1036
1069
|
const addColumn = (column: Omit<PlaySheetColumnContract, 'sqlName'>) => {
|
|
1037
1070
|
if (!column.id.trim()) {
|
|
@@ -1052,8 +1085,7 @@ export function compileSheetContract(pipeline: PlayStaticPipeline): {
|
|
|
1052
1085
|
});
|
|
1053
1086
|
};
|
|
1054
1087
|
|
|
1055
|
-
const
|
|
1056
|
-
const rowKeyFieldSet = new Set(pipeline.rowKeyFields ?? []);
|
|
1088
|
+
const rowKeyFieldSet = new Set(rowKeyFields);
|
|
1057
1089
|
for (const inputField of inputFields) {
|
|
1058
1090
|
addColumn({
|
|
1059
1091
|
id: inputField,
|
|
@@ -1063,7 +1095,7 @@ export function compileSheetContract(pipeline: PlayStaticPipeline): {
|
|
|
1063
1095
|
});
|
|
1064
1096
|
}
|
|
1065
1097
|
|
|
1066
|
-
for (const field of
|
|
1098
|
+
for (const field of fields) {
|
|
1067
1099
|
addColumn({ id: field, source: 'datasetColumn', field });
|
|
1068
1100
|
}
|
|
1069
1101
|
|
|
@@ -1186,7 +1218,7 @@ export function compileSheetContract(pipeline: PlayStaticPipeline): {
|
|
|
1186
1218
|
}
|
|
1187
1219
|
};
|
|
1188
1220
|
|
|
1189
|
-
for (const substep of
|
|
1221
|
+
for (const substep of substeps) {
|
|
1190
1222
|
processSubstep(substep);
|
|
1191
1223
|
}
|
|
1192
1224
|
|
package/dist/cli/index.js
CHANGED
|
@@ -623,10 +623,10 @@ var SDK_RELEASE = {
|
|
|
623
623
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
624
624
|
// fields shipped in 0.1.153.
|
|
625
625
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
626
|
-
version: "0.1.
|
|
626
|
+
version: "0.1.184",
|
|
627
627
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
628
628
|
supportPolicy: {
|
|
629
|
-
latest: "0.1.
|
|
629
|
+
latest: "0.1.184",
|
|
630
630
|
minimumSupported: "0.1.53",
|
|
631
631
|
deprecatedBelow: "0.1.53",
|
|
632
632
|
commandMinimumSupported: [
|
package/dist/cli/index.mjs
CHANGED
|
@@ -608,10 +608,10 @@ var SDK_RELEASE = {
|
|
|
608
608
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
609
609
|
// fields shipped in 0.1.153.
|
|
610
610
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
611
|
-
version: "0.1.
|
|
611
|
+
version: "0.1.184",
|
|
612
612
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
613
613
|
supportPolicy: {
|
|
614
|
-
latest: "0.1.
|
|
614
|
+
latest: "0.1.184",
|
|
615
615
|
minimumSupported: "0.1.53",
|
|
616
616
|
deprecatedBelow: "0.1.53",
|
|
617
617
|
commandMinimumSupported: [
|
package/dist/index.js
CHANGED
|
@@ -422,10 +422,10 @@ var SDK_RELEASE = {
|
|
|
422
422
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
423
423
|
// fields shipped in 0.1.153.
|
|
424
424
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
425
|
-
version: "0.1.
|
|
425
|
+
version: "0.1.184",
|
|
426
426
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
427
427
|
supportPolicy: {
|
|
428
|
-
latest: "0.1.
|
|
428
|
+
latest: "0.1.184",
|
|
429
429
|
minimumSupported: "0.1.53",
|
|
430
430
|
deprecatedBelow: "0.1.53",
|
|
431
431
|
commandMinimumSupported: [
|
package/dist/index.mjs
CHANGED
|
@@ -352,10 +352,10 @@ var SDK_RELEASE = {
|
|
|
352
352
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
353
353
|
// fields shipped in 0.1.153.
|
|
354
354
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
355
|
-
version: "0.1.
|
|
355
|
+
version: "0.1.184",
|
|
356
356
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
357
357
|
supportPolicy: {
|
|
358
|
-
latest: "0.1.
|
|
358
|
+
latest: "0.1.184",
|
|
359
359
|
minimumSupported: "0.1.53",
|
|
360
360
|
deprecatedBelow: "0.1.53",
|
|
361
361
|
commandMinimumSupported: [
|
|
@@ -514,7 +514,9 @@ function buildPlayMetadataContext(ast) {
|
|
|
514
514
|
}
|
|
515
515
|
if (statement.type === "ExportNamedDeclaration") {
|
|
516
516
|
if (isAstNode(statement.declaration) && statement.declaration.type === "VariableDeclaration") {
|
|
517
|
-
for (const declaration of astArray(
|
|
517
|
+
for (const declaration of astArray(
|
|
518
|
+
statement.declaration.declarations
|
|
519
|
+
)) {
|
|
518
520
|
const name = getIdentifierName(declaration.id);
|
|
519
521
|
if (!name) continue;
|
|
520
522
|
const initializer = isAstNode(declaration.init) ? declaration.init : null;
|
|
@@ -665,7 +667,11 @@ function playMetadataFromDefinePlayCall(node, context) {
|
|
|
665
667
|
}
|
|
666
668
|
const args = astArray(expression.arguments);
|
|
667
669
|
const firstArg = args[0] ?? null;
|
|
668
|
-
const objectName = stringPropertyFromObjectExpression(
|
|
670
|
+
const objectName = stringPropertyFromObjectExpression(
|
|
671
|
+
firstArg,
|
|
672
|
+
"id",
|
|
673
|
+
context
|
|
674
|
+
);
|
|
669
675
|
const name = objectName ?? staticStringFromExpression(firstArg, context);
|
|
670
676
|
let description = stringPropertyFromObjectExpression(firstArg, "description", context) ?? null;
|
|
671
677
|
for (let index = args.length - 1; !description && index >= 2; index -= 1) {
|
|
@@ -1158,7 +1164,11 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
1158
1164
|
return;
|
|
1159
1165
|
}
|
|
1160
1166
|
visited.add(absolutePath);
|
|
1161
|
-
const sourceCode2 = await readFile(
|
|
1167
|
+
const sourceCode2 = await readFile(
|
|
1168
|
+
/* turbopackIgnore: true */
|
|
1169
|
+
absolutePath,
|
|
1170
|
+
"utf-8"
|
|
1171
|
+
);
|
|
1162
1172
|
localFiles.set(absolutePath, sourceCode2);
|
|
1163
1173
|
if (extname(absolutePath).toLowerCase() === ".json") {
|
|
1164
1174
|
return;
|
|
@@ -1186,7 +1196,11 @@ async function analyzeSourceGraph(entryFile, adapter, exportName) {
|
|
|
1186
1196
|
column
|
|
1187
1197
|
});
|
|
1188
1198
|
if (resolved !== absoluteEntryFile && isPlaySourceFile(resolved)) {
|
|
1189
|
-
const importedSource = await readFile(
|
|
1199
|
+
const importedSource = await readFile(
|
|
1200
|
+
/* turbopackIgnore: true */
|
|
1201
|
+
resolved,
|
|
1202
|
+
"utf-8"
|
|
1203
|
+
);
|
|
1190
1204
|
const importedPlayName = extractDefinedPlayName(importedSource);
|
|
1191
1205
|
if (!importedPlayName) {
|
|
1192
1206
|
throw new Error(
|