deepline 0.1.214 → 0.1.216

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.
Files changed (31) hide show
  1. package/dist/bundling-sources/apps/play-runner-workers/src/child-manifest-resolver.ts +108 -0
  2. package/dist/bundling-sources/apps/play-runner-workers/src/coordinator-entry.ts +85 -10
  3. package/dist/bundling-sources/apps/play-runner-workers/src/coordinator-runtime-proxy.ts +34 -0
  4. package/dist/bundling-sources/apps/play-runner-workers/src/entry.ts +50 -36
  5. package/dist/bundling-sources/apps/play-runner-workers/src/runtime/harness-receipt-store.ts +12 -0
  6. package/dist/bundling-sources/apps/play-runner-workers/src/workflow-retry.ts +4 -0
  7. package/dist/bundling-sources/sdk/src/client.ts +1 -2
  8. package/dist/bundling-sources/sdk/src/release.ts +2 -2
  9. package/dist/bundling-sources/sdk/src/types.ts +2 -3
  10. package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +21 -3
  11. package/dist/bundling-sources/shared_libs/play-runtime/context.ts +95 -144
  12. package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +14 -3
  13. package/dist/bundling-sources/shared_libs/play-runtime/governor/governor.ts +37 -2
  14. package/dist/bundling-sources/shared_libs/play-runtime/profiles.ts +22 -0
  15. package/dist/bundling-sources/shared_libs/play-runtime/providers.ts +32 -0
  16. package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +13 -0
  17. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +5 -2
  18. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-session-execution.ts +66 -0
  19. package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +18 -55
  20. package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +59 -27
  21. package/dist/bundling-sources/shared_libs/play-runtime/runtime-contract.ts +17 -1
  22. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +3 -2
  23. package/dist/bundling-sources/shared_libs/play-runtime/secret-redaction.ts +11 -1
  24. package/dist/bundling-sources/shared_libs/play-runtime/transient-service-error.ts +10 -0
  25. package/dist/cli/index.js +72 -21
  26. package/dist/cli/index.mjs +72 -21
  27. package/dist/index.d.mts +2 -3
  28. package/dist/index.d.ts +2 -3
  29. package/dist/index.js +7 -6
  30. package/dist/index.mjs +7 -6
  31. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -623,10 +623,10 @@ var SDK_RELEASE = {
623
623
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
624
624
  // fields shipped in 0.1.153.
625
625
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
626
- version: "0.1.214",
626
+ version: "0.1.216",
627
627
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
628
628
  supportPolicy: {
629
- latest: "0.1.214",
629
+ latest: "0.1.216",
630
630
  minimumSupported: "0.1.53",
631
631
  deprecatedBelow: "0.1.53",
632
632
  commandMinimumSupported: [
@@ -1364,8 +1364,10 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1364
1364
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1365
1365
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1366
1366
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1367
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs]|key|token|secret|api[_-]?key)[A-Za-z0-9_./+=:-]{12,}\b/gi;
1367
+ var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1368
+ var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1368
1369
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1370
+ var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
1369
1371
  var HIGH_ENTROPY_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password|authorization|access[_-]?token|refresh[_-]?token)\b\s*[:=]\s*["']?[^"',\s]{16,}["']?/gi;
