deepline 0.3.294 → 0.3.296

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.
Files changed (138) hide show
  1. package/dist/bundling-sources/sdk/src/compat.ts +35 -7
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +108 -35
  4. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +25 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +14 -1
  6. package/dist/cli/auth-JCGIDVDF.mjs +31 -0
  7. package/dist/cli/auth-QDWV3TXX.js +31 -0
  8. package/dist/cli/billing-OQBSIXRG.mjs +1749 -0
  9. package/dist/cli/billing-YBK3J4WP.js +1749 -0
  10. package/dist/cli/chunk-2C3AVPTY.js +5688 -0
  11. package/dist/cli/chunk-2MZ5EQZE.mjs +499 -0
  12. package/dist/cli/chunk-3KC45UVF.js +150 -0
  13. package/dist/cli/chunk-3XX5TEA4.js +15 -0
  14. package/dist/cli/chunk-4MBOJQPL.mjs +0 -0
  15. package/dist/cli/chunk-4Y6CG4GE.js +2240 -0
  16. package/dist/cli/chunk-4ZB3CJRD.js +1269 -0
  17. package/dist/cli/chunk-5JLQPVNX.js +3056 -0
  18. package/dist/cli/chunk-6A3TJUWC.js +76 -0
  19. package/dist/cli/chunk-6HPEDBSJ.js +1995 -0
  20. package/dist/cli/chunk-7D6QG5KF.js +890 -0
  21. package/dist/cli/chunk-7P5AA3SN.js +344 -0
  22. package/dist/cli/chunk-7UAO5MWV.mjs +190 -0
  23. package/dist/cli/chunk-A7427JJH.js +190 -0
  24. package/dist/cli/chunk-AQRTLPHZ.js +735 -0
  25. package/dist/cli/chunk-AYHLUHE5.js +52 -0
  26. package/dist/cli/chunk-BZ77OTRF.mjs +923 -0
  27. package/dist/cli/chunk-CBVIJSHF.mjs +560 -0
  28. package/dist/cli/chunk-COGTRVWW.js +30 -0
  29. package/dist/cli/chunk-DLIRSHV6.mjs +28 -0
  30. package/dist/cli/chunk-DYWHXO7O.mjs +34 -0
  31. package/dist/cli/chunk-EDWJY6T4.mjs +3056 -0
  32. package/dist/cli/chunk-EXMLR72R.mjs +0 -0
  33. package/dist/cli/chunk-G46HHFNB.mjs +1269 -0
  34. package/dist/cli/chunk-GAMFK2ZP.mjs +148 -0
  35. package/dist/cli/chunk-GLKUGBTP.mjs +2240 -0
  36. package/dist/cli/chunk-GONRLVV3.js +3440 -0
  37. package/dist/cli/chunk-GVUJJJ5G.mjs +76 -0
  38. package/dist/cli/chunk-H7HIDGZ7.mjs +150 -0
  39. package/dist/cli/chunk-HUZXWOSK.mjs +503 -0
  40. package/dist/cli/chunk-I5YZLGMG.js +1 -0
  41. package/dist/cli/chunk-ITOFSXIU.mjs +15 -0
  42. package/dist/cli/chunk-J2D3VDOU.mjs +5688 -0
  43. package/dist/cli/chunk-J5NA2TTX.js +503 -0
  44. package/dist/cli/chunk-JCS5TPNY.mjs +3440 -0
  45. package/dist/cli/chunk-JNNOCMQY.js +47 -0
  46. package/dist/cli/chunk-KRD6H754.mjs +30 -0
  47. package/dist/cli/chunk-L4HBNHFW.js +34 -0
  48. package/dist/cli/chunk-LA46MMTL.js +560 -0
  49. package/dist/cli/chunk-LIKFCE7Z.js +190 -0
  50. package/dist/cli/chunk-MIMASXO4.mjs +389 -0
  51. package/dist/cli/chunk-NPPJX3BL.mjs +1995 -0
  52. package/dist/cli/chunk-NTEZFZLE.mjs +890 -0
  53. package/dist/cli/chunk-NXDRDJ4K.js +389 -0
  54. package/dist/cli/chunk-NXGCO4JB.mjs +344 -0
  55. package/dist/cli/chunk-OG64RBAC.js +6 -0
  56. package/dist/cli/chunk-OWJZUE3Y.mjs +103 -0
  57. package/dist/cli/chunk-QSIO4TX2.mjs +190 -0
  58. package/dist/cli/chunk-RCUE5C5C.mjs +735 -0
  59. package/dist/cli/chunk-SDK3ZA2C.js +103 -0
  60. package/dist/cli/chunk-SFLARO4Y.mjs +47 -0
  61. package/dist/cli/chunk-TAC3JIFE.mjs +354 -0
  62. package/dist/cli/chunk-UC6GHEL4.js +499 -0
  63. package/dist/cli/chunk-UFS752TU.mjs +52 -0
  64. package/dist/cli/chunk-UNEMDKXN.js +1 -0
  65. package/dist/cli/chunk-WB6Z2Q44.mjs +1622 -0
  66. package/dist/cli/chunk-WJYPBHTE.js +148 -0
  67. package/dist/cli/chunk-WOHBA5PV.js +354 -0
  68. package/dist/cli/chunk-WZYKRD7T.mjs +6 -0
  69. package/dist/cli/chunk-XNYIZMNQ.js +28 -0
  70. package/dist/cli/chunk-ZDO3TO3M.js +1622 -0
  71. package/dist/cli/chunk-ZDOC4HFL.js +923 -0
  72. package/dist/cli/client-CZDA4JKO.mjs +20 -0
  73. package/dist/cli/client-IZGIN2ZA.js +20 -0
  74. package/dist/cli/csv-6KOMZA2H.mjs +585 -0
  75. package/dist/cli/csv-UTEQY3NA.js +585 -0
  76. package/dist/cli/db-D5EP6TKO.mjs +486 -0
  77. package/dist/cli/db-SIBLPIKC.js +486 -0
  78. package/dist/cli/executions-2PHT57IO.js +28 -0
  79. package/dist/cli/executions-DFWM2YYY.mjs +28 -0
  80. package/dist/cli/feedback-GZW37JMI.mjs +107 -0
  81. package/dist/cli/feedback-IQVWIJZ4.js +107 -0
  82. package/dist/cli/getting-started.js +18 -76
  83. package/dist/cli/getting-started.mjs +10 -37
  84. package/dist/cli/git-563GYLMA.js +23 -0
  85. package/dist/cli/git-B72Y4FFQ.mjs +23 -0
  86. package/dist/cli/index.js +291 -54294
  87. package/dist/cli/index.mjs +209 -54352
  88. package/dist/cli/legacy-noops-37F5MX2P.mjs +157 -0
  89. package/dist/cli/legacy-noops-IFGVDCOM.js +157 -0
  90. package/dist/cli/monitors-42H6LOVT.mjs +3251 -0
  91. package/dist/cli/monitors-GQCHXBXZ.js +3251 -0
  92. package/dist/cli/org-4GCPBTGR.js +849 -0
  93. package/dist/cli/org-JYZA3ZRJ.mjs +849 -0
  94. package/dist/cli/play-46ZJ4FMI.js +18439 -0
  95. package/dist/cli/play-Q2XV3FZZ.mjs +18439 -0
  96. package/dist/cli/providers-CTKQP45X.mjs +95 -0
  97. package/dist/cli/providers-PCNF5E3K.js +95 -0
  98. package/dist/cli/proxy-env-EBANZHPV.js +161 -0
  99. package/dist/cli/proxy-env-M4ZHXHRL.mjs +161 -0
  100. package/dist/cli/quickstart-FTHWRVWN.js +69 -0
  101. package/dist/cli/quickstart-X7EVVWRG.mjs +69 -0
  102. package/dist/cli/search-73YPOFDO.mjs +18 -0
  103. package/dist/cli/search-XA5UVC3G.js +18 -0
  104. package/dist/cli/secrets-OUMPT4FX.mjs +400 -0
  105. package/dist/cli/secrets-UOEVR73Q.js +400 -0
  106. package/dist/cli/sessions-CMKXCN5Y.js +15 -0
  107. package/dist/cli/sessions-ZIFGDZE7.mjs +15 -0
  108. package/dist/cli/settings-OO5R3G52.mjs +846 -0
  109. package/dist/cli/settings-ULZT2NIC.js +846 -0
  110. package/dist/cli/setup-6GZH52OZ.mjs +1257 -0
  111. package/dist/cli/setup-DHGERXPZ.js +1257 -0
  112. package/dist/cli/skills-Q7NUCS2W.js +28 -0
  113. package/dist/cli/skills-T3EY2656.mjs +28 -0
  114. package/dist/cli/tools-BIMOAOTX.mjs +2955 -0
  115. package/dist/cli/tools-ODXVCKO7.js +2955 -0
  116. package/dist/cli/update-UMB3ULBR.js +28 -0
  117. package/dist/cli/update-X4HX7Z3M.mjs +28 -0
  118. package/dist/cli/workflow-EAUFVPIP.mjs +1936 -0
  119. package/dist/cli/workflow-IVLCPFTG.js +1936 -0
  120. package/dist/helpers.js +6 -32
  121. package/dist/helpers.mjs +2 -0
  122. package/dist/index.js +1972 -12825
  123. package/dist/index.mjs +1910 -12672
  124. package/dist/install-integrity.json +110 -0
  125. package/dist/monitor-fleet-contract.js +31 -730
  126. package/dist/monitor-fleet-contract.mjs +18 -667
  127. package/dist/monitor-input-contract.js +10 -390
  128. package/dist/monitor-input-contract.mjs +7 -348
  129. package/dist/plays/bundle-play-file.mjs +13 -5178
  130. package/dist/plays/csv-data-input.js +5 -3132
  131. package/dist/plays/csv-data-input.mjs +5 -3105
  132. package/dist/plays/run-request.js +56 -664
  133. package/dist/plays/run-request.mjs +30 -588
  134. package/dist/release.d.mts +1 -1
  135. package/dist/release.d.ts +1 -1
  136. package/dist/release.js +5 -212
  137. package/dist/release.mjs +5 -185
  138. package/package.json +1 -1
