deepline 0.1.218 → 0.1.220

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.
@@ -1568,6 +1568,11 @@ export class DeeplineClient {
1568
1568
  ...(integrationMode ? { integrationMode } : {}),
1569
1569
  ...(testPolicyOverrides ? { testPolicyOverrides } : {}),
1570
1570
  },
1571
+ undefined,
1572
+ // A start can reach the server even when its response is lost or times
1573
+ // out. Retrying this mutation without an idempotency key can create a
1574
+ // second root run, so callers must resolve ambiguous failures explicitly.
1575
+ { maxRetries: 0, exactUrlOnly: true },
1571
1576
  );
1572
1577
  return normalizePlayRunStart(response);
1573
1578
  }
@@ -26,7 +26,7 @@ export type SdkCompatibilityResponse = {
26
26
  auto_update?: {
27
27
  should_auto_update: boolean;
28
28
  required: boolean;
29
- reason: 'required' | 'patch_lag' | 'rollback_forced' | null;
29
+ reason: 'required' | 'deprecated' | 'patch_lag' | 'rollback_forced' | null;
30
30
  patch_lag: number | null;
31
31
  patch_lag_threshold: number;
32
32
  update_command: string;
@@ -106,12 +106,14 @@ export const SDK_RELEASE = {
106
106
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
107
107
  // fields shipped in 0.1.153.
108
108
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
109
- version: '0.1.218',
109
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
110
+ // automatically without blocking their current command.
111
+ version: '0.1.220',
110
112
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
111
113
  supportPolicy: {
112
- latest: '0.1.218',
114
+ latest: '0.1.220',
113
115
  minimumSupported: '0.1.53',
114
- deprecatedBelow: '0.1.53',
116
+ deprecatedBelow: '0.1.219',
115
117
  commandMinimumSupported: [
116
118
  {
117
119
  command: 'enrich',
@@ -57,6 +57,13 @@ const DAYTONA_INFRASTRUCTURE_RETRY_PATTERN =
57
57
  /\b(?:Request failed with status code (?:408|429|500|502|503|504)|ECONNRESET|ECONNREFUSED|ETIMEDOUT|UND_ERR_CONNECT_TIMEOUT|fetch failed|socket hang up|Daytona sandbox create failed across|Daytona sandbox create did not complete)\b/i;
58
58
 
59
59
  type DaytonaExecution = { exitCode: number | null; result: string };
60
+ type DaytonaLookupFailure = {
61
+ errorName: string;
62
+ errorCode: string | null;
63
+ httpStatus: number | null;
64
+ requestId: string | null;
65
+ detail: string;
66
+ };
60
67
  type DaytonaUploadAttemptTiming = {
61
68
  attempt: number;
62
69
  sandboxId: string;
@@ -98,6 +105,72 @@ export const daytonaSdkClientFactory = {
98
105
  },
99
106
  };
100
107
 
108
+ function stringProperty(value: unknown, key: string): string | null {
109
+ if (!value || typeof value !== 'object' || Array.isArray(value)) return null;
110
+ const candidate = (value as Record<string, unknown>)[key];
111
+ return typeof candidate === 'string' && candidate.trim()
112
+ ? candidate.trim()
113
+ : null;
114
+ }
115
+
116
+ function numberProperty(value: unknown, key: string): number | null {
117
+ if (!value || typeof value !== 'object' || Array.isArray(value)) return null;
118
+ const candidate = (value as Record<string, unknown>)[key];
119
+ return typeof candidate === 'number' && Number.isFinite(candidate)
120
+ ? candidate
121
+ : null;
122
+ }
123
+
124
+ function redactDaytonaErrorDetail(value: string): string {
125
+ return value
126
+ .replace(
127
+ /authorization\s*[=:]\s*bearer\s+[^\s,;]+/gi,
128
+ 'Authorization=Bearer [redacted]',
129
+ )
130
+ .replace(
131
+ /(authorization\s*[=:]\s*)(?!bearer\s+\[redacted\])[^\s,;]+/gi,
132
+ '$1[redacted]',
133
+ )
134
+ .replace(/(bearer\s+)[^\s,;]+/gi, '$1[redacted]')
135
+ .replace(
136
+ /((?:api[_-]?key|token)\s*[=:]\s*)[^\s,;]+/gi,
137
+ '$1[redacted]',
138
+ )
139
+ .replace(/\s+/g, ' ')
140
+ .trim()
141
+ .slice(0, 1_000);
142
+ }
143
+
144
+ /**
145
+ * Preserve the actionable shape of a Daytona control-plane failure without
146
+ * copying credentials or an arbitrarily large upstream response into logs.
147
+ */
148
+ export function describeDaytonaLookupFailure(
149
+ error: unknown,
150
+ ): DaytonaLookupFailure {
151
+ const record = error && typeof error === 'object' ? error : null;
152
+ const response = record ? (record as Record<string, unknown>).response : null;
153
+ const headers =
154
+ response && typeof response === 'object'
155
+ ? (response as Record<string, unknown>).headers
156
+ : null;
157
+ const message = error instanceof Error ? error.message : String(error);
158
+ return {
159
+ errorName: error instanceof Error ? error.name || 'Error' : 'NonErrorThrow',
160
+ errorCode: stringProperty(record, 'code'),
161
+ httpStatus:
162
+ numberProperty(record, 'status') ??
163
+ numberProperty(record, 'statusCode') ??
164
+ numberProperty(response, 'status'),
165
+ requestId:
166
+ stringProperty(record, 'requestId') ??
167
+ stringProperty(record, 'request_id') ??
168
+ stringProperty(headers, 'x-request-id') ??
169
+ stringProperty(headers, 'x-daytona-request-id'),
170
+ detail: redactDaytonaErrorDetail(message),
171
+ };
172
+ }
173
+
101
174
  /**
102
175
  * Best-effort deletion of an orphaned Daytona sandbox by id (push-execution B4).
103
176
  *
@@ -189,16 +262,16 @@ export async function inspectDetachedDaytonaRunner(input: {
189
262
  : { stage: 'result_missing', detail: null },
190
263
  };
191
264
  } catch (error) {
192
- const detail = error instanceof Error ? error.message : String(error);
265
+ const failure = describeDaytonaLookupFailure(error);
193
266
  console.warn('[play-runner.daytona.detached_inspect_failed]', {
194
267
  sandboxId: input.sandboxId,
195
268
  cmdId: input.cmdId,
196
- error: detail,
269
+ failure,
197
270
  });
198
271
  return {
199
272
  exitCode: null,
200
273
  result: null,
201
- diagnosis: { stage: 'sandbox_lookup_failed', detail },
274
+ diagnosis: { stage: 'sandbox_lookup_failed', detail: failure.detail },
202
275
  };
203
276
  }
204
277
  }
@@ -10,7 +10,7 @@ const PRIVATE_KEY_RE =
10
10
  // example `absurd-key-rotation-check`) and need an assignment context before
11
11
  // they are sensitive; HIGH_ENTROPY_ASSIGNMENT_RE handles that case below.
12
12
  const COMMON_SECRET_RE =
13
- /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
13
+ /\b(?:(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9_./+=:-]{12,}|(?:pat|ghp|github_pat)_[A-Za-z0-9_./+=:-]{12,}|xox[baprs]-[A-Za-z0-9_./+=:-]{12,})\b/gi;
14
14
  const GENERIC_PREFIXED_SECRET_RE =
15
15
  /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
16
16
  const URL_SECRET_VALUE_RE =
package/dist/cli/index.js CHANGED
@@ -623,12 +623,14 @@ var SDK_RELEASE = {
623
623
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
624
624
  // fields shipped in 0.1.153.
625
625
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
626
- version: "0.1.218",
626
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
627
+ // automatically without blocking their current command.
628
+ version: "0.1.220",
627
629
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
628
630
  supportPolicy: {
629
- latest: "0.1.218",
631
+ latest: "0.1.220",
630
632
  minimumSupported: "0.1.53",
631
- deprecatedBelow: "0.1.53",
633
+ deprecatedBelow: "0.1.219",
632
634
  commandMinimumSupported: [
633
635
  {
634
636
  command: "enrich",
@@ -1364,7 +1366,7 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1364
1366
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1365
1367
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1366
1368
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1367
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1369
+ var COMMON_SECRET_RE = /\b(?:(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9_./+=:-]{12,}|(?:pat|ghp|github_pat)_[A-Za-z0-9_./+=:-]{12,}|xox[baprs]-[A-Za-z0-9_./+=:-]{12,})\b/gi;
1368
1370
  var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1369
1371
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1370
1372
  var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
@@ -3053,7 +3055,12 @@ var DeeplineClient = class {
3053
3055
  ...request.profile ? { profile: request.profile } : {},
3054
3056
  ...integrationMode ? { integrationMode } : {},
3055
3057
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
3056
- }
3058
+ },
3059
+ void 0,
3060
+ // A start can reach the server even when its response is lost or times
3061
+ // out. Retrying this mutation without an idempotency key can create a
3062
+ // second root run, so callers must resolve ambiguous failures explicitly.
3063
+ { maxRetries: 0, exactUrlOnly: true }
3057
3064
  );
3058
3065
  return normalizePlayRunStart(response);
3059
3066
  }
@@ -28935,7 +28942,7 @@ async function maybeAutoUpdateAndRelaunch(response) {
28935
28942
  if (plan.kind === "source") {
28936
28943
  return false;
28937
28944
  }
28938
- const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.required ? "requires an update" : "is more than the supported auto-update lag behind";
28945
+ const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.reason === "deprecated" ? "is deprecated and will update automatically" : autoUpdate.required ? "requires an update" : "is more than the supported auto-update lag behind";
28939
28946
  process.stderr.write(
28940
28947
  `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
28941
28948
  `
@@ -608,12 +608,14 @@ var SDK_RELEASE = {
608
608
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
609
609
  // fields shipped in 0.1.153.
610
610
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
611
- version: "0.1.218",
611
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
612
+ // automatically without blocking their current command.
613
+ version: "0.1.220",
612
614
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
613
615
  supportPolicy: {
614
- latest: "0.1.218",
616
+ latest: "0.1.220",
615
617
  minimumSupported: "0.1.53",
616
- deprecatedBelow: "0.1.53",
618
+ deprecatedBelow: "0.1.219",
617
619
  commandMinimumSupported: [
618
620
  {
619
621
  command: "enrich",
@@ -1349,7 +1351,7 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1349
1351
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1350
1352
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1351
1353
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1352
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1354
+ var COMMON_SECRET_RE = /\b(?:(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9_./+=:-]{12,}|(?:pat|ghp|github_pat)_[A-Za-z0-9_./+=:-]{12,}|xox[baprs]-[A-Za-z0-9_./+=:-]{12,})\b/gi;
1353
1355
  var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1354
1356
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1355
1357
  var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
@@ -3038,7 +3040,12 @@ var DeeplineClient = class {
3038
3040
  ...request.profile ? { profile: request.profile } : {},
3039
3041
  ...integrationMode ? { integrationMode } : {},
3040
3042
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
3041
- }
3043
+ },
3044
+ void 0,
3045
+ // A start can reach the server even when its response is lost or times
3046
+ // out. Retrying this mutation without an idempotency key can create a
3047
+ // second root run, so callers must resolve ambiguous failures explicitly.
3048
+ { maxRetries: 0, exactUrlOnly: true }
3042
3049
  );
3043
3050
  return normalizePlayRunStart(response);
3044
3051
  }
@@ -28992,7 +28999,7 @@ async function maybeAutoUpdateAndRelaunch(response) {
28992
28999
  if (plan.kind === "source") {
28993
29000
  return false;
28994
29001
  }
28995
- const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.required ? "requires an update" : "is more than the supported auto-update lag behind";
29002
+ const label = autoUpdate.reason === "rollback_forced" ? "has a server rollback pending and needs the latest rollback-aware CLI" : autoUpdate.reason === "deprecated" ? "is deprecated and will update automatically" : autoUpdate.required ? "requires an update" : "is more than the supported auto-update lag behind";
28996
29003
  process.stderr.write(
28997
29004
  `Deepline SDK/CLI ${label}; running ${plan.manualCommand}
28998
29005
  `
package/dist/index.js CHANGED
@@ -422,12 +422,14 @@ var SDK_RELEASE = {
422
422
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
423
423
  // fields shipped in 0.1.153.
424
424
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
425
- version: "0.1.218",
425
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
426
+ // automatically without blocking their current command.
427
+ version: "0.1.220",
426
428
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
427
429
  supportPolicy: {
428
- latest: "0.1.218",
430
+ latest: "0.1.220",
429
431
  minimumSupported: "0.1.53",
430
- deprecatedBelow: "0.1.53",
432
+ deprecatedBelow: "0.1.219",
431
433
  commandMinimumSupported: [
432
434
  {
433
435
  command: "enrich",
@@ -1163,7 +1165,7 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1163
1165
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1164
1166
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1165
1167
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1166
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1168
+ var COMMON_SECRET_RE = /\b(?:(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9_./+=:-]{12,}|(?:pat|ghp|github_pat)_[A-Za-z0-9_./+=:-]{12,}|xox[baprs]-[A-Za-z0-9_./+=:-]{12,})\b/gi;
1167
1169
  var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1168
1170
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1169
1171
  var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
@@ -2852,7 +2854,12 @@ var DeeplineClient = class {
2852
2854
  ...request.profile ? { profile: request.profile } : {},
2853
2855
  ...integrationMode ? { integrationMode } : {},
2854
2856
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
2855
- }
2857
+ },
2858
+ void 0,
2859
+ // A start can reach the server even when its response is lost or times
2860
+ // out. Retrying this mutation without an idempotency key can create a
2861
+ // second root run, so callers must resolve ambiguous failures explicitly.
2862
+ { maxRetries: 0, exactUrlOnly: true }
2856
2863
  );
2857
2864
  return normalizePlayRunStart(response);
2858
2865
  }
package/dist/index.mjs CHANGED
@@ -352,12 +352,14 @@ var SDK_RELEASE = {
352
352
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
353
353
  // fields shipped in 0.1.153.
354
354
  // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
355
- version: "0.1.218",
355
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
356
+ // automatically without blocking their current command.
357
+ version: "0.1.220",
356
358
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
357
359
  supportPolicy: {
358
- latest: "0.1.218",
360
+ latest: "0.1.220",
359
361
  minimumSupported: "0.1.53",
360
- deprecatedBelow: "0.1.53",
362
+ deprecatedBelow: "0.1.219",
361
363
  commandMinimumSupported: [
362
364
  {
363
365
  command: "enrich",
@@ -1093,7 +1095,7 @@ var SECRET_REDACTION_PLACEHOLDER = "[REDACTED_SECRET]";
1093
1095
  var BEARER_TOKEN_RE = /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/g;
1094
1096
  var JWT_RE = /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g;
1095
1097
  var PRIVATE_KEY_RE = /-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g;
1096
- var COMMON_SECRET_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox[baprs])[A-Za-z0-9_./+=:-]{12,}\b/gi;
1098
+ var COMMON_SECRET_RE = /\b(?:(?:sk|pk|rk)_(?:live|test)_[A-Za-z0-9_./+=:-]{12,}|(?:pat|ghp|github_pat)_[A-Za-z0-9_./+=:-]{12,}|xox[baprs]-[A-Za-z0-9_./+=:-]{12,})\b/gi;
1097
1099
  var GENERIC_PREFIXED_SECRET_RE = /\b(?:key|token|secret|api[_-]?key)_[A-Za-z0-9_./+=:-]{12,}\b/gi;
1098
1100
  var URL_SECRET_VALUE_RE = /\b(?:sk|pk|rk|pat|ghp|github_pat|xox)[A-Za-z0-9_./+=:-]{12,}\b/i;
1099
1101
  var GENERIC_SECRET_ASSIGNMENT_RE = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*["']?[^"',\s]{12,}["']?/gi;
@@ -2782,7 +2784,12 @@ var DeeplineClient = class {
2782
2784
  ...request.profile ? { profile: request.profile } : {},
2783
2785
  ...integrationMode ? { integrationMode } : {},
2784
2786
  ...testPolicyOverrides ? { testPolicyOverrides } : {}
2785
- }
2787
+ },
2788
+ void 0,
2789
+ // A start can reach the server even when its response is lost or times
2790
+ // out. Retrying this mutation without an idempotency key can create a
2791
+ // second root run, so callers must resolve ambiguous failures explicitly.
2792
+ { maxRetries: 0, exactUrlOnly: true }
2786
2793
  );
2787
2794
  return normalizePlayRunStart(response);
2788
2795
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.218",
3
+ "version": "0.1.220",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {