deepline 0.3.395 → 0.3.397

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 (126) hide show
  1. package/dist/bundling-sources/sdk/src/plays/play-description.ts +1 -1
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +1 -1
  4. package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +2 -2
  5. package/dist/cli/{auth-NMQXZRS7.mjs → auth-AZJFXGKP.mjs} +5 -4
  6. package/dist/cli/auth-CZJQU7B5.js +40 -0
  7. package/dist/cli/{billing-Z4JTGUU3.js → billing-MQV5AGDJ.js} +77 -76
  8. package/dist/cli/{billing-5MVXZRS6.mjs → billing-MZAAUHGH.mjs} +6 -5
  9. package/dist/cli/{chunk-6D7A2FSL.mjs → chunk-2LDADJNO.mjs} +7 -107
  10. package/dist/cli/{chunk-UKU6JM3S.js → chunk-3VP34TAU.js} +8 -8
  11. package/dist/cli/{chunk-7XAM7KDW.mjs → chunk-4D745XZO.mjs} +21 -108
  12. package/dist/cli/chunk-7DRPTGCK.js +930 -0
  13. package/dist/cli/{chunk-ZMVJSS6N.js → chunk-BQR6UN3C.js} +62 -78
  14. package/dist/cli/{chunk-HRWUQJ4K.js → chunk-DQ65ZVHN.js} +6 -6
  15. package/dist/cli/{chunk-5VCZ3WRH.mjs → chunk-EIMG75BT.mjs} +1 -0
  16. package/dist/cli/{chunk-EFLQHJZ6.mjs → chunk-F3BUFYKE.mjs} +182 -1031
  17. package/dist/cli/chunk-FIVKWNMT.mjs +210 -0
  18. package/dist/cli/{describe-DBRY5BNK.mjs → chunk-HFYQBC2D.mjs} +51 -171
  19. package/dist/cli/chunk-HGFFYVXN.js +210 -0
  20. package/dist/cli/{chunk-VB6KECLU.mjs → chunk-IHG7UAHD.mjs} +63 -79
  21. package/dist/cli/{chunk-TO2MWPGR.js → chunk-IZ74ABSX.js} +1 -1
  22. package/dist/cli/{chunk-G4IWGRMK.mjs → chunk-J7ABTQQ7.mjs} +5 -3
  23. package/dist/cli/{chunk-LZLBR2SF.js → chunk-K33MXVXQ.js} +323 -1172
  24. package/dist/cli/{chunk-DRM3CMHL.js → chunk-KXMNM4AQ.js} +2 -1
  25. package/dist/cli/chunk-LJ5747UC.mjs +107 -0
  26. package/dist/cli/{chunk-BON3DRC6.mjs → chunk-MRXMMERY.mjs} +1 -1
  27. package/dist/cli/{chunk-7MVWUXOD.mjs → chunk-MV7QRALK.mjs} +3 -3
  28. package/dist/cli/{chunk-WCCKMLHL.mjs → chunk-MYPH2LUU.mjs} +2 -2
  29. package/dist/cli/{chunk-RDXFGPJU.js → chunk-NA4T3B62.js} +64 -272
  30. package/dist/cli/{chunk-BLYL3KOC.mjs → chunk-NOX2TCBP.mjs} +1 -1
  31. package/dist/cli/chunk-OSDXE27V.mjs +88 -0
  32. package/dist/cli/{chunk-R4XZO6Z5.js → chunk-PSGEDGLT.js} +28 -115
  33. package/dist/cli/chunk-Q2E4E4FJ.js +112 -0
  34. package/dist/cli/chunk-RFG3MRAC.js +286 -0
  35. package/dist/cli/{chunk-47M6HPGP.mjs → chunk-RNSWDKBM.mjs} +1 -1
  36. package/dist/cli/{chunk-56IFFVIB.js → chunk-RYW4HPSM.js} +21 -121
  37. package/dist/cli/{chunk-K5T3EN6D.js → chunk-SO7RUVTY.js} +26 -26
  38. package/dist/cli/{chunk-KZZC33PY.mjs → chunk-TXZVVBQZ.mjs} +63 -271
  39. package/dist/cli/{chunk-36ML3YKA.js → chunk-UVXBVUZQ.js} +15 -13
  40. package/dist/cli/{chunk-PZ5BZ76S.js → chunk-VTF4RRWJ.js} +50 -50
  41. package/dist/cli/{chunk-3TRY7KAC.mjs → chunk-W3HMGKMI.mjs} +2 -2
  42. package/dist/cli/{chunk-ZWH2TFA7.mjs → chunk-WM2QEHZL.mjs} +2 -2
  43. package/dist/cli/chunk-YHPYUZZX.mjs +112 -0
  44. package/dist/cli/chunk-YHZUZO3U.mjs +930 -0
  45. package/dist/cli/{chunk-UCXK2DS4.js → chunk-YLRME7MK.js} +15 -15
  46. package/dist/cli/{chunk-MYIBHORT.js → chunk-YSVORIEW.js} +2 -2
  47. package/dist/cli/{chunk-OCSG6X67.mjs → chunk-YUDKBQUD.mjs} +4 -4
  48. package/dist/cli/chunk-ZAAKSJAS.js +88 -0
  49. package/dist/cli/{chunk-VYLJJQ7Y.js → chunk-ZHUMDMOS.js} +65 -65
  50. package/dist/cli/chunk-ZM2YPJQJ.js +107 -0
  51. package/dist/cli/{csv-HTS5ZYQ4.js → csv-AQBQ5O3I.js} +13 -12
  52. package/dist/cli/{csv-SVOD5UBH.mjs → csv-MB7PJMYQ.mjs} +4 -3
  53. package/dist/cli/{db-7AP4P52N.js → db-JPUYC5RB.js} +31 -30
  54. package/dist/cli/{db-7QLNI3Q4.mjs → db-L5IEI2AU.mjs} +6 -5
  55. package/dist/cli/describe-6WT74AOR.js +164 -0
  56. package/dist/cli/describe-S6BFANVI.mjs +164 -0
  57. package/dist/cli/describe-core.d.mts +100 -0
  58. package/dist/cli/describe-core.d.ts +100 -0
  59. package/dist/cli/describe-core.js +18 -0
  60. package/dist/cli/describe-core.mjs +18 -0
  61. package/dist/cli/{executions-GRQXTB2P.js → executions-6TMQTFP4.js} +8 -7
  62. package/dist/cli/{executions-QNZTPNG4.mjs → executions-L7I2ZW4Z.mjs} +6 -5
  63. package/dist/cli/{feedback-JMCSR624.mjs → feedback-DSJ63HK6.mjs} +4 -3
  64. package/dist/cli/{feedback-ZOLA2KY7.js → feedback-XF7CQGMD.js} +8 -7
  65. package/dist/cli/{git-LJGL2IHS.mjs → git-C3ENM67D.mjs} +5 -4
  66. package/dist/cli/git-HYDZK2QR.js +24 -0
  67. package/dist/cli/index.js +96 -94
  68. package/dist/cli/index.mjs +41 -39
  69. package/dist/cli/{legacy-noops-YSCIR2SD.js → legacy-noops-B2NHWIVD.js} +8 -7
  70. package/dist/cli/{legacy-noops-F23PKVBN.mjs → legacy-noops-VFG2K6HK.mjs} +5 -4
  71. package/dist/cli/{monitors-WMZ6HJZX.js → monitors-ORFWOVZB.js} +87 -86
  72. package/dist/cli/{monitors-S4LOEL7W.mjs → monitors-TCEDBDGY.mjs} +6 -5
  73. package/dist/cli/{org-U3WA2NQM.mjs → org-45KREIKZ.mjs} +6 -5
  74. package/dist/cli/{org-PFHM5ZLY.js → org-T74CJESN.js} +66 -65
  75. package/dist/cli/{chunk-XMAPE2KH.mjs → play-MU7MYBIM.mjs} +78 -131
  76. package/dist/cli/{chunk-4KLCLLTO.js → play-XHK2LPON.js} +273 -326
  77. package/dist/cli/{providers-XYMHLKCA.js → providers-4MGQKYFD.js} +9 -8
  78. package/dist/cli/{providers-QBBRFBOH.mjs → providers-VYCXIJT5.mjs} +6 -5
  79. package/dist/cli/{quickstart-IYGD6ZY3.js → quickstart-47G3VEOT.js} +6 -5
  80. package/dist/cli/{quickstart-5JTDGISY.mjs → quickstart-H724EFM2.mjs} +4 -3
  81. package/dist/cli/search-3356ENLD.js +30 -0
  82. package/dist/cli/{search-X6W6GRHS.mjs → search-VQHXEFQ4.mjs} +8 -6
  83. package/dist/cli/{secrets-UHG6OQFD.js → secrets-ALLKCU35.js} +15 -14
  84. package/dist/cli/{secrets-N55B67H6.mjs → secrets-CPBNGA44.mjs} +6 -5
  85. package/dist/cli/{sessions-JTRSTDSS.mjs → sessions-7RSQB7IX.mjs} +5 -4
  86. package/dist/cli/sessions-FKGAY7WQ.js +16 -0
  87. package/dist/cli/{settings-Q24HRAQI.mjs → settings-UYSGV4IC.mjs} +9 -8
  88. package/dist/cli/{settings-ATX4U5AS.js → settings-Y5BI42P7.js} +76 -75
  89. package/dist/cli/{setup-77ZWLVHT.mjs → setup-L3ZBBTS4.mjs} +7 -6
  90. package/dist/cli/{setup-EJCNOUCE.js → setup-VXQPEU3E.js} +42 -41
  91. package/dist/cli/skills-DUZQTDTE.js +29 -0
  92. package/dist/cli/{skills-XIS5AWQI.mjs → skills-QHVDLSFE.mjs} +5 -4
  93. package/dist/cli/{tools-WCKLYEGQ.mjs → tools-LSCEK4K2.mjs} +16 -19
  94. package/dist/cli/tools-YWU5QOQ5.js +39 -0
  95. package/dist/cli/update-5LYQAI55.js +29 -0
  96. package/dist/cli/{update-UT5WANMV.mjs → update-CU22OTBM.mjs} +7 -6
  97. package/dist/cli/{workflow-226QYUN2.js → workflow-ERFLTRNX.js} +17 -16
  98. package/dist/cli/{workflow-ZMX3L4ML.mjs → workflow-KQARK5BZ.mjs} +7 -6
  99. package/dist/{client-hdFtwhTm.d.mts → client-D0j-_aaa.d.mts} +2 -1
  100. package/dist/{client-CivP-PAI.d.ts → client-DflfVyj6.d.ts} +2 -1
  101. package/dist/index.d.mts +2 -2
  102. package/dist/index.d.ts +2 -2
  103. package/dist/index.js +15 -11
  104. package/dist/index.mjs +19 -15
  105. package/dist/install-integrity.json +94 -80
  106. package/dist/plays/play-description.d.mts +1 -1
  107. package/dist/plays/play-description.d.ts +1 -1
  108. package/dist/plays/play-description.js +4 -2
  109. package/dist/plays/play-description.mjs +3 -1
  110. package/dist/plays/run-request.d.mts +1 -1
  111. package/dist/plays/run-request.d.ts +1 -1
  112. package/dist/release.d.mts +1 -1
  113. package/dist/release.d.ts +1 -1
  114. package/dist/release.js +2 -2
  115. package/dist/release.mjs +1 -1
  116. package/package.json +6 -1
  117. package/dist/cli/auth-UYCOBAL5.js +0 -39
  118. package/dist/cli/describe-YKOE54ZO.js +0 -406
  119. package/dist/cli/git-EJQLRK27.js +0 -23
  120. package/dist/cli/play-AGSECQFN.mjs +0 -159
  121. package/dist/cli/play-BR2LWGXK.js +0 -159
  122. package/dist/cli/search-ZVSYH5GY.js +0 -28
  123. package/dist/cli/sessions-57L5MGHN.js +0 -15
  124. package/dist/cli/skills-SPXUBLII.js +0 -28
  125. package/dist/cli/tools-DBHUUZJX.js +0 -42
  126. package/dist/cli/update-VSNFXRHJ.js +0 -28
@@ -1,3 +1,65 @@
1
+ // ../plays/extractor-targets.ts
2
+ var JOB_CHANGE_STATUS_VALUES = [
3
+ "moved",
4
+ "no_change",
5
+ "left_company",
6
+ "unknown",
7
+ "profile_unavailable",
8
+ "no_new_company"
9
+ ];
10
+ var JOB_CHANGE_JSON_SCHEMA = {
11
+ type: "object",
12
+ required: ["status", "date", "new_company", "new_title"],
13
+ properties: {
14
+ status: { type: "string", enum: JOB_CHANGE_STATUS_VALUES },
15
+ date: { type: ["string", "null"] },
16
+ new_company: { type: ["string", "null"] },
17
+ new_title: { type: ["string", "null"] }
18
+ }
19
+ };
20
+ var PHONE_STATUS_VALUES = ["valid", "invalid", "unknown"];
21
+ var DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = {
22
+ id: { identity: true, valueKind: "string" },
23
+ name: { identity: true, valueKind: "string" },
24
+ email: { identity: true, valueKind: "string" },
25
+ personal_email: { identity: true, valueKind: "string" },
26
+ phone: { identity: true, valueKind: "string" },
27
+ linkedin: { identity: true, valueKind: "string" },
28
+ linkedin_url: { identity: true, valueKind: "string" },
29
+ domain: { identity: true, valueKind: "string" },
30
+ website: { identity: true, valueKind: "string" },
31
+ first_name: { identity: true, valueKind: "string" },
32
+ last_name: { identity: true, valueKind: "string" },
33
+ full_name: { identity: true, valueKind: "string" },
34
+ company: { identity: true, valueKind: "string" },
35
+ company_name: { identity: true, valueKind: "string" },
36
+ organization_name: { identity: true, valueKind: "string" },
37
+ company_domain: { identity: true, valueKind: "string" },
38
+ company_website: { identity: true, valueKind: "string" },
39
+ company_linkedin_url: { identity: true, valueKind: "string" },
40
+ title: { identity: false, valueKind: "string" },
41
+ industry: { identity: false, valueKind: "string" },
42
+ status: { identity: false, valueKind: "string" },
43
+ job_change: { identity: false, valueKind: "job_change" },
44
+ job_change_status: {
45
+ identity: false,
46
+ valueKind: "job_change_status",
47
+ enum: JOB_CHANGE_STATUS_VALUES
48
+ },
49
+ email_status: { identity: false, valueKind: "email_status" },
50
+ phone_status: {
51
+ identity: false,
52
+ valueKind: "phone_status",
53
+ enum: PHONE_STATUS_VALUES
54
+ }
55
+ };
56
+ var DEEPLINE_EXTRACTOR_TARGETS = Object.keys(
57
+ DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS
58
+ );
59
+ function isDeeplineExtractorTarget(value) {
60
+ return value in DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS;
61
+ }
62
+
1
63
  // ../plays/email-status.ts
2
64
  var nullable = (type) => ({ type: [type, "null"] });
3
65
  var oneOf = (values) => ({ type: "string", enum: values });
@@ -212,271 +274,6 @@ function buildEmailStatus({
212
274
  };
213
275
  }
214
276
 
215
- // ../plays/extractor-targets.ts
216
- var JOB_CHANGE_STATUS_VALUES = [
217
- "moved",
218
- "no_change",
219
- "left_company",
220
- "unknown",
221
- "profile_unavailable",
222
- "no_new_company"
223
- ];
224
- var JOB_CHANGE_JSON_SCHEMA = {
225
- type: "object",
226
- required: ["status", "date", "new_company", "new_title"],
227
- properties: {
228
- status: { type: "string", enum: JOB_CHANGE_STATUS_VALUES },
229
- date: { type: ["string", "null"] },
230
- new_company: { type: ["string", "null"] },
231
- new_title: { type: ["string", "null"] }
232
- }
233
- };
234
- var PHONE_STATUS_VALUES = ["valid", "invalid", "unknown"];
235
- var DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS = {
236
- id: { identity: true, valueKind: "string" },
237
- name: { identity: true, valueKind: "string" },
238
- email: { identity: true, valueKind: "string" },
239
- personal_email: { identity: true, valueKind: "string" },
240
- phone: { identity: true, valueKind: "string" },
241
- linkedin: { identity: true, valueKind: "string" },
242
- linkedin_url: { identity: true, valueKind: "string" },
243
- domain: { identity: true, valueKind: "string" },
244
- website: { identity: true, valueKind: "string" },
245
- first_name: { identity: true, valueKind: "string" },
246
- last_name: { identity: true, valueKind: "string" },
247
- full_name: { identity: true, valueKind: "string" },
248
- company: { identity: true, valueKind: "string" },
249
- company_name: { identity: true, valueKind: "string" },
250
- organization_name: { identity: true, valueKind: "string" },
251
- company_domain: { identity: true, valueKind: "string" },
252
- company_website: { identity: true, valueKind: "string" },
253
- company_linkedin_url: { identity: true, valueKind: "string" },
254
- title: { identity: false, valueKind: "string" },
255
- industry: { identity: false, valueKind: "string" },
256
- status: { identity: false, valueKind: "string" },
257
- job_change: { identity: false, valueKind: "job_change" },
258
- job_change_status: {
259
- identity: false,
260
- valueKind: "job_change_status",
261
- enum: JOB_CHANGE_STATUS_VALUES
262
- },
263
- email_status: { identity: false, valueKind: "email_status" },
264
- phone_status: {
265
- identity: false,
266
- valueKind: "phone_status",
267
- enum: PHONE_STATUS_VALUES
268
- }
269
- };
270
- var DEEPLINE_EXTRACTOR_TARGETS = Object.keys(
271
- DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS
272
- );
273
- function isDeeplineExtractorTarget(value) {
274
- return value in DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS;
275
- }
276
-
277
- // src/tool-output.ts
278
- import {
279
- closeSync,
280
- mkdirSync,
281
- openSync,
282
- writeFileSync,
283
- writeSync
284
- } from "fs";
285
- import { homedir } from "os";
286
- import { dirname, join } from "path";
287
- function isPlainObject(value) {
288
- return Boolean(value) && typeof value === "object" && !Array.isArray(value);
289
- }
290
- function getByDottedPath(root, dottedPath) {
291
- let current = root;
292
- for (const segment of String(dottedPath || "").split(".").filter(Boolean)) {
293
- if (!isPlainObject(current) || !(segment in current)) {
294
- return null;
295
- }
296
- current = current[segment];
297
- }
298
- return current;
299
- }
300
- function normalizeRows(value) {
301
- if (!Array.isArray(value)) return null;
302
- return value.map((entry) => {
303
- if (isPlainObject(entry)) return entry;
304
- return { value: entry };
305
- });
306
- }
307
- function columnsForRows(rows) {
308
- const seen = /* @__PURE__ */ new Set();
309
- const columns = [];
310
- for (const row of rows) {
311
- for (const key of Object.keys(row)) {
312
- if (!seen.has(key)) {
313
- seen.add(key);
314
- columns.push(key);
315
- }
316
- }
317
- }
318
- return columns;
319
- }
320
- function candidateRoots(payload) {
321
- const roots = [
322
- { path: null, value: payload }
323
- ];
324
- if (isPlainObject(payload) && isPlainObject(payload.toolResponse)) {
325
- roots.push({ path: "toolResponse", value: payload.toolResponse });
326
- if (Object.prototype.hasOwnProperty.call(payload.toolResponse, "raw")) {
327
- roots.push({
328
- path: "toolResponse.raw",
329
- value: payload.toolResponse.raw
330
- });
331
- }
332
- }
333
- if (isPlainObject(payload) && isPlainObject(payload.output)) {
334
- roots.push({ path: "output", value: payload.output });
335
- if (Object.prototype.hasOwnProperty.call(payload.output, "body")) {
336
- roots.push({ path: "output.body", value: payload.output.body });
337
- }
338
- }
339
- if (isPlainObject(payload) && isPlainObject(payload.result)) {
340
- roots.push({ path: "result", value: payload.result });
341
- if (isPlainObject(payload.result.data)) {
342
- roots.push({ path: "result.data", value: payload.result.data });
343
- }
344
- }
345
- return roots;
346
- }
347
- function findBestArrayCandidate(value, pathPrefix = "", depth = 0) {
348
- if (depth > 5) return null;
349
- const directRows = normalizeRows(value);
350
- const hasObjectRow = directRows?.some(
351
- (row) => Object.keys(row).some((key) => key !== "value")
352
- ) ?? false;
353
- let best = directRows && directRows.length > 0 && hasObjectRow ? { path: pathPrefix, rows: directRows } : null;
354
- if (!isPlainObject(value)) {
355
- return best;
356
- }
357
- for (const [key, child] of Object.entries(value)) {
358
- const childPath = pathPrefix ? `${pathPrefix}.${key}` : key;
359
- const candidate = findBestArrayCandidate(child, childPath, depth + 1);
360
- if (!candidate) continue;
361
- if (!best || candidate.rows.length > best.rows.length) {
362
- best = candidate;
363
- }
364
- }
365
- return best;
366
- }
367
- function tryConvertToList(payload, options) {
368
- const listExtractorPaths = Array.isArray(options?.listExtractorPaths) ? options?.listExtractorPaths.filter(
369
- (entry) => typeof entry === "string" && entry.trim().length > 0
370
- ) : [];
371
- if (listExtractorPaths.length > 0) {
372
- let emptyMatch = null;
373
- for (const root of candidateRoots(payload)) {
374
- for (const extractorPath of listExtractorPaths) {
375
- const resolved = getByDottedPath(root.value, extractorPath);
376
- const rows = normalizeRows(resolved);
377
- if (!rows) {
378
- continue;
379
- }
380
- const sourcePath = root.path ? `${root.path}.${extractorPath}` : extractorPath;
381
- if (rows.length > 0) {
382
- return { rows, strategy: "configured_paths", sourcePath };
383
- }
384
- emptyMatch ??= { rows, strategy: "configured_paths", sourcePath };
385
- }
386
- }
387
- if (emptyMatch) {
388
- return emptyMatch;
389
- }
390
- }
391
- const roots = candidateRoots(payload);
392
- const v2Raw = roots.find((root) => root.path === "toolResponse.raw");
393
- for (const root of v2Raw ? [v2Raw] : roots) {
394
- const candidate = findBestArrayCandidate(root.value, root.path ?? "");
395
- if (!candidate || candidate.rows.length === 0) continue;
396
- return {
397
- rows: candidate.rows,
398
- strategy: "auto_detected",
399
- sourcePath: candidate.path || root.path
400
- };
401
- }
402
- return null;
403
- }
404
- function projectRowOutput(conversion) {
405
- return {
406
- rows: conversion.rows,
407
- rowCount: conversion.rows.length,
408
- columns: columnsForRows(conversion.rows),
409
- previewRows: conversion.rows.slice(0, 5),
410
- strategy: conversion.strategy,
411
- sourcePath: conversion.sourcePath
412
- };
413
- }
414
- function ensureOutputDir() {
415
- const outputDir = join(homedir(), ".local", "share", "deepline", "data");
416
- mkdirSync(outputDir, { recursive: true });
417
- return outputDir;
418
- }
419
- function writeJsonOutputFile(payload, stem) {
420
- const outputDir = ensureOutputDir();
421
- const outputPath = join(outputDir, `${stem}_${Date.now()}.json`);
422
- writeFileSync(outputPath, JSON.stringify(payload, null, 2), "utf-8");
423
- return outputPath;
424
- }
425
- function writeCsvOutputFile(rows, stem, options) {
426
- const outputPath = options?.outPath ? options.outPath : join(ensureOutputDir(), `${stem}_${Date.now()}.csv`);
427
- mkdirSync(dirname(outputPath), { recursive: true });
428
- const columns = columnsForRows(rows);
429
- const escapeCell = (value) => {
430
- const normalized = value == null ? "" : typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value);
431
- if (/[",\n]/.test(normalized)) {
432
- return `"${normalized.replace(/"/g, '""')}"`;
433
- }
434
- return normalized;
435
- };
436
- const fd = openSync(outputPath, "w");
437
- try {
438
- writeSync(fd, `${columns.map(escapeCell).join(",")}
439
- `);
440
- for (const row of rows) {
441
- writeSync(
442
- fd,
443
- `${columns.map((column) => escapeCell(row[column])).join(",")}
444
- `
445
- );
446
- }
447
- } finally {
448
- closeSync(fd);
449
- }
450
- const previewRows = rows.slice(0, 5);
451
- const previewColumns = columns.slice(0, 5);
452
- const preview = [
453
- previewColumns.join(","),
454
- ...previewRows.map(
455
- (row) => previewColumns.map((column) => escapeCell(row[column])).join(",")
456
- )
457
- ].join("\n");
458
- return {
459
- path: outputPath,
460
- rowCount: rows.length,
461
- columns,
462
- preview
463
- };
464
- }
465
- function extractSummaryFields(payload) {
466
- const candidates = candidateRoots(payload);
467
- for (const candidate of candidates) {
468
- if (!isPlainObject(candidate.value)) continue;
469
- const summaryEntries = Object.entries(candidate.value).filter(
470
- ([, value]) => {
471
- return value == null || typeof value === "string" || typeof value === "number" || typeof value === "boolean";
472
- }
473
- );
474
- if (summaryEntries.length === 0) continue;
475
- return Object.fromEntries(summaryEntries);
476
- }
477
- return {};
478
- }
479
-
480
277
  export {
481
278
  EMAIL_STATUS_JSON_SCHEMA,
482
279
  buildEmailStatus,
@@ -485,10 +282,5 @@ export {
485
282
  PHONE_STATUS_VALUES,
486
283
  DEEPLINE_EXTRACTOR_TARGET_DEFINITIONS,
487
284
  DEEPLINE_EXTRACTOR_TARGETS,
488
- isDeeplineExtractorTarget,
489
- tryConvertToList,
490
- projectRowOutput,
491
- writeJsonOutputFile,
492
- writeCsvOutputFile,
493
- extractSummaryFields
285
+ isDeeplineExtractorTarget
494
286
  };
@@ -17,15 +17,17 @@ var _chunkUHNDVD3Pjs = require('./chunk-UHNDVD3P.js');
17
17
 
18
18
 
19
19
 
20
- var _chunkDRM3CMHLjs = require('./chunk-DRM3CMHL.js');
20
+ var _chunkKXMNM4AQjs = require('./chunk-KXMNM4AQ.js');
21
21
 
22
22
 
23
23
 
24
24
 
25
25
 
26
26
 
27
+ var _chunkRYW4HPSMjs = require('./chunk-RYW4HPSM.js');
27
28
 
28
- var _chunk56IFFVIBjs = require('./chunk-56IFFVIB.js');
29
+
30
+ var _chunkQ2E4E4FJjs = require('./chunk-Q2E4E4FJ.js');
29
31
 
30
32
 
31
33
 
@@ -138,7 +140,7 @@ async function queryCustomerDatabase(http, input) {
138
140
  if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _ => _.code, 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
139
141
  // lost connections and explicitly unknown transaction resolution.
140
142
  /^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
141
- throw new (0, _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError)(
143
+ throw new (0, _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError)(
142
144
  error,
143
145
  plan.request.body.operation_key
144
146
  );
@@ -146,7 +148,7 @@ async function queryCustomerDatabase(http, input) {
146
148
  throw error;
147
149
  }
148
150
  if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
149
- throw new (0, _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError)(
151
+ throw new (0, _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError)(
150
152
  new (0, _chunk7P5AA3SNjs.DeeplineError)(
151
153
  "The SQL response did not contain a valid result.",
152
154
  200,
@@ -157,7 +159,7 @@ async function queryCustomerDatabase(http, input) {
157
159
  }
158
160
  const operation = result.operation;
159
161
  if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
160
- throw new (0, _chunk56IFFVIBjs.CustomerDbQueryOutcomeUnknownError)(
162
+ throw new (0, _chunkQ2E4E4FJjs.CustomerDbQueryOutcomeUnknownError)(
161
163
  new (0, _chunk7P5AA3SNjs.DeeplineError)(
162
164
  "The server did not confirm the original atomic SQL operation.",
163
165
  200,
@@ -2887,8 +2889,8 @@ function runtimeSelectionHeaders(runtime, env) {
2887
2889
  }
2888
2890
  const receivers = _optionalChain([env, 'access', _97 => _97.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _98 => _98.trim, 'call', _99 => _99()]);
2889
2891
  return {
2890
- [_chunk56IFFVIBjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2891
- ...receivers ? { [_chunk56IFFVIBjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2892
+ [_chunkRYW4HPSMjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
2893
+ ...receivers ? { [_chunkRYW4HPSMjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
2892
2894
  };
2893
2895
  }
2894
2896
  function isolatedCiRuntimeEventReadHeaders(env) {
@@ -2904,7 +2906,7 @@ function isolatedCiRuntimeEventReadHeaders(env) {
2904
2906
  "RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
2905
2907
  );
2906
2908
  }
2907
- return { [_chunk56IFFVIBjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2909
+ return { [_chunkRYW4HPSMjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
2908
2910
  }
2909
2911
  function normalizeTestPolicyOverrides(value, source) {
2910
2912
  if (value && typeof value === "object" && !Array.isArray(value)) {
@@ -3195,9 +3197,9 @@ var DeeplineClient = (_class = class _DeeplineClient {
3195
3197
  * @throws {@link ConfigError} if no API key can be resolved from any source.
3196
3198
  */
3197
3199
  constructor(options) {
3198
- this.config = _chunk56IFFVIBjs.resolveConfig.call(void 0, options);
3200
+ this.config = _chunkRYW4HPSMjs.resolveConfig.call(void 0, options);
3199
3201
  this.environment = _nullishCoalesce(this.config.environment, () => ( process.env));
3200
- this.http = new (0, _chunk56IFFVIBjs.HttpClient)(this.config);
3202
+ this.http = new (0, _chunkRYW4HPSMjs.HttpClient)(this.config);
3201
3203
  this.toolCalls = new ToolCalls(
3202
3204
  this.http,
3203
3205
  this.config.timeout,
@@ -5250,7 +5252,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5250
5252
  }
5251
5253
  );
5252
5254
  const plays = (_nullishCoalesce(response.plays, () => ( []))).map(
5253
- (play) => _chunkDRM3CMHLjs.describePlayListItem.call(void 0, play, { ...options, pipeline: true })
5255
+ (play) => _chunkKXMNM4AQjs.describePlayListItem.call(void 0, play, { ...options, pipeline: true })
5254
5256
  );
5255
5257
  if (scope === "prebuilt") {
5256
5258
  return plays.filter(isPrebuiltPlayDescription);
@@ -5308,7 +5310,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5308
5310
  */
5309
5311
  async describePlay(name, options = {}) {
5310
5312
  if (options.pipeline) {
5311
- return _chunkDRM3CMHLjs.describePlayDetail.call(void 0,
5313
+ return _chunkKXMNM4AQjs.describePlayDetail.call(void 0,
5312
5314
  await this.getPlay(name, { guidance: true }),
5313
5315
  options
5314
5316
  );
@@ -5319,7 +5321,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
5319
5321
  ...options.compact ? { compact: "1" } : {}
5320
5322
  });
5321
5323
  const body = await this.http.get(`/api/v2/plays/${encodeURIComponent(name)}?${params.toString()}`);
5322
- return "description" in body ? body.description : _chunkDRM3CMHLjs.describePlayDetail.call(void 0, body, options);
5324
+ return "description" in body ? body.description : _chunkKXMNM4AQjs.describePlayDetail.call(void 0, body, options);
5323
5325
  }
5324
5326
  /**
5325
5327
  * Clear run history and durable sheet/result data for a play without deleting