deepline 0.1.95 → 0.1.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -229,10 +229,12 @@ var import_node_path2 = require("path");
229
229
 
230
230
  // src/release.ts
231
231
  var SDK_RELEASE = {
232
- version: "0.1.95",
232
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
233
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
234
+ version: "0.1.98",
233
235
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
234
236
  supportPolicy: {
235
- latest: "0.1.95",
237
+ latest: "0.1.98",
236
238
  minimumSupported: "0.1.53",
237
239
  deprecatedBelow: "0.1.53"
238
240
  }
@@ -3113,21 +3115,32 @@ function browserAppNameFromBundleId(bundleId) {
3113
3115
  function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
3114
3116
  try {
3115
3117
  const output2 = runner.execFileSync(
3116
- "/usr/bin/defaults",
3118
+ "plutil",
3117
3119
  [
3118
- "read",
3119
- `${(0, import_node_os3.homedir)()}/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist`,
3120
- "LSHandlers"
3120
+ "-convert",
3121
+ "json",
3122
+ "-o",
3123
+ "-",
3124
+ `${(0, import_node_os3.homedir)()}/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist`
3121
3125
  ],
3122
3126
  { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
3123
3127
  );
3124
- const httpsMatch = output2.match(
3125
- /LSHandlerURLScheme\s*=\s*https;[\s\S]*?LSHandlerRole(?:All|Viewer|Editor)\s*=\s*"([^"]+)"/
3126
- );
3127
- const httpMatch = output2.match(
3128
- /LSHandlerURLScheme\s*=\s*http;[\s\S]*?LSHandlerRole(?:All|Viewer|Editor)\s*=\s*"([^"]+)"/
3129
- );
3130
- return (httpsMatch?.[1] ?? httpMatch?.[1] ?? "").trim();
3128
+ const payload = JSON.parse(String(output2));
3129
+ const handlers = Array.isArray(payload.LSHandlers) ? payload.LSHandlers : [];
3130
+ const pickBundle = (scheme) => {
3131
+ for (const handler of handlers) {
3132
+ if (!handler || typeof handler !== "object") continue;
3133
+ if (String(handler.LSHandlerURLScheme ?? "").toLowerCase() !== scheme) {
3134
+ continue;
3135
+ }
3136
+ const bundle = String(
3137
+ handler.LSHandlerRoleAll ?? handler.LSHandlerRoleViewer ?? handler.LSHandlerRoleEditor ?? ""
3138
+ ).trim();
3139
+ if (bundle) return bundle;
3140
+ }
3141
+ return "";
3142
+ };
3143
+ return pickBundle("https") || pickBundle("http");
3131
3144
  } catch {
3132
3145
  return "";
3133
3146
  }
@@ -9048,6 +9061,12 @@ ${hint}`;
9048
9061
  });
9049
9062
  }
9050
9063
 
9064
+ // ../shared_libs/play-runtime/internal-step-ids.ts
9065
+ var INTERNAL_GLUE_NODE_ID_PREFIX = "run_javascript:";
9066
+ function isInternalGlueStepId(stepId) {
9067
+ return typeof stepId === "string" && stepId.startsWith(INTERNAL_GLUE_NODE_ID_PREFIX);
9068
+ }
9069
+
9051
9070
  // src/cli/commands/play.ts
9052
9071
  var PLAY_RUN_RESERVED_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
9053
9072
  "--json",
@@ -9705,7 +9724,10 @@ function describeLiveEventPhase(event) {
9705
9724
  return status ? `${status}${runId}` : null;
9706
9725
  }
9707
9726
  if (event.type === "play.step.status" || event.type === "play.step.progress") {
9708
- const label = typeof payload.label === "string" && payload.label.trim() ? payload.label.trim() : typeof payload.stepId === "string" && payload.stepId.trim() ? payload.stepId.trim() : "step";
9727
+ const label = typeof payload.label === "string" && payload.label.trim() ? payload.label.trim() : formatStepLabelFromNodeId(payload.stepId);
9728
+ if (!label) {
9729
+ return null;
9730
+ }
9709
9731
  const completed = typeof payload.completed === "number" ? payload.completed : null;
9710
9732
  const total = typeof payload.total === "number" ? payload.total : null;
9711
9733
  const progress = completed !== null && total !== null ? ` ${completed}/${total}` : "";
@@ -9721,6 +9743,54 @@ function formatProgressLabel(raw) {
9721
9743
  const value = typeof raw === "string" && raw.trim() ? raw.trim() : "step";
9722
9744
  return value.replace(/^map:/, "").replace(/^tool:/, "");
9723
9745
  }
9746
+ function formatStepLabelFromNodeId(raw) {
9747
+ const value = typeof raw === "string" && raw.trim() ? raw.trim() : "";
9748
+ if (!value) {
9749
+ return null;
9750
+ }
9751
+ if (isInternalGlueStepId(value)) {
9752
+ return null;
9753
+ }
9754
+ const [namespace, ...rest] = value.split(":");
9755
+ switch (namespace) {
9756
+ case "map":
9757
+ case "csv":
9758
+ case "code":
9759
+ case "waterfall":
9760
+ case "step_suite":
9761
+ return rest.join(":") || value;
9762
+ case "tool":
9763
+ case "play_call":
9764
+ return rest[0] || value;
9765
+ case "control_flow":
9766
+ return rest[1] || value;
9767
+ case "node":
9768
+ return null;
9769
+ default:
9770
+ return value;
9771
+ }
9772
+ }
9773
+ function getStepTransitionLineFromLiveEvent(event, state) {
9774
+ if (event.type !== "play.step.status") {
9775
+ return null;
9776
+ }
9777
+ const payload = getEventPayload(event);
9778
+ const stepId = typeof payload.stepId === "string" && payload.stepId.trim() ? payload.stepId.trim() : null;
9779
+ const status = typeof payload.status === "string" && payload.status.trim() ? payload.status.trim() : null;
9780
+ if (!stepId || !status || status === "idle") {
9781
+ return null;
9782
+ }
9783
+ const label = formatStepLabelFromNodeId(stepId);
9784
+ if (!label) {
9785
+ return null;
9786
+ }
9787
+ state.printedStepStatuses ??= /* @__PURE__ */ new Map();
9788
+ if (state.printedStepStatuses.get(stepId) === status) {
9789
+ return null;
9790
+ }
9791
+ state.printedStepStatuses.set(stepId, status);
9792
+ return `step ${label}: ${status}`;
9793
+ }
9724
9794
  function formatProgressCounts(input2) {
9725
9795
  const completed = typeof input2.completed === "number" && Number.isFinite(input2.completed) ? input2.completed : null;
9726
9796
  const total = typeof input2.total === "number" && Number.isFinite(input2.total) ? input2.total : null;
@@ -9936,13 +10006,20 @@ async function waitForPlayCompletionByStream(input2) {
9936
10006
  progress: input2.progress
9937
10007
  });
9938
10008
  if (!input2.jsonOutput) {
10009
+ const stepTransitionLine = getStepTransitionLineFromLiveEvent(
10010
+ event,
10011
+ input2.state
10012
+ );
10013
+ if (stepTransitionLine) {
10014
+ input2.progress.writeLine(stepTransitionLine);
10015
+ }
9939
10016
  const progressLines = getProgressLinesFromLiveEvent(event);
9940
10017
  printPlayProgressLines({
9941
10018
  lines: progressLines,
9942
10019
  state: input2.state,
9943
10020
  progress: input2.progress
9944
10021
  });
9945
- if (progressLines.length === 0) {
10022
+ if (progressLines.length === 0 && !stepTransitionLine) {
9946
10023
  printPlayStatusHeartbeat({
9947
10024
  event,
9948
10025
  playName: input2.playName,
@@ -10227,13 +10304,20 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
10227
10304
  progress: input2.progress
10228
10305
  });
10229
10306
  if (!input2.jsonOutput) {
10307
+ const stepTransitionLine = getStepTransitionLineFromLiveEvent(
10308
+ event,
10309
+ state
10310
+ );
10311
+ if (stepTransitionLine) {
10312
+ input2.progress.writeLine(stepTransitionLine);
10313
+ }
10230
10314
  const progressLines = getProgressLinesFromLiveEvent(event);
10231
10315
  printPlayProgressLines({
10232
10316
  lines: progressLines,
10233
10317
  state,
10234
10318
  progress: input2.progress
10235
10319
  });
10236
- if (progressLines.length === 0) {
10320
+ if (progressLines.length === 0 && !stepTransitionLine) {
10237
10321
  printPlayStatusHeartbeat({
10238
10322
  event,
10239
10323
  playName: input2.playName,
@@ -11069,7 +11153,7 @@ function buildRunPackageTextLines(packaged) {
11069
11153
  const next = packaged.next && typeof packaged.next === "object" && !Array.isArray(packaged.next) ? packaged.next : {};
11070
11154
  const billingCommand = actionToCommand(next.billing);
11071
11155
  if (billingCommand) {
11072
- const costState = status === "completed" || status === "failed" || status === "cancelled" ? "finalizing" : "pending";
11156
+ const costState = status === "completed" || status === "failed" || status === "cancelled" ? "settles asynchronously \u2014 run the billing command below for totals" : "pending";
11073
11157
  lines.push(` cost: ${costState}`);
11074
11158
  }
11075
11159
  for (const step of readRecordArray(packaged.steps).slice(0, 8)) {
@@ -206,10 +206,12 @@ import { join as join2 } from "path";
206
206
 
207
207
  // src/release.ts
208
208
  var SDK_RELEASE = {
209
- version: "0.1.95",
209
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
210
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
211
+ version: "0.1.98",
210
212
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
211
213
  supportPolicy: {
212
- latest: "0.1.95",
214
+ latest: "0.1.98",
213
215
  minimumSupported: "0.1.53",
214
216
  deprecatedBelow: "0.1.53"
215
217
  }
@@ -3102,21 +3104,32 @@ function browserAppNameFromBundleId(bundleId) {
3102
3104
  function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
3103
3105
  try {
3104
3106
  const output2 = runner.execFileSync(
3105
- "/usr/bin/defaults",
3107
+ "plutil",
3106
3108
  [
3107
- "read",
3108
- `${homedir3()}/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist`,
3109
- "LSHandlers"
3109
+ "-convert",
3110
+ "json",
3111
+ "-o",
3112
+ "-",
3113
+ `${homedir3()}/Library/Preferences/com.apple.LaunchServices/com.apple.launchservices.secure.plist`
3110
3114
  ],
3111
3115
  { encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }
3112
3116
  );
3113
- const httpsMatch = output2.match(
3114
- /LSHandlerURLScheme\s*=\s*https;[\s\S]*?LSHandlerRole(?:All|Viewer|Editor)\s*=\s*"([^"]+)"/
3115
- );
3116
- const httpMatch = output2.match(
3117
- /LSHandlerURLScheme\s*=\s*http;[\s\S]*?LSHandlerRole(?:All|Viewer|Editor)\s*=\s*"([^"]+)"/
3118
- );
3119
- return (httpsMatch?.[1] ?? httpMatch?.[1] ?? "").trim();
3117
+ const payload = JSON.parse(String(output2));
3118
+ const handlers = Array.isArray(payload.LSHandlers) ? payload.LSHandlers : [];
3119
+ const pickBundle = (scheme) => {
3120
+ for (const handler of handlers) {
3121
+ if (!handler || typeof handler !== "object") continue;
3122
+ if (String(handler.LSHandlerURLScheme ?? "").toLowerCase() !== scheme) {
3123
+ continue;
3124
+ }
3125
+ const bundle = String(
3126
+ handler.LSHandlerRoleAll ?? handler.LSHandlerRoleViewer ?? handler.LSHandlerRoleEditor ?? ""
3127
+ ).trim();
3128
+ if (bundle) return bundle;
3129
+ }
3130
+ return "";
3131
+ };
3132
+ return pickBundle("https") || pickBundle("http");
3120
3133
  } catch {
3121
3134
  return "";
3122
3135
  }
@@ -9064,6 +9077,12 @@ ${hint}`;
9064
9077
  });