@@ -0,0 +1,344 @@
1
+ // ../plays/tool-execution-error.ts
2
+ var DEEPLINE_ERROR_BRAND = Symbol.for("deepline.error.v1");
3
+ var TOOL_EXECUTION_ERROR_BRAND = Symbol.for(
4
+ "deepline.tool-execution-error.v1"
5
+ );
6
+ var PROVIDER_TRANSIENT_ERROR_BRAND = Symbol.for(
7
+ "deepline.provider-transient-error.v1"
8
+ );
9
+ var LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 0;
10
+ var TOOL_EXECUTION_ERROR_SCHEMA_VERSION = 1;
11
+ var TOOL_EXECUTION_ERROR_SCHEMA_HEADER = "x-deepline-tool-error-schema";
12
+ var MAX_IDENTIFIER_LENGTH = 200;
13
+ var MAX_CODE_LENGTH = 160;
14
+ function nativeInstanceOf(constructor, value) {
15
+ return Reflect.apply(Function.prototype[Symbol.hasInstance], constructor, [
16
+ value
17
+ ]);
18
+ }
19
+ function hasBrand(value, brand) {
20
+ return typeof value === "object" && value !== null && value[brand] === true;
21
+ }
22
+ function applyBrand(value, brand) {
23
+ if (hasBrand(value, brand)) return;
24
+ Object.defineProperty(value, brand, {
25
+ configurable: false,
26
+ enumerable: false,
27
+ writable: false,
28
+ value: true
29
+ });
30
+ }
31
+ var DeeplineError = class _DeeplineError extends Error {
32
+ /** HTTP status when the failure crossed an HTTP boundary. */
33
+ statusCode;
34
+ /** Stable machine-readable error code when one exists. */
35
+ code;
36
+ /** Local diagnostic context; not a portable error contract. */
37
+ details;
38
+ /**
39
+ * Construct a Deepline error.
40
+ *
41
+ * SDK and runtime code construct these errors. Application and Play code
42
+ * normally catches the public subclasses instead.
43
+ *
44
+ * @param message Human-readable failure summary.
45
+ * @param statusCode HTTP status when one exists.
46
+ * @param code Stable machine-readable code when one exists.
47
+ * @param details Local diagnostic context; never a portable error contract.
48
+ */
49
+ constructor(message, statusCode, code, details) {
50
+ super(message);
51
+ this.name = "DeeplineError";
52
+ this.statusCode = statusCode;
53
+ this.code = code;
54
+ this.details = details;
55
+ applyBrand(this, DEEPLINE_ERROR_BRAND);
56
+ }
57
+ static [Symbol.hasInstance](value) {
58
+ if (this !== _DeeplineError) return nativeInstanceOf(this, value);
59
+ return hasBrand(value, DEEPLINE_ERROR_BRAND);
60
+ }
61
+ };
62
+ var ToolExecutionError = class _ToolExecutionError extends DeeplineError {
63
+ /** Public tool id passed to `tools.execute`. */
64
+ toolId;
65
+ /** Provider responsible for the operation, or `null` when unattributed. */
66
+ provider;
67
+ /** Provider operation name, or `null` when unavailable. */
68
+ operation;
69
+ /** Boundary responsible for the failure. */
70
+ origin;
71
+ /** Stable reason family for policy and diagnostics. */
72
+ category;
73
+ /**
74
+ * Whether repeating the same semantic call is delivery-safe.
75
+ *
76
+ * This does not mean the error may be ignored. Waterfall fallthrough is
77
+ * represented by `ProviderTransientError`.
78
+ */
79
+ retryable;
80
+ /** Provider or Deepline request id, or `null` when unavailable. */
81
+ requestId;
82
+ /** Suggested same-call retry delay in milliseconds, or `null`. */
83
+ retryAfterMs;
84
+ /** Network failure kind, or `null` for non-network failures. */
85
+ networkKind;
86
+ /** Network boundary that failed, or `null` for non-network failures. */
87
+ networkScope;
88
+ /** Explicitly allowlisted diagnostics safe for SDK and Play callers. */
89
+ publicDetails;
90
+ /**
91
+ * Construct a structured tool error.
92
+ *
93
+ * Deepline constructs this from the versioned `tool_error` payload.
94
+ * Application and Play code should catch it rather than create it.
95
+ */
96
+ constructor(message, options) {
97
+ super(
98
+ message,
99
+ options.statusCode ?? void 0,
100
+ options.code ?? void 0,
101
+ options.details
102
+ );
103
+ this.name = "ToolExecutionError";
104
+ this.toolId = options.toolId;
105
+ this.provider = options.provider;
106
+ this.operation = options.operation;
107
+ this.origin = options.origin;
108
+ this.category = options.category;
109
+ this.retryable = options.retryable;
110
+ this.requestId = options.requestId;
111
+ this.retryAfterMs = options.retryAfterMs;
112
+ this.networkKind = options.networkKind;
113
+ this.networkScope = options.networkScope;
114
+ this.publicDetails = options.publicDetails ?? null;
115
+ applyBrand(this, TOOL_EXECUTION_ERROR_BRAND);
116
+ if (isProviderTransientFailure(options)) {
117
+ applyBrand(this, PROVIDER_TRANSIENT_ERROR_BRAND);
118
+ }
119
+ }
120
+ static [Symbol.hasInstance](value) {
121
+ if (this !== _ToolExecutionError) return nativeInstanceOf(this, value);
122
+ return hasBrand(value, TOOL_EXECUTION_ERROR_BRAND);
123
+ }
124
+ };
125
+ function brandAsToolExecutionError(value) {
126
+ applyBrand(value, TOOL_EXECUTION_ERROR_BRAND);
127
+ }
128
+ function isProviderTransientFailure(input) {
129
+ return input.origin === "provider" && (input.category === "rate_limit" || input.category === "network" || input.category === "upstream");
130
+ }
131
+ var ProviderTransientError = class _ProviderTransientError extends ToolExecutionError {
132
+ /** Provider attribution is guaranteed for this subtype. */
133
+ origin = "provider";
134
+ /** Constructed by Deepline when a provider-owned transient failure arrives. */
135
+ constructor(message, options) {
136
+ super(message, {
137
+ ...options,
138
+ origin: "provider",
139
+ category: options.category
140
+ });
141
+ this.name = "ProviderTransientError";
142
+ this.category = options.category;
143
+ applyBrand(this, PROVIDER_TRANSIENT_ERROR_BRAND);
144
+ }
145
+ static [Symbol.hasInstance](value) {
146
+ if (this !== _ProviderTransientError) return nativeInstanceOf(this, value);
147
+ return hasBrand(value, PROVIDER_TRANSIENT_ERROR_BRAND);
148
+ }
149
+ };
150
+ function getProviderUnavailableReason(error) {
151
+ if (error instanceof ProviderTransientError) return error.category;
152
+ if (error instanceof ToolExecutionError && error.origin === "provider" && error.code === "PROVIDER_ACCOUNT_CAPACITY") {
153
+ return "account_capacity";
154
+ }
155
+ if (error instanceof ToolExecutionError && error.origin === "caller" && error.code === "INTEGRATION_CREDENTIALS_MISSING") {
156
+ return "credentials_missing";
157
+ }
158
+ return null;
159
+ }
160
+ function isProviderUnavailable(error) {
161
+ return getProviderUnavailableReason(error) !== null;
162
+ }
163
+ var isProviderWaterfallUnavailableError = isProviderUnavailable;
164
+ function brandAsProviderTransientError(value) {
165
+ applyBrand(value, PROVIDER_TRANSIENT_ERROR_BRAND);
166
+ }
167
+ function boundedString(value, maxLength = MAX_IDENTIFIER_LENGTH) {
168
+ if (typeof value !== "string") return null;
169
+ const normalized = value.trim();
170
+ return normalized ? normalized.slice(0, maxLength) : null;
171
+ }
172
+ function finiteNonNegativeInteger(value) {
173
+ return typeof value === "number" && Number.isFinite(value) && value >= 0 && Number.isInteger(value) ? value : null;
174
+ }
175
+ function normalizeToolExecutionOrigin(value, input) {
176
+ const normalized = boundedString(value)?.toLowerCase();
177
+ if (normalized === "caller") return "caller";
178
+ if (normalized === "provider" || normalized === "provider_network") {
179
+ return "provider";
180
+ }
181
+ if (normalized === "upstream" && boundedString(input?.provider) && boundedString(input?.operation)) {
182
+ return "provider";
183
+ }
184
+ if (normalized === "deepline" || normalized === "deepline_billing" || normalized === "deepline_rate_limit" || normalized === "internal" || normalized === "server") {
185
+ return "deepline";
186
+ }
187
+ if (normalized === "provider_account") return "provider";
188
+ return "unknown";
189
+ }
190
+ function normalizeToolExecutionCategory(value) {
191
+ switch (boundedString(value)?.toLowerCase()) {
192
+ case "validation":
193
+ case "authorization":
194
+ case "rate_limit":
195
+ case "network":
196
+ case "upstream":
197
+ case "billing":
198
+ case "conflict":
199
+ case "internal":
200
+ return boundedString(value).toLowerCase();
201
+ case "authentication":
202
+ case "provider_auth":
203
+ case "provider_account":
204
+ return "authentication";
205
+ case "execution":
206
+ case "parse":
207
+ case "stub":
208
+ case "internal_native_search_performance":
209
+ return "internal";
210
+ default:
211
+ return "unknown";
212
+ }
213
+ }
214
+ function normalizeNetworkKind(value) {
215
+ switch (boundedString(value)?.toLowerCase()) {
216
+ case "timeout":
217
+ case "dns":
218
+ case "connect":
219
+ case "reset":
220
+ case "unavailable":
221
+ case "unknown":
222
+ return boundedString(value).toLowerCase();
223
+ default:
224
+ return null;
225
+ }
226
+ }
227
+ function normalizeNetworkScope(value) {
228
+ switch (boundedString(value)?.toLowerCase()) {
229
+ case "client_to_deepline":
230
+ case "runtime_to_deepline":
231
+ case "deepline_to_provider":
232
+ return boundedString(value).toLowerCase();
233
+ default:
234
+ return null;
235
+ }
236
+ }
237
+ function isRecord(value) {
238
+ return value !== null && typeof value === "object" && !Array.isArray(value);
239
+ }
240
+ var MAX_PUBLIC_DETAIL_ENTRIES = 20;
241
+ var MAX_PUBLIC_DETAIL_KEY_LENGTH = 80;
242
+ var MAX_PUBLIC_DETAIL_STRING_LENGTH = 512;
243
+ function normalizeToolExecutionPublicDetails(value) {
244
+ if (!isRecord(value)) return null;
245
+ const details = {};
246
+ for (const [key, entry] of Object.entries(value)) {
247
+ if (Object.keys(details).length >= MAX_PUBLIC_DETAIL_ENTRIES) break;
248
+ if (key.length === 0 || key.length > MAX_PUBLIC_DETAIL_KEY_LENGTH || !/^[a-z][a-zA-Z0-9_]*$/.test(key)) {
249
+ continue;
250
+ }
251
+ if (typeof entry === "string") {
252
+ if (entry.length <= MAX_PUBLIC_DETAIL_STRING_LENGTH) details[key] = entry;
253
+ continue;
254
+ }
255
+ if (typeof entry === "number") {
256
+ if (Number.isFinite(entry)) details[key] = entry;
257
+ continue;
258
+ }
259
+ if (typeof entry === "boolean") {
260
+ details[key] = entry;
261
+ continue;
262
+ }
263
+ if (entry === null) details[key] = null;
264
+ }
265
+ return Object.keys(details).length > 0 ? details : null;
266
+ }
267
+ function normalizeToolExecutionFailure(value) {
268
+ if (!isRecord(value) || value.schemaVersion !== TOOL_EXECUTION_ERROR_SCHEMA_VERSION) {
269
+ return null;
270
+ }
271
+ const toolId = boundedString(value.toolId);
272
+ if (!toolId) return null;
273
+ const provider = boundedString(value.provider);
274
+ const operation = boundedString(value.operation);
275
+ const origin = normalizeToolExecutionOrigin(value.origin, {
276
+ provider,
277
+ operation
278
+ });
279
+ const category = normalizeToolExecutionCategory(value.category);
280
+ const publicDetails = normalizeToolExecutionPublicDetails(value.publicDetails);
281
+ const trustworthy = origin !== "unknown" && category !== "unknown" && typeof value.retryable === "boolean";
282
+ return {
283
+ schemaVersion: TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
284
+ toolId,
285
+ provider,
286
+ operation,
287
+ code: boundedString(value.code, MAX_CODE_LENGTH),
288
+ origin,
289
+ category,
290
+ retryable: trustworthy ? value.retryable === true : false,
291
+ statusCode: finiteNonNegativeInteger(value.statusCode),
292
+ requestId: boundedString(value.requestId),
293
+ retryAfterMs: finiteNonNegativeInteger(value.retryAfterMs),
294
+ networkKind: normalizeNetworkKind(value.networkKind),
295
+ networkScope: normalizeNetworkScope(value.networkScope),
296
+ ...publicDetails ? { publicDetails } : {}
297
+ };
298
+ }
299
+ function serializeToolExecutionFailure(error) {
300
+ if (!(error instanceof ToolExecutionError)) return null;
301
+ return normalizeToolExecutionFailure({
302
+ schemaVersion: TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
303
+ toolId: error.toolId,
304
+ provider: error.provider,
305
+ operation: error.operation,
306
+ code: error.code ?? null,
307
+ origin: error.origin,
308
+ category: error.category,
309
+ retryable: error.retryable,
310
+ statusCode: error.statusCode ?? null,
311
+ requestId: error.requestId,
312
+ retryAfterMs: error.retryAfterMs,
313
+ networkKind: error.networkKind,
314
+ networkScope: error.networkScope,
315
+ publicDetails: error.publicDetails
316
+ });
317
+ }
318
+ function deserializeToolExecutionFailure(message, value, acceptedSchemaVersion) {
319
+ if (acceptedSchemaVersion === LEGACY_TOOL_EXECUTION_ERROR_SCHEMA_VERSION) {
320
+ return null;
321
+ }
322
+ const failure = normalizeToolExecutionFailure(value);
323
+ if (!failure) return null;
324
+ if (isProviderTransientFailure(failure)) {
325
+ return new ProviderTransientError(message, failure);
326
+ }
327
+ return new ToolExecutionError(message, failure);
328
+ }
329
+
330
+ export {
331
+ TOOL_EXECUTION_ERROR_SCHEMA_VERSION,
332
+ TOOL_EXECUTION_ERROR_SCHEMA_HEADER,
333
+ DeeplineError,
334
+ ToolExecutionError,
335
+ brandAsToolExecutionError,
336
+ isProviderTransientFailure,
337
+ ProviderTransientError,
338
+ getProviderUnavailableReason,
339
+ isProviderUnavailable,
340
+ isProviderWaterfallUnavailableError,
341
+ brandAsProviderTransientError,
342
+ serializeToolExecutionFailure,
343
+ deserializeToolExecutionFailure
344
+ };
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../plays/artifact-contract-version.ts
2
+ var CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION = 2;
3
+
4
+
5
+
6
+ exports.CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION = CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION;
@@ -0,0 +1,103 @@
1
+ // ../plays/bootstrap-routes.ts
2
+ var DEEPLINE_TOOL_CATEGORIES = [
3
+ "company_search",
4
+ "people_search",
5
+ "people_enrich",
6
+ "email_finder",
7
+ "email_verify",
8
+ "phone_finder",
9
+ "phone_verify",
10
+ "identity_resolution",
11
+ "reverse_lookup",
12
+ "enrichment",
13
+ "batch",
14
+ "premium",
15
+ "free"
16
+ ];
17
+ var PLAY_BOOTSTRAP_TEMPLATES = [
18
+ "people-list",
19
+ "company-list",
20
+ "people-email",
21
+ "people-phone",
22
+ "company-people",
23
+ "company-people-email",
24
+ "company-people-phone"
25
+ ];
26
+ var PLAY_BOOTSTRAP_SOURCE_KINDS = [
27
+ "csv",
28
+ "play",
29
+ "provider",
30
+ "providers"
31
+ ];
32
+ var PLAY_BOOTSTRAP_STAGE_KINDS = [
33
+ "play",
34
+ "provider",
35
+ "providers"
36
+ ];
37
+ var PLAY_BOOTSTRAP_FINDER_KINDS = [
38
+ "email_finder",
39
+ "phone_finder"
40
+ ];
41
+ var PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY = "company_search";
42
+ var PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY = "people_search";
43
+ var PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER = {
44
+ email_finder: "email_finder",
45
+ phone_finder: "phone_finder"
46
+ };
47
+ var PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER = {
48
+ email_finder: "email",
49
+ phone_finder: "phone"
50
+ };
51
+ var PLAY_BOOTSTRAP_CONTACT_FIELDS = [
52
+ "first_name",
53
+ "last_name",
54
+ "domain",
55
+ "company_name",
56
+ "linkedin_url",
57
+ "title",
58
+ "email",
59
+ "phone"
60
+ ];
61
+ var PLAY_BOOTSTRAP_COMPANY_FIELDS = [
62
+ "domain",
63
+ "company_domain",
64
+ "company_name",
65
+ "linkedin_url",
66
+ "website"
67
+ ];
68
+ function isPlayBootstrapFinderKind(value) {
69
+ return PLAY_BOOTSTRAP_FINDER_KINDS.includes(value);
70
+ }
71
+ function isPlayBootstrapTemplate(value) {
72
+ return PLAY_BOOTSTRAP_TEMPLATES.includes(value);
73
+ }
74
+ function formatPlayBootstrapFinderKinds() {
75
+ return PLAY_BOOTSTRAP_FINDER_KINDS.join("|");
76
+ }
77
+ function formatPlayBootstrapTemplates() {
78
+ return PLAY_BOOTSTRAP_TEMPLATES.join("|");
79
+ }
80
+ function formatPlayBootstrapFinderKindsForSentence() {
81
+ const allButLast = PLAY_BOOTSTRAP_FINDER_KINDS.slice(0, -1);
82
+ const last = PLAY_BOOTSTRAP_FINDER_KINDS.at(-1);
83
+ return `${allButLast.join(", ")} or ${last}`;
84
+ }
85
+
86
+ export {
87
+ DEEPLINE_TOOL_CATEGORIES,
88
+ PLAY_BOOTSTRAP_TEMPLATES,
89
+ PLAY_BOOTSTRAP_SOURCE_KINDS,
90
+ PLAY_BOOTSTRAP_STAGE_KINDS,
91
+ PLAY_BOOTSTRAP_FINDER_KINDS,
92
+ PLAY_BOOTSTRAP_COMPANY_PROVIDER_CATEGORY,
93
+ PLAY_BOOTSTRAP_PEOPLE_PROVIDER_CATEGORY,
94
+ PLAY_BOOTSTRAP_PROVIDER_CATEGORY_BY_FINDER,
95
+ PLAY_BOOTSTRAP_OUTPUT_FIELD_BY_FINDER,
96
+ PLAY_BOOTSTRAP_CONTACT_FIELDS,
97
+ PLAY_BOOTSTRAP_COMPANY_FIELDS,
98
+ isPlayBootstrapFinderKind,
99
+ isPlayBootstrapTemplate,
100
+ formatPlayBootstrapFinderKinds,
101
+ formatPlayBootstrapTemplates,
102
+ formatPlayBootstrapFinderKindsForSentence
103
+ };
@@ -0,0 +1,190 @@
1
+ import {
2
+ CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION
3
+ } from "./chunk-WZYKRD7T.mjs";
4
+
5
+ // src/release.ts
6
+ var SDK_RELEASE = {
7
+ // 0.1.94 is claimed by PR #1527 — this watch-render fix ships as 0.1.95.
8
+ // 0.1.98 ships the duplicate-browser-tab fix (default-browser detection).
9
+ // 0.1.99 ships prebuilt job-change source-column preservation and validation fixes.
10
+ // 0.1.101 ships retryable play artifact publish failures and CI retry hardening.
11
+ // 0.1.102 ships the job-change ledger fixes: recovered-dataset export on
12
+ // failed runs, persisted/succeeded/failed row counts, strict local CSV
13
+ // preflight (existence, data rows, quotes, duplicate headers), HTML error
14
+ // scrubbing, and word-boundary watch truncation.
15
+ // 0.1.103 ships the refined SDK CLI command surface.
16
+ // 0.1.104 shipped the retired Postgres scheduler suspension/billing parity and runtime worker hardening.
17
+ // 0.1.105 ships the billing catalog surface: billing plans, subscribe,
18
+ // subscription status/cancel, invoices, and the client.billing namespace.
19
+ // 0.1.106 ships play cell provenance metadata and v2 preview retry hardening.
20
+ // 0.1.107 ships the v2 quickstart command, the deepline-plays-quickstart
21
+ // skill on the sdk sync surface, and the people-search-to-email prebuilt.
22
+ // 0.1.108 ships explicit dataset column/tool recompute policy and removes
23
+ // the SDK enrich generator's one-second stale policy.
24
+ // 0.1.110 ships authored V2 prebuilts and required top-level play descriptions.
25
+ // 0.1.111 ships dataset-native tool list getters and result row datasets.
26
+ // 0.1.154 removes the short-lived generated enrich StepOptions recompute
27
+ // fields shipped in 0.1.153.
28
+ // 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
29
+ // 0.1.230 propagates enrich extractor failures as failed rows rather than
30
+ // silently materializing them as unmatched results.
31
+ // 0.1.220 deprecates SDK CLI versions below 0.1.219 and updates them
32
+ // automatically without blocking their current command.
33
+ // 0.1.241 hard-cuts published and launched plays to immutable cjs_node20
34
+ // artifacts. Older clients can submit esm_workers artifacts that the Absurd
35
+ // runtime intentionally no longer compiles at publish or launch time.
36
+ // 0.1.242 removes the retired Workers/ESM compiler, generated bundles, and
37
+ // deploy-time artifact migration. Play authoring now has one CJS contract.
38
+ // 0.1.252 hard-cuts the customer Monitor catalog to the two launched
39
+ // Deepline-native radars. Older clients must update before discovering,
40
+ // checking, or deploying an unlaunched monitor integration.
41
+ // 0.1.253 makes play-page browser opening opt-in and retires --no-open.
42
+ // 0.1.254 removes the internal operations tree from the published SDK CLI.
43
+ // Operators use the checkout-local deepline-admin binary instead.
44
+ // 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
45
+ // exposed storage-dependent synchronous access. This deliberate minor
46
+ // release keeps lazy paging semantics independent of row residency.
47
+ // 0.3.0 introduces raw-v2: complete scrubbed provider responses are
48
+ // available at toolResponse.rawV2 while toolResponse.raw and all declared
49
+ // getters keep their established compatibility behavior.
50
+ // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
+ // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
+ version: "0.3.296",
53
+ updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
54
+ packageCapabilities: {
55
+ updatePreferences: 1
56
+ },
57
+ contracts: {
58
+ api: {
59
+ name: "sdk-http-api",
60
+ // Concise Play grep has the current wire id. Older ids follow the
61
+ // standard API support window.
62
+ currentMajor: 3,
63
+ supportedMajors: [3, 2],
64
+ // Older ids remain subject to the API support window.
65
+ legacyWireIds: [
66
+ "2026-09-play-grep-concise-results",
67
+ "2026-07-admin-cli-local-cutover",
68
+ "2026-07-native-monitor-launch-hard-cutover"
69
+ ]
70
+ },
71
+ playArtifact: {
72
+ name: "play-artifact-runtime",
73
+ currentVersion: CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION,
74
+ supportedVersions: [1, CURRENT_PLAY_ARTIFACT_CONTRACT_VERSION]
75
+ },
76
+ release: {
77
+ name: "production-sdk-release",
78
+ publishFrom: "latest-successful-production-deployment",
79
+ coalesce: "latest-healthy"
80
+ }
81
+ },
82
+ supportPolicy: {
83
+ minimumSupported: "0.1.53",
84
+ deprecatedBelow: "0.3.1",
85
+ commandIntroducedIn: [
86
+ {
87
+ command: "search",
88
+ introducedIn: "0.3.91",
89
+ reason: "deepline search was added in SDK CLI 0.3.91 as the one search across tools, monitors, and plays. On an older version run deepline tools search or deepline plays search, or update."
90
+ },
91
+ {
92
+ command: "notifications",
93
+ introducedIn: "0.2.40",
94
+ reason: "deepline notifications was added in SDK CLI 0.2.40. Older versions have no way to configure a Play failure alert, so a cron Play that dies reports to nobody."
95
+ }
96
+ ],
97
+ commandMinimumSupported: [
98
+ {
99
+ command: "enrich",
100
+ // Compatibility window through 2026-08-22 (owner: Chirag): versions
101
+ // 0.1.238-0.1.252 differ only in local browser-opening behavior and
102
+ // already contain the enrich data-correctness fixes below.
103
+ minimumSupported: "0.1.238",
104
+ reason: 'Older SDK CLI enrich generated stale play source; SDK CLI enrich 0.1.153 generated removed StepOptions fields in play source; SDK CLI enrich before 0.1.175 could silently succeed on the empty-waterfall bug when a requested waterfall returned no values for selected rows; SDK CLI enrich before 0.1.230 could convert extractor failures into successful unmatched results; SDK CLI enrich before 0.1.238 could drop a nested provider email match during generic pick("email") extraction and materialize it as NO_MATCH.'
105
+ },
106
+ {
107
+ command: "plays",
108
+ minimumSupported: "0.1.241",
109
+ reason: "Older SDK CLI versions predate dataset-native Play results and can emit the retired esm_workers artifact contract. Update before checking, publishing, or running plays."
110
+ },
111
+ {
112
+ command: "plays run",
113
+ minimumSupported: "0.1.253",
114
+ reason: "Older SDK CLI versions predate dataset-native Play results and can emit the retired esm_workers artifact contract; versions before 0.1.253 open the play page by default and accept the removed --no-open flag."
115
+ },
116
+ {
117
+ command: "run",
118
+ displayCommand: "plays run",
119
+ minimumSupported: "0.1.253",
120
+ reason: "Older SDK CLI versions predate dataset-native Play results and can emit the retired esm_workers artifact contract; versions before 0.1.253 open the play page by default and accept the removed --no-open flag."
121
+ },
122
+ {
123
+ command: "plays check",
124
+ minimumSupported: "0.1.241",
125
+ reason: "Older SDK CLI versions predate dataset-native Play authoring and validate against the retired esm_workers artifact contract."
126
+ },
127
+ {
128
+ command: "check",
129
+ displayCommand: "plays check",
130
+ minimumSupported: "0.1.241",
131
+ reason: "Older SDK CLI versions predate dataset-native Play authoring and validate against the retired esm_workers artifact contract."
132
+ },
133
+ {
134
+ command: "plays publish",
135
+ minimumSupported: "0.1.241",
136
+ reason: "Older SDK CLI versions predate dataset-native Play artifacts and can publish the retired esm_workers artifact contract."
137
+ },
138
+ {
139
+ command: "publish",
140
+ displayCommand: "plays publish",
141
+ minimumSupported: "0.1.241",
142
+ reason: "Older SDK CLI versions predate dataset-native Play artifacts and can publish the retired esm_workers artifact contract."
143
+ },
144
+ {
145
+ command: "plays set-live",
146
+ minimumSupported: "0.1.241",
147
+ reason: "Older SDK CLI versions predate dataset-native Play artifacts and can publish the retired esm_workers artifact contract."
148
+ },
149
+ {
150
+ command: "set-live",
151
+ displayCommand: "plays set-live",
152
+ minimumSupported: "0.1.241",
153
+ reason: "Older SDK CLI versions predate dataset-native Play artifacts and can publish the retired esm_workers artifact contract."
154
+ },
155
+ {
156
+ command: "runs",
157
+ minimumSupported: "0.1.111",
158
+ reason: "Run result rows now render as dataset handles with explicit export commands."
159
+ },
160
+ {
161
+ command: "runs get",
162
+ minimumSupported: "0.1.111",
163
+ reason: "Run result rows now render as dataset handles with explicit export commands."
164
+ },
165
+ {
166
+ command: "get",
167
+ displayCommand: "runs get",
168
+ minimumSupported: "0.1.111",
169
+ reason: "Run result rows now render as dataset handles with explicit export commands."
170
+ },
171
+ {
172
+ command: "runs export",
173
+ minimumSupported: "0.1.111",
174
+ reason: "Run result row datasets now use the dataset-handle export contract."
175
+ },
176
+ {
177
+ command: "export",
178
+ displayCommand: "runs export",
179
+ minimumSupported: "0.1.111",
180
+ reason: "Run result row datasets now use the dataset-handle export contract."
181
+ }
182
+ ],
183
+ directToolsCompatibilityVersions: ["0.1.171"],
184
+ autoUpdatePatchLag: 2
185
+ }
186
+ };
187
+
188
+ export {
189
+ SDK_RELEASE
190
+ };