deepline 0.1.21 → 0.1.23
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 +552 -237
- package/dist/cli/index.mjs +609 -289
- package/dist/index.d.mts +21 -58
- package/dist/index.d.ts +21 -58
- package/dist/index.js +177 -92
- package/dist/index.mjs +177 -92
- package/dist/repo/apps/play-runner-workers/src/coordinator-entry.ts +3 -1
- package/dist/repo/apps/play-runner-workers/src/entry.ts +153 -0
- package/dist/repo/sdk/src/client.ts +243 -124
- package/dist/repo/sdk/src/types.ts +8 -14
- package/dist/repo/sdk/src/version.ts +1 -1
- package/dist/repo/shared_libs/play-runtime/execution-plan.ts +27 -2
- package/dist/repo/shared_libs/play-runtime/profiles.ts +4 -14
- package/dist/repo/shared_libs/play-runtime/runtime-actions.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -342,7 +342,7 @@ interface ToolMetadata extends ToolDefinition {
|
|
|
342
342
|
interface PlayRunResult {
|
|
343
343
|
/** `true` if the play completed successfully (`status === 'completed'`). */
|
|
344
344
|
success: boolean;
|
|
345
|
-
/** Public play-run identifier
|
|
345
|
+
/** Public play-run identifier. */
|
|
346
346
|
runId: string;
|
|
347
347
|
/** The play's return value. Only present on success. */
|
|
348
348
|
result?: unknown;
|
|
@@ -363,8 +363,6 @@ interface PlayProgressStatus {
|
|
|
363
363
|
totalRows?: number;
|
|
364
364
|
/** Accumulated log lines from `ctx.log()`. Grows monotonically. */
|
|
365
365
|
logs: string[];
|
|
366
|
-
/** Zero-based offset of the first returned log line when a tail cursor is used. */
|
|
367
|
-
logOffset?: number;
|
|
368
366
|
/** Error message if the play has failed. */
|
|
369
367
|
error?: string;
|
|
370
368
|
}
|
|
@@ -399,7 +397,7 @@ interface PlayStatus {
|
|
|
399
397
|
progress?: PlayProgressStatus;
|
|
400
398
|
/** Partial or final result. Available once the play returns. */
|
|
401
399
|
result?: unknown;
|
|
402
|
-
/**
|
|
400
|
+
/** Scheduler-backed run metadata when returned by the status endpoint. */
|
|
403
401
|
run?: {
|
|
404
402
|
startTime?: string | null;
|
|
405
403
|
closeTime?: string | null;
|
|
@@ -444,9 +442,9 @@ interface StopPlayRunResult {
|
|
|
444
442
|
* Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
|
|
445
443
|
*/
|
|
446
444
|
interface PlayRunListItem {
|
|
447
|
-
/**
|
|
445
|
+
/** Public Deepline play-run id. */
|
|
448
446
|
workflowId: string;
|
|
449
|
-
/**
|
|
447
|
+
/** Backend run attempt id, when exposed. */
|
|
450
448
|
runId: string;
|
|
451
449
|
/** Workflow type (typically `'Workflow'`). */
|
|
452
450
|
type: string;
|
|
@@ -564,7 +562,7 @@ interface PlayDefinitionDetail {
|
|
|
564
562
|
runCount: number;
|
|
565
563
|
/** Primary key column for CSV-based plays. */
|
|
566
564
|
tableNamespace?: string | null;
|
|
567
|
-
/**
|
|
565
|
+
/** Public Deepline id of the latest run. */
|
|
568
566
|
latestRunId?: string | null;
|
|
569
567
|
/** Unix timestamp (ms). */
|
|
570
568
|
createdAt: number;
|
|
@@ -677,12 +675,11 @@ interface ClearPlayHistoryResult {
|
|
|
677
675
|
* ```typescript
|
|
678
676
|
* const started = await client.startPlayRun({ name: 'my-play', input: { domain: 'stripe.com' } });
|
|
679
677
|
* console.log(`Started: ${started.workflowId}`);
|
|
680
|
-
* console.log(`Status URL: ${started.statusUrl}`);
|
|
681
678
|
* console.log(`Dashboard: ${started.dashboardUrl}`);
|
|
682
679
|
* ```
|
|
683
680
|
*/
|
|
684
681
|
interface PlayRunStart {
|
|
685
|
-
/**
|
|
682
|
+
/** Public Deepline play-run id for tracking this execution. */
|
|
686
683
|
workflowId: string;
|
|
687
684
|
/** Public Deepline play-run API version. */
|
|
688
685
|
apiVersion?: number;
|
|
@@ -694,8 +691,6 @@ interface PlayRunStart {
|
|
|
694
691
|
runtimeBackend?: string;
|
|
695
692
|
/** Canonical run contract compatibility metadata. */
|
|
696
693
|
contract?: Record<string, unknown> | null;
|
|
697
|
-
/** URL to poll for status updates. */
|
|
698
|
-
statusUrl?: string;
|
|
699
694
|
/** Dashboard URL for the named play. */
|
|
700
695
|
dashboardUrl?: string;
|
|
701
696
|
/** Terminal status returned when the start request used a short completion wait. */
|
|
@@ -706,7 +701,7 @@ interface PlayRunStart {
|
|
|
706
701
|
*
|
|
707
702
|
* This is the check-only version of play artifact registration: the server runs
|
|
708
703
|
* the same preflight compiler and static-analysis pass without storing,
|
|
709
|
-
* publishing, or starting a
|
|
704
|
+
* publishing, or starting a play run.
|
|
710
705
|
*/
|
|
711
706
|
interface PlayCheckResult {
|
|
712
707
|
valid: boolean;
|
|
@@ -773,8 +768,7 @@ interface StartPlayRunRequest {
|
|
|
773
768
|
waitForCompletionMs?: number;
|
|
774
769
|
/**
|
|
775
770
|
* Per-run execution profile override. The server defaults to `workers_edge`;
|
|
776
|
-
* tests
|
|
777
|
-
* this unset.
|
|
771
|
+
* tests can pass `local` here. Most callers should leave this unset.
|
|
778
772
|
*/
|
|
779
773
|
profile?: string;
|
|
780
774
|
}
|
|
@@ -836,11 +830,7 @@ type RunsListOptions = {
|
|
|
836
830
|
status?: string;
|
|
837
831
|
};
|
|
838
832
|
type RunsTailOptions = {
|
|
839
|
-
|
|
840
|
-
afterLogIndex?: number;
|
|
841
|
-
waitMs?: number;
|
|
842
|
-
terminalOnly?: boolean;
|
|
843
|
-
compact?: boolean;
|
|
833
|
+
signal?: AbortSignal;
|
|
844
834
|
};
|
|
845
835
|
type RunsLogsOptions = {
|
|
846
836
|
limit?: number;
|
|
@@ -919,7 +909,7 @@ declare class DeeplineClient {
|
|
|
919
909
|
/**
|
|
920
910
|
* Search available tools using Deepline's ranked backend search.
|
|
921
911
|
*
|
|
922
|
-
* This is the same discovery surface used by the
|
|
912
|
+
* This is the same discovery surface used by the CLI: it ranks across
|
|
923
913
|
* tool metadata, categories, agent guidance, and input schema fields.
|
|
924
914
|
*/
|
|
925
915
|
searchTools(options?: ToolSearchOptions): Promise<ToolSearchResult>;
|
|
@@ -970,7 +960,7 @@ declare class DeeplineClient {
|
|
|
970
960
|
* `progress.logs`; they are not part of the user output object.
|
|
971
961
|
*
|
|
972
962
|
* @param request - Play run configuration (name, code, input, etc.)
|
|
973
|
-
* @returns
|
|
963
|
+
* @returns Run metadata including the public `workflowId`
|
|
974
964
|
*
|
|
975
965
|
* @example
|
|
976
966
|
* ```typescript
|
|
@@ -1160,9 +1150,6 @@ declare class DeeplineClient {
|
|
|
1160
1150
|
* Internal/advanced primitive. Public callers should usually prefer
|
|
1161
1151
|
* {@link runPlay}, {@link PlayJob.get}, or `deepline play run --watch`.
|
|
1162
1152
|
*
|
|
1163
|
-
* Poll this method until `status` reaches a terminal state:
|
|
1164
|
-
* `'completed'`, `'failed'`, or `'cancelled'`.
|
|
1165
|
-
*
|
|
1166
1153
|
* @param workflowId - Play-run id from {@link startPlayRun}
|
|
1167
1154
|
* @returns Current status with progress logs and partial results
|
|
1168
1155
|
*
|
|
@@ -1176,24 +1163,11 @@ declare class DeeplineClient {
|
|
|
1176
1163
|
getPlayStatus(workflowId: string, options?: {
|
|
1177
1164
|
billing?: boolean;
|
|
1178
1165
|
}): Promise<PlayStatus>;
|
|
1179
|
-
/**
|
|
1180
|
-
* Get the lightweight tail-polling status for a play execution.
|
|
1181
|
-
*
|
|
1182
|
-
* This is intentionally smaller than {@link getPlayStatus}: it returns the
|
|
1183
|
-
* fields needed for CLI log tailing while the run is in flight, without
|
|
1184
|
-
* forcing the API to rebuild final result views on every poll. Call
|
|
1185
|
-
* {@link getPlayStatus} once after a terminal state for the full result.
|
|
1186
|
-
*/
|
|
1187
|
-
getPlayTailStatus(workflowId: string, options?: {
|
|
1188
|
-
afterLogIndex?: number;
|
|
1189
|
-
waitMs?: number;
|
|
1190
|
-
terminalOnly?: boolean;
|
|
1191
|
-
}): Promise<PlayStatus>;
|
|
1192
1166
|
/**
|
|
1193
1167
|
* Stream semantic play-run events using the same SSE feed as the dashboard.
|
|
1194
1168
|
*
|
|
1195
|
-
*
|
|
1196
|
-
*
|
|
1169
|
+
* The server emits a canonical `play.run.snapshot` event first for every
|
|
1170
|
+
* connection, then incremental live events until terminal state or reconnect.
|
|
1197
1171
|
*/
|
|
1198
1172
|
streamPlayRunEvents(workflowId: string, options?: {
|
|
1199
1173
|
signal?: AbortSignal;
|
|
@@ -1205,7 +1179,7 @@ declare class DeeplineClient {
|
|
|
1205
1179
|
*
|
|
1206
1180
|
* Sends a stop request for the run.
|
|
1207
1181
|
*
|
|
1208
|
-
* @param workflowId -
|
|
1182
|
+
* @param workflowId - Public Deepline play-run id to cancel
|
|
1209
1183
|
*
|
|
1210
1184
|
* @example
|
|
1211
1185
|
* ```typescript
|
|
@@ -1216,7 +1190,7 @@ declare class DeeplineClient {
|
|
|
1216
1190
|
/**
|
|
1217
1191
|
* Stop a running play execution, including open HITL waits.
|
|
1218
1192
|
*
|
|
1219
|
-
* @param workflowId -
|
|
1193
|
+
* @param workflowId - Public Deepline play-run id to stop
|
|
1220
1194
|
* @param options.reason - Optional audit/debug reason
|
|
1221
1195
|
*/
|
|
1222
1196
|
stopPlay(workflowId: string, options?: {
|
|
@@ -1260,15 +1234,7 @@ declare class DeeplineClient {
|
|
|
1260
1234
|
* ```
|
|
1261
1235
|
*/
|
|
1262
1236
|
listRuns(options: RunsListOptions): Promise<PlayRunListItem[]>;
|
|
1263
|
-
/**
|
|
1264
|
-
* Fetch the lightweight tail status for a run using the public runs resource model.
|
|
1265
|
-
*
|
|
1266
|
-
* This is the SDK equivalent of:
|
|
1267
|
-
*
|
|
1268
|
-
* ```bash
|
|
1269
|
-
* deepline runs tail <run-id> --json
|
|
1270
|
-
* ```
|
|
1271
|
-
*/
|
|
1237
|
+
/** Read the canonical run stream and return the latest run snapshot. */
|
|
1272
1238
|
tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
|
|
1273
1239
|
/**
|
|
1274
1240
|
* Fetch persisted logs for a run using the public runs resource model.
|
|
@@ -1360,11 +1326,11 @@ declare class DeeplineClient {
|
|
|
1360
1326
|
*/
|
|
1361
1327
|
deletePlay(name: string): Promise<DeletePlayResult>;
|
|
1362
1328
|
/**
|
|
1363
|
-
* Run a play end-to-end: submit,
|
|
1329
|
+
* Run a play end-to-end: submit, stream until terminal, return result.
|
|
1364
1330
|
*
|
|
1365
1331
|
* This is the highest-level play execution method. It submits the play,
|
|
1366
|
-
*
|
|
1367
|
-
* and timing. Supports cancellation via `AbortSignal`.
|
|
1332
|
+
* reads the canonical run stream for status updates, and returns a structured
|
|
1333
|
+
* result with logs and timing. Supports cancellation via `AbortSignal`.
|
|
1368
1334
|
*
|
|
1369
1335
|
* @param code - Source string fallback; pass the bundled artifact in `options.artifact`
|
|
1370
1336
|
* @param csvPath - Input CSV path, or `null`
|
|
@@ -1380,7 +1346,6 @@ declare class DeeplineClient {
|
|
|
1380
1346
|
* const logs = status.progress?.logs ?? [];
|
|
1381
1347
|
* console.log(`[${status.status}] ${logs.length} log lines`);
|
|
1382
1348
|
* },
|
|
1383
|
-
* pollIntervalMs: 1000,
|
|
1384
1349
|
* });
|
|
1385
1350
|
*
|
|
1386
1351
|
* if (result.success) {
|
|
@@ -1402,10 +1367,8 @@ declare class DeeplineClient {
|
|
|
1402
1367
|
* ```
|
|
1403
1368
|
*/
|
|
1404
1369
|
runPlay(code: string, csvPath: string | null, name?: string, options?: {
|
|
1405
|
-
/** Called
|
|
1370
|
+
/** Called for each status snapshot emitted by the run stream. */
|
|
1406
1371
|
onProgress?: (status: PlayStatus) => void;
|
|
1407
|
-
/** Milliseconds between status polls. Default: `500`. */
|
|
1408
|
-
pollIntervalMs?: number;
|
|
1409
1372
|
/** Abort signal — triggers cancellation and immediate return. */
|
|
1410
1373
|
signal?: AbortSignal;
|
|
1411
1374
|
/** Runtime input for the play function. */
|
|
@@ -1436,7 +1399,7 @@ declare class DeeplineClient {
|
|
|
1436
1399
|
}>;
|
|
1437
1400
|
}
|
|
1438
1401
|
|
|
1439
|
-
declare const SDK_VERSION = "0.1.
|
|
1402
|
+
declare const SDK_VERSION = "0.1.23";
|
|
1440
1403
|
declare const SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
1441
1404
|
|
|
1442
1405
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -342,7 +342,7 @@ interface ToolMetadata extends ToolDefinition {
|
|
|
342
342
|
interface PlayRunResult {
|
|
343
343
|
/** `true` if the play completed successfully (`status === 'completed'`). */
|
|
344
344
|
success: boolean;
|
|
345
|
-
/** Public play-run identifier
|
|
345
|
+
/** Public play-run identifier. */
|
|
346
346
|
runId: string;
|
|
347
347
|
/** The play's return value. Only present on success. */
|
|
348
348
|
result?: unknown;
|
|
@@ -363,8 +363,6 @@ interface PlayProgressStatus {
|
|
|
363
363
|
totalRows?: number;
|
|
364
364
|
/** Accumulated log lines from `ctx.log()`. Grows monotonically. */
|
|
365
365
|
logs: string[];
|
|
366
|
-
/** Zero-based offset of the first returned log line when a tail cursor is used. */
|
|
367
|
-
logOffset?: number;
|
|
368
366
|
/** Error message if the play has failed. */
|
|
369
367
|
error?: string;
|
|
370
368
|
}
|
|
@@ -399,7 +397,7 @@ interface PlayStatus {
|
|
|
399
397
|
progress?: PlayProgressStatus;
|
|
400
398
|
/** Partial or final result. Available once the play returns. */
|
|
401
399
|
result?: unknown;
|
|
402
|
-
/**
|
|
400
|
+
/** Scheduler-backed run metadata when returned by the status endpoint. */
|
|
403
401
|
run?: {
|
|
404
402
|
startTime?: string | null;
|
|
405
403
|
closeTime?: string | null;
|
|
@@ -444,9 +442,9 @@ interface StopPlayRunResult {
|
|
|
444
442
|
* Summary of a single play run, returned by {@link DeeplineClient.listPlayRuns}.
|
|
445
443
|
*/
|
|
446
444
|
interface PlayRunListItem {
|
|
447
|
-
/**
|
|
445
|
+
/** Public Deepline play-run id. */
|
|
448
446
|
workflowId: string;
|
|
449
|
-
/**
|
|
447
|
+
/** Backend run attempt id, when exposed. */
|
|
450
448
|
runId: string;
|
|
451
449
|
/** Workflow type (typically `'Workflow'`). */
|
|
452
450
|
type: string;
|
|
@@ -564,7 +562,7 @@ interface PlayDefinitionDetail {
|
|
|
564
562
|
runCount: number;
|
|
565
563
|
/** Primary key column for CSV-based plays. */
|
|
566
564
|
tableNamespace?: string | null;
|
|
567
|
-
/**
|
|
565
|
+
/** Public Deepline id of the latest run. */
|
|
568
566
|
latestRunId?: string | null;
|
|
569
567
|
/** Unix timestamp (ms). */
|
|
570
568
|
createdAt: number;
|
|
@@ -677,12 +675,11 @@ interface ClearPlayHistoryResult {
|
|
|
677
675
|
* ```typescript
|
|
678
676
|
* const started = await client.startPlayRun({ name: 'my-play', input: { domain: 'stripe.com' } });
|
|
679
677
|
* console.log(`Started: ${started.workflowId}`);
|
|
680
|
-
* console.log(`Status URL: ${started.statusUrl}`);
|
|
681
678
|
* console.log(`Dashboard: ${started.dashboardUrl}`);
|
|
682
679
|
* ```
|
|
683
680
|
*/
|
|
684
681
|
interface PlayRunStart {
|
|
685
|
-
/**
|
|
682
|
+
/** Public Deepline play-run id for tracking this execution. */
|
|
686
683
|
workflowId: string;
|
|
687
684
|
/** Public Deepline play-run API version. */
|
|
688
685
|
apiVersion?: number;
|
|
@@ -694,8 +691,6 @@ interface PlayRunStart {
|
|
|
694
691
|
runtimeBackend?: string;
|
|
695
692
|
/** Canonical run contract compatibility metadata. */
|
|
696
693
|
contract?: Record<string, unknown> | null;
|
|
697
|
-
/** URL to poll for status updates. */
|
|
698
|
-
statusUrl?: string;
|
|
699
694
|
/** Dashboard URL for the named play. */
|
|
700
695
|
dashboardUrl?: string;
|
|
701
696
|
/** Terminal status returned when the start request used a short completion wait. */
|
|
@@ -706,7 +701,7 @@ interface PlayRunStart {
|
|
|
706
701
|
*
|
|
707
702
|
* This is the check-only version of play artifact registration: the server runs
|
|
708
703
|
* the same preflight compiler and static-analysis pass without storing,
|
|
709
|
-
* publishing, or starting a
|
|
704
|
+
* publishing, or starting a play run.
|
|
710
705
|
*/
|
|
711
706
|
interface PlayCheckResult {
|
|
712
707
|
valid: boolean;
|
|
@@ -773,8 +768,7 @@ interface StartPlayRunRequest {
|
|
|
773
768
|
waitForCompletionMs?: number;
|
|
774
769
|
/**
|
|
775
770
|
* Per-run execution profile override. The server defaults to `workers_edge`;
|
|
776
|
-
* tests
|
|
777
|
-
* this unset.
|
|
771
|
+
* tests can pass `local` here. Most callers should leave this unset.
|
|
778
772
|
*/
|
|
779
773
|
profile?: string;
|
|
780
774
|
}
|
|
@@ -836,11 +830,7 @@ type RunsListOptions = {
|
|
|
836
830
|
status?: string;
|
|
837
831
|
};
|
|
838
832
|
type RunsTailOptions = {
|
|
839
|
-
|
|
840
|
-
afterLogIndex?: number;
|
|
841
|
-
waitMs?: number;
|
|
842
|
-
terminalOnly?: boolean;
|
|
843
|
-
compact?: boolean;
|
|
833
|
+
signal?: AbortSignal;
|
|
844
834
|
};
|
|
845
835
|
type RunsLogsOptions = {
|
|
846
836
|
limit?: number;
|
|
@@ -919,7 +909,7 @@ declare class DeeplineClient {
|
|
|
919
909
|
/**
|
|
920
910
|
* Search available tools using Deepline's ranked backend search.
|
|
921
911
|
*
|
|
922
|
-
* This is the same discovery surface used by the
|
|
912
|
+
* This is the same discovery surface used by the CLI: it ranks across
|
|
923
913
|
* tool metadata, categories, agent guidance, and input schema fields.
|
|
924
914
|
*/
|
|
925
915
|
searchTools(options?: ToolSearchOptions): Promise<ToolSearchResult>;
|
|
@@ -970,7 +960,7 @@ declare class DeeplineClient {
|
|
|
970
960
|
* `progress.logs`; they are not part of the user output object.
|
|
971
961
|
*
|
|
972
962
|
* @param request - Play run configuration (name, code, input, etc.)
|
|
973
|
-
* @returns
|
|
963
|
+
* @returns Run metadata including the public `workflowId`
|
|
974
964
|
*
|
|
975
965
|
* @example
|
|
976
966
|
* ```typescript
|
|
@@ -1160,9 +1150,6 @@ declare class DeeplineClient {
|
|
|
1160
1150
|
* Internal/advanced primitive. Public callers should usually prefer
|
|
1161
1151
|
* {@link runPlay}, {@link PlayJob.get}, or `deepline play run --watch`.
|
|
1162
1152
|
*
|
|
1163
|
-
* Poll this method until `status` reaches a terminal state:
|
|
1164
|
-
* `'completed'`, `'failed'`, or `'cancelled'`.
|
|
1165
|
-
*
|
|
1166
1153
|
* @param workflowId - Play-run id from {@link startPlayRun}
|
|
1167
1154
|
* @returns Current status with progress logs and partial results
|
|
1168
1155
|
*
|
|
@@ -1176,24 +1163,11 @@ declare class DeeplineClient {
|
|
|
1176
1163
|
getPlayStatus(workflowId: string, options?: {
|
|
1177
1164
|
billing?: boolean;
|
|
1178
1165
|
}): Promise<PlayStatus>;
|
|
1179
|
-
/**
|
|
1180
|
-
* Get the lightweight tail-polling status for a play execution.
|
|
1181
|
-
*
|
|
1182
|
-
* This is intentionally smaller than {@link getPlayStatus}: it returns the
|
|
1183
|
-
* fields needed for CLI log tailing while the run is in flight, without
|
|
1184
|
-
* forcing the API to rebuild final result views on every poll. Call
|
|
1185
|
-
* {@link getPlayStatus} once after a terminal state for the full result.
|
|
1186
|
-
*/
|
|
1187
|
-
getPlayTailStatus(workflowId: string, options?: {
|
|
1188
|
-
afterLogIndex?: number;
|
|
1189
|
-
waitMs?: number;
|
|
1190
|
-
terminalOnly?: boolean;
|
|
1191
|
-
}): Promise<PlayStatus>;
|
|
1192
1166
|
/**
|
|
1193
1167
|
* Stream semantic play-run events using the same SSE feed as the dashboard.
|
|
1194
1168
|
*
|
|
1195
|
-
*
|
|
1196
|
-
*
|
|
1169
|
+
* The server emits a canonical `play.run.snapshot` event first for every
|
|
1170
|
+
* connection, then incremental live events until terminal state or reconnect.
|
|
1197
1171
|
*/
|
|
1198
1172
|
streamPlayRunEvents(workflowId: string, options?: {
|
|
1199
1173
|
signal?: AbortSignal;
|
|
@@ -1205,7 +1179,7 @@ declare class DeeplineClient {
|
|
|
1205
1179
|
*
|
|
1206
1180
|
* Sends a stop request for the run.
|
|
1207
1181
|
*
|
|
1208
|
-
* @param workflowId -
|
|
1182
|
+
* @param workflowId - Public Deepline play-run id to cancel
|
|
1209
1183
|
*
|
|
1210
1184
|
* @example
|
|
1211
1185
|
* ```typescript
|
|
@@ -1216,7 +1190,7 @@ declare class DeeplineClient {
|
|
|
1216
1190
|
/**
|
|
1217
1191
|
* Stop a running play execution, including open HITL waits.
|
|
1218
1192
|
*
|
|
1219
|
-
* @param workflowId -
|
|
1193
|
+
* @param workflowId - Public Deepline play-run id to stop
|
|
1220
1194
|
* @param options.reason - Optional audit/debug reason
|
|
1221
1195
|
*/
|
|
1222
1196
|
stopPlay(workflowId: string, options?: {
|
|
@@ -1260,15 +1234,7 @@ declare class DeeplineClient {
|
|
|
1260
1234
|
* ```
|
|
1261
1235
|
*/
|
|
1262
1236
|
listRuns(options: RunsListOptions): Promise<PlayRunListItem[]>;
|
|
1263
|
-
/**
|
|
1264
|
-
* Fetch the lightweight tail status for a run using the public runs resource model.
|
|
1265
|
-
*
|
|
1266
|
-
* This is the SDK equivalent of:
|
|
1267
|
-
*
|
|
1268
|
-
* ```bash
|
|
1269
|
-
* deepline runs tail <run-id> --json
|
|
1270
|
-
* ```
|
|
1271
|
-
*/
|
|
1237
|
+
/** Read the canonical run stream and return the latest run snapshot. */
|
|
1272
1238
|
tailRun(runId: string, options?: RunsTailOptions): Promise<PlayStatus>;
|
|
1273
1239
|
/**
|
|
1274
1240
|
* Fetch persisted logs for a run using the public runs resource model.
|
|
@@ -1360,11 +1326,11 @@ declare class DeeplineClient {
|
|
|
1360
1326
|
*/
|
|
1361
1327
|
deletePlay(name: string): Promise<DeletePlayResult>;
|
|
1362
1328
|
/**
|
|
1363
|
-
* Run a play end-to-end: submit,
|
|
1329
|
+
* Run a play end-to-end: submit, stream until terminal, return result.
|
|
1364
1330
|
*
|
|
1365
1331
|
* This is the highest-level play execution method. It submits the play,
|
|
1366
|
-
*
|
|
1367
|
-
* and timing. Supports cancellation via `AbortSignal`.
|
|
1332
|
+
* reads the canonical run stream for status updates, and returns a structured
|
|
1333
|
+
* result with logs and timing. Supports cancellation via `AbortSignal`.
|
|
1368
1334
|
*
|
|
1369
1335
|
* @param code - Source string fallback; pass the bundled artifact in `options.artifact`
|
|
1370
1336
|
* @param csvPath - Input CSV path, or `null`
|
|
@@ -1380,7 +1346,6 @@ declare class DeeplineClient {
|
|
|
1380
1346
|
* const logs = status.progress?.logs ?? [];
|
|
1381
1347
|
* console.log(`[${status.status}] ${logs.length} log lines`);
|
|
1382
1348
|
* },
|
|
1383
|
-
* pollIntervalMs: 1000,
|
|
1384
1349
|
* });
|
|
1385
1350
|
*
|
|
1386
1351
|
* if (result.success) {
|
|
@@ -1402,10 +1367,8 @@ declare class DeeplineClient {
|
|
|
1402
1367
|
* ```
|
|
1403
1368
|
*/
|
|
1404
1369
|
runPlay(code: string, csvPath: string | null, name?: string, options?: {
|
|
1405
|
-
/** Called
|
|
1370
|
+
/** Called for each status snapshot emitted by the run stream. */
|
|
1406
1371
|
onProgress?: (status: PlayStatus) => void;
|
|
1407
|
-
/** Milliseconds between status polls. Default: `500`. */
|
|
1408
|
-
pollIntervalMs?: number;
|
|
1409
1372
|
/** Abort signal — triggers cancellation and immediate return. */
|
|
1410
1373
|
signal?: AbortSignal;
|
|
1411
1374
|
/** Runtime input for the play function. */
|
|
@@ -1436,7 +1399,7 @@ declare class DeeplineClient {
|
|
|
1436
1399
|
}>;
|
|
1437
1400
|
}
|
|
1438
1401
|
|
|
1439
|
-
declare const SDK_VERSION = "0.1.
|
|
1402
|
+
declare const SDK_VERSION = "0.1.23";
|
|
1440
1403
|
declare const SDK_API_CONTRACT = "2026-05-runs-v2";
|
|
1441
1404
|
|
|
1442
1405
|
/**
|