deepline 0.1.80 → 0.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -113,7 +113,8 @@ surfaces we exercise in CI:
113
113
  - `ctx.runPlay(name, input)`
114
114
  4. Raw HTTP API
115
115
  - `POST /api/v2/plays/run`
116
- - `GET /api/v2/plays/run/:workflowId`
116
+ - `GET /api/v2/runs/:runId`
117
+ - `GET /api/v2/runs/:runId/tail`
117
118
  5. In-play composition
118
119
  - `ctx.runPlay(...)`
119
120
 
package/dist/cli/index.js CHANGED
@@ -229,10 +229,10 @@ var import_node_path2 = require("path");
229
229
 
230
230
  // src/release.ts
231
231
  var SDK_RELEASE = {
232
- version: "0.1.80",
232
+ version: "0.1.82",
233
233
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
234
234
  supportPolicy: {
235
- latest: "0.1.80",
235
+ latest: "0.1.82",
236
236
  minimumSupported: "0.1.53",
237
237
  deprecatedBelow: "0.1.53"
238
238
  }
@@ -1309,7 +1309,7 @@ var DeeplineClient = class {
1309
1309
  }
1310
1310
  const query = params.size > 0 ? `?${params.toString()}` : "";
1311
1311
  const response = await this.http.get(
1312
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}${query}`
1312
+ `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
1313
1313
  );
1314
1314
  return normalizePlayStatus(response);
1315
1315
  }
