deepline 0.1.25 → 0.1.27

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.
@@ -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.25";
246
+ var SDK_VERSION = "0.1.27";
247
247
  var SDK_API_CONTRACT = "2026-05-runs-v2";
248
248
 
249
249
  // ../shared_libs/play-runtime/coordinator-headers.ts
@@ -588,7 +588,7 @@ function updatePlayLiveStatusState(state, event) {
588
588
  const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : state.runId;
589
589
  const status = normalizeLiveStatus(payload.status) ?? state.status;
590
590
  const logs = readStringArray(payload.logs);
591
- if (logs.length > 0 || event.type === "play.run.snapshot") {
591
+ if (logs.length > 0 || event.type === "play.run.snapshot" || event.type === "play.run.final_status") {
592
592
  state.logs = logs;
593
593
  }
594
594
  if ("result" in payload) {
@@ -3496,8 +3496,8 @@ Examples:
3496
3496
  // src/cli/commands/play.ts
3497
3497
  import { createHash as createHash3 } from "crypto";
3498
3498
  import {
3499
- existsSync as existsSync5,
3500
- readFileSync as readFileSync3,
3499
+ existsSync as existsSync6,
3500
+ readFileSync as readFileSync4,
3501
3501
  readdirSync,
3502
3502
  realpathSync,
3503
3503
  writeFileSync as writeFileSync5
@@ -3508,14 +3508,15 @@ import { basename as basename3, dirname as dirname8, join as join6, resolve as r
3508
3508
  import { tmpdir as tmpdir2 } from "os";
3509
3509
  import { dirname as dirname7, join as join5, resolve as resolve7 } from "path";
3510
3510
  import { fileURLToPath } from "url";
3511
- import { existsSync as existsSync4 } from "fs";
3511
+ import { existsSync as existsSync5 } from "fs";
3512
3512
 
3513
3513
  // ../shared_libs/plays/bundling/index.ts
3514
3514
  import { createHash } from "crypto";
3515
+ import { existsSync as existsSync4, readFileSync as readFileSync3 } from "fs";
3515
3516
  import { mkdir as mkdir3, readFile, realpath, stat, writeFile as writeFile3 } from "fs/promises";
3516
3517
  import { tmpdir } from "os";
3517
3518
  import { basename, dirname as dirname5, extname, isAbsolute, join as join3, resolve as resolve5 } from "path";
3518
- import { builtinModules, createRequire } from "module";
3519
+ import { builtinModules } from "module";
3519
3520
  import { build } from "esbuild";
3520
3521
 
3521
3522
  // ../shared_libs/play-runtime/backend.ts
@@ -3570,7 +3571,6 @@ function buildPlayContractCompatibility(input) {
3570
3571
  }
3571
3572
 
3572
3573
  // ../shared_libs/plays/bundling/index.ts
3573
- var playArtifactRequire = createRequire(import.meta.url);
3574
3574
  var PLAY_BUNDLE_CACHE_VERSION = 24;
3575
3575
  var MAX_PLAY_BUNDLE_BYTES = 30 * 1024 * 1024;
3576
3576
  var MAX_ESM_WORKERS_BUNDLE_BYTES = 115e4;
@@ -3737,7 +3737,7 @@ function findMatchingBrace(source, openIndex) {
3737
3737
  }
3738
3738
  return -1;
3739
3739
  }
3740
- function extractDefinedPlayName(sourceCode, _filePath) {
3740
+ function extractDefinedPlayName(sourceCode) {
3741
3741
  const source = stripCommentsToSpaces(sourceCode);
3742
3742
  const callPattern = /(?:\b[A-Za-z_$][\w$]*\s*\.\s*)?\b(?:definePlay|defineWorkflow)\s*\(/g;
3743
3743
  for (const match of source.matchAll(callPattern)) {
@@ -3764,17 +3764,61 @@ function extractDefinedPlayName(sourceCode, _filePath) {
3764
3764
  }
3765
3765
  return null;
3766
3766
  }
3767
- function getPackageRequireCandidates(fromFile) {
3768
- const candidates = [
3769
- createRequire(fromFile),
3770
- createRequire(join3(process.cwd(), "package.json")),
3771
- playArtifactRequire
3767
+ function readPackageVersionFromPackageJson(packageJsonPath, packageName) {
3768
+ try {
3769
+ const packageJson = JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
3770
+ if (packageJson.name === packageName && typeof packageJson.version === "string") {
3771
+ return packageJson.version;
3772
+ }
3773
+ } catch {
3774
+ return null;
3775
+ }
3776
+ return null;
3777
+ }
3778
+ function findPackageJsonPathFrom(startDir, packageName) {
3779
+ let current = resolve5(startDir);
3780
+ while (true) {
3781
+ const packageJsonPath = join3(
3782
+ current,
3783
+ "node_modules",
3784
+ packageName,
3785
+ "package.json"
3786
+ );
3787
+ if (existsSync4(packageJsonPath)) {
3788
+ return packageJsonPath;
3789
+ }
3790
+ const parent = dirname5(current);
3791
+ if (parent === current) {
3792
+ return null;
3793
+ }
3794
+ current = parent;
3795
+ }
3796
+ }
3797
+ function findPackageJsonPath(packageName, fromFile, adapter) {
3798
+ const startDirs = [
3799
+ dirname5(fromFile),
3800
+ adapter.projectRoot,
3801
+ dirname5(adapter.sdkPackageJson),
3802
+ process.cwd()
3772
3803
  ];
3773
- return candidates;
3804
+ const seen = /* @__PURE__ */ new Set();
3805
+ for (const startDir of startDirs) {
3806
+ const normalized = resolve5(startDir);
3807
+ if (seen.has(normalized)) continue;
3808
+ seen.add(normalized);
3809
+ const packageJsonPath = findPackageJsonPathFrom(normalized, packageName);
3810
+ if (packageJsonPath) return packageJsonPath;
3811
+ }
3812
+ const adapterNodeModulesPackageJson = join3(
3813
+ adapter.nodeModulesDir,
3814
+ packageName,
3815
+ "package.json"
3816
+ );
3817
+ return existsSync4(adapterNodeModulesPackageJson) ? adapterNodeModulesPackageJson : null;
3774
3818
  }
3775
3819
  function localSdkAliasPlugin(adapter, options) {
3776
3820
  const entryFile = options?.workersRuntime ? adapter.sdkWorkersEntryFile : adapter.sdkEntryFile;
3777
- if (!playArtifactRequire("node:fs").existsSync(entryFile)) {
3821
+ if (!existsSync4(entryFile)) {
3778
3822
  return null;
3779
3823
  }
3780
3824
  return {
@@ -4015,43 +4059,23 @@ async function resolveLocalImport(fromFile, specifier) {
4015
4059
  }
4016
4060
  function resolvePackageImport(specifier, fromFile, adapter) {
4017
4061
  const packageName = getPackageName(specifier);
4018
- if (packageName === "deepline" && playArtifactRequire("node:fs").existsSync(adapter.sdkPackageJson)) {
4062
+ if (packageName === "deepline" && existsSync4(adapter.sdkPackageJson)) {
4019
4063
  const packageJson = JSON.parse(
4020
- playArtifactRequire("node:fs").readFileSync(adapter.sdkPackageJson, "utf-8")
4064
+ readFileSync3(adapter.sdkPackageJson, "utf-8")
4021
4065
  );
4022
4066
  return {
4023
4067
  name: "deepline",
4024
4068
  version: packageJson.version ?? null
4025
4069
  };
4026
4070
  }
4027
- const candidateRequires = getPackageRequireCandidates(fromFile);
4028
- let resolved = false;
4029
- for (const candidateRequire of candidateRequires) {
4030
- try {
4031
- candidateRequire.resolve(specifier);
4032
- resolved = true;
4033
- break;
4034
- } catch {
4035
- continue;
4036
- }
4037
- }
4038
- if (!resolved) {
4071
+ const packageJsonPath = findPackageJsonPath(packageName, fromFile, adapter);
4072
+ if (!packageJsonPath) {
4039
4073
  throw new Error(`Could not resolve "${specifier}" from ${fromFile}`);
4040
4074
  }
4041
- let version = null;
4042
- for (const candidateRequire of candidateRequires) {
4043
- try {
4044
- const packageJsonPath = candidateRequire.resolve(`${packageName}/package.json`);
4045
- const packageJson = JSON.parse(
4046
- playArtifactRequire("node:fs").readFileSync(packageJsonPath, "utf-8")
4047
- );
4048
- version = packageJson.version ?? null;
4049
- break;
4050
- } catch {
4051
- continue;
4052
- }
4053
- }
4054
- return { name: packageName, version };
4075
+ return {
4076
+ name: packageName,
4077
+ version: readPackageVersionFromPackageJson(packageJsonPath, packageName)
4078
+ };
4055
4079
  }
4056
4080
  async function analyzeSourceGraph(entryFile, adapter) {
4057
4081
  const absoluteEntryFile = await normalizeLocalPath(entryFile);
@@ -4094,7 +4118,7 @@ async function analyzeSourceGraph(entryFile, adapter) {
4094
4118
  });
4095
4119
  if (resolved !== absoluteEntryFile && isPlaySourceFile(resolved)) {
4096
4120
  const importedSource = await readFile(resolved, "utf-8");
4097
- const importedPlayName = extractDefinedPlayName(importedSource, resolved);
4121
+ const importedPlayName = extractDefinedPlayName(importedSource);
4098
4122
  if (!importedPlayName) {
4099
4123
  throw new Error(
4100
4124
  `${absolutePath}:${line}:${column} Imported play file "${specifier}" must export definePlay(...) so it can be runtime-composed.`
@@ -4148,7 +4172,7 @@ async function analyzeSourceGraph(entryFile, adapter) {
4148
4172
  })).sort((left, right) => left.filePath.localeCompare(right.filePath))
4149
4173
  })
4150
4174
  );
4151
- const playName = extractDefinedPlayName(sourceCode, absoluteEntryFile);
4175
+ const playName = extractDefinedPlayName(sourceCode);
4152
4176
  return {
4153
4177
  sourceCode,
4154
4178
  sourceFiles: Object.fromEntries(
@@ -4831,15 +4855,15 @@ async function discoverPackagedLocalFiles(entryFile) {
4831
4855
  }
4832
4856
 
4833
4857
  // src/plays/bundle-play-file.ts
4834
- var PLAY_BUNDLE_CACHE_VERSION2 = 26;
4858
+ var PLAY_BUNDLE_CACHE_VERSION2 = 30;
4835
4859
  var MODULE_DIR = dirname7(fileURLToPath(import.meta.url));
4836
4860
  var SDK_PACKAGE_ROOT = resolve7(MODULE_DIR, "..", "..");
4837
4861
  var SOURCE_REPO_ROOT = resolve7(SDK_PACKAGE_ROOT, "..");
4838
- var HAS_SOURCE_BUNDLING_SOURCES = existsSync4(
4862
+ var HAS_SOURCE_BUNDLING_SOURCES = existsSync5(
4839
4863
  resolve7(SOURCE_REPO_ROOT, "apps", "play-runner-workers", "src", "entry.ts")
4840
4864
  );
4841
4865
  var PACKAGED_REPO_ROOT = resolve7(SDK_PACKAGE_ROOT, "dist", "repo");
4842
- var HAS_PACKAGED_BUNDLING_SOURCES = existsSync4(
4866
+ var HAS_PACKAGED_BUNDLING_SOURCES = existsSync5(
4843
4867
  resolve7(PACKAGED_REPO_ROOT, "apps", "play-runner-workers", "src", "entry.ts")
4844
4868
  );
4845
4869
  var PROJECT_ROOT = HAS_SOURCE_BUNDLING_SOURCES ? SOURCE_REPO_ROOT : HAS_PACKAGED_BUNDLING_SOURCES ? PACKAGED_REPO_ROOT : resolve7(SDK_PACKAGE_ROOT, "..");
@@ -4878,7 +4902,7 @@ function createSdkPlayBundlingAdapter() {
4878
4902
  sdkSourceRoot: SDK_SOURCE_ROOT,
4879
4903
  sdkPackageJson: SDK_PACKAGE_JSON,
4880
4904
  sdkEntryFile: SDK_ENTRY_FILE,
4881
- sdkTypesEntryFile: HAS_SOURCE_BUNDLING_SOURCES || !existsSync4(SDK_TYPES_ENTRY_FILE) ? SDK_ENTRY_FILE : SDK_TYPES_ENTRY_FILE,
4905
+ sdkTypesEntryFile: HAS_SOURCE_BUNDLING_SOURCES || !existsSync5(SDK_TYPES_ENTRY_FILE) ? SDK_ENTRY_FILE : SDK_TYPES_ENTRY_FILE,
4882
4906
  sdkWorkersEntryFile: SDK_WORKERS_ENTRY_FILE,
4883
4907
  workersHarnessEntryFile: WORKERS_HARNESS_ENTRY_FILE,
4884
4908
  workersHarnessFilesDir: WORKERS_HARNESS_FILES_DIR,
@@ -5164,8 +5188,8 @@ function materializeRemotePlaySource(input) {
5164
5188
  return null;
5165
5189
  }
5166
5190
  const outputPath = input.outPath ?? defaultMaterializedPlayPath(input.playName);
5167
- if (existsSync5(outputPath)) {
5168
- const existingSource = readFileSync3(outputPath, "utf-8");
5191
+ if (existsSync6(outputPath)) {
5192
+ const existingSource = readFileSync4(outputPath, "utf-8");
5169
5193
  if (existingSource === input.sourceCode) {
5170
5194
  return { path: outputPath, status: "unchanged", created: false };
5171
5195
  }
@@ -5210,14 +5234,14 @@ function buildMissingDefinePlayError(filePath) {
5210
5234
  );
5211
5235
  }
5212
5236
  function extractPlayName(code, filePath) {
5213
- const definedPlayName = extractDefinedPlayName(code, filePath);
5237
+ const definedPlayName = extractDefinedPlayName(code);
5214
5238
  if (definedPlayName) {
5215
5239
  return definedPlayName;
5216
5240
  }
5217
5241
  throw buildMissingDefinePlayError(filePath);
5218
5242
  }
5219
5243
  function isFileTarget(target) {
5220
- return existsSync5(resolve8(target));
5244
+ return existsSync6(resolve8(target));
5221
5245
  }
5222
5246
  function looksLikeFilePath(target) {
5223
5247
  if (target.trim().toLowerCase().startsWith("prebuilt/")) {
@@ -5236,7 +5260,7 @@ function parsePositiveInteger2(value, flagName) {
5236
5260
  return parsed;
5237
5261
  }
5238
5262
  function parseJsonInput(raw) {
5239
- const source = raw.startsWith("@") ? readFileSync3(resolve8(raw.slice(1)), "utf-8") : raw;
5263
+ const source = raw.startsWith("@") ? readFileSync4(resolve8(raw.slice(1)), "utf-8") : raw;
5240
5264
  const parsed = JSON.parse(source);
5241
5265
  if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
5242
5266
  throw new Error("--input must be a JSON object.");
@@ -5346,7 +5370,7 @@ function applyCsvShortcutInput(input) {
5346
5370
  function isLocalFilePathValue(value) {
5347
5371
  if (typeof value !== "string" || !value.trim()) return false;
5348
5372
  if (/^[a-z][a-z0-9+.-]*:\/\//i.test(value.trim())) return false;
5349
- return existsSync5(resolve8(value));
5373
+ return existsSync6(resolve8(value));
5350
5374
  }
5351
5375
  function inputContainsLocalFilePath(value) {
5352
5376
  if (isLocalFilePathValue(value)) {
@@ -5397,7 +5421,7 @@ async function stageFileInputArgs(input) {
5397
5421
  };
5398
5422
  }
5399
5423
  function stageFile(logicalPath, absolutePath) {
5400
- const buffer = readFileSync3(absolutePath);
5424
+ const buffer = readFileSync4(absolutePath);
5401
5425
  return {
5402
5426
  logicalPath,
5403
5427
  contentBase64: buffer.toString("base64"),
@@ -5495,7 +5519,10 @@ async function compileBundledPlayGraphManifests(client, graph) {
5495
5519
  `Missing compiler manifest for imported dependency ${dependency.filePath}.`
5496
5520
  );
5497
5521
  }
5498
- return child.compilerManifest;
5522
+ return {
5523
+ ...child.compilerManifest,
5524
+ filePath: dependency.filePath
5525
+ };
5499
5526
  }
5500
5527
  )
5501
5528
  });
@@ -5569,14 +5596,14 @@ function getEventPayload(event) {
5569
5596
  return event.payload && typeof event.payload === "object" ? event.payload : {};
5570
5597
  }
5571
5598
  function getStatusFromLiveEvent(event) {
5572
- if (event.type !== "play.run.status" && event.type !== "play.run.snapshot") {
5599
+ if (event.type !== "play.run.status" && event.type !== "play.run.snapshot" && event.type !== "play.run.final_status") {
5573
5600
  return null;
5574
5601
  }
5575
5602
  const status = getEventPayload(event).status;
5576
5603
  return status === "queued" || status === "running" || status === "waiting" || status === "completed" || status === "failed" || status === "cancelled" ? status : null;
5577
5604
  }
5578
5605
  function getFinalStatusFromLiveEvent(event) {
5579
- if (event.type !== "play.run.final_status") {
5606
+ if (event.type !== "play.run.snapshot" && event.type !== "play.run.status" && event.type !== "play.run.final_status") {
5580
5607
  return null;
5581
5608
  }
5582
5609
  const payload = getEventPayload(event);
@@ -6064,6 +6091,13 @@ function getStringField(value, key) {
6064
6091
  const field = getRecordField(value, key);
6065
6092
  return typeof field === "string" && field.trim() ? field : null;
6066
6093
  }
6094
+ function getTimestampField(value, key) {
6095
+ const field = getRecordField(value, key);
6096
+ if (typeof field === "number" && Number.isFinite(field)) {
6097
+ return field;
6098
+ }
6099
+ return typeof field === "string" && field.trim() ? field : null;
6100
+ }
6067
6101
  function normalizeRunStatusForEnvelope(status) {
6068
6102
  const run = status.run ?? null;
6069
6103
  return {
@@ -6071,9 +6105,9 @@ function normalizeRunStatusForEnvelope(status) {
6071
6105
  playName: status.playName ?? status.name ?? getStringField(run, "playName") ?? null,
6072
6106
  status: status.status,
6073
6107
  runtime: getStringField(status, "runtime") ?? getStringField(status, "runtimeBackend") ?? getStringField(run, "runtime") ?? null,
6074
- startedAt: getStringField(run, "startTime") ?? getStringField(run, "startedAt") ?? null,
6075
- updatedAt: getStringField(status, "updatedAt") ?? getStringField(run, "updatedAt") ?? null,
6076
- finishedAt: getStringField(run, "closeTime") ?? getStringField(run, "finishedAt") ?? null,
6108
+ startedAt: getTimestampField(status, "startedAt") ?? getTimestampField(run, "startTime") ?? getTimestampField(run, "startedAt") ?? null,
6109
+ updatedAt: getTimestampField(status, "updatedAt") ?? getTimestampField(run, "updatedAt") ?? null,
6110
+ finishedAt: getTimestampField(status, "finishedAt") ?? getTimestampField(run, "closeTime") ?? getTimestampField(run, "finishedAt") ?? null,
6077
6111
  source: getRecordField(status, "source") ?? getRecordField(status, "artifact") ?? null
6078
6112
  };
6079
6113
  }
@@ -6575,7 +6609,7 @@ async function handlePlayCheck(args) {
6575
6609
  return 1;
6576
6610
  }
6577
6611
  const absolutePlayPath = resolve8(options.target);
6578
- const sourceCode = readFileSync3(absolutePlayPath, "utf-8");
6612
+ const sourceCode = readFileSync4(absolutePlayPath, "utf-8");
6579
6613
  let graph;
6580
6614
  try {
6581
6615
  graph = await collectBundledPlayGraph(absolutePlayPath);
@@ -6643,7 +6677,7 @@ async function handleFileBackedRun(options) {
6643
6677
  const sourceCode = traceCliSync(
6644
6678
  "cli.play_file_read_source",
6645
6679
  { targetKind: "file" },
6646
- () => readFileSync3(absolutePlayPath, "utf-8")
6680
+ () => readFileSync4(absolutePlayPath, "utf-8")
6647
6681
  );
6648
6682
  const runtimeInput = options.input ? { ...options.input } : {};
6649
6683
  let graph;
@@ -6930,7 +6964,7 @@ async function handlePlayRun(args) {
6930
6964
  const resolved = resolve8(options.target.path);
6931
6965
  console.error(`File not found: ${resolved}`);
6932
6966
  const dir = dirname8(resolved);
6933
- if (existsSync5(dir)) {
6967
+ if (existsSync6(dir)) {
6934
6968
  const base = basename3(resolved);
6935
6969
  try {
6936
6970
  const siblings = readdirSync(dir).filter(
@@ -7215,7 +7249,7 @@ async function handlePlayGet(args) {
7215
7249
  outPath = resolve8(args[++index]);
7216
7250
  }
7217
7251
  }
7218
- const playName = isFileTarget(target) ? extractPlayName(readFileSync3(resolve8(target), "utf-8"), resolve8(target)) : parseReferencedPlayTarget(target).playName;
7252
+ const playName = isFileTarget(target) ? extractPlayName(readFileSync4(resolve8(target), "utf-8"), resolve8(target)) : parseReferencedPlayTarget(target).playName;
7219
7253
  const detail = isFileTarget(target) ? await client.getPlay(playName) : await assertCanonicalNamedPlayReference(client, target);
7220
7254
  const resolvedSource = detail.play.workingRevision?.sourceCode ?? detail.play.liveRevision?.sourceCode ?? detail.play.currentRevision?.sourceCode ?? detail.play.sourceCode ?? "";
7221
7255
  const materializedFile = outPath ? materializeRemotePlaySource({
@@ -8798,7 +8832,7 @@ async function executeTool(args) {
8798
8832
 
8799
8833
  // src/cli/skills-sync.ts
8800
8834
  import { spawn, spawnSync as spawnSync2 } from "child_process";
8801
- import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync4, writeFileSync as writeFileSync8 } from "fs";
8835
+ import { existsSync as existsSync7, mkdirSync as mkdirSync5, readFileSync as readFileSync5, writeFileSync as writeFileSync8 } from "fs";
8802
8836
  import { homedir as homedir4 } from "os";
8803
8837
  import { dirname as dirname9, join as join9 } from "path";
8804
8838
  var CHECK_TIMEOUT_MS2 = 3e3;
@@ -8815,9 +8849,9 @@ function sdkSkillsVersionPath(baseUrl) {
8815
8849
  }
8816
8850
  function readLocalSkillsVersion(baseUrl) {
8817
8851
  const path = sdkSkillsVersionPath(baseUrl);
8818
- if (!existsSync6(path)) return "";
8852
+ if (!existsSync7(path)) return "";
8819
8853
  try {
8820
- return readFileSync4(path, "utf-8").trim();
8854
+ return readFileSync5(path, "utf-8").trim();
8821
8855
  } catch {
8822
8856
  return "";
8823
8857
  }
package/dist/index.d.mts CHANGED
@@ -142,6 +142,8 @@ type PlayStaticSubstepSnapshot = PlayStaticSubstepMetadataSnapshot & ({
142
142
  });
143
143
  type PlayCompilerDependencyManifest = {
144
144
  playName: string;
145
+ /** Original source path for direct imported definePlay dependencies. */
146
+ filePath?: string;
145
147
  sourceHash: string;
146
148
  graphHash: string;
147
149
  artifactHash: string;
@@ -1399,7 +1401,7 @@ declare class DeeplineClient {
1399
1401
  }>;
1400
1402
  }
1401
1403
 
1402
- declare const SDK_VERSION = "0.1.25";
1404
+ declare const SDK_VERSION = "0.1.27";
1403
1405
  declare const SDK_API_CONTRACT = "2026-05-runs-v2";
1404
1406
 
1405
1407
  /**
package/dist/index.d.ts CHANGED
@@ -142,6 +142,8 @@ type PlayStaticSubstepSnapshot = PlayStaticSubstepMetadataSnapshot & ({
142
142
  });
143
143
  type PlayCompilerDependencyManifest = {
144
144
  playName: string;
145
+ /** Original source path for direct imported definePlay dependencies. */
146
+ filePath?: string;
145
147
  sourceHash: string;
146
148
  graphHash: string;
147
149
  artifactHash: string;
@@ -1399,7 +1401,7 @@ declare class DeeplineClient {
1399
1401
  }>;
1400
1402
  }
1401
1403
 
1402
- declare const SDK_VERSION = "0.1.25";
1404
+ declare const SDK_VERSION = "0.1.27";
1403
1405
  declare const SDK_API_CONTRACT = "2026-05-runs-v2";
1404
1406
 
1405
1407
  /**
package/dist/index.js CHANGED
@@ -241,7 +241,7 @@ function resolveConfig(options) {
241
241
  }
242
242
 
243
243
  // src/version.ts
244
- var SDK_VERSION = "0.1.25";
244
+ var SDK_VERSION = "0.1.27";
245
245
  var SDK_API_CONTRACT = "2026-05-runs-v2";
246
246
 
247
247
  // ../shared_libs/play-runtime/coordinator-headers.ts
@@ -586,7 +586,7 @@ function updatePlayLiveStatusState(state, event) {
586
586
  const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : state.runId;
587
587
  const status = normalizeLiveStatus(payload.status) ?? state.status;
588
588
  const logs = readStringArray(payload.logs);
589
- if (logs.length > 0 || event.type === "play.run.snapshot") {
589
+ if (logs.length > 0 || event.type === "play.run.snapshot" || event.type === "play.run.final_status") {
590
590
  state.logs = logs;
591
591
  }
592
592
  if ("result" in payload) {
package/dist/index.mjs CHANGED
@@ -195,7 +195,7 @@ function resolveConfig(options) {
195
195
  }
196
196
 
197
197
  // src/version.ts
198
- var SDK_VERSION = "0.1.25";
198
+ var SDK_VERSION = "0.1.27";
199
199
  var SDK_API_CONTRACT = "2026-05-runs-v2";
200
200
 
201
201
  // ../shared_libs/play-runtime/coordinator-headers.ts
@@ -540,7 +540,7 @@ function updatePlayLiveStatusState(state, event) {
540
540
  const runId = typeof payload.runId === "string" && payload.runId ? payload.runId : state.runId;
541
541
  const status = normalizeLiveStatus(payload.status) ?? state.status;
542
542
  const logs = readStringArray(payload.logs);
543
- if (logs.length > 0 || event.type === "play.run.snapshot") {
543
+ if (logs.length > 0 || event.type === "play.run.snapshot" || event.type === "play.run.final_status") {
544
544
  state.logs = logs;
545
545
  }
546
546
  if ("result" in payload) {