1370
1372
  var SENSITIVE_URL_PARAM_RE = /[?#&](?:\w*(?:key|token)|secret|password|authorization|credential|signature|sig)(?:=|$)/i;
1371
1373
  function escapeRegExp(value) {
@@ -1382,7 +1384,7 @@ function redactSecretLikeString(value) {
1382
1384
  }
1383
1385
  if (!URL_SECRET_VALUE_RE.test(value)) return value;
1384
1386
  }
1385
- return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1387
+ return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1386
1388
  const separator = match.includes("=") ? "=" : ":";
1387
1389
  const [key] = match.split(separator, 1);
1388
1390
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -3047,8 +3049,7 @@ var DeeplineClient = class {
3047
3049
  ...forceToolRefresh ? { forceToolRefresh: true } : {},
3048
3050
  ...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
3049
3051
  // Profile selection is the API's job, not the CLI's. The server
3050
- // defaults to absurd; callers that need workers_edge pass
3051
- // `request.profile` explicitly.
3052
+ // defaults to absurd; callers normally omit this field.
3052
3053
  ...request.profile ? { profile: request.profile } : {},
3053
3054
  ...integrationMode ? { integrationMode } : {},
3054
3055
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
@@ -10763,6 +10764,18 @@ var PLAY_RUNTIME_PROVIDER_IDS = {
10763
10764
  workersEdge: "workers_edge",
10764
10765
  absurd: "absurd"
10765
10766
  };
10767
+ var PLAY_RUNTIME_PROVIDER_DISABLED_CODE = "PLAY_RUNTIME_PROVIDER_DISABLED";
10768
+ var PlayRuntimeProviderDisabledError = class extends Error {
10769
+ code = PLAY_RUNTIME_PROVIDER_DISABLED_CODE;
10770
+ profile;
10771
+ constructor(profile) {
10772
+ super(
10773
+ `Play runtime profile "${profile}" is disabled. Deepline runs now execute on the "absurd" profile.`
10774
+ );
10775
+ this.name = "PlayRuntimeProviderDisabledError";
10776
+ this.profile = profile;
10777
+ }
10778
+ };
10766
10779
  var PLAY_RUNTIME_PROVIDERS = {
10767
10780
  workers_edge: {
10768
10781
  id: PLAY_RUNTIME_PROVIDER_IDS.workersEdge,
@@ -10787,6 +10800,11 @@ var PLAY_RUNTIME_PROVIDERS = {
10787
10800
  function defaultPlayRuntimeProvider() {
10788
10801
  return PLAY_RUNTIME_PROVIDERS.absurd;
10789
10802
  }
10803
+ function assertPlayRuntimeProviderEnabled(provider) {
10804
+ if (provider.id === PLAY_RUNTIME_PROVIDER_IDS.workersEdge) {
10805
+ throw new PlayRuntimeProviderDisabledError(provider.id);
10806
+ }
10807
+ }
10790
10808
  function resolvePlayRuntimeProvider(override) {
10791
10809
  if (override?.trim()) {
10792
10810
  const id = override.trim();
@@ -10801,17 +10819,22 @@ function resolvePlayRuntimeProvider(override) {
10801
10819
  }
10802
10820
  return defaultPlayRuntimeProvider();
10803
10821
  }
10822
+ function resolveEnabledPlayRuntimeProvider(override) {
10823
+ const provider = resolvePlayRuntimeProvider(override);
10824
+ assertPlayRuntimeProviderEnabled(provider);
10825
+ return provider;
10826
+ }
10804
10827
 
10805
10828
  // ../shared_libs/play-runtime/profiles.ts
10806
10829
  var PLAY_EXECUTION_PROFILE_IDS = {
10807
10830
  ...PLAY_RUNTIME_PROVIDER_IDS
10808
10831
  };
10809
10832
  var PLAY_EXECUTION_PROFILES = PLAY_RUNTIME_PROVIDERS;
10810
- function resolveExecutionProfile(override) {
10833
+ function resolveEnabledExecutionProfile(override) {
10811
10834
  try {
10812
- return resolvePlayRuntimeProvider(override);
10835
+ return resolveEnabledPlayRuntimeProvider(override);
10813
10836
  } catch (error) {
10814
- if (override?.trim()) {
10837
+ if (override?.trim() && error instanceof Error && /Unsupported play runtime provider/.test(error.message)) {
10815
10838
  throw new Error(
10816
10839
  `Unknown execution profile "${override.trim()}". Expected one of: ${Object.keys(
10817
10840
  PLAY_EXECUTION_PROFILES
@@ -11759,7 +11782,7 @@ async function collectBundledPlayGraph(entryFile, profile = null) {
11759
11782
  const playBundler = await loadPlayBundler();
11760
11783
  const nodes = /* @__PURE__ */ new Map();
11761
11784
  const visiting = /* @__PURE__ */ new Set();
11762
- const artifactKind = resolveExecutionProfile(profile).artifactKind;
11785
+ const artifactKind = resolveEnabledExecutionProfile(profile).artifactKind;
11763
11786
  const visit = async (filePath) => {
11764
11787
  const absolutePath = normalizePlayPath(filePath);
11765
11788
  const cached = nodes.get(absolutePath);
@@ -13325,7 +13348,9 @@ function normalizeProgressForEnvelope(status, rowsInfo) {
13325
13348
  const pending = getNumericField(progress, "pending") ?? (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed) : null);
13326
13349
  return {
13327
13350
  total,
13351
+ totalRows: total,
13328
13352
  completed,
13353
+ completedRows: completed,
13329
13354
  pending,
13330
13355
  failed,
13331
13356
  executed: getNumericField(progress, "executed"),
@@ -14473,7 +14498,7 @@ function writeStartedPlayRun(input2) {
14473
14498
  );
14474
14499
  }
14475
14500
  function parsePlayRunOptions(args) {
14476
- const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Production defaults to absurd. Use --profile workers_edge only for an explicit Cloudflare run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
14501
+ const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Runs default to absurd. The workers_edge profile is disabled.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
14477
14502
  let filePath = null;
14478
14503
  let playName = null;
14479
14504
  let input2 = null;
@@ -14512,7 +14537,7 @@ function parsePlayRunOptions(args) {
14512
14537
  throw new Error("--profile requires an execution profile id.");
14513
14538
  }
14514
14539
  profile = value.trim();
14515
- resolveExecutionProfile(profile);
14540
+ resolveEnabledExecutionProfile(profile);
14516
14541
  index += 1;
14517
14542
  continue;
14518
14543
  }
@@ -15460,7 +15485,7 @@ async function handleRunsList(args) {
15460
15485
  return 0;
15461
15486
  }
15462
15487
  async function handleRunTail(args) {
15463
- const usage = "Usage: deepline runs tail <run-id> [--json] [--compact]";
15488
+ const usage = "Usage: deepline runs tail <run-id> [--json | --jsonl] [--compact]";
15464
15489
  let runId;
15465
15490
  try {
15466
15491
  runId = parseRunIdPositional(args, usage);
@@ -15476,13 +15501,18 @@ async function handleRunTail(args) {
15476
15501
  );
15477
15502
  return 1;
15478
15503
  }
15479
- if (arg.startsWith("--") && arg !== "--json" && arg !== "--compact") {
15504
+ if (arg.startsWith("--") && arg !== "--json" && arg !== "--jsonl" && arg !== "--compact") {
15480
15505
  console.error(`${arg} is not supported by deepline runs tail.`);
15481
15506
  return 1;
15482
15507
  }
15483
15508
  }
15509
+ if (args.includes("--json") && args.includes("--jsonl")) {
15510
+ console.error("--json and --jsonl cannot be used together.");
15511
+ return 1;
15512
+ }
15484
15513
  const client2 = new DeeplineClient();
15485
- const jsonOutput = argsWantJson(args);
15514
+ const jsonLines = args.includes("--jsonl");
15515
+ const jsonOutput = !jsonLines && argsWantJson(args);
15486
15516
  const compact = args.includes("--compact");
15487
15517
  const compactState = {
15488
15518
  lastLogIndex: 0,
@@ -15492,7 +15522,16 @@ async function handleRunTail(args) {
15492
15522
  lastStatusHeartbeatAt: 0
15493
15523
  };
15494
15524
  const status = await client2.runs.tail(runId, {
15495
- onEvent: compact && !jsonOutput ? (event) => {
15525
+ onEvent: jsonLines ? (event) => {
15526
+ process.stdout.write(
15527
+ `${JSON.stringify({
15528
+ schemaVersion: 1,
15529
+ kind: "play_run_event",
15530
+ event
15531
+ })}
15532
+ `
15533
+ );
15534
+ } : compact && !jsonOutput ? (event) => {
15496
15535
  const transition = getStepTransitionLineFromLiveEvent(
15497
15536
  event,
15498
15537
  compactState
@@ -15522,7 +15561,12 @@ async function handleRunTail(args) {
15522
15561
  );
15523
15562
  }
15524
15563
  });
15525
- writePlayResult(status, jsonOutput);
15564
+ if (jsonLines) {
15565
+ process.stdout.write(`${JSON.stringify(compactPlayStatus(status))}
15566
+ `);
15567
+ } else {
15568
+ writePlayResult(status, jsonOutput);
15569
+ }
15526
15570
  return status.status === "failed" ? 1 : 0;
15527
15571
  }
15528
15572
  async function handleRunLogs(args) {
@@ -16888,19 +16932,26 @@ Examples:
16888
16932
  Notes:
16889
16933
  Streams live run events until the stream ends. Use get for current status and
16890
16934
  logs for persisted log history. In human output, --compact prints deduplicated
16891
- step transitions and progress instead of the full event stream.
16935
+ step transitions and progress instead of the full event stream. --json emits
16936
+ one terminal package. --jsonl emits canonical live events as JSON Lines and
16937
+ ends with the same compact package shape as runs get --json.
16892
16938
 
16893
16939
  Examples:
16894
16940
  deepline runs tail play/my-play/run/20260501t000000-000
16895
- deepline runs tail play/my-play/run/20260501t000000-000 --compact --json
16941
+ deepline runs tail play/my-play/run/20260501t000000-000 --compact
16942
+ deepline runs tail play/my-play/run/20260501t000000-000 --jsonl
16896
16943
  `
16897
- ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option(
16944
+ ).option("--json", "Emit one terminal JSON package after the run completes").option(
16945
+ "--jsonl",
16946
+ "Stream live events as JSON Lines, then the terminal package"
16947
+ ).option(
16898
16948
  "--compact",
16899
- "Show deduplicated step transitions and progress; compact JSON output"
16949
+ "Show deduplicated human step transitions and progress"
16900
16950
  ).action(async (runId, options) => {
16901
16951
  process.exitCode = await handleRunTail([
16902
16952
  runId,
16903
16953
  ...options.json ? ["--json"] : [],
16954
+ ...options.jsonl ? ["--jsonl"] : [],
16904
16955
  ...options.compact ? ["--compact"] : []
16905
16956
  ]);
16906
16957
  });
@@ -608,10 +608,10 @@ var SDK_RELEASE = {
608
608
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
609
609
  // fields shipped in 0.1.153.
610
610
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
611
- version: "0.1.214",
611
+ version: "0.1.216",
612
612
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
613
613
  supportPolicy: {
614
- latest: "0.1.214",
614
+ latest: "0.1.216",
615
615
  minimumSupported: "0.1.53",
616
616
  deprecatedBelow: "0.1.53",
617
617
  commandMinimumSupported: [
@@ -1349,8 +1349,10 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1349
1349
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1350
1350
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1351
1351
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1352
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs]|key|token|secret|api[_-]?key)[A-Za-z0-9_./+=:-]{12,}\b/gi;
1352
+ var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1353
+ var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1353
1354
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1355
+ var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
1354
1356
  var HIGH_ENTROPY_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password|authorization|access[_-]?token|refresh[_-]?token)\b\s*[:=]\s*["']?[^"',\s]{16,}["']?/gi;
1355
1357
  var SENSITIVE_URL_PARAM_RE = /[?#&](?:\w*(?:key|token)|secret|password|authorization|credential|signature|sig)(?:=|$)/i;
1356
1358
  function escapeRegExp(value) {
@@ -1367,7 +1369,7 @@ function redactSecretLikeString(value) {
1367
1369
  }
1368
1370
  if (!URL_SECRET_VALUE_RE.test(value)) return value;
1369
1371
  }
1370
- return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1372
+ return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1371
1373
  const separator = match.includes("=") ? "=" : ":";
1372
1374
  const [key] = match.split(separator, 1);
1373
1375
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -3032,8 +3034,7 @@ var DeeplineClient = class {
3032
3034
  ...forceToolRefresh ? { forceToolRefresh: true } : {},
3033
3035
  ...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
3034
3036
  // Profile selection is the API's job, not the CLI's. The server
3035
- // defaults to absurd; callers that need workers_edge pass
3036
- // `request.profile` explicitly.
3037
+ // defaults to absurd; callers normally omit this field.
3037
3038
  ...request.profile ? { profile: request.profile } : {},
3038
3039
  ...integrationMode ? { integrationMode } : {},
3039
3040
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
@@ -10792,6 +10793,18 @@ var PLAY_RUNTIME_PROVIDER_IDS = {
10792
10793
  workersEdge: "workers_edge",
10793
10794
  absurd: "absurd"
10794
10795
  };
10796
+ var PLAY_RUNTIME_PROVIDER_DISABLED_CODE = "PLAY_RUNTIME_PROVIDER_DISABLED";
10797
+ var PlayRuntimeProviderDisabledError = class extends Error {
10798
+ code = PLAY_RUNTIME_PROVIDER_DISABLED_CODE;
10799
+ profile;
10800
+ constructor(profile) {
10801
+ super(
10802
+ `Play runtime profile "${profile}" is disabled. Deepline runs now execute on the "absurd" profile.`
10803
+ );
10804
+ this.name = "PlayRuntimeProviderDisabledError";
10805
+ this.profile = profile;
10806
+ }
10807
+ };
10795
10808
  var PLAY_RUNTIME_PROVIDERS = {
10796
10809
  workers_edge: {
10797
10810
  id: PLAY_RUNTIME_PROVIDER_IDS.workersEdge,
@@ -10816,6 +10829,11 @@ var PLAY_RUNTIME_PROVIDERS = {
10816
10829
  function defaultPlayRuntimeProvider() {
10817
10830
  return PLAY_RUNTIME_PROVIDERS.absurd;
10818
10831
  }
10832
+ function assertPlayRuntimeProviderEnabled(provider) {
10833
+ if (provider.id === PLAY_RUNTIME_PROVIDER_IDS.workersEdge) {
10834
+ throw new PlayRuntimeProviderDisabledError(provider.id);
10835
+ }
10836
+ }
10819
10837
  function resolvePlayRuntimeProvider(override) {
10820
10838
  if (override?.trim()) {
10821
10839
  const id = override.trim();
@@ -10830,17 +10848,22 @@ function resolvePlayRuntimeProvider(override) {
10830
10848
  }
10831
10849
  return defaultPlayRuntimeProvider();
10832
10850
  }
10851
+ function resolveEnabledPlayRuntimeProvider(override) {
10852
+ const provider = resolvePlayRuntimeProvider(override);
10853
+ assertPlayRuntimeProviderEnabled(provider);
10854
+ return provider;
10855
+ }
10833
10856
 
10834
10857
  // ../shared_libs/play-runtime/profiles.ts
10835
10858
  var PLAY_EXECUTION_PROFILE_IDS = {
10836
10859
  ...PLAY_RUNTIME_PROVIDER_IDS
10837
10860
  };
10838
10861
  var PLAY_EXECUTION_PROFILES = PLAY_RUNTIME_PROVIDERS;
10839
- function resolveExecutionProfile(override) {
10862
+ function resolveEnabledExecutionProfile(override) {
10840
10863
  try {
10841
- return resolvePlayRuntimeProvider(override);
10864
+ return resolveEnabledPlayRuntimeProvider(override);
10842
10865
  } catch (error) {
10843
- if (override?.trim()) {
10866
+ if (override?.trim() && error instanceof Error && /Unsupported play runtime provider/.test(error.message)) {
10844
10867
  throw new Error(
10845
10868
  `Unknown execution profile "${override.trim()}". Expected one of: ${Object.keys(
10846
10869
  PLAY_EXECUTION_PROFILES
@@ -11788,7 +11811,7 @@ async function collectBundledPlayGraph(entryFile, profile = null) {
11788
11811
  const playBundler = await loadPlayBundler();
11789
11812
  const nodes = /* @__PURE__ */ new Map();
11790
11813
  const visiting = /* @__PURE__ */ new Set();
11791
- const artifactKind = resolveExecutionProfile(profile).artifactKind;
11814
+ const artifactKind = resolveEnabledExecutionProfile(profile).artifactKind;
11792
11815
  const visit = async (filePath) => {
11793
11816
  const absolutePath = normalizePlayPath(filePath);
11794
11817
  const cached = nodes.get(absolutePath);
@@ -13354,7 +13377,9 @@ function normalizeProgressForEnvelope(status, rowsInfo) {
13354
13377
  const pending = getNumericField(progress, "pending") ?? (typeof total === "number" && typeof completed === "number" && typeof failed === "number" ? Math.max(0, total - completed - failed) : null);
13355
13378
  return {
13356
13379
  total,
13380
+ totalRows: total,
13357
13381
  completed,
13382
+ completedRows: completed,
13358
13383
  pending,
13359
13384
  failed,
13360
13385
  executed: getNumericField(progress, "executed"),
@@ -14502,7 +14527,7 @@ function writeStartedPlayRun(input2) {
14502
14527
  );
14503
14528
  }
14504
14529
  function parsePlayRunOptions(args) {
14505
- const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Production defaults to absurd. Use --profile workers_edge only for an explicit Cloudflare run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
14530
+ const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--no-open] [--json] [--full] [--<input> value]\n Runs default to absurd. The workers_edge profile is disabled.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and ctx.dataset guidance.";
14506
14531
  let filePath = null;
14507
14532
  let playName = null;
14508
14533
  let input2 = null;
@@ -14541,7 +14566,7 @@ function parsePlayRunOptions(args) {
14541
14566
  throw new Error("--profile requires an execution profile id.");
14542
14567
  }
14543
14568
  profile = value.trim();
14544
- resolveExecutionProfile(profile);
14569
+ resolveEnabledExecutionProfile(profile);
14545
14570
  index += 1;
14546
14571
  continue;
14547
14572
  }
@@ -15489,7 +15514,7 @@ async function handleRunsList(args) {
15489
15514
  return 0;
15490
15515
  }
15491
15516
  async function handleRunTail(args) {
15492
- const usage = "Usage: deepline runs tail <run-id> [--json] [--compact]";
15517
+ const usage = "Usage: deepline runs tail <run-id> [--json | --jsonl] [--compact]";
15493
15518
  let runId;
15494
15519
  try {
15495
15520
  runId = parseRunIdPositional(args, usage);
@@ -15505,13 +15530,18 @@ async function handleRunTail(args) {
15505
15530
  );
15506
15531
  return 1;
15507
15532
  }
15508
- if (arg.startsWith("--") && arg !== "--json" && arg !== "--compact") {
15533
+ if (arg.startsWith("--") && arg !== "--json" && arg !== "--jsonl" && arg !== "--compact") {
15509
15534
  console.error(`${arg} is not supported by deepline runs tail.`);
15510
15535
  return 1;
15511
15536
  }
15512
15537
  }
15538
+ if (args.includes("--json") && args.includes("--jsonl")) {
15539
+ console.error("--json and --jsonl cannot be used together.");
15540
+ return 1;
15541
+ }
15513
15542
  const client2 = new DeeplineClient();
15514
- const jsonOutput = argsWantJson(args);
15543
+ const jsonLines = args.includes("--jsonl");
15544
+ const jsonOutput = !jsonLines && argsWantJson(args);
15515
15545
  const compact = args.includes("--compact");
15516
15546
  const compactState = {
15517
15547
  lastLogIndex: 0,
@@ -15521,7 +15551,16 @@ async function handleRunTail(args) {
15521
15551
  lastStatusHeartbeatAt: 0
15522
15552
  };
15523
15553
  const status = await client2.runs.tail(runId, {
15524
- onEvent: compact && !jsonOutput ? (event) => {
15554
+ onEvent: jsonLines ? (event) => {
15555
+ process.stdout.write(
15556
+ `${JSON.stringify({
15557
+ schemaVersion: 1,
15558
+ kind: "play_run_event",
15559
+ event
15560
+ })}
15561
+ `
15562
+ );
15563
+ } : compact && !jsonOutput ? (event) => {
15525
15564
  const transition = getStepTransitionLineFromLiveEvent(
15526
15565
  event,
15527
15566
  compactState
@@ -15551,7 +15590,12 @@ async function handleRunTail(args) {
15551
15590
  );
15552
15591
  }
15553
15592
  });
15554
- writePlayResult(status, jsonOutput);
15593
+ if (jsonLines) {
15594
+ process.stdout.write(`${JSON.stringify(compactPlayStatus(status))}
15595
+ `);
15596
+ } else {
15597
+ writePlayResult(status, jsonOutput);
15598
+ }
15555
15599
  return status.status === "failed" ? 1 : 0;
15556
15600
  }
15557
15601
  async function handleRunLogs(args) {
@@ -16917,19 +16961,26 @@ Examples:
16917
16961
  Notes:
16918
16962
  Streams live run events until the stream ends. Use get for current status and
16919
16963
  logs for persisted log history. In human output, --compact prints deduplicated
16920
- step transitions and progress instead of the full event stream.
16964
+ step transitions and progress instead of the full event stream. --json emits
16965
+ one terminal package. --jsonl emits canonical live events as JSON Lines and
16966
+ ends with the same compact package shape as runs get --json.
16921
16967
 
16922
16968
  Examples:
16923
16969
  deepline runs tail play/my-play/run/20260501t000000-000
16924
- deepline runs tail play/my-play/run/20260501t000000-000 --compact --json
16970
+ deepline runs tail play/my-play/run/20260501t000000-000 --compact
16971
+ deepline runs tail play/my-play/run/20260501t000000-000 --jsonl
16925
16972
  `
16926
- ).option("--json", "Emit JSON output. Also automatic when stdout is piped").option(
16973
+ ).option("--json", "Emit one terminal JSON package after the run completes").option(
16974
+ "--jsonl",
16975
+ "Stream live events as JSON Lines, then the terminal package"
16976
+ ).option(
16927
16977
  "--compact",
16928
- "Show deduplicated step transitions and progress; compact JSON output"
16978
+ "Show deduplicated human step transitions and progress"
16929
16979
  ).action(async (runId, options) => {
16930
16980
  process.exitCode = await handleRunTail([
16931
16981
  runId,
16932
16982
  ...options.json ? ["--json"] : [],
16983
+ ...options.jsonl ? ["--jsonl"] : [],
16933
16984
  ...options.compact ? ["--compact"] : []
16934
16985
  ]);
16935
16986
  });
package/dist/index.d.mts CHANGED
@@ -1085,9 +1085,8 @@ interface StartPlayRunRequest {
1085
1085
  /** Optionally let the start request wait briefly and return a terminal result. */
1086
1086
  waitForCompletionMs?: number;
1087
1087
  /**
1088
- * Per-run execution profile override. The server defaults to absurd;
1089
- * callers that need workers_edge can pass it here. Most callers should leave
1090
- * this unset.
1088
+ * Per-run execution profile override. The server defaults to absurd. The
1089
+ * workers_edge profile is disabled; most callers should leave this unset.
1091
1090
  */
1092
1091
  profile?: string;
1093
1092
  /** Optional per-run provider execution mode for eval/smoke runs. */
package/dist/index.d.ts CHANGED
@@ -1085,9 +1085,8 @@ interface StartPlayRunRequest {
1085
1085
  /** Optionally let the start request wait briefly and return a terminal result. */
1086
1086
  waitForCompletionMs?: number;
1087
1087
  /**
1088
- * Per-run execution profile override. The server defaults to absurd;
1089
- * callers that need workers_edge can pass it here. Most callers should leave
1090
- * this unset.
1088
+ * Per-run execution profile override. The server defaults to absurd. The
1089
+ * workers_edge profile is disabled; most callers should leave this unset.
1091
1090
  */
1092
1091
  profile?: string;
1093
1092
  /** Optional per-run provider execution mode for eval/smoke runs. */
package/dist/index.js CHANGED
@@ -422,10 +422,10 @@ var SDK_RELEASE = {
422
422
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
423
423
  // fields shipped in 0.1.153.
424
424
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
425
- version: "0.1.214",
425
+ version: "0.1.216",
426
426
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
427
427
  supportPolicy: {
428
- latest: "0.1.214",
428
+ latest: "0.1.216",
429
429
  minimumSupported: "0.1.53",
430
430
  deprecatedBelow: "0.1.53",
431
431
  commandMinimumSupported: [
@@ -1163,8 +1163,10 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1163
1163
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1164
1164
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1165
1165
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1166
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs]|key|token|secret|api[_-]?key)[A-Za-z0-9_./+=:-]{12,}\b/gi;
1166
+ var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1167
+ var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1167
1168
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1169
+ var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
1168
1170
  var HIGH_ENTROPY_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password|authorization|access[_-]?token|refresh[_-]?token)\b\s*[:=]\s*["']?[^"',\s]{16,}["']?/gi;
1169
1171
  var SENSITIVE_URL_PARAM_RE = /[?#&](?:\w*(?:key|token)|secret|password|authorization|credential|signature|sig)(?:=|$)/i;
1170
1172
  function escapeRegExp(value) {
@@ -1181,7 +1183,7 @@ function redactSecretLikeString(value) {
1181
1183
  }
1182
1184
  if (!URL_SECRET_VALUE_RE.test(value)) return value;
1183
1185
  }
1184
- return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1186
+ return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1185
1187
  const separator = match.includes("=") ? "=" : ":";
1186
1188
  const [key] = match.split(separator, 1);
1187
1189
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -2846,8 +2848,7 @@ var DeeplineClient = class {
2846
2848
  ...forceToolRefresh ? { forceToolRefresh: true } : {},
2847
2849
  ...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
2848
2850
  // Profile selection is the API's job, not the CLI's. The server
2849
- // defaults to absurd; callers that need workers_edge pass
2850
- // `request.profile` explicitly.
2851
+ // defaults to absurd; callers normally omit this field.
2851
2852
  ...request.profile ? { profile: request.profile } : {},
2852
2853
  ...integrationMode ? { integrationMode } : {},
2853
2854
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
package/dist/index.mjs CHANGED
@@ -352,10 +352,10 @@ var SDK_RELEASE = {
352
352
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
353
353
  // fields shipped in 0.1.153.
354
354
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
355
- version: "0.1.214",
355
+ version: "0.1.216",
356
356
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
357
357
  supportPolicy: {
358
- latest: "0.1.214",
358
+ latest: "0.1.216",
359
359
  minimumSupported: "0.1.53",
360
360
  deprecatedBelow: "0.1.53",
361
361
  commandMinimumSupported: [
@@ -1093,8 +1093,10 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1093
1093
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1094
1094
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1095
1095
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1096
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs]|key|token|secret|api[_-]?key)[A-Za-z0-9_./+=:-]{12,}\b/gi;
1096
+ var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1097
+ var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1097
1098
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1099
+ var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
1098
1100
  var HIGH_ENTROPY_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password|authorization|access[_-]?token|refresh[_-]?token)\b\s*[:=]\s*["']?[^"',\s]{16,}["']?/gi;
1099
1101
  var SENSITIVE_URL_PARAM_RE = /[?#&](?:\w*(?:key|token)|secret|password|authorization|credential|signature|sig)(?:=|$)/i;
1100
1102
  function escapeRegExp(value) {
@@ -1111,7 +1113,7 @@ function redactSecretLikeString(value) {
1111
1113
  }
1112
1114
  if (!URL_SECRET_VALUE_RE.test(value)) return value;
1113
1115
  }
1114
- return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1116
+ return value.replace(PRIVATE_KEY_RE, SECRET_REDACTION_PLACEHOLDER).replace(BEARER_TOKEN_RE, `Bearer ${SECRET_REDACTION_PLACEHOLDER}`).replace(JWT_RE, SECRET_REDACTION_PLACEHOLDER).replace(COMMON_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_PREFIXED_SECRET_RE, SECRET_REDACTION_PLACEHOLDER).replace(GENERIC_SECRET_ASSIGNMENT_RE, SECRET_REDACTION_PLACEHOLDER).replace(HIGH_ENTROPY_ASSIGNMENT_RE, (match) => {
1115
1117
  const separator = match.includes("=") ? "=" : ":";
1116
1118
  const [key] = match.split(separator, 1);
1117
1119
  return `${key.trim()}${separator}${SECRET_REDACTION_PLACEHOLDER}`;
@@ -2776,8 +2778,7 @@ var DeeplineClient = class {
2776
2778
  ...forceToolRefresh ? { forceToolRefresh: true } : {},
2777
2779
  ...typeof request.waitForCompletionMs === "number" ? { waitForCompletionMs: request.waitForCompletionMs } : {},
2778
2780
  // Profile selection is the API's job, not the CLI's. The server
2779
- // defaults to absurd; callers that need workers_edge pass
2780
- // `request.profile` explicitly.
2781
+ // defaults to absurd; callers normally omit this field.
2781
2782
  ...request.profile ? { profile: request.profile } : {},
2782
2783
  ...integrationMode ? { integrationMode } : {},
2783
2784
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.214",
3
+ "version": "0.1.216",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {