deepline 0.1.85 → 0.1.88

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.
@@ -24,6 +24,16 @@ export const COORDINATOR_RUN_SCOPE_HEADER = 'x-deepline-run-scope';
24
24
  export const COORDINATOR_URL_OVERRIDE_HEADER = 'x-deepline-coordinator-url';
25
25
  export const WORKER_CALLBACK_URL_OVERRIDE_HEADER =
26
26
  'x-deepline-worker-callback-url';
27
+ /**
28
+ * CLI→app marker (NOT a coordinator header — it lives here only because both
29
+ * the SDK HTTP client and the run route already import this module). Set by
30
+ * automated test harnesses (e.g. `tests/v2-plays`) so their intentionally
31
+ * failing plays — depth-guard probes, error-path scenarios — do not page the
32
+ * SDK CLI error channel as if a real customer run had failed. The run route
33
+ * honors it ONLY in non-prod (see run/route.ts); a forged header from a real
34
+ * prod customer can never suppress their own failure alerts.
35
+ */
36
+ export const SYNTHETIC_RUN_HEADER = 'x-deepline-synthetic-run';
27
37
 
28
38
  let warnedAboutMissingInternalToken = false;
29
39
 
@@ -136,7 +136,16 @@ export type PlaySchedulerSubmitInput = {
136
136
  };
137
137
 
138
138
  export type PlaySchedulerProgressEvent =
139
- | { type: 'status'; status: string; logs?: string[]; ts: number }
139
+ | {
140
+ type: 'status';
141
+ status: string;
142
+ logs?: string[];
143
+ ts: number;
144
+ activeNodeId?: string | null;
145
+ activeArtifactTableNamespace?: string | null;
146
+ updatedAt?: number | null;
147
+ liveNodeProgress?: unknown;
148
+ }
140
149
  | { type: 'log'; line: string; ts: number }
141
150
  | { type: 'row'; update: PlayRowUpdate; ts: number }
142
151
  | { type: 'execution_event'; event: PlayExecutionEvent; ts: number }
@@ -26,10 +26,7 @@ import type {
26
26
  } from '../artifact-types';
27
27
  import { buildPlayContractCompatibility } from '../contracts';
28
28
  import { validatePlaySourceFilesHaveNoInlineSecrets } from '../secret-guardrails';
29
- import {
30
- MAX_ESM_WORKERS_BUNDLE_BYTES,
31
- MAX_PLAY_BUNDLE_BYTES,
32
- } from './limits';
29
+ import { MAX_ESM_WORKERS_BUNDLE_BYTES, MAX_PLAY_BUNDLE_BYTES } from './limits';
33
30
 
34
31
  const PLAY_BUNDLE_CACHE_VERSION = 24;
35
32
  const PLAY_ARTIFACT_CACHE_DIR = join(
@@ -443,7 +440,13 @@ function findPackageJsonPathFrom(
443
440
  startDir: string,
444
441
  packageName: string,
445
442
  ): string | null {
446
- let current = resolve(startDir);
443
+ if (!isAbsolute(startDir)) {
444
+ throw new Error(
445
+ `Package resolution requires an absolute start directory, got ${startDir}`,
446
+ );
447
+ }
448
+
449
+ let current = startDir;
447
450
  while (true) {
448
451
  const packageJsonPath = join(
449
452
  current,
@@ -469,17 +472,15 @@ function findPackageJsonPath(
469
472
  adapter: PlayBundlingAdapter,
470
473
  ): string | null {
471
474
  const startDirs = [
472
- dirname(fromFile),
473
- adapter.projectRoot,
474
- dirname(adapter.sdkPackageJson),
475
- process.cwd(),
475
+ resolve(dirname(fromFile)),
476
+ resolve(adapter.projectRoot),
477
+ resolve(dirname(adapter.sdkPackageJson)),
476
478
  ];
477
479
  const seen = new Set<string>();
478
480
  for (const startDir of startDirs) {
479
- const normalized = resolve(startDir);
480
- if (seen.has(normalized)) continue;
481
- seen.add(normalized);
482
- const packageJsonPath = findPackageJsonPathFrom(normalized, packageName);
481
+ if (seen.has(startDir)) continue;
482
+ seen.add(startDir);
483
+ const packageJsonPath = findPackageJsonPathFrom(startDir, packageName);
483
484
  if (packageJsonPath) return packageJsonPath;
484
485
  }
485
486
 
@@ -1139,7 +1140,10 @@ async function writeArtifactCache(
1139
1140
  );
1140
1141
  }
1141
1142
 
1142
- function normalizeSourceMapForRuntime(sourceMapText: string): string {
1143
+ function normalizeSourceMapForRuntime(
1144
+ sourceMapText: string,
1145
+ projectRoot: string,
1146
+ ): string {
1143
1147
  const parsed = JSON.parse(sourceMapText) as {
1144
1148
  sourceRoot?: string;
1145
1149
  sources?: string[];
@@ -1155,7 +1159,7 @@ function normalizeSourceMapForRuntime(sourceMapText: string): string {
1155
1159
  return sourcePath;
1156
1160
  }
1157
1161
 
1158
- return resolve(process.cwd(), sourcePath);
1162
+ return join(projectRoot, sourcePath);
1159
1163
  });
1160
1164
  parsed.sourceRoot = undefined;
1161
1165
 
@@ -1524,7 +1528,10 @@ export async function bundlePlayFile(
1524
1528
  }
1525
1529
  const { bundledCode, sourceMapText, outputExtension } = buildOutcome;
1526
1530
 
1527
- const normalizedSourceMap = normalizeSourceMapForRuntime(sourceMapText);
1531
+ const normalizedSourceMap = normalizeSourceMapForRuntime(
1532
+ sourceMapText,
1533
+ resolve(adapter.projectRoot),
1534
+ );
1528
1535
  const virtualBaseName =
1529
1536
  exportName === 'default'
1530
1537
  ? basename(absolutePath).replace(/\.[^.]+$/, '')
@@ -74,6 +74,8 @@ export type PlayDatasetTransformOptions = {
74
74
  * small and bounded. `PlayDataset` intentionally does not expose `.rows`,
75
75
  * `.toArray()`, or other array aliases; those hide the runtime cost of loading
76
76
  * persisted rows into memory.
77
+ *
78
+ * @sdkReference runtime 190
77
79
  */
78
80
  export interface PlayDataset<T> extends AsyncIterable<T> {
79
81
  readonly [PLAY_DATASET_BRAND]: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.85",
3
+ "version": "0.1.88",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {