deepline 0.1.28 → 0.1.29
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/dist/cli/index.js +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/repo/apps/play-runner-workers/src/runtime/dataset-handles.ts +62 -2
- package/dist/repo/sdk/src/play.ts +5 -0
- package/dist/repo/sdk/src/version.ts +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -266,7 +266,7 @@ function saveProjectDeeplineEnvValues(baseUrl, values, startDir = projectEnvStar
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
// src/version.ts
|
|
269
|
-
var SDK_VERSION = "0.1.
|
|
269
|
+
var SDK_VERSION = "0.1.29";
|
|
270
270
|
var SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
271
271
|
|
|
272
272
|
// ../shared_libs/play-runtime/coordinator-headers.ts
|
package/dist/cli/index.mjs
CHANGED
|
@@ -243,7 +243,7 @@ function saveProjectDeeplineEnvValues(baseUrl, values, startDir = projectEnvStar
|
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
// src/version.ts
|
|
246
|
-
var SDK_VERSION = "0.1.
|
|
246
|
+
var SDK_VERSION = "0.1.29";
|
|
247
247
|
var SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
248
248
|
|
|
249
249
|
// ../shared_libs/play-runtime/coordinator-headers.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1401,7 +1401,7 @@ declare class DeeplineClient {
|
|
|
1401
1401
|
}>;
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
-
declare const SDK_VERSION = "0.1.
|
|
1404
|
+
declare const SDK_VERSION = "0.1.29";
|
|
1405
1405
|
declare const SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
1406
1406
|
|
|
1407
1407
|
/**
|
|
@@ -1915,6 +1915,9 @@ interface DeeplinePlayRuntimeContext {
|
|
|
1915
1915
|
tool<TOutput = LoosePlayObject>(key: string, toolId: string, input: Record<string, unknown>, options?: {
|
|
1916
1916
|
description?: string;
|
|
1917
1917
|
}): Promise<ToolExecuteResult<TOutput>>;
|
|
1918
|
+
runSteps<TInput extends Record<string, unknown>, TOutput>(program: StepProgram<TInput, any, TOutput>, input: TInput, options?: {
|
|
1919
|
+
description?: string;
|
|
1920
|
+
}): Promise<TOutput>;
|
|
1918
1921
|
step<T>(id: string, run: () => T | Promise<T>): Promise<T>;
|
|
1919
1922
|
fetch(key: string, url: string | URL, init?: RequestInit): Promise<{
|
|
1920
1923
|
ok: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1401,7 +1401,7 @@ declare class DeeplineClient {
|
|
|
1401
1401
|
}>;
|
|
1402
1402
|
}
|
|
1403
1403
|
|
|
1404
|
-
declare const SDK_VERSION = "0.1.
|
|
1404
|
+
declare const SDK_VERSION = "0.1.29";
|
|
1405
1405
|
declare const SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
1406
1406
|
|
|
1407
1407
|
/**
|
|
@@ -1915,6 +1915,9 @@ interface DeeplinePlayRuntimeContext {
|
|
|
1915
1915
|
tool<TOutput = LoosePlayObject>(key: string, toolId: string, input: Record<string, unknown>, options?: {
|
|
1916
1916
|
description?: string;
|
|
1917
1917
|
}): Promise<ToolExecuteResult<TOutput>>;
|
|
1918
|
+
runSteps<TInput extends Record<string, unknown>, TOutput>(program: StepProgram<TInput, any, TOutput>, input: TInput, options?: {
|
|
1919
|
+
description?: string;
|
|
1920
|
+
}): Promise<TOutput>;
|
|
1918
1921
|
step<T>(id: string, run: () => T | Promise<T>): Promise<T>;
|
|
1919
1922
|
fetch(key: string, url: string | URL, init?: RequestInit): Promise<{
|
|
1920
1923
|
ok: boolean;
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -24,8 +24,18 @@ type DatasetChunkReader<T extends DatasetRow> = (
|
|
|
24
24
|
chunkSize: number,
|
|
25
25
|
) => AsyncIterable<T[]>;
|
|
26
26
|
|
|
27
|
+
export type WorkerDatasetCapabilities = {
|
|
28
|
+
storage: 'materialized' | 'runtime_sheet' | 'csv_stream' | 'iterable';
|
|
29
|
+
chunkReadable: boolean;
|
|
30
|
+
pageBacked: boolean;
|
|
31
|
+
replayable: boolean;
|
|
32
|
+
countHint: number | null;
|
|
33
|
+
materialization: 'bounded' | 'in_memory';
|
|
34
|
+
};
|
|
35
|
+
|
|
27
36
|
const datasetChunkReaders = new WeakMap<object, DatasetChunkReader<DatasetRow>>();
|
|
28
37
|
const datasetCountHints = new WeakMap<object, number | null>();
|
|
38
|
+
const datasetCapabilities = new WeakMap<object, WorkerDatasetCapabilities>();
|
|
29
39
|
|
|
30
40
|
function cloneRow<T extends DatasetRow>(row: T): T {
|
|
31
41
|
return { ...row };
|
|
@@ -35,12 +45,14 @@ function registerChunkReader<T extends DatasetRow>(
|
|
|
35
45
|
dataset: PlayDataset<T>,
|
|
36
46
|
reader: DatasetChunkReader<T>,
|
|
37
47
|
countHint: number | null,
|
|
48
|
+
capabilities: Omit<WorkerDatasetCapabilities, 'countHint'>,
|
|
38
49
|
): PlayDataset<T> {
|
|
39
50
|
datasetChunkReaders.set(
|
|
40
51
|
dataset as object,
|
|
41
52
|
reader as DatasetChunkReader<DatasetRow>,
|
|
42
53
|
);
|
|
43
54
|
datasetCountHints.set(dataset as object, countHint);
|
|
55
|
+
datasetCapabilities.set(dataset as object, { ...capabilities, countHint });
|
|
44
56
|
return dataset;
|
|
45
57
|
}
|
|
46
58
|
|
|
@@ -95,6 +107,13 @@ export function createMaterializedDatasetHandle<T extends DatasetRow>(input: {
|
|
|
95
107
|
}
|
|
96
108
|
},
|
|
97
109
|
Math.max(0, Math.floor(input.count ?? materializedRows.length)),
|
|
110
|
+
{
|
|
111
|
+
storage: 'materialized',
|
|
112
|
+
chunkReadable: true,
|
|
113
|
+
pageBacked: false,
|
|
114
|
+
replayable: true,
|
|
115
|
+
materialization: 'in_memory',
|
|
116
|
+
},
|
|
98
117
|
);
|
|
99
118
|
}
|
|
100
119
|
|
|
@@ -208,7 +227,13 @@ export function createPersistedDatasetHandle<T extends DatasetRow>(input: {
|
|
|
208
227
|
}) as AsyncIterable<T>,
|
|
209
228
|
},
|
|
210
229
|
});
|
|
211
|
-
return registerChunkReader(dataset, (chunkSize) => readChunks(chunkSize), count
|
|
230
|
+
return registerChunkReader(dataset, (chunkSize) => readChunks(chunkSize), count, {
|
|
231
|
+
storage: 'runtime_sheet',
|
|
232
|
+
chunkReadable: true,
|
|
233
|
+
pageBacked: true,
|
|
234
|
+
replayable: true,
|
|
235
|
+
materialization: 'bounded',
|
|
236
|
+
});
|
|
212
237
|
}
|
|
213
238
|
|
|
214
239
|
export function createCsvDatasetHandle<T extends DatasetRow>(input: {
|
|
@@ -333,7 +358,13 @@ export function createCsvDatasetHandle<T extends DatasetRow>(input: {
|
|
|
333
358
|
}) as AsyncIterable<T>,
|
|
334
359
|
},
|
|
335
360
|
});
|
|
336
|
-
return registerChunkReader(dataset, (chunkSize) => readChunks(chunkSize), null
|
|
361
|
+
return registerChunkReader(dataset, (chunkSize) => readChunks(chunkSize), null, {
|
|
362
|
+
storage: 'csv_stream',
|
|
363
|
+
chunkReadable: true,
|
|
364
|
+
pageBacked: false,
|
|
365
|
+
replayable: true,
|
|
366
|
+
materialization: 'bounded',
|
|
367
|
+
});
|
|
337
368
|
}
|
|
338
369
|
|
|
339
370
|
export function createInlineDatasetHandle<T extends DatasetRow>(
|
|
@@ -363,6 +394,35 @@ export function datasetRowCountHint<T extends DatasetRow>(
|
|
|
363
394
|
return null;
|
|
364
395
|
}
|
|
365
396
|
|
|
397
|
+
export function datasetHandleCapabilities<T extends DatasetRow>(
|
|
398
|
+
input: WorkerDatasetInput<T>,
|
|
399
|
+
): WorkerDatasetCapabilities {
|
|
400
|
+
if (Array.isArray(input)) {
|
|
401
|
+
return {
|
|
402
|
+
storage: 'materialized',
|
|
403
|
+
chunkReadable: true,
|
|
404
|
+
pageBacked: false,
|
|
405
|
+
replayable: true,
|
|
406
|
+
countHint: input.length,
|
|
407
|
+
materialization: 'in_memory',
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
if (isPlayDataset<T>(input)) {
|
|
411
|
+
const capabilities = datasetCapabilities.get(input as object);
|
|
412
|
+
if (capabilities) {
|
|
413
|
+
return capabilities;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
storage: 'iterable',
|
|
418
|
+
chunkReadable: false,
|
|
419
|
+
pageBacked: false,
|
|
420
|
+
replayable: false,
|
|
421
|
+
countHint: null,
|
|
422
|
+
materialization: 'bounded',
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
|
|
366
426
|
export function isDatasetHandle<T extends DatasetRow>(
|
|
367
427
|
value: unknown,
|
|
368
428
|
): value is WorkerDatasetHandle<T> {
|
|
@@ -408,6 +408,11 @@ export interface DeeplinePlayRuntimeContext {
|
|
|
408
408
|
input: Record<string, unknown>,
|
|
409
409
|
options?: { description?: string },
|
|
410
410
|
): Promise<ToolExecuteResult<TOutput>>;
|
|
411
|
+
runSteps<TInput extends Record<string, unknown>, TOutput>(
|
|
412
|
+
program: StepProgram<TInput, any, TOutput>,
|
|
413
|
+
input: TInput,
|
|
414
|
+
options?: { description?: string },
|
|
415
|
+
): Promise<TOutput>;
|
|
411
416
|
step<T>(id: string, run: () => T | Promise<T>): Promise<T>;
|
|
412
417
|
fetch(
|
|
413
418
|
key: string,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.
|
|
1
|
+
export const SDK_VERSION = "0.1.29";
|
|
2
2
|
export const SDK_API_CONTRACT = "2026-05-runs-v2";
|