deepline 0.1.172 → 0.1.174
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 +12 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/map-chunk-plan.ts +7 -5
- package/dist/bundling-sources/sdk/src/client.ts +31 -2
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/cli/index.js +20 -4
- package/dist/cli/index.mjs +20 -4
- package/dist/index.js +20 -4
- package/dist/index.mjs +20 -4
- package/package.json +1 -1
|
@@ -3435,6 +3435,18 @@ async function coordinatorRouteFetch(
|
|
|
3435
3435
|
}
|
|
3436
3436
|
return new Response('ok', { status: 200, headers });
|
|
3437
3437
|
}
|
|
3438
|
+
if (url.pathname === '/internal-token/probe') {
|
|
3439
|
+
const authError = authorizeCoordinatorControlRequest({ request, env });
|
|
3440
|
+
if (authError) return authError;
|
|
3441
|
+
return Response.json({
|
|
3442
|
+
ok: true,
|
|
3443
|
+
deployMarker: env.DEEPLINE_COORDINATOR_DEPLOY_MARKER ?? null,
|
|
3444
|
+
runtimeDeployVersion:
|
|
3445
|
+
env.CF_VERSION_METADATA?.id ??
|
|
3446
|
+
env.DEEPLINE_COORDINATOR_DEPLOY_MARKER ??
|
|
3447
|
+
null,
|
|
3448
|
+
});
|
|
3449
|
+
}
|
|
3438
3450
|
if (url.pathname === '/warmup/submit') {
|
|
3439
3451
|
const authError = authorizeCoordinatorControlRequest({ request, env });
|
|
3440
3452
|
if (authError) return authError;
|
|
@@ -16,11 +16,13 @@ export const CACHE_ENABLED_SIMPLE_MAP_CHUNK_SIZE = 10_000;
|
|
|
16
16
|
export { TOOL_CALLING_MAP_CHUNK_SIZE };
|
|
17
17
|
// Paid Cloudflare Workers support a much higher configured subrequest limit.
|
|
18
18
|
// Keep a large buffer for coordinator/storage calls around row-level unbatched
|
|
19
|
-
// tool RPCs
|
|
19
|
+
// tool RPCs. Very dense waterfalls may still need one-row chunks to stay under
|
|
20
|
+
// the per-invocation subrequest budget.
|
|
20
21
|
export const UNBATCHED_TOOL_SUBREQUESTS_PER_CHUNK_BUDGET = 200;
|
|
21
|
-
// Fresh unbatched tool calls use
|
|
22
|
-
//
|
|
23
|
-
|
|
22
|
+
// Fresh unbatched tool calls use runtime API, receipt, and coordinator/rate
|
|
23
|
+
// callbacks on the Worker no-batch path. Batch-cap rows by the shared
|
|
24
|
+
// per-call budget rather than a synthetic-tool special case.
|
|
25
|
+
export const SUBREQUESTS_PER_UNBATCHED_TOOL_CALL = 5;
|
|
24
26
|
export type WorkerMapChunkPlanInput = {
|
|
25
27
|
mapName: string;
|
|
26
28
|
rowCountHint: number | null;
|
|
@@ -71,7 +73,7 @@ function declarationBelongsToMapOutput(
|
|
|
71
73
|
|
|
72
74
|
function countTool(toolId: string): MapToolStats {
|
|
73
75
|
if (getPlayRuntimeBatchStrategy(toolId) !== null) return [1, 0];
|
|
74
|
-
return [1,
|
|
76
|
+
return [1, SUBREQUESTS_PER_UNBATCHED_TOOL_CALL];
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
function addStats(
|
|
@@ -127,6 +127,26 @@ function isTransientCompileManifestError(error: unknown): boolean {
|
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
function requireCompileManifestResponse(
|
|
131
|
+
response: { compilerManifest?: PlayCompilerManifest } | null | undefined,
|
|
132
|
+
playName: string,
|
|
133
|
+
): PlayCompilerManifest {
|
|
134
|
+
const compilerManifest = response?.compilerManifest;
|
|
135
|
+
if (
|
|
136
|
+
!compilerManifest ||
|
|
137
|
+
typeof compilerManifest !== 'object' ||
|
|
138
|
+
Array.isArray(compilerManifest)
|
|
139
|
+
) {
|
|
140
|
+
throw new DeeplineError(
|
|
141
|
+
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
142
|
+
502,
|
|
143
|
+
'API_RESPONSE_INVALID',
|
|
144
|
+
{ response: response ?? null },
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
return compilerManifest;
|
|
148
|
+
}
|
|
149
|
+
|
|
130
150
|
async function mapWithConcurrency<T, U>(
|
|
131
151
|
items: T[],
|
|
132
152
|
concurrency: number,
|
|
@@ -572,7 +592,16 @@ function normalizePlayRunStart(raw: Record<string, unknown>): PlayRunStart {
|
|
|
572
592
|
? raw.package
|
|
573
593
|
: null;
|
|
574
594
|
if (!runPackage) {
|
|
575
|
-
|
|
595
|
+
const workflowId =
|
|
596
|
+
typeof raw.workflowId === 'string' && raw.workflowId
|
|
597
|
+
? raw.workflowId
|
|
598
|
+
: typeof raw.runId === 'string'
|
|
599
|
+
? raw.runId
|
|
600
|
+
: '';
|
|
601
|
+
return {
|
|
602
|
+
...(raw as unknown as Omit<PlayRunStart, 'workflowId'>),
|
|
603
|
+
workflowId,
|
|
604
|
+
};
|
|
576
605
|
}
|
|
577
606
|
const status =
|
|
578
607
|
typeof runPackage.run.status === 'string'
|
|
@@ -1535,7 +1564,7 @@ export class DeeplineClient {
|
|
|
1535
1564
|
const response = await this.http.post<{
|
|
1536
1565
|
compilerManifest: PlayCompilerManifest;
|
|
1537
1566
|
}>('/api/v2/plays/compile-manifest', input);
|
|
1538
|
-
return response.
|
|
1567
|
+
return requireCompileManifestResponse(response, input.name);
|
|
1539
1568
|
} catch (error) {
|
|
1540
1569
|
const delayMs = retryDelays[attempt];
|
|
1541
1570
|
if (delayMs === undefined || !isTransientCompileManifestError(error)) {
|
|
@@ -104,10 +104,10 @@ export const SDK_RELEASE = {
|
|
|
104
104
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
105
105
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
106
106
|
// fields shipped in 0.1.153.
|
|
107
|
-
version: '0.1.
|
|
107
|
+
version: '0.1.174',
|
|
108
108
|
apiContract: '2026-06-dataset-handle-results-hard-cutover',
|
|
109
109
|
supportPolicy: {
|
|
110
|
-
latest: '0.1.
|
|
110
|
+
latest: '0.1.174',
|
|
111
111
|
minimumSupported: '0.1.53',
|
|
112
112
|
deprecatedBelow: '0.1.53',
|
|
113
113
|
commandMinimumSupported: [
|
package/dist/cli/index.js
CHANGED
|
@@ -622,10 +622,10 @@ var SDK_RELEASE = {
|
|
|
622
622
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
623
623
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
624
624
|
// fields shipped in 0.1.153.
|
|
625
|
-
version: "0.1.
|
|
625
|
+
version: "0.1.174",
|
|
626
626
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
627
627
|
supportPolicy: {
|
|
628
|
-
latest: "0.1.
|
|
628
|
+
latest: "0.1.174",
|
|
629
629
|
minimumSupported: "0.1.53",
|
|
630
630
|
deprecatedBelow: "0.1.53",
|
|
631
631
|
commandMinimumSupported: [
|
|
@@ -2134,6 +2134,18 @@ function isTransientCompileManifestError(error) {
|
|
|
2134
2134
|
message
|
|
2135
2135
|
);
|
|
2136
2136
|
}
|
|
2137
|
+
function requireCompileManifestResponse(response, playName) {
|
|
2138
|
+
const compilerManifest = response?.compilerManifest;
|
|
2139
|
+
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
2140
|
+
throw new DeeplineError(
|
|
2141
|
+
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
2142
|
+
502,
|
|
2143
|
+
"API_RESPONSE_INVALID",
|
|
2144
|
+
{ response: response ?? null }
|
|
2145
|
+
);
|
|
2146
|
+
}
|
|
2147
|
+
return compilerManifest;
|
|
2148
|
+
}
|
|
2137
2149
|
async function mapWithConcurrency(items, concurrency, mapper) {
|
|
2138
2150
|
const results = new Array(items.length);
|
|
2139
2151
|
let nextIndex = 0;
|
|
@@ -2212,7 +2224,11 @@ function normalizePlayStatus(raw) {
|
|
|
2212
2224
|
function normalizePlayRunStart(raw) {
|
|
2213
2225
|
const runPackage = isPlayRunPackage(raw) ? raw : isPlayRunPackage(raw.package) ? raw.package : null;
|
|
2214
2226
|
if (!runPackage) {
|
|
2215
|
-
|
|
2227
|
+
const workflowId = typeof raw.workflowId === "string" && raw.workflowId ? raw.workflowId : typeof raw.runId === "string" ? raw.runId : "";
|
|
2228
|
+
return {
|
|
2229
|
+
...raw,
|
|
2230
|
+
workflowId
|
|
2231
|
+
};
|
|
2216
2232
|
}
|
|
2217
2233
|
const status = typeof runPackage.run.status === "string" ? runPackage.run.status : "running";
|
|
2218
2234
|
return {
|
|
@@ -2832,7 +2848,7 @@ var DeeplineClient = class {
|
|
|
2832
2848
|
for (let attempt = 0; ; attempt += 1) {
|
|
2833
2849
|
try {
|
|
2834
2850
|
const response = await this.http.post("/api/v2/plays/compile-manifest", input2);
|
|
2835
|
-
return response.
|
|
2851
|
+
return requireCompileManifestResponse(response, input2.name);
|
|
2836
2852
|
} catch (error) {
|
|
2837
2853
|
const delayMs = retryDelays[attempt];
|
|
2838
2854
|
if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
|
package/dist/cli/index.mjs
CHANGED
|
@@ -607,10 +607,10 @@ var SDK_RELEASE = {
|
|
|
607
607
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
608
608
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
609
609
|
// fields shipped in 0.1.153.
|
|
610
|
-
version: "0.1.
|
|
610
|
+
version: "0.1.174",
|
|
611
611
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
612
612
|
supportPolicy: {
|
|
613
|
-
latest: "0.1.
|
|
613
|
+
latest: "0.1.174",
|
|
614
614
|
minimumSupported: "0.1.53",
|
|
615
615
|
deprecatedBelow: "0.1.53",
|
|
616
616
|
commandMinimumSupported: [
|
|
@@ -2119,6 +2119,18 @@ function isTransientCompileManifestError(error) {
|
|
|
2119
2119
|
message
|
|
2120
2120
|
);
|
|
2121
2121
|
}
|
|
2122
|
+
function requireCompileManifestResponse(response, playName) {
|
|
2123
|
+
const compilerManifest = response?.compilerManifest;
|
|
2124
|
+
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
2125
|
+
throw new DeeplineError(
|
|
2126
|
+
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
2127
|
+
502,
|
|
2128
|
+
"API_RESPONSE_INVALID",
|
|
2129
|
+
{ response: response ?? null }
|
|
2130
|
+
);
|
|
2131
|
+
}
|
|
2132
|
+
return compilerManifest;
|
|
2133
|
+
}
|
|
2122
2134
|
async function mapWithConcurrency(items, concurrency, mapper) {
|
|
2123
2135
|
const results = new Array(items.length);
|
|
2124
2136
|
let nextIndex = 0;
|
|
@@ -2197,7 +2209,11 @@ function normalizePlayStatus(raw) {
|
|
|
2197
2209
|
function normalizePlayRunStart(raw) {
|
|
2198
2210
|
const runPackage = isPlayRunPackage(raw) ? raw : isPlayRunPackage(raw.package) ? raw.package : null;
|
|
2199
2211
|
if (!runPackage) {
|
|
2200
|
-
|
|
2212
|
+
const workflowId = typeof raw.workflowId === "string" && raw.workflowId ? raw.workflowId : typeof raw.runId === "string" ? raw.runId : "";
|
|
2213
|
+
return {
|
|
2214
|
+
...raw,
|
|
2215
|
+
workflowId
|
|
2216
|
+
};
|
|
2201
2217
|
}
|
|
2202
2218
|
const status = typeof runPackage.run.status === "string" ? runPackage.run.status : "running";
|
|
2203
2219
|
return {
|
|
@@ -2817,7 +2833,7 @@ var DeeplineClient = class {
|
|
|
2817
2833
|
for (let attempt = 0; ; attempt += 1) {
|
|
2818
2834
|
try {
|
|
2819
2835
|
const response = await this.http.post("/api/v2/plays/compile-manifest", input2);
|
|
2820
|
-
return response.
|
|
2836
|
+
return requireCompileManifestResponse(response, input2.name);
|
|
2821
2837
|
} catch (error) {
|
|
2822
2838
|
const delayMs = retryDelays[attempt];
|
|
2823
2839
|
if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
|
package/dist/index.js
CHANGED
|
@@ -421,10 +421,10 @@ var SDK_RELEASE = {
|
|
|
421
421
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
422
422
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
423
423
|
// fields shipped in 0.1.153.
|
|
424
|
-
version: "0.1.
|
|
424
|
+
version: "0.1.174",
|
|
425
425
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
426
426
|
supportPolicy: {
|
|
427
|
-
latest: "0.1.
|
|
427
|
+
latest: "0.1.174",
|
|
428
428
|
minimumSupported: "0.1.53",
|
|
429
429
|
deprecatedBelow: "0.1.53",
|
|
430
430
|
commandMinimumSupported: [
|
|
@@ -1933,6 +1933,18 @@ function isTransientCompileManifestError(error) {
|
|
|
1933
1933
|
message
|
|
1934
1934
|
);
|
|
1935
1935
|
}
|
|
1936
|
+
function requireCompileManifestResponse(response, playName) {
|
|
1937
|
+
const compilerManifest = response?.compilerManifest;
|
|
1938
|
+
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
1939
|
+
throw new DeeplineError(
|
|
1940
|
+
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
1941
|
+
502,
|
|
1942
|
+
"API_RESPONSE_INVALID",
|
|
1943
|
+
{ response: response ?? null }
|
|
1944
|
+
);
|
|
1945
|
+
}
|
|
1946
|
+
return compilerManifest;
|
|
1947
|
+
}
|
|
1936
1948
|
async function mapWithConcurrency(items, concurrency, mapper) {
|
|
1937
1949
|
const results = new Array(items.length);
|
|
1938
1950
|
let nextIndex = 0;
|
|
@@ -2011,7 +2023,11 @@ function normalizePlayStatus(raw) {
|
|
|
2011
2023
|
function normalizePlayRunStart(raw) {
|
|
2012
2024
|
const runPackage = isPlayRunPackage(raw) ? raw : isPlayRunPackage(raw.package) ? raw.package : null;
|
|
2013
2025
|
if (!runPackage) {
|
|
2014
|
-
|
|
2026
|
+
const workflowId = typeof raw.workflowId === "string" && raw.workflowId ? raw.workflowId : typeof raw.runId === "string" ? raw.runId : "";
|
|
2027
|
+
return {
|
|
2028
|
+
...raw,
|
|
2029
|
+
workflowId
|
|
2030
|
+
};
|
|
2015
2031
|
}
|
|
2016
2032
|
const status = typeof runPackage.run.status === "string" ? runPackage.run.status : "running";
|
|
2017
2033
|
return {
|
|
@@ -2631,7 +2647,7 @@ var DeeplineClient = class {
|
|
|
2631
2647
|
for (let attempt = 0; ; attempt += 1) {
|
|
2632
2648
|
try {
|
|
2633
2649
|
const response = await this.http.post("/api/v2/plays/compile-manifest", input);
|
|
2634
|
-
return response.
|
|
2650
|
+
return requireCompileManifestResponse(response, input.name);
|
|
2635
2651
|
} catch (error) {
|
|
2636
2652
|
const delayMs = retryDelays[attempt];
|
|
2637
2653
|
if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
|
package/dist/index.mjs
CHANGED
|
@@ -351,10 +351,10 @@ var SDK_RELEASE = {
|
|
|
351
351
|
// 0.1.111 ships dataset-native tool list getters and result row datasets.
|
|
352
352
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
353
353
|
// fields shipped in 0.1.153.
|
|
354
|
-
version: "0.1.
|
|
354
|
+
version: "0.1.174",
|
|
355
355
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
356
356
|
supportPolicy: {
|
|
357
|
-
latest: "0.1.
|
|
357
|
+
latest: "0.1.174",
|
|
358
358
|
minimumSupported: "0.1.53",
|
|
359
359
|
deprecatedBelow: "0.1.53",
|
|
360
360
|
commandMinimumSupported: [
|
|
@@ -1863,6 +1863,18 @@ function isTransientCompileManifestError(error) {
|
|
|
1863
1863
|
message
|
|
1864
1864
|
);
|
|
1865
1865
|
}
|
|
1866
|
+
function requireCompileManifestResponse(response, playName) {
|
|
1867
|
+
const compilerManifest = response?.compilerManifest;
|
|
1868
|
+
if (!compilerManifest || typeof compilerManifest !== "object" || Array.isArray(compilerManifest)) {
|
|
1869
|
+
throw new DeeplineError(
|
|
1870
|
+
`Compile manifest response did not include compilerManifest for ${playName}.`,
|
|
1871
|
+
502,
|
|
1872
|
+
"API_RESPONSE_INVALID",
|
|
1873
|
+
{ response: response ?? null }
|
|
1874
|
+
);
|
|
1875
|
+
}
|
|
1876
|
+
return compilerManifest;
|
|
1877
|
+
}
|
|
1866
1878
|
async function mapWithConcurrency(items, concurrency, mapper) {
|
|
1867
1879
|
const results = new Array(items.length);
|
|
1868
1880
|
let nextIndex = 0;
|
|
@@ -1941,7 +1953,11 @@ function normalizePlayStatus(raw) {
|
|
|
1941
1953
|
function normalizePlayRunStart(raw) {
|
|
1942
1954
|
const runPackage = isPlayRunPackage(raw) ? raw : isPlayRunPackage(raw.package) ? raw.package : null;
|
|
1943
1955
|
if (!runPackage) {
|
|
1944
|
-
|
|
1956
|
+
const workflowId = typeof raw.workflowId === "string" && raw.workflowId ? raw.workflowId : typeof raw.runId === "string" ? raw.runId : "";
|
|
1957
|
+
return {
|
|
1958
|
+
...raw,
|
|
1959
|
+
workflowId
|
|
1960
|
+
};
|
|
1945
1961
|
}
|
|
1946
1962
|
const status = typeof runPackage.run.status === "string" ? runPackage.run.status : "running";
|
|
1947
1963
|
return {
|
|
@@ -2561,7 +2577,7 @@ var DeeplineClient = class {
|
|
|
2561
2577
|
for (let attempt = 0; ; attempt += 1) {
|
|
2562
2578
|
try {
|
|
2563
2579
|
const response = await this.http.post("/api/v2/plays/compile-manifest", input);
|
|
2564
|
-
return response.
|
|
2580
|
+
return requireCompileManifestResponse(response, input.name);
|
|
2565
2581
|
} catch (error) {
|
|
2566
2582
|
const delayMs = retryDelays[attempt];
|
|
2567
2583
|
if (delayMs === void 0 || !isTransientCompileManifestError(error)) {
|