deepline 0.3.343 → 0.3.344

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 (95) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +9 -1
  3. package/dist/bundling-sources/shared_libs/plays/csv-text-repair.ts +145 -0
  4. package/dist/cli/auth-6ABMIWQQ.js +31 -0
  5. package/dist/cli/{auth-IPOSX2NV.mjs → auth-KHHPB2DO.mjs} +4 -4
  6. package/dist/cli/{billing-ZZKX4IFS.js → billing-HAR4AJZT.js} +71 -71
  7. package/dist/cli/{billing-CWTZDAOC.mjs → billing-RLK734WE.mjs} +4 -4
  8. package/dist/cli/{chunk-DEDNTNXS.mjs → chunk-23D4YCM6.mjs} +1 -1
  9. package/dist/cli/{chunk-UJFBO6QV.mjs → chunk-2MSG6WCC.mjs} +2 -2
  10. package/dist/cli/{chunk-JGW7AR5N.js → chunk-475OQE7H.js} +2 -2
  11. package/dist/cli/{chunk-CVIAYYLR.mjs → chunk-4DIFNYJZ.mjs} +2 -2
  12. package/dist/cli/{chunk-ZQFYR6NT.mjs → chunk-BQYPKV4P.mjs} +6 -6
  13. package/dist/cli/{chunk-RB2ELEQ5.mjs → chunk-CIV43IXR.mjs} +4 -4
  14. package/dist/cli/{chunk-KLEZD6JX.mjs → chunk-CMK6UNJA.mjs} +5 -5
  15. package/dist/cli/{chunk-2Y2QZJBT.mjs → chunk-DRHVFFMJ.mjs} +94 -6
  16. package/dist/cli/{chunk-BCF43TLG.js → chunk-FHCBNR7M.js} +8 -8
  17. package/dist/cli/{chunk-LY33N2W6.mjs → chunk-GJYCHN2L.mjs} +2 -2
  18. package/dist/cli/{chunk-W6LB26RC.mjs → chunk-J5NN6XCF.mjs} +1 -1
  19. package/dist/cli/{chunk-63UBRDGC.js → chunk-J5P35NOT.js} +60 -60
  20. package/dist/cli/{chunk-ERFIHZXT.js → chunk-JXCEXXKW.js} +48 -48
  21. package/dist/cli/{chunk-RDXH4KXG.js → chunk-LELCMU5K.js} +26 -26
  22. package/dist/cli/{chunk-WBXTRZAX.mjs → chunk-M5FYGL42.mjs} +1 -1
  23. package/dist/cli/{chunk-JS7JVUZZ.js → chunk-MQIHCQ5Z.js} +8 -8
  24. package/dist/cli/{chunk-ZGIXGBKF.js → chunk-QO6T7ETF.js} +15 -15
  25. package/dist/cli/{chunk-GISYO3JA.mjs → chunk-QZMF7VDU.mjs} +3 -3
  26. package/dist/cli/{chunk-U5L6FIIL.mjs → chunk-RN7NIZIL.mjs} +1 -1
  27. package/dist/cli/{chunk-AUB3AW3P.js → chunk-SJIF45BK.js} +4 -4
  28. package/dist/cli/{chunk-FM36CTMM.js → chunk-TYPYDSNY.js} +9 -9
  29. package/dist/cli/{chunk-ELZ4HEPQ.js → chunk-UWV3BA43.js} +225 -225
  30. package/dist/cli/{chunk-IPEE3DIV.js → chunk-VL5IYXS3.js} +112 -24
  31. package/dist/cli/{chunk-QV2WIEUP.mjs → chunk-XRZUDK6O.mjs} +2 -2
  32. package/dist/cli/{chunk-FSNKEEBA.js → chunk-Y6PJVWDY.js} +1 -1
  33. package/dist/cli/{chunk-XOX3Y5OP.js → chunk-ZUHK5OX3.js} +45 -45
  34. package/dist/cli/{client-7ZUYHDCL.mjs → client-JWDU663V.mjs} +3 -3
  35. package/dist/cli/client-KETSZR46.js +20 -0
  36. package/dist/cli/{csv-7BL43EOB.js → csv-7AW5GZ4K.js} +12 -12
  37. package/dist/cli/{csv-6CFRU4CQ.mjs → csv-CIAWYPZO.mjs} +3 -3
  38. package/dist/cli/{db-RUKRHPBV.mjs → db-SX73JJBH.mjs} +4 -4
  39. package/dist/cli/{db-EJETRBBT.js → db-UENUIWQN.js} +29 -29
  40. package/dist/cli/{describe-AVBCGKX4.mjs → describe-4SC5G2FG.mjs} +8 -8
  41. package/dist/cli/{describe-N46DGDQ4.js → describe-7OGZQAGF.js} +15 -15
  42. package/dist/cli/{executions-OPBBBSDT.js → executions-UDXQNB34.js} +6 -6
  43. package/dist/cli/{executions-FCTCQYY3.mjs → executions-YB4IAUTW.mjs} +4 -4
  44. package/dist/cli/{feedback-RSPSGS2W.js → feedback-5SGAGRAW.js} +7 -7
  45. package/dist/cli/{feedback-XY7F7FF6.mjs → feedback-76QWZSW3.mjs} +3 -3
  46. package/dist/cli/git-4PRJV7B3.js +23 -0
  47. package/dist/cli/{git-ZQ534TRG.mjs → git-ESESPEVB.mjs} +4 -4
  48. package/dist/cli/index.js +79 -79
  49. package/dist/cli/index.mjs +31 -31
  50. package/dist/cli/{legacy-noops-S4Q4TBKQ.mjs → legacy-noops-6F6QSRDB.mjs} +4 -4
  51. package/dist/cli/{legacy-noops-WCLAYQNO.js → legacy-noops-E74OIJCW.js} +7 -7
  52. package/dist/cli/{monitors-UD6C7YUQ.js → monitors-4MIXICCR.js} +85 -85
  53. package/dist/cli/{monitors-7EONZILI.mjs → monitors-USOHPXUY.mjs} +4 -4
  54. package/dist/cli/{org-SPZF2UBU.mjs → org-2RRIFNXJ.mjs} +4 -4
  55. package/dist/cli/{org-EGED4FVT.js → org-DO3Q6L7S.js} +60 -60
  56. package/dist/cli/{play-KXWJX7RB.mjs → play-KAXYPLCQ.mjs} +7 -7
  57. package/dist/cli/play-SHRBJAO4.js +153 -0
  58. package/dist/cli/{providers-P2MRBKX2.mjs → providers-FKHLPGQO.mjs} +4 -4
  59. package/dist/cli/{providers-HWGPSJZ7.js → providers-RCUITFFY.js} +7 -7
  60. package/dist/cli/{quickstart-VEEHUU7O.mjs → quickstart-CDBWA6IK.mjs} +3 -3
  61. package/dist/cli/{quickstart-CL4AB46M.js → quickstart-XGU4M4Z5.js} +5 -5
  62. package/dist/cli/{search-D7CLJLVU.mjs → search-QA4DAJPS.mjs} +5 -5
  63. package/dist/cli/search-ZHYH2BA3.js +26 -0
  64. package/dist/cli/{secrets-ZDW4MTJL.mjs → secrets-6S2CDL2M.mjs} +4 -4
  65. package/dist/cli/{secrets-NGB5OD2W.js → secrets-KYKXEHNR.js} +13 -13
  66. package/dist/cli/{sessions-MTN3SBTL.js → sessions-PWAIUF7I.js} +5 -5
  67. package/dist/cli/{sessions-HYUYIAHB.mjs → sessions-WGLVMQYC.mjs} +4 -4
  68. package/dist/cli/{settings-X43X7H54.js → settings-CNWO5VFJ.js} +74 -74
  69. package/dist/cli/{settings-RMABGZ6N.mjs → settings-FQ5CWYNQ.mjs} +7 -7
  70. package/dist/cli/{setup-QEM6U5TO.js → setup-ABIO2LJD.js} +41 -41
  71. package/dist/cli/{setup-N7KUH3AM.mjs → setup-RRT66ENS.mjs} +6 -6
  72. package/dist/cli/{skills-H3STANPK.mjs → skills-3LY2RQE3.mjs} +4 -4
  73. package/dist/cli/skills-OBTT3OF7.js +28 -0
  74. package/dist/cli/tools-DMXHSMU2.js +40 -0
  75. package/dist/cli/{tools-FSEOJNTY.mjs → tools-TQMHPW3U.mjs} +6 -6
  76. package/dist/cli/update-4CK752WQ.js +28 -0
  77. package/dist/cli/{update-6BUK4OLS.mjs → update-6U4ASVZX.mjs} +6 -6
  78. package/dist/cli/{workflow-4GZCYDZS.js → workflow-GVXAFVXF.js} +15 -15
  79. package/dist/cli/{workflow-Q7RJGAKL.mjs → workflow-XLE4N3W3.mjs} +5 -5
  80. package/dist/index.js +6 -6
  81. package/dist/index.mjs +3 -3
  82. package/dist/install-integrity.json +75 -74
  83. package/dist/release.d.mts +1 -1
  84. package/dist/release.d.ts +1 -1
  85. package/dist/release.js +2 -2
  86. package/dist/release.mjs +1 -1
  87. package/package.json +1 -1
  88. package/dist/cli/auth-J2C5CQ7M.js +0 -31
  89. package/dist/cli/client-CCDQC7ZY.js +0 -20
  90. package/dist/cli/git-DZTOBIUF.js +0 -23
  91. package/dist/cli/play-5MDIQGCF.js +0 -153
  92. package/dist/cli/search-6H77HQL3.js +0 -26
  93. package/dist/cli/skills-7H2OD626.js +0 -28
  94. package/dist/cli/tools-UYW5T5PU.js +0 -40
  95. package/dist/cli/update-K743Q4EF.js +0 -28
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkAUB3AW3Pjs = require('./chunk-AUB3AW3P.js');
6
+ var _chunkSJIF45BKjs = require('./chunk-SJIF45BK.js');
7
7
 
