deepline 0.1.123 → 0.1.125
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/sdk/src/client.ts +17 -0
- 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 +4 -0
- package/dist/bundling-sources/sdk/src/worker-play-entry.ts +5 -0
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +378 -46
- package/dist/cli/index.js +154 -6
- package/dist/cli/index.mjs +162 -7
- package/dist/index.d.mts +20 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +64 -2
- package/dist/index.mjs +64 -2
- 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/README.md
CHANGED
|
@@ -320,14 +320,13 @@ scripts/repro-rate-limit-enrich.sh redis_429
|
|
|
320
320
|
scripts/repro-rate-limit-enrich.sh redis_429_waterfall
|
|
321
321
|
```
|
|
322
322
|
|
|
323
|
-
##
|
|
323
|
+
## Prebuilt plays
|
|
324
324
|
|
|
325
|
-
|
|
325
|
+
V2 prebuilt play sources are authored directly in `src/lib/plays/v2/`. After
|
|
326
|
+
editing them, regenerate the committed Workers and share-page artifacts:
|
|
326
327
|
|
|
327
328
|
```bash
|
|
328
|
-
bun scripts/
|
|
329
|
-
bun scripts/transpile-native-plays.ts --play test_play # single play
|
|
330
|
-
bun scripts/transpile-native-plays.ts --stdout # print to stdout
|
|
329
|
+
bun scripts/regen.ts workers-prebuilt prebuilt-share-pages
|
|
331
330
|
```
|
|
332
331
|
|
|
333
332
|
## File structure
|
|
@@ -932,12 +932,18 @@ export class DeeplineClient {
|
|
|
932
932
|
play.outputSchema,
|
|
933
933
|
'rowOutputSchema',
|
|
934
934
|
);
|
|
935
|
+
const description =
|
|
936
|
+
play.description?.trim() ||
|
|
937
|
+
play.currentRevision?.description?.trim() ||
|
|
938
|
+
play.liveRevision?.description?.trim() ||
|
|
939
|
+
null;
|
|
935
940
|
const runCommand = this.playRunCommand(play, { csvInput });
|
|
936
941
|
const cloneEditStarter = this.playCloneEditStarter(play);
|
|
937
942
|
return {
|
|
938
943
|
name: play.name,
|
|
939
944
|
...(play.reference ? { reference: play.reference } : {}),
|
|
940
945
|
...(play.displayName ? { displayName: play.displayName } : {}),
|
|
946
|
+
...(description ? { description } : {}),
|
|
941
947
|
origin: play.origin,
|
|
942
948
|
ownerType: play.ownerType,
|
|
943
949
|
canEdit: play.canEdit,
|
|
@@ -1212,6 +1218,7 @@ export class DeeplineClient {
|
|
|
1212
1218
|
: {}),
|
|
1213
1219
|
...(request.sourceCode ? { sourceCode: request.sourceCode } : {}),
|
|
1214
1220
|
...(request.sourceFiles ? { sourceFiles: request.sourceFiles } : {}),
|
|
1221
|
+
...(request.description ? { description: request.description } : {}),
|
|
1215
1222
|
...('staticPipeline' in request
|
|
1216
1223
|
? { staticPipeline: request.staticPipeline }
|
|
1217
1224
|
: {}),
|
|
@@ -1270,6 +1277,7 @@ export class DeeplineClient {
|
|
|
1270
1277
|
: {}),
|
|
1271
1278
|
...(request.sourceCode ? { sourceCode: request.sourceCode } : {}),
|
|
1272
1279
|
...(request.sourceFiles ? { sourceFiles: request.sourceFiles } : {}),
|
|
1280
|
+
...(request.description ? { description: request.description } : {}),
|
|
1273
1281
|
...('staticPipeline' in request
|
|
1274
1282
|
? { staticPipeline: request.staticPipeline }
|
|
1275
1283
|
: {}),
|
|
@@ -1322,6 +1330,7 @@ export class DeeplineClient {
|
|
|
1322
1330
|
name: string;
|
|
1323
1331
|
sourceCode: string;
|
|
1324
1332
|
sourceFiles?: Record<string, string>;
|
|
1333
|
+
description?: string;
|
|
1325
1334
|
artifact: Record<string, unknown>;
|
|
1326
1335
|
compilerManifest?: PlayCompilerManifest;
|
|
1327
1336
|
publish?: boolean;
|
|
@@ -1371,6 +1380,7 @@ export class DeeplineClient {
|
|
|
1371
1380
|
name: string;
|
|
1372
1381
|
sourceCode: string;
|
|
1373
1382
|
sourceFiles?: Record<string, string>;
|
|
1383
|
+
description?: string;
|
|
1374
1384
|
artifact: Record<string, unknown>;
|
|
1375
1385
|
compilerManifest?: PlayCompilerManifest;
|
|
1376
1386
|
publish?: boolean;
|
|
@@ -1496,6 +1506,7 @@ export class DeeplineClient {
|
|
|
1496
1506
|
name?: string;
|
|
1497
1507
|
sourceCode: string;
|
|
1498
1508
|
sourceFiles?: Record<string, string>;
|
|
1509
|
+
description?: string;
|
|
1499
1510
|
artifact: Record<string, unknown>;
|
|
1500
1511
|
}): Promise<PlayCheckResult> {
|
|
1501
1512
|
return this.http.post('/api/v2/plays/check', input);
|
|
@@ -1525,6 +1536,7 @@ export class DeeplineClient {
|
|
|
1525
1536
|
name: string;
|
|
1526
1537
|
sourceCode: string;
|
|
1527
1538
|
sourceFiles?: Record<string, string>;
|
|
1539
|
+
description?: string;
|
|
1528
1540
|
artifact: Record<string, unknown>;
|
|
1529
1541
|
compilerManifest?: PlayCompilerManifest;
|
|
1530
1542
|
input?: Record<string, unknown>;
|
|
@@ -1544,6 +1556,7 @@ export class DeeplineClient {
|
|
|
1544
1556
|
name: input.name,
|
|
1545
1557
|
sourceCode: input.sourceCode,
|
|
1546
1558
|
sourceFiles: input.sourceFiles,
|
|
1559
|
+
description: input.description,
|
|
1547
1560
|
artifact: input.artifact,
|
|
1548
1561
|
compilerManifest,
|
|
1549
1562
|
publish: false,
|
|
@@ -1557,6 +1570,7 @@ export class DeeplineClient {
|
|
|
1557
1570
|
return this.startPlayRun({
|
|
1558
1571
|
name: input.name,
|
|
1559
1572
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
1573
|
+
description: input.description,
|
|
1560
1574
|
compilerManifest,
|
|
1561
1575
|
...(input.input ? { input: input.input } : {}),
|
|
1562
1576
|
...(input.inputFile ? { inputFile: input.inputFile } : {}),
|
|
@@ -1598,6 +1612,7 @@ export class DeeplineClient {
|
|
|
1598
1612
|
options?: {
|
|
1599
1613
|
sourceCode?: string;
|
|
1600
1614
|
sourceFiles?: Record<string, string>;
|
|
1615
|
+
description?: string;
|
|
1601
1616
|
artifact?: Record<string, unknown>;
|
|
1602
1617
|
compilerManifest?: PlayCompilerManifest;
|
|
1603
1618
|
input?: Record<string, unknown>;
|
|
@@ -1633,6 +1648,7 @@ export class DeeplineClient {
|
|
|
1633
1648
|
name,
|
|
1634
1649
|
sourceCode,
|
|
1635
1650
|
sourceFiles: options?.sourceFiles,
|
|
1651
|
+
description: options?.description,
|
|
1636
1652
|
artifact,
|
|
1637
1653
|
compilerManifest,
|
|
1638
1654
|
publish: false,
|
|
@@ -1647,6 +1663,7 @@ export class DeeplineClient {
|
|
|
1647
1663
|
name,
|
|
1648
1664
|
artifactStorageKey: registeredArtifact.artifactStorageKey,
|
|
1649
1665
|
sourceCode,
|
|
1666
|
+
description: options?.description,
|
|
1650
1667
|
staticPipeline: registeredArtifact.staticPipeline ?? null,
|
|
1651
1668
|
artifactHash:
|
|
1652
1669
|
typeof artifact.artifactHash === 'string'
|
|
@@ -135,6 +135,14 @@ import type { ToolExecution } from './client.js';
|
|
|
135
135
|
* @sdkReference runtime 030
|
|
136
136
|
*/
|
|
137
137
|
export type PlayBindings = {
|
|
138
|
+
/**
|
|
139
|
+
* Human-readable one-line description of what this play does.
|
|
140
|
+
*
|
|
141
|
+
* New SDK-authored file workflows require this in `plays check`, `plays run
|
|
142
|
+
* --file`, and `plays publish <file>`. The server API keeps it optional so
|
|
143
|
+
* older clients can continue to register revisions during the migration.
|
|
144
|
+
*/
|
|
145
|
+
description?: string;
|
|
138
146
|
/** Optional per-run billing controls enforced by the runtime. */
|
|
139
147
|
billing?: {
|
|
140
148
|
/** Stop the run before a billed action would push total run credits above this cap. */
|
|
@@ -1123,6 +1131,8 @@ export type PlayInputContract<TInput> = {
|
|
|
1123
1131
|
export type DefinePlayConfig<TInput, TOutput extends PlayReturnObject> = {
|
|
1124
1132
|
/** Play id/name. */
|
|
1125
1133
|
id: string;
|
|
1134
|
+
/** Human-readable one-line description of what this play does. */
|
|
1135
|
+
description?: string;
|
|
1126
1136
|
/** Input schema. */
|
|
1127
1137
|
input: PlayInputContract<TInput>;
|
|
1128
1138
|
/** Play function. */
|
|
@@ -1299,6 +1309,7 @@ export type DefinedPlay<TInput, TOutput extends PlayReturnObject> = ((
|
|
|
1299
1309
|
|
|
1300
1310
|
type PlayMetadata = {
|
|
1301
1311
|
name: string;
|
|
1312
|
+
description?: string;
|
|
1302
1313
|
bindings?: PlayBindings;
|
|
1303
1314
|
inputSchema?: Record<string, unknown>;
|
|
1304
1315
|
billing?: PlayBindings['billing'];
|
|
@@ -1891,6 +1902,7 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
1891
1902
|
name: nameOrConfig,
|
|
1892
1903
|
fn: maybeFn,
|
|
1893
1904
|
bindings: maybeBindings,
|
|
1905
|
+
description: maybeBindings?.description,
|
|
1894
1906
|
inputSchema: undefined,
|
|
1895
1907
|
billing: maybeBindings?.billing,
|
|
1896
1908
|
}
|
|
@@ -1898,12 +1910,14 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
1898
1910
|
name: nameOrConfig.id,
|
|
1899
1911
|
fn: nameOrConfig.run,
|
|
1900
1912
|
bindings: nameOrConfig.bindings,
|
|
1913
|
+
description: nameOrConfig.description,
|
|
1901
1914
|
inputSchema: nameOrConfig.input.schema,
|
|
1902
1915
|
billing: nameOrConfig.billing,
|
|
1903
1916
|
};
|
|
1904
1917
|
const name = config.name;
|
|
1905
1918
|
const fn = config.fn;
|
|
1906
1919
|
const bindings = config.bindings;
|
|
1920
|
+
const description = config.description?.trim();
|
|
1907
1921
|
const billing = config.billing;
|
|
1908
1922
|
const inputSchema = config.inputSchema;
|
|
1909
1923
|
if (typeof fn !== 'function') {
|
|
@@ -1935,6 +1949,7 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
1935
1949
|
|
|
1936
1950
|
const metadata: PlayMetadata = {
|
|
1937
1951
|
name,
|
|
1952
|
+
...(description ? { description } : {}),
|
|
1938
1953
|
...(bindings ? { bindings } : {}),
|
|
1939
1954
|
...(inputSchema ? { inputSchema } : {}),
|
|
1940
1955
|
...(billing ? { billing } : {}),
|
|
@@ -55,6 +55,7 @@ export type SdkSupportPolicy = {
|
|
|
55
55
|
*/
|
|
56
56
|
commandMinimumSupported?: ReadonlyArray<{
|
|
57
57
|
command: string;
|
|
58
|
+
displayCommand?: string;
|
|
58
59
|
minimumSupported: string;
|
|
59
60
|
reason: string;
|
|
60
61
|
}>;
|
|
@@ -99,10 +100,11 @@ export const SDK_RELEASE = {
|
|
|
99
100
|
// skill on the sdk sync surface, and the people-search-to-email prebuilt.
|
|
100
101
|
// 0.1.108 ships explicit dataset column/tool recompute policy and removes
|
|
101
102
|
// the SDK enrich generator's one-second stale policy.
|
|
102
|
-
|
|
103
|
+
// 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
|
|
104
|
+
version: '0.1.125',
|
|
103
105
|
apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
|
|
104
106
|
supportPolicy: {
|
|
105
|
-
latest: '0.1.
|
|
107
|
+
latest: '0.1.125',
|
|
106
108
|
minimumSupported: '0.1.53',
|
|
107
109
|
deprecatedBelow: '0.1.53',
|
|
108
110
|
commandMinimumSupported: [
|
|
@@ -112,6 +114,64 @@ export const SDK_RELEASE = {
|
|
|
112
114
|
reason:
|
|
113
115
|
'Older SDK CLI enrich generated stale play source for the current dataset API.',
|
|
114
116
|
},
|
|
117
|
+
{
|
|
118
|
+
command: 'plays',
|
|
119
|
+
minimumSupported: '0.1.110',
|
|
120
|
+
reason:
|
|
121
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
command: 'plays run',
|
|
125
|
+
minimumSupported: '0.1.110',
|
|
126
|
+
reason:
|
|
127
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
command: 'run',
|
|
131
|
+
displayCommand: 'plays run',
|
|
132
|
+
minimumSupported: '0.1.110',
|
|
133
|
+
reason:
|
|
134
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
command: 'plays check',
|
|
138
|
+
minimumSupported: '0.1.110',
|
|
139
|
+
reason:
|
|
140
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
command: 'check',
|
|
144
|
+
displayCommand: 'plays check',
|
|
145
|
+
minimumSupported: '0.1.110',
|
|
146
|
+
reason:
|
|
147
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
command: 'plays publish',
|
|
151
|
+
minimumSupported: '0.1.110',
|
|
152
|
+
reason:
|
|
153
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
command: 'publish',
|
|
157
|
+
displayCommand: 'plays publish',
|
|
158
|
+
minimumSupported: '0.1.110',
|
|
159
|
+
reason:
|
|
160
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
command: 'plays set-live',
|
|
164
|
+
minimumSupported: '0.1.110',
|
|
165
|
+
reason:
|
|
166
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
command: 'set-live',
|
|
170
|
+
displayCommand: 'plays set-live',
|
|
171
|
+
minimumSupported: '0.1.110',
|
|
172
|
+
reason:
|
|
173
|
+
'Play file commands now require top-level definePlay descriptions so agents and play surfaces can explain local plays.',
|
|
174
|
+
},
|
|
115
175
|
],
|
|
116
176
|
autoUpdatePatchLag: 2,
|
|
117
177
|
},
|
|
@@ -744,6 +744,7 @@ export interface PlayListItem {
|
|
|
744
744
|
reference?: string;
|
|
745
745
|
name: string;
|
|
746
746
|
displayName?: string;
|
|
747
|
+
description?: string | null;
|
|
747
748
|
origin?: 'prebuilt' | 'owned';
|
|
748
749
|
ownerType?: 'deepline' | 'org';
|
|
749
750
|
ownerSlug?: string;
|
|
@@ -770,6 +771,7 @@ export interface PlayDescription {
|
|
|
770
771
|
name: string;
|
|
771
772
|
reference?: string;
|
|
772
773
|
displayName?: string;
|
|
774
|
+
description?: string | null;
|
|
773
775
|
origin?: 'prebuilt' | 'owned';
|
|
774
776
|
ownerType?: 'deepline' | 'org';
|
|
775
777
|
canEdit?: boolean;
|
|
@@ -928,6 +930,8 @@ export interface StartPlayRunRequest {
|
|
|
928
930
|
sourceCode?: string;
|
|
929
931
|
/** Source graph snapshots for local helper files included in cloud preflight. */
|
|
930
932
|
sourceFiles?: Record<string, string>;
|
|
933
|
+
/** Human-readable one-line description for the revision created by file-backed runs. */
|
|
934
|
+
description?: string;
|
|
931
935
|
/** Static pipeline already produced while registering this artifact. */
|
|
932
936
|
staticPipeline?: unknown;
|
|
933
937
|
/** Artifact content hash already validated while registering this artifact. */
|
|
@@ -53,6 +53,7 @@ const PLAY_METADATA_SYMBOL = Symbol.for('deepline.play.metadata');
|
|
|
53
53
|
|
|
54
54
|
type PlayMetadata = {
|
|
55
55
|
name: string;
|
|
56
|
+
description?: string;
|
|
56
57
|
bindings?: PlayBindings;
|
|
57
58
|
inputSchema?: Record<string, unknown>;
|
|
58
59
|
billing?: PlayBindings['billing'];
|
|
@@ -206,6 +207,7 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
206
207
|
name: nameOrConfig,
|
|
207
208
|
fn: maybeFn,
|
|
208
209
|
bindings: maybeBindings,
|
|
210
|
+
description: maybeBindings?.description,
|
|
209
211
|
inputSchema: undefined,
|
|
210
212
|
billing: maybeBindings?.billing,
|
|
211
213
|
}
|
|
@@ -213,12 +215,14 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
213
215
|
name: nameOrConfig.id,
|
|
214
216
|
fn: nameOrConfig.run,
|
|
215
217
|
bindings: nameOrConfig.bindings,
|
|
218
|
+
description: nameOrConfig.description,
|
|
216
219
|
inputSchema: nameOrConfig.input.schema,
|
|
217
220
|
billing: nameOrConfig.billing,
|
|
218
221
|
};
|
|
219
222
|
|
|
220
223
|
const name = config.name;
|
|
221
224
|
const fn = config.fn;
|
|
225
|
+
const description = config.description?.trim();
|
|
222
226
|
if (typeof fn !== 'function') {
|
|
223
227
|
throw new Error('definePlay run must be async');
|
|
224
228
|
}
|
|
@@ -240,6 +244,7 @@ export function definePlay<TInput, TOutput extends PlayReturnObject>(
|
|
|
240
244
|
|
|
241
245
|
const metadata: PlayMetadata = {
|
|
242
246
|
name,
|
|
247
|
+
...(description ? { description } : {}),
|
|
243
248
|
...(config.bindings ? { bindings: config.bindings } : {}),
|
|
244
249
|
...(config.inputSchema ? { inputSchema: config.inputSchema } : {}),
|
|
245
250
|
...(config.billing ? { billing: config.billing } : {}),
|