deepline 0.1.7 → 0.1.8

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/index.d.mts CHANGED
@@ -1325,7 +1325,7 @@ declare class DeeplineClient {
1325
1325
  }>;
1326
1326
  }
1327
1327
 
1328
- declare const SDK_VERSION = "0.1.7";
1328
+ declare const SDK_VERSION = "0.1.8";
1329
1329
  declare const SDK_API_CONTRACT = "2026-04-plays-v1";
1330
1330
 
1331
1331
  /**
package/dist/index.d.ts CHANGED
@@ -1325,7 +1325,7 @@ declare class DeeplineClient {
1325
1325
  }>;
1326
1326
  }
1327
1327
 
1328
- declare const SDK_VERSION = "0.1.7";
1328
+ declare const SDK_VERSION = "0.1.8";
1329
1329
  declare const SDK_API_CONTRACT = "2026-04-plays-v1";
1330
1330
 
1331
1331
  /**
package/dist/index.js CHANGED
@@ -196,7 +196,7 @@ function resolveConfig(options) {
196
196
  }
197
197
 
198
198
  // src/version.ts
199
- var SDK_VERSION = "0.1.7";
199
+ var SDK_VERSION = "0.1.8";
200
200
  var SDK_API_CONTRACT = "2026-04-plays-v1";
201
201
 
202
202
  // ../shared_libs/play-runtime/coordinator-headers.ts
package/dist/index.mjs CHANGED
@@ -149,7 +149,7 @@ function resolveConfig(options) {
149
149
  }
150
150
 
151
151
  // src/version.ts
152
- var SDK_VERSION = "0.1.7";
152
+ var SDK_VERSION = "0.1.8";
153
153
  var SDK_API_CONTRACT = "2026-04-plays-v1";
154
154
 
155
155
  // ../shared_libs/play-runtime/coordinator-headers.ts
@@ -968,9 +968,16 @@ async function startAndWaitForPlayCompletionByStream(input: {
968
968
  const dashboardUrl =
969
969
  getDashboardUrlFromLiveEvent(event) ??
970
970
  buildPlayDashboardUrl(input.client.baseUrl, input.playName);
971
- input.progress.phase(
972
- `loading play on ${dashboardUrl}`,
973
- );
971
+ if (!input.jsonOutput) {
972
+ writeStartedPlayRun({
973
+ runId: workflowId,
974
+ playName: input.playName,
975
+ dashboardUrl,
976
+ jsonOutput: false,
977
+ progress: input.progress,
978
+ });
979
+ }
980
+ input.progress.phase(`loading play on ${dashboardUrl}`);
974
981
  emittedDashboardUrl = true;
975
982
  }
976
983
  assertPlayWaitNotTimedOut({
@@ -1100,8 +1107,8 @@ async function waitForPlayCompletionByPolling(input: {
1100
1107
  const now = Date.now();
1101
1108
  if (now - lastTransientPollWarningAt >= 30_000) {
1102
1109
  const message = error instanceof Error ? error.message : String(error);
1103
- process.stderr.write(
1104
- `[play tail] transient status poll failed; retrying: ${message}\n`,
1110
+ input.progress.writeLine(
1111
+ `[play tail] transient status poll failed; retrying: ${message}`,
1105
1112
  );
1106
1113
  lastTransientPollWarningAt = now;
1107
1114
  }
@@ -1787,6 +1794,7 @@ function writeStartedPlayRun(input: {
1787
1794
  statusUrl?: string;
1788
1795
  dashboardUrl?: string;
1789
1796
  jsonOutput: boolean;
1797
+ progress?: CliProgress;
1790
1798
  }): void {
1791
1799
  const payload = {
1792
1800
  runId: input.runId,
@@ -1815,7 +1823,12 @@ function writeStartedPlayRun(input: {
1815
1823
  lines.push(` play page: ${input.dashboardUrl}`);
1816
1824
  }
1817
1825
 
1818
- console.log(lines.join('\n'));
1826
+ const output = lines.join('\n');
1827
+ if (input.progress) {
1828
+ input.progress.writeLine(output, process.stdout);
1829
+ return;
1830
+ }
1831
+ console.log(output);
1819
1832
  }
1820
1833
 
1821
1834
  function parsePlayRunOptions(args: string[]): PlayRunCommandOptions {
@@ -2188,6 +2201,7 @@ async function handleFileBackedRun(
2188
2201
  statusUrl: started.statusUrl,
2189
2202
  dashboardUrl,
2190
2203
  jsonOutput: options.jsonOutput,
2204
+ progress,
2191
2205
  });
2192
2206
  return 0;
2193
2207
  }
@@ -2303,6 +2317,7 @@ async function handleNamedRun(options: PlayRunCommandOptions): Promise<number> {
2303
2317
  statusUrl: started.statusUrl,
2304
2318
  dashboardUrl,
2305
2319
  jsonOutput: options.jsonOutput,
2320
+ progress,
2306
2321
  });
2307
2322
  return 0;
2308
2323
  }
@@ -56,6 +56,20 @@ export class CliProgress {
56
56
  }
57
57
  }
58
58
 
59
+ writeLine(line: string, stream: NodeJS.WriteStream = process.stderr): void {
60
+ if (!this.enabled || !this.interactive) {
61
+ stream.write(`${line}\n`);
62
+ return;
63
+ }
64
+ const activeMessage = this.lastMessage;
65
+ this.worker?.terminate().catch(() => undefined);
66
+ this.worker = null;
67
+ stream.write(`\r\x1b[2K${line}\n`);
68
+ if (activeMessage) {
69
+ this.startWorker().postMessage({ type: 'phase', message: activeMessage });
70
+ }
71
+ }
72
+
59
73
  private settle(mark: '✓' | '✗'): void {
60
74
  if (!this.enabled || !this.lastMessage) {
61
75
  return;
@@ -2,6 +2,7 @@ import { spawn } from 'node:child_process';
2
2
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
4
  import { dirname, join } from 'node:path';
5
+ import { getActiveCliProgress } from './progress.js';
5
6
  import { baseUrlSlug } from '../config.js';
6
7
 
7
8
  const CHECK_TIMEOUT_MS = 3_000;
@@ -128,10 +129,13 @@ export async function syncSdkSkillsIfNeeded(baseUrl: string): Promise<void> {
128
129
  const update = await fetchSkillsUpdate(baseUrl, localVersion);
129
130
  if (!update?.needsUpdate || !update.remoteVersion) return;
130
131
 
131
- process.stderr.write('SDK skills changed; syncing deepline-sdk skill...\n');
132
+ const progress = getActiveCliProgress();
133
+ progress?.writeLine('SDK skills changed; syncing deepline-sdk skill...') ??
134
+ process.stderr.write('SDK skills changed; syncing deepline-sdk skill...\n');
132
135
  const installed = await runSkillsInstall(baseUrl);
133
136
  if (!installed) return;
134
137
 
135
138
  writeLocalSkillsVersion(baseUrl, update.remoteVersion);
136
- process.stderr.write('SDK skills are up to date.\n');
139
+ progress?.writeLine('SDK skills are up to date.') ??
140
+ process.stderr.write('SDK skills are up to date.\n');
137
141
  }
@@ -1,2 +1,2 @@
1
- export const SDK_VERSION = "0.1.7";
1
+ export const SDK_VERSION = "0.1.8";
2
2
  export const SDK_API_CONTRACT = "2026-04-plays-v1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {