deepline 0.1.80 → 0.1.81
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/README.md +2 -1
- package/dist/cli/index.js +10 -13
- package/dist/cli/index.mjs +10 -13
- package/dist/index.js +8 -8
- package/dist/index.mjs +8 -8
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +1 -1
- package/dist/repo/apps/play-runner-workers/src/entry.ts +258 -250
- package/dist/repo/apps/play-runner-workers/src/runtime/tool-http-errors.ts +43 -1
- package/dist/repo/sdk/src/client.ts +6 -6
- package/dist/repo/sdk/src/release.ts +2 -2
- package/dist/repo/shared_libs/play-runtime/governor/coordinator-rate-state-backend.ts +10 -10
- package/package.json +1 -1
- package/dist/repo/shared_libs/play-runtime/tool-batch-executor.ts +0 -149
package/README.md
CHANGED
|
@@ -113,7 +113,8 @@ surfaces we exercise in CI:
|
|
|
113
113
|
- `ctx.runPlay(name, input)`
|
|
114
114
|
4. Raw HTTP API
|
|
115
115
|
- `POST /api/v2/plays/run`
|
|
116
|
-
- `GET /api/v2/
|
|
116
|
+
- `GET /api/v2/runs/:runId`
|
|
117
|
+
- `GET /api/v2/runs/:runId/tail`
|
|
117
118
|
5. In-play composition
|
|
118
119
|
- `ctx.runPlay(...)`
|
|
119
120
|
|
package/dist/cli/index.js
CHANGED
|
@@ -229,10 +229,10 @@ var import_node_path2 = require("path");
|
|
|
229
229
|
|
|
230
230
|
// src/release.ts
|
|
231
231
|
var SDK_RELEASE = {
|
|
232
|
-
version: "0.1.
|
|
232
|
+
version: "0.1.81",
|
|
233
233
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
234
234
|
supportPolicy: {
|
|
235
|
-
latest: "0.1.
|
|
235
|
+
latest: "0.1.81",
|
|
236
236
|
minimumSupported: "0.1.53",
|
|
237
237
|
deprecatedBelow: "0.1.53"
|
|
238
238
|
}
|
|
@@ -1309,7 +1309,7 @@ var DeeplineClient = class {
|
|
|
1309
1309
|
}
|
|
1310
1310
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
1311
1311
|
const response = await this.http.get(
|
|
1312
|
-
`/api/v2/
|
|
1312
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
|
|
1313
1313
|
);
|
|
1314
1314
|
return normalizePlayStatus(response);
|
|
1315
1315
|
}
|
|
@@ -1321,10 +1321,10 @@ var DeeplineClient = class {
|
|
|
1321
1321
|
*/
|
|
1322
1322
|
async *streamPlayRunEvents(workflowId, options) {
|
|
1323
1323
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
1324
|
-
const params = new URLSearchParams(
|
|
1324
|
+
const params = new URLSearchParams();
|
|
1325
1325
|
params.set("mode", options?.mode ?? "cli");
|
|
1326
1326
|
for await (const event of this.http.streamSse(
|
|
1327
|
-
`/api/v2/
|
|
1327
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
1328
1328
|
{ signal: options?.signal, headers }
|
|
1329
1329
|
)) {
|
|
1330
1330
|
if (event.scope === "play") {
|
|
@@ -1346,7 +1346,7 @@ var DeeplineClient = class {
|
|
|
1346
1346
|
*/
|
|
1347
1347
|
async cancelPlay(workflowId) {
|
|
1348
1348
|
await this.http.request(
|
|
1349
|
-
`/api/v2/
|
|
1349
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1350
1350
|
{ method: "POST" }
|
|
1351
1351
|
);
|
|
1352
1352
|
}
|
|
@@ -1358,7 +1358,7 @@ var DeeplineClient = class {
|
|
|
1358
1358
|
*/
|
|
1359
1359
|
async stopPlay(workflowId, options) {
|
|
1360
1360
|
return this.http.post(
|
|
1361
|
-
`/api/v2/
|
|
1361
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1362
1362
|
options?.reason ? { reason: options.reason } : {}
|
|
1363
1363
|
);
|
|
1364
1364
|
}
|
|
@@ -1478,7 +1478,7 @@ var DeeplineClient = class {
|
|
|
1478
1478
|
* ```
|
|
1479
1479
|
*/
|
|
1480
1480
|
async getRunLogs(runId, options) {
|
|
1481
|
-
const status = await this.getRunStatus(runId);
|
|
1481
|
+
const status = await this.getRunStatus(runId, { full: true });
|
|
1482
1482
|
const logs = status.progress?.logs ?? [];
|
|
1483
1483
|
const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
|
|
1484
1484
|
const entries = logs.slice(Math.max(0, logs.length - limit));
|
|
@@ -8486,7 +8486,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
8486
8486
|
return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
|
|
8487
8487
|
}
|
|
8488
8488
|
function openPlayDashboard(input2) {
|
|
8489
|
-
if (input2.
|
|
8489
|
+
if (input2.noOpen || !input2.dashboardUrl) {
|
|
8490
8490
|
return;
|
|
8491
8491
|
}
|
|
8492
8492
|
openInBrowser(input2.dashboardUrl);
|
|
@@ -8683,7 +8683,6 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
|
|
|
8683
8683
|
}
|
|
8684
8684
|
openPlayDashboard({
|
|
8685
8685
|
dashboardUrl,
|
|
8686
|
-
jsonOutput: input2.jsonOutput,
|
|
8687
8686
|
noOpen: input2.noOpen
|
|
8688
8687
|
});
|
|
8689
8688
|
input2.progress.phase(`loading play on ${dashboardUrl}`);
|
|
@@ -10604,7 +10603,6 @@ async function handleFileBackedRun(options) {
|
|
|
10604
10603
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
10605
10604
|
openPlayDashboard({
|
|
10606
10605
|
dashboardUrl: resolvedDashboardUrl,
|
|
10607
|
-
jsonOutput: options.jsonOutput,
|
|
10608
10606
|
noOpen: options.noOpen
|
|
10609
10607
|
});
|
|
10610
10608
|
progress.phase(`loading play on ${resolvedDashboardUrl}`);
|
|
@@ -10751,7 +10749,6 @@ async function handleNamedRun(options) {
|
|
|
10751
10749
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
10752
10750
|
openPlayDashboard({
|
|
10753
10751
|
dashboardUrl: resolvedDashboardUrl,
|
|
10754
|
-
jsonOutput: options.jsonOutput,
|
|
10755
10752
|
noOpen: options.noOpen
|
|
10756
10753
|
});
|
|
10757
10754
|
progress.phase(`loading play on ${resolvedDashboardUrl}`);
|
|
@@ -10933,7 +10930,7 @@ async function handleRunLogs(args) {
|
|
|
10933
10930
|
}
|
|
10934
10931
|
}
|
|
10935
10932
|
const client = new DeeplineClient();
|
|
10936
|
-
const status = await client.runs.get(runId);
|
|
10933
|
+
const status = await client.runs.get(runId, { full: true });
|
|
10937
10934
|
const logs = status.progress?.logs ?? [];
|
|
10938
10935
|
if (outPath) {
|
|
10939
10936
|
(0, import_node_fs10.writeFileSync)(outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -206,10 +206,10 @@ import { join as join2 } from "path";
|
|
|
206
206
|
|
|
207
207
|
// src/release.ts
|
|
208
208
|
var SDK_RELEASE = {
|
|
209
|
-
version: "0.1.
|
|
209
|
+
version: "0.1.81",
|
|
210
210
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
211
211
|
supportPolicy: {
|
|
212
|
-
latest: "0.1.
|
|
212
|
+
latest: "0.1.81",
|
|
213
213
|
minimumSupported: "0.1.53",
|
|
214
214
|
deprecatedBelow: "0.1.53"
|
|
215
215
|
}
|
|
@@ -1286,7 +1286,7 @@ var DeeplineClient = class {
|
|
|
1286
1286
|
}
|
|
1287
1287
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
1288
1288
|
const response = await this.http.get(
|
|
1289
|
-
`/api/v2/
|
|
1289
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
|
|
1290
1290
|
);
|
|
1291
1291
|
return normalizePlayStatus(response);
|
|
1292
1292
|
}
|
|
@@ -1298,10 +1298,10 @@ var DeeplineClient = class {
|
|
|
1298
1298
|
*/
|
|
1299
1299
|
async *streamPlayRunEvents(workflowId, options) {
|
|
1300
1300
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
1301
|
-
const params = new URLSearchParams(
|
|
1301
|
+
const params = new URLSearchParams();
|
|
1302
1302
|
params.set("mode", options?.mode ?? "cli");
|
|
1303
1303
|
for await (const event of this.http.streamSse(
|
|
1304
|
-
`/api/v2/
|
|
1304
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
1305
1305
|
{ signal: options?.signal, headers }
|
|
1306
1306
|
)) {
|
|
1307
1307
|
if (event.scope === "play") {
|
|
@@ -1323,7 +1323,7 @@ var DeeplineClient = class {
|
|
|
1323
1323
|
*/
|
|
1324
1324
|
async cancelPlay(workflowId) {
|
|
1325
1325
|
await this.http.request(
|
|
1326
|
-
`/api/v2/
|
|
1326
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1327
1327
|
{ method: "POST" }
|
|
1328
1328
|
);
|
|
1329
1329
|
}
|
|
@@ -1335,7 +1335,7 @@ var DeeplineClient = class {
|
|
|
1335
1335
|
*/
|
|
1336
1336
|
async stopPlay(workflowId, options) {
|
|
1337
1337
|
return this.http.post(
|
|
1338
|
-
`/api/v2/
|
|
1338
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1339
1339
|
options?.reason ? { reason: options.reason } : {}
|
|
1340
1340
|
);
|
|
1341
1341
|
}
|
|
@@ -1455,7 +1455,7 @@ var DeeplineClient = class {
|
|
|
1455
1455
|
* ```
|
|
1456
1456
|
*/
|
|
1457
1457
|
async getRunLogs(runId, options) {
|
|
1458
|
-
const status = await this.getRunStatus(runId);
|
|
1458
|
+
const status = await this.getRunStatus(runId, { full: true });
|
|
1459
1459
|
const logs = status.progress?.logs ?? [];
|
|
1460
1460
|
const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
|
|
1461
1461
|
const entries = logs.slice(Math.max(0, logs.length - limit));
|
|
@@ -8489,7 +8489,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
|
|
|
8489
8489
|
return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
|
|
8490
8490
|
}
|
|
8491
8491
|
function openPlayDashboard(input2) {
|
|
8492
|
-
if (input2.
|
|
8492
|
+
if (input2.noOpen || !input2.dashboardUrl) {
|
|
8493
8493
|
return;
|
|
8494
8494
|
}
|
|
8495
8495
|
openInBrowser(input2.dashboardUrl);
|
|
@@ -8686,7 +8686,6 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
|
|
|
8686
8686
|
}
|
|
8687
8687
|
openPlayDashboard({
|
|
8688
8688
|
dashboardUrl,
|
|
8689
|
-
jsonOutput: input2.jsonOutput,
|
|
8690
8689
|
noOpen: input2.noOpen
|
|
8691
8690
|
});
|
|
8692
8691
|
input2.progress.phase(`loading play on ${dashboardUrl}`);
|
|
@@ -10607,7 +10606,6 @@ async function handleFileBackedRun(options) {
|
|
|
10607
10606
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
10608
10607
|
openPlayDashboard({
|
|
10609
10608
|
dashboardUrl: resolvedDashboardUrl,
|
|
10610
|
-
jsonOutput: options.jsonOutput,
|
|
10611
10609
|
noOpen: options.noOpen
|
|
10612
10610
|
});
|
|
10613
10611
|
progress.phase(`loading play on ${resolvedDashboardUrl}`);
|
|
@@ -10754,7 +10752,6 @@ async function handleNamedRun(options) {
|
|
|
10754
10752
|
const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
|
|
10755
10753
|
openPlayDashboard({
|
|
10756
10754
|
dashboardUrl: resolvedDashboardUrl,
|
|
10757
|
-
jsonOutput: options.jsonOutput,
|
|
10758
10755
|
noOpen: options.noOpen
|
|
10759
10756
|
});
|
|
10760
10757
|
progress.phase(`loading play on ${resolvedDashboardUrl}`);
|
|
@@ -10936,7 +10933,7 @@ async function handleRunLogs(args) {
|
|
|
10936
10933
|
}
|
|
10937
10934
|
}
|
|
10938
10935
|
const client = new DeeplineClient();
|
|
10939
|
-
const status = await client.runs.get(runId);
|
|
10936
|
+
const status = await client.runs.get(runId, { full: true });
|
|
10940
10937
|
const logs = status.progress?.logs ?? [];
|
|
10941
10938
|
if (outPath) {
|
|
10942
10939
|
writeFileSync7(outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
|
package/dist/index.js
CHANGED
|
@@ -241,10 +241,10 @@ var import_node_path2 = require("path");
|
|
|
241
241
|
|
|
242
242
|
// src/release.ts
|
|
243
243
|
var SDK_RELEASE = {
|
|
244
|
-
version: "0.1.
|
|
244
|
+
version: "0.1.81",
|
|
245
245
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
246
246
|
supportPolicy: {
|
|
247
|
-
latest: "0.1.
|
|
247
|
+
latest: "0.1.81",
|
|
248
248
|
minimumSupported: "0.1.53",
|
|
249
249
|
deprecatedBelow: "0.1.53"
|
|
250
250
|
}
|
|
@@ -1321,7 +1321,7 @@ var DeeplineClient = class {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
1323
1323
|
const response = await this.http.get(
|
|
1324
|
-
`/api/v2/
|
|
1324
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
|
|
1325
1325
|
);
|
|
1326
1326
|
return normalizePlayStatus(response);
|
|
1327
1327
|
}
|
|
@@ -1333,10 +1333,10 @@ var DeeplineClient = class {
|
|
|
1333
1333
|
*/
|
|
1334
1334
|
async *streamPlayRunEvents(workflowId, options) {
|
|
1335
1335
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
1336
|
-
const params = new URLSearchParams(
|
|
1336
|
+
const params = new URLSearchParams();
|
|
1337
1337
|
params.set("mode", options?.mode ?? "cli");
|
|
1338
1338
|
for await (const event of this.http.streamSse(
|
|
1339
|
-
`/api/v2/
|
|
1339
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
1340
1340
|
{ signal: options?.signal, headers }
|
|
1341
1341
|
)) {
|
|
1342
1342
|
if (event.scope === "play") {
|
|
@@ -1358,7 +1358,7 @@ var DeeplineClient = class {
|
|
|
1358
1358
|
*/
|
|
1359
1359
|
async cancelPlay(workflowId) {
|
|
1360
1360
|
await this.http.request(
|
|
1361
|
-
`/api/v2/
|
|
1361
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1362
1362
|
{ method: "POST" }
|
|
1363
1363
|
);
|
|
1364
1364
|
}
|
|
@@ -1370,7 +1370,7 @@ var DeeplineClient = class {
|
|
|
1370
1370
|
*/
|
|
1371
1371
|
async stopPlay(workflowId, options) {
|
|
1372
1372
|
return this.http.post(
|
|
1373
|
-
`/api/v2/
|
|
1373
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1374
1374
|
options?.reason ? { reason: options.reason } : {}
|
|
1375
1375
|
);
|
|
1376
1376
|
}
|
|
@@ -1490,7 +1490,7 @@ var DeeplineClient = class {
|
|
|
1490
1490
|
* ```
|
|
1491
1491
|
*/
|
|
1492
1492
|
async getRunLogs(runId, options) {
|
|
1493
|
-
const status = await this.getRunStatus(runId);
|
|
1493
|
+
const status = await this.getRunStatus(runId, { full: true });
|
|
1494
1494
|
const logs = status.progress?.logs ?? [];
|
|
1495
1495
|
const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
|
|
1496
1496
|
const entries = logs.slice(Math.max(0, logs.length - limit));
|
package/dist/index.mjs
CHANGED
|
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
|
|
|
179
179
|
|
|
180
180
|
// src/release.ts
|
|
181
181
|
var SDK_RELEASE = {
|
|
182
|
-
version: "0.1.
|
|
182
|
+
version: "0.1.81",
|
|
183
183
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
184
184
|
supportPolicy: {
|
|
185
|
-
latest: "0.1.
|
|
185
|
+
latest: "0.1.81",
|
|
186
186
|
minimumSupported: "0.1.53",
|
|
187
187
|
deprecatedBelow: "0.1.53"
|
|
188
188
|
}
|
|
@@ -1259,7 +1259,7 @@ var DeeplineClient = class {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
const query = params.size > 0 ? `?${params.toString()}` : "";
|
|
1261
1261
|
const response = await this.http.get(
|
|
1262
|
-
`/api/v2/
|
|
1262
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
|
|
1263
1263
|
);
|
|
1264
1264
|
return normalizePlayStatus(response);
|
|
1265
1265
|
}
|
|
@@ -1271,10 +1271,10 @@ var DeeplineClient = class {
|
|
|
1271
1271
|
*/
|
|
1272
1272
|
async *streamPlayRunEvents(workflowId, options) {
|
|
1273
1273
|
const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
|
|
1274
|
-
const params = new URLSearchParams(
|
|
1274
|
+
const params = new URLSearchParams();
|
|
1275
1275
|
params.set("mode", options?.mode ?? "cli");
|
|
1276
1276
|
for await (const event of this.http.streamSse(
|
|
1277
|
-
`/api/v2/
|
|
1277
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
|
|
1278
1278
|
{ signal: options?.signal, headers }
|
|
1279
1279
|
)) {
|
|
1280
1280
|
if (event.scope === "play") {
|
|
@@ -1296,7 +1296,7 @@ var DeeplineClient = class {
|
|
|
1296
1296
|
*/
|
|
1297
1297
|
async cancelPlay(workflowId) {
|
|
1298
1298
|
await this.http.request(
|
|
1299
|
-
`/api/v2/
|
|
1299
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1300
1300
|
{ method: "POST" }
|
|
1301
1301
|
);
|
|
1302
1302
|
}
|
|
@@ -1308,7 +1308,7 @@ var DeeplineClient = class {
|
|
|
1308
1308
|
*/
|
|
1309
1309
|
async stopPlay(workflowId, options) {
|
|
1310
1310
|
return this.http.post(
|
|
1311
|
-
`/api/v2/
|
|
1311
|
+
`/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
|
|
1312
1312
|
options?.reason ? { reason: options.reason } : {}
|
|
1313
1313
|
);
|
|
1314
1314
|
}
|
|
@@ -1428,7 +1428,7 @@ var DeeplineClient = class {
|
|
|
1428
1428
|
* ```
|
|
1429
1429
|
*/
|
|
1430
1430
|
async getRunLogs(runId, options) {
|
|
1431
|
-
const status = await this.getRunStatus(runId);
|
|
1431
|
+
const status = await this.getRunStatus(runId, { full: true });
|
|
1432
1432
|
const logs = status.progress?.logs ?? [];
|
|
1433
1433
|
const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
|
|
1434
1434
|
const entries = logs.slice(Math.max(0, logs.length - limit));
|
|
@@ -3094,7 +3094,7 @@ const coordinatorEntrypoint = {
|
|
|
3094
3094
|
requireRunScope: request.method !== 'GET' && request.method !== 'HEAD',
|
|
3095
3095
|
});
|
|
3096
3096
|
if (authError) return authError;
|
|
3097
|
-
const doId = env.PLAY_DEDUP.idFromName(
|
|
3097
|
+
const doId = env.PLAY_DEDUP.idFromName(runId);
|
|
3098
3098
|
const stub = env.PLAY_DEDUP.get(doId);
|
|
3099
3099
|
const internalUrl = `https://internal/${action}`;
|
|
3100
3100
|
return stub.fetch(internalUrl, {
|