8
8
 
9
9
  var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
@@ -131,20 +131,109 @@ var _os = require('os');
131
131
  var _path = require('path');
132
132
  var _child_process = require('child_process'); var childProcess = _interopRequireWildcard(_child_process);
133
133
  var _sync = require('csv-parse/sync');
134
+
135
+ // ../plays/csv-text-repair.ts
136
+ var CP1252_HIGH_TO_BYTE = /* @__PURE__ */ new Map([
137
+ [8364, 128],
138
+ [8218, 130],
139
+ [402, 131],
140
+ [8222, 132],
141
+ [8230, 133],
142
+ [8224, 134],
143
+ [8225, 135],
144
+ [710, 136],
145
+ [8240, 137],
146
+ [352, 138],
147
+ [8249, 139],
148
+ [338, 140],
149
+ [381, 142],
150
+ [8216, 145],
151
+ [8217, 146],
152
+ [8220, 147],
153
+ [8221, 148],
154
+ [8226, 149],
155
+ [8211, 150],
156
+ [8212, 151],
157
+ [732, 152],
158
+ [8482, 153],
159
+ [353, 154],
160
+ [8250, 155],
161
+ [339, 156],
162
+ [382, 158],
163
+ [376, 159]
164
+ ]);
165
+ var MAC_ROMAN_HIGH = "\xC4\xC5\xC7\xC9\xD1\xD6\xDC\xE1\xE0\xE2\xE4\xE3\xE5\xE7\xE9\xE8\xEA\xEB\xED\xEC\xEE\xEF\xF1\xF3\xF2\xF4\xF6\xF5\xFA\xF9\xFB\xFC\u2020\xB0\xA2\xA3\xA7\u2022\xB6\xDF\xAE\xA9\u2122\xB4\xA8\u2260\xC6\xD8\u221E\xB1\u2264\u2265\xA5\xB5\u2202\u2211\u220F\u03C0\u222B\xAA\xBA\u03A9\xE6\xF8\xBF\xA1\xAC\u221A\u0192\u2248\u2206\xAB\xBB\u2026\xA0\xC0\xC3\xD5\u0152\u0153\u2013\u2014\u201C\u201D\u2018\u2019\xF7\u25CA\xFF\u0178\u2044\u20AC\u2039\u203A\uFB01\uFB02\u2021\xB7\u201A\u201E\u2030\xC2\xCA\xC1\xCB\xC8\xCD\xCE\xCF\xCC\xD3\xD4\uF8FF\xD2\xDA\xDB\xD9\u0131\u02C6\u02DC\xAF\u02D8\u02D9\u02DA\xB8\u02DD\u02DB\u02C7";
166
+ var MAC_ROMAN_TO_BYTE = new Map(
167
+ [...MAC_ROMAN_HIGH].map((ch, i) => [ch.codePointAt(0), 128 + i])
168
+ );
169
+ var STRICT_UTF8 = new TextDecoder("utf-8", { fatal: true });
170
+ function cp1252Byte(code) {
171
+ if (code < 256) return code;
172
+ return _nullishCoalesce(CP1252_HIGH_TO_BYTE.get(code), () => ( null));
173
+ }
174
+ function macRomanByte(code) {
175
+ if (code < 128) return code;
176
+ return _nullishCoalesce(MAC_ROMAN_TO_BYTE.get(code), () => ( null));
177
+ }
178
+ function decodeAs(run, toByte) {
179
+ const bytes = new Uint8Array(run.length);
180
+ let i = 0;
181
+ for (const ch of run) {
182
+ const byte = toByte(ch.codePointAt(0));
183
+ if (byte === null) return null;
184
+ bytes[i++] = byte;
185
+ }
186
+ if (!bytes.subarray(0, i).some((b) => b >= 194 && b <= 244)) return null;
187
+ try {
188
+ return STRICT_UTF8.decode(bytes.subarray(0, i));
189
+ } catch (e) {
190
+ return null;
191
+ }
192
+ }
193
+ var NON_ASCII_RUN = /[^\u0000-\u007f]+/g;
194
+ function repairMisdecodedText(value) {
195
+ if (!/[^\u0000-\u007f]/.test(value)) return value;
196
+ let changed = false;
197
+ const repaired = value.replace(NON_ASCII_RUN, (run) => {
198
+ const fixed = _nullishCoalesce(decodeAs(run, cp1252Byte), () => ( decodeAs(run, macRomanByte)));
199
+ if (fixed === null || fixed === run) return run;
200
+ changed = true;
201
+ return fixed;
202
+ });
203
+ return changed ? repaired : value;
204
+ }
205
+ function repairRecordText(record) {
206
+ for (const key of Object.keys(record)) {
207
+ const value = record[key];
208
+ if (typeof value === "string") {
209
+ record[key] = repairMisdecodedText(value);
210
+ }
211
+ }
212
+ return record;
213
+ }
214
+ function csvInputTextOptions() {
215
+ return {
216
+ bom: true,
217
+ columns: (header) => header.map(repairMisdecodedText),
218
+ on_record: repairRecordText
219
+ };
220
+ }
221
+
222
+ // src/cli/utils.ts
134
223
  var _sync3 = require('csv-stringify/sync');
