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.js
CHANGED
|
@@ -403,10 +403,11 @@ var SDK_RELEASE = {
|
|
|
403
403
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
404
404
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
405
405
|
// the SDK enrich generator's one-second stale policy.
|
|
406
|
-
|
|
406
|
+
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
407
|
+
version: "0.1.124",
|
|
407
408
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
408
409
|
supportPolicy: {
|
|
409
|
-
latest: "0.1.
|
|
410
|
+
latest: "0.1.124",
|
|
410
411
|
minimumSupported: "0.1.53",
|
|
411
412
|
deprecatedBelow: "0.1.53",
|
|
412
413
|
commandMinimumSupported: [
|
|
@@ -414,6 +415,55 @@ var SDK_RELEASE = {
|
|
|
414
415
|
command: "enrich",
|
|
415
416
|
minimumSupported: "0.1.108",
|
|
416
417
|
reason: "Older SDK CLI enrich generated stale play source for the current dataset API."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
command: "plays",
|
|
421
|
+
minimumSupported: "0.1.110",
|
|
422
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
command: "plays run",
|
|
426
|
+
minimumSupported: "0.1.110",
|
|
427
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
command: "run",
|
|
431
|
+
displayCommand: "plays run",
|
|
432
|
+
minimumSupported: "0.1.110",
|
|
433
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
command: "plays check",
|
|
437
|
+
minimumSupported: "0.1.110",
|
|
438
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
command: "check",
|
|
442
|
+
displayCommand: "plays check",
|
|
443
|
+
minimumSupported: "0.1.110",
|
|
444
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
command: "plays publish",
|
|
448
|
+
minimumSupported: "0.1.110",
|
|
449
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
command: "publish",
|
|
453
|
+
displayCommand: "plays publish",
|
|
454
|
+
minimumSupported: "0.1.110",
|
|
455
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
command: "plays set-live",
|
|
459
|
+
minimumSupported: "0.1.110",
|
|
460
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
command: "set-live",
|
|
464
|
+
displayCommand: "plays set-live",
|
|
465
|
+
minimumSupported: "0.1.110",
|
|
466
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
417
467
|
}
|
|
418
468
|
],
|
|
419
469
|
autoUpdatePatchLag: 2
|
|
@@ -2020,7 +2070,8 @@ var DeeplineClient = class {
|
|
|
2020
2070
|
tail: (runId, options2) => this.tailRun(runId, options2),
|
|
2021
2071
|
logs: (runId, options2) => this.getRunLogs(runId, options2),
|
|
2022
2072
|
exportDatasetRows: (input2) => this.getPlaySheetRows(input2),
|
|
2023
|
-
stop: (runId, options2) => this.stopRun(runId, options2)
|
|
2073
|
+
stop: (runId, options2) => this.stopRun(runId, options2),
|
|
2074
|
+
stopAll: (options2) => this.stopAllRuns(options2)
|
|
2024
2075
|
};
|
|
2025
2076
|
this.billing = {
|
|
2026
2077
|
plans: () => this.getBillingPlans(),
|
|
@@ -2085,12 +2136,14 @@ var DeeplineClient = class {
|
|
|
2085
2136
|
play.outputSchema,
|
|
2086
2137
|
"rowOutputSchema"
|
|
2087
2138
|
);
|
|
2139
|
+
const description = play.description?.trim() || play.currentRevision?.description?.trim() || play.liveRevision?.description?.trim() || null;
|
|
2088
2140
|
const runCommand2 = this.playRunCommand(play, { csvInput });
|
|
2089
2141
|
const cloneEditStarter = this.playCloneEditStarter(play);
|
|
2090
2142
|
return {
|
|
2091
2143
|
name: play.name,
|
|
2092
2144
|
...play.reference ? { reference: play.reference } : {},
|
|
2093
2145
|
...play.displayName ? { displayName: play.displayName } : {},
|
|
2146
|
+
...description ? { description } : {},
|
|
2094
2147
|
origin: play.origin,
|
|
2095
2148
|
ownerType: play.ownerType,
|
|
2096
2149
|
canEdit: play.canEdit,
|
|
@@ -2311,6 +2364,7 @@ var DeeplineClient = class {
|
|
|
2311
2364
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2312
2365
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2313
2366
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2367
|
+
...request.description ? { description: request.description } : {},
|
|
2314
2368
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2315
2369
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2316
2370
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2349,6 +2403,7 @@ var DeeplineClient = class {
|
|
|
2349
2403
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2350
2404
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2351
2405
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2406
|
+
...request.description ? { description: request.description } : {},
|
|
2352
2407
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2353
2408
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2354
2409
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2506,6 +2561,7 @@ var DeeplineClient = class {
|
|
|
2506
2561
|
name: input2.name,
|
|
2507
2562
|
sourceCode: input2.sourceCode,
|
|
2508
2563
|
sourceFiles: input2.sourceFiles,
|
|
2564
|
+
description: input2.description,
|
|
2509
2565
|
artifact: input2.artifact,
|
|
2510
2566
|
compilerManifest,
|
|
2511
2567
|
publish: false
|
|
@@ -2518,6 +2574,7 @@ var DeeplineClient = class {
|
|
|
2518
2574
|
return this.startPlayRun({
|
|
2519
2575
|
name: input2.name,
|
|
2520
2576
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2577
|
+
description: input2.description,
|
|
2521
2578
|
compilerManifest,
|
|
2522
2579
|
...input2.input ? { input: input2.input } : {},
|
|
2523
2580
|
...input2.inputFile ? { inputFile: input2.inputFile } : {},
|
|
@@ -2572,6 +2629,7 @@ var DeeplineClient = class {
|
|
|
2572
2629
|
name,
|
|
2573
2630
|
sourceCode,
|
|
2574
2631
|
sourceFiles: options?.sourceFiles,
|
|
2632
|
+
description: options?.description,
|
|
2575
2633
|
artifact,
|
|
2576
2634
|
compilerManifest,
|
|
2577
2635
|
publish: false
|
|
@@ -2585,6 +2643,7 @@ var DeeplineClient = class {
|
|
|
2585
2643
|
name,
|
|
2586
2644
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2587
2645
|
sourceCode,
|
|
2646
|
+
description: options?.description,
|
|
2588
2647
|
staticPipeline: registeredArtifact.staticPipeline ?? null,
|
|
2589
2648
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
2590
2649
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
@@ -2884,15 +2943,21 @@ var DeeplineClient = class {
|
|
|
2884
2943
|
* ```
|
|
2885
2944
|
*/
|
|
2886
2945
|
async listRuns(options) {
|
|
2887
|
-
const playName = options.play
|
|
2888
|
-
|
|
2889
|
-
|
|
2946
|
+
const playName = options.play?.trim();
|
|
2947
|
+
const params = new URLSearchParams();
|
|
2948
|
+
if (playName) {
|
|
2949
|
+
params.set("play", playName);
|
|
2890
2950
|
}
|
|
2891
|
-
const params = new URLSearchParams({ play: playName });
|
|
2892
2951
|
const status = options.status?.trim();
|
|
2893
2952
|
if (status) {
|
|
2894
2953
|
params.set("status", status);
|
|
2895
2954
|
}
|
|
2955
|
+
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
2956
|
+
params.set("limit", String(Math.max(1, Math.floor(options.limit))));
|
|
2957
|
+
}
|
|
2958
|
+
if (!playName && !status) {
|
|
2959
|
+
throw new Error("runs.list requires options.play or options.status.");
|
|
2960
|
+
}
|
|
2896
2961
|
params.set("compact", "true");
|
|
2897
2962
|
const response = await this.http.get(
|
|
2898
2963
|
`/api/v2/runs?${params.toString()}`
|
|
@@ -3199,6 +3264,24 @@ var DeeplineClient = class {
|
|
|
3199
3264
|
options?.reason ? { reason: options.reason } : {}
|
|
3200
3265
|
);
|
|
3201
3266
|
}
|
|
3267
|
+
/**
|
|
3268
|
+
* Stop every active run visible to the current workspace.
|
|
3269
|
+
*
|
|
3270
|
+
* This is the SDK equivalent of:
|
|
3271
|
+
*
|
|
3272
|
+
* ```bash
|
|
3273
|
+
* deepline runs stop-all --reason "stale lock" --json
|
|
3274
|
+
* ```
|
|
3275
|
+
*
|
|
3276
|
+
* Use this when a failed parent run left child or waiting runs active and you
|
|
3277
|
+
* need to clear the workspace run-slot state without knowing each run id.
|
|
3278
|
+
*/
|
|
3279
|
+
async stopAllRuns(options) {
|
|
3280
|
+
return this.http.post(
|
|
3281
|
+
"/api/v2/runs/stop-all",
|
|
3282
|
+
options?.reason ? { reason: options.reason } : {}
|
|
3283
|
+
);
|
|
3284
|
+
}
|
|
3202
3285
|
/**
|
|
3203
3286
|
* List callable plays visible to the workspace.
|
|
3204
3287
|
*
|
|
@@ -8126,6 +8209,8 @@ export default definePlay(${jsString(input2.options.name)}, async (ctx, input: I
|
|
|
8126
8209
|
count: await rows.count(),
|
|
8127
8210
|
rows,
|
|
8128
8211
|
};
|
|
8212
|
+
}, {
|
|
8213
|
+
description: ${jsString(`Bootstrap ${input2.options.template}: seed source rows, run requested stages, and return mapped rows.`)},
|
|
8129
8214
|
});
|
|
8130
8215
|
|
|
8131
8216
|
`;
|
|
@@ -9509,6 +9594,24 @@ function requireCompilerManifest(node) {
|
|
|
9509
9594
|
}
|
|
9510
9595
|
return node.compilerManifest;
|
|
9511
9596
|
}
|
|
9597
|
+
function missingPlayDescriptionMessage(node) {
|
|
9598
|
+
const playName = node.playName ?? extractPlayName(node.sourceCode, node.filePath);
|
|
9599
|
+
return [
|
|
9600
|
+
`Play description is required for ${playName} (${node.filePath}).`,
|
|
9601
|
+
"Add a top-level description to definePlay so agents and future play surfaces can explain what this play does.",
|
|
9602
|
+
`Example: definePlay("${playName}", async (ctx, input) => { ... }, { description: "Look up company details from a domain." })`,
|
|
9603
|
+
`Object form: definePlay({ id: "${playName}", description: "Look up company details from a domain.", input, run })`
|
|
9604
|
+
].join(" ");
|
|
9605
|
+
}
|
|
9606
|
+
function collectMissingPlayDescriptionErrors(graph) {
|
|
9607
|
+
return [...graph.nodes.values()].filter((node) => !node.playDescription?.trim()).map(missingPlayDescriptionMessage);
|
|
9608
|
+
}
|
|
9609
|
+
function assertBundledPlayGraphDescriptions(graph) {
|
|
9610
|
+
const errors = collectMissingPlayDescriptionErrors(graph);
|
|
9611
|
+
if (errors.length > 0) {
|
|
9612
|
+
throw new Error(errors.join("\n"));
|
|
9613
|
+
}
|
|
9614
|
+
}
|
|
9512
9615
|
async function publishImportedPlayDependencies(client2, graph) {
|
|
9513
9616
|
const published = /* @__PURE__ */ new Set();
|
|
9514
9617
|
const publishNode = async (filePath, skipPublish) => {
|
|
@@ -9532,6 +9635,7 @@ async function publishImportedPlayDependencies(client2, graph) {
|
|
|
9532
9635
|
name: node.playName,
|
|
9533
9636
|
sourceCode: node.sourceCode,
|
|
9534
9637
|
sourceFiles: node.sourceFiles,
|
|
9638
|
+
description: node.playDescription ?? void 0,
|
|
9535
9639
|
artifact: node.artifact,
|
|
9536
9640
|
compilerManifest: requireCompilerManifest(node),
|
|
9537
9641
|
publish: true
|
|
@@ -12229,6 +12333,26 @@ async function handlePlayCheck(args) {
|
|
|
12229
12333
|
return 1;
|
|
12230
12334
|
}
|
|
12231
12335
|
const playName = graph.root.playName ?? extractPlayName(sourceCode, absolutePlayPath);
|
|
12336
|
+
const descriptionErrors = collectMissingPlayDescriptionErrors(graph);
|
|
12337
|
+
if (descriptionErrors.length > 0) {
|
|
12338
|
+
if (options.jsonOutput) {
|
|
12339
|
+
process.stdout.write(
|
|
12340
|
+
`${JSON.stringify({
|
|
12341
|
+
name: playName,
|
|
12342
|
+
valid: false,
|
|
12343
|
+
stage: "authoring",
|
|
12344
|
+
errors: descriptionErrors
|
|
12345
|
+
})}
|
|
12346
|
+
`
|
|
12347
|
+
);
|
|
12348
|
+
} else {
|
|
12349
|
+
console.error(`\u2717 ${playName} failed local play check`);
|
|
12350
|
+
for (const error of descriptionErrors) {
|
|
12351
|
+
console.error(` ${error}`);
|
|
12352
|
+
}
|
|
12353
|
+
}
|
|
12354
|
+
return 1;
|
|
12355
|
+
}
|
|
12232
12356
|
if (shouldUseLocalOnlyPlayCheck()) {
|
|
12233
12357
|
const result2 = {
|
|
12234
12358
|
valid: true,
|
|
@@ -12255,6 +12379,7 @@ async function handlePlayCheck(args) {
|
|
|
12255
12379
|
name: playName,
|
|
12256
12380
|
sourceCode: graph.root.sourceCode,
|
|
12257
12381
|
sourceFiles: graph.root.sourceFiles,
|
|
12382
|
+
description: graph.root.playDescription ?? void 0,
|
|
12258
12383
|
artifact: graph.root.artifact
|
|
12259
12384
|
});
|
|
12260
12385
|
const enrichedResult = {
|
|
@@ -12312,6 +12437,7 @@ async function handleFileBackedRun(options) {
|
|
|
12312
12437
|
{ targetKind: "file" },
|
|
12313
12438
|
() => collectBundledPlayGraph(absolutePlayPath, options.profile)
|
|
12314
12439
|
);
|
|
12440
|
+
assertBundledPlayGraphDescriptions(graph);
|
|
12315
12441
|
const canDeferCompilerManifest = graph.root.importedPlayDependencies.length === 0 && !sourceGraphMentionsRunPlay(graph.root) && !inputContainsLocalFilePath(runtimeInput);
|
|
12316
12442
|
if (canDeferCompilerManifest) {
|
|
12317
12443
|
recordCliTrace({
|
|
@@ -12376,6 +12502,7 @@ async function handleFileBackedRun(options) {
|
|
|
12376
12502
|
name: playName,
|
|
12377
12503
|
sourceCode: bundleResult.sourceCode,
|
|
12378
12504
|
sourceFiles: bundleResult.sourceFiles,
|
|
12505
|
+
description: bundleResult.playDescription ?? void 0,
|
|
12379
12506
|
runtimeArtifact: bundleResult.artifact,
|
|
12380
12507
|
...compilerManifest ? { compilerManifest } : {},
|
|
12381
12508
|
packagedFileUploads,
|
|
@@ -12675,7 +12802,7 @@ async function handleRunGet(args) {
|
|
|
12675
12802
|
return 0;
|
|
12676
12803
|
}
|
|
12677
12804
|
async function handleRunsList(args) {
|
|
12678
|
-
const usage = "Usage: deepline runs list --play <play-name> [--status <status>] [--json]";
|
|
12805
|
+
const usage = "Usage: deepline runs list [--play <play-name>] [--status <status>] [--json]";
|
|
12679
12806
|
let playName = null;
|
|
12680
12807
|
let statusFilter = null;
|
|
12681
12808
|
for (let index = 0; index < args.length; index += 1) {
|
|
@@ -12692,28 +12819,32 @@ async function handleRunsList(args) {
|
|
|
12692
12819
|
continue;
|
|
12693
12820
|
}
|
|
12694
12821
|
}
|
|
12695
|
-
if (!playName) {
|
|
12822
|
+
if (!playName && !statusFilter) {
|
|
12696
12823
|
console.error(usage);
|
|
12697
12824
|
return 1;
|
|
12698
12825
|
}
|
|
12699
12826
|
const client2 = new DeeplineClient();
|
|
12700
12827
|
const runs = (await client2.runs.list({
|
|
12701
|
-
play: playName,
|
|
12828
|
+
...playName ? { play: playName } : {},
|
|
12702
12829
|
...statusFilter ? { status: statusFilter } : {}
|
|
12703
12830
|
})).map((run) => ({
|
|
12704
12831
|
runId: run.workflowId,
|
|
12705
12832
|
workflowId: run.workflowId,
|
|
12706
12833
|
temporalRunId: run.runId,
|
|
12834
|
+
parentRunId: run.parentRunId ?? null,
|
|
12835
|
+
rootRunId: run.rootRunId ?? null,
|
|
12707
12836
|
status: String(run.status ?? "").toLowerCase(),
|
|
12708
|
-
startedAt: run.startTime,
|
|
12709
|
-
finishedAt: run.closeTime,
|
|
12837
|
+
startedAt: run.startTime ?? run.startedAt ?? null,
|
|
12838
|
+
finishedAt: run.closeTime ?? run.finishedAt ?? null,
|
|
12710
12839
|
executionTime: run.executionTime,
|
|
12711
12840
|
billingTotalCredits: run.billingTotalCredits,
|
|
12712
12841
|
billingMaxCreditsPerRun: run.billingMaxCreditsPerRun,
|
|
12713
|
-
playName: run.memo?.playName ?? playName
|
|
12842
|
+
playName: run.playName ?? run.memo?.playName ?? playName ?? null
|
|
12714
12843
|
}));
|
|
12715
|
-
const lines = runs.length === 0 ? [
|
|
12716
|
-
|
|
12844
|
+
const lines = runs.length === 0 ? [
|
|
12845
|
+
playName ? `No runs found for ${playName}.` : `No runs found for status ${statusFilter}.`
|
|
12846
|
+
] : runs.map(
|
|
12847
|
+
(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}` : ""}`
|
|
12717
12848
|
);
|
|
12718
12849
|
printCommandEnvelope(
|
|
12719
12850
|
{
|
|
@@ -12899,6 +13030,31 @@ async function handleRunStop(args) {
|
|
|
12899
13030
|
);
|
|
12900
13031
|
return 0;
|
|
12901
13032
|
}
|
|
13033
|
+
async function handleRunStopAll(args) {
|
|
13034
|
+
let reason;
|
|
13035
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
13036
|
+
const arg = args[index];
|
|
13037
|
+
if (arg === "--reason" && args[index + 1]) {
|
|
13038
|
+
reason = args[++index];
|
|
13039
|
+
}
|
|
13040
|
+
}
|
|
13041
|
+
const client2 = new DeeplineClient();
|
|
13042
|
+
const result = await client2.runs.stopAll({ reason });
|
|
13043
|
+
const lines = [
|
|
13044
|
+
`Stopped ${result.stopped} active run${result.stopped === 1 ? "" : "s"}`,
|
|
13045
|
+
...result.partial ? ["partial: active runs may remain; rerun stop-all"] : [],
|
|
13046
|
+
...result.failed > 0 ? [`failed stops: ${result.failed}`] : [],
|
|
13047
|
+
...result.skipped > 0 ? [`skipped: ${result.skipped}`] : []
|
|
13048
|
+
];
|
|
13049
|
+
printCommandEnvelope(
|
|
13050
|
+
{
|
|
13051
|
+
...result,
|
|
13052
|
+
render: { sections: [{ title: "workspace stop-all", lines }] }
|
|
13053
|
+
},
|
|
13054
|
+
{ json: argsWantJson(args) }
|
|
13055
|
+
);
|
|
13056
|
+
return result.failed > 0 || result.partial ? 1 : 0;
|
|
13057
|
+
}
|
|
12902
13058
|
async function handleRunExport(args) {
|
|
12903
13059
|
const usage = "Usage: deepline runs export <run-id> [--dataset result.rows] --out output.csv [--metadata-out export.json] [--json]";
|
|
12904
13060
|
let runId;
|
|
@@ -13158,6 +13314,9 @@ function printPlayDescription(play) {
|
|
|
13158
13314
|
if (play.displayName && play.displayName !== play.name) {
|
|
13159
13315
|
console.log(` Display name: ${play.displayName}`);
|
|
13160
13316
|
}
|
|
13317
|
+
if (play.description) {
|
|
13318
|
+
console.log(` Description: ${play.description}`);
|
|
13319
|
+
}
|
|
13161
13320
|
if (play.aliases.length > 0) {
|
|
13162
13321
|
console.log(` Aliases: ${play.aliases.join(", ")}`);
|
|
13163
13322
|
}
|
|
@@ -13210,6 +13369,9 @@ function printCompactPlaySearchResult(play) {
|
|
|
13210
13369
|
if (play.displayName && play.displayName !== play.name) {
|
|
13211
13370
|
console.log(` Display name: ${play.displayName}`);
|
|
13212
13371
|
}
|
|
13372
|
+
if (play.description) {
|
|
13373
|
+
console.log(` Description: ${play.description}`);
|
|
13374
|
+
}
|
|
13213
13375
|
if (aliases) {
|
|
13214
13376
|
console.log(` Aliases: ${aliases}`);
|
|
13215
13377
|
}
|
|
@@ -13523,6 +13685,7 @@ async function handlePlayPublish(args) {
|
|
|
13523
13685
|
{ targetKind: "file" },
|
|
13524
13686
|
() => collectBundledPlayGraph((0, import_node_path10.resolve)(playName))
|
|
13525
13687
|
);
|
|
13688
|
+
assertBundledPlayGraphDescriptions(graph);
|
|
13526
13689
|
await traceCliSpan(
|
|
13527
13690
|
"cli.play_publish_compile_manifests",
|
|
13528
13691
|
{ targetKind: "file", nodeCount: graph.nodes.size },
|
|
@@ -13549,6 +13712,7 @@ async function handlePlayPublish(args) {
|
|
|
13549
13712
|
name: rootPlayName,
|
|
13550
13713
|
sourceCode: graph.root.sourceCode,
|
|
13551
13714
|
sourceFiles: graph.root.sourceFiles,
|
|
13715
|
+
description: graph.root.playDescription ?? void 0,
|
|
13552
13716
|
artifact: graph.root.artifact,
|
|
13553
13717
|
compilerManifest: requireCompilerManifest(graph.root),
|
|
13554
13718
|
publish: true
|
|
@@ -13927,7 +14091,9 @@ Examples:
|
|
|
13927
14091
|
`
|
|
13928
14092
|
);
|
|
13929
14093
|
addPublishHelp(
|
|
13930
|
-
play.command("publish <target>").description(
|
|
14094
|
+
play.command("publish <target>").description(
|
|
14095
|
+
"Promote a saved play revision or publish a local play file."
|
|
14096
|
+
)
|
|
13931
14097
|
).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) => {
|
|
13932
14098
|
process.exitCode = await handlePlayPublish([
|
|
13933
14099
|
target,
|
|
@@ -13937,9 +14103,7 @@ Examples:
|
|
|
13937
14103
|
]);
|
|
13938
14104
|
});
|
|
13939
14105
|
addPublishHelp(
|
|
13940
|
-
play.command("set-live <target>").description(
|
|
13941
|
-
"Promote a saved revision or publish a local play file."
|
|
13942
|
-
)
|
|
14106
|
+
play.command("set-live <target>").description("Promote a saved revision or publish a local play file.")
|
|
13943
14107
|
).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) => {
|
|
13944
14108
|
process.exitCode = await handlePlayPublish([
|
|
13945
14109
|
target,
|
|
@@ -13980,7 +14144,9 @@ Examples:
|
|
|
13980
14144
|
deepline runs tail play/my-play/run/20260501t000000-000
|
|
13981
14145
|
deepline runs logs play/my-play/run/20260501t000000-000 --out run.log --json
|
|
13982
14146
|
deepline runs list --play my-play --status failed --json
|
|
14147
|
+
deepline runs list --status running --json
|
|
13983
14148
|
deepline runs stop play/my-play/run/20260501t000000-000 --reason "stale lock" --json
|
|
14149
|
+
deepline runs stop-all --reason "unjam workspace" --json
|
|
13984
14150
|
deepline runs export play/my-play/run/20260501t000000-000 --out output.csv
|
|
13985
14151
|
`
|
|
13986
14152
|
);
|
|
@@ -14014,16 +14180,32 @@ Notes:
|
|
|
14014
14180
|
Examples:
|
|
14015
14181
|
deepline runs list --play my-play
|
|
14016
14182
|
deepline runs list --play my-play --status failed --compact --json
|
|
14183
|
+
deepline runs list --status running --compact --json
|
|
14017
14184
|
`
|
|
14018
|
-
).
|
|
14185
|
+
).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) => {
|
|
14019
14186
|
process.exitCode = await handleRunsList([
|
|
14020
|
-
"--play",
|
|
14021
|
-
options.play,
|
|
14187
|
+
...options.play ? ["--play", options.play] : [],
|
|
14022
14188
|
...options.status ? ["--status", options.status] : [],
|
|
14023
14189
|
...options.compact ? ["--compact"] : [],
|
|
14024
14190
|
...options.json ? ["--json"] : []
|
|
14025
14191
|
]);
|
|
14026
14192
|
});
|
|
14193
|
+
runs.command("stop-all").description("Stop active play runs in the current workspace.").addHelpText(
|
|
14194
|
+
"after",
|
|
14195
|
+
`
|
|
14196
|
+
Notes:
|
|
14197
|
+
Stops all active runs visible to this workspace, including child runs created by ctx.runPlay.
|
|
14198
|
+
|
|
14199
|
+
Examples:
|
|
14200
|
+
deepline runs stop-all --reason "unjam workspace"
|
|
14201
|
+
deepline runs stop-all --json
|
|
14202
|
+
`
|
|
14203
|
+
).option("--reason <text>", "Reason to include with each stop request").option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
|
|
14204
|
+
process.exitCode = await handleRunStopAll([
|
|
14205
|
+
...options.reason ? ["--reason", options.reason] : [],
|
|
14206
|
+
...options.json ? ["--json"] : []
|
|
14207
|
+
]);
|
|
14208
|
+
});
|
|
14027
14209
|
runs.command("tail <runId>").description("Read the canonical live stream for a play run.").addHelpText(
|
|
14028
14210
|
"after",
|
|
14029
14211
|
`
|
|
@@ -14979,7 +15161,7 @@ function compileEnrichConfigToPlaySource(config, options = {}) {
|
|
|
14979
15161
|
...metadataColumnSource ? [metadataColumnSource] : [],
|
|
14980
15162
|
` .run({ key: (row, index) => __dlStableRowKey(row, index + rowStart) });`,
|
|
14981
15163
|
` return { rows: enriched, count: await enriched.count() };`,
|
|
14982
|
-
`});`
|
|
15164
|
+
`}, { description: ${stringLiteral("Read a CSV file, run the configured Deepline enrich commands, and return enriched rows.")} });`
|
|
14983
15165
|
];
|
|
14984
15166
|
const helpers = idiomaticGetters ? selectUsedHelpers(helperSource(), body.join("\n")) : helperSource();
|
|
14985
15167
|
return [
|
|
@@ -20272,6 +20454,8 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
|
|
|
20272
20454
|
rows: enrichedData,
|
|
20273
20455
|
count: await enrichedData.count(),
|
|
20274
20456
|
};
|
|
20457
|
+
}, {
|
|
20458
|
+
description: ${JSON.stringify(`Seed ${input2.toolId} rows into a Deepline workflow-ready dataset.`)},
|
|
20275
20459
|
});
|
|
20276
20460
|
`;
|
|
20277
20461
|
(0, import_node_fs13.writeFileSync)(scriptPath, script, { encoding: "utf-8", mode: 384 });
|
|
@@ -22187,6 +22371,16 @@ function isLegacyNoopInvocation() {
|
|
|
22187
22371
|
const command = process.argv.slice(2)[0];
|
|
22188
22372
|
return command === "session" || command === "backend";
|
|
22189
22373
|
}
|
|
22374
|
+
function compatibilityCommandPath(command) {
|
|
22375
|
+
const names = [];
|
|
22376
|
+
let current = command;
|
|
22377
|
+
while (current?.parent) {
|
|
22378
|
+
const name = current.name();
|
|
22379
|
+
if (name) names.unshift(name);
|
|
22380
|
+
current = current.parent;
|
|
22381
|
+
}
|
|
22382
|
+
return names.join(" ");
|
|
22383
|
+
}
|
|
22190
22384
|
function topLevelCommandKnown(program, commandName) {
|
|
22191
22385
|
const normalized = commandName.trim();
|
|
22192
22386
|
if (!normalized || normalized.startsWith("-")) {
|
|
@@ -22211,6 +22405,8 @@ async function runPlayRunnerHealthCheck() {
|
|
|
22211
22405
|
" .withColumn('echo', (row) => ({ ok: true, id: row.id }))",
|
|
22212
22406
|
" .run({ key: 'id' });",
|
|
22213
22407
|
" return { ok: true, rows, source: 'deepline health --play-runner' };",
|
|
22408
|
+
"}, {",
|
|
22409
|
+
" description: 'Run a local Deepline play health check with a tiny dataset.',",
|
|
22214
22410
|
"});",
|
|
22215
22411
|
""
|
|
22216
22412
|
].join("\n"),
|
|
@@ -22422,11 +22618,12 @@ Exit codes:
|
|
|
22422
22618
|
progress?.phase("checking sdk compatibility");
|
|
22423
22619
|
}
|
|
22424
22620
|
const baseUrl = autoDetectBaseUrl().replace(/\/$/, "");
|
|
22621
|
+
const compatibilityCommand = compatibilityCommandPath(actionCommand) || actionCommand.name();
|
|
22425
22622
|
const compatibility = await traceCliSpan(
|
|
22426
22623
|
"cli.sdk_compatibility",
|
|
22427
|
-
{ baseUrl, command:
|
|
22624
|
+
{ baseUrl, command: compatibilityCommand },
|
|
22428
22625
|
() => checkSdkCompatibility(baseUrl, {
|
|
22429
|
-
command:
|
|
22626
|
+
command: compatibilityCommand
|
|
22430
22627
|
})
|
|
22431
22628
|
);
|
|
22432
22629
|
if (compatibility.error) {
|