@@ -1321,10 +1321,10 @@ var DeeplineClient = class {
1321
1321
  */
1322
1322
  async *streamPlayRunEvents(workflowId, options) {
1323
1323
  const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
1324
- const params = new URLSearchParams({ stream: "true" });
1324
+ const params = new URLSearchParams();
1325
1325
  params.set("mode", options?.mode ?? "cli");
1326
1326
  for await (const event of this.http.streamSse(
1327
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}?${params.toString()}`,
1327
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
1328
1328
  { signal: options?.signal, headers }
1329
1329
  )) {
1330
1330
  if (event.scope === "play") {
@@ -1346,7 +1346,7 @@ var DeeplineClient = class {
1346
1346
  */
1347
1347
  async cancelPlay(workflowId) {
1348
1348
  await this.http.request(
1349
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1349
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1350
1350
  { method: "POST" }
1351
1351
  );
1352
1352
  }
@@ -1358,7 +1358,7 @@ var DeeplineClient = class {
1358
1358
  */
1359
1359
  async stopPlay(workflowId, options) {
1360
1360
  return this.http.post(
1361
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1361
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1362
1362
  options?.reason ? { reason: options.reason } : {}
1363
1363
  );
1364
1364
  }
@@ -1478,7 +1478,7 @@ var DeeplineClient = class {
1478
1478
  * ```
1479
1479
  */
1480
1480
  async getRunLogs(runId, options) {
1481
- const status = await this.getRunStatus(runId);
1481
+ const status = await this.getRunStatus(runId, { full: true });
1482
1482
  const logs = status.progress?.logs ?? [];
1483
1483
  const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
1484
1484
  const entries = logs.slice(Math.max(0, logs.length - limit));
@@ -1875,7 +1875,7 @@ var import_node_path3 = require("path");
1875
1875
  var childProcess = __toESM(require("child_process"));
1876
1876
  var import_sync = require("csv-parse/sync");
1877
1877
  var import_sync2 = require("csv-stringify/sync");
1878
- var BROWSER_FOCUS_COOLDOWN_MS = 3e4;
1878
+ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
1879
1879
  var defaultBrowserCommandRunner = childProcess;
1880
1880
  function getAuthedHttpClient() {
1881
1881
  const config = resolveConfig();
@@ -1888,7 +1888,7 @@ async function writeOutputFile(filename, content) {
1888
1888
  await (0, import_promises.writeFile)(fullPath, content, "utf-8");
1889
1889
  return fullPath;
1890
1890
  }
1891
- function browserFocusStateFile() {
1891
+ function browserOpenStateFile() {
1892
1892
  const homeDir = process.env.HOME || (0, import_node_os3.homedir)();
1893
1893
  return (0, import_node_path3.join)(
1894
1894
  homeDir,
@@ -1896,31 +1896,43 @@ function browserFocusStateFile() {
1896
1896
  "deepline",
1897
1897
  "runtime",
1898
1898
  "state",
1899
- "browser-focus.json"
1899
+ "browser-open.json"
1900
1900
  );
1901
1901
  }
1902
- function claimBrowserFocus(now = Date.now()) {
1903
- const statePath = browserFocusStateFile();
1902
+ function claimBrowserOpen(now = Date.now()) {
1903
+ const statePath = browserOpenStateFile();
1904
+ const lockPath = `${statePath}.lock`;
1905
+ let locked = false;
1904
1906
  try {
1905
1907
  (0, import_node_fs3.mkdirSync)((0, import_node_path3.dirname)(statePath), { recursive: true });
1906
- let lastFocusedAt = 0;
1908
+ try {
1909
+ (0, import_node_fs3.mkdirSync)(lockPath);
1910
+ locked = true;
1911
+ } catch {
1912
+ return false;
1913
+ }
1914
+ let lastOpenedAt = 0;
1907
1915
  if ((0, import_node_fs3.existsSync)(statePath)) {
1908
1916
  const payload = JSON.parse((0, import_node_fs3.readFileSync)(statePath, "utf-8"));
1909
- const value = payload.lastFocusedAt ?? payload.last_focused_at;
1917
+ const value = payload.lastOpenedAt ?? payload.last_opened_at ?? payload.lastFocusedAt ?? payload.last_focused_at;
1910
1918
  if (typeof value === "number" && Number.isFinite(value)) {
1911
- lastFocusedAt = value;
1919
+ lastOpenedAt = value;
1912
1920
  }
1913
1921
  }
1914
- if (lastFocusedAt > now) {
1915
- lastFocusedAt = 0;
1922
+ if (lastOpenedAt > now) {
1923
+ lastOpenedAt = 0;
1916
1924
  }
1917
- if (now - lastFocusedAt < BROWSER_FOCUS_COOLDOWN_MS) {
1925
+ if (now - lastOpenedAt < BROWSER_OPEN_COOLDOWN_MS) {
1918
1926
  return false;
1919
1927
  }
1920
- (0, import_node_fs3.writeFileSync)(statePath, JSON.stringify({ lastFocusedAt: now }), "utf-8");
1928
+ (0, import_node_fs3.writeFileSync)(statePath, JSON.stringify({ lastOpenedAt: now }), "utf-8");
1921
1929
  return true;
1922
1930
  } catch {
1923
1931
  return true;
1932
+ } finally {
1933
+ if (locked) {
1934
+ (0, import_node_fs3.rmSync)(lockPath, { recursive: true, force: true });
1935
+ }
1924
1936
  }
1925
1937
  }
1926
1938
  function extractUrlHost(raw) {
@@ -2090,7 +2102,8 @@ function openInBrowser(url) {
2090
2102
  if (browserOpeningDisabled()) return;
2091
2103
  const targetUrl = String(url || "").trim();
2092
2104
  if (!targetUrl) return;
2093
- const allowFocus = claimBrowserFocus();
2105
+ if (!claimBrowserOpen()) return;
2106
+ const allowFocus = true;
2094
2107
  if (process.platform === "darwin") {
2095
2108
  openUrlMacos(targetUrl, allowFocus);
2096
2109
  return;
@@ -8486,7 +8499,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
8486
8499
  return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
8487
8500
  }
8488
8501
  function openPlayDashboard(input2) {
8489
- if (input2.jsonOutput || input2.noOpen || !input2.dashboardUrl) {
8502
+ if (input2.noOpen || !input2.dashboardUrl) {
8490
8503
  return;
8491
8504
  }
8492
8505
  openInBrowser(input2.dashboardUrl);
@@ -8683,7 +8696,6 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
8683
8696
  }
8684
8697
  openPlayDashboard({
8685
8698
  dashboardUrl,
8686
- jsonOutput: input2.jsonOutput,
8687
8699
  noOpen: input2.noOpen
8688
8700
  });
8689
8701
  input2.progress.phase(`loading play on ${dashboardUrl}`);
@@ -10604,7 +10616,6 @@ async function handleFileBackedRun(options) {
10604
10616
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
10605
10617
  openPlayDashboard({
10606
10618
  dashboardUrl: resolvedDashboardUrl,
10607
- jsonOutput: options.jsonOutput,
10608
10619
  noOpen: options.noOpen
10609
10620
  });
10610
10621
  progress.phase(`loading play on ${resolvedDashboardUrl}`);
@@ -10751,7 +10762,6 @@ async function handleNamedRun(options) {
10751
10762
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
10752
10763
  openPlayDashboard({
10753
10764
  dashboardUrl: resolvedDashboardUrl,
10754
- jsonOutput: options.jsonOutput,
10755
10765
  noOpen: options.noOpen
10756
10766
  });
10757
10767
  progress.phase(`loading play on ${resolvedDashboardUrl}`);
@@ -10933,7 +10943,7 @@ async function handleRunLogs(args) {
10933
10943
  }
10934
10944
  }
10935
10945
  const client = new DeeplineClient();
10936
- const status = await client.runs.get(runId);
10946
+ const status = await client.runs.get(runId, { full: true });
10937
10947
  const logs = status.progress?.logs ?? [];
10938
10948
  if (outPath) {
10939
10949
  (0, import_node_fs10.writeFileSync)(outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
@@ -206,10 +206,10 @@ import { join as join2 } from "path";
206
206
 
207
207
  // src/release.ts
208
208
  var SDK_RELEASE = {
209
- version: "0.1.80",
209
+ version: "0.1.82",
210
210
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
211
211
  supportPolicy: {
212
- latest: "0.1.80",
212
+ latest: "0.1.82",
213
213
  minimumSupported: "0.1.53",
214
214
  deprecatedBelow: "0.1.53"
215
215
  }
@@ -1286,7 +1286,7 @@ var DeeplineClient = class {
1286
1286
  }
1287
1287
  const query = params.size > 0 ? `?${params.toString()}` : "";
1288
1288
  const response = await this.http.get(
1289
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}${query}`
1289
+ `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
1290
1290
  );
1291
1291
  return normalizePlayStatus(response);
1292
1292
  }
@@ -1298,10 +1298,10 @@ var DeeplineClient = class {
1298
1298
  */
1299
1299
  async *streamPlayRunEvents(workflowId, options) {
1300
1300
  const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
1301
- const params = new URLSearchParams({ stream: "true" });
1301
+ const params = new URLSearchParams();
1302
1302
  params.set("mode", options?.mode ?? "cli");
1303
1303
  for await (const event of this.http.streamSse(
1304
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}?${params.toString()}`,
1304
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
1305
1305
  { signal: options?.signal, headers }
1306
1306
  )) {
1307
1307
  if (event.scope === "play") {
@@ -1323,7 +1323,7 @@ var DeeplineClient = class {
1323
1323
  */
1324
1324
  async cancelPlay(workflowId) {
1325
1325
  await this.http.request(
1326
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1326
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1327
1327
  { method: "POST" }
1328
1328
  );
1329
1329
  }
@@ -1335,7 +1335,7 @@ var DeeplineClient = class {
1335
1335
  */
1336
1336
  async stopPlay(workflowId, options) {
1337
1337
  return this.http.post(
1338
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1338
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1339
1339
  options?.reason ? { reason: options.reason } : {}
1340
1340
  );
1341
1341
  }
@@ -1455,7 +1455,7 @@ var DeeplineClient = class {
1455
1455
  * ```
1456
1456
  */
1457
1457
  async getRunLogs(runId, options) {
1458
- const status = await this.getRunStatus(runId);
1458
+ const status = await this.getRunStatus(runId, { full: true });
1459
1459
  const logs = status.progress?.logs ?? [];
1460
1460
  const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
1461
1461
  const entries = logs.slice(Math.max(0, logs.length - limit));
@@ -1844,21 +1844,27 @@ import {
1844
1844
  existsSync as existsSync4,
1845
1845
  mkdirSync as mkdirSync3,
1846
1846
  readFileSync as readFileSync4,
1847
- rmSync,
1847
+ rmSync as rmSync2,
1848
1848
  writeFileSync as writeFileSync3
1849
1849
  } from "fs";
1850
1850
  import { hostname } from "os";
1851
1851
  import { dirname as dirname3 } from "path";
1852
1852
 
1853
1853
  // src/cli/utils.ts
1854
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
1854
+ import {
1855
+ existsSync as existsSync3,
1856
+ mkdirSync as mkdirSync2,
1857
+ readFileSync as readFileSync3,
1858
+ rmSync,
1859
+ writeFileSync as writeFileSync2
1860
+ } from "fs";
1855
1861
  import { mkdir, writeFile } from "fs/promises";
1856
1862
  import { homedir as homedir3 } from "os";
1857
1863
  import { dirname as dirname2, join as join3, resolve as resolve2 } from "path";
1858
1864
  import * as childProcess from "child_process";
1859
1865
  import { parse } from "csv-parse/sync";
1860
1866
  import { stringify } from "csv-stringify/sync";
1861
- var BROWSER_FOCUS_COOLDOWN_MS = 3e4;
1867
+ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
1862
1868
  var defaultBrowserCommandRunner = childProcess;
1863
1869
  function getAuthedHttpClient() {
1864
1870
  const config = resolveConfig();
@@ -1871,7 +1877,7 @@ async function writeOutputFile(filename, content) {
1871
1877
  await writeFile(fullPath, content, "utf-8");
1872
1878
  return fullPath;
1873
1879
  }
1874
- function browserFocusStateFile() {
1880
+ function browserOpenStateFile() {
1875
1881
  const homeDir = process.env.HOME || homedir3();
1876
1882
  return join3(
1877
1883
  homeDir,
@@ -1879,31 +1885,43 @@ function browserFocusStateFile() {
1879
1885
  "deepline",
1880
1886
  "runtime",
1881
1887
  "state",
1882
- "browser-focus.json"
1888
+ "browser-open.json"
1883
1889
  );
1884
1890
  }
1885
- function claimBrowserFocus(now = Date.now()) {
1886
- const statePath = browserFocusStateFile();
1891
+ function claimBrowserOpen(now = Date.now()) {
1892
+ const statePath = browserOpenStateFile();
1893
+ const lockPath = `${statePath}.lock`;
1894
+ let locked = false;
1887
1895
  try {
1888
1896
  mkdirSync2(dirname2(statePath), { recursive: true });
1889
- let lastFocusedAt = 0;
1897
+ try {
1898
+ mkdirSync2(lockPath);
1899
+ locked = true;
1900
+ } catch {
1901
+ return false;
1902
+ }
1903
+ let lastOpenedAt = 0;
1890
1904
  if (existsSync3(statePath)) {
1891
1905
  const payload = JSON.parse(readFileSync3(statePath, "utf-8"));
1892
- const value = payload.lastFocusedAt ?? payload.last_focused_at;
1906
+ const value = payload.lastOpenedAt ?? payload.last_opened_at ?? payload.lastFocusedAt ?? payload.last_focused_at;
1893
1907
  if (typeof value === "number" && Number.isFinite(value)) {
1894
- lastFocusedAt = value;
1908
+ lastOpenedAt = value;
1895
1909
  }
1896
1910
  }
1897
- if (lastFocusedAt > now) {
1898
- lastFocusedAt = 0;
1911
+ if (lastOpenedAt > now) {
1912
+ lastOpenedAt = 0;
1899
1913
  }
1900
- if (now - lastFocusedAt < BROWSER_FOCUS_COOLDOWN_MS) {
1914
+ if (now - lastOpenedAt < BROWSER_OPEN_COOLDOWN_MS) {
1901
1915
  return false;
1902
1916
  }
1903
- writeFileSync2(statePath, JSON.stringify({ lastFocusedAt: now }), "utf-8");
1917
+ writeFileSync2(statePath, JSON.stringify({ lastOpenedAt: now }), "utf-8");
1904
1918
  return true;
1905
1919
  } catch {
1906
1920
  return true;
1921
+ } finally {
1922
+ if (locked) {
1923
+ rmSync(lockPath, { recursive: true, force: true });
1924
+ }
1907
1925
  }
1908
1926
  }
1909
1927
  function extractUrlHost(raw) {
@@ -2073,7 +2091,8 @@ function openInBrowser(url) {
2073
2091
  if (browserOpeningDisabled()) return;
2074
2092
  const targetUrl = String(url || "").trim();
2075
2093
  if (!targetUrl) return;
2076
- const allowFocus = claimBrowserFocus();
2094
+ if (!claimBrowserOpen()) return;
2095
+ const allowFocus = true;
2077
2096
  if (process.platform === "darwin") {
2078
2097
  openUrlMacos(targetUrl, allowFocus);
2079
2098
  return;
@@ -2322,7 +2341,7 @@ function readPendingClaimToken(baseUrl) {
2322
2341
  }
2323
2342
  function clearPendingClaimToken(baseUrl) {
2324
2343
  try {
2325
- rmSync(pendingClaimTokenPath(baseUrl), { force: true });
2344
+ rmSync2(pendingClaimTokenPath(baseUrl), { force: true });
2326
2345
  } catch {
2327
2346
  }
2328
2347
  }
@@ -8489,7 +8508,7 @@ function buildPlayDashboardUrl(baseUrl, playName) {
8489
8508
  return `${trimmedBase}/dashboard/plays/${encodedPlayName}`;
8490
8509
  }
8491
8510
  function openPlayDashboard(input2) {
8492
- if (input2.jsonOutput || input2.noOpen || !input2.dashboardUrl) {
8511
+ if (input2.noOpen || !input2.dashboardUrl) {
8493
8512
  return;
8494
8513
  }
8495
8514
  openInBrowser(input2.dashboardUrl);
@@ -8686,7 +8705,6 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
8686
8705
  }
8687
8706
  openPlayDashboard({
8688
8707
  dashboardUrl,
8689
- jsonOutput: input2.jsonOutput,
8690
8708
  noOpen: input2.noOpen
8691
8709
  });
8692
8710
  input2.progress.phase(`loading play on ${dashboardUrl}`);
@@ -10607,7 +10625,6 @@ async function handleFileBackedRun(options) {
10607
10625
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
10608
10626
  openPlayDashboard({
10609
10627
  dashboardUrl: resolvedDashboardUrl,
10610
- jsonOutput: options.jsonOutput,
10611
10628
  noOpen: options.noOpen
10612
10629
  });
10613
10630
  progress.phase(`loading play on ${resolvedDashboardUrl}`);
@@ -10754,7 +10771,6 @@ async function handleNamedRun(options) {
10754
10771
  const resolvedDashboardUrl = buildPlayDashboardUrl(client.baseUrl, playName);
10755
10772
  openPlayDashboard({
10756
10773
  dashboardUrl: resolvedDashboardUrl,
10757
- jsonOutput: options.jsonOutput,
10758
10774
  noOpen: options.noOpen
10759
10775
  });
10760
10776
  progress.phase(`loading play on ${resolvedDashboardUrl}`);
@@ -10936,7 +10952,7 @@ async function handleRunLogs(args) {
10936
10952
  }
10937
10953
  }
10938
10954
  const client = new DeeplineClient();
10939
- const status = await client.runs.get(runId);
10955
+ const status = await client.runs.get(runId, { full: true });
10940
10956
  const logs = status.progress?.logs ?? [];
10941
10957
  if (outPath) {
10942
10958
  writeFileSync7(outPath, `${logs.join("\n")}${logs.length > 0 ? "\n" : ""}`);
package/dist/index.js CHANGED
@@ -241,10 +241,10 @@ var import_node_path2 = require("path");
241
241
 
242
242
  // src/release.ts
243
243
  var SDK_RELEASE = {
244
- version: "0.1.80",
244
+ version: "0.1.82",
245
245
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
246
246
  supportPolicy: {
247
- latest: "0.1.80",
247
+ latest: "0.1.82",
248
248
  minimumSupported: "0.1.53",
249
249
  deprecatedBelow: "0.1.53"
250
250
  }
@@ -1321,7 +1321,7 @@ var DeeplineClient = class {
1321
1321
  }
1322
1322
  const query = params.size > 0 ? `?${params.toString()}` : "";
1323
1323
  const response = await this.http.get(
1324
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}${query}`
1324
+ `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
1325
1325
  );
1326
1326
  return normalizePlayStatus(response);
1327
1327
  }
@@ -1333,10 +1333,10 @@ var DeeplineClient = class {
1333
1333
  */
1334
1334
  async *streamPlayRunEvents(workflowId, options) {
1335
1335
  const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
1336
- const params = new URLSearchParams({ stream: "true" });
1336
+ const params = new URLSearchParams();
1337
1337
  params.set("mode", options?.mode ?? "cli");
1338
1338
  for await (const event of this.http.streamSse(
1339
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}?${params.toString()}`,
1339
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
1340
1340
  { signal: options?.signal, headers }
1341
1341
  )) {
1342
1342
  if (event.scope === "play") {
@@ -1358,7 +1358,7 @@ var DeeplineClient = class {
1358
1358
  */
1359
1359
  async cancelPlay(workflowId) {
1360
1360
  await this.http.request(
1361
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1361
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1362
1362
  { method: "POST" }
1363
1363
  );
1364
1364
  }
@@ -1370,7 +1370,7 @@ var DeeplineClient = class {
1370
1370
  */
1371
1371
  async stopPlay(workflowId, options) {
1372
1372
  return this.http.post(
1373
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1373
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1374
1374
  options?.reason ? { reason: options.reason } : {}
1375
1375
  );
1376
1376
  }
@@ -1490,7 +1490,7 @@ var DeeplineClient = class {
1490
1490
  * ```
1491
1491
  */
1492
1492
  async getRunLogs(runId, options) {
1493
- const status = await this.getRunStatus(runId);
1493
+ const status = await this.getRunStatus(runId, { full: true });
1494
1494
  const logs = status.progress?.logs ?? [];
1495
1495
  const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
1496
1496
  const entries = logs.slice(Math.max(0, logs.length - limit));
package/dist/index.mjs CHANGED
@@ -179,10 +179,10 @@ import { join as join2 } from "path";
179
179
 
180
180
  // src/release.ts
181
181
  var SDK_RELEASE = {
182
- version: "0.1.80",
182
+ version: "0.1.82",
183
183
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
184
184
  supportPolicy: {
185
- latest: "0.1.80",
185
+ latest: "0.1.82",
186
186
  minimumSupported: "0.1.53",
187
187
  deprecatedBelow: "0.1.53"
188
188
  }
@@ -1259,7 +1259,7 @@ var DeeplineClient = class {
1259
1259
  }
1260
1260
  const query = params.size > 0 ? `?${params.toString()}` : "";
1261
1261
  const response = await this.http.get(
1262
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}${query}`
1262
+ `/api/v2/runs/${encodeURIComponent(workflowId)}${query}`
1263
1263
  );
1264
1264
  return normalizePlayStatus(response);
1265
1265
  }
@@ -1271,10 +1271,10 @@ var DeeplineClient = class {
1271
1271
  */
1272
1272
  async *streamPlayRunEvents(workflowId, options) {
1273
1273
  const headers = options?.lastEventId && options.lastEventId.trim() ? { "Last-Event-ID": options.lastEventId.trim() } : void 0;
1274
- const params = new URLSearchParams({ stream: "true" });
1274
+ const params = new URLSearchParams();
1275
1275
  params.set("mode", options?.mode ?? "cli");
1276
1276
  for await (const event of this.http.streamSse(
1277
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}?${params.toString()}`,
1277
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/tail?${params.toString()}`,
1278
1278
  { signal: options?.signal, headers }
1279
1279
  )) {
1280
1280
  if (event.scope === "play") {
@@ -1296,7 +1296,7 @@ var DeeplineClient = class {
1296
1296
  */
1297
1297
  async cancelPlay(workflowId) {
1298
1298
  await this.http.request(
1299
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1299
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1300
1300
  { method: "POST" }
1301
1301
  );
1302
1302
  }
@@ -1308,7 +1308,7 @@ var DeeplineClient = class {
1308
1308
  */
1309
1309
  async stopPlay(workflowId, options) {
1310
1310
  return this.http.post(
1311
- `/api/v2/plays/run/${encodeURIComponent(workflowId)}/stop`,
1311
+ `/api/v2/runs/${encodeURIComponent(workflowId)}/stop`,
1312
1312
  options?.reason ? { reason: options.reason } : {}
1313
1313
  );
1314
1314
  }
@@ -1428,7 +1428,7 @@ var DeeplineClient = class {
1428
1428
  * ```
1429
1429
  */
1430
1430
  async getRunLogs(runId, options) {
1431
- const status = await this.getRunStatus(runId);
1431
+ const status = await this.getRunStatus(runId, { full: true });
1432
1432
  const logs = status.progress?.logs ?? [];
1433
1433
  const limit = typeof options?.limit === "number" && Number.isFinite(options.limit) ? Math.max(0, Math.trunc(options.limit)) : 200;
1434
1434
  const entries = logs.slice(Math.max(0, logs.length - limit));
@@ -3094,7 +3094,7 @@ const coordinatorEntrypoint = {
3094
3094
  requireRunScope: request.method !== 'GET' && request.method !== 'HEAD',
3095
3095
  });
3096
3096
  if (authError) return authError;
3097
- const doId = env.PLAY_DEDUP.idFromName(`dedup:${runId}`);
3097
+ const doId = env.PLAY_DEDUP.idFromName(runId);
3098
3098
  const stub = env.PLAY_DEDUP.get(doId);
3099
3099
  const internalUrl = `https://internal/${action}`;
3100
3100
  return stub.fetch(internalUrl, {