135
224
  var BROWSER_OPEN_COOLDOWN_MS = 3e4;
136
225
  var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
137
226
  var defaultBrowserCommandRunner = childProcess;
138
227
  function getAuthedHttpClient() {
139
- const config = _chunkAUB3AW3Pjs.resolveConfig.call(void 0, );
140
- return { config, http: new (0, _chunkAUB3AW3Pjs.HttpClient)(config) };
228
+ const config = _chunkSJIF45BKjs.resolveConfig.call(void 0, );
229
+ return { config, http: new (0, _chunkSJIF45BKjs.HttpClient)(config) };
141
230
  }
142
231
  function stableOsUserId() {
143
232
  try {
144
233
  const info = _os.userInfo.call(void 0, );
145
234
  if (typeof info.uid === "number") return `uid-${info.uid}`;
146
235
  if (info.username) return `user-${info.username}`;
147
- } catch (e) {
236
+ } catch (e2) {
148
237
  }
149
238
  return "unknown-user";
150
239
  }
@@ -171,7 +260,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
171
260
  try {
172
261
  _fs.mkdirSync.call(void 0, lockPath, { mode: 448 });
173
262
  locked = true;
174
- } catch (e2) {
263
+ } catch (e3) {
175
264
  return false;
176
265
  }
177
266
  let lastOpenedAt = 0;
@@ -200,7 +289,7 @@ function claimBrowserOpen(now = Date.now(), stateDir, targetUrl) {
200
289
  { encoding: "utf-8", mode: 384 }
201
290
  );
202
291
  return true;
203
- } catch (e3) {
292
+ } catch (e4) {
204
293
  return true;
205
294
  } finally {
206
295
  if (locked) {
@@ -212,7 +301,7 @@ function extractUrlHost(raw) {
212
301
  try {
213
302
  const parsed = new URL(raw.includes("://") ? raw : `https://${raw}`);
214
303
  return parsed.port ? `${parsed.hostname.toLowerCase()}:${parsed.port}` : parsed.hostname.toLowerCase();
215
- } catch (e4) {
304
+ } catch (e5) {
216
305
  return "";
217
306
  }
218
307
  }
@@ -233,7 +322,7 @@ function browserAppNameFromBundleId(bundleId) {
233
322
  function currentOsUsername() {
234
323
  try {
235
324
  return _os.userInfo.call(void 0, ).username || "";
236
- } catch (e5) {
325
+ } catch (e6) {
237
326
  return "";
238
327
  }
239
328
  }
@@ -249,7 +338,7 @@ function readMacosUserHome(runner = defaultBrowserCommandRunner) {
249
338
  const match = String(output).match(/NFSHomeDirectory:\s*(.+)\s*$/m);
250
339
  const home = _optionalChain([match, 'optionalAccess', _ => _[1], 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
251
340
  if (home) return home;
252
- } catch (e6) {
341
+ } catch (e7) {
253
342
  }
254
343
  }
255
344
  return _os.homedir.call(void 0, );
@@ -283,7 +372,7 @@ function readDefaultMacBrowserBundleId(runner = defaultBrowserCommandRunner) {
283
372
  return "";
284
373
  };
285
374
  return pickBundle("https") || pickBundle("http");
286
- } catch (e7) {
375
+ } catch (e8) {
287
376
  return "";
288
377
  }
289
378
  }
@@ -399,7 +488,7 @@ function hasOnlyHeadlessMacosBrowserInstances(appName, runner = defaultBrowserCo
399
488
  return lines.every(
400
489
  (line) => line.includes("--headless") || line.includes("--no-startup-window")
401
490
  );
402
- } catch (e8) {
491
+ } catch (e9) {
403
492
  return false;
404
493
  }
405
494
  }
@@ -413,7 +502,7 @@ function openNewVisibleMacosBrowserInstance(appName, targetUrl, runner = default
413
502
  }
414
503
  );
415
504
  return true;
416
- } catch (e9) {
505
+ } catch (e10) {
417
506
  return false;
418
507
  }
419
508
  }
@@ -435,7 +524,7 @@ function openUrlMacos(targetUrl, allowFocus, runner = defaultBrowserCommandRunne
435
524
  stdio: "ignore"
436
525
  });
437
526
  return true;
438
- } catch (e10) {
527
+ } catch (e11) {
439
528
  return false;
440
529
  }
441
530
  }
@@ -464,7 +553,7 @@ function openInBrowser(url, options = {}) {
464
553
  }
465
554
  childProcess.execFileSync("xdg-open", [targetUrl], { stdio: "ignore" });
466
555
  return "opened";
467
- } catch (e11) {
556
+ } catch (e12) {
468
557
  return "failed";
469
558
  }
470
559
  }
@@ -477,7 +566,7 @@ function collectLocalEnvInfo() {
477
566
  os: `${process.platform} ${process.arch}`,
478
567
  node_version: process.version,
479
568
  home_dir: homeDir,
480
- agent_runtime: _chunkAUB3AW3Pjs.detectAgentRuntime.call(void 0, )
569
+ agent_runtime: _chunkSJIF45BKjs.detectAgentRuntime.call(void 0, )
481
570
  };
