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/index.d.mts
CHANGED
|
@@ -515,22 +515,41 @@ interface StopPlayRunResult {
|
|
|
515
515
|
/** Server-side error detail when the stop was not confirmed. */
|
|
516
516
|
error?: string;
|
|
517
517
|
}
|
|
518
|
+
interface StopAllPlayRunsResult {
|
|
519
|
+
stopped: number;
|
|
520
|
+
failed: number;
|
|
521
|
+
skipped: number;
|
|
522
|
+
partial?: boolean;
|
|
523
|
+
runs: Array<StopPlayRunResult & {
|
|
524
|
+
status?: string | null;
|
|
525
|
+
}>;
|
|
526
|
+
}
|
|
518
527
|
/**
|
|
519
528
|
* Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
|
|
520
529
|
*/
|
|
521
530
|
interface PlayRunListItem {
|
|
522
531
|
/** Public Deepline play-run id. */
|
|
523
532
|
workflowId: string;
|
|
533
|
+
/** Saved play name for this run, when available. */
|
|
534
|
+
playName?: string | null;
|
|
524
535
|
/** Backend run attempt id, when exposed. */
|
|
525
536
|
runId: string;
|
|
537
|
+
/** Parent play-run id when this run was launched through ctx.runPlay. */
|
|
538
|
+
parentRunId?: string | null;
|
|
539
|
+
/** Root play-run id for nested ctx.runPlay descendants. */
|
|
540
|
+
rootRunId?: string | null;
|
|
526
541
|
/** Workflow type (typically `'Workflow'`). */
|
|
527
542
|
type: string;
|
|
528
543
|
/** Human-readable status (e.g. `'Completed'`, `'Failed'`). */
|
|
529
544
|
status: string;
|
|
530
545
|
/** ISO 8601 timestamp when the run started. */
|
|
531
|
-
startTime
|
|
546
|
+
startTime?: string | null;
|
|
547
|
+
/** Unix epoch milliseconds when the run started, returned by normalized V2 run summaries. */
|
|
548
|
+
startedAt?: number | string | null;
|
|
532
549
|
/** ISO 8601 timestamp when the run finished. */
|
|
533
|
-
closeTime
|
|
550
|
+
closeTime?: string | null;
|
|
551
|
+
/** Unix epoch milliseconds when the run finished, returned by normalized V2 run summaries. */
|
|
552
|
+
finishedAt?: number | string | null;
|
|
534
553
|
/** Duration string (e.g. `'2.5s'`). */
|
|
535
554
|
executionTime: string | null;
|
|
536
555
|
/** Total Deepline credits charged for the run, when available. */
|
|
@@ -678,6 +697,7 @@ interface PlayListItem {
|
|
|
678
697
|
reference?: string;
|
|
679
698
|
name: string;
|
|
680
699
|
displayName?: string;
|
|
700
|
+
description?: string | null;
|
|
681
701
|
origin?: 'prebuilt' | 'owned';
|
|
682
702
|
ownerType?: 'deepline' | 'org';
|
|
683
703
|
ownerSlug?: string;
|
|
@@ -703,6 +723,7 @@ interface PlayDescription {
|
|
|
703
723
|
name: string;
|
|
704
724
|
reference?: string;
|
|
705
725
|
displayName?: string;
|
|
726
|
+
description?: string | null;
|
|
706
727
|
origin?: 'prebuilt' | 'owned';
|
|
707
728
|
ownerType?: 'deepline' | 'org';
|
|
708
729
|
canEdit?: boolean;
|
|
@@ -854,6 +875,8 @@ interface StartPlayRunRequest {
|
|
|
854
875
|
sourceCode?: string;
|
|
855
876
|
/** Source graph snapshots for local helper files included in cloud preflight. */
|
|
856
877
|
sourceFiles?: Record<string, string>;
|
|
878
|
+
/** Human-readable one-line description for the revision created by file-backed runs. */
|
|
879
|
+
description?: string;
|
|
857
880
|
/** Static pipeline already produced while registering this artifact. */
|
|
858
881
|
staticPipeline?: unknown;
|
|
859
882
|
/** Artifact content hash already validated while registering this artifact. */
|
|
@@ -1041,8 +1064,9 @@ type ToolExecution<TData = unknown, TMeta = Record<string, unknown>> = {
|
|
|
1041
1064
|
};
|
|
1042
1065
|
/** Filters for `client.runs.list(...)`. */
|
|
1043
1066
|
type RunsListOptions = {
|
|
1044
|
-
play
|
|
1067
|
+
play?: string;
|
|
1045
1068
|
status?: string;
|
|
1069
|
+
limit?: number;
|
|
1046
1070
|
};
|
|
1047
1071
|
/** Streaming options for `client.runs.tail(...)`. */
|
|
1048
1072
|
type RunsTailOptions = {
|
|
@@ -1155,6 +1179,10 @@ type RunsNamespace = {
|
|
|
1155
1179
|
stop: (runId: string, options?: {
|
|
1156
1180
|
reason?: string;
|
|
1157
1181
|
}) => Promise<StopPlayRunResult>;
|
|
1182
|
+
/** Stop active runs across the current workspace. */
|
|
1183
|
+
stopAll: (options?: {
|
|
1184
|
+
reason?: string;
|
|
1185
|
+
}) => Promise<StopAllPlayRunsResult>;
|
|
1158
1186
|
};
|
|
1159
1187
|
/** One credit grant pool reported by the billing subscription status endpoint. */
|
|
1160
1188
|
type BillingCreditPool = {
|
|
@@ -1488,6 +1516,7 @@ declare class DeeplineClient {
|
|
|
1488
1516
|
name: string;
|
|
1489
1517
|
sourceCode: string;
|
|
1490
1518
|
sourceFiles?: Record<string, string>;
|
|
1519
|
+
description?: string;
|
|
1491
1520
|
artifact: Record<string, unknown>;
|
|
1492
1521
|
compilerManifest?: PlayCompilerManifest;
|
|
1493
1522
|
publish?: boolean;
|
|
@@ -1517,6 +1546,7 @@ declare class DeeplineClient {
|
|
|
1517
1546
|
name: string;
|
|
1518
1547
|
sourceCode: string;
|
|
1519
1548
|
sourceFiles?: Record<string, string>;
|
|
1549
|
+
description?: string;
|
|
1520
1550
|
artifact: Record<string, unknown>;
|
|
1521
1551
|
compilerManifest?: PlayCompilerManifest;
|
|
1522
1552
|
publish?: boolean;
|
|
@@ -1564,6 +1594,7 @@ declare class DeeplineClient {
|
|
|
1564
1594
|
name?: string;
|
|
1565
1595
|
sourceCode: string;
|
|
1566
1596
|
sourceFiles?: Record<string, string>;
|
|
1597
|
+
description?: string;
|
|
1567
1598
|
artifact: Record<string, unknown>;
|
|
1568
1599
|
}): Promise<PlayCheckResult>;
|
|
1569
1600
|
/**
|
|
@@ -1589,6 +1620,7 @@ declare class DeeplineClient {
|
|
|
1589
1620
|
name: string;
|
|
1590
1621
|
sourceCode: string;
|
|
1591
1622
|
sourceFiles?: Record<string, string>;
|
|
1623
|
+
description?: string;
|
|
1592
1624
|
artifact: Record<string, unknown>;
|
|
1593
1625
|
compilerManifest?: PlayCompilerManifest;
|
|
1594
1626
|
input?: Record<string, unknown>;
|
|
@@ -1623,6 +1655,7 @@ declare class DeeplineClient {
|
|
|
1623
1655
|
submitPlay(code: string, csvPath: string | null, name?: string, options?: {
|
|
1624
1656
|
sourceCode?: string;
|
|
1625
1657
|
sourceFiles?: Record<string, string>;
|
|
1658
|
+
description?: string;
|
|
1626
1659
|
artifact?: Record<string, unknown>;
|
|
1627
1660
|
compilerManifest?: PlayCompilerManifest;
|
|
1628
1661
|
input?: Record<string, unknown>;
|
|
@@ -1890,6 +1923,21 @@ declare class DeeplineClient {
|
|
|
1890
1923
|
stopRun(runId: string, options?: {
|
|
1891
1924
|
reason?: string;
|
|
1892
1925
|
}): Promise<StopPlayRunResult>;
|
|
1926
|
+
/**
|
|
1927
|
+
* Stop every active run visible to the current workspace.
|
|
1928
|
+
*
|
|
1929
|
+
* This is the SDK equivalent of:
|
|
1930
|
+
*
|
|
1931
|
+
* ```bash
|
|
1932
|
+
* deepline runs stop-all --reason "stale lock" --json
|
|
1933
|
+
* ```
|
|
1934
|
+
*
|
|
1935
|
+
* Use this when a failed parent run left child or waiting runs active and you
|
|
1936
|
+
* need to clear the workspace run-slot state without knowing each run id.
|
|
1937
|
+
*/
|
|
1938
|
+
stopAllRuns(options?: {
|
|
1939
|
+
reason?: string;
|
|
1940
|
+
}): Promise<StopAllPlayRunsResult>;
|
|
1893
1941
|
/**
|
|
1894
1942
|
* List callable plays visible to the workspace.
|
|
1895
1943
|
*
|
|
@@ -2701,6 +2749,14 @@ type PreviousCell<Value = unknown> = {
|
|
|
2701
2749
|
* @sdkReference runtime 030
|
|
2702
2750
|
*/
|
|
2703
2751
|
type PlayBindings = {
|
|
2752
|
+
/**
|
|
2753
|
+
* Human-readable one-line description of what this play does.
|
|
2754
|
+
*
|
|
2755
|
+
* New SDK-authored file workflows require this in `plays check`, `plays run
|
|
2756
|
+
* --file`, and `plays publish <file>`. The server API keeps it optional so
|
|
2757
|
+
* older clients can continue to register revisions during the migration.
|
|
2758
|
+
*/
|
|
2759
|
+
description?: string;
|
|
2704
2760
|
/** Optional per-run billing controls enforced by the runtime. */
|
|
2705
2761
|
billing?: {
|
|
2706
2762
|
/** Stop the run before a billed action would push total run credits above this cap. */
|
|
@@ -3508,6 +3564,8 @@ type PlayInputContract<TInput> = {
|
|
|
3508
3564
|
type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = {
|
|
3509
3565
|
/** Play id/name. */
|
|
3510
3566
|
id: string;
|
|
3567
|
+
/** Human-readable one-line description of what this play does. */
|
|
3568
|
+
description?: string;
|
|
3511
3569
|
/** Input schema. */
|
|
3512
3570
|
input: PlayInputContract<TInput>;
|
|
3513
3571
|
/** Play function. */
|
|
@@ -3561,6 +3619,7 @@ type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((ctx: DeeplinePlay
|
|
|
3561
3619
|
};
|
|
3562
3620
|
type PlayMetadata = {
|
|
3563
3621
|
name: string;
|
|
3622
|
+
description?: string;
|
|
3564
3623
|
bindings?: PlayBindings;
|
|
3565
3624
|
inputSchema?: Record<string, unknown>;
|
|
3566
3625
|
billing?: PlayBindings['billing'];
|
package/dist/index.d.ts
CHANGED
|
@@ -515,22 +515,41 @@ interface StopPlayRunResult {
|
|
|
515
515
|
/** Server-side error detail when the stop was not confirmed. */
|
|
516
516
|
error?: string;
|
|
517
517
|
}
|
|
518
|
+
interface StopAllPlayRunsResult {
|
|
519
|
+
stopped: number;
|
|
520
|
+
failed: number;
|
|
521
|
+
skipped: number;
|
|
522
|
+
partial?: boolean;
|
|
523
|
+
runs: Array<StopPlayRunResult & {
|
|
524
|
+
status?: string | null;
|
|
525
|
+
}>;
|
|
526
|
+
}
|
|
518
527
|
/**
|
|
519
528
|
* Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
|
|
520
529
|
*/
|
|
521
530
|
interface PlayRunListItem {
|
|
522
531
|
/** Public Deepline play-run id. */
|
|
523
532
|
workflowId: string;
|
|
533
|
+
/** Saved play name for this run, when available. */
|
|
534
|
+
playName?: string | null;
|
|
524
535
|
/** Backend run attempt id, when exposed. */
|
|
525
536
|
runId: string;
|
|
537
|
+
/** Parent play-run id when this run was launched through ctx.runPlay. */
|
|
538
|
+
parentRunId?: string | null;
|
|
539
|
+
/** Root play-run id for nested ctx.runPlay descendants. */
|
|
540
|
+
rootRunId?: string | null;
|
|
526
541
|
/** Workflow type (typically `'Workflow'`). */
|
|
527
542
|
type: string;
|
|
528
543
|
/** Human-readable status (e.g. `'Completed'`, `'Failed'`). */
|
|
529
544
|
status: string;
|
|
530
545
|
/** ISO 8601 timestamp when the run started. */
|
|
531
|
-
startTime
|
|
546
|
+
startTime?: string | null;
|
|
547
|
+
/** Unix epoch milliseconds when the run started, returned by normalized V2 run summaries. */
|
|
548
|
+
startedAt?: number | string | null;
|
|
532
549
|
/** ISO 8601 timestamp when the run finished. */
|
|
533
|
-
closeTime
|
|
550
|
+
closeTime?: string | null;
|
|
551
|
+
/** Unix epoch milliseconds when the run finished, returned by normalized V2 run summaries. */
|
|
552
|
+
finishedAt?: number | string | null;
|
|
534
553
|
/** Duration string (e.g. `'2.5s'`). */
|
|
535
554
|
executionTime: string | null;
|
|
536
555
|
/** Total Deepline credits charged for the run, when available. */
|
|
@@ -678,6 +697,7 @@ interface PlayListItem {
|
|
|
678
697
|
reference?: string;
|
|
679
698
|
name: string;
|
|
680
699
|
displayName?: string;
|
|
700
|
+
description?: string | null;
|
|
681
701
|
origin?: 'prebuilt' | 'owned';
|
|
682
702
|
ownerType?: 'deepline' | 'org';
|
|
683
703
|
ownerSlug?: string;
|
|
@@ -703,6 +723,7 @@ interface PlayDescription {
|
|
|
703
723
|
name: string;
|
|
704
724
|
reference?: string;
|
|
705
725
|
displayName?: string;
|
|
726
|
+
description?: string | null;
|
|
706
727
|
origin?: 'prebuilt' | 'owned';
|
|
707
728
|
ownerType?: 'deepline' | 'org';
|
|
708
729
|
canEdit?: boolean;
|
|
@@ -854,6 +875,8 @@ interface StartPlayRunRequest {
|
|
|
854
875
|
sourceCode?: string;
|
|
855
876
|
/** Source graph snapshots for local helper files included in cloud preflight. */
|
|
856
877
|
sourceFiles?: Record<string, string>;
|
|
878
|
+
/** Human-readable one-line description for the revision created by file-backed runs. */
|
|
879
|
+
description?: string;
|
|
857
880
|
/** Static pipeline already produced while registering this artifact. */
|
|
858
881
|
staticPipeline?: unknown;
|
|
859
882
|
/** Artifact content hash already validated while registering this artifact. */
|
|
@@ -1041,8 +1064,9 @@ type ToolExecution<TData = unknown, TMeta = Record<string, unknown>> = {
|
|
|
1041
1064
|
};
|
|
1042
1065
|
/** Filters for `client.runs.list(...)`. */
|
|
1043
1066
|
type RunsListOptions = {
|
|
1044
|
-
play
|
|
1067
|
+
play?: string;
|
|
1045
1068
|
status?: string;
|
|
1069
|
+
limit?: number;
|
|
1046
1070
|
};
|
|
1047
1071
|
/** Streaming options for `client.runs.tail(...)`. */
|
|
1048
1072
|
type RunsTailOptions = {
|
|
@@ -1155,6 +1179,10 @@ type RunsNamespace = {
|
|
|
1155
1179
|
stop: (runId: string, options?: {
|
|
1156
1180
|
reason?: string;
|
|
1157
1181
|
}) => Promise<StopPlayRunResult>;
|
|
1182
|
+
/** Stop active runs across the current workspace. */
|
|
1183
|
+
stopAll: (options?: {
|
|
1184
|
+
reason?: string;
|
|
1185
|
+
}) => Promise<StopAllPlayRunsResult>;
|
|
1158
1186
|
};
|
|
1159
1187
|
/** One credit grant pool reported by the billing subscription status endpoint. */
|
|
1160
1188
|
type BillingCreditPool = {
|
|
@@ -1488,6 +1516,7 @@ declare class DeeplineClient {
|
|
|
1488
1516
|
name: string;
|
|
1489
1517
|
sourceCode: string;
|
|
1490
1518
|
sourceFiles?: Record<string, string>;
|
|
1519
|
+
description?: string;
|
|
1491
1520
|
artifact: Record<string, unknown>;
|
|
1492
1521
|
compilerManifest?: PlayCompilerManifest;
|
|
1493
1522
|
publish?: boolean;
|
|
@@ -1517,6 +1546,7 @@ declare class DeeplineClient {
|
|
|
1517
1546
|
name: string;
|
|
1518
1547
|
sourceCode: string;
|
|
1519
1548
|
sourceFiles?: Record<string, string>;
|
|
1549
|
+
description?: string;
|
|
1520
1550
|
artifact: Record<string, unknown>;
|
|
1521
1551
|
compilerManifest?: PlayCompilerManifest;
|
|
1522
1552
|
publish?: boolean;
|
|
@@ -1564,6 +1594,7 @@ declare class DeeplineClient {
|
|
|
1564
1594
|
name?: string;
|
|
1565
1595
|
sourceCode: string;
|
|
1566
1596
|
sourceFiles?: Record<string, string>;
|
|
1597
|
+
description?: string;
|
|
1567
1598
|
artifact: Record<string, unknown>;
|
|
1568
1599
|
}): Promise<PlayCheckResult>;
|
|
1569
1600
|
/**
|
|
@@ -1589,6 +1620,7 @@ declare class DeeplineClient {
|
|
|
1589
1620
|
name: string;
|
|
1590
1621
|
sourceCode: string;
|
|
1591
1622
|
sourceFiles?: Record<string, string>;
|
|
1623
|
+
description?: string;
|
|
1592
1624
|
artifact: Record<string, unknown>;
|
|
1593
1625
|
compilerManifest?: PlayCompilerManifest;
|
|
1594
1626
|
input?: Record<string, unknown>;
|
|
@@ -1623,6 +1655,7 @@ declare class DeeplineClient {
|
|
|
1623
1655
|
submitPlay(code: string, csvPath: string | null, name?: string, options?: {
|
|
1624
1656
|
sourceCode?: string;
|
|
1625
1657
|
sourceFiles?: Record<string, string>;
|
|
1658
|
+
description?: string;
|
|
1626
1659
|
artifact?: Record<string, unknown>;
|
|
1627
1660
|
compilerManifest?: PlayCompilerManifest;
|
|
1628
1661
|
input?: Record<string, unknown>;
|
|
@@ -1890,6 +1923,21 @@ declare class DeeplineClient {
|
|
|
1890
1923
|
stopRun(runId: string, options?: {
|
|
1891
1924
|
reason?: string;
|
|
1892
1925
|
}): Promise<StopPlayRunResult>;
|
|
1926
|
+
/**
|
|
1927
|
+
* Stop every active run visible to the current workspace.
|
|
1928
|
+
*
|
|
1929
|
+
* This is the SDK equivalent of:
|
|
1930
|
+
*
|
|
1931
|
+
* ```bash
|
|
1932
|
+
* deepline runs stop-all --reason "stale lock" --json
|
|
1933
|
+
* ```
|
|
1934
|
+
*
|
|
1935
|
+
* Use this when a failed parent run left child or waiting runs active and you
|
|
1936
|
+
* need to clear the workspace run-slot state without knowing each run id.
|
|
1937
|
+
*/
|
|
1938
|
+
stopAllRuns(options?: {
|
|
1939
|
+
reason?: string;
|
|
1940
|
+
}): Promise<StopAllPlayRunsResult>;
|
|
1893
1941
|
/**
|
|
1894
1942
|
* List callable plays visible to the workspace.
|
|
1895
1943
|
*
|
|
@@ -2701,6 +2749,14 @@ type PreviousCell<Value = unknown> = {
|
|
|
2701
2749
|
* @sdkReference runtime 030
|
|
2702
2750
|
*/
|
|
2703
2751
|
type PlayBindings = {
|
|
2752
|
+
/**
|
|
2753
|
+
* Human-readable one-line description of what this play does.
|
|
2754
|
+
*
|
|
2755
|
+
* New SDK-authored file workflows require this in `plays check`, `plays run
|
|
2756
|
+
* --file`, and `plays publish <file>`. The server API keeps it optional so
|
|
2757
|
+
* older clients can continue to register revisions during the migration.
|
|
2758
|
+
*/
|
|
2759
|
+
description?: string;
|
|
2704
2760
|
/** Optional per-run billing controls enforced by the runtime. */
|
|
2705
2761
|
billing?: {
|
|
2706
2762
|
/** Stop the run before a billed action would push total run credits above this cap. */
|
|
@@ -3508,6 +3564,8 @@ type PlayInputContract<TInput> = {
|
|
|
3508
3564
|
type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = {
|
|
3509
3565
|
/** Play id/name. */
|
|
3510
3566
|
id: string;
|
|
3567
|
+
/** Human-readable one-line description of what this play does. */
|
|
3568
|
+
description?: string;
|
|
3511
3569
|
/** Input schema. */
|
|
3512
3570
|
input: PlayInputContract<TInput>;
|
|
3513
3571
|
/** Play function. */
|
|
@@ -3561,6 +3619,7 @@ type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((ctx: DeeplinePlay
|
|
|
3561
3619
|
};
|
|
3562
3620
|
type PlayMetadata = {
|
|
3563
3621
|
name: string;
|
|
3622
|
+
description?: string;
|
|
3564
3623
|
bindings?: PlayBindings;
|
|
3565
3624
|
inputSchema?: Record<string, unknown>;
|
|
3566
3625
|
billing?: PlayBindings['billing'];
|
package/dist/index.js
CHANGED
|
@@ -274,10 +274,11 @@ var SDK_RELEASE = {
|
|
|
274
274
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
275
275
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
276
276
|
// the SDK enrich generator's one-second stale policy.
|
|
277
|
-
|
|
277
|
+
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
278
|
+
version: "0.1.124",
|
|
278
279
|
apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
|
|
279
280
|
supportPolicy: {
|
|
280
|
-
latest: "0.1.
|
|
281
|
+
latest: "0.1.124",
|
|
281
282
|
minimumSupported: "0.1.53",
|
|
282
283
|
deprecatedBelow: "0.1.53",
|
|
283
284
|
commandMinimumSupported: [
|
|
@@ -285,6 +286,55 @@ var SDK_RELEASE = {
|
|
|
285
286
|
command: "enrich",
|
|
286
287
|
minimumSupported: "0.1.108",
|
|
287
288
|
reason: "Older SDK CLI enrich generated stale play source for the current dataset API."
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
command: "plays",
|
|
292
|
+
minimumSupported: "0.1.110",
|
|
293
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
command: "plays run",
|
|
297
|
+
minimumSupported: "0.1.110",
|
|
298
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
command: "run",
|
|
302
|
+
displayCommand: "plays run",
|
|
303
|
+
minimumSupported: "0.1.110",
|
|
304
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
command: "plays check",
|
|
308
|
+
minimumSupported: "0.1.110",
|
|
309
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
command: "check",
|
|
313
|
+
displayCommand: "plays check",
|
|
314
|
+
minimumSupported: "0.1.110",
|
|
315
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
command: "plays publish",
|
|
319
|
+
minimumSupported: "0.1.110",
|
|
320
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
command: "publish",
|
|
324
|
+
displayCommand: "plays publish",
|
|
325
|
+
minimumSupported: "0.1.110",
|
|
326
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
command: "plays set-live",
|
|
330
|
+
minimumSupported: "0.1.110",
|
|
331
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
command: "set-live",
|
|
335
|
+
displayCommand: "plays set-live",
|
|
336
|
+
minimumSupported: "0.1.110",
|
|
337
|
+
reason: "Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays."
|
|
288
338
|
}
|
|
289
339
|
],
|
|
290
340
|
autoUpdatePatchLag: 2
|
|
@@ -1891,7 +1941,8 @@ var DeeplineClient = class {
|
|
|
1891
1941
|
tail: (runId, options2) => this.tailRun(runId, options2),
|
|
1892
1942
|
logs: (runId, options2) => this.getRunLogs(runId, options2),
|
|
1893
1943
|
exportDatasetRows: (input) => this.getPlaySheetRows(input),
|
|
1894
|
-
stop: (runId, options2) => this.stopRun(runId, options2)
|
|
1944
|
+
stop: (runId, options2) => this.stopRun(runId, options2),
|
|
1945
|
+
stopAll: (options2) => this.stopAllRuns(options2)
|
|
1895
1946
|
};
|
|
1896
1947
|
this.billing = {
|
|
1897
1948
|
plans: () => this.getBillingPlans(),
|
|
@@ -1956,12 +2007,14 @@ var DeeplineClient = class {
|
|
|
1956
2007
|
play.outputSchema,
|
|
1957
2008
|
"rowOutputSchema"
|
|
1958
2009
|
);
|
|
2010
|
+
const description = play.description?.trim() || play.currentRevision?.description?.trim() || play.liveRevision?.description?.trim() || null;
|
|
1959
2011
|
const runCommand = this.playRunCommand(play, { csvInput });
|
|
1960
2012
|
const cloneEditStarter = this.playCloneEditStarter(play);
|
|
1961
2013
|
return {
|
|
1962
2014
|
name: play.name,
|
|
1963
2015
|
...play.reference ? { reference: play.reference } : {},
|
|
1964
2016
|
...play.displayName ? { displayName: play.displayName } : {},
|
|
2017
|
+
...description ? { description } : {},
|
|
1965
2018
|
origin: play.origin,
|
|
1966
2019
|
ownerType: play.ownerType,
|
|
1967
2020
|
canEdit: play.canEdit,
|
|
@@ -2182,6 +2235,7 @@ var DeeplineClient = class {
|
|
|
2182
2235
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2183
2236
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2184
2237
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2238
|
+
...request.description ? { description: request.description } : {},
|
|
2185
2239
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2186
2240
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2187
2241
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2220,6 +2274,7 @@ var DeeplineClient = class {
|
|
|
2220
2274
|
...request.artifactStorageKey ? { artifactStorageKey: request.artifactStorageKey } : {},
|
|
2221
2275
|
...request.sourceCode ? { sourceCode: request.sourceCode } : {},
|
|
2222
2276
|
...request.sourceFiles ? { sourceFiles: request.sourceFiles } : {},
|
|
2277
|
+
...request.description ? { description: request.description } : {},
|
|
2223
2278
|
..."staticPipeline" in request ? { staticPipeline: request.staticPipeline } : {},
|
|
2224
2279
|
...request.artifactHash ? { artifactHash: request.artifactHash } : {},
|
|
2225
2280
|
...request.graphHash ? { graphHash: request.graphHash } : {},
|
|
@@ -2377,6 +2432,7 @@ var DeeplineClient = class {
|
|
|
2377
2432
|
name: input.name,
|
|
2378
2433
|
sourceCode: input.sourceCode,
|
|
2379
2434
|
sourceFiles: input.sourceFiles,
|
|
2435
|
+
description: input.description,
|
|
2380
2436
|
artifact: input.artifact,
|
|
2381
2437
|
compilerManifest,
|
|
2382
2438
|
publish: false
|
|
@@ -2389,6 +2445,7 @@ var DeeplineClient = class {
|
|
|
2389
2445
|
return this.startPlayRun({
|
|
2390
2446
|
name: input.name,
|
|
2391
2447
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2448
|
+
description: input.description,
|
|
2392
2449
|
compilerManifest,
|
|
2393
2450
|
...input.input ? { input: input.input } : {},
|
|
2394
2451
|
...input.inputFile ? { inputFile: input.inputFile } : {},
|
|
@@ -2443,6 +2500,7 @@ var DeeplineClient = class {
|
|
|
2443
2500
|
name,
|
|
2444
2501
|
sourceCode,
|
|
2445
2502
|
sourceFiles: options?.sourceFiles,
|
|
2503
|
+
description: options?.description,
|
|
2446
2504
|
artifact,
|
|
2447
2505
|
compilerManifest,
|
|
2448
2506
|
publish: false
|
|
@@ -2456,6 +2514,7 @@ var DeeplineClient = class {
|
|
|
2456
2514
|
name,
|
|
2457
2515
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
2458
2516
|
sourceCode,
|
|
2517
|
+
description: options?.description,
|
|
2459
2518
|
staticPipeline: registeredArtifact.staticPipeline ?? null,
|
|
2460
2519
|
artifactHash: typeof artifact.artifactHash === "string" ? artifact.artifactHash : void 0,
|
|
2461
2520
|
graphHash: typeof artifact.graphHash === "string" ? artifact.graphHash : void 0,
|
|
@@ -2755,15 +2814,21 @@ var DeeplineClient = class {
|
|
|
2755
2814
|
* ```
|
|
2756
2815
|
*/
|
|
2757
2816
|
async listRuns(options) {
|
|
2758
|
-
const playName = options.play
|
|
2759
|
-
|
|
2760
|
-
|
|
2817
|
+
const playName = options.play?.trim();
|
|
2818
|
+
const params = new URLSearchParams();
|
|
2819
|
+
if (playName) {
|
|
2820
|
+
params.set("play", playName);
|
|
2761
2821
|
}
|
|
2762
|
-
const params = new URLSearchParams({ play: playName });
|
|
2763
2822
|
const status = options.status?.trim();
|
|
2764
2823
|
if (status) {
|
|
2765
2824
|
params.set("status", status);
|
|
2766
2825
|
}
|
|
2826
|
+
if (typeof options.limit === "number" && Number.isFinite(options.limit)) {
|
|
2827
|
+
params.set("limit", String(Math.max(1, Math.floor(options.limit))));
|
|
2828
|
+
}
|
|
2829
|
+
if (!playName && !status) {
|
|
2830
|
+
throw new Error("runs.list requires options.play or options.status.");
|
|
2831
|
+
}
|
|
2767
2832
|
params.set("compact", "true");
|
|
2768
2833
|
const response = await this.http.get(
|
|
2769
2834
|
`/api/v2/runs?${params.toString()}`
|
|
@@ -3070,6 +3135,24 @@ var DeeplineClient = class {
|
|
|
3070
3135
|
options?.reason ? { reason: options.reason } : {}
|
|
3071
3136
|
);
|
|
3072
3137
|
}
|
|
3138
|
+
/**
|
|
3139
|
+
* Stop every active run visible to the current workspace.
|
|
3140
|
+
*
|
|
3141
|
+
* This is the SDK equivalent of:
|
|
3142
|
+
*
|
|
3143
|
+
* ```bash
|
|
3144
|
+
* deepline runs stop-all --reason "stale lock" --json
|
|
3145
|
+
* ```
|
|
3146
|
+
*
|
|
3147
|
+
* Use this when a failed parent run left child or waiting runs active and you
|
|
3148
|
+
* need to clear the workspace run-slot state without knowing each run id.
|
|
3149
|
+
*/
|
|
3150
|
+
async stopAllRuns(options) {
|
|
3151
|
+
return this.http.post(
|
|
3152
|
+
"/api/v2/runs/stop-all",
|
|
3153
|
+
options?.reason ? { reason: options.reason } : {}
|
|
3154
|
+
);
|
|
3155
|
+
}
|
|
3073
3156
|
/**
|
|
3074
3157
|
* List callable plays visible to the workspace.
|
|
3075
3158
|
*
|
|
@@ -4694,18 +4777,21 @@ function definePlay(nameOrConfig, maybeFn, maybeBindings) {
|
|
|
4694
4777
|
name: nameOrConfig,
|
|
4695
4778
|
fn: maybeFn,
|
|
4696
4779
|
bindings: maybeBindings,
|
|
4780
|
+
description: maybeBindings?.description,
|
|
4697
4781
|
inputSchema: void 0,
|
|
4698
4782
|
billing: maybeBindings?.billing
|
|
4699
4783
|
} : {
|
|
4700
4784
|
name: nameOrConfig.id,
|
|
4701
4785
|
fn: nameOrConfig.run,
|
|
4702
4786
|
bindings: nameOrConfig.bindings,
|
|
4787
|
+
description: nameOrConfig.description,
|
|
4703
4788
|
inputSchema: nameOrConfig.input.schema,
|
|
4704
4789
|
billing: nameOrConfig.billing
|
|
4705
4790
|
};
|
|
4706
4791
|
const name = config.name;
|
|
4707
4792
|
const fn = config.fn;
|
|
4708
4793
|
const bindings = config.bindings;
|
|
4794
|
+
const description = config.description?.trim();
|
|
4709
4795
|
const billing = config.billing;
|
|
4710
4796
|
const inputSchema = config.inputSchema;
|
|
4711
4797
|
if (typeof fn !== "function") {
|
|
@@ -4729,6 +4815,7 @@ function definePlay(nameOrConfig, maybeFn, maybeBindings) {
|
|
|
4729
4815
|
}
|
|
4730
4816
|
const metadata = {
|
|
4731
4817
|
name,
|
|
4818
|
+
...description ? { description } : {},
|
|
4732
4819
|
...bindings ? { bindings } : {},
|
|
4733
4820
|
...inputSchema ? { inputSchema } : {},
|
|
4734
4821
|
...billing ? { billing } : {}
|