9065
9078
  }
9066
9079
 
9080
+ // ../shared_libs/play-runtime/internal-step-ids.ts
9081
+ var INTERNAL_GLUE_NODE_ID_PREFIX = "run_javascript:";
9082
+ function isInternalGlueStepId(stepId) {
9083
+ return typeof stepId === "string" && stepId.startsWith(INTERNAL_GLUE_NODE_ID_PREFIX);
9084
+ }
9085
+
9067
9086
  // src/cli/commands/play.ts
9068
9087
  var PLAY_RUN_RESERVED_BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
9069
9088
  "--json",
@@ -9721,7 +9740,10 @@ function describeLiveEventPhase(event) {
9721
9740
  return status ? `${status}${runId}` : null;
9722
9741
  }
9723
9742
  if (event.type === "play.step.status" || event.type === "play.step.progress") {
9724
- const label = typeof payload.label === "string" && payload.label.trim() ? payload.label.trim() : typeof payload.stepId === "string" && payload.stepId.trim() ? payload.stepId.trim() : "step";
9743
+ const label = typeof payload.label === "string" && payload.label.trim() ? payload.label.trim() : formatStepLabelFromNodeId(payload.stepId);
9744
+ if (!label) {
9745
+ return null;
9746
+ }
9725
9747
  const completed = typeof payload.completed === "number" ? payload.completed : null;
9726
9748
  const total = typeof payload.total === "number" ? payload.total : null;
9727
9749
  const progress = completed !== null && total !== null ? ` ${completed}/${total}` : "";
@@ -9737,6 +9759,54 @@ function formatProgressLabel(raw) {
9737
9759
  const value = typeof raw === "string" && raw.trim() ? raw.trim() : "step";
9738
9760
  return value.replace(/^map:/, "").replace(/^tool:/, "");
9739
9761
  }
9762
+ function formatStepLabelFromNodeId(raw) {
9763
+ const value = typeof raw === "string" && raw.trim() ? raw.trim() : "";
9764
+ if (!value) {
9765
+ return null;
9766
+ }
9767
+ if (isInternalGlueStepId(value)) {
9768
+ return null;
9769
+ }
9770
+ const [namespace, ...rest] = value.split(":");
9771
+ switch (namespace) {
9772
+ case "map":
9773
+ case "csv":
9774
+ case "code":
9775
+ case "waterfall":
9776
+ case "step_suite":
9777
+ return rest.join(":") || value;
9778
+ case "tool":
9779
+ case "play_call":
9780
+ return rest[0] || value;
9781
+ case "control_flow":
9782
+ return rest[1] || value;
9783
+ case "node":
9784
+ return null;
9785
+ default:
9786
+ return value;
9787
+ }
9788
+ }
9789
+ function getStepTransitionLineFromLiveEvent(event, state) {
9790
+ if (event.type !== "play.step.status") {
9791
+ return null;
9792
+ }
9793
+ const payload = getEventPayload(event);
9794
+ const stepId = typeof payload.stepId === "string" && payload.stepId.trim() ? payload.stepId.trim() : null;
9795
+ const status = typeof payload.status === "string" && payload.status.trim() ? payload.status.trim() : null;
9796
+ if (!stepId || !status || status === "idle") {
9797
+ return null;
9798
+ }
9799
+ const label = formatStepLabelFromNodeId(stepId);
9800
+ if (!label) {
9801
+ return null;
9802
+ }
9803
+ state.printedStepStatuses ??= /* @__PURE__ */ new Map();
9804
+ if (state.printedStepStatuses.get(stepId) === status) {
9805
+ return null;
9806
+ }
9807
+ state.printedStepStatuses.set(stepId, status);
9808
+ return `step ${label}: ${status}`;
9809
+ }
9740
9810
  function formatProgressCounts(input2) {
9741
9811
  const completed = typeof input2.completed === "number" && Number.isFinite(input2.completed) ? input2.completed : null;
9742
9812
  const total = typeof input2.total === "number" && Number.isFinite(input2.total) ? input2.total : null;
@@ -9952,13 +10022,20 @@ async function waitForPlayCompletionByStream(input2) {
9952
10022
  progress: input2.progress
9953
10023
  });
9954
10024
  if (!input2.jsonOutput) {
10025
+ const stepTransitionLine = getStepTransitionLineFromLiveEvent(
10026
+ event,
10027
+ input2.state
10028
+ );
10029
+ if (stepTransitionLine) {
10030
+ input2.progress.writeLine(stepTransitionLine);
10031
+ }
9955
10032
  const progressLines = getProgressLinesFromLiveEvent(event);
9956
10033
  printPlayProgressLines({
9957
10034
  lines: progressLines,
9958
10035
  state: input2.state,
9959
10036
  progress: input2.progress
9960
10037
  });
9961
- if (progressLines.length === 0) {
10038
+ if (progressLines.length === 0 && !stepTransitionLine) {
9962
10039
  printPlayStatusHeartbeat({
9963
10040
  event,
9964
10041
  playName: input2.playName,
@@ -10243,13 +10320,20 @@ async function startAndWaitForPlayCompletionByStreamOnce(input2) {
10243
10320
  progress: input2.progress
10244
10321
  });
10245
10322
  if (!input2.jsonOutput) {
10323
+ const stepTransitionLine = getStepTransitionLineFromLiveEvent(
10324
+ event,
10325
+ state
10326
+ );
10327
+ if (stepTransitionLine) {
10328
+ input2.progress.writeLine(stepTransitionLine);
10329
+ }
10246
10330
  const progressLines = getProgressLinesFromLiveEvent(event);
10247
10331
  printPlayProgressLines({
10248
10332
  lines: progressLines,
10249
10333
  state,
10250
10334
  progress: input2.progress
10251
10335
  });
10252
- if (progressLines.length === 0) {
10336
+ if (progressLines.length === 0 && !stepTransitionLine) {
10253
10337
  printPlayStatusHeartbeat({
10254
10338
  event,
10255
10339
  playName: input2.playName,
@@ -11085,7 +11169,7 @@ function buildRunPackageTextLines(packaged) {
11085
11169
  const next = packaged.next && typeof packaged.next === "object" && !Array.isArray(packaged.next) ? packaged.next : {};
11086
11170
  const billingCommand = actionToCommand(next.billing);
11087
11171
  if (billingCommand) {
11088
- const costState = status === "completed" || status === "failed" || status === "cancelled" ? "finalizing" : "pending";
11172
+ const costState = status === "completed" || status === "failed" || status === "cancelled" ? "settles asynchronously \u2014 run the billing command below for totals" : "pending";
11089
11173
  lines.push(` cost: ${costState}`);
11090
11174
  }
11091
11175
  for (const step of readRecordArray(packaged.steps).slice(0, 8)) {
package/dist/index.js CHANGED
@@ -257,10 +257,12 @@ var import_node_path2 = require("path");
257
257
 
258
258
  // src/release.ts
259
259
  var SDK_RELEASE = {
260
- version: "0.1.95",
260
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
261
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
262
+ version: "0.1.98",
261
263
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
262
264
  supportPolicy: {
263
- latest: "0.1.95",
265
+ latest: "0.1.98",
264
266
  minimumSupported: "0.1.53",
265
267
  deprecatedBelow: "0.1.53"
266
268
  }
package/dist/index.mjs CHANGED
@@ -179,10 +179,12 @@ import { join as join2 } from "path";
179
179
 
180
180
  // src/release.ts
181
181
  var SDK_RELEASE = {
182
- version: "0.1.95",
182
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
183
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
184
+ version: "0.1.98",
183
185
  apiContract: "2026-06-dataset-column-cell-stale-hard-cutover",
184
186
  supportPolicy: {
185
- latest: "0.1.95",
187
+ latest: "0.1.98",
186
188
  minimumSupported: "0.1.53",
187
189
  deprecatedBelow: "0.1.53"
188
190
  }
@@ -624,6 +624,14 @@ function getStaticSubstepNodeId(
624
624
  return `tool:${substep.field}:${substep.toolId}`;
625
625
  case 'waterfall':
626
626
  return `waterfall:${substep.id ?? substep.field}`;
627
+ // Keep in lockstep with src/lib/plays/step-progress.ts —
628
+ // getStaticSubstepNodeId there is the observability-side mapping. A
629
+ // missing case here makes the worker report `node:<index>` ids that the
630
+ // app-side package builder can never match back to a play step.
631
+ case 'step_suite':
632
+ return `step_suite:${substep.field}`;
633
+ case 'control_flow':
634
+ return `control_flow:${substep.kind}:${substep.field}`;
627
635
  case 'play_call':
628
636
  return `play_call:${substep.field}:${substep.playId}`;
629
637
  case 'run_javascript':
@@ -50,10 +50,12 @@ export type SdkRelease = {
50
50
  };
51
51
 
52
52
  export const SDK_RELEASE = {
53
- version: '0.1.95',
53
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
54
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
55
+ version: '0.1.98',
54
56
  apiContract: '2026-06-dataset-column-cell-stale-hard-cutover',
55
57
  supportPolicy: {
56
- latest: '0.1.95',
58
+ latest: '0.1.98',
57
59
  minimumSupported: '0.1.53',
58
60
  deprecatedBelow: '0.1.53',
59
61
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.95",
3
+ "version": "0.1.98",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {