deepline 0.1.122 → 0.1.124
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 +4 -5
- package/dist/bundling-sources/apps/play-runner-workers/src/coordinator-entry.ts +3 -0
- package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +2 -0
- package/dist/bundling-sources/sdk/src/client.ts +54 -5
- package/dist/bundling-sources/sdk/src/play.ts +15 -0
- package/dist/bundling-sources/sdk/src/release.ts +62 -2
- package/dist/bundling-sources/sdk/src/types.ts +24 -2
- package/dist/bundling-sources/sdk/src/worker-play-entry.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +378 -46
- package/dist/cli/index.js +222 -25
- package/dist/cli/index.mjs +229 -26
- package/dist/index.d.mts +62 -3
- package/dist/index.d.ts +62 -3
- package/dist/index.js +94 -7
- package/dist/index.mjs +94 -7
- package/dist/plays/bundle-play-file.d.mts +1 -0
- package/dist/plays/bundle-play-file.d.ts +1 -0
- package/dist/plays/bundle-play-file.mjs +292 -45
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -380,10 +380,11 @@ var SDK_RELEASE = {
|
|
|
380
380
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
381
381
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
382
382
|
// the SDK enrich generator's one-second stale policy.
|
|
383
|
-
|
|
383
|
+
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
384
|
+
version: "0.1.124",
|
|
384
385
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
385
386
|
supportPolicy: {
|
|
386
|
-
latest: "0.1.
|
|
387
|
+
latest: "0.1.124",
|
|
387
388
|
minimumSupported: "0.1.53",
|
|
388
389
|
deprecatedBelow: "0.1.53",
|
|
389
390
|
commandMinimumSupported: [
|
|
@@ -391,6 +392,55 @@ var SDK_RELEASE = {
|
|
|
391
392
|
command: "enrich",
|
|
392
393
|
minimumSupported: "0.1.108",
|
|
393
394
|
reason: "Older SDK CLI enrich generated stale play source for the current dataset API."
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
command: "plays",
|
|
398
|
+
minimumSupported: "0.1.110",
|
|
399
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
command: "plays run",
|
|
403
|
+
minimumSupported: "0.1.110",
|
|
404
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
command: "run",
|
|
408
|
+
displayCommand: "plays run",
|
|
409
|
+
minimumSupported: "0.1.110",
|
|
410
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
command: "plays check",
|
|
414
|
+
minimumSupported: "0.1.110",
|
|
415
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
command: "check",
|
|
419
|
+
displayCommand: "plays check",
|
|
420
|
+
minimumSupported: "0.1.110",
|
|
421
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
command: "plays publish",
|
|
425
|
+
minimumSupported: "0.1.110",
|
|
426
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
command: "publish",
|
|
430
|
+
displayCommand: "plays publish",
|
|
431
|
+
minimumSupported: "0.1.110",
|
|
432
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
command: "plays set-live",
|
|
436
|
+
minimumSupported: "0.1.110",
|
|
437
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
command: "set-live",
|
|
441
|
+
displayCommand: "plays set-live",
|
|
442
|
+
minimumSupported: "0.1.110",
|
|
443
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
394
444
|
}
|
|
395
445
|
],
|
|
396
446
|
autoUpdatePatchLag: 2
|
|
@@ -1997,7 +2047,8 @@ var DeeplineClient = class {
|
|
|
1997
2047
|
tail: (runId, options2) => this.tailRun(runId, options2),
|
|
1998
2048
|
logs: (runId, options2) => this.getRunLogs(runId, options2),
|
|
1999
2049
|
exportDatasetRows: (input2) => this.getPlaySheetRows(input2),
|
|
2000
|
-
stop: (runId, options2) => this.stopRun(runId, options2)
|
|
2050
|
+
stop: (runId, options2) => this.stopRun(runId, options2),
|
|
2051
|
+
stopAll: (options2) => this.stopAllRuns(options2)
|
|
2001
2052
|
};
|
|
2002
2053
|
this.billing = {
|
|
2003
2054
|
plans: () => this.getBillingPlans(),
|
|
@@ -2062,12 +2113,14 @@ var DeeplineClient = class {
|
|
|
2062
2113
|
play.outputSchema,
|
|
2063
2114
|
"rowOutputSchema"
|
|
2064
2115
|
);
|
|
2116
|
+
const description = play.description?.trim() || play.currentRevision?.description?.trim() || play.liveRevision?.description?.trim() || null;
|
|
2065
2117
|
const runCommand2 = this.playRunCommand(play, { csvInput });
|
|
2066
2118
|
const cloneEditStarter = this.playCloneEditStarter(play);
|
|
2067
2119
|
return {
|
|
2068
2120
|
name: play.name,
|
|
2069
2121
|
...play.reference ? { reference: play.reference } : {},
|
|
2070
2122
|
...play.displayName ? { displayName: play.displayName } : {},
|
|
2123
|
+
...description ? { description } : {},
|
|
2071
2124
|
origin: play.origin,
|
|
2072
2125
|
ownerType: play.ownerType,
|
|
2073
2126
|
canEdit: play.canEdit,
|
|
@@ -2288,6 +2341,7 @@ var DeeplineClient = class {
|
|
|
2288
2341
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2289
2342
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2290
2343
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2344
|
+
...request.description ? { description: request.description } : {},
|
|
2291
2345
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2292
2346
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2293
2347
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2326,6 +2380,7 @@ var DeeplineClient = class {
|
|
|
2326
2380
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2327
2381
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2328
2382
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2383
|
+
...request.description ? { description: request.description } : {},
|
|
2329
2384
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2330
2385
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2331
2386
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2483,6 +2538,7 @@ var DeeplineClient = class {
|
|
|
2483
2538
|
name: input2.name,
|
|
2484
2539
|
sourceCode: input2.sourceCode,
|
|
2485
2540
|
sourceFiles: input2.sourceFiles,
|
|
2541
|
+
description: input2.description,
|
|
2486
2542
|
artifact: input2.artifact,
|
|
2487
2543
|
compilerManifest,
|
|
2488
2544
|
publish: false
|
|
@@ -2495,6 +2551,7 @@ var DeeplineClient = class {
|
|
|
2495
2551
|
return this.startPlayRun({
|
|
2496
2552
|
name: input2.name,
|
|
2497
2553
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2554
|
+
description: input2.description,
|
|
2498
2555
|
compilerManifest,
|
|
2499
2556
|
...input2.input ? { input: input2.input } : {},
|
|
2500
2557
|
...input2.inputFile ? { inputFile: input2.inputFile } : {},
|
|
@@ -2549,6 +2606,7 @@ var DeeplineClient = class {
|
|
|
2549
2606
|
name,
|
|
2550
2607
|
sourceCode,
|
|
2551
2608
|
sourceFiles: options?.sourceFiles,
|
|
2609
|
+
description: options?.description,
|
|
2552
2610
|
artifact,
|
|
2553
2611
|
compilerManifest,
|
|
2554
2612
|
publish: false
|
|
@@ -2562,6 +2620,7 @@ var DeeplineClient = class {
|
|
|
2562
2620
|
name,
|
|
2563
2621
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2564
2622
|
sourceCode,
|
|
2623
|
+
description: options?.description,
|
|
2565
2624
|
staticPipeline: registeredArtifact.staticPipeline ?? null,
|
|
2566
2625
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
2567
2626
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
@@ -2861,15 +2920,21 @@ var DeeplineClient = class {
|
|
|
2861
2920
|
* ```
|
|
2862
2921
|
*/
|
|
2863
2922
|
async listRuns(options) {
|
|
2864
|
-
const playName = options.play
|
|
2865
|
-
|
|
2866
|
-
|
|
2923
|
+
const playName = options.play?.trim();
|
|
2924
|
+
const params = new URLSearchParams();
|
|
2925
|
+
if (playName) {
|
|
2926
|
+
params.set("play", playName);
|
|
2867
2927
|
}
|
|
2868
|
-
const params = new URLSearchParams({ play: playName });
|
|
2869
2928
|
const status = options.status?.trim();
|
|
2870
2929
|
if (status) {
|
|
2871
2930
|
params.set("status", status);
|
|
2872
2931
|
}
|
|
2932
|
+
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
2933
|
+
params.set("limit", String(Math.max(1, Math.floor(options.limit))));
|
|
2934
|
+
}
|
|
2935
|
+
if (!playName && !status) {
|
|
2936
|
+
throw new Error("runs.list requires options.play or options.status.");
|
|
2937
|
+
}
|
|
2873
2938
|
params.set("compact", "true");
|
|
2874
2939
|
const response = await this.http.get(
|
|
2875
2940
|
`/api/v2/runs?${params.toString()}`
|
|
@@ -3176,6 +3241,24 @@ var DeeplineClient = class {
|
|
|
3176
3241
|
options?.reason ? { reason: options.reason } : {}
|
|
3177
3242
|
);
|
|
3178
3243
|
}
|
|
3244
|
+
/**
|
|
3245
|
+
* Stop every active run visible to the current workspace.
|
|
3246
|
+
*
|
|
3247
|
+
* This is the SDK equivalent of:
|
|
3248
|
+
*
|
|
3249
|
+
* ```bash
|
|
3250
|
+
* deepline runs stop-all --reason "stale lock" --json
|
|
3251
|
+
* ```
|
|
3252
|
+
*
|
|
3253
|
+
* Use this when a failed parent run left child or waiting runs active and you
|
|
3254
|
+
* need to clear the workspace run-slot state without knowing each run id.
|
|
3255
|
+
*/
|
|
3256
|
+
async stopAllRuns(options) {
|
|
3257
|
+
return this.http.post(
|
|
3258
|
+
"/api/v2/runs/stop-all",
|
|
3259
|
+
options?.reason ? { reason: options.reason } : {}
|
|
3260
|
+
);
|
|
3261
|
+
}
|
|
3179
3262
|
/**
|
|
3180
3263
|
* List callable plays visible to the workspace.
|
|
3181
3264
|
*
|
|
@@ -6787,7 +6870,13 @@ import { basename, dirname as dirname6, join as join5, resolve as resolve7 } fro
|
|
|
6787
6870
|
import { parse as parseCsvSync2 } from "csv-parse/sync";
|
|
6788
6871
|
|
|
6789
6872
|
// src/cli/commands/plays/bootstrap.ts
|
|
6790
|
-
import {
|
|
6873
|
+
import {
|
|
6874
|
+
closeSync,
|
|
6875
|
+
openSync,
|
|
6876
|
+
readSync,
|
|
6877
|
+
statSync,
|
|
6878
|
+
writeFileSync as writeFileSync7
|
|
6879
|
+
} from "fs";
|
|
6791
6880
|
import { isAbsolute, relative, resolve as resolve6 } from "path";
|
|
6792
6881
|
import { parse as parseCsvSync } from "csv-parse/sync";
|
|
6793
6882
|
|
|
@@ -8129,6 +8218,8 @@ export default definePlay(${jsString(input2.options.name)}, async (ctx, input: I
|
|
|
8129
8218
|
count: await rows.count(),
|
|
8130
8219
|
rows,
|
|
8131
8220
|
};
|
|
8221
|
+
}, {
|
|
8222
|
+
description: ${jsString(`Bootstrap ${input2.options.template}: seed source rows, run requested stages, and return mapped rows.`)},
|
|
8132
8223
|
});
|
|
8133
8224
|
|
|
8134
8225
|
`;
|
|
@@ -9512,6 +9603,24 @@ function requireCompilerManifest(node) {
|
|
|
9512
9603
|
}
|
|
9513
9604
|
return node.compilerManifest;
|
|
9514
9605
|
}
|
|
9606
|
+
function missingPlayDescriptionMessage(node) {
|
|
9607
|
+
const playName = node.playName ?? extractPlayName(node.sourceCode, node.filePath);
|
|
9608
|
+
return [
|
|
9609
|
+
`Play description is required for ${playName} (${node.filePath}).`,
|
|
9610
|
+
"Add a top-level description to definePlay so agents and future play surfaces can explain what this play does.",
|
|
9611
|
+
`Example: definePlay("${playName}", async (ctx, input) => { ... }, { description: "Look up company details from a domain." })`,
|
|
9612
|
+
`Object form: definePlay({ id: "${playName}", description: "Look up company details from a domain.", input, run })`
|
|
9613
|
+
].join(" ");
|
|
9614
|
+
}
|
|
9615
|
+
function collectMissingPlayDescriptionErrors(graph) {
|
|
9616
|
+
return [...graph.nodes.values()].filter((node) => !node.playDescription?.trim()).map(missingPlayDescriptionMessage);
|
|
9617
|
+
}
|
|
9618
|
+
function assertBundledPlayGraphDescriptions(graph) {
|
|
9619
|
+
const errors = collectMissingPlayDescriptionErrors(graph);
|
|
9620
|
+
if (errors.length > 0) {
|
|
9621
|
+
throw new Error(errors.join("\n"));
|
|
9622
|
+
}
|
|
9623
|
+
}
|
|
9515
9624
|
async function publishImportedPlayDependencies(client2, graph) {
|
|
9516
9625
|
const published = /* @__PURE__ */ new Set();
|
|
9517
9626
|
const publishNode = async (filePath, skipPublish) => {
|
|
@@ -9535,6 +9644,7 @@ async function publishImportedPlayDependencies(client2, graph) {
|
|
|
9535
9644
|
name: node.playName,
|
|
9536
9645
|
sourceCode: node.sourceCode,
|
|
9537
9646
|
sourceFiles: node.sourceFiles,
|
|
9647
|
+
description: node.playDescription ?? void 0,
|
|
9538
9648
|
artifact: node.artifact,
|
|
9539
9649
|
compilerManifest: requireCompilerManifest(node),
|
|
9540
9650
|
publish: true
|
|
@@ -12232,6 +12342,26 @@ async function handlePlayCheck(args) {
|
|
|
12232
12342
|
return 1;
|
|
12233
12343
|
}
|
|
12234
12344
|
const playName = graph.root.playName ?? extractPlayName(sourceCode, absolutePlayPath);
|
|
12345
|
+
const descriptionErrors = collectMissingPlayDescriptionErrors(graph);
|
|
12346
|
+
if (descriptionErrors.length > 0) {
|
|
12347
|
+
if (options.jsonOutput) {
|
|
12348
|
+
process.stdout.write(
|
|
12349
|
+
`${JSON.stringify({
|
|
12350
|
+
name: playName,
|
|
12351
|
+
valid: false,
|
|
12352
|
+
stage: "authoring",
|
|
12353
|
+
errors: descriptionErrors
|
|
12354
|
+
})}
|
|
12355
|
+
`
|
|
12356
|
+
);
|
|
12357
|
+
} else {
|
|
12358
|
+
console.error(`\u2717 ${playName} failed local play check`);
|
|
12359
|
+
for (const error of descriptionErrors) {
|
|
12360
|
+
console.error(` ${error}`);
|
|
12361
|
+
}
|
|
12362
|
+
}
|
|
12363
|
+
return 1;
|
|
12364
|
+
}
|
|
12235
12365
|
if (shouldUseLocalOnlyPlayCheck()) {
|
|
12236
12366
|
const result2 = {
|
|
12237
12367
|
valid: true,
|
|
@@ -12258,6 +12388,7 @@ async function handlePlayCheck(args) {
|
|
|
12258
12388
|
name: playName,
|
|
12259
12389
|
sourceCode: graph.root.sourceCode,
|
|
12260
12390
|
sourceFiles: graph.root.sourceFiles,
|
|
12391
|
+
description: graph.root.playDescription ?? void 0,
|
|
12261
12392
|
artifact: graph.root.artifact
|
|
12262
12393
|
});
|
|
12263
12394
|
const enrichedResult = {
|
|
@@ -12315,6 +12446,7 @@ async function handleFileBackedRun(options) {
|
|
|
12315
12446
|
{ targetKind: "file" },
|
|
12316
12447
|
() => collectBundledPlayGraph(absolutePlayPath, options.profile)
|
|
12317
12448
|
);
|
|
12449
|
+
assertBundledPlayGraphDescriptions(graph);
|
|
12318
12450
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12319
12451
|
if (canDeferCompilerManifest) {
|
|
12320
12452
|
recordCliTrace({
|
|
@@ -12379,6 +12511,7 @@ async function handleFileBackedRun(options) {
|
|
|
12379
12511
|
name: playName,
|
|
12380
12512
|
sourceCode: bundleResult.sourceCode,
|
|
12381
12513
|
sourceFiles: bundleResult.sourceFiles,
|
|
12514
|
+
description: bundleResult.playDescription ?? void 0,
|
|
12382
12515
|
runtimeArtifact: bundleResult.artifact,
|
|
12383
12516
|
...compilerManifest ? { compilerManifest } : {},
|
|
12384
12517
|
packagedFileUploads,
|
|
@@ -12678,7 +12811,7 @@ async function handleRunGet(args) {
|
|
|
12678
12811
|
return 0;
|
|
12679
12812
|
}
|
|
12680
12813
|
async function handleRunsList(args) {
|
|
12681
|
-
const usage = "Usage: deepline runs list --play <play-name> [--status <status>] [--json]";
|
|
12814
|
+
const usage = "Usage: deepline runs list [--play <play-name>] [--status <status>] [--json]";
|
|
12682
12815
|
let playName = null;
|
|
12683
12816
|
let statusFilter = null;
|
|
12684
12817
|
for (let index = 0; index < args.length; index += 1) {
|
|
@@ -12695,28 +12828,32 @@ async function handleRunsList(args) {
|
|
|
12695
12828
|
continue;
|
|
12696
12829
|
}
|
|
12697
12830
|
}
|
|
12698
|
-
if (!playName) {
|
|
12831
|
+
if (!playName && !statusFilter) {
|
|
12699
12832
|
console.error(usage);
|
|
12700
12833
|
return 1;
|
|
12701
12834
|
}
|
|
12702
12835
|
const client2 = new DeeplineClient();
|
|
12703
12836
|
const runs = (await client2.runs.list({
|
|
12704
|
-
play: playName,
|
|
12837
|
+
...playName ? { play: playName } : {},
|
|
12705
12838
|
...statusFilter ? { status: statusFilter } : {}
|
|
12706
12839
|
})).map((run) => ({
|
|
12707
12840
|
runId: run.workflowId,
|
|
12708
12841
|
workflowId: run.workflowId,
|
|
12709
12842
|
temporalRunId: run.runId,
|
|
12843
|
+
parentRunId: run.parentRunId ?? null,
|
|
12844
|
+
rootRunId: run.rootRunId ?? null,
|
|
12710
12845
|
status: String(run.status ?? "").toLowerCase(),
|
|
12711
|
-
startedAt: run.startTime,
|
|
12712
|
-
finishedAt: run.closeTime,
|
|
12846
|
+
startedAt: run.startTime ?? run.startedAt ?? null,
|
|
12847
|
+
finishedAt: run.closeTime ?? run.finishedAt ?? null,
|
|
12713
12848
|
executionTime: run.executionTime,
|
|
12714
12849
|
billingTotalCredits: run.billingTotalCredits,
|
|
12715
12850
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
12716
|
-
playName: run.memo?.playName ?? playName
|
|
12851
|
+
playName: run.playName ?? run.memo?.playName ?? playName ?? null
|
|
12717
12852
|
}));
|
|
12718
|
-
const lines = runs.length === 0 ? [
|
|
12719
|
-
|
|
12853
|
+
const lines = runs.length === 0 ? [
|
|
12854
|
+
playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
|
|
12855
|
+
] : runs.map(
|
|
12856
|
+
(run) => `${run.runId} ${run.status} ${formatTimestamp(run.startedAt)} ${typeof run.billingTotalCredits === "number" && Number.isFinite(run.billingTotalCredits) ? `${formatCreditAmount(run.billingTotalCredits)} credits` : "\u2014"}${run.parentRunId ? ` parent=${run.parentRunId}` : ""}`
|
|
12720
12857
|
);
|
|
12721
12858
|
printCommandEnvelope(
|
|
12722
12859
|
{
|
|
@@ -12902,6 +13039,31 @@ async function handleRunStop(args) {
|
|
|
12902
13039
|
);
|
|
12903
13040
|
return 0;
|
|
12904
13041
|
}
|
|
13042
|
+
async function handleRunStopAll(args) {
|
|
13043
|
+
let reason;
|
|
13044
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
13045
|
+
const arg = args[index];
|
|
13046
|
+
if (arg === "--reason" && args[index + 1]) {
|
|
13047
|
+
reason = args[++index];
|
|
13048
|
+
}
|
|
13049
|
+
}
|
|
13050
|
+
const client2 = new DeeplineClient();
|
|
13051
|
+
const result = await client2.runs.stopAll({ reason });
|
|
13052
|
+
const lines = [
|
|
13053
|
+
`Stopped ${result.stopped} active run${result.stopped === 1 ? "" : "s"}`,
|
|
13054
|
+
...result.partial ? ["partial: active runs may remain; rerun stop-all"] : [],
|
|
13055
|
+
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
13056
|
+
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
13057
|
+
];
|
|
13058
|
+
printCommandEnvelope(
|
|
13059
|
+
{
|
|
13060
|
+
...result,
|
|
13061
|
+
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
13062
|
+
},
|
|
13063
|
+
{ json: argsWantJson(args) }
|
|
13064
|
+
);
|
|
13065
|
+
return result.failed > 0 || result.partial ? 1 : 0;
|
|
13066
|
+
}
|
|
12905
13067
|
async function handleRunExport(args) {
|
|
12906
13068
|
const usage = "Usage: deepline runs export <run-id> [--dataset result.rows] --out output.csv [--metadata-out export.json] [--json]";
|
|
12907
13069
|
let runId;
|
|
@@ -13161,6 +13323,9 @@ function printPlayDescription(play) {
|
|
|
13161
13323
|
if (play.displayName && play.displayName !== play.name) {
|
|
13162
13324
|
console.log(` Display name: ${play.displayName}`);
|
|
13163
13325
|
}
|
|
13326
|
+
if (play.description) {
|
|
13327
|
+
console.log(` Description: ${play.description}`);
|
|
13328
|
+
}
|
|
13164
13329
|
if (play.aliases.length > 0) {
|
|
13165
13330
|
console.log(` Aliases: ${play.aliases.join(", ")}`);
|
|
13166
13331
|
}
|
|
@@ -13213,6 +13378,9 @@ function printCompactPlaySearchResult(play) {
|
|
|
13213
13378
|
if (play.displayName && play.displayName !== play.name) {
|
|
13214
13379
|
console.log(` Display name: ${play.displayName}`);
|
|
13215
13380
|
}
|
|
13381
|
+
if (play.description) {
|
|
13382
|
+
console.log(` Description: ${play.description}`);
|
|
13383
|
+
}
|
|
13216
13384
|
if (aliases) {
|
|
13217
13385
|
console.log(` Aliases: ${aliases}`);
|
|
13218
13386
|
}
|
|
@@ -13526,6 +13694,7 @@ async function handlePlayPublish(args) {
|
|
|
13526
13694
|
{ targetKind: "file" },
|
|
13527
13695
|
() => collectBundledPlayGraph(resolve7(playName))
|
|
13528
13696
|
);
|
|
13697
|
+
assertBundledPlayGraphDescriptions(graph);
|
|
13529
13698
|
await traceCliSpan(
|
|
13530
13699
|
"cli.play_publish_compile_manifests",
|
|
13531
13700
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
@@ -13552,6 +13721,7 @@ async function handlePlayPublish(args) {
|
|
|
13552
13721
|
name: rootPlayName,
|
|
13553
13722
|
sourceCode: graph.root.sourceCode,
|
|
13554
13723
|
sourceFiles: graph.root.sourceFiles,
|
|
13724
|
+
description: graph.root.playDescription ?? void 0,
|
|
13555
13725
|
artifact: graph.root.artifact,
|
|
13556
13726
|
compilerManifest: requireCompilerManifest(graph.root),
|
|
13557
13727
|
publish: true
|
|
@@ -13930,7 +14100,9 @@ Examples:
|
|
|
13930
14100
|
`
|
|
13931
14101
|
);
|
|
13932
14102
|
addPublishHelp(
|
|
13933
|
-
play.command("publish <target>").description(
|
|
14103
|
+
play.command("publish <target>").description(
|
|
14104
|
+
"Promote a saved play revision or publish a local play file."
|
|
14105
|
+
)
|
|
13934
14106
|
).option("--latest", "Promote the newest saved revision").option("--revision-id <id>", "Revision to promote").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
|
|
13935
14107
|
process.exitCode = await handlePlayPublish([
|
|
13936
14108
|
target,
|
|
@@ -13940,9 +14112,7 @@ Examples:
|
|
|
13940
14112
|
]);
|
|
13941
14113
|
});
|
|
13942
14114
|
addPublishHelp(
|
|
13943
|
-
play.command("set-live <target>").description(
|
|
13944
|
-
"Promote a saved revision or publish a local play file."
|
|
13945
|
-
)
|
|
14115
|
+
play.command("set-live <target>").description("Promote a saved revision or publish a local play file.")
|
|
13946
14116
|
).option("--latest", "Promote the newest saved revision").option("--revision-id <id>", "Revision to promote").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (target, options) => {
|
|
13947
14117
|
process.exitCode = await handlePlayPublish([
|
|
13948
14118
|
target,
|
|
@@ -13983,7 +14153,9 @@ Examples:
|
|
|
13983
14153
|
deepline runs tail play/my-play/run/20260501t000000-000
|
|
13984
14154
|
deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --json
|
|
13985
14155
|
deepline runs list --play my-play --status failed --json
|
|
14156
|
+
deepline runs list --status running --json
|
|
13986
14157
|
deepline runs stop play/my-play/run/20260501t000000-000 --reason "stale lock" --json
|
|
14158
|
+
deepline runs stop-all --reason "unjam workspace" --json
|
|
13987
14159
|
deepline runs export play/my-play/run/20260501t000000-000 --out output.csv
|
|
13988
14160
|
`
|
|
13989
14161
|
);
|
|
@@ -14017,16 +14189,32 @@ Notes:
|
|
|
14017
14189
|
Examples:
|
|
14018
14190
|
deepline runs list --play my-play
|
|
14019
14191
|
deepline runs list --play my-play --status failed --compact --json
|
|
14192
|
+
deepline runs list --status running --compact --json
|
|
14020
14193
|
`
|
|
14021
|
-
).
|
|
14194
|
+
).option("--play <name>", "Play name to filter runs").option("--status <status>", "Filter by run status").option("--compact", "Drop verbose fields from JSON output").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
|
|
14022
14195
|
process.exitCode = await handleRunsList([
|
|
14023
|
-
"--play",
|
|
14024
|
-
options.play,
|
|
14196
|
+
...options.play ? ["--play", options.play] : [],
|
|
14025
14197
|
...options.status ? ["--status", options.status] : [],
|
|
14026
14198
|
...options.compact ? ["--compact"] : [],
|
|
14027
14199
|
...options.json ? ["--json"] : []
|
|
14028
14200
|
]);
|
|
14029
14201
|
});
|
|
14202
|
+
runs.command("stop-all").description("Stop active play runs in the current workspace.").addHelpText(
|
|
14203
|
+
"after",
|
|
14204
|
+
`
|
|
14205
|
+
Notes:
|
|
14206
|
+
Stops all active runs visible to this workspace, including child runs created by ctx.runPlay.
|
|
14207
|
+
|
|
14208
|
+
Examples:
|
|
14209
|
+
deepline runs stop-all --reason "unjam workspace"
|
|
14210
|
+
deepline runs stop-all --json
|
|
14211
|
+
`
|
|
14212
|
+
).option("--reason <text>", "Reason to include with each stop request").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
|
|
14213
|
+
process.exitCode = await handleRunStopAll([
|
|
14214
|
+
...options.reason ? ["--reason", options.reason] : [],
|
|
14215
|
+
...options.json ? ["--json"] : []
|
|
14216
|
+
]);
|
|
14217
|
+
});
|
|
14030
14218
|
runs.command("tail <runId>").description("Read the canonical live stream for a play run.").addHelpText(
|
|
14031
14219
|
"after",
|
|
14032
14220
|
`
|
|
@@ -14982,7 +15170,7 @@ function compileEnrichConfigToPlaySource(config, options = {}) {
|
|
|
14982
15170
|
...metadataColumnSource ? [metadataColumnSource] : [],
|
|
14983
15171
|
` .run({ key: (row, index) => __dlStableRowKey(row, index + rowStart) });`,
|
|
14984
15172
|
` return { rows: enriched, count: await enriched.count() };`,
|
|
14985
|
-
`});`
|
|
15173
|
+
`}, { description: ${stringLiteral("Read a CSV file, run the configured Deepline enrich commands, and return enriched rows.")} });`
|
|
14986
15174
|
];
|
|
14987
15175
|
const helpers = idiomaticGetters ? selectUsedHelpers(helperSource(), body.join("\n")) : helperSource();
|
|
14988
15176
|
return [
|
|
@@ -20288,6 +20476,8 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
|
|
|
20288
20476
|
rows: enrichedData,
|
|
20289
20477
|
count: await enrichedData.count(),
|
|
20290
20478
|
};
|
|
20479
|
+
}, {
|
|
20480
|
+
description: ${JSON.stringify(`Seed ${input2.toolId} rows into a Deepline workflow-ready dataset.`)},
|
|
20291
20481
|
});
|
|
20292
20482
|
`;
|
|
20293
20483
|
writeFileSync12(scriptPath, script, { encoding: "utf-8", mode: 384 });
|
|
@@ -22210,6 +22400,16 @@ function isLegacyNoopInvocation() {
|
|
|
22210
22400
|
const command = process.argv.slice(2)[0];
|
|
22211
22401
|
return command === "session" || command === "backend";
|
|
22212
22402
|
}
|
|
22403
|
+
function compatibilityCommandPath(command) {
|
|
22404
|
+
const names = [];
|
|
22405
|
+
let current = command;
|
|
22406
|
+
while (current?.parent) {
|
|
22407
|
+
const name = current.name();
|
|
22408
|
+
if (name) names.unshift(name);
|
|
22409
|
+
current = current.parent;
|
|
22410
|
+
}
|
|
22411
|
+
return names.join(" ");
|
|
22412
|
+
}
|
|
22213
22413
|
function topLevelCommandKnown(program, commandName) {
|
|
22214
22414
|
const normalized = commandName.trim();
|
|
22215
22415
|
if (!normalized || normalized.startsWith("-")) {
|
|
@@ -22234,6 +22434,8 @@ async function runPlayRunnerHealthCheck() {
|
|
|
22234
22434
|
" .withColumn('echo', (row) => ({ ok: true, id: row.id }))",
|
|
22235
22435
|
" .run({ key: 'id' });",
|
|
22236
22436
|
" return { ok: true, rows, source: 'deepline health --play-runner' };",
|
|
22437
|
+
"}, {",
|
|
22438
|
+
" description: 'Run a local Deepline play health check with a tiny dataset.',",
|
|
22237
22439
|
"});",
|
|
22238
22440
|
""
|
|
22239
22441
|
].join("\n"),
|
|
@@ -22445,11 +22647,12 @@ Exit codes:
|
|
|
22445
22647
|
progress?.phase("checking sdk compatibility");
|
|
22446
22648
|
}
|
|
22447
22649
|
const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
|
|
22650
|
+
const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
|
|
22448
22651
|
const compatibility = await traceCliSpan(
|
|
22449
22652
|
"cli.sdk_compatibility",
|
|
22450
|
-
{ baseUrl, command:
|
|
22653
|
+
{ baseUrl, command: compatibilityCommand },
|
|
22451
22654
|
() => checkSdkCompatibility(baseUrl, {
|
|
22452
|
-
command:
|
|
22655
|
+
command: compatibilityCommand
|
|
22453
22656
|
})
|
|
22454
22657
|
);
|
|
22455
22658
|
if (compatibility.error) {
|