482
571
  const env = process.env;
483
572
  const optional = {
@@ -504,11 +593,10 @@ function collectLocalEnvInfo() {
504
593
  function readCsvRows(csvPath) {
505
594
  const raw = _fs.readFileSync.call(void 0, _path.resolve.call(void 0, csvPath), "utf-8");
506
595
  return _sync.parse.call(void 0, raw, {
507
- // `csv-parse` otherwise treats a BOM before an opening quote as a field
508
- // value, then rejects the quote as invalid. A UTF-8 BOM is a valid file
509
- // prefix and must not become part of the first column name either.
510
- bom: true,
511
- columns: true,
596
+ // Strips the UTF-8 BOM (`csv-parse` otherwise treats one before an opening
597
+ // quote as a field value) and repairs mis-decoded UTF-8 in headers and
598
+ // cells, matching what the Play runtime does with the same file.
599
+ ...csvInputTextOptions(),
512
600
  skip_empty_lines: true
513
601
  });
514
602
  }
@@ -576,7 +664,7 @@ function csvSafeJsonString(value) {
576
664
  try {
577
665
  const serialized = JSON.stringify(value, csvSafeJsonReplacer);
578
666
  return _nullishCoalesce(serialized, () => ( null));
579
- } catch (e12) {
667
+ } catch (e13) {
580
668
  return String(value);
581
669
  }
582
670
  }
@@ -590,7 +678,7 @@ function parseMaybeJsonObject(value) {
590
678
  }
591
679
  try {
592
680
  return JSON.parse(trimmed);
593
- } catch (e13) {
681
+ } catch (e14) {
594
682
  return value;
595
683
  }
596
684
  }
@@ -725,9 +813,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
725
813
  }
726
814
  function withAgentCommandContext(value) {
727
815
  const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
728
- return _chunkAUB3AW3Pjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
816
+ return _chunkSJIF45BKjs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
729
817
  ...valueRecord,
730
- command_context: _chunkAUB3AW3Pjs.resolveCliCommandContext.call(void 0, )
818
+ command_context: _chunkSJIF45BKjs.resolveCliCommandContext.call(void 0, )
731
819
  } : value;
732
820
  }
733
821
  function printJson(value, fields) {
@@ -2,7 +2,7 @@ import {
2
2
  argsWantJson,
3
3
  openInBrowser,
4
4
  printCommandEnvelope
5
- } from "./chunk-2Y2QZJBT.mjs";
5
+ } from "./chunk-DRHVFFMJ.mjs";
6
6
  import {
7
7
  ACTIVE_ORG_ID_ENV,
8
8
  ACTIVE_ORG_NAME_ENV,
@@ -25,7 +25,7 @@ import {
25
25
  saveHostEnvValues,
26
26
  saveProjectDeeplineEnvValues,
27
27
  storedHostApiKey
28
- } from "./chunk-W6LB26RC.mjs";
28
+ } from "./chunk-J5NN6XCF.mjs";
29
29
 
30
30
  // src/cli/commands/auth.ts
31
31
  import {
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
49
49
  // getters keep their established compatibility behavior.
50
50
  // 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
51
51
  // 0.3.90 is the first deliberately versioned SDK release for API v3.
52
- version: "0.3.343",
52
+ version: "0.3.344",
53
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
54
  packageCapabilities: {
55
55
  updatePreferences: 1
@@ -10,7 +10,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
10
10
 
11
11
 
12
12
 
13
- var _chunkBCF43TLGjs = require('./chunk-BCF43TLG.js');
13
+ var _chunkFHCBNR7Mjs = require('./chunk-FHCBNR7M.js');
14
14
 
15
15
 
16
16
 
@@ -22,7 +22,7 @@ var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
22
22
 
23
23
 
24
24
 
25
- var _chunkFM36CTMMjs = require('./chunk-FM36CTMM.js');
25
+ var _chunkTYPYDSNYjs = require('./chunk-TYPYDSNY.js');
26
26
 
27
27
 
28
28
 
@@ -36,11 +36,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
36
36
 
37
37
 
38
38
 
39
- var _chunkIPEE3DIVjs = require('./chunk-IPEE3DIV.js');
39
+ var _chunkVL5IYXS3js = require('./chunk-VL5IYXS3.js');
40
40
 
41
41
 
42
42
 
43
- var _chunkAUB3AW3Pjs = require('./chunk-AUB3AW3P.js');
43
+ var _chunkSJIF45BKjs = require('./chunk-SJIF45BK.js');
44
44
 
45
45
 
46
46
  var _chunkFKKNYKDYjs = require('./chunk-FKKNYKDY.js');
@@ -88,10 +88,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
88
88
  }
89
89
  };
90
90
  function pendingToolExecutionPath(input) {
91
- const config = _chunkAUB3AW3Pjs.resolveConfig.call(void 0, );
91
+ const config = _chunkSJIF45BKjs.resolveConfig.call(void 0, );
92
92
  const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkNXDRDJ4Kjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
93
93
  return _path.join.call(void 0,
94
- _chunkAUB3AW3Pjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
94
+ _chunkSJIF45BKjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
95
95
  `pending-tool-execution-${fingerprint}.json`
96
96
  );
97
97
  }
@@ -535,12 +535,12 @@ function categoryEnumerationRender(summaries) {
535
535
  };
536
536
  }
537
537
  async function listToolCategories(emitJson, compact) {
538
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
538
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
539
539
  const rawTools = await client.listTools({ compact });
540
540
  const items = rawTools.map(toListedTool);
541
541
  const summaries = aggregateCategorySummaries(rawTools);
542
542
  const outputItems = compact ? items.map(compactTool) : items;
543
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
543
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
544
544
  {
545
545
  tools: outputItems,
546
546
  count: outputItems.length,
@@ -559,7 +559,7 @@ function unknownCategoryError(category, summaries, emitJson) {
559
559
  const known = summaries.map((item) => item.name);
560
560
  const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
561
561
  if (emitJson) {
562
- _chunkIPEE3DIVjs.printJson.call(void 0, {
562
+ _chunkVL5IYXS3js.printJson.call(void 0, {
563
563
  ok: false,
564
564
  exitCode: 4,
565
565
  code: "TOOL_CATEGORY_NOT_FOUND",
@@ -573,13 +573,13 @@ function unknownCategoryError(category, summaries, emitJson) {
573
573
  const render = categoryEnumerationRender(summaries);
574
574
  console.error(message);
575
575
  console.error("");
576
- console.error(_chunkIPEE3DIVjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
576
+ console.error(_chunkVL5IYXS3js.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
577
577
  console.error("");
578
578
  console.error(`Valid categories: ${known.join(", ")}`);
579
579
  return 4;
580
580
  }
581
581
  async function listToolsInCategory(category, emitJson) {
582
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
582
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
583
583
  const rawTools = await client.listTools({
584
584
  categories: category,
585
585
  compact: false
@@ -616,7 +616,7 @@ async function listToolsInCategory(category, emitJson) {
616
616
  }
617
617
  ]
618
618
  };
619
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
619
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
620
620
  {
621
621
  category,
622
622
  total: rows.length,
@@ -629,7 +629,7 @@ async function listToolsInCategory(category, emitJson) {
629
629
  return 0;
630
630
  }
631
631
  async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
632
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
632
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
633
633
  const items = (await client.listTools({
634
634
  categories: requestedCategories.join(","),
635
635
  compact
@@ -658,7 +658,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
658
658
  ]
659
659
  };
660
660
  const outputItems = compact ? items.map(compactTool) : items;
661
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
661
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
662
662
  {
663
663
  tools: outputItems,
664
664
  count: outputItems.length,
@@ -677,13 +677,13 @@ async function listTools(category, options = {}) {
677
677
  const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
678
678
  const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
679
679
  const compact = options.compact !== false;
680
- const emitJson = options.json === true || _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, );
680
+ const emitJson = options.json === true || _chunkVL5IYXS3js.shouldEmitJson.call(void 0, );
681
681
  if (positional && flagCategories.length > 0) {
682
682
  const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
683
683
  if (!flagIsSameSingle) {
684
684
  const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
685
685
  if (emitJson) {
686
- _chunkIPEE3DIVjs.printJson.call(void 0, {
686
+ _chunkVL5IYXS3js.printJson.call(void 0, {
687
687
  ok: false,
688
688
  exitCode: 2,
689
689
  code: "TOOL_LIST_CATEGORY_CONFLICT",
@@ -710,7 +710,7 @@ async function grepTools(queryInput, options = {}) {
710
710
  console.error("Usage: deepline tools grep <query> [--json]");
711
711
  return 1;
712
712
  }
713
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
713
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
714
714
  const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
715
715
  const mode = _nullishCoalesce(options.mode, () => ( "all"));
716
716
  const jsonOutput = options.json === true;
@@ -753,7 +753,7 @@ async function grepTools(queryInput, options = {}) {
753
753
  query,
754
754
  mode
755
755
  }) : null;
756
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
756
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
757
757
  {
758
758
  tools: outputTools,
759
759
  count: outputTools.length,
@@ -771,7 +771,7 @@ async function grepTools(queryInput, options = {}) {
771
771
  } : {},
772
772
  commandTemplates: TOOL_COMMAND_TEMPLATES
773
773
  },
774
- { json: options.json || _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, ) }
774
+ { json: options.json || _chunkVL5IYXS3js.shouldEmitJson.call(void 0, ) }
775
775
  );
776
776
  return 0;
777
777
  }
@@ -927,7 +927,7 @@ Examples:
927
927
  json: Boolean(options.json)
928
928
  });
929
929
  });
930
- _chunkBCF43TLGjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
930
+ _chunkFHCBNR7Mjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
931
931
  tools.command("grep <query>").description(
932
932
  "Literal grep over tool ids, descriptions, categories, and input fields."
933
933
  ).addHelpText(
@@ -1029,7 +1029,7 @@ Examples:
1029
1029
  process.exitCode = await narrowView();
1030
1030
  return;
1031
1031
  }
1032
- const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-N46DGDQ4.js")));
1032
+ const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-7OGZQAGF.js")));
1033
1033
  process.exitCode = await describeAnything(
1034
1034
  toolId,
1035
1035
  { ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
@@ -1111,7 +1111,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1111
1111
  console.error("Usage: deepline tools describe <toolId> [--json]");
1112
1112
  return 1;
1113
1113
  }
1114
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
1114
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
1115
1115
  let tool;
1116
1116
  try {
1117
1117
  tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
@@ -1165,7 +1165,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1165
1165
  const lines = toolPricingOnlyLines(tool, toolId);
1166
1166
  if (inferenceQuote)
1167
1167
  lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
1168
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
1168
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
1169
1169
  {
1170
1170
  toolId: String(tool.toolId || toolId),
1171
1171
  cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
@@ -1183,7 +1183,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1183
1183
  }
1184
1184
  if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
1185
1185
  const contract = toolContractJsonForDescribe(tool, toolId);
1186
- _chunkIPEE3DIVjs.printCompactJson.call(void 0, {
1186
+ _chunkVL5IYXS3js.printCompactJson.call(void 0, {
1187
1187
  toolId: contract.toolId,
1188
1188
  ...options.schemaOnly ? {
1189
1189
  inputSchema: contract.inputSchema,
@@ -1206,7 +1206,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1206
1206
  return 0;
1207
1207
  }
1208
1208
  if (options.contractJson) {
1209
- _chunkIPEE3DIVjs.printCompactJson.call(void 0, {
1209
+ _chunkVL5IYXS3js.printCompactJson.call(void 0, {
1210
1210
  ...toolContractJsonForDescribe(tool, toolId),
1211
1211
  ...modelDescription ? { modelOptions: modelDescription } : {},
1212
1212
  ...inferenceQuote ? { inferenceQuote } : {}
@@ -1215,7 +1215,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
1215
1215
  }
1216
1216
  const emitJson = options.json === true;
1217
1217
  if (emitJson) {
1218
- _chunkIPEE3DIVjs.printCompactJson.call(void 0, {
1218
+ _chunkVL5IYXS3js.printCompactJson.call(void 0, {
1219
1219
  ...toolMetadataJsonForDescribe(tool, toolId),
1220
1220
  ...modelDescription ? { modelOptions: modelDescription } : {},
1221
1221
  ...inferenceQuote ? { inferenceQuote } : {}
@@ -2626,7 +2626,7 @@ function parseExecuteOptions(toolId, options, output) {
2626
2626
  outputFormat = normalizeOutputFormat(options.outputFormat);
2627
2627
  }
2628
2628
  if (options.idempotencyKey !== void 0) {
2629
- _chunkFM36CTMMjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2629
+ _chunkTYPYDSNYjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
2630
2630
  }
2631
2631
  if (options.recoveryTimeoutMs !== void 0) {
2632
2632
  const parsed = Number(options.recoveryTimeoutMs);
@@ -2937,20 +2937,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
2937
2937
  }
2938
2938
  async function executeTool(toolId, options) {
2939
2939
  const output = toolExecuteJsonOption(options.json);
2940
- const wantsJson = _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, output.requested);
2940
+ const wantsJson = _chunkVL5IYXS3js.shouldEmitJson.call(void 0, output.requested);
2941
2941
  let parsed;
2942
2942
  try {
2943
2943
  parsed = parseExecuteOptions(toolId, options, output);
2944
2944
  } catch (error) {
2945
2945
  if (wantsJson) {
2946
- _chunkIPEE3DIVjs.printJsonError.call(void 0, error);
2946
+ _chunkVL5IYXS3js.printJsonError.call(void 0, error);
2947
2947
  } else {
2948
2948
  console.error(error instanceof Error ? error.message : String(error));
2949
2949
  }
2950
2950
  return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
2951
2951
  }
2952
2952
  const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
2953
- const client = new (0, _chunkFM36CTMMjs.DeeplineClient)();
2953
+ const client = new (0, _chunkTYPYDSNYjs.DeeplineClient)();
2954
2954
  let metadata;
2955
2955
  try {
2956
2956
  metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
@@ -2965,7 +2965,7 @@ async function executeTool(toolId, options) {
2965
2965
  );
2966
2966
  if (play) {
2967
2967
  if (wantsJson) {
2968
- _chunkIPEE3DIVjs.printJsonError.call(void 0,
2968
+ _chunkVL5IYXS3js.printJsonError.call(void 0,
2969
2969
  new Error(playAliasToolErrorMessage(parsed.toolId, play))
2970
2970
  );
2971
2971
  } else {
@@ -2978,7 +2978,7 @@ async function executeTool(toolId, options) {
2978
2978
  }
2979
2979
  if (isPlayLikeTool(metadata)) {
2980
2980
  if (wantsJson) {
2981
- _chunkIPEE3DIVjs.printJsonError.call(void 0,
2981
+ _chunkVL5IYXS3js.printJsonError.call(void 0,
2982
2982
  new Error(
2983
2983
  playLikeToolExecuteErrorMessage(
2984
2984
  parsed.toolId,
@@ -3014,7 +3014,7 @@ async function executeTool(toolId, options) {
3014
3014
  responseIntent,
3015
3015
  ...idempotencyKey ? { idempotencyKey } : {},
3016
3016
  ...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
3017
- searchRef: _chunkBCF43TLGjs.recentSearchRef.call(void 0, ),
3017
+ searchRef: _chunkFHCBNR7Mjs.recentSearchRef.call(void 0, ),
3018
3018
  cliInvocationId
3019
3019
  }).catch((error) => {
3020
3020
  const guidanceLines = toolGuidanceLines(metadata.guidance);
@@ -3053,8 +3053,8 @@ async function executeTool(toolId, options) {
3053
3053
  );
3054
3054
  const executeExitCode = toolExecuteExitCode(baseEnvelope);
3055
3055
  const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
3056
- if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, ))) {
3057
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
3056
+ if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkVL5IYXS3js.shouldEmitJson.call(void 0, ))) {
3057
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
3058
3058
  return true;
3059
3059
  }
3060
3060
  if (parsed.outputFormat === "json_file") {
@@ -3062,7 +3062,7 @@ async function executeTool(toolId, options) {
3062
3062
  rawResponse,
3063
3063
  `payload_${parsed.toolId}`
3064
3064
  );
3065
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
3065
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
3066
3066
  {
3067
3067
  ...baseEnvelope,
3068
3068
  local: {
@@ -3084,7 +3084,7 @@ async function executeTool(toolId, options) {
3084
3084
  `${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
3085
3085
  );
3086
3086
  if (wantsJson) {
3087
- _chunkIPEE3DIVjs.printJsonError.call(void 0, error);
3087
+ _chunkVL5IYXS3js.printJsonError.call(void 0, error);
3088
3088
  } else {
3089
3089
  console.error(error.message);
3090
3090
  }
@@ -3095,18 +3095,18 @@ async function executeTool(toolId, options) {
3095
3095
  rawResponse,
3096
3096
  `payload_${parsed.toolId}`
3097
3097
  );
3098
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
3098
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
3099
3099
  {
3100
3100
  ...baseEnvelope,
3101
3101
  local: {
3102
3102
  payload_file: jsonPath
3103
3103
  }
3104
3104
  },
3105
- { json: parsed.outputFormat === "csv_file" || _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, ) }
3105
+ { json: parsed.outputFormat === "csv_file" || _chunkVL5IYXS3js.shouldEmitJson.call(void 0, ) }
3106
3106
  );
3107
3107
  return true;
3108
3108
  }
3109
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
3109
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
3110
3110
  return true;
3111
3111
  }
3112
3112
  const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
@@ -3130,7 +3130,7 @@ async function executeTool(toolId, options) {
3130
3130
  seededScript
3131
3131
  });
3132
3132
  if (parsed.outputFormat === "csv_file") {
3133
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
3133
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
3134
3134
  return true;
3135
3135
  }
3136
3136
  if (parsed.outPath) {
@@ -3138,7 +3138,7 @@ async function executeTool(toolId, options) {
3138
3138
  toolId: parsed.toolId,
3139
3139
  idempotencyKey
3140
3140
  });
3141
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
3141
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0, materializedEnvelope, {
3142
3142
  json: wantsJson,
3143
3143
  text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
3144
3144
  inspect: ${inspection.inspect}
@@ -3147,7 +3147,7 @@ inspect: ${inspection.inspect}
3147
3147
  return true;
3148
3148
  }
3149
3149
  if (parsed.noPreview) {
3150
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0,
3150
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0,
3151
3151
  {
3152
3152
  ...materializedEnvelope,
3153
3153
  local: {
@@ -3155,12 +3155,12 @@ inspect: ${inspection.inspect}
3155
3155
  output_path: csv.path
3156
3156
  }
3157
3157
  },
3158
- { json: _chunkIPEE3DIVjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
3158
+ { json: _chunkVL5IYXS3js.shouldEmitJson.call(void 0, ), text: `${csv.path}
3159
3159
  ` }
3160
3160
  );
3161
3161
  return true;
3162
3162
  }
3163
- _chunkIPEE3DIVjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
3163
+ _chunkVL5IYXS3js.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
3164
3164
  return true;
3165
3165
  });
3166
3166
  if (delivered) {
@@ -3,11 +3,11 @@ import {
3
3
  MONITOR_JOB_PHASES,
4
4
  MONITOR_JOB_RECONCILIATION_STATES,
5
5
  MONITOR_JOB_STATES
6
- } from "./chunk-DEDNTNXS.mjs";
6
+ } from "./chunk-23D4YCM6.mjs";
7
7
  import "./chunk-CBVIJSHF.mjs";
8
- import "./chunk-W6LB26RC.mjs";
8
+ import "./chunk-J5NN6XCF.mjs";
9
9
  import "./chunk-DLIRSHV6.mjs";
10
- import "./chunk-U5L6FIIL.mjs";
10
+ import "./chunk-RN7NIZIL.mjs";
11
11
  import "./chunk-6IKARAYD.mjs";
12
12
  import "./chunk-NXGCO4JB.mjs";
13
13
  import "./chunk-WZYKRD7